From f8b34b0ff80c6948b0059fa46961d3f61bd5296b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Apr 2015 09:05:17 -0500 Subject: [svn-r26804] Updated the Fortran install information. --- release_docs/INSTALL | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/release_docs/INSTALL b/release_docs/INSTALL index 2dcb9be..cdbf5b4 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -315,21 +315,22 @@ CONTENTS $ ./configure --enable-fortran $ ./configure --enable-cxx - Configuration will halt if a working Fortran 90 or 95 compiler or - C++ compiler is not found. Currently, the Fortran configure tests - for these compilers in order: f90, pgf90, f95. To use an - alternate compiler specify it with the FC variable: + Additionally, --enable-fortran --enable-fortran2003 enables Fortran + 2003 APIs. Configuration will halt if a working Fortran 90/95 compiler + (or a working Fortran 2003 compiler in the case of + --enable-fortran2003) was specified or C++ compiler is not found. + Currently, the Fortran configure tests for these compilers in order: + gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 + fort lf95 g95 ifc efc gfc. To use an alternate compiler specify it with + the FC variable: - $ FC=/usr/local/bin/g95 ./configure --enable-fortran + $ FC=/usr/local/bin/gfortran ./configure --enable-fortran --enable-fortran2003 Note: The Fortran and C++ interfaces are not supported on all the platforms the main HDF5 Library supports. Also, the Fortran interface supports parallel HDF5 while the C++ interface does not. - Note: See sections 4.7 and 4.8 for building the Fortran library with - Intel or PGI compilers. - 4.3.6. Specifying other programs The build system has been tuned for use with GNU make but also works with other versions of make. If the `make' command runs a @@ -667,33 +668,6 @@ C.1. Building and testing with Intel compilers However, if you still experience a problem, you may want to check this line in the libtool file and make sure that it has the correct value. - * To build the Fortran library using Intel compiler on Linux 2.4, - one has to perform the following steps: - x Use the -fpp -DDEC$=DEC_ -DMS$=MS_ compiler flags to disable - DEC and MS compiler directives in source files in the fortran/src, - fortran/test, and fortran/examples directories. - E.g., setenv F9X 'ifc -fpp -DDEC$=DEC_ -DMS$=MS_' - Do not use double quotes since $ is interpreted in them. - - x If Version 6.0 of Fortran compiler is used, the build fails in - the fortran/test directory and then in the fortran/examples - directory. To proceed, edit the work.pcl files in those - directories to contain two lines: - - work.pc - ../src/work.pc - - x Do the same in the fortran/examples directory. - - x A problem with work.pc files was resolved for the newest version - of the compiler (7.0). - - * To build the Fortran library on IA32, follow the steps described - above, except that the DEC and MS compiler directives should be - removed manually or use a patch from HDF FTP server: - - ftp://ftp.hdfgroup.org/HDF5/current/ - C.2. Building and testing with PGI compilers When PGI C and C++ compilers are used (pgcc or pgCC), you will need to -- cgit v0.12 From 74e0d6d697072ade42a04200da5cb9cddd0ef128 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Apr 2015 15:46:59 -0500 Subject: [svn-r26807] Combined *_F03* files and removed *_F90* files. --- MANIFEST | 20 - fortran/src/CMakeLists.txt | 21 - fortran/src/H5Af.c | 4 +- fortran/src/H5Aff.f90 | 1780 +++++++++++++++++++++---- fortran/src/H5Aff_F03.f90 | 1267 ------------------ fortran/src/H5Aff_F90.f90 | 1618 ----------------------- fortran/src/H5Dff.f90 | 2348 +++++++++++++++++++++++++++++++++ fortran/src/H5Dff_F03.f90 | 2389 ---------------------------------- fortran/src/H5Dff_F90.f90 | 3004 ------------------------------------------- fortran/src/H5Eff.f90 | 61 + fortran/src/H5Eff_F03.f90 | 108 -- fortran/src/H5Eff_F90.f90 | 89 -- fortran/src/H5Fff.f90 | 60 + fortran/src/H5Fff_F03.f90 | 99 -- fortran/src/H5Fff_F90.f90 | 43 - fortran/src/H5Lff.f90 | 196 +++ fortran/src/H5Lff_F03.f90 | 242 ---- fortran/src/H5Lff_F90.f90 | 39 - fortran/src/H5Off.f90 | 392 ++++++ fortran/src/H5Off_F03.f90 | 435 ------- fortran/src/H5Off_F90.f90 | 39 - fortran/src/H5Pff.f90 | 1224 ++++++++++++++++++ fortran/src/H5Pff_F03.f90 | 1267 ------------------ fortran/src/H5Pff_F90.f90 | 949 -------------- fortran/src/H5Rff.f90 | 665 +++++++++- fortran/src/H5Rff_F03.f90 | 719 ----------- fortran/src/H5Rff_F90.f90 | 514 -------- fortran/src/H5Tff.f90 | 180 +++ fortran/src/H5Tff_F03.f90 | 223 ---- fortran/src/H5Tff_F90.f90 | 95 -- fortran/src/H5_ff.f90 | 46 +- fortran/src/H5_ff_F03.f90 | 75 -- fortran/src/H5_ff_F90.f90 | 34 - fortran/src/H5f90global.f90 | 28 + fortran/src/H5f90proto.h | 6 +- fortran/src/HDF5.f90 | 9 - fortran/src/Makefile.am | 46 +- fortran/src/Makefile.in | 72 +- 38 files changed, 6772 insertions(+), 13634 deletions(-) delete mode 100644 fortran/src/H5Aff_F03.f90 delete mode 100644 fortran/src/H5Aff_F90.f90 delete mode 100644 fortran/src/H5Dff_F03.f90 delete mode 100644 fortran/src/H5Dff_F90.f90 delete mode 100644 fortran/src/H5Eff_F03.f90 delete mode 100644 fortran/src/H5Eff_F90.f90 delete mode 100644 fortran/src/H5Fff_F03.f90 delete mode 100644 fortran/src/H5Fff_F90.f90 delete mode 100644 fortran/src/H5Lff_F03.f90 delete mode 100644 fortran/src/H5Lff_F90.f90 delete mode 100644 fortran/src/H5Off_F03.f90 delete mode 100644 fortran/src/H5Off_F90.f90 delete mode 100644 fortran/src/H5Pff_F03.f90 delete mode 100644 fortran/src/H5Pff_F90.f90 delete mode 100644 fortran/src/H5Rff_F03.f90 delete mode 100644 fortran/src/H5Rff_F90.f90 delete mode 100644 fortran/src/H5Tff_F03.f90 delete mode 100644 fortran/src/H5Tff_F90.f90 delete mode 100644 fortran/src/H5_ff_F03.f90 delete mode 100644 fortran/src/H5_ff_F90.f90 diff --git a/MANIFEST b/MANIFEST index bad1bfd..b80a253 100644 --- a/MANIFEST +++ b/MANIFEST @@ -272,54 +272,34 @@ ./fortran/src/H5_f.c ./fortran/src/H5_ff.f90 -./fortran/src/H5_ff_F90.f90 -./fortran/src/H5_ff_F03.f90 ./fortran/src/H5_DBLE_InterfaceInclude.f90 ./fortran/src/H5_DBLE_InterfaceExclude.f90 ./fortran/src/H5Af.c ./fortran/src/H5Aff.f90 -./fortran/src/H5Aff_F90.f90 -./fortran/src/H5Aff_F03.f90 ./fortran/src/H5Df.c ./fortran/src/H5Dff.f90 -./fortran/src/H5Dff_F90.f90 -./fortran/src/H5Dff_F03.f90 ./fortran/src/H5Ef.c ./fortran/src/H5Eff.f90 -./fortran/src/H5Eff_F90.f90 -./fortran/src/H5Eff_F03.f90 ./fortran/src/H5FDmpiof.c ./fortran/src/H5FDmpioff.f90 ./fortran/src/H5Ff.c ./fortran/src/H5Fff.f90 -./fortran/src/H5Fff_F90.f90 -./fortran/src/H5Fff_F03.f90 ./fortran/src/H5Gf.c ./fortran/src/H5Gff.f90 ./fortran/src/H5If.c ./fortran/src/H5Iff.f90 ./fortran/src/H5Lf.c ./fortran/src/H5Lff.f90 -./fortran/src/H5Lff_F90.f90 -./fortran/src/H5Lff_F03.f90 ./fortran/src/H5Of.c ./fortran/src/H5Off.f90 -./fortran/src/H5Off_F90.f90 -./fortran/src/H5Off_F03.f90 ./fortran/src/H5Pf.c ./fortran/src/H5Pff.f90 -./fortran/src/H5Pff_F90.f90 -./fortran/src/H5Pff_F03.f90 ./fortran/src/H5Rf.c ./fortran/src/H5Rff.f90 -./fortran/src/H5Rff_F90.f90 -./fortran/src/H5Rff_F03.f90 ./fortran/src/H5Sf.c ./fortran/src/H5Sff.f90 ./fortran/src/H5Tf.c ./fortran/src/H5Tff.f90 -./fortran/src/H5Tff_F90.f90 -./fortran/src/H5Tff_F03.f90 ./fortran/src/H5Zf.c ./fortran/src/H5Zff.f90 ./fortran/src/H5f90.h diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c015072..67edd24 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -156,17 +156,6 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES ) #----------------------------------------------------------------------------- -# Fortran 2003 standard -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_F2003) - # F2003 features are enabled - set (F_STATUS "_F03") -else (HDF5_ENABLE_F2003) - # F2003 features are not enabled - set (F_STATUS "_F90") -endif (HDF5_ENABLE_F2003) - -#----------------------------------------------------------------------------- # Fortran Real Size #----------------------------------------------------------------------------- if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) @@ -186,7 +175,6 @@ set (f90_F_SRCS # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff${F_STATUS}.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.f90 @@ -201,15 +189,6 @@ set (f90_F_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.f90 - ${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 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff${F_STATUS}.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff${F_STATUS}.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.f90 ) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 240fbc3..b9ca82a 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -960,7 +960,7 @@ done: * SOURCE */ int_f -nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) +h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -1109,7 +1109,7 @@ done: * SOURCE */ int_f -nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) +h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) /******/ { H5O_info_t oinfo; /* Object info */ diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 index 25f7fa7..f8f361f 100644 --- a/fortran/src/H5Aff.f90 +++ b/fortran/src/H5Aff.f90 @@ -26,6 +26,37 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES +! +! (A) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (1) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (2) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! (B) ! *** IMPORTANT *** ! If you add a new H5A function you must add the function name to the ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. @@ -42,6 +73,95 @@ MODULE H5A ! Windows DEC Visual Fortran and OSF compilers happy and do right things. ! 05/01/02 EP ! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_real_scalar + MODULE PROCEDURE h5awrite_real_1 + MODULE PROCEDURE h5awrite_real_2 + MODULE PROCEDURE h5awrite_real_3 + MODULE PROCEDURE h5awrite_real_4 + MODULE PROCEDURE h5awrite_real_5 + MODULE PROCEDURE h5awrite_real_6 + MODULE PROCEDURE h5awrite_real_7 + ! This is the preferred way to call h5awrite + ! by passing an address + MODULE PROCEDURE h5awrite_ptr + + END INTERFACE + + INTERFACE h5aread_f + + MODULE PROCEDURE h5aread_integer_scalar + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_real_scalar + MODULE PROCEDURE h5aread_real_1 + MODULE PROCEDURE h5aread_real_2 + MODULE PROCEDURE h5aread_real_3 + MODULE PROCEDURE h5aread_real_4 + MODULE PROCEDURE h5aread_real_5 + MODULE PROCEDURE h5aread_real_6 + MODULE PROCEDURE h5aread_real_7 + + ! This is the preferred way to call h5aread + ! by passing an address + MODULE PROCEDURE h5aread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Awrite routine + + INTERFACE + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5awrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Aread routine + + INTERFACE + INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5aread_f_c + END INTERFACE CONTAINS @@ -80,7 +200,8 @@ CONTAINS ! ! SOURCE SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & - hdferr, acpl_id, aapl_id ) + hdferr, acpl_id, aapl_id ) + USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name @@ -95,37 +216,33 @@ CONTAINS INTEGER(HID_T) :: acpl_id_default INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: namelen + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTERFACE - INTEGER FUNCTION h5acreate_c(loc_id, name, namelen, type_id, & - space_id, acpl_id_default, aapl_id_default, attr_id) + INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & + space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_C'::h5acreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5acreate_c + INTEGER(HID_T), INTENT(IN), VALUE :: loc_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN), VALUE :: type_id + INTEGER(HID_T), INTENT(IN), VALUE :: space_id + INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default + END FUNCTION H5Acreate2 END INTERFACE acpl_id_default = H5P_DEFAULT_F aapl_id_default = H5P_DEFAULT_F - namelen = LEN(name) IF (PRESENT(acpl_id)) acpl_id_default = acpl_id IF (PRESENT(aapl_id)) aapl_id_default = aapl_id - hdferr = h5acreate_c(loc_id, name, namelen, type_id, space_id, & - acpl_id_default, aapl_id_default, attr_id) + c_name = TRIM(name)//C_NULL_CHAR + attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & + acpl_id_default, aapl_id_default) - END SUBROUTINE h5acreate_f + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + END SUBROUTINE h5acreate_f ! !****s* H5A/h5aopen_name_f @@ -154,37 +271,36 @@ CONTAINS ! port). February 27, 2001 ! ! SOURCE - SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr) + SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) + USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTEGER(SIZE_T) :: namelen + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTERFACE - INTEGER FUNCTION h5aopen_name_c(obj_id, name, namelen, attr_id) + INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_NAME_C'::h5aopen_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_name_c + INTEGER(HID_T), INTENT(IN), VALUE :: obj_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + END FUNCTION H5Aopen_name END INTERFACE - namelen = LEN(name) - hdferr = h5aopen_name_c(obj_id, name, namelen, attr_id) - END SUBROUTINE h5aopen_name_f + c_name = TRIM(name)//C_NULL_CHAR + attr_id = H5Aopen_name(obj_id, c_name) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_name_f ! -!****s* H5A/h5aopen_idx_f +!****s* H5A/H5Aopen_idx_f ! ! NAME -! h5aopen_idx_f +! H5Aopen_idx_f ! ! PURPOSE ! Opens the attribute specified by its index. @@ -207,7 +323,8 @@ CONTAINS ! port). February 27, 2001 ! ! SOURCE - SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr) + SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) + USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier INTEGER, INTENT(IN) :: index ! Attribute index @@ -216,24 +333,25 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5aopen_idx_c(obj_id, index, attr_id) + INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_IDX_C'::h5aopen_idx_c - !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: index - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_idx_c + INTEGER(C_INT), INTENT(IN) :: index + END FUNCTION H5Aopen_idx END INTERFACE - hdferr = h5aopen_idx_c(obj_id, index, attr_id) - END SUBROUTINE h5aopen_idx_f + attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_idx_f ! -!****s* H5A/h5aget_space_f +!****s* H5A/H5Aget_space_f ! ! NAME -! h5aget_space_f +! H5Aget_space_f ! ! PURPOSE ! Gets a copy of the dataspace for an attribute. @@ -256,30 +374,31 @@ CONTAINS ! ! ! SOURCE - SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr) + SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5aget_space_c(attr_id, space_id) + INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_SPACE_C'::h5aget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5aget_space_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_space END INTERFACE - hdferr = h5aget_space_c(attr_id, space_id) - END SUBROUTINE h5aget_space_f + space_id = H5Aget_space(attr_id) + + hdferr = 0 + IF(space_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_space_f ! -!****s* H5A/h5aget_type_f +!****s* H5A/H5Aget_type_f ! ! NAME -! h5aget_type_f +! H5Aget_type_f ! ! PURPOSE ! Gets an attribute datatype. @@ -300,30 +419,31 @@ CONTAINS ! port). February 27, 2001 ! ! SOURCE - SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr) + SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5aget_type_c(attr_id, type_id) + INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_TYPE_C'::h5aget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5aget_type_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_type END INTERFACE - hdferr = h5aget_type_c(attr_id, type_id) - END SUBROUTINE h5aget_type_f + type_id = H5Aget_type(attr_id) + + hdferr = 0 + IF(type_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_type_f ! -!****s* H5A/h5aget_name_f +!****s* H5A/H5Aget_name_f ! ! NAME -! h5aget_name_f +! H5Aget_name_f ! ! PURPOSE ! Gets an attribute name. @@ -346,35 +466,39 @@ CONTAINS ! ! ! SOURCE - SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) + SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) + USE ISO_C_BINDING IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! name length is successful, -1 if fail + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + + CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf + !***** INTERFACE - INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) + INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_C'::h5aget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5aget_name_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + INTEGER(SIZE_T), INTENT(IN), VALUE :: size + CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION H5Aget_name END INTERFACE - hdferr = h5aget_name_c(attr_id, size, buf) - END SUBROUTINE h5aget_name_f + ! add 1 for the null char + hdferr = H5Aget_name(attr_id, size+1, c_buf) + + CALL C2F_string(c_buf, buf) + + END SUBROUTINE H5Aget_name_f ! -!****s* H5A/h5aget_name_by_idx_f +!****s* H5A/H5Aget_name_by_idx_f ! ! NAME -! h5aget_name_by_idx_f +! H5Aget_name_by_idx_f ! ! PURPOSE ! Gets an attribute name, by attribute index position. @@ -475,11 +599,77 @@ CONTAINS END SUBROUTINE h5aget_name_by_idx_f -! -!****s* H5A/h5aget_num_attrs_f +!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & +!!$ n, name, hdferr, size, lapl_id) +!!$ USE ISO_C_BINDING +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached +!!$ CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, +!!$ ! from which attribute is to be removed *TEST* check NULL +!!$ INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: +!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type +!!$ ! H5_INDEX_NAME_F - Index on names +!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order +!!$ ! H5_INDEX_N_F - Number of indices defined +!!$ +!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: +!!$ ! H5_ITER_UNKNOWN_F - Unknown order +!!$ ! H5_ITER_INC_F - Increasing order +!!$ ! H5_ITER_DEC_F - Decreasing order +!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest +!!$ ! H5_ITER_N_F - Number of iteration orders +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index +!!$ CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! Returns attribute name size, +!!$ ! -1 if fail +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, +!!$ ! of the attribute +!!$!***** +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER(SIZE_T) :: obj_namelen +!!$ INTEGER(SIZE_T) :: size_default, c_size +!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & +!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') +!!$ USE ISO_C_BINDING +!!$ USE H5GLOBAL +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name +!!$ INTEGER(C_INT), INTENT(IN) :: idx_type +!!$ INTEGER(C_INT), INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name +!!$ INTEGER(SIZE_T) :: size_default +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION H5Aget_name_by_idx +!!$ END INTERFACE +!!$ +!!$ obj_namelen = LEN(obj_name) +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ size_default = LEN(name) +!!$ +!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & +!!$ n, c_name, size_default, lapl_id_default) +!!$ +!!$ IF(c_size.LT.0) THEN +!!$ hdferr = -1 +!!$ ELSE +!!$ CALL C2F_string(c_name, name) +!!$ IF(PRESENT(size)) size = c_size +!!$ ENDIF +!!$ +!!$ END SUBROUTINE H5Aget_name_by_idx_f +! +!****s* H5A/H5Aget_num_attrs_f ! ! NAME -! h5aget_num_attrs_f +! H5Aget_num_attrs_f ! ! PURPOSE ! Determines the number of attributes attached to an object. @@ -509,11 +699,8 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) + INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NUM_ATTRS_C'::h5aget_num_attrs_c - !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: attr_num END FUNCTION h5aget_num_attrs_c @@ -523,10 +710,10 @@ CONTAINS END SUBROUTINE h5aget_num_attrs_f ! -!****s* H5A/h5adelete_f +!****s* H5A/H5Adelete_f ! ! NAME -! h5adelete_f +! H5Adelete_f ! ! PURPOSE ! Deletes an attribute of an object (group, dataset or @@ -548,7 +735,7 @@ CONTAINS ! port). February 27, 2001 ! ! SOURCE - SUBROUTINE h5adelete_f(obj_id, name, hdferr) + SUBROUTINE H5Adelete_f(obj_id, name, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name @@ -557,27 +744,24 @@ CONTAINS INTEGER(SIZE_T) :: namelen INTERFACE - INTEGER FUNCTION h5adelete_c(obj_id, name, namelen) + INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_C'::h5adelete_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) :: namelen - END FUNCTION h5adelete_c + END FUNCTION H5Adelete_c END INTERFACE namelen = LEN(name) - hdferr = h5adelete_c(obj_id, name, namelen) - END SUBROUTINE h5adelete_f + hdferr = H5Adelete_c(obj_id, name, namelen) + END SUBROUTINE H5Adelete_f ! -!****s* H5A/h5aclose_f +!****s* H5A/H5Aclose_f ! ! NAME -! h5aclose_f +! H5Aclose_f ! ! PURPOSE ! Closes the specified attribute. @@ -597,30 +781,28 @@ CONTAINS ! called C functions (it is needed for Windows ! port). February 27, 2001 ! SOURCE - SUBROUTINE h5aclose_f(attr_id, hdferr) + + SUBROUTINE H5Aclose_f(attr_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5aclose_c(attr_id) + INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACLOSE_C'::h5aclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - END FUNCTION h5aclose_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aclose END INTERFACE - hdferr = h5aclose_c(attr_id) - END SUBROUTINE h5aclose_f + hdferr = INT(H5Aclose(attr_id)) + END SUBROUTINE H5Aclose_f ! -!****s* H5A/h5aget_storage_size_f +!****s* H5A/H5Aget_storage_size_f ! ! NAME -! h5aget_storage_size_f +! H5Aget_storage_size_f ! ! PURPOSE ! Returns the amount of storage required for an attribute. @@ -635,7 +817,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr) + SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement @@ -643,24 +825,25 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5aget_storage_size_c(attr_id, size) + INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') + USE ISO_C_BINDING USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_STORAGE_SIZE_C'::h5aget_storage_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5aget_storage_size_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_storage_size END INTERFACE - hdferr = h5aget_storage_size_c(attr_id, size) - END SUBROUTINE h5aget_storage_size_f + size = H5Aget_storage_size(attr_id) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_storage_size_f ! -!****s* H5A/h5aget_create_plist_f +!****s* H5A/H5Aget_create_plist_f ! ! NAME -! h5aget_create_plist_f +! H5Aget_create_plist_f ! ! PURPOSE ! Gets an attribute creation property list identifier @@ -676,33 +859,29 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr) + SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5aget_create_plist_c(attr_id, creation_prop_id) + INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_CREATE_PLIST_C'::h5aget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id - END FUNCTION h5aget_create_plist_c + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_create_plist END INTERFACE - hdferr = h5aget_create_plist_c(attr_id, creation_prop_id) - END SUBROUTINE h5aget_create_plist_f + creation_prop_id = H5Aget_create_plist(attr_id) + + END SUBROUTINE H5Aget_create_plist_f ! -!****s* H5A/h5arename_by_name_f +!****s* H5A/H5Arename_by_name_f ! ! NAME -! h5arename_by_name_f +! H5Arename_by_name_f ! ! PURPOSE ! Renames an attribute @@ -723,7 +902,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & + SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier @@ -742,12 +921,13 @@ CONTAINS INTEGER(SIZE_T) :: new_attr_namelen INTERFACE - INTEGER FUNCTION h5arename_by_name_c(loc_id, obj_name, obj_namelen, & + INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & lapl_id_default) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::h5arename_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -759,7 +939,7 @@ CONTAINS INTEGER(SIZE_T) :: new_attr_namelen INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5arename_by_name_c + END FUNCTION H5Arename_by_name_c END INTERFACE obj_namelen = LEN(obj_name) @@ -769,17 +949,17 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - hdferr = h5arename_by_name_c(loc_id, obj_name, obj_namelen, & + hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & lapl_id_default) - END SUBROUTINE h5arename_by_name_f + END SUBROUTINE H5Arename_by_name_f ! -!****s* H5A/h5aopen_f +!****s* H5A/H5Aopen_f ! ! NAME -! h5aopen_f +! H5Aopen_f ! ! PURPOSE ! Opens an attribute for an object specified by object @@ -800,7 +980,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) + SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name @@ -815,10 +995,11 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTERFACE - INTEGER FUNCTION h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::h5aopen_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: attr_name INTEGER(HID_T), INTENT(IN) :: obj_id @@ -826,7 +1007,7 @@ CONTAINS INTEGER(HID_T) :: aapl_id_default INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_c + END FUNCTION H5Aopen_c END INTERFACE attr_namelen = LEN(attr_name) @@ -834,15 +1015,15 @@ CONTAINS aapl_id_default = H5P_DEFAULT_F IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - hdferr = h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - END SUBROUTINE h5aopen_f + END SUBROUTINE H5Aopen_f ! -!****s* H5A/h5adelete_by_idx_f +!****s* H5A/H5Adelete_by_idx_f ! ! NAME -! h5adelete_by_idx_f +! H5Adelete_by_idx_f ! ! PURPOSE ! Deletes an attribute from an object according to index order @@ -874,7 +1055,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) + SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, @@ -900,10 +1081,11 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::h5adelete_by_idx_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -913,22 +1095,22 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: n INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5adelete_by_idx_c + END FUNCTION H5Adelete_by_idx_c END INTERFACE lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id obj_namelen = LEN(obj_name) - hdferr = h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - END SUBROUTINE h5adelete_by_idx_f + END SUBROUTINE H5Adelete_by_idx_f ! -!****s* H5A/h5adelete_by_name_f +!****s* H5A/H5Adelete_by_name_f ! ! NAME -! h5adelete_by_name_f +! H5Adelete_by_name_f ! ! PURPOSE ! Removes an attribute from a specified location @@ -946,7 +1128,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) + SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, @@ -962,10 +1144,11 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::h5adelete_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -974,7 +1157,7 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: attr_namelen INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5adelete_by_name_c + END FUNCTION H5Adelete_by_name_c END INTERFACE obj_namelen = LEN(obj_name) @@ -983,15 +1166,15 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - END SUBROUTINE h5adelete_by_name_f + END SUBROUTINE H5Adelete_by_name_f ! -!****s* H5A/h5aopen_by_idx_f +!****s* H5A/H5Aopen_by_idx_f ! ! NAME -! h5aopen_by_idx_f +! H5Aopen_by_idx_f ! ! PURPOSE ! Opens an existing attribute that is attached to an object specified by location and name @@ -1013,7 +1196,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) + SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached @@ -1041,11 +1224,12 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::h5aopen_by_idx_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1057,7 +1241,7 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - END FUNCTION h5aopen_by_idx_c + END FUNCTION H5Aopen_by_idx_c END INTERFACE obj_namelen = LEN(obj_name) @@ -1067,16 +1251,16 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & aapl_id_default, lapl_id_default, attr_id) - END SUBROUTINE h5aopen_by_idx_f + END SUBROUTINE H5Aopen_by_idx_f ! -!****s* H5A/h5aget_info_f +!****s* H5A/H5Aget_info_f ! ! NAME -! h5aget_info_f +! H5Aget_info_f ! ! PURPOSE ! Retrieves attribute information, by attribute identifier @@ -1096,7 +1280,7 @@ CONTAINS ! M. Scot Breitenfeld ! January, 2008 ! SOURCE - SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) + SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -1110,10 +1294,11 @@ CONTAINS INTEGER :: corder_valid INTERFACE - INTEGER FUNCTION h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) + INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::h5aget_info_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: attr_id @@ -1121,22 +1306,22 @@ CONTAINS INTEGER, INTENT(OUT) :: corder INTEGER, INTENT(OUT) :: cset INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION h5aget_info_c + END FUNCTION H5Aget_info_c END INTERFACE - hdferr = h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) + hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - END SUBROUTINE h5aget_info_f + END SUBROUTINE H5Aget_info_f ! -!****s* H5A/h5aget_info_by_idx_f +!****s* H5A/H5Aget_info_by_idx_f ! ! NAME -! h5aget_info_by_idx_f +! H5Aget_info_by_idx_f ! ! PURPOSE ! Retrieves attribute information, by attribute index position @@ -1162,7 +1347,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & + SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & f_corder_valid, corder, cset, data_size, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier @@ -1194,11 +1379,12 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & corder_valid, corder, cset, data_size) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::h5aget_info_by_idx_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1213,7 +1399,7 @@ CONTAINS INTEGER(HSIZE_T), INTENT(OUT) :: data_size INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_info_by_idx_c + END FUNCTION H5Aget_info_by_idx_c END INTERFACE obj_namelen = LEN(obj_name) @@ -1221,19 +1407,19 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(present(lapl_id)) lapl_id_default = lapl_id - hdferr = h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & corder_valid, corder, cset, data_size) f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - END SUBROUTINE h5aget_info_by_idx_f + END SUBROUTINE H5Aget_info_by_idx_f ! -!****s* H5A/h5aget_info_by_name_f +!****s* H5A/H5Aget_info_by_name_f ! ! NAME -! h5aget_info_by_name_f +! H5Aget_info_by_name_f ! ! PURPOSE ! Retrieves attribute information, by attribute name @@ -1257,7 +1443,7 @@ CONTAINS ! January, 2008 ! ! SOURCE - SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, & + SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & f_corder_valid, corder, cset, data_size, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier @@ -1279,11 +1465,12 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & corder_valid, corder, cset, data_size) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::h5aget_info_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1297,7 +1484,7 @@ CONTAINS INTEGER, INTENT(OUT) :: cset INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION h5aget_info_by_name_c + END FUNCTION H5Aget_info_by_name_c END INTERFACE obj_namelen = LEN(obj_name) @@ -1306,19 +1493,19 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & corder_valid, corder, cset, data_size) f_corder_valid =.FALSE. IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - END SUBROUTINE h5aget_info_by_name_f + END SUBROUTINE H5Aget_info_by_name_f ! -!****s* H5A/h5acreate_by_name_f +!****s* H5A/H5Acreate_by_name_f ! ! NAME -! h5acreate_by_name_f +! H5Acreate_by_name_f ! ! PURPOSE ! Creates an attribute attached to a specified object @@ -1342,7 +1529,7 @@ CONTAINS ! M. Scot Breitenfeld ! February, 2008 ! SOURCE - SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & + SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & acpl_id, aapl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1365,11 +1552,12 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::h5acreate_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1384,7 +1572,7 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTEGER(HID_T), INTENT(OUT) :: attr - END FUNCTION h5acreate_by_name_c + END FUNCTION H5Acreate_by_name_c END INTERFACE obj_namelen = LEN(obj_name) @@ -1398,9 +1586,9 @@ CONTAINS IF(PRESENT(aapl_id)) aapl_id_default = aapl_id IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - END SUBROUTINE h5acreate_by_name_f + END SUBROUTINE H5Acreate_by_name_f ! !****s* H5A/H5Aexists_f @@ -1424,7 +1612,7 @@ CONTAINS ! February, 2008 ! ! SOURCE - SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr) + SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name @@ -1436,27 +1624,28 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTERFACE - INTEGER FUNCTION h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::h5aexists_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: attr_name INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: attr_name INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T) :: attr_exists_c - END FUNCTION h5aexists_c + END FUNCTION H5Aexists_c END INTERFACE attr_namelen = LEN(attr_name) - hdferr = h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) attr_exists = .FALSE. IF(attr_exists_c.GT.0) attr_exists = .TRUE. - END SUBROUTINE h5aexists_f + END SUBROUTINE H5Aexists_f ! !****s* H5A/H5Aexists_by_name_f @@ -1483,7 +1672,7 @@ CONTAINS ! February, 2008 ! ! SOURCE - SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) + SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, @@ -1501,10 +1690,11 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::h5aexists_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1514,7 +1704,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T), INTENT(IN) :: lapl_id_default INTEGER, INTENT(OUT) :: attr_exists_c - END FUNCTION h5aexists_by_name_c + END FUNCTION H5Aexists_by_name_c END INTERFACE attr_namelen = LEN(attr_name) @@ -1523,12 +1713,12 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) attr_exists = .FALSE. IF(attr_exists_c.GT.0) attr_exists = .TRUE. - END SUBROUTINE h5aexists_by_name_f + END SUBROUTINE H5Aexists_by_name_f ! !****s* H5A/H5Aopen_by_name_f ! @@ -1554,7 +1744,7 @@ CONTAINS ! M. Scot Breitenfeld ! February, 2008 ! SOURCE - SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) + SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, @@ -1574,11 +1764,12 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTERFACE - INTEGER FUNCTION h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::h5aopen_by_name_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1589,7 +1780,7 @@ CONTAINS INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_by_name_c + END FUNCTION H5Aopen_by_name_c END INTERFACE attr_namelen = LEN(attr_name) @@ -1600,16 +1791,16 @@ CONTAINS IF(PRESENT(aapl_id)) aapl_id_default = aapl_id IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - hdferr = h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & aapl_id_default, lapl_id_default, attr_id) - END SUBROUTINE h5aopen_by_name_f + END SUBROUTINE H5Aopen_by_name_f ! -!****s* H5A/h5arename_f +!****s* H5A/H5Arename_f ! ! NAME -! h5arename_f +! H5Arename_f ! ! PURPOSE ! Renames an attribute @@ -1632,7 +1823,7 @@ CONTAINS ! ! SOURCE - SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr) + SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name @@ -1644,11 +1835,12 @@ CONTAINS INTEGER(SIZE_T) :: new_attr_namelen INTERFACE - INTEGER FUNCTION h5arename_c(loc_id, & + INTEGER FUNCTION H5Arename_c(loc_id, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + USE ISO_C_BINDING USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::h5arename_c + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name INTEGER(HID_T), INTENT(IN) :: loc_id @@ -1657,16 +1849,1112 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: new_attr_name INTEGER(SIZE_T) :: new_attr_namelen - END FUNCTION h5arename_c + END FUNCTION H5Arename_c END INTERFACE old_attr_namelen = LEN(old_attr_name) new_attr_namelen = LEN(new_attr_name) - hdferr = h5arename_c(loc_id, & + hdferr = H5Arename_c(loc_id, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - END SUBROUTINE h5arename_f + END SUBROUTINE H5Arename_f + + +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_scalar + + SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_1 + + + SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_2 + + SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_3 + + + SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_4 + + + SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_5 + + + SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_6 + + + SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & + TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_7 + + + SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_scalar + + SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_1 + + + SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_2 + + + SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_3 + + + SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_4 + + + SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_5 + + + SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_6 + + + SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_7 + + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + + END SUBROUTINE H5Awrite_char_scalar + + SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_scalar_fix + + SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_1 + + SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_2 + + SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_3 + + SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_4 + + SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_5 + + + SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_6 + + SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_7 + +!****s* H5A (F03)/H5Awrite_f_F03 +! +! NAME +! H5Awrite_f_F03 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran2003 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Awrite_ptr + +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_scalar + + SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_1 + + + SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_2 + + + SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_3 + + + SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_4 + + + SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_5 + + + SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_6 + + + SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_7 + + + SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_scalar + + SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_1 + + + SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_2 + + + SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_3 + + + SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_4 + + + SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_5 + + + SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_6 + + + SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_7 + + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) + + END SUBROUTINE H5Aread_char_scalar + + SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_scalar_fix + + SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_1 + + + SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_2 + + + SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_3 + + SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_4 + + SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_5 + + + SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_6 + + + SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_7 + + +!****s* H5A (F03)/H5Aread_f_F03 +! +! NAME +! H5Aread_f_F03 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran2003 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Aread_ptr END MODULE H5A diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90 deleted file mode 100644 index 5278280..0000000 --- a/fortran/src/H5Aff_F03.f90 +++ /dev/null @@ -1,1267 +0,0 @@ -!****h* ROBODoc/H5A (F03) -! NAME -! H5A_PROVISIONAL -! -! FILE -! src/fortran/src/H5Aff_F03.f90 -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions. -! It contains the same functions as H5Aff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 -! -! (A) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (1) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (2) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! (B) -! *** IMPORTANT *** -! If you add a new H5A 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 H5A_PROVISIONAL - - USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - ! This is the preferred way to call h5awrite - ! by passing an address - MODULE PROCEDURE h5awrite_ptr - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - - ! This is the preferred way to call h5aread - ! by passing an address - MODULE PROCEDURE h5aread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Awrite routine - - INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5awrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Aread routine - - INTERFACE - INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5aread_f_c - END INTERFACE - -CONTAINS - -!****s* H5A (F03)/h5awrite_f_F90 -! -! NAME -! h5awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_scalar - - SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_integer_1 - - - SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_2 - - SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_3 - - - SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_4 - - - SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_5 - - - SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_integer_6 - - - SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_7 - - - SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_scalar - - SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_real_1 - - - SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_real_2 - - - SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_3 - - - SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_4 - - - SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_5 - - - SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_6 - - - SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_7 - - SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL h5awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE h5awrite_char_scalar - - SUBROUTINE h5awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_scalar_fix - - SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_1 - - SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_2 - - SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_3 - - SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_4 - - SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_5 - - - SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_6 - - SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_7 - -!****s* H5A (F03)/h5awrite_f_F03 -! -! NAME -! h5awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5awrite_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE h5awrite_ptr - -!****s* H5A (F03)/h5aread_f_F90 -! -! NAME -! h5aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_scalar - - SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_1 - - - SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_2 - - - SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_3 - - - SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_4 - - - SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_5 - - - SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_6 - - - SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_7 - - - SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_scalar - - SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_1 - - - SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_2 - - - SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_3 - - - SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_4 - - - SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_5 - - - SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_6 - - - SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_7 - - SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL h5aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) - - END SUBROUTINE h5aread_char_scalar - - SUBROUTINE h5aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_scalar_fix - - SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_1 - - - SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_2 - - - SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_3 - - SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_4 - - SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_5 - - - SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_6 - - - SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_7 - - -!****s* H5A (F03)/h5aread_f_F03 -! -! NAME -! h5aread_f_F03 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran2003 Interface: -!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5aread_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5aread_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE h5aread_ptr - -END MODULE H5A_PROVISIONAL - - diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90 deleted file mode 100644 index 974b023..0000000 --- a/fortran/src/H5Aff_F90.f90 +++ /dev/null @@ -1,1618 +0,0 @@ -!****h* ROBODoc/H5A (F90) -! -! NAME -! H5A_PROVISIONAL -! -! FILE -! fortran/src/H5Aff_F90.f90 -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5A functions. It contains -! the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Aff_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. * -! 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 H5A 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 H5A_PROVISIONAL - - USE H5GLOBAL - ! - !On Windows there are no big (integer*8) integers, so overloading - !for bug #670 does not work. I have to use DEC compilation directives to make - !Windows DEC Visual Fortran and OSF compilers happy and do right things. - ! 05/01/02 EP - ! - INTERFACE h5awrite_f - - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - END INTERFACE - -CONTAINS - - SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_S_C'::h5awrite_integer_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN)::buf - END FUNCTION h5awrite_integer_s_c - END INTERFACE - - hdferr = h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_scalar - - SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_integer_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_1_C'::h5awrite_integer_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_integer_1_c - END INTERFACE - - hdferr = h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) - - END SUBROUTINE h5awrite_integer_1 - - - SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_2_C'::h5awrite_integer_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_integer_2_c - END INTERFACE - - hdferr = h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_2 - - - SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_3_C'::h5awrite_integer_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_integer_3_c - END INTERFACE - - hdferr = h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_3 - - - SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_4_C'::h5awrite_integer_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_integer_4_c - END INTERFACE - - hdferr = h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_4 - - - SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_5_C'::h5awrite_integer_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_integer_5_c - END INTERFACE - - hdferr = h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_5 - - - SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_6_C'::h5awrite_integer_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_integer_6_c - END INTERFACE - - hdferr = h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_6 - - - SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_7_C'::h5awrite_integer_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_integer_7_c - END INTERFACE - - hdferr = h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_7 - - - SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_S_C'::h5awrite_real_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN)::buf - END FUNCTION h5awrite_real_s_c - END INTERFACE - - hdferr = h5awrite_real_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_scalar - - SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_1_C'::h5awrite_real_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_real_1_c - END INTERFACE - - hdferr = h5awrite_real_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_1 - - - SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_2_C'::h5awrite_real_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_real_2_c - END INTERFACE - - hdferr = h5awrite_real_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_2 - - - SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_3_C'::h5awrite_real_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_real_3_c - END INTERFACE - - hdferr = h5awrite_real_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_3 - - - SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_4_C'::h5awrite_real_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_real_4_c - END INTERFACE - - hdferr = h5awrite_real_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_4 - - - SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_5_C'::h5awrite_real_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_real_5_c - END INTERFACE - - hdferr = h5awrite_real_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_5 - - - SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_6_C'::h5awrite_real_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_real_6_c - END INTERFACE - - hdferr = h5awrite_real_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_6 - - - SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_7_C'::h5awrite_real_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_real_7_c - END INTERFACE - - hdferr = h5awrite_real_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_7 - - SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*),INTENT(IN) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_S_C'::h5awritec_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN)::buf - END FUNCTION h5awritec_s_c - END INTERFACE - - hdferr = h5awritec_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_scalar - - SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_1_C'::h5awritec_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1))::buf - END FUNCTION h5awritec_1_c - END INTERFACE - - hdferr = h5awritec_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_1 - - - SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awritec_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_2_C'::h5awritec_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awritec_2_c - END INTERFACE - - hdferr = h5awritec_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_2 - - - SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_3_C'::h5awritec_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awritec_3_c - END INTERFACE - - hdferr = h5awritec_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_3 - - - SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_4_C'::h5awritec_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awritec_4_c - END INTERFACE - - hdferr = h5awritec_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_4 - - - SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_5_C'::h5awritec_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awritec_5_c - END INTERFACE - - hdferr = h5awritec_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_5 - - - SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_6_C'::h5awritec_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awritec_6_c - END INTERFACE - - hdferr = h5awritec_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_6 - - - SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_7_C'::h5awritec_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awritec_7_c - END INTERFACE - - hdferr = h5awritec_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_7 - -! -! NAME -! h5aread_f -! -! PURPOSE -! Reads an attribute. -! -! INPUTS -! attr_id - attribute identifier -! memtype_id - attribute memory type identifier -! dims - 1D array of size 7, stores sizes of the -! - buf array dimensions. -! OUTPUTS -! buf - buffer to read attribute data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! April 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! - - SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_S_C'::h5aread_integer_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT)::buf - END FUNCTION h5aread_integer_s_c - END INTERFACE - hdferr = h5aread_integer_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_scalar - - SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_1_C'::h5aread_integer_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_integer_1_c - END INTERFACE - - hdferr = h5aread_integer_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_1 - - - SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_2_C'::h5aread_integer_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_integer_2_c - END INTERFACE - - hdferr = h5aread_integer_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_2 - - - SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_3_C'::h5aread_integer_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_integer_3_c - END INTERFACE - - hdferr = h5aread_integer_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_3 - - - SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_4_C'::h5aread_integer_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_integer_4_c - END INTERFACE - - hdferr = h5aread_integer_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_4 - - - SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_5_C'::h5aread_integer_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_integer_5_c - END INTERFACE - - hdferr = h5aread_integer_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_5 - - - SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_6_C'::h5aread_integer_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_integer_6_c - END INTERFACE - - hdferr = h5aread_integer_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_6 - - - SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_7_C'::h5aread_integer_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_integer_7_c - END INTERFACE - - hdferr = h5aread_integer_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_7 - - - SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_S_C'::h5aread_real_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT)::buf - END FUNCTION h5aread_real_s_c - END INTERFACE - - hdferr = h5aread_real_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_scalar - - SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_1_C'::h5aread_real_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_real_1_c - END INTERFACE - - hdferr = h5aread_real_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_1 - - - SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_2_C'::h5aread_real_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_real_2_c - END INTERFACE - - hdferr = h5aread_real_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_2 - - - SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_3_C'::h5aread_real_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_real_3_c - END INTERFACE - - hdferr = h5aread_real_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_3 - - - SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_4_C'::h5aread_real_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_real_4_c - END INTERFACE - - hdferr = h5aread_real_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_4 - - - SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_5_C'::h5aread_real_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_real_5_c - END INTERFACE - - hdferr = h5aread_real_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_5 - - - SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_6_C'::h5aread_real_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_real_6_c - END INTERFACE - - hdferr = h5aread_real_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_6 - - - SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_7_C'::h5aread_real_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_real_7_c - END INTERFACE - - hdferr = h5aread_real_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_7 - - SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_S_C'::h5areadc_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT) :: buf - END FUNCTION h5areadc_s_c - END INTERFACE - - hdferr = h5areadc_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_scalar - - SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_1_C'::h5areadc_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5areadc_1_c - END INTERFACE - - hdferr = h5areadc_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_1 - - - SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_2_C'::h5areadc_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5areadc_2_c - END INTERFACE - - hdferr = h5areadc_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_2 - - - SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_3_C'::h5areadc_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5areadc_3_c - END INTERFACE - - hdferr = h5areadc_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_3 - - - SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_4_C'::h5areadc_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5areadc_4_c - END INTERFACE - - hdferr = h5areadc_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_4 - - - SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_5_C'::h5areadc_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5areadc_5_c - END INTERFACE - - hdferr = h5areadc_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_5 - - - SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_6_C'::h5areadc_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5areadc_6_c - END INTERFACE - - hdferr = h5areadc_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_6 - - - SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_7_C'::h5areadc_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5areadc_7_c - END INTERFACE - - hdferr = h5areadc_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_7 - -END MODULE H5A_PROVISIONAL - - diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 index 3ad868c..8457bfd 100644 --- a/fortran/src/H5Dff.f90 +++ b/fortran/src/H5Dff.f90 @@ -28,6 +28,52 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed. Therefore, we can not create just one subroutine for +! each array type (integer, real, etc...) and use a +! rank 1 array of assumed size to handle multiple ranks, i.e. +! (i.e. integer, dimension(*) :: ... ) +! (i.e. real , dimension(*) :: ... ) etc... +! +! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may +! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved +! the statement instead to each subroutine. +! +! +! (4) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (A) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (B) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require the +! argument in C_LOC to be of the variant: +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! ! *** IMPORTANT *** ! If you add a new H5D function you must add the function name to the ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. @@ -54,6 +100,136 @@ MODULE H5D MODULE PROCEDURE h5dwrite_vl_string END INTERFACE + INTERFACE h5dwrite_f + + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_integer_scalar + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_char_scalar + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_real_scalar + MODULE PROCEDURE h5dwrite_real_1 + MODULE PROCEDURE h5dwrite_real_2 + MODULE PROCEDURE h5dwrite_real_3 + MODULE PROCEDURE h5dwrite_real_4 + MODULE PROCEDURE h5dwrite_real_5 + MODULE PROCEDURE h5dwrite_real_6 + MODULE PROCEDURE h5dwrite_real_7 + + ! This is the preferred way to call h5dwrite + ! by passing an address + MODULE PROCEDURE h5dwrite_ptr + + END INTERFACE + + INTERFACE h5dread_f + + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_integer_scalar + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_char_scalar + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_real_scalar + MODULE PROCEDURE h5dread_real_1 + MODULE PROCEDURE h5dread_real_2 + MODULE PROCEDURE h5dread_real_3 + MODULE PROCEDURE h5dread_real_4 + MODULE PROCEDURE h5dread_real_5 + MODULE PROCEDURE h5dread_real_6 + MODULE PROCEDURE h5dread_real_7 + + ! This is the preferred way to call h5dread + ! by passing an address + MODULE PROCEDURE h5dread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dwrite routine + + INTERFACE + INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & + mem_space_id_default , & + file_space_id_default, & + xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dwrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dread routine + + INTERFACE + INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dread_f_c + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_char + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dfill routine + + INTERFACE + INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + TYPE(C_PTR), VALUE :: f_ptr_fill_value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + TYPE(C_PTR), VALUE :: f_ptr_buf + INTEGER(HID_T) :: mem_type_id + END FUNCTION h5dfill_c + END INTERFACE + CONTAINS ! @@ -1030,6 +1206,2178 @@ SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) END SUBROUTINE h5dget_access_plist_f + + SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + TYPE(C_PTR) :: f_ptr + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_scalar + + SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_1 + + SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_2 + + SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_3 + + SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_4 + + SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_5 + + SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_6 + + SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_7 + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_scalar_fix + + SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_1 + + SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_2 + + SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_3 + + SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_4 + + SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_5 + + SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_6 + + SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_7 + + + SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_scalar + + + SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_1 + + SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_2 + + SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_3 + + SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_4 + + SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_5 + + SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_6 + + SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_7 + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dread_reference_dsetreg + + + SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dread_integer_scalar + + SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_1 + + SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_2 + + SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_3 + + SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_4 + + SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_5 + + SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_6 + + SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_7 + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) + + END SUBROUTINE h5dread_char_scalar_fix + + SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_1 + + SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_2 + + SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_3 + + SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_4 + + SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_5 + + SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_6 + + SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_7 + + SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_scalar + + SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_1 + + SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_2 + + SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_3 + + SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_4 + + SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_5 + + SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_6 + + SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_7 + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dwrite_ptr +!****s* H5D (F03)/h5dread_f_F03 +! +! NAME +! h5dread_f_F03 +! +! PURPOSE +! Reads raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset read from. +! mem_type_id - Identifier of the memory datatype. +! +! Outputs: +! buf - Buffer to receive data read from file. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dread_ptr + +! +! NAME +! h5dfill_integer +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_real +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_valuer) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_real + +! +! NAME +! h5dfill_char +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_char +! +!****s* H5D (F03)/h5dvlen_reclaim_f +! NAME +! h5dvlen_reclaim_f +! +! PURPOSE +! Reclaims VL datatype memory buffers. +! +! Inputs: +! +! type_id - Identifier of the datatype. +! space_id - Identifier of the dataspace. +! plist_id - Identifier of the property list used to create the buffer. +! buf - Pointer to the buffer to be reclaimed. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January 11, 2011 +! +! Fortran2003 Interface: + SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: plist_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + INTEGER(HID_T) :: type_id + INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: plist_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dvlen_reclaim_c + END INTERFACE + + hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) + + END SUBROUTINE H5Dvlen_reclaim_f + + END MODULE H5D diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90 deleted file mode 100644 index 7026ae3..0000000 --- a/fortran/src/H5Dff_F03.f90 +++ /dev/null @@ -1,2389 +0,0 @@ -!****h* ROBODoc/H5D (F03) -! -! NAME -! H5D_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions. -! It contains the same functions as H5Dff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Dff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed. Therefore, we can not create just one subroutine for -! each array type (integer, real, etc...) and use a -! rank 1 array of assumed size to handle multiple ranks, i.e. -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may -! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved -! the statement instead to each subroutine. -! -! -! (4) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (A) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (B) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require the -! argument in C_LOC to be of the variant: -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5D_PROVISIONAL - USE H5GLOBAL - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - ! This is the preferred way to call h5dwrite - ! by passing an address - MODULE PROCEDURE h5dwrite_ptr - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - - ! This is the preferred way to call h5dread - ! by passing an address - MODULE PROCEDURE h5dread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dwrite routine - - INTERFACE - INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & - mem_space_id_default , & - file_space_id_default, & - xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dwrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dread routine - - INTERFACE - INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dread_f_c - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dfill routine - - INTERFACE - INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - TYPE(C_PTR), VALUE :: f_ptr_fill_value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - TYPE(C_PTR), VALUE :: f_ptr_buf - INTEGER(HID_T) :: mem_type_id - END FUNCTION h5dfill_c - END INTERFACE - -CONTAINS - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_7 - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_scalar_fix - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_7 - - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_scalar - - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) - - END SUBROUTINE h5dread_char_scalar_fix - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_7 - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dwrite_ptr -!****s* H5D (F03)/h5dread_f_F03 -! -! NAME -! h5dread_f_F03 -! -! PURPOSE -! Reads raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset read from. -! mem_type_id - Identifier of the memory datatype. -! -! Outputs: -! buf - Buffer to receive data read from file. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dread_ptr - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_valuer) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_real - -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_char -! -!****s* H5D (F03)/h5dvlen_reclaim_f -! NAME -! h5dvlen_reclaim_f -! -! PURPOSE -! Reclaims VL datatype memory buffers. -! -! Inputs: -! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January 11, 2011 -! -! Fortran2003 Interface: - SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(IN) :: plist_id - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - INTEGER(HID_T) :: type_id - INTEGER(HID_T) :: space_id - INTEGER(HID_T) :: plist_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dvlen_reclaim_c - END INTERFACE - - hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) - - END SUBROUTINE H5Dvlen_reclaim_f - -END MODULE H5D_PROVISIONAL - - diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90 deleted file mode 100644 index 66cfe62..0000000 --- a/fortran/src/H5Dff_F90.f90 +++ /dev/null @@ -1,3004 +0,0 @@ -!****h* ROBODoc/H5D (F90) -! -! NAME -! -! H5D_PROVISIONAL -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5D functions. It contains -! the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Dff_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. * -! 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed, therefore we can not create just one subroutine for -! each array type (integer, real, etc...) of various ranks and then use a -! rank 1 array of assumed size in the just one subroutine, -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) -! *** IMPORTANT *** -! If you add a new H5D 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 H5D_PROVISIONAL - USE H5GLOBAL - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -CONTAINS - -!****s* H5D/h5dread_f -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! INPUTS -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! of k-th dimension of the buf array -! OUTPUTS -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types. -!***** - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dread_ref_obj_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_OBJ_C'::h5dread_ref_obj_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(HADDR_T), DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_obj_c - END INTERFACE - - ALLOCATE(ref_buf(dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DO j = 1, dims(1) - buf(j)%ref = ref_buf(j) - ENDDO - DEALLOCATE(ref_buf) - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - END SUBROUTINE h5dread_reference_dsetreg - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_S_C'::h5dread_integer_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: buf - END FUNCTION h5dread_integer_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_1_C'::h5dread_integer_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_integer_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_2_C'::h5dread_integer_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_integer_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_3_C'::h5dread_integer_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_integer_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_4_C'::h5dread_integer_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_integer_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_5_C'::h5dread_integer_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_integer_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - - INTERFACE - INTEGER FUNCTION h5dread_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_6_C'::h5dread_integer_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_integer_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_7_C'::h5dread_integer_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_integer_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_S_C'::h5dreadc_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5dreadc_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_1_C'::h5dreadc_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dreadc_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - - INTERFACE - INTEGER FUNCTION h5dreadc_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_2_C'::h5dreadc_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dreadc_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_3_C'::h5dreadc_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dreadc_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_4_C'::h5dreadc_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dreadc_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_5_C'::h5dreadc_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dreadc_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_6_C'::h5dreadc_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dreadc_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_7_C'::h5dreadc_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dreadc_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_S_C'::h5dread_real_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(OUT) :: buf - END FUNCTION h5dread_real_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_1_C'::h5dread_real_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_real_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_2_C'::h5dread_real_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_real_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_3_C'::h5dread_real_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_real_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_4_C'::h5dread_real_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf - END FUNCTION h5dread_real_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_5_C'::h5dread_real_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_real_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_6_C'::h5dread_real_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_real_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_7_C'::h5dread_real_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_real_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_7 - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dwrite_ref_obj_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_OBJ_C'::h5dwrite_ref_obj_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_obj_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - ALLOCATE(ref_buf(dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - ref_buf(j) = buf(j)%ref - ENDDO - ENDIF - hdferr = h5dwrite_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims(1)) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_S_C'::h5dwrite_integer_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf - END FUNCTION h5dwrite_integer_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_1_C'::h5dwrite_integer_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_integer_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_2_C'::h5dwrite_integer_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_integer_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - hdferr = h5dwrite_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_3_C'::h5dwrite_integer_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_integer_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_4_C'::h5dwrite_integer_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_integer_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_5_C'::h5dwrite_integer_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_integer_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_6_C'::h5dwrite_integer_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_integer_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_7_C'::h5dwrite_integer_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_integer_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_7 - - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_S_C'::h5dwritec_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN) :: buf - END FUNCTION h5dwritec_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_1_C'::h5dwritec_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwritec_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_2_C'::h5dwritec_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwritec_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_3_C'::h5dwritec_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwritec_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_4_C'::h5dwritec_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwritec_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_5_C'::h5dwritec_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwritec_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_6_C'::h5dwritec_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwritec_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_7_C'::h5dwritec_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwritec_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_7 - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_S_C'::h5dwrite_real_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN) :: buf - END FUNCTION h5dwrite_real_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_scalar - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_1_C'::h5dwrite_real_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_real_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_2_C'::h5dwrite_real_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_real_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_3_C'::h5dwrite_real_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_real_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_4_C'::h5dwrite_real_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_real_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_5_C'::h5dwrite_real_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_real_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_6_C'::h5dwrite_real_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_real_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_7_C'::h5dwrite_real_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_real_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_integer_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_integer_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_INTEGER_C'::h5dfill_integer_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_integer_c - END INTERFACE - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_integer_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - IMPLICIT NONE - REAL, INTENT(IN) :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_real_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_real_c(fill_valuer, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_REAL_C'::h5dfill_real_c - !DEC$ENDIF - REAL, INTENT(IN) :: fill_valuer ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_real_c - END INTERFACE - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_real_c(fill_valuer, fill_type_id, space_id, & - buf, mem_type_id) - END SUBROUTINE h5dfill_real - -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - CHARACTER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfillc_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfillc_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILLC_C'::h5dfillc_c - !DEC$ENDIF - CHARACTER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfillc_c - END INTERFACE - fill_type_id = H5T_NATIVE_CHARACTER - mem_type_id = H5T_NATIVE_CHARACTER - - hdferr = h5dfillc_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - END SUBROUTINE h5dfill_char - - -END MODULE H5D_PROVISIONAL diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 index 7b56376..ca32b22 100644 --- a/fortran/src/H5Eff.f90 +++ b/fortran/src/H5Eff.f90 @@ -247,5 +247,66 @@ CONTAINS hdferr = h5eget_minor_c(error_no, name) END SUBROUTINE h5eget_minor_f +!****s* H5E/h5eset_auto_f +! +! NAME +! h5eset_auto_f +! +! PURPOSE +! Returns settings for automatic error stack traversal function and its data. +! +! Inputs: +! printflag - Flag to turn automatic error printing on or off; +! possible values are: +! printon (1) +! printoff(0) +! estack_id - Error stack identifier. +! func - Function to be called upon an error condition. +! client_data - Data passed to the error function +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 10, 2009 +! +! Fortran2003 Interface: + SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) + USE, INTRINSIC :: ISO_C_BINDING + INTEGER , INTENT(IN) :: printflag + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id + TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func + TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data +!***** + INTEGER(HID_T) :: estack_id_default + TYPE(C_FUNPTR) :: func_default + TYPE(C_PTR) :: client_data_default + INTERFACE + INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & + BIND(C, NAME='h5eset_auto2_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER :: printflag + INTEGER(HID_T) :: estack_id +!!$ TYPE(C_FUNPTR) :: func +!!$ TYPE(C_PTR), VALUE :: client_data + TYPE(C_FUNPTR), VALUE :: func + TYPE(C_PTR), VALUE :: client_data + END FUNCTION h5eset_auto2_c + END INTERFACE + + estack_id_default = -1 + func_default = C_NULL_FUNPTR + client_data_default = C_NULL_PTR + + IF(PRESENT(estack_id)) estack_id_default = estack_id + IF(PRESENT(func)) func_default = func + IF(PRESENT(client_data)) client_data_default = client_data + + hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) + END SUBROUTINE h5eset_auto_f + END MODULE H5E diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90 deleted file mode 100644 index ff8d11c..0000000 --- a/fortran/src/H5Eff_F03.f90 +++ /dev/null @@ -1,108 +0,0 @@ -!****h* ROBODoc/H5E (F03) -! -! NAME -! H5E_PROVISIONAL -! -! FILE -! src/fortran/src/H5Eff_F03.f90 -! -! PURPOSE -! -! This file contains Fortran 90 and Fortran 2003 interfaces for H5E functions. -! It contains the same functions as H5Eff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Eff_F90.f90 if Fortran 2003 functions are enabled. -! -! -! 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 H5E function to the module 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 H5E_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Returns settings for automatic error stack traversal function and its data. -! -! Inputs: -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! estack_id - Error stack identifier. -! func - Function to be called upon an error condition. -! client_data - Data passed to the error function -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 10, 2009 -! -! Fortran2003 Interface: - SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) - USE, INTRINSIC :: ISO_C_BINDING - INTEGER , INTENT(IN) :: printflag - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id - TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func - TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data -!***** - INTEGER(HID_T) :: estack_id_default - TYPE(C_FUNPTR) :: func_default - TYPE(C_PTR) :: client_data_default - INTERFACE - INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & - BIND(C, NAME='h5eset_auto2_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER :: printflag - INTEGER(HID_T) :: estack_id -!!$ TYPE(C_FUNPTR) :: func -!!$ TYPE(C_PTR), VALUE :: client_data - TYPE(C_FUNPTR), VALUE :: func - TYPE(C_PTR), VALUE :: client_data - END FUNCTION h5eset_auto2_c - END INTERFACE - - estack_id_default = -1 - func_default = C_NULL_FUNPTR - client_data_default = C_NULL_PTR - - IF(PRESENT(estack_id)) estack_id_default = estack_id - IF(PRESENT(func)) func_default = func - IF(PRESENT(client_data)) client_data_default = client_data - - hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) - END SUBROUTINE h5eset_auto_f - -END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90 deleted file mode 100644 index 158ec12..0000000 --- a/fortran/src/H5Eff_F90.f90 +++ /dev/null @@ -1,89 +0,0 @@ -!****h* ROBODoc/H5E (F90) -! -! NAME -! MODULE H5E_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5E functions. It contains -! the same functions as H5Eff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Eff_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. * -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5E_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Turns automatic error printing on or off. -! -! INPUTS -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eset_auto_f(printflag, hdferr) - INTEGER, INTENT(IN) :: printflag ! flag to turn automatic error - ! printing on or off - ! possible values are: - ! printon (1) - ! printoff(0) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eset_auto_c(printflag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ESET_AUTO_C'::h5eset_auto_c - !DEC$ENDIF - INTEGER :: printflag - END FUNCTION h5eset_auto_c - END INTERFACE - - hdferr = h5eset_auto_c(printflag) - END SUBROUTINE h5eset_auto_f - - -END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 index faa1967..53df8c5 100644 --- a/fortran/src/H5Fff.f90 +++ b/fortran/src/H5Fff.f90 @@ -35,6 +35,7 @@ MODULE H5F USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING CONTAINS !****s* H5F/h5fcreate_f @@ -830,5 +831,64 @@ CONTAINS hdferr = h5fget_filesize_c(file_id, size) END SUBROUTINE h5fget_filesize_f +!****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 PARAMETERS +! buf_size - Returns the size in bytes of the buffer required to store the file image, +! no data will be copied. +! +! 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 , INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size +!***** + + INTEGER(SIZE_T) :: buf_size_default + + INTERFACE + INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + USE H5GLOBAL + 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 diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90 deleted file mode 100644 index 8544870..0000000 --- a/fortran/src/H5Fff_F03.f90 +++ /dev/null @@ -1,99 +0,0 @@ -!****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 PARAMETERS -! buf_size - Returns the size in bytes of the buffer required to store the file image, -! no data will be copied. -! -! 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 , INTENT(OUT) :: hdferr - INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size -!***** - - INTEGER(SIZE_T) :: buf_size_default - - INTERFACE - INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - USE H5GLOBAL - 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/src/H5Fff_F90.f90 b/fortran/src/H5Fff_F90.f90 deleted file mode 100644 index b6e659b..0000000 --- a/fortran/src/H5Fff_F90.f90 +++ /dev/null @@ -1,43 +0,0 @@ -!****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. * -! 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 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. -! -!***** - - -MODULE H5F_PROVISIONAL - - USE H5GLOBAL - IMPLICIT NONE - -END MODULE H5F_PROVISIONAL diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 index 4660e52..24f7a02 100644 --- a/fortran/src/H5Lff.f90 +++ b/fortran/src/H5Lff.f90 @@ -35,6 +35,37 @@ MODULE H5L USE H5GLOBAL + USE ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5L (F03)/h5l_info_t +! +! Fortran2003 Derived Type: +! + TYPE, bind(c) :: union_t + INTEGER(haddr_t) :: address + INTEGER(size_t) :: val_size + END TYPE union_t + + TYPE, bind(c) :: h5l_info_t + INTEGER(c_int) :: type ! H5L_type_t type +! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + INTEGER(c_int64_t) :: corder ! int64_t corder; + INTEGER(c_int) :: cset ! H5T_cset_t cset; + TYPE(union_t) :: u + END TYPE h5l_info_t + +!***** + +!type specifies the link class. Valid values include the following: +! H5L_TYPE_HARD Hard link +! H5L_TYPE_SOFT Soft link +! H5L_TYPE_EXTERNAL External link +! H5L_TYPE_ERROR Error +!cset specifies the character set in which the link name is encoded. Valid values include the following: +! H5T_CSET_ASCII US ASCII +! H5T_CSET_UTF8 UTF-8 Unicode encoding CONTAINS @@ -1297,4 +1328,169 @@ CONTAINS !!$ !!$ END SUBROUTINE H5Lregistered_f +!****s* H5L (F03)/h5literate_f +! +! NAME +! h5literate_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! group_id - Identifier specifying subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: group_id + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & + BIND(C, NAME='h5literate_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5literate_c + END INTERFACE + + return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_f + +!****s* H5L (F03)/h5literate_by_name_f +! +! NAME +! h5literate_by_name_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 18, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & + idx, op, op_data, return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& + idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + END FUNCTION + END INTERFACE + + namelen = LEN(group_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_by_name_f + END MODULE H5L diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90 deleted file mode 100644 index fa95717..0000000 --- a/fortran/src/H5Lff_F03.f90 +++ /dev/null @@ -1,242 +0,0 @@ -!****h* ROBODoc/H5L (F03) -! -! NAME -! H5L_PROVISIONAL -! -! FILE -! src/fortran/src/H5Lff_F03.f90 -! -! PURPOSE -! -! This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions. -! It contains the same functions as H5Lff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Lff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5A 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 H5L_PROVISIONAL - - USE H5GLOBAL - USE ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! - TYPE, bind(c) :: union_t - INTEGER(haddr_t) :: address - INTEGER(size_t) :: val_size - END TYPE union_t - - TYPE, bind(c) :: h5l_info_t - INTEGER(c_int) :: type ! H5L_type_t type -! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid - INTEGER(c_int64_t) :: corder ! int64_t corder; - INTEGER(c_int) :: cset ! H5T_cset_t cset; - TYPE(union_t) :: u - END TYPE h5l_info_t - -!***** - -!type specifies the link class. Valid values include the following: -! H5L_TYPE_HARD Hard link -! H5L_TYPE_SOFT Soft link -! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error -!cset specifies the character set in which the link name is encoded. Valid values include the following: -! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding - -CONTAINS - -!****s* H5L (F03)/h5literate_f -! -! NAME -! h5literate_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! group_id - Identifier specifying subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: group_id - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & - BIND(C, NAME='h5literate_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5literate_c - END INTERFACE - - return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_f - -!****s* H5L (F03)/h5literate_by_name_f -! -! NAME -! h5literate_by_name_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 18, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & - idx, op, op_data, return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& - idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - END FUNCTION - END INTERFACE - - namelen = LEN(group_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_by_name_f - -END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90 deleted file mode 100644 index dd62b7b..0000000 --- a/fortran/src/H5Lff_F90.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* ROBODoc/H5L (F90) -! -! NAME -! MODULE H5L_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5L functions. It contains -! the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Lff_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5L_PROVISIONAL - -END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 index 8a40079..e4125bc 100644 --- a/fortran/src/H5Off.f90 +++ b/fortran/src/H5Off.f90 @@ -39,6 +39,65 @@ MODULE H5O USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5T (F03)/h5o_info_t +! +! Fortran2003 Derived Type: +! + TYPE, BIND(C) :: space_t + INTEGER(hsize_t) :: total ! Total space for storing object header in file + INTEGER(hsize_t) :: meta ! Space within header for object header metadata information + INTEGER(hsize_t) :: mesg ! Space within header for actual message information + INTEGER(hsize_t) :: free ! Free space within object header + END TYPE space_t + + TYPE, BIND(C) :: mesg_t + INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header + END TYPE mesg_t + + TYPE, BIND(C) :: hdr_t + INTEGER :: version ! Version number of header format in file + INTEGER :: nmesgs ! Number of object header messages + INTEGER :: nchunks ! Number of object header chunks + INTEGER :: flags ! Object header status flags + TYPE(space_t) :: space + TYPE(mesg_t) :: mesg + END TYPE hdr_t + + ! Extra metadata storage for obj & attributes + TYPE, BIND(C) :: H5_ih_info_t + INTEGER(hsize_t) :: index_size ! btree and/or list + INTEGER(hsize_t) :: heap_size + END TYPE H5_ih_info_t + + TYPE, BIND(C) :: meta_size_t + TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets + TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes + ENDTYPE meta_size_t + + TYPE, BIND(C) :: h5o_info_t + INTEGER(C_LONG) :: fileno ! File number that object is located in + INTEGER(haddr_t) :: addr ! Object address in file + INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) + INTEGER :: rc ! Reference count of object + + INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- + INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array + INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran + INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) + + INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + + TYPE(hdr_t) :: hdr + + TYPE(meta_size_t) :: meta_size + END TYPE h5o_info_t + +!***** CONTAINS @@ -771,5 +830,338 @@ CONTAINS END SUBROUTINE h5oset_comment_by_name_f +!****s* H5O (F03)/h5ovisit_f_F03 +! +! NAME +! h5ovisit_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! object_id - Identifier of the object at which the recursive iteration begins. +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + + TYPE(C_FUNPTR):: op + TYPE(C_PTR) :: op_data + INTEGER, INTENT(OUT) :: return_value + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & + BIND(C, NAME='h5ovisit_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5ovisit_c + END INTERFACE + + return_value = h5ovisit_c(object_id, index_type, order, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_f + +!****s* H5O (F03)/h5oget_info_by_name_f_F03 +! +! NAME +! h5oget_info_by_name_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by location and relative name. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! name - Name of group, relative to loc_id. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! December 1, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & + BIND(C, NAME='h5oget_info_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR),VALUE :: object_info + + END FUNCTION h5oget_info_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + + hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_name_f + +!****s* H5O (F03)/h5oget_info_f_F03 +! +! NAME +! h5oget_info_f +! +! PURPOSE +! Retrieves the metadata for an object specified by an identifier. +! +! Inputs: +! object_id - Identifier for target object. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr +!***** + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_c(object_id, object_info) & + BIND(C, NAME='h5oget_info_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: object_id + TYPE(C_PTR), VALUE :: object_info + END FUNCTION h5oget_info_c + END INTERFACE + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_c(object_id, ptr) + + END SUBROUTINE H5Oget_info_f + +!****s* H5O (F03)/h5oget_info_by_idx_f_F03 +! +! NAME +! h5oget_info_by_idx_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by an index position. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! group_name - Name of group in which object is located. +! index_field - Index or field that determines the order. +! order - Order within field or index. +! n - Object for which information is to be returned +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. (Not currently used.) +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & + index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR), VALUE :: object_info + + END FUNCTION h5oget_info_by_idx_c + END INTERFACE + + namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_idx_f + + +!****s* H5O (F03)/h5ovisit_by_name_f_F03 +! +! NAME +! h5ovisit_by_name_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! loc_id - Identifier of a file or group. +! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - Returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & + return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: object_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + + TYPE(C_FUNPTR) :: op + TYPE(C_PTR) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name + INTEGER(SIZE_T) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + TYPE(C_FUNPTR) , VALUE :: op + TYPE(C_PTR) , VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5ovisit_by_name_c + END INTERFACE + + namelen = LEN(object_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_by_name_f + END MODULE H5O diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90 deleted file mode 100644 index 36b6246..0000000 --- a/fortran/src/H5Off_F03.f90 +++ /dev/null @@ -1,435 +0,0 @@ -!****h* ROBODoc/H5O (F03) -! -! NAME -! H5O_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5O functions. -! It contains the same functions as H5Off_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Off_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5P 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 H5O_PROVISIONAL - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5T (F03)/h5o_info_t -! -! Fortran2003 Derived Type: -! - TYPE, BIND(C) :: space_t - INTEGER(hsize_t) :: total ! Total space for storing object header in file - INTEGER(hsize_t) :: meta ! Space within header for object header metadata information - INTEGER(hsize_t) :: mesg ! Space within header for actual message information - INTEGER(hsize_t) :: free ! Free space within object header - END TYPE space_t - - TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header - INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header - END TYPE mesg_t - - TYPE, BIND(C) :: hdr_t - INTEGER :: version ! Version number of header format in file - INTEGER :: nmesgs ! Number of object header messages - INTEGER :: nchunks ! Number of object header chunks - INTEGER :: flags ! Object header status flags - TYPE(space_t) :: space - TYPE(mesg_t) :: mesg - END TYPE hdr_t - - ! Extra metadata storage for obj & attributes - TYPE, BIND(C) :: H5_ih_info_t - INTEGER(hsize_t) :: index_size ! btree and/or list - INTEGER(hsize_t) :: heap_size - END TYPE H5_ih_info_t - - TYPE, BIND(C) :: meta_size_t - TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets - TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes - ENDTYPE meta_size_t - - TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - INTEGER(haddr_t) :: addr ! Object address in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER :: rc ! Reference count of object - - INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- - INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array - INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran - INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) - - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object - - TYPE(hdr_t) :: hdr - - TYPE(meta_size_t) :: meta_size - END TYPE h5o_info_t - -!***** - -CONTAINS - -!****s* H5O (F03)/h5ovisit_f_F03 -! -! NAME -! h5ovisit_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! object_id - Identifier of the object at which the recursive iteration begins. -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - - TYPE(C_FUNPTR):: op - TYPE(C_PTR) :: op_data - INTEGER, INTENT(OUT) :: return_value - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & - BIND(C, NAME='h5ovisit_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5ovisit_c - END INTERFACE - - return_value = h5ovisit_c(object_id, index_type, order, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_f - -!****s* H5O (F03)/h5oget_info_by_name_f_F03 -! -! NAME -! h5oget_info_by_name_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by location and relative name. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! name - Name of group, relative to loc_id. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & - BIND(C, NAME='h5oget_info_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR),VALUE :: object_info - - END FUNCTION h5oget_info_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - - hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_name_f - -!****s* H5O (F03)/h5oget_info_f_F03 -! -! NAME -! h5oget_info_f -! -! PURPOSE -! Retrieves the metadata for an object specified by an identifier. -! -! Inputs: -! object_id - Identifier for target object. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr -!***** - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_c(object_id, object_info) & - BIND(C, NAME='h5oget_info_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: object_id - TYPE(C_PTR), VALUE :: object_info - END FUNCTION h5oget_info_c - END INTERFACE - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_c(object_id, ptr) - - END SUBROUTINE H5Oget_info_f - -!****s* H5O (F03)/h5oget_info_by_idx_f_F03 -! -! NAME -! h5oget_info_by_idx_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by an index position. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! group_name - Name of group in which object is located. -! index_field - Index or field that determines the order. -! order - Order within field or index. -! n - Object for which information is to be returned -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. (Not currently used.) -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & - index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR), VALUE :: object_info - - END FUNCTION h5oget_info_by_idx_c - END INTERFACE - - namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_idx_f - - -!****s* H5O (F03)/h5ovisit_by_name_f_F03 -! -! NAME -! h5ovisit_by_name_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & - return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - - TYPE(C_FUNPTR) :: op - TYPE(C_PTR) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name - INTEGER(SIZE_T) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - TYPE(C_FUNPTR) , VALUE :: op - TYPE(C_PTR) , VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5ovisit_by_name_c - END INTERFACE - - namelen = LEN(object_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_by_name_f - -END MODULE H5O_PROVISIONAL - diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90 deleted file mode 100644 index 5688c5d..0000000 --- a/fortran/src/H5Off_F90.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* ROBODoc/H5O (F90) -! -! NAME -! MODULE H5O_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5O functions. It contains -! the same functions as H5Off_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Off_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5O_PROVISIONAL - -END MODULE H5O_PROVISIONAL diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 index 3409f15..18da887 100644 --- a/fortran/src/H5Pff.f90 +++ b/fortran/src/H5Pff.f90 @@ -40,6 +40,133 @@ MODULE H5P MODULE PROCEDURE h5pset_fapl_multi_s END INTERFACE + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_fill_value_ptr + + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_fill_value_ptr + + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_ptr + + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_real + MODULE PROCEDURE h5pget_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_ptr + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + MODULE PROCEDURE h5pregister_real + MODULE PROCEDURE h5pregister_char + ! Recommended procedure: + MODULE PROCEDURE h5pregister_ptr + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_char + ! Recommended procedure: + MODULE PROCEDURE h5pinsert_ptr + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pget_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pget_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pset_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pset_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pset_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pget_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pget_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & + BIND(C, NAME='h5pregister_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pregister_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & + BIND(C, NAME='h5pinsert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pinsert_c + END INTERFACE + CONTAINS !****s* H5P/h5pcreate_f @@ -6394,6 +6521,1103 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_chunk_cache_f +! +!****s* H5P (F03)/h5pset_fill_value_f_F90 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! IMPLICIT NONE +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_integer +! +!****s* H5P (F03)/h5pget_fill_value_f_F90 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_integer + + + SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_real + + + SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_real + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr ! C address + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(fillvalue) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + f_ptr = C_LOC(chr(1)(1:1)) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + DO i = 1, chr_len + fillvalue(i:i) = chr(i) + ENDDO + DEALLOCATE(chr) + + END SUBROUTINE h5pget_fill_value_char +! +!****s* H5P (F03)/h5pset_fill_value_f_F03 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pset_fill_value_ptr + +! +!****s* H5P (F03)/h5pget_fill_value_f_F03 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pget_fill_value_ptr + +! +!****s* H5P (F03)/h5pset_f_F90 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_integer + + SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_real + + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pset_char +! +!****s* H5P (F03)/h5pget_f_F90 +! +! NAME +! h5pget_f +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pget_integer + + SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_real + + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + TYPE(C_PTR) :: f_ptr + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DO i = 1, chr_len + value(i:i) = chr(i) + ENDDO + + DEALLOCATE(chr) + + END SUBROUTINE h5pget_char + + +! +!****s* H5P (F03)/h5pset_f_F03 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Pointer to value to set the property to +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pset_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pset_ptr +! +!****s* H5P (F03)/h5pget_f_F03 +! +! NAME +! h5pget_f (F03) +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Pointer to a location to which to copy the value of of the property +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pget_ptr + + +! +!****s* H5P (F03)/h5pregister_f_F90 +! +! NAME +! h5pregister +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_integer + + SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_real + + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + DEALLOCATE(chr) + END SUBROUTINE h5pregister_char +! +!****s* H5P (F03)/h5pregister_f_F03 +! +! NAME +! h5pregister (F03) +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Pointer to value to set the property to +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, value) + END SUBROUTINE h5pregister_ptr + +! +!****s* H5P (F03)/h5pinsert_f_F90 +! +! NAME +! h5pinsert (f90) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + END SUBROUTINE h5pinsert_integer + + SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_real + + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(c_ptr) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pinsert_char + +! +!****s* H5P (F03)/h5pinsert_f_F03 +! +! NAME +! h5pinsert (f03) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Pointer to new value pointer for the property being modified +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + TYPE(c_ptr), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_ptr +! +!****s* H5P (F03)/h5pcreate_class_f_F03 +! +! NAME +! h5pcreate_class_f +! +! PURPOSE +! Create a new property list class +! +! Inputs: +! parent - Parent property list class identifier +! Possible values include: +! H5P_ROOT_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! name - Name of property to create +! +! Outputs: +! class - Property list class identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! H5P_cls_create_func_t (create) - Callback routine called when a property list is created +! create_data - User pointer to any class creation information needed +! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied +! copy_data - User pointer to any class copy information needed +! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed +! close_data - User pointer to any class close information needed +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Added callback arguments +! M. Scot Breitenfeld, July 3, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: class + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data + TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close +!***** + INTEGER :: name_len + TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default + TYPE(C_FUNPTR) :: create_default, copy_default, close_default + INTERFACE + INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & + create, create_data, copy, copy_data, close, close_data) & + BIND(C, NAME='h5pcreate_class_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + TYPE(C_PTR), VALUE :: create_data, copy_data, close_data + TYPE(C_FUNPTR), VALUE :: create, copy, close + END FUNCTION h5pcreate_class_c + END INTERFACE + name_len = LEN(name) + + create_default = c_null_funptr !fix:scot + create_data_default = c_null_ptr + copy_default = c_null_funptr !fix:scot + copy_data_default = c_null_ptr + close_default = c_null_funptr !fix:scot + close_data_default = c_null_ptr + + IF(PRESENT(create)) create_default = create + IF(PRESENT(create_data)) create_data_default = create_data + IF(PRESENT(copy)) copy_default = copy + IF(PRESENT(copy_data)) copy_data_default = copy_data + IF(PRESENT(close)) close_default = close + IF(PRESENT(close_data)) close_data_default = close_data + + hdferr = h5pcreate_class_c(parent, name , name_len, class, & + create_default, create_data_default, & + copy_default, copy_data_default, & + close_default, close_data_default) + + END SUBROUTINE h5pcreate_class_f + +! +!****s* H5P (F03)/h5pset_file_image_f_F03 +! +! NAME +! h5pset_file_image_f +! +! PURPOSE +! Sets an initial file image in a memory buffer. +! +! Inputs: +! fapl_id - File access property list identifier +! buf_ptr - Pointer to the initial file image, +! or C_NULL_PTR if no initial file image is desired +! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(IN) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & + BIND(C, NAME='h5pset_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + END FUNCTION h5pset_file_image_c + END INTERFACE + + hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) + + END SUBROUTINE h5pset_file_image_f +! +!****s* H5P (F03)/h5pget_file_image_f_F03 +! +! NAME +! h5pget_file_image_f +! +! PURPOSE +! Retrieves a copy of the file image designated as the initial content and structure of a file. +! +! Inputs: +! fapl_id - File access property list identifier. +! +! Outputs: +! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type +! c_loc. If buf_ptr is not C_NULL_PTR, on successful +! return, buf_ptr shall contain a C pointer to a copy +! of the initial image provided in the last call to +! H5Pset_file_image_f for the supplied fapl_id, or +! buf_ptr shall contain a C_NULL_PTR if there is no +! initial image set. +! +! buf_len_ptr - Contains the value of the buffer parameter for +! the initial image in the supplied fapl_id. The value +! will be 0 if no initial image is set. +! +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + INTEGER , INTENT(OUT) :: hdferr + +!***** + INTERFACE + INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & + BIND(C, NAME='h5pget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + END FUNCTION h5pget_file_image_c + END INTERFACE + + hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) + + END SUBROUTINE h5pget_file_image_f + END MODULE H5P diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90 deleted file mode 100644 index 01d1d98..0000000 --- a/fortran/src/H5Pff_F03.f90 +++ /dev/null @@ -1,1267 +0,0 @@ -!****h* ROBODoc/H5P (F03) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions. -! It contains the same functions as H5Pff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Pff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5P 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 H5P_PROVISIONAL - - USE H5GLOBAL - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_fill_value_ptr - - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_fill_value_ptr - - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_ptr - - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_ptr - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - ! Recommended procedure: - MODULE PROCEDURE h5pregister_ptr - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - ! Recommended procedure: - MODULE PROCEDURE h5pinsert_ptr - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pget_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pget_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pset_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pset_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pset_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pget_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pget_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & - BIND(C, NAME='h5pregister_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pregister_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & - BIND(C, NAME='h5pinsert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pinsert_c - END INTERFACE - -CONTAINS - -! -!****s* H5P (F03)/h5pset_fill_value_f_F90 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! IMPLICIT NONE -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_integer -! -!****s* H5P (F03)/h5pget_fill_value_f_F90 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr ! C address - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(fillvalue) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - f_ptr = C_LOC(chr(1)(1:1)) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - DO i = 1, chr_len - fillvalue(i:i) = chr(i) - ENDDO - DEALLOCATE(chr) - - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F03)/h5pset_fill_value_f_F03 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pset_fill_value_ptr - -! -!****s* H5P (F03)/h5pget_fill_value_f_F03 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pget_fill_value_ptr - -! -!****s* H5P (F03)/h5pset_f_F90 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_integer - - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_real - - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pset_char -! -!****s* H5P (F03)/h5pget_f_F90 -! -! NAME -! h5pget_f -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pget_integer - - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_real - - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - TYPE(C_PTR) :: f_ptr - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DO i = 1, chr_len - value(i:i) = chr(i) - ENDDO - - DEALLOCATE(chr) - - END SUBROUTINE h5pget_char - - -! -!****s* H5P (F03)/h5pset_f_F03 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Pointer to value to set the property to -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pset_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pset_ptr -! -!****s* H5P (F03)/h5pget_f_F03 -! -! NAME -! h5pget_f (F03) -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Pointer to a location to which to copy the value of of the property -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pget_ptr - - -! -!****s* H5P (F03)/h5pregister_f_F90 -! -! NAME -! h5pregister -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_integer - - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_real - - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - DEALLOCATE(chr) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F03)/h5pregister_f_F03 -! -! NAME -! h5pregister (F03) -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Pointer to value to set the property to -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, value) - END SUBROUTINE h5pregister_ptr - -! -!****s* H5P (F03)/h5pinsert_f_F90 -! -! NAME -! h5pinsert (f90) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_integer - - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_real - - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(c_ptr) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F03)/h5pinsert_f_F03 -! -! NAME -! h5pinsert (f03) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Pointer to new value pointer for the property being modified -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - TYPE(c_ptr), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_ptr -! -!****s* H5P (F03)/h5pcreate_class_f_F03 -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! Inputs: -! parent - Parent property list class identifier -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - Name of property to create -! -! Outputs: -! class - Property list class identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! H5P_cls_create_func_t (create) - Callback routine called when a property list is created -! create_data - User pointer to any class creation information needed -! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied -! copy_data - User pointer to any class copy information needed -! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed -! close_data - User pointer to any class close information needed -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Added callback arguments -! M. Scot Breitenfeld, July 3, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: class - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data - TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close -!***** - INTEGER :: name_len - TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default - TYPE(C_FUNPTR) :: create_default, copy_default, close_default - INTERFACE - INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & - create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - TYPE(C_PTR), VALUE :: create_data, copy_data, close_data - TYPE(C_FUNPTR), VALUE :: create, copy, close - END FUNCTION h5pcreate_class_c - END INTERFACE - name_len = LEN(name) - - create_default = c_null_funptr !fix:scot - create_data_default = c_null_ptr - copy_default = c_null_funptr !fix:scot - copy_data_default = c_null_ptr - close_default = c_null_funptr !fix:scot - close_data_default = c_null_ptr - - IF(PRESENT(create)) create_default = create - IF(PRESENT(create_data)) create_data_default = create_data - IF(PRESENT(copy)) copy_default = copy - IF(PRESENT(copy_data)) copy_data_default = copy_data - IF(PRESENT(close)) close_default = close - IF(PRESENT(close_data)) close_data_default = close_data - - hdferr = h5pcreate_class_c(parent, name , name_len, class, & - create_default, create_data_default, & - copy_default, copy_data_default, & - close_default, close_data_default) - - END SUBROUTINE h5pcreate_class_f - -! -!****s* H5P (F03)/h5pset_file_image_f_F03 -! -! NAME -! h5pset_file_image_f -! -! PURPOSE -! Sets an initial file image in a memory buffer. -! -! Inputs: -! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, -! or C_NULL_PTR if no initial file image is desired -! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(IN) :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & - BIND(C, NAME='h5pset_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - END FUNCTION h5pset_file_image_c - END INTERFACE - - hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) - - END SUBROUTINE h5pset_file_image_f -! -!****s* H5P (F03)/h5pget_file_image_f_F03 -! -! NAME -! h5pget_file_image_f -! -! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. -! -! Inputs: -! fapl_id - File access property list identifier. -! -! Outputs: -! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type -! c_loc. If buf_ptr is not C_NULL_PTR, on successful -! return, buf_ptr shall contain a C pointer to a copy -! of the initial image provided in the last call to -! H5Pset_file_image_f for the supplied fapl_id, or -! buf_ptr shall contain a C_NULL_PTR if there is no -! initial image set. -! -! buf_len_ptr - Contains the value of the buffer parameter for -! the initial image in the supplied fapl_id. The value -! will be 0 if no initial image is set. -! -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - INTEGER , INTENT(OUT) :: hdferr - -!***** - INTERFACE - INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & - BIND(C, NAME='h5pget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - END FUNCTION h5pget_file_image_c - END INTERFACE - - hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) - - END SUBROUTINE h5pget_file_image_f - -END MODULE H5P_PROVISIONAL - diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90 deleted file mode 100644 index b5ea13d..0000000 --- a/fortran/src/H5Pff_F90.f90 +++ /dev/null @@ -1,949 +0,0 @@ -!****h* ROBODoc/H5P (_F90) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5P functions. It contains -! the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Pff_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. * -! 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 H5P 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 H5P_PROVISIONAL - - USE H5GLOBAL - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - END INTERFACE - -CONTAINS -! -!****s* H5P (F90)/h5pset(get)fill_value_f -! -! NAME -! h5pset(get)fill_value_f -! -! PURPOSE -! Sets(gets) fill value for a dataset creation property list -! -! INPUTS -! prp_id - dataset creation property list identifier -! type_id - datatype identifier for fill value -! fillvalue - fill value -! OUTPUTS -! type_id - datatype identifier for fill value -! fillvalue - fill value -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! SOURCE - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_INTEGER_C'::h5pset_fill_value_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_integer_c - END INTERFACE - - hdferr = h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_integer - - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_INTEGER_C'::h5pget_fill_value_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: fillvalue - END FUNCTION h5pget_fill_value_integer_c - END INTERFACE - - hdferr = h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_real_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_REAL_C'::h5pset_fill_value_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - REAL, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_real_c - END INTERFACE - - hdferr = h5pset_fill_value_real_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_real_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_REAL_C'::h5pget_fill_value_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - REAL :: fillvalue - END FUNCTION h5pget_fill_value_real_c - END INTERFACE - - hdferr = h5pget_fill_value_real_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_valuec_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUEC_C'::h5pset_fill_valuec_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_valuec_c - END INTERFACE - - hdferr = h5pset_fill_valuec_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_valuec_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUEC_C'::h5pget_fill_valuec_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER :: fillvalue - END FUNCTION h5pget_fill_valuec_c - END INTERFACE - - hdferr = h5pget_fill_valuec_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F90)/h5pset_integer -! -! NAME -! h5pset_integer -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_integer_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_INTEGER_C'::h5pset_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER, INTENT(IN) :: value - END FUNCTION h5pset_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_integer_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_integer - -! -!****s* H5P (F90)/h5pset_real -! -! NAME -! h5pset_real -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_real_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_REAL_C'::h5pset_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - REAL, INTENT(IN) :: value - END FUNCTION h5pset_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_real_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_real - -!****s* H5P (F90)/h5pset_char -! -! NAME -! h5pset_char -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5psetc_c(prp_id, name, name_len, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSETC_C'::h5psetc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5psetc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5psetc_c(prp_id, name , name_len, value, value_len) - END SUBROUTINE h5pset_char - -!****s* H5P (F90)/h5pget_integer -! -! NAME -! h5pget_integer -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_integer_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_INTEGER_C'::h5pget_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER, INTENT(OUT) :: value - END FUNCTION h5pget_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_integer_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_integer - -! -!****s* H5P (F90)/h5pget_real -! -! NAME -! h5pget_real -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_real_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_REAL_C'::h5pget_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - REAL, INTENT(OUT) :: value - END FUNCTION h5pget_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_real_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_real - -! -!****s* H5P (F90)/h5pget_char -! -! NAME -! h5pget_char -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pgetc_c(prp_id, name, name_len, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGETC_C'::h5pgetc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - CHARACTER(LEN=*), INTENT(OUT) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pgetc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pgetc_c(prp_id, name , name_len, value, value_len) - END SUBROUTINE h5pget_char - -! -!****s* H5P (F90)/h5pregister_integer -! -! NAME -! h5pregister_integer -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_integer_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_INTEGER_C'::h5pregister_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER, INTENT(IN) :: value - END FUNCTION h5pregister_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_integer_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_integer - -!****s* H5P (F90)/h5pregister_real -! -! NAME -! -! h5pregister_real -! -! PURPOSE Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_real_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_REAL_C'::h5pregister_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - REAL, INTENT(IN) :: value - END FUNCTION h5pregister_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_real_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_real - -! -!****s* H5P (F90)/h5pregister_char -! -! NAME -! h5pregister_char -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pregisterc_c(class, name, name_len, size, value, & - value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTERC_C'::h5pregisterc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pregisterc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pregisterc_c(class, name , name_len, size, value, value_len) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F90)/h5pinsert_integer -! -! NAME -! h5pinsert_integer -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_integer_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_INTEGER_C'::h5pinsert_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER, INTENT(IN) :: value - END FUNCTION h5pinsert_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_integer_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_integer - -! -!****s* H5P (F90)/h5pinsert_real -! -! NAME -! h5pinsert_real -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_real_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_REAL_C'::h5pinsert_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - REAL, INTENT(IN) :: value - END FUNCTION h5pinsert_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_real_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_real - - -! -!****s* H5P (F90)/h5pinsert_char -! -! NAME -! h5pinsert_char -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE -SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pinsertc_c(plist, name, name_len, size, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERTC_C'::h5pinsertc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pinsertc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pinsertc_c(plist, name , name_len, size, value, value_len) - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F90)/h5pcreate_class_f -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! INPUTS -! parent - Property list identifier of the parent class -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - name of the class we are creating -! OUTPUTS -! class - property list class identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent ! parent property list class - ! identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property tocreate - INTEGER(HID_T), INTENT(OUT) :: class ! property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pcreate_class_f90_c(parent, name, name_len, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_CLASS_F90_C'::h5pcreate_class_f90_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - END FUNCTION h5pcreate_class_f90_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pcreate_class_f90_c(parent, name, name_len, class) - - END SUBROUTINE h5pcreate_class_f - -END MODULE H5P_PROVISIONAL - diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 index 77a1ff8..1605707 100644 --- a/fortran/src/H5Rff.f90 +++ b/fortran/src/H5Rff.f90 @@ -38,6 +38,7 @@ MODULE H5R USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING ! If you change the value of these parameters, do not forget to change corresponding ! values in the H5f90.h file. @@ -52,13 +53,100 @@ MODULE H5R ! INTEGER ref(REF_REG_BUF_LEN) ! END TYPE ! - INTERFACE h5rget_object_type_f MODULE PROCEDURE h5rget_object_type_obj_f END INTERFACE + TYPE :: hdset_reg_ref_t_f03 + INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref + END TYPE hdset_reg_ref_t_f03 + + INTERFACE h5rget_region_f + + MODULE PROCEDURE h5rget_region_region_f ! obsolete + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + + END INTERFACE + + + INTERFACE h5rcreate_f + + MODULE PROCEDURE h5rcreate_object_f ! obsolete + MODULE PROCEDURE h5rcreate_region_f ! obsolete + MODULE PROCEDURE h5rcreate_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rdereference_f + + MODULE PROCEDURE h5rdereference_object_f ! obsolete + MODULE PROCEDURE h5rdereference_region_f ! obsolete + MODULE PROCEDURE h5rdereference_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rget_name_f + + MODULE PROCEDURE h5rget_name_object_f ! obsolete + MODULE PROCEDURE h5rget_name_region_f ! obsolete + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 + + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & + BIND(C, NAME='h5rget_name_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: name_len + INTEGER(SIZE_T) :: size_default + END FUNCTION h5rget_name_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & + BIND(C, NAME='h5rdereference_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + END FUNCTION h5rdereference_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & + BIND(C, NAME='h5rcreate_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: ref_type + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & + BIND(C, NAME='h5rget_region_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_ptr_c + END INTERFACE + + CONTAINS !****s* H5R/h5rget_object_type_obj_f @@ -125,4 +213,579 @@ CONTAINS END SUBROUTINE h5rget_object_type_obj_f + +!****s* H5R/h5rget_region_region_f +! +! NAME +! h5rget_region_region_f +! +! PURPOSE +! Retrieves a dataspace with the specified region selected +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) + + END SUBROUTINE h5rget_region_region_f + +!****s* H5R/h5rget_region_ptr_f +! +! NAME +! h5rget_region_ptr_f +! +! PURPOSE +! Retrieves a dataspace with the specified region +! selected using pointer +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! August 4, 2012 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + + END SUBROUTINE h5rget_region_ptr_f + + +!****s* H5R (F03)/h5rcreate_object_f +! +! NAME +! h5rcreate_object_f +! +! PURPOSE +! Creates reference to the object +! +! Inputs: +! loc_id - location identifier +! name - name of the object at the specified location +! Outputs: +! ref - reference to the specified object +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! Signature: + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + namelen = LEN(name) + + hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) + + END SUBROUTINE h5rcreate_object_f + +!****s* H5R (F90)/h5rcreate_region_f +! +! NAME +! h5rcreate_region_f +! +! PURPOSE +! Creates reference to the dataset region +! +! INPUTS +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region +! OUTPUTS +! ref - reference to the dataset region +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_region_f + +!****s* H5R (F03)/h5rcreate_ptr_f +! +! NAME +! h5rcreate_ptr_f +! +! PURPOSE +! Creates a reference. +! +! Inputs: +! loc_id - location identifier +! name - name of the dataset at the specified location +! ref_type - type of reference: +! H5R_OBJECT +! H5T_STD_REF_DSETREG +! Outputs: +! ref - reference created by the function call. +! hdferr - returns 0 if successful and -1 if fails. +! OPTIONAL +! space_id - dataspace identifier that describes selected region +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rcreate_f +! subroutine where the output is a pointer. +! +! Signature: + SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER, INTENT(IN) :: ref_type ! type of reference + TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: space_id_c + + namelen = LEN(name) + space_id_c = -1 + IF(PRESENT(space_id)) space_id_c = space_id + hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) + + END SUBROUTINE h5rcreate_ptr_f +!****s* H5R (F03)/h5rdereference_object_f +! +! NAME +! h5rdereference_object_f +! +! PURPOSE +! Opens the HDF5 object referenced +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference +! ref - reference to open +! Outputs: +! obj_id - object_identifier +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_object_f +!****s* H5R (F03)/h5rdereference_region_f +! +! NAME +! h5rdereference_region_f +! +! PURPOSE +! Opens the dataset region +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference to teh regions +! ref - reference to open +! Outputs: +! obj_id - dataspace identifier +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_region_f + +!****s* H5R (F03)/h5rdereference_ptr_f +! +! NAME +! h5rdereference_ptr_f +! +! PURPOSE +! Opens the HDF5 object referenced. +! +! Inputs: +! obj_id - valid identifier for the file containing the +! referenced object or any object in that file. +! ref_type - the reference type of ref. +! ref - Reference to open. +! Outputs: +! ref_obj_id - identifier of referenced object +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rdereference_f +! subroutine using pointers. +! +! Signature: + SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the + ! referenced object or any object in that file. + INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. + TYPE(C_PTR), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + ! Identifier of referenced object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) + + END SUBROUTINE h5rdereference_ptr_f +! +!****s* H5R (F03)/h5rget_name_object_f +! +! NAME +! h5rget_name_object_f +! +! PURPOSE +! Retrieves a name of a referenced object. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + 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 +!****s* H5R (F03)/h5rget_name_region_f +! +! NAME +! h5rget_name_region_f +! +! PURPOSE +! Retrieves a name of a dataset region. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_region_f + + !****s* H5R (F03)/h5rget_name_ptr_f + ! + ! NAME + ! h5rget_name_ptr_f + ! + ! PURPOSE + ! Retrieves a name of a referenced object. + ! + ! Inputs: + ! 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 - Returns 0 if successful and -1 if fails. + ! + ! Optional parameters: + ! 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: + 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 + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_ptr_f + + !****s* H5R (F03)/h5rget_obj_type_f + ! + ! NAME + ! h5rget_obj_type_f + ! + ! PURPOSE + ! Retrieves the type of object that an object reference points to. + ! + ! Inputs: + ! loc_id - Identifier for the dataset containing the reference or + ! for the group that dataset is in. + ! ref_type - Type of reference to query. + ! ref - Reference to query. + ! + ! Outputs: + ! obj_type - Type of referenced object. + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + ! + ! hdferr - Returns 0 if successful and -1 if fails. + ! + ! AUTHOR + ! M. Scot Breitenfeld + ! Decemeber 17, 2008 + ! + ! Signature: + SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr + !***** + + INTERFACE + INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & + BIND(C, NAME='h5rget_obj_type_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), VALUE :: ref + INTEGER :: obj_type + END FUNCTION h5rget_obj_type_c + END INTERFACE + + hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) + + END SUBROUTINE h5rget_obj_type_f + END MODULE H5R diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90 deleted file mode 100644 index 8f40607..0000000 --- a/fortran/src/H5Rff_F03.f90 +++ /dev/null @@ -1,719 +0,0 @@ -!****h* ROBODoc/H5R (F03) -! -! NAME -! MODULE H5R_PROVISIONAL -! -! FILE -! fortran/src/H5Rff_F03.f90 -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions. -! It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled. -! -! 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 H5R 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 H5R_PROVISIONAL - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - - TYPE :: hdset_reg_ref_t_f03 - INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref - END TYPE hdset_reg_ref_t_f03 - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 - - END INTERFACE - - - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f ! obsolete - MODULE PROCEDURE h5rcreate_region_f ! obsolete - MODULE PROCEDURE h5rcreate_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f ! obsolete - MODULE PROCEDURE h5rdereference_region_f ! obsolete - MODULE PROCEDURE h5rdereference_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f ! obsolete - MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & - BIND(C, NAME='h5rget_name_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: name_len - INTEGER(SIZE_T) :: size_default - END FUNCTION h5rget_name_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & - BIND(C, NAME='h5rdereference_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - END FUNCTION h5rdereference_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & - BIND(C, NAME='h5rcreate_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: ref_type - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & - BIND(C, NAME='h5rget_region_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: dset_id - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_ptr_c - END INTERFACE - -CONTAINS - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - -!****s* H5R/h5rget_region_ptr_f -! -! NAME -! h5rget_region_ptr_f -! -! PURPOSE -! Retrieves a dataspace with the specified region -! selected using pointer -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! August 4, 2012 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) - - END SUBROUTINE h5rget_region_ptr_f - - -!****s* H5R (F03)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! Inputs: -! loc_id - location identifier -! name - name of the object at the specified location -! Outputs: -! ref - reference to the specified object -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! Signature: - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - namelen = LEN(name) - - hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f - -!****s* H5R (F03)/h5rcreate_ptr_f -! -! NAME -! h5rcreate_ptr_f -! -! PURPOSE -! Creates a reference. -! -! Inputs: -! loc_id - location identifier -! name - name of the dataset at the specified location -! ref_type - type of reference: -! H5R_OBJECT -! H5T_STD_REF_DSETREG -! Outputs: -! ref - reference created by the function call. -! hdferr - returns 0 if successful and -1 if fails. -! OPTIONAL -! space_id - dataspace identifier that describes selected region -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rcreate_f -! subroutine where the output is a pointer. -! -! Signature: - SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER, INTENT(IN) :: ref_type ! type of reference - TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: space_id_c - - namelen = LEN(name) - space_id_c = -1 - IF(PRESENT(space_id)) space_id_c = space_id - hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) - - END SUBROUTINE h5rcreate_ptr_f -!****s* H5R (F03)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference -! ref - reference to open -! Outputs: -! obj_id - object_identifier -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F03)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to teh regions -! ref - reference to open -! Outputs: -! obj_id - dataspace identifier -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_region_f - -!****s* H5R (F03)/h5rdereference_ptr_f -! -! NAME -! h5rdereference_ptr_f -! -! PURPOSE -! Opens the HDF5 object referenced. -! -! Inputs: -! obj_id - valid identifier for the file containing the -! referenced object or any object in that file. -! ref_type - the reference type of ref. -! ref - Reference to open. -! Outputs: -! ref_obj_id - identifier of referenced object -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rdereference_f -! subroutine using pointers. -! -! Signature: - SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the - ! referenced object or any object in that file. - INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. - TYPE(C_PTR), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) - - END SUBROUTINE h5rdereference_ptr_f -! -!****s* H5R (F03)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - 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 -!****s* H5R (F03)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - - !****s* H5R (F03)/h5rget_name_ptr_f - ! - ! NAME - ! h5rget_name_ptr_f - ! - ! PURPOSE - ! Retrieves a name of a referenced object. - ! - ! Inputs: - ! 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 - Returns 0 if successful and -1 if fails. - ! - ! Optional parameters: - ! 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: - 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 - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_ptr_f - - !****s* H5R (F03)/h5rget_obj_type_f - ! - ! NAME - ! h5rget_obj_type_f - ! - ! PURPOSE - ! Retrieves the type of object that an object reference points to. - ! - ! Inputs: - ! loc_id - Identifier for the dataset containing the reference or - ! for the group that dataset is in. - ! ref_type - Type of reference to query. - ! ref - Reference to query. - ! - ! Outputs: - ! obj_type - Type of referenced object. - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - ! - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! Decemeber 17, 2008 - ! - ! Signature: - SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - INTEGER, INTENT(OUT) :: obj_type - INTEGER, INTENT(OUT) :: hdferr - !***** - - INTERFACE - INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & - BIND(C, NAME='h5rget_obj_type_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), VALUE :: ref - INTEGER :: obj_type - END FUNCTION h5rget_obj_type_c - END INTERFACE - - hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) - - END SUBROUTINE h5rget_obj_type_f - -END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90 deleted file mode 100644 index ac45857..0000000 --- a/fortran/src/H5Rff_F90.f90 +++ /dev/null @@ -1,514 +0,0 @@ -!****h* ROBODoc/H5R (F90) -! -! NAME -! MODULE H5R_PROVISIONAL -! -! FILE -! fortran/src/H5Rff_F90.f90 -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5R functions. It contains -! the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Rff_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. * -! 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 H5R 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 H5R_PROVISIONAL - USE H5GLOBAL - -! If you change the value of these parameters, do not forget to change corresponding -! values in the H5f90.h file. -! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 -! -! TYPE hobj_ref_t_f -! INTEGER ref(REF_OBJ_BUF_LEN) -! END TYPE -! -! TYPE hdset_reg_ref_t_f -! INTEGER ref(REF_REG_BUF_LEN) -! END TYPE -! - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f - MODULE PROCEDURE h5rcreate_region_f - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f - MODULE PROCEDURE h5rdereference_region_f - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f - MODULE PROCEDURE h5rget_name_region_f - - END INTERFACE - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f - - END INTERFACE - - -CONTAINS - - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - - - -!****s* H5R (F90)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! INPUTS -! loc_id - location identifier -! name - name of the object at the specified location -! OUTPUTS -! ref - reference to the specified object -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_object_c(ref_f, loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_OBJECT_C':: h5rcreate_object_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5rcreate_object_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_object_c(ref_f, loc_id, name, namelen ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f -!****s* H5R (F90)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! INPUTS -! dset_id - identifier of the dataset containing reference -! ref - reference to open -! OUTPUTS -! obj_id - object_identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! SOURCE - SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rdereference_object_c(dset_id, ref_f, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_OBJECT_C':: h5rdereference_object_c - !DEC$ENDIF - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5rdereference_object_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rdereference_object_c(dset_id, ref_f, obj_id ) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F90)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! INPUTS -! 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 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! SOURCE - SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rdereference_region_c(dset_id, ref_f, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_REGION_C':: h5rdereference_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5rdereference_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rdereference_region_c(dset_id, ref_f, obj_id ) - - END SUBROUTINE h5rdereference_region_f -!****s* H5R (F90)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! INPUTS -! 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 -! -! OPTIONAL PARAMETERS -! 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 -! -! SOURCES - SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) - IMPLICIT NONE - 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, - ! 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(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - INTERFACE - INTEGER FUNCTION h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_OBJECT_C':: h5rget_name_object_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(HADDR_T) :: ref_f - - INTEGER(SIZE_T) :: name_len - END FUNCTION h5rget_name_object_c - END INTERFACE - - name_len=LEN(name) - - ref_f = ref%ref - hdferr = h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_object_f - -!****s* H5R (F90)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! INPUTS -! 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 -! -! OPTIONAL PARAMETERS -! 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 -! -! SOURCE - SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) - IMPLICIT NONE - 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 - INTEGER(SIZE_T) :: name_len - - INTERFACE - INTEGER FUNCTION h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_REGION_C':: h5rget_name_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER :: ref_f(REF_REG_BUF_LEN) - - INTEGER(SIZE_T) :: name_len - END FUNCTION h5rget_name_region_c - END INTERFACE - - name_len=LEN(name) - - ref_f = ref%ref - hdferr = h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - -END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 index 4b4c0b6..d43db38 100644 --- a/fortran/src/H5Tff.f90 +++ b/fortran/src/H5Tff.f90 @@ -36,6 +36,21 @@ MODULE H5T USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +!****t* H5T (F03)/hvl_t +! Fortran2003 Derived Type: + TYPE hvl_t + INTEGER(size_t) :: len ! Length of VL data (in base type units) + TYPE(C_PTR) :: p ! Pointer to VL data + END TYPE hvl_t + +!***** + + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE CONTAINS @@ -3102,4 +3117,169 @@ CONTAINS hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) END SUBROUTINE h5tget_native_type_f +!****s* H5T (F03)/H5Tconvert_f_F03 +! +! NAME +! H5Tconvert_f +! +! PURPOSE +! Converts data from between specified datatypes. +! +! Inputs: +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! nelmts - Size of array buf. +! buf - Array containing pre-conversion values. +! background - Optional background buffer. +! plist_id - Dataset transfer property list identifier. +! +! Outputs: +! buf - Array containing post-conversion values. +! hdferr - error code: +! 0 on success and -1 on failure +! AUTHOR +! M. Scot Breitenfeld +! Decemember 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id +!***** + INTEGER(HID_T) :: plist_id_default + TYPE(C_PTR) :: background_default + + INTERFACE + INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & + BIND(C, NAME='h5tconvert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , VALUE :: buf + TYPE(C_PTR) , VALUE :: background + INTEGER(HID_T) , INTENT(IN) :: plist_id + END FUNCTION h5tconvert_c + END INTERFACE + + plist_id_default = H5P_DEFAULT_F + IF(PRESENT(plist_id)) plist_id_default = plist_id + + background_default = C_NULL_PTR + IF(PRESENT(background)) background_default = background + + hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) + + END SUBROUTINE h5tconvert_f +! +!****s* (F03) H5T/h5tenum_insert_f90 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value ! value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) H5T/h5tenum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 + END MODULE H5T diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90 deleted file mode 100644 index 2c9f212..0000000 --- a/fortran/src/H5Tff_F03.f90 +++ /dev/null @@ -1,223 +0,0 @@ -!****h* ROBODoc/H5T (F03) -! -! NAME -! H5T_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5T functions. -! It contains the same functions as H5Tff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Tff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5T_PROVISIONAL - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -!****t* H5T (F03)/hvl_t -! Fortran2003 Derived Type: - TYPE hvl_t - INTEGER(size_t) :: len ! Length of VL data (in base type units) - TYPE(C_PTR) :: p ! Pointer to VL data - END TYPE hvl_t - -!***** - - INTERFACE h5tenum_insert_f - MODULE PROCEDURE h5tenum_insert_f03 - MODULE PROCEDURE h5tenum_insert_f90 - END INTERFACE - -CONTAINS - -!****s* H5T (F03)/H5Tconvert_f_F03 -! -! NAME -! H5Tconvert_f -! -! PURPOSE -! Converts data from between specified datatypes. -! -! Inputs: -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! nelmts - Size of array buf. -! buf - Array containing pre-conversion values. -! background - Optional background buffer. -! plist_id - Dataset transfer property list identifier. -! -! Outputs: -! buf - Array containing post-conversion values. -! hdferr - error code: -! 0 on success and -1 on failure -! AUTHOR -! M. Scot Breitenfeld -! Decemember 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id -!***** - INTEGER(HID_T) :: plist_id_default - TYPE(C_PTR) :: background_default - - INTERFACE - INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & - BIND(C, NAME='h5tconvert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , VALUE :: buf - TYPE(C_PTR) , VALUE :: background - INTEGER(HID_T) , INTENT(IN) :: plist_id - END FUNCTION h5tconvert_c - END INTERFACE - - plist_id_default = H5P_DEFAULT_F - IF(PRESENT(plist_id)) plist_id_default = plist_id - - background_default = C_NULL_PTR - IF(PRESENT(background)) background_default = background - - hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) - - END SUBROUTINE h5tconvert_f -! -!****s* (F03) H5T/h5tenum_insert_f90 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value ! value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* (F03) H5T/h5tenum_insert_f03 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Pointer to the value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 6, 2015 -! -! HISTORY -! F2003 implementation of function -! SOURCE - SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & - BIND(C, NAME='h5tenum_insert_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 - -END MODULE H5T_PROVISIONAL - diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90 deleted file mode 100644 index 380fbec..0000000 --- a/fortran/src/H5Tff_F90.f90 +++ /dev/null @@ -1,95 +0,0 @@ -!****h* ROBODoc/H5T (F90) -! -! NAME -! MODULE H5T_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5T functions. It contains -! the same functions as H5Tff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Tff_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5T_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -! -!****s* H5T/h5tenum_insert_f -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f - -END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 index 49e64a3..3ca3979 100644 --- a/fortran/src/H5_ff.f90 +++ b/fortran/src/H5_ff.f90 @@ -6,11 +6,6 @@ ! PURPOSE ! This module provides fortran specific helper functions for the HDF library ! -! USES -! H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003 -! only features. If Fortran 2003 functions are enabled then -! H5_ff_F03.f90 is compiled, else H5_ff_F90.f90, -! which is just a place holder blank module, is compiled. ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * @@ -37,9 +32,6 @@ MODULE H5LIB - USE H5LIB_PROVISIONAL ! helper functions for Fortran 2003 features: - ! pre-Fortran 2003 - empty module - ! Forttran 2003 - contains functions USE H5GLOBAL CONTAINS @@ -406,4 +398,42 @@ CONTAINS END FUNCTION h5kind_to_type +!****f* H5LIB_PROVISIONAL/h5offsetof +! +! NAME +! h5offsetof +! +! PURPOSE +! Computes the offset in memory +! +! Inputs: +! start - starting pointer address +! end - ending pointer address +! +! Outputs: +! offset - offset of a member within the derived type +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 25, 2008 +! +! ACKNOWLEDGEMENTS +! Joe Krahn +! +! Fortran2003 Interface: + FUNCTION h5offsetof(start,end) RESULT(offset) + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + IMPLICIT NONE + INTEGER(SIZE_T) :: offset + TYPE(C_PTR), VALUE, INTENT(IN) :: start, end +!***** + INTEGER(C_INTPTR_T) :: int_address_start, int_address_end + int_address_start = TRANSFER(start, int_address_start) + int_address_end = TRANSFER(end , int_address_end ) + + offset = int_address_end - int_address_start + + END FUNCTION h5offsetof + END MODULE H5LIB diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90 deleted file mode 100644 index d418ed5..0000000 --- a/fortran/src/H5_ff_F03.f90 +++ /dev/null @@ -1,75 +0,0 @@ -!****h* ROBODoc/H5LIB_PROVISIONAL -! -! NAME -! MODULE H5LIB_PROVISIONAL -! -! PURPOSE -! This file contains helper functions for Fortran 2003 features and is -! only compiled when Fortran 2003 features are enabled, otherwise -! the file H5_ff_F90.f90 is compiled. -! -! 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 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 H5LIB_PROVISIONAL - -CONTAINS -!****f* H5LIB_PROVISIONAL/h5offsetof -! -! NAME -! h5offsetof -! -! PURPOSE -! Computes the offset in memory -! -! Inputs: -! start - starting pointer address -! end - ending pointer address -! -! Outputs: -! offset - offset of a member within the derived type -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: - FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - IMPLICIT NONE - INTEGER(SIZE_T) :: offset - TYPE(C_PTR), VALUE, INTENT(IN) :: start, end -!***** - INTEGER(C_INTPTR_T) :: int_address_start, int_address_end - int_address_start = TRANSFER(start, int_address_start) - int_address_end = TRANSFER(end , int_address_end ) - - offset = int_address_end - int_address_start - - END FUNCTION h5offsetof - -END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5_ff_F90.f90 b/fortran/src/H5_ff_F90.f90 deleted file mode 100644 index a5d303a..0000000 --- a/fortran/src/H5_ff_F90.f90 +++ /dev/null @@ -1,34 +0,0 @@ -!****h* ROBODoc/H5LIB_PROVISIONAL (F90) -! -! NAME -! MODULE H5LIB_PROVISIONAL -! -! FILE -! fortran/src/H5_ff_F90.f90 -! -! PURPOSE -! This file is a dummy module for when Fortran 2003 features are not enabled. -! It is compiled in place of H5_ff_F03.f90 and is empty. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE H5LIB_PROVISIONAL - - -END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index ca50e20..6cb35c0 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -940,5 +940,33 @@ MODULE H5GLOBAL !!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) !!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) +CONTAINS + + SUBROUTINE C2F_string(c_string, f_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string + CHARACTER(LEN=*), INTENT(OUT) :: f_string + INTEGER(SIZE_T) :: c_len, f_len + + ! Find the length of the C string by located the null terminator + c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) + ! Find the length of the Fortran string + f_len = LEN(f_string) + + ! CASE (1): C string is equal to or larger then Fortran character buffer, + ! so fill the entire Fortran buffer. + IF(c_len.GE.f_len)THEN ! + f_string(1:f_len) = c_string(1:f_len) + + ! CASE (2): C string is smaller then Fortran character buffer, + ! so copy C string and blank pad remaining characters. + ELSE + f_string(1:c_len) = c_string(1:c_len) + f_string(c_len+1:f_len) =' ' + ENDIF + END SUBROUTINE C2F_string + END MODULE H5GLOBAL diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 6bde877..fc9246e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -523,8 +523,6 @@ H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f #define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C) #define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C) #define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C) -#define nh5aget_num_attrs_c H5_FC_FUNC_(h5aget_num_attrs_c, H5AGET_NUM_ATTRS_C) -#define nh5adelete_c H5_FC_FUNC_(h5adelete_c, H5ADELETE_C) #define nh5aget_storage_size_c H5_FC_FUNC_(h5aget_storage_size_c, H5AGET_STORAGE_SIZE_C) #define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C) #define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C) @@ -616,11 +614,11 @@ H5_FCDLL int_f nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void H5_FCDLL int_f nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f nh5aclose_c ( hid_t_f *attr_id ); -H5_FCDLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); +H5_FCDLL int_f h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); H5_FCDLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); H5_FCDLL int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); H5_FCDLL int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); -H5_FCDLL int_f nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); +H5_FCDLL int_f h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); H5_FCDLL int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); H5_FCDLL int_f nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); H5_FCDLL int_f nh5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 index 75af333..6309d2f 100644 --- a/fortran/src/HDF5.f90 +++ b/fortran/src/HDF5.f90 @@ -30,26 +30,17 @@ MODULE HDF5 USE H5GLOBAL USE H5F - USE H5F_PROVISIONAL USE H5G USE H5E - USE H5E_PROVISIONAL USE H5I USE H5L - USE H5L_PROVISIONAL USE H5S USE H5D - USE H5D_PROVISIONAL USE H5A - USE H5A_PROVISIONAL USE H5T - USE H5T_PROVISIONAL USE H5O - USE H5O_PROVISIONAL USE H5P - USE H5P_PROVISIONAL USE H5R - USE H5R_PROVISIONAL USE H5Z USE H5_DBLE_INTERFACE USE H5LIB diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index a4b3843..56a915f 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -70,14 +70,12 @@ endif # Source files for the library. libhdf5_fortran_la_SOURCES=H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ H5Tff.f90 H5Zff.f90 \ H5_DBLE_Interface$(F_DBLE).f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c \ - 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) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) # HDF5 Fortran library depends on HDF5 Library. libhdf5_fortran_la_LIBADD=$(LIBHDF5) @@ -198,19 +196,9 @@ H5fortran_types.lo: H5fortran_types.f90 H5fortran_detect.lo: H5fortran_detect.f90 H5test_kind.lo: $(srcdir)/H5test_kind.f90 H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo +H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo 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 -H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo -H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo @@ -222,22 +210,22 @@ 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 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 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: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 +HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 \ +HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ + H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index f9f4a7b..70470a3 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -151,29 +151,21 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 \ - H5Dff.f90 H5Eff.f90 H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 \ - H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ + H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 \ + H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c 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 HDF5.f90 H5FDmpiof.c HDF5mpio.f90 \ - H5FDmpioff.f90 + H5Tf.c H5Zf.c HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 @BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo @BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ @BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ - H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_DBLE_Interface$(F_DBLE).lo \ - H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo \ - H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo \ - H5Zf.lo H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo \ - 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) + H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ + H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ + H5_DBLE_Interface$(F_DBLE).lo H5f90kit.lo H5_f.lo H5Af.lo \ + H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo \ + H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo $(am__objects_1) libhdf5_fortran_la_OBJECTS = $(am_libhdf5_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -753,14 +745,12 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI # Source files for the library. libhdf5_fortran_la_SOURCES = H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ H5Tff.f90 H5Zff.f90 \ H5_DBLE_Interface$(F_DBLE).f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c \ - 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) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) # HDF5 Fortran library depends on HDF5 Library. @@ -1426,19 +1416,9 @@ H5fortran_types.lo: H5fortran_types.f90 H5fortran_detect.lo: H5fortran_detect.f90 H5test_kind.lo: $(srcdir)/H5test_kind.f90 H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo +H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo 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 -H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo -H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo @@ -1450,22 +1430,22 @@ 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 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 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: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 +HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 \ +HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ + H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo # lib/progs/tests targets recurse into subdirectories. build-* targets -- cgit v0.12 From d7fbbda1a099e108c8fbf7a9a50020d8785a1f5b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Apr 2015 16:59:58 -0500 Subject: [svn-r26809] Changed Fortran file endings from ".f90" to ".F90" --- MANIFEST | 46 +- fortran/src/CMakeLists.txt | 62 +- fortran/src/H5Aff.F90 | 2961 ++++++++++++ fortran/src/H5Aff.f90 | 2961 ------------ fortran/src/H5Dff.F90 | 3383 +++++++++++++ fortran/src/H5Dff.f90 | 3383 ------------- fortran/src/H5Eff.F90 | 312 ++ fortran/src/H5Eff.f90 | 312 -- fortran/src/H5FDmpioff.F90 | 212 + fortran/src/H5FDmpioff.f90 | 212 - fortran/src/H5Fff.F90 | 894 ++++ fortran/src/H5Fff.f90 | 894 ---- fortran/src/H5Gff.F90 | 1331 ++++++ fortran/src/H5Gff.f90 | 1331 ------ fortran/src/H5Iff.F90 | 352 ++ fortran/src/H5Iff.f90 | 352 -- fortran/src/H5Lf.c | 30 +- fortran/src/H5Lff.F90 | 1461 ++++++ fortran/src/H5Lff.f90 | 1496 ------ fortran/src/H5Off.F90 | 1167 +++++ fortran/src/H5Off.f90 | 1167 ----- fortran/src/H5Pff.F90 | 7624 ++++++++++++++++++++++++++++++ fortran/src/H5Pff.f90 | 7624 ------------------------------ fortran/src/H5Rf.c | 32 +- fortran/src/H5Rff.F90 | 779 +++ fortran/src/H5Rff.f90 | 791 ---- fortran/src/H5Sff.F90 | 1875 ++++++++ fortran/src/H5Sff.f90 | 1875 -------- fortran/src/H5Tff.F90 | 3285 +++++++++++++ fortran/src/H5Tff.f90 | 3285 ------------- fortran/src/H5Zff.F90 | 198 + fortran/src/H5Zff.f90 | 198 - fortran/src/H5_DBLE_InterfaceExclude.F90 | 39 + fortran/src/H5_DBLE_InterfaceExclude.f90 | 39 - fortran/src/H5_DBLE_InterfaceInclude.F90 | 1859 ++++++++ fortran/src/H5_DBLE_InterfaceInclude.f90 | 1859 -------- fortran/src/H5_f.c | 18 +- fortran/src/H5_ff.F90 | 439 ++ fortran/src/H5_ff.f90 | 439 -- fortran/src/H5f90global.F90 | 972 ++++ fortran/src/H5f90global.f90 | 972 ---- fortran/src/H5f90proto.h | 65 +- fortran/src/H5match_types.c | 4 +- fortran/src/H5test_kind.F90 | 269 ++ fortran/src/H5test_kind.f90 | 269 -- fortran/src/H5test_kind_SIZEOF.F90 | 228 + fortran/src/H5test_kind_SIZEOF.f90 | 228 - fortran/src/H5test_kind_STORAGE_SIZE.F90 | 230 + fortran/src/H5test_kind_STORAGE_SIZE.f90 | 230 - fortran/src/HDF5.F90 | 47 + fortran/src/HDF5.f90 | 47 - fortran/src/HDF5mpio.F90 | 55 + fortran/src/HDF5mpio.f90 | 55 - fortran/src/Makefile.am | 92 +- fortran/src/Makefile.in | 157 +- 55 files changed, 30215 insertions(+), 30282 deletions(-) create mode 100644 fortran/src/H5Aff.F90 delete mode 100644 fortran/src/H5Aff.f90 create mode 100644 fortran/src/H5Dff.F90 delete mode 100644 fortran/src/H5Dff.f90 create mode 100644 fortran/src/H5Eff.F90 delete mode 100644 fortran/src/H5Eff.f90 create mode 100644 fortran/src/H5FDmpioff.F90 delete mode 100644 fortran/src/H5FDmpioff.f90 create mode 100644 fortran/src/H5Fff.F90 delete mode 100644 fortran/src/H5Fff.f90 create mode 100644 fortran/src/H5Gff.F90 delete mode 100644 fortran/src/H5Gff.f90 create mode 100644 fortran/src/H5Iff.F90 delete mode 100644 fortran/src/H5Iff.f90 create mode 100644 fortran/src/H5Lff.F90 delete mode 100644 fortran/src/H5Lff.f90 create mode 100644 fortran/src/H5Off.F90 delete mode 100644 fortran/src/H5Off.f90 create mode 100644 fortran/src/H5Pff.F90 delete mode 100644 fortran/src/H5Pff.f90 create mode 100644 fortran/src/H5Rff.F90 delete mode 100644 fortran/src/H5Rff.f90 create mode 100644 fortran/src/H5Sff.F90 delete mode 100644 fortran/src/H5Sff.f90 create mode 100644 fortran/src/H5Tff.F90 delete mode 100644 fortran/src/H5Tff.f90 create mode 100644 fortran/src/H5Zff.F90 delete mode 100644 fortran/src/H5Zff.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceExclude.F90 delete mode 100644 fortran/src/H5_DBLE_InterfaceExclude.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceInclude.F90 delete mode 100644 fortran/src/H5_DBLE_InterfaceInclude.f90 create mode 100644 fortran/src/H5_ff.F90 delete mode 100644 fortran/src/H5_ff.f90 create mode 100644 fortran/src/H5f90global.F90 delete mode 100644 fortran/src/H5f90global.f90 create mode 100644 fortran/src/H5test_kind.F90 delete mode 100644 fortran/src/H5test_kind.f90 create mode 100644 fortran/src/H5test_kind_SIZEOF.F90 delete mode 100644 fortran/src/H5test_kind_SIZEOF.f90 create mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.F90 delete mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.f90 create mode 100644 fortran/src/HDF5.F90 delete mode 100644 fortran/src/HDF5.f90 create mode 100644 fortran/src/HDF5mpio.F90 delete mode 100644 fortran/src/HDF5mpio.f90 diff --git a/MANIFEST b/MANIFEST index b80a253..5c3ab84 100644 --- a/MANIFEST +++ b/MANIFEST @@ -271,48 +271,48 @@ ./fortran/examples/rwdset_fortran2003.f90 ./fortran/src/H5_f.c -./fortran/src/H5_ff.f90 -./fortran/src/H5_DBLE_InterfaceInclude.f90 -./fortran/src/H5_DBLE_InterfaceExclude.f90 +./fortran/src/H5_ff.F90 +./fortran/src/H5_DBLE_InterfaceInclude.F90 +./fortran/src/H5_DBLE_InterfaceExclude.F90 ./fortran/src/H5Af.c -./fortran/src/H5Aff.f90 +./fortran/src/H5Aff.F90 ./fortran/src/H5Df.c -./fortran/src/H5Dff.f90 +./fortran/src/H5Dff.F90 ./fortran/src/H5Ef.c -./fortran/src/H5Eff.f90 +./fortran/src/H5Eff.F90 ./fortran/src/H5FDmpiof.c -./fortran/src/H5FDmpioff.f90 +./fortran/src/H5FDmpioff.F90 ./fortran/src/H5Ff.c -./fortran/src/H5Fff.f90 +./fortran/src/H5Fff.F90 ./fortran/src/H5Gf.c -./fortran/src/H5Gff.f90 +./fortran/src/H5Gff.F90 ./fortran/src/H5If.c -./fortran/src/H5Iff.f90 +./fortran/src/H5Iff.F90 ./fortran/src/H5Lf.c -./fortran/src/H5Lff.f90 +./fortran/src/H5Lff.F90 ./fortran/src/H5Of.c -./fortran/src/H5Off.f90 +./fortran/src/H5Off.F90 ./fortran/src/H5Pf.c -./fortran/src/H5Pff.f90 +./fortran/src/H5Pff.F90 ./fortran/src/H5Rf.c -./fortran/src/H5Rff.f90 +./fortran/src/H5Rff.F90 ./fortran/src/H5Sf.c -./fortran/src/H5Sff.f90 +./fortran/src/H5Sff.F90 ./fortran/src/H5Tf.c -./fortran/src/H5Tff.f90 +./fortran/src/H5Tff.F90 ./fortran/src/H5Zf.c -./fortran/src/H5Zff.f90 +./fortran/src/H5Zff.F90 ./fortran/src/H5f90.h -./fortran/src/H5f90global.f90 +./fortran/src/H5f90global.F90 ./fortran/src/H5f90i.h ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h -./fortran/src/H5test_kind.f90 -./fortran/src/H5test_kind_SIZEOF.f90 -./fortran/src/H5test_kind_STORAGE_SIZE.f90 +./fortran/src/H5test_kind.F90 +./fortran/src/H5test_kind_SIZEOF.F90 +./fortran/src/H5test_kind_STORAGE_SIZE.F90 ./fortran/src/H5match_types.c -./fortran/src/HDF5.f90 -./fortran/src/HDF5mpio.f90 +./fortran/src/HDF5.F90 +./fortran/src/HDF5mpio.F90 ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 67edd24..3ee04d8 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -21,24 +21,24 @@ endif (WIN32) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind(_SIZEOF,_STORAGE_SIZE).f90 used to generate H5fortran_detect.f90 -# H5fortran_detect.f90 used to generate H5fort_type_defines.h -# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90 +# H5test_kind(_SIZEOF,_STORAGE_SIZE).F90 used to generate H5fortran_detect.F90 +# H5fortran_detect.F90 used to generate H5fort_type_defines.h +# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- if (FORTRAN_HAVE_STORAGE_SIZE) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.F90 ) set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") else (FORTRAN_HAVE_STORAGE_SIZE) if (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.F90 ) set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") else (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 ) endif (FORTRAN_HAVE_SIZEOF) endif (FORTRAN_HAVE_STORAGE_SIZE) @@ -61,15 +61,15 @@ set_target_properties (H5test_FortranHavekind PROPERTIES set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5test_FortranHavekind ) #----------------------------------------------------------------------------- add_executable (H5fortran_detect - ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 ) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) @@ -103,7 +103,7 @@ add_executable (H5match_types set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 COMMAND ${CMD} WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types @@ -171,25 +171,25 @@ endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) #----------------------------------------------------------------------------- set (f90_F_SRCS # generated files - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 # normal distribution - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.F90 ) #----------------------------------------------------------------------------- @@ -198,13 +198,13 @@ set (f90_F_SRCS if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set (f90_F_SRCS ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.F90 ) else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set (f90_F_SRCS ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) @@ -252,7 +252,7 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 new file mode 100644 index 0000000..f8f361f --- /dev/null +++ b/fortran/src/H5Aff.F90 @@ -0,0 +1,2961 @@ +!****h* ROBODoc/H5A +! +! NAME +! MODULE H5A +! +! PURPOSE +! This file contains Fortran interfaces for H5A functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 +! +! (A) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (1) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (2) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! (B) +! *** IMPORTANT *** +! If you add a new H5A 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 H5A + + USE H5GLOBAL +! +! On Windows there are no big (integer*8) integers, so overloading +! for bug #670 does not work. I have to use DEC compilation directives to make +! Windows DEC Visual Fortran and OSF compilers happy and do right things. +! 05/01/02 EP +! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_real_scalar + MODULE PROCEDURE h5awrite_real_1 + MODULE PROCEDURE h5awrite_real_2 + MODULE PROCEDURE h5awrite_real_3 + MODULE PROCEDURE h5awrite_real_4 + MODULE PROCEDURE h5awrite_real_5 + MODULE PROCEDURE h5awrite_real_6 + MODULE PROCEDURE h5awrite_real_7 + ! This is the preferred way to call h5awrite + ! by passing an address + MODULE PROCEDURE h5awrite_ptr + + END INTERFACE + + INTERFACE h5aread_f + + MODULE PROCEDURE h5aread_integer_scalar + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_real_scalar + MODULE PROCEDURE h5aread_real_1 + MODULE PROCEDURE h5aread_real_2 + MODULE PROCEDURE h5aread_real_3 + MODULE PROCEDURE h5aread_real_4 + MODULE PROCEDURE h5aread_real_5 + MODULE PROCEDURE h5aread_real_6 + MODULE PROCEDURE h5aread_real_7 + + ! This is the preferred way to call h5aread + ! by passing an address + MODULE PROCEDURE h5aread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Awrite routine + + INTERFACE + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5awrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Aread routine + + INTERFACE + INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5aread_f_c + END INTERFACE + +CONTAINS + +! +!****s* H5A/h5acreate_f +! +! NAME +! h5acreate_f +! +! PURPOSE +! Creates a dataset as an attribute of a group, dataset, or named datatype +! +! INPUTS +! loc_id - identifier of an object (group, dataset, +! or named datatype) attribute is attached to +! name - attribute name +! type_id - attribute datatype identifier +! space_id - attribute dataspace identifier +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier +! appl_id - Attribute access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & + hdferr, acpl_id, aapl_id ) + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + INTERFACE + INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & + space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: loc_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN), VALUE :: type_id + INTEGER(HID_T), INTENT(IN), VALUE :: space_id + INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default + END FUNCTION H5Acreate2 + END INTERFACE + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + IF (PRESENT(acpl_id)) acpl_id_default = acpl_id + IF (PRESENT(aapl_id)) aapl_id_default = aapl_id + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & + acpl_id_default, aapl_id_default) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE h5acreate_f + +! +!****s* H5A/h5aopen_name_f +! +! NAME +! h5aopen_name_f +! +! PURPOSE +! Opens an attribute specified by name. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype atttribute to be attached to +! name - attribute name +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: obj_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + END FUNCTION H5Aopen_name + END INTERFACE + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = H5Aopen_name(obj_id, c_name) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_name_f +! +!****s* H5A/H5Aopen_idx_f +! +! NAME +! H5Aopen_idx_f +! +! PURPOSE +! Opens the attribute specified by its index. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype an attribute to be attached to +! index - index of the attribute to open (zero-based) +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(IN) :: index ! Attribute index + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(C_INT), INTENT(IN) :: index + END FUNCTION H5Aopen_idx + END INTERFACE + + attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_idx_f +! +!****s* H5A/H5Aget_space_f +! +! NAME +! H5Aget_space_f +! +! PURPOSE +! Gets a copy of the dataspace for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! space_id - attribite dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_space + END INTERFACE + + space_id = H5Aget_space(attr_id) + + hdferr = 0 + IF(space_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_space_f +! +!****s* H5A/H5Aget_type_f +! +! NAME +! H5Aget_type_f +! +! PURPOSE +! Gets an attribute datatype. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! type_id - attribute datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_type + END INTERFACE + + type_id = H5Aget_type(attr_id) + + hdferr = 0 + IF(type_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_type_f +! +!****s* H5A/H5Aget_name_f +! +! NAME +! H5Aget_name_f +! +! PURPOSE +! Gets an attribute name. +! +! INPUTS +! attr_id - attribute identifier +! size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + + CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf + +!***** + INTERFACE + INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + INTEGER(SIZE_T), INTENT(IN), VALUE :: size + CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION H5Aget_name + END INTERFACE + + ! add 1 for the null char + hdferr = H5Aget_name(attr_id, size+1, c_buf) + + CALL C2F_string(c_buf, buf) + + END SUBROUTINE H5Aget_name_f + +! +!****s* H5A/H5Aget_name_by_idx_f +! +! NAME +! H5Aget_name_by_idx_f +! +! PURPOSE +! Gets an attribute name, by attribute index position. +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS +! name - Attribute name +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! size - Size, in bytes, of attribute name +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & + n, name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed *TEST* check NULL + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! Returns attribute name size, + ! -1 if fail + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, + ! of the attribute +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T) :: size_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5aget_name_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5aget_name_by_idx_f +!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & +!!$ n, name, hdferr, size, lapl_id) +!!$ USE ISO_C_BINDING +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached +!!$ CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, +!!$ ! from which attribute is to be removed *TEST* check NULL +!!$ INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: +!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type +!!$ ! H5_INDEX_NAME_F - Index on names +!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order +!!$ ! H5_INDEX_N_F - Number of indices defined +!!$ +!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: +!!$ ! H5_ITER_UNKNOWN_F - Unknown order +!!$ ! H5_ITER_INC_F - Increasing order +!!$ ! H5_ITER_DEC_F - Decreasing order +!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest +!!$ ! H5_ITER_N_F - Number of iteration orders +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index +!!$ CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! Returns attribute name size, +!!$ ! -1 if fail +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, +!!$ ! of the attribute +!!$!***** +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER(SIZE_T) :: obj_namelen +!!$ INTEGER(SIZE_T) :: size_default, c_size +!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & +!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') +!!$ USE ISO_C_BINDING +!!$ USE H5GLOBAL +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name +!!$ INTEGER(C_INT), INTENT(IN) :: idx_type +!!$ INTEGER(C_INT), INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name +!!$ INTEGER(SIZE_T) :: size_default +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION H5Aget_name_by_idx +!!$ END INTERFACE +!!$ +!!$ obj_namelen = LEN(obj_name) +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ size_default = LEN(name) +!!$ +!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & +!!$ n, c_name, size_default, lapl_id_default) +!!$ +!!$ IF(c_size.LT.0) THEN +!!$ hdferr = -1 +!!$ ELSE +!!$ CALL C2F_string(c_name, name) +!!$ IF(PRESENT(size)) size = c_size +!!$ ENDIF +!!$ +!!$ END SUBROUTINE H5Aget_name_by_idx_f +! +!****s* H5A/H5Aget_num_attrs_f +! +! NAME +! H5Aget_num_attrs_f +! +! PURPOSE +! Determines the number of attributes attached to an object. +! +! INPUTS +! obj_id - object (group, dataset, or named datatype) +! identifier +! OUTPUTS +! attr_num - number of attributes attached to the object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: attr_num + END FUNCTION h5aget_num_attrs_c + END INTERFACE + + hdferr = h5aget_num_attrs_c(obj_id, attr_num) + END SUBROUTINE h5aget_num_attrs_f + +! +!****s* H5A/H5Adelete_f +! +! NAME +! H5Adelete_f +! +! PURPOSE +! Deletes an attribute of an object (group, dataset or +! named datatype) +! +! INPUTS +! obj_id - object identifier +! name - attribute name +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Adelete_f(obj_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + END FUNCTION H5Adelete_c + END INTERFACE + + namelen = LEN(name) + hdferr = H5Adelete_c(obj_id, name, namelen) + END SUBROUTINE H5Adelete_f + +! +!****s* H5A/H5Aclose_f +! +! NAME +! H5Aclose_f +! +! PURPOSE +! Closes the specified attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! SOURCE + + SUBROUTINE H5Aclose_f(attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aclose + END INTERFACE + + hdferr = INT(H5Aclose(attr_id)) + END SUBROUTINE H5Aclose_f + +! +!****s* H5A/H5Aget_storage_size_f +! +! NAME +! H5Aget_storage_size_f +! +! PURPOSE +! Returns the amount of storage required for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! size - attribute storage size +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_storage_size + END INTERFACE + + size = H5Aget_storage_size(attr_id) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_storage_size_f + +! +!****s* H5A/H5Aget_create_plist_f +! +! NAME +! H5Aget_create_plist_f +! +! PURPOSE +! Gets an attribute creation property list identifier +! +! INPUTS +! attr_id - Identifier of the attribute +! OUTPUTS +! creation_prop_id - Identifier for the attribute’s creation property +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute + INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_create_plist + END INTERFACE + + creation_prop_id = H5Aget_create_plist(attr_id) + + END SUBROUTINE H5Aget_create_plist_f + +! +!****s* H5A/H5Arename_by_name_f +! +! NAME +! H5Arename_by_name_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, +! whose attribute is to be renamed +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! lapl_id - Link access property list identifier +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! whose attribute is to be renamed + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION H5Arename_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default=lapl_id + + hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + + END SUBROUTINE H5Arename_by_name_f + +! +!****s* H5A/H5Aopen_f +! +! NAME +! H5Aopen_f +! +! PURPOSE +! Opens an attribute for an object specified by object +! identifier and attribute name +! +! INPUTS +! obj_id - Identifer for object to which attribute is attached +! attr_name - Name of attribute to open +! OUTPUTS +! attr_id - attribute identifier + +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! Success: 0 + ! Failure: -1 + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list +!***** + INTEGER(HID_T) :: aapl_id_default + + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: aapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + + hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_f + +! +!****s* H5A/H5Adelete_by_idx_f +! +! NAME +! H5Adelete_by_idx_f +! +! PURPOSE +! Deletes an attribute from an object according to index order +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, from which attribute is to be removed +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Offset within index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + obj_namelen = LEN(obj_name) + hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + + END SUBROUTINE H5Adelete_by_idx_f + +! +!****s* H5A/H5Adelete_by_name_f +! +! NAME +! H5Adelete_by_name_f +! +! PURPOSE +! Removes an attribute from a specified location +! +! INPUTS +! loc_id - Identifer for object to which attribute is attached +! obj_name - Name of attribute to open +! attr_name - Attribute access property list +! lapl_id - Link access property list +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + + END SUBROUTINE H5Adelete_by_name_f + +! +!****s* H5A/H5Aopen_by_idx_f +! +! NAME +! H5Aopen_by_idx_f +! +! PURPOSE +! Opens an existing attribute that is attached to an object specified by location and name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + END FUNCTION H5Aopen_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_by_idx_f + +! +!****s* H5A/H5Aget_info_f +! +! NAME +! H5Aget_info_f +! +! PURPOSE +! Retrieves attribute information, by attribute identifier +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! NOTE: In C it is defined as a structure: H5A_info_t +! +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! SOURCE + SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + END FUNCTION H5Aget_info_c + END INTERFACE + + hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + + END SUBROUTINE H5Aget_info_f + +! +!****s* H5A/H5Aget_info_by_idx_f +! +! NAME +! H5Aget_info_by_idx_f +! +! PURPOSE +! Retrieves attribute information, by attribute index position +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Aget_info_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(present(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE H5Aget_info_by_idx_f + +! +!****s* H5A/H5Aget_info_by_name_f +! +! NAME +! H5Aget_info_by_name_f +! +! PURPOSE +! Retrieves attribute information, by attribute name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! attr_name - Attribute name +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + END FUNCTION H5Aget_info_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE H5Aget_info_by_name_f + +! +!****s* H5A/H5Acreate_by_name_f +! +! NAME +! H5Acreate_by_name_f +! +! PURPOSE +! Creates an attribute attached to a specified object +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name, relative to loc_id, of object that attribute is to be attached to +! attr_name - Attribute name +! type_id - Attribute datatype identifier +! space_id - Attribute dataspace identifier +! +! OUTPUTS +! attr - an attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier (Currently not used.) +! aapl_id - Attribute access property list identifier (Currently not used.) +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & + acpl_id, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: attr + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr + + END FUNCTION H5Acreate_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(acpl_id)) acpl_id_default = acpl_id + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + END SUBROUTINE H5Acreate_by_name_f + +! +!****s* H5A/H5Aexists_f +! +! NAME +! H5Aexists_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! obj_id - Object identifier +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T) :: attr_exists_c + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: attr_exists_c + END FUNCTION H5Aexists_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE H5Aexists_f + +! +!****s* H5A/H5Aexists_by_name_f +! +! NAME +! H5Aexists_by_name_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! loc_id - Location identifier +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER :: attr_exists_c + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: attr_exists_c + END FUNCTION H5Aexists_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE H5Aexists_by_name_f +! +!****s* H5A/H5Aopen_by_name_f +! +! NAME +! H5Aopen_by_name_f +! +! PURPOSE +! Opens an attribute for an object by object name and attribute name. +! +! INPUTS +! loc_id - Location from which to find object to which attribute is attached +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + ! (Currently unused; should be passed in as H5P_DEFAULT_F) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_by_name_f + +! +!****s* H5A/H5Arename_f +! +! NAME +! H5Arename_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! HISTORY +! N/A +! +! + +! SOURCE + SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + + END FUNCTION H5Arename_c + END INTERFACE + + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + hdferr = H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + + END SUBROUTINE H5Arename_f + + +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_scalar + + SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_1 + + + SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_2 + + SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_3 + + + SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_4 + + + SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_5 + + + SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_6 + + + SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & + TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_7 + + + SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_scalar + + SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_1 + + + SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_2 + + + SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_3 + + + SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_4 + + + SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_5 + + + SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_6 + + + SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_7 + + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + + END SUBROUTINE H5Awrite_char_scalar + + SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_scalar_fix + + SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_1 + + SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_2 + + SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_3 + + SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_4 + + SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_5 + + + SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_6 + + SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_7 + +!****s* H5A (F03)/H5Awrite_f_F03 +! +! NAME +! H5Awrite_f_F03 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran2003 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Awrite_ptr + +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_scalar + + SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_1 + + + SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_2 + + + SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_3 + + + SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_4 + + + SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_5 + + + SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_6 + + + SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_7 + + + SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_scalar + + SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_1 + + + SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_2 + + + SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_3 + + + SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_4 + + + SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_5 + + + SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_6 + + + SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_7 + + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) + + END SUBROUTINE H5Aread_char_scalar + + SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_scalar_fix + + SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_1 + + + SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_2 + + + SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_3 + + SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_4 + + SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_5 + + + SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_6 + + + SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_7 + + +!****s* H5A (F03)/H5Aread_f_F03 +! +! NAME +! H5Aread_f_F03 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran2003 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Aread_ptr + +END MODULE H5A + + diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 deleted file mode 100644 index f8f361f..0000000 --- a/fortran/src/H5Aff.f90 +++ /dev/null @@ -1,2961 +0,0 @@ -!****h* ROBODoc/H5A -! -! NAME -! MODULE H5A -! -! PURPOSE -! This file contains Fortran interfaces for H5A functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 -! -! (A) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (1) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (2) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! (B) -! *** IMPORTANT *** -! If you add a new H5A 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 H5A - - USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - ! This is the preferred way to call h5awrite - ! by passing an address - MODULE PROCEDURE h5awrite_ptr - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - - ! This is the preferred way to call h5aread - ! by passing an address - MODULE PROCEDURE h5aread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Awrite routine - - INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5awrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Aread routine - - INTERFACE - INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5aread_f_c - END INTERFACE - -CONTAINS - -! -!****s* H5A/h5acreate_f -! -! NAME -! h5acreate_f -! -! PURPOSE -! Creates a dataset as an attribute of a group, dataset, or named datatype -! -! INPUTS -! loc_id - identifier of an object (group, dataset, -! or named datatype) attribute is attached to -! name - attribute name -! type_id - attribute datatype identifier -! space_id - attribute dataspace identifier -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier -! appl_id - Attribute access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & - hdferr, acpl_id, aapl_id ) - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - INTERFACE - INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & - space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: loc_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN), VALUE :: type_id - INTEGER(HID_T), INTENT(IN), VALUE :: space_id - INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default - INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default - END FUNCTION H5Acreate2 - END INTERFACE - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - IF (PRESENT(acpl_id)) acpl_id_default = acpl_id - IF (PRESENT(aapl_id)) aapl_id_default = aapl_id - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & - acpl_id_default, aapl_id_default) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE h5acreate_f - -! -!****s* H5A/h5aopen_name_f -! -! NAME -! h5aopen_name_f -! -! PURPOSE -! Opens an attribute specified by name. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype atttribute to be attached to -! name - attribute name -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: obj_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name - END FUNCTION H5Aopen_name - END INTERFACE - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = H5Aopen_name(obj_id, c_name) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aopen_name_f -! -!****s* H5A/H5Aopen_idx_f -! -! NAME -! H5Aopen_idx_f -! -! PURPOSE -! Opens the attribute specified by its index. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype an attribute to be attached to -! index - index of the attribute to open (zero-based) -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(IN) :: index ! Attribute index - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(C_INT), INTENT(IN) :: index - END FUNCTION H5Aopen_idx - END INTERFACE - - attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aopen_idx_f -! -!****s* H5A/H5Aget_space_f -! -! NAME -! H5Aget_space_f -! -! PURPOSE -! Gets a copy of the dataspace for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! space_id - attribite dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_space - END INTERFACE - - space_id = H5Aget_space(attr_id) - - hdferr = 0 - IF(space_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_space_f -! -!****s* H5A/H5Aget_type_f -! -! NAME -! H5Aget_type_f -! -! PURPOSE -! Gets an attribute datatype. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! type_id - attribute datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_type - END INTERFACE - - type_id = H5Aget_type(attr_id) - - hdferr = 0 - IF(type_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_type_f -! -!****s* H5A/H5Aget_name_f -! -! NAME -! H5Aget_name_f -! -! PURPOSE -! Gets an attribute name. -! -! INPUTS -! attr_id - attribute identifier -! size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr - - CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf - -!***** - INTERFACE - INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - INTEGER(SIZE_T), INTENT(IN), VALUE :: size - CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION H5Aget_name - END INTERFACE - - ! add 1 for the null char - hdferr = H5Aget_name(attr_id, size+1, c_buf) - - CALL C2F_string(c_buf, buf) - - END SUBROUTINE H5Aget_name_f - -! -!****s* H5A/H5Aget_name_by_idx_f -! -! NAME -! H5Aget_name_by_idx_f -! -! PURPOSE -! Gets an attribute name, by attribute index position. -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS -! name - Attribute name -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! size - Size, in bytes, of attribute name -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & - n, name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed *TEST* check NULL - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! Returns attribute name size, - ! -1 if fail - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, - ! of the attribute -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T) :: size_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_name_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5aget_name_by_idx_f -!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & -!!$ n, name, hdferr, size, lapl_id) -!!$ USE ISO_C_BINDING -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached -!!$ CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, -!!$ ! from which attribute is to be removed *TEST* check NULL -!!$ INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order -!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ ! H5_ITER_N_F - Number of iteration orders -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! Returns attribute name size, -!!$ ! -1 if fail -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, -!!$ ! of the attribute -!!$!***** -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER(SIZE_T) :: obj_namelen -!!$ INTEGER(SIZE_T) :: size_default, c_size -!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & -!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') -!!$ USE ISO_C_BINDING -!!$ USE H5GLOBAL -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name -!!$ INTEGER(C_INT), INTENT(IN) :: idx_type -!!$ INTEGER(C_INT), INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name -!!$ INTEGER(SIZE_T) :: size_default -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION H5Aget_name_by_idx -!!$ END INTERFACE -!!$ -!!$ obj_namelen = LEN(obj_name) -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ size_default = LEN(name) -!!$ -!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & -!!$ n, c_name, size_default, lapl_id_default) -!!$ -!!$ IF(c_size.LT.0) THEN -!!$ hdferr = -1 -!!$ ELSE -!!$ CALL C2F_string(c_name, name) -!!$ IF(PRESENT(size)) size = c_size -!!$ ENDIF -!!$ -!!$ END SUBROUTINE H5Aget_name_by_idx_f -! -!****s* H5A/H5Aget_num_attrs_f -! -! NAME -! H5Aget_num_attrs_f -! -! PURPOSE -! Determines the number of attributes attached to an object. -! -! INPUTS -! obj_id - object (group, dataset, or named datatype) -! identifier -! OUTPUTS -! attr_num - number of attributes attached to the object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: attr_num - END FUNCTION h5aget_num_attrs_c - END INTERFACE - - hdferr = h5aget_num_attrs_c(obj_id, attr_num) - END SUBROUTINE h5aget_num_attrs_f - -! -!****s* H5A/H5Adelete_f -! -! NAME -! H5Adelete_f -! -! PURPOSE -! Deletes an attribute of an object (group, dataset or -! named datatype) -! -! INPUTS -! obj_id - object identifier -! name - attribute name -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Adelete_f(obj_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - END FUNCTION H5Adelete_c - END INTERFACE - - namelen = LEN(name) - hdferr = H5Adelete_c(obj_id, name, namelen) - END SUBROUTINE H5Adelete_f - -! -!****s* H5A/H5Aclose_f -! -! NAME -! H5Aclose_f -! -! PURPOSE -! Closes the specified attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! SOURCE - - SUBROUTINE H5Aclose_f(attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aclose - END INTERFACE - - hdferr = INT(H5Aclose(attr_id)) - END SUBROUTINE H5Aclose_f - -! -!****s* H5A/H5Aget_storage_size_f -! -! NAME -! H5Aget_storage_size_f -! -! PURPOSE -! Returns the amount of storage required for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! size - attribute storage size -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_storage_size - END INTERFACE - - size = H5Aget_storage_size(attr_id) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_storage_size_f - -! -!****s* H5A/H5Aget_create_plist_f -! -! NAME -! H5Aget_create_plist_f -! -! PURPOSE -! Gets an attribute creation property list identifier -! -! INPUTS -! attr_id - Identifier of the attribute -! OUTPUTS -! creation_prop_id - Identifier for the attribute’s creation property -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_create_plist - END INTERFACE - - creation_prop_id = H5Aget_create_plist(attr_id) - - END SUBROUTINE H5Aget_create_plist_f - -! -!****s* H5A/H5Arename_by_name_f -! -! NAME -! H5Arename_by_name_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, -! whose attribute is to be renamed -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! lapl_id - Link access property list identifier -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! whose attribute is to be renamed - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION H5Arename_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - - hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - - END SUBROUTINE H5Arename_by_name_f - -! -!****s* H5A/H5Aopen_f -! -! NAME -! H5Aopen_f -! -! PURPOSE -! Opens an attribute for an object specified by object -! identifier and attribute name -! -! INPUTS -! obj_id - Identifer for object to which attribute is attached -! attr_name - Name of attribute to open -! OUTPUTS -! attr_id - attribute identifier - -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! Success: 0 - ! Failure: -1 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list -!***** - INTEGER(HID_T) :: aapl_id_default - - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - - hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_f - -! -!****s* H5A/H5Adelete_by_idx_f -! -! NAME -! H5Adelete_by_idx_f -! -! PURPOSE -! Deletes an attribute from an object according to index order -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, from which attribute is to be removed -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Offset within index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - obj_namelen = LEN(obj_name) - hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - - END SUBROUTINE H5Adelete_by_idx_f - -! -!****s* H5A/H5Adelete_by_name_f -! -! NAME -! H5Adelete_by_name_f -! -! PURPOSE -! Removes an attribute from a specified location -! -! INPUTS -! loc_id - Identifer for object to which attribute is attached -! obj_name - Name of attribute to open -! attr_name - Attribute access property list -! lapl_id - Link access property list -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - - END SUBROUTINE H5Adelete_by_name_f - -! -!****s* H5A/H5Aopen_by_idx_f -! -! NAME -! H5Aopen_by_idx_f -! -! PURPOSE -! Opens an existing attribute that is attached to an object specified by location and name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - END FUNCTION H5Aopen_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_by_idx_f - -! -!****s* H5A/H5Aget_info_f -! -! NAME -! H5Aget_info_f -! -! PURPOSE -! Retrieves attribute information, by attribute identifier -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! NOTE: In C it is defined as a structure: H5A_info_t -! -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! SOURCE - SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION H5Aget_info_c - END INTERFACE - - hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - - END SUBROUTINE H5Aget_info_f - -! -!****s* H5A/H5Aget_info_by_idx_f -! -! NAME -! H5Aget_info_by_idx_f -! -! PURPOSE -! Retrieves attribute information, by attribute index position -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Aget_info_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(present(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE H5Aget_info_by_idx_f - -! -!****s* H5A/H5Aget_info_by_name_f -! -! NAME -! H5Aget_info_by_name_f -! -! PURPOSE -! Retrieves attribute information, by attribute name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! attr_name - Attribute name -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - END FUNCTION H5Aget_info_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE H5Aget_info_by_name_f - -! -!****s* H5A/H5Acreate_by_name_f -! -! NAME -! H5Acreate_by_name_f -! -! PURPOSE -! Creates an attribute attached to a specified object -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name, relative to loc_id, of object that attribute is to be attached to -! attr_name - Attribute name -! type_id - Attribute datatype identifier -! space_id - Attribute dataspace identifier -! -! OUTPUTS -! attr - an attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier (Currently not used.) -! aapl_id - Attribute access property list identifier (Currently not used.) -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & - acpl_id, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT) :: attr - INTEGER, INTENT(OUT) :: hdferr - - INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr - - END FUNCTION H5Acreate_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(acpl_id)) acpl_id_default = acpl_id - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - END SUBROUTINE H5Acreate_by_name_f - -! -!****s* H5A/H5Aexists_f -! -! NAME -! H5Aexists_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! obj_id - Object identifier -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T) :: attr_exists_c - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: attr_exists_c - END FUNCTION H5Aexists_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE H5Aexists_f - -! -!****s* H5A/H5Aexists_by_name_f -! -! NAME -! H5Aexists_by_name_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! loc_id - Location identifier -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER :: attr_exists_c - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: attr_exists_c - END FUNCTION H5Aexists_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE H5Aexists_by_name_f -! -!****s* H5A/H5Aopen_by_name_f -! -! NAME -! H5Aopen_by_name_f -! -! PURPOSE -! Opens an attribute for an object by object name and attribute name. -! -! INPUTS -! loc_id - Location from which to find object to which attribute is attached -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - ! (Currently unused; should be passed in as H5P_DEFAULT_F) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_by_name_f - -! -!****s* H5A/H5Arename_f -! -! NAME -! H5Arename_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! HISTORY -! N/A -! -! - -! SOURCE - SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - - END FUNCTION H5Arename_c - END INTERFACE - - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - hdferr = H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - - END SUBROUTINE H5Arename_f - - -!****s* H5A (F03)/H5Awrite_f_F90 -! -! NAME -! H5Awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_scalar - - SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_1 - - - SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_2 - - SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_3 - - - SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_4 - - - SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_5 - - - SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_6 - - - SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_7 - - - SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_scalar - - SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_real_1 - - - SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_real_2 - - - SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_3 - - - SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_4 - - - SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_5 - - - SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_6 - - - SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_7 - - SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE H5Awrite_char_scalar - - SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_scalar_fix - - SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_1 - - SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_2 - - SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_3 - - SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_4 - - SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_5 - - - SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_6 - - SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_7 - -!****s* H5A (F03)/H5Awrite_f_F03 -! -! NAME -! H5Awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Awrite_ptr - -!****s* H5A (F03)/H5Aread_f_F90 -! -! NAME -! H5Aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_scalar - - SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_1 - - - SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_2 - - - SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_3 - - - SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_4 - - - SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_5 - - - SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_6 - - - SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_7 - - - SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_scalar - - SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_1 - - - SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_2 - - - SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_3 - - - SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_4 - - - SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_5 - - - SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_6 - - - SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_7 - - SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) - - END SUBROUTINE H5Aread_char_scalar - - SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_scalar_fix - - SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_1 - - - SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_2 - - - SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_3 - - SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_4 - - SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_5 - - - SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_6 - - - SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_7 - - -!****s* H5A (F03)/H5Aread_f_F03 -! -! NAME -! H5Aread_f_F03 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran2003 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Aread_ptr - -END MODULE H5A - - diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 new file mode 100644 index 0000000..8457bfd --- /dev/null +++ b/fortran/src/H5Dff.F90 @@ -0,0 +1,3383 @@ +!****h* ROBODoc/H5D +! +! NAME +! MODULE H5D +! +! FILE +! fortran/src/H5Dff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5D functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed. Therefore, we can not create just one subroutine for +! each array type (integer, real, etc...) and use a +! rank 1 array of assumed size to handle multiple ranks, i.e. +! (i.e. integer, dimension(*) :: ... ) +! (i.e. real , dimension(*) :: ... ) etc... +! +! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may +! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved +! the statement instead to each subroutine. +! +! +! (4) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (A) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (B) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require the +! argument in C_LOC to be of the variant: +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5D + USE H5GLOBAL + + INTERFACE h5dextend_f + MODULE PROCEDURE h5dset_extent_f + END INTERFACE + + INTERFACE h5dread_vl_f + MODULE PROCEDURE h5dread_vl_integer + MODULE PROCEDURE h5dread_vl_real + MODULE PROCEDURE h5dread_vl_string + END INTERFACE + + INTERFACE h5dwrite_vl_f + MODULE PROCEDURE h5dwrite_vl_integer + MODULE PROCEDURE h5dwrite_vl_real + MODULE PROCEDURE h5dwrite_vl_string + END INTERFACE + + INTERFACE h5dwrite_f + + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_integer_scalar + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_char_scalar + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_real_scalar + MODULE PROCEDURE h5dwrite_real_1 + MODULE PROCEDURE h5dwrite_real_2 + MODULE PROCEDURE h5dwrite_real_3 + MODULE PROCEDURE h5dwrite_real_4 + MODULE PROCEDURE h5dwrite_real_5 + MODULE PROCEDURE h5dwrite_real_6 + MODULE PROCEDURE h5dwrite_real_7 + + ! This is the preferred way to call h5dwrite + ! by passing an address + MODULE PROCEDURE h5dwrite_ptr + + END INTERFACE + + INTERFACE h5dread_f + + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_integer_scalar + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_char_scalar + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_real_scalar + MODULE PROCEDURE h5dread_real_1 + MODULE PROCEDURE h5dread_real_2 + MODULE PROCEDURE h5dread_real_3 + MODULE PROCEDURE h5dread_real_4 + MODULE PROCEDURE h5dread_real_5 + MODULE PROCEDURE h5dread_real_6 + MODULE PROCEDURE h5dread_real_7 + + ! This is the preferred way to call h5dread + ! by passing an address + MODULE PROCEDURE h5dread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dwrite routine + + INTERFACE + INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & + mem_space_id_default , & + file_space_id_default, & + xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dwrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dread routine + + INTERFACE + INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dread_f_c + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_char + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dfill routine + + INTERFACE + INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + TYPE(C_PTR), VALUE :: f_ptr_fill_value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + TYPE(C_PTR), VALUE :: f_ptr_buf + INTEGER(HID_T) :: mem_type_id + END FUNCTION h5dfill_c + END INTERFACE + +CONTAINS + +! +!****s* H5D/h5dcreate_f +! +! NAME +! h5dcreate_f +! +! PURPOSE +! Creates a dataset at the specified location +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! type_id - dataset datatype identifier +! space_id - dataset dataspace identifier +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! creation_prp - Dataset creation property list +! lcpl_id - Link creation property list +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! - Added version's 1.8 new optional parameters +! February, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & + hdferr, dcpl_id, lcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER :: namelen ! Name length + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & + space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & + lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_f + +! +!****s* H5D/h5dopen_f +! +! NAME +! h5dopen_f +! +! PURPOSE +! Opens an existing dataset. +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! -Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! -Added 1.8 (optional) parameter dapl_id +! February, 2008, M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list +!***** + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: dapl_id_default + + INTERFACE + INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dopen_c + END INTERFACE + + dapl_id_default = H5P_DEFAULT_F + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + + END SUBROUTINE h5dopen_f + +! +!****s* H5D/h5dclose_f +! +! NAME +! h5dclose_f +! +! PURPOSE +! Closes a dataset. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dclose_f(dset_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dclose_c(dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + END FUNCTION h5dclose_c + END INTERFACE + + hdferr = h5dclose_c(dset_id) + + END SUBROUTINE h5dclose_f + +! +!****s* H5D/h5dget_type_f +! +! NAME +! h5dget_type_f +! +! PURPOSE +! Returns an identifier for a copy of the datatype for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! datatype_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! +! SOURCE + SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: datatype_id + END FUNCTION h5dget_type_c + END INTERFACE + + hdferr = h5dget_type_c (dataset_id, datatype_id) + END SUBROUTINE h5dget_type_f + +! +!****s* H5D/h5dset_extent +! +! NAME +! h5dset_extent (instead of obsolete name: h5dextend_f) +! +! PURPOSE +! Extends a dataset with unlimited dimension. +! +! INPUTS +! dataset_id - dataset identifier +! size - array containing the new magnitude of +! each dimension +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Changed name from the now obsolete h5dextend_f +! to h5dset_extent_f. Provided interface to old name +! for backward compatability. -MSB- March 14, 2008 +! +! SOURCE + SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + ! Array containing + ! dimensions' sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dset_extent_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + END FUNCTION h5dset_extent_c + END INTERFACE + + hdferr = H5Dset_extent_c(dataset_id, size) + END SUBROUTINE h5dset_extent_f + +!****s* H5D/h5dget_create_plist_f +! +! NAME +! h5dget_create_plist_f +! +! PURPOSE +! Returns an identifier for a copy of the dataset creation +! property list for a dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! plist_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! SOURCE + SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation + ! property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_create_plist_c + END INTERFACE + + hdferr = h5dget_create_plist_c(dataset_id, plist_id) + END SUBROUTINE h5dget_create_plist_f + +! +!****s* H5D/h5dget_storage_size_f +! +! NAME +! h5dget_storage_size_f +! +! PURPOSE +! Returns the amount of storage requires by a dataset +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! size - datastorage size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! SOURCE + SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage + ! allocated for dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5dget_storage_size_c + END INTERFACE + + hdferr = h5dget_storage_size_c(dataset_id, size) + END SUBROUTINE h5dget_storage_size_f + +! +!****s* H5D/h5dvlen_get_max_len_f +! +! NAME +! h5dvlen_get_max_len_f +! +! PURPOSE +! Returns maximum length of the VL array elements +! +! INPUTS +! dataset_id - dataset identifier +! type_id - datatype identifier +! space_id - dataspace identifier +! OUTPUTS +! size - buffer size +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! +! SOURCE + SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(SIZE_T), INTENT(OUT) :: len + END FUNCTION h5dvlen_get_max_len_c + END INTERFACE + + hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + END SUBROUTINE h5dvlen_get_max_len_f + +! +!****s* H5D/h5dget_space_status_f +! +! NAME +! h5dget_space_status_f +! +! PURPOSE +! Returns the status of data space allocation. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! flag - status; may have one of the following values: +! H5D_SPACE_STS_ERROR_F +! H5D_SPACE_STS_NOT_ALLOCATED_F +! H5D_SPACE_STS_PART_ALLOCATED_F +! H5D_SPACE_STS_ALLOCATED_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + !***** + INTERFACE + INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c + !DEC$ENDIF + INTEGER(HID_T) :: dset_id + INTEGER :: flag + END FUNCTION h5dget_space_status_c + END INTERFACE + + hdferr = h5dget_space_status_c(dset_id, flag) + END SUBROUTINE h5dget_space_status_f + +! +!****s* H5D/h5dcreate_anon_f +! +! NAME +! h5dcreate_anon_f +! +! PURPOSE +! Creates a dataset in a file without linking it into the file structure +! +! INPUTS +! loc_id - Identifier of the file or group within which to create the dataset. +! type_id - Identifier of the datatype to use when creating the dataset. +! space_id - Identifier of the dataspace to use when creating the dataset. +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dcpl_id - Dataset creation property list identifier. +! dapl_id - Dataset access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 11, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. +!***** + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_anon_c + END INTERFACE + + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_anon_f + + SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_integer_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_integer + + SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_integer_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_integer + + SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_real_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_real + + SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_real_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_real + + SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + ! xfer_prp_default, tmp_buf, dims, str_len) + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + + END SUBROUTINE h5dwrite_vl_string + + SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store + ! the length of each + ! element + CHARACTER(LEN=*), INTENT(OUT), & + DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION h5dread_vl_string_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + RETURN + END SUBROUTINE h5dread_vl_string + +! +!****s* H5D/h5dget_space_f +! +! NAME +! h5dget_space_f +! +! PURPOSE +! Returns an identifier for a copy of the dataspace for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! dataspace_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + END FUNCTION h5dget_space_c + END INTERFACE + + hdferr = h5dget_space_c(dataset_id, dataspace_id) +END SUBROUTINE h5dget_space_f + +!****s* H5D/h5dget_access_plist_f +! +! NAME +! h5dget_access_plist_f +! +! PURPOSE +! Returns a copy of the dataset creation property list. +! +! INPUTS +! dset_id - Dataset identifier +! +! OUTPUTS +! plist_id - Dataset access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! SOURCE +SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_access_plist_c + END INTERFACE + + hdferr = h5dget_access_plist_c(dset_id, plist_id) + +END SUBROUTINE h5dget_access_plist_f + + + SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + TYPE(C_PTR) :: f_ptr + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_scalar + + SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_1 + + SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_2 + + SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_3 + + SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_4 + + SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_5 + + SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_6 + + SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_7 + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_scalar_fix + + SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_1 + + SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_2 + + SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_3 + + SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_4 + + SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_5 + + SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_6 + + SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_7 + + + SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_scalar + + + SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_1 + + SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_2 + + SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_3 + + SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_4 + + SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_5 + + SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_6 + + SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_7 + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dread_reference_dsetreg + + + SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dread_integer_scalar + + SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_1 + + SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_2 + + SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_3 + + SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_4 + + SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_5 + + SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_6 + + SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_7 + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) + + END SUBROUTINE h5dread_char_scalar_fix + + SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_1 + + SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_2 + + SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_3 + + SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_4 + + SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_5 + + SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_6 + + SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_7 + + SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_scalar + + SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_1 + + SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_2 + + SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_3 + + SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_4 + + SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_5 + + SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_6 + + SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_7 + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dwrite_ptr +!****s* H5D (F03)/h5dread_f_F03 +! +! NAME +! h5dread_f_F03 +! +! PURPOSE +! Reads raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset read from. +! mem_type_id - Identifier of the memory datatype. +! +! Outputs: +! buf - Buffer to receive data read from file. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dread_ptr + +! +! NAME +! h5dfill_integer +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_real +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_valuer) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_real + +! +! NAME +! h5dfill_char +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_char +! +!****s* H5D (F03)/h5dvlen_reclaim_f +! NAME +! h5dvlen_reclaim_f +! +! PURPOSE +! Reclaims VL datatype memory buffers. +! +! Inputs: +! +! type_id - Identifier of the datatype. +! space_id - Identifier of the dataspace. +! plist_id - Identifier of the property list used to create the buffer. +! buf - Pointer to the buffer to be reclaimed. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January 11, 2011 +! +! Fortran2003 Interface: + SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: plist_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + INTEGER(HID_T) :: type_id + INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: plist_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dvlen_reclaim_c + END INTERFACE + + hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) + + END SUBROUTINE H5Dvlen_reclaim_f + + +END MODULE H5D + + diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 deleted file mode 100644 index 8457bfd..0000000 --- a/fortran/src/H5Dff.f90 +++ /dev/null @@ -1,3383 +0,0 @@ -!****h* ROBODoc/H5D -! -! NAME -! MODULE H5D -! -! FILE -! fortran/src/H5Dff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5D functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed. Therefore, we can not create just one subroutine for -! each array type (integer, real, etc...) and use a -! rank 1 array of assumed size to handle multiple ranks, i.e. -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may -! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved -! the statement instead to each subroutine. -! -! -! (4) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (A) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (B) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require the -! argument in C_LOC to be of the variant: -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5D - USE H5GLOBAL - - INTERFACE h5dextend_f - MODULE PROCEDURE h5dset_extent_f - END INTERFACE - - INTERFACE h5dread_vl_f - MODULE PROCEDURE h5dread_vl_integer - MODULE PROCEDURE h5dread_vl_real - MODULE PROCEDURE h5dread_vl_string - END INTERFACE - - INTERFACE h5dwrite_vl_f - MODULE PROCEDURE h5dwrite_vl_integer - MODULE PROCEDURE h5dwrite_vl_real - MODULE PROCEDURE h5dwrite_vl_string - END INTERFACE - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - ! This is the preferred way to call h5dwrite - ! by passing an address - MODULE PROCEDURE h5dwrite_ptr - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - - ! This is the preferred way to call h5dread - ! by passing an address - MODULE PROCEDURE h5dread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dwrite routine - - INTERFACE - INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & - mem_space_id_default , & - file_space_id_default, & - xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dwrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dread routine - - INTERFACE - INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dread_f_c - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dfill routine - - INTERFACE - INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - TYPE(C_PTR), VALUE :: f_ptr_fill_value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - TYPE(C_PTR), VALUE :: f_ptr_buf - INTEGER(HID_T) :: mem_type_id - END FUNCTION h5dfill_c - END INTERFACE - -CONTAINS - -! -!****s* H5D/h5dcreate_f -! -! NAME -! h5dcreate_f -! -! PURPOSE -! Creates a dataset at the specified location -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! type_id - dataset datatype identifier -! space_id - dataset dataspace identifier -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! creation_prp - Dataset creation property list -! lcpl_id - Link creation property list -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! - Added version's 1.8 new optional parameters -! February, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & - hdferr, dcpl_id, lcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER :: namelen ! Name length - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & - space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & - lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_f - -! -!****s* H5D/h5dopen_f -! -! NAME -! h5dopen_f -! -! PURPOSE -! Opens an existing dataset. -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! -Added 1.8 (optional) parameter dapl_id -! February, 2008, M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list -!***** - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: dapl_id_default - - INTERFACE - INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dopen_c - END INTERFACE - - dapl_id_default = H5P_DEFAULT_F - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - - END SUBROUTINE h5dopen_f - -! -!****s* H5D/h5dclose_f -! -! NAME -! h5dclose_f -! -! PURPOSE -! Closes a dataset. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dclose_f(dset_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dclose_c(dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - END FUNCTION h5dclose_c - END INTERFACE - - hdferr = h5dclose_c(dset_id) - - END SUBROUTINE h5dclose_f - -! -!****s* H5D/h5dget_type_f -! -! NAME -! h5dget_type_f -! -! PURPOSE -! Returns an identifier for a copy of the datatype for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! datatype_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! -! SOURCE - SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: datatype_id - END FUNCTION h5dget_type_c - END INTERFACE - - hdferr = h5dget_type_c (dataset_id, datatype_id) - END SUBROUTINE h5dget_type_f - -! -!****s* H5D/h5dset_extent -! -! NAME -! h5dset_extent (instead of obsolete name: h5dextend_f) -! -! PURPOSE -! Extends a dataset with unlimited dimension. -! -! INPUTS -! dataset_id - dataset identifier -! size - array containing the new magnitude of -! each dimension -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Changed name from the now obsolete h5dextend_f -! to h5dset_extent_f. Provided interface to old name -! for backward compatability. -MSB- March 14, 2008 -! -! SOURCE - SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dset_extent_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - END FUNCTION h5dset_extent_c - END INTERFACE - - hdferr = H5Dset_extent_c(dataset_id, size) - END SUBROUTINE h5dset_extent_f - -!****s* H5D/h5dget_create_plist_f -! -! NAME -! h5dget_create_plist_f -! -! PURPOSE -! Returns an identifier for a copy of the dataset creation -! property list for a dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! plist_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! SOURCE - SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation - ! property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_create_plist_c - END INTERFACE - - hdferr = h5dget_create_plist_c(dataset_id, plist_id) - END SUBROUTINE h5dget_create_plist_f - -! -!****s* H5D/h5dget_storage_size_f -! -! NAME -! h5dget_storage_size_f -! -! PURPOSE -! Returns the amount of storage requires by a dataset -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! size - datastorage size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! SOURCE - SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage - ! allocated for dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5dget_storage_size_c - END INTERFACE - - hdferr = h5dget_storage_size_c(dataset_id, size) - END SUBROUTINE h5dget_storage_size_f - -! -!****s* H5D/h5dvlen_get_max_len_f -! -! NAME -! h5dvlen_get_max_len_f -! -! PURPOSE -! Returns maximum length of the VL array elements -! -! INPUTS -! dataset_id - dataset identifier -! type_id - datatype identifier -! space_id - dataspace identifier -! OUTPUTS -! size - buffer size -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! -! SOURCE - SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(SIZE_T), INTENT(OUT) :: len - END FUNCTION h5dvlen_get_max_len_c - END INTERFACE - - hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - END SUBROUTINE h5dvlen_get_max_len_f - -! -!****s* H5D/h5dget_space_status_f -! -! NAME -! h5dget_space_status_f -! -! PURPOSE -! Returns the status of data space allocation. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! flag - status; may have one of the following values: -! H5D_SPACE_STS_ERROR_F -! H5D_SPACE_STS_NOT_ALLOCATED_F -! H5D_SPACE_STS_PART_ALLOCATED_F -! H5D_SPACE_STS_ALLOCATED_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - !***** - INTERFACE - INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c - !DEC$ENDIF - INTEGER(HID_T) :: dset_id - INTEGER :: flag - END FUNCTION h5dget_space_status_c - END INTERFACE - - hdferr = h5dget_space_status_c(dset_id, flag) - END SUBROUTINE h5dget_space_status_f - -! -!****s* H5D/h5dcreate_anon_f -! -! NAME -! h5dcreate_anon_f -! -! PURPOSE -! Creates a dataset in a file without linking it into the file structure -! -! INPUTS -! loc_id - Identifier of the file or group within which to create the dataset. -! type_id - Identifier of the datatype to use when creating the dataset. -! space_id - Identifier of the dataspace to use when creating the dataset. -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dcpl_id - Dataset creation property list identifier. -! dapl_id - Dataset access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 11, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. -!***** - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_anon_c - END INTERFACE - - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_anon_f - - SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_integer_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_integer - - SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_integer_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_integer - - SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_real_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_real - - SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_real_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_real - - SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - ! xfer_prp_default, tmp_buf, dims, str_len) - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - - END SUBROUTINE h5dwrite_vl_string - - SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store - ! the length of each - ! element - CHARACTER(LEN=*), INTENT(OUT), & - DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION h5dread_vl_string_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - RETURN - END SUBROUTINE h5dread_vl_string - -! -!****s* H5D/h5dget_space_f -! -! NAME -! h5dget_space_f -! -! PURPOSE -! Returns an identifier for a copy of the dataspace for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! dataspace_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: dataspace_id - END FUNCTION h5dget_space_c - END INTERFACE - - hdferr = h5dget_space_c(dataset_id, dataspace_id) -END SUBROUTINE h5dget_space_f - -!****s* H5D/h5dget_access_plist_f -! -! NAME -! h5dget_access_plist_f -! -! PURPOSE -! Returns a copy of the dataset creation property list. -! -! INPUTS -! dset_id - Dataset identifier -! -! OUTPUTS -! plist_id - Dataset access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! SOURCE -SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_access_plist_c - END INTERFACE - - hdferr = h5dget_access_plist_c(dset_id, plist_id) - -END SUBROUTINE h5dget_access_plist_f - - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_7 - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_scalar_fix - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_7 - - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_scalar - - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) - - END SUBROUTINE h5dread_char_scalar_fix - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_7 - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dwrite_ptr -!****s* H5D (F03)/h5dread_f_F03 -! -! NAME -! h5dread_f_F03 -! -! PURPOSE -! Reads raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset read from. -! mem_type_id - Identifier of the memory datatype. -! -! Outputs: -! buf - Buffer to receive data read from file. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dread_ptr - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_valuer) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_real - -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_char -! -!****s* H5D (F03)/h5dvlen_reclaim_f -! NAME -! h5dvlen_reclaim_f -! -! PURPOSE -! Reclaims VL datatype memory buffers. -! -! Inputs: -! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January 11, 2011 -! -! Fortran2003 Interface: - SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(IN) :: plist_id - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - INTEGER(HID_T) :: type_id - INTEGER(HID_T) :: space_id - INTEGER(HID_T) :: plist_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dvlen_reclaim_c - END INTERFACE - - hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) - - END SUBROUTINE H5Dvlen_reclaim_f - - -END MODULE H5D - - diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 new file mode 100644 index 0000000..ca32b22 --- /dev/null +++ b/fortran/src/H5Eff.F90 @@ -0,0 +1,312 @@ +!****h* ROBODoc/H5E +! +! NAME +! MODULE H5E +! +! FILE +! fortran/src/H5Eff.f90 +! +! PURPOSE +! This Module contains Fortran interfaces for H5E functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! 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 H5E function to the module 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 H5E + + USE H5GLOBAL + + !Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTON = 1 + + !Turn off automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 + +CONTAINS + +!****s* H5E/h5eclear_f +! +! NAME +! h5eclear_f +! +! PURPOSE +! Clears the error stack for the current thread. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! estack_id - Error Stack id +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! Added optional error stack identifier in order to bring +! the function in line with the h5eclear2 routine. +! MSB, July 9, 2009 +! +! SOURCE + SUBROUTINE h5eclear_f(hdferr, estack_id) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id +!***** + INTEGER(HID_T) :: estack_id_default + + INTERFACE + INTEGER FUNCTION h5eclear_c(estack_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c + !DEC$ENDIF + INTEGER(HID_T) :: estack_id_default + END FUNCTION h5eclear_c + END INTERFACE + + estack_id_default = H5E_DEFAULT_F + IF(PRESENT(estack_id)) estack_id_default = estack_id + + hdferr = h5eclear_c(estack_id_default) + END SUBROUTINE h5eclear_f + +!****s* H5E/h5eprint_f +! +! NAME +! h5eprint_f +! +! PURPOSE +! Prints the error stack in a default manner. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! name - name of the file that contains print output +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eprint_f(hdferr, name) + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5eprint_c1(name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: namelen + CHARACTER(LEN=*),INTENT(IN) :: name + END FUNCTION h5eprint_c1 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5eprint_c2() + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 + !DEC$ENDIF + END FUNCTION h5eprint_c2 + END INTERFACE + namelen = LEN(NAME) + IF (PRESENT(name)) THEN + hdferr = h5eprint_c1(name, namelen) + ELSE + hdferr = h5eprint_c2() + ENDIF + END SUBROUTINE h5eprint_f +!****s* H5E/h5eget_major_f +! +! NAME +! h5eget_major_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a major error number. +! +! INPUTS +! error_no - major error number +! +! OUTPUTS +! name - character string describing the error +! namelen - number of characters in the name buffer +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters + ! in name. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + END FUNCTION h5eget_major_c + END INTERFACE + + hdferr = h5eget_major_c(error_no, name, namelen) + END SUBROUTINE h5eget_major_f +!****s* H5E/h5eget_minor_f +! +! NAME +! h5eget_minor_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a minor error number. +! +! INPUTS +! error_no - minor error number +! +! OUTPUTS +! name - character string describing the error +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_minor_f(error_no, name, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_minor_c(error_no, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + END FUNCTION h5eget_minor_c + END INTERFACE + + hdferr = h5eget_minor_c(error_no, name) + END SUBROUTINE h5eget_minor_f + +!****s* H5E/h5eset_auto_f +! +! NAME +! h5eset_auto_f +! +! PURPOSE +! Returns settings for automatic error stack traversal function and its data. +! +! Inputs: +! printflag - Flag to turn automatic error printing on or off; +! possible values are: +! printon (1) +! printoff(0) +! estack_id - Error stack identifier. +! func - Function to be called upon an error condition. +! client_data - Data passed to the error function +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 10, 2009 +! +! Fortran2003 Interface: + SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) + USE, INTRINSIC :: ISO_C_BINDING + INTEGER , INTENT(IN) :: printflag + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id + TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func + TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data +!***** + INTEGER(HID_T) :: estack_id_default + TYPE(C_FUNPTR) :: func_default + TYPE(C_PTR) :: client_data_default + INTERFACE + INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & + BIND(C, NAME='h5eset_auto2_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER :: printflag + INTEGER(HID_T) :: estack_id +!!$ TYPE(C_FUNPTR) :: func +!!$ TYPE(C_PTR), VALUE :: client_data + TYPE(C_FUNPTR), VALUE :: func + TYPE(C_PTR), VALUE :: client_data + END FUNCTION h5eset_auto2_c + END INTERFACE + + estack_id_default = -1 + func_default = C_NULL_FUNPTR + client_data_default = C_NULL_PTR + + IF(PRESENT(estack_id)) estack_id_default = estack_id + IF(PRESENT(func)) func_default = func + IF(PRESENT(client_data)) client_data_default = client_data + + hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) + END SUBROUTINE h5eset_auto_f + +END MODULE H5E + diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 deleted file mode 100644 index ca32b22..0000000 --- a/fortran/src/H5Eff.f90 +++ /dev/null @@ -1,312 +0,0 @@ -!****h* ROBODoc/H5E -! -! NAME -! MODULE H5E -! -! FILE -! fortran/src/H5Eff.f90 -! -! PURPOSE -! This Module contains Fortran interfaces for H5E functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! 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 H5E function to the module 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 H5E - - USE H5GLOBAL - - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 - -CONTAINS - -!****s* H5E/h5eclear_f -! -! NAME -! h5eclear_f -! -! PURPOSE -! Clears the error stack for the current thread. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! estack_id - Error Stack id -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! Added optional error stack identifier in order to bring -! the function in line with the h5eclear2 routine. -! MSB, July 9, 2009 -! -! SOURCE - SUBROUTINE h5eclear_f(hdferr, estack_id) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id -!***** - INTEGER(HID_T) :: estack_id_default - - INTERFACE - INTEGER FUNCTION h5eclear_c(estack_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c - !DEC$ENDIF - INTEGER(HID_T) :: estack_id_default - END FUNCTION h5eclear_c - END INTERFACE - - estack_id_default = H5E_DEFAULT_F - IF(PRESENT(estack_id)) estack_id_default = estack_id - - hdferr = h5eclear_c(estack_id_default) - END SUBROUTINE h5eclear_f - -!****s* H5E/h5eprint_f -! -! NAME -! h5eprint_f -! -! PURPOSE -! Prints the error stack in a default manner. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! name - name of the file that contains print output -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: namelen - CHARACTER(LEN=*),INTENT(IN) :: name - END FUNCTION h5eprint_c1 - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5eprint_c2() - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 - !DEC$ENDIF - END FUNCTION h5eprint_c2 - END INTERFACE - namelen = LEN(NAME) - IF (PRESENT(name)) THEN - hdferr = h5eprint_c1(name, namelen) - ELSE - hdferr = h5eprint_c2() - ENDIF - END SUBROUTINE h5eprint_f -!****s* H5E/h5eget_major_f -! -! NAME -! h5eget_major_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a major error number. -! -! INPUTS -! error_no - major error number -! -! OUTPUTS -! name - character string describing the error -! namelen - number of characters in the name buffer -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters - ! in name. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - END FUNCTION h5eget_major_c - END INTERFACE - - hdferr = h5eget_major_c(error_no, name, namelen) - END SUBROUTINE h5eget_major_f -!****s* H5E/h5eget_minor_f -! -! NAME -! h5eget_minor_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a minor error number. -! -! INPUTS -! error_no - minor error number -! -! OUTPUTS -! name - character string describing the error -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_minor_f(error_no, name, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - END FUNCTION h5eget_minor_c - END INTERFACE - - hdferr = h5eget_minor_c(error_no, name) - END SUBROUTINE h5eget_minor_f - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Returns settings for automatic error stack traversal function and its data. -! -! Inputs: -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! estack_id - Error stack identifier. -! func - Function to be called upon an error condition. -! client_data - Data passed to the error function -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 10, 2009 -! -! Fortran2003 Interface: - SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) - USE, INTRINSIC :: ISO_C_BINDING - INTEGER , INTENT(IN) :: printflag - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id - TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func - TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data -!***** - INTEGER(HID_T) :: estack_id_default - TYPE(C_FUNPTR) :: func_default - TYPE(C_PTR) :: client_data_default - INTERFACE - INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & - BIND(C, NAME='h5eset_auto2_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER :: printflag - INTEGER(HID_T) :: estack_id -!!$ TYPE(C_FUNPTR) :: func -!!$ TYPE(C_PTR), VALUE :: client_data - TYPE(C_FUNPTR), VALUE :: func - TYPE(C_PTR), VALUE :: client_data - END FUNCTION h5eset_auto2_c - END INTERFACE - - estack_id_default = -1 - func_default = C_NULL_FUNPTR - client_data_default = C_NULL_PTR - - IF(PRESENT(estack_id)) estack_id_default = estack_id - IF(PRESENT(func)) func_default = func - IF(PRESENT(client_data)) client_data_default = client_data - - hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) - END SUBROUTINE h5eset_auto_f - -END MODULE H5E - diff --git a/fortran/src/H5FDmpioff.F90 b/fortran/src/H5FDmpioff.F90 new file mode 100644 index 0000000..50a77d9 --- /dev/null +++ b/fortran/src/H5FDmpioff.F90 @@ -0,0 +1,212 @@ +!****h* ROBODoc/H5FDMPIO +! +! NAME +! MODULE H5FDMPIO +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions needed by +! parallel MPI programs. +! +! 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 H5P 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 H5FDMPIO + USE H5GLOBAL +CONTAINS + +!****s* H5FDMPIO/h5pset_fapl_mpio_f +! +! NAME +! h5pset_fapl_mpio_f +! +! PURPOSE +! Stores MPI IO communicator information to the file +! access property list. +! +! INPUTS +! prp_id - file access property list identifier +! comm - MPI-2 communicator +! info - MPI-2 info object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_fapl_mpio_c + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pset_fapl_mpio_f + +!****s* H5FDMPIO/h5pget_fapl_mpio_f +! +! NAME +! h5pget_fapl_mpio_f +! +! PURPOSE +! Returns MPI communicator information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! comm - MPI-2 communicator +! info - MPI-2 info object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: info ! buffer to return info object + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_fapl_mpio_c + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pget_fapl_mpio_f + +!****s* H5FDMPIO/h5pset_dxpl_mpio_f +! +! NAME +! h5pset_dxpl_mpio_f +! +! PURPOSE +! Sets data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! data_xfer_mode - transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pset_dxpl_mpio_f + +!****s* H5FDMPIO/h5pget_dxpl_mpio_f +! +! NAME +! h5pget_dxpl_mpio_f +! +! PURPOSE +! Returns the data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! OUTPUTS +! data_xfer_mode- transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c + hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pget_dxpl_mpio_f + +!****s* H5P/h5pget_mpio_actual_io_mode_f +! NAME +! h5pget_mpio_actual_io_mode_f +! +! PURPOSE +! Retrieves the type of I/O that HDF5 actually performed on the last +! parallel I/O call. This is not necessarily the type of I/O requested. +! +! INPUTS +! dxpl_id - Dataset transfer property list identifier. +! OUTPUTS +! actual_io_mode - The type of I/O performed by this process. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 27, 2012 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + END FUNCTION h5pget_mpio_actual_io_mode_c + END INTERFACE + + actual_io_mode = -1 + + hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + + END SUBROUTINE h5pget_mpio_actual_io_mode_f + +END MODULE H5FDMPIO diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90 deleted file mode 100644 index 50a77d9..0000000 --- a/fortran/src/H5FDmpioff.f90 +++ /dev/null @@ -1,212 +0,0 @@ -!****h* ROBODoc/H5FDMPIO -! -! NAME -! MODULE H5FDMPIO -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions needed by -! parallel MPI programs. -! -! 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 H5P 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 H5FDMPIO - USE H5GLOBAL -CONTAINS - -!****s* H5FDMPIO/h5pset_fapl_mpio_f -! -! NAME -! h5pset_fapl_mpio_f -! -! PURPOSE -! Stores MPI IO communicator information to the file -! access property list. -! -! INPUTS -! prp_id - file access property list identifier -! comm - MPI-2 communicator -! info - MPI-2 info object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_fapl_mpio_c - hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pset_fapl_mpio_f - -!****s* H5FDMPIO/h5pget_fapl_mpio_f -! -! NAME -! h5pget_fapl_mpio_f -! -! PURPOSE -! Returns MPI communicator information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! comm - MPI-2 communicator -! info - MPI-2 info object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_fapl_mpio_c - hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pget_fapl_mpio_f - -!****s* H5FDMPIO/h5pset_dxpl_mpio_f -! -! NAME -! h5pset_dxpl_mpio_f -! -! PURPOSE -! Sets data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! data_xfer_mode - transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c - hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pset_dxpl_mpio_f - -!****s* H5FDMPIO/h5pget_dxpl_mpio_f -! -! NAME -! h5pget_dxpl_mpio_f -! -! PURPOSE -! Returns the data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! OUTPUTS -! data_xfer_mode- transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c - hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pget_dxpl_mpio_f - -!****s* H5P/h5pget_mpio_actual_io_mode_f -! NAME -! h5pget_mpio_actual_io_mode_f -! -! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. -! -! INPUTS -! dxpl_id - Dataset transfer property list identifier. -! OUTPUTS -! actual_io_mode - The type of I/O performed by this process. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 27, 2012 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - END FUNCTION h5pget_mpio_actual_io_mode_c - END INTERFACE - - actual_io_mode = -1 - - hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - - END SUBROUTINE h5pget_mpio_actual_io_mode_f - -END MODULE H5FDMPIO diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 new file mode 100644 index 0000000..53df8c5 --- /dev/null +++ b/fortran/src/H5Fff.F90 @@ -0,0 +1,894 @@ +!****h* ROBODoc/H5F +! +! NAME +! MODULE H5F +! +! FILE +! H5Fff.f90 +! +! PURPOSE +! This file contains Fortran 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 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. +! +!***** + +MODULE H5F + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +CONTAINS +!****s* H5F/h5fcreate_f +! +! NAME +! h5fcreate_f +! +! PURPOSE +! Creates HDF5 files. +! +! INPUTS +! name - name of the file to create +! access_flags - File access flags. Allowable values are: +! H5F_ACC_TRUNC_F +! H5F_ACC_EXCL_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & + creation_prp, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp + ! File creation propertly + ! list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: creation_prp_default + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER(HID_T), INTENT(IN) :: creation_prp_default + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fcreate_c + END INTERFACE + + creation_prp_default = H5P_DEFAULT_F + access_prp_default = H5P_DEFAULT_F + + IF (PRESENT(creation_prp)) creation_prp_default = creation_prp + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + + END SUBROUTINE h5fcreate_f +!****s* H5F/h5fflush_f +! +! NAME +! h5fflush_f +! +! PURPOSE +! Flushes all buffers associated WITH a file to disk +! +! INPUTS +! object_id - identifier of object used to identify the file. +! scope - specifies the scope of the flushing action. +! Possible values are: +! H5F_SCOPE_GLOBAL_F +! H5F_SCOPE_LOCAL_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fflush_f(object_id, scope, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object + !associate with a file, + !including the file itself, + !a dataset, a group, an + !attribute, or a named + !data type + + INTEGER, INTENT(IN) :: scope !scope of the flushing + !action, possible values + !are: H5F_SCOPE_GLOBAL_F + ! which flushes the entire + !virtual file, + !and H5F_SCOPE_LOCAL_F + !which flushes only the + !specified file. + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fflush_c(object_id, scope) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: scope + END FUNCTION h5fflush_c + END INTERFACE + + hdferr = h5fflush_c(object_id, scope) + + END SUBROUTINE h5fflush_f +!****s* H5F/h5fmount_f +! +! NAME +! h5fmount_f +! +! PURPOSE +! Mounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the group onto which the file +! specified by child_id is to be mounted. +! child_id - the identifier of the file to be mounted. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - the identifier of the property list to be used +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! in which dsetname is defined + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the + ! file to be mounted + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & + child_id, access_prp_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fmount_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) + + END SUBROUTINE h5fmount_f + +!****s* H5F/h5funmount_f +! +! NAME +! h5funmount_f +! +! PURPOSE +! Unmounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the mount point +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5funmount_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! at which the specified file + ! is to be unmounted + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5funmount_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5funmount_c(loc_id, name, namelen) + + END SUBROUTINE h5funmount_f +!****s* H5F/h5fopen_f +! +! NAME +! h5fopen_f +! +! PURPOSE +! Opens HDF5 file. +! +! INPUTS +! name - name of the file to acecss +! access_flags - File access flags. Allowable values are: +! H5F_ACC_RDWR_F +! H5F_ACC_RDONLY_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5fopen_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + END SUBROUTINE h5fopen_f +!****s* H5F/h5freopen_f +! +! NAME +! h5freopen_f +! +! PURPOSE +! Reopens HDF5 file. +! +! INPUTS +! file_id - identifier of a file for which an +! additional identifier is required +! OUTPUTS +! ret_file_id - new file identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: ret_file_id + END FUNCTION h5freopen_c + END INTERFACE + + hdferr = h5freopen_c(file_id, ret_file_id) + + END SUBROUTINE h5freopen_f +!****s* H5F/h5fget_create_plist_f +! +! NAME +! h5fget_create_plist_f +! +! PURPOSE +! Returns a file creation property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! prop_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: prop_id + END FUNCTION h5fget_create_plist_c + END INTERFACE + + hdferr = h5fget_create_plist_c(file_id, prop_id) + + END SUBROUTINE h5fget_create_plist_f +!****s* H5F/h5fget_access_plist_f +! +! NAME +! h5fget_access_plist_f +! +! PURPOSE +! Returns a file access property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! access_id - access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: access_id + END FUNCTION h5fget_access_plist_c + END INTERFACE + + hdferr = h5fget_access_plist_c(file_id, access_id) + + END SUBROUTINE h5fget_access_plist_f + +!****s* H5F/h5fis_hdf5_f +! +! NAME +! h5fis_hdf5_f +! +! PURPOSE +! Determines whether a file is in the HDF5 format. +! +! INPUTS +! name - name of the file to check +! OUTPUTS +! status - indicates if file is and HDF5 file +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fis_hdf5_f(name, status, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + LOGICAL, INTENT(OUT) :: status ! Indicates if file + ! is an HDF5 file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: flag ! "TRUE/FALSE" flag from C routine + ! to define status value. + + INTERFACE + INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER :: flag + END FUNCTION h5fis_hdf5_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5fis_hdf5_c(name, namelen, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5fis_hdf5_f +!****s* H5F/h5fclose_f +! +! NAME +! h5fclose_f +! +! PURPOSE +! Closes HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fclose_f(file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fclose_c(file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + END FUNCTION h5fclose_c + END INTERFACE + + hdferr = h5fclose_c(file_id) + + END SUBROUTINE h5fclose_f + +!****s* H5F/h5fget_obj_count_f +! +! NAME +! h5fget_obj_count_f +! +! PURPOSE +! Gets number of the objects open within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_count - number of open objects +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Changed the type of obj_count to INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + END FUNCTION h5fget_obj_count_c + END INTERFACE + + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) + + END SUBROUTINE h5fget_obj_count_f + +!****s* H5F/h5fget_obj_ids_f +! +! NAME +! h5fget_obj_ids_f +! +! PURPOSE +! Get list of open objects identifiers within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_ids - array of open object identifiers +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! num_objs - number of open objects +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Added optional parameter num_objs for number of open objects +! of the specified type and changed type of max_obj to +! INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + ! Array of open objects iidentifiers + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects +!***** + INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type + + INTERFACE + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(IN) :: max_objs + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs + END FUNCTION h5fget_obj_ids_c + END INTERFACE + + hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + IF (PRESENT(num_objs)) num_objs= c_num_objs + + END SUBROUTINE h5fget_obj_ids_f +!****s* H5F/h5fget_freespace_f +! +! NAME +! h5fget_freespace_f +! +! PURPOSE +! Get amount of free space within a file +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! free_space - amount of free space in file +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Quincey Koziol +! October 7, 2003 +! +! SOURCE + SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + ! amount of free space in file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + END FUNCTION h5fget_freespace_c + END INTERFACE + + hdferr = h5fget_freespace_c(file_id, free_space) + + END SUBROUTINE h5fget_freespace_f +!****s* H5F/h5fget_name_f +! +! NAME +! h5fget_name_f +! +! PURPOSE +! Gets the name of the file from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! buf - buffer to store the read name +! size - actual size of the name +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! July 6, 2004 +! +! SOURCE + SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(INOUT) :: buf + ! Buffer to hold file name + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTEGER(SIZE_T) :: buflen + + INTERFACE + INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER(SIZE_T) :: buflen + CHARACTER(LEN=*), INTENT(OUT) :: buf + END FUNCTION h5fget_name_c + END INTERFACE + buflen = LEN_TRIM(buf) + hdferr = h5fget_name_c(obj_id, size, buf, buflen) + END SUBROUTINE h5fget_name_f +!****s* H5F/h5fget_filesize_f +! +! NAME +! h5fget_filesize_f +! +! PURPOSE +! Retrieves the file size of the HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! size - file size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! July 7, 2004 +! +! SOURCE + SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5fget_filesize_c(file_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5fget_filesize_c + END INTERFACE + hdferr = h5fget_filesize_c(file_id, size) + END SUBROUTINE h5fget_filesize_f + +!****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 PARAMETERS +! buf_size - Returns the size in bytes of the buffer required to store the file image, +! no data will be copied. +! +! 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 , INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size +!***** + + INTEGER(SIZE_T) :: buf_size_default + + INTERFACE + INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + USE H5GLOBAL + 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 diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 deleted file mode 100644 index 53df8c5..0000000 --- a/fortran/src/H5Fff.f90 +++ /dev/null @@ -1,894 +0,0 @@ -!****h* ROBODoc/H5F -! -! NAME -! MODULE H5F -! -! FILE -! H5Fff.f90 -! -! PURPOSE -! This file contains Fortran 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 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. -! -!***** - -MODULE H5F - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -CONTAINS -!****s* H5F/h5fcreate_f -! -! NAME -! h5fcreate_f -! -! PURPOSE -! Creates HDF5 files. -! -! INPUTS -! name - name of the file to create -! access_flags - File access flags. Allowable values are: -! H5F_ACC_TRUNC_F -! H5F_ACC_EXCL_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & - creation_prp, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp - ! File creation propertly - ! list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: creation_prp_default - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(OUT) :: file_id - INTEGER(HID_T), INTENT(IN) :: creation_prp_default - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fcreate_c - END INTERFACE - - creation_prp_default = H5P_DEFAULT_F - access_prp_default = H5P_DEFAULT_F - - IF (PRESENT(creation_prp)) creation_prp_default = creation_prp - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - - END SUBROUTINE h5fcreate_f -!****s* H5F/h5fflush_f -! -! NAME -! h5fflush_f -! -! PURPOSE -! Flushes all buffers associated WITH a file to disk -! -! INPUTS -! object_id - identifier of object used to identify the file. -! scope - specifies the scope of the flushing action. -! Possible values are: -! H5F_SCOPE_GLOBAL_F -! H5F_SCOPE_LOCAL_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fflush_f(object_id, scope, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object - !associate with a file, - !including the file itself, - !a dataset, a group, an - !attribute, or a named - !data type - - INTEGER, INTENT(IN) :: scope !scope of the flushing - !action, possible values - !are: H5F_SCOPE_GLOBAL_F - ! which flushes the entire - !virtual file, - !and H5F_SCOPE_LOCAL_F - !which flushes only the - !specified file. - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fflush_c(object_id, scope) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: scope - END FUNCTION h5fflush_c - END INTERFACE - - hdferr = h5fflush_c(object_id, scope) - - END SUBROUTINE h5fflush_f -!****s* H5F/h5fmount_f -! -! NAME -! h5fmount_f -! -! PURPOSE -! Mounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the group onto which the file -! specified by child_id is to be mounted. -! child_id - the identifier of the file to be mounted. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - the identifier of the property list to be used -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! in which dsetname is defined - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the - ! file to be mounted - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & - child_id, access_prp_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN) :: child_id - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fmount_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) - - END SUBROUTINE h5fmount_f - -!****s* H5F/h5funmount_f -! -! NAME -! h5funmount_f -! -! PURPOSE -! Unmounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the mount point -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5funmount_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! at which the specified file - ! is to be unmounted - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5funmount_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5funmount_c(loc_id, name, namelen) - - END SUBROUTINE h5funmount_f -!****s* H5F/h5fopen_f -! -! NAME -! h5fopen_f -! -! PURPOSE -! Opens HDF5 file. -! -! INPUTS -! name - name of the file to acecss -! access_flags - File access flags. Allowable values are: -! H5F_ACC_RDWR_F -! H5F_ACC_RDONLY_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5fopen_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - END SUBROUTINE h5fopen_f -!****s* H5F/h5freopen_f -! -! NAME -! h5freopen_f -! -! PURPOSE -! Reopens HDF5 file. -! -! INPUTS -! file_id - identifier of a file for which an -! additional identifier is required -! OUTPUTS -! ret_file_id - new file identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: ret_file_id - END FUNCTION h5freopen_c - END INTERFACE - - hdferr = h5freopen_c(file_id, ret_file_id) - - END SUBROUTINE h5freopen_f -!****s* H5F/h5fget_create_plist_f -! -! NAME -! h5fget_create_plist_f -! -! PURPOSE -! Returns a file creation property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! prop_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: prop_id - END FUNCTION h5fget_create_plist_c - END INTERFACE - - hdferr = h5fget_create_plist_c(file_id, prop_id) - - END SUBROUTINE h5fget_create_plist_f -!****s* H5F/h5fget_access_plist_f -! -! NAME -! h5fget_access_plist_f -! -! PURPOSE -! Returns a file access property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! access_id - access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: access_id - END FUNCTION h5fget_access_plist_c - END INTERFACE - - hdferr = h5fget_access_plist_c(file_id, access_id) - - END SUBROUTINE h5fget_access_plist_f - -!****s* H5F/h5fis_hdf5_f -! -! NAME -! h5fis_hdf5_f -! -! PURPOSE -! Determines whether a file is in the HDF5 format. -! -! INPUTS -! name - name of the file to check -! OUTPUTS -! status - indicates if file is and HDF5 file -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fis_hdf5_f(name, status, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - LOGICAL, INTENT(OUT) :: status ! Indicates if file - ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: flag ! "TRUE/FALSE" flag from C routine - ! to define status value. - - INTERFACE - INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER :: flag - END FUNCTION h5fis_hdf5_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5fis_hdf5_c(name, namelen, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5fis_hdf5_f -!****s* H5F/h5fclose_f -! -! NAME -! h5fclose_f -! -! PURPOSE -! Closes HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fclose_f(file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fclose_c(file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - END FUNCTION h5fclose_c - END INTERFACE - - hdferr = h5fclose_c(file_id) - - END SUBROUTINE h5fclose_f - -!****s* H5F/h5fget_obj_count_f -! -! NAME -! h5fget_obj_count_f -! -! PURPOSE -! Gets number of the objects open within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_count - number of open objects -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Changed the type of obj_count to INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - END FUNCTION h5fget_obj_count_c - END INTERFACE - - hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) - - END SUBROUTINE h5fget_obj_count_f - -!****s* H5F/h5fget_obj_ids_f -! -! NAME -! h5fget_obj_ids_f -! -! PURPOSE -! Get list of open objects identifiers within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_ids - array of open object identifiers -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! num_objs - number of open objects -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Added optional parameter num_objs for number of open objects -! of the specified type and changed type of max_obj to -! INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - ! Array of open objects iidentifiers - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects -!***** - INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type - - INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type - INTEGER(SIZE_T), INTENT(IN) :: max_objs - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs - END FUNCTION h5fget_obj_ids_c - END INTERFACE - - hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - IF (PRESENT(num_objs)) num_objs= c_num_objs - - END SUBROUTINE h5fget_obj_ids_f -!****s* H5F/h5fget_freespace_f -! -! NAME -! h5fget_freespace_f -! -! PURPOSE -! Get amount of free space within a file -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! free_space - amount of free space in file -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Quincey Koziol -! October 7, 2003 -! -! SOURCE - SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - ! amount of free space in file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - END FUNCTION h5fget_freespace_c - END INTERFACE - - hdferr = h5fget_freespace_c(file_id, free_space) - - END SUBROUTINE h5fget_freespace_f -!****s* H5F/h5fget_name_f -! -! NAME -! h5fget_name_f -! -! PURPOSE -! Gets the name of the file from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! buf - buffer to store the read name -! size - actual size of the name -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! July 6, 2004 -! -! SOURCE - SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Buffer to hold file name - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTEGER(SIZE_T) :: buflen - - INTERFACE - INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(SIZE_T), INTENT(OUT) :: size - INTEGER(SIZE_T) :: buflen - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5fget_name_c - END INTERFACE - buflen = LEN_TRIM(buf) - hdferr = h5fget_name_c(obj_id, size, buf, buflen) - END SUBROUTINE h5fget_name_f -!****s* H5F/h5fget_filesize_f -! -! NAME -! h5fget_filesize_f -! -! PURPOSE -! Retrieves the file size of the HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! size - file size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! July 7, 2004 -! -! SOURCE - SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5fget_filesize_c(file_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5fget_filesize_c - END INTERFACE - hdferr = h5fget_filesize_c(file_id, size) - END SUBROUTINE h5fget_filesize_f - -!****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 PARAMETERS -! buf_size - Returns the size in bytes of the buffer required to store the file image, -! no data will be copied. -! -! 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 , INTENT(OUT) :: hdferr - INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size -!***** - - INTEGER(SIZE_T) :: buf_size_default - - INTERFACE - INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - USE H5GLOBAL - 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 diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 new file mode 100644 index 0000000..d4d7496 --- /dev/null +++ b/fortran/src/H5Gff.F90 @@ -0,0 +1,1331 @@ +!****h* ROBODoc/H5G +! +! NAME +! MODULE H5G +! +! FILE +! fortran/src/H5Gff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5G 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 H5G 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 H5G + USE H5GLOBAL + +! PRIVATE :: h5gcreate1_f +! PRIVATE :: h5gcreate2_f + +! INTERFACE h5gcreate_f +! MODULE PROCEDURE h5gcreate1_f +! MODULE PROCEDURE h5gcreate2_f +! END INTERFACE + +CONTAINS + +!****s* H5G/h5gcreate_f +! +! NAME +! h5gcreate_f +! +! PURPOSE +! Creates a new group. +! +! INPUTS +! loc_id - location identifier +! name - group name at the specified location +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! size_hint - a parameter indicating the number of bytes to +! reserve for the names that will appear in the group +! lcpl_id - Property list for link creation +! gcpl_id - Property list for group creation +! gapl_id - Property list for group access +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added additional optional paramaters in 1.8 +! MSB - February 27, 2008 +! +! SOURCE + SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint + ! Parameter indicating + ! the number of bytes + ! to reserve for the + ! names that will appear + ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F + ! if using any of the optional + ! parameters lcpl_id, gcpl_id, and/or gapl_id when not + ! using keywords in specifying the optional parameters + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTEGER :: namelen ! Length of the name character string + INTEGER(SIZE_T) :: size_hint_default + + INTERFACE + INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & + size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T) :: size_hint_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + END FUNCTION h5gcreate_c + END INTERFACE + + size_hint_default = OBJECT_NAMELEN_DEFAULT_F + IF (PRESENT(size_hint)) size_hint_default = size_hint + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + gcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + + hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & + lcpl_id_default, gcpl_id_default, gapl_id_default) + + END SUBROUTINE h5gcreate_f + +!!$! +!!$!****s* H5G/ +!!$! +!!$! NAME +!!$! h5gcreate2_f +!!$! +!!$! PURPOSE +!!$! Creates a new group. +!!$! +!!$! INPUTS +!!$! loc_id - location identifier +!!$! name - group name at the specified location +!!$! OUTPUTS +!!$! grp_id - group identifier +!!$! hdferr: - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! +!!$! lcpl_id - Property list for link creation +!!$! gcpl_id - Property list for group creation +!!$! gapl_id - Property list for group access +!!$! +!!$! AUTHOR M. Scot Breitenfeld +!!$! February 27, 2008 +!!$! +!!$! HISTORY +!!$! +!!$! NOTES Needed to switch the first 2 arguments to avoid conflect +!!$! with h5gcreate1_f +!!$! +!!$ +!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & +!!$ lcpl_id, gcpl_id, gapl_id) +!!$ IMPLICIT NONE +!!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier +!!$ +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!!$ +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT ! Dummy argument to pass to c call +!!$ INTEGER :: namelen ! Length of the name character string +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & +!!$ OBJECT_NAME +! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c +!!$ !DEC$ENDIF +!!$ !DEC$ATTRIBUTES reference :: name +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(LEN=*), INTENT(IN) :: name +!!$ INTEGER :: namelen +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id +!!$ END FUNCTION h5gcreate_c +!!$ END INTERFACE +!!$ +!!$ namelen = LEN(name) +!!$ OBJECT_NAME +! LEN_DEFAULT = OBJECT_NAME +! LEN_DEFAULT_F +!!$ +!!$ lcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id +!!$ gcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id +!!$ gapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id +!!$ +!!$ +!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME +! LEN_DEFAULT, grp_id, & +!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ +!!$ END SUBROUTINE h5gcreate2_f + +! +!****s* H5G/h5gopen_f +! +! NAME +! h5gopen_f +! +! PURPOSE +! Opens an existing group. +! +! INPUTS +! loc_id - location identifier +! name - name of the group to open +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gapl_id - Group access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added 1.8 (optional) parameter gapl_id +! February, 2008 M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier +!***** + INTEGER(HID_T) :: gapl_id_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: gapl_id_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + END FUNCTION h5gopen_c + END INTERFACE + + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + + END SUBROUTINE h5gopen_f +! +!****s* H5G/h5gclose_f +! +! NAME +! h5gclose_f +! +! PURPOSE +! Closes the specified group. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gclose_f(grp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gclose_c(grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + END FUNCTION h5gclose_c + END INTERFACE + + hdferr = h5gclose_c(grp_id) + + END SUBROUTINE h5gclose_f +! +!****s* H5G/h5gget_obj_info_idx_f +! +! NAME +! h5gget_obj_info_idx_f +! +! PURPOSE +! Returns name and type of the group member identified by +! its index. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! idx - object index (zero-based) +! OUTPUTS +! obj_name - object name +! obj_type - object type +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & + obj_name, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(IN) :: idx ! Index of member object + CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object + INTEGER, INTENT(OUT) :: obj_type ! Object type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: obj_namelen ! Length of the obj_name character string + + INTERFACE + INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & + namelen, idx, & + obj_name, obj_namelen, obj_type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: idx + CHARACTER(LEN=*), INTENT(OUT) :: obj_name + INTEGER :: obj_namelen + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5gget_obj_info_idx_c + END INTERFACE + + namelen = LEN(name) + obj_namelen = LEN(obj_name) + hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & + obj_name, obj_namelen, obj_type) + END SUBROUTINE h5gget_obj_info_idx_f + +! +!****s* H5G/h5gn_members_f +! +! NAME +! h5gn_members_f +! +! PURPOSE +! Returns the number of group members. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! OUTPUTS +! nmembers - number of group members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(OUT) :: nmembers ! Number of members in the + ! group + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(OUT) :: nmembers + END FUNCTION h5gn_members_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) + + END SUBROUTINE h5gn_members_f +! +!****s* H5G/h5glink_f +! +! NAME +! h5glink_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. +! +! INPUTS +! loc_id - location identifier +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! current_name - name of the existing object if link is a +! hard link. Can be anything for the soft link +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5glink_f(loc_id, link_type, current_name, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + CHARACTER(LEN=*), INTENT(IN) :: current_name + ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: current_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: current_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: current_name + INTEGER :: current_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5glink_c + END INTERFACE + + current_namelen = LEN(current_name) + new_namelen = LEN(new_name) + hdferr = h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + END SUBROUTINE h5glink_f + +! +!****s* H5G/h5glink2_f +! +! NAME +! h5glink2_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. current_name and new_name are interpreted +! releative to current and new location identifiers. +! +! INPUTS +! cur_loc_id - location identifier +! cur_name - name of the existing object if link is a +! hard link. Can be anything for the soft link. +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! new_loc_id - new location identifier +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: cur_name + ! Current name of an object + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: cur_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & + link_type, new_loc_id, & + new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: cur_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: cur_loc_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: cur_name + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: cur_namelen + INTEGER :: new_namelen + END FUNCTION h5glink2_c + END INTERFACE + + cur_namelen = LEN(cur_name) + new_namelen = LEN(new_name) + hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & + new_loc_id, new_name, new_namelen) + END SUBROUTINE h5glink2_f + +! +!****s* H5G/h5gunlink_f +! +! NAME +! h5gunlink_f +! +! PURPOSE +! Removes the specified name from the group graph and +! decrements the link count for the object to which name +! points +! +! INPUTS +! loc_id - location identifier +! name - name of the object to unlink +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gunlink_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the name character string + + INTERFACE + INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5gunlink_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gunlink_c(loc_id, name, namelen) + END SUBROUTINE h5gunlink_f + +! +!****s* H5G/h5gmove_f +! +! NAME +! h5gmove_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! loc_id - location identifier +! name - object's name at specified location +! new_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5gmove_c + END INTERFACE + + namelen = LEN(name) + new_namelen = LEN(new_name) + hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + END SUBROUTINE h5gmove_f +! +!****s* H5G/h5gmove2_f +! +! NAME +! h5gmove2_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! src_loc_id - original location identifier +! src_name - object's name at specified original location +! dst_loc_id - original location identifier +! dst_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object + INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: src_namelen ! Length of the current_name string + INTEGER :: dst_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & + dst_loc_id, dst_name, dst_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name + !DEC$ATTRIBUTES reference :: dst_name + INTEGER(HID_T), INTENT(IN) :: src_loc_id + INTEGER(HID_T), INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER :: src_namelen + INTEGER :: dst_namelen + END FUNCTION h5gmove2_c + END INTERFACE + + src_namelen = LEN(src_name) + dst_namelen = LEN(dst_name) + hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) + END SUBROUTINE h5gmove2_f +! +!****s* H5G/h5gget_linkval_f +! +! NAME +! h5gget_linkval_f +! +! PURPOSE +! Returns the name of the object that the symbolic link +! points to. +! +! INPUTS +! loc_id - location identifier +! name - symbolic link to the object whose name +! is to be returned. +! size - maximum number of characters to be returned +! OUTPUTS +! buffer - a buffer to hold the name of the object +! being sought +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a name of + ! the object symbolic link + ! points to + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_linkval_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) + END SUBROUTINE h5gget_linkval_f + +! +!****s* H5G/h5gset_comment_f +! +! NAME +! h5gset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object +! comment - comment to set for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: commentlen ! Lenghth of the comment string + + INTERFACE + INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & + comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER :: commentlen + END FUNCTION h5gset_comment_c + END INTERFACE + + namelen = LEN(name) + commentlen = LEN(comment) + hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) + END SUBROUTINE h5gset_comment_f +! +!****s* H5G/h5gget_comment_f +! +! NAME +! h5gget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object at specified location +! size - size of the buffer required to hold comment +! OUTPUTS +! buffer - buffer to hold object's comment +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a comment + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_comment_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) + + END SUBROUTINE h5gget_comment_f +! +!****s* H5G/H5Gcreate_anon_f +! +! NAME +! H5Gcreate_anon_f +! +! PURPOSE +! Creates a new empty group without linking it into the file structure. +! +! INPUTS +! loc_id - Location identifier +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gcpl_id - Group creation property list identifier +! gapl_id - Group access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTERFACE + INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation + INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + END FUNCTION h5gcreate_anon_c + END INTERFACE + + gcpl_id_default = H5P_DEFAULT_F + gapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + + END SUBROUTINE h5Gcreate_anon_f +! +!****s* H5G/H5Gget_create_plist_f +! +! NAME +! H5Gget_create_plist_f +! +! PURPOSE +! Gets a group creation property list identifier. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! gcpl_id - Group creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER(HID_T), INTENT(OUT) :: gcpl_id + END FUNCTION h5gget_create_plist_c + END INTERFACE + + hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) + + END SUBROUTINE h5gget_create_plist_f + +! +!****s* H5G/h5gget_info_f +! +! NAME +! h5gget_info_f +! +! PURPOSE +! Retrieves information about a group +! +! INPUTS +! group_id - Group identifier +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! mounted - Whether group has a file mounted on it +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! HISTORY +! +! - Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + + INTERFACE + INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER :: mounted_c + END FUNCTION h5gget_info_c + END INTERFACE + + hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_f +! +!****s* H5G/h5gget_info_by_idx_f +! +! NAME +! h5gget_info_by_idx_f +! +! PURPOSE +! Retrieves information about a group, according to the group’s position within an index. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! index_type - Index type +! order - Order of the count in the index +! n - Position in the index of the group for which information is retrieved +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + INTEGER, INTENT(IN) :: index_type ! Index type + INTEGER, INTENT(IN) :: order ! Order of the count in the index + INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c + !DEC$ENDIF + + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_idx_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & + index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_idx_f +! +!****s* H5G/h5gget_info_by_name_f +! +! NAME +! h5gget_info_by_name_f +! +! PURPOSE +! Retrieves information about a group. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! +! OUTPUTS +! +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! SOURCE + SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_name_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_name_f + +END MODULE H5G diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90 deleted file mode 100644 index d4d7496..0000000 --- a/fortran/src/H5Gff.f90 +++ /dev/null @@ -1,1331 +0,0 @@ -!****h* ROBODoc/H5G -! -! NAME -! MODULE H5G -! -! FILE -! fortran/src/H5Gff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5G 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 H5G 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 H5G - USE H5GLOBAL - -! PRIVATE :: h5gcreate1_f -! PRIVATE :: h5gcreate2_f - -! INTERFACE h5gcreate_f -! MODULE PROCEDURE h5gcreate1_f -! MODULE PROCEDURE h5gcreate2_f -! END INTERFACE - -CONTAINS - -!****s* H5G/h5gcreate_f -! -! NAME -! h5gcreate_f -! -! PURPOSE -! Creates a new group. -! -! INPUTS -! loc_id - location identifier -! name - group name at the specified location -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! size_hint - a parameter indicating the number of bytes to -! reserve for the names that will appear in the group -! lcpl_id - Property list for link creation -! gcpl_id - Property list for group creation -! gapl_id - Property list for group access -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added additional optional paramaters in 1.8 -! MSB - February 27, 2008 -! -! SOURCE - SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint - ! Parameter indicating - ! the number of bytes - ! to reserve for the - ! names that will appear - ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F - ! if using any of the optional - ! parameters lcpl_id, gcpl_id, and/or gapl_id when not - ! using keywords in specifying the optional parameters - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTEGER :: namelen ! Length of the name character string - INTEGER(SIZE_T) :: size_hint_default - - INTERFACE - INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & - size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T) :: size_hint_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - END FUNCTION h5gcreate_c - END INTERFACE - - size_hint_default = OBJECT_NAMELEN_DEFAULT_F - IF (PRESENT(size_hint)) size_hint_default = size_hint - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - gcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - - hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & - lcpl_id_default, gcpl_id_default, gapl_id_default) - - END SUBROUTINE h5gcreate_f - -!!$! -!!$!****s* H5G/ -!!$! -!!$! NAME -!!$! h5gcreate2_f -!!$! -!!$! PURPOSE -!!$! Creates a new group. -!!$! -!!$! INPUTS -!!$! loc_id - location identifier -!!$! name - group name at the specified location -!!$! OUTPUTS -!!$! grp_id - group identifier -!!$! hdferr: - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! -!!$! lcpl_id - Property list for link creation -!!$! gcpl_id - Property list for group creation -!!$! gapl_id - Property list for group access -!!$! -!!$! AUTHOR M. Scot Breitenfeld -!!$! February 27, 2008 -!!$! -!!$! HISTORY -!!$! -!!$! NOTES Needed to switch the first 2 arguments to avoid conflect -!!$! with h5gcreate1_f -!!$! -!!$ -!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & -!!$ lcpl_id, gcpl_id, gapl_id) -!!$ IMPLICIT NONE -!!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier -!!$ -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!!$ -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT ! Dummy argument to pass to c call -!!$ INTEGER :: namelen ! Length of the name character string -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & -!!$ OBJECT_NAME -! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c -!!$ !DEC$ENDIF -!!$ !DEC$ATTRIBUTES reference :: name -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(LEN=*), INTENT(IN) :: name -!!$ INTEGER :: namelen -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id -!!$ END FUNCTION h5gcreate_c -!!$ END INTERFACE -!!$ -!!$ namelen = LEN(name) -!!$ OBJECT_NAME -! LEN_DEFAULT = OBJECT_NAME -! LEN_DEFAULT_F -!!$ -!!$ lcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id -!!$ gcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id -!!$ gapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id -!!$ -!!$ -!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME -! LEN_DEFAULT, grp_id, & -!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ -!!$ END SUBROUTINE h5gcreate2_f - -! -!****s* H5G/h5gopen_f -! -! NAME -! h5gopen_f -! -! PURPOSE -! Opens an existing group. -! -! INPUTS -! loc_id - location identifier -! name - name of the group to open -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gapl_id - Group access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added 1.8 (optional) parameter gapl_id -! February, 2008 M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier -!***** - INTEGER(HID_T) :: gapl_id_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: gapl_id_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - END FUNCTION h5gopen_c - END INTERFACE - - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - - END SUBROUTINE h5gopen_f -! -!****s* H5G/h5gclose_f -! -! NAME -! h5gclose_f -! -! PURPOSE -! Closes the specified group. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gclose_f(grp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gclose_c(grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - END FUNCTION h5gclose_c - END INTERFACE - - hdferr = h5gclose_c(grp_id) - - END SUBROUTINE h5gclose_f -! -!****s* H5G/h5gget_obj_info_idx_f -! -! NAME -! h5gget_obj_info_idx_f -! -! PURPOSE -! Returns name and type of the group member identified by -! its index. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! idx - object index (zero-based) -! OUTPUTS -! obj_name - object name -! obj_type - object type -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & - obj_name, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(IN) :: idx ! Index of member object - CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object - INTEGER, INTENT(OUT) :: obj_type ! Object type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: obj_namelen ! Length of the obj_name character string - - INTERFACE - INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & - namelen, idx, & - obj_name, obj_namelen, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: idx - CHARACTER(LEN=*), INTENT(OUT) :: obj_name - INTEGER :: obj_namelen - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5gget_obj_info_idx_c - END INTERFACE - - namelen = LEN(name) - obj_namelen = LEN(obj_name) - hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & - obj_name, obj_namelen, obj_type) - END SUBROUTINE h5gget_obj_info_idx_f - -! -!****s* H5G/h5gn_members_f -! -! NAME -! h5gn_members_f -! -! PURPOSE -! Returns the number of group members. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! OUTPUTS -! nmembers - number of group members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(OUT) :: nmembers ! Number of members in the - ! group - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(OUT) :: nmembers - END FUNCTION h5gn_members_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) - - END SUBROUTINE h5gn_members_f -! -!****s* H5G/h5glink_f -! -! NAME -! h5glink_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. -! -! INPUTS -! loc_id - location identifier -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! current_name - name of the existing object if link is a -! hard link. Can be anything for the soft link -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5glink_f(loc_id, link_type, current_name, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - CHARACTER(LEN=*), INTENT(IN) :: current_name - ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: current_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: current_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: current_name - INTEGER :: current_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5glink_c - END INTERFACE - - current_namelen = LEN(current_name) - new_namelen = LEN(new_name) - hdferr = h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - END SUBROUTINE h5glink_f - -! -!****s* H5G/h5glink2_f -! -! NAME -! h5glink2_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. current_name and new_name are interpreted -! releative to current and new location identifiers. -! -! INPUTS -! cur_loc_id - location identifier -! cur_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! new_loc_id - new location identifier -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: cur_name - ! Current name of an object - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: cur_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & - link_type, new_loc_id, & - new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: cur_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: cur_loc_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: cur_name - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: cur_namelen - INTEGER :: new_namelen - END FUNCTION h5glink2_c - END INTERFACE - - cur_namelen = LEN(cur_name) - new_namelen = LEN(new_name) - hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & - new_loc_id, new_name, new_namelen) - END SUBROUTINE h5glink2_f - -! -!****s* H5G/h5gunlink_f -! -! NAME -! h5gunlink_f -! -! PURPOSE -! Removes the specified name from the group graph and -! decrements the link count for the object to which name -! points -! -! INPUTS -! loc_id - location identifier -! name - name of the object to unlink -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gunlink_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the name character string - - INTERFACE - INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5gunlink_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gunlink_c(loc_id, name, namelen) - END SUBROUTINE h5gunlink_f - -! -!****s* H5G/h5gmove_f -! -! NAME -! h5gmove_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! loc_id - location identifier -! name - object's name at specified location -! new_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5gmove_c - END INTERFACE - - namelen = LEN(name) - new_namelen = LEN(new_name) - hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - END SUBROUTINE h5gmove_f -! -!****s* H5G/h5gmove2_f -! -! NAME -! h5gmove2_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! src_loc_id - original location identifier -! src_name - object's name at specified original location -! dst_loc_id - original location identifier -! dst_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object - INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: src_namelen ! Length of the current_name string - INTEGER :: dst_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & - dst_loc_id, dst_name, dst_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name - !DEC$ATTRIBUTES reference :: dst_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - INTEGER(HID_T), INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER :: src_namelen - INTEGER :: dst_namelen - END FUNCTION h5gmove2_c - END INTERFACE - - src_namelen = LEN(src_name) - dst_namelen = LEN(dst_name) - hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) - END SUBROUTINE h5gmove2_f -! -!****s* H5G/h5gget_linkval_f -! -! NAME -! h5gget_linkval_f -! -! PURPOSE -! Returns the name of the object that the symbolic link -! points to. -! -! INPUTS -! loc_id - location identifier -! name - symbolic link to the object whose name -! is to be returned. -! size - maximum number of characters to be returned -! OUTPUTS -! buffer - a buffer to hold the name of the object -! being sought -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a name of - ! the object symbolic link - ! points to - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_linkval_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) - END SUBROUTINE h5gget_linkval_f - -! -!****s* H5G/h5gset_comment_f -! -! NAME -! h5gset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object -! comment - comment to set for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: commentlen ! Lenghth of the comment string - - INTERFACE - INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & - comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER :: commentlen - END FUNCTION h5gset_comment_c - END INTERFACE - - namelen = LEN(name) - commentlen = LEN(comment) - hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) - END SUBROUTINE h5gset_comment_f -! -!****s* H5G/h5gget_comment_f -! -! NAME -! h5gget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object at specified location -! size - size of the buffer required to hold comment -! OUTPUTS -! buffer - buffer to hold object's comment -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a comment - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_comment_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) - - END SUBROUTINE h5gget_comment_f -! -!****s* H5G/H5Gcreate_anon_f -! -! NAME -! H5Gcreate_anon_f -! -! PURPOSE -! Creates a new empty group without linking it into the file structure. -! -! INPUTS -! loc_id - Location identifier -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gcpl_id - Group creation property list identifier -! gapl_id - Group access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTERFACE - INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation - INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - END FUNCTION h5gcreate_anon_c - END INTERFACE - - gcpl_id_default = H5P_DEFAULT_F - gapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - - END SUBROUTINE h5Gcreate_anon_f -! -!****s* H5G/H5Gget_create_plist_f -! -! NAME -! H5Gget_create_plist_f -! -! PURPOSE -! Gets a group creation property list identifier. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! gcpl_id - Group creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - INTEGER(HID_T), INTENT(OUT) :: gcpl_id - END FUNCTION h5gget_create_plist_c - END INTERFACE - - hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) - - END SUBROUTINE h5gget_create_plist_f - -! -!****s* H5G/h5gget_info_f -! -! NAME -! h5gget_info_f -! -! PURPOSE -! Retrieves information about a group -! -! INPUTS -! group_id - Group identifier -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! mounted - Whether group has a file mounted on it -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! HISTORY -! -! - Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - - INTERFACE - INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - INTEGER :: mounted_c - END FUNCTION h5gget_info_c - END INTERFACE - - hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_f -! -!****s* H5G/h5gget_info_by_idx_f -! -! NAME -! h5gget_info_by_idx_f -! -! PURPOSE -! Retrieves information about a group, according to the group’s position within an index. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! index_type - Index type -! order - Order of the count in the index -! n - Position in the index of the group for which information is retrieved -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - INTEGER, INTENT(IN) :: index_type ! Index type - INTEGER, INTENT(IN) :: order ! Order of the count in the index - INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c - !DEC$ENDIF - - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_idx_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & - index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_idx_f -! -!****s* H5G/h5gget_info_by_name_f -! -! NAME -! h5gget_info_by_name_f -! -! PURPOSE -! Retrieves information about a group. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! -! OUTPUTS -! -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! SOURCE - SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_name_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_name_f - -END MODULE H5G diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 new file mode 100644 index 0000000..7c9a843 --- /dev/null +++ b/fortran/src/H5Iff.F90 @@ -0,0 +1,352 @@ +!****h* ROBODoc/H5I +! +! NAME +! MODULE H5I +! +! FILE +! fortran/src/H5Iff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5I 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 H5I 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 H5I + + USE H5GLOBAL + +CONTAINS + +!****s* H5I/h5iget_type_f +! +! NAME +! h5iget_type_f +! +! PURPOSE +! Retrieves the type of an object. +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! type - type of the object, possible values: +! H5I_FILE_F +! H5I_GROUP_F +! H5I_DATATYPE_F +! H5I_DATASPACE_F +! H5I_DATASET_F +! H5I_ATTR_F +! H5I_BADID_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: TYPE ! type of an object. + ! possible values are: + ! H5I_FILE_F + ! H5I_GROUP_F + ! H5I_DATATYPE_F + ! H5I_DATASPACE_F + ! H5I_DATASET_F + ! H5I_ATTR_F + ! H5I_BADID_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5iget_type_c + END INTERFACE + hdferr = h5iget_type_c(obj_id, TYPE) + END SUBROUTINE h5iget_type_f + +!****s* H5I/h5iget_name_f +! +! NAME +! h5iget_name_f +! +! PURPOSE +! Gets a name of an object specified by its idetifier. +! +! INPUTS +! obj_id - attribute identifier +! buf_size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in, name will be truncated if +! buffer is not big enough +! name_size - name size +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! SOURCE + SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name + INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 if successful, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(IN) :: buf_size + INTEGER(SIZE_T), INTENT(OUT) :: name_size + END FUNCTION h5iget_name_c + END INTERFACE + + hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) + END SUBROUTINE h5iget_name_f + +!****s* H5I/h5iinc_ref_f +! +! NAME +! h5iinc_ref_f +! +! PURPOSE +! Increments the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iinc_ref_c + END INTERFACE + hdferr = h5iinc_ref_c(obj_id, ref_count) + END SUBROUTINE h5iinc_ref_f + +!****s* H5I/h5idec_ref_f +! +! NAME +! h5idec_ref_f +! +! PURPOSE +! Decrements the reference count of an ID +! +! INPUTS +! obj_id - Object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - Error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5idec_ref_c + END INTERFACE + hdferr = h5idec_ref_c(obj_id, ref_count) + END SUBROUTINE h5idec_ref_f + +!****s* H5I/h5iget_ref_f +! NAME +! h5iget_ref_f +! +! PURPOSE +! Retrieves the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iget_ref_c + END INTERFACE + hdferr = h5iget_ref_c(obj_id, ref_count) + END SUBROUTINE h5iget_ref_f +! +!****s* H5I/h5iget_file_id_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Obtains file identifier from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! file_id - file identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 23, 2004 +! SOURCE + SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5iget_file_id_c + END INTERFACE + hdferr = h5iget_file_id_c(obj_id, file_id) + END SUBROUTINE h5iget_file_id_f +! +!****s* H5I/h5iis_valid_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Check if an ID is valid without producing an error message +! +! INPUTS +! id - identifier +! OUTPUTS +! valid - status of id as a valid identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! SOURCE + SUBROUTINE h5iis_valid_f(id, valid, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_valid ! 0 = .false, 1 = .true. + + INTERFACE + INTEGER FUNCTION h5iis_valid_c(id, c_valid) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER :: c_valid + END FUNCTION h5iis_valid_c + END INTERFACE + + hdferr = h5iis_valid_c(id, c_valid) + + valid = .FALSE. ! Default + IF(c_valid.EQ.1) valid = .TRUE. + + END SUBROUTINE h5iis_valid_f +END MODULE H5I + diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 deleted file mode 100644 index 7c9a843..0000000 --- a/fortran/src/H5Iff.f90 +++ /dev/null @@ -1,352 +0,0 @@ -!****h* ROBODoc/H5I -! -! NAME -! MODULE H5I -! -! FILE -! fortran/src/H5Iff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5I 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 H5I 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 H5I - - USE H5GLOBAL - -CONTAINS - -!****s* H5I/h5iget_type_f -! -! NAME -! h5iget_type_f -! -! PURPOSE -! Retrieves the type of an object. -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! type - type of the object, possible values: -! H5I_FILE_F -! H5I_GROUP_F -! H5I_DATATYPE_F -! H5I_DATASPACE_F -! H5I_DATASET_F -! H5I_ATTR_F -! H5I_BADID_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: TYPE ! type of an object. - ! possible values are: - ! H5I_FILE_F - ! H5I_GROUP_F - ! H5I_DATATYPE_F - ! H5I_DATASPACE_F - ! H5I_DATASET_F - ! H5I_ATTR_F - ! H5I_BADID_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: TYPE - END FUNCTION h5iget_type_c - END INTERFACE - hdferr = h5iget_type_c(obj_id, TYPE) - END SUBROUTINE h5iget_type_f - -!****s* H5I/h5iget_name_f -! -! NAME -! h5iget_name_f -! -! PURPOSE -! Gets a name of an object specified by its idetifier. -! -! INPUTS -! obj_id - attribute identifier -! buf_size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in, name will be truncated if -! buffer is not big enough -! name_size - name size -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! SOURCE - SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name - INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 if successful, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(IN) :: buf_size - INTEGER(SIZE_T), INTENT(OUT) :: name_size - END FUNCTION h5iget_name_c - END INTERFACE - - hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) - END SUBROUTINE h5iget_name_f - -!****s* H5I/h5iinc_ref_f -! -! NAME -! h5iinc_ref_f -! -! PURPOSE -! Increments the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iinc_ref_c - END INTERFACE - hdferr = h5iinc_ref_c(obj_id, ref_count) - END SUBROUTINE h5iinc_ref_f - -!****s* H5I/h5idec_ref_f -! -! NAME -! h5idec_ref_f -! -! PURPOSE -! Decrements the reference count of an ID -! -! INPUTS -! obj_id - Object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5idec_ref_c - END INTERFACE - hdferr = h5idec_ref_c(obj_id, ref_count) - END SUBROUTINE h5idec_ref_f - -!****s* H5I/h5iget_ref_f -! NAME -! h5iget_ref_f -! -! PURPOSE -! Retrieves the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iget_ref_c - END INTERFACE - hdferr = h5iget_ref_c(obj_id, ref_count) - END SUBROUTINE h5iget_ref_f -! -!****s* H5I/h5iget_file_id_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Obtains file identifier from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! file_id - file identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 23, 2004 -! SOURCE - SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5iget_file_id_c - END INTERFACE - hdferr = h5iget_file_id_c(obj_id, file_id) - END SUBROUTINE h5iget_file_id_f -! -!****s* H5I/h5iis_valid_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Check if an ID is valid without producing an error message -! -! INPUTS -! id - identifier -! OUTPUTS -! valid - status of id as a valid identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! SOURCE - SUBROUTINE h5iis_valid_f(id, valid, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_valid ! 0 = .false, 1 = .true. - - INTERFACE - INTEGER FUNCTION h5iis_valid_c(id, c_valid) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - INTEGER :: c_valid - END FUNCTION h5iis_valid_c - END INTERFACE - - hdferr = h5iis_valid_c(id, c_valid) - - valid = .FALSE. ! Default - IF(c_valid.EQ.1) valid = .TRUE. - - END SUBROUTINE h5iis_valid_f -END MODULE H5I - diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 6523ab4..f4ad1d4 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -53,7 +53,7 @@ */ int_f -nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -110,7 +110,7 @@ done: */ int_f -nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -170,7 +170,7 @@ done: */ int_f -nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) +h5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) /******/ { char *c_name = NULL; @@ -218,7 +218,7 @@ done: */ int_f -nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -275,7 +275,7 @@ nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, * SOURCE */ int_f -nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -344,7 +344,7 @@ nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, * SOURCE */ int_f -nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -397,7 +397,7 @@ done: * SOURCE */ int_f -nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) +h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -456,7 +456,7 @@ done: * SOURCE */ int_f -nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) @@ -525,7 +525,7 @@ done: * SOURCE */ int_f -nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) /******/ @@ -588,7 +588,7 @@ done: * SOURCE */ int_f -nh5lis_registered_c(int_f *link_cls_id) +h5lis_registered_c(int_f *link_cls_id) /******/ { int_f ret_value; /* Return value */ @@ -643,7 +643,7 @@ nh5lis_registered_c(int_f *link_cls_id) * SOURCE */ int_f -nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -701,7 +701,7 @@ done: * SOURCE */ int_f -nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ @@ -774,7 +774,7 @@ done: /* * SOURCE */ /* *\/ */ /* int_f */ -/* nh5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ +/* h5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ /* size_t_f *size, _fcd linkval_buff, */ /* hid_t_f *lapl_id) */ /* { */ @@ -842,7 +842,7 @@ done: /* int_f */ -/* nh5lregistered_c(int_f *version, int_f *class_id, */ +/* h5lregistered_c(int_f *version, int_f *class_id, */ /* _fcd comment, size_t_f *comment_len, */ /* _fcd create_func, size_t_f *create_func_len, */ /* _fcd move_func, size_t_f *move_func_len, */ @@ -938,7 +938,7 @@ done: * SOURCE */ int_f -nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) /******/ { diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 new file mode 100644 index 0000000..41f3d9d --- /dev/null +++ b/fortran/src/H5Lff.F90 @@ -0,0 +1,1461 @@ +!****h* ROBODoc/H5L +! +! NAME +! MODULE H5L +! +! PURPOSE +! This file contains Fortran interfaces for H5L functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 H5L 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 H5L + + USE H5GLOBAL + USE ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5L (F03)/h5l_info_t +! +! Fortran2003 Derived Type: +! + TYPE, bind(c) :: union_t + INTEGER(haddr_t) :: address + INTEGER(size_t) :: val_size + END TYPE union_t + + TYPE, bind(c) :: h5l_info_t + INTEGER(c_int) :: type ! H5L_type_t type +! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + INTEGER(c_int64_t) :: corder ! int64_t corder; + INTEGER(c_int) :: cset ! H5T_cset_t cset; + TYPE(union_t) :: u + END TYPE h5l_info_t + +!***** + +!type specifies the link class. Valid values include the following: +! H5L_TYPE_HARD Hard link +! H5L_TYPE_SOFT Soft link +! H5L_TYPE_EXTERNAL External link +! H5L_TYPE_ERROR Error +!cset specifies the character set in which the link name is encoded. Valid values include the following: +! H5T_CSET_ASCII US ASCII +! H5T_CSET_UTF8 UTF-8 Unicode encoding + +CONTAINS + +! +!****s* H5L/h5lcopy_f +! +! NAME +! h5lcopy_f +! +! PURPOSE +! Copies a link from one location to another. +! +! INPUTS +! src_loc_id - Location identifier of the source link +! src_name - Name of the link to be copied +! dest_loc_id - Location identifier specifying the destination of the copy +! dest_name - Name to be assigned to the NEW copy +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & + lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTERFACE + INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) BIND(C,name='h5lcopy_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + END FUNCTION h5lcopy_c + END INTERFACE + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcopy_f + +! +!****s* H5L/h5ldelete_f +! +! NAME +! h5ldelete_f +! +! PURPOSE +! Removes a link from a group. +! +! INPUTS +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) BIND(C,name='h5ldelete_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + END FUNCTION h5ldelete_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) + + END SUBROUTINE h5ldelete_f + +! +!****s* H5L/H5Lcreate_soft_f +! +! NAME +! H5Lcreate_soft_f +! +! PURPOSE +! Creates a soft link to an object. +! +! INPUTS +! target_path - Path to the target object, which is not required to exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: target_path_len + INTEGER(SIZE_T) :: link_name_len + + INTERFACE + INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & + link_loc_id, & + link_name,link_name_len, & + lcpl_id_default, lapl_id_default ) BIND(C,NAME='h5lcreate_soft_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: target_path + INTEGER(SIZE_T) :: target_path_len + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: link_name_len + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_soft_c + END INTERFACE + + target_path_len = LEN(target_path) + link_name_len = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_soft_c(target_path, target_path_len,& + link_loc_id, & + link_name, link_name_len, & + lcpl_id_default, lapl_id_default ) + + END SUBROUTINE h5lcreate_soft_f + +! +!****s* H5L/H5Lcreate_hard_f +! +! NAME +! H5Lcreate_hard_f +! +! PURPOSE +! Creates a hard link to an object. +! +! INPUTS +! +! obj_loc_id - The file or group identifier for the target object. +! obj_name - Name of the target object, which must already exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_hard_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_hard_c + END INTERFACE + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_hard_f + +! +!****s* H5L/H5Lcreate_external_f +! +! NAME +! H5Lcreate_external_f +! +! PURPOSE +! Creates a soft link to an object in a different file. +! +! INPUTS +! +! file_name - Name of the file containing the target object. Neither the file nor the target object is +! required to exist. May be the file the link is being created in. +! obj_name - Path within the target file to the target object. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! SOURCE + SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither + ! the file nor the target object is required to exist. + ! May be the file the link is being created in. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_external_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: file_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_external_c + END INTERFACE + file_namelen = LEN(file_name) + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_external_f + +! +!****s* H5L/h5ldelete_by_idx_f +! +! NAME +! h5ldelete_by_idx_f +! +! PURPOSE +! Removes the nth link in a group. +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order within field or index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Link for which to retrieve information +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! SOURCE + SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) & + BIND(C,NAME='h5ldelete_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + END FUNCTION h5ldelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + group_namelen = LEN(group_name) + hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) + + END SUBROUTINE h5ldelete_by_idx_f + +! +!****s* H5L/H5Lexists_f +! +! NAME +! H5Lexists_f +! +! PURPOSE +! Check if a link with a particular name exists in a group. +! +! INPUTS +! loc_id - Identifier of the file or group to query. +! name - Link name to check +! +! OUTPUTS +! link_exists - link exists status (.TRUE.,.FALSE.) +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. + CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. + LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + ! Link access property list identifier. +!***** + INTEGER :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) & + BIND(C,NAME='h5lexists_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lexists_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) + + link_exists = .FALSE. + IF(link_exists_c.GT.0) link_exists = .TRUE. + + END SUBROUTINE h5lexists_f + +! +!****s* H5L/h5lget_info_f +! +! NAME +! h5lget_info_f +! +! PURPOSE +! Returns information about a link. +! +! INPUTS +! link_loc_id - File or group identifier. +! link_name - Name of the link for which information is being sought +! +! OUTPUTS +! NOTE: In C these are contained in the structure H5L_info_t +! +! cset - indicates the character set used for link’s name. +! corder - specifies the link’s creation order position. +! corder_valid - indicates whether the value in corder is valid. +! link_type - specifies the link class: +! H5L_TYPE_HARD_F - Hard link +! H5L_TYPE_SOFT_F - Soft link +! H5L_TYPE_EXTERNAL_F - External link +! H5L_TYPE_ERROR_ F - Error +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_f(link_loc_id, link_name, & + cset, corder, f_corder_valid, link_type, address, val_size, & + hdferr, lapl_id) + IMPLICIT NONE + + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought + +! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. + INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, address, val_size, & + lapl_id_default) BIND(C,NAME='h5lget_info_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: link_type + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: link_namelen + INTEGER :: corder_valid + END FUNCTION h5lget_info_c + END INTERFACE + + link_namelen = LEN(link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, & + address, val_size, & + lapl_id_default) + + f_corder_valid =.FALSE. + IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_f + +! +!****s* H5L/h5lget_info_by_idx_f +! +! NAME +! h5lget_info_by_idx_f +! +! PURPOSE +! Retrieves metadata for a link in a group, according to the order within a field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! NOTE: In C these are defined as a structure: H5L_info_t +! corder_valid - Indicates whether the creation order data is valid for this attribute +! corder - Is a positive integer containing the creation order of the attribute +! cset - Indicates the character set used for the attribute’s name +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) & + BIND(C,NAME='h5lget_info_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: link_type + INTEGER :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_info_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_by_idx_f + +! +!****s* H5L/h5lis_registered_f +! +! NAME +! h5lis_registered_f +! +! PURPOSE +! Determines whether a class of user-defined links is registered. +! +! INPUTS +! link_cls_id - User-defined link class identifier +! +! OUTPUTS +! registered - .TRUE. - if the link class has been registered +! .FALSE. - if it is unregistered +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and + ! .FALSE. - if it is unregistered + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') + USE H5GLOBAL + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + END FUNCTION h5lis_registered_c + END INTERFACE + + hdferr = h5lis_registered_c(link_cls_id) + + IF(hdferr.GT.0)THEN + registered = .TRUE. + ELSE IF(hdferr.EQ.0)THEN + registered = .FALSE. + ENDIF + + END SUBROUTINE h5lis_registered_f + +! +!****s* H5L/h5lmove_f +! +! NAME +! h5lmove_f +! +! PURPOSE +! Renames a link within an HDF5 file. +! +! INPUTS +! src_loc_id - Original file or group identifier. +! src_name - Original link name. +! dest_loc_id - Destination file or group identifier. +! dest_name - NEW link name. +! +! OUTPUTS +! hdferr - Error code: +! 0 on success and -1 on failure +! +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. +! lapl_id - Link access property list identifier to be associated WITH the NEW link. +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! SOURCE + SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + ! to be associated WITH the NEW link. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier + ! to be associated WITH the NEW link. +!***** + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lmove_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: src_loc_id + + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(SIZE_T) :: src_namelen + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lmove_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lmove_f + +! +!****s* H5L/h5lget_name_by_idx_f +! +! NAME +! h5lget_name_by_idx_f +! +! PURPOSE +! Retrieves name of the nth link in a group, according to the order within a specified field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! name - Buffer in which link value is returned +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - List access property list identifier. +! size - Maximum number of characters of link value to be returned. +! +! AUTHOR +! M. Scot Breitenfeld +! March 10, 2008 +! +! SOURCE + SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & + name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) BIND(C,NAME='h5lget_name_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(SIZE_T) :: size_default + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_name_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5lget_name_by_idx_f + + +! HAS PROBLEM WITH void pointer in C +!!$! +!!$!****s* H5L/ +!!$! +!!$! NAME +!!$! h5lget_val_by_idx_f +!!$! +!!$! PURPOSE +!!$! Returns the link value of a link, according to the order of +!!$! an index. For symbolic links, this is the path to which the +!!$! link points, including the null terminator. For user-defined +!!$! links, it is the link buffer. +!!$! INPUTS +!!$! loc_id - File or group identifier specifying location of subject group +!!$! group_name - Name of subject group +!!$! index_field - Index or field which determines the order +!!$! order - Order within field or index +!!$! n - Link for which to retrieve information +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t +!!$! corder_valid - indicates whether the creation order data is valid for this attribute +!!$! corder - is a positive integer containing the creation order of the attribute +!!$! cset - indicates the character set used for the attribute’s name +!!$! data_size - indicates the size, in the number of characters, of the attribute +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & +!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group +!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group +!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order +!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type +!!$ ! H5_INDEX_NAME_F - Index on names +!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order +!!$ ! H5_INDEX_N_F - Number of indices defined +!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: +!!$ ! H5_ITER_UNKNOWN_F - Unknown order +!!$ ! H5_ITER_INC_F - Increasing order +!!$ ! H5_ITER_DEC_F - Decreasing order +!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index +!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute +!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute +!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: corder_valid +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER, INTENT(IN) :: index_field +!!$ INTEGER, INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ INTEGER :: corder_valid +!!$ INTEGER, INTENT(OUT) :: corder +!!$ INTEGER, INTENT(OUT) :: cset +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION h5lget_val_by_idx_c +!!$ END INTERFACE +!!$ +!!$ group_namelen = LEN(group_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ +!!$ f_corder_valid =.FALSE. +!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. +!!$ +!!$ END SUBROUTINE h5lget_val_by_idx_f + +!!$! +!!$!****s* H5L/h5lget_val_f +!!$! +!!$! NAME +!!$! h5lget_val_f +!!$! +!!$! PURPOSE +!!$! Returns the value of a symbolic link. +!!$! +!!$! INPUTS +!!$! link_loc_id - File or group identifier. +!!$! link_name - Link whose value is to be returned. +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS +!!$! linkval_buff - The buffer to hold the returned link value. +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & +!!$ hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER :: corder_valid +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER :: link_namelen +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ END FUNCTION h5lget_val_c +!!$ END INTERFACE +!!$ +!!$ link_namelen = LEN(link_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ +!!$ END SUBROUTINE h5lget_val_f + +!!$! +!!$!****s* H5L/H5Lregistered_f +!!$! +!!$! NAME +!!$! H5Lregistered_f +!!$! +!!$! PURPOSE +!!$! Registers user-defined link class or changes behavior of existing class. +!!$! +!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: +!!$! version - Version number of this struct +!!$! class_id - Link class identifier +!!$! comment - Comment for debugging +!!$! create_func - Callback during link creation +!!$! move_func - Callback after moving link +!!$! copy_func - Callback after copying link +!!$! trav_func - The main traversal function +!!$! del_func - Callback for link deletion +!!$! query_func - Callback for queries +!!$! +!!$! OUTPUTS +!!$! hdferr - Error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! None +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! February 29, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & +!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) +!!$ IMPLICIT NONE +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func,query_func_len) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c +!!$ !DEC$ENDIF +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ END FUNCTION H5Lregistered_c +!!$ END INTERFACE +!!$ +!!$ comment_len = LEN(comment) +!!$ create_func_len = LEN(create_func) +!!$ move_func_len = LEN(move_func) +!!$ copy_func_len = LEN(copy_func) +!!$ trav_func_len = LEN(trav_func) +!!$ del_func_len = LEN(del_func) +!!$ query_func_len = LEN(query_func) +!!$ +!!$ hdferr = H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func, query_func_len) +!!$ +!!$ END SUBROUTINE H5Lregistered_f + +!****s* H5L (F03)/h5literate_f +! +! NAME +! h5literate_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! group_id - Identifier specifying subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: group_id + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & + BIND(C, NAME='h5literate_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5literate_c + END INTERFACE + + return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_f + +!****s* H5L (F03)/h5literate_by_name_f +! +! NAME +! h5literate_by_name_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 18, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & + idx, op, op_data, return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& + idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + END FUNCTION + END INTERFACE + + namelen = LEN(group_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_by_name_f + +END MODULE H5L diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 deleted file mode 100644 index 24f7a02..0000000 --- a/fortran/src/H5Lff.f90 +++ /dev/null @@ -1,1496 +0,0 @@ -!****h* ROBODoc/H5L -! -! NAME -! MODULE H5L -! -! PURPOSE -! This file contains Fortran interfaces for H5L functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 H5L 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 H5L - - USE H5GLOBAL - USE ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! - TYPE, bind(c) :: union_t - INTEGER(haddr_t) :: address - INTEGER(size_t) :: val_size - END TYPE union_t - - TYPE, bind(c) :: h5l_info_t - INTEGER(c_int) :: type ! H5L_type_t type -! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid - INTEGER(c_int64_t) :: corder ! int64_t corder; - INTEGER(c_int) :: cset ! H5T_cset_t cset; - TYPE(union_t) :: u - END TYPE h5l_info_t - -!***** - -!type specifies the link class. Valid values include the following: -! H5L_TYPE_HARD Hard link -! H5L_TYPE_SOFT Soft link -! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error -!cset specifies the character set in which the link name is encoded. Valid values include the following: -! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding - -CONTAINS - -! -!****s* H5L/h5lcopy_f -! -! NAME -! h5lcopy_f -! -! PURPOSE -! Copies a link from one location to another. -! -! INPUTS -! src_loc_id - Location identifier of the source link -! src_name - Name of the link to be copied -! dest_loc_id - Location identifier specifying the destination of the copy -! dest_name - Name to be assigned to the NEW copy -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & - lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTERFACE - INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCOPY_C'::h5lcopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dest_name - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - END FUNCTION h5lcopy_c - END INTERFACE - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcopy_f - -! -!****s* H5L/h5ldelete_f -! -! NAME -! h5ldelete_f -! -! PURPOSE -! Removes a link from a group. -! -! INPUTS -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_C'::h5ldelete_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - END FUNCTION h5ldelete_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) - - END SUBROUTINE h5ldelete_f - -! -!****s* H5L/H5Lcreate_soft_f -! -! NAME -! H5Lcreate_soft_f -! -! PURPOSE -! Creates a soft link to an object. -! -! INPUTS -! target_path - Path to the target object, which is not required to exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: target_path_len - INTEGER(SIZE_T) :: link_name_len - - INTERFACE - INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & - link_loc_id, & - link_name,link_name_len, & - lcpl_id_default, lapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_SOFT_C'::h5lcreate_soft_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: target_path, link_name - CHARACTER(LEN=*), INTENT(IN) :: target_path - INTEGER(SIZE_T) :: target_path_len - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: link_name_len - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_soft_c - END INTERFACE - - target_path_len = LEN(target_path) - link_name_len = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_soft_c(target_path, target_path_len,& - link_loc_id, & - link_name, link_name_len, & - lcpl_id_default, lapl_id_default ) - - END SUBROUTINE h5lcreate_soft_f - -! -!****s* H5L/H5Lcreate_hard_f -! -! NAME -! H5Lcreate_hard_f -! -! PURPOSE -! Creates a hard link to an object. -! -! INPUTS -! -! obj_loc_id - The file or group identifier for the target object. -! obj_name - Name of the target object, which must already exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_HARD_C'::h5lcreate_hard_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, link_name - INTEGER(HID_T), INTENT(IN) :: obj_loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_hard_c - END INTERFACE - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_hard_f - -! -!****s* H5L/H5Lcreate_external_f -! -! NAME -! H5Lcreate_external_f -! -! PURPOSE -! Creates a soft link to an object in a different file. -! -! INPUTS -! -! file_name - Name of the file containing the target object. Neither the file nor the target object is -! required to exist. May be the file the link is being created in. -! obj_name - Path within the target file to the target object. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! SOURCE - SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither - ! the file nor the target object is required to exist. - ! May be the file the link is being created in. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_EXTERNAL_C'::h5lcreate_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: file_name, obj_name, link_name - CHARACTER(LEN=*), INTENT(IN) :: file_name - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_external_c - END INTERFACE - file_namelen = LEN(file_name) - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_external_f - -! -!****s* H5L/h5ldelete_by_idx_f -! -! NAME -! h5ldelete_by_idx_f -! -! PURPOSE -! Removes the nth link in a group. -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order within field or index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Link for which to retrieve information -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! SOURCE - SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_BY_IDX_C'::h5ldelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - END FUNCTION h5ldelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - group_namelen = LEN(group_name) - hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - - END SUBROUTINE h5ldelete_by_idx_f - -! -!****s* H5L/H5Lexists_f -! -! NAME -! H5Lexists_f -! -! PURPOSE -! Check if a link with a particular name exists in a group. -! -! INPUTS -! loc_id - Identifier of the file or group to query. -! name - Link name to check -! -! OUTPUTS -! link_exists - link exists status (.TRUE.,.FALSE.) -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. - CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. - LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id - ! Link access property list identifier. -!***** - INTEGER :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LEXISTS_C'::h5lexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lexists_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - - link_exists = .FALSE. - IF(link_exists_c.GT.0) link_exists = .TRUE. - - END SUBROUTINE h5lexists_f - -! -!****s* H5L/h5lget_info_f -! -! NAME -! h5lget_info_f -! -! PURPOSE -! Returns information about a link. -! -! INPUTS -! link_loc_id - File or group identifier. -! link_name - Name of the link for which information is being sought -! -! OUTPUTS -! NOTE: In C these are contained in the structure H5L_info_t -! -! cset - indicates the character set used for link’s name. -! corder - specifies the link’s creation order position. -! corder_valid - indicates whether the value in corder is valid. -! link_type - specifies the link class: -! H5L_TYPE_HARD_F - Hard link -! H5L_TYPE_SOFT_F - Soft link -! H5L_TYPE_EXTERNAL_F - External link -! H5L_TYPE_ERROR_ F - Error -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_f(link_loc_id, link_name, & - cset, corder, f_corder_valid, link_type, address, val_size, & - hdferr, lapl_id) - IMPLICIT NONE - - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought - -! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. - INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, address, val_size, & - lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_C'::h5lget_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: link_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: link_type - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: link_namelen - INTEGER :: corder_valid - END FUNCTION h5lget_info_c - END INTERFACE - - link_namelen = LEN(link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, & - address, val_size, & - lapl_id_default) - - f_corder_valid =.FALSE. - IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_f - -! -!****s* H5L/h5lget_info_by_idx_f -! -! NAME -! h5lget_info_by_idx_f -! -! PURPOSE -! Retrieves metadata for a link in a group, according to the order within a field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! NOTE: In C these are defined as a structure: H5L_info_t -! corder_valid - Indicates whether the creation order data is valid for this attribute -! corder - Is a positive integer containing the creation order of the attribute -! cset - Indicates the character set used for the attribute’s name -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_BY_IDX_C'::h5lget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER, INTENT(OUT) :: link_type - INTEGER :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_info_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_by_idx_f - -! -!****s* H5L/h5lis_registered_f -! -! NAME -! h5lis_registered_f -! -! PURPOSE -! Determines whether a class of user-defined links is registered. -! -! INPUTS -! link_cls_id - User-defined link class identifier -! -! OUTPUTS -! registered - .TRUE. - if the link class has been registered -! .FALSE. - if it is unregistered -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and - ! .FALSE. - if it is unregistered - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5lis_registered_c(link_cls_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LIS_REGISTERED_C'::h5lis_registered_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - END FUNCTION h5lis_registered_c - END INTERFACE - - hdferr = h5lis_registered_c(link_cls_id) - - IF(hdferr.GT.0)THEN - registered = .TRUE. - ELSE IF(hdferr.EQ.0)THEN - registered = .FALSE. - ENDIF - - END SUBROUTINE h5lis_registered_f - -! -!****s* H5L/h5lmove_f -! -! NAME -! h5lmove_f -! -! PURPOSE -! Renames a link within an HDF5 file. -! -! INPUTS -! src_loc_id - Original file or group identifier. -! src_name - Original link name. -! dest_loc_id - Destination file or group identifier. -! dest_name - NEW link name. -! -! OUTPUTS -! hdferr - Error code: -! 0 on success and -1 on failure -! -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. -! lapl_id - Link access property list identifier to be associated WITH the NEW link. -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! SOURCE - SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - ! to be associated WITH the NEW link. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - ! to be associated WITH the NEW link. -!***** - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LMOVE_C'::h5lmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(SIZE_T) :: src_namelen - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dest_name - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lmove_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lmove_f - -! -!****s* H5L/h5lget_name_by_idx_f -! -! NAME -! h5lget_name_by_idx_f -! -! PURPOSE -! Retrieves name of the nth link in a group, according to the order within a specified field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! name - Buffer in which link value is returned -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - List access property list identifier. -! size - Maximum number of characters of link value to be returned. -! -! AUTHOR -! M. Scot Breitenfeld -! March 10, 2008 -! -! SOURCE - SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & - name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id - - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_name_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5lget_name_by_idx_f - - -! HAS PROBLEM WITH void pointer in C -!!$! -!!$!****s* H5L/ -!!$! -!!$! NAME -!!$! h5lget_val_by_idx_f -!!$! -!!$! PURPOSE -!!$! Returns the link value of a link, according to the order of -!!$! an index. For symbolic links, this is the path to which the -!!$! link points, including the null terminator. For user-defined -!!$! links, it is the link buffer. -!!$! INPUTS -!!$! loc_id - File or group identifier specifying location of subject group -!!$! group_name - Name of subject group -!!$! index_field - Index or field which determines the order -!!$! order - Order within field or index -!!$! n - Link for which to retrieve information -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t -!!$! corder_valid - indicates whether the creation order data is valid for this attribute -!!$! corder - is a positive integer containing the creation order of the attribute -!!$! cset - indicates the character set used for the attribute’s name -!!$! data_size - indicates the size, in the number of characters, of the attribute -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & -!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group -!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order -!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute -!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute -!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: corder_valid -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER, INTENT(IN) :: index_field -!!$ INTEGER, INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ INTEGER :: corder_valid -!!$ INTEGER, INTENT(OUT) :: corder -!!$ INTEGER, INTENT(OUT) :: cset -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION h5lget_val_by_idx_c -!!$ END INTERFACE -!!$ -!!$ group_namelen = LEN(group_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ -!!$ f_corder_valid =.FALSE. -!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. -!!$ -!!$ END SUBROUTINE h5lget_val_by_idx_f - -!!$! -!!$!****s* H5L/h5lget_val_f -!!$! -!!$! NAME -!!$! h5lget_val_f -!!$! -!!$! PURPOSE -!!$! Returns the value of a symbolic link. -!!$! -!!$! INPUTS -!!$! link_loc_id - File or group identifier. -!!$! link_name - Link whose value is to be returned. -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS -!!$! linkval_buff - The buffer to hold the returned link value. -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & -!!$ hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER :: corder_valid -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER :: link_namelen -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ END FUNCTION h5lget_val_c -!!$ END INTERFACE -!!$ -!!$ link_namelen = LEN(link_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ -!!$ END SUBROUTINE h5lget_val_f - -!!$! -!!$!****s* H5L/H5Lregistered_f -!!$! -!!$! NAME -!!$! H5Lregistered_f -!!$! -!!$! PURPOSE -!!$! Registers user-defined link class or changes behavior of existing class. -!!$! -!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: -!!$! version - Version number of this struct -!!$! class_id - Link class identifier -!!$! comment - Comment for debugging -!!$! create_func - Callback during link creation -!!$! move_func - Callback after moving link -!!$! copy_func - Callback after copying link -!!$! trav_func - The main traversal function -!!$! del_func - Callback for link deletion -!!$! query_func - Callback for queries -!!$! -!!$! OUTPUTS -!!$! hdferr - Error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! None -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! February 29, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & -!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) -!!$ IMPLICIT NONE -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func,query_func_len) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c -!!$ !DEC$ENDIF -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ END FUNCTION H5Lregistered_c -!!$ END INTERFACE -!!$ -!!$ comment_len = LEN(comment) -!!$ create_func_len = LEN(create_func) -!!$ move_func_len = LEN(move_func) -!!$ copy_func_len = LEN(copy_func) -!!$ trav_func_len = LEN(trav_func) -!!$ del_func_len = LEN(del_func) -!!$ query_func_len = LEN(query_func) -!!$ -!!$ hdferr = H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func, query_func_len) -!!$ -!!$ END SUBROUTINE H5Lregistered_f - -!****s* H5L (F03)/h5literate_f -! -! NAME -! h5literate_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! group_id - Identifier specifying subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: group_id - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & - BIND(C, NAME='h5literate_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5literate_c - END INTERFACE - - return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_f - -!****s* H5L (F03)/h5literate_by_name_f -! -! NAME -! h5literate_by_name_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 18, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & - idx, op, op_data, return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& - idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - END FUNCTION - END INTERFACE - - namelen = LEN(group_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_by_name_f - -END MODULE H5L diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 new file mode 100644 index 0000000..e4125bc --- /dev/null +++ b/fortran/src/H5Off.F90 @@ -0,0 +1,1167 @@ +!****h* ROBODoc/H5O +! +! NAME +! MODULE H5O +! +! FILE +! fortran/src/H5Off.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5O functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5O 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 H5O + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5T (F03)/h5o_info_t +! +! Fortran2003 Derived Type: +! + TYPE, BIND(C) :: space_t + INTEGER(hsize_t) :: total ! Total space for storing object header in file + INTEGER(hsize_t) :: meta ! Space within header for object header metadata information + INTEGER(hsize_t) :: mesg ! Space within header for actual message information + INTEGER(hsize_t) :: free ! Free space within object header + END TYPE space_t + + TYPE, BIND(C) :: mesg_t + INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header + END TYPE mesg_t + + TYPE, BIND(C) :: hdr_t + INTEGER :: version ! Version number of header format in file + INTEGER :: nmesgs ! Number of object header messages + INTEGER :: nchunks ! Number of object header chunks + INTEGER :: flags ! Object header status flags + TYPE(space_t) :: space + TYPE(mesg_t) :: mesg + END TYPE hdr_t + + ! Extra metadata storage for obj & attributes + TYPE, BIND(C) :: H5_ih_info_t + INTEGER(hsize_t) :: index_size ! btree and/or list + INTEGER(hsize_t) :: heap_size + END TYPE H5_ih_info_t + + TYPE, BIND(C) :: meta_size_t + TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets + TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes + ENDTYPE meta_size_t + + TYPE, BIND(C) :: h5o_info_t + INTEGER(C_LONG) :: fileno ! File number that object is located in + INTEGER(haddr_t) :: addr ! Object address in file + INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) + INTEGER :: rc ! Reference count of object + + INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- + INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array + INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran + INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) + + INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + + TYPE(hdr_t) :: hdr + + TYPE(meta_size_t) :: meta_size + END TYPE h5o_info_t + +!***** + +CONTAINS + +!****s* H5O/h5olink_f +! +! NAME +! h5olink_f +! +! PURPOSE +! Creates a hard link to an object in an HDF5 file. +! +! Inputs: +! object_id - Object to be linked. +! new_loc_id - File or group identifier specifying location at which object is to be linked. +! new_link_name - Name of link to be created, relative to new_loc_id. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! April 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + INTEGER(HID_T) , INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + + INTEGER(SIZE_T) :: new_link_namelen + + INTERFACE + INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: new_link_name + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER(SIZE_T) :: new_link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + END FUNCTION h5olink_c + END INTERFACE + + new_link_namelen = LEN(new_link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5olink_f + +!****s* H5O/h5oopen_f +! +! NAME +! h5oopen_f +! +! PURPOSE +! Opens an object in an HDF5 file by location identifier and path name. +! +! Inputs: +! loc_id - File or group identifier. +! name - Path to the object, relative to loc_id. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Access property list identifier for the link pointing to the object. +! +! AUTHOR +! M. Scot Breitenfeld +! April 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + + END SUBROUTINE h5oopen_f +! +!****s* H5O/h5oclose_f +! +! NAME +! h5oclose_f +! +! PURPOSE +! Closes an object in an HDF5 file. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! December 17, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oclose_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oclose_c(object_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + END FUNCTION h5oclose_c + END INTERFACE + + hdferr = h5oclose_c(object_id) + END SUBROUTINE h5oclose_f + +! +!****s* H5O/h5open_by_addr_f +! NAME +! h5oopen_by_addr_f +! +! PURPOSE +! Opens an object using its address within an HDF5 file. +! +! Inputs: +! loc_id - File or group identifier. +! addr - Object’s address in the file. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! September 14, 2009 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_by_addr_c + END INTERFACE + + hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) + + END SUBROUTINE h5oopen_by_addr_f +! +!****s* H5O/h5ocopy_f +! NAME +! h5ocopy_f +! +! PURPOSE +! Copies an object in an HDF5 file. +! +! Inputs: +! src_loc_id - Object identifier indicating the location of the source object to be copied. +! src_name - Name of the source object to be copied. +! dst_loc_id - Location identifier specifying the destination. +! dst_name - Name to be assigned to the new copy. +! +! Optional parameters: +! ocpypl_id - Object copy property list. +! lcpl_id - Link creation property list for the new hard link. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 14, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id +!***** + + INTEGER(SIZE_T) :: src_name_len, dst_name_len + INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default + + INTERFACE + INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name, dst_name + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default + INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default + INTEGER(SIZE_T) :: src_name_len, dst_name_len + + END FUNCTION h5ocopy_c + END INTERFACE + + src_name_len = LEN(src_name) + dst_name_len = LEN(dst_name) + + ocpypl_id_default = H5P_DEFAULT_F + IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + + END SUBROUTINE h5ocopy_f + +!****s* H5O/h5odecr_refcount_f +! NAME +! h5odecr_refcount_f +! +! PURPOSE +! Decrements an object reference count. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5odecr_refcount_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5odecr_refcount_c(object_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: object_id + END FUNCTION h5odecr_refcount_c + END INTERFACE + + hdferr = h5odecr_refcount_c(object_id) + + END SUBROUTINE h5odecr_refcount_f + +!****s* H5O/h5oexists_by_name_f +! NAME +! h5oexists_by_name_f +! +! PURPOSE +! Determines whether a link resolves to an actual object. +! +! Inputs: +! loc_id - Identifier of the file or group to query. +! name - The name of the link to check. +! +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! Outputs: +! link_exists - Existing link resolves to an object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL , INTENT(OUT) :: link_exists + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + + INTEGER(size_t) :: namelen + INTEGER :: status + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + + END FUNCTION h5oexists_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) + + link_exists = .FALSE. + IF(status.EQ.1)THEN + link_exists = .TRUE. + ENDIF + + hdferr = 0 + IF(status.LT.0)THEN + hdferr = -1 + ENDIF + + END SUBROUTINE h5oexists_by_name_f + +!****s* H5O/h5oget_comment_f +! NAME +! h5oget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! obj_id - Identifier for the target object. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*) , INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(HSSIZE_T) :: bufsize_default + + INTERFACE + INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize + END FUNCTION h5oget_comment_c + END INTERFACE + + commentsize_default = LEN(comment) + + hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_f + +!****s* H5O/h5oget_comment_by_name_f +! NAME +! h5oget_comment_by_name_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be retrieved, +! specified as a path relative to loc_id. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 6, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(SIZE_T) :: name_size + INTEGER(SIZE_T) :: bufsize_default + INTEGER(HID_T) :: lapl_id_default + INTERFACE + INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment, name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oget_comment_by_name_c + END INTERFACE + + commentsize_default = LEN(comment) + name_size = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_by_name_f + +!****s* H5O/h5oincr_refcount_f +! NAME +! h5oincr_refcount_f +! +! PURPOSE +! Increments an object reference count. +! +! Inputs: +! obj_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5oincr_refcount_c(obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: obj_id + END FUNCTION h5oincr_refcount_c + END INTERFACE + + hdferr = h5oincr_refcount_c(obj_id) + + END SUBROUTINE h5oincr_refcount_f + +!****s* H5O/h5oopen_by_idx_f +! +! NAME +! h5oopen_by_idx_f +! +! PURPOSE +! Open the nth object in a group. +! +! Inputs: +! loc_id - A file or group identifier. +! group_name - Name of group, relative to loc_id, in which object is located. +! index_type - Type of index by which objects are ordered. +! order - Order of iteration within index, NOTE: zero-based. +! n - Object to open. +! +! Outputs: +! obj_id - An object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! May 17, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: group_namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + + END FUNCTION h5oopen_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + + END SUBROUTINE H5Oopen_by_idx_f + +!****s* H5O/h5oset_comment_f +! NAME +! h5oset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! obj_id - Identifier of the target object. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: commentlen + + INTERFACE + INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + + END FUNCTION h5oset_comment_c + END INTERFACE + + commentlen = LEN(comment) + + hdferr = h5oset_comment_c(obj_id, comment, commentlen) + + END SUBROUTINE h5oset_comment_f + +!****s* H5O/h5oset_comment_by_name_f +! NAME +! h5oset_comment_by_name_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be set or reset, +! specified as a path relative to loc_id. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: commentlen + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, comment + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oset_comment_by_name_c + END INTERFACE + + commentlen = LEN(comment) + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) + + END SUBROUTINE h5oset_comment_by_name_f + +!****s* H5O (F03)/h5ovisit_f_F03 +! +! NAME +! h5ovisit_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! object_id - Identifier of the object at which the recursive iteration begins. +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + + TYPE(C_FUNPTR):: op + TYPE(C_PTR) :: op_data + INTEGER, INTENT(OUT) :: return_value + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & + BIND(C, NAME='h5ovisit_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5ovisit_c + END INTERFACE + + return_value = h5ovisit_c(object_id, index_type, order, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_f + +!****s* H5O (F03)/h5oget_info_by_name_f_F03 +! +! NAME +! h5oget_info_by_name_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by location and relative name. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! name - Name of group, relative to loc_id. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! December 1, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & + BIND(C, NAME='h5oget_info_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR),VALUE :: object_info + + END FUNCTION h5oget_info_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + + hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_name_f + +!****s* H5O (F03)/h5oget_info_f_F03 +! +! NAME +! h5oget_info_f +! +! PURPOSE +! Retrieves the metadata for an object specified by an identifier. +! +! Inputs: +! object_id - Identifier for target object. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr +!***** + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_c(object_id, object_info) & + BIND(C, NAME='h5oget_info_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: object_id + TYPE(C_PTR), VALUE :: object_info + END FUNCTION h5oget_info_c + END INTERFACE + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_c(object_id, ptr) + + END SUBROUTINE H5Oget_info_f + +!****s* H5O (F03)/h5oget_info_by_idx_f_F03 +! +! NAME +! h5oget_info_by_idx_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by an index position. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! group_name - Name of group in which object is located. +! index_field - Index or field that determines the order. +! order - Order within field or index. +! n - Object for which information is to be returned +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. (Not currently used.) +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & + index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR), VALUE :: object_info + + END FUNCTION h5oget_info_by_idx_c + END INTERFACE + + namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_idx_f + + +!****s* H5O (F03)/h5ovisit_by_name_f_F03 +! +! NAME +! h5ovisit_by_name_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! loc_id - Identifier of a file or group. +! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - Returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & + return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: object_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + + TYPE(C_FUNPTR) :: op + TYPE(C_PTR) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name + INTEGER(SIZE_T) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + TYPE(C_FUNPTR) , VALUE :: op + TYPE(C_PTR) , VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5ovisit_by_name_c + END INTERFACE + + namelen = LEN(object_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_by_name_f + +END MODULE H5O + diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 deleted file mode 100644 index e4125bc..0000000 --- a/fortran/src/H5Off.f90 +++ /dev/null @@ -1,1167 +0,0 @@ -!****h* ROBODoc/H5O -! -! NAME -! MODULE H5O -! -! FILE -! fortran/src/H5Off.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5O functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5O 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 H5O - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5T (F03)/h5o_info_t -! -! Fortran2003 Derived Type: -! - TYPE, BIND(C) :: space_t - INTEGER(hsize_t) :: total ! Total space for storing object header in file - INTEGER(hsize_t) :: meta ! Space within header for object header metadata information - INTEGER(hsize_t) :: mesg ! Space within header for actual message information - INTEGER(hsize_t) :: free ! Free space within object header - END TYPE space_t - - TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header - INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header - END TYPE mesg_t - - TYPE, BIND(C) :: hdr_t - INTEGER :: version ! Version number of header format in file - INTEGER :: nmesgs ! Number of object header messages - INTEGER :: nchunks ! Number of object header chunks - INTEGER :: flags ! Object header status flags - TYPE(space_t) :: space - TYPE(mesg_t) :: mesg - END TYPE hdr_t - - ! Extra metadata storage for obj & attributes - TYPE, BIND(C) :: H5_ih_info_t - INTEGER(hsize_t) :: index_size ! btree and/or list - INTEGER(hsize_t) :: heap_size - END TYPE H5_ih_info_t - - TYPE, BIND(C) :: meta_size_t - TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets - TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes - ENDTYPE meta_size_t - - TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - INTEGER(haddr_t) :: addr ! Object address in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER :: rc ! Reference count of object - - INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- - INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array - INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran - INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) - - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object - - TYPE(hdr_t) :: hdr - - TYPE(meta_size_t) :: meta_size - END TYPE h5o_info_t - -!***** - -CONTAINS - -!****s* H5O/h5olink_f -! -! NAME -! h5olink_f -! -! PURPOSE -! Creates a hard link to an object in an HDF5 file. -! -! Inputs: -! object_id - Object to be linked. -! new_loc_id - File or group identifier specifying location at which object is to be linked. -! new_link_name - Name of link to be created, relative to new_loc_id. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! April 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - INTEGER(HID_T) , INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - - INTEGER(SIZE_T) :: new_link_namelen - - INTERFACE - INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: new_link_name - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER(SIZE_T) :: new_link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - END FUNCTION h5olink_c - END INTERFACE - - new_link_namelen = LEN(new_link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5olink_f - -!****s* H5O/h5oopen_f -! -! NAME -! h5oopen_f -! -! PURPOSE -! Opens an object in an HDF5 file by location identifier and path name. -! -! Inputs: -! loc_id - File or group identifier. -! name - Path to the object, relative to loc_id. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Access property list identifier for the link pointing to the object. -! -! AUTHOR -! M. Scot Breitenfeld -! April 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - - END SUBROUTINE h5oopen_f -! -!****s* H5O/h5oclose_f -! -! NAME -! h5oclose_f -! -! PURPOSE -! Closes an object in an HDF5 file. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! December 17, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oclose_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oclose_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - END FUNCTION h5oclose_c - END INTERFACE - - hdferr = h5oclose_c(object_id) - END SUBROUTINE h5oclose_f - -! -!****s* H5O/h5open_by_addr_f -! NAME -! h5oopen_by_addr_f -! -! PURPOSE -! Opens an object using its address within an HDF5 file. -! -! Inputs: -! loc_id - File or group identifier. -! addr - Object’s address in the file. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! September 14, 2009 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_by_addr_c - END INTERFACE - - hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) - - END SUBROUTINE h5oopen_by_addr_f -! -!****s* H5O/h5ocopy_f -! NAME -! h5ocopy_f -! -! PURPOSE -! Copies an object in an HDF5 file. -! -! Inputs: -! src_loc_id - Object identifier indicating the location of the source object to be copied. -! src_name - Name of the source object to be copied. -! dst_loc_id - Location identifier specifying the destination. -! dst_name - Name to be assigned to the new copy. -! -! Optional parameters: -! ocpypl_id - Object copy property list. -! lcpl_id - Link creation property list for the new hard link. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 14, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id -!***** - - INTEGER(SIZE_T) :: src_name_len, dst_name_len - INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default - - INTERFACE - INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dst_name - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default - INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default - INTEGER(SIZE_T) :: src_name_len, dst_name_len - - END FUNCTION h5ocopy_c - END INTERFACE - - src_name_len = LEN(src_name) - dst_name_len = LEN(dst_name) - - ocpypl_id_default = H5P_DEFAULT_F - IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - - END SUBROUTINE h5ocopy_f - -!****s* H5O/h5odecr_refcount_f -! NAME -! h5odecr_refcount_f -! -! PURPOSE -! Decrements an object reference count. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5odecr_refcount_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5odecr_refcount_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: object_id - END FUNCTION h5odecr_refcount_c - END INTERFACE - - hdferr = h5odecr_refcount_c(object_id) - - END SUBROUTINE h5odecr_refcount_f - -!****s* H5O/h5oexists_by_name_f -! NAME -! h5oexists_by_name_f -! -! PURPOSE -! Determines whether a link resolves to an actual object. -! -! Inputs: -! loc_id - Identifier of the file or group to query. -! name - The name of the link to check. -! -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! Outputs: -! link_exists - Existing link resolves to an object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - LOGICAL , INTENT(OUT) :: link_exists - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - - INTEGER(size_t) :: namelen - INTEGER :: status - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - - END FUNCTION h5oexists_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) - - link_exists = .FALSE. - IF(status.EQ.1)THEN - link_exists = .TRUE. - ENDIF - - hdferr = 0 - IF(status.LT.0)THEN - hdferr = -1 - ENDIF - - END SUBROUTINE h5oexists_by_name_f - -!****s* H5O/h5oget_comment_f -! NAME -! h5oget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! obj_id - Identifier for the target object. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*) , INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(HSSIZE_T) :: bufsize_default - - INTERFACE - INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize - END FUNCTION h5oget_comment_c - END INTERFACE - - commentsize_default = LEN(comment) - - hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_f - -!****s* H5O/h5oget_comment_by_name_f -! NAME -! h5oget_comment_by_name_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be retrieved, -! specified as a path relative to loc_id. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 6, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(SIZE_T) :: name_size - INTEGER(SIZE_T) :: bufsize_default - INTEGER(HID_T) :: lapl_id_default - INTERFACE - INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment, name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oget_comment_by_name_c - END INTERFACE - - commentsize_default = LEN(comment) - name_size = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_by_name_f - -!****s* H5O/h5oincr_refcount_f -! NAME -! h5oincr_refcount_f -! -! PURPOSE -! Increments an object reference count. -! -! Inputs: -! obj_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5oincr_refcount_c(obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: obj_id - END FUNCTION h5oincr_refcount_c - END INTERFACE - - hdferr = h5oincr_refcount_c(obj_id) - - END SUBROUTINE h5oincr_refcount_f - -!****s* H5O/h5oopen_by_idx_f -! -! NAME -! h5oopen_by_idx_f -! -! PURPOSE -! Open the nth object in a group. -! -! Inputs: -! loc_id - A file or group identifier. -! group_name - Name of group, relative to loc_id, in which object is located. -! index_type - Type of index by which objects are ordered. -! order - Order of iteration within index, NOTE: zero-based. -! n - Object to open. -! -! Outputs: -! obj_id - An object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! May 17, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: group_namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - - END FUNCTION h5oopen_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - - END SUBROUTINE H5Oopen_by_idx_f - -!****s* H5O/h5oset_comment_f -! NAME -! h5oset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! obj_id - Identifier of the target object. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: commentlen - - INTERFACE - INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - - END FUNCTION h5oset_comment_c - END INTERFACE - - commentlen = LEN(comment) - - hdferr = h5oset_comment_c(obj_id, comment, commentlen) - - END SUBROUTINE h5oset_comment_f - -!****s* H5O/h5oset_comment_by_name_f -! NAME -! h5oset_comment_by_name_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be set or reset, -! specified as a path relative to loc_id. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: commentlen - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, comment - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oset_comment_by_name_c - END INTERFACE - - commentlen = LEN(comment) - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) - - END SUBROUTINE h5oset_comment_by_name_f - -!****s* H5O (F03)/h5ovisit_f_F03 -! -! NAME -! h5ovisit_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! object_id - Identifier of the object at which the recursive iteration begins. -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - - TYPE(C_FUNPTR):: op - TYPE(C_PTR) :: op_data - INTEGER, INTENT(OUT) :: return_value - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & - BIND(C, NAME='h5ovisit_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5ovisit_c - END INTERFACE - - return_value = h5ovisit_c(object_id, index_type, order, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_f - -!****s* H5O (F03)/h5oget_info_by_name_f_F03 -! -! NAME -! h5oget_info_by_name_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by location and relative name. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! name - Name of group, relative to loc_id. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & - BIND(C, NAME='h5oget_info_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR),VALUE :: object_info - - END FUNCTION h5oget_info_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - - hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_name_f - -!****s* H5O (F03)/h5oget_info_f_F03 -! -! NAME -! h5oget_info_f -! -! PURPOSE -! Retrieves the metadata for an object specified by an identifier. -! -! Inputs: -! object_id - Identifier for target object. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr -!***** - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_c(object_id, object_info) & - BIND(C, NAME='h5oget_info_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: object_id - TYPE(C_PTR), VALUE :: object_info - END FUNCTION h5oget_info_c - END INTERFACE - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_c(object_id, ptr) - - END SUBROUTINE H5Oget_info_f - -!****s* H5O (F03)/h5oget_info_by_idx_f_F03 -! -! NAME -! h5oget_info_by_idx_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by an index position. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! group_name - Name of group in which object is located. -! index_field - Index or field that determines the order. -! order - Order within field or index. -! n - Object for which information is to be returned -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. (Not currently used.) -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & - index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR), VALUE :: object_info - - END FUNCTION h5oget_info_by_idx_c - END INTERFACE - - namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_idx_f - - -!****s* H5O (F03)/h5ovisit_by_name_f_F03 -! -! NAME -! h5ovisit_by_name_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & - return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - - TYPE(C_FUNPTR) :: op - TYPE(C_PTR) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name - INTEGER(SIZE_T) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - TYPE(C_FUNPTR) , VALUE :: op - TYPE(C_PTR) , VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5ovisit_by_name_c - END INTERFACE - - namelen = LEN(object_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_by_name_f - -END MODULE H5O - diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 new file mode 100644 index 0000000..18da887 --- /dev/null +++ b/fortran/src/H5Pff.F90 @@ -0,0 +1,7624 @@ +!****h* ROBODoc/H5P (F90) +! +! NAME +! H5P_PROVISIONAL +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 H5P 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 H5P + + USE H5GLOBAL + + INTERFACE h5pset_fapl_multi_f + MODULE PROCEDURE h5pset_fapl_multi_l + MODULE PROCEDURE h5pset_fapl_multi_s + END INTERFACE + + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_fill_value_ptr + + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_fill_value_ptr + + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_ptr + + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_real + MODULE PROCEDURE h5pget_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_ptr + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + MODULE PROCEDURE h5pregister_real + MODULE PROCEDURE h5pregister_char + ! Recommended procedure: + MODULE PROCEDURE h5pregister_ptr + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_char + ! Recommended procedure: + MODULE PROCEDURE h5pinsert_ptr + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pget_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pget_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pset_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pset_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pset_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pget_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pget_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & + BIND(C, NAME='h5pregister_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pregister_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & + BIND(C, NAME='h5pinsert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pinsert_c + END INTERFACE + +CONTAINS + +!****s* H5P/h5pcreate_f +! NAME +! h5pcreate_f +! +! PURPOSE +! Creates a new property as an instance of a property +! list class. +! +! INPUTS +! class - type of the property class to be created. +! Possible values are: +! H5P_OBJECT_CREATE_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_ACCESS_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! H5P_GROUP_CREATE_F +! H5P_GROUP_ACCESS_F +! H5P_DATATYPE_CREATE_F +! H5P_DATATYPE_ACCESS_F +! H5P_STRING_CREATE_F +! H5P_ATTRIBUTE_CREATE _F +! H5P_OBJECT_COPY_F +! H5P_LINK_CREATE_F +! H5P_LINK_ACCESS_F +! +! OUTPUTS +! prp_id - property list identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcreate_f(class, prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + INTEGER , INTENT(OUT) :: hdferr +!***** +! INTEGER, EXTERNAL :: h5pcreate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcreate_c(class, prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + END FUNCTION h5pcreate_c + END INTERFACE + + hdferr = h5pcreate_c(class, prp_id) + END SUBROUTINE h5pcreate_f + +!****s* H5P/h5pset_preserve_f +! NAME +! h5pset_preserve_f +! +! PURPOSE +! Sets the dataset transfer property list status to +! TRUE or FALSE for initializing compound datatype +! members during write/read operations. +! +! INPUTS +! prp_id - property list identifier +! flag - status flag +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset + ! transfer property for partila writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + +! INTEGER, EXTERNAL :: h5pset_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pset_preserve_c + END INTERFACE + flag_c = 0 + IF(flag) flag_c = 1 + hdferr = h5pset_preserve_c(prp_id, flag_c) + END SUBROUTINE h5pset_preserve_f + +!****s* H5P/h5pget_preserve_f +! NAME +! h5pget_preserve_f +! +! PURPOSE +! Checks status of the dataset transfer property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! flag - status flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's + ! transfer property for partial writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + +! INTEGER, EXTERNAL :: h5pget_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pget_preserve_c + END INTERFACE + + hdferr = h5pget_preserve_c(prp_id, flag_c) + flag = .FALSE. + IF(flag_c .EQ. 1) flag = .TRUE. + END SUBROUTINE h5pget_preserve_f + +!****s* H5P/h5pget_class_f +! NAME +! h5pget_class_f +! +! PURPOSE +! Returns the property list class for a property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! classtype - property list class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list + ! to be created. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_c(prp_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype + END FUNCTION h5pget_class_c + END INTERFACE + + hdferr = h5pget_class_c(prp_id, classtype) + END SUBROUTINE h5pget_class_f + +!****s* H5P/h5pcopy_f +! NAME +! h5pcopy_f +! +! PURPOSE +! Copies an existing property list to create a new +! property list +! +! INPUTS +! prp_id - property list identifier +! OUTPUTS +! new_prp_id - new property list identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pcopy_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: new_prp_id + END FUNCTION h5pcopy_c + END INTERFACE + + hdferr = h5pcopy_c(prp_id, new_prp_id) + END SUBROUTINE h5pcopy_f + +!****s* H5P/h5pclose_f +! NAME +! h5pclose_f +! +! PURPOSE +! Terminates access to a property list. +! +! INPUTS +! prp_id - identifier of the property list to +! terminate access to. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pclose_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pclose_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pclose_c + END INTERFACE + + hdferr = h5pclose_c(prp_id) + END SUBROUTINE h5pclose_f + +!****s* H5P/h5pset_chunk_f +! NAME +! h5pset_chunk_f +! +! PURPOSE +! Sets the size of the chunks used to store +! a chunked layout dataset. +! +! INPUTS +! prp_id - datatset creation property list identifier +! ndims - number of dimensions for each chunk +! dims - array with dimension sizes for each chunk +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + END FUNCTION h5pset_chunk_c + END INTERFACE + + hdferr = h5pset_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pset_chunk_f + +!****s* H5P/h5pget_chunk_f +! NAME +! h5pget_chunk_f +! +! PURPOSE +! Retrieves the size of chunks for the raw data of a +! chunked layout dataset +! +! INPUTS +! prp_id - property list identifier +! ndims - size of dims array +! OUTPUTS +! dims - array with dimension sizes for each chunk +! hdferr - error code +! Success: number of chunk dimensions +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to + ! to return + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! number of chunk dimensions on success, + ! -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: ndims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5pget_chunk_c + END INTERFACE + + hdferr = h5pget_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pget_chunk_f + +!****s* H5P/h5pset_deflate_f +! NAME +! h5pset_deflate_f +! +! PURPOSE +! Sets compression method and compression level. +! +! INPUTS +! prp_id - property list identifier +! level - compression level +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: level ! Compression level + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_deflate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_deflate_c(prp_id, level) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: level + END FUNCTION h5pset_deflate_c + END INTERFACE + hdferr = h5pset_deflate_c(prp_id, level) + + END SUBROUTINE h5pset_deflate_f + +!****s* H5P/h5pget_version_f +! NAME +! h5pget_version_f +! +! PURPOSE +! Retrieves the version information of various objects +! for a file creation property list +! +! INPUTS +! prp_id - file createion property list identifier +! OUTPUTS +! boot - super block version number +! freelist - global freelist version number +! stab - symbol table version number +! shhdr - shared object header version number +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & + stab, shhdr, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot + ! block version number + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global + ! Freelist version number + + INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol + ! table version number + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared + ! object header version number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_version_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(:), INTENT(OUT) :: boot + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist + INTEGER, DIMENSION(:), INTENT(OUT) :: stab + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr + END FUNCTION h5pget_version_c + END INTERFACE + + hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + END SUBROUTINE h5pget_version_f + +!****s* H5P/h5pset_userblock_f +! NAME +! h5pset_userblock_f +! +! PURPOSE +! Sets user block size +! +! INPUTS +! prp_id - file creation property list to modify +! size - size of the user-block in bytes +! +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_userblock_c(prp_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_userblock_c + END INTERFACE + + hdferr = h5pset_userblock_c(prp_id, size) + END SUBROUTINE h5pset_userblock_f + +!****s* H5P/h5pget_userblock_f +! NAME +! h5pget_userblock_f +! +! PURPOSE +! Gets user block size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! block_size - size of the user block in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the + ! user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: block_size + END FUNCTION h5pget_userblock_c + END INTERFACE + hdferr = h5pget_userblock_c(prp_id, block_size) + END SUBROUTINE h5pget_userblock_f + +!****s* H5P/h5pset_sizes_f +! NAME +! h5pset_sizes_f +! +! PURPOSE +! Sets the byte size of the offsets and lengths used +! to address objects in an HDF5 file. +! +! INPUTS +! prp_id - file creation property list identifier +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pset_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size + END FUNCTION h5pset_sizes_c + END INTERFACE + + hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pset_sizes_f + +!****s* H5P/h5pget_sizes_f +! NAME +! h5pget_sizes_f +! +! PURPOSE +! Retrieves the size of the offsets and lengths used +! in an HDF5 file +! +! INPUTS +! prp_id - file creation property list identifier +! OUTPUTS +! +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size + END FUNCTION h5pget_sizes_c + END INTERFACE + + hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pget_sizes_f + +!****s* H5P/h5pset_sym_k_f +! NAME +! h5pset_sym_k_f +! +! PURPOSE +! Sets the size of parameters used to control the +!symbol table nodes +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - symbol table tree rank +! lk - symbol table node size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! Symbol table tree rank + INTEGER, INTENT(IN) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(IN) :: lk + END FUNCTION h5pset_sym_k_c + END INTERFACE + + hdferr = h5pset_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pset_sym_k_f +!****s* H5P/h5pget_sym_k_f +! NAME +! h5pget_sym_k_f +! +! PURPOSE +! Retrieves the size of the symbol table B-tree 1/2 rank +! and the symbol table leaf node 1/2 size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - symbol table tree 1/2 rank +! lk - symbol table node 1/2 size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank + INTEGER, INTENT(OUT) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: lk + END FUNCTION h5pget_sym_k_c + END INTERFACE + + hdferr = h5pget_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pget_sym_k_f +!****s* H5P/h5pset_istore_k_f +! NAME +! h5pset_istore_k_f +! +! PURPOSE +! Sets the size of the parameter used to control the +! B-trees for indexing chunked datasets +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - 1/2 rank of chunked storage B-tree +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + END FUNCTION h5pset_istore_k_c + END INTERFACE + + hdferr = h5pset_istore_k_c(prp_id, ik) + END SUBROUTINE h5pset_istore_k_f + +!****s* H5P/h5pget_istore_k_f +! NAME +! h5pget_istore_k_f +! +! PURPOSE +! Queries the 1/2 rank of an indexed storage B-tree. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - 1/2 rank of chunked storage B-tree +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + END FUNCTION h5pget_istore_k_c + END INTERFACE + + hdferr = h5pget_istore_k_c(prp_id, ik) + END SUBROUTINE h5pget_istore_k_f + +!****s* H5P/h5pget_driver_f +! NAME +! h5pget_driver_f +! +! PURPOSE +! Returns low-lever driver identifier. +! +! INPUTS +! +! prp_id - file access or data transfer property +! list identifier. +! OUTPUTS +! +! driver - low-level driver identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_driver_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_driver_c(prp_id, driver) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: driver + END FUNCTION h5pget_driver_c + END INTERFACE + + hdferr = h5pget_driver_c(prp_id, driver) + END SUBROUTINE h5pget_driver_f + +!****s* H5P/h5pset_fapl_stdio_f +! NAME +! h5pset_fapl_stdio_f +! +! PURPOSE +! Sets the standard I/O driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fapl_stdio_c + END INTERFACE + + hdferr = h5pset_fapl_stdio_c(prp_id) + END SUBROUTINE h5pset_fapl_stdio_f + +!****s* H5P/h5pget_stdio_f +! NAME +! h5pget_stdio_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) +! +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: io ! value indicates that the file + !access property list is set to + !the stdio driver +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_stdio_c +! hdferr = h5pget_stdio_c(prp_id, io) +! END SUBROUTINE h5pget_stdio_f + +!****s* H5P/h5pset_fapl_sec2_f +! NAME +! h5pset_fapl_sec2_f +! +! PURPOSE +! Sets the sec2 driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + END FUNCTION h5pset_fapl_sec2_c + END INTERFACE + + hdferr = h5pset_fapl_sec2_c(prp_id) + END SUBROUTINE h5pset_fapl_sec2_f + +!****s* H5P/h5pget_sec2_f +! NAME +! h5pget_sec2_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file + !driver uses the functions declared + !in the unistd.h file +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_sec2_c +! hdferr = h5pget_sec2_c(prp_id, sec2) +! END SUBROUTINE h5pget_sec2_f + +!****s* H5P/h5pset_alignment_f +! NAME +! h5pset_alignment_f +! +! PURPOSE +! Sets alignment properties of a file access property list. +! +! INPUTS +! +! prp_id - file access property list identifier +! threshold - threshold value +! alignment - alignment value +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: threshold + INTEGER(HSIZE_T), INTENT(IN) :: alignment + END FUNCTION h5pset_alignment_c + END INTERFACE + + hdferr = h5pset_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pset_alignment_f + +!****s* H5P/h5pget_alignment_f +! NAME +! h5pget_alignment_f +! +! PURPOSE +! Retrieves the current settings for alignment +! properties from a file access property list. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! threshold - threshold value +! alignment - alignment value +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: threshold + INTEGER(HSIZE_T), INTENT(OUT) :: alignment + END FUNCTION h5pget_alignment_c + END INTERFACE + + hdferr = h5pget_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pget_alignment_f + +!****s* H5P/h5pset_fapl_core_f +! NAME +! h5pset_fapl_core_f +! +! PURPOSE +! Modifies the file access property list to use the +! H5FD_CORE driver. +! +! INPUTS +! prp_id - file access property list identifier +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. + LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + +! INTEGER, EXTERNAL :: h5pset_fapl_core_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pset_fapl_core_c + END INTERFACE + backing_store_flag = 0 + IF(backing_store) backing_store_flag = 1 + hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + END SUBROUTINE h5pset_fapl_core_f + +!****s* H5P/h5pget_fapl_core_f +! NAME +! h5pget_fapl_core_f +! +! PURPOSE +! Queries core file driver properties. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. + LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + + INTERFACE + INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pget_fapl_core_c + END INTERFACE + + hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + backing_store =.FALSE. + IF (backing_store_flag .EQ. 1) backing_store =.TRUE. + END SUBROUTINE h5pget_fapl_core_f + +!****s* H5P/ h5pset_fapl_family_f +! NAME +! h5pset_fapl_family_f +! +! PURPOSE +! Sets the file access property list to use the family driver. +! +! INPUTS +! prp_id - file access property list identifier +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: memb_size + INTEGER(HID_T), INTENT(IN) :: memb_plist + END FUNCTION h5pset_fapl_family_c + END INTERFACE + + hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pset_fapl_family_f + +!****s* H5P/h5pget_fapl_family_f +! NAME +! h5pget_fapl_family_f +! +! PURPOSE +! Returns file access property list information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size + INTEGER(HID_T), INTENT(OUT) :: memb_plist + END FUNCTION h5pget_fapl_family_c + END INTERFACE + + hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pget_fapl_family_f + +!****s* H5P/h5pset_cache_f +! NAME +! h5pset_cache_f +! +! PURPOSE +! Sets the meta data cache and raw data chunk +! cache parameters +! +! INPUTS +! +! prp_id - file access property list identifier +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_cache_c + END INTERFACE + + hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pset_cache_f + +!****s* H5P/h5pget_cache_f +! NAME +! h5pget_cache_f +! +! PURPOSE +! Queries the meta data cache and raw data chunk cache +! parameters. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Bug fix: type of the rdcc_nelmts parameter should be INTEGER +! instead of INTEGER(SIZE_T) October 10, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_cache_c + END INTERFACE + + hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pget_cache_f + +!****s* H5P/h5pset_fapl_split_f +! NAME +! h5pset_fapl_split_f +! +! PURPOSE +! Emulates the old split file driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! meta_ext - name of the extension for the metafile +! filename +! meta_plist - identifier of the meta file access property +! list +! raw_ext - name extension for the raw file filename +! raw_plist - identifier of the raw file access property list +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for + ! the metafile filename + INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file + ! access property list + CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename + INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file + ! access property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: meta_len, raw_len + +! INTEGER, EXTERNAL :: h5pset_fapl_split_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: meta_ext + !DEC$ATTRIBUTES reference :: raw_ext + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: meta_ext + INTEGER(HID_T), INTENT(IN) :: meta_plist + CHARACTER(LEN=*), INTENT(IN) :: raw_ext + INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER :: meta_len, raw_len + END FUNCTION h5pset_fapl_split_c + END INTERFACE + + meta_len = LEN(meta_ext) + raw_len = LEN(raw_ext) + hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + END SUBROUTINE h5pset_fapl_split_f + +!****s* H5P/h5pget_split_f +! NAME +! h5pget_split_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& +! raw_ext, raw_plist, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta + ! file extension to be copied to the + ! meta_ext buffer + +! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for + !the metafile filename +! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file + ! access property list +! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw + ! file extension to be copied to the + ! raw_ext buffer +! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename +! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file + !access property list +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_split_c +! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & +! raw_ext_size, raw_ext, raw_plist ) +! END SUBROUTINE h5pget_split_f + +!****s* H5P/h5pset_gc_references_f +! NAME +! h5pset_gc_references_f +! +! PURPOSE +! Sets garbage collecting references flag. +! +! INPUTS +! +! prp_id - file access property list identifier +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: gc_reference + END FUNCTION h5pset_gc_references_c + END INTERFACE + + hdferr = h5pset_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pset_gc_references_f + +!****s* H5P/h5pget_gc_references_f +! NAME +! h5pget_gc_references_f +! +! PURPOSE +! Returns garbage collecting references setting. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: gc_reference + END FUNCTION h5pget_gc_references_c + END INTERFACE + + hdferr = h5pget_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pget_gc_references_f + +!****s* H5P/h5pset_layout_f +! NAME +! h5pset_layout_f +! +! PURPOSE +! Sets the type of storage used store the raw data +! for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F + ! H5D_CONTIGUOUS_F + ! H5D_CHUNKED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: layout + END FUNCTION h5pset_layout_c + END INTERFACE + + hdferr = h5pset_layout_c(prp_id, layout) + END SUBROUTINE h5pset_layout_f + +!****s* H5P/h5pget_layout_f +! NAME +! h5pget_layout_f +! +! PURPOSE +! Returns the layout of the raw data for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F(0) + ! H5D_CONTIGUOUS_F(1) + ! H5D_CHUNKED_F(2) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: layout + END FUNCTION h5pget_layout_c + END INTERFACE + + hdferr = h5pget_layout_c(prp_id, layout) + END SUBROUTINE h5pget_layout_f + +!****s* H5P/h5pset_filter_f +! NAME +! h5pset_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be added to the pipeline +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! February, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pset_filter_c + END INTERFACE + + hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pset_filter_f + +!****s* H5P/h5pget_nfilters_f +! NAME +! h5pget_nfilters_f +! +! PURPOSE +! Returns the number of filters in the pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! nfilters - number of filters in the pipeline +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_nfilters_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: nfilters + END FUNCTION h5pget_nfilters_c + END INTERFACE + + hdferr = h5pget_nfilters_c(prp_id, nfilters) + END SUBROUTINE h5pget_nfilters_f + +!****s* H5P/h5pget_filter_f +! NAME +! h5pget_filter_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter_number - sequence number within the filter +! pipeline of the filter for which +! information is sought +! OUTPUTS +! +! filter_id - filter identification number +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter + ! pipeline of the filter for which + ! information is sought + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: filter_id ! Filter identification number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_number + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: filter_id + END FUNCTION h5pget_filter_c + END INTERFACE + + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + END SUBROUTINE h5pget_filter_f + +!****s* H5P/h5pset_external_f +! NAME +! h5pset_external_f +! +! PURPOSE +! Adds an external file to the list of external files. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file + 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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(OFF_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: bytes + END FUNCTION h5pset_external_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) + END SUBROUTINE h5pset_external_f + +!****s* H5P/h5pget_external_count_f +! NAME +! h5pget_external_count_f +! +! PURPOSE +! Returns the number of external files for a dataset. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! count - number of external files for the +! specified dataset +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: count ! Number of external files for the + ! Specified dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_external_count_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_count_c(prp_id, count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: count + END FUNCTION h5pget_external_count_c + END INTERFACE + + hdferr = h5pget_external_count_c(prp_id, count) + END SUBROUTINE h5pget_external_count_f + +!****s* H5P/h5pget_external_f +! NAME +! h5pget_external_f +! +! PURPOSE +! Returns information about an external file. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! idx - external file index +! name_size - maximum size of name array +! name - name of the external file +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + 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(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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_external_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: idx + INTEGER(SIZE_T), INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(OFF_T), INTENT(OUT) :: offset + INTEGER(HSIZE_T), INTENT(OUT) :: bytes + END FUNCTION h5pget_external_c + END INTERFACE + + hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + END SUBROUTINE h5pget_external_f + +!****s* H5P/h5pset_btree_ratios_f +! NAME +! h5pset_btree_ratios_f +! +! PURPOSE +! Sets B-tree split ratios for a dataset transfer +! property list. +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(IN) :: left + REAL, INTENT(IN) :: middle + REAL, INTENT(IN) :: right + END FUNCTION h5pset_btree_ratios_c + END INTERFACE + + hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pset_btree_ratios_f + +!****s* H5P/h5pget_btree_ratios_f +! NAME +! h5pget_btree_ratios_f +! +! PURPOSE +! Gets B-tree split ratios for a dataset transfer property list +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! OUTPUTS +! +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(OUT) :: left + REAL, INTENT(OUT) :: middle + REAL, INTENT(OUT) :: right + END FUNCTION h5pget_btree_ratios_c + END INTERFACE + + hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pget_btree_ratios_f + +!****s* H5P/h5pget_fclose_degree_f +! NAME +! h5pget_fclose_degree_f +! +! PURPOSE +! Returns the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(OUT) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_fclose_degree_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: degree + END FUNCTION h5pget_fclose_degree_c + END INTERFACE + + hdferr = h5pget_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pget_fclose_degree_f + +!****s* H5P/h5pset_fclose_degree_f +! NAME +! h5pset_fclose_degree_f +! +! PURPOSE +! Sets the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - file access property list identifier +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(IN) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: degree + END FUNCTION h5pset_fclose_degree_c + END INTERFACE + + hdferr = h5pset_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pset_fclose_degree_f + +!****s* H5P/h5pequal_f +! NAME +! h5pequal_f +! +! PURPOSE +! Checks if two property lists are eqaul +! +! INPUTS +! +! plist1_id - property list identifier +! plist2_id - property list identifier +! OUTPUTS +! +! flag - flag, possible values +! .TRUE. or .FALSE. +! hdferr: - error code +! Success: 0 +! Failure: -1, flag is set to .FALSE. +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! Flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist1_id + INTEGER(HID_T), INTENT(IN) :: plist2_id + INTEGER, INTENT(OUT) :: c_flag + END FUNCTION h5pequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + IF (c_flag .GT. 0) flag = .TRUE. + END SUBROUTINE h5pequal_f + +!****s* H5P/h5pset_buffer_f +! NAME +! h5pset_buffer_f +! +! PURPOSE +! Sets sixe for conversion buffer +! +! INPUTS +! plist_id - data transfer property list identifier +! size - buffer size +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_buffer_c + END INTERFACE + + hdferr = h5pset_buffer_c(plist_id, size) + END SUBROUTINE h5pset_buffer_f + +!****s* H5P/h5pget_buffer_f +! NAME +! h5pget_buffer_f +! +! PURPOSE +! Gets size for conversion buffer +! +! INPUTS +! +! plist_id - data transfer property list identifier +! OUTPUTS +! +! size - buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_buffer_c + END INTERFACE + + hdferr = h5pget_buffer_c(plist_id, size) + END SUBROUTINE h5pget_buffer_f + +!****s* H5P/h5pfill_value_defined_f +! NAME +! h5pfill_value_defined_f +! +! PURPOSE +! Check if fill value is defined. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - fill value status flag +! Possible values are: +! H5D_FILL_VALUE_ERROR_F +! H5D_FILL_VALUE_UNDEFINED_F +! H5D_FILL_VALUE_DEFAULT_F +! H5D_FILL_VALUE_USER_DEFINED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill value status flag + ! H5D_FILL_VALUE_ERROR_F + ! H5D_FILL_VALUE_UNDEFINED_F + ! H5D_FILL_VALUE_DEFAULT_F + ! H5D_FILL_VALUE_USER_DEFINED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pfill_value_defined_c + END INTERFACE + + hdferr = h5pfill_value_defined_c(plist_id, flag) + END SUBROUTINE h5pfill_value_defined_f + +!****s* H5P/h5pset_alloc_time_f +! NAME +! h5pset_alloc_time_f +! +! PURPOSE +! Set space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_alloc_time_c + END INTERFACE + + hdferr = h5pset_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pset_alloc_time_f + +!****s* H5P/h5pget_alloc_time_f +! NAME +! h5pget_alloc_time_f +! +! PURPOSE +! Get space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_alloc_time_c + END INTERFACE + + hdferr = h5pget_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pget_alloc_time_f + +!****s* H5P/h5pset_fill_time_f +! NAME +! h5pset_fill_time_f +! +! PURPOSE +! Set fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fill_time_c + END INTERFACE + + hdferr = h5pset_fill_time_c(plist_id, flag) + END SUBROUTINE h5pset_fill_time_f + +!****s* H5P/h5pget_fill_time_f +! NAME +! h5pget_fill_time_f +! +! PURPOSE +! Get fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! OPTIONAL PARAMETERS +! +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fill_time_c + END INTERFACE + + hdferr = h5pget_fill_time_c(plist_id, flag) + END SUBROUTINE h5pget_fill_time_f + +!****s* H5P/ h5pset_meta_block_size_f +! NAME +! h5pset_meta_block_size_f +! +! PURPOSE +! Sets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! size - metatdata block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_meta_block_size_c + END INTERFACE + + hdferr = h5pset_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pset_meta_block_size_f + +!****s* H5P/h5pget_meta_block_size_f +! NAME +! h5pget_meta_block_size_f +! +! PURPOSE +! Gets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - metatdata block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_meta_block_size_c + END INTERFACE + + hdferr = h5pget_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pget_meta_block_size_f + +!****s* H5P/h5pset_sieve_buf_size_f +! NAME +! h5pset_sieve_buf_size_f +! +! PURPOSE +! Sets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! size - sieve buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_sieve_buf_size_c + END INTERFACE + + hdferr = h5pset_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pset_sieve_buf_size_f + +!****s* H5P/h5pget_sieve_buf_size_f +! NAME +! h5pget_sieve_buf_size_f +! +! PURPOSE +! Gets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - sieve buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_sieve_buf_size_c + END INTERFACE + + hdferr = h5pget_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pget_sieve_buf_size_f + +!****s* H5P/h5pset_small_data_block_size_f +! NAME +! h5pset_small_data_block_size_f +! +! PURPOSE +! Sets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! size - small raw data block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_small_data_block_size_c + END INTERFACE + + hdferr = h5pset_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pset_small_data_block_size_f + +!****s* H5P/h5pget_small_data_block_size_f +! NAME +! h5pget_small_data_block_size_f +! +! PURPOSE +! Gets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - small raw data block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_small_data_block_size_c + END INTERFACE + + hdferr = h5pget_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pget_small_data_block_size_f + +!****s* H5P/h5pset_hyper_vector_size_f +! NAME +! h5pset_hyper_vector_size_f +! +! PURPOSE +! Set the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! size - vector size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_hyper_vector_size_c + END INTERFACE + + hdferr = h5pset_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pset_hyper_vector_size_f + +!****s* H5P/ h5pget_hyper_vector_size_f +! NAME +! h5pget_hyper_vector_size_f +! +! PURPOSE +! Get the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! OUTPUTS +! +! size - vector size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_hyper_vector_size_c + END INTERFACE + + hdferr = h5pget_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pget_hyper_vector_size_f + +!****s* H5P/h5pexist_f +! NAME +! h5pexist_f +! +! PURPOSE +! Queries whether a property name exists in a property list or class. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to check for +! OUTPUTS +! +! flag - logical flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pexist_c + END INTERFACE + flag = .FALSE. + name_len = LEN(name) + hdferr = h5pexist_c(prp_id, name , name_len) + IF (hdferr > 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pexist_f + +!****s* H5P/h5pget_size_f +! +! NAME +! h5pget_size_f +! +! PURPOSE +! Queries the size of a property value in bytes. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to query +! OUTPUTS +! +! size - size of property in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_size_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pget_size_c(prp_id, name , name_len, size) + END SUBROUTINE h5pget_size_f + +!****s* H5P/h5pget_npros_f +! NAME +! h5pget_npros_f +! +! PURPOSE +! Queries number of properties in property list or class +! +! INPUTS +! +! prp_id - iproperty list identifier to query +! OUTPUTS +! +! nprops - number of properties in property object +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: nprops + END FUNCTION h5pget_nprops_c + END INTERFACE + hdferr = h5pget_nprops_c(prp_id, nprops) + END SUBROUTINE h5pget_nprops_f + +!****s* H5P/h5pget_class_name_f +! NAME +! h5pget_class_name_f +! +! PURPOSE +! Queries the name of a class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! name - name of a class +! size - Actual length of the class name +! NOTE: If provided buffer "name" is smaller, +! than name will be truncated to fit into +! provided user buffer. +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Returned the size of name as an argument +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name + INTEGER, INTENT(OUT) :: size ! Actual length of the class name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pget_class_name_c + END INTERFACE + + name_len = LEN(name) + size = h5pget_class_name_c(prp_id, name, name_len) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE h5pget_class_name_f + +!****s* H5P/h5pget_class_parent_f +! NAME +! h5pget_class_parent_f +! +! PURPOSE +! Retrieves the parent class of a genric property class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! parent_id - identifier of the parent class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list + ! identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: parent_id + END FUNCTION h5pget_class_parent_c + END INTERFACE + hdferr = h5pget_class_parent_c(prp_id, parent_id) + END SUBROUTINE h5pget_class_parent_f + +!****s* H5P/h5pisa_class_f +! NAME +! h5pisa_class_f +! +! PURPOSE +! Determines whether a property list is a member of a class. +! +! INPUTS +! +! plist - property list identifier +! pclass - identifier of the property class +! OUTPUTS +! +! flag - .TRUE. if a member, .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier + LOGICAL, INTENT(OUT) :: flag ! logical flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pisa_class_c(plist, pclass) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist + INTEGER(HID_T), INTENT(IN) :: pclass + END FUNCTION h5pisa_class_c + END INTERFACE + flag = .FALSE. + hdferr = h5pisa_class_c(plist, pclass) + IF (hdferr .GT. 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pisa_class_f + +!****s* H5P/h5pcopy_prop_f +! NAME +! h5pcopy_prop_f +! +! PURPOSE +! Copies a property from one list or class to another. +! +! INPUTS +! +! dst_id - Identifier of the destination property list +! src_id - Identifier of the source property list +! name - name of the property to copy +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list + ! identifier + INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Property name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER(HID_T), INTENT(IN) :: src_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pcopy_prop_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) + END SUBROUTINE h5pcopy_prop_f + +!****s* H5P/h5premove_f +! NAME +! h5premove_f +! +! PURPOSE +! Removes a property from a property list. + +! +! INPUTS +! +! plid - Property list identofoer +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5premove_f(plid, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5premove_c(plid, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plid + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5premove_c + END INTERFACE + name_len = LEN(name) + hdferr = h5premove_c(plid, name , name_len) + END SUBROUTINE h5premove_f + +!****s* H5P/h5punregister_f +! NAME +! h5punregister_f +! +! PURPOSE +! Removes a property from a property list class. +! +! INPUTS +! +! class - Property list class identifier +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5punregister_f(class, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5punregister_c(class, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5punregister_c + END INTERFACE + name_len = LEN(name) + hdferr = h5punregister_c(class, name , name_len) + END SUBROUTINE h5punregister_f + +!****s* H5P/h5pclose_class_f +! NAME +! h5pclose_class_f +! +! PURPOSE +! Closes an existing property list class. +! +! INPUTS +! +! class - Property list class identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_class_f(class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pclose_class_c(class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + END FUNCTION h5pclose_class_c + END INTERFACE + hdferr = h5pclose_class_c(class) + END SUBROUTINE h5pclose_class_f + +!****s* H5P/h5pset_shuffle_f +! NAME +! h5pset_shuffle_f +! +! PURPOSE +! Sets shuffling filter +! +! INPUTS +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_shuffle_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shuffle_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_shuffle_c + END INTERFACE + hdferr = h5pset_shuffle_c(prp_id) + + END SUBROUTINE h5pset_shuffle_f + +!****s* H5P/h5pset_edc_check_f +! NAME +! h5pset_edc_check_f +! +! PURPOSE +! Enables/disables error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! flag - EDC flag; possible values: +! H5Z_DISABLE_EDC_F +! H5Z_ENABLE_EDC_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: flag ! Checksum filter flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_edc_check_c + END INTERFACE + hdferr = h5pset_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pset_edc_check_f + +!****s* H5P/h5pget_edc_check_f +! NAME +! h5pget_edc_check_f +! +! PURPOSE +! Queries error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier + INTEGER, INTENT(OUT) :: flag ! Checksum filter flag + ! May have one of the following values: + ! H5Z_ERROR_EDC_F + ! H5Z_DISABLE_EDC_F + ! H5Z_ENABLE_EDC_F + ! H5Z_NO_EDC_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_edc_check_c + END INTERFACE + hdferr = h5pget_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pget_edc_check_f + +!****s* H5P/h5pset_fletcher32_f +! NAME +! h5pset_fletcher32_f +! +! PURPOSE +! Sets Fletcher32 checksum of EDC for a dataset creation +! property list. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fletcher32_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fletcher32_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fletcher32_c + END INTERFACE + hdferr = h5pset_fletcher32_c(prp_id) + + END SUBROUTINE h5pset_fletcher32_f + +!****s* H5P/ h5pset_family_offset_f +! NAME +! h5pset_family_offset_f +! +! PURPOSE +! Sets offset for family file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! offset - file offset +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 19 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_family_offset_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: offset + END FUNCTION h5pset_family_offset_c + END INTERFACE + hdferr = h5pset_family_offset_c(prp_id, offset) + + END SUBROUTINE h5pset_family_offset_f + +!****s* H5P/h5pset_fapl_multi_l +! NAME +! h5pset_fapl_multi_l +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 20 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: flag = 0 + INTEGER :: i + + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + IF(relax) flag = 1 + hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) + + END SUBROUTINE h5pset_fapl_multi_l +!****s* H5P/h5pset_fapl_multi_s +! NAME +! h5pset_fapl_multi_s +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 31 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag + +! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_sc + END INTERFACE + flag = 0 + IF (relax) flag = 1 + hdferr = h5pset_fapl_multi_sc(prp_id, flag) + + END SUBROUTINE h5pset_fapl_multi_s +!****s* H5P/h5pget_fapl_multi_f +! NAME +! h5pget_fapl_multi_f +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! OPTIONAL PARAMETERS +! maxlen_out - maximum length for memb_name array element +! +! AUTHOR +! Elena Pourmal +! 24 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out + LOGICAL, INTENT(OUT) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER :: flag + INTEGER :: i +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag, c_maxlen_out) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + + relax = .TRUE. + IF(flag .EQ. 0) relax = .FALSE. + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + END SUBROUTINE h5pget_fapl_multi_f +!****s* H5P/h5pset_szip_f +! NAME +! h5pset_szip_f +! +! PURPOSE +! Sets up use of szip compression +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! options_mask - A bit-mask conveying the desired SZIP options. +! Current valid values in Fortran are: +! H5_SZIP_EC_OM_F +! H5_SZIP_NN_OM_F +! pixels_per_block - szip parameters +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired + ! SZIP options + ! Current valid values in Fortran are: + ! H5_SZIP_EC_OM_F + ! H5_SZIP_NN_OM_F + INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements + ! in each data block + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_szip_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: options_mask + INTEGER, INTENT(IN) :: pixels_per_block + END FUNCTION h5pset_szip_c + END INTERFACE + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + + END SUBROUTINE h5pset_szip_f + +!****s* H5P/h5pall_filters_avail_f +! NAME +! h5pall_filters_avail_f +! +! PURPOSE +! Checks if all filters set in the dataset creation +! property list are available +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! flag - .TRUE. if all filters are available +! .FALSE. otherwise +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available + ! .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status + +! INTEGER, EXTERNAL :: h5pall_filters_avail_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pall_filters_avail_c + END INTERFACE + flag = .TRUE. + hdferr = h5pall_filters_avail_c(prp_id, status) + IF (status .EQ. 0 ) flag = .FALSE. + + END SUBROUTINE h5pall_filters_avail_f + +!****s* H5P/h5pget_filter_by_id_f +! NAME +! h5pget_filter_by_id_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! filter_id - filter identifier +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_id ! Filter identifier + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_filter_by_id_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_id + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + END FUNCTION h5pget_filter_by_id_c + END INTERFACE + + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + END SUBROUTINE h5pget_filter_by_id_f + +!****s* H5P/h5pmodify_filter_f +! NAME +! h5pmodify_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be modified +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be modified + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pmodify_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pmodify_filter_c + END INTERFACE + + hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pmodify_filter_f + +!****s* H5P/h5premove_filter_f +! NAME +! h5premove_filter_f +! +! PURPOSE +! Delete one or more filters from the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be removed +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Quincey Koziol +! January 27 2004 +! +! Fortran90 Interface: + SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list + ! identifier + INTEGER, INTENT(IN) :: filter ! Filter to be removed + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5premove_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + END FUNCTION h5premove_filter_c + END INTERFACE + + hdferr = h5premove_filter_c(prp_id, filter) + END SUBROUTINE h5premove_filter_f + +!****s* H5P/H5Pget_attr_phase_change_f +! NAME +! H5Pget_attr_phase_change_f +! +! PURPOSE +! Retrieves attribute storage phase change thresholds +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + ! (Default: 8) + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_attr_phase_change_c + END INTERFACE + + hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_attr_phase_change_f + +!****s* H5P/H5Pset_attr_creation_order_f +! NAME +! H5Pset_attr_creation_order_f +! +! PURPOSE +! Sets tracking and indexing of attribute creation order +! +! INPUTS +! +! ocpl_id - Object creation property list identifier +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5Pset_attr_creation_order_c + END INTERFACE + + hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + END SUBROUTINE h5pset_attr_creation_order_f + +!****s* H5P/H5Pset_shared_mesg_nindexes_f +! NAME +! H5Pset_shared_mesg_nindexes_f +! +! PURPOSE +! Sets number of shared object header message indexes +! +! INPUTS +! +! plist_id - file creation property list +! nindexes - Number of shared object header message indexes to be available in files created with this property list +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list + INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes + ! available in files created WITH this property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: nindexes + + END FUNCTION H5pset_shared_mesg_nindexes_c + END INTERFACE + + hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + + END SUBROUTINE h5pset_shared_mesg_nindexes_f + +!****s* H5P/H5Pset_shared_mesg_index_f +! NAME +! H5Pset_shared_mesg_index_f +! +! PURPOSE +! Configures the specified shared object header message index +! +! INPUTS +! +! fcpl_id - File creation property list identifier. +! index_num - Index being configured. +! mesg_type_flags - Types of messages that should be stored in this index. +! min_mesg_size - Minimum message size. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list + INTEGER, INTENT(IN) :: index_num ! Index being configured. + INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. + INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER, INTENT(IN) :: index_num + INTEGER, INTENT(IN) :: mesg_type_flags + INTEGER, INTENT(IN) :: min_mesg_size + + END FUNCTION H5pset_shared_mesg_index_c + END INTERFACE + + hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + END SUBROUTINE h5pset_shared_mesg_index_f + +!****s* H5P/H5Pget_attr_creation_order_f +! NAME +! H5Pget_attr_creation_order_f +! +! PURPOSE +! Retrieves tracking and indexing settings for attribute creation order +! +! INPUTS +! +! ocpl_id - Object (group or dataset) creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_attr_creation_order_c + END INTERFACE + + hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + END SUBROUTINE h5pget_attr_creation_order_f + +!****s* H5P/H5Pset_libver_bounds_f +! NAME +! H5Pset_libver_bounds_f +! +! PURPOSE +! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. +! +! INPUTS +! +! fapl_id - File access property list identifier +! low - The earliest version of the library that will be used for writing objects. +! high - The latest version of the library that will be used for writing objects. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. + ! Currently, low must be one of two pre-defined values: + ! HDF_LIBVER_EARLIEST_F + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. + ! Currently, low must set to the pre-defined value: + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: low + INTEGER, INTENT(IN) :: high + + END FUNCTION H5pset_libver_bounds_c + END INTERFACE + + hdferr = h5pset_libver_bounds_c(fapl_id, low, high) + + END SUBROUTINE h5pset_libver_bounds_f + +!****s* H5P/H5Pset_link_creation_order_f +! NAME +! H5Pset_link_creation_order_f +! +! PURPOSE +! Sets creation order tracking and indexing for links in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! crt_order_flags - Creation order flag(s) +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5pset_link_creation_order_c + END INTERFACE + + hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pset_link_creation_order_f + +!****s* H5P/H5Pget_link_phase_change_f +! NAME +! H5Pget_link_phase_change_f +! +! PURPOSE +! Queries the settings for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_link_phase_change_c + END INTERFACE + + hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_link_phase_change_f + +!****s* H5P/H5Pget_obj_track_times_f +! NAME +! H5Pget_obj_track_times_f +! +! PURPOSE +! Returns whether times are tracked for an object. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pget_obj_track_times_c + END INTERFACE + flag = .TRUE. + hdferr = h5pget_obj_track_times_c(plist_id, status) + IF(status.EQ.0) flag = .FALSE. + + END SUBROUTINE h5pget_obj_track_times_f + +!****s* H5P/H5Pset_obj_track_times_f +! NAME +! H5Pset_obj_track_times_f +! +! PURPOSE +! Set whether the birth, access, modification & change times for +! an object are stored. +! +! Birth time is the time the object was created. Access time is +! the last time that metadata or raw data was read from this +! object. Modification time is the last time the data for +! this object was changed (either writing raw data to a dataset +! or inserting/modifying/deleting a link in a group). Change +! time is the last time the metadata for this object was written +! (adding/modifying/deleting an attribute on an object, extending +! the size of a dataset, etc). +! +! If these times are not tracked, they will be reported as +! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX +! epoch) when queried. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(IN) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(IN) :: status + END FUNCTION h5pset_obj_track_times_c + END INTERFACE + + status = 0 + IF(flag) status = 1 + + hdferr = h5pset_obj_track_times_c(plist_id, status) + + END SUBROUTINE h5pset_obj_track_times_f + +!****s* H5P/H5Pset_create_inter_group_f +! NAME +! H5Pset_create_inter_group_f +! +! PURPOSE +! Specifies in property list whether to create missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - crt_intermed_group specifying whether +! to create intermediate groups upon the creation +! of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! HISTORY +! The long subroutine name (>31) on older f90 compilers causes problems +! so had to shorten the name +! Fortran90 Interface: + SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups + ! upon the creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pset_create_inter_group_c + END INTERFACE + + hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pset_create_inter_group_f + +!****s* H5P/H5Pget_link_creation_order_f +! NAME +! H5Pget_link_creation_order_f +! +! PURPOSE +! Queries whether link creation order is tracked and/or indexed in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Creation order flag(s) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_link_creation_order_c + END INTERFACE + + hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pget_link_creation_order_f + +!****s* H5P/H5Pset_char_encoding_f +! NAME +! H5Pset_char_encoding_f +! +! PURPOSE +! Sets the character encoding used to encode a string. +! +! INPUTS +! +! plist_id - Property list identifier +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! +! OUTPUTS +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + INTEGER, INTENT(IN) :: encoding ! String encoding character set: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: encoding + + END FUNCTION H5pset_char_encoding_c + END INTERFACE + + hdferr = h5pset_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pset_char_encoding_f + +!****s* H5P/H5Pget_char_encoding_f +! NAME +! H5Pget_char_encoding_f +! +! PURPOSE +! Retrieves the character encoding used to create a string +! +! INPUTS +! +! plist_id - Property list identifier +! +! OUTPUTS +! +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + + INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: encoding + + END FUNCTION H5pget_char_encoding_c + END INTERFACE + + hdferr = h5pget_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pget_char_encoding_f + +!****s* H5P/h5pset_copy_object_f +! NAME +! h5pset_copy_object_f +! +! PURPOSE +! Sets properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! copy_options - Copy option(s) to be set +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(IN) :: copy_options + END FUNCTION h5pset_copy_object_c + END INTERFACE + hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pset_copy_object_f + +!****s* H5P/h5pget_copy_object_f +! NAME +! h5pget_copy_object_f +! +! PURPOSE +! Retrieves the properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! OUTPUTS +! +! copy_options - Copy option(s) to be get +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(OUT) :: copy_options + END FUNCTION h5pget_copy_object_c + END INTERFACE + hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pget_copy_object_f + +!****s* H5P/h5pget_data_transform_f +! NAME +! h5pget_data_transform_f +! +! PURPOSE +! Retrieves a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! OUTPUTS +! +! expression - buffer to hold transform expression +! hdferr - Error code +! Success: Actual lenght of the expression +! If provided buffer "expression" is +! smaller, than expression will be +! truncated to fit into +! provided user buffer +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! HISTORY +! +! Should hdferr return just 0 or 1 and add another arguement for the size? +! Fortran90 Interface: +SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + INTEGER(SIZE_T) :: size_default + + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(OUT) :: expression + INTEGER(SIZE_T) :: size_default + INTEGER :: expression_len + END FUNCTION h5pget_data_transform_c + END INTERFACE + + size_default = 0 + expression_len = LEN(expression) + + hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + + IF(present(size)) size = size_default + + END SUBROUTINE h5pget_data_transform_f + +!****s* H5P/h5pset_data_transform_f +! NAME +! h5pset_data_transform_f +! +! PURPOSE +! Sets a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! expression - Buffer to hold transform expression +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(IN) :: expression + INTEGER :: expression_len + END FUNCTION h5pset_data_transform_c + END INTERFACE + + expression_len = LEN(expression) + hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) + + END SUBROUTINE h5pset_data_transform_f + +!****s* H5P/H5Pget_local_heap_size_hint_f +! NAME +! H5Pget_local_heap_size_hint_f +! +! PURPOSE +! Queries the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! size_hint - Hint for size of local heap +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(OUT) :: size_hint + END FUNCTION H5Pget_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pget_local_heap_size_hint_f + +!****s* H5P/H5Pget_est_link_info_f +! NAME +! H5Pget_est_link_info_f +! +! PURPOSE +! Queries data required to estimate required local heap or object header size. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: est_num_entries + INTEGER, INTENT(OUT) :: est_name_len + END FUNCTION h5pget_est_link_info_c + END INTERFACE + + hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pget_est_link_info_f + +!****s* H5P/H5Pset_local_heap_size_hint_f +! NAME +! H5Pset_local_heap_size_hint_f +! +! PURPOSE +! Sets the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! size_hint - Hint for size of local heap +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(IN) :: size_hint + END FUNCTION h5pset_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pset_local_heap_size_hint_f + +!****s* H5P/h5pset_est_link_info_f +! NAME +! h5pset_est_link_info_f +! +! PURPOSE +! Sets estimated number of links and length of link names in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: est_num_entries + INTEGER, INTENT(IN) :: est_name_len + END FUNCTION h5pset_est_link_info_c + END INTERFACE + + hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pset_est_link_info_f + +!****s* H5P/h5pset_link_phase_change_f +! NAME +! h5pset_link_phase_change_f +! +! PURPOSE +! Sets the parameters for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_link_phase_change_c + END INTERFACE + + hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pset_link_phase_change_f + +!****s* H5P/h5pset_fapl_direct_f +! NAME +! h5pset_fapl_direct_f +! +! PURPOSE +! Sets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(IN) :: alignment + INTEGER(SIZE_T), INTENT(IN) :: block_size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size + END FUNCTION h5pset_fapl_direct_c + END INTERFACE + + hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pset_fapl_direct_f + +!****s* H5P/h5pget_fapl_direct_f +! NAME +! h5pget_fapl_direct_f +! +! PURPOSE +! Gets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(OUT) :: alignment + INTEGER(SIZE_T), INTENT(OUT) :: block_size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size + END FUNCTION h5pget_fapl_direct_c + END INTERFACE + + hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pget_fapl_direct_f + +!****s* H5P/H5Pset_attr_phase_change_f +! NAME +! H5Pset_attr_phase_change_f +! +! PURPOSE +! Sets attribute storage phase change thresholds. +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + !(Default: 8) + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_attr_phase_change_c + END INTERFACE + + hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + + + END SUBROUTINE h5pset_attr_phase_change_f + +!****s* H5P/H5Pset_nbit_f +! NAME +! H5Pset_nbit_f +! +! PURPOSE +! Sets up the use of the N-Bit filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_nbit_f(plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION H5Pset_nbit_c(plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + END FUNCTION H5Pset_nbit_c + END INTERFACE + + hdferr = H5Pset_nbit_c(plist_id) + + END SUBROUTINE h5pset_nbit_f + +!****s* H5P/h5pset_scaleoffset_f +! NAME +! h5pset_scaleoffset_f +! +! PURPOSE +! Sets up the use of the scale-offset filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! scale_type - Flag indicating compression method. Valid values: +! H5Z_SO_FLOAT_DSCALE_F +! H5Z_SO_FLOAT_ESCALE_F +! H5Z_SO_INT_F +! +! scale_factor - Parameter related to scale. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(IN) :: scale_type + INTEGER , INTENT(IN) :: scale_factor + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: scale_type + INTEGER, INTENT(IN) :: scale_factor + END FUNCTION h5pset_scaleoffset_c + END INTERFACE + + hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) + + END SUBROUTINE h5pset_scaleoffset_f + +!****s* H5P/h5pset_nlinks_f +! NAME +! h5pset_nlinks_f +! +! PURPOSE +! Sets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(IN) :: nlinks + END FUNCTION h5pset_nlinks_c + END INTERFACE + + hdferr = h5pset_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pset_nlinks_f + +!****s* H5P/h5pget_nlinks_f +! NAME +! h5pget_nlinks_f +! +! PURPOSE +! Gets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(OUT) :: nlinks + END FUNCTION h5pget_nlinks_c + END INTERFACE + + hdferr = h5pget_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pget_nlinks_f + +!****s* H5P/H5Pget_create_inter_group_f +! NAME +! H5Pget_create_inter_group_f +! +! PURPOSE +! Determines whether property is set to enable creating missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - Specifying whether to create intermediate groups upon +! the creation of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 4, 2008 +! +! HISTORY +! +! The long subroutine name (>31) on older f90 compilers causes problems +! so the name was shortened +! Fortran90 Interface: + SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups + ! upon creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pget_create_inter_group_c + END INTERFACE + + hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pget_create_inter_group_f + +!****s* H5P/H5Pset_chunk_cache_f +! NAME +! H5Pset_chunk_cache_f +! +! PURPOSE +! Set the number of objects in the meta data cache and the +! maximum number of chunks and bytes in the raw data chunk cache. +! Once set, these values will override the values in the file access +! property list. Each of these values can be individually unset +! (or not set at all) by passing the macros: +! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, +! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or +! H5D_CHUNK_CACHE_W0_DFLT_F +! as appropriate. +! +! The RDCC_W0 value should be between 0 and 1 inclusive and +! indicates how much chunks that have been fully read or fully +! written are favored for preemption. A value of zero means +! fully read or written chunks are treated no differently than +! other chunks (the preemption is strictly LRU) while a value +! of one means fully read chunks are always preempted before +! other chunks. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. +! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. +! rdcc_w0 - The chunk preemption policy for this dataset. +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data + ! chunk cache for this dataset. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache + ! for this dataset. + REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_chunk_cache_c + END INTERFACE + + hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pset_chunk_cache_f + +!****s* H5P/H5Pget_chunk_cache_f +! NAME +! H5Pget_chunk_cache_f +! +! PURPOSE +! Retrieves the maximum possible number of elements in the meta +! data cache and the maximum possible number of elements and +! bytes and the RDCC_W0 value in the raw data chunk cache. Any +! (or all) arguments may be null pointers in which case the +! corresponding datum is not returned. If these properties have +! not been set on this property list, the default values for a +! file access property list are returned. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! OUTPUTS +! +! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. +! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. +! rdcc_w0 - Preemption policy. +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_chunk_cache_c + END INTERFACE + + hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pget_chunk_cache_f + +! +!****s* H5P (F03)/h5pset_fill_value_f_F90 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! IMPLICIT NONE +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_integer +! +!****s* H5P (F03)/h5pget_fill_value_f_F90 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_integer + + + SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_real + + + SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_real + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr ! C address + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(fillvalue) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + f_ptr = C_LOC(chr(1)(1:1)) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + DO i = 1, chr_len + fillvalue(i:i) = chr(i) + ENDDO + DEALLOCATE(chr) + + END SUBROUTINE h5pget_fill_value_char +! +!****s* H5P (F03)/h5pset_fill_value_f_F03 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pset_fill_value_ptr + +! +!****s* H5P (F03)/h5pget_fill_value_f_F03 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pget_fill_value_ptr + +! +!****s* H5P (F03)/h5pset_f_F90 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_integer + + SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_real + + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pset_char +! +!****s* H5P (F03)/h5pget_f_F90 +! +! NAME +! h5pget_f +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pget_integer + + SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_real + + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + TYPE(C_PTR) :: f_ptr + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DO i = 1, chr_len + value(i:i) = chr(i) + ENDDO + + DEALLOCATE(chr) + + END SUBROUTINE h5pget_char + + +! +!****s* H5P (F03)/h5pset_f_F03 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Pointer to value to set the property to +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pset_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pset_ptr +! +!****s* H5P (F03)/h5pget_f_F03 +! +! NAME +! h5pget_f (F03) +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Pointer to a location to which to copy the value of of the property +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pget_ptr + + +! +!****s* H5P (F03)/h5pregister_f_F90 +! +! NAME +! h5pregister +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_integer + + SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_real + + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + DEALLOCATE(chr) + END SUBROUTINE h5pregister_char +! +!****s* H5P (F03)/h5pregister_f_F03 +! +! NAME +! h5pregister (F03) +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Pointer to value to set the property to +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, value) + END SUBROUTINE h5pregister_ptr + +! +!****s* H5P (F03)/h5pinsert_f_F90 +! +! NAME +! h5pinsert (f90) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + END SUBROUTINE h5pinsert_integer + + SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_real + + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(c_ptr) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pinsert_char + +! +!****s* H5P (F03)/h5pinsert_f_F03 +! +! NAME +! h5pinsert (f03) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Pointer to new value pointer for the property being modified +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + TYPE(c_ptr), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_ptr +! +!****s* H5P (F03)/h5pcreate_class_f_F03 +! +! NAME +! h5pcreate_class_f +! +! PURPOSE +! Create a new property list class +! +! Inputs: +! parent - Parent property list class identifier +! Possible values include: +! H5P_ROOT_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! name - Name of property to create +! +! Outputs: +! class - Property list class identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! H5P_cls_create_func_t (create) - Callback routine called when a property list is created +! create_data - User pointer to any class creation information needed +! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied +! copy_data - User pointer to any class copy information needed +! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed +! close_data - User pointer to any class close information needed +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Added callback arguments +! M. Scot Breitenfeld, July 3, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: class + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data + TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close +!***** + INTEGER :: name_len + TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default + TYPE(C_FUNPTR) :: create_default, copy_default, close_default + INTERFACE + INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & + create, create_data, copy, copy_data, close, close_data) & + BIND(C, NAME='h5pcreate_class_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + TYPE(C_PTR), VALUE :: create_data, copy_data, close_data + TYPE(C_FUNPTR), VALUE :: create, copy, close + END FUNCTION h5pcreate_class_c + END INTERFACE + name_len = LEN(name) + + create_default = c_null_funptr !fix:scot + create_data_default = c_null_ptr + copy_default = c_null_funptr !fix:scot + copy_data_default = c_null_ptr + close_default = c_null_funptr !fix:scot + close_data_default = c_null_ptr + + IF(PRESENT(create)) create_default = create + IF(PRESENT(create_data)) create_data_default = create_data + IF(PRESENT(copy)) copy_default = copy + IF(PRESENT(copy_data)) copy_data_default = copy_data + IF(PRESENT(close)) close_default = close + IF(PRESENT(close_data)) close_data_default = close_data + + hdferr = h5pcreate_class_c(parent, name , name_len, class, & + create_default, create_data_default, & + copy_default, copy_data_default, & + close_default, close_data_default) + + END SUBROUTINE h5pcreate_class_f + +! +!****s* H5P (F03)/h5pset_file_image_f_F03 +! +! NAME +! h5pset_file_image_f +! +! PURPOSE +! Sets an initial file image in a memory buffer. +! +! Inputs: +! fapl_id - File access property list identifier +! buf_ptr - Pointer to the initial file image, +! or C_NULL_PTR if no initial file image is desired +! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(IN) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & + BIND(C, NAME='h5pset_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + END FUNCTION h5pset_file_image_c + END INTERFACE + + hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) + + END SUBROUTINE h5pset_file_image_f +! +!****s* H5P (F03)/h5pget_file_image_f_F03 +! +! NAME +! h5pget_file_image_f +! +! PURPOSE +! Retrieves a copy of the file image designated as the initial content and structure of a file. +! +! Inputs: +! fapl_id - File access property list identifier. +! +! Outputs: +! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type +! c_loc. If buf_ptr is not C_NULL_PTR, on successful +! return, buf_ptr shall contain a C pointer to a copy +! of the initial image provided in the last call to +! H5Pset_file_image_f for the supplied fapl_id, or +! buf_ptr shall contain a C_NULL_PTR if there is no +! initial image set. +! +! buf_len_ptr - Contains the value of the buffer parameter for +! the initial image in the supplied fapl_id. The value +! will be 0 if no initial image is set. +! +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + INTEGER , INTENT(OUT) :: hdferr + +!***** + INTERFACE + INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & + BIND(C, NAME='h5pget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + END FUNCTION h5pget_file_image_c + END INTERFACE + + hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) + + END SUBROUTINE h5pget_file_image_f + +END MODULE H5P + + + diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 deleted file mode 100644 index 18da887..0000000 --- a/fortran/src/H5Pff.f90 +++ /dev/null @@ -1,7624 +0,0 @@ -!****h* ROBODoc/H5P (F90) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 H5P 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 H5P - - USE H5GLOBAL - - INTERFACE h5pset_fapl_multi_f - MODULE PROCEDURE h5pset_fapl_multi_l - MODULE PROCEDURE h5pset_fapl_multi_s - END INTERFACE - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_fill_value_ptr - - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_fill_value_ptr - - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_ptr - - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_ptr - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - ! Recommended procedure: - MODULE PROCEDURE h5pregister_ptr - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - ! Recommended procedure: - MODULE PROCEDURE h5pinsert_ptr - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pget_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pget_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pset_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pset_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pset_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pget_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pget_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & - BIND(C, NAME='h5pregister_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pregister_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & - BIND(C, NAME='h5pinsert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pinsert_c - END INTERFACE - -CONTAINS - -!****s* H5P/h5pcreate_f -! NAME -! h5pcreate_f -! -! PURPOSE -! Creates a new property as an instance of a property -! list class. -! -! INPUTS -! class - type of the property class to be created. -! Possible values are: -! H5P_OBJECT_CREATE_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_ACCESS_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! H5P_GROUP_CREATE_F -! H5P_GROUP_ACCESS_F -! H5P_DATATYPE_CREATE_F -! H5P_DATATYPE_ACCESS_F -! H5P_STRING_CREATE_F -! H5P_ATTRIBUTE_CREATE _F -! H5P_OBJECT_COPY_F -! H5P_LINK_CREATE_F -! H5P_LINK_ACCESS_F -! -! OUTPUTS -! prp_id - property list identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcreate_f(class, prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - INTEGER , INTENT(OUT) :: hdferr -!***** -! INTEGER, EXTERNAL :: h5pcreate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcreate_c(class, prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - END FUNCTION h5pcreate_c - END INTERFACE - - hdferr = h5pcreate_c(class, prp_id) - END SUBROUTINE h5pcreate_f - -!****s* H5P/h5pset_preserve_f -! NAME -! h5pset_preserve_f -! -! PURPOSE -! Sets the dataset transfer property list status to -! TRUE or FALSE for initializing compound datatype -! members during write/read operations. -! -! INPUTS -! prp_id - property list identifier -! flag - status flag -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset - ! transfer property for partila writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - -! INTEGER, EXTERNAL :: h5pset_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pset_preserve_c - END INTERFACE - flag_c = 0 - IF(flag) flag_c = 1 - hdferr = h5pset_preserve_c(prp_id, flag_c) - END SUBROUTINE h5pset_preserve_f - -!****s* H5P/h5pget_preserve_f -! NAME -! h5pget_preserve_f -! -! PURPOSE -! Checks status of the dataset transfer property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! flag - status flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's - ! transfer property for partial writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - -! INTEGER, EXTERNAL :: h5pget_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pget_preserve_c - END INTERFACE - - hdferr = h5pget_preserve_c(prp_id, flag_c) - flag = .FALSE. - IF(flag_c .EQ. 1) flag = .TRUE. - END SUBROUTINE h5pget_preserve_f - -!****s* H5P/h5pget_class_f -! NAME -! h5pget_class_f -! -! PURPOSE -! Returns the property list class for a property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! classtype - property list class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list - ! to be created. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_c(prp_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: classtype - END FUNCTION h5pget_class_c - END INTERFACE - - hdferr = h5pget_class_c(prp_id, classtype) - END SUBROUTINE h5pget_class_f - -!****s* H5P/h5pcopy_f -! NAME -! h5pcopy_f -! -! PURPOSE -! Copies an existing property list to create a new -! property list -! -! INPUTS -! prp_id - property list identifier -! OUTPUTS -! new_prp_id - new property list identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pcopy_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: new_prp_id - END FUNCTION h5pcopy_c - END INTERFACE - - hdferr = h5pcopy_c(prp_id, new_prp_id) - END SUBROUTINE h5pcopy_f - -!****s* H5P/h5pclose_f -! NAME -! h5pclose_f -! -! PURPOSE -! Terminates access to a property list. -! -! INPUTS -! prp_id - identifier of the property list to -! terminate access to. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pclose_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pclose_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pclose_c - END INTERFACE - - hdferr = h5pclose_c(prp_id) - END SUBROUTINE h5pclose_f - -!****s* H5P/h5pset_chunk_f -! NAME -! h5pset_chunk_f -! -! PURPOSE -! Sets the size of the chunks used to store -! a chunked layout dataset. -! -! INPUTS -! prp_id - datatset creation property list identifier -! ndims - number of dimensions for each chunk -! dims - array with dimension sizes for each chunk -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ndims - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - END FUNCTION h5pset_chunk_c - END INTERFACE - - hdferr = h5pset_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pset_chunk_f - -!****s* H5P/h5pget_chunk_f -! NAME -! h5pget_chunk_f -! -! PURPOSE -! Retrieves the size of chunks for the raw data of a -! chunked layout dataset -! -! INPUTS -! prp_id - property list identifier -! ndims - size of dims array -! OUTPUTS -! dims - array with dimension sizes for each chunk -! hdferr - error code -! Success: number of chunk dimensions -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to - ! to return - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! number of chunk dimensions on success, - ! -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: ndims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5pget_chunk_c - END INTERFACE - - hdferr = h5pget_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pget_chunk_f - -!****s* H5P/h5pset_deflate_f -! NAME -! h5pset_deflate_f -! -! PURPOSE -! Sets compression method and compression level. -! -! INPUTS -! prp_id - property list identifier -! level - compression level -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_deflate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_deflate_c(prp_id, level) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: level - END FUNCTION h5pset_deflate_c - END INTERFACE - hdferr = h5pset_deflate_c(prp_id, level) - - END SUBROUTINE h5pset_deflate_f - -!****s* H5P/h5pget_version_f -! NAME -! h5pget_version_f -! -! PURPOSE -! Retrieves the version information of various objects -! for a file creation property list -! -! INPUTS -! prp_id - file createion property list identifier -! OUTPUTS -! boot - super block version number -! freelist - global freelist version number -! stab - symbol table version number -! shhdr - shared object header version number -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & - stab, shhdr, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot - ! block version number - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global - ! Freelist version number - - INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol - ! table version number - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared - ! object header version number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_version_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(:), INTENT(OUT) :: boot - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist - INTEGER, DIMENSION(:), INTENT(OUT) :: stab - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr - END FUNCTION h5pget_version_c - END INTERFACE - - hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - END SUBROUTINE h5pget_version_f - -!****s* H5P/h5pset_userblock_f -! NAME -! h5pset_userblock_f -! -! PURPOSE -! Sets user block size -! -! INPUTS -! prp_id - file creation property list to modify -! size - size of the user-block in bytes -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_userblock_c(prp_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_userblock_c - END INTERFACE - - hdferr = h5pset_userblock_c(prp_id, size) - END SUBROUTINE h5pset_userblock_f - -!****s* H5P/h5pget_userblock_f -! NAME -! h5pget_userblock_f -! -! PURPOSE -! Gets user block size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! block_size - size of the user block in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the - ! user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: block_size - END FUNCTION h5pget_userblock_c - END INTERFACE - hdferr = h5pget_userblock_c(prp_id, block_size) - END SUBROUTINE h5pget_userblock_f - -!****s* H5P/h5pset_sizes_f -! NAME -! h5pset_sizes_f -! -! PURPOSE -! Sets the byte size of the offsets and lengths used -! to address objects in an HDF5 file. -! -! INPUTS -! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pset_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size - END FUNCTION h5pset_sizes_c - END INTERFACE - - hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pset_sizes_f - -!****s* H5P/h5pget_sizes_f -! NAME -! h5pget_sizes_f -! -! PURPOSE -! Retrieves the size of the offsets and lengths used -! in an HDF5 file -! -! INPUTS -! prp_id - file creation property list identifier -! OUTPUTS -! -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size - END FUNCTION h5pget_sizes_c - END INTERFACE - - hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pget_sizes_f - -!****s* H5P/h5pset_sym_k_f -! NAME -! h5pset_sym_k_f -! -! PURPOSE -! Sets the size of parameters used to control the -!symbol table nodes -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - symbol table tree rank -! lk - symbol table node size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - INTEGER, INTENT(IN) :: lk - END FUNCTION h5pset_sym_k_c - END INTERFACE - - hdferr = h5pset_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pset_sym_k_f -!****s* H5P/h5pget_sym_k_f -! NAME -! h5pget_sym_k_f -! -! PURPOSE -! Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - symbol table tree 1/2 rank -! lk - symbol table node 1/2 size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank - INTEGER, INTENT(OUT) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - INTEGER, INTENT(OUT) :: lk - END FUNCTION h5pget_sym_k_c - END INTERFACE - - hdferr = h5pget_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pget_sym_k_f -!****s* H5P/h5pset_istore_k_f -! NAME -! h5pset_istore_k_f -! -! PURPOSE -! Sets the size of the parameter used to control the -! B-trees for indexing chunked datasets -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - 1/2 rank of chunked storage B-tree -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - END FUNCTION h5pset_istore_k_c - END INTERFACE - - hdferr = h5pset_istore_k_c(prp_id, ik) - END SUBROUTINE h5pset_istore_k_f - -!****s* H5P/h5pget_istore_k_f -! NAME -! h5pget_istore_k_f -! -! PURPOSE -! Queries the 1/2 rank of an indexed storage B-tree. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - 1/2 rank of chunked storage B-tree -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - END FUNCTION h5pget_istore_k_c - END INTERFACE - - hdferr = h5pget_istore_k_c(prp_id, ik) - END SUBROUTINE h5pget_istore_k_f - -!****s* H5P/h5pget_driver_f -! NAME -! h5pget_driver_f -! -! PURPOSE -! Returns low-lever driver identifier. -! -! INPUTS -! -! prp_id - file access or data transfer property -! list identifier. -! OUTPUTS -! -! driver - low-level driver identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_driver_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_driver_c(prp_id, driver) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: driver - END FUNCTION h5pget_driver_c - END INTERFACE - - hdferr = h5pget_driver_c(prp_id, driver) - END SUBROUTINE h5pget_driver_f - -!****s* H5P/h5pset_fapl_stdio_f -! NAME -! h5pset_fapl_stdio_f -! -! PURPOSE -! Sets the standard I/O driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fapl_stdio_c - END INTERFACE - - hdferr = h5pset_fapl_stdio_c(prp_id) - END SUBROUTINE h5pset_fapl_stdio_f - -!****s* H5P/h5pget_stdio_f -! NAME -! h5pget_stdio_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) -! -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: io ! value indicates that the file - !access property list is set to - !the stdio driver -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_stdio_c -! hdferr = h5pget_stdio_c(prp_id, io) -! END SUBROUTINE h5pget_stdio_f - -!****s* H5P/h5pset_fapl_sec2_f -! NAME -! h5pset_fapl_sec2_f -! -! PURPOSE -! Sets the sec2 driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - END FUNCTION h5pset_fapl_sec2_c - END INTERFACE - - hdferr = h5pset_fapl_sec2_c(prp_id) - END SUBROUTINE h5pset_fapl_sec2_f - -!****s* H5P/h5pget_sec2_f -! NAME -! h5pget_sec2_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file - !driver uses the functions declared - !in the unistd.h file -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sec2_c -! hdferr = h5pget_sec2_c(prp_id, sec2) -! END SUBROUTINE h5pget_sec2_f - -!****s* H5P/h5pset_alignment_f -! NAME -! h5pset_alignment_f -! -! PURPOSE -! Sets alignment properties of a file access property list. -! -! INPUTS -! -! prp_id - file access property list identifier -! threshold - threshold value -! alignment - alignment value -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: threshold - INTEGER(HSIZE_T), INTENT(IN) :: alignment - END FUNCTION h5pset_alignment_c - END INTERFACE - - hdferr = h5pset_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pset_alignment_f - -!****s* H5P/h5pget_alignment_f -! NAME -! h5pget_alignment_f -! -! PURPOSE -! Retrieves the current settings for alignment -! properties from a file access property list. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! threshold - threshold value -! alignment - alignment value -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: threshold - INTEGER(HSIZE_T), INTENT(OUT) :: alignment - END FUNCTION h5pget_alignment_c - END INTERFACE - - hdferr = h5pget_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pget_alignment_f - -!****s* H5P/h5pset_fapl_core_f -! NAME -! h5pset_fapl_core_f -! -! PURPOSE -! Modifies the file access property list to use the -! H5FD_CORE driver. -! -! INPUTS -! prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. - LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - -! INTEGER, EXTERNAL :: h5pset_fapl_core_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pset_fapl_core_c - END INTERFACE - backing_store_flag = 0 - IF(backing_store) backing_store_flag = 1 - hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - END SUBROUTINE h5pset_fapl_core_f - -!****s* H5P/h5pget_fapl_core_f -! NAME -! h5pget_fapl_core_f -! -! PURPOSE -! Queries core file driver properties. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. - LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - - INTERFACE - INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pget_fapl_core_c - END INTERFACE - - hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - backing_store =.FALSE. - IF (backing_store_flag .EQ. 1) backing_store =.TRUE. - END SUBROUTINE h5pget_fapl_core_f - -!****s* H5P/ h5pset_fapl_family_f -! NAME -! h5pset_fapl_family_f -! -! PURPOSE -! Sets the file access property list to use the family driver. -! -! INPUTS -! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: memb_size - INTEGER(HID_T), INTENT(IN) :: memb_plist - END FUNCTION h5pset_fapl_family_c - END INTERFACE - - hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pset_fapl_family_f - -!****s* H5P/h5pget_fapl_family_f -! NAME -! h5pget_fapl_family_f -! -! PURPOSE -! Returns file access property list information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size - INTEGER(HID_T), INTENT(OUT) :: memb_plist - END FUNCTION h5pget_fapl_family_c - END INTERFACE - - hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pget_fapl_family_f - -!****s* H5P/h5pset_cache_f -! NAME -! h5pset_cache_f -! -! PURPOSE -! Sets the meta data cache and raw data chunk -! cache parameters -! -! INPUTS -! -! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_cache_c - END INTERFACE - - hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pset_cache_f - -!****s* H5P/h5pget_cache_f -! NAME -! h5pget_cache_f -! -! PURPOSE -! Queries the meta data cache and raw data chunk cache -! parameters. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_cache_c - END INTERFACE - - hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pget_cache_f - -!****s* H5P/h5pset_fapl_split_f -! NAME -! h5pset_fapl_split_f -! -! PURPOSE -! Emulates the old split file driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile -! filename -! meta_plist - identifier of the meta file access property -! list -! raw_ext - name extension for the raw file filename -! raw_plist - identifier of the raw file access property list -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for - ! the metafile filename - INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file - ! access property list - CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file - ! access property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: meta_len, raw_len - -! INTEGER, EXTERNAL :: h5pset_fapl_split_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: meta_ext - !DEC$ATTRIBUTES reference :: raw_ext - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: meta_ext - INTEGER(HID_T), INTENT(IN) :: meta_plist - CHARACTER(LEN=*), INTENT(IN) :: raw_ext - INTEGER(HID_T), INTENT(IN) :: raw_plist - INTEGER :: meta_len, raw_len - END FUNCTION h5pset_fapl_split_c - END INTERFACE - - meta_len = LEN(meta_ext) - raw_len = LEN(raw_ext) - hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - END SUBROUTINE h5pset_fapl_split_f - -!****s* H5P/h5pget_split_f -! NAME -! h5pget_split_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& -! raw_ext, raw_plist, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta - ! file extension to be copied to the - ! meta_ext buffer - -! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for - !the metafile filename -! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file - ! access property list -! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw - ! file extension to be copied to the - ! raw_ext buffer -! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename -! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file - !access property list -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_split_c -! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & -! raw_ext_size, raw_ext, raw_plist ) -! END SUBROUTINE h5pget_split_f - -!****s* H5P/h5pset_gc_references_f -! NAME -! h5pset_gc_references_f -! -! PURPOSE -! Sets garbage collecting references flag. -! -! INPUTS -! -! prp_id - file access property list identifier -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: gc_reference - END FUNCTION h5pset_gc_references_c - END INTERFACE - - hdferr = h5pset_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pset_gc_references_f - -!****s* H5P/h5pget_gc_references_f -! NAME -! h5pget_gc_references_f -! -! PURPOSE -! Returns garbage collecting references setting. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: gc_reference - END FUNCTION h5pget_gc_references_c - END INTERFACE - - hdferr = h5pget_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pget_gc_references_f - -!****s* H5P/h5pset_layout_f -! NAME -! h5pset_layout_f -! -! PURPOSE -! Sets the type of storage used store the raw data -! for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F - ! H5D_CONTIGUOUS_F - ! H5D_CHUNKED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: layout - END FUNCTION h5pset_layout_c - END INTERFACE - - hdferr = h5pset_layout_c(prp_id, layout) - END SUBROUTINE h5pset_layout_f - -!****s* H5P/h5pget_layout_f -! NAME -! h5pget_layout_f -! -! PURPOSE -! Returns the layout of the raw data for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F(0) - ! H5D_CONTIGUOUS_F(1) - ! H5D_CHUNKED_F(2) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: layout - END FUNCTION h5pget_layout_c - END INTERFACE - - hdferr = h5pget_layout_c(prp_id, layout) - END SUBROUTINE h5pget_layout_f - -!****s* H5P/h5pset_filter_f -! NAME -! h5pset_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be added to the pipeline -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! February, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pset_filter_c - END INTERFACE - - hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pset_filter_f - -!****s* H5P/h5pget_nfilters_f -! NAME -! h5pget_nfilters_f -! -! PURPOSE -! Returns the number of filters in the pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! nfilters - number of filters in the pipeline -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_nfilters_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: nfilters - END FUNCTION h5pget_nfilters_c - END INTERFACE - - hdferr = h5pget_nfilters_c(prp_id, nfilters) - END SUBROUTINE h5pget_nfilters_f - -!****s* H5P/h5pget_filter_f -! NAME -! h5pget_filter_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter_number - sequence number within the filter -! pipeline of the filter for which -! information is sought -! OUTPUTS -! -! filter_id - filter identification number -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter - ! pipeline of the filter for which - ! information is sought - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! Filter identification number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_number - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER, INTENT(OUT) :: filter_id - END FUNCTION h5pget_filter_c - END INTERFACE - - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - END SUBROUTINE h5pget_filter_f - -!****s* H5P/h5pset_external_f -! NAME -! h5pset_external_f -! -! PURPOSE -! Adds an external file to the list of external files. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file - 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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(OFF_T), INTENT(IN) :: offset - INTEGER(HSIZE_T), INTENT(IN) :: bytes - END FUNCTION h5pset_external_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) - END SUBROUTINE h5pset_external_f - -!****s* H5P/h5pget_external_count_f -! NAME -! h5pget_external_count_f -! -! PURPOSE -! Returns the number of external files for a dataset. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! count - number of external files for the -! specified dataset -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count ! Number of external files for the - ! Specified dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_external_count_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_count_c(prp_id, count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: count - END FUNCTION h5pget_external_count_c - END INTERFACE - - hdferr = h5pget_external_count_c(prp_id, count) - END SUBROUTINE h5pget_external_count_f - -!****s* H5P/h5pget_external_f -! NAME -! h5pget_external_f -! -! PURPOSE -! Returns information about an external file. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! idx - external file index -! name_size - maximum size of name array -! name - name of the external file -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - 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(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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_external_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: idx - INTEGER(SIZE_T), INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(OFF_T), INTENT(OUT) :: offset - INTEGER(HSIZE_T), INTENT(OUT) :: bytes - END FUNCTION h5pget_external_c - END INTERFACE - - hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - END SUBROUTINE h5pget_external_f - -!****s* H5P/h5pset_btree_ratios_f -! NAME -! h5pset_btree_ratios_f -! -! PURPOSE -! Sets B-tree split ratios for a dataset transfer -! property list. -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(IN) :: left - REAL, INTENT(IN) :: middle - REAL, INTENT(IN) :: right - END FUNCTION h5pset_btree_ratios_c - END INTERFACE - - hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pset_btree_ratios_f - -!****s* H5P/h5pget_btree_ratios_f -! NAME -! h5pget_btree_ratios_f -! -! PURPOSE -! Gets B-tree split ratios for a dataset transfer property list -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! OUTPUTS -! -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(OUT) :: left - REAL, INTENT(OUT) :: middle - REAL, INTENT(OUT) :: right - END FUNCTION h5pget_btree_ratios_c - END INTERFACE - - hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pget_btree_ratios_f - -!****s* H5P/h5pget_fclose_degree_f -! NAME -! h5pget_fclose_degree_f -! -! PURPOSE -! Returns the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(OUT) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_fclose_degree_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(OUT) :: degree - END FUNCTION h5pget_fclose_degree_c - END INTERFACE - - hdferr = h5pget_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pget_fclose_degree_f - -!****s* H5P/h5pset_fclose_degree_f -! NAME -! h5pset_fclose_degree_f -! -! PURPOSE -! Sets the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - file access property list identifier -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(IN) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: degree - END FUNCTION h5pset_fclose_degree_c - END INTERFACE - - hdferr = h5pset_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pset_fclose_degree_f - -!****s* H5P/h5pequal_f -! NAME -! h5pequal_f -! -! PURPOSE -! Checks if two property lists are eqaul -! -! INPUTS -! -! plist1_id - property list identifier -! plist2_id - property list identifier -! OUTPUTS -! -! flag - flag, possible values -! .TRUE. or .FALSE. -! hdferr: - error code -! Success: 0 -! Failure: -1, flag is set to .FALSE. -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! Flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist1_id - INTEGER(HID_T), INTENT(IN) :: plist2_id - INTEGER, INTENT(OUT) :: c_flag - END FUNCTION h5pequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) - IF (c_flag .GT. 0) flag = .TRUE. - END SUBROUTINE h5pequal_f - -!****s* H5P/h5pset_buffer_f -! NAME -! h5pset_buffer_f -! -! PURPOSE -! Sets sixe for conversion buffer -! -! INPUTS -! plist_id - data transfer property list identifier -! size - buffer size -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_buffer_c - END INTERFACE - - hdferr = h5pset_buffer_c(plist_id, size) - END SUBROUTINE h5pset_buffer_f - -!****s* H5P/h5pget_buffer_f -! NAME -! h5pget_buffer_f -! -! PURPOSE -! Gets size for conversion buffer -! -! INPUTS -! -! plist_id - data transfer property list identifier -! OUTPUTS -! -! size - buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_buffer_c - END INTERFACE - - hdferr = h5pget_buffer_c(plist_id, size) - END SUBROUTINE h5pget_buffer_f - -!****s* H5P/h5pfill_value_defined_f -! NAME -! h5pfill_value_defined_f -! -! PURPOSE -! Check if fill value is defined. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - fill value status flag -! Possible values are: -! H5D_FILL_VALUE_ERROR_F -! H5D_FILL_VALUE_UNDEFINED_F -! H5D_FILL_VALUE_DEFAULT_F -! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill value status flag - ! H5D_FILL_VALUE_ERROR_F - ! H5D_FILL_VALUE_UNDEFINED_F - ! H5D_FILL_VALUE_DEFAULT_F - ! H5D_FILL_VALUE_USER_DEFINED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pfill_value_defined_c - END INTERFACE - - hdferr = h5pfill_value_defined_c(plist_id, flag) - END SUBROUTINE h5pfill_value_defined_f - -!****s* H5P/h5pset_alloc_time_f -! NAME -! h5pset_alloc_time_f -! -! PURPOSE -! Set space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_alloc_time_c - END INTERFACE - - hdferr = h5pset_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pset_alloc_time_f - -!****s* H5P/h5pget_alloc_time_f -! NAME -! h5pget_alloc_time_f -! -! PURPOSE -! Get space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_alloc_time_c - END INTERFACE - - hdferr = h5pget_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pget_alloc_time_f - -!****s* H5P/h5pset_fill_time_f -! NAME -! h5pset_fill_time_f -! -! PURPOSE -! Set fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fill_time_c - END INTERFACE - - hdferr = h5pset_fill_time_c(plist_id, flag) - END SUBROUTINE h5pset_fill_time_f - -!****s* H5P/h5pget_fill_time_f -! NAME -! h5pget_fill_time_f -! -! PURPOSE -! Get fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fill_time_c - END INTERFACE - - hdferr = h5pget_fill_time_c(plist_id, flag) - END SUBROUTINE h5pget_fill_time_f - -!****s* H5P/ h5pset_meta_block_size_f -! NAME -! h5pset_meta_block_size_f -! -! PURPOSE -! Sets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! size - metatdata block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_meta_block_size_c - END INTERFACE - - hdferr = h5pset_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pset_meta_block_size_f - -!****s* H5P/h5pget_meta_block_size_f -! NAME -! h5pget_meta_block_size_f -! -! PURPOSE -! Gets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - metatdata block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_meta_block_size_c - END INTERFACE - - hdferr = h5pget_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pget_meta_block_size_f - -!****s* H5P/h5pset_sieve_buf_size_f -! NAME -! h5pset_sieve_buf_size_f -! -! PURPOSE -! Sets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! size - sieve buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_sieve_buf_size_c - END INTERFACE - - hdferr = h5pset_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pset_sieve_buf_size_f - -!****s* H5P/h5pget_sieve_buf_size_f -! NAME -! h5pget_sieve_buf_size_f -! -! PURPOSE -! Gets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - sieve buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_sieve_buf_size_c - END INTERFACE - - hdferr = h5pget_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pget_sieve_buf_size_f - -!****s* H5P/h5pset_small_data_block_size_f -! NAME -! h5pset_small_data_block_size_f -! -! PURPOSE -! Sets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! size - small raw data block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_small_data_block_size_c - END INTERFACE - - hdferr = h5pset_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pset_small_data_block_size_f - -!****s* H5P/h5pget_small_data_block_size_f -! NAME -! h5pget_small_data_block_size_f -! -! PURPOSE -! Gets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - small raw data block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_small_data_block_size_c - END INTERFACE - - hdferr = h5pget_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pget_small_data_block_size_f - -!****s* H5P/h5pset_hyper_vector_size_f -! NAME -! h5pset_hyper_vector_size_f -! -! PURPOSE -! Set the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! size - vector size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_hyper_vector_size_c - END INTERFACE - - hdferr = h5pset_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pset_hyper_vector_size_f - -!****s* H5P/ h5pget_hyper_vector_size_f -! NAME -! h5pget_hyper_vector_size_f -! -! PURPOSE -! Get the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! OUTPUTS -! -! size - vector size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_hyper_vector_size_c - END INTERFACE - - hdferr = h5pget_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pget_hyper_vector_size_f - -!****s* H5P/h5pexist_f -! NAME -! h5pexist_f -! -! PURPOSE -! Queries whether a property name exists in a property list or class. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to check for -! OUTPUTS -! -! flag - logical flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pexist_c - END INTERFACE - flag = .FALSE. - name_len = LEN(name) - hdferr = h5pexist_c(prp_id, name , name_len) - IF (hdferr > 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pexist_f - -!****s* H5P/h5pget_size_f -! -! NAME -! h5pget_size_f -! -! PURPOSE -! Queries the size of a property value in bytes. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to query -! OUTPUTS -! -! size - size of property in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_size_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pget_size_c(prp_id, name , name_len, size) - END SUBROUTINE h5pget_size_f - -!****s* H5P/h5pget_npros_f -! NAME -! h5pget_npros_f -! -! PURPOSE -! Queries number of properties in property list or class -! -! INPUTS -! -! prp_id - iproperty list identifier to query -! OUTPUTS -! -! nprops - number of properties in property object -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: nprops - END FUNCTION h5pget_nprops_c - END INTERFACE - hdferr = h5pget_nprops_c(prp_id, nprops) - END SUBROUTINE h5pget_nprops_f - -!****s* H5P/h5pget_class_name_f -! NAME -! h5pget_class_name_f -! -! PURPOSE -! Queries the name of a class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! name - name of a class -! size - Actual length of the class name -! NOTE: If provided buffer "name" is smaller, -! than name will be truncated to fit into -! provided user buffer. -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Returned the size of name as an argument -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name - INTEGER, INTENT(OUT) :: size ! Actual length of the class name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pget_class_name_c - END INTERFACE - - name_len = LEN(name) - size = h5pget_class_name_c(prp_id, name, name_len) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE h5pget_class_name_f - -!****s* H5P/h5pget_class_parent_f -! NAME -! h5pget_class_parent_f -! -! PURPOSE -! Retrieves the parent class of a genric property class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! parent_id - identifier of the parent class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: parent_id - END FUNCTION h5pget_class_parent_c - END INTERFACE - hdferr = h5pget_class_parent_c(prp_id, parent_id) - END SUBROUTINE h5pget_class_parent_f - -!****s* H5P/h5pisa_class_f -! NAME -! h5pisa_class_f -! -! PURPOSE -! Determines whether a property list is a member of a class. -! -! INPUTS -! -! plist - property list identifier -! pclass - identifier of the property class -! OUTPUTS -! -! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier - LOGICAL, INTENT(OUT) :: flag ! logical flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pisa_class_c(plist, pclass) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist - INTEGER(HID_T), INTENT(IN) :: pclass - END FUNCTION h5pisa_class_c - END INTERFACE - flag = .FALSE. - hdferr = h5pisa_class_c(plist, pclass) - IF (hdferr .GT. 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pisa_class_f - -!****s* H5P/h5pcopy_prop_f -! NAME -! h5pcopy_prop_f -! -! PURPOSE -! Copies a property from one list or class to another. -! -! INPUTS -! -! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list -! name - name of the property to copy -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Property name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER(HID_T), INTENT(IN) :: src_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pcopy_prop_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) - END SUBROUTINE h5pcopy_prop_f - -!****s* H5P/h5premove_f -! NAME -! h5premove_f -! -! PURPOSE -! Removes a property from a property list. - -! -! INPUTS -! -! plid - Property list identofoer -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5premove_f(plid, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5premove_c(plid, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plid - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5premove_c - END INTERFACE - name_len = LEN(name) - hdferr = h5premove_c(plid, name , name_len) - END SUBROUTINE h5premove_f - -!****s* H5P/h5punregister_f -! NAME -! h5punregister_f -! -! PURPOSE -! Removes a property from a property list class. -! -! INPUTS -! -! class - Property list class identifier -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5punregister_f(class, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5punregister_c(class, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5punregister_c - END INTERFACE - name_len = LEN(name) - hdferr = h5punregister_c(class, name , name_len) - END SUBROUTINE h5punregister_f - -!****s* H5P/h5pclose_class_f -! NAME -! h5pclose_class_f -! -! PURPOSE -! Closes an existing property list class. -! -! INPUTS -! -! class - Property list class identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_class_f(class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pclose_class_c(class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - END FUNCTION h5pclose_class_c - END INTERFACE - hdferr = h5pclose_class_c(class) - END SUBROUTINE h5pclose_class_f - -!****s* H5P/h5pset_shuffle_f -! NAME -! h5pset_shuffle_f -! -! PURPOSE -! Sets shuffling filter -! -! INPUTS -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_shuffle_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shuffle_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_shuffle_c - END INTERFACE - hdferr = h5pset_shuffle_c(prp_id) - - END SUBROUTINE h5pset_shuffle_f - -!****s* H5P/h5pset_edc_check_f -! NAME -! h5pset_edc_check_f -! -! PURPOSE -! Enables/disables error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! flag - EDC flag; possible values: -! H5Z_DISABLE_EDC_F -! H5Z_ENABLE_EDC_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: flag ! Checksum filter flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_edc_check_c - END INTERFACE - hdferr = h5pset_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pset_edc_check_f - -!****s* H5P/h5pget_edc_check_f -! NAME -! h5pget_edc_check_f -! -! PURPOSE -! Queries error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier - INTEGER, INTENT(OUT) :: flag ! Checksum filter flag - ! May have one of the following values: - ! H5Z_ERROR_EDC_F - ! H5Z_DISABLE_EDC_F - ! H5Z_ENABLE_EDC_F - ! H5Z_NO_EDC_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_edc_check_c - END INTERFACE - hdferr = h5pget_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pget_edc_check_f - -!****s* H5P/h5pset_fletcher32_f -! NAME -! h5pset_fletcher32_f -! -! PURPOSE -! Sets Fletcher32 checksum of EDC for a dataset creation -! property list. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fletcher32_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fletcher32_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fletcher32_c - END INTERFACE - hdferr = h5pset_fletcher32_c(prp_id) - - END SUBROUTINE h5pset_fletcher32_f - -!****s* H5P/ h5pset_family_offset_f -! NAME -! h5pset_family_offset_f -! -! PURPOSE -! Sets offset for family file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! offset - file offset -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 19 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_family_offset_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset - END FUNCTION h5pset_family_offset_c - END INTERFACE - hdferr = h5pset_family_offset_c(prp_id, offset) - - END SUBROUTINE h5pset_family_offset_f - -!****s* H5P/h5pset_fapl_multi_l -! NAME -! h5pset_fapl_multi_l -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 20 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: flag = 0 - INTEGER :: i - - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - IF(relax) flag = 1 - hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) - - END SUBROUTINE h5pset_fapl_multi_l -!****s* H5P/h5pset_fapl_multi_s -! NAME -! h5pset_fapl_multi_s -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 31 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag - -! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_sc - END INTERFACE - flag = 0 - IF (relax) flag = 1 - hdferr = h5pset_fapl_multi_sc(prp_id, flag) - - END SUBROUTINE h5pset_fapl_multi_s -!****s* H5P/h5pget_fapl_multi_f -! NAME -! h5pget_fapl_multi_f -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! maxlen_out - maximum length for memb_name array element -! -! AUTHOR -! Elena Pourmal -! 24 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out - LOGICAL, INTENT(OUT) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER :: flag - INTEGER :: i -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag, c_maxlen_out) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) - - relax = .TRUE. - IF(flag .EQ. 0) relax = .FALSE. - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - END SUBROUTINE h5pget_fapl_multi_f -!****s* H5P/h5pset_szip_f -! NAME -! h5pset_szip_f -! -! PURPOSE -! Sets up use of szip compression -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! options_mask - A bit-mask conveying the desired SZIP options. -! Current valid values in Fortran are: -! H5_SZIP_EC_OM_F -! H5_SZIP_NN_OM_F -! pixels_per_block - szip parameters -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired - ! SZIP options - ! Current valid values in Fortran are: - ! H5_SZIP_EC_OM_F - ! H5_SZIP_NN_OM_F - INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements - ! in each data block - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_szip_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: options_mask - INTEGER, INTENT(IN) :: pixels_per_block - END FUNCTION h5pset_szip_c - END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) - - END SUBROUTINE h5pset_szip_f - -!****s* H5P/h5pall_filters_avail_f -! NAME -! h5pall_filters_avail_f -! -! PURPOSE -! Checks if all filters set in the dataset creation -! property list are available -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! flag - .TRUE. if all filters are available -! .FALSE. otherwise -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available - ! .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status - -! INTEGER, EXTERNAL :: h5pall_filters_avail_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pall_filters_avail_c - END INTERFACE - flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) - IF (status .EQ. 0 ) flag = .FALSE. - - END SUBROUTINE h5pall_filters_avail_f - -!****s* H5P/h5pget_filter_by_id_f -! NAME -! h5pget_filter_by_id_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! filter_id - filter identifier -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_id ! Filter identifier - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_by_id_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name - END FUNCTION h5pget_filter_by_id_c - END INTERFACE - - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - END SUBROUTINE h5pget_filter_by_id_f - -!****s* H5P/h5pmodify_filter_f -! NAME -! h5pmodify_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be modified -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be modified - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pmodify_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pmodify_filter_c - END INTERFACE - - hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pmodify_filter_f - -!****s* H5P/h5premove_filter_f -! NAME -! h5premove_filter_f -! -! PURPOSE -! Delete one or more filters from the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be removed -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Quincey Koziol -! January 27 2004 -! -! Fortran90 Interface: - SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list - ! identifier - INTEGER, INTENT(IN) :: filter ! Filter to be removed - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5premove_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5premove_filter_c(prp_id, filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - END FUNCTION h5premove_filter_c - END INTERFACE - - hdferr = h5premove_filter_c(prp_id, filter) - END SUBROUTINE h5premove_filter_f - -!****s* H5P/H5Pget_attr_phase_change_f -! NAME -! H5Pget_attr_phase_change_f -! -! PURPOSE -! Retrieves attribute storage phase change thresholds -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - ! (Default: 8) - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_attr_phase_change_c - END INTERFACE - - hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_attr_phase_change_f - -!****s* H5P/H5Pset_attr_creation_order_f -! NAME -! H5Pset_attr_creation_order_f -! -! PURPOSE -! Sets tracking and indexing of attribute creation order -! -! INPUTS -! -! ocpl_id - Object creation property list identifier -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5Pset_attr_creation_order_c - END INTERFACE - - hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - END SUBROUTINE h5pset_attr_creation_order_f - -!****s* H5P/H5Pset_shared_mesg_nindexes_f -! NAME -! H5Pset_shared_mesg_nindexes_f -! -! PURPOSE -! Sets number of shared object header message indexes -! -! INPUTS -! -! plist_id - file creation property list -! nindexes - Number of shared object header message indexes to be available in files created with this property list -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes - ! available in files created WITH this property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: nindexes - - END FUNCTION H5pset_shared_mesg_nindexes_c - END INTERFACE - - hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - - END SUBROUTINE h5pset_shared_mesg_nindexes_f - -!****s* H5P/H5Pset_shared_mesg_index_f -! NAME -! H5Pset_shared_mesg_index_f -! -! PURPOSE -! Configures the specified shared object header message index -! -! INPUTS -! -! fcpl_id - File creation property list identifier. -! index_num - Index being configured. -! mesg_type_flags - Types of messages that should be stored in this index. -! min_mesg_size - Minimum message size. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list - INTEGER, INTENT(IN) :: index_num ! Index being configured. - INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. - INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: fcpl_id - INTEGER, INTENT(IN) :: index_num - INTEGER, INTENT(IN) :: mesg_type_flags - INTEGER, INTENT(IN) :: min_mesg_size - - END FUNCTION H5pset_shared_mesg_index_c - END INTERFACE - - hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - END SUBROUTINE h5pset_shared_mesg_index_f - -!****s* H5P/H5Pget_attr_creation_order_f -! NAME -! H5Pget_attr_creation_order_f -! -! PURPOSE -! Retrieves tracking and indexing settings for attribute creation order -! -! INPUTS -! -! ocpl_id - Object (group or dataset) creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_attr_creation_order_c - END INTERFACE - - hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - END SUBROUTINE h5pget_attr_creation_order_f - -!****s* H5P/H5Pset_libver_bounds_f -! NAME -! H5Pset_libver_bounds_f -! -! PURPOSE -! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. -! -! INPUTS -! -! fapl_id - File access property list identifier -! low - The earliest version of the library that will be used for writing objects. -! high - The latest version of the library that will be used for writing objects. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. - ! Currently, low must be one of two pre-defined values: - ! HDF_LIBVER_EARLIEST_F - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - ! Currently, low must set to the pre-defined value: - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: low - INTEGER, INTENT(IN) :: high - - END FUNCTION H5pset_libver_bounds_c - END INTERFACE - - hdferr = h5pset_libver_bounds_c(fapl_id, low, high) - - END SUBROUTINE h5pset_libver_bounds_f - -!****s* H5P/H5Pset_link_creation_order_f -! NAME -! H5Pset_link_creation_order_f -! -! PURPOSE -! Sets creation order tracking and indexing for links in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! crt_order_flags - Creation order flag(s) -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5pset_link_creation_order_c - END INTERFACE - - hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pset_link_creation_order_f - -!****s* H5P/H5Pget_link_phase_change_f -! NAME -! H5Pget_link_phase_change_f -! -! PURPOSE -! Queries the settings for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_link_phase_change_c - END INTERFACE - - hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_link_phase_change_f - -!****s* H5P/H5Pget_obj_track_times_f -! NAME -! H5Pget_obj_track_times_f -! -! PURPOSE -! Returns whether times are tracked for an object. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pget_obj_track_times_c - END INTERFACE - flag = .TRUE. - hdferr = h5pget_obj_track_times_c(plist_id, status) - IF(status.EQ.0) flag = .FALSE. - - END SUBROUTINE h5pget_obj_track_times_f - -!****s* H5P/H5Pset_obj_track_times_f -! NAME -! H5Pset_obj_track_times_f -! -! PURPOSE -! Set whether the birth, access, modification & change times for -! an object are stored. -! -! Birth time is the time the object was created. Access time is -! the last time that metadata or raw data was read from this -! object. Modification time is the last time the data for -! this object was changed (either writing raw data to a dataset -! or inserting/modifying/deleting a link in a group). Change -! time is the last time the metadata for this object was written -! (adding/modifying/deleting an attribute on an object, extending -! the size of a dataset, etc). -! -! If these times are not tracked, they will be reported as -! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX -! epoch) when queried. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(IN) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(IN) :: status - END FUNCTION h5pset_obj_track_times_c - END INTERFACE - - status = 0 - IF(flag) status = 1 - - hdferr = h5pset_obj_track_times_c(plist_id, status) - - END SUBROUTINE h5pset_obj_track_times_f - -!****s* H5P/H5Pset_create_inter_group_f -! NAME -! H5Pset_create_inter_group_f -! -! PURPOSE -! Specifies in property list whether to create missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation -! of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! HISTORY -! The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name -! Fortran90 Interface: - SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups - ! upon the creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pset_create_inter_group_c - END INTERFACE - - hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pset_create_inter_group_f - -!****s* H5P/H5Pget_link_creation_order_f -! NAME -! H5Pget_link_creation_order_f -! -! PURPOSE -! Queries whether link creation order is tracked and/or indexed in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Creation order flag(s) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_link_creation_order_c - END INTERFACE - - hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pget_link_creation_order_f - -!****s* H5P/H5Pset_char_encoding_f -! NAME -! H5Pset_char_encoding_f -! -! PURPOSE -! Sets the character encoding used to encode a string. -! -! INPUTS -! -! plist_id - Property list identifier -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - INTEGER, INTENT(IN) :: encoding ! String encoding character set: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: encoding - - END FUNCTION H5pset_char_encoding_c - END INTERFACE - - hdferr = h5pset_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pset_char_encoding_f - -!****s* H5P/H5Pget_char_encoding_f -! NAME -! H5Pget_char_encoding_f -! -! PURPOSE -! Retrieves the character encoding used to create a string -! -! INPUTS -! -! plist_id - Property list identifier -! -! OUTPUTS -! -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - - INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: encoding - - END FUNCTION H5pget_char_encoding_c - END INTERFACE - - hdferr = h5pget_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pget_char_encoding_f - -!****s* H5P/h5pset_copy_object_f -! NAME -! h5pset_copy_object_f -! -! PURPOSE -! Sets properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! copy_options - Copy option(s) to be set -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(IN) :: copy_options - END FUNCTION h5pset_copy_object_c - END INTERFACE - hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pset_copy_object_f - -!****s* H5P/h5pget_copy_object_f -! NAME -! h5pget_copy_object_f -! -! PURPOSE -! Retrieves the properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! OUTPUTS -! -! copy_options - Copy option(s) to be get -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(OUT) :: copy_options - END FUNCTION h5pget_copy_object_c - END INTERFACE - hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pget_copy_object_f - -!****s* H5P/h5pget_data_transform_f -! NAME -! h5pget_data_transform_f -! -! PURPOSE -! Retrieves a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! OUTPUTS -! -! expression - buffer to hold transform expression -! hdferr - Error code -! Success: Actual lenght of the expression -! If provided buffer "expression" is -! smaller, than expression will be -! truncated to fit into -! provided user buffer -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! HISTORY -! -! Should hdferr return just 0 or 1 and add another arguement for the size? -! Fortran90 Interface: -SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - INTEGER(SIZE_T) :: size_default - - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(OUT) :: expression - INTEGER(SIZE_T) :: size_default - INTEGER :: expression_len - END FUNCTION h5pget_data_transform_c - END INTERFACE - - size_default = 0 - expression_len = LEN(expression) - - hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - - IF(present(size)) size = size_default - - END SUBROUTINE h5pget_data_transform_f - -!****s* H5P/h5pset_data_transform_f -! NAME -! h5pset_data_transform_f -! -! PURPOSE -! Sets a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! expression - Buffer to hold transform expression -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(IN) :: expression - INTEGER :: expression_len - END FUNCTION h5pset_data_transform_c - END INTERFACE - - expression_len = LEN(expression) - hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) - - END SUBROUTINE h5pset_data_transform_f - -!****s* H5P/H5Pget_local_heap_size_hint_f -! NAME -! H5Pget_local_heap_size_hint_f -! -! PURPOSE -! Queries the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! size_hint - Hint for size of local heap -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(OUT) :: size_hint - END FUNCTION H5Pget_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pget_local_heap_size_hint_f - -!****s* H5P/H5Pget_est_link_info_f -! NAME -! H5Pget_est_link_info_f -! -! PURPOSE -! Queries data required to estimate required local heap or object header size. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: est_num_entries - INTEGER, INTENT(OUT) :: est_name_len - END FUNCTION h5pget_est_link_info_c - END INTERFACE - - hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pget_est_link_info_f - -!****s* H5P/H5Pset_local_heap_size_hint_f -! NAME -! H5Pset_local_heap_size_hint_f -! -! PURPOSE -! Sets the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! size_hint - Hint for size of local heap -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(IN) :: size_hint - END FUNCTION h5pset_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pset_local_heap_size_hint_f - -!****s* H5P/h5pset_est_link_info_f -! NAME -! h5pset_est_link_info_f -! -! PURPOSE -! Sets estimated number of links and length of link names in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: est_num_entries - INTEGER, INTENT(IN) :: est_name_len - END FUNCTION h5pset_est_link_info_c - END INTERFACE - - hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pset_est_link_info_f - -!****s* H5P/h5pset_link_phase_change_f -! NAME -! h5pset_link_phase_change_f -! -! PURPOSE -! Sets the parameters for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_link_phase_change_c - END INTERFACE - - hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pset_link_phase_change_f - -!****s* H5P/h5pset_fapl_direct_f -! NAME -! h5pset_fapl_direct_f -! -! PURPOSE -! Sets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(IN) :: alignment - INTEGER(SIZE_T), INTENT(IN) :: block_size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size - END FUNCTION h5pset_fapl_direct_c - END INTERFACE - - hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pset_fapl_direct_f - -!****s* H5P/h5pget_fapl_direct_f -! NAME -! h5pget_fapl_direct_f -! -! PURPOSE -! Gets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(OUT) :: alignment - INTEGER(SIZE_T), INTENT(OUT) :: block_size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size - END FUNCTION h5pget_fapl_direct_c - END INTERFACE - - hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pget_fapl_direct_f - -!****s* H5P/H5Pset_attr_phase_change_f -! NAME -! H5Pset_attr_phase_change_f -! -! PURPOSE -! Sets attribute storage phase change thresholds. -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - !(Default: 8) - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_attr_phase_change_c - END INTERFACE - - hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - - - END SUBROUTINE h5pset_attr_phase_change_f - -!****s* H5P/H5Pset_nbit_f -! NAME -! H5Pset_nbit_f -! -! PURPOSE -! Sets up the use of the N-Bit filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_nbit_f(plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION H5Pset_nbit_c(plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - END FUNCTION H5Pset_nbit_c - END INTERFACE - - hdferr = H5Pset_nbit_c(plist_id) - - END SUBROUTINE h5pset_nbit_f - -!****s* H5P/h5pset_scaleoffset_f -! NAME -! h5pset_scaleoffset_f -! -! PURPOSE -! Sets up the use of the scale-offset filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! scale_type - Flag indicating compression method. Valid values: -! H5Z_SO_FLOAT_DSCALE_F -! H5Z_SO_FLOAT_ESCALE_F -! H5Z_SO_INT_F -! -! scale_factor - Parameter related to scale. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(IN) :: scale_type - INTEGER , INTENT(IN) :: scale_factor - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: scale_type - INTEGER, INTENT(IN) :: scale_factor - END FUNCTION h5pset_scaleoffset_c - END INTERFACE - - hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) - - END SUBROUTINE h5pset_scaleoffset_f - -!****s* H5P/h5pset_nlinks_f -! NAME -! h5pset_nlinks_f -! -! PURPOSE -! Sets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(IN) :: nlinks - END FUNCTION h5pset_nlinks_c - END INTERFACE - - hdferr = h5pset_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pset_nlinks_f - -!****s* H5P/h5pget_nlinks_f -! NAME -! h5pget_nlinks_f -! -! PURPOSE -! Gets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(OUT) :: nlinks - END FUNCTION h5pget_nlinks_c - END INTERFACE - - hdferr = h5pget_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pget_nlinks_f - -!****s* H5P/H5Pget_create_inter_group_f -! NAME -! H5Pget_create_inter_group_f -! -! PURPOSE -! Determines whether property is set to enable creating missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon -! the creation of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 4, 2008 -! -! HISTORY -! -! The long subroutine name (>31) on older f90 compilers causes problems -! so the name was shortened -! Fortran90 Interface: - SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups - ! upon creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pget_create_inter_group_c - END INTERFACE - - hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pget_create_inter_group_f - -!****s* H5P/H5Pset_chunk_cache_f -! NAME -! H5Pset_chunk_cache_f -! -! PURPOSE -! Set the number of objects in the meta data cache and the -! maximum number of chunks and bytes in the raw data chunk cache. -! Once set, these values will override the values in the file access -! property list. Each of these values can be individually unset -! (or not set at all) by passing the macros: -! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, -! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or -! H5D_CHUNK_CACHE_W0_DFLT_F -! as appropriate. -! -! The RDCC_W0 value should be between 0 and 1 inclusive and -! indicates how much chunks that have been fully read or fully -! written are favored for preemption. A value of zero means -! fully read or written chunks are treated no differently than -! other chunks (the preemption is strictly LRU) while a value -! of one means fully read chunks are always preempted before -! other chunks. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. -! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. -! rdcc_w0 - The chunk preemption policy for this dataset. -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data - ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache - ! for this dataset. - REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_chunk_cache_c - END INTERFACE - - hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pset_chunk_cache_f - -!****s* H5P/H5Pget_chunk_cache_f -! NAME -! H5Pget_chunk_cache_f -! -! PURPOSE -! Retrieves the maximum possible number of elements in the meta -! data cache and the maximum possible number of elements and -! bytes and the RDCC_W0 value in the raw data chunk cache. Any -! (or all) arguments may be null pointers in which case the -! corresponding datum is not returned. If these properties have -! not been set on this property list, the default values for a -! file access property list are returned. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! OUTPUTS -! -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_chunk_cache_c - END INTERFACE - - hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pget_chunk_cache_f - -! -!****s* H5P (F03)/h5pset_fill_value_f_F90 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! IMPLICIT NONE -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_integer -! -!****s* H5P (F03)/h5pget_fill_value_f_F90 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr ! C address - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(fillvalue) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - f_ptr = C_LOC(chr(1)(1:1)) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - DO i = 1, chr_len - fillvalue(i:i) = chr(i) - ENDDO - DEALLOCATE(chr) - - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F03)/h5pset_fill_value_f_F03 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pset_fill_value_ptr - -! -!****s* H5P (F03)/h5pget_fill_value_f_F03 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pget_fill_value_ptr - -! -!****s* H5P (F03)/h5pset_f_F90 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_integer - - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_real - - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pset_char -! -!****s* H5P (F03)/h5pget_f_F90 -! -! NAME -! h5pget_f -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pget_integer - - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_real - - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - TYPE(C_PTR) :: f_ptr - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DO i = 1, chr_len - value(i:i) = chr(i) - ENDDO - - DEALLOCATE(chr) - - END SUBROUTINE h5pget_char - - -! -!****s* H5P (F03)/h5pset_f_F03 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Pointer to value to set the property to -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pset_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pset_ptr -! -!****s* H5P (F03)/h5pget_f_F03 -! -! NAME -! h5pget_f (F03) -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Pointer to a location to which to copy the value of of the property -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pget_ptr - - -! -!****s* H5P (F03)/h5pregister_f_F90 -! -! NAME -! h5pregister -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_integer - - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_real - - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - DEALLOCATE(chr) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F03)/h5pregister_f_F03 -! -! NAME -! h5pregister (F03) -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Pointer to value to set the property to -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, value) - END SUBROUTINE h5pregister_ptr - -! -!****s* H5P (F03)/h5pinsert_f_F90 -! -! NAME -! h5pinsert (f90) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_integer - - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_real - - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(c_ptr) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F03)/h5pinsert_f_F03 -! -! NAME -! h5pinsert (f03) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Pointer to new value pointer for the property being modified -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - TYPE(c_ptr), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_ptr -! -!****s* H5P (F03)/h5pcreate_class_f_F03 -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! Inputs: -! parent - Parent property list class identifier -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - Name of property to create -! -! Outputs: -! class - Property list class identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! H5P_cls_create_func_t (create) - Callback routine called when a property list is created -! create_data - User pointer to any class creation information needed -! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied -! copy_data - User pointer to any class copy information needed -! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed -! close_data - User pointer to any class close information needed -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Added callback arguments -! M. Scot Breitenfeld, July 3, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: class - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data - TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close -!***** - INTEGER :: name_len - TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default - TYPE(C_FUNPTR) :: create_default, copy_default, close_default - INTERFACE - INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & - create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - TYPE(C_PTR), VALUE :: create_data, copy_data, close_data - TYPE(C_FUNPTR), VALUE :: create, copy, close - END FUNCTION h5pcreate_class_c - END INTERFACE - name_len = LEN(name) - - create_default = c_null_funptr !fix:scot - create_data_default = c_null_ptr - copy_default = c_null_funptr !fix:scot - copy_data_default = c_null_ptr - close_default = c_null_funptr !fix:scot - close_data_default = c_null_ptr - - IF(PRESENT(create)) create_default = create - IF(PRESENT(create_data)) create_data_default = create_data - IF(PRESENT(copy)) copy_default = copy - IF(PRESENT(copy_data)) copy_data_default = copy_data - IF(PRESENT(close)) close_default = close - IF(PRESENT(close_data)) close_data_default = close_data - - hdferr = h5pcreate_class_c(parent, name , name_len, class, & - create_default, create_data_default, & - copy_default, copy_data_default, & - close_default, close_data_default) - - END SUBROUTINE h5pcreate_class_f - -! -!****s* H5P (F03)/h5pset_file_image_f_F03 -! -! NAME -! h5pset_file_image_f -! -! PURPOSE -! Sets an initial file image in a memory buffer. -! -! Inputs: -! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, -! or C_NULL_PTR if no initial file image is desired -! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(IN) :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & - BIND(C, NAME='h5pset_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - END FUNCTION h5pset_file_image_c - END INTERFACE - - hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) - - END SUBROUTINE h5pset_file_image_f -! -!****s* H5P (F03)/h5pget_file_image_f_F03 -! -! NAME -! h5pget_file_image_f -! -! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. -! -! Inputs: -! fapl_id - File access property list identifier. -! -! Outputs: -! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type -! c_loc. If buf_ptr is not C_NULL_PTR, on successful -! return, buf_ptr shall contain a C pointer to a copy -! of the initial image provided in the last call to -! H5Pset_file_image_f for the supplied fapl_id, or -! buf_ptr shall contain a C_NULL_PTR if there is no -! initial image set. -! -! buf_len_ptr - Contains the value of the buffer parameter for -! the initial image in the supplied fapl_id. The value -! will be 0 if no initial image is set. -! -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - INTEGER , INTENT(OUT) :: hdferr - -!***** - INTERFACE - INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & - BIND(C, NAME='h5pget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - END FUNCTION h5pget_file_image_c - END INTERFACE - - hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) - - END SUBROUTINE h5pget_file_image_f - -END MODULE H5P - - - diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 068f24e..271bfee 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -43,7 +43,7 @@ * SOURCE */ int_f -nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) +h5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) /******/ { char *c_name = NULL; @@ -69,7 +69,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* nh5rcreate_object_c() */ +} /* h5rcreate_object_c() */ /****if* H5Rf/h5rcreate_region_c * NAME @@ -94,7 +94,7 @@ done: * SOURCE */ int_f -nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) +h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) /******/ { char *c_name = NULL; @@ -120,7 +120,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* end nh5rcreate_region_c() */ +} /* end h5rcreate_region_c() */ /****if* H5Rf/h5rcreate_ptr_c * NAME @@ -185,7 +185,7 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r * SOURCE */ int_f -nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) +h5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) /******/ { hdset_reg_ref_t ref_c; @@ -206,7 +206,7 @@ nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) done: return ret_value; -} /* end nh5rdereference_region_c() */ +} /* end h5rdereference_region_c() */ /****if* H5Rf/h5rdereference_object_c * NAME @@ -228,7 +228,7 @@ done: * SOURCE */ int_f -nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) +h5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) /******/ { hid_t c_obj_id; @@ -246,7 +246,7 @@ nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) done: return ret_value; -} /* end nh5rdereference_object_c() */ +} /* end h5rdereference_object_c() */ /****if* H5Rf/h5rdereference_ptr_c * NAME @@ -306,7 +306,7 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * SOURCE */ int_f -nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) +h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; @@ -327,7 +327,7 @@ nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_region_c() */ +} /* end h5rget_region_region_c() */ /****if* H5Rf/h5rget_region_ptr_c * NAME @@ -366,7 +366,7 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_ptr_c() */ +} /* end h5rget_region_ptr_c() */ /****if* H5Rf/h5rget_object_type_obj_c @@ -390,7 +390,7 @@ done: * SOURCE */ int_f -nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) +h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) /******/ { H5O_type_t c_obj_type; @@ -408,7 +408,7 @@ nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) done: return ret_value; -} /* end nh5rget_object_type_obj_c() */ +} /* end h5rget_object_type_obj_c() */ /****if* H5Rf/h5rget_name_object_c * NAME @@ -434,7 +434,7 @@ done: * SOURCE */ int_f -nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +h5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) /******/ { hobj_ref_t ref_c = (hobj_ref_t)*ref; @@ -466,7 +466,7 @@ done: if(c_buf) HDfree(c_buf); return ret_value; -} /* end nh5rget_name_object_c() */ +} /* end h5rget_name_object_c() */ /****if* H5Rf/h5rget_name_region_c * NAME @@ -492,7 +492,7 @@ done: * SOURCE */ int_f -nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +h5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) /******/ { hdset_reg_ref_t ref_c; diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 new file mode 100644 index 0000000..69455c8 --- /dev/null +++ b/fortran/src/H5Rff.F90 @@ -0,0 +1,779 @@ +!****h* ROBODoc/H5R +! +! NAME +! MODULE H5R +! +! FILE +! fortran/src/H5Rff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5R 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 H5R 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 H5R + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! + ! TYPE hobj_ref_t_f + ! INTEGER ref(REF_OBJ_BUF_LEN) + ! END TYPE + ! + ! TYPE hdset_reg_ref_t_f + ! INTEGER ref(REF_REG_BUF_LEN) + ! END TYPE + ! + + INTERFACE h5rget_object_type_f + + MODULE PROCEDURE h5rget_object_type_obj_f + + END INTERFACE + + TYPE :: hdset_reg_ref_t_f03 + INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref + END TYPE hdset_reg_ref_t_f03 + + INTERFACE h5rget_region_f + + MODULE PROCEDURE h5rget_region_region_f ! obsolete + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + + END INTERFACE + + + INTERFACE h5rcreate_f + + MODULE PROCEDURE h5rcreate_object_f ! obsolete + MODULE PROCEDURE h5rcreate_region_f ! obsolete + MODULE PROCEDURE h5rcreate_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rdereference_f + + MODULE PROCEDURE h5rdereference_object_f ! obsolete + MODULE PROCEDURE h5rdereference_region_f ! obsolete + MODULE PROCEDURE h5rdereference_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rget_name_f + + MODULE PROCEDURE h5rget_name_object_f ! obsolete + MODULE PROCEDURE h5rget_name_region_f ! obsolete + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 + + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & + BIND(C, NAME='h5rget_name_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: name_len + INTEGER(SIZE_T) :: size_default + END FUNCTION h5rget_name_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & + BIND(C, NAME='h5rdereference_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + END FUNCTION h5rdereference_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & + BIND(C, NAME='h5rcreate_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: ref_type + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & + BIND(C, NAME='h5rget_region_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_ptr_c + END INTERFACE + + +CONTAINS + +!****s* H5R/h5rget_object_type_obj_f +! +! NAME +! h5rget_object_type_obj_f +! +! PURPOSE +! Retrieves the type of object that an object reference points to. +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the objects +! ref - reference to open +! OUTPUTS +! obj_type - object_type, possible values: +! H5G_UNKNOWN_F +! H5G_GROUP_F +! H5G_DATASET_F +! H5G_TYPE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_object_type_f +! subroutine. +! SOURCE + SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER, INTENT(OUT) :: obj_type ! Object type + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) BIND(C, NAME='h5rget_object_type_obj_c') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T) :: ref_f + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5rget_object_type_obj_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) + + END SUBROUTINE h5rget_object_type_obj_f + + +!****s* H5R/h5rget_region_region_f +! +! NAME +! h5rget_region_region_f +! +! PURPOSE +! Retrieves a dataspace with the specified region selected +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) BIND(C, NAME='h5rget_region_region_c') + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) + + END SUBROUTINE h5rget_region_region_f + +!****s* H5R/h5rget_region_ptr_f +! +! NAME +! h5rget_region_ptr_f +! +! PURPOSE +! Retrieves a dataspace with the specified region +! selected using pointer +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! August 4, 2012 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + + END SUBROUTINE h5rget_region_ptr_f + + +!****s* H5R (F03)/h5rcreate_object_f +! +! NAME +! h5rcreate_object_f +! +! PURPOSE +! Creates reference to the object +! +! Inputs: +! loc_id - location identifier +! name - name of the object at the specified location +! Outputs: +! ref - reference to the specified object +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! Signature: + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + namelen = LEN(name) + + hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) + + END SUBROUTINE h5rcreate_object_f + +!****s* H5R (F90)/h5rcreate_region_f +! +! NAME +! h5rcreate_region_f +! +! PURPOSE +! Creates reference to the dataset region +! +! INPUTS +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region +! OUTPUTS +! ref - reference to the dataset region +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) BIND(C,NAME='h5rcreate_region_c') + USE H5GLOBAL + IMPORT :: C_CHAR + IMPLICIT NONE + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_region_f + +!****s* H5R (F03)/h5rcreate_ptr_f +! +! NAME +! h5rcreate_ptr_f +! +! PURPOSE +! Creates a reference. +! +! Inputs: +! loc_id - location identifier +! name - name of the dataset at the specified location +! ref_type - type of reference: +! H5R_OBJECT +! H5T_STD_REF_DSETREG +! Outputs: +! ref - reference created by the function call. +! hdferr - returns 0 if successful and -1 if fails. +! OPTIONAL +! space_id - dataspace identifier that describes selected region +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rcreate_f +! subroutine where the output is a pointer. +! +! Signature: + SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER, INTENT(IN) :: ref_type ! type of reference + TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: space_id_c + + namelen = LEN(name) + space_id_c = -1 + IF(PRESENT(space_id)) space_id_c = space_id + hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) + + END SUBROUTINE h5rcreate_ptr_f +!****s* H5R (F03)/h5rdereference_object_f +! +! NAME +! h5rdereference_object_f +! +! PURPOSE +! Opens the HDF5 object referenced +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference +! ref - reference to open +! Outputs: +! obj_id - object_identifier +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_object_f +!****s* H5R (F03)/h5rdereference_region_f +! +! NAME +! h5rdereference_region_f +! +! PURPOSE +! Opens the dataset region +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference to teh regions +! ref - reference to open +! Outputs: +! obj_id - dataspace identifier +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_region_f + +!****s* H5R (F03)/h5rdereference_ptr_f +! +! NAME +! h5rdereference_ptr_f +! +! PURPOSE +! Opens the HDF5 object referenced. +! +! Inputs: +! obj_id - valid identifier for the file containing the +! referenced object or any object in that file. +! ref_type - the reference type of ref. +! ref - Reference to open. +! Outputs: +! ref_obj_id - identifier of referenced object +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rdereference_f +! subroutine using pointers. +! +! Signature: + SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the + ! referenced object or any object in that file. + INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. + TYPE(C_PTR), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + ! Identifier of referenced object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) + + END SUBROUTINE h5rdereference_ptr_f +! +!****s* H5R (F03)/h5rget_name_object_f +! +! NAME +! h5rget_name_object_f +! +! PURPOSE +! Retrieves a name of a referenced object. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + 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 +!****s* H5R (F03)/h5rget_name_region_f +! +! NAME +! h5rget_name_region_f +! +! PURPOSE +! Retrieves a name of a dataset region. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_region_f + + !****s* H5R (F03)/h5rget_name_ptr_f + ! + ! NAME + ! h5rget_name_ptr_f + ! + ! PURPOSE + ! Retrieves a name of a referenced object. + ! + ! Inputs: + ! 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 - Returns 0 if successful and -1 if fails. + ! + ! Optional parameters: + ! 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: + 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 + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_ptr_f + + !****s* H5R (F03)/h5rget_obj_type_f + ! + ! NAME + ! h5rget_obj_type_f + ! + ! PURPOSE + ! Retrieves the type of object that an object reference points to. + ! + ! Inputs: + ! loc_id - Identifier for the dataset containing the reference or + ! for the group that dataset is in. + ! ref_type - Type of reference to query. + ! ref - Reference to query. + ! + ! Outputs: + ! obj_type - Type of referenced object. + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + ! + ! hdferr - Returns 0 if successful and -1 if fails. + ! + ! AUTHOR + ! M. Scot Breitenfeld + ! Decemeber 17, 2008 + ! + ! Signature: + SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr + !***** + + INTERFACE + INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & + BIND(C, NAME='h5rget_obj_type_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), VALUE :: ref + INTEGER :: obj_type + END FUNCTION h5rget_obj_type_c + END INTERFACE + + hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) + + END SUBROUTINE h5rget_obj_type_f + +END MODULE H5R diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 deleted file mode 100644 index 1605707..0000000 --- a/fortran/src/H5Rff.f90 +++ /dev/null @@ -1,791 +0,0 @@ -!****h* ROBODoc/H5R -! -! NAME -! MODULE H5R -! -! FILE -! fortran/src/H5Rff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5R functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5R 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 H5R - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - INTERFACE h5rget_object_type_f - - MODULE PROCEDURE h5rget_object_type_obj_f - - END INTERFACE - - TYPE :: hdset_reg_ref_t_f03 - INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref - END TYPE hdset_reg_ref_t_f03 - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 - - END INTERFACE - - - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f ! obsolete - MODULE PROCEDURE h5rcreate_region_f ! obsolete - MODULE PROCEDURE h5rcreate_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f ! obsolete - MODULE PROCEDURE h5rdereference_region_f ! obsolete - MODULE PROCEDURE h5rdereference_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f ! obsolete - MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & - BIND(C, NAME='h5rget_name_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: name_len - INTEGER(SIZE_T) :: size_default - END FUNCTION h5rget_name_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & - BIND(C, NAME='h5rdereference_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - END FUNCTION h5rdereference_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & - BIND(C, NAME='h5rcreate_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: ref_type - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & - BIND(C, NAME='h5rget_region_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: dset_id - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_ptr_c - END INTERFACE - - -CONTAINS - -!****s* H5R/h5rget_object_type_obj_f -! -! NAME -! h5rget_object_type_obj_f -! -! PURPOSE -! Retrieves the type of object that an object reference points to. -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the objects -! ref - reference to open -! OUTPUTS -! obj_type - object_type, possible values: -! H5G_UNKNOWN_F -! H5G_GROUP_F -! H5G_DATASET_F -! H5G_TYPE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_object_type_f -! subroutine. -! SOURCE - SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER, INTENT(OUT) :: obj_type ! Object type - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_OBJECT_TYPE_OBJ_C':: h5rget_object_type_obj_c - !DEC$ENDIF - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5rget_object_type_obj_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) - - END SUBROUTINE h5rget_object_type_obj_f - - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - -!****s* H5R/h5rget_region_ptr_f -! -! NAME -! h5rget_region_ptr_f -! -! PURPOSE -! Retrieves a dataspace with the specified region -! selected using pointer -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! August 4, 2012 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) - - END SUBROUTINE h5rget_region_ptr_f - - -!****s* H5R (F03)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! Inputs: -! loc_id - location identifier -! name - name of the object at the specified location -! Outputs: -! ref - reference to the specified object -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! Signature: - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - namelen = LEN(name) - - hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f - -!****s* H5R (F03)/h5rcreate_ptr_f -! -! NAME -! h5rcreate_ptr_f -! -! PURPOSE -! Creates a reference. -! -! Inputs: -! loc_id - location identifier -! name - name of the dataset at the specified location -! ref_type - type of reference: -! H5R_OBJECT -! H5T_STD_REF_DSETREG -! Outputs: -! ref - reference created by the function call. -! hdferr - returns 0 if successful and -1 if fails. -! OPTIONAL -! space_id - dataspace identifier that describes selected region -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rcreate_f -! subroutine where the output is a pointer. -! -! Signature: - SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER, INTENT(IN) :: ref_type ! type of reference - TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: space_id_c - - namelen = LEN(name) - space_id_c = -1 - IF(PRESENT(space_id)) space_id_c = space_id - hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) - - END SUBROUTINE h5rcreate_ptr_f -!****s* H5R (F03)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference -! ref - reference to open -! Outputs: -! obj_id - object_identifier -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F03)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to teh regions -! ref - reference to open -! Outputs: -! obj_id - dataspace identifier -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_region_f - -!****s* H5R (F03)/h5rdereference_ptr_f -! -! NAME -! h5rdereference_ptr_f -! -! PURPOSE -! Opens the HDF5 object referenced. -! -! Inputs: -! obj_id - valid identifier for the file containing the -! referenced object or any object in that file. -! ref_type - the reference type of ref. -! ref - Reference to open. -! Outputs: -! ref_obj_id - identifier of referenced object -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rdereference_f -! subroutine using pointers. -! -! Signature: - SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the - ! referenced object or any object in that file. - INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. - TYPE(C_PTR), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) - - END SUBROUTINE h5rdereference_ptr_f -! -!****s* H5R (F03)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - 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 -!****s* H5R (F03)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - - !****s* H5R (F03)/h5rget_name_ptr_f - ! - ! NAME - ! h5rget_name_ptr_f - ! - ! PURPOSE - ! Retrieves a name of a referenced object. - ! - ! Inputs: - ! 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 - Returns 0 if successful and -1 if fails. - ! - ! Optional parameters: - ! 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: - 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 - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_ptr_f - - !****s* H5R (F03)/h5rget_obj_type_f - ! - ! NAME - ! h5rget_obj_type_f - ! - ! PURPOSE - ! Retrieves the type of object that an object reference points to. - ! - ! Inputs: - ! loc_id - Identifier for the dataset containing the reference or - ! for the group that dataset is in. - ! ref_type - Type of reference to query. - ! ref - Reference to query. - ! - ! Outputs: - ! obj_type - Type of referenced object. - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - ! - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! Decemeber 17, 2008 - ! - ! Signature: - SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - INTEGER, INTENT(OUT) :: obj_type - INTEGER, INTENT(OUT) :: hdferr - !***** - - INTERFACE - INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & - BIND(C, NAME='h5rget_obj_type_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), VALUE :: ref - INTEGER :: obj_type - END FUNCTION h5rget_obj_type_c - END INTERFACE - - hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) - - END SUBROUTINE h5rget_obj_type_f - -END MODULE H5R diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 new file mode 100644 index 0000000..c493d46 --- /dev/null +++ b/fortran/src/H5Sff.F90 @@ -0,0 +1,1875 @@ +!****h* ROBODoc/H5S +! +! NAME +! MODULE H5S +! +! FILE +! fortran/src/H5Sff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5S functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5S 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 H5S + USE H5GLOBAL + +CONTAINS + +! +!****s* H5S/h5screate_simple_f +! +! NAME +! h5screate_simple_f +! +! PURPOSE +! Creates a new simple data space and opens it for access . +! +! INPUTS +! rank - number of dimensions +! dims - an array of the size of each dimension +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! maxdims - an array of the maximum size of each dimension +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) + + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + ! Array with the dimension + ! sizes + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) + ! Array with the maximum + ! dimension sizes +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims + + INTERFACE + INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_simple_c + END INTERFACE + + allocate (f_maxdims(rank), stat=hdferr) + if (hdferr .NE. 0) then + hdferr = -1 + return + endif + if (present(maxdims)) then + f_maxdims = maxdims + else + f_maxdims = dims + endif + hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) + deallocate(f_maxdims) + + END SUBROUTINE h5screate_simple_f + +! +!****s* H5S/h5sclose_f +! +! NAME +! h5sclose_f +! +! PURPOSE +! Releases and terminates access to a dataspace. +! +! INPUTS +! space_id - identifier of dataspace to release +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sclose_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sclose_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sclose_c + END INTERFACE + + hdferr = h5sclose_c(space_id) + + END SUBROUTINE h5sclose_f + +! +!****s* H5S/h5screate_f +! +! NAME +! h5screate_f +! +! PURPOSE +! Creates a new dataspace of a specified type. +! +! INPUTS +! classtype - the type of the dataspace to be created +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5screate_f(classtype, space_id, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype ! The type of the dataspace + ! to be created. + ! Possible values are: + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F(1) + ! H5S_NULL_F(2) + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5screate_c(classtype, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_c + END INTERFACE + + hdferr = h5screate_c(classtype, space_id) + + END SUBROUTINE h5screate_f + +! +!****s* H5S/h5scopy_f +! +! NAME +! h5scopy_f +! +! PURPOSE +! Creates an exact copy of a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! new_space_id - identifier of dataspace's copy +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: new_space_id + ! Identifier of dataspace's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT):: new_space_id + END FUNCTION h5scopy_c + END INTERFACE + + hdferr = h5scopy_c(space_id, new_space_id) + + END SUBROUTINE h5scopy_f + +! +!****s* H5S/h5sget_select_hyper_nblocks_f +! +! NAME +! h5sget_select_hyper_nblocks_f +! +! PURPOSE +! Get number of hyperslab blocks. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_blocks - number of hyperslab blocks in the current +! hyperslab selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + !number of hyperslab blocks + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + END FUNCTION h5sget_select_hyper_nblocks_c + END INTERFACE + + hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + + END SUBROUTINE h5sget_select_hyper_nblocks_f + +! +!****s* H5S/h5sget_select_hyper_blocklist_f +! +! NAME +! h5sget_select_hyper_blocklist_f +! +! PURPOSE +! Gets the list of hyperslab blocks currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startblock - hyperslab block to start with +! num_blocks - number of blocks to get +! OUTPUTS +! buf - buffer to hold block list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & + num_blocks, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startblock + !Hyperslab block to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + !number of hyperslab blocks + !to get in the current dataspace + !selection + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of hyperslab blocks selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_hyper_blocklist_c + END INTERFACE + + + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + + END SUBROUTINE h5sget_select_hyper_blocklist_f + +! +!****s* H5S/h5sget_select_bounds_f +! +! NAME +! h5sget_select_bounds_f +! +! PURPOSE +! Gets the bounding box containing the current selection. +! +! INPUTS +! space_id - dataspace identifier +! +! OUTPUTS +! start - starting coordinates of bounding box +! end - ending coordinates of bounding box +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + ! Starting coordinates of the bounding box. + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + !Ending coordinates of the bounding box, + !i.e., the coordinates of the diagonally + !opposite corner + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + END FUNCTION h5sget_select_bounds_c + END INTERFACE + + hdferr = h5sget_select_bounds_c(space_id, start, END) + + END SUBROUTINE h5sget_select_bounds_f + +! +!****s* H5S/h5sget_select_elem_npoints_f +! +! NAME +! h5sget_select_elem_npoints_f +! +! PURPOSE +! Gets the number of element points in the current selection +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_points - number of element points in the current +! dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + !number of element points + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + END FUNCTION h5sget_select_elem_npoints_c + END INTERFACE + + hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + + END SUBROUTINE h5sget_select_elem_npoints_f + +! +!****s* H5S/h5sget_select_elem_pointlist_f +! +! NAME +! h5sget_select_elem_pointlist_f +! +! PURPOSE +! Gets the list of element points currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startpoint - element point to start with +! num_points - number of elemnt points to get +! OUTPUTS +! buf - buffer with element points selected +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & + num_points, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + !Element point to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_points + !Number of element points to get + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of element points selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_elem_pointlist_c + END INTERFACE + + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + + END SUBROUTINE h5sget_select_elem_pointlist_f + +! +!****s* H5S/h5sselect_elements_f +! +! NAME +! h5sselect_elements_f +! +! PURPOSE +! Selects elements to be included in the selection for +! a dataspace +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F +! rank - number of dataspace dimensions +! num_elements - number of elements to be selected +! coord - 2D (rank x num_elements) array with the +! elements coordinates ( 1-based); in C the +! array is stored in 2D as (num_element x rank) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & + num_elements, coord, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER, INTENT(IN) :: rank + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord + INTEGER :: error, i + + INTERFACE + INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& + num_elements,c_c_coord) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord + END FUNCTION h5sselect_elements_c + END INTERFACE + + ALLOCATE(c_coord(rank,num_elements), STAT = error) + IF (error.NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + DO i = 1, rank + c_coord(i,:) = coord(rank-i+1, :) - 1 + ENDDO + hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) + +! ALLOCATE(c_coord(num_elements,rank), stat = error) +! IF (error.NE. 0) THEN +! hdferr = -1 +! RETURN +! ENDIF +! +! c_coord = TRANSPOSE(coord) +! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) + + + DEALLOCATE(c_coord) + + END SUBROUTINE h5sselect_elements_f + +! +!****s* H5S/h5sselect_all_f +! +! NAME +! h5sselect_all_f +! +! PURPOSE +! Selects the entire dataspace. +! +! INPUTS +! space_id - Identifier for the dataspace in which +! selection being made +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_all_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_all_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_all_c + END INTERFACE + + hdferr = h5sselect_all_c(space_id) + + END SUBROUTINE h5sselect_all_f + +! +!****s* H5S/h5sselect_none_f +! +! NAME +! h5sselect_none_f +! +! PURPOSE +! Resets the selection region to include no elements. +! +! INPUTS +! space_id - the identifier for the dataspace in which +! the selection is being reset. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_none_c + END INTERFACE + + hdferr = h5sselect_none_c(space_id) + + END SUBROUTINE h5sselect_none_f + +! +!****s* H5S/h5sselect_valid_f +! +! NAME +! h5sselect_valid_f +! +! PURPOSE +! Verifies that the selection is within the extent of +! the dataspace. +! +! INPUTS +! space_id - identifier for the dataspace for which +! selection is verified +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is + ! contained within the extent, + ! FALSE otherwise. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine + + INTERFACE + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sselect_valid_c + END INTERFACE + + hdferr = h5sselect_valid_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sselect_valid_f + +! +!****s* H5S/h5sget_simple_extent_npoints_f +! +! NAME +! h5sget_simple_extent_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of elements in the dataspace +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_simple_extent_npoints_c + END INTERFACE + + hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) + + END SUBROUTINE h5sget_simple_extent_npoints_f + +! +!****s* H5S/h5sget_select_npoints_f +! +! NAME +! h5sget_select_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace selection. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of points in the dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the + ! selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_select_npoints_c + END INTERFACE + + hdferr = h5sget_select_npoints_c(space_id, npoints) + + END SUBROUTINE h5sget_select_npoints_f + +! +!****s* H5S/h5sget_simple_extent_ndims_f +! +! NAME +! h5sget_simple_extent_ndims_f +! +! PURPOSE +! Determines the dimensionality of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! rank - number of dataspace dimensions +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: rank ! Number of dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + END FUNCTION h5sget_simple_extent_ndims_c + END INTERFACE + + hdferr = h5sget_simple_extent_ndims_c(space_id, rank) + + END SUBROUTINE h5sget_simple_extent_ndims_f +! +!****s* H5S/h5sget_simple_extent_dims_f +! +! NAME +! h5sget_simple_extent_dims_f +! +! PURPOSE +! Retrieves dataspace dimension size and maximum size. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! dims - array to store size of each dimension +! maxdims - array to store maximum size of each +! dimension +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + ! Array to store dimension sizes + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + ! Array to store max dimension + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, + ! number of dimensions on + ! on success +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + END FUNCTION h5sget_simple_extent_dims_c + END INTERFACE + + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) + + END SUBROUTINE h5sget_simple_extent_dims_f + +! +!****s* H5S/h5sget_simple_extent_type_f +! +! NAME +! h5sget_simple_extent_type_f +! +! PURPOSE +! Determine the current class of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! classtype - class type, possible values are: +! H5S_NO_CLASS_F (-1) +! H5S_SCALAR_F (0) +! H5S_SIMPLE_F (1) +! H5S_NULL_F (2) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: classtype ! Class type , possible values + ! are: + ! H5S_NO_CLASS_F (-1) + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F (1) + ! H5S_NULL_F (2) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + END FUNCTION h5sget_simple_extent_type_c + END INTERFACE + + hdferr = h5sget_simple_extent_type_c(space_id, classtype) + + END SUBROUTINE h5sget_simple_extent_type_f +! +!****s* H5S/h5sset_extent_simple_f +! +! NAME +! h5sset_extent_simple_f +! +! PURPOSE +! Sets or resets the size of an existing dataspace. +! +! INPUTS +! space_id - dataspace identifier +! rank - dataspace number of dimensions +! current_size - array with the new sizes of dimensions +! maximum_size - array with the new maximum sizes of +! dimensions +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & + maximum_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: rank ! Dataspace rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + ! Array with the new sizes + ! of dimensions + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + ! Array with the new maximum + ! sizes of dimensions + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & + current_size, maximum_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + END FUNCTION h5sset_extent_simple_c + END INTERFACE + + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & + maximum_size) + + END SUBROUTINE h5sset_extent_simple_f +! +!****s* H5S/h5sis_simple_f +! +! NAME +! h5sis_simple_f +! +! PURPOSE +! Determines whether a dataspace is a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! status - flag to indicate if dataspace +! is simple or not +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sis_simple_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace + ! is simple or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5sis_simple_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sis_simple_c + END INTERFACE + + hdferr = h5sis_simple_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sis_simple_f + +! +!****s* H5S/h5soffset_simple_f +! +! NAME +! h5soffset_simple_f +! +! PURPOSE +! Sets the offset of a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! offset - the offset at which to position the +! selection +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + ! The offset at which to position + ! the selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + END FUNCTION h5soffset_simple_c + END INTERFACE + + hdferr = h5soffset_simple_c(space_id, offset) + + END SUBROUTINE h5soffset_simple_f + +! +!****s* H5S/h5sextent_copy_f +! +! NAME +! h5sextent_copy_f +! +! PURPOSE +! Copies the extent of a dataspace. +! +! INPUTS +! dest_space_id - the identifier for the dataspace to which +! the extent is copied +! source_space_id - the identifier for the dataspace from +! which the extent is copied +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination + ! dataspace + INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + END FUNCTION h5sextent_copy_c + END INTERFACE + + hdferr = h5sextent_copy_c(dest_space_id, source_space_id) + + END SUBROUTINE h5sextent_copy_f + +! +!****s* H5S/h5sset_extent_none_f +! +! NAME +! h5sset_extent_none_f +! +! PURPOSE +! Removes the extent from a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sset_extent_none_c + END INTERFACE + + hdferr = h5sset_extent_none_c(space_id) + + END SUBROUTINE h5sset_extent_none_f + +! +!****s* H5S/h5sselect_hyperslab_f +! +! NAME +! h5sselect_hyperslab_f +! +! PURPOSE +! Selects a hyperslab region to add to the current selected +! region +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F (0) +! H5S_SELECT_OR_F (1) +! start - array with hyperslab offsets +! count - number of blocks included in the +! hyperslab +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! stride - array with hyperslab strides +! block - array with hyperslab block sizes +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & + hdferr, stride, block) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_SET_F (0) + ! H5S_SELECT_OR_F (1) + ! + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + ! Starting coordinates of the hyperslab + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + ! Array of how many elements to move + ! in each direction + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + ! Sizes of element block +!***** + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride + INTEGER :: rank + INTEGER :: error1, error2 + + INTERFACE + INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & + start, count, stride, block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_hyperslab_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: operator + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block + END FUNCTION h5sselect_hyperslab_c + END INTERFACE + + if (present(stride).and. present(block)) then + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, block) + return + endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! + CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + if( hdferr .EQ. -1) return + ! + if (present(stride).and. .not.present(block)) then + allocate(def_block(rank), stat=error1) + if (error1.NE.0) then + hdferr = -1 + return + endif + def_block = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, def_block) + deallocate(def_block) + return + endif + + if (.not.present(stride).and. present(block)) then + allocate(def_stride(rank), stat=error2) + if (error2.NE.0) then + hdferr = -1 + return + endif + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, block) + deallocate(def_stride) + return + endif + allocate(def_block(rank), stat=error1) + allocate(def_stride(rank), stat=error2) + if ((error1.NE.0) .OR. (error2.NE.0)) then + hdferr = -1 + return + endif + def_block = 1 + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, def_block) + deallocate(def_block) + deallocate(def_stride) + + END SUBROUTINE h5sselect_hyperslab_f +! !$! +! !$!****s* H5S/h5scombine_hyperslab_f +! !$! +! !$! NAME +! !$! h5scombine_hyperslab_f +! !$! +! !$! PURPOSE +! !$! Combine a hyperslab selection with the current +! !$! selection for a dataspace +! !$! +! !$! INPUTS +! !$! space_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! start - array with hyperslab offsets +! !$! count - number of blocks included in the +! !$! hyperslab +! !$! OUTPUTS +! !$! hyper_id - identifier for the new hyperslab +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS +! !$! stride - array with hyperslab strides +! !$! block - array with hyperslab block sizes +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES +! !$! Commented out until 1.6 ? 10/08/2002 +! !$! +! !$! SOURCE +! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & +! hyper_id, hdferr, stride, block) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + ! Starting coordinates of the hyperslab +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace +! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + ! Array of how many elements to move + ! in each direction +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + ! Sizes of element block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride +! INTEGER :: rank +! INTEGER :: error1, error2 + +! INTERFACE +! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & +! start, count, stride, block, hyper_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block +! INTEGER(HID_T), INTENT(OUT) :: hyper_id +! END FUNCTION h5scombine_hyperslab_c +! END INTERFACE + +! if (present(stride).and. present(block)) then +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, block, hyper_id) +! return +! endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! +! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) +! if( hdferr .EQ. -1) return + ! +! if (present(stride).and. .not.present(block)) then +! allocate(def_block(rank), stat=error1) +! if (error1.NE.0) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, def_block, hyper_id) +! deallocate(def_block) +! return +! endif + +! if (.not.present(stride).and. present(block)) then +! allocate(def_stride(rank), stat=error2) +! if (error2.NE.0) then +! hdferr = -1 +! return +! endif +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, block, hyper_id) +! deallocate(def_stride) +! return +! endif +! allocate(def_block(rank), stat=error1) +! allocate(def_stride(rank), stat=error2) +! if ((error1.NE.0) .OR. (error2.NE.0)) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, def_block, hyper_id) +! deallocate(def_block) +! deallocate(def_stride) + +! END SUBROUTINE h5scombine_hyperslab_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5scombine_select_f +! !$! +! !$! PURPOSE +! !$! Combine two hyperslab selections with an operation +! !$! and return a dataspace with resulting selection. +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! OUTPUTS +! !$! ds_id - idataspace identifier with the new selection +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES commented out until 1.6 release(?) 10/08/2002 +! !$! + +! ! SOURCE +! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & +! ds_id, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! +! INTERFACE +! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & +! space2_id, ds_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HID_T), INTENT(OUT) :: ds_id +! END FUNCTION h5scombine_select_c +! END INTERFACE + +! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & +! ds_id) +! return + +! END SUBROUTINE h5scombine_select_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5sselect_select_f +! !$! +! !$! PURPOSE +! !$! Refine a hyperslab selection with an operation +! !$! using second hyperslab +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to modify +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP +! !$! + +! ! SOURCE +! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & +! hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to + ! modify +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTERFACE +! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & +! space2_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(INOUT) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! END FUNCTION h5sselect_select_c +! END INTERFACE + +! hdferr = h5sselect_select_c(space1_id, operator, space2_id) +! return + +! END SUBROUTINE h5sselect_select_f + +! +!****s* H5S/h5sget_select_type_f +! +! NAME +! h5sget_select_type_f +! +! PURPOSE +! Retrieve the type of selection +! +! INPUTS +! space_id - dataspace iidentifier with selection +! OUTPUTS +! type - flag, valid values are: +! H5S_SEL_ERROR_F +! H5S_SEL_NONE_F +! H5S_SEL_POINTS_F +! H5S_SEL_HYPERSLABS_F +! H5S_SEL_ALL_F +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! SOURCE + SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to + INTEGER, INTENT(OUT) :: type ! Selection type + ! H5S_SEL_ERROR_F + ! H5S_SEL_NONE_F + ! H5S_SEL_POINTS_F + ! H5S_SEL_HYPERSLABS_F + ! H5S_SEL_ALL_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_type_c(space_id, type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: type + END FUNCTION h5sget_select_type_c + END INTERFACE + + hdferr = h5sget_select_type_c(space_id, type) + return + + END SUBROUTINE h5sget_select_type_f + +! +!****s* H5S/H5Sdecode_f +! +! NAME +! H5Sdecode_f +! +! PURPOSE +! Decode a binary object description of data space and return a new object handle. +! +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5sdecode_c + END INTERFACE + + hdferr = h5sdecode_c(buf, obj_id) + + END SUBROUTINE h5sdecode_f + +! +!****s* H5S/H5Sencode_f +! +! NAME +! H5Sencode_f +! +! PURPOSE +! Encode a data space object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5sencode_c + END INTERFACE + + hdferr = h5sencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5sencode_f + +!****s* H5S/h5sextent_equal_f +! +! NAME +! h5sextent_equal_f +! +! PURPOSE +! Determines whether two dataspace extents are equal. +! +! INPUTS +! space1_id - First dataspace identifier. +! space2_id - Second dataspace identifier. +! OUTPUTS +! Equal - .TRUE. if equal, .FALSE. if unequal. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! April 2, 2008 +! +! SOURCE + SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. + INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. + LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T) :: c_equal + + INTERFACE + INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + INTEGER(HID_T) :: c_equal + END FUNCTION h5sextent_equal_c + END INTERFACE + + hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) + + + equal = .FALSE. + IF(c_equal.GT.0) equal = .TRUE. + + + END SUBROUTINE h5sextent_equal_f + +END MODULE H5S diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 deleted file mode 100644 index c493d46..0000000 --- a/fortran/src/H5Sff.f90 +++ /dev/null @@ -1,1875 +0,0 @@ -!****h* ROBODoc/H5S -! -! NAME -! MODULE H5S -! -! FILE -! fortran/src/H5Sff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5S functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5S 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 H5S - USE H5GLOBAL - -CONTAINS - -! -!****s* H5S/h5screate_simple_f -! -! NAME -! h5screate_simple_f -! -! PURPOSE -! Creates a new simple data space and opens it for access . -! -! INPUTS -! rank - number of dimensions -! dims - an array of the size of each dimension -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! maxdims - an array of the maximum size of each dimension -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) - - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - ! Array with the dimension - ! sizes - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) - ! Array with the maximum - ! dimension sizes -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims - - INTERFACE - INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_simple_c - END INTERFACE - - allocate (f_maxdims(rank), stat=hdferr) - if (hdferr .NE. 0) then - hdferr = -1 - return - endif - if (present(maxdims)) then - f_maxdims = maxdims - else - f_maxdims = dims - endif - hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) - deallocate(f_maxdims) - - END SUBROUTINE h5screate_simple_f - -! -!****s* H5S/h5sclose_f -! -! NAME -! h5sclose_f -! -! PURPOSE -! Releases and terminates access to a dataspace. -! -! INPUTS -! space_id - identifier of dataspace to release -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sclose_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sclose_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sclose_c - END INTERFACE - - hdferr = h5sclose_c(space_id) - - END SUBROUTINE h5sclose_f - -! -!****s* H5S/h5screate_f -! -! NAME -! h5screate_f -! -! PURPOSE -! Creates a new dataspace of a specified type. -! -! INPUTS -! classtype - the type of the dataspace to be created -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5screate_f(classtype, space_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype ! The type of the dataspace - ! to be created. - ! Possible values are: - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F(1) - ! H5S_NULL_F(2) - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5screate_c(classtype, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_c - END INTERFACE - - hdferr = h5screate_c(classtype, space_id) - - END SUBROUTINE h5screate_f - -! -!****s* H5S/h5scopy_f -! -! NAME -! h5scopy_f -! -! PURPOSE -! Creates an exact copy of a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! new_space_id - identifier of dataspace's copy -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: new_space_id - ! Identifier of dataspace's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT):: new_space_id - END FUNCTION h5scopy_c - END INTERFACE - - hdferr = h5scopy_c(space_id, new_space_id) - - END SUBROUTINE h5scopy_f - -! -!****s* H5S/h5sget_select_hyper_nblocks_f -! -! NAME -! h5sget_select_hyper_nblocks_f -! -! PURPOSE -! Get number of hyperslab blocks. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_blocks - number of hyperslab blocks in the current -! hyperslab selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - !number of hyperslab blocks - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - END FUNCTION h5sget_select_hyper_nblocks_c - END INTERFACE - - hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - - END SUBROUTINE h5sget_select_hyper_nblocks_f - -! -!****s* H5S/h5sget_select_hyper_blocklist_f -! -! NAME -! h5sget_select_hyper_blocklist_f -! -! PURPOSE -! Gets the list of hyperslab blocks currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startblock - hyperslab block to start with -! num_blocks - number of blocks to get -! OUTPUTS -! buf - buffer to hold block list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & - num_blocks, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startblock - !Hyperslab block to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - !number of hyperslab blocks - !to get in the current dataspace - !selection - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of hyperslab blocks selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_hyper_blocklist_c - END INTERFACE - - - hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - - END SUBROUTINE h5sget_select_hyper_blocklist_f - -! -!****s* H5S/h5sget_select_bounds_f -! -! NAME -! h5sget_select_bounds_f -! -! PURPOSE -! Gets the bounding box containing the current selection. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! start - starting coordinates of bounding box -! end - ending coordinates of bounding box -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - ! Starting coordinates of the bounding box. - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - !Ending coordinates of the bounding box, - !i.e., the coordinates of the diagonally - !opposite corner - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - END FUNCTION h5sget_select_bounds_c - END INTERFACE - - hdferr = h5sget_select_bounds_c(space_id, start, END) - - END SUBROUTINE h5sget_select_bounds_f - -! -!****s* H5S/h5sget_select_elem_npoints_f -! -! NAME -! h5sget_select_elem_npoints_f -! -! PURPOSE -! Gets the number of element points in the current selection -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_points - number of element points in the current -! dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - !number of element points - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - END FUNCTION h5sget_select_elem_npoints_c - END INTERFACE - - hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - - END SUBROUTINE h5sget_select_elem_npoints_f - -! -!****s* H5S/h5sget_select_elem_pointlist_f -! -! NAME -! h5sget_select_elem_pointlist_f -! -! PURPOSE -! Gets the list of element points currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startpoint - element point to start with -! num_points - number of elemnt points to get -! OUTPUTS -! buf - buffer with element points selected -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & - num_points, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - !Element point to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_points - !Number of element points to get - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of element points selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_elem_pointlist_c - END INTERFACE - - hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - - END SUBROUTINE h5sget_select_elem_pointlist_f - -! -!****s* H5S/h5sselect_elements_f -! -! NAME -! h5sselect_elements_f -! -! PURPOSE -! Selects elements to be included in the selection for -! a dataspace -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! rank - number of dataspace dimensions -! num_elements - number of elements to be selected -! coord - 2D (rank x num_elements) array with the -! elements coordinates ( 1-based); in C the -! array is stored in 2D as (num_element x rank) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & - num_elements, coord, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER, INTENT(IN) :: rank - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord - INTEGER :: error, i - - INTERFACE - INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& - num_elements,c_c_coord) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord - END FUNCTION h5sselect_elements_c - END INTERFACE - - ALLOCATE(c_coord(rank,num_elements), STAT = error) - IF (error.NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - DO i = 1, rank - c_coord(i,:) = coord(rank-i+1, :) - 1 - ENDDO - hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) - -! ALLOCATE(c_coord(num_elements,rank), stat = error) -! IF (error.NE. 0) THEN -! hdferr = -1 -! RETURN -! ENDIF -! -! c_coord = TRANSPOSE(coord) -! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) - - - DEALLOCATE(c_coord) - - END SUBROUTINE h5sselect_elements_f - -! -!****s* H5S/h5sselect_all_f -! -! NAME -! h5sselect_all_f -! -! PURPOSE -! Selects the entire dataspace. -! -! INPUTS -! space_id - Identifier for the dataspace in which -! selection being made -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_all_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_all_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_all_c - END INTERFACE - - hdferr = h5sselect_all_c(space_id) - - END SUBROUTINE h5sselect_all_f - -! -!****s* H5S/h5sselect_none_f -! -! NAME -! h5sselect_none_f -! -! PURPOSE -! Resets the selection region to include no elements. -! -! INPUTS -! space_id - the identifier for the dataspace in which -! the selection is being reset. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_none_c - END INTERFACE - - hdferr = h5sselect_none_c(space_id) - - END SUBROUTINE h5sselect_none_f - -! -!****s* H5S/h5sselect_valid_f -! -! NAME -! h5sselect_valid_f -! -! PURPOSE -! Verifies that the selection is within the extent of -! the dataspace. -! -! INPUTS -! space_id - identifier for the dataspace for which -! selection is verified -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is - ! contained within the extent, - ! FALSE otherwise. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine - - INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sselect_valid_c - END INTERFACE - - hdferr = h5sselect_valid_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sselect_valid_f - -! -!****s* H5S/h5sget_simple_extent_npoints_f -! -! NAME -! h5sget_simple_extent_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of elements in the dataspace -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_simple_extent_npoints_c - END INTERFACE - - hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - - END SUBROUTINE h5sget_simple_extent_npoints_f - -! -!****s* H5S/h5sget_select_npoints_f -! -! NAME -! h5sget_select_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace selection. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of points in the dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the - ! selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_select_npoints_c - END INTERFACE - - hdferr = h5sget_select_npoints_c(space_id, npoints) - - END SUBROUTINE h5sget_select_npoints_f - -! -!****s* H5S/h5sget_simple_extent_ndims_f -! -! NAME -! h5sget_simple_extent_ndims_f -! -! PURPOSE -! Determines the dimensionality of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! rank - number of dataspace dimensions -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: rank ! Number of dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - END FUNCTION h5sget_simple_extent_ndims_c - END INTERFACE - - hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - - END SUBROUTINE h5sget_simple_extent_ndims_f -! -!****s* H5S/h5sget_simple_extent_dims_f -! -! NAME -! h5sget_simple_extent_dims_f -! -! PURPOSE -! Retrieves dataspace dimension size and maximum size. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! dims - array to store size of each dimension -! maxdims - array to store maximum size of each -! dimension -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - ! Array to store dimension sizes - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - ! Array to store max dimension - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, - ! number of dimensions on - ! on success -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - END FUNCTION h5sget_simple_extent_dims_c - END INTERFACE - - hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - - END SUBROUTINE h5sget_simple_extent_dims_f - -! -!****s* H5S/h5sget_simple_extent_type_f -! -! NAME -! h5sget_simple_extent_type_f -! -! PURPOSE -! Determine the current class of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! classtype - class type, possible values are: -! H5S_NO_CLASS_F (-1) -! H5S_SCALAR_F (0) -! H5S_SIMPLE_F (1) -! H5S_NULL_F (2) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: classtype ! Class type , possible values - ! are: - ! H5S_NO_CLASS_F (-1) - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F (1) - ! H5S_NULL_F (2) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - END FUNCTION h5sget_simple_extent_type_c - END INTERFACE - - hdferr = h5sget_simple_extent_type_c(space_id, classtype) - - END SUBROUTINE h5sget_simple_extent_type_f -! -!****s* H5S/h5sset_extent_simple_f -! -! NAME -! h5sset_extent_simple_f -! -! PURPOSE -! Sets or resets the size of an existing dataspace. -! -! INPUTS -! space_id - dataspace identifier -! rank - dataspace number of dimensions -! current_size - array with the new sizes of dimensions -! maximum_size - array with the new maximum sizes of -! dimensions -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: rank ! Dataspace rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - ! Array with the new sizes - ! of dimensions - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - ! Array with the new maximum - ! sizes of dimensions - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - END FUNCTION h5sset_extent_simple_c - END INTERFACE - - hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & - maximum_size) - - END SUBROUTINE h5sset_extent_simple_f -! -!****s* H5S/h5sis_simple_f -! -! NAME -! h5sis_simple_f -! -! PURPOSE -! Determines whether a dataspace is a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! status - flag to indicate if dataspace -! is simple or not -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sis_simple_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace - ! is simple or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sis_simple_c - END INTERFACE - - hdferr = h5sis_simple_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sis_simple_f - -! -!****s* H5S/h5soffset_simple_f -! -! NAME -! h5soffset_simple_f -! -! PURPOSE -! Sets the offset of a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! offset - the offset at which to position the -! selection -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - ! The offset at which to position - ! the selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - END FUNCTION h5soffset_simple_c - END INTERFACE - - hdferr = h5soffset_simple_c(space_id, offset) - - END SUBROUTINE h5soffset_simple_f - -! -!****s* H5S/h5sextent_copy_f -! -! NAME -! h5sextent_copy_f -! -! PURPOSE -! Copies the extent of a dataspace. -! -! INPUTS -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from -! which the extent is copied -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination - ! dataspace - INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - END FUNCTION h5sextent_copy_c - END INTERFACE - - hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - - END SUBROUTINE h5sextent_copy_f - -! -!****s* H5S/h5sset_extent_none_f -! -! NAME -! h5sset_extent_none_f -! -! PURPOSE -! Removes the extent from a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sset_extent_none_c - END INTERFACE - - hdferr = h5sset_extent_none_c(space_id) - - END SUBROUTINE h5sset_extent_none_f - -! -!****s* H5S/h5sselect_hyperslab_f -! -! NAME -! h5sselect_hyperslab_f -! -! PURPOSE -! Selects a hyperslab region to add to the current selected -! region -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F (0) -! H5S_SELECT_OR_F (1) -! start - array with hyperslab offsets -! count - number of blocks included in the -! hyperslab -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! stride - array with hyperslab strides -! block - array with hyperslab block sizes -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & - hdferr, stride, block) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_SET_F (0) - ! H5S_SELECT_OR_F (1) - ! - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -!***** - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride - INTEGER :: rank - INTEGER :: error1, error2 - - INTERFACE - INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & - start, count, stride, block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_hyperslab_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: operator - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block - END FUNCTION h5sselect_hyperslab_c - END INTERFACE - - if (present(stride).and. present(block)) then - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, block) - return - endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! - CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - if( hdferr .EQ. -1) return - ! - if (present(stride).and. .not.present(block)) then - allocate(def_block(rank), stat=error1) - if (error1.NE.0) then - hdferr = -1 - return - endif - def_block = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, def_block) - deallocate(def_block) - return - endif - - if (.not.present(stride).and. present(block)) then - allocate(def_stride(rank), stat=error2) - if (error2.NE.0) then - hdferr = -1 - return - endif - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, block) - deallocate(def_stride) - return - endif - allocate(def_block(rank), stat=error1) - allocate(def_stride(rank), stat=error2) - if ((error1.NE.0) .OR. (error2.NE.0)) then - hdferr = -1 - return - endif - def_block = 1 - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, def_block) - deallocate(def_block) - deallocate(def_stride) - - END SUBROUTINE h5sselect_hyperslab_f -! !$! -! !$!****s* H5S/h5scombine_hyperslab_f -! !$! -! !$! NAME -! !$! h5scombine_hyperslab_f -! !$! -! !$! PURPOSE -! !$! Combine a hyperslab selection with the current -! !$! selection for a dataspace -! !$! -! !$! INPUTS -! !$! space_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! start - array with hyperslab offsets -! !$! count - number of blocks included in the -! !$! hyperslab -! !$! OUTPUTS -! !$! hyper_id - identifier for the new hyperslab -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS -! !$! stride - array with hyperslab strides -! !$! block - array with hyperslab block sizes -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES -! !$! Commented out until 1.6 ? 10/08/2002 -! !$! -! !$! SOURCE -! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & -! hyper_id, hdferr, stride, block) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace -! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride -! INTEGER :: rank -! INTEGER :: error1, error2 - -! INTERFACE -! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & -! start, count, stride, block, hyper_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block -! INTEGER(HID_T), INTENT(OUT) :: hyper_id -! END FUNCTION h5scombine_hyperslab_c -! END INTERFACE - -! if (present(stride).and. present(block)) then -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, block, hyper_id) -! return -! endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! -! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) -! if( hdferr .EQ. -1) return - ! -! if (present(stride).and. .not.present(block)) then -! allocate(def_block(rank), stat=error1) -! if (error1.NE.0) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, def_block, hyper_id) -! deallocate(def_block) -! return -! endif - -! if (.not.present(stride).and. present(block)) then -! allocate(def_stride(rank), stat=error2) -! if (error2.NE.0) then -! hdferr = -1 -! return -! endif -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, block, hyper_id) -! deallocate(def_stride) -! return -! endif -! allocate(def_block(rank), stat=error1) -! allocate(def_stride(rank), stat=error2) -! if ((error1.NE.0) .OR. (error2.NE.0)) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, def_block, hyper_id) -! deallocate(def_block) -! deallocate(def_stride) - -! END SUBROUTINE h5scombine_hyperslab_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5scombine_select_f -! !$! -! !$! PURPOSE -! !$! Combine two hyperslab selections with an operation -! !$! and return a dataspace with resulting selection. -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! OUTPUTS -! !$! ds_id - idataspace identifier with the new selection -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES commented out until 1.6 release(?) 10/08/2002 -! !$! - -! ! SOURCE -! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & -! ds_id, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! -! INTERFACE -! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & -! space2_id, ds_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HID_T), INTENT(OUT) :: ds_id -! END FUNCTION h5scombine_select_c -! END INTERFACE - -! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & -! ds_id) -! return - -! END SUBROUTINE h5scombine_select_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5sselect_select_f -! !$! -! !$! PURPOSE -! !$! Refine a hyperslab selection with an operation -! !$! using second hyperslab -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to modify -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP -! !$! - -! ! SOURCE -! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & -! hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to - ! modify -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTERFACE -! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & -! space2_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(INOUT) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! END FUNCTION h5sselect_select_c -! END INTERFACE - -! hdferr = h5sselect_select_c(space1_id, operator, space2_id) -! return - -! END SUBROUTINE h5sselect_select_f - -! -!****s* H5S/h5sget_select_type_f -! -! NAME -! h5sget_select_type_f -! -! PURPOSE -! Retrieve the type of selection -! -! INPUTS -! space_id - dataspace iidentifier with selection -! OUTPUTS -! type - flag, valid values are: -! H5S_SEL_ERROR_F -! H5S_SEL_NONE_F -! H5S_SEL_POINTS_F -! H5S_SEL_HYPERSLABS_F -! H5S_SEL_ALL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! SOURCE - SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to - INTEGER, INTENT(OUT) :: type ! Selection type - ! H5S_SEL_ERROR_F - ! H5S_SEL_NONE_F - ! H5S_SEL_POINTS_F - ! H5S_SEL_HYPERSLABS_F - ! H5S_SEL_ALL_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_type_c(space_id, type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: type - END FUNCTION h5sget_select_type_c - END INTERFACE - - hdferr = h5sget_select_type_c(space_id, type) - return - - END SUBROUTINE h5sget_select_type_f - -! -!****s* H5S/H5Sdecode_f -! -! NAME -! H5Sdecode_f -! -! PURPOSE -! Decode a binary object description of data space and return a new object handle. -! -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5sdecode_c - END INTERFACE - - hdferr = h5sdecode_c(buf, obj_id) - - END SUBROUTINE h5sdecode_f - -! -!****s* H5S/H5Sencode_f -! -! NAME -! H5Sencode_f -! -! PURPOSE -! Encode a data space object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5sencode_c - END INTERFACE - - hdferr = h5sencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5sencode_f - -!****s* H5S/h5sextent_equal_f -! -! NAME -! h5sextent_equal_f -! -! PURPOSE -! Determines whether two dataspace extents are equal. -! -! INPUTS -! space1_id - First dataspace identifier. -! space2_id - Second dataspace identifier. -! OUTPUTS -! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! April 2, 2008 -! -! SOURCE - SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. - INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. - LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T) :: c_equal - - INTERFACE - INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space1_id - INTEGER(HID_T), INTENT(IN) :: space2_id - INTEGER(HID_T) :: c_equal - END FUNCTION h5sextent_equal_c - END INTERFACE - - hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - - - equal = .FALSE. - IF(c_equal.GT.0) equal = .TRUE. - - - END SUBROUTINE h5sextent_equal_f - -END MODULE H5S diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 new file mode 100644 index 0000000..d43db38 --- /dev/null +++ b/fortran/src/H5Tff.F90 @@ -0,0 +1,3285 @@ +!****h* ROBODoc/H5T +! +! NAME +! MODULE H5T +! +! PURPOSE +! This file contains Fortran interfaces for H5T functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5T + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +!****t* H5T (F03)/hvl_t +! Fortran2003 Derived Type: + TYPE hvl_t + INTEGER(size_t) :: len ! Length of VL data (in base type units) + TYPE(C_PTR) :: p ! Pointer to VL data + END TYPE hvl_t + +!***** + + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + +CONTAINS + +! +!****s* H5T/h5topen_f +! +! NAME +! h5topen_f +! +! PURPOSE +! Opens named datatype. +! +! INPUTS +! loc_id - location identifier +! name - a datatype name +! OUTPUTS +! type_id - datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tapl_id - datatype access property list identifier. +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! Added optional parameter 'tapl_id' for compatability +! with H5Topen2. April 9, 2009. +! +! SOURCE + SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group + INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5topen_c + END INTERFACE + + namelen = LEN(name) + + tapl_id_default = H5P_DEFAULT_F + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + END SUBROUTINE h5topen_f +! +!****s* H5T/h5tcommit_f +! +! NAME +! h5tcommit_f +! +! PURPOSE +! Commits a transient datatype to a file, creating a +! new named datatype. +! +! INPUTS +! loc_id - location identifier +! name - name of the datatype to be stored +! at the specified location +! type_id - identifier of a datatype to be stored +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list +! tcpl_id - Datatype creation property list +! tapl_id - Datatype access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! - Added optional parameters introduced in version 1.8 +! M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & + lcpl_id, tcpl_id, tapl_id ) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name + ! Datatype name within file or group + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list +!***** + + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF (PRESENT(tapl_id)) tapl_id_default = tapl_id + + namelen = LEN(name) + + hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_f +! +!****s* H5T/h5tcopy_f +! +! NAME +! h5tcopy_f +! +! PURPOSE +! Creates a copy of exisiting datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! new_type_id - identifier of datatype's copy +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: new_type_id + ! Identifier of datatype's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tcopy_c + END INTERFACE + + hdferr = h5tcopy_c(type_id, new_type_id) + END SUBROUTINE h5tcopy_f +! +!****s* H5T/h5tequal_f +! +! NAME +! h5tequal_f +! +! PURPOSE +! Determines whether two datatype identifiers refer +! to the same datatype. +! +! INPUTS +! type1_id - datatype identifier +! type2_id - datatype identifier +! OUTPUTS +! flag - TRUE/FALSE flag to indicate +! if two datatypes are equal +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two + ! datatypes are equal + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_flag + INTERFACE + INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER :: c_flag + END FUNCTION h5tequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5tequal_c(type1_id, type2_id, c_flag) + if(c_flag .gt. 0) flag = .TRUE. + END SUBROUTINE h5tequal_f +! +!****s* H5T/h5tclose_f +! +! NAME +! h5tclose_f +! +! PURPOSE +! Releases a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tclose_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tclose_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tclose_c + END INTERFACE + + hdferr = h5tclose_c(type_id) + END SUBROUTINE h5tclose_f +! +!****s* H5T/h5tget_class_f +! +! NAME +! h5tget_class_f +! +! PURPOSE +! Returns the datatype class identifier. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! class - Class, possible values are: +! H5T_NO_CLASS_F (-1) +! H5T_INTEGER_F (0) +! H5T_FLOAT_F (1) +! H5T_TIME_F (2) +! H5T_STRING_F (3) +! H5T_BITFIELD_F (4) +! H5T_OPAQUE_F (5) +! H5T_COMPOUND_F (6) +! H5T_REFERENCE_F (7) +! H5T_ENUM_F (8) +! H5T_VLEN_F (9) +! H5T_ARRAY_F (10) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_class_f(type_id, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_class_c(type_id, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_class_c + END INTERFACE + + hdferr = h5tget_class_c(type_id, class) + END SUBROUTINE h5tget_class_f +! +!****s* H5T/h5tget_size_f +! +! NAME +! h5tget_size_f +! +! PURPOSE +! Returns the size of a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! size - datatype size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5tget_size_c + END INTERFACE + + hdferr = h5tget_size_c(type_id, size) + END SUBROUTINE h5tget_size_f + +! +!****s* H5T/h5tset_size_f +! +! NAME +! h5tset_size_f +! +! PURPOSE +! Sets the total size for an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! size - size of the datatype +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! +! SOURCE + SUBROUTINE h5tset_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5tset_size_c + END INTERFACE + + hdferr = h5tset_size_c(type_id, size) + END SUBROUTINE h5tset_size_f + +! +!****s* H5T/h5tget_order_f +! +! NAME +! h5tget_order_f +! +! PURPOSE +! Returns the byte order of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! order - byte order for the datatype, possible +! values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: order + ! Datatype byte order, possible values are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: order + END FUNCTION h5tget_order_c + END INTERFACE + + hdferr = h5tget_order_c(type_id, order) + END SUBROUTINE h5tget_order_f +! +!****s* H5T/h5tset_order_f +! +! NAME +! h5tset_order_f +! +! PURPOSE +! Sets the byte ordering of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! order - datatype byte order Possible values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values + ! are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: order + END FUNCTION h5tset_order_c + END INTERFACE + + hdferr = h5tset_order_c(type_id, order) + END SUBROUTINE h5tset_order_f + +! +!****s* H5T/h5tget_precision_f +! +! NAME +! h5tget_precision_f +! +! PURPOSE +! Returns the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! precision - precision of the datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision + END FUNCTION h5tget_precision_c + END INTERFACE + + hdferr = h5tget_precision_c(type_id, precision) + END SUBROUTINE h5tget_precision_f + +! +!****s* H5T/h5tset_precision_f +! +! NAME +! h5tset_precision_f +! +! PURPOSE +! Sets the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! precision - datatype precision +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: precision + END FUNCTION h5tset_precision_c + END INTERFACE + + hdferr = h5tset_precision_c(type_id, precision) + END SUBROUTINE h5tset_precision_f + +! +!****s* H5T/h5tget_offset_f +! +! NAME +! h5tget_offset_f +! +! PURPOSE +! Retrieves the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! offset - offset value +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_offset_c + END INTERFACE + + hdferr = h5tget_offset_c(type_id, offset) + END SUBROUTINE h5tget_offset_f + +! +!****s* H5T/h5tset_offset_f +! +! NAME +! h5tset_offset_f +! +! PURPOSE +! Sets the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! offset - offset value +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + END FUNCTION h5tset_offset_c + END INTERFACE + + hdferr = h5tset_offset_c(type_id, offset) + END SUBROUTINE h5tset_offset_f + +! +!****s* H5T/h5tget_pad_f +! +! NAME +! h5tget_pad_f +! +! PURPOSE +! Retrieves the padding type of the least and +! most -significant bit padding. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! hdferr - Returns 0 if successful and -1 if fails + +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(OUT) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + END FUNCTION h5tget_pad_c + END INTERFACE + + hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tget_pad_f + +! +!****s* H5T/h5tset_pad_f +! +! NAME +! h5tset_pad_f +! +! PURPOSE +! Sets the least and most-significant bits padding types. +! +! INPUTS +! type_id - datatype identifier +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(IN) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T_PAD_ZERO_F = 0 + ! H5T_PAD_ONE_F = 1 + ! H5T_PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: type_id + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + END FUNCTION h5tset_pad_c + END INTERFACE + + hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tset_pad_f + +! +!****s* H5T/h5tget_sign_f +! +! NAME +! h5tget_sign_f +! +! PURPOSE +! Retrieves the sign type for an integer type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: sign ! sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + END FUNCTION h5tget_sign_c + END INTERFACE + + hdferr = h5tget_sign_c(type_id, sign) + END SUBROUTINE h5tget_sign_f + +! +!****s* H5T/h5tset_sign_f +! +! NAME +! h5tset_sign_f +! +! PURPOSE +! Sets the sign proprety for an integer type. +! +! INPUTS +! type_id - datatype identifier +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: sign !sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + END FUNCTION h5tset_sign_c + END INTERFACE + + hdferr = h5tset_sign_c(type_id, sign) + END SUBROUTINE h5tset_sign_f + +! +!****s* H5T/h5tget_fields_f +! +! NAME +! h5tget_fields_f +! +! PURPOSE +! Retrieves floating point datatype bit field information. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + END FUNCTION h5tget_fields_c + END INTERFACE + + hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tget_fields_f + +! +!****s* H5T/h5tset_fields_f +! +! NAME +! h5tset_fields_f +! +! PURPOSE +! Sets locations and sizes of floating point bit fields. +! +! INPUTS +! type_id - datatype identifier +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + END FUNCTION h5tset_fields_c + END INTERFACE + + hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tset_fields_f + +! +!****s* H5T/h5tget_ebias_f +! +! NAME +! h5tget_ebias_f +! +! PURPOSE +! Retrieves the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! ebias - datatype exponent bias +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + END FUNCTION h5tget_ebias_c + END INTERFACE + + hdferr = h5tget_ebias_c(type_id, ebias) + END SUBROUTINE h5tget_ebias_f + +! +!****s* H5T/h5tset_ebias_f +! +! NAME +! h5tset_ebias_f +! +! PURPOSE +! Sets the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! ebias - datatype exponent bias +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + END FUNCTION h5tset_ebias_c + END INTERFACE + + hdferr = h5tset_ebias_c(type_id, ebias) + END SUBROUTINE h5tset_ebias_f + +! +!****s* H5T/h5tget_norm_f +! +! NAME +! h5tget_norm_f +! +! PURPOSE +! Retrieves mantissa normalization of a floating-point +! datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + END FUNCTION h5tget_norm_c + END INTERFACE + + hdferr = h5tget_norm_c(type_id, norm) + END SUBROUTINE h5tget_norm_f + +! +!****s* H5T/h5tset_norm_f +! +! NAME +! h5tset_norm_f +! +! PURPOSE +! Sets the mantissa normalization of a floating-point datatype. +! +! INPUTS +! type_id - datatype identifier +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + END FUNCTION h5tset_norm_c + END INTERFACE + + hdferr = h5tset_norm_c(type_id, norm) + END SUBROUTINE h5tset_norm_f + +! +!****s* H5T/h5tget_inpad_f +! +! NAME +! h5tget_inpad_f +! +! PURPOSE +! Retrieves the internal padding type for unused bits +! in floating-point datatypes. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + END FUNCTION h5tget_inpad_c + END INTERFACE + + hdferr = h5tget_inpad_c(type_id, padtype) + END SUBROUTINE h5tget_inpad_f + +! +!****s* H5T/h5tset_inpad_f +! +! NAME +! h5tset_inpad_f +! +! PURPOSE +! Fills unused internal floating point bits. +! +! INPUTS +! type_id - datatype identifier +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + END FUNCTION h5tset_inpad_c + END INTERFACE + + hdferr = h5tset_inpad_c(type_id, padtype) + END SUBROUTINE h5tset_inpad_f + +! +!****s* H5T/h5tget_cset_f +! +! NAME +! h5tget_cset_f +! +! PURPOSE +! Retrieves the character set type of a string datatype. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! cset - Character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F = 0 +! H5T_CSET_UTF8_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype + ! Possible values are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + END FUNCTION h5tget_cset_c + END INTERFACE + + hdferr = h5tget_cset_c(type_id, cset) + END SUBROUTINE h5tget_cset_f + +! +!****s* H5T/h5tset_cset_f +! +! NAME +! h5tset_cset_f +! +! PURPOSE +! Sets character set to be used. +! +! INPUTS +! type_id - datatype identifier +! cset - character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F = 0 +! H5T_CSET_UTF8_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: cset !character set type of a string datatype + ! Possible values of padding type are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + END FUNCTION h5tset_cset_c + END INTERFACE + + hdferr = h5tset_cset_c(type_id, cset) + END SUBROUTINE h5tset_cset_f + +! +!****s* H5T/h5tget_strpad_f +! +! NAME +! h5tget_strpad_f +! +! PURPOSE +! Retrieves the storage mechanism for a string datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F +! H5T_STR_ERROR_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: strpad + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + END FUNCTION h5tget_strpad_c + END INTERFACE + + hdferr = h5tget_strpad_c(type_id, strpad) + END SUBROUTINE h5tget_strpad_f + +! +!****s* H5T/h5tset_strpad_f +! +! NAME +! h5tset_strpad_f +! +! PURPOSE +! Defines the storage mechanism for character strings. +! +! INPUTS +! type_id - datatype identifier +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F +! H5T_STR_ERROR_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + END FUNCTION h5tset_strpad_c + END INTERFACE + + hdferr = h5tset_strpad_c(type_id, strpad) + END SUBROUTINE h5tset_strpad_f + +! +!****s* H5T/h5tget_nmembers_f +! +! NAME +! h5tget_nmembers_f +! +! PURPOSE +! Retrieves the number of fields in a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! num_members - number of members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + END FUNCTION h5tget_nmembers_c + END INTERFACE + + hdferr = h5tget_nmembers_c(type_id, num_members) + END SUBROUTINE h5tget_nmembers_f + +! +!****s* H5T/h5tget_member_name_f +! +! NAME +! h5tget_member_name_f +! +! PURPOSE +! Retrieves the name of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! index - filed index (0-based) +! OUTPUTS +! member_name - buffer to hold member's name +! namelen - name length +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve + CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of + !a compound datatype + INTEGER, INTENT(OUT) :: namelen ! Length of the name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: member_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(LEN=*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + END FUNCTION + END INTERFACE + + hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) + END SUBROUTINE h5tget_member_name_f + +! +!****s* H5T/h5tget_member_offset_f +! +! NAME +! h5tget_member_offset_f +! +! PURPOSE +! Retrieves the offset of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the field +! OUTPUTS +! offset - byte offset of the requested field +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the field + !whose offset is requested + INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_member_offset_c + END INTERFACE + + hdferr = h5tget_member_offset_c(type_id, member_no, offset ) + END SUBROUTINE h5tget_member_offset_f +! +!****s* H5T/h5tget_member_index_f +! +! NAME +! h5tget_member_index_f +! +! PURPOSE +! Retrieves the index of a compound or enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! name - name of the field or member whose index to +! to be retrieved from the datatype. +! OUTPUTS +! index - 0-based index of the filed or member (0 to N-1) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! SOURCE + SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name + INTEGER, INTENT(OUT) :: index ! Field or member index + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + + INTERFACE + INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: index + END FUNCTION h5tget_member_index_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tget_member_index_c(type_id, name, namelen, index) + END SUBROUTINE h5tget_member_index_f + + +! !$! +! !$!****s* H5T/h5tget_member_dim_f +! !$! +! !$! NAME +! !$! h5tget_member_dim_f +! !$! +! !$! PURPOSE +! !$! This function is not supported in hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! +! !$! SOURCE +! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) +! !$! +! !$! IMPLICIT NONE +! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier +! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of +! !$! !field_dims, perm) +! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field +! !$! +! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the +! !$! !dimensions of the field +! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the +! !$! !permutation vector of the field +! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !$!*****! +! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c +! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) +! !$! +! !$! END SUBROUTINE h5tget_member_dims_f + + +!****s* H5T/h5tget_array_dims_f +! +! NAME +! h5tget_array_dims_f +! +! PURPOSE +! Returns sizes of array dimensions. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! dims - buffer to store array datatype dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype + ! dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5tget_array_dims_c + END INTERFACE + + hdferr = h5tget_array_dims_c(type_id, dims) + + END SUBROUTINE h5tget_array_dims_f + +! +!****s* H5T/h5tget_array_ndims_f +! +! NAME +! h5tget_array_ndims_f +! +! PURPOSE +! Returns the rank of an array datatype. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! ndims - number of array dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER, INTENT(OUT) :: ndims ! number of array dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + END FUNCTION h5tget_array_ndims_c + END INTERFACE + + hdferr = h5tget_array_ndims_c(type_id, ndims) + + END SUBROUTINE h5tget_array_ndims_f + +! +!****s* H5T/h5tget_super_f +! +! NAME +! h5tget_super_f +! +! PURPOSE +! Returns the base datatype from which a datatype is derived. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! base_type_id - identifier of the base type +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype + ! from which datatype (type_id) was derived + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + END FUNCTION h5tget_super_c + END INTERFACE + + hdferr = h5tget_super_c(type_id, base_type_id) + + END SUBROUTINE h5tget_super_f + +! +!****s* H5T/h5tget_member_type_f +! +! NAME +! h5tget_member_type_f +! +! PURPOSE +! Returns the datatype of the specified member. +! +! INPUTS +! type_id - compound datatype identifier +! field_idx - field index (0-based) +! +! OUTPUTS +! datatype - idnetifier of the member's datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve + INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of + !the datatype of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + END FUNCTION h5tget_member_type_c + END INTERFACE + + hdferr = h5tget_member_type_c(type_id, field_idx , datatype) + END SUBROUTINE h5tget_member_type_f + +! +!****s* H5T/h5tcreate_f +! +! NAME +! h5tcreate_f +! +! PURPOSE +! Creates a new datatype. +! +! INPUTS +! class - Datatype class can be one of: +! H5T_COMPOUND_F +! H5T_ENUM_F +! H5T_OPAQUE_F +! H5T_STRING_F +! +! size - Size of the datatype. +! OUTPUTS +! type_id - Datatype identifier. +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) + IMPLICIT NONE + INTEGER , INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T) , INTENT(OUT) :: type_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tcreate_c(class, size, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tcreate_c + END INTERFACE + + hdferr = h5tcreate_c(class, size, type_id) + END SUBROUTINE h5tcreate_f + +! +!****s* H5T/h5tinsert_f +! +! NAME +! h5tinsert_f +! +! PURPOSE +! Adds a new member to a compound datatype. +! +! INPUTS +! type_id - compound dattype identifier +! name - name of the field to insert +! offset - start of the member in an instance of +! the compound datatype +! field_id - datatype identifier of the field to insert +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert + INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of + !the compound datatype + INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER :: namelen + END FUNCTION h5tinsert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) + END SUBROUTINE h5tinsert_f + +! +!****s* H5T/h5tpack_f +! +! NAME +! h5tpack_f +! +! PURPOSE +! Recursively removes padding from within a compound datatype. +! +! INPUTS +! type_id - compound datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tpack_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tpack_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tpack_c + END INTERFACE + + hdferr = h5tpack_c(type_id) + END SUBROUTINE h5tpack_f + +! !$! +! !$!****s* H5T/h5tinsert_array_f +! !$! +! !$! NAME +! !$! h5tinsert_array_f +! !$! +! !$! PURPOSE +! !$! This function is not available on hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! SOURCE +! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype +! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member +! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member +! !within compound datatype +! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. +! !Valid values are 0 (zero) through 4 (four) +! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array +! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !*****! +! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm +! !Pointer to buffer to store +! !the permutation vector of the field +! INTEGER :: namelen, sizeofperm +! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 +! namelen = LEN(name) +! if (present(perm)) then +! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) +! else +! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) +! end if +! +! END SUBROUTINE h5tinsert_array_f + +! +!****s* H5T/h5tarray_create_f +! +! NAME +! h5tarray_create_f +! +! PURPOSE +! Creates an array datatype object. +! +! INPUTS +! base_id - datatype identifier for the array +! base datatype +! rank - rank of the array +! dims - array dimension sizes +! OUTPUTS +! type_id - array datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype + INTEGER, INTENT(IN) :: rank ! Rank of the array + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension + INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tarray_create_c + END INTERFACE + + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) + + END SUBROUTINE h5tarray_create_f + +! +!****s* H5T/h5tenum_create_f +! +! NAME +! h5tenum_create_f +! +! PURPOSE +! Creates a new enumeration datatype. +! +! INPUTS +! parent_id - datatype identifier for base datatype +! OUTPUTS +! new_type_id - datatype identifier for the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for + ! the base datatype + INTEGER(HID_T), INTENT(OUT) :: new_type_id + !datatype identifier for the + ! new enumeration datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tenum_create_c + END INTERFACE + + hdferr = h5tenum_create_c(parent_id, new_type_id) + END SUBROUTINE h5tenum_create_f +! +!****s* H5T/h5tenum_nameof_f +! +! NAME +! h5tenum_nameof_f +! +! PURPOSE +! Returns the symbol name corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! value - value of the enumeration datatype +! namelen - name buffer size +! OUTPUTS +! name - buffer to hold symbol name +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! NOTE +! According to the standard: Because an INTENT(OUT) variable is considered undefined +! on entry to the procedure, any default initialization specified for its type will +! be applied. So we need to blank out the "name" to be portable and eliminate any +! characters the "name' may contain upon entry, depending on compiler implementation. +! SOURCE + SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. + INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name + INTEGER, INTENT(IN) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + END FUNCTION h5tenum_nameof_c + END INTERFACE + + name(1:LEN(name)) = ' ' + + hdferr = h5tenum_nameof_c(type_id, value, name, namelen) + END SUBROUTINE h5tenum_nameof_f + +! +!****s* H5T/h5tenum_valuof_f +! +! NAME +! h5tenum_valuof_f +! +! PURPOSE +! Returns the value corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! name - symbol name +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tenum_valueof_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_valueof_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_valueof_f + +! +!****s* H5T/h5tget_member_value_f +! +! NAME +! h5tget_member_value_f +! +! PURPOSE +! Returns the value of an enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the enumeration datatype member +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + END FUNCTION + END INTERFACE + + hdferr = h5tget_member_value_c(type_id, member_no, value) + END SUBROUTINE h5tget_member_value_f + +! +!****s* H5T/h5tset_tag_f +! +! NAME +! h5tset_tag_f +! +! PURPOSE +! Tags an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! tag - unique ASCII string with which the opaque +! datatype is to be tagged. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which + !the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: taglen + + INTERFACE + INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: tag + INTEGER :: taglen + END FUNCTION h5tset_tag_c + END INTERFACE + + taglen = LEN(tag) + hdferr = h5tset_tag_c(type_id, tag, taglen) + END SUBROUTINE h5tset_tag_f + +! +!****s* H5T/h5tget_tag_f +! +! NAME +! h5tget_tag_f +! +! PURPOSE +! Gets the tag associated with an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! OUTPUTS +! tag - unique ASCII string associated with opaque +! datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which + ! the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: taglen ! Length of tag + INTEGER(SIZE_T) :: tag_size ! Declared character length of tab + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: tag + INTEGER(SIZE_T), INTENT(IN) :: tag_size + INTEGER, INTENT(OUT) :: taglen + END FUNCTION h5tget_tag_c + END INTERFACE + + tag_size = LEN(tag) + + hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) + END SUBROUTINE h5tget_tag_f + +! +!****s* H5T/h5tvlen_create_f +! +! NAME +! h5tvlen_create_f +! +! PURPOSE +! Creates a new variable-length datatype. +! +! INPUTS +! type_id - identifier iof base datatype +! OUTPUTS +! vltype_id - identifier for VL datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! Wednesday, October 23, 2002 +! +! NOTES +! Only basic Fortran base datatypes are supported +! +! SOURCE + SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + END FUNCTION h5tvlen_create_c + END INTERFACE + + hdferr = h5tvlen_create_c(type_id, vltype_id) + END SUBROUTINE h5tvlen_create_f + +! +!****s* H5T/h5tis_variable_str_f +! +! NAME +! h5tis_variable_str_f +! +! PURPOSE +! Determines whether a dattype is a variable string. +! +! INPUTS +! type_id - datartpe identifier +! OUTPUTS +! status - flag to indicate if datatype +! is a variable string +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype + ! is a variable string or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: flag + END FUNCTION h5tis_variable_str_c + END INTERFACE + + hdferr = h5tis_variable_str_c(type_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5tis_variable_str_f + +! +!****s* H5T/h5tget_member_class_f +! +! NAME +! h5tget_member_class_f +! +! PURPOSE +! Returns datatype class of compound datatype member. +! +! INPUTS +! type_id - datartpe identifier +! member_no - index of compound datatype member +! OUTPUTS +! class - class type for compound dadtype member +! Valid classes: +! H5T_NO_CLASS_F (error) +! H5T_INTEGER_F +! H5T_FLOAT_F +! H5T_TIME_F +! H5T_STRING_F +! H5T_BITFIELD_F +! H5T_OPAQUE_F +! H5T_COMPOUND_F +! H5T_REFERENCE_F +! H5T_ENUM_F +! H5T_VLEN_F +! H5T_ARRAY_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! April 6, 2005 +! +! SOURCE + SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no ! Member number + INTEGER, INTENT(OUT) :: class ! Member class + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_member_class_c + END INTERFACE + + hdferr = h5tget_member_class_c(type_id, member_no, class) + + END SUBROUTINE h5tget_member_class_f + +! +!****s* H5T/h5tcommit_anon_f +! +! NAME +! h5tcommit_anon_f +! +! PURPOSE +! Commits a transient datatype to a file, +! creating a new named datatype, +! but does not link it into the file structure. +! +! INPUTS +! loc_id - A file or group identifier specifying the file +! in which the new named datatype is to be created. +! dtype_id - A datatype identifier. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tcpl_id - A datatype creation property list identifier. +! (H5P_DEFAULT_F for the default property list.) +! tapl_id - A datatype access property list identifier. +! should always be passed as the value H5P_DEFAULT_F. +! +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying + ! the file in which the new named datatype + ! is to be created. + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property + ! list identifier. + ! (H5P_DEFAULT_F for the default property list.) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. + ! should always be passed as the value H5P_DEFAULT_F. +!***** + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_anon_c + END INTERFACE + + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_anon_f + +! +!****s* H5T/h5tcommitted_f +! +! NAME +! h5tcommitted_f +! +! PURPOSE +! Determines whether a datatype is a named type or a transient type. +! +! INPUTS +! dtype_id - A datatype identifier. +! +! OUTPUTS +! committed - .TRUE., if the datatype has been committed +! .FALSE., if the datatype has not been committed. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier + LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed + !.FALSE., if the datatype has not been committed. + INTEGER, INTENT(OUT) :: hdferr ! Error code: +! Success: 0 +! Failure: -1 +!***** + INTERFACE + INTEGER FUNCTION h5tcommitted_c(dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + END FUNCTION h5tcommitted_c + END INTERFACE + + hdferr = h5tcommitted_c(dtype_id) + + IF(hdferr.GT.0)THEN + committed = .TRUE. + hdferr = 0 + ELSE IF(hdferr.EQ.0)THEN + committed = .FALSE. + hdferr = 0 + ELSE + hdferr = -1 + ENDIF + + + END SUBROUTINE h5tcommitted_f + +! +!****s* H5T/H5Tdecode_f +! +! NAME +! H5Tdecode_f +! +! PURPOSE +! Decode a binary object description of data type and return a new object handle. +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5tdecode_c + END INTERFACE + + hdferr = h5tdecode_c(buf, obj_id) + + END SUBROUTINE h5tdecode_f + +! +!****s* H5T/H5Tencode_f +! +! NAME +! H5Tencode_f +! +! PURPOSE +! Encode a data type object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5tencode_c + END INTERFACE + + hdferr = h5tencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5tencode_f + +! +!****s* H5T/h5tget_create_plist_f +! +! NAME +! h5tget_create_plist_f +! +! PURPOSE +! Returns a copy of a datatype creation property list. +! +! INPUTS +! dtype_id - Datatype identifier +! OUTPUTS +! dtpl_id - Datatype property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + END FUNCTION h5tget_create_plist_c + END INTERFACE + + hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) + END SUBROUTINE h5tget_create_plist_f + +! +!****s* H5T/h5tcompiler_conv_f +! +! NAME +! h5tcompiler_conv_f +! +! PURPOSE +! Check whether the library’s default conversion is hard conversion.R +! +! INPUTS +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! OUTPUTS +! flag - TRUE for compiler conversion, FALSE for library conversion +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. + INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. + LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER :: c_flag + END FUNCTION h5tcompiler_conv_c + END INTERFACE + + hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) + + flag = .FALSE. + IF(c_flag .GT. 0) flag = .TRUE. + + END SUBROUTINE h5tcompiler_conv_f + +! +!****s* H5T/h5tget_native_type_f +! +! NAME +! h5tget_native_type_f +! +! PURPOSE +! Returns the native datatype of a specified datatype. +! +! INPUTS +! dtype_id - Datatype identifier for the dataset datatype. +! +! direction - Direction of search: +! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ +! H5T_DIR_ASCEND = 1, /*in inscendent order */ +! H5T_DIR_DESCEND = 2 /*in descendent order */ +! * NOTE: In C it is defined as a structure: H5T_direction_t +! +! OUTPUTS +! native_dtype_id - The native datatype identifier for the specified dataset datatype +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! June 18, 2008 +! SOURCE + SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(IN) :: direction ! Direction of search: + ! H5T_DIR_ASCEND_F = 1 in inscendent order + ! H5T_DIR_DESCEND_F = 2 in descendent order + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + END FUNCTION h5tget_native_type_c + END INTERFACE + + hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) + END SUBROUTINE h5tget_native_type_f + +!****s* H5T (F03)/H5Tconvert_f_F03 +! +! NAME +! H5Tconvert_f +! +! PURPOSE +! Converts data from between specified datatypes. +! +! Inputs: +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! nelmts - Size of array buf. +! buf - Array containing pre-conversion values. +! background - Optional background buffer. +! plist_id - Dataset transfer property list identifier. +! +! Outputs: +! buf - Array containing post-conversion values. +! hdferr - error code: +! 0 on success and -1 on failure +! AUTHOR +! M. Scot Breitenfeld +! Decemember 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id +!***** + INTEGER(HID_T) :: plist_id_default + TYPE(C_PTR) :: background_default + + INTERFACE + INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & + BIND(C, NAME='h5tconvert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , VALUE :: buf + TYPE(C_PTR) , VALUE :: background + INTEGER(HID_T) , INTENT(IN) :: plist_id + END FUNCTION h5tconvert_c + END INTERFACE + + plist_id_default = H5P_DEFAULT_F + IF(PRESENT(plist_id)) plist_id_default = plist_id + + background_default = C_NULL_PTR + IF(PRESENT(background)) background_default = background + + hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) + + END SUBROUTINE h5tconvert_f +! +!****s* (F03) H5T/h5tenum_insert_f90 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value ! value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) H5T/h5tenum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 + +END MODULE H5T diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 deleted file mode 100644 index d43db38..0000000 --- a/fortran/src/H5Tff.f90 +++ /dev/null @@ -1,3285 +0,0 @@ -!****h* ROBODoc/H5T -! -! NAME -! MODULE H5T -! -! PURPOSE -! This file contains Fortran interfaces for H5T functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5T - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -!****t* H5T (F03)/hvl_t -! Fortran2003 Derived Type: - TYPE hvl_t - INTEGER(size_t) :: len ! Length of VL data (in base type units) - TYPE(C_PTR) :: p ! Pointer to VL data - END TYPE hvl_t - -!***** - - INTERFACE h5tenum_insert_f - MODULE PROCEDURE h5tenum_insert_f03 - MODULE PROCEDURE h5tenum_insert_f90 - END INTERFACE - -CONTAINS - -! -!****s* H5T/h5topen_f -! -! NAME -! h5topen_f -! -! PURPOSE -! Opens named datatype. -! -! INPUTS -! loc_id - location identifier -! name - a datatype name -! OUTPUTS -! type_id - datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tapl_id - datatype access property list identifier. -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! Added optional parameter 'tapl_id' for compatability -! with H5Topen2. April 9, 2009. -! -! SOURCE - SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group - INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5topen_c - END INTERFACE - - namelen = LEN(name) - - tapl_id_default = H5P_DEFAULT_F - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - END SUBROUTINE h5topen_f -! -!****s* H5T/h5tcommit_f -! -! NAME -! h5tcommit_f -! -! PURPOSE -! Commits a transient datatype to a file, creating a -! new named datatype. -! -! INPUTS -! loc_id - location identifier -! name - name of the datatype to be stored -! at the specified location -! type_id - identifier of a datatype to be stored -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list -! tcpl_id - Datatype creation property list -! tapl_id - Datatype access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! - Added optional parameters introduced in version 1.8 -! M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & - lcpl_id, tcpl_id, tapl_id ) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name - ! Datatype name within file or group - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list -!***** - - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF (PRESENT(tapl_id)) tapl_id_default = tapl_id - - namelen = LEN(name) - - hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_f -! -!****s* H5T/h5tcopy_f -! -! NAME -! h5tcopy_f -! -! PURPOSE -! Creates a copy of exisiting datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! new_type_id - identifier of datatype's copy -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: new_type_id - ! Identifier of datatype's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tcopy_c - END INTERFACE - - hdferr = h5tcopy_c(type_id, new_type_id) - END SUBROUTINE h5tcopy_f -! -!****s* H5T/h5tequal_f -! -! NAME -! h5tequal_f -! -! PURPOSE -! Determines whether two datatype identifiers refer -! to the same datatype. -! -! INPUTS -! type1_id - datatype identifier -! type2_id - datatype identifier -! OUTPUTS -! flag - TRUE/FALSE flag to indicate -! if two datatypes are equal -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two - ! datatypes are equal - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_flag - INTERFACE - INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - INTEGER :: c_flag - END FUNCTION h5tequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5tequal_c(type1_id, type2_id, c_flag) - if(c_flag .gt. 0) flag = .TRUE. - END SUBROUTINE h5tequal_f -! -!****s* H5T/h5tclose_f -! -! NAME -! h5tclose_f -! -! PURPOSE -! Releases a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tclose_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tclose_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tclose_c - END INTERFACE - - hdferr = h5tclose_c(type_id) - END SUBROUTINE h5tclose_f -! -!****s* H5T/h5tget_class_f -! -! NAME -! h5tget_class_f -! -! PURPOSE -! Returns the datatype class identifier. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! class - Class, possible values are: -! H5T_NO_CLASS_F (-1) -! H5T_INTEGER_F (0) -! H5T_FLOAT_F (1) -! H5T_TIME_F (2) -! H5T_STRING_F (3) -! H5T_BITFIELD_F (4) -! H5T_OPAQUE_F (5) -! H5T_COMPOUND_F (6) -! H5T_REFERENCE_F (7) -! H5T_ENUM_F (8) -! H5T_VLEN_F (9) -! H5T_ARRAY_F (10) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_class_f(type_id, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_class_c(type_id, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_class_c - END INTERFACE - - hdferr = h5tget_class_c(type_id, class) - END SUBROUTINE h5tget_class_f -! -!****s* H5T/h5tget_size_f -! -! NAME -! h5tget_size_f -! -! PURPOSE -! Returns the size of a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! size - datatype size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5tget_size_c - END INTERFACE - - hdferr = h5tget_size_c(type_id, size) - END SUBROUTINE h5tget_size_f - -! -!****s* H5T/h5tset_size_f -! -! NAME -! h5tset_size_f -! -! PURPOSE -! Sets the total size for an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! size - size of the datatype -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! -! SOURCE - SUBROUTINE h5tset_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5tset_size_c - END INTERFACE - - hdferr = h5tset_size_c(type_id, size) - END SUBROUTINE h5tset_size_f - -! -!****s* H5T/h5tget_order_f -! -! NAME -! h5tget_order_f -! -! PURPOSE -! Returns the byte order of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! order - byte order for the datatype, possible -! values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: order - ! Datatype byte order, possible values are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: order - END FUNCTION h5tget_order_c - END INTERFACE - - hdferr = h5tget_order_c(type_id, order) - END SUBROUTINE h5tget_order_f -! -!****s* H5T/h5tset_order_f -! -! NAME -! h5tset_order_f -! -! PURPOSE -! Sets the byte ordering of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! order - datatype byte order Possible values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values - ! are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: order - END FUNCTION h5tset_order_c - END INTERFACE - - hdferr = h5tset_order_c(type_id, order) - END SUBROUTINE h5tset_order_f - -! -!****s* H5T/h5tget_precision_f -! -! NAME -! h5tget_precision_f -! -! PURPOSE -! Returns the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! precision - precision of the datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision - END FUNCTION h5tget_precision_c - END INTERFACE - - hdferr = h5tget_precision_c(type_id, precision) - END SUBROUTINE h5tget_precision_f - -! -!****s* H5T/h5tset_precision_f -! -! NAME -! h5tset_precision_f -! -! PURPOSE -! Sets the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! precision - datatype precision -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: precision - END FUNCTION h5tset_precision_c - END INTERFACE - - hdferr = h5tset_precision_c(type_id, precision) - END SUBROUTINE h5tset_precision_f - -! -!****s* H5T/h5tget_offset_f -! -! NAME -! h5tget_offset_f -! -! PURPOSE -! Retrieves the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! offset - offset value -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_offset_c - END INTERFACE - - hdferr = h5tget_offset_c(type_id, offset) - END SUBROUTINE h5tget_offset_f - -! -!****s* H5T/h5tset_offset_f -! -! NAME -! h5tset_offset_f -! -! PURPOSE -! Sets the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! offset - offset value -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - END FUNCTION h5tset_offset_c - END INTERFACE - - hdferr = h5tset_offset_c(type_id, offset) - END SUBROUTINE h5tset_offset_f - -! -!****s* H5T/h5tget_pad_f -! -! NAME -! h5tget_pad_f -! -! PURPOSE -! Retrieves the padding type of the least and -! most -significant bit padding. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! hdferr - Returns 0 if successful and -1 if fails - -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(OUT) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - END FUNCTION h5tget_pad_c - END INTERFACE - - hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tget_pad_f - -! -!****s* H5T/h5tset_pad_f -! -! NAME -! h5tset_pad_f -! -! PURPOSE -! Sets the least and most-significant bits padding types. -! -! INPUTS -! type_id - datatype identifier -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(IN) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T_PAD_ZERO_F = 0 - ! H5T_PAD_ONE_F = 1 - ! H5T_PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: type_id - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - END FUNCTION h5tset_pad_c - END INTERFACE - - hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tset_pad_f - -! -!****s* H5T/h5tget_sign_f -! -! NAME -! h5tget_sign_f -! -! PURPOSE -! Retrieves the sign type for an integer type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: sign ! sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - END FUNCTION h5tget_sign_c - END INTERFACE - - hdferr = h5tget_sign_c(type_id, sign) - END SUBROUTINE h5tget_sign_f - -! -!****s* H5T/h5tset_sign_f -! -! NAME -! h5tset_sign_f -! -! PURPOSE -! Sets the sign proprety for an integer type. -! -! INPUTS -! type_id - datatype identifier -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: sign !sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - END FUNCTION h5tset_sign_c - END INTERFACE - - hdferr = h5tset_sign_c(type_id, sign) - END SUBROUTINE h5tset_sign_f - -! -!****s* H5T/h5tget_fields_f -! -! NAME -! h5tget_fields_f -! -! PURPOSE -! Retrieves floating point datatype bit field information. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - END FUNCTION h5tget_fields_c - END INTERFACE - - hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tget_fields_f - -! -!****s* H5T/h5tset_fields_f -! -! NAME -! h5tset_fields_f -! -! PURPOSE -! Sets locations and sizes of floating point bit fields. -! -! INPUTS -! type_id - datatype identifier -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - END FUNCTION h5tset_fields_c - END INTERFACE - - hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tset_fields_f - -! -!****s* H5T/h5tget_ebias_f -! -! NAME -! h5tget_ebias_f -! -! PURPOSE -! Retrieves the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! ebias - datatype exponent bias -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - END FUNCTION h5tget_ebias_c - END INTERFACE - - hdferr = h5tget_ebias_c(type_id, ebias) - END SUBROUTINE h5tget_ebias_f - -! -!****s* H5T/h5tset_ebias_f -! -! NAME -! h5tset_ebias_f -! -! PURPOSE -! Sets the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! ebias - datatype exponent bias -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - END FUNCTION h5tset_ebias_c - END INTERFACE - - hdferr = h5tset_ebias_c(type_id, ebias) - END SUBROUTINE h5tset_ebias_f - -! -!****s* H5T/h5tget_norm_f -! -! NAME -! h5tget_norm_f -! -! PURPOSE -! Retrieves mantissa normalization of a floating-point -! datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - END FUNCTION h5tget_norm_c - END INTERFACE - - hdferr = h5tget_norm_c(type_id, norm) - END SUBROUTINE h5tget_norm_f - -! -!****s* H5T/h5tset_norm_f -! -! NAME -! h5tset_norm_f -! -! PURPOSE -! Sets the mantissa normalization of a floating-point datatype. -! -! INPUTS -! type_id - datatype identifier -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - END FUNCTION h5tset_norm_c - END INTERFACE - - hdferr = h5tset_norm_c(type_id, norm) - END SUBROUTINE h5tset_norm_f - -! -!****s* H5T/h5tget_inpad_f -! -! NAME -! h5tget_inpad_f -! -! PURPOSE -! Retrieves the internal padding type for unused bits -! in floating-point datatypes. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - END FUNCTION h5tget_inpad_c - END INTERFACE - - hdferr = h5tget_inpad_c(type_id, padtype) - END SUBROUTINE h5tget_inpad_f - -! -!****s* H5T/h5tset_inpad_f -! -! NAME -! h5tset_inpad_f -! -! PURPOSE -! Fills unused internal floating point bits. -! -! INPUTS -! type_id - datatype identifier -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - END FUNCTION h5tset_inpad_c - END INTERFACE - - hdferr = h5tset_inpad_c(type_id, padtype) - END SUBROUTINE h5tset_inpad_f - -! -!****s* H5T/h5tget_cset_f -! -! NAME -! h5tget_cset_f -! -! PURPOSE -! Retrieves the character set type of a string datatype. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! cset - Character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F = 0 -! H5T_CSET_UTF8_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype - ! Possible values are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - END FUNCTION h5tget_cset_c - END INTERFACE - - hdferr = h5tget_cset_c(type_id, cset) - END SUBROUTINE h5tget_cset_f - -! -!****s* H5T/h5tset_cset_f -! -! NAME -! h5tset_cset_f -! -! PURPOSE -! Sets character set to be used. -! -! INPUTS -! type_id - datatype identifier -! cset - character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F = 0 -! H5T_CSET_UTF8_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: cset !character set type of a string datatype - ! Possible values of padding type are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - END FUNCTION h5tset_cset_c - END INTERFACE - - hdferr = h5tset_cset_c(type_id, cset) - END SUBROUTINE h5tset_cset_f - -! -!****s* H5T/h5tget_strpad_f -! -! NAME -! h5tget_strpad_f -! -! PURPOSE -! Retrieves the storage mechanism for a string datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: strpad - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - END FUNCTION h5tget_strpad_c - END INTERFACE - - hdferr = h5tget_strpad_c(type_id, strpad) - END SUBROUTINE h5tget_strpad_f - -! -!****s* H5T/h5tset_strpad_f -! -! NAME -! h5tset_strpad_f -! -! PURPOSE -! Defines the storage mechanism for character strings. -! -! INPUTS -! type_id - datatype identifier -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - END FUNCTION h5tset_strpad_c - END INTERFACE - - hdferr = h5tset_strpad_c(type_id, strpad) - END SUBROUTINE h5tset_strpad_f - -! -!****s* H5T/h5tget_nmembers_f -! -! NAME -! h5tget_nmembers_f -! -! PURPOSE -! Retrieves the number of fields in a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! num_members - number of members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - END FUNCTION h5tget_nmembers_c - END INTERFACE - - hdferr = h5tget_nmembers_c(type_id, num_members) - END SUBROUTINE h5tget_nmembers_f - -! -!****s* H5T/h5tget_member_name_f -! -! NAME -! h5tget_member_name_f -! -! PURPOSE -! Retrieves the name of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! index - filed index (0-based) -! OUTPUTS -! member_name - buffer to hold member's name -! namelen - name length -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve - CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of - !a compound datatype - INTEGER, INTENT(OUT) :: namelen ! Length of the name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: member_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(LEN=*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) - END SUBROUTINE h5tget_member_name_f - -! -!****s* H5T/h5tget_member_offset_f -! -! NAME -! h5tget_member_offset_f -! -! PURPOSE -! Retrieves the offset of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the field -! OUTPUTS -! offset - byte offset of the requested field -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the field - !whose offset is requested - INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_member_offset_c - END INTERFACE - - hdferr = h5tget_member_offset_c(type_id, member_no, offset ) - END SUBROUTINE h5tget_member_offset_f -! -!****s* H5T/h5tget_member_index_f -! -! NAME -! h5tget_member_index_f -! -! PURPOSE -! Retrieves the index of a compound or enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! name - name of the field or member whose index to -! to be retrieved from the datatype. -! OUTPUTS -! index - 0-based index of the filed or member (0 to N-1) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! SOURCE - SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name - INTEGER, INTENT(OUT) :: index ! Field or member index - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index - END FUNCTION h5tget_member_index_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tget_member_index_c(type_id, name, namelen, index) - END SUBROUTINE h5tget_member_index_f - - -! !$! -! !$!****s* H5T/h5tget_member_dim_f -! !$! -! !$! NAME -! !$! h5tget_member_dim_f -! !$! -! !$! PURPOSE -! !$! This function is not supported in hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! -! !$! SOURCE -! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) -! !$! -! !$! IMPLICIT NONE -! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier -! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of -! !$! !field_dims, perm) -! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field -! !$! -! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the -! !$! !dimensions of the field -! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the -! !$! !permutation vector of the field -! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !$!*****! -! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c -! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) -! !$! -! !$! END SUBROUTINE h5tget_member_dims_f - - -!****s* H5T/h5tget_array_dims_f -! -! NAME -! h5tget_array_dims_f -! -! PURPOSE -! Returns sizes of array dimensions. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! dims - buffer to store array datatype dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype - ! dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5tget_array_dims_c - END INTERFACE - - hdferr = h5tget_array_dims_c(type_id, dims) - - END SUBROUTINE h5tget_array_dims_f - -! -!****s* H5T/h5tget_array_ndims_f -! -! NAME -! h5tget_array_ndims_f -! -! PURPOSE -! Returns the rank of an array datatype. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! ndims - number of array dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER, INTENT(OUT) :: ndims ! number of array dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - END FUNCTION h5tget_array_ndims_c - END INTERFACE - - hdferr = h5tget_array_ndims_c(type_id, ndims) - - END SUBROUTINE h5tget_array_ndims_f - -! -!****s* H5T/h5tget_super_f -! -! NAME -! h5tget_super_f -! -! PURPOSE -! Returns the base datatype from which a datatype is derived. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! base_type_id - identifier of the base type -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype - ! from which datatype (type_id) was derived - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - END FUNCTION h5tget_super_c - END INTERFACE - - hdferr = h5tget_super_c(type_id, base_type_id) - - END SUBROUTINE h5tget_super_f - -! -!****s* H5T/h5tget_member_type_f -! -! NAME -! h5tget_member_type_f -! -! PURPOSE -! Returns the datatype of the specified member. -! -! INPUTS -! type_id - compound datatype identifier -! field_idx - field index (0-based) -! -! OUTPUTS -! datatype - idnetifier of the member's datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve - INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of - !the datatype of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - END FUNCTION h5tget_member_type_c - END INTERFACE - - hdferr = h5tget_member_type_c(type_id, field_idx , datatype) - END SUBROUTINE h5tget_member_type_f - -! -!****s* H5T/h5tcreate_f -! -! NAME -! h5tcreate_f -! -! PURPOSE -! Creates a new datatype. -! -! INPUTS -! class - Datatype class can be one of: -! H5T_COMPOUND_F -! H5T_ENUM_F -! H5T_OPAQUE_F -! H5T_STRING_F -! -! size - Size of the datatype. -! OUTPUTS -! type_id - Datatype identifier. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) - IMPLICIT NONE - INTEGER , INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T) , INTENT(OUT) :: type_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tcreate_c(class, size, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tcreate_c - END INTERFACE - - hdferr = h5tcreate_c(class, size, type_id) - END SUBROUTINE h5tcreate_f - -! -!****s* H5T/h5tinsert_f -! -! NAME -! h5tinsert_f -! -! PURPOSE -! Adds a new member to a compound datatype. -! -! INPUTS -! type_id - compound dattype identifier -! name - name of the field to insert -! offset - start of the member in an instance of -! the compound datatype -! field_id - datatype identifier of the field to insert -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert - INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of - !the compound datatype - INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER :: namelen - END FUNCTION h5tinsert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) - END SUBROUTINE h5tinsert_f - -! -!****s* H5T/h5tpack_f -! -! NAME -! h5tpack_f -! -! PURPOSE -! Recursively removes padding from within a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tpack_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tpack_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tpack_c - END INTERFACE - - hdferr = h5tpack_c(type_id) - END SUBROUTINE h5tpack_f - -! !$! -! !$!****s* H5T/h5tinsert_array_f -! !$! -! !$! NAME -! !$! h5tinsert_array_f -! !$! -! !$! PURPOSE -! !$! This function is not available on hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! SOURCE -! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype -! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member -! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member -! !within compound datatype -! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. -! !Valid values are 0 (zero) through 4 (four) -! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array -! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !*****! -! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm -! !Pointer to buffer to store -! !the permutation vector of the field -! INTEGER :: namelen, sizeofperm -! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 -! namelen = LEN(name) -! if (present(perm)) then -! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) -! else -! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) -! end if -! -! END SUBROUTINE h5tinsert_array_f - -! -!****s* H5T/h5tarray_create_f -! -! NAME -! h5tarray_create_f -! -! PURPOSE -! Creates an array datatype object. -! -! INPUTS -! base_id - datatype identifier for the array -! base datatype -! rank - rank of the array -! dims - array dimension sizes -! OUTPUTS -! type_id - array datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype - INTEGER, INTENT(IN) :: rank ! Rank of the array - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension - INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tarray_create_c - END INTERFACE - - hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - - END SUBROUTINE h5tarray_create_f - -! -!****s* H5T/h5tenum_create_f -! -! NAME -! h5tenum_create_f -! -! PURPOSE -! Creates a new enumeration datatype. -! -! INPUTS -! parent_id - datatype identifier for base datatype -! OUTPUTS -! new_type_id - datatype identifier for the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for - ! the base datatype - INTEGER(HID_T), INTENT(OUT) :: new_type_id - !datatype identifier for the - ! new enumeration datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tenum_create_c - END INTERFACE - - hdferr = h5tenum_create_c(parent_id, new_type_id) - END SUBROUTINE h5tenum_create_f -! -!****s* H5T/h5tenum_nameof_f -! -! NAME -! h5tenum_nameof_f -! -! PURPOSE -! Returns the symbol name corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! value - value of the enumeration datatype -! namelen - name buffer size -! OUTPUTS -! name - buffer to hold symbol name -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! NOTE -! According to the standard: Because an INTENT(OUT) variable is considered undefined -! on entry to the procedure, any default initialization specified for its type will -! be applied. So we need to blank out the "name" to be portable and eliminate any -! characters the "name' may contain upon entry, depending on compiler implementation. -! SOURCE - SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. - INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name - INTEGER, INTENT(IN) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - END FUNCTION h5tenum_nameof_c - END INTERFACE - - name(1:LEN(name)) = ' ' - - hdferr = h5tenum_nameof_c(type_id, value, name, namelen) - END SUBROUTINE h5tenum_nameof_f - -! -!****s* H5T/h5tenum_valuof_f -! -! NAME -! h5tenum_valuof_f -! -! PURPOSE -! Returns the value corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! name - symbol name -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tenum_valueof_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_valueof_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_valueof_f - -! -!****s* H5T/h5tget_member_value_f -! -! NAME -! h5tget_member_value_f -! -! PURPOSE -! Returns the value of an enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the enumeration datatype member -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_value_c(type_id, member_no, value) - END SUBROUTINE h5tget_member_value_f - -! -!****s* H5T/h5tset_tag_f -! -! NAME -! h5tset_tag_f -! -! PURPOSE -! Tags an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! tag - unique ASCII string with which the opaque -! datatype is to be tagged. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which - !the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: taglen - - INTERFACE - INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: tag - INTEGER :: taglen - END FUNCTION h5tset_tag_c - END INTERFACE - - taglen = LEN(tag) - hdferr = h5tset_tag_c(type_id, tag, taglen) - END SUBROUTINE h5tset_tag_f - -! -!****s* H5T/h5tget_tag_f -! -! NAME -! h5tget_tag_f -! -! PURPOSE -! Gets the tag associated with an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! OUTPUTS -! tag - unique ASCII string associated with opaque -! datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which - ! the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: taglen ! Length of tag - INTEGER(SIZE_T) :: tag_size ! Declared character length of tab - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER(SIZE_T), INTENT(IN) :: tag_size - INTEGER, INTENT(OUT) :: taglen - END FUNCTION h5tget_tag_c - END INTERFACE - - tag_size = LEN(tag) - - hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) - END SUBROUTINE h5tget_tag_f - -! -!****s* H5T/h5tvlen_create_f -! -! NAME -! h5tvlen_create_f -! -! PURPOSE -! Creates a new variable-length datatype. -! -! INPUTS -! type_id - identifier iof base datatype -! OUTPUTS -! vltype_id - identifier for VL datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! Wednesday, October 23, 2002 -! -! NOTES -! Only basic Fortran base datatypes are supported -! -! SOURCE - SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - END FUNCTION h5tvlen_create_c - END INTERFACE - - hdferr = h5tvlen_create_c(type_id, vltype_id) - END SUBROUTINE h5tvlen_create_f - -! -!****s* H5T/h5tis_variable_str_f -! -! NAME -! h5tis_variable_str_f -! -! PURPOSE -! Determines whether a dattype is a variable string. -! -! INPUTS -! type_id - datartpe identifier -! OUTPUTS -! status - flag to indicate if datatype -! is a variable string -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype - ! is a variable string or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: flag - END FUNCTION h5tis_variable_str_c - END INTERFACE - - hdferr = h5tis_variable_str_c(type_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5tis_variable_str_f - -! -!****s* H5T/h5tget_member_class_f -! -! NAME -! h5tget_member_class_f -! -! PURPOSE -! Returns datatype class of compound datatype member. -! -! INPUTS -! type_id - datartpe identifier -! member_no - index of compound datatype member -! OUTPUTS -! class - class type for compound dadtype member -! Valid classes: -! H5T_NO_CLASS_F (error) -! H5T_INTEGER_F -! H5T_FLOAT_F -! H5T_TIME_F -! H5T_STRING_F -! H5T_BITFIELD_F -! H5T_OPAQUE_F -! H5T_COMPOUND_F -! H5T_REFERENCE_F -! H5T_ENUM_F -! H5T_VLEN_F -! H5T_ARRAY_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! April 6, 2005 -! -! SOURCE - SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no ! Member number - INTEGER, INTENT(OUT) :: class ! Member class - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_member_class_c - END INTERFACE - - hdferr = h5tget_member_class_c(type_id, member_no, class) - - END SUBROUTINE h5tget_member_class_f - -! -!****s* H5T/h5tcommit_anon_f -! -! NAME -! h5tcommit_anon_f -! -! PURPOSE -! Commits a transient datatype to a file, -! creating a new named datatype, -! but does not link it into the file structure. -! -! INPUTS -! loc_id - A file or group identifier specifying the file -! in which the new named datatype is to be created. -! dtype_id - A datatype identifier. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tcpl_id - A datatype creation property list identifier. -! (H5P_DEFAULT_F for the default property list.) -! tapl_id - A datatype access property list identifier. -! should always be passed as the value H5P_DEFAULT_F. -! -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying - ! the file in which the new named datatype - ! is to be created. - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property - ! list identifier. - ! (H5P_DEFAULT_F for the default property list.) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. - ! should always be passed as the value H5P_DEFAULT_F. -!***** - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_anon_c - END INTERFACE - - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_anon_f - -! -!****s* H5T/h5tcommitted_f -! -! NAME -! h5tcommitted_f -! -! PURPOSE -! Determines whether a datatype is a named type or a transient type. -! -! INPUTS -! dtype_id - A datatype identifier. -! -! OUTPUTS -! committed - .TRUE., if the datatype has been committed -! .FALSE., if the datatype has not been committed. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier - LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed - !.FALSE., if the datatype has not been committed. - INTEGER, INTENT(OUT) :: hdferr ! Error code: -! Success: 0 -! Failure: -1 -!***** - INTERFACE - INTEGER FUNCTION h5tcommitted_c(dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - END FUNCTION h5tcommitted_c - END INTERFACE - - hdferr = h5tcommitted_c(dtype_id) - - IF(hdferr.GT.0)THEN - committed = .TRUE. - hdferr = 0 - ELSE IF(hdferr.EQ.0)THEN - committed = .FALSE. - hdferr = 0 - ELSE - hdferr = -1 - ENDIF - - - END SUBROUTINE h5tcommitted_f - -! -!****s* H5T/H5Tdecode_f -! -! NAME -! H5Tdecode_f -! -! PURPOSE -! Decode a binary object description of data type and return a new object handle. -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5tdecode_c - END INTERFACE - - hdferr = h5tdecode_c(buf, obj_id) - - END SUBROUTINE h5tdecode_f - -! -!****s* H5T/H5Tencode_f -! -! NAME -! H5Tencode_f -! -! PURPOSE -! Encode a data type object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5tencode_c - END INTERFACE - - hdferr = h5tencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5tencode_f - -! -!****s* H5T/h5tget_create_plist_f -! -! NAME -! h5tget_create_plist_f -! -! PURPOSE -! Returns a copy of a datatype creation property list. -! -! INPUTS -! dtype_id - Datatype identifier -! OUTPUTS -! dtpl_id - Datatype property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T), INTENT(OUT) :: dtpl_id - END FUNCTION h5tget_create_plist_c - END INTERFACE - - hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) - END SUBROUTINE h5tget_create_plist_f - -! -!****s* H5T/h5tcompiler_conv_f -! -! NAME -! h5tcompiler_conv_f -! -! PURPOSE -! Check whether the library’s default conversion is hard conversion.R -! -! INPUTS -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! OUTPUTS -! flag - TRUE for compiler conversion, FALSE for library conversion -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. - INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. - LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: src_id - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER :: c_flag - END FUNCTION h5tcompiler_conv_c - END INTERFACE - - hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) - - flag = .FALSE. - IF(c_flag .GT. 0) flag = .TRUE. - - END SUBROUTINE h5tcompiler_conv_f - -! -!****s* H5T/h5tget_native_type_f -! -! NAME -! h5tget_native_type_f -! -! PURPOSE -! Returns the native datatype of a specified datatype. -! -! INPUTS -! dtype_id - Datatype identifier for the dataset datatype. -! -! direction - Direction of search: -! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ -! H5T_DIR_ASCEND = 1, /*in inscendent order */ -! H5T_DIR_DESCEND = 2 /*in descendent order */ -! * NOTE: In C it is defined as a structure: H5T_direction_t -! -! OUTPUTS -! native_dtype_id - The native datatype identifier for the specified dataset datatype -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! June 18, 2008 -! SOURCE - SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(IN) :: direction ! Direction of search: - ! H5T_DIR_ASCEND_F = 1 in inscendent order - ! H5T_DIR_DESCEND_F = 2 in descendent order - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id - END FUNCTION h5tget_native_type_c - END INTERFACE - - hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) - END SUBROUTINE h5tget_native_type_f - -!****s* H5T (F03)/H5Tconvert_f_F03 -! -! NAME -! H5Tconvert_f -! -! PURPOSE -! Converts data from between specified datatypes. -! -! Inputs: -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! nelmts - Size of array buf. -! buf - Array containing pre-conversion values. -! background - Optional background buffer. -! plist_id - Dataset transfer property list identifier. -! -! Outputs: -! buf - Array containing post-conversion values. -! hdferr - error code: -! 0 on success and -1 on failure -! AUTHOR -! M. Scot Breitenfeld -! Decemember 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id -!***** - INTEGER(HID_T) :: plist_id_default - TYPE(C_PTR) :: background_default - - INTERFACE - INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & - BIND(C, NAME='h5tconvert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , VALUE :: buf - TYPE(C_PTR) , VALUE :: background - INTEGER(HID_T) , INTENT(IN) :: plist_id - END FUNCTION h5tconvert_c - END INTERFACE - - plist_id_default = H5P_DEFAULT_F - IF(PRESENT(plist_id)) plist_id_default = plist_id - - background_default = C_NULL_PTR - IF(PRESENT(background)) background_default = background - - hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) - - END SUBROUTINE h5tconvert_f -! -!****s* (F03) H5T/h5tenum_insert_f90 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value ! value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* (F03) H5T/h5tenum_insert_f03 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Pointer to the value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 6, 2015 -! -! HISTORY -! F2003 implementation of function -! SOURCE - SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & - BIND(C, NAME='h5tenum_insert_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 - -END MODULE H5T diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 new file mode 100644 index 0000000..7b67b5b --- /dev/null +++ b/fortran/src/H5Zff.F90 @@ -0,0 +1,198 @@ +!****h* ROBODoc/H5Z +! +! NAME +! MODULE H5Z +! +! PURPOSE +! This file contains Fortran interfaces for H5Z functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5Z 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 H5Z + + USE H5GLOBAL + +CONTAINS + +!****s* H5Z/h5zunregister_f +! +! NAME +! h5zunregister_f +! +! PURPOSE +! Unregisters specified filetr +! +! INPUTS +! filter - filter; may have one of the following values: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zunregister_f(filter, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5zunregister_c (filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + END FUNCTION h5zunregister_c + END INTERFACE + hdferr = h5zunregister_c (filter) + END SUBROUTINE h5zunregister_f + +!****s* H5Z/h5zfilter_avail_f +! NAME +! h5zfilter_avail_f +! +! PURPOSE +! Queries if filter is available +! +! INPUTS +! filter - filter +! OUTPUTS +! status - status; .TRUE. if filter is available, +! .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SZIP_F + ! H5Z_FILTER_NBIT_F + ! H5Z_FILTER_SCALEOFFSET_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter + ! is availble not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER :: flag + END FUNCTION h5zfilter_avail_c + END INTERFACE + + hdferr = h5zfilter_avail_c(filter, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5zfilter_avail_f +!****s* H5Z/h5zget_filter_info_f +! +! NAME +! h5zget_filter_info_f +! +! PURPOSE +! Queries if filter has its encoder and/or decoder +! available +! +! INPUTS +! filter - filter +! OUTPUTS +! config_flags - Bit vector possibly containing the +! following values: +! H5Z_FILTER_ENCODE_ENABLED_F +! H5Z_FILTER_DECODE_ENABLED_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Nat Furrer and James Laird +! June 16, 2004 +! SOURCE + SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SZIP_F + ! H5Z_FILTER_NBIT_F + ! H5Z_FILTER_SCALEOFFSET_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F + INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter + ! has its encoder and/or decoder + ! available + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + END FUNCTION h5zget_filter_info_c + END INTERFACE + + hdferr = h5zget_filter_info_c(filter, config_flags) + + END SUBROUTINE h5zget_filter_info_f + +END MODULE H5Z + + + + + diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 deleted file mode 100644 index 7b67b5b..0000000 --- a/fortran/src/H5Zff.f90 +++ /dev/null @@ -1,198 +0,0 @@ -!****h* ROBODoc/H5Z -! -! NAME -! MODULE H5Z -! -! PURPOSE -! This file contains Fortran interfaces for H5Z functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5Z 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 H5Z - - USE H5GLOBAL - -CONTAINS - -!****s* H5Z/h5zunregister_f -! -! NAME -! h5zunregister_f -! -! PURPOSE -! Unregisters specified filetr -! -! INPUTS -! filter - filter; may have one of the following values: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zunregister_f(filter, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5zunregister_c (filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - END FUNCTION h5zunregister_c - END INTERFACE - hdferr = h5zunregister_c (filter) - END SUBROUTINE h5zunregister_f - -!****s* H5Z/h5zfilter_avail_f -! NAME -! h5zfilter_avail_f -! -! PURPOSE -! Queries if filter is available -! -! INPUTS -! filter - filter -! OUTPUTS -! status - status; .TRUE. if filter is available, -! .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter - ! is availble not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5zfilter_avail_c(filter, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER :: flag - END FUNCTION h5zfilter_avail_c - END INTERFACE - - hdferr = h5zfilter_avail_c(filter, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5zfilter_avail_f -!****s* H5Z/h5zget_filter_info_f -! -! NAME -! h5zget_filter_info_f -! -! PURPOSE -! Queries if filter has its encoder and/or decoder -! available -! -! INPUTS -! filter - filter -! OUTPUTS -! config_flags - Bit vector possibly containing the -! following values: -! H5Z_FILTER_ENCODE_ENABLED_F -! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Nat Furrer and James Laird -! June 16, 2004 -! SOURCE - SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter - ! has its encoder and/or decoder - ! available - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: config_flags - END FUNCTION h5zget_filter_info_c - END INTERFACE - - hdferr = h5zget_filter_info_c(filter, config_flags) - - END SUBROUTINE h5zget_filter_info_f - -END MODULE H5Z - - - - - diff --git a/fortran/src/H5_DBLE_InterfaceExclude.F90 b/fortran/src/H5_DBLE_InterfaceExclude.F90 new file mode 100644 index 0000000..2a3e26f --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceExclude.F90 @@ -0,0 +1,39 @@ +!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is of type DOUBLE PRECISION. +! We do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. +! +! NOTES +! Empty module. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90 deleted file mode 100644 index 2a3e26f..0000000 --- a/fortran/src/H5_DBLE_InterfaceExclude.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is of type DOUBLE PRECISION. -! We do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. -! -! NOTES -! Empty module. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.F90 b/fortran/src/H5_DBLE_InterfaceInclude.F90 new file mode 100644 index 0000000..11e0a85 --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceInclude.F90 @@ -0,0 +1,1859 @@ +!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is not of the type DOUBLE PRECISION. +! We only do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. +! +! NOTES +! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines +! from the HDF function catagory H5A, H5D and H5P. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + USE H5GLOBAL + + ! + ! ----- H5A ---- + ! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_double_scalar + MODULE PROCEDURE h5awrite_double_1 + MODULE PROCEDURE h5awrite_double_2 + MODULE PROCEDURE h5awrite_double_3 + MODULE PROCEDURE h5awrite_double_4 + MODULE PROCEDURE h5awrite_double_5 + MODULE PROCEDURE h5awrite_double_6 + MODULE PROCEDURE h5awrite_double_7 + END INTERFACE + + INTERFACE h5aread_f + MODULE PROCEDURE h5aread_double_scalar + MODULE PROCEDURE h5aread_double_1 + MODULE PROCEDURE h5aread_double_2 + MODULE PROCEDURE h5aread_double_3 + MODULE PROCEDURE h5aread_double_4 + MODULE PROCEDURE h5aread_double_5 + MODULE PROCEDURE h5aread_double_6 + MODULE PROCEDURE h5aread_double_7 + END INTERFACE + ! + ! ----- H5D ---- + ! + INTERFACE h5dwrite_f + MODULE PROCEDURE h5dwrite_double_scalar + MODULE PROCEDURE h5dwrite_double_1 + MODULE PROCEDURE h5dwrite_double_2 + MODULE PROCEDURE h5dwrite_double_3 + MODULE PROCEDURE h5dwrite_double_4 + MODULE PROCEDURE h5dwrite_double_5 + MODULE PROCEDURE h5dwrite_double_6 + MODULE PROCEDURE h5dwrite_double_7 + END INTERFACE + + INTERFACE h5dread_f + MODULE PROCEDURE h5dread_double_scalar + MODULE PROCEDURE h5dread_double_1 + MODULE PROCEDURE h5dread_double_2 + MODULE PROCEDURE h5dread_double_3 + MODULE PROCEDURE h5dread_double_4 + MODULE PROCEDURE h5dread_double_5 + MODULE PROCEDURE h5dread_double_6 + MODULE PROCEDURE h5dread_double_7 + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_double + END INTERFACE + + ! + ! ----- H5P ---- + ! + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_double + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_double + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_double + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_double + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_double + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_double + END INTERFACE + +CONTAINS + + ! + ! ----- H5A ---- + ! + SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN)::buf + END FUNCTION h5awrite_double_s_c + END INTERFACE + + hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_scalar + + SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5awrite_double_1_c + END INTERFACE + + hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_1 + + + SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awrite_double_2_c + END INTERFACE + + hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_2 + + + SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awrite_double_3_c + END INTERFACE + + hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_3 + + + SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awrite_double_4_c + END INTERFACE + + hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_4 + + + SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awrite_double_5_c + END INTERFACE + + hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_5 + + + SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awrite_double_6_c + END INTERFACE + + hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_6 + + + SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awrite_double_7_c + END INTERFACE + + hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_7 + + + SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT)::buf + END FUNCTION h5aread_double_s_c + END INTERFACE + + hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_scalar + + SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5aread_double_1_c + END INTERFACE + + hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_1 + + + SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5aread_double_2_c + END INTERFACE + + hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_2 + + + SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5aread_double_3_c + END INTERFACE + + hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_3 + + + SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5aread_double_4_c + END INTERFACE + + hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_4 + + + SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5aread_double_5_c + END INTERFACE + + hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_5 + + + SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5aread_double_6_c + END INTERFACE + + hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_6 + + + SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5aread_double_7_c + END INTERFACE + + hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_7 + + + ! + ! ----- H5D ---- + ! + SUBROUTINE h5dwrite_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf + END FUNCTION h5dwrite_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_scalar + + SUBROUTINE h5dwrite_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwrite_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_1 + + SUBROUTINE h5dwrite_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_2 + + SUBROUTINE h5dwrite_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwrite_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_3 + + SUBROUTINE h5dwrite_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwrite_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_4 + + SUBROUTINE h5dwrite_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwrite_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_5 + + SUBROUTINE h5dwrite_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwrite_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_6 + + SUBROUTINE h5dwrite_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwrite_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_7 + + SUBROUTINE h5dread_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(OUT) :: buf + END FUNCTION h5dread_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_scalar + + SUBROUTINE h5dread_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dread_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_1 + + SUBROUTINE h5dread_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_2 + + SUBROUTINE h5dread_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dread_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_3 + + SUBROUTINE h5dread_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dread_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_4 + + SUBROUTINE h5dread_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dread_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_5 + + SUBROUTINE h5dread_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dread_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_6 + + SUBROUTINE h5dread_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dread_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_7 + + !---------------------------------------------------------------------- + ! Name: h5dfill_double + ! + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! of the fillvalues and buffers are supported. Buffer and fillvalue + ! are assumed to have the same datatype. + ! Only one-dimesional buffers are supported. + ! + ! Inputs: + ! fill_value - fill value + ! space_id - memory space selection identifier + ! buf - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfill_double_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c + !DEC$ENDIF + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfill_double_c + END INTERFACE + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + + + END SUBROUTINE h5dfill_double + + ! + ! -- H5P --- + ! + + SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_value_double_c + END INTERFACE + + hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_double + + SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION :: fillvalue + END FUNCTION h5pget_fill_value_double_c + END INTERFACE + + hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_double + +! +!****s* H5P (F90)/h5pset_double +! +! NAME +! h5pset_double +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pset_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pset_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pset_double + +!****s* H5P (F90)/h5pget_double +! +! NAME +! h5pget_double +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + DOUBLE PRECISION, INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(OUT) :: value + END FUNCTION h5pget_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pget_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pget_double + +! +!****s* H5P (F90)/h5pregister_double +! +! NAME +! h5pregister_double +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_double(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pregister_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pregister_double_c(class, name , name_len, size, value) + END SUBROUTINE h5pregister_double + +!****s* H5P (F90)/h5pinsert_double +! +! NAME +! +! h5pinsert_double +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pinsert_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pinsert_double_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_double + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90 deleted file mode 100644 index 11e0a85..0000000 --- a/fortran/src/H5_DBLE_InterfaceInclude.f90 +++ /dev/null @@ -1,1859 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is not of the type DOUBLE PRECISION. -! We only do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. -! -! NOTES -! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines -! from the HDF function catagory H5A, H5D and H5P. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - USE H5GLOBAL - - ! - ! ----- H5A ---- - ! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_double_scalar - MODULE PROCEDURE h5awrite_double_1 - MODULE PROCEDURE h5awrite_double_2 - MODULE PROCEDURE h5awrite_double_3 - MODULE PROCEDURE h5awrite_double_4 - MODULE PROCEDURE h5awrite_double_5 - MODULE PROCEDURE h5awrite_double_6 - MODULE PROCEDURE h5awrite_double_7 - END INTERFACE - - INTERFACE h5aread_f - MODULE PROCEDURE h5aread_double_scalar - MODULE PROCEDURE h5aread_double_1 - MODULE PROCEDURE h5aread_double_2 - MODULE PROCEDURE h5aread_double_3 - MODULE PROCEDURE h5aread_double_4 - MODULE PROCEDURE h5aread_double_5 - MODULE PROCEDURE h5aread_double_6 - MODULE PROCEDURE h5aread_double_7 - END INTERFACE - ! - ! ----- H5D ---- - ! - INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_double_scalar - MODULE PROCEDURE h5dwrite_double_1 - MODULE PROCEDURE h5dwrite_double_2 - MODULE PROCEDURE h5dwrite_double_3 - MODULE PROCEDURE h5dwrite_double_4 - MODULE PROCEDURE h5dwrite_double_5 - MODULE PROCEDURE h5dwrite_double_6 - MODULE PROCEDURE h5dwrite_double_7 - END INTERFACE - - INTERFACE h5dread_f - MODULE PROCEDURE h5dread_double_scalar - MODULE PROCEDURE h5dread_double_1 - MODULE PROCEDURE h5dread_double_2 - MODULE PROCEDURE h5dread_double_3 - MODULE PROCEDURE h5dread_double_4 - MODULE PROCEDURE h5dread_double_5 - MODULE PROCEDURE h5dread_double_6 - MODULE PROCEDURE h5dread_double_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_double - END INTERFACE - - ! - ! ----- H5P ---- - ! - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_double - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_double - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_double - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_double - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_double - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_double - END INTERFACE - -CONTAINS - - ! - ! ----- H5A ---- - ! - SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_double_s_c - END INTERFACE - - hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar - - SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_double_1_c - END INTERFACE - - hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_1 - - - SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_double_2_c - END INTERFACE - - hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_2 - - - SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_double_3_c - END INTERFACE - - hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_3 - - - SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_double_4_c - END INTERFACE - - hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_4 - - - SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_double_5_c - END INTERFACE - - hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_5 - - - SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_double_6_c - END INTERFACE - - hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_6 - - - SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_double_7_c - END INTERFACE - - hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_7 - - - SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT)::buf - END FUNCTION h5aread_double_s_c - END INTERFACE - - hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar - - SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_double_1_c - END INTERFACE - - hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_1 - - - SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_double_2_c - END INTERFACE - - hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_2 - - - SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_double_3_c - END INTERFACE - - hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_3 - - - SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_double_4_c - END INTERFACE - - hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_4 - - - SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_double_5_c - END INTERFACE - - hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_5 - - - SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_double_6_c - END INTERFACE - - hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_6 - - - SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_double_7_c - END INTERFACE - - hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_7 - - - ! - ! ----- H5D ---- - ! - SUBROUTINE h5dwrite_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf - END FUNCTION h5dwrite_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_scalar - - SUBROUTINE h5dwrite_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_1 - - SUBROUTINE h5dwrite_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_2 - - SUBROUTINE h5dwrite_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_3 - - SUBROUTINE h5dwrite_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_4 - - SUBROUTINE h5dwrite_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_5 - - SUBROUTINE h5dwrite_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_6 - - SUBROUTINE h5dwrite_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_7 - - SUBROUTINE h5dread_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(OUT) :: buf - END FUNCTION h5dread_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_scalar - - SUBROUTINE h5dread_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_1 - - SUBROUTINE h5dread_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_2 - - SUBROUTINE h5dread_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_3 - - SUBROUTINE h5dread_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_4 - - SUBROUTINE h5dread_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_5 - - SUBROUTINE h5dread_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_6 - - SUBROUTINE h5dread_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_7 - - !---------------------------------------------------------------------- - ! Name: h5dfill_double - ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes - ! of the fillvalues and buffers are supported. Buffer and fillvalue - ! are assumed to have the same datatype. - ! Only one-dimesional buffers are supported. - ! - ! Inputs: - ! fill_value - fill value - ! space_id - memory space selection identifier - ! buf - data buffer iin memory ro apply selection to - ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - - SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_double_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c - !DEC$ENDIF - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_double_c - END INTERFACE - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - - END SUBROUTINE h5dfill_double - - ! - ! -- H5P --- - ! - - SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_double_c - END INTERFACE - - hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_double - - SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION :: fillvalue - END FUNCTION h5pget_fill_value_double_c - END INTERFACE - - hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_double - -! -!****s* H5P (F90)/h5pset_double -! -! NAME -! h5pset_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pset_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_double - -!****s* H5P (F90)/h5pget_double -! -! NAME -! h5pget_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(OUT) :: value - END FUNCTION h5pget_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_double - -! -!****s* H5P (F90)/h5pregister_double -! -! NAME -! h5pregister_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_double(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pregister_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_double_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_double - -!****s* H5P (F90)/h5pinsert_double -! -! NAME -! -! h5pinsert_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pinsert_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_double_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_double - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index a149109..e4aadb6 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -32,15 +32,15 @@ * types - array with the predefined Native Fortran * type, its element and length must be the * same as the types array defined in the - * H5f90global.f90 + * H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran * type, its element and length must be the * same as the floatingtypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * integertypes - array with the predefined Integer Fortran * type, its element and length must be the * same as the integertypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -274,24 +274,24 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype * types - array with the predefined Native Fortran * type, its element and length must be the * same as the types array defined in the - * H5f90global.f90 + * H5f90global.F90 * lentypes - length of the types array, which must be the * same as the length of types array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran * type, its element and length must be the * same as the floatingtypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * floatinglen - length of the floatingtypes array, which must be the * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * integertypes - array with the predefined Integer Fortran * type, its element and length must be the * same as the integertypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * integerlen - length of the floatingtypes array, which must be the * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * RETURNS * 0 on success, -1 on failure * AUTHOR diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 new file mode 100644 index 0000000..3ca3979 --- /dev/null +++ b/fortran/src/H5_ff.F90 @@ -0,0 +1,439 @@ +!****h* ROBODoc/H5LIB +! +! NAME +! MODULE H5LIB +! +! PURPOSE +! This module provides fortran specific helper functions for the HDF library +! +! 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 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 H5LIB + + USE H5GLOBAL + +CONTAINS +!****s* H5LIB/h5open_f +! +! NAME +! h5open_f +! +! PURPOSE +! Initializes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5open_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5open_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1, error_2, error_3 + + INTERFACE + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) + USE H5GLOBAL + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c + !DEC$ENDIF + END FUNCTION h5init_types_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & + i_H5D_size_flags,& + i_H5E_flags, & + i_H5E_hid_flags, & + i_H5F_flags, & + i_H5FD_flags, & + i_H5FD_hid_flags, & + i_H5G_flags, & + i_H5I_flags, & + i_H5L_flags, & + i_H5O_flags, & + i_H5P_flags, & + i_H5P_flags_int, & + i_H5R_flags, & + i_H5S_flags, & + i_H5S_hsize_flags, & + i_H5T_flags, & + i_H5Z_flags, & + i_H5generic_flags) + USE H5GLOBAL + INTEGER i_H5D_flags(H5D_FLAGS_LEN) + INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) + INTEGER i_H5E_flags(H5E_FLAGS_LEN) + INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) + INTEGER i_H5F_flags(H5F_FLAGS_LEN) + INTEGER i_H5G_flags(H5G_FLAGS_LEN) + INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) + INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + INTEGER i_H5I_flags(H5I_FLAGS_LEN) + INTEGER i_H5L_flags(H5L_FLAGS_LEN) + INTEGER i_H5O_flags(H5O_FLAGS_LEN) + INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) + INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) + INTEGER i_H5R_flags(H5R_FLAGS_LEN) + INTEGER i_H5S_flags(H5S_FLAGS_LEN) + INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + INTEGER i_H5T_flags(H5T_FLAGS_LEN) + INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) + INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c + !DEC$ENDIF + END FUNCTION h5init_flags_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) + USE H5GLOBAL + INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c + !DEC$ENDIF + END FUNCTION h5init1_flags_c + END INTERFACE + error_1 = h5init_types_c(predef_types, floating_types, integer_types) + error_2 = h5init_flags_c(H5D_flags, & + H5D_size_flags, & + H5E_flags, & + H5E_hid_flags, & + H5F_flags, & + H5FD_flags, & + H5FD_hid_flags, & + H5G_flags, & + H5I_flags, & + H5L_flags, & + H5O_flags, & + H5P_flags, & + H5P_flags_int, & + H5R_flags, & + H5S_flags, & + H5S_hsize_flags, & + H5T_flags, & + H5Z_flags, & + H5generic_flags) + error_3 = h5init1_flags_c(H5LIB_flags ) + error = error_1 + error_2 + error_3 + END SUBROUTINE h5open_f + +!****s* H5LIB/h5close_f +! +! NAME +! h5close_f +! +! PURPOSE +! Closes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5close_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5close_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1 + INTERFACE + INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & + f_types, F_TYPES_LEN, & + i_types, I_TYPES_LEN ) + USE H5GLOBAL + INTEGER P_TYPES_LEN + INTEGER F_TYPES_LEN + INTEGER I_TYPES_LEN + INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c + !DEC$ENDIF + END FUNCTION h5close_types_c + END INTERFACE + error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & + floating_types, FLOATING_TYPES_LEN, & + integer_types, INTEGER_TYPES_LEN ) + error = error_1 + + END SUBROUTINE h5close_f + +!****s* H5LIB/h5get_libversion_f +! +! NAME +! h5get_libversion_f +! +! PURPOSE +! Returns the HDF5 LIbrary release number +! +! Outputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error +!***** + INTERFACE + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c + !DEC$ENDIF + INTEGER, INTENT(OUT) :: majnum, minnum, relnum + END FUNCTION h5get_libversion_c + END INTERFACE + + error = h5get_libversion_c(majnum, minnum, relnum) + + END SUBROUTINE h5get_libversion_f + +!****s* H5LIB/h5check_version_f +! +! NAME +! h5check_version_f +! +! PURPOSE +! Verifies that library versions are consistent. +! +! Inputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: majnum, minnum, relnum + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: majnum, minnum, relnum + END FUNCTION h5check_version_c + END INTERFACE + + error = h5check_version_c(majnum, minnum, relnum) + + END SUBROUTINE h5check_version_f +!****s* H5LIB/h5garbage_collect_f +! +! NAME +! h5garbage_collect_f +! +! PURPOSE +! Garbage collects on all free-lists of all types. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5garbage_collect_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5garbage_collect_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c + !DEC$ENDIF + END FUNCTION h5garbage_collect_c + END INTERFACE + + error = h5garbage_collect_c() + + END SUBROUTINE h5garbage_collect_f +!****s* H5LIB/h5dont_atexit_f +! +! NAME +! h5dont_atexit_f +! +! PURPOSE +! Instructs library not to install atexit cleanup routine. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5dont_atexit_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5dont_atexit_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c + !DEC$ENDIF + END FUNCTION h5dont_atexit_c + END INTERFACE + + error = h5dont_atexit_c() + + END SUBROUTINE h5dont_atexit_f + +!****f* H5LIB/h5kind_to_type +! +! NAME +! h5kind_to_type +! +! PURPOSE +! Converts the KIND to the correct HDF type +! +! Inputs: +! kind - Fortran KIND parameter +! flag - Whether KIND is of type INTEGER or REAL: +! H5_INTEGER_KIND - integer +! H5_REAL_KIND - real +! Outputs: +! h5_type - Returns the type +! +! AUTHOR +! M. Scot Breitenfeld +! August 25, 2008 +! +! Fortran90 Interface: + INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: flag +!***** + IF(flag.EQ.H5_INTEGER_KIND)THEN + IF(kind.EQ.Fortran_INTEGER_1)THEN + h5_type = H5T_NATIVE_INTEGER_1 + ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + h5_type = H5T_NATIVE_INTEGER_2 + ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + h5_type = H5T_NATIVE_INTEGER_4 + ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + h5_type = H5T_NATIVE_INTEGER_8 + ENDIF + ELSE IF(flag.EQ.H5_REAL_KIND)THEN + IF(kind.EQ.Fortran_REAL_4)THEN + h5_type = H5T_NATIVE_REAL_4 + ELSE IF(kind.EQ.Fortran_REAL_8)THEN + h5_type = H5T_NATIVE_REAL_8 + ELSE IF(kind.EQ.Fortran_REAL_16)THEN + h5_type = H5T_NATIVE_REAL_16 + ENDIF + ENDIF + + END FUNCTION h5kind_to_type + +!****f* H5LIB_PROVISIONAL/h5offsetof +! +! NAME +! h5offsetof +! +! PURPOSE +! Computes the offset in memory +! +! Inputs: +! start - starting pointer address +! end - ending pointer address +! +! Outputs: +! offset - offset of a member within the derived type +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 25, 2008 +! +! ACKNOWLEDGEMENTS +! Joe Krahn +! +! Fortran2003 Interface: + FUNCTION h5offsetof(start,end) RESULT(offset) + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + IMPLICIT NONE + INTEGER(SIZE_T) :: offset + TYPE(C_PTR), VALUE, INTENT(IN) :: start, end +!***** + INTEGER(C_INTPTR_T) :: int_address_start, int_address_end + int_address_start = TRANSFER(start, int_address_start) + int_address_end = TRANSFER(end , int_address_end ) + + offset = int_address_end - int_address_start + + END FUNCTION h5offsetof + +END MODULE H5LIB diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 deleted file mode 100644 index 3ca3979..0000000 --- a/fortran/src/H5_ff.f90 +++ /dev/null @@ -1,439 +0,0 @@ -!****h* ROBODoc/H5LIB -! -! NAME -! MODULE H5LIB -! -! PURPOSE -! This module provides fortran specific helper functions for the HDF library -! -! 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 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 H5LIB - - USE H5GLOBAL - -CONTAINS -!****s* H5LIB/h5open_f -! -! NAME -! h5open_f -! -! PURPOSE -! Initializes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5open_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5open_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1, error_2, error_3 - - INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) - USE H5GLOBAL - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c - !DEC$ENDIF - END FUNCTION h5init_types_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & - i_H5D_size_flags,& - i_H5E_flags, & - i_H5E_hid_flags, & - i_H5F_flags, & - i_H5FD_flags, & - i_H5FD_hid_flags, & - i_H5G_flags, & - i_H5I_flags, & - i_H5L_flags, & - i_H5O_flags, & - i_H5P_flags, & - i_H5P_flags_int, & - i_H5R_flags, & - i_H5S_flags, & - i_H5S_hsize_flags, & - i_H5T_flags, & - i_H5Z_flags, & - i_H5generic_flags) - USE H5GLOBAL - INTEGER i_H5D_flags(H5D_FLAGS_LEN) - INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) - INTEGER i_H5E_flags(H5E_FLAGS_LEN) - INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) - INTEGER i_H5F_flags(H5F_FLAGS_LEN) - INTEGER i_H5G_flags(H5G_FLAGS_LEN) - INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) - INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - INTEGER i_H5I_flags(H5I_FLAGS_LEN) - INTEGER i_H5L_flags(H5L_FLAGS_LEN) - INTEGER i_H5O_flags(H5O_FLAGS_LEN) - INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) - INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) - INTEGER i_H5R_flags(H5R_FLAGS_LEN) - INTEGER i_H5S_flags(H5S_FLAGS_LEN) - INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - INTEGER i_H5T_flags(H5T_FLAGS_LEN) - INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) - INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c - !DEC$ENDIF - END FUNCTION h5init_flags_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) - USE H5GLOBAL - INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c - !DEC$ENDIF - END FUNCTION h5init1_flags_c - END INTERFACE - error_1 = h5init_types_c(predef_types, floating_types, integer_types) - error_2 = h5init_flags_c(H5D_flags, & - H5D_size_flags, & - H5E_flags, & - H5E_hid_flags, & - H5F_flags, & - H5FD_flags, & - H5FD_hid_flags, & - H5G_flags, & - H5I_flags, & - H5L_flags, & - H5O_flags, & - H5P_flags, & - H5P_flags_int, & - H5R_flags, & - H5S_flags, & - H5S_hsize_flags, & - H5T_flags, & - H5Z_flags, & - H5generic_flags) - error_3 = h5init1_flags_c(H5LIB_flags ) - error = error_1 + error_2 + error_3 - END SUBROUTINE h5open_f - -!****s* H5LIB/h5close_f -! -! NAME -! h5close_f -! -! PURPOSE -! Closes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5close_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5close_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1 - INTERFACE - INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & - f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) - USE H5GLOBAL - INTEGER P_TYPES_LEN - INTEGER F_TYPES_LEN - INTEGER I_TYPES_LEN - INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c - !DEC$ENDIF - END FUNCTION h5close_types_c - END INTERFACE - error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & - floating_types, FLOATING_TYPES_LEN, & - integer_types, INTEGER_TYPES_LEN ) - error = error_1 - - END SUBROUTINE h5close_f - -!****s* H5LIB/h5get_libversion_f -! -! NAME -! h5get_libversion_f -! -! PURPOSE -! Returns the HDF5 LIbrary release number -! -! Outputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error -!***** - INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c - !DEC$ENDIF - INTEGER, INTENT(OUT) :: majnum, minnum, relnum - END FUNCTION h5get_libversion_c - END INTERFACE - - error = h5get_libversion_c(majnum, minnum, relnum) - - END SUBROUTINE h5get_libversion_f - -!****s* H5LIB/h5check_version_f -! -! NAME -! h5check_version_f -! -! PURPOSE -! Verifies that library versions are consistent. -! -! Inputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: majnum, minnum, relnum - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: majnum, minnum, relnum - END FUNCTION h5check_version_c - END INTERFACE - - error = h5check_version_c(majnum, minnum, relnum) - - END SUBROUTINE h5check_version_f -!****s* H5LIB/h5garbage_collect_f -! -! NAME -! h5garbage_collect_f -! -! PURPOSE -! Garbage collects on all free-lists of all types. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5garbage_collect_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5garbage_collect_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c - !DEC$ENDIF - END FUNCTION h5garbage_collect_c - END INTERFACE - - error = h5garbage_collect_c() - - END SUBROUTINE h5garbage_collect_f -!****s* H5LIB/h5dont_atexit_f -! -! NAME -! h5dont_atexit_f -! -! PURPOSE -! Instructs library not to install atexit cleanup routine. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5dont_atexit_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5dont_atexit_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c - !DEC$ENDIF - END FUNCTION h5dont_atexit_c - END INTERFACE - - error = h5dont_atexit_c() - - END SUBROUTINE h5dont_atexit_f - -!****f* H5LIB/h5kind_to_type -! -! NAME -! h5kind_to_type -! -! PURPOSE -! Converts the KIND to the correct HDF type -! -! Inputs: -! kind - Fortran KIND parameter -! flag - Whether KIND is of type INTEGER or REAL: -! H5_INTEGER_KIND - integer -! H5_REAL_KIND - real -! Outputs: -! h5_type - Returns the type -! -! AUTHOR -! M. Scot Breitenfeld -! August 25, 2008 -! -! Fortran90 Interface: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: kind - INTEGER, INTENT(IN) :: flag -!***** - IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN - h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN - h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN - h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN - h5_type = H5T_NATIVE_INTEGER_8 - ENDIF - ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_4)THEN - h5_type = H5T_NATIVE_REAL_4 - ELSE IF(kind.EQ.Fortran_REAL_8)THEN - h5_type = H5T_NATIVE_REAL_8 - ELSE IF(kind.EQ.Fortran_REAL_16)THEN - h5_type = H5T_NATIVE_REAL_16 - ENDIF - ENDIF - - END FUNCTION h5kind_to_type - -!****f* H5LIB_PROVISIONAL/h5offsetof -! -! NAME -! h5offsetof -! -! PURPOSE -! Computes the offset in memory -! -! Inputs: -! start - starting pointer address -! end - ending pointer address -! -! Outputs: -! offset - offset of a member within the derived type -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: - FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - IMPLICIT NONE - INTEGER(SIZE_T) :: offset - TYPE(C_PTR), VALUE, INTENT(IN) :: start, end -!***** - INTEGER(C_INTPTR_T) :: int_address_start, int_address_end - int_address_start = TRANSFER(start, int_address_start) - int_address_end = TRANSFER(end , int_address_end ) - - offset = int_address_end - int_address_start - - END FUNCTION h5offsetof - -END MODULE H5LIB diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 new file mode 100644 index 0000000..6cb35c0 --- /dev/null +++ b/fortran/src/H5f90global.F90 @@ -0,0 +1,972 @@ +!****h* ROBODoc/H5GLOBAL +! +! NAME +! MODULE H5GLOBAL +! +! FILE +! src/fortran/H5f90global.f90 +! +! PURPOSE +! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are +! packed into arrays in H5_f.c and these arrays are then passed to Fortran. +! This module then uses EQUIVALENCE to assign elements of the arrays to +! Fortran equivalent C stubs. +! +! NOTES +! The size of the C arrays in H5_f.c has to match the values of the variables +! declared as PARAMETER, hence if the size of an array in H5_f.c is changed +! then the PARAMETER of that corresponding array in Fortran must also be changed. +! +! USES +! H5FORTRAN_TYPES - This module is generated at run time. See +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourmal +! +!***** + +MODULE H5GLOBAL + USE H5FORTRAN_TYPES + + IMPLICIT NONE + + ! Definitions for reference datatypes. + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + + ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. + ! The flag is used to tell the function whether the kind input variable + ! is for a REAL or INTEGER data type. + + INTEGER, PARAMETER :: H5_REAL_KIND = 1 + INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 + + TYPE :: hobj_ref_t_f + INTEGER(HADDR_T) ref + END TYPE hobj_ref_t_f + + TYPE :: hdset_reg_ref_t_f + INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref + END TYPE hdset_reg_ref_t_f + + INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this + ! value when new predefined + ! datatypes are added + + ! Do not forget to change the following line when new predefined + ! floating data types are added + INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 + + ! Do not forget to change the following line when new predefined + ! integer data types are added + INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & + H5T_NATIVE_INTEGER_2, & + H5T_NATIVE_INTEGER_4, & + H5T_NATIVE_INTEGER_8, & + H5T_NATIVE_REAL_4, & + H5T_NATIVE_REAL_8, & + H5T_NATIVE_REAL_16, & + H5T_NATIVE_INTEGER, & + H5T_NATIVE_REAL, & + H5T_NATIVE_DOUBLE, & + H5T_NATIVE_CHARACTER , & + H5T_STD_REF_OBJ, & + H5T_STD_REF_DSETREG, & + H5T_IEEE_F32BE, & + H5T_IEEE_F32LE, & + H5T_IEEE_F64BE, & + H5T_IEEE_F64LE, & + H5T_STD_I8BE, & + H5T_STD_I8LE, & + H5T_STD_I16BE, & + H5T_STD_I16LE, & + H5T_STD_I32BE, & + H5T_STD_I32LE, & + H5T_STD_I64BE, & + H5T_STD_I64LE, & + H5T_STD_U8BE, & + H5T_STD_U8LE, & + H5T_STD_U16BE, & + H5T_STD_U16LE, & + H5T_STD_U32BE + +! NOTE: Splitting the line since the Fortran 95 standard limits the number of +! continuation lines to 39; the F03/F08 standard limits the number +! to 255 lines. + + INTEGER(HID_T) :: H5T_STD_U32LE, & + H5T_STD_U64BE, & + H5T_STD_U64LE, & + H5T_STRING, & + H5T_STD_B8BE, & + H5T_STD_B8LE, & + H5T_STD_B16BE, & + H5T_STD_B16LE, & + H5T_STD_B32BE, & + H5T_STD_B32LE, & + H5T_STD_B64BE, & + H5T_STD_B64LE, & + H5T_NATIVE_B8, & + H5T_NATIVE_B16, & + H5T_NATIVE_B32, & + H5T_NATIVE_B64, & + H5T_FORTRAN_S1, & + H5T_C_S1 + + + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types + EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) + EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) + EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) + EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) + EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) + EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) + EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) + EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) + EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) + EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) + EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) + EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) + EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) + EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) + + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types + EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) + EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) + EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) + EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) + + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types + EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) + EQUIVALENCE (integer_types(2), H5T_STD_I8LE) + EQUIVALENCE (integer_types(3), H5T_STD_I16BE) + EQUIVALENCE (integer_types(4), H5T_STD_I16LE) + EQUIVALENCE (integer_types(5), H5T_STD_I32BE) + EQUIVALENCE (integer_types(6), H5T_STD_I32LE) + EQUIVALENCE (integer_types(7), H5T_STD_I64BE) + EQUIVALENCE (integer_types(8), H5T_STD_I64LE) + EQUIVALENCE (integer_types(9), H5T_STD_U8BE) + EQUIVALENCE (integer_types(10), H5T_STD_U8LE) + EQUIVALENCE (integer_types(11), H5T_STD_U16BE) + EQUIVALENCE (integer_types(12), H5T_STD_U16LE) + EQUIVALENCE (integer_types(13), H5T_STD_U32BE) + EQUIVALENCE (integer_types(14), H5T_STD_U32LE) + EQUIVALENCE (integer_types(15), H5T_STD_U64BE) + EQUIVALENCE (integer_types(16), H5T_STD_U64LE) + EQUIVALENCE (integer_types(17), H5T_STRING) + EQUIVALENCE (integer_types(18), H5T_STD_B8BE) + EQUIVALENCE (integer_types(19), H5T_STD_B8LE) + EQUIVALENCE (integer_types(20), H5T_STD_B16BE) + EQUIVALENCE (integer_types(21), H5T_STD_B16LE) + EQUIVALENCE (integer_types(22), H5T_STD_B32BE) + EQUIVALENCE (integer_types(23), H5T_STD_B32LE) + EQUIVALENCE (integer_types(24), H5T_STD_B64BE) + EQUIVALENCE (integer_types(25), H5T_STD_B64LE) + EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) + EQUIVALENCE (integer_types(27), H5T_C_S1) + + + ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & + ! H5T_NATIVE_REAL, & + ! H5T_NATIVE_DOUBLE, & + ! H5T_NATIVE_CHARACTER, & + ! H5T_STD_REF_OBJ, & + ! H5T_STD_REF_DSETREG + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ + !DEC$endif + COMMON /PREDEFINED_TYPES/ predef_types + + ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & + ! H5T_IEEE_F32LE, & + ! H5T_IEEE_F64BE, & + ! H5T_IEEE_F64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ + !DEC$endif + COMMON /FLOATING_TYPES/ floating_types + ! + ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & + ! H5T_STD_I8LE, & + ! H5T_STD_I16BE, & + ! H5T_STD_I16LE, & + ! H5T_STD_I32BE, & + ! H5T_STD_I32LE, & + ! H5T_STD_I64BE, & + ! H5T_STD_I64LE, & + ! H5T_STD_U8BE, & + ! H5T_STD_U8LE, & + ! H5T_STD_U16BE, & + ! H5T_STD_U16LE, & + ! H5T_STD_U32BE, & + ! H5T_STD_U32LE, & + ! H5T_STD_U64BE, & + ! H5T_STD_U64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ + !DEC$endif + COMMON /INTEGER_TYPES/ integer_types + ! + ! Fortran flags + ! + ! + ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) + ! + ! H5F flags declaration + ! + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 + INTEGER :: H5F_flags(H5F_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ + !DEC$endif + COMMON /H5F_FLAGS/ H5F_flags + + INTEGER :: H5F_ACC_RDWR_F + INTEGER :: H5F_ACC_RDONLY_F + INTEGER :: H5F_ACC_TRUNC_F + INTEGER :: H5F_ACC_EXCL_F + INTEGER :: H5F_ACC_DEBUG_F + INTEGER :: H5F_SCOPE_LOCAL_F + INTEGER :: H5F_SCOPE_GLOBAL_F + INTEGER :: H5F_CLOSE_DEFAULT_F + INTEGER :: H5F_CLOSE_WEAK_F + INTEGER :: H5F_CLOSE_SEMI_F + INTEGER :: H5F_CLOSE_STRONG_F + INTEGER :: H5F_OBJ_FILE_F + INTEGER :: H5F_OBJ_DATASET_F + INTEGER :: H5F_OBJ_GROUP_F + INTEGER :: H5F_OBJ_DATATYPE_F + INTEGER :: H5F_OBJ_ALL_F + INTEGER :: H5F_LIBVER_EARLIEST_F + INTEGER :: H5F_LIBVER_LATEST_F + INTEGER :: H5F_UNLIMITED_F + + EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) + EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) + EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) + EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) + EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) + EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) + EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) + EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) + EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) + EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) + EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) + EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) + EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) + EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) + EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) + EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) + EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) + EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) + EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) + ! + ! H5generic flags declaration + ! + INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 + INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ + !DEC$endif + COMMON /H5generic_FLAGS/ H5generic_flags + + INTEGER :: H5_INDEX_UNKNOWN_F + INTEGER :: H5_INDEX_NAME_F + INTEGER :: H5_INDEX_CRT_ORDER_F + INTEGER :: H5_INDEX_N_F + INTEGER :: H5_ITER_UNKNOWN_F + INTEGER :: H5_ITER_INC_F + INTEGER :: H5_ITER_DEC_F + INTEGER :: H5_ITER_NATIVE_F + INTEGER :: H5_ITER_N_F + + EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) + EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) + EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) + EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) + EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) + EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) + EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) + ! + ! H5G flags declaration + ! + INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 + INTEGER :: H5G_flags(H5G_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ + !DEC$endif + COMMON /H5G_FLAGS/ H5G_flags + + INTEGER :: H5G_UNKNOWN_F + INTEGER :: H5G_GROUP_F + INTEGER :: H5G_DATASET_F + INTEGER :: H5G_TYPE_F + INTEGER :: H5G_LINK_F + INTEGER :: H5G_UDLINK_F + INTEGER :: H5G_SAME_LOC_F + INTEGER :: H5G_LINK_ERROR_F + INTEGER :: H5G_LINK_HARD_F + INTEGER :: H5G_LINK_SOFT_F + INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F + INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F + INTEGER :: H5G_STORAGE_TYPE_COMPACT_F + INTEGER :: H5G_STORAGE_TYPE_DENSE_F + + EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type + EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group + EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type + EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) + EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) + EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) + EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) + + EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) + EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) + EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) + EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) + ! + ! H5D flags declaration + ! + + INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 + INTEGER :: H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 + INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ + !DEC$endif + COMMON /H5D_FLAGS/ H5D_flags + COMMON /H5D_SIZE_FLAGS/ H5D_size_flags + + INTEGER :: H5D_COMPACT_F + INTEGER :: H5D_CONTIGUOUS_F + INTEGER :: H5D_CHUNKED_F + + INTEGER :: H5D_ALLOC_TIME_ERROR_F + INTEGER :: H5D_ALLOC_TIME_DEFAULT_F + INTEGER :: H5D_ALLOC_TIME_EARLY_F + INTEGER :: H5D_ALLOC_TIME_LATE_F + INTEGER :: H5D_ALLOC_TIME_INCR_F + + INTEGER :: H5D_SPACE_STS_ERROR_F + INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_ALLOCATED_F + + INTEGER :: H5D_FILL_TIME_ERROR_F + INTEGER :: H5D_FILL_TIME_ALLOC_F + INTEGER :: H5D_FILL_TIME_NEVER_F + + INTEGER :: H5D_FILL_VALUE_ERROR_F + INTEGER :: H5D_FILL_VALUE_UNDEFINED_F + INTEGER :: H5D_FILL_VALUE_DEFAULT_F + INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F + +! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 +! characters for variable names in Fortran. +! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 +! characters for variable names in Fortran. + + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F + INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F + INTEGER :: H5D_MPIO_NO_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F + INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_MIXED_F + INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F + + EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) + EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) + EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) + + EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) + EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) + EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) + EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) + + EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) + EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) + EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) + EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) + + EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) + EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) + + EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) + EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) + EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) + EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) + + EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) + EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) + EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) + EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) + + EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) + EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) + + ! + ! H5E flags declaration + ! + INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 + INTEGER :: H5E_flags(H5E_FLAGS_LEN) + INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 + INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ + !DEC$endif + COMMON /H5E_FLAGS/ H5E_flags + COMMON /H5E_HID_FLAGS/ H5E_hid_flags + + INTEGER(HID_T) :: H5E_DEFAULT_F + INTEGER :: H5E_MAJOR_F + INTEGER :: H5E_MINOR_F + INTEGER :: H5E_WALK_UPWARD_F + INTEGER :: H5E_WALK_DOWNWARD_F + + EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) + EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) + EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) + EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) + EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) + + ! + ! H5FD flags declaration + ! + INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 + INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ + !DEC$endif + COMMON /H5FD_FLAGS/ H5FD_flags + + INTEGER :: H5FD_MPIO_INDEPENDENT_F + INTEGER :: H5FD_MPIO_COLLECTIVE_F + INTEGER :: H5FD_MEM_NOLIST_F + INTEGER :: H5FD_MEM_DEFAULT_F + INTEGER :: H5FD_MEM_SUPER_F + INTEGER :: H5FD_MEM_BTREE_F + INTEGER :: H5FD_MEM_DRAW_F + INTEGER :: H5FD_MEM_GHEAP_F + INTEGER :: H5FD_MEM_LHEAP_F + INTEGER :: H5FD_MEM_OHDR_F + INTEGER :: H5FD_MEM_NTYPES_F + + EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) + EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) + EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) + EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) + EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) + EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) + EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) + EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) + EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) + EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) + EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) + ! + ! H5FD file drivers flags declaration + ! + INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 + INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ + !DEC$endif + COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags + + INTEGER(HID_T) :: H5FD_CORE_F + INTEGER(HID_T) :: H5FD_FAMILY_F + INTEGER(HID_T) :: H5FD_LOG_F + INTEGER(HID_T) :: H5FD_MPIO_F + INTEGER(HID_T) :: H5FD_MULTI_F + INTEGER(HID_T) :: H5FD_SEC2_F + INTEGER(HID_T) :: H5FD_STDIO_F + + EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) + EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) + EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) + EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) + EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) + EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) + EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) + + ! + ! H5I flags declaration + ! + INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 + INTEGER :: H5I_flags(H5I_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ + !DEC$endif + COMMON /H5I_FLAGS/ H5I_flags + + INTEGER :: H5I_FILE_F + INTEGER :: H5I_GROUP_F + INTEGER :: H5I_DATATYPE_F + INTEGER :: H5I_DATASPACE_F + INTEGER :: H5I_DATASET_F + INTEGER :: H5I_ATTR_F + INTEGER :: H5I_BADID_F + + EQUIVALENCE(H5I_flags(1), H5I_FILE_F) + EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) + EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) + EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) + EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) + EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) + EQUIVALENCE(H5I_flags(7), H5I_BADID_F) + ! + ! H5L flags declaration + ! + INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 + INTEGER :: H5L_flags(H5L_FLAGS_LEN) + + INTEGER :: H5L_TYPE_ERROR_F + INTEGER :: H5L_TYPE_HARD_F + INTEGER :: H5L_TYPE_SOFT_F + INTEGER :: H5L_TYPE_EXTERNAL_F + INTEGER :: H5L_SAME_LOC_F + INTEGER :: H5L_LINK_CLASS_T_VERS_F + + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ + !DEC$endif + COMMON /H5L_FLAGS/ H5L_flags + + EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) + EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) + EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) + EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) + EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) + EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) + ! + ! H5O flags declaration + ! + INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 + INTEGER :: H5o_flags(H5O_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ + !DEC$endif + COMMON /H5O_FLAGS/ H5O_flags + + INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO + INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE + INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER + INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE + INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F + INTEGER :: H5O_COPY_ALL_F + INTEGER :: H5O_SHMESG_NONE_FLAG_F + INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F + INTEGER :: H5O_SHMESG_DTYPE_FLAG_F + INTEGER :: H5O_SHMESG_FILL_FLAG_F + INTEGER :: H5O_SHMESG_PLINE_FLAG_F + INTEGER :: H5O_SHMESG_ATTR_FLAG_F + INTEGER :: H5O_SHMESG_ALL_FLAG_F + INTEGER :: H5O_HDR_CHUNK0_SIZE_F + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE + INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** + INTEGER :: H5O_HDR_STORE_TIMES_F + INTEGER :: H5O_HDR_ALL_FLAGS_F + INTEGER :: H5O_SHMESG_MAX_NINDEXES_F + INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F + INTEGER :: H5O_TYPE_UNKNOWN_F + INTEGER :: H5O_TYPE_GROUP_F + INTEGER :: H5O_TYPE_DATASET_F + INTEGER :: H5O_TYPE_NAMED_DATATYPE_F + INTEGER :: H5O_TYPE_NTYPES_F + + EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) + EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) + EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) + EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) + EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) + EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) + EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) + EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) + EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) + EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) + EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) + EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) + EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) + EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) + EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) + EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) + EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) + EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) + EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) + EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) + EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) + EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) + EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) + EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) + EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) + + ! + ! H5P flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 + INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ + !DEC$endif + COMMON /H5P_FLAGS/ H5P_flags + + INTEGER(HID_T) :: H5P_FILE_CREATE_F + INTEGER(HID_T) :: H5P_FILE_ACCESS_F + INTEGER(HID_T) :: H5P_DATASET_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_XFER_F + INTEGER(HID_T) :: H5P_FILE_MOUNT_F + INTEGER(HID_T) :: H5P_DEFAULT_F + INTEGER(HID_T) :: H5P_ROOT_F + INTEGER(HID_T) :: H5P_OBJECT_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_ACCESS_F + INTEGER(HID_T) :: H5P_GROUP_CREATE_F + INTEGER(HID_T) :: H5P_GROUP_ACCESS_F + INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F + INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F + INTEGER(HID_T) :: H5P_STRING_CREATE_F + INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F + INTEGER(HID_T) :: H5P_OBJECT_COPY_F + INTEGER(HID_T) :: H5P_LINK_CREATE_F + INTEGER(HID_T) :: H5P_LINK_ACCESS_F + + EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) + EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) + EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) + EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) + EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) + EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) + EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) + EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) + EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) + EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) + EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) + EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) + EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) + EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) + EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) + EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) + EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) + EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) + + ! + ! H5P integers flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 + INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ + !DEC$endif + COMMON /H5P_FLAGS_INT/ H5P_flags_int + INTEGER :: H5P_CRT_ORDER_INDEXED_F + INTEGER :: H5P_CRT_ORDER_TRACKED_F + EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) + EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) + ! + ! H5R flags declaration + ! + INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 + INTEGER :: H5R_flags(H5R_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ + !DEC$endif + COMMON /H5R_FLAGS/ H5R_flags + + INTEGER :: H5R_OBJECT_F + INTEGER :: H5R_DATASET_REGION_F + + EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) + EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) + + ! + ! H5S flags declaration + ! + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 + INTEGER :: H5S_flags(H5S_FLAGS_LEN) + INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 + INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ + !DEC$endif + COMMON /H5S_FLAGS/ H5S_flags + COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags + + INTEGER(HSIZE_T) :: H5S_UNLIMITED_F + + INTEGER :: H5S_SCALAR_F + INTEGER :: H5S_SIMPLE_F + INTEGER :: H5S_NULL_F + + INTEGER :: H5S_ALL_F + + INTEGER :: H5S_SELECT_NOOP_F + INTEGER :: H5S_SELECT_SET_F + INTEGER :: H5S_SELECT_OR_F + INTEGER :: H5S_SELECT_AND_F + INTEGER :: H5S_SELECT_XOR_F + INTEGER :: H5S_SELECT_NOTB_F + INTEGER :: H5S_SELECT_NOTA_F + INTEGER :: H5S_SELECT_APPEND_F + INTEGER :: H5S_SELECT_PREPEND_F + INTEGER :: H5S_SELECT_INVALID_F + + INTEGER :: H5S_SEL_ERROR_F + INTEGER :: H5S_SEL_NONE_F + INTEGER :: H5S_SEL_POINTS_F + INTEGER :: H5S_SEL_HYPERSLABS_F + INTEGER :: H5S_SEL_ALL_F + + EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) + EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) + EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) + EQUIVALENCE(H5S_flags(3), H5S_NULL_F) + EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) + EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) + EQUIVALENCE(H5S_flags(6), H5S_ALL_F) + + EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) + EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) + EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) + EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) + EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) + + + EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) + EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) + EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) + EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) + EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) + + ! + ! H5T flags declaration + ! + INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 + INTEGER :: H5T_flags(H5T_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ + !DEC$endif + COMMON /H5T_FLAGS/ H5T_flags + + INTEGER :: H5T_NO_CLASS_F + INTEGER :: H5T_INTEGER_F + INTEGER :: H5T_FLOAT_F + INTEGER :: H5T_TIME_F + INTEGER :: H5T_STRING_F + INTEGER :: H5T_BITFIELD_F + INTEGER :: H5T_OPAQUE_F + INTEGER :: H5T_COMPOUND_F + INTEGER :: H5T_REFERENCE_F + INTEGER :: H5T_ENUM_F + INTEGER :: H5T_VLEN_F + INTEGER :: H5T_ARRAY_F + INTEGER :: H5T_ORDER_LE_F + INTEGER :: H5T_ORDER_BE_F + INTEGER :: H5T_ORDER_VAX_F + INTEGER :: H5T_ORDER_NONE_F + INTEGER :: H5T_ORDER_MIXED_F + INTEGER :: H5T_PAD_ZERO_F + INTEGER :: H5T_PAD_ONE_F + INTEGER :: H5T_PAD_BACKGROUND_F + INTEGER :: H5T_PAD_ERROR_F + INTEGER :: H5T_SGN_NONE_F + INTEGER :: H5T_SGN_2_F + INTEGER :: H5T_SGN_ERROR_F + INTEGER :: H5T_NORM_IMPLIED_F + INTEGER :: H5T_NORM_MSBSET_F + INTEGER :: H5T_NORM_NONE_F + INTEGER :: H5T_CSET_ASCII_F + INTEGER :: H5T_CSET_UTF8_F + INTEGER :: H5T_STR_NULLTERM_F + INTEGER :: H5T_STR_NULLPAD_F + INTEGER :: H5T_STR_SPACEPAD_F + INTEGER :: H5T_STR_ERROR_F + INTEGER :: H5T_DIR_ASCEND_F + INTEGER :: H5T_DIR_DESCEND_F + + EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) + EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) + EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) + EQUIVALENCE(H5T_flags(4), H5T_TIME_F) + EQUIVALENCE(H5T_flags(5), H5T_STRING_F) + EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) + EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) + EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) + EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) + EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) + EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) + EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) + EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) + EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) + EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) + EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) + EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) + EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) + EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) + EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) + EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) + EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) + EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) + EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) + EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) + EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) + EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) + EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) + EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) + EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) + EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) + EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) + EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) + EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) + EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) + ! + ! H5Z flags declaration + ! + INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 + INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ + !DEC$endif + COMMON /H5Z_FLAGS/ H5Z_flags + + INTEGER :: H5Z_FILTER_ERROR_F + INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ALL_F + INTEGER :: H5Z_FILTER_DEFLATE_F + INTEGER :: H5Z_FILTER_SHUFFLE_F + INTEGER :: H5Z_FILTER_FLETCHER32_F + INTEGER :: H5Z_FILTER_SZIP_F + INTEGER :: H5Z_ERROR_EDC_F + INTEGER :: H5Z_DISABLE_EDC_F + INTEGER :: H5Z_ENABLE_EDC_F + INTEGER :: H5Z_NO_EDC_F + INTEGER :: H5Z_FLAG_OPTIONAL_F + INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F + INTEGER :: H5Z_FILTER_DECODE_ENABLED_F + INTEGER :: H5Z_FILTER_NBIT_F + INTEGER :: H5Z_FILTER_SCALEOFFSET_F + INTEGER :: H5Z_SO_FLOAT_DSCALE_F + INTEGER :: H5Z_SO_FLOAT_ESCALE_F + INTEGER :: H5Z_SO_INT_F + INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F + + EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) + EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) + EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) + EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) + EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) + EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) + EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) + EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) + EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) + EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) + EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) + EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) + EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) + EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) + EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) + EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) + EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) + EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) + + ! + ! H5 Library flags declaration + ! + INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 + INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ + !DEC$endif + COMMON /H5LIB_FLAGS/ H5LIB_flags + INTEGER :: H5_SZIP_EC_OM_F + INTEGER :: H5_SZIP_NN_OM_F + ! + EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) + EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) + + + ! General H5 flags declarations + ! +!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 +!!$ INTEGER H5_flags(H5_FLAGS_LEN) +!!$!DEC$if defined(BUILD_HDF5_DLL) +!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ +!!$!DEC$endif +!!$ COMMON /H5_FLAGS/ H5_flags +!!$ +!!$ INTEGER :: _F +!!$ INTEGER :: H5F_SCOPE_LOCAL_F +!!$ +!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) +!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) + +CONTAINS + + SUBROUTINE C2F_string(c_string, f_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string + CHARACTER(LEN=*), INTENT(OUT) :: f_string + INTEGER(SIZE_T) :: c_len, f_len + + ! Find the length of the C string by located the null terminator + c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) + ! Find the length of the Fortran string + f_len = LEN(f_string) + + ! CASE (1): C string is equal to or larger then Fortran character buffer, + ! so fill the entire Fortran buffer. + IF(c_len.GE.f_len)THEN ! + f_string(1:f_len) = c_string(1:f_len) + + ! CASE (2): C string is smaller then Fortran character buffer, + ! so copy C string and blank pad remaining characters. + ELSE + f_string(1:c_len) = c_string(1:c_len) + f_string(c_len+1:f_len) =' ' + ENDIF + END SUBROUTINE C2F_string + +END MODULE H5GLOBAL + diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 deleted file mode 100644 index 6cb35c0..0000000 --- a/fortran/src/H5f90global.f90 +++ /dev/null @@ -1,972 +0,0 @@ -!****h* ROBODoc/H5GLOBAL -! -! NAME -! MODULE H5GLOBAL -! -! FILE -! src/fortran/H5f90global.f90 -! -! PURPOSE -! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are -! packed into arrays in H5_f.c and these arrays are then passed to Fortran. -! This module then uses EQUIVALENCE to assign elements of the arrays to -! Fortran equivalent C stubs. -! -! NOTES -! The size of the C arrays in H5_f.c has to match the values of the variables -! declared as PARAMETER, hence if the size of an array in H5_f.c is changed -! then the PARAMETER of that corresponding array in Fortran must also be changed. -! -! USES -! H5FORTRAN_TYPES - This module is generated at run time. See -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourmal -! -!***** - -MODULE H5GLOBAL - USE H5FORTRAN_TYPES - - IMPLICIT NONE - - ! Definitions for reference datatypes. - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - - ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. - ! The flag is used to tell the function whether the kind input variable - ! is for a REAL or INTEGER data type. - - INTEGER, PARAMETER :: H5_REAL_KIND = 1 - INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 - - TYPE :: hobj_ref_t_f - INTEGER(HADDR_T) ref - END TYPE hobj_ref_t_f - - TYPE :: hdset_reg_ref_t_f - INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref - END TYPE hdset_reg_ref_t_f - - INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this - ! value when new predefined - ! datatypes are added - - ! Do not forget to change the following line when new predefined - ! floating data types are added - INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 - - ! Do not forget to change the following line when new predefined - ! integer data types are added - INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 - - INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & - H5T_NATIVE_INTEGER_2, & - H5T_NATIVE_INTEGER_4, & - H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_4, & - H5T_NATIVE_REAL_8, & - H5T_NATIVE_REAL_16, & - H5T_NATIVE_INTEGER, & - H5T_NATIVE_REAL, & - H5T_NATIVE_DOUBLE, & - H5T_NATIVE_CHARACTER , & - H5T_STD_REF_OBJ, & - H5T_STD_REF_DSETREG, & - H5T_IEEE_F32BE, & - H5T_IEEE_F32LE, & - H5T_IEEE_F64BE, & - H5T_IEEE_F64LE, & - H5T_STD_I8BE, & - H5T_STD_I8LE, & - H5T_STD_I16BE, & - H5T_STD_I16LE, & - H5T_STD_I32BE, & - H5T_STD_I32LE, & - H5T_STD_I64BE, & - H5T_STD_I64LE, & - H5T_STD_U8BE, & - H5T_STD_U8LE, & - H5T_STD_U16BE, & - H5T_STD_U16LE, & - H5T_STD_U32BE - -! NOTE: Splitting the line since the Fortran 95 standard limits the number of -! continuation lines to 39; the F03/F08 standard limits the number -! to 255 lines. - - INTEGER(HID_T) :: H5T_STD_U32LE, & - H5T_STD_U64BE, & - H5T_STD_U64LE, & - H5T_STRING, & - H5T_STD_B8BE, & - H5T_STD_B8LE, & - H5T_STD_B16BE, & - H5T_STD_B16LE, & - H5T_STD_B32BE, & - H5T_STD_B32LE, & - H5T_STD_B64BE, & - H5T_STD_B64LE, & - H5T_NATIVE_B8, & - H5T_NATIVE_B16, & - H5T_NATIVE_B32, & - H5T_NATIVE_B64, & - H5T_FORTRAN_S1, & - H5T_C_S1 - - - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types - EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) - EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) - EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) - EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) - EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) - EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) - EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) - EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) - EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) - EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) - EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) - EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) - EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) - EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) - - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types - EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) - EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) - EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) - EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) - - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types - EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) - EQUIVALENCE (integer_types(2), H5T_STD_I8LE) - EQUIVALENCE (integer_types(3), H5T_STD_I16BE) - EQUIVALENCE (integer_types(4), H5T_STD_I16LE) - EQUIVALENCE (integer_types(5), H5T_STD_I32BE) - EQUIVALENCE (integer_types(6), H5T_STD_I32LE) - EQUIVALENCE (integer_types(7), H5T_STD_I64BE) - EQUIVALENCE (integer_types(8), H5T_STD_I64LE) - EQUIVALENCE (integer_types(9), H5T_STD_U8BE) - EQUIVALENCE (integer_types(10), H5T_STD_U8LE) - EQUIVALENCE (integer_types(11), H5T_STD_U16BE) - EQUIVALENCE (integer_types(12), H5T_STD_U16LE) - EQUIVALENCE (integer_types(13), H5T_STD_U32BE) - EQUIVALENCE (integer_types(14), H5T_STD_U32LE) - EQUIVALENCE (integer_types(15), H5T_STD_U64BE) - EQUIVALENCE (integer_types(16), H5T_STD_U64LE) - EQUIVALENCE (integer_types(17), H5T_STRING) - EQUIVALENCE (integer_types(18), H5T_STD_B8BE) - EQUIVALENCE (integer_types(19), H5T_STD_B8LE) - EQUIVALENCE (integer_types(20), H5T_STD_B16BE) - EQUIVALENCE (integer_types(21), H5T_STD_B16LE) - EQUIVALENCE (integer_types(22), H5T_STD_B32BE) - EQUIVALENCE (integer_types(23), H5T_STD_B32LE) - EQUIVALENCE (integer_types(24), H5T_STD_B64BE) - EQUIVALENCE (integer_types(25), H5T_STD_B64LE) - EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) - EQUIVALENCE (integer_types(27), H5T_C_S1) - - - ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & - ! H5T_NATIVE_REAL, & - ! H5T_NATIVE_DOUBLE, & - ! H5T_NATIVE_CHARACTER, & - ! H5T_STD_REF_OBJ, & - ! H5T_STD_REF_DSETREG - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ - !DEC$endif - COMMON /PREDEFINED_TYPES/ predef_types - - ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & - ! H5T_IEEE_F32LE, & - ! H5T_IEEE_F64BE, & - ! H5T_IEEE_F64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ - !DEC$endif - COMMON /FLOATING_TYPES/ floating_types - ! - ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & - ! H5T_STD_I8LE, & - ! H5T_STD_I16BE, & - ! H5T_STD_I16LE, & - ! H5T_STD_I32BE, & - ! H5T_STD_I32LE, & - ! H5T_STD_I64BE, & - ! H5T_STD_I64LE, & - ! H5T_STD_U8BE, & - ! H5T_STD_U8LE, & - ! H5T_STD_U16BE, & - ! H5T_STD_U16LE, & - ! H5T_STD_U32BE, & - ! H5T_STD_U32LE, & - ! H5T_STD_U64BE, & - ! H5T_STD_U64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ - !DEC$endif - COMMON /INTEGER_TYPES/ integer_types - ! - ! Fortran flags - ! - ! - ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) - ! - ! H5F flags declaration - ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 - INTEGER :: H5F_flags(H5F_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ - !DEC$endif - COMMON /H5F_FLAGS/ H5F_flags - - INTEGER :: H5F_ACC_RDWR_F - INTEGER :: H5F_ACC_RDONLY_F - INTEGER :: H5F_ACC_TRUNC_F - INTEGER :: H5F_ACC_EXCL_F - INTEGER :: H5F_ACC_DEBUG_F - INTEGER :: H5F_SCOPE_LOCAL_F - INTEGER :: H5F_SCOPE_GLOBAL_F - INTEGER :: H5F_CLOSE_DEFAULT_F - INTEGER :: H5F_CLOSE_WEAK_F - INTEGER :: H5F_CLOSE_SEMI_F - INTEGER :: H5F_CLOSE_STRONG_F - INTEGER :: H5F_OBJ_FILE_F - INTEGER :: H5F_OBJ_DATASET_F - INTEGER :: H5F_OBJ_GROUP_F - INTEGER :: H5F_OBJ_DATATYPE_F - INTEGER :: H5F_OBJ_ALL_F - INTEGER :: H5F_LIBVER_EARLIEST_F - INTEGER :: H5F_LIBVER_LATEST_F - INTEGER :: H5F_UNLIMITED_F - - EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) - EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) - EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) - EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) - EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) - EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) - EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) - EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) - EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) - EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) - EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) - EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) - EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) - EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) - EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) - EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) - EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) - EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) - EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) - ! - ! H5generic flags declaration - ! - INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 - INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ - !DEC$endif - COMMON /H5generic_FLAGS/ H5generic_flags - - INTEGER :: H5_INDEX_UNKNOWN_F - INTEGER :: H5_INDEX_NAME_F - INTEGER :: H5_INDEX_CRT_ORDER_F - INTEGER :: H5_INDEX_N_F - INTEGER :: H5_ITER_UNKNOWN_F - INTEGER :: H5_ITER_INC_F - INTEGER :: H5_ITER_DEC_F - INTEGER :: H5_ITER_NATIVE_F - INTEGER :: H5_ITER_N_F - - EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) - EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) - EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) - EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) - EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) - EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) - EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) - ! - ! H5G flags declaration - ! - INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 - INTEGER :: H5G_flags(H5G_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ - !DEC$endif - COMMON /H5G_FLAGS/ H5G_flags - - INTEGER :: H5G_UNKNOWN_F - INTEGER :: H5G_GROUP_F - INTEGER :: H5G_DATASET_F - INTEGER :: H5G_TYPE_F - INTEGER :: H5G_LINK_F - INTEGER :: H5G_UDLINK_F - INTEGER :: H5G_SAME_LOC_F - INTEGER :: H5G_LINK_ERROR_F - INTEGER :: H5G_LINK_HARD_F - INTEGER :: H5G_LINK_SOFT_F - INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F - INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F - INTEGER :: H5G_STORAGE_TYPE_COMPACT_F - INTEGER :: H5G_STORAGE_TYPE_DENSE_F - - EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type - EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group - EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type - EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) - EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) - EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) - EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) - - EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) - EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) - EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) - EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) - ! - ! H5D flags declaration - ! - - INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 - INTEGER :: H5D_flags(H5D_FLAGS_LEN) - INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 - INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ - !DEC$endif - COMMON /H5D_FLAGS/ H5D_flags - COMMON /H5D_SIZE_FLAGS/ H5D_size_flags - - INTEGER :: H5D_COMPACT_F - INTEGER :: H5D_CONTIGUOUS_F - INTEGER :: H5D_CHUNKED_F - - INTEGER :: H5D_ALLOC_TIME_ERROR_F - INTEGER :: H5D_ALLOC_TIME_DEFAULT_F - INTEGER :: H5D_ALLOC_TIME_EARLY_F - INTEGER :: H5D_ALLOC_TIME_LATE_F - INTEGER :: H5D_ALLOC_TIME_INCR_F - - INTEGER :: H5D_SPACE_STS_ERROR_F - INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_ALLOCATED_F - - INTEGER :: H5D_FILL_TIME_ERROR_F - INTEGER :: H5D_FILL_TIME_ALLOC_F - INTEGER :: H5D_FILL_TIME_NEVER_F - - INTEGER :: H5D_FILL_VALUE_ERROR_F - INTEGER :: H5D_FILL_VALUE_UNDEFINED_F - INTEGER :: H5D_FILL_VALUE_DEFAULT_F - INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F - -! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 -! characters for variable names in Fortran. -! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 -! characters for variable names in Fortran. - - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F - INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F - INTEGER :: H5D_MPIO_NO_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F - INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_MIXED_F - INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F - - EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) - EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) - EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) - - EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) - EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) - EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) - EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) - - EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) - EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) - EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) - EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) - - EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) - EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) - - EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) - EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) - EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) - EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) - - EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) - EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) - EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) - EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) - - EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) - EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) - - ! - ! H5E flags declaration - ! - INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 - INTEGER :: H5E_flags(H5E_FLAGS_LEN) - INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 - INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ - !DEC$endif - COMMON /H5E_FLAGS/ H5E_flags - COMMON /H5E_HID_FLAGS/ H5E_hid_flags - - INTEGER(HID_T) :: H5E_DEFAULT_F - INTEGER :: H5E_MAJOR_F - INTEGER :: H5E_MINOR_F - INTEGER :: H5E_WALK_UPWARD_F - INTEGER :: H5E_WALK_DOWNWARD_F - - EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) - EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) - EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) - EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) - EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) - - ! - ! H5FD flags declaration - ! - INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 - INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ - !DEC$endif - COMMON /H5FD_FLAGS/ H5FD_flags - - INTEGER :: H5FD_MPIO_INDEPENDENT_F - INTEGER :: H5FD_MPIO_COLLECTIVE_F - INTEGER :: H5FD_MEM_NOLIST_F - INTEGER :: H5FD_MEM_DEFAULT_F - INTEGER :: H5FD_MEM_SUPER_F - INTEGER :: H5FD_MEM_BTREE_F - INTEGER :: H5FD_MEM_DRAW_F - INTEGER :: H5FD_MEM_GHEAP_F - INTEGER :: H5FD_MEM_LHEAP_F - INTEGER :: H5FD_MEM_OHDR_F - INTEGER :: H5FD_MEM_NTYPES_F - - EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) - EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) - EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) - EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) - EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) - EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) - EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) - EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) - EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) - EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) - EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) - ! - ! H5FD file drivers flags declaration - ! - INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 - INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ - !DEC$endif - COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags - - INTEGER(HID_T) :: H5FD_CORE_F - INTEGER(HID_T) :: H5FD_FAMILY_F - INTEGER(HID_T) :: H5FD_LOG_F - INTEGER(HID_T) :: H5FD_MPIO_F - INTEGER(HID_T) :: H5FD_MULTI_F - INTEGER(HID_T) :: H5FD_SEC2_F - INTEGER(HID_T) :: H5FD_STDIO_F - - EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) - EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) - EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) - EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) - EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) - EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) - EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) - - ! - ! H5I flags declaration - ! - INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 - INTEGER :: H5I_flags(H5I_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ - !DEC$endif - COMMON /H5I_FLAGS/ H5I_flags - - INTEGER :: H5I_FILE_F - INTEGER :: H5I_GROUP_F - INTEGER :: H5I_DATATYPE_F - INTEGER :: H5I_DATASPACE_F - INTEGER :: H5I_DATASET_F - INTEGER :: H5I_ATTR_F - INTEGER :: H5I_BADID_F - - EQUIVALENCE(H5I_flags(1), H5I_FILE_F) - EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) - EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) - EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) - EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) - EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) - EQUIVALENCE(H5I_flags(7), H5I_BADID_F) - ! - ! H5L flags declaration - ! - INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 - INTEGER :: H5L_flags(H5L_FLAGS_LEN) - - INTEGER :: H5L_TYPE_ERROR_F - INTEGER :: H5L_TYPE_HARD_F - INTEGER :: H5L_TYPE_SOFT_F - INTEGER :: H5L_TYPE_EXTERNAL_F - INTEGER :: H5L_SAME_LOC_F - INTEGER :: H5L_LINK_CLASS_T_VERS_F - - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ - !DEC$endif - COMMON /H5L_FLAGS/ H5L_flags - - EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) - EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) - EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) - EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) - EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) - EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) - ! - ! H5O flags declaration - ! - INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 - INTEGER :: H5o_flags(H5O_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ - !DEC$endif - COMMON /H5O_FLAGS/ H5O_flags - - INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO - INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE - INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER - INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE - INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F - INTEGER :: H5O_COPY_ALL_F - INTEGER :: H5O_SHMESG_NONE_FLAG_F - INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F - INTEGER :: H5O_SHMESG_DTYPE_FLAG_F - INTEGER :: H5O_SHMESG_FILL_FLAG_F - INTEGER :: H5O_SHMESG_PLINE_FLAG_F - INTEGER :: H5O_SHMESG_ATTR_FLAG_F - INTEGER :: H5O_SHMESG_ALL_FLAG_F - INTEGER :: H5O_HDR_CHUNK0_SIZE_F - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE - INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** - INTEGER :: H5O_HDR_STORE_TIMES_F - INTEGER :: H5O_HDR_ALL_FLAGS_F - INTEGER :: H5O_SHMESG_MAX_NINDEXES_F - INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F - INTEGER :: H5O_TYPE_UNKNOWN_F - INTEGER :: H5O_TYPE_GROUP_F - INTEGER :: H5O_TYPE_DATASET_F - INTEGER :: H5O_TYPE_NAMED_DATATYPE_F - INTEGER :: H5O_TYPE_NTYPES_F - - EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) - EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) - EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) - EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) - EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) - EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) - EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) - EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) - EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) - EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) - EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) - EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) - EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) - EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) - EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) - EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) - EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) - EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) - EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) - EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) - EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) - EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) - EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) - EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) - EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) - - ! - ! H5P flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 - INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ - !DEC$endif - COMMON /H5P_FLAGS/ H5P_flags - - INTEGER(HID_T) :: H5P_FILE_CREATE_F - INTEGER(HID_T) :: H5P_FILE_ACCESS_F - INTEGER(HID_T) :: H5P_DATASET_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_XFER_F - INTEGER(HID_T) :: H5P_FILE_MOUNT_F - INTEGER(HID_T) :: H5P_DEFAULT_F - INTEGER(HID_T) :: H5P_ROOT_F - INTEGER(HID_T) :: H5P_OBJECT_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_ACCESS_F - INTEGER(HID_T) :: H5P_GROUP_CREATE_F - INTEGER(HID_T) :: H5P_GROUP_ACCESS_F - INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F - INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F - INTEGER(HID_T) :: H5P_STRING_CREATE_F - INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F - INTEGER(HID_T) :: H5P_OBJECT_COPY_F - INTEGER(HID_T) :: H5P_LINK_CREATE_F - INTEGER(HID_T) :: H5P_LINK_ACCESS_F - - EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) - EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) - EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) - EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) - EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) - EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) - EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) - EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) - EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) - EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) - EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) - EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) - EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) - EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) - EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) - EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) - EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) - EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) - - ! - ! H5P integers flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 - INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ - !DEC$endif - COMMON /H5P_FLAGS_INT/ H5P_flags_int - INTEGER :: H5P_CRT_ORDER_INDEXED_F - INTEGER :: H5P_CRT_ORDER_TRACKED_F - EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) - EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) - ! - ! H5R flags declaration - ! - INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 - INTEGER :: H5R_flags(H5R_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ - !DEC$endif - COMMON /H5R_FLAGS/ H5R_flags - - INTEGER :: H5R_OBJECT_F - INTEGER :: H5R_DATASET_REGION_F - - EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) - EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) - - ! - ! H5S flags declaration - ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 - INTEGER :: H5S_flags(H5S_FLAGS_LEN) - INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 - INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ - !DEC$endif - COMMON /H5S_FLAGS/ H5S_flags - COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags - - INTEGER(HSIZE_T) :: H5S_UNLIMITED_F - - INTEGER :: H5S_SCALAR_F - INTEGER :: H5S_SIMPLE_F - INTEGER :: H5S_NULL_F - - INTEGER :: H5S_ALL_F - - INTEGER :: H5S_SELECT_NOOP_F - INTEGER :: H5S_SELECT_SET_F - INTEGER :: H5S_SELECT_OR_F - INTEGER :: H5S_SELECT_AND_F - INTEGER :: H5S_SELECT_XOR_F - INTEGER :: H5S_SELECT_NOTB_F - INTEGER :: H5S_SELECT_NOTA_F - INTEGER :: H5S_SELECT_APPEND_F - INTEGER :: H5S_SELECT_PREPEND_F - INTEGER :: H5S_SELECT_INVALID_F - - INTEGER :: H5S_SEL_ERROR_F - INTEGER :: H5S_SEL_NONE_F - INTEGER :: H5S_SEL_POINTS_F - INTEGER :: H5S_SEL_HYPERSLABS_F - INTEGER :: H5S_SEL_ALL_F - - EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) - EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) - EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) - EQUIVALENCE(H5S_flags(3), H5S_NULL_F) - EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) - EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) - EQUIVALENCE(H5S_flags(6), H5S_ALL_F) - - EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) - EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) - EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) - - - EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) - EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) - EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) - EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) - EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) - - ! - ! H5T flags declaration - ! - INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 - INTEGER :: H5T_flags(H5T_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ - !DEC$endif - COMMON /H5T_FLAGS/ H5T_flags - - INTEGER :: H5T_NO_CLASS_F - INTEGER :: H5T_INTEGER_F - INTEGER :: H5T_FLOAT_F - INTEGER :: H5T_TIME_F - INTEGER :: H5T_STRING_F - INTEGER :: H5T_BITFIELD_F - INTEGER :: H5T_OPAQUE_F - INTEGER :: H5T_COMPOUND_F - INTEGER :: H5T_REFERENCE_F - INTEGER :: H5T_ENUM_F - INTEGER :: H5T_VLEN_F - INTEGER :: H5T_ARRAY_F - INTEGER :: H5T_ORDER_LE_F - INTEGER :: H5T_ORDER_BE_F - INTEGER :: H5T_ORDER_VAX_F - INTEGER :: H5T_ORDER_NONE_F - INTEGER :: H5T_ORDER_MIXED_F - INTEGER :: H5T_PAD_ZERO_F - INTEGER :: H5T_PAD_ONE_F - INTEGER :: H5T_PAD_BACKGROUND_F - INTEGER :: H5T_PAD_ERROR_F - INTEGER :: H5T_SGN_NONE_F - INTEGER :: H5T_SGN_2_F - INTEGER :: H5T_SGN_ERROR_F - INTEGER :: H5T_NORM_IMPLIED_F - INTEGER :: H5T_NORM_MSBSET_F - INTEGER :: H5T_NORM_NONE_F - INTEGER :: H5T_CSET_ASCII_F - INTEGER :: H5T_CSET_UTF8_F - INTEGER :: H5T_STR_NULLTERM_F - INTEGER :: H5T_STR_NULLPAD_F - INTEGER :: H5T_STR_SPACEPAD_F - INTEGER :: H5T_STR_ERROR_F - INTEGER :: H5T_DIR_ASCEND_F - INTEGER :: H5T_DIR_DESCEND_F - - EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) - EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) - EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) - EQUIVALENCE(H5T_flags(4), H5T_TIME_F) - EQUIVALENCE(H5T_flags(5), H5T_STRING_F) - EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) - EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) - EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) - EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) - EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) - EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) - EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) - EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) - EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) - EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) - EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) - EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) - EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) - EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) - EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) - EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) - EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) - EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) - EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) - EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) - EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) - EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) - EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) - EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) - EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) - EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) - EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) - EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) - EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) - EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) - ! - ! H5Z flags declaration - ! - INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 - INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ - !DEC$endif - COMMON /H5Z_FLAGS/ H5Z_flags - - INTEGER :: H5Z_FILTER_ERROR_F - INTEGER :: H5Z_FILTER_NONE_F - INTEGER :: H5Z_FILTER_ALL_F - INTEGER :: H5Z_FILTER_DEFLATE_F - INTEGER :: H5Z_FILTER_SHUFFLE_F - INTEGER :: H5Z_FILTER_FLETCHER32_F - INTEGER :: H5Z_FILTER_SZIP_F - INTEGER :: H5Z_ERROR_EDC_F - INTEGER :: H5Z_DISABLE_EDC_F - INTEGER :: H5Z_ENABLE_EDC_F - INTEGER :: H5Z_NO_EDC_F - INTEGER :: H5Z_FLAG_OPTIONAL_F - INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F - INTEGER :: H5Z_FILTER_DECODE_ENABLED_F - INTEGER :: H5Z_FILTER_NBIT_F - INTEGER :: H5Z_FILTER_SCALEOFFSET_F - INTEGER :: H5Z_SO_FLOAT_DSCALE_F - INTEGER :: H5Z_SO_FLOAT_ESCALE_F - INTEGER :: H5Z_SO_INT_F - INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F - - EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) - EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) - EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) - EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) - EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) - EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) - EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) - EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) - EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) - EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) - EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) - EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) - EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) - EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) - EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) - EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) - EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) - EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) - - ! - ! H5 Library flags declaration - ! - INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 - INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ - !DEC$endif - COMMON /H5LIB_FLAGS/ H5LIB_flags - INTEGER :: H5_SZIP_EC_OM_F - INTEGER :: H5_SZIP_NN_OM_F - ! - EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) - EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) - - - ! General H5 flags declarations - ! -!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 -!!$ INTEGER H5_flags(H5_FLAGS_LEN) -!!$!DEC$if defined(BUILD_HDF5_DLL) -!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ -!!$!DEC$endif -!!$ COMMON /H5_FLAGS/ H5_flags -!!$ -!!$ INTEGER :: _F -!!$ INTEGER :: H5F_SCOPE_LOCAL_F -!!$ -!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) -!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) - -CONTAINS - - SUBROUTINE C2F_string(c_string, f_string) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string - CHARACTER(LEN=*), INTENT(OUT) :: f_string - INTEGER(SIZE_T) :: c_len, f_len - - ! Find the length of the C string by located the null terminator - c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) - ! Find the length of the Fortran string - f_len = LEN(f_string) - - ! CASE (1): C string is equal to or larger then Fortran character buffer, - ! so fill the entire Fortran buffer. - IF(c_len.GE.f_len)THEN ! - f_string(1:f_len) = c_string(1:f_len) - - ! CASE (2): C string is smaller then Fortran character buffer, - ! so copy C string and blank pad remaining characters. - ELSE - f_string(1:c_len) = c_string(1:c_len) - f_string(c_len+1:f_len) =' ' - ENDIF - END SUBROUTINE C2F_string - -END MODULE H5GLOBAL - diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index fc9246e..115f8f1 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -1153,27 +1153,17 @@ H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_ /* * Functions frome H5Rf.c */ -#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C) -#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C) -#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C) -#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C) -#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C) -#define nh5rget_object_type_obj_c H5_FC_FUNC_(h5rget_object_type_obj_c, H5RGET_OBJECT_TYPE_OBJ_C) -#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C) -#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C) - - -H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f h5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); -H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f h5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f h5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); -H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); +H5_FCDLL int_f h5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); -H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* @@ -1262,52 +1252,39 @@ H5_FCDLL int_f nh5zget_filter_info_c (int_f *filter, int_f *flag); /* * Functions from H5Lf.c */ -#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C) -#define nh5lcreate_external_c H5_FC_FUNC_(h5lcreate_external_c, H5LCREATE_EXTERNAL_C) -#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C) -#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C) -#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C) -#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C) -#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C) -#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C) -#define nh5lget_info_by_idx_c H5_FC_FUNC_(h5lget_info_by_idx_c, H5LGET_INFO_BY_IDX_C) -#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C) -#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C) -#define nh5lget_name_by_idx_c H5_FC_FUNC_(h5lget_name_by_idx_c, H5LGET_NAME_BY_IDX_C) -#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C) -H5_FCDLL int_f nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); +H5_FCDLL int_f h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); -H5_FCDLL int_f nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +H5_FCDLL int_f h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); +H5_FCDLL int_f h5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lis_registered_c(int_f *link_cls_id); -H5_FCDLL int_f nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id); +H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +H5_FCDLL int_f h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) ; H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data ); diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index c4b7f73..14b76a4 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -9,7 +9,7 @@ * PURPOSE * C Program to match C types to Fortran types. * Creates the files H5f90i_gen.h for the C code and - * H5fortran_types.f90 for the Fortran code. + * H5fortran_types.F90 for the Fortran code. * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -45,7 +45,7 @@ FILE * c_header; FILE * fort_header; #define CFILE "H5f90i_gen.h" -#define FFILE "H5fortran_types.f90" +#define FFILE "H5fortran_types.F90" /* Prototypes for the write routines */ void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 new file mode 100644 index 0000000..1a1a0ec --- /dev/null +++ b/fortran/src/H5test_kind.F90 @@ -0,0 +1,269 @@ +!****p* Program/H5test_kind +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only +! used when the Fortran intrinsic function SIZEOF is not available. It generates +! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less +! portable in comparison to using SIZEOF. +! +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourma +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + j = SELECTED_INT_KIND(18) + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind.f90',& +'!',& +'! NOTES',& +'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be not available at',& +'! configure time',& +'!',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.f90',& +'!',& +'!*****' + +! Generate a program + + WRITE(*,*) "PROGRAM int_kind" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM int_kind" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: b=0" + WRITE(*,*)" INTEGER :: a(8)=0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: b_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1))" + WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" + WRITE(*,*)" IF (b_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (b_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER(",j,") :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL(KIND=",j,") :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 deleted file mode 100644 index 1a1a0ec..0000000 --- a/fortran/src/H5test_kind.f90 +++ /dev/null @@ -1,269 +0,0 @@ -!****p* Program/H5test_kind -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only -! used when the Fortran intrinsic function SIZEOF is not available. It generates -! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less -! portable in comparison to using SIZEOF. -! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourma -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - j = SELECTED_INT_KIND(18) - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind.f90',& -'!',& -'! NOTES',& -'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be not available at',& -'! configure time',& -'!',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.f90',& -'!',& -'!*****' - -! Generate a program - - WRITE(*,*) "PROGRAM int_kind" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM int_kind" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: b=0" - WRITE(*,*)" INTEGER :: a(8)=0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: b_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1))" - WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" - WRITE(*,*)" IF (b_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (b_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER(",j,") :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL(KIND=",j,") :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_SIZEOF.F90 b/fortran/src/H5test_kind_SIZEOF.F90 new file mode 100644 index 0000000..468086a --- /dev/null +++ b/fortran/src/H5test_kind_SIZEOF.F90 @@ -0,0 +1,228 @@ +!****p* Program/H5test_kind_SIZEOF +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_SIZEOF.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! 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 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". +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_SIZEOF.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" + WRITE(*,*) "USE H5test_kind_SIZEOF_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 deleted file mode 100644 index 468086a..0000000 --- a/fortran/src/H5test_kind_SIZEOF.f90 +++ /dev/null @@ -1,228 +0,0 @@ -!****p* Program/H5test_kind_SIZEOF -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_SIZEOF.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! 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 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". -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_SIZEOF.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" - WRITE(*,*) "USE H5test_kind_SIZEOF_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" - -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.F90 b/fortran/src/H5test_kind_STORAGE_SIZE.F90 new file mode 100644 index 0000000..89c904c --- /dev/null +++ b/fortran/src/H5test_kind_STORAGE_SIZE.F90 @@ -0,0 +1,230 @@ +!****p* Program/H5test_kind_STORAGE_SIZE +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_STORAGE_SIZE.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when +! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code +! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard +! compliant. This program is the preferred method. +! +! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_STORAGE_SIZE.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_C_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" + WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.f90 b/fortran/src/H5test_kind_STORAGE_SIZE.f90 deleted file mode 100644 index 89c904c..0000000 --- a/fortran/src/H5test_kind_STORAGE_SIZE.f90 +++ /dev/null @@ -1,230 +0,0 @@ -!****p* Program/H5test_kind_STORAGE_SIZE -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_STORAGE_SIZE.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when -! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code -! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard -! compliant. This program is the preferred method. -! -! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_STORAGE_SIZE.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_C_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" - WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" - -END PROGRAM test_kind - - - diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 new file mode 100644 index 0000000..6309d2f --- /dev/null +++ b/fortran/src/HDF5.F90 @@ -0,0 +1,47 @@ +!****h* ROBODoc/HDF5 +! +! NAME +! MODULE HDF5 +! +! FILE +! src/fortran/src/HDF5.f90 +! +! PURPOSE +! This is the main module used for linking to the Fortran HDF library. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5G + USE H5E + USE H5I + USE H5L + USE H5S + USE H5D + USE H5A + USE H5T + USE H5O + USE H5P + USE H5R + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 deleted file mode 100644 index 6309d2f..0000000 --- a/fortran/src/HDF5.f90 +++ /dev/null @@ -1,47 +0,0 @@ -!****h* ROBODoc/HDF5 -! -! NAME -! MODULE HDF5 -! -! FILE -! src/fortran/src/HDF5.f90 -! -! PURPOSE -! This is the main module used for linking to the Fortran HDF library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5G - USE H5E - USE H5I - USE H5L - USE H5S - USE H5D - USE H5A - USE H5T - USE H5O - USE H5P - USE H5R - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.F90 b/fortran/src/HDF5mpio.F90 new file mode 100644 index 0000000..b8fb645 --- /dev/null +++ b/fortran/src/HDF5mpio.F90 @@ -0,0 +1,55 @@ +!****h* ROBODoc/HDF5 (mpio) +! +! NAME +! HDF5 +! +! PURPOSE +! This is the main module used for linking to the Fortran parallel HDF library. +! This file replaces HDF5.f90 when compiling the parallel library. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5F_PROVISIONAL + USE H5G + USE H5E + USE H5E_PROVISIONAL + USE H5I + USE H5L + USE H5L_PROVISIONAL + USE H5S + USE H5D + USE H5D_PROVISIONAL + USE H5A + USE H5A_PROVISIONAL + USE H5T + USE H5T_PROVISIONAL + USE H5O + USE H5O_PROVISIONAL + USE H5P + USE H5P_PROVISIONAL + USE H5FDMPIO + USE H5R + USE H5R_PROVISIONAL + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90 deleted file mode 100644 index b8fb645..0000000 --- a/fortran/src/HDF5mpio.f90 +++ /dev/null @@ -1,55 +0,0 @@ -!****h* ROBODoc/HDF5 (mpio) -! -! NAME -! HDF5 -! -! PURPOSE -! This is the main module used for linking to the Fortran parallel HDF library. -! This file replaces HDF5.f90 when compiling the parallel library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5F_PROVISIONAL - USE H5G - USE H5E - USE H5E_PROVISIONAL - USE H5I - USE H5L - USE H5L_PROVISIONAL - USE H5S - USE H5D - USE H5D_PROVISIONAL - USE H5A - USE H5A_PROVISIONAL - USE H5T - USE H5T_PROVISIONAL - USE H5O - USE H5O_PROVISIONAL - USE H5P - USE H5P_PROVISIONAL - USE H5FDMPIO - USE H5R - USE H5R_PROVISIONAL - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 56a915f..7e008d7 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,11 +42,11 @@ else AM_LDFLAGS+=-static endif -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled if BUILD_PARALLEL_CONDITIONAL - PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 + PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 else - PARALLEL_COND_SRC = HDF5.f90 + PARALLEL_COND_SRC = HDF5.F90 endif # Check if the compiler supports the Fortran 2003 standard @@ -69,11 +69,11 @@ else endif # Source files for the library. -libhdf5_fortran_la_SOURCES=H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES=H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 \ + 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 $(PARALLEL_COND_SRC) @@ -84,11 +84,11 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES=h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 +MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.F90 # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -134,24 +134,24 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5test_kind is compiled and run to produce H5fortran_detect.f90. +# H5test_kind is compiled and run to produce H5fortran_detect.F90. # H5fortran_detect is compiled and run to produce H5fort_type_defines.h. # H5match_types.c then includes this file and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.f90, which are included in the Fortran library. +# and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. @@ -163,24 +163,24 @@ H5match_types.$(OBJEXT): H5fort_type_defines.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 +H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 +H5fortran_detect.F90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. if FORTRAN_HAVE_STORAGE_SIZE - H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 + H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 else if FORTRAN_HAVE_SIZEOF - H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 + H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 else - H5test_kind_SOURCES = H5test_kind.f90 + H5test_kind_SOURCES = H5test_kind.F90 endif endif @@ -191,35 +191,35 @@ FORTRAN_API=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -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 -HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.F90 +H5fortran_detect.lo: H5fortran_detect.F90 +H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +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 +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ +H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 70470a3..ffcaf62 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -150,13 +150,13 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) -am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 \ - H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ +am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 \ + H5Rff.F90 H5Sff.F90 H5Tff.F90 H5Zff.F90 \ + H5_DBLE_Interface$(F_DBLE).F90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 + H5Tf.c H5Zf.c HDF5.F90 H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 @BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo @BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ @BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo @@ -182,8 +182,8 @@ H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) -am__H5test_kind_SOURCES_DIST = H5test_kind.f90 H5test_kind_SIZEOF.f90 \ - H5test_kind_STORAGE_SIZE.f90 +am__H5test_kind_SOURCES_DIST = H5test_kind.F90 H5test_kind_SIZEOF.F90 \ + H5test_kind_STORAGE_SIZE.F90 @FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) @FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind_SIZEOF.$(OBJEXT) @FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_H5test_kind_OBJECTS = H5test_kind_STORAGE_SIZE.$(OBJEXT) @@ -205,6 +205,24 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -223,21 +241,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ H5match_types.c $(H5test_kind_SOURCES) DIST_SOURCES = $(am__libhdf5_fortran_la_SOURCES_DIST) \ @@ -725,10 +728,10 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 +@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.F90 -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled +@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 @FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 # Check if the compiler supports the Fortran 2003 standard @@ -744,11 +747,11 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI @FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. -libhdf5_fortran_la_SOURCES = H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES = H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 \ + 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 $(PARALLEL_COND_SRC) @@ -760,11 +763,11 @@ libhdf5_fortran_la_LIBADD = $(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES = h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 +MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.F90 @BUILD_PARALLEL_CONDITIONAL_FALSE@H5FC_NAME = h5fc @@ -774,18 +777,18 @@ MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.f90 -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 +H5fortran_detect_SOURCES = H5fortran_detect.F90 +@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.F90 +@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 +@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -813,7 +816,7 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -931,6 +934,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5f90kit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5match_types.Po@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -952,15 +964,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` - -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - mostlyclean-libtool: -rm -f *.lo @@ -1391,7 +1394,7 @@ install-exec-local: #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. @@ -1401,45 +1404,45 @@ H5fort_type_defines.h: H5fortran_detect$(EXEEXT) H5match_types.$(OBJEXT): H5fort_type_defines.h -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 +H5fortran_detect.F90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -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 -HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.F90 +H5fortran_detect.lo: H5fortran_detect.F90 +H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +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 +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ +H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ -- cgit v0.12 From 7984de553e8ad2bbafa0840b207e762e2ed68f58 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Apr 2015 17:03:33 -0500 Subject: [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. --- MANIFEST | 1 - fortran/src/H5Aff.F90 | 29 +-- fortran/src/H5Df.c | 362 +++++++++++++++---------------- fortran/src/H5Dff.F90 | 270 +++++++++++------------ fortran/src/H5Ef.c | 14 +- fortran/src/H5Eff.F90 | 58 ++--- fortran/src/H5Ff.c | 30 +-- fortran/src/H5Fff.F90 | 165 ++++++-------- fortran/src/H5Zf.c | 24 +- fortran/src/H5Zff.F90 | 57 +++-- fortran/src/H5_DBLE_InterfaceInclude.F90 | 180 +++++---------- fortran/src/H5f90global.F90 | 67 +++++- fortran/src/H5f90proto.h | 350 ++++++++++-------------------- fortran/src/HDF5.F90 | 4 + fortran/src/HDF5mpio.F90 | 55 ----- fortran/src/Makefile.am | 20 +- fortran/src/Makefile.in | 26 +-- 17 files changed, 721 insertions(+), 991 deletions(-) delete mode 100644 fortran/src/HDF5mpio.F90 diff --git a/MANIFEST b/MANIFEST index 5c3ab84..f097bbc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -312,7 +312,6 @@ ./fortran/src/H5test_kind_STORAGE_SIZE.F90 ./fortran/src/H5match_types.c ./fortran/src/HDF5.F90 -./fortran/src/HDF5mpio.F90 ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index f8f361f..ccafeb7 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -67,12 +67,7 @@ MODULE H5A USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! + INTERFACE h5awrite_f MODULE PROCEDURE h5awrite_integer_scalar MODULE PROCEDURE h5awrite_integer_1 @@ -101,11 +96,9 @@ MODULE H5A ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr - END INTERFACE INTERFACE h5aread_f - MODULE PROCEDURE h5aread_integer_scalar MODULE PROCEDURE h5aread_integer_1 MODULE PROCEDURE h5aread_integer_2 @@ -130,16 +123,13 @@ MODULE H5A MODULE PROCEDURE h5aread_real_5 MODULE PROCEDURE h5aread_real_6 MODULE PROCEDURE h5aread_real_7 - ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr - END INTERFACE ! Interface for the function used to pass the C pointer of the buffer ! to the C H5Awrite routine - INTERFACE INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr @@ -152,7 +142,6 @@ MODULE H5A ! Interface for the function used to pass the C pointer of the buffer ! to the C H5Aread routine - INTERFACE INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr @@ -201,6 +190,7 @@ CONTAINS ! SOURCE SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & hdferr, acpl_id, aapl_id ) + USE H5GLOBAL USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier @@ -220,9 +210,9 @@ CONTAINS INTERFACE INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') - USE H5GLOBAL + IMPORT :: C_CHAR, HID_T INTEGER(HID_T), INTENT(IN), VALUE :: loc_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(HID_T), INTENT(IN), VALUE :: type_id INTEGER(HID_T), INTENT(IN), VALUE :: space_id INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default @@ -284,8 +274,9 @@ CONTAINS INTERFACE INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') USE H5GLOBAL + IMPORT :: C_CHAR INTEGER(HID_T), INTENT(IN), VALUE :: obj_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name END FUNCTION H5Aopen_name END INTERFACE @@ -483,14 +474,14 @@ CONTAINS USE H5GLOBAL INTEGER(HID_T), INTENT(IN), VALUE :: attr_id INTEGER(SIZE_T), INTENT(IN), VALUE :: size - CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf END FUNCTION H5Aget_name END INTERFACE ! add 1 for the null char hdferr = H5Aget_name(attr_id, size+1, c_buf) - CALL C2F_string(c_buf, buf) + CALL H5_Fortran_string_c2f(c_buf, buf) END SUBROUTINE H5Aget_name_f @@ -638,11 +629,11 @@ CONTAINS !!$ USE ISO_C_BINDING !!$ USE H5GLOBAL !!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name !!$ INTEGER(C_INT), INTENT(IN) :: idx_type !!$ INTEGER(C_INT), INTENT(IN) :: order !!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name !!$ INTEGER(SIZE_T) :: size_default !!$ INTEGER(HID_T) :: lapl_id_default !!$ END FUNCTION H5Aget_name_by_idx diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index f4082a9..2bffe02 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -48,7 +48,7 @@ * SOURCE */ int_f -nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -100,7 +100,7 @@ DONE: * SOURCE */ int_f -nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) +h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { char *c_name = NULL; @@ -153,7 +153,7 @@ DONE: * SOURCE */ int_f -nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -161,13 +161,13 @@ nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -175,13 +175,13 @@ nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -189,13 +189,13 @@ nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -203,13 +203,13 @@ nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -217,13 +217,13 @@ nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -231,13 +231,13 @@ nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -245,13 +245,13 @@ nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -259,13 +259,13 @@ nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -273,7 +273,7 @@ nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h /* * Call h5dwrite_c function. */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } @@ -299,7 +299,7 @@ nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h * This function is added to accomodate oveloaded h5dwrite_f * with the dims argument being of INTEGER(HSIZE_T) type * - * Added nh5dwrite_integer(real,double)_s,1-7_c functions to eliminate + * Added h5dwrite_integer(real,double)_s,1-7_c functions to eliminate * complains about wrong parameter types in h5dwrite_c function * called by Fortran rouitnes * October 10, 2006 EIP @@ -307,7 +307,7 @@ nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, h * SOURCE */ int_f -nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) +h5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) /******/ { int ret_value = -1; @@ -338,251 +338,251 @@ nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_ } int_f -nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dwrite_c function. */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } @@ -610,7 +610,7 @@ nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space * SOURCE */ int_f -nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) +h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -677,7 +677,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ * SOURCE */ int_f -nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) +h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -749,7 +749,7 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ * SOURCE */ int_f -nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -757,13 +757,13 @@ nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_ /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -771,13 +771,13 @@ nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -785,13 +785,13 @@ nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -799,13 +799,13 @@ nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -813,13 +813,13 @@ nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -827,13 +827,13 @@ nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -841,13 +841,13 @@ nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -855,13 +855,13 @@ nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } int_f -nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +h5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) { int ret_value = -1; @@ -869,7 +869,7 @@ nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi /* * Call h5dread_c function. */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); return ret_value; } @@ -896,7 +896,7 @@ nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi * This function was added to accomodate h5dread_f subroutine * with the dims parameter being of INTEGER(HSIZE_T_F) size. * - * Added nh5dread_integer(real,double)_s,1-7_c functions to eliminate + * Added h5dread_integer(real,double)_s,1-7_c functions to eliminate * complains about wrong parameter types in h5dwrite_c function * called by Fortran rouitnes * October 10, 2006 EIP @@ -904,7 +904,7 @@ nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hi * SOURCE */ int_f -nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) +h5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) /******/ { int ret_value = -1; @@ -935,243 +935,243 @@ nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t } int_f -nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } int_f -nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +h5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) { /* * Call h5dread_c function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } /****if* H5Df/h5dread_ref_obj_c @@ -1198,7 +1198,7 @@ nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ * SOURCE */ int_f -nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims) +h5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -1265,7 +1265,7 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i * SOURCE */ int_f -nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) +h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -1329,7 +1329,7 @@ nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i */ int_f -nh5dclose_c ( hid_t_f *dset_id ) +h5dclose_c ( hid_t_f *dset_id ) /******/ { int ret_value = 0; @@ -1359,7 +1359,7 @@ nh5dclose_c ( hid_t_f *dset_id ) */ int_f -nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) +h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) /******/ { int ret_value = -1; @@ -1394,7 +1394,7 @@ nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) */ int_f -nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) +h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) /******/ { int ret_value = -1; @@ -1432,7 +1432,7 @@ nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) */ int_f -nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) +h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -1473,7 +1473,7 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) */ int_f -nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) +h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) /******/ { hid_t c_space_id; @@ -1503,9 +1503,9 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) return ret_value; } -/****if* H5Df/nh5dget_storage_size_c +/****if* H5Df/h5dget_storage_size_c * NAME - * nh5dget_storage_size_c + * h5dget_storage_size_c * PURPOSE * Call H5Dget_storage_size to return the amount of storage * required for a dataset @@ -1524,7 +1524,7 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) */ int_f -nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) +h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -1539,9 +1539,9 @@ nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) return ret_value; } -/****if* H5Df/nh5dvlen_get_max_len_c +/****if* H5Df/h5dvlen_get_max_len_c * NAME - * nh5dvlen_get_max_len_c + * h5dvlen_get_max_len_c * PURPOSE * Get the maximum size of the VL dataset element * INPUTS @@ -1561,7 +1561,7 @@ nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) */ int_f -nh5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) +h5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) /******/ { int ret_value = -1; @@ -1597,9 +1597,9 @@ DONE: HDfree(c_buf); return ret_value; } -/****if* H5Df/nh5dwrite_vl_integer_c +/****if* H5Df/h5dwrite_vl_integer_c * NAME - * nh5dwrite_vl_integer_c + * h5dwrite_vl_integer_c * PURPOSE * Write variable length dataset * INPUTS @@ -1624,7 +1624,7 @@ DONE: */ int_f -nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1670,9 +1670,9 @@ DONE: return ret_value; } -/****if* H5Df/nh5dread_vl_integer_c +/****if* H5Df/h5dread_vl_integer_c * NAME - * nh5dread_vl_integer_c + * h5dread_vl_integer_c * PURPOSE * Read variable length dataset * INPUTS @@ -1698,7 +1698,7 @@ DONE: */ int_f -nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1742,9 +1742,9 @@ DONE: return ret_value; } -/****if* H5Df/nh5dwrite_vl_string_c +/****if* H5Df/h5dwrite_vl_string_c * NAME - * nh5dwrite_vl_string_c + * h5dwrite_vl_string_c * PURPOSE * Write variable length strings from Fortran program * INPUTS @@ -1768,7 +1768,7 @@ DONE: */ int_f -nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1829,9 +1829,9 @@ DONE: HDfree(tmp); return ret_value; } -/****if* H5Df/nh5dread_vl_string_c +/****if* H5Df/h5dread_vl_string_c * NAME - * nh5dread_vl_string_c + * h5dread_vl_string_c * PURPOSE * Read variable length strings from Fortran program * INPUTS @@ -1855,7 +1855,7 @@ DONE: */ int_f -nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1912,9 +1912,9 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa return ret_value; } -/****if* H5Df/nh5dwrite_vl_real_c +/****if* H5Df/h5dwrite_vl_real_c * NAME - * nh5dwrite_vl_real_c + * h5dwrite_vl_real_c * PURPOSE * Write variable length dataset * INPUTS @@ -1939,7 +1939,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa */ int_f -nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1985,9 +1985,9 @@ DONE: return ret_value; } -/****if* H5Df/nh5dread_vl_real_c +/****if* H5Df/h5dread_vl_real_c * NAME - * nh5dread_vl_real_c + * h5dread_vl_real_c * PURPOSE * Read variable length dataset * INPUTS @@ -2013,7 +2013,7 @@ DONE: */ int_f -nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -2079,7 +2079,7 @@ DONE: * SOURCE */ int_f -nh5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id) +h5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id) /******/ { int ret_value = -1; @@ -2136,7 +2136,7 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b } int_f -nh5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) +h5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) { int ret_value = -1; @@ -2160,7 +2160,7 @@ nh5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, } int_f -nh5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) +h5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) { int ret_value = -1; @@ -2184,7 +2184,7 @@ nh5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, vo } int_f -nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) +h5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) { int ret_value = -1; @@ -2226,7 +2226,7 @@ nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, * SOURCE */ int_f -nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) +h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) /******/ { int ret_value = -1; @@ -2270,7 +2270,7 @@ nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) * SOURCE */ int_f -nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -2396,9 +2396,9 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, ret_value = 0; return ret_value; } -/****if* H5Df/nh5dget_access_plist_c +/****if* H5Df/h5dget_access_plist_c * NAME - * nh5dget_access_plist_c + * h5dget_access_plist_c * PURPOSE * Call H5Dget_access_plist * INPUTS @@ -2414,7 +2414,7 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, * SOURCE */ int_f -nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) +h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -2430,7 +2430,7 @@ nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) return ret_value; } -/****if* H5Df/nh5dvlen_reclaim_c +/****if* H5Df/h5dvlen_reclaim_c * NAME * h5dvlen_reclaim_c * PURPOSE diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 8457bfd..b70c091 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -82,6 +82,8 @@ !***** MODULE H5D + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL INTERFACE h5dextend_f @@ -178,8 +180,9 @@ MODULE H5D mem_space_id_default , & file_space_id_default, & xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -197,8 +200,9 @@ MODULE H5D mem_space_id_default, & file_space_id_default, & xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -220,8 +224,9 @@ MODULE H5D INTERFACE INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE TYPE(C_PTR), VALUE :: f_ptr_fill_value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier @@ -292,14 +297,13 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & - space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) & + BIND(C,NAME='h5dcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id @@ -370,14 +374,13 @@ CONTAINS INTEGER(HID_T) :: dapl_id_default INTERFACE - INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) & + BIND(C,NAME='h5dopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(HID_T), INTENT(IN) :: dapl_id_default INTEGER(HID_T), INTENT(OUT) :: dset_id @@ -422,11 +425,10 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dclose_c(dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c - !DEC$ENDIF + INTEGER FUNCTION h5dclose_c(dset_id) & + BIND(C,NAME='h5dclose_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id END FUNCTION h5dclose_c END INTERFACE @@ -470,11 +472,10 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c - !DEC$ENDIF + INTEGER FUNCTION h5dget_type_c(dataset_id, datatype_id) & + BIND(C,NAME='h5dget_type_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HID_T), INTENT(OUT) :: datatype_id END FUNCTION h5dget_type_c @@ -522,11 +523,10 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dset_extent_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c - !DEC$ENDIF + INTEGER FUNCTION h5dset_extent_c(dataset_id, size) & + BIND(C,NAME='h5dset_extent_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size END FUNCTION h5dset_extent_c @@ -567,11 +567,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c - !DEC$ENDIF + INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) & + BIND(C,NAME='h5dget_create_plist_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HID_T), INTENT(OUT) :: plist_id END FUNCTION h5dget_create_plist_c @@ -607,11 +605,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c - !DEC$ENDIF + INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) & + BIND(C,NAME='h5dget_storage_size_c') + IMPORT :: HID_T, HSIZE_T INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5dget_storage_size_c @@ -653,11 +649,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c - !DEC$ENDIF + INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) & + BIND(C,NAME='h5dvlen_get_max_len_c') + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id @@ -699,11 +693,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c - !DEC$ENDIF + INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) & + BIND(C,NAME='h5dget_space_status_c') + IMPORT :: HID_T INTEGER(HID_T) :: dset_id INTEGER :: flag END FUNCTION h5dget_space_status_c @@ -754,11 +746,10 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c - !DEC$ENDIF + INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) & + BIND(C,NAME='h5dcreate_anon_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id @@ -788,8 +779,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store ! the length of each ! element - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -802,11 +792,10 @@ CONTAINS INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c - !DEC$ENDIF + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dwrite_vl_integer_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -814,8 +803,7 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dwrite_vl_integer_c END INTERFACE @@ -860,11 +848,10 @@ CONTAINS INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c - !DEC$ENDIF + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dread_vl_integer_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -872,8 +859,7 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf END FUNCTION h5dread_vl_integer_c END INTERFACE @@ -917,11 +903,10 @@ CONTAINS INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c - !DEC$ENDIF + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dwrite_vl_real_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -975,11 +960,10 @@ CONTAINS INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c - !DEC$ENDIF + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dread_vl_real_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1010,13 +994,13 @@ CONTAINS SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & hdferr, & mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(2)) :: buf ! Data buffer + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(2)) :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -1031,12 +1015,11 @@ CONTAINS mem_space_id_default, & file_space_id_default, & ! xfer_prp_default, tmp_buf, dims, str_len) - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + xfer_prp_default, buf, dims, str_len) & + BIND(C,NAME='h5dwrite_vl_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1044,7 +1027,7 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf END FUNCTION END INTERFACE @@ -1064,8 +1047,7 @@ CONTAINS END SUBROUTINE h5dwrite_vl_string SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) + hdferr, mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier @@ -1088,12 +1070,11 @@ CONTAINS INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + xfer_prp_default, buf, dims, str_len) & + BIND(C,NAME='h5dread_vl_string_c') + IMPORT :: c_char + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1101,7 +1082,7 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf END FUNCTION h5dread_vl_string_c END INTERFACE @@ -1152,18 +1133,16 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: dataspace_id - END FUNCTION h5dget_space_c - END INTERFACE + INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) BIND(C,NAME='h5dget_space_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + END FUNCTION h5dget_space_c + END INTERFACE - hdferr = h5dget_space_c(dataset_id, dataspace_id) -END SUBROUTINE h5dget_space_f + hdferr = h5dget_space_c(dataset_id, dataspace_id) + END SUBROUTINE h5dget_space_f !****s* H5D/h5dget_access_plist_f ! @@ -1185,26 +1164,24 @@ END SUBROUTINE h5dget_space_f ! April 13, 2009 ! ! SOURCE -SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_access_plist_c - END INTERFACE - - hdferr = h5dget_access_plist_c(dset_id, plist_id) + SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER , INTENT(OUT) :: hdferr + !***** + INTERFACE + INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) BIND(C,NAME='h5dget_access_plist_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_access_plist_c + END INTERFACE + + hdferr = h5dget_access_plist_c(dset_id, plist_id) -END SUBROUTINE h5dget_access_plist_f + END SUBROUTINE h5dget_access_plist_f SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1263,11 +1240,10 @@ END SUBROUTINE h5dget_access_plist_f INTERFACE INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF + file_space_id_default, xfer_prp_default, ref_buf, dims) & + BIND(C,NAME='h5dwrite_ref_reg_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default @@ -2185,7 +2161,6 @@ END SUBROUTINE h5dget_access_plist_f SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier @@ -2206,11 +2181,10 @@ END SUBROUTINE h5dget_access_plist_f INTERFACE INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF + file_space_id_default, xfer_prp_default, ref_buf, dims) & + BIND(C,NAME='h5dread_ref_reg_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: xfer_prp_default @@ -3353,7 +3327,6 @@ END SUBROUTINE h5dget_access_plist_f ! ! Fortran2003 Interface: SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id @@ -3364,8 +3337,9 @@ END SUBROUTINE h5dget_access_plist_f INTERFACE INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T) :: type_id INTEGER(HID_T) :: space_id INTEGER(HID_T) :: plist_id diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index f5c0c45..4cba955 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -42,7 +42,7 @@ * SOURCE */ int_f -nh5eclear_c(hid_t_f *estack_id ) +h5eclear_c(hid_t_f *estack_id ) /******/ { int_f ret_value = 0; @@ -78,7 +78,7 @@ done: * SOURCE */ int_f -nh5eprint_c1(_fcd name, int_f* namelen) +h5eprint_c1(_fcd name, int_f* namelen) /******/ { FILE *file = NULL; @@ -124,7 +124,7 @@ done: * SOURCE */ int_f -nh5eprint_c2(void) +h5eprint_c2(void) /******/ { int_f ret_value = 0; @@ -159,7 +159,7 @@ done: * SOURCE */ int_f -nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) +h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -207,7 +207,7 @@ done: * SOURCE */ int_f -nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) +h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -254,7 +254,7 @@ done: * SOURCE */ int_f -nh5eset_auto_c(int_f* printflag) +h5eset_auto_c(int_f* printflag) /******/ { herr_t status = -1; @@ -290,7 +290,7 @@ done: * SOURCE */ /* int_f */ -/* nh5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ +/* h5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ /* /\******\/ */ /* { */ /* int ret_val = -1; */ diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index ca32b22..47c43ce 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -35,6 +35,7 @@ MODULE H5E + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR USE H5GLOBAL !Turn on automatic printing of errors @@ -79,11 +80,9 @@ CONTAINS INTEGER(HID_T) :: estack_id_default INTERFACE - INTEGER FUNCTION h5eclear_c(estack_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c - !DEC$ENDIF + INTEGER FUNCTION h5eclear_c(estack_id_default) BIND(C,NAME='h5eclear_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T) :: estack_id_default END FUNCTION h5eclear_c END INTERFACE @@ -118,29 +117,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: namelen INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5eprint_c1(name, namelen) BIND(C,NAME='h5eprint_c1') + IMPORT :: C_CHAR + IMPLICIT NONE INTEGER :: namelen - CHARACTER(LEN=*),INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name END FUNCTION h5eprint_c1 END INTERFACE INTERFACE - INTEGER FUNCTION h5eprint_c2() - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 - !DEC$ENDIF + INTEGER FUNCTION h5eprint_c2() BIND(C,NAME='h5eprint_c2') END FUNCTION h5eprint_c2 END INTERFACE namelen = LEN(NAME) @@ -186,14 +178,12 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) BIND(C,NAME='h5eget_major_c') + IMPORT :: C_CHAR + IMPORT :: SIZE_T + IMPLICIT NONE INTEGER :: error_no - CHARACTER(LEN=*) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name INTEGER(SIZE_T), INTENT(IN) :: namelen END FUNCTION h5eget_major_c END INTERFACE @@ -233,14 +223,10 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5eget_minor_c(error_no, name) BIND(C,NAME='h5eget_minor_c') + IMPORT :: C_CHAR INTEGER :: error_no - CHARACTER(LEN=*) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name END FUNCTION h5eget_minor_c END INTERFACE @@ -286,12 +272,10 @@ CONTAINS INTERFACE INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & BIND(C, NAME='h5eset_auto2_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL + IMPORT :: c_ptr, c_funptr + IMPORT :: HID_T INTEGER :: printflag INTEGER(HID_T) :: estack_id -!!$ TYPE(C_FUNPTR) :: func -!!$ TYPE(C_PTR), VALUE :: client_data TYPE(C_FUNPTR), VALUE :: func TYPE(C_PTR), VALUE :: client_data END FUNCTION h5eset_auto2_c diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 1696672..1de2164 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -45,7 +45,7 @@ * SOURCE */ int_f -nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) +h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -111,7 +111,7 @@ nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, h * SOURCE */ int_f -nh5fflush_c (hid_t_f *object_id, int_f *scope) +h5fflush_c (hid_t_f *object_id, int_f *scope) /******/ { int ret_value = -1; @@ -153,7 +153,7 @@ nh5fflush_c (hid_t_f *object_id, int_f *scope) * HISTORY */ int_f -nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) +h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) /******/ { int ret_value = -1; @@ -209,7 +209,7 @@ nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, h * SOURCE */ int_f -nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) +h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /******/ { int ret_value = -1; @@ -260,7 +260,7 @@ nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) * SOURCE */ int_f -nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) +h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -320,7 +320,7 @@ nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hi * SOURCE */ int_f -nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) +h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /******/ { int ret_value = -1; @@ -353,7 +353,7 @@ nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) * SOURCE */ int_f -nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) +h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /******/ { int ret_value = -1; @@ -388,7 +388,7 @@ nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) * SOURCE */ int_f -nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) +h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /******/ { int ret_value = -1; @@ -425,7 +425,7 @@ nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) * SOURCE */ int_f -nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) +h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) /******/ { int ret_value = -1; @@ -468,7 +468,7 @@ nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) */ int_f -nh5fclose_c ( hid_t_f *file_id ) +h5fclose_c ( hid_t_f *file_id ) /******/ { int ret_value = 0; @@ -500,7 +500,7 @@ nh5fclose_c ( hid_t_f *file_id ) */ int_f -nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) +h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) /******/ { int ret_value = 0; @@ -538,7 +538,7 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * SOURCE */ int_f -nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, +h5fget_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) /******/ { @@ -584,7 +584,7 @@ nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, */ int_f -nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) +h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /******/ { int ret_value = 0; @@ -616,7 +616,7 @@ nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) * SOURCE */ int_f -nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) +h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /******/ { char *c_buf = NULL; /* Buffer to hold C string */ @@ -663,7 +663,7 @@ done: * SOURCE */ int_f -nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) +h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) /******/ { hsize_t size_c; diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index 53df8c5..206f71b 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -34,8 +34,9 @@ !***** MODULE H5F + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE CONTAINS !****s* H5F/h5fcreate_f @@ -89,13 +90,10 @@ CONTAINS INTERFACE INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name + creation_prp_default, access_prp_default, file_id) BIND(C,NAME='h5fcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: access_flags INTEGER(HID_T), INTENT(OUT) :: file_id INTEGER(HID_T), INTENT(IN) :: creation_prp_default @@ -166,11 +164,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5fflush_c(object_id, scope) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c - !DEC$ENDIF + INTEGER FUNCTION h5fflush_c(object_id, scope) BIND(C,NAME='h5fflush_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER, INTENT(IN) :: scope END FUNCTION h5fflush_c @@ -225,14 +221,12 @@ CONTAINS INTERFACE INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & - child_id, access_prp_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + child_id, access_prp_default) BIND(C,NAME='h5fmount_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(HID_T), INTENT(IN) :: child_id INTEGER(HID_T), INTENT(IN) :: access_prp_default INTEGER :: namelen @@ -281,14 +275,12 @@ CONTAINS INTEGER :: namelen ! Length of the name character string INTERFACE - INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) BIND(C,NAME='h5funmount_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen END FUNCTION h5funmount_c END INTERFACE @@ -341,13 +333,11 @@ CONTAINS INTERFACE INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name + access_prp_default, file_id) BIND(C,NAME='h5fopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER, INTENT(IN) :: access_flags INTEGER(HID_T), INTENT(IN) :: access_prp_default @@ -392,11 +382,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c - !DEC$ENDIF + INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) BIND(C,NAME='h5freopen_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HID_T), INTENT(OUT) :: ret_file_id END FUNCTION h5freopen_c @@ -437,11 +425,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) BIND(C,NAME='h5fget_create_plist_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HID_T), INTENT(OUT) :: prop_id END FUNCTION h5fget_create_plist_c @@ -481,11 +467,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) BIND(C,NAME='h5fget_access_plist_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HID_T), INTENT(OUT) :: access_id END FUNCTION h5fget_access_plist_c @@ -530,13 +514,10 @@ CONTAINS ! to define status value. INTERFACE - INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) BIND(C,NAME='h5fis_hdf5_c') + IMPORT :: C_CHAR + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER :: flag END FUNCTION h5fis_hdf5_c @@ -576,11 +557,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5fclose_c(file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c - !DEC$ENDIF + INTEGER FUNCTION h5fclose_c(file_id) BIND(C,NAME='h5fclose_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id END FUNCTION h5fclose_c END INTERFACE @@ -619,22 +598,18 @@ CONTAINS ! SOURCE SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) BIND(C,NAME='h5fget_obj_count_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER, INTENT(IN) :: obj_type INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects END FUNCTION h5fget_obj_count_c END INTERFACE @@ -689,11 +664,10 @@ CONTAINS INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) & + BIND(C,NAME='h5fget_obj_ids_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER, INTENT(IN) :: obj_type INTEGER(SIZE_T), INTENT(IN) :: max_objs @@ -733,11 +707,10 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) & + BIND(C,NAME='h5fget_freespace_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HSSIZE_T), INTENT(OUT) :: free_space END FUNCTION h5fget_freespace_c @@ -777,16 +750,15 @@ CONTAINS INTEGER(SIZE_T) :: buflen INTERFACE - INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) & + BIND(C,NAME='h5fget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER(SIZE_T), INTENT(OUT) :: size INTEGER(SIZE_T) :: buflen - CHARACTER(LEN=*), INTENT(OUT) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf END FUNCTION h5fget_name_c END INTERFACE buflen = LEN_TRIM(buf) @@ -819,11 +791,10 @@ CONTAINS ! -1 if fail !***** INTERFACE - INTEGER FUNCTION h5fget_filesize_c(file_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c - !DEC$ENDIF + INTEGER FUNCTION h5fget_filesize_c(file_id, size) & + BIND(C,NAME='h5fget_filesize_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5fget_filesize_c @@ -857,7 +828,6 @@ CONTAINS ! ! 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 @@ -870,8 +840,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - USE H5GLOBAL + IMPORT :: C_PTR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: file_id TYPE(C_PTR) , VALUE :: buf_ptr INTEGER(SIZE_T), INTENT(IN) :: buf_len diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index cfe96ec..887ec17 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -58,18 +58,18 @@ h5zunregister_c (int_f *filter) } /****if* H5Zf/h5zfiletr_avail_c * NAME - * h5zfiletr_avail_c + * h5zfiletr_avail_c * PURPOSE - * Call H5Zfilter_avail to find if filter is available + * Call H5Zfilter_avail to find if filter is available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE @@ -94,17 +94,17 @@ h5zfilter_avail_c ( int_f *filter , int_f *flag ) * NAME * h5zget_filter_info_c * PURPOSE - * Call H5Zget_filter_info to find if filter has its encoder - * and/or its decoder available + * Call H5Zget_filter_info to find if filter has its encoder + * and/or its decoder available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Nat Furrer and James Laird - * Wednesday, June 16, 2004 + * Wednesday, June 16, 2004 * HISTORY * * SOURCE diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index 416488a..ba7692f 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -45,7 +45,7 @@ CONTAINS ! Unregisters specified filetr ! ! INPUTS -! filter - filter; may have one of the following values: +! filter - Filter; may have one of the following values: ! H5Z_FILTER_DEFLATE_F ! H5Z_FILTER_SZIP_F ! H5Z_FILTER_NBIT_F @@ -54,7 +54,7 @@ CONTAINS ! H5Z_FILTER_FLETCHER32_F ! ! OUTPUTS -! hdferr - error code +! hdferr - Error code ! Success: 0 ! Failure: -1 ! @@ -84,11 +84,17 @@ CONTAINS ! Queries if filter is available ! ! INPUTS -! filter - filter +! filter - Filter; may be one of the following: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F ! OUTPUTS -! status - status; .TRUE. if filter is available, +! status - Flag; .TRUE. if filter is available, ! .FALSE. otherwise -! hdferr: - error code +! hdferr: - Error code ! Success: 0 ! Failure: -1 ! @@ -99,17 +105,9 @@ CONTAINS ! SOURCE SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter - ! is availble not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(IN) :: filter + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: flag ! "TRUE/FALSE/ERROR from C" @@ -136,13 +134,20 @@ CONTAINS ! available ! ! INPUTS -! filter - filter +! filter - Filter; may be one of the following: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_Ffilter ! OUTPUTS -! config_flags - Bit vector possibly containing the +! config_flags - Flag, indicates if filter has its encoder +! and/or decoder available, possibly containing the ! following values: ! H5Z_FILTER_ENCODE_ENABLED_F ! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - error code +! hdferr: - Error code ! Success: 0 ! Failure: -1 ! @@ -152,17 +157,9 @@ CONTAINS ! SOURCE SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter - ! has its encoder and/or decoder - ! available - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.F90 b/fortran/src/H5_DBLE_InterfaceInclude.F90 index 11e0a85..44e8d48 100644 --- a/fortran/src/H5_DBLE_InterfaceInclude.F90 +++ b/fortran/src/H5_DBLE_InterfaceInclude.F90 @@ -655,11 +655,9 @@ CONTAINS INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_s_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -703,19 +701,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_1_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -760,19 +752,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_2_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -825,11 +811,9 @@ CONTAINS INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_3_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -874,19 +858,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_4_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -931,19 +909,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_5_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -989,19 +961,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_6_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1055,11 +1021,9 @@ CONTAINS INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_7_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1110,11 +1074,9 @@ CONTAINS INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_s_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1166,11 +1128,9 @@ CONTAINS INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_1_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1215,19 +1175,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_2_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1239,7 +1193,6 @@ CONTAINS END FUNCTION h5dread_double_2_c END INTERFACE - xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F @@ -1273,18 +1226,13 @@ CONTAINS INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - ! INTEGER, EXTERNAL :: h5dread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_3_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1330,19 +1278,13 @@ CONTAINS INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_4_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1388,18 +1330,13 @@ CONTAINS INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - ! INTEGER, EXTERNAL :: h5dread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_5_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1446,18 +1383,13 @@ CONTAINS INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - ! INTEGER, EXTERNAL :: h5dread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_6_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1504,18 +1436,13 @@ CONTAINS INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - ! INTEGER, EXTERNAL :: h5dread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & mem_space_id_default, & file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c - !DEC$ENDIF + xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_7_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HID_T) :: mem_space_id_default @@ -1574,16 +1501,11 @@ CONTAINS INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - ! INTEGER, EXTERNAL :: h5dfill_double_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c - !DEC$ENDIF + buf, mem_type_id) BIND(C,NAME='h5dfill_double_c') + IMPORT :: HID_T + IMPLICIT NONE DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 6cb35c0..ac368d1 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -942,7 +942,9 @@ MODULE H5GLOBAL CONTAINS - SUBROUTINE C2F_string(c_string, f_string) + ! Copy a c string to a Fortran string + + SUBROUTINE H5_Fortran_string_c2f(c_string, f_string) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -966,7 +968,68 @@ CONTAINS f_string(1:c_len) = c_string(1:c_len) f_string(c_len+1:f_len) =' ' ENDIF - END SUBROUTINE C2F_string + END SUBROUTINE H5_Fortran_string_c2f + + SUBROUTINE H5_Fortran_string_f2c(f_string, c_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: f_string + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(OUT) :: c_string + INTEGER(SIZE_T) :: c_len, f_len + + c_string = TRIM(f_string)//C_NULL_CHAR + + END SUBROUTINE H5_Fortran_string_f2c + + +! Copy Fortran string to C charater array, assuming the C array is one-char +! longer for the terminating null char. +! fstring : the Fortran input string +! cstring : the C output string (with memory already allocated) +!!$subroutine MPIR_Fortran_string_f2c(fstring, cstring) +!!$ implicit none +!!$ character(len=*), intent(in) :: fstring +!!$ character(kind=c_char), intent(out) :: cstring(:) +!!$ integer :: i, j +!!$ logical :: met_non_blank +!!$ +!!$ ! Trim the leading and trailing blank characters +!!$ j = 1 +!!$ met_non_blank = .false. +!!$ do i = 1, len_trim(fstring) +!!$ if (met_non_blank) then +!!$ cstring(j) = fstring(i:i) +!!$ j = j + 1 +!!$ else if (fstring(i:i) /= ' ') then +!!$ met_non_blank = .true. +!!$ cstring(j) = fstring(i:i) +!!$ j = j + 1 +!!$ end if +!!$ end do +!!$ +!!$ cstring(j) = C_NULL_CHAR +!!$end subroutine MPIR_Fortran_string_f2c +!!$ +!!$! Copy C charater array to Fortran string +!!$subroutine MPIR_Fortran_string_c2f(cstring, fstring) +!!$ implicit none +!!$ character(kind=c_char), intent(in) :: cstring(:) +!!$ character(len=*), intent(out) :: fstring +!!$ integer :: i, j, length +!!$ +!!$ i = 1 +!!$ do while (cstring(i) /= C_NULL_CHAR) +!!$ fstring(i:i) = cstring(i) +!!$ i = i + 1 +!!$ end do +!!$ +!!$ ! Zero out the trailing characters +!!$ length = len(fstring) +!!$ do j = i, length +!!$ fstring(j:j) = ' ' +!!$ end do +!!$end subroutine MPIR_Fortran_string_c2f END MODULE H5GLOBAL diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 04462cd..a7d0136 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -80,38 +80,22 @@ typedef struct H5O_info_t_f { /* * Functions from H5Ff.c */ -#define nh5fcreate_c H5_FC_FUNC_(h5fcreate_c, H5FCREATE_C) -#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C) -#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C) -#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C) -#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C) -#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C) -#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C) -#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C) -#define nh5fget_create_plist_c H5_FC_FUNC_(h5fget_create_plist_c, H5FGET_CREATE_PLIST_C) -#define nh5fget_access_plist_c H5_FC_FUNC_(h5fget_access_plist_c, H5FGET_ACCESS_PLIST_C) -#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_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C) -#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C) - -H5_FCDLL int_f nh5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag); -H5_FCDLL int_f nh5fclose_c (hid_t_f *file_id); -H5_FCDLL int_f nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); -H5_FCDLL int_f nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen); -H5_FCDLL int_f nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2); -H5_FCDLL int_f nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id); -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 h5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag); +H5_FCDLL int_f h5fclose_c (hid_t_f *file_id); +H5_FCDLL int_f h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); +H5_FCDLL int_f h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen); +H5_FCDLL int_f h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2); +H5_FCDLL int_f h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id); +H5_FCDLL int_f h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id); +H5_FCDLL int_f h5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count); +H5_FCDLL int_f h5fget_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 h5fget_freespace_c (hid_t_f *file_id, hssize_t_f *free_space); H5_FCDLL int_f h5fget_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); +H5_FCDLL int_f h5fflush_c (hid_t_f *obj_id, int_f *scope); +H5_FCDLL int_f h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen); +H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size); /* * Functions from H5Sf.c @@ -185,214 +169,117 @@ H5_FCDLL int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid /* * Functions from H5Df.c */ -#define nh5dcreate_c H5_FC_FUNC_(h5dcreate_c, H5DCREATE_C) -#define nh5dclose_c H5_FC_FUNC_(h5dclose_c, H5DCLOSE_C) -#define nh5dopen_c H5_FC_FUNC_(h5dopen_c, H5DOPEN_C) -#define nh5dwrite_c H5_FC_FUNC_(h5dwrite_c, H5DWRITE_C) -#define nh5dwrite_integer_s_c H5_FC_FUNC_(h5dwrite_integer_s_c, H5DWRITE_INTEGER_S_C) -#define nh5dwrite_integer_1_c H5_FC_FUNC_(h5dwrite_integer_1_c, H5DWRITE_INTEGER_1_C) -#define nh5dwrite_integer_2_c H5_FC_FUNC_(h5dwrite_integer_2_c, H5DWRITE_INTEGER_2_C) -#define nh5dwrite_integer_3_c H5_FC_FUNC_(h5dwrite_integer_3_c, H5DWRITE_INTEGER_3_C) -#define nh5dwrite_integer_4_c H5_FC_FUNC_(h5dwrite_integer_4_c, H5DWRITE_INTEGER_4_C) -#define nh5dwrite_integer_5_c H5_FC_FUNC_(h5dwrite_integer_5_c, H5DWRITE_INTEGER_5_C) -#define nh5dwrite_integer_6_c H5_FC_FUNC_(h5dwrite_integer_6_c, H5DWRITE_INTEGER_6_C) -#define nh5dwrite_integer_7_c H5_FC_FUNC_(h5dwrite_integer_7_c, H5DWRITE_INTEGER_7_C) -#define nh5dwrite_real_s_c H5_FC_FUNC_(h5dwrite_real_s_c, H5DWRITE_REAL_S_C) -#define nh5dwrite_real_1_c H5_FC_FUNC_(h5dwrite_real_1_c, H5DWRITE_REAL_1_C) -#define nh5dwrite_real_2_c H5_FC_FUNC_(h5dwrite_real_2_c, H5DWRITE_REAL_2_C) -#define nh5dwrite_real_3_c H5_FC_FUNC_(h5dwrite_real_3_c, H5DWRITE_REAL_3_C) -#define nh5dwrite_real_4_c H5_FC_FUNC_(h5dwrite_real_4_c, H5DWRITE_REAL_4_C) -#define nh5dwrite_real_5_c H5_FC_FUNC_(h5dwrite_real_5_c, H5DWRITE_REAL_5_C) -#define nh5dwrite_real_6_c H5_FC_FUNC_(h5dwrite_real_6_c, H5DWRITE_REAL_6_C) -#define nh5dwrite_real_7_c H5_FC_FUNC_(h5dwrite_real_7_c, H5DWRITE_REAL_7_C) -#define nh5dwrite_double_s_c H5_FC_FUNC_(h5dwrite_double_s_c, H5DWRITE_DOUBLE_S_C) -#define nh5dwrite_double_1_c H5_FC_FUNC_(h5dwrite_double_1_c, H5DWRITE_DOUBLE_1_C) -#define nh5dwrite_double_2_c H5_FC_FUNC_(h5dwrite_double_2_c, H5DWRITE_DOUBLE_2_C) -#define nh5dwrite_double_3_c H5_FC_FUNC_(h5dwrite_double_3_c, H5DWRITE_DOUBLE_3_C) -#define nh5dwrite_double_4_c H5_FC_FUNC_(h5dwrite_double_4_c, H5DWRITE_DOUBLE_4_C) -#define nh5dwrite_double_5_c H5_FC_FUNC_(h5dwrite_double_5_c, H5DWRITE_DOUBLE_5_C) -#define nh5dwrite_double_6_c H5_FC_FUNC_(h5dwrite_double_6_c, H5DWRITE_DOUBLE_6_C) -#define nh5dwrite_double_7_c H5_FC_FUNC_(h5dwrite_double_7_c, H5DWRITE_DOUBLE_7_C) -#define nh5dwrite_ref_obj_c H5_FC_FUNC_(h5dwrite_ref_obj_c, H5DWRITE_REF_OBJ_C) -#define nh5dwrite_ref_reg_c H5_FC_FUNC_(h5dwrite_ref_reg_c, H5DWRITE_REF_REG_C) -#define nh5dwritec_c H5_FC_FUNC_(h5dwritec_c, H5DWRITEC_C) -#define nh5dwritec_s_c H5_FC_FUNC_(h5dwritec_s_c, H5DWRITEC_S_C) -#define nh5dwritec_1_c H5_FC_FUNC_(h5dwritec_1_c, H5DWRITEC_1_C) -#define nh5dwritec_2_c H5_FC_FUNC_(h5dwritec_2_c, H5DWRITEC_2_C) -#define nh5dwritec_3_c H5_FC_FUNC_(h5dwritec_3_c, H5DWRITEC_3_C) -#define nh5dwritec_4_c H5_FC_FUNC_(h5dwritec_4_c, H5DWRITEC_4_C) -#define nh5dwritec_5_c H5_FC_FUNC_(h5dwritec_5_c, H5DWRITEC_5_C) -#define nh5dwritec_6_c H5_FC_FUNC_(h5dwritec_6_c, H5DWRITEC_6_C) -#define nh5dwritec_7_c H5_FC_FUNC_(h5dwritec_7_c, H5DWRITEC_7_C) -#define nh5dread_c H5_FC_FUNC_(h5dread_c, H5DREAD_C) -#define nh5dread_integer_s_c H5_FC_FUNC_(h5dread_integer_s_c, H5DREAD_INTEGER_S_C) -#define nh5dread_integer_1_c H5_FC_FUNC_(h5dread_integer_1_c, H5DREAD_INTEGER_1_C) -#define nh5dread_integer_2_c H5_FC_FUNC_(h5dread_integer_2_c, H5DREAD_INTEGER_2_C) -#define nh5dread_integer_3_c H5_FC_FUNC_(h5dread_integer_3_c, H5DREAD_INTEGER_3_C) -#define nh5dread_integer_4_c H5_FC_FUNC_(h5dread_integer_4_c, H5DREAD_INTEGER_4_C) -#define nh5dread_integer_5_c H5_FC_FUNC_(h5dread_integer_5_c, H5DREAD_INTEGER_5_C) -#define nh5dread_integer_6_c H5_FC_FUNC_(h5dread_integer_6_c, H5DREAD_INTEGER_6_C) -#define nh5dread_integer_7_c H5_FC_FUNC_(h5dread_integer_7_c, H5DREAD_INTEGER_7_C) -#define nh5dread_real_s_c H5_FC_FUNC_(h5dread_real_s_c, H5DREAD_REAL_S_C) -#define nh5dread_real_1_c H5_FC_FUNC_(h5dread_real_1_c, H5DREAD_REAL_1_C) -#define nh5dread_real_2_c H5_FC_FUNC_(h5dread_real_2_c, H5DREAD_REAL_2_C) -#define nh5dread_real_3_c H5_FC_FUNC_(h5dread_real_3_c, H5DREAD_REAL_3_C) -#define nh5dread_real_4_c H5_FC_FUNC_(h5dread_real_4_c, H5DREAD_REAL_4_C) -#define nh5dread_real_5_c H5_FC_FUNC_(h5dread_real_5_c, H5DREAD_REAL_5_C) -#define nh5dread_real_6_c H5_FC_FUNC_(h5dread_real_6_c, H5DREAD_REAL_6_C) -#define nh5dread_real_7_c H5_FC_FUNC_(h5dread_real_7_c, H5DREAD_REAL_7_C) -#define nh5dread_double_s_c H5_FC_FUNC_(h5dread_double_s_c, H5DREAD_DOUBLE_S_C) -#define nh5dread_double_1_c H5_FC_FUNC_(h5dread_double_1_c, H5DREAD_DOUBLE_1_C) -#define nh5dread_double_2_c H5_FC_FUNC_(h5dread_double_2_c, H5DREAD_DOUBLE_2_C) -#define nh5dread_double_3_c H5_FC_FUNC_(h5dread_double_3_c, H5DREAD_DOUBLE_3_C) -#define nh5dread_double_4_c H5_FC_FUNC_(h5dread_double_4_c, H5DREAD_DOUBLE_4_C) -#define nh5dread_double_5_c H5_FC_FUNC_(h5dread_double_5_c, H5DREAD_DOUBLE_5_C) -#define nh5dread_double_6_c H5_FC_FUNC_(h5dread_double_6_c, H5DREAD_DOUBLE_6_C) -#define nh5dread_double_7_c H5_FC_FUNC_(h5dread_double_7_c, H5DREAD_DOUBLE_7_C) -#define nh5dread_c_b H5_FC_FUNC_(h5dread_c_b, H5DREAD_C_B) -#define nh5dread_ref_reg_c H5_FC_FUNC_(h5dread_ref_reg_c, H5DREAD_REF_REG_C) -#define nh5dread_ref_obj_c H5_FC_FUNC_(h5dread_ref_obj_c, H5DREAD_REF_OBJ_C) -#define nh5dreadc_c H5_FC_FUNC_(h5dreadc_c, H5DREADC_C) -#define nh5dreadc_s_c H5_FC_FUNC_(h5dreadc_s_c, H5DREADC_S_C) -#define nh5dreadc_1_c H5_FC_FUNC_(h5dreadc_1_c, H5DREADC_1_C) -#define nh5dreadc_2_c H5_FC_FUNC_(h5dreadc_2_c, H5DREADC_2_C) -#define nh5dreadc_3_c H5_FC_FUNC_(h5dreadc_3_c, H5DREADC_3_C) -#define nh5dreadc_4_c H5_FC_FUNC_(h5dreadc_4_c, H5DREADC_4_C) -#define nh5dreadc_5_c H5_FC_FUNC_(h5dreadc_5_c, H5DREADC_5_C) -#define nh5dreadc_6_c H5_FC_FUNC_(h5dreadc_6_c, H5DREADC_6_C) -#define nh5dreadc_7_c H5_FC_FUNC_(h5dreadc_7_c, H5DREADC_7_C) -#define nh5dreadc_c_b H5_FC_FUNC_(h5dreadc_c_b, H5DREADC_C_B) -#define nh5dget_space_c H5_FC_FUNC_(h5dget_space_c, H5DGET_SPACE_C) -#define nh5dget_type_c H5_FC_FUNC_(h5dget_type_c, H5DGET_TYPE_C) -#define nh5dget_create_plist_c H5_FC_FUNC_(h5dget_create_plist_c, H5DGET_CREATE_PLIST_C) -#define nh5dset_extent_c H5_FC_FUNC_(h5dset_extent_c, H5DSET_EXTENT_C) -#define nh5dget_storage_size_c H5_FC_FUNC_(h5dget_storage_size_c, H5DGET_STORAGE_SIZE_C) -#define nh5dvlen_get_max_len_c H5_FC_FUNC_(h5dvlen_get_max_len_c, H5DVLEN_GET_MAX_LEN_C) -#define nh5dwrite_vl_integer_c H5_FC_FUNC_(h5dwrite_vl_integer_c, H5DWRITE_VL_INTEGER_C) -#define nh5dread_vl_integer_c H5_FC_FUNC_(h5dread_vl_integer_c, H5DREAD_VL_INTEGER_C) -#define nh5dwrite_vl_real_c H5_FC_FUNC_(h5dwrite_vl_real_c, H5DWRITE_VL_REAL_C) -#define nh5dread_vl_real_c H5_FC_FUNC_(h5dread_vl_real_c, H5DREAD_VL_REAL_C) -#define nh5dwrite_vl_string_c H5_FC_FUNC_(h5dwrite_vl_string_c, H5DWRITE_VL_STRING_C) -#define nh5dread_vl_string_c H5_FC_FUNC_(h5dread_vl_string_c, H5DREAD_VL_STRING_C) -#define nh5dfillc_c H5_FC_FUNC_(h5dfillc_c, H5DFILLC_C) -#define nh5dfill_integer_c H5_FC_FUNC_(h5dfill_integer_c, H5DFILL_INTEGER_C) -#define nh5dfill_real_c H5_FC_FUNC_(h5dfill_real_c, H5DFILL_REAL_C) -#define nh5dfill_double_c H5_FC_FUNC_(h5dfill_double_c, H5DFILL_DOUBLE_C) -#define nh5dget_space_status_c H5_FC_FUNC_(h5dget_space_status_c, H5DGET_SPACE_STATUS_C) -#define nh5dcreate_anon_c H5_FC_FUNC_(h5dcreate_anon_c, H5DCREATE_ANON_C) -#define nh5dget_access_plist_c H5_FC_FUNC_(h5dget_access_plist_c, H5DGET_ACCESS_PLIST_C) - -H5_FCDLL int_f nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f nh5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f nh5dclose_c ( hid_t_f *dset_id ); -H5_FCDLL int_f nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); +H5_FCDLL int_f h5dclose_c ( hid_t_f *dset_id ); +H5_FCDLL int_f h5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); +H5_FCDLL int_f h5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); -H5_FCDLL int_f nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); -H5_FCDLL int_f nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); -H5_FCDLL int_f nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); -H5_FCDLL int_f nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); -H5_FCDLL int_f nh5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); -H5_FCDLL int_f nh5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); -H5_FCDLL int_f nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id); +H5_FCDLL int_f h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); +H5_FCDLL int_f h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); +H5_FCDLL int_f h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); +H5_FCDLL int_f h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); +H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); +H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); +H5_FCDLL int_f h5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id); H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); -H5_FCDLL int_f nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f h5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f h5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); +H5_FCDLL int_f h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); @@ -1188,21 +1075,14 @@ H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); /* * Functions from H5Ef.c */ -#define nh5eclear_c H5_FC_FUNC_(h5eclear_c, H5ECLEAR_C) -#define nh5eprint_c1 H5_FC_FUNC_(h5eprint_c1, H5EPRINT_C1) -#define nh5eprint_c2 H5_FC_FUNC_(h5eprint_c2, H5EPRINT_C2) -#define nh5eget_major_c H5_FC_FUNC_(h5eget_major_c, H5EGET_MAJOR_C) -#define nh5eget_minor_c H5_FC_FUNC_(h5eget_minor_c, H5EGET_MINOR_C) -#define nh5eset_auto_c H5_FC_FUNC_(h5eset_auto_c, H5ESET_AUTO_C) #define nprocess_buffer H5_FC_FUNC_(process_buffer, PROCESS_BUFFER) - -H5_FCDLL int_f nh5eclear_c(hid_t_f *estack_id); -H5_FCDLL int_f nh5eprint_c1(_fcd name, int_f* namelen); -H5_FCDLL int_f nh5eprint_c2(void); -H5_FCDLL int_f nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5eset_auto_c(int_f* printflag); +H5_FCDLL int_f h5eclear_c(hid_t_f *estack_id); +H5_FCDLL int_f h5eprint_c1(_fcd name, int_f* namelen); +H5_FCDLL int_f h5eprint_c2(void); +H5_FCDLL int_f h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); +H5_FCDLL int_f h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); +H5_FCDLL int_f h5eset_auto_c(int_f* printflag); H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data); H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer); diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index 6309d2f..a2c8d1c 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -44,4 +44,8 @@ MODULE HDF5 USE H5Z USE H5_DBLE_INTERFACE USE H5LIB +#ifdef H5_HAVE_PARALLEL + USE H5FDMPIO +#endif + END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.F90 b/fortran/src/HDF5mpio.F90 deleted file mode 100644 index b8fb645..0000000 --- a/fortran/src/HDF5mpio.F90 +++ /dev/null @@ -1,55 +0,0 @@ -!****h* ROBODoc/HDF5 (mpio) -! -! NAME -! HDF5 -! -! PURPOSE -! This is the main module used for linking to the Fortran parallel HDF library. -! This file replaces HDF5.f90 when compiling the parallel library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5F_PROVISIONAL - USE H5G - USE H5E - USE H5E_PROVISIONAL - USE H5I - USE H5L - USE H5L_PROVISIONAL - USE H5S - USE H5D - USE H5D_PROVISIONAL - USE H5A - USE H5A_PROVISIONAL - USE H5T - USE H5T_PROVISIONAL - USE H5O - USE H5O_PROVISIONAL - USE H5P - USE H5P_PROVISIONAL - USE H5FDMPIO - USE H5R - USE H5R_PROVISIONAL - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 7e008d7..c52ad8e 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,9 +42,9 @@ else AM_LDFLAGS+=-static endif -# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled if BUILD_PARALLEL_CONDITIONAL - PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 + PARALLEL_COND_SRC = H5FDmpiof.c HDF5.F90 H5FDmpioff.F90 else PARALLEL_COND_SRC = HDF5.F90 endif @@ -219,13 +219,13 @@ HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ - H5Aff.lo \ - H5Dff.lo \ - H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ - H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo +#HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ +# H5Aff.lo \ +# H5Dff.lo \ +# H5Eff.lo \ +# H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ +# H5Off.lo H5Pff.lo H5Rff.lo \ +# H5Sff.lo H5Tff.lo H5Zff.lo \ +# H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index ffcaf62..91f5e72 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -156,10 +156,10 @@ am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.F90 \ H5Rff.F90 H5Sff.F90 H5Tff.F90 H5Zff.F90 \ H5_DBLE_Interface$(F_DBLE).F90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c HDF5.F90 H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 + H5Tf.c H5Zf.c HDF5.F90 H5FDmpiof.c 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 +@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo HDF5.lo \ +@BUILD_PARALLEL_CONDITIONAL_TRUE@ H5FDmpioff.lo am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ @@ -730,8 +730,8 @@ lib_LTLIBRARIES = libhdf5_fortran.la libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) @BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.F90 -# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled +@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5.F90 H5FDmpioff.F90 @FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 # Check if the compiler supports the Fortran 2003 standard @@ -1442,14 +1442,6 @@ HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ - H5Aff.lo \ - H5Dff.lo \ - H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ - H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. @@ -1645,6 +1637,14 @@ check-vfd: $(LIB) $(PROGS) $(chk_TESTS) HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done +#HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ +# H5Aff.lo \ +# H5Dff.lo \ +# H5Eff.lo \ +# H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ +# H5Off.lo H5Pff.lo H5Rff.lo \ +# H5Sff.lo H5Tff.lo H5Zff.lo \ +# H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- cgit v0.12 From 0cc9b0c79f9cc2df7d6101896effc53ca70c637a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Apr 2015 13:36:34 -0500 Subject: [svn-r26825] Added include for preprocessing fortran files with configure definitions --- MANIFEST | 1 + Makefile.in | 3 +- c++/Makefile.in | 3 +- c++/examples/Makefile.in | 3 +- c++/src/Makefile.in | 5 ++-- c++/test/Makefile.in | 5 ++-- configure | 9 ++++++ configure.ac | 7 +++++ examples/Makefile.in | 3 +- fortran/Makefile.in | 3 +- fortran/examples/Makefile.in | 3 +- fortran/src/H5Aff.F90 | 61 +++++++++++++++-------------------------- fortran/src/H5Dff.F90 | 43 +++++++++++++++++++++++++++-- fortran/src/H5config_f.inc.in | 4 +++ fortran/src/HDF5.F90 | 2 ++ fortran/src/Makefile.in | 44 ++++++++++++++++++----------- fortran/test/Makefile.in | 5 ++-- fortran/testpar/Makefile.in | 5 ++-- hl/Makefile.in | 3 +- hl/c++/Makefile.in | 3 +- hl/c++/examples/Makefile.in | 3 +- hl/c++/src/Makefile.in | 5 ++-- hl/c++/test/Makefile.in | 5 ++-- hl/examples/Makefile.in | 3 +- hl/fortran/Makefile.in | 3 +- hl/fortran/examples/Makefile.in | 3 +- hl/fortran/src/Makefile.in | 5 ++-- hl/fortran/test/Makefile.in | 5 ++-- hl/src/Makefile.in | 5 ++-- hl/test/Makefile.in | 5 ++-- hl/tools/Makefile.in | 3 +- hl/tools/gif2h5/Makefile.in | 5 ++-- src/Makefile.in | 4 +-- test/Makefile.in | 5 ++-- testpar/Makefile.in | 5 ++-- tools/Makefile.in | 3 +- tools/h5copy/Makefile.in | 5 ++-- tools/h5diff/Makefile.in | 5 ++-- tools/h5dump/Makefile.in | 5 ++-- tools/h5import/Makefile.in | 5 ++-- tools/h5jam/Makefile.in | 5 ++-- tools/h5ls/Makefile.in | 5 ++-- tools/h5repack/Makefile.in | 5 ++-- tools/h5stat/Makefile.in | 5 ++-- tools/lib/Makefile.in | 5 ++-- tools/misc/Makefile.in | 5 ++-- tools/perform/Makefile.in | 5 ++-- 47 files changed, 216 insertions(+), 121 deletions(-) create mode 100644 fortran/src/H5config_f.inc.in diff --git a/MANIFEST b/MANIFEST index f097bbc..db9be2c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -312,6 +312,7 @@ ./fortran/src/H5test_kind_STORAGE_SIZE.F90 ./fortran/src/H5match_types.c ./fortran/src/HDF5.F90 +./fortran/src/H5config_f.inc.in ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README diff --git a/Makefile.in b/Makefile.in index edee230..73000af 100644 --- a/Makefile.in +++ b/Makefile.in @@ -128,7 +128,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/c++/Makefile.in b/c++/Makefile.in index c964e95..1ada163 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index c8d6b18..0c09aa8 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-c++-ex.sh testh5c++.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 3afedda..a16360b 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5c++ CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -174,7 +175,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 8711eef..edaaa34 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = testhdf5$(EXEEXT) @@ -136,7 +137,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/configure b/configure index cc937fa..6de2d2f 100755 --- a/configure +++ b/configure @@ -5165,6 +5165,13 @@ fi if test "X$HDF_FORTRAN" = "Xyes"; then +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" + + HDF_FORTRAN=yes @@ -31338,6 +31345,7 @@ do "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "fortran/src/H5config_f.inc") CONFIG_HEADERS="$CONFIG_HEADERS fortran/src/H5config_f.inc" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -32120,6 +32128,7 @@ $as_echo X"$file" | done } ;; + "fortran/src/H5config_f.inc":H) sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/configure.ac b/configure.ac index 9fd3817..9555d37 100644 --- a/configure.ac +++ b/configure.ac @@ -389,6 +389,13 @@ fi if test "X$HDF_FORTRAN" = "Xyes"; then +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + AC_CONFIG_HEADERS([fortran/src/H5config_f.inc], + [sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc]) + AC_SUBST([FC]) HDF_FORTRAN=yes AC_SUBST([HAVE_FORTRAN_2003]) diff --git a/examples/Makefile.in b/examples/Makefile.in index 5d76be3..deadf9a 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-c-ex.sh testh5cc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 55ede05..ee7caa5 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index dd2fb46..80abc16 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -120,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-fortran-ex.sh testh5fc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index ccafeb7..007eff0 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -66,6 +66,7 @@ MODULE H5A + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR USE H5GLOBAL INTERFACE h5awrite_f @@ -190,8 +191,6 @@ CONTAINS ! SOURCE SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & hdferr, acpl_id, aapl_id ) - USE H5GLOBAL - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name @@ -210,7 +209,8 @@ CONTAINS INTERFACE INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') - IMPORT :: C_CHAR, HID_T + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN), VALUE :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(HID_T), INTENT(IN), VALUE :: type_id @@ -262,7 +262,6 @@ CONTAINS ! ! SOURCE SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name @@ -273,8 +272,8 @@ CONTAINS INTERFACE INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') - USE H5GLOBAL IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN), VALUE :: obj_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name END FUNCTION H5Aopen_name @@ -315,7 +314,6 @@ CONTAINS ! ! SOURCE SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier INTEGER, INTENT(IN) :: index ! Attribute index @@ -325,8 +323,8 @@ CONTAINS INTERFACE INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T + IMPORT :: C_INT INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER(C_INT), INTENT(IN) :: index END FUNCTION H5Aopen_idx @@ -458,7 +456,6 @@ CONTAINS ! ! SOURCE SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(SIZE_T), INTENT(IN) :: size @@ -781,7 +778,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') - USE H5GLOBAL + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aclose END INTERFACE @@ -817,8 +814,7 @@ CONTAINS INTERFACE INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, HSIZE_T INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_storage_size END INTERFACE @@ -859,7 +855,7 @@ CONTAINS !***** INTERFACE INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') - USE H5GLOBAL + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_create_plist END INTERFACE @@ -915,8 +911,7 @@ CONTAINS INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c !DEC$ENDIF @@ -987,8 +982,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c !DEC$ENDIF @@ -1073,8 +1067,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T, HSIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c !DEC$ENDIF @@ -1136,8 +1129,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c !DEC$ENDIF @@ -1217,8 +1209,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T, HSIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c !DEC$ENDIF @@ -1286,8 +1277,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, HSIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c !DEC$ENDIF @@ -1372,8 +1362,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T, HSIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c !DEC$ENDIF @@ -1458,8 +1447,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T, HSIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c !DEC$ENDIF @@ -1545,8 +1533,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c !DEC$ENDIF @@ -1616,8 +1603,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c !DEC$ENDIF @@ -1682,8 +1668,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c !DEC$ENDIF @@ -1757,8 +1742,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c !DEC$ENDIF @@ -1828,8 +1812,7 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Arename_c(loc_id, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T, SIZE_T !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c !DEC$ENDIF diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index b70c091..3a0d149 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -293,8 +293,6 @@ CONTAINS INTEGER :: namelen ! Name length -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) & @@ -1101,6 +1099,47 @@ CONTAINS END SUBROUTINE h5dread_vl_string ! +!****s* H5D/h5dget_offset_f +! +! NAME +! h5dget_offset_f +! +! PURPOSE +! Returns dataset address in file. +! +! INPUTS +! dataset_id - Dataset identifier. +! OUTPUTS +! offset - The offset in bytes. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! April 16, 2015 +! +! SOURCE + SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER(HADDR_T) FUNCTION h5dget_offset(dset_id) BIND(C,NAME='H5Dget_offset') + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN), VALUE :: dset_id + END FUNCTION h5dget_offset + END INTERFACE + + offset = h5dget_offset(dset_id) + + hdferr = 0 + IF(offset .LT. 0) hdferr = -1 + + END SUBROUTINE h5dget_offset_f + +! !****s* H5D/h5dget_space_f ! ! NAME diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in new file mode 100644 index 0000000..aec8b08 --- /dev/null +++ b/fortran/src/H5config_f.inc.in @@ -0,0 +1,4 @@ +! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure + +! Define if we have parallel support +#undef HAVE_PARALLEL diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index a2c8d1c..ac28ed3 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -27,6 +27,8 @@ ! !***** +#include "H5config_f.inc" + MODULE HDF5 USE H5GLOBAL USE H5F diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 91f5e72..1608926 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -99,9 +99,9 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/lt_vers.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ - $(srcdir)/h5fc.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver README + $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \ + $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \ + $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver README # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, @@ -117,7 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc CONFIG_CLEAN_FILES = h5fc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -251,7 +251,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)H5config_f.inc.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -812,7 +813,7 @@ TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: $(BUILT_SOURCES) +all: $(BUILT_SOURCES) H5config_f.inc $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: @@ -848,6 +849,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + +H5config_f.inc: stamp-h2 + @test -f $@ || rm -f stamp-h2 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 + +stamp-h2: $(srcdir)/H5config_f.inc.in $(top_builddir)/config.status + @rm -f stamp-h2 + cd $(top_builddir) && $(SHELL) ./config.status fortran/src/H5config_f.inc + +distclean-hdr: + -rm -f H5config_f.inc stamp-h2 h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -1201,7 +1213,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) H5config_f.inc all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1252,7 +1264,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-local distclean-tags + distclean-hdr distclean-local distclean-tags dvi: dvi-am @@ -1321,14 +1333,14 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + distclean-hdr distclean-libtool distclean-local distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 4ec1ad5..a776c96 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -97,7 +97,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -187,7 +188,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index f16dfff..0663b5b 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -114,7 +114,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = parallel_test$(EXEEXT) @@ -140,7 +141,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) diff --git a/hl/Makefile.in b/hl/Makefile.in index 60c9453..f1463c4 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 278f97b..4fce160 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index a36886c..fe8f142 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlc++-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 1813a3c..b5cad03 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -165,7 +166,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index b7d7d09..fed9c26 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -107,7 +107,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = ptableTest$(EXEEXT) @@ -132,7 +133,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index f0bf099..8def1bb 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlc-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 4651579..0a32f24 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index c8878d5..db18194 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlfortran-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 1989c5a..f719e2f 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -113,7 +113,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -169,7 +170,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 6725d26..74bfdb3 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = tstds$(EXEEXT) tstlite$(EXEEXT) tstimage$(EXEEXT) \ @@ -149,7 +150,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 9b2dcb9..b04b736 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -165,7 +166,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 6fc324b..f8ea4f3 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = test_lite$(EXEEXT) test_image$(EXEEXT) \ @@ -168,7 +169,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 77049d3..6415c3b 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 3da84e1..54b3564 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h52giftest.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -150,7 +151,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/src/Makefile.in b/src/Makefile.in index 8ccc510..e0299b7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -114,7 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = H5config.h +CONFIG_HEADER = H5config.h $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = libhdf5.settings CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -227,7 +227,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/test/Makefile.in b/test/Makefile.in index 8b36650..65f7ef2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -120,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ testlibinfo.sh testlinks_env.sh test_plugin.sh CONFIG_CLEAN_VPATH_FILES = @@ -535,7 +536,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 7787a65..1922204 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = t_mpi$(EXEEXT) testphdf5$(EXEEXT) t_cache$(EXEEXT) \ @@ -166,7 +167,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/Makefile.in b/tools/Makefile.in index 974e6b4..9a9ec89 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index e128cfe..e6e1017 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5copy.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -143,7 +144,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index c95967d..afbf90f 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5diff.sh testph5diff.sh CONFIG_CLEAN_VPATH_FILES = @BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = ph5diff$(EXEEXT) @@ -148,7 +149,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 7371adf..18958a9 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -149,7 +150,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 0778fc2..552ee9f 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5importtestutil.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -143,7 +144,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index ed8151f..06ca74e 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5jam.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -157,7 +158,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index c77784e..81d8b29 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -109,7 +109,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5ls.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -137,7 +138,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 6d1bfd6..e9e7ad5 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -113,7 +113,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5repack.sh h5repack_plugin.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -192,7 +193,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 1bbefe9..a45ccf4 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5stat.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -172,7 +173,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 0b531b3..50dc1b6 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -135,7 +136,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1b8e0eb..2a022f8 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -195,7 +196,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 325bc4d..0fe1012 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -116,7 +116,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -171,7 +172,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -- cgit v0.12 From fa26809cdfd4f463969d49cf0074affe07fea6d3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Apr 2015 14:04:43 -0500 Subject: [svn-r26826] CHANGED H5G APIs to use BIND(C) --- fortran/src/H5Dff.F90 | 4 +- fortran/src/H5Gf.c | 36 +++---- fortran/src/H5Gff.F90 | 241 +++++++++++++++++------------------------------ fortran/src/H5f90proto.h | 57 ++++------- 4 files changed, 126 insertions(+), 212 deletions(-) diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 3a0d149..411a3bf 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -7,9 +7,7 @@ ! fortran/src/H5Dff.f90 ! ! PURPOSE -! This file contains Fortran interfaces for H5D functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. +! This file contains Fortran interfaces for H5D functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 7f755b3..1a6b41b 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -49,7 +49,7 @@ * SOURCE */ int_f -nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, +h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id ) /******/ { @@ -117,7 +117,7 @@ DONE: * SOURCE */ int_f -nh5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) +h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { char *c_name = NULL; @@ -169,7 +169,7 @@ DONE: * SOURCE */ int_f -nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, +h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type) /******/ { @@ -248,7 +248,7 @@ DONE: * SOURCE */ int_f -nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) +h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) /******/ { char *c_name = NULL; @@ -290,7 +290,7 @@ DONE: */ int_f -nh5gclose_c(hid_t_f *grp_id) +h5gclose_c(hid_t_f *grp_id) /******/ { int ret_value = 0; @@ -323,7 +323,7 @@ nh5gclose_c(hid_t_f *grp_id) */ int_f -nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, +h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen) /******/ { @@ -410,7 +410,7 @@ DONE: */ int_f -nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, +h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen) /******/ { @@ -485,7 +485,7 @@ DONE: */ int_f -nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) +h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) /******/ { char *c_name = NULL; @@ -530,7 +530,7 @@ DONE: */ int_f -nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) +h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -582,7 +582,7 @@ DONE: */ int_f -nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) +h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -633,7 +633,7 @@ DONE: */ int_f -nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, +h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value) /******/ { @@ -697,7 +697,7 @@ DONE: * SOURCE */ int_f -nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, +h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen) /******/ { @@ -746,7 +746,7 @@ DONE: * SOURCE */ int_f -nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, +h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment) /******/ { @@ -810,7 +810,7 @@ DONE: * SOURCE */ int_f -nh5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) +h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { @@ -842,7 +842,7 @@ done: * SOURCE */ int_f -nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) +h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -886,7 +886,7 @@ done: * SOURCE */ int_f -nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) +h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ { @@ -950,7 +950,7 @@ done: * SOURCE */ int_f -nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ @@ -1020,7 +1020,7 @@ nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * SOURCE */ int_f -nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted) /******/ { diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index d4d7496..1ca05b8 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -34,16 +34,9 @@ !***** MODULE H5G + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR USE H5GLOBAL -! PRIVATE :: h5gcreate1_f -! PRIVATE :: h5gcreate2_f - -! INTERFACE h5gcreate_f -! MODULE PROCEDURE h5gcreate1_f -! MODULE PROCEDURE h5gcreate2_f -! END INTERFACE - CONTAINS !****s* H5G/h5gcreate_f @@ -108,14 +101,12 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & - size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) & + BIND(C,NAME='h5gcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(SIZE_T) :: size_hint_default INTEGER(HID_T), INTENT(OUT) :: grp_id @@ -176,7 +167,7 @@ CONTAINS !!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & !!$ lcpl_id, gcpl_id, gapl_id) !!$ IMPLICIT NONE -!!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of the group !!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier !!$ INTEGER, INTENT(OUT) :: hdferr ! Error code !!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier @@ -205,7 +196,7 @@ CONTAINS !!$ !DEC$ENDIF !!$ !DEC$ATTRIBUTES reference :: name !!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(LEN=*), INTENT(IN) :: name +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name !!$ INTEGER :: namelen !!$ INTEGER(SIZE_T) :: OBJECT_NAME ! LEN_DEFAULT @@ -278,14 +269,12 @@ CONTAINS INTEGER :: namelen ! Length of the name character string INTERFACE - INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) & + BIND(C,NAME='h5gopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(HID_T), INTENT(IN) :: gapl_id_default INTEGER(HID_T), INTENT(OUT) :: grp_id @@ -328,11 +317,8 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5gclose_c(grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c - !DEC$ENDIF + INTEGER FUNCTION h5gclose_c(grp_id) BIND(C,NAME='h5gclose_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: grp_id END FUNCTION h5gclose_c END INTERFACE @@ -384,18 +370,14 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & namelen, idx, & - obj_name, obj_namelen, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: obj_name + obj_name, obj_namelen, obj_type) BIND(C,NAME='h5gget_obj_info_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER, INTENT(IN) :: idx - CHARACTER(LEN=*), INTENT(OUT) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: obj_name INTEGER :: obj_namelen INTEGER, INTENT(OUT) :: obj_type END FUNCTION h5gget_obj_info_idx_c @@ -444,17 +426,15 @@ CONTAINS INTEGER :: namelen ! Length of the name character string INTERFACE - INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(OUT) :: nmembers - END FUNCTION h5gn_members_c + INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) & + BIND(C,NAME='h5gn_members_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(OUT) :: nmembers + END FUNCTION h5gn_members_c END INTERFACE namelen = LEN(name) @@ -512,19 +492,15 @@ CONTAINS INTERFACE INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: current_name - !DEC$ATTRIBUTES reference :: new_name + current_namelen, new_name, new_namelen) & + BIND(C,NAME='h5glink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: current_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: current_name INTEGER :: current_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name INTEGER :: new_namelen END FUNCTION h5glink_c END INTERFACE @@ -585,19 +561,14 @@ CONTAINS INTERFACE INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & link_type, new_loc_id, & - new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: cur_name - !DEC$ATTRIBUTES reference :: new_name + new_name, new_namelen) BIND(C,NAME='h5glink2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: cur_loc_id INTEGER(HID_T), INTENT(IN) :: new_loc_id INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: cur_name - CHARACTER(LEN=*), INTENT(IN) :: new_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: cur_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name INTEGER :: cur_namelen INTEGER :: new_namelen END FUNCTION h5glink2_c @@ -621,10 +592,10 @@ CONTAINS ! points ! ! INPUTS -! loc_id - location identifier -! name - name of the object to unlink +! loc_id - location identifier +! name - name of the object to unlink ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! Elena Pourmal @@ -645,14 +616,11 @@ CONTAINS INTEGER :: namelen ! Lenghth of the name character string INTERFACE - INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) BIND(C,NAME='h5gunlink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen END FUNCTION h5gunlink_c END INTERFACE @@ -698,17 +666,13 @@ CONTAINS INTEGER :: new_namelen ! Lenghth of the new_name string INTERFACE - INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: new_name + INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) BIND(C,NAME='h5gmove_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name INTEGER :: new_namelen END FUNCTION h5gmove_c END INTERFACE @@ -751,17 +715,13 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & - dst_loc_id, dst_name, dst_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name - !DEC$ATTRIBUTES reference :: dst_name + dst_loc_id, dst_name, dst_namelen) BIND(C,NAME='h5gmove2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: src_loc_id INTEGER(HID_T), INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - CHARACTER(LEN=*), INTENT(IN) :: dst_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name INTEGER :: src_namelen INTEGER :: dst_namelen END FUNCTION h5gmove2_c @@ -815,18 +775,14 @@ CONTAINS INTEGER :: namelen ! Lenghth of the current_name string INTERFACE - INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: buffer + INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_linkval_c') + IMPORT :: C_CHAR, SIZE_T + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer END FUNCTION h5gget_linkval_c END INTERFACE @@ -872,17 +828,13 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & - comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: comment + comment, commentlen) BIND(C,NAME='h5gset_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: comment + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment INTEGER :: commentlen END FUNCTION h5gset_comment_c END INTERFACE @@ -930,17 +882,14 @@ CONTAINS INTEGER :: namelen ! Length of the current_name string INTERFACE - INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, buffer + INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer END FUNCTION h5gget_comment_c END INTERFACE @@ -983,11 +932,9 @@ CONTAINS INTEGER(HID_T) :: gapl_id_default INTERFACE - INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c - !DEC$ENDIF + INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) & + BIND(C,NAME='h5gcreate_anon_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access @@ -1030,11 +977,8 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c - !DEC$ENDIF + INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) BIND(C,NAME='h5gget_create_plist_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: grp_id INTEGER(HID_T), INTENT(OUT) :: gcpl_id END FUNCTION h5gget_create_plist_c @@ -1098,11 +1042,9 @@ CONTAINS INTEGER :: mounted_c INTERFACE - INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c - !DEC$ENDIF + INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) & + BIND(C,NAME='h5gget_info_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: group_id INTEGER, INTENT(OUT) :: storage_type INTEGER, INTENT(OUT) :: nlinks @@ -1189,15 +1131,11 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c - !DEC$ENDIF - - !DEC$ATTRIBUTES reference :: group_name + storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER, INTENT(IN) :: index_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n @@ -1291,14 +1229,11 @@ CONTAINS INTERFACE INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name + storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER(HID_T), INTENT(IN) :: lapl_id_default INTEGER, INTENT(OUT) :: storage_type INTEGER, INTENT(OUT) :: nlinks diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index a7d0136..341985e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -286,50 +286,31 @@ H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *me H5_FCDLL int_f h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); H5_FCDLL int_f h5dvlen_reclaim_c (hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); + /* * Functions from H5Gf.c */ -#define nh5gcreate_c H5_FC_FUNC_(h5gcreate_c, H5GCREATE_C) -#define nh5gclose_c H5_FC_FUNC_(h5gclose_c, H5GCLOSE_C) -#define nh5gopen_c H5_FC_FUNC_(h5gopen_c, H5GOPEN_C) -#define nh5gget_obj_info_idx_c H5_FC_FUNC_(h5gget_obj_info_idx_c, H5GGET_OBJ_INFO_IDX_C) -#define nh5gn_members_c H5_FC_FUNC_(h5gn_members_c, H5GN_MEMBERS_C) -#define nh5glink_c H5_FC_FUNC_(h5glink_c, H5GLINK_C) -#define nh5glink2_c H5_FC_FUNC_(h5glink2_c, H5GLINK2_C) -#define nh5gunlink_c H5_FC_FUNC_(h5gunlink_c, H5GUNLINK_C) -#define nh5gmove_c H5_FC_FUNC_(h5gmove_c, H5GMOVE_C) -#define nh5gmove2_c H5_FC_FUNC_(h5gmove2_c, H5GMOVE2_C) -#define nh5gget_linkval_c H5_FC_FUNC_(h5gget_linkval_c, H5GGET_LINKVAL_C) -#define nh5gset_comment_c H5_FC_FUNC_(h5gset_comment_c, H5GSET_COMMENT_C) -#define nh5gget_comment_c H5_FC_FUNC_(h5gget_comment_c, H5GGET_COMMENT_C) -#define nh5gcreate_anon_c H5_FC_FUNC_(h5gcreate_anon_c, H5GCREATE_ANON_C) -#define nh5gget_create_plist_c H5_FC_FUNC_(h5gget_create_plist_c, H5GGET_CREATE_PLIST_C) -#define nh5gget_info_c H5_FC_FUNC_(h5gget_info_c, H5GGET_INFO_C) -#define nh5gget_info_by_idx_c H5_FC_FUNC_(h5gget_info_by_idx_c, H5GGET_INFO_BY_IDX_C) -#define nh5gget_info_by_name_c H5_FC_FUNC_(h5gget_info_by_name_c, H5GGET_INFO_BY_NAME_C) - - -H5_FCDLL int_f nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, +H5_FCDLL int_f h5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id); -H5_FCDLL int_f nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f nh5gclose_c ( hid_t_f *grp_id ); -H5_FCDLL int_f nh5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); -H5_FCDLL int_f nh5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); -H5_FCDLL int_f nh5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f nh5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f nh5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f nh5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f nh5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f nh5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); -H5_FCDLL int_f nh5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); -H5_FCDLL int_f nh5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); -H5_FCDLL int_f nh5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); -H5_FCDLL int_f nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gclose_c ( hid_t_f *grp_id ); +H5_FCDLL int_f h5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); +H5_FCDLL int_f h5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); +H5_FCDLL int_f h5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f h5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); +H5_FCDLL int_f h5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); +H5_FCDLL int_f h5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); +H5_FCDLL int_f h5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); +H5_FCDLL int_f h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); +H5_FCDLL int_f h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); /* -- cgit v0.12 From bd0aaf89e2464b8ac61906abf08af304dff2c6f3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Apr 2015 15:52:07 -0500 Subject: [svn-r26827] Combined parallel APIs and removed no longer needed parallel files. --- MANIFEST | 2 - fortran/src/CMakeLists.txt | 16 +-- fortran/src/H5FDmpiof.c | 258 --------------------------------------------- fortran/src/H5FDmpioff.F90 | 212 ------------------------------------- fortran/src/H5Pf.c | 240 +++++++++++++++++++++++++++++++++++++++++ fortran/src/H5Pff.F90 | 181 +++++++++++++++++++++++++++++++ fortran/src/HDF5.F90 | 7 -- fortran/src/Makefile.am | 30 +----- fortran/src/Makefile.in | 57 ++++------ 9 files changed, 449 insertions(+), 554 deletions(-) delete mode 100644 fortran/src/H5FDmpiof.c delete mode 100644 fortran/src/H5FDmpioff.F90 diff --git a/MANIFEST b/MANIFEST index db9be2c..1d03f6d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -280,8 +280,6 @@ ./fortran/src/H5Dff.F90 ./fortran/src/H5Ef.c ./fortran/src/H5Eff.F90 -./fortran/src/H5FDmpiof.c -./fortran/src/H5FDmpioff.F90 ./fortran/src/H5Ff.c ./fortran/src/H5Fff.F90 ./fortran/src/H5Gf.c diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 3ee04d8..f2f8ded 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -192,21 +192,11 @@ set (f90_F_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.F90 ) -#----------------------------------------------------------------------------- -# Add H5FDMPIO if parallel -#----------------------------------------------------------------------------- -if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - set (f90_F_SRCS - ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.F90 - ) -else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - set (f90_F_SRCS +set (f90_F_SRCS ${f90_F_SRCS} ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 - ) -endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) +) + set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c deleted file mode 100644 index bbdb170..0000000 --- a/fortran/src/H5FDmpiof.c +++ /dev/null @@ -1,258 +0,0 @@ -/****h* H5FDmpiof/H5FDmpiof - * - * PURPOSE - * This file contains C stubs for Parallel Fortran APIs - * - * 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. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - ****** -*/ - -#include "H5f90.h" -#include -#include "H5public.h" - - -/* Support for C to Fortran translation in MPI */ -#ifndef H5_HAVE_MPI_MULTI_LANG_Comm -#define MPI_Comm_c2f(comm) (int_f)(comm) -#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) -#endif /*MPI Comm*/ -#ifndef H5_HAVE_MPI_MULTI_LANG_Info -#define MPI_Info_c2f(info) (int_f)(info) -#define MPI_Info_f2c(info) (MPI_Info)(info) -#endif /*MPI Info*/ - -/****if* H5FDmpiof/h5pset_fapl_mpio_c - * NAME - * h5pset_fapl_mpio_c - * PURPOSE - * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user - * supplied communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - MPI communicator - * info - MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - c_comm = MPI_Comm_f2c(*comm); - c_info = MPI_Info_f2c(*info); - - /* - * Call H5Pset_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} -/****if* H5FDmpiof/h5pget_fapl_mpio_c - * NAME - * h5pget_fapl_mpio_c - * PURPOSE - * Call H5Pget_fapl_mpio to retrieve communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - buffer to return MPI communicator - * info - buffer to return MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - - /* - * Call H5Pget_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); - if (ret < 0) return ret_value; - *comm = (int_f) MPI_Comm_c2f(c_comm); - *info = (int_f) MPI_Info_c2f(c_info); - ret_value = 0; - return ret_value; -} -/****if* H5FDmpiof/h5pset_dxpl_mpio_c - * NAME - * h5pset_dxpl_mpio_c - * PURPOSE - * Call H5Pset_dxpl_mpio to set transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; -/* - switch (*data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT_F: - c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; - break; - - case H5FD_MPIO_COLLECTIVE_F: - c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; - break; - default: - return ret_value; - } -*/ - c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; - /* - * Call H5Pset_dxpl_mpio function. - */ - c_prp_id = *prp_id; - ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/****if* H5FDmpiof/h5pget_dxpl_mpio_c - * NAME - * h5pget_dxpl_mpio_c - * PURPOSE - * Call H5Pget_dxpl_mpio to get transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - buffer to retrieve transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, June 15, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; - - /* - * Call H5Pget_xfer function. - */ - c_prp_id = *prp_id; - ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); - if (ret < 0) return ret_value; - *data_xfer_mode = (int_f)c_data_xfer_mode; -/* - switch (c_data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT: - *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; - break; - - case H5FD_MPIO_COLLECTIVE: - *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; - break; - - default: - return ret_value; - } -*/ - ret_value = 0; - return ret_value; -} - -/****if* H5Pf/h5pget_mpio_actual_io_mode_c - * NAME - * h5pget_mpio_actual_io_mode_c - * PURPOSE - * Calls H5Pget_mpio_actual_io_mode - * - * INPUTS - * dxpl_id - Dataset transfer property list identifier. - * OUTPUTS - * actual_io_mode - The type of I/O performed by this process. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * July 27, 2012 - * SOURCE -*/ -int_f -nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) -/******/ -{ - int ret_value = -1; - H5D_mpio_actual_io_mode_t c_actual_io_mode; - - /* - * Call H5Pget_mpio_actual_io_mode_f function. - */ - if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) - return ret_value; /* error occurred */ - - *actual_io_mode =(int_f)c_actual_io_mode; - - ret_value = 0; - return ret_value; -} diff --git a/fortran/src/H5FDmpioff.F90 b/fortran/src/H5FDmpioff.F90 deleted file mode 100644 index 50a77d9..0000000 --- a/fortran/src/H5FDmpioff.F90 +++ /dev/null @@ -1,212 +0,0 @@ -!****h* ROBODoc/H5FDMPIO -! -! NAME -! MODULE H5FDMPIO -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions needed by -! parallel MPI programs. -! -! 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 H5P 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 H5FDMPIO - USE H5GLOBAL -CONTAINS - -!****s* H5FDMPIO/h5pset_fapl_mpio_f -! -! NAME -! h5pset_fapl_mpio_f -! -! PURPOSE -! Stores MPI IO communicator information to the file -! access property list. -! -! INPUTS -! prp_id - file access property list identifier -! comm - MPI-2 communicator -! info - MPI-2 info object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_fapl_mpio_c - hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pset_fapl_mpio_f - -!****s* H5FDMPIO/h5pget_fapl_mpio_f -! -! NAME -! h5pget_fapl_mpio_f -! -! PURPOSE -! Returns MPI communicator information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! comm - MPI-2 communicator -! info - MPI-2 info object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_fapl_mpio_c - hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pget_fapl_mpio_f - -!****s* H5FDMPIO/h5pset_dxpl_mpio_f -! -! NAME -! h5pset_dxpl_mpio_f -! -! PURPOSE -! Sets data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! data_xfer_mode - transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c - hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pset_dxpl_mpio_f - -!****s* H5FDMPIO/h5pget_dxpl_mpio_f -! -! NAME -! h5pget_dxpl_mpio_f -! -! PURPOSE -! Returns the data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! OUTPUTS -! data_xfer_mode- transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c - hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pget_dxpl_mpio_f - -!****s* H5P/h5pget_mpio_actual_io_mode_f -! NAME -! h5pget_mpio_actual_io_mode_f -! -! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. -! -! INPUTS -! dxpl_id - Dataset transfer property list identifier. -! OUTPUTS -! actual_io_mode - The type of I/O performed by this process. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 27, 2012 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - END FUNCTION h5pget_mpio_actual_io_mode_c - END INTERFACE - - actual_io_mode = -1 - - hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - - END SUBROUTINE h5pget_mpio_actual_io_mode_f - -END MODULE H5FDMPIO diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index e9082d6..fa25703 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -23,6 +23,23 @@ #include "H5f90.h" #include "H5Eprivate.h" +#include "H5public.h" + +#ifdef H5_HAVE_PARALLEL + +#include +/* Support for C to Fortran translation in MPI */ +#ifndef H5_HAVE_MPI_MULTI_LANG_Comm +#define MPI_Comm_c2f(comm) (int_f)(comm) +#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) +#endif /*MPI Comm*/ + +#ifndef H5_HAVE_MPI_MULTI_LANG_Info +#define MPI_Info_c2f(info) (int_f)(info) +#define MPI_Info_f2c(info) (MPI_Info)(info) +#endif /*MPI Info*/ + +#endif /*H5_HAVE_PARALLEL*/ /****if* H5Pf/h5pcreate_c * NAME @@ -5640,3 +5657,226 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) return ret_value; } + +#ifdef H5_HAVE_PARALLEL + +/****if* H5Pf/h5pset_fapl_mpio_c + * NAME + * h5pset_fapl_mpio_c + * PURPOSE + * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user + * supplied communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + c_comm = MPI_Comm_f2c(*comm); + c_info = MPI_Info_f2c(*info); + + /* + * Call H5Pset_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} +/****if* H5Pf/h5pget_fapl_mpio_c + * NAME + * h5pget_fapl_mpio_c + * PURPOSE + * Call H5Pget_fapl_mpio to retrieve communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - buffer to return MPI communicator + * info - buffer to return MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + + /* + * Call H5Pget_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); + if (ret < 0) return ret_value; + *comm = (int_f) MPI_Comm_c2f(c_comm); + *info = (int_f) MPI_Info_c2f(c_info); + ret_value = 0; + return ret_value; +} +/****if* H5Pf/h5pset_dxpl_mpio_c + * NAME + * h5pset_dxpl_mpio_c + * PURPOSE + * Call H5Pset_dxpl_mpio to set transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; +/* + switch (*data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT_F: + c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; + break; + + case H5FD_MPIO_COLLECTIVE_F: + c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; + break; + default: + return ret_value; + } +*/ + c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; + /* + * Call H5Pset_dxpl_mpio function. + */ + c_prp_id = *prp_id; + ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_dxpl_mpio_c + * NAME + * h5pget_dxpl_mpio_c + * PURPOSE + * Call H5Pget_dxpl_mpio to get transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - buffer to retrieve transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, June 15, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; + + /* + * Call H5Pget_xfer function. + */ + c_prp_id = *prp_id; + ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); + if (ret < 0) return ret_value; + *data_xfer_mode = (int_f)c_data_xfer_mode; +/* + switch (c_data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT: + *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; + break; + + case H5FD_MPIO_COLLECTIVE: + *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; + break; + + default: + return ret_value; + } +*/ + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_mpio_actual_io_mode_c + * NAME + * h5pget_mpio_actual_io_mode_c + * PURPOSE + * Calls H5Pget_mpio_actual_io_mode + * + * INPUTS + * dxpl_id - Dataset transfer property list identifier. + * OUTPUTS + * actual_io_mode - The type of I/O performed by this process. + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * July 27, 2012 + * SOURCE +*/ +int_f +nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) +/******/ +{ + int ret_value = -1; + H5D_mpio_actual_io_mode_t c_actual_io_mode; + + /* + * Call H5Pget_mpio_actual_io_mode_f function. + */ + if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) + return ret_value; /* error occurred */ + + *actual_io_mode =(int_f)c_actual_io_mode; + + ret_value = 0; + return ret_value; +} +#endif /*H5_HAVE_PARALLEL*/ diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 18da887..db51321 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -31,6 +31,8 @@ ! This is needed for Windows based operating systems. !***** +#include "H5config_f.inc" + MODULE H5P USE H5GLOBAL @@ -7618,6 +7620,185 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_file_image_f +! Fortran interfaces for H5P functions needed by parallel MPI programs. + +#ifdef H5_HAVE_PARALLEL + +!****s* H5P/h5pset_fapl_mpio_f +! +! NAME +! h5pset_fapl_mpio_f +! +! PURPOSE +! Stores MPI IO communicator information to the file +! access property list. +! +! INPUTS +! prp_id - file access property list identifier +! comm - MPI-2 communicator +! info - MPI-2 info object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_fapl_mpio_c + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pset_fapl_mpio_f + +!****s* H5P/h5pget_fapl_mpio_f +! +! NAME +! h5pget_fapl_mpio_f +! +! PURPOSE +! Returns MPI communicator information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! comm - MPI-2 communicator +! info - MPI-2 info object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: info ! buffer to return info object + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_fapl_mpio_c + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pget_fapl_mpio_f + +!****s* H5P/h5pset_dxpl_mpio_f +! +! NAME +! h5pset_dxpl_mpio_f +! +! PURPOSE +! Sets data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! data_xfer_mode - transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pset_dxpl_mpio_f + +!****s* H5P/h5pget_dxpl_mpio_f +! +! NAME +! h5pget_dxpl_mpio_f +! +! PURPOSE +! Returns the data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! OUTPUTS +! data_xfer_mode- transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c + hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pget_dxpl_mpio_f + +!****s* H5P/h5pget_mpio_actual_io_mode_f +! NAME +! h5pget_mpio_actual_io_mode_f +! +! PURPOSE +! Retrieves the type of I/O that HDF5 actually performed on the last +! parallel I/O call. This is not necessarily the type of I/O requested. +! +! INPUTS +! dxpl_id - Dataset transfer property list identifier. +! OUTPUTS +! actual_io_mode - The type of I/O performed by this process. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 27, 2012 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + END FUNCTION h5pget_mpio_actual_io_mode_c + END INTERFACE + + actual_io_mode = -1 + + hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + + END SUBROUTINE h5pget_mpio_actual_io_mode_f +#endif + END MODULE H5P diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index ac28ed3..e23f833 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -26,9 +26,6 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** - -#include "H5config_f.inc" - MODULE HDF5 USE H5GLOBAL USE H5F @@ -46,8 +43,4 @@ MODULE HDF5 USE H5Z USE H5_DBLE_INTERFACE USE H5LIB -#ifdef H5_HAVE_PARALLEL - USE H5FDMPIO -#endif - END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index c52ad8e..0250117 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,21 +42,6 @@ else AM_LDFLAGS+=-static endif -# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled -if BUILD_PARALLEL_CONDITIONAL - PARALLEL_COND_SRC = H5FDmpiof.c HDF5.F90 H5FDmpioff.F90 -else - PARALLEL_COND_SRC = HDF5.F90 -endif - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -if FORTRAN_2003_CONDITIONAL_F - F_STATUS = _F03 -else - F_STATUS = _F90 -endif - # Condition for including/excluding the DBLE interfaces for when the # default REAL is of type DOUBLE PRECISION. # We do not include the double precision interfaces if the defaut REAL is @@ -75,7 +60,7 @@ libhdf5_fortran_la_SOURCES=H5f90global.F90 \ H5Tff.F90 H5Zff.F90 \ H5_DBLE_Interface$(F_DBLE).F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 # HDF5 Fortran library depends on HDF5 Library. libhdf5_fortran_la_LIBADD=$(LIBHDF5) @@ -210,22 +195,13 @@ 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 +H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).F90 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo -#HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ -# H5Aff.lo \ -# H5Dff.lo \ -# H5Eff.lo \ -# H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ -# H5Off.lo H5Pff.lo H5Rff.lo \ -# H5Sff.lo H5Tff.lo H5Zff.lo \ -# H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo + H5_DBLE_Interface$(F_DBLE).lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 1608926..df5f5a6 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -150,22 +150,12 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) -am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.F90 \ - H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ - H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 \ - H5Rff.F90 H5Sff.F90 H5Tff.F90 H5Zff.F90 \ - H5_DBLE_Interface$(F_DBLE).F90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ - H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c HDF5.F90 H5FDmpiof.c H5FDmpioff.F90 -@BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo -@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo HDF5.lo \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ H5FDmpioff.lo am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo H5f90kit.lo H5_f.lo H5Af.lo \ H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo \ - H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo $(am__objects_1) + H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo HDF5.lo 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@) @@ -241,9 +231,16 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = +FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_@AM_V@) +am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ H5match_types.c $(H5test_kind_SOURCES) -DIST_SOURCES = $(am__libhdf5_fortran_la_SOURCES_DIST) \ +DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) \ $(H5fortran_detect_SOURCES) H5match_types.c \ $(am__H5test_kind_SOURCES_DIST) am__can_run_installinfo = \ @@ -729,15 +726,6 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.F90 - -# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5.F90 H5FDmpioff.F90 -@FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -@FORTRAN_2003_CONDITIONAL_F_TRUE@F_STATUS = _F03 @FORTRAN_DEFAULT_REALisDBLE_F_FALSE@F_DBLE = Include # Condition for including/excluding the DBLE interfaces for when the @@ -754,7 +742,7 @@ libhdf5_fortran_la_SOURCES = H5f90global.F90 \ H5Tff.F90 H5Zff.F90 \ H5_DBLE_Interface$(F_DBLE).F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 # HDF5 Fortran library depends on HDF5 Library. @@ -817,7 +805,7 @@ all: $(BUILT_SOURCES) H5config_f.inc $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -931,7 +919,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Af.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Df.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ef.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpiof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5If.Plo@am__quote@ @@ -976,6 +963,15 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + mostlyclean-libtool: -rm -f *.lo @@ -1445,15 +1441,14 @@ 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 +H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).F90 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo + H5_DBLE_Interface$(F_DBLE).lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. @@ -1649,14 +1644,6 @@ check-vfd: $(LIB) $(PROGS) $(chk_TESTS) HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done -#HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ -# H5Aff.lo \ -# H5Dff.lo \ -# H5Eff.lo \ -# H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ -# H5Off.lo H5Pff.lo H5Rff.lo \ -# H5Sff.lo H5Tff.lo H5Zff.lo \ -# H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- cgit v0.12 From b8c6d8191cbdfd228efab639f90341a95929c127 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Apr 2015 16:26:43 -0500 Subject: [svn-r26829] Added BIND(C) to the Fortran H5I APIs --- fortran/src/H5If.c | 14 +++++------ fortran/src/H5Iff.F90 | 65 +++++++++++++++++++----------------------------- fortran/src/H5f90proto.h | 22 ++++++---------- 3 files changed, 40 insertions(+), 61 deletions(-) diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index 55868dd..da8b482 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -42,7 +42,7 @@ * SOURCE */ int_f -nh5iget_type_c (hid_t_f *obj_id, int_f *type) +h5iget_type_c (hid_t_f *obj_id, int_f *type) /******/ { int ret_value = -1; @@ -83,7 +83,7 @@ nh5iget_type_c (hid_t_f *obj_id, int_f *type) * SOURCE */ int_f -nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) +h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) /******/ { int ret_value = -1; @@ -135,7 +135,7 @@ DONE: * SOURCE */ int_f -nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -171,7 +171,7 @@ done: * SOURCE */ int_f -nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -208,7 +208,7 @@ done: * SOURCE */ int_f -nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -245,7 +245,7 @@ done: * SOURCE */ int_f -nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) +h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) /******/ { int ret_value; @@ -276,7 +276,7 @@ done: * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) +h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) { int ret_value; htri_t c_ret_value; diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index 7c9a843..4699404 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -4,7 +4,7 @@ ! MODULE H5I ! ! FILE -! fortran/src/H5Iff.f90 +! fortran/src/H5Iff.F90 ! ! PURPOSE ! This file contains Fortran interfaces for H5I functions. @@ -34,7 +34,8 @@ !***** MODULE H5I - + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL CONTAINS @@ -87,11 +88,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c - !DEC$ENDIF + INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: TYPE END FUNCTION h5iget_type_c @@ -133,14 +132,12 @@ CONTAINS ! -1 if fail !***** INTERFACE - INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf INTEGER(SIZE_T), INTENT(IN) :: buf_size INTEGER(SIZE_T), INTENT(OUT) :: name_size END FUNCTION h5iget_name_c @@ -176,11 +173,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c - !DEC$ENDIF + INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5iinc_ref_c @@ -215,11 +210,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c - !DEC$ENDIF + INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5idec_ref_c @@ -254,11 +247,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c - !DEC$ENDIF + INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: ref_count END FUNCTION h5iget_ref_c @@ -292,11 +283,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c - !DEC$ENDIF + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER(HID_T), INTENT(OUT) :: file_id END FUNCTION h5iget_file_id_c @@ -332,11 +321,9 @@ CONTAINS INTEGER :: c_valid ! 0 = .false, 1 = .true. INTERFACE - INTEGER FUNCTION h5iis_valid_c(id, c_valid) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c - !DEC$ENDIF + INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: id ! Identifier INTEGER :: c_valid END FUNCTION h5iis_valid_c diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 341985e..f51136e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -1037,21 +1037,13 @@ H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, i /* * Functions from H5If.c */ -#define nh5iget_type_c H5_FC_FUNC_(h5iget_type_c, H5IGET_TYPE_C) -#define nh5iget_name_c H5_FC_FUNC_(h5iget_name_c, H5IGET_NAME_C) -#define nh5iinc_ref_c H5_FC_FUNC_(h5iinc_ref_c, H5IINC_REF_C) -#define nh5idec_ref_c H5_FC_FUNC_(h5idec_ref_c, H5IDEC_REF_C) -#define nh5iget_ref_c H5_FC_FUNC_(h5iget_ref_c, H5IGET_REF_C) -#define nh5iget_file_id_c H5_FC_FUNC_(h5iget_file_id_c, H5IGET_FILE_ID_C) -#define nh5iis_valid_c H5_FC_FUNC_(h5iis_valid_c, H5IIS_VALID_C) - -H5_FCDLL int_f nh5iget_type_c(hid_t_f *obj_id, int_f *type); -H5_FCDLL int_f nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); -H5_FCDLL int_f nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); -H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); +H5_FCDLL int_f h5iget_type_c(hid_t_f *obj_id, int_f *type); +H5_FCDLL int_f h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); +H5_FCDLL int_f h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); +H5_FCDLL int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); /* * Functions from H5Ef.c -- cgit v0.12 From d7fd1ed9c789dedad5d623a41abf8006e360f410 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Apr 2015 17:09:32 -0500 Subject: [svn-r26830] Added BIND(C) to Fortran H5R APIs. --- fortran/src/H5Rff.F90 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index 69455c8..f9b6b68 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -33,9 +33,9 @@ ! !***** -MODULE H5R +MODULE H5R + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING ! If you change the value of these parameters, do not forget to change corresponding ! values in the H5f90.h file. @@ -96,8 +96,9 @@ MODULE H5R INTERFACE INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & BIND(C, NAME='h5rget_name_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER, INTENT(IN) :: ref_type TYPE(C_PTR), INTENT(IN), VALUE :: ref @@ -110,8 +111,9 @@ MODULE H5R INTERFACE INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & BIND(C, NAME='h5rdereference_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(IN) :: ref_type TYPE(C_PTR), INTENT(IN), VALUE :: ref @@ -122,8 +124,9 @@ MODULE H5R INTERFACE INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & BIND(C, NAME='h5rcreate_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL + IMPORT :: c_ptr, c_char + IMPORT :: HID_T + IMPLICIT NONE TYPE(C_PTR), VALUE :: ref INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name @@ -136,8 +139,9 @@ MODULE H5R INTERFACE INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & BIND(C, NAME='h5rget_region_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id TYPE(C_PTR), VALUE :: ref INTEGER(HID_T), INTENT(OUT) :: space_id @@ -195,7 +199,8 @@ CONTAINS INTERFACE INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) BIND(C, NAME='h5rget_object_type_obj_c') - USE H5GLOBAL + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HADDR_T) :: ref_f INTEGER, INTENT(OUT) :: obj_type @@ -247,7 +252,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) BIND(C, NAME='h5rget_region_region_c') - USE H5GLOBAL + IMPORT :: HID_T, REF_REG_BUF_LEN IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER :: ref_f(REF_REG_BUF_LEN) @@ -386,7 +391,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) BIND(C,NAME='h5rcreate_region_c') - USE H5GLOBAL + IMPORT :: HID_T, REF_REG_BUF_LEN IMPORT :: C_CHAR IMPLICIT NONE INTEGER :: ref_f(REF_REG_BUF_LEN) @@ -763,8 +768,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & BIND(C, NAME='h5rget_obj_type_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER, INTENT(IN) :: ref_type TYPE(C_PTR), VALUE :: ref -- cgit v0.12 From ec2327200da42befb984a92d1b0444f0e014ffb2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Apr 2015 11:01:16 -0500 Subject: [svn-r26831] Added H5S BIND(C) --- fortran/src/H5Sf.c | 62 +-- fortran/src/H5Sff.F90 | 1260 +++++++++++++++++++++------------------------- fortran/src/H5f90proto.h | 97 ++-- 3 files changed, 629 insertions(+), 790 deletions(-) diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 6947d64..53dd6ab 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -46,7 +46,7 @@ */ int_f -nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) +h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -91,7 +91,7 @@ done: */ int_f -nh5sclose_c ( hid_t_f *space_id ) +h5sclose_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -122,7 +122,7 @@ nh5sclose_c ( hid_t_f *space_id ) */ int_f -nh5screate_c ( int_f *classtype, hid_t_f *space_id ) +h5screate_c ( int_f *classtype, hid_t_f *space_id ) /******/ { H5S_class_t c_classtype; @@ -156,7 +156,7 @@ nh5screate_c ( int_f *classtype, hid_t_f *space_id ) */ int_f -nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) +h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /******/ { int ret_value = 0; @@ -194,7 +194,7 @@ nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) */ int_f -nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) +h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /******/ { int ret_value = 0; @@ -232,7 +232,7 @@ nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) */ int_f -nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) +h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /******/ { int ret_value = 0; @@ -278,7 +278,7 @@ nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) */ int_f -nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, +h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, hsize_t_f *num_blocks, hsize_t_f *buf) /******/ { @@ -351,7 +351,7 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, */ int_f -nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) +h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) /******/ { hid_t c_space_id; @@ -406,7 +406,7 @@ done: */ int_f -nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, +h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf) /******/ { @@ -467,7 +467,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, */ int_f -nh5sselect_all_c ( hid_t_f *space_id ) +h5sselect_all_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -496,7 +496,7 @@ nh5sselect_all_c ( hid_t_f *space_id ) */ int_f -nh5sselect_none_c ( hid_t_f *space_id ) +h5sselect_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -529,7 +529,7 @@ nh5sselect_none_c ( hid_t_f *space_id ) */ int_f -nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) +h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -564,7 +564,7 @@ nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) */ int_f -nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) +h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /******/ { int ret_value = 0; @@ -599,7 +599,7 @@ nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) */ int_f -nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) +h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /******/ { int ret_value = 0; @@ -634,7 +634,7 @@ nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) */ int_f -nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) +h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /******/ { int ret_value = 0; @@ -670,7 +670,7 @@ nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) */ int_f -nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) +h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /******/ { int ret_value = 0; @@ -709,7 +709,7 @@ nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) */ int_f -nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) +h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) /******/ { hid_t c_space_id; @@ -758,7 +758,7 @@ done: */ int_f -nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) +h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) /******/ { hsize_t c_current_size[H5S_MAX_RANK]; @@ -804,7 +804,7 @@ done: */ int_f -nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) +h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) /******/ { hid_t c_space_id; @@ -858,7 +858,7 @@ done: */ int_f -nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) +h5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -892,7 +892,7 @@ nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) */ int_f -nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) +h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /******/ { int ret_value = 0; @@ -924,7 +924,7 @@ nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) */ int_f -nh5sset_extent_none_c ( hid_t_f *space_id ) +h5sset_extent_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -962,7 +962,7 @@ nh5sset_extent_none_c ( hid_t_f *space_id ) */ int_f -nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) +h5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) /******/ { hsize_t c_start[H5S_MAX_RANK]; @@ -1023,7 +1023,7 @@ done: */ int_f -nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) +h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) /******/ { int ret_value = -1; @@ -1102,7 +1102,7 @@ DONE: */ int_f -nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) +h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) /******/ { int ret_value = -1; @@ -1141,7 +1141,7 @@ nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t */ int_f -nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) +h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) /******/ { int ret_value = -1; @@ -1177,7 +1177,7 @@ nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) * SOURCE */ int_f -nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) +h5sget_select_type_c ( hid_t_f *space_id , int_f *type) /******/ { int ret_value = -1; @@ -1216,7 +1216,7 @@ nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) */ int_f -nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) +h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) /******/ { int ret_value = -1; @@ -1272,7 +1272,7 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi */ int_f -nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) +h5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -1316,7 +1316,7 @@ nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) */ int_f -nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -1387,7 +1387,7 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) */ int_f -nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) +h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index c493d46..c95d4be 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -7,10 +7,7 @@ ! fortran/src/H5Sff.f90 ! ! PURPOSE -! This file contains Fortran interfaces for H5S functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! +! This file contains Fortran interfaces for H5S functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -37,10 +34,10 @@ !***** MODULE H5S + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL CONTAINS - ! !****s* H5S/h5screate_simple_f ! @@ -66,50 +63,44 @@ CONTAINS ! HISTORY ! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 6, 2001 + ! port). March 6, 2001 ! SOURCE - SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) - - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - ! Array with the dimension - ! sizes - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) - ! Array with the maximum - ! dimension sizes + SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) + + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) !***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims - - INTERFACE - INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_simple_c - END INTERFACE - - allocate (f_maxdims(rank), stat=hdferr) - if (hdferr .NE. 0) then - hdferr = -1 - return - endif - if (present(maxdims)) then - f_maxdims = maxdims - else - f_maxdims = dims - endif - hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) - deallocate(f_maxdims) - - END SUBROUTINE h5screate_simple_f + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims + + INTERFACE + INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) BIND(C,NAME='h5screate_simple_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_simple_c + END INTERFACE + + ALLOCATE (f_maxdims(rank), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + IF (PRESENT(maxdims)) THEN + f_maxdims = maxdims + ELSE + f_maxdims = dims + ENDIF + hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) + DEALLOCATE(f_maxdims) + + END SUBROUTINE h5screate_simple_f ! !****s* H5S/h5sclose_f @@ -134,24 +125,22 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sclose_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sclose_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTERFACE - INTEGER FUNCTION h5sclose_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sclose_c - END INTERFACE - - hdferr = h5sclose_c(space_id) - - END SUBROUTINE h5sclose_f + INTERFACE + INTEGER FUNCTION h5sclose_c(space_id) BIND(C,NAME='h5sclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sclose_c + END INTERFACE + + hdferr = h5sclose_c(space_id) + + END SUBROUTINE h5sclose_f ! !****s* H5S/h5screate_f @@ -163,9 +152,13 @@ CONTAINS ! Creates a new dataspace of a specified type. ! ! INPUTS -! classtype - the type of the dataspace to be created +! classtype - The type of the dataspace to be created +! Possible values are: +! H5S_SCALAR_F +! H5S_SIMPLE_F +! H5S_NULL_F ! OUTPUTS -! space_id - dataspace identifier +! space_id - Dataspace identifier ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -181,31 +174,24 @@ CONTAINS ! ! SOURCE - SUBROUTINE h5screate_f(classtype, space_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype ! The type of the dataspace - ! to be created. - ! Possible values are: - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F(1) - ! H5S_NULL_F(2) - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5screate_f(classtype, space_id, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5screate_c(classtype, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_c - END INTERFACE - - hdferr = h5screate_c(classtype, space_id) - - END SUBROUTINE h5screate_f + INTERFACE + INTEGER FUNCTION h5screate_c(classtype, space_id) BIND(C,NAME='h5screate_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_c + END INTERFACE + + hdferr = h5screate_c(classtype, space_id) + + END SUBROUTINE h5screate_f ! !****s* H5S/h5scopy_f @@ -235,27 +221,24 @@ CONTAINS ! ! SOURCE - SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: new_space_id - ! Identifier of dataspace's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: new_space_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT):: new_space_id - END FUNCTION h5scopy_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) BIND(C,NAME='h5scopy_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT):: new_space_id + END FUNCTION h5scopy_c + END INTERFACE - hdferr = h5scopy_c(space_id, new_space_id) + hdferr = h5scopy_c(space_id, new_space_id) - END SUBROUTINE h5scopy_f + END SUBROUTINE h5scopy_f ! !****s* H5S/h5sget_select_hyper_nblocks_f @@ -282,29 +265,25 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - !number of hyperslab blocks - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - END FUNCTION h5sget_select_hyper_nblocks_c - END INTERFACE - - hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) & + BIND(C,NAME='h5sget_select_hyper_nblocks_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + END FUNCTION h5sget_select_hyper_nblocks_c + END INTERFACE - END SUBROUTINE h5sget_select_hyper_nblocks_f + hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + + END SUBROUTINE h5sget_select_hyper_nblocks_f ! !****s* H5S/h5sget_select_hyper_blocklist_f @@ -332,40 +311,30 @@ CONTAINS ! called C functions (it is needed for Windows ! port). March 6, 2001 ! SOURCE - SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & + SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & num_blocks, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startblock - !Hyperslab block to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - !number of hyperslab blocks - !to get in the current dataspace - !selection - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of hyperslab blocks selected - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER, INTENT(OUT) :: hdferr !***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) BIND(C,NAME='h5sget_select_hyper_blocklist_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_hyper_blocklist_c + END INTERFACE - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_hyper_blocklist_c - END INTERFACE - - - hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, num_blocks, buf ) - END SUBROUTINE h5sget_select_hyper_blocklist_f + END SUBROUTINE h5sget_select_hyper_blocklist_f ! !****s* H5S/h5sget_select_bounds_f @@ -382,6 +351,7 @@ CONTAINS ! OUTPUTS ! start - starting coordinates of bounding box ! end - ending coordinates of bounding box +! i.e., the coordinates of the diagonally opposite corner ! hdferr - Returns 0 if successful and -1 if fails ! OPTIONAL PARAMETERS ! NONE @@ -397,21 +367,16 @@ CONTAINS ! SOURCE SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - ! Starting coordinates of the bounding box. INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - !Ending coordinates of the bounding box, - !i.e., the coordinates of the diagonally - !opposite corner - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c - !DEC$ENDIF + INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, end) & + BIND(C,NAME='h5sget_select_bounds_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END @@ -447,29 +412,23 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - !number of element points - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - END FUNCTION h5sget_select_elem_npoints_c - END INTERFACE - - hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + INTERFACE + INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) BIND(C,NAME='h5sget_select_elem_npoints_c') + IMPORT :: HID_T, HSSIZE_T + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + END FUNCTION h5sget_select_elem_npoints_c + END INTERFACE - END SUBROUTINE h5sget_select_elem_npoints_f + hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + + END SUBROUTINE h5sget_select_elem_npoints_f ! !****s* H5S/h5sget_select_elem_pointlist_f @@ -497,36 +456,31 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & - num_points, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - !Element point to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_points - !Number of element points to get - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of element points selected - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & + num_points, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_elem_pointlist_c - END INTERFACE - - hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - - END SUBROUTINE h5sget_select_elem_pointlist_f + INTERFACE + INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) BIND(C,NAME='h5sget_select_elem_pointlist_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_elem_pointlist_c + END INTERFACE + + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + + END SUBROUTINE h5sget_select_elem_pointlist_f ! !****s* H5S/h5sselect_elements_f @@ -575,11 +529,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& - num_elements,c_c_coord) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c - !DEC$ENDIF + num_elements,c_c_coord) BIND(C,NAME='h5sselect_elements_c') + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(IN) :: OPERATOR INTEGER(SIZE_T), INTENT(IN) :: num_elements @@ -635,24 +587,22 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sselect_all_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sselect_all_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sselect_all_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_all_c - END INTERFACE - - hdferr = h5sselect_all_c(space_id) - - END SUBROUTINE h5sselect_all_f + INTERFACE + INTEGER FUNCTION h5sselect_all_c(space_id) BIND(C,NAME='h5sselect_all_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_all_c + END INTERFACE + + hdferr = h5sselect_all_c(space_id) + + END SUBROUTINE h5sselect_all_f ! !****s* H5S/h5sselect_none_f @@ -679,24 +629,22 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sselect_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sselect_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sselect_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_none_c - END INTERFACE - - hdferr = h5sselect_none_c(space_id) - - END SUBROUTINE h5sselect_none_f + INTERFACE + INTEGER FUNCTION h5sselect_none_c(space_id) BIND(C,NAME='h5sselect_none_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_none_c + END INTERFACE + + hdferr = h5sselect_none_c(space_id) + + END SUBROUTINE h5sselect_none_f ! !****s* H5S/h5sselect_valid_f @@ -709,10 +657,12 @@ CONTAINS ! the dataspace. ! ! INPUTS -! space_id - identifier for the dataspace for which -! selection is verified +! space_id - identifier for the dataspace for which +! selection is verified ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! status - TRUE if the selection is contained within +! the extent, FALSE otherwise. +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! Elena Pourmal @@ -724,32 +674,28 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is - ! contained within the extent, - ! FALSE otherwise. - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine + INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine - INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sselect_valid_c - END INTERFACE - - hdferr = h5sselect_valid_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sselect_valid_f + INTERFACE + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) BIND(C,NAME='h5sselect_valid_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sselect_valid_c + END INTERFACE + + hdferr = h5sselect_valid_c(space_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sselect_valid_f ! !****s* H5S/h5sget_simple_extent_npoints_f @@ -776,27 +722,24 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_simple_extent_npoints_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) BIND(C,NAME='h5sget_simple_extent_npoints_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_simple_extent_npoints_c + END INTERFACE - hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) + hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - END SUBROUTINE h5sget_simple_extent_npoints_f + END SUBROUTINE h5sget_simple_extent_npoints_f ! !****s* H5S/h5sget_select_npoints_f @@ -808,10 +751,10 @@ CONTAINS ! Determines the number of elements in a dataspace selection. ! ! INPUTS -! space_id - dataspace identifier +! space_id - dataspace identifier ! OUTPUTS -! npoints - number of points in the dataspace selection -! hdferr - Returns 0 if successful and -1 if fails +! npoints - number of points in the dataspace selection +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal ! August 12, 1999 @@ -821,27 +764,24 @@ CONTAINS ! called C functions (it is needed for Windows ! port). March 6, 2001 ! SOURCE - SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the - ! selection - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_select_npoints_c - END INTERFACE - - hdferr = h5sget_select_npoints_c(space_id, npoints) + INTERFACE + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) BIND(C,NAME='h5sget_select_npoints_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_select_npoints_c + END INTERFACE + + hdferr = h5sget_select_npoints_c(space_id, npoints) - END SUBROUTINE h5sget_select_npoints_f + END SUBROUTINE h5sget_select_npoints_f ! !****s* H5S/h5sget_simple_extent_ndims_f @@ -867,26 +807,24 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: rank ! Number of dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - END FUNCTION h5sget_simple_extent_ndims_c - END INTERFACE - - hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - - END SUBROUTINE h5sget_simple_extent_ndims_f + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) BIND(C,NAME='h5sget_simple_extent_ndims_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + END FUNCTION h5sget_simple_extent_ndims_c + END INTERFACE + + hdferr = h5sget_simple_extent_ndims_c(space_id, rank) + + END SUBROUTINE h5sget_simple_extent_ndims_f ! !****s* H5S/h5sget_simple_extent_dims_f ! @@ -897,12 +835,13 @@ CONTAINS ! Retrieves dataspace dimension size and maximum size. ! ! INPUTS -! space_id - dataspace identifier +! space_id - dataspace identifier +! ! OUTPUTS -! dims - array to store size of each dimension -! maxdims - array to store maximum size of each -! dimension -! hdferr - Returns 0 if successful and -1 if fails +! dims - array to store size of each dimension +! maxdims - array to store maximum size of each dimension +! hdferr - Returns 0 if successful and -1 if fails +! ! AUTHOR ! Elena Pourmal ! August 12, 1999 @@ -913,33 +852,26 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - ! Array to store dimension sizes - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - ! Array to store max dimension - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, - ! number of dimensions on - ! on success + SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - END FUNCTION h5sget_simple_extent_dims_c - END INTERFACE - - hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - - END SUBROUTINE h5sget_simple_extent_dims_f + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) BIND(C,NAME='h5sget_simple_extent_dims_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + END FUNCTION h5sget_simple_extent_dims_c + END INTERFACE + + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) + + END SUBROUTINE h5sget_simple_extent_dims_f ! !****s* H5S/h5sget_simple_extent_type_f @@ -954,10 +886,10 @@ CONTAINS ! space_id - dataspace identifier ! OUTPUTS ! classtype - class type, possible values are: -! H5S_NO_CLASS_F (-1) -! H5S_SCALAR_F (0) -! H5S_SIMPLE_F (1) -! H5S_NULL_F (2) +! H5S_NO_CLASS_F +! H5S_SCALAR_F +! H5S_SIMPLE_F +! H5S_NULL_F ! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal @@ -969,32 +901,25 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: classtype ! Class type , possible values - ! are: - ! H5S_NO_CLASS_F (-1) - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F (1) - ! H5S_NULL_F (2) - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - END FUNCTION h5sget_simple_extent_type_c - END INTERFACE - - hdferr = h5sget_simple_extent_type_c(space_id, classtype) - - END SUBROUTINE h5sget_simple_extent_type_f -! + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) BIND(C,NAME='h5sget_simple_extent_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + END FUNCTION h5sget_simple_extent_type_c + END INTERFACE + + hdferr = h5sget_simple_extent_type_c(space_id, classtype) + + END SUBROUTINE h5sget_simple_extent_type_f + ! !****s* H5S/h5sset_extent_simple_f ! ! NAME @@ -1021,38 +946,30 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: rank ! Dataspace rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - ! Array with the new sizes - ! of dimensions - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - ! Array with the new maximum - ! sizes of dimensions - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & + maximum_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - END FUNCTION h5sset_extent_simple_c - END INTERFACE - - hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & - maximum_size) - - END SUBROUTINE h5sset_extent_simple_f + INTERFACE + INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & + current_size, maximum_size) BIND(C,NAME='h5sset_extent_simple_c') + IMPORT :: HID_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + END FUNCTION h5sset_extent_simple_c + END INTERFACE + + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & + maximum_size) + + END SUBROUTINE h5sset_extent_simple_f ! !****s* H5S/h5sis_simple_f ! @@ -1066,8 +983,8 @@ CONTAINS ! space_id - dataspace identifier ! OUTPUTS ! status - flag to indicate if dataspace -! is simple or not -! hdferr - Returns 0 if successful and -1 if fails +! is simple or not (TRUE or FALSE) +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal ! August 12, 1999 @@ -1078,32 +995,28 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sis_simple_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace - ! is simple or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sis_simple_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sis_simple_c - END INTERFACE + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - hdferr = h5sis_simple_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sis_simple_f + INTERFACE + INTEGER FUNCTION h5sis_simple_c(space_id, flag) BIND(C,NAME='h5sis_simple_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sis_simple_c + END INTERFACE + + hdferr = h5sis_simple_c(space_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sis_simple_f ! !****s* H5S/h5soffset_simple_f @@ -1117,7 +1030,7 @@ CONTAINS ! INPUTS ! space_id - dataspace identifier ! offset - the offset at which to position the -! selection +! selection ! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails ! OPTIONAL PARAMETERS @@ -1133,28 +1046,24 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - ! The offset at which to position - ! the selection - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - END FUNCTION h5soffset_simple_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) BIND(C,NAME='h5soffset_simple_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + END FUNCTION h5soffset_simple_c + END INTERFACE - hdferr = h5soffset_simple_c(space_id, offset) + hdferr = h5soffset_simple_c(space_id, offset) - END SUBROUTINE h5soffset_simple_f + END SUBROUTINE h5soffset_simple_f ! !****s* H5S/h5sextent_copy_f @@ -1166,12 +1075,12 @@ CONTAINS ! Copies the extent of a dataspace. ! ! INPUTS -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from -! which the extent is copied +! dest_space_id - the identifier for the dataspace to which +! the extent is copied +! source_space_id - the identifier for the dataspace from +! which the extent is copied ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! OPTIONAL PARAMETERS ! NONE ! @@ -1188,28 +1097,24 @@ CONTAINS ! ! SOURCE - SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination - ! dataspace - INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTERFACE - INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - END FUNCTION h5sextent_copy_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) BIND(C,NAME='h5sextent_copy_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + END FUNCTION h5sextent_copy_c + END INTERFACE - hdferr = h5sextent_copy_c(dest_space_id, source_space_id) + hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - END SUBROUTINE h5sextent_copy_f + END SUBROUTINE h5sextent_copy_f ! !****s* H5S/h5sset_extent_none_f @@ -1234,25 +1139,22 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sset_extent_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sset_extent_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sset_extent_none_c - END INTERFACE - - hdferr = h5sset_extent_none_c(space_id) - - END SUBROUTINE h5sset_extent_none_f - + INTERFACE + INTEGER FUNCTION h5sset_extent_none_c(space_id) BIND(C,NAME='h5sset_extent_none_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sset_extent_none_c + END INTERFACE + + hdferr = h5sset_extent_none_c(space_id) + + END SUBROUTINE h5sset_extent_none_f ! !****s* H5S/h5sselect_hyperslab_f ! @@ -1266,13 +1168,12 @@ CONTAINS ! INPUTS ! space_id - dataspace identifier ! operator - flag, valid values are: -! H5S_SELECT_SET_F (0) -! H5S_SELECT_OR_F (1) +! H5S_SELECT_SET_F +! H5S_SELECT_OR_F ! start - array with hyperslab offsets -! count - number of blocks included in the -! hyperslab +! count - number of blocks included in the hyperslab ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! OPTIONAL PARAMETERS ! stride - array with hyperslab strides ! block - array with hyperslab block sizes @@ -1287,99 +1188,88 @@ CONTAINS ! port). March 6, 2001 ! ! SOURCE - SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & - hdferr, stride, block) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_SET_F (0) - ! H5S_SELECT_OR_F (1) - ! - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block + SUBROUTINE h5sselect_hyperslab_f(space_id, OPERATOR, start, count, & + hdferr, stride, BLOCK) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: BLOCK !***** - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride - INTEGER :: rank - INTEGER :: error1, error2 - - INTERFACE - INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & - start, count, stride, block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_hyperslab_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: operator - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block - END FUNCTION h5sselect_hyperslab_c - END INTERFACE - - if (present(stride).and. present(block)) then - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, block) - return - endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! - CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - if( hdferr .EQ. -1) return - ! - if (present(stride).and. .not.present(block)) then - allocate(def_block(rank), stat=error1) - if (error1.NE.0) then - hdferr = -1 - return - endif - def_block = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, def_block) - deallocate(def_block) - return - endif - - if (.not.present(stride).and. present(block)) then - allocate(def_stride(rank), stat=error2) - if (error2.NE.0) then - hdferr = -1 - return - endif - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, block) - deallocate(def_stride) - return - endif - allocate(def_block(rank), stat=error1) - allocate(def_stride(rank), stat=error2) - if ((error1.NE.0) .OR. (error2.NE.0)) then - hdferr = -1 - return - endif - def_block = 1 - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, def_block) - deallocate(def_block) - deallocate(def_stride) - - END SUBROUTINE h5sselect_hyperslab_f + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride + INTEGER :: rank + INTEGER :: error1, error2 + + INTERFACE + INTEGER FUNCTION h5sselect_hyperslab_c(space_id, OPERATOR, & + start, count, stride, BLOCK) BIND(C,NAME='h5sselect_hyperslab_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: BLOCK + END FUNCTION h5sselect_hyperslab_c + END INTERFACE + + IF (PRESENT(stride).AND. PRESENT(BLOCK)) THEN + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + stride, BLOCK) + RETURN + ENDIF + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! + CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IF( hdferr .EQ. -1) RETURN + ! + IF (PRESENT(stride).AND. .NOT.PRESENT(BLOCK)) THEN + ALLOCATE(def_block(rank), stat=error1) + IF (error1.NE.0) THEN + hdferr = -1 + RETURN + ENDIF + def_block = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + stride, def_block) + DEALLOCATE(def_block) + RETURN + ENDIF + + IF (.NOT.PRESENT(stride).AND. PRESENT(BLOCK)) THEN + ALLOCATE(def_stride(rank), stat=error2) + IF (error2.NE.0) THEN + hdferr = -1 + RETURN + ENDIF + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + def_stride, BLOCK) + DEALLOCATE(def_stride) + RETURN + ENDIF + ALLOCATE(def_block(rank), stat=error1) + ALLOCATE(def_stride(rank), stat=error2) + IF ((error1.NE.0) .OR. (error2.NE.0)) THEN + hdferr = -1 + RETURN + ENDIF + def_block = 1 + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + def_stride, def_block) + DEALLOCATE(def_block) + DEALLOCATE(def_stride) + + END SUBROUTINE h5sselect_hyperslab_f ! !$! ! !$!****s* H5S/h5scombine_hyperslab_f ! !$! @@ -1695,46 +1585,39 @@ CONTAINS ! Retrieve the type of selection ! ! INPUTS -! space_id - dataspace iidentifier with selection +! space_id - dataspace identifier with selection ! OUTPUTS -! type - flag, valid values are: +! type - selection type flag, valid values are: ! H5S_SEL_ERROR_F ! H5S_SEL_NONE_F ! H5S_SEL_POINTS_F ! H5S_SEL_HYPERSLABS_F ! H5S_SEL_ALL_F -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal ! October 7, 2002 ! ! SOURCE - SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to - INTEGER, INTENT(OUT) :: type ! Selection type - ! H5S_SEL_ERROR_F - ! H5S_SEL_NONE_F - ! H5S_SEL_POINTS_F - ! H5S_SEL_HYPERSLABS_F - ! H5S_SEL_ALL_F - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5sget_select_type_f(space_id, TYPE, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(INOUT) :: space_id + INTEGER, INTENT(OUT) :: TYPE + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5sget_select_type_c(space_id, type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: type - END FUNCTION h5sget_select_type_c - END INTERFACE - - hdferr = h5sget_select_type_c(space_id, type) - return - - END SUBROUTINE h5sget_select_type_f + INTERFACE + INTEGER FUNCTION h5sget_select_type_c(space_id, TYPE) BIND(C,NAME='h5sget_select_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5sget_select_type_c + END INTERFACE + + hdferr = h5sget_select_type_c(space_id, TYPE) + RETURN + + END SUBROUTINE h5sget_select_type_f ! !****s* H5S/H5Sdecode_f @@ -1746,10 +1629,10 @@ CONTAINS ! Decode a binary object description of data space and return a new object handle. ! ! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! M. Scot Breitenfeld @@ -1757,18 +1640,15 @@ CONTAINS ! SOURCE SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5sdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER FUNCTION h5sdecode_c(buf, obj_id) BIND(C,NAME='h5sdecode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID END FUNCTION h5sdecode_c END INTERFACE @@ -1787,12 +1667,12 @@ CONTAINS ! Encode a data space object description into a binary buffer. ! ! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. ! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. ! ! AUTHOR ! M. Scot Breitenfeld @@ -1800,21 +1680,18 @@ CONTAINS ! SOURCE SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5sencode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf INTEGER(SIZE_T), INTENT(INOUT) :: nalloc END FUNCTION h5sencode_c END INTERFACE @@ -1832,11 +1709,11 @@ CONTAINS ! Determines whether two dataspace extents are equal. ! ! INPUTS -! space1_id - First dataspace identifier. -! space2_id - Second dataspace identifier. +! space1_id - First dataspace identifier. +! space2_id - Second dataspace identifier. ! OUTPUTS -! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr - Returns 0 if successful and -1 if fails +! Equal - .TRUE. if equal, .FALSE. if unequal. +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! M. Scot Breitenfeld ! April 2, 2008 @@ -1844,19 +1721,17 @@ CONTAINS ! SOURCE SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. - INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. - LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + LOGICAL, INTENT(OUT) :: Equal + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER(HID_T) :: c_equal INTERFACE - INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c - !DEC$ENDIF + INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) BIND(C,NAME='h5sextent_equal_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space1_id INTEGER(HID_T), INTENT(IN) :: space2_id INTEGER(HID_T) :: c_equal @@ -1864,12 +1739,9 @@ CONTAINS END INTERFACE hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - - equal = .FALSE. IF(c_equal.GT.0) equal = .TRUE. - END SUBROUTINE h5sextent_equal_f END MODULE H5S diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index f51136e..676444c 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -100,71 +100,38 @@ H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size); /* * Functions from H5Sf.c */ -#define nh5screate_simple_c H5_FC_FUNC_(h5screate_simple_c, H5SCREATE_SIMPLE_C) -#define nh5sclose_c H5_FC_FUNC_(h5sclose_c, H5SCLOSE_C) -#define nh5screate_c H5_FC_FUNC_(h5screate_c, H5SCREATE_C) -#define nh5scopy_c H5_FC_FUNC_(h5scopy_c, H5SCOPY_C) -#define nh5sget_select_hyper_nblocks_c H5_FC_FUNC_(h5sget_select_hyper_nblocks_c, H5SGET_SELECT_HYPER_NBLOCKS_C) -#define nh5sget_select_hyper_blocklist_c H5_FC_FUNC_(h5sget_select_hyper_blocklist_c, H5SGET_SELECT_HYPER_BLOCKLIST_C) -#define nh5sget_select_elem_npoints_c H5_FC_FUNC_(h5sget_select_elem_npoints_c, H5SGET_SELECT_ELEM_NPOINTS_C) -#define nh5sget_select_elem_pointlist_c H5_FC_FUNC_(h5sget_select_elem_pointlist_c, H5SGET_SELECT_ELEM_POINTLIST_C) -#define nh5sget_select_bounds_c H5_FC_FUNC_(h5sget_select_bounds_c, H5SGET_SELECT_BOUNDS_C) -#define nh5sselect_all_c H5_FC_FUNC_(h5sselect_all_c, H5SSELECT_ALL_C) -#define nh5sselect_none_c H5_FC_FUNC_(h5sselect_none_c, H5SSELECT_NONE_C) -#define nh5sselect_valid_c H5_FC_FUNC_(h5sselect_valid_c, H5SSELECT_VALID_C) -#define nh5sget_simple_extent_npoints_c H5_FC_FUNC_(h5sget_simple_extent_npoints_c, H5SGET_SIMPLE_EXTENT_NPOINTS_C) -#define nh5sget_select_npoints_c H5_FC_FUNC_(h5sget_select_npoints_c, H5SGET_SELECT_NPOINTS_C) -#define nh5sget_simple_extent_ndims_c H5_FC_FUNC_(h5sget_simple_extent_ndims_c, H5SGET_SIMPLE_EXTENT_NDIMS_C) -#define nh5sget_simple_extent_type_c H5_FC_FUNC_(h5sget_simple_extent_type_c, H5SGET_SIMPLE_EXTENT_TYPE_C) -#define nh5soffset_simple_c H5_FC_FUNC_(h5soffset_simple_c, H5SOFFSET_SIMPLE_C) -#define nh5sset_extent_simple_c H5_FC_FUNC_(h5sset_extent_simple_c, H5SSET_EXTENT_SIMPLE_C) -#define nh5sis_simple_c H5_FC_FUNC_(h5sis_simple_c, H5SIS_SIMPLE_C) -#define nh5sextent_class_c H5_FC_FUNC_(h5sextent_class_c, H5SEXTENT_CLASS_C) -#define nh5sget_simple_extent_dims_c H5_FC_FUNC_(h5sget_simple_extent_dims_c, H5SGET_SIMPLE_EXTENT_DIMS_C) -#define nh5sextent_copy_c H5_FC_FUNC_(h5sextent_copy_c, H5SEXTENT_COPY_C) -#define nh5sset_extent_none_c H5_FC_FUNC_(h5sset_extent_none_c, H5SSET_EXTENT_NONE_C) -#define nh5sselect_hyperslab_c H5_FC_FUNC_(h5sselect_hyperslab_c, H5SSELECT_HYPERSLAB_C) -#define nh5scombine_hyperslab_c H5_FC_FUNC_(h5scombine_hyperslab_c, H5SCOMBINE_HYPERSLAB_C) -#define nh5scombine_select_c H5_FC_FUNC_(h5scombine_select_c, H5SCOMBINE_SELECT_C) -#define nh5sselect_select_c H5_FC_FUNC_(h5sselect_select_c, H5SSELECT_SELECT_C) -#define nh5sget_select_type_c H5_FC_FUNC_(h5sget_select_type_c, H5SGET_SELECT_TYPE_C) -#define nh5sselect_elements_c H5_FC_FUNC_(h5sselect_elements_c, H5SSELECT_ELEMENTS_C) -#define nh5sdecode_c H5_FC_FUNC_(h5sdecode_c, H5SDECODE_C) -#define nh5sencode_c H5_FC_FUNC_(h5sencode_c, H5SENCODE_C) -#define nh5sextent_equal_c H5_FC_FUNC_(h5sextent_equal_c, H5SEXTENT_EQUAL_C) - -H5_FCDLL int_f nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); -H5_FCDLL int_f nh5sclose_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5screate_c ( int_f *classtype, hid_t_f *space_id ); -H5_FCDLL int_f nh5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id); -H5_FCDLL int_f nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); -H5_FCDLL int_f nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); -H5_FCDLL int_f nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); -H5_FCDLL int_f nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); -H5_FCDLL int_f nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); -H5_FCDLL int_f nh5sselect_all_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ); -H5_FCDLL int_f nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ); -H5_FCDLL int_f nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ); -H5_FCDLL int_f nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset); -H5_FCDLL int_f nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); -H5_FCDLL int_f nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f nh5sextent_class_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); -H5_FCDLL int_f nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id); -H5_FCDLL int_f nh5sset_extent_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); -H5_FCDLL int_f nh5sget_select_type_c ( hid_t_f *space_id , int_f *op); -H5_FCDLL int_f nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); -H5_FCDLL int_f nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); -H5_FCDLL int_f nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); -H5_FCDLL int_f nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); -H5_FCDLL int_f nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); +H5_FCDLL int_f h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); +H5_FCDLL int_f h5sclose_c ( hid_t_f *space_id ); +H5_FCDLL int_f h5screate_c ( int_f *classtype, hid_t_f *space_id ); +H5_FCDLL int_f h5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id); +H5_FCDLL int_f h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); +H5_FCDLL int_f h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); +H5_FCDLL int_f h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); +H5_FCDLL int_f h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); +H5_FCDLL int_f h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); +H5_FCDLL int_f h5sselect_all_c ( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_none_c ( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ); +H5_FCDLL int_f h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ); +H5_FCDLL int_f h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ); +H5_FCDLL int_f h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset); +H5_FCDLL int_f h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); +H5_FCDLL int_f h5sis_simple_c ( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sextent_class_c ( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); +H5_FCDLL int_f h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id); +H5_FCDLL int_f h5sset_extent_none_c ( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); +H5_FCDLL int_f h5sget_select_type_c ( hid_t_f *space_id , int_f *op); +H5_FCDLL int_f h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); +H5_FCDLL int_f h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); +H5_FCDLL int_f h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); +H5_FCDLL int_f h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); +H5_FCDLL int_f h5sdecode_c ( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); /* * Functions from H5Df.c -- cgit v0.12 From 7caca66dd06d0f120a3eb0cdc9c5907fbfe9feaa Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Apr 2015 11:03:14 -0500 Subject: [svn-r26832] misc. clean-up --- fortran/src/H5Zff.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index ba7692f..1dd8bcd 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -113,7 +113,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5zfilter_avail_c(filter, flag) BIND(C,NAME='h5zfilter_avail_c') - USE H5GLOBAL + IMPLICIT NONE INTEGER, INTENT(IN) :: filter INTEGER :: flag END FUNCTION h5zfilter_avail_c @@ -164,7 +164,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) BIND(C,NAME='h5zget_filter_info_c') - USE H5GLOBAL + IMPLICIT NONE INTEGER, INTENT(IN) :: filter INTEGER, INTENT(OUT) :: config_flags END FUNCTION h5zget_filter_info_c -- cgit v0.12 From 75ff45add397295e8bc8868b0d5080fd2ba6f8b4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Apr 2015 11:23:52 -0500 Subject: [svn-r26833] Added BIND(C) to H5O Fortran APIs --- fortran/src/H5Of.c | 26 +++---- fortran/src/H5Off.F90 | 181 +++++++++++++++++++++-------------------------- fortran/src/H5f90proto.h | 40 ++++------- 3 files changed, 106 insertions(+), 141 deletions(-) diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index ae344a5..7000ba2 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -123,7 +123,7 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * SOURCE */ int_f -nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -169,7 +169,7 @@ nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namele * SOURCE */ int_f -nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) +h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -207,7 +207,7 @@ nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid * SOURCE */ int_f -nh5oclose_c ( hid_t_f *object_id ) +h5oclose_c ( hid_t_f *object_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -279,7 +279,7 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, * SOURCE */ int_f -nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) +h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -458,7 +458,7 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info) * SOURCE */ int_f -nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ) /******/ @@ -560,7 +560,7 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f * SOURCE */ int_f -nh5odecr_refcount_c (hid_t_f *object_id) +h5odecr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -594,7 +594,7 @@ nh5odecr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) +h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -633,7 +633,7 @@ nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *la * SOURCE */ int_f -nh5oincr_refcount_c (hid_t_f *object_id) +h5oincr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -665,7 +665,7 @@ nh5oincr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) +h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -710,7 +710,7 @@ nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * SOURCE */ int_f -nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) +h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -764,7 +764,7 @@ nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _f * SOURCE */ int_f -nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id) /******/ { @@ -813,7 +813,7 @@ nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * SOURCE */ int_f -nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) +h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -869,7 +869,7 @@ nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hss * SOURCE */ int_f -nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id) /******/ { diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index e4125bc..dbadc66 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -38,8 +38,8 @@ MODULE H5O + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_LONG, C_INT, C_LOC USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -142,15 +142,13 @@ CONTAINS INTERFACE INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: new_link_name + lcpl_id_default, lapl_id_default) BIND(C,NAME='h5olink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER(HID_T), INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_link_name INTEGER(SIZE_T) :: new_link_namelen INTEGER(HID_T) :: lapl_id_default INTEGER(HID_T) :: lcpl_id_default @@ -205,14 +203,12 @@ CONTAINS INTEGER(SIZE_T) :: namelen INTERFACE - INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) BIND(C,NAME='h5oopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen INTEGER(HID_T), INTENT(OUT) :: obj_id @@ -253,11 +249,9 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5oclose_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c - !DEC$ENDIF + INTEGER FUNCTION h5oclose_c(object_id) BIND(C,NAME='h5oclose_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id END FUNCTION h5oclose_c END INTERFACE @@ -294,11 +288,9 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c - !DEC$ENDIF + INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) BIND(C,NAME='h5oopen_by_addr_c') + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER(HADDR_T), INTENT(IN) :: addr INTEGER(HID_T), INTENT(OUT) :: obj_id @@ -350,16 +342,15 @@ CONTAINS INTERFACE INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dst_name + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) & + BIND(C,NAME='h5ocopy_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default INTEGER(SIZE_T) :: src_name_len, dst_name_len @@ -405,11 +396,9 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5odecr_refcount_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c - !DEC$ENDIF + INTEGER FUNCTION h5odecr_refcount_c(object_id) BIND(C,NAME='h5odecr_refcount_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: object_id END FUNCTION h5odecr_refcount_c END INTERFACE @@ -456,14 +445,13 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) & + BIND(C,NAME='h5oexists_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) , INTENT(IN) :: namelen INTEGER(HID_T) , INTENT(IN) :: lapl_id @@ -523,14 +511,13 @@ CONTAINS INTEGER(HSSIZE_T) :: bufsize_default INTERFACE - INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment + INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) & + BIND(C,NAME='h5oget_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSSIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: comment + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize END FUNCTION h5oget_comment_c @@ -584,16 +571,14 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment, name + comment, commentsize_default, bufsize_default, lapl_id) BIND(C,NAME='h5oget_comment_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) , INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: comment + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default INTEGER(HID_T) , INTENT(IN) :: lapl_id @@ -638,11 +623,9 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5oincr_refcount_c(obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c - !DEC$ENDIF + INTEGER FUNCTION h5oincr_refcount_c(obj_id) BIND(C,NAME='h5oincr_refcount_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id END FUNCTION h5oincr_refcount_c END INTERFACE @@ -694,14 +677,13 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name + INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) & + BIND(C,NAME='h5oopen_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER(SIZE_T) , INTENT(IN) :: group_namelen INTEGER , INTENT(IN) :: index_type INTEGER , INTENT(IN) :: order @@ -749,14 +731,12 @@ CONTAINS INTEGER(SIZE_T) :: commentlen INTERFACE - INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment + INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) BIND(C,NAME='h5oset_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment INTEGER(SIZE_T) , INTENT(IN) :: commentlen END FUNCTION h5oset_comment_c @@ -805,16 +785,15 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, comment + INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) & + BIND(C,NAME='h5oset_comment_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: comment + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment INTEGER(SIZE_T) , INTENT(IN) :: commentlen - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) , INTENT(IN) :: namelen INTEGER(HID_T) , INTENT(IN) :: lapl_id END FUNCTION h5oset_comment_by_name_c @@ -860,7 +839,6 @@ CONTAINS ! ! Fortran2003 Interface: SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER, INTENT(IN) :: index_type @@ -875,8 +853,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & BIND(C, NAME='h5ovisit_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL + IMPORT :: C_FUNPTR, C_PTR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER, INTENT(IN) :: index_type INTEGER, INTENT(IN) :: order @@ -921,8 +900,6 @@ CONTAINS ! ! Fortran2003 Interface: SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name @@ -937,8 +914,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & BIND(C, NAME='h5oget_info_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) , INTENT(IN) :: namelen @@ -992,8 +970,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5oget_info_c(object_id, object_info) & BIND(C, NAME='h5oget_info_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id TYPE(C_PTR), VALUE :: object_info END FUNCTION h5oget_info_c @@ -1053,8 +1032,8 @@ CONTAINS INTERFACE INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T, SIZE_T, HSIZE_T INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER(SIZE_T) , INTENT(IN) :: namelen @@ -1114,7 +1093,6 @@ CONTAINS ! Fortran2003 Interface: SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: object_name @@ -1134,8 +1112,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL + IMPORT :: C_CHAR, C_PTR, C_FUNPTR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name INTEGER(SIZE_T) :: namelen diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 676444c..fe3d37a 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -631,24 +631,10 @@ H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, * Functions from H5Of.c */ -#define nh5olink_c H5_FC_FUNC_(h5olink_c, H5OLINK_C) -#define nh5oopen_c H5_FC_FUNC_(h5oopen_c, H5OOPEN_C) -#define nh5oclose_c H5_FC_FUNC_(h5oclose_c, H5OCLOSE_C) -#define nh5oopen_by_addr_c H5_FC_FUNC_(h5oopen_by_addr_c, H5OOPEN_BY_ADDR_C) -#define nh5ocopy_c H5_FC_FUNC_(h5ocopy_c, H5OCOPY_C) -#define nh5odecr_refcount_c H5_FC_FUNC_(h5odecr_refcount_c, H5ODECR_REFCOUNT_C) -#define nh5oincr_refcount_c H5_FC_FUNC_(h5oincr_refcount_c, H5OINCR_REFCOUNT_C) -#define nh5oexists_by_name_c H5_FC_FUNC_(h5oexists_by_name_c, H5OEXISTS_BY_NAME_C) -#define nh5oset_comment_c H5_FC_FUNC_(h5oset_comment_c, H5OSET_COMMENT_C) -#define nh5oset_comment_by_name_c H5_FC_FUNC_(h5oset_comment_by_name_c, H5OSET_COMMENT_BY_NAME_C) -#define nh5oopen_by_idx_c H5_FC_FUNC_(h5oopen_by_idx_c, H5OOPEN_BY_IDX_C) -#define nh5oget_comment_c H5_FC_FUNC_(h5oget_comment_c, H5OGET_COMMENT_C) -#define nh5oget_comment_by_name_c H5_FC_FUNC_(h5oget_comment_by_name_c, H5OGET_COMMENT_BY_NAME_C) - -H5_FCDLL int_f nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); -H5_FCDLL int_f nh5oclose_c (hid_t_f *object_id ); -H5_FCDLL int_f nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); -H5_FCDLL int_f nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +H5_FCDLL int_f h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); +H5_FCDLL int_f h5oclose_c (hid_t_f *object_id ); +H5_FCDLL int_f h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); +H5_FCDLL int_f h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); H5_FCDLL int_f h5ovisit_c (hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order, @@ -658,18 +644,18 @@ H5_FCDLL int_f h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info); H5_FCDLL int_f h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +H5_FCDLL int_f h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ); -H5_FCDLL int_f nh5odecr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f nh5oincr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen); -H5_FCDLL int_f nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5odecr_refcount_c (hid_t_f *object_id); +H5_FCDLL int_f h5oincr_refcount_c (hid_t_f *object_id); +H5_FCDLL int_f h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen); +H5_FCDLL int_f h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); -H5_FCDLL int_f nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +H5_FCDLL int_f h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); +H5_FCDLL int_f h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id); /* * Functions from H5Pf.c -- cgit v0.12 From c632be5d7b330fce7cdee2fe013e3716f9fa8e8d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Apr 2015 11:33:26 -0500 Subject: [svn-r26834] Added more BIND(C) to H5O Fortran APIs --- fortran/src/H5Lff.F90 | 73 +++++++++++++++++++++++++++++---------------------- fortran/src/H5Off.F90 | 4 +-- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 41f3d9d..6ad311d 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -4,9 +4,7 @@ ! MODULE H5L ! ! PURPOSE -! This file contains Fortran interfaces for H5L functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. +! This file contains Fortran interfaces for H5L functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -34,8 +32,8 @@ MODULE H5L + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT USE H5GLOBAL - USE ISO_C_BINDING IMPLICIT NONE @@ -119,8 +117,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & lcpl_id_default, lapl_id_default) BIND(C,name='h5lcopy_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: src_loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name INTEGER(HID_T), INTENT(IN) :: dest_loc_id @@ -183,8 +182,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) BIND(C,name='h5ldelete_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(HID_T) :: lapl_id_default @@ -246,8 +246,9 @@ CONTAINS link_loc_id, & link_name,link_name_len, & lcpl_id_default, lapl_id_default ) BIND(C,NAME='h5lcreate_soft_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: target_path INTEGER(SIZE_T) :: target_path_len INTEGER(HID_T), INTENT(IN) :: link_loc_id @@ -322,8 +323,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_hard_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(HID_T), INTENT(IN) :: link_loc_id @@ -399,8 +401,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_external_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: file_name CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(HID_T), INTENT(IN) :: link_loc_id @@ -487,8 +490,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) & BIND(C,NAME='h5ldelete_by_idx_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER, INTENT(IN) :: index_field @@ -548,8 +552,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) & BIND(C,NAME='h5lexists_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T), INTENT(IN) :: namelen @@ -647,8 +652,9 @@ CONTAINS INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & cset, corder, corder_valid, link_type, address, val_size, & lapl_id_default) BIND(C,NAME='h5lget_info_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HADDR_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: link_loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name INTEGER, INTENT(OUT) :: cset @@ -759,8 +765,9 @@ CONTAINS INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) & BIND(C,NAME='h5lget_info_by_idx_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name INTEGER(SIZE_T) :: group_namelen @@ -824,7 +831,7 @@ CONTAINS !***** INTERFACE INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') - USE H5GLOBAL + IMPLICIT NONE INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier END FUNCTION h5lis_registered_c END INTERFACE @@ -889,8 +896,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & dest_name, dest_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lmove_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: src_loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name @@ -976,8 +984,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & size_default, name, lapl_id_default) BIND(C,NAME='h5lget_name_by_idx_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - USE H5GLOBAL + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name @@ -1346,8 +1355,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & BIND(C, NAME='h5literate_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL + IMPORT :: c_ptr, c_funptr + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: group_id INTEGER, INTENT(IN) :: index_type INTEGER, INTENT(IN) :: order @@ -1430,8 +1440,9 @@ CONTAINS INTERFACE INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) , INTENT(IN) :: namelen diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index dbadc66..2ec4eeb 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -7,9 +7,7 @@ ! fortran/src/H5Off.f90 ! ! PURPOSE -! This file contains Fortran interfaces for H5O functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. +! This file contains Fortran interfaces for H5O functions. ! ! ! COPYRIGHT -- cgit v0.12 From 8bdafb38d7e493942d080bc741a3656a88e66f15 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Apr 2015 13:41:48 -0500 Subject: [svn-r26836] added BIND(C) to H5T APIs --- fortran/src/H5Off.F90 | 1 - fortran/src/H5Tf.c | 118 +-- fortran/src/H5Tff.F90 | 2026 +++++++++++++++++++++------------------------- fortran/src/H5f90proto.h | 187 ++--- 4 files changed, 1029 insertions(+), 1303 deletions(-) diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index 2ec4eeb..41ec394 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -38,7 +38,6 @@ MODULE H5O USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_LONG, C_INT, C_LOC USE H5GLOBAL - IMPLICIT NONE !****t* H5T (F03)/h5o_info_t diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 7e1aa42..7103ca2 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -46,7 +46,7 @@ * SOURCE */ int_f -nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) +h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) /******/ { char *c_name = NULL; @@ -101,7 +101,7 @@ done: * SOURCE */ int_f -nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, +h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -142,7 +142,7 @@ done: */ int_f -nh5tclose_c ( hid_t_f *type_id ) +h5tclose_c ( hid_t_f *type_id ) /******/ { int ret_value = 0; @@ -174,7 +174,7 @@ nh5tclose_c ( hid_t_f *type_id ) */ int_f -nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) +h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -209,7 +209,7 @@ nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) */ int_f -nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) +h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -257,7 +257,7 @@ nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) */ int_f -nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) +h5tget_class_c ( hid_t_f *type_id , int_f *classtype) /******/ { int ret_value = 0; @@ -310,7 +310,7 @@ nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) */ int_f -nh5tget_order_c ( hid_t_f *type_id , int_f *order) +h5tget_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = -1; @@ -353,7 +353,7 @@ nh5tget_order_c ( hid_t_f *type_id , int_f *order) */ int_f -nh5tset_order_c ( hid_t_f *type_id , int_f *order) +h5tset_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = 0; @@ -392,7 +392,7 @@ nh5tset_order_c ( hid_t_f *type_id , int_f *order) */ int_f -nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) +h5tget_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -427,7 +427,7 @@ nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) */ int_f -nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) +h5tset_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -463,7 +463,7 @@ nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) */ int_f -nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) +h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -497,7 +497,7 @@ nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) */ int_f -nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) +h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -534,7 +534,7 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) */ int_f -nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) +h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -570,7 +570,7 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) */ int_f -nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) +h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -609,7 +609,7 @@ nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) */ int_f -nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) +h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) /******/ { int ret_value = -1; @@ -651,7 +651,7 @@ nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) */ int_f -nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) +h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) /******/ { int ret_value = -1; @@ -688,7 +688,7 @@ nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) */ int_f -nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) +h5tget_sign_c ( hid_t_f *type_id , int_f *sign) /******/ { int ret_value = -1; @@ -722,7 +722,7 @@ nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) */ int_f -nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) +h5tset_sign_c ( hid_t_f *type_id , int_f* sign) /******/ { int ret_value = -1; @@ -763,7 +763,7 @@ nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) */ int_f -nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -806,7 +806,7 @@ nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* */ int_f -nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -848,7 +848,7 @@ nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* e */ int_f -nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -884,7 +884,7 @@ nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) */ int_f -nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -922,7 +922,7 @@ nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) */ int_f -nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) +h5tget_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -958,7 +958,7 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) */ int_f -nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) +h5tset_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -998,7 +998,7 @@ nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) */ int_f -nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) +h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) /******/ { int ret_value = -1; @@ -1038,7 +1038,7 @@ nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) */ int_f -nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) +h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) /******/ { int ret_value = -1; @@ -1077,7 +1077,7 @@ nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) */ int_f -nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) +h5tget_cset_c ( hid_t_f *type_id , int_f * cset) /******/ { int ret_value = -1; @@ -1116,7 +1116,7 @@ nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) */ int_f -nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) +h5tset_cset_c ( hid_t_f *type_id, int_f * cset) /******/ { int ret_value = -1; @@ -1153,7 +1153,7 @@ nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) * SOURCE */ int_f -nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) +h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) /******/ { int ret_value = -1; @@ -1192,7 +1192,7 @@ nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) */ int_f -nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) +h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) /******/ { int ret_value = -1; @@ -1230,7 +1230,7 @@ nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) */ int_f -nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) +h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) /******/ { int ret_value = -1; @@ -1266,7 +1266,7 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) */ int_f -nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) +h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) /******/ { int ret_value = -1; @@ -1307,7 +1307,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n * SOURCE */ int_f -nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) +h5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) /******/ { int ret_value = -1; @@ -1360,7 +1360,7 @@ DONE: */ int_f -nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) +h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) /******/ { int ret_value = -1; @@ -1393,7 +1393,7 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) */ int_f -nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) +h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1436,7 +1436,7 @@ DONE: */ int_f -nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) +h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) /******/ { int ret_value = -1; @@ -1473,7 +1473,7 @@ nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) */ int_f -nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) +h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) /******/ { int ret_value = -1; @@ -1512,7 +1512,7 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) */ int_f -nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) +h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /******/ { int ret_value = -1; @@ -1544,7 +1544,7 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) */ int_f -nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) +h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) /******/ { int ret_value = -1; @@ -1583,7 +1583,7 @@ nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) */ int_f -nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) +h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) /******/ { int ret_value = -1; @@ -1622,7 +1622,7 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_ */ int_f -nh5tpack_c(hid_t_f * type_id) +h5tpack_c(hid_t_f * type_id) /******/ { int ret_value = -1; @@ -1657,7 +1657,7 @@ nh5tpack_c(hid_t_f * type_id) * SOURCE */ int_f -nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) +h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1704,7 +1704,7 @@ DONE: */ int_f -nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) +h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -1740,7 +1740,7 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) */ int_f -nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1784,7 +1784,7 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) */ int_f -nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) +h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) /******/ { int ret_value = -1; @@ -1828,7 +1828,7 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) */ int_f -nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1867,7 +1867,7 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) */ int_f -nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) +h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) /******/ { int ret_value = -1; @@ -1904,7 +1904,7 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) * SOURCE */ int_f -nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) +h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) /******/ { int ret_value = -1; @@ -1942,7 +1942,7 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * SOURCE */ int_f -nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) +h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) /******/ { int ret_value = -1; @@ -1978,7 +1978,7 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) * SOURCE */ int_f -nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) +h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) /******/ { int ret_value = -1; @@ -2014,7 +2014,7 @@ nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) */ int_f -nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) +h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) /******/ { int ret_value = 0; @@ -2050,7 +2050,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) */ int_f -nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) +h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) /******/ { int ret_value = 0; @@ -2087,7 +2087,7 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * SOURCE */ int_f -nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, +h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -2121,7 +2121,7 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * SOURCE */ int_f -nh5tcommitted_c(hid_t_f *dtype_id) +h5tcommitted_c(hid_t_f *dtype_id) /******/ { int_f ret_value; @@ -2157,7 +2157,7 @@ nh5tcommitted_c(hid_t_f *dtype_id) */ int_f -nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) +h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -2201,7 +2201,7 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) */ int_f -nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -2270,7 +2270,7 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) */ int_f -nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) +h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) /******/ { int_f ret_value=-1; /* Return value */ @@ -2304,7 +2304,7 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) */ int_f -nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) +h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -2338,7 +2338,7 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) */ int_f -nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) +h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index d43db38..85666be 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -4,10 +4,7 @@ ! MODULE H5T ! ! PURPOSE -! This file contains Fortran interfaces for H5T functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! +! This file contains Fortran interfaces for H5T functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -35,8 +32,9 @@ MODULE H5T + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE !****t* H5T (F03)/hvl_t ! Fortran2003 Derived Type: @@ -87,24 +85,22 @@ CONTAINS ! SOURCE SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group - INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id !***** INTEGER :: namelen ! Name length INTEGER(HID_T) :: tapl_id_default INTERFACE - INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name + INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) BIND(C,NAME='h5topen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), INTENT(IN) :: name INTEGER :: namelen INTEGER(HID_T), INTENT(OUT) :: type_id INTEGER(HID_T) :: tapl_id_default @@ -174,14 +170,12 @@ CONTAINS INTERFACE INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name + lcpl_id_default, tcpl_id_default, tapl_id_default ) BIND(C,NAME='h5tcommit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T) :: lcpl_id_default @@ -229,25 +223,21 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: new_type_id - ! Identifier of datatype's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tcopy_c - END INTERFACE - - hdferr = h5tcopy_c(type_id, new_type_id) - END SUBROUTINE h5tcopy_f + INTERFACE + INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) BIND(C,NAME='h5tcopy_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tcopy_c + END INTERFACE + + hdferr = h5tcopy_c(type_id, new_type_id) + END SUBROUTINE h5tcopy_f ! !****s* H5T/h5tequal_f ! @@ -275,30 +265,27 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two - ! datatypes are equal - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: c_flag - INTERFACE - INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - INTEGER :: c_flag - END FUNCTION h5tequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5tequal_c(type1_id, type2_id, c_flag) - if(c_flag .gt. 0) flag = .TRUE. - END SUBROUTINE h5tequal_f + INTEGER :: c_flag + INTERFACE + INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) BIND(C,NAME='h5tequal_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER :: c_flag + END FUNCTION h5tequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5tequal_c(type1_id, type2_id, c_flag) + IF(c_flag .GT. 0) flag = .TRUE. + END SUBROUTINE h5tequal_f ! !****s* H5T/h5tclose_f ! @@ -324,22 +311,20 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tclose_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tclose_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tclose_c - END INTERFACE - - hdferr = h5tclose_c(type_id) - END SUBROUTINE h5tclose_f + INTERFACE + INTEGER FUNCTION h5tclose_c(type_id) BIND(C,NAME='h5tclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tclose_c + END INTERFACE + + hdferr = h5tclose_c(type_id) + END SUBROUTINE h5tclose_f ! !****s* H5T/h5tget_class_f ! @@ -384,11 +369,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tget_class_c(type_id, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c - !DEC$ENDIF + INTEGER FUNCTION h5tget_class_c(type_id, class) BIND(C,NAME='h5tget_class_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: class END FUNCTION h5tget_class_c @@ -422,24 +405,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tget_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTERFACE - INTEGER FUNCTION h5tget_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5tget_size_c - END INTERFACE - - hdferr = h5tget_size_c(type_id, size) - END SUBROUTINE h5tget_size_f + INTERFACE + INTEGER FUNCTION h5tget_size_c(type_id, size) BIND(C,NAME='h5tget_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5tget_size_c + END INTERFACE + + hdferr = h5tget_size_c(type_id, size) + END SUBROUTINE h5tget_size_f ! !****s* H5T/h5tset_size_f @@ -468,24 +449,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tset_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTERFACE - INTEGER FUNCTION h5tset_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5tset_size_c - END INTERFACE - - hdferr = h5tset_size_c(type_id, size) - END SUBROUTINE h5tset_size_f + INTERFACE + INTEGER FUNCTION h5tset_size_c(type_id, size) BIND(C,NAME='h5tset_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5tset_size_c + END INTERFACE + + hdferr = h5tset_size_c(type_id, size) + END SUBROUTINE h5tset_size_f ! !****s* H5T/h5tget_order_f @@ -526,11 +505,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5tget_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c - !DEC$ENDIF + INTEGER FUNCTION h5tget_order_c(type_id, order) BIND(C,NAME='h5tget_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: order END FUNCTION h5tget_order_c @@ -576,11 +553,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTERFACE - INTEGER FUNCTION h5tset_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c - !DEC$ENDIF + INTEGER FUNCTION h5tset_order_c(type_id, order) BIND(C,NAME='h5tset_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: order END FUNCTION h5tset_order_c @@ -614,25 +589,23 @@ CONTAINS ! port). March 7, 2001 ! ! SOURCE - SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5tget_precision_f(type_id, PRECISION, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision - END FUNCTION h5tget_precision_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5tget_precision_c(type_id, PRECISION) BIND(C,NAME='h5tget_precision_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: PRECISION + END FUNCTION h5tget_precision_c + END INTERFACE - hdferr = h5tget_precision_c(type_id, precision) - END SUBROUTINE h5tget_precision_f + hdferr = h5tget_precision_c(type_id, PRECISION) + END SUBROUTINE h5tget_precision_f ! !****s* H5T/h5tset_precision_f @@ -659,25 +632,23 @@ CONTAINS ! port). March 7, 2001 ! ! SOURCE - SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5tset_precision_f(type_id, PRECISION, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: PRECISION + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: precision - END FUNCTION h5tset_precision_c - END INTERFACE - - hdferr = h5tset_precision_c(type_id, precision) - END SUBROUTINE h5tset_precision_f + INTERFACE + INTEGER FUNCTION h5tset_precision_c (type_id, PRECISION) BIND(C,NAME='h5tset_precision_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: PRECISION + END FUNCTION h5tset_precision_c + END INTERFACE + + hdferr = h5tset_precision_c(type_id, PRECISION) + END SUBROUTINE h5tset_precision_f ! !****s* H5T/h5tget_offset_f @@ -704,26 +675,23 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_offset_c - END INTERFACE - - hdferr = h5tget_offset_c(type_id, offset) - END SUBROUTINE h5tget_offset_f - + INTERFACE + INTEGER FUNCTION h5tget_offset_c(type_id, offset) BIND(C,NAME='h5tget_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_offset_c + END INTERFACE + + hdferr = h5tget_offset_c(type_id, offset) + END SUBROUTINE h5tget_offset_f + ! !****s* H5T/h5tset_offset_f ! @@ -749,26 +717,23 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - END FUNCTION h5tset_offset_c - END INTERFACE - - hdferr = h5tset_offset_c(type_id, offset) - END SUBROUTINE h5tset_offset_f - + INTERFACE + INTEGER FUNCTION h5tset_offset_c(type_id, offset) BIND(C,NAME='h5tset_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + END FUNCTION h5tset_offset_c + END INTERFACE + + hdferr = h5tset_offset_c(type_id, offset) + END SUBROUTINE h5tset_offset_f + ! !****s* H5T/h5tget_pad_f ! @@ -785,11 +750,11 @@ CONTAINS ! lsbpad - least-significant bit padding type ! msbpad - most-significant bit padding type ! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 +! H5T_PAD_ERROR_F +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F +! H5T_PAD_NPAD_F ! hdferr - Returns 0 if successful and -1 if fails ! @@ -803,35 +768,24 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(OUT) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - END FUNCTION h5tget_pad_c - END INTERFACE - - hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tget_pad_f + INTERFACE + INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tget_pad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + END FUNCTION h5tget_pad_c + END INTERFACE + + hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tget_pad_f ! !****s* H5T/h5tset_pad_f @@ -865,35 +819,25 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(IN) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T_PAD_ZERO_F = 0 - ! H5T_PAD_ONE_F = 1 - ! H5T_PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: type_id - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - END FUNCTION h5tset_pad_c - END INTERFACE - - hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tset_pad_f - + INTERFACE + INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tset_pad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + END FUNCTION h5tset_pad_c + END INTERFACE + + hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tset_pad_f + ! !****s* H5T/h5tget_sign_f ! @@ -925,31 +869,24 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: sign ! sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - END FUNCTION h5tget_sign_c - END INTERFACE - - hdferr = h5tget_sign_c(type_id, sign) - END SUBROUTINE h5tget_sign_f - + INTERFACE + INTEGER FUNCTION h5tget_sign_c(type_id, sign) BIND(C,NAME='h5tget_sign_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + END FUNCTION h5tget_sign_c + END INTERFACE + + hdferr = h5tget_sign_c(type_id, sign) + END SUBROUTINE h5tget_sign_f + ! !****s* H5T/h5tset_sign_f ! @@ -981,30 +918,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: sign !sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tset_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - END FUNCTION h5tset_sign_c - END INTERFACE - - hdferr = h5tset_sign_c(type_id, sign) - END SUBROUTINE h5tset_sign_f + INTERFACE + INTEGER FUNCTION h5tset_sign_c(type_id, sign) BIND(C,NAME='h5tset_sign_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + END FUNCTION h5tset_sign_c + END INTERFACE + + hdferr = h5tset_sign_c(type_id, sign) + END SUBROUTINE h5tset_sign_f ! !****s* H5T/h5tget_fields_f @@ -1035,33 +964,32 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - END FUNCTION h5tget_fields_c - END INTERFACE - - hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tget_fields_f + INTERFACE + INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) & + BIND(C,NAME='h5tget_fields_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + END FUNCTION h5tget_fields_c + END INTERFACE + + hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tget_fields_f ! !****s* H5T/h5tset_fields_f @@ -1092,34 +1020,33 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - END FUNCTION h5tset_fields_c - END INTERFACE - - hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tset_fields_f - + INTERFACE + INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) & + BIND(C,NAME='h5tset_fields_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + END FUNCTION h5tset_fields_c + END INTERFACE + + hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tset_fields_f + ! !****s* H5T/h5tget_ebias_f ! @@ -1145,25 +1072,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - END FUNCTION h5tget_ebias_c - END INTERFACE - - hdferr = h5tget_ebias_c(type_id, ebias) - END SUBROUTINE h5tget_ebias_f + + INTERFACE + INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) BIND(C,NAME='h5tget_ebias_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + END FUNCTION h5tget_ebias_c + END INTERFACE + + hdferr = h5tget_ebias_c(type_id, ebias) + END SUBROUTINE h5tget_ebias_f ! !****s* H5T/h5tset_ebias_f @@ -1190,25 +1115,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - END FUNCTION h5tset_ebias_c - END INTERFACE - - hdferr = h5tset_ebias_c(type_id, ebias) - END SUBROUTINE h5tset_ebias_f + INTERFACE + INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) BIND(C,NAME='h5tset_ebias_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + END FUNCTION h5tset_ebias_c + END INTERFACE + + hdferr = h5tset_ebias_c(type_id, ebias) + END SUBROUTINE h5tset_ebias_f ! !****s* H5T/h5tget_norm_f @@ -1224,9 +1146,9 @@ CONTAINS ! type_id - datatype identifier ! OUTPUTS ! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) +! H5T_NORM_IMPLIED_F +! H5T_NORM_MSBSET_F +! H5T_NORM_NONE_F ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -1239,30 +1161,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - END FUNCTION h5tget_norm_c - END INTERFACE - - hdferr = h5tget_norm_c(type_id, norm) - END SUBROUTINE h5tget_norm_f + INTERFACE + INTEGER FUNCTION h5tget_norm_c(type_id, norm) BIND(C,NAME='h5tget_norm_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + END FUNCTION h5tget_norm_c + END INTERFACE + + hdferr = h5tget_norm_c(type_id, norm) + END SUBROUTINE h5tget_norm_f ! !****s* H5T/h5tset_norm_f @@ -1276,9 +1191,9 @@ CONTAINS ! INPUTS ! type_id - datatype identifier ! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) +! H5T_NORM_IMPLIED_F +! H5T_NORM_MSBSET_F +! H5T_NORM_NONE_F ! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails ! @@ -1293,29 +1208,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - END FUNCTION h5tset_norm_c - END INTERFACE - - hdferr = h5tset_norm_c(type_id, norm) - END SUBROUTINE h5tset_norm_f + INTERFACE + INTEGER FUNCTION h5tset_norm_c(type_id, norm) BIND(C,NAME='h5tset_norm_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + END FUNCTION h5tset_norm_c + END INTERFACE + + hdferr = h5tset_norm_c(type_id, norm) + END SUBROUTINE h5tset_norm_f ! !****s* H5T/h5tget_inpad_f @@ -1332,9 +1240,9 @@ CONTAINS ! OUTPUTS ! padtype - padding type for unused bits ! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -1347,30 +1255,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - END FUNCTION h5tget_inpad_c - END INTERFACE - - hdferr = h5tget_inpad_c(type_id, padtype) - END SUBROUTINE h5tget_inpad_f + INTERFACE + INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) BIND(C,NAME='h5tget_inpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + END FUNCTION h5tget_inpad_c + END INTERFACE + + hdferr = h5tget_inpad_c(type_id, padtype) + END SUBROUTINE h5tget_inpad_f ! !****s* H5T/h5tset_inpad_f @@ -1385,9 +1285,9 @@ CONTAINS ! type_id - datatype identifier ! padtype - padding type for unused bits ! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F ! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails ! @@ -1401,29 +1301,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - END FUNCTION h5tset_inpad_c - END INTERFACE - - hdferr = h5tset_inpad_c(type_id, padtype) - END SUBROUTINE h5tset_inpad_f + INTERFACE + INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) BIND(C,NAME='h5tset_inpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + END FUNCTION h5tset_inpad_c + END INTERFACE + + hdferr = h5tset_inpad_c(type_id, padtype) + END SUBROUTINE h5tset_inpad_f ! !****s* H5T/h5tget_cset_f @@ -1439,8 +1332,8 @@ CONTAINS ! OUTPUTS ! cset - Character set type of a string datatype ! Possible values are: -! H5T_CSET_ASCII_F = 0 -! H5T_CSET_UTF8_F +! H5T_CSET_ASCII_F +! H5T_CSET_UTF8_F ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -1453,27 +1346,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype - ! Possible values are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTERFACE - INTEGER FUNCTION h5tget_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - END FUNCTION h5tget_cset_c - END INTERFACE - - hdferr = h5tget_cset_c(type_id, cset) - END SUBROUTINE h5tget_cset_f + INTERFACE + INTEGER FUNCTION h5tget_cset_c(type_id, cset) BIND(C,NAME='h5tget_cset_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + END FUNCTION h5tget_cset_c + END INTERFACE + + hdferr = h5tget_cset_c(type_id, cset) + END SUBROUTINE h5tget_cset_f ! !****s* H5T/h5tset_cset_f @@ -1488,7 +1376,7 @@ CONTAINS ! type_id - datatype identifier ! cset - character set type of a string datatype ! Possible values are: -! H5T_CSET_ASCII_F = 0 +! H5T_CSET_ASCII_F ! H5T_CSET_UTF8_F ! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails @@ -1503,28 +1391,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: cset !character set type of a string datatype - ! Possible values of padding type are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - END FUNCTION h5tset_cset_c - END INTERFACE - - hdferr = h5tset_cset_c(type_id, cset) - END SUBROUTINE h5tset_cset_f - + INTERFACE + INTEGER FUNCTION h5tset_cset_c(type_id, cset) BIND(C,NAME='h5tset_cset_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + END FUNCTION h5tset_cset_c + END INTERFACE + + hdferr = h5tset_cset_c(type_id, cset) + END SUBROUTINE h5tset_cset_f ! !****s* H5T/h5tget_strpad_f ! @@ -1555,24 +1437,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: strpad - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - END FUNCTION h5tget_strpad_c - END INTERFACE - - hdferr = h5tget_strpad_c(type_id, strpad) - END SUBROUTINE h5tget_strpad_f + INTERFACE + INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) BIND(C,NAME='h5tget_strpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + END FUNCTION h5tget_strpad_c + END INTERFACE + + hdferr = h5tget_strpad_c(type_id, strpad) + END SUBROUTINE h5tget_strpad_f ! !****s* H5T/h5tset_strpad_f @@ -1589,8 +1469,8 @@ CONTAINS ! Possible values are: ! H5T_STR_NULLTERM_F, ! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F +! H5T_STR_SPACEPAD_F, +! H5T_STR_ERROR_F. ! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails ! @@ -1604,24 +1484,22 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - END FUNCTION h5tset_strpad_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) BIND(C,NAME='h5tset_strpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + END FUNCTION h5tset_strpad_c + END INTERFACE - hdferr = h5tset_strpad_c(type_id, strpad) - END SUBROUTINE h5tset_strpad_f + hdferr = h5tset_strpad_c(type_id, strpad) + END SUBROUTINE h5tset_strpad_f ! !****s* H5T/h5tget_nmembers_f @@ -1649,25 +1527,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - END FUNCTION h5tget_nmembers_c - END INTERFACE - - hdferr = h5tget_nmembers_c(type_id, num_members) - END SUBROUTINE h5tget_nmembers_f + INTERFACE + INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) BIND(C,NAME='h5tget_nmembers_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + END FUNCTION h5tget_nmembers_c + END INTERFACE + + hdferr = h5tget_nmembers_c(type_id, num_members) + END SUBROUTINE h5tget_nmembers_f ! !****s* H5T/h5tget_member_name_f @@ -1696,30 +1571,27 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve - CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of - !a compound datatype - INTEGER, INTENT(OUT) :: namelen ! Length of the name - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(LEN=*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: member_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(LEN=*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) - END SUBROUTINE h5tget_member_name_f + INTERFACE + INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) BIND(C,NAME='h5tget_member_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + END FUNCTION h5tget_member_name_c + END INTERFACE + + hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) + END SUBROUTINE h5tget_member_name_f ! !****s* H5T/h5tget_member_offset_f @@ -1747,27 +1619,24 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the field - !whose offset is requested - INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_member_offset_c - END INTERFACE - - hdferr = h5tget_member_offset_c(type_id, member_no, offset ) - END SUBROUTINE h5tget_member_offset_f + INTERFACE + INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) BIND(C,NAME='h5tget_member_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_member_offset_c + END INTERFACE + + hdferr = h5tget_member_offset_c(type_id, member_no, offset ) + END SUBROUTINE h5tget_member_offset_f ! !****s* H5T/h5tget_member_index_f ! @@ -1791,32 +1660,30 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name - INTEGER, INTENT(OUT) :: index ! Field or member index - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: index + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index - END FUNCTION h5tget_member_index_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tget_member_index_c(type_id, name, namelen, index) - END SUBROUTINE h5tget_member_index_f + INTEGER :: namelen ! Name length + INTERFACE + INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) BIND(C,NAME='h5tget_member_index_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: index + END FUNCTION h5tget_member_index_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tget_member_index_c(type_id, name, namelen, index) + END SUBROUTINE h5tget_member_index_f + ! !$! ! !$!****s* H5T/h5tget_member_dim_f @@ -1887,27 +1754,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype - ! dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5tget_array_dims_c - END INTERFACE - - hdferr = h5tget_array_dims_c(type_id, dims) - - END SUBROUTINE h5tget_array_dims_f + INTERFACE + INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) BIND(C,NAME='h5tget_array_dims_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5tget_array_dims_c + END INTERFACE + + hdferr = h5tget_array_dims_c(type_id, dims) + + END SUBROUTINE h5tget_array_dims_f ! !****s* H5T/h5tget_array_ndims_f @@ -1934,25 +1797,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER, INTENT(OUT) :: ndims ! number of array dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - END FUNCTION h5tget_array_ndims_c - END INTERFACE - - hdferr = h5tget_array_ndims_c(type_id, ndims) - - END SUBROUTINE h5tget_array_ndims_f + INTERFACE + INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) BIND(C,NAME='h5tget_array_ndims_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + END FUNCTION h5tget_array_ndims_c + END INTERFACE + + hdferr = h5tget_array_ndims_c(type_id, ndims) + + END SUBROUTINE h5tget_array_ndims_f ! !****s* H5T/h5tget_super_f @@ -1966,7 +1827,7 @@ CONTAINS ! INPUTS ! type_id - datatype identifier ! OUTPUTS -! base_type_id - identifier of the base type +! base_type_id - identifier of the base type ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -1979,26 +1840,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype - ! from which datatype (type_id) was derived - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - END FUNCTION h5tget_super_c - END INTERFACE - - hdferr = h5tget_super_c(type_id, base_type_id) - - END SUBROUTINE h5tget_super_f + INTERFACE + INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) BIND(C,NAME='h5tget_super_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + END FUNCTION h5tget_super_c + END INTERFACE + + hdferr = h5tget_super_c(type_id, base_type_id) + + END SUBROUTINE h5tget_super_f ! !****s* H5T/h5tget_member_type_f @@ -2014,7 +1872,7 @@ CONTAINS ! field_idx - field index (0-based) ! ! OUTPUTS -! datatype - idnetifier of the member's datatype +! datatype - identifier of the member's datatype ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -2027,27 +1885,25 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve - INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of - !the datatype of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - END FUNCTION h5tget_member_type_c - END INTERFACE - - hdferr = h5tget_member_type_c(type_id, field_idx , datatype) - END SUBROUTINE h5tget_member_type_f + INTERFACE + INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) & + BIND(C,NAME='h5tget_member_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + END FUNCTION h5tget_member_type_c + END INTERFACE + + hdferr = h5tget_member_type_c(type_id, field_idx , datatype) + END SUBROUTINE h5tget_member_type_f ! !****s* H5T/h5tcreate_f @@ -2087,11 +1943,9 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tcreate_c(class, size, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c - !DEC$ENDIF + INTEGER FUNCTION h5tcreate_c(class, size, type_id) BIND(C,NAME='h5tcreate_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER, INTENT(IN) :: class INTEGER(SIZE_T), INTENT(IN) :: size INTEGER(HID_T), INTENT(OUT) :: type_id @@ -2111,7 +1965,7 @@ CONTAINS ! Adds a new member to a compound datatype. ! ! INPUTS -! type_id - compound dattype identifier +! type_id - compound datatype identifier ! name - name of the field to insert ! offset - start of the member in an instance of ! the compound datatype @@ -2129,36 +1983,32 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert - INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of - !the compound datatype - INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member - - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER :: namelen - END FUNCTION h5tinsert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) - END SUBROUTINE h5tinsert_f + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) BIND(C,NAME='h5tinsert_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER :: namelen + END FUNCTION h5tinsert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) + END SUBROUTINE h5tinsert_f + ! !****s* H5T/h5tpack_f ! @@ -2183,24 +2033,21 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tpack_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tpack_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tpack_c - END INTERFACE - - hdferr = h5tpack_c(type_id) - END SUBROUTINE h5tpack_f - + INTERFACE + INTEGER FUNCTION h5tpack_c(type_id) BIND(C,NAME='h5tpack_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tpack_c + END INTERFACE + + hdferr = h5tpack_c(type_id) + END SUBROUTINE h5tpack_f + ! !$! ! !$!****s* H5T/h5tinsert_array_f ! !$! @@ -2279,29 +2126,27 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype - INTEGER, INTENT(IN) :: rank ! Rank of the array - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension - INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tarray_create_c - END INTERFACE - - hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - - END SUBROUTINE h5tarray_create_f + INTERFACE + INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) BIND(C,NAME='h5tarray_create_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tarray_create_c + END INTERFACE + + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) + + END SUBROUTINE h5tarray_create_f ! !****s* H5T/h5tenum_create_f @@ -2328,28 +2173,23 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for - ! the base datatype - INTEGER(HID_T), INTENT(OUT) :: new_type_id - !datatype identifier for the - ! new enumeration datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tenum_create_c - END INTERFACE - - hdferr = h5tenum_create_c(parent_id, new_type_id) - END SUBROUTINE h5tenum_create_f + INTERFACE + INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) BIND(C,NAME='h5tenum_create_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tenum_create_c + END INTERFACE + + hdferr = h5tenum_create_c(parent_id, new_type_id) + END SUBROUTINE h5tenum_create_f ! !****s* H5T/h5tenum_nameof_f ! @@ -2384,33 +2224,29 @@ CONTAINS ! characters the "name' may contain upon entry, depending on compiler implementation. ! SOURCE SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. - INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name - INTEGER, INTENT(IN) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr !***** + INTERFACE + INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) BIND(C,NAME='h5tenum_nameof_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + END FUNCTION h5tenum_nameof_c + END INTERFACE + + name(1:LEN(name)) = ' ' - INTERFACE - INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - END FUNCTION h5tenum_nameof_c - END INTERFACE - - name(1:LEN(name)) = ' ' - - hdferr = h5tenum_nameof_c(type_id, value, name, namelen) - END SUBROUTINE h5tenum_nameof_f - + hdferr = h5tenum_nameof_c(type_id, value, name, namelen) + END SUBROUTINE h5tenum_nameof_f ! !****s* H5T/h5tenum_valuof_f ! @@ -2439,31 +2275,30 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tenum_valueof_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_valueof_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_valueof_f + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) & + BIND(C,NAME='h5tenum_valueof_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tenum_valueof_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_valueof_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_valueof_f ! !****s* H5T/h5tget_member_value_f @@ -2491,28 +2326,26 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr !***** - - INTERFACE - INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_value_c(type_id, member_no, value) - END SUBROUTINE h5tget_member_value_f - + INTERFACE + INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) & + BIND(C,NAME='h5tget_member_value_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tget_member_value_c + END INTERFACE + + hdferr = h5tget_member_value_c(type_id, member_no, value) + END SUBROUTINE h5tget_member_value_f + ! !****s* H5T/h5tset_tag_f ! @@ -2539,31 +2372,28 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which - !the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: tag + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: taglen - - INTERFACE - INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: tag - INTEGER :: taglen - END FUNCTION h5tset_tag_c - END INTERFACE - - taglen = LEN(tag) - hdferr = h5tset_tag_c(type_id, tag, taglen) - END SUBROUTINE h5tset_tag_f - + INTEGER :: taglen + + INTERFACE + INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) BIND(C,NAME='h5tset_tag_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: tag + INTEGER :: taglen + END FUNCTION h5tset_tag_c + END INTERFACE + + taglen = LEN(tag) + hdferr = h5tset_tag_c(type_id, tag, taglen) + END SUBROUTINE h5tset_tag_f + ! !****s* H5T/h5tget_tag_f ! @@ -2578,6 +2408,7 @@ CONTAINS ! OUTPUTS ! tag - unique ASCII string associated with opaque ! datatype +! taglen - Length of tag ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -2590,33 +2421,30 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which - ! the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: taglen ! Length of tag - INTEGER(SIZE_T) :: tag_size ! Declared character length of tab - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: tag + INTEGER, INTENT(OUT) :: taglen + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER(SIZE_T), INTENT(IN) :: tag_size - INTEGER, INTENT(OUT) :: taglen - END FUNCTION h5tget_tag_c - END INTERFACE - - tag_size = LEN(tag) - - hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) - END SUBROUTINE h5tget_tag_f - + INTEGER(SIZE_T):: tag_size ! Declared character length of tab + INTERFACE + INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) & + BIND(C,NAME='h5tget_tag_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: tag + INTEGER(SIZE_T), INTENT(IN) :: tag_size + INTEGER, INTENT(OUT) :: taglen + END FUNCTION h5tget_tag_c + END INTERFACE + + tag_size = LEN(tag) + hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) + END SUBROUTINE h5tget_tag_f + ! !****s* H5T/h5tvlen_create_f ! @@ -2641,24 +2469,22 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - END FUNCTION h5tvlen_create_c - END INTERFACE - - hdferr = h5tvlen_create_c(type_id, vltype_id) - END SUBROUTINE h5tvlen_create_f + INTERFACE + INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) BIND(C,NAME='h5tvlen_create_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + END FUNCTION h5tvlen_create_c + END INTERFACE + + hdferr = h5tvlen_create_c(type_id, vltype_id) + END SUBROUTINE h5tvlen_create_f ! !****s* H5T/h5tis_variable_str_f @@ -2673,7 +2499,7 @@ CONTAINS ! type_id - datartpe identifier ! OUTPUTS ! status - flag to indicate if datatype -! is a variable string +! is a variable string ( TRUE or FALSE) ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -2682,32 +2508,29 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype - ! is a variable string or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: flag - END FUNCTION h5tis_variable_str_c - END INTERFACE - - hdferr = h5tis_variable_str_c(type_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5tis_variable_str_f - + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) & + BIND(C,NAME='h5tis_variable_str_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: flag + END FUNCTION h5tis_variable_str_c + END INTERFACE + + hdferr = h5tis_variable_str_c(type_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5tis_variable_str_f + ! !****s* H5T/h5tget_member_class_f ! @@ -2743,27 +2566,26 @@ CONTAINS ! ! SOURCE SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no ! Member number - INTEGER, INTENT(OUT) :: class ! Member class - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_member_class_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) & + BIND(C,NAME='h5tget_member_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_member_class_c + END INTERFACE - hdferr = h5tget_member_class_c(type_id, member_no, class) + hdferr = h5tget_member_class_c(type_id, member_no, class) - END SUBROUTINE h5tget_member_class_f + END SUBROUTINE h5tget_member_class_f ! !****s* H5T/h5tcommit_anon_f @@ -2796,27 +2618,20 @@ CONTAINS ! SOURCE SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying - ! the file in which the new named datatype - ! is to be created. - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property - ! list identifier. - ! (H5P_DEFAULT_F for the default property list.) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. - ! should always be passed as the value H5P_DEFAULT_F. + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id !***** INTEGER(HID_T) :: tcpl_id_default INTEGER(HID_T) :: tapl_id_default INTERFACE INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c - !DEC$ENDIF + tcpl_id_default, tapl_id_default) BIND(C,NAME='h5tcommit_anon_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER(HID_T) :: tcpl_id_default @@ -2858,19 +2673,14 @@ CONTAINS ! SOURCE SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier - LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed - !.FALSE., if the datatype has not been committed. - INTEGER, INTENT(OUT) :: hdferr ! Error code: -! Success: 0 -! Failure: -1 + INTEGER(HID_T), INTENT(IN) :: dtype_id + LOGICAL, INTENT(OUT) :: committed + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tcommitted_c(dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c - !DEC$ENDIF + INTEGER FUNCTION h5tcommitted_c(dtype_id) BIND(C,NAME='h5tcommitted_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id END FUNCTION h5tcommitted_c END INTERFACE @@ -2887,7 +2697,6 @@ CONTAINS hdferr = -1 ENDIF - END SUBROUTINE h5tcommitted_f ! @@ -2899,10 +2708,10 @@ CONTAINS ! PURPOSE ! Decode a binary object description of data type and return a new object handle. ! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID ! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! M. Scot Breitenfeld @@ -2911,18 +2720,16 @@ CONTAINS ! SOURCE SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER FUNCTION h5tdecode_c(buf, obj_id) BIND(C,NAME='h5tdecode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID END FUNCTION h5tdecode_c END INTERFACE @@ -2954,21 +2761,19 @@ CONTAINS ! SOURCE SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf + INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5tencode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf INTEGER(SIZE_T), INTENT(INOUT) :: nalloc END FUNCTION h5tencode_c END INTERFACE @@ -2999,17 +2804,14 @@ CONTAINS ! SOURCE SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c - !DEC$ENDIF + INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) BIND(C,NAME='h5tget_create_plist_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER(HID_T), INTENT(OUT) :: dtpl_id END FUNCTION h5tget_create_plist_c @@ -3040,20 +2842,17 @@ CONTAINS ! SOURCE SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. - INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. - LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: c_flag INTERFACE - INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c - !DEC$ENDIF + INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) BIND(C,NAME='h5tcompiler_conv_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: src_id INTEGER(HID_T), INTENT(IN) :: dst_id INTEGER :: c_flag @@ -3080,9 +2879,10 @@ CONTAINS ! dtype_id - Datatype identifier for the dataset datatype. ! ! direction - Direction of search: -! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ -! H5T_DIR_ASCEND = 1, /*in inscendent order */ -! H5T_DIR_DESCEND = 2 /*in descendent order */ +! H5T_DIR_DEFAULT, default direction is inscendent, +! H5T_DIR_ASCEND , in inscendent order, +! H5T_DIR_DESCEND, in descendent order. +! ! * NOTE: In C it is defined as a structure: H5T_direction_t ! ! OUTPUTS @@ -3094,20 +2894,15 @@ CONTAINS ! SOURCE SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(IN) :: direction ! Direction of search: - ! H5T_DIR_ASCEND_F = 1 in inscendent order - ! H5T_DIR_DESCEND_F = 2 in descendent order - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c - !DEC$ENDIF + INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) BIND(C,NAME='h5tget_native_type_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER, INTENT(IN) :: direction INTEGER(HID_T), INTENT(OUT) :: native_dtype_id @@ -3143,7 +2938,6 @@ CONTAINS ! ! Fortran2003 Interface: SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_id INTEGER(HID_T) , INTENT(IN) :: dst_id @@ -3159,8 +2953,8 @@ CONTAINS INTERFACE INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & BIND(C, NAME='h5tconvert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_id INTEGER(HID_T) , INTENT(IN) :: dst_id @@ -3207,21 +3001,19 @@ CONTAINS ! SOURCE SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value ! value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: namelen INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) BIND(C,NAME='h5tenum_insert_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: value INTEGER :: namelen END FUNCTION h5tenum_insert_c @@ -3255,8 +3047,6 @@ CONTAINS ! F2003 implementation of function ! SOURCE SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name @@ -3268,10 +3058,10 @@ CONTAINS INTERFACE INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & BIND(C, NAME='h5tenum_insert_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen TYPE(C_PTR), VALUE :: value diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index fe3d37a..5140f30 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -498,135 +498,72 @@ H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id, /* * Functions form H5Tf.c file */ -#define nh5topen_c H5_FC_FUNC_(h5topen_c, H5TOPEN_C) -#define nh5tcommit_c H5_FC_FUNC_(h5tcommit_c, H5TCOMMIT_C) -#define nh5tcommitted_c H5_FC_FUNC_(h5tcommitted_c, H5TCOMMITTED_C) -#define nh5tclose_c H5_FC_FUNC_(h5tclose_c, H5TCLOSE_C) -#define nh5tcopy_c H5_FC_FUNC_(h5tcopy_c, H5TCOPY_C) -#define nh5tequal_c H5_FC_FUNC_(h5tequal_c, H5TEQUAL_C) -#define nh5tget_class_c H5_FC_FUNC_(h5tget_class_c, H5TGET_CLASS_C) -#define nh5tget_order_c H5_FC_FUNC_(h5tget_order_c, H5TGET_ORDER_C) -#define nh5tset_order_c H5_FC_FUNC_(h5tset_order_c, H5TSET_ORDER_C) -#define nh5tget_size_c H5_FC_FUNC_(h5tget_size_c, H5TGET_SIZE_C) -#define nh5tset_size_c H5_FC_FUNC_(h5tset_size_c, H5TSET_SIZE_C) -#define nh5tget_precision_c H5_FC_FUNC_(h5tget_precision_c, H5TGET_PRECISION_C) -#define nh5tset_precision_c H5_FC_FUNC_(h5tset_precision_c, H5TSET_PRECISION_C) -#define nh5tget_offset_c H5_FC_FUNC_(h5tget_offset_c, H5TGET_OFFSET_C) -#define nh5tset_offset_c H5_FC_FUNC_(h5tset_offset_c, H5TSET_OFFSET_C) -#define nh5tget_pad_c H5_FC_FUNC_(h5tget_pad_c, H5TGET_PAD_C) -#define nh5tset_pad_c H5_FC_FUNC_(h5tset_pad_c, H5TSET_PAD_C) -#define nh5tget_sign_c H5_FC_FUNC_(h5tget_sign_c, H5TGET_SIGN_C) -#define nh5tset_sign_c H5_FC_FUNC_(h5tset_sign_c, H5TSET_SIGN_C) -#define nh5tget_fields_c H5_FC_FUNC_(h5tget_fields_c, H5TGET_FIELDS_C) -#define nh5tset_fields_c H5_FC_FUNC_(h5tset_fields_c, H5TSET_FIELDS_C) -#define nh5tget_ebias_c H5_FC_FUNC_(h5tget_ebias_c, H5TGET_EBIAS_C) -#define nh5tset_ebias_c H5_FC_FUNC_(h5tset_ebias_c, H5TSET_EBIAS_C) -#define nh5tget_norm_c H5_FC_FUNC_(h5tget_norm_c, H5TGET_NORM_C) -#define nh5tset_norm_c H5_FC_FUNC_(h5tset_norm_c, H5TSET_NORM_C) -#define nh5tget_inpad_c H5_FC_FUNC_(h5tget_inpad_c, H5TGET_INPAD_C) -#define nh5tset_inpad_c H5_FC_FUNC_(h5tset_inpad_c, H5TSET_INPAD_C) -#define nh5tget_cset_c H5_FC_FUNC_(h5tget_cset_c, H5TGET_CSET_C) -#define nh5tset_cset_c H5_FC_FUNC_(h5tset_cset_c, H5TSET_CSET_C) -#define nh5tget_strpad_c H5_FC_FUNC_(h5tget_strpad_c, H5TGET_STRPAD_C) -#define nh5tset_strpad_c H5_FC_FUNC_(h5tset_strpad_c, H5TSET_STRPAD_C) -#define nh5tget_nmembers_c H5_FC_FUNC_(h5tget_nmembers_c, H5TGET_NMEMBERS_C) -#define nh5tget_member_name_c H5_FC_FUNC_(h5tget_member_name_c, H5TGET_MEMBER_NAME_C) -#define nh5tget_member_offset_c H5_FC_FUNC_(h5tget_member_offset_c, H5TGET_MEMBER_OFFSET_C) -#define nh5tget_member_dims_c H5_FC_FUNC_(h5tget_member_dims_c, H5TGET_MEMBER_DIMS_C) -#define nh5tget_member_type_c H5_FC_FUNC_(h5tget_member_type_c, H5TGET_MEMBER_TYPE_C) -#define nh5tget_member_index_c H5_FC_FUNC_(h5tget_member_index_c, H5TGET_MEMBER_INDEX_C) -#define nh5tinsert_c H5_FC_FUNC_(h5tinsert_c, H5TINSERT_C) -#define nh5tcreate_c H5_FC_FUNC_(h5tcreate_c, H5TCREATE_C) -#define nh5tpack_c H5_FC_FUNC_(h5tpack_c, H5TPACK_C) -#define nh5tinsert_array_c H5_FC_FUNC_(h5tinsert_array_c, H5TINSERT_ARRAY_C) -#define nh5tinsert_array_c2 H5_FC_FUNC_(h5tinsert_array_c2, H5TINSERT_ARRAY_C2) -#define nh5tenum_create_c H5_FC_FUNC_(h5tenum_create_c, H5TENUM_CREATE_C) -#define nh5tenum_insert_c H5_FC_FUNC_(h5tenum_insert_c, H5TENUM_INSERT_C) -#define nh5tenum_nameof_c H5_FC_FUNC_(h5tenum_nameof_c, H5TENUM_NAMEOF_C) -#define nh5tenum_valueof_c H5_FC_FUNC_(h5tenum_valueof_c, H5TENUM_VALUEOF_C) -#define nh5tget_member_value_c H5_FC_FUNC_(h5tget_member_value_c, H5TGET_MEMBER_VALUE_C) -#define nh5tset_tag_c H5_FC_FUNC_(h5tset_tag_c, H5TSET_TAG_C) -#define nh5tget_tag_c H5_FC_FUNC_(h5tget_tag_c, H5TGET_TAG_C) -#define nh5tarray_create_c H5_FC_FUNC_(h5tarray_create_c, H5TARRAY_CREATE_C) -#define nh5tget_array_ndims_c H5_FC_FUNC_(h5tget_array_ndims_c, H5TGET_ARRAY_NDIMS_C) -#define nh5tget_array_dims_c H5_FC_FUNC_(h5tget_array_dims_c, H5TGET_ARRAY_DIMS_C) -#define nh5tget_super_c H5_FC_FUNC_(h5tget_super_c, H5TGET_SUPER_C) -#define nh5tvlen_create_c H5_FC_FUNC_(h5tvlen_create_c, H5TVLEN_CREATE_C) -#define nh5tis_variable_str_c H5_FC_FUNC_(h5tis_variable_str_c, H5TIS_VARIABLE_STR_C) -#define nh5tget_member_class_c H5_FC_FUNC_(h5tget_member_class_c, H5TGET_MEMBER_CLASS_C) -#define nh5tcommit_anon_c H5_FC_FUNC_(h5tcommit_anon_c, H5TCOMMIT_ANON_C) -#define nh5tdecode_c H5_FC_FUNC_(h5tdecode_c, H5TDECODE_C) -#define nh5tencode_c H5_FC_FUNC_(h5tencode_c, H5TENCODE_C) -#define nh5tget_create_plist_c H5_FC_FUNC_(h5tget_create_plist_c, H5TGET_CREATE_PLIST_C) -#define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C) -#define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C ) -H5_FCDLL int_f nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); -H5_FCDLL int_f nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); -H5_FCDLL int_f nh5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f nh5tclose_c ( hid_t_f *type_id ); -H5_FCDLL int_f nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); -H5_FCDLL int_f nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id); -H5_FCDLL int_f nh5tget_class_c ( hid_t_f *type_id , int_f *classtype); -H5_FCDLL int_f nh5tget_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f nh5tset_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f nh5tget_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f nh5tset_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f nh5tcommitted_c (hid_t_f *dtype_id); -H5_FCDLL int_f nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); -H5_FCDLL int_f nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); -H5_FCDLL int_f nh5tget_sign_c ( hid_t_f *type_id , int_f* sign); -H5_FCDLL int_f nh5tset_sign_c ( hid_t_f *type_id , int_f *sign); -H5_FCDLL int_f nh5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f nh5tget_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f nh5tset_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f nh5tget_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f nh5tget_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f nh5tset_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f nh5tget_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members); -H5_FCDLL int_f nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); -H5_FCDLL int_f nh5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); -H5_FCDLL int_f nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); -H5_FCDLL int_f nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); -H5_FCDLL int_f nh5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); -H5_FCDLL int_f nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); -H5_FCDLL int_f nh5tpack_c(hid_t_f * type_id); -H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); -H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); -H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); -H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); +H5_FCDLL int_f h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); +H5_FCDLL int_f h5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f h5tclose_c ( hid_t_f *type_id ); +H5_FCDLL int_f h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); +H5_FCDLL int_f h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tget_class_c ( hid_t_f *type_id , int_f *classtype); +H5_FCDLL int_f h5tget_order_c ( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tset_order_c ( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tget_size_c ( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tset_size_c ( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tcommitted_c (hid_t_f *dtype_id); +H5_FCDLL int_f h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); +H5_FCDLL int_f h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); +H5_FCDLL int_f h5tget_sign_c ( hid_t_f *type_id , int_f* sign); +H5_FCDLL int_f h5tset_sign_c ( hid_t_f *type_id , int_f *sign); +H5_FCDLL int_f h5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tget_norm_c ( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tset_norm_c ( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tget_inpad_c ( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tget_cset_c ( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tset_cset_c ( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tget_strpad_c ( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members); +H5_FCDLL int_f h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); +H5_FCDLL int_f h5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); +H5_FCDLL int_f h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); +H5_FCDLL int_f h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); +H5_FCDLL int_f h5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); +H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); +H5_FCDLL int_f h5tpack_c(hid_t_f * type_id); +H5_FCDLL int_f h5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); +H5_FCDLL int_f h5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); +H5_FCDLL int_f h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); -H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); -H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); -H5_FCDLL int_f nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); -H5_FCDLL int_f nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); -H5_FCDLL int_f nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); -H5_FCDLL int_f nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims); -H5_FCDLL int_f nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims); -H5_FCDLL int_f nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); -H5_FCDLL int_f nh5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id); -H5_FCDLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); -H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ); -H5_FCDLL int_f nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id); -H5_FCDLL int_f nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); -H5_FCDLL int_f nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); +H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); +H5_FCDLL int_f h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); +H5_FCDLL int_f h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); +H5_FCDLL int_f h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); +H5_FCDLL int_f h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); +H5_FCDLL int_f h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims); +H5_FCDLL int_f h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims); +H5_FCDLL int_f h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); +H5_FCDLL int_f h5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id); +H5_FCDLL int_f h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); +H5_FCDLL int_f h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ); +H5_FCDLL int_f h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f h5tdecode_c ( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id); +H5_FCDLL int_f h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); +H5_FCDLL int_f h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id); - /* * Functions from H5Of.c */ -- cgit v0.12 From baa46f9e4351f2d8b21cf150873d3972d3f77bf9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 20 Apr 2015 10:46:05 -0500 Subject: [svn-r26845] H5P and H5A BIND(C) added to APIs --- fortran/src/H5Af.c | 320 +++---- fortran/src/H5Aff.F90 | 161 ++-- fortran/src/H5Pf.c | 304 +++--- fortran/src/H5Pff.F90 | 1543 +++++++++++------------------- fortran/src/H5_DBLE_InterfaceInclude.F90 | 230 ++--- fortran/src/H5f90proto.h | 722 +++++--------- 6 files changed, 1258 insertions(+), 2022 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index b9ca82a..e71887d 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -48,7 +48,7 @@ * SOURCE */ int_f -nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, +h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id) /*******/ { @@ -94,7 +94,7 @@ done: * SOURCE */ int_f -nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) +h5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) /*******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -140,92 +140,92 @@ done: * SOURCE */ int_f -nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } @@ -249,254 +249,254 @@ nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) * HISTORY * dims parameter added * April 4, 2001 - * Added nh5awrite_integer(real,double)_s,1-7 functions to eliminate + * Added h5awrite_integer(real,double)_s,1-7 functions to eliminate * complains about wrong parameters types in h5awrite_c function * called by Fortran routines. * October 9, 2006 EIP * SOURCE */ int_f -nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { /* * Call h5awrite_c function. */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); + return h5awrite_c(attr_id, mem_type_id, buf, dims); } int_f -nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) +h5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ { int_f ret_value=0; /* Return value */ @@ -532,98 +532,98 @@ done: * HISTORY * dims parameter added. * April 4, 2001 - * Added nh5areadc_s,1-7 functions to eliminate + * Added h5areadc_s,1-7 functions to eliminate * complains about wrong parameters types in h5awrite_c function * called by Fortran routines. * October 9, 2006 EIP * SOURCE */ int_f -nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } int_f -nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +h5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); + return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } @@ -648,14 +648,14 @@ nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) * HISTORY * dims paramete added. * April 4, 2001 - * Added nh5aread_integer(real,double)_s,1-7 functions to eliminate + * Added h5aread_integer(real,double)_s,1-7 functions to eliminate * complains about wrong parameters types in h5awrite_c function * called by Fortran routines. * October 9, 2006 EIP * SOURCE */ int_f -nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { int_f ret_value=0; /* Return value */ @@ -671,243 +671,243 @@ done: } int_f -nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } int_f -nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) +h5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) /******/ { /* * Call h5aread_c function. */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); + return h5aread_c(attr_id, mem_type_id, buf, dims); } @@ -929,7 +929,7 @@ nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNU */ int_f -nh5aclose_c ( hid_t_f *attr_id ) +h5aclose_c ( hid_t_f *attr_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -1006,7 +1006,7 @@ done: * SOURCE */ int_f -nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) +h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -1041,7 +1041,7 @@ done: * SOURCE */ int_f -nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) +h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) /******/ { int_f ret_value=0; /* Return value */ @@ -1075,7 +1075,7 @@ done: * SOURCE */ int_f -nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) +h5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) /******/ { int_f ret_value=0; /* Return value */ @@ -1148,7 +1148,7 @@ done: * SOURCE */ int_f -nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) +h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) /******/ { size_t c_bufsize; @@ -1199,7 +1199,7 @@ done: */ int_f -nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) +h5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) /******/ { int_f ret_value=0; /* Return value */ @@ -1231,7 +1231,7 @@ done: */ int_f -nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) +h5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) /******/ { int_f ret_value=0; /* Return value */ @@ -1271,7 +1271,7 @@ done: */ int_f -nh5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ) @@ -1326,7 +1326,7 @@ done: * SOURCE */ int_f -nh5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) +h5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) /******/ { char *c_attr_name = NULL; /* Buffer to hold C string */ @@ -1374,7 +1374,7 @@ done: * SOURCE */ int_f -nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) +h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) /******/ { char *c_obj_name = NULL; /* Buffer to hold C string */ @@ -1427,7 +1427,7 @@ done: * SOURCE */ int_f -nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -1497,7 +1497,7 @@ done: * SOURCE */ int_f -nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id) /******/ @@ -1580,7 +1580,7 @@ done: * SOURCE */ int_f -nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) /******/ { @@ -1630,7 +1630,7 @@ done: * SOURCE */ int_f -nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) /******/ { @@ -1699,7 +1699,7 @@ done: * SOURCE */ int_f -nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -1766,7 +1766,7 @@ done: * SOURCE */ int_f -nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -1841,7 +1841,7 @@ done: * SOURCE */ int_f -nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) @@ -1896,7 +1896,7 @@ done: * SOURCE */ int_f -nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) +h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -1944,7 +1944,7 @@ done: * SOURCE */ int_f -nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists) /******/ { @@ -1999,7 +1999,7 @@ done: * SOURCE */ int_f -nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id) /******/ { @@ -2053,7 +2053,7 @@ nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd */ int_f -nh5arename_c( hid_t_f *loc_id, +h5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen) /******/ diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 007eff0..6518f10 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -555,19 +555,16 @@ CONTAINS INTERFACE INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, name + n, name, size_default, lapl_id_default) BIND(C,NAME='h5aget_name_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n - - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name INTEGER(SIZE_T) :: size_default INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen @@ -910,18 +907,16 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) + lapl_id_default) BIND(C,NAME='h5arename_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(SIZE_T) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name INTEGER(SIZE_T) :: new_attr_namelen INTEGER(HID_T) :: lapl_id_default @@ -981,14 +976,12 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTERFACE - INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) & + BIND(C,NAME='h5aopen_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(HID_T) :: aapl_id_default INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T), INTENT(OUT) :: attr_id @@ -1066,14 +1059,13 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) & + BIND(C,NAME='h5adelete_by_idx_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n @@ -1128,15 +1120,13 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) & + BIND(C,NAME='h5adelete_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: attr_namelen INTEGER(SIZE_T) :: obj_namelen @@ -1208,14 +1198,11 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) + aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_idx_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n @@ -1276,11 +1263,9 @@ CONTAINS INTEGER :: corder_valid INTERFACE - INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_c') IMPORT :: HID_T, HSIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c - !DEC$ENDIF + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER, INTENT(OUT) :: corder_valid @@ -1360,15 +1345,12 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) + INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_idx_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER, INTENT(IN) :: idx_type INTEGER, INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(IN) :: n @@ -1446,16 +1428,14 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) + corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T) :: lapl_id_default INTEGER, INTENT(OUT) :: corder_valid @@ -1532,16 +1512,15 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) & + BIND(C,NAME='h5acreate_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id @@ -1602,14 +1581,12 @@ CONTAINS INTEGER(SIZE_T) :: attr_namelen INTERFACE - INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) BIND(C,NAME='h5aexists_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(SIZE_T) :: attr_namelen INTEGER(HID_T) :: attr_exists_c END FUNCTION H5Aexists_c @@ -1667,16 +1644,15 @@ CONTAINS INTEGER(HID_T) :: lapl_id_default INTERFACE - INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + lapl_id_default, attr_exists_c) BIND(C,NAME='h5aexists_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T), INTENT(IN) :: lapl_id_default INTEGER, INTENT(OUT) :: attr_exists_c @@ -1741,16 +1717,14 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) + aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_name_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name INTEGER(SIZE_T), INTENT(IN) :: attr_namelen INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default @@ -1811,18 +1785,15 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) BIND(C,NAME='h5arename_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name INTEGER(SIZE_T) :: new_attr_namelen - END FUNCTION H5Arename_c END INTERFACE diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index fa25703..bee2806 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -60,7 +60,7 @@ */ int_f -nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) +h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) /******/ { hid_t c_prp_id; @@ -93,7 +93,7 @@ done: */ int_f -nh5pclose_c ( hid_t_f *prp_id ) +h5pclose_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -123,7 +123,7 @@ nh5pclose_c ( hid_t_f *prp_id ) * SOURCE */ int_f -nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) +h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) /******/ { hid_t c_new_prp_id; @@ -158,7 +158,7 @@ done: * SOURCE */ int_f -nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) +h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) /******/ { htri_t c_c_flag; @@ -193,7 +193,7 @@ done: */ int_f -nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) +h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) /******/ { hid_t c_classtype; @@ -226,7 +226,7 @@ done: */ int_f -nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) +h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -261,7 +261,7 @@ nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) +h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -292,7 +292,7 @@ nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level) +h5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /******/ { int ret_value = 0; @@ -328,7 +328,7 @@ nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level) */ int_f -nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) +h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -372,7 +372,7 @@ DONE: */ int_f -nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) +h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -411,7 +411,7 @@ nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) * SOURCE */ int_f -nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) +h5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) /******/ { int ret_value = -1; @@ -462,7 +462,7 @@ h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) } int_f -nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) /******/ { /* @@ -472,7 +472,7 @@ nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue } int_f -nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) { /* * Call h5pset_fill_value_c function. @@ -481,7 +481,7 @@ nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) } int_f -nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) { /* * Call h5pset_fill_value_c function. @@ -504,13 +504,13 @@ nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) * Elena Pourmal * Saturday, August 14, 1999 * HISTORY - * Fixed wrong call to C wrapper, was nh5pset_fill_value_c, changed - * to nh5pget_fill_value_c. MSB - 7/21/2014 + * Fixed wrong call to C wrapper, was h5pset_fill_value_c, changed + * to h5pget_fill_value_c. MSB - 7/21/2014 * * SOURCE */ int_f -nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) +h5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) /******/ { int ret_value = -1; @@ -561,7 +561,7 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) } int_f -nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) { /* * Call h5pget_fill_value_c function. @@ -570,7 +570,7 @@ nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue } int_f -nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) { /* * Call h5pget_fill_value_c function. @@ -579,7 +579,7 @@ nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) } int_f -nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +h5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) { /* * Call h5pget_fill_value_c function. @@ -610,7 +610,7 @@ nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) * SOURCE */ int_f -nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) +h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) /******/ { int ret_value = -1; @@ -662,7 +662,7 @@ nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, * SOURCE */ int_f -nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -700,7 +700,7 @@ nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) * SOURCE */ int_f -nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -740,7 +740,7 @@ nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) * SOURCE */ int_f -nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -782,7 +782,7 @@ nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size * SOURCE */ int_f -nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -821,7 +821,7 @@ nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size * SOURCE */ int_f -nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -864,7 +864,7 @@ nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) * SOURCE */ int_f -nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -904,7 +904,7 @@ nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) * SOURCE */ int_f -nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) +h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -944,7 +944,7 @@ nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) * SOURCE */ int_f -nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) +h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -982,7 +982,7 @@ nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) * SOURCE */ int_f -nh5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) +h5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) /******/ { int ret_value = -1; @@ -1019,7 +1019,7 @@ DONE: * SOURCE */ int_f -nh5pset_fapl_stdio_c (hid_t_f *prp_id) +h5pset_fapl_stdio_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -1056,7 +1056,7 @@ nh5pset_fapl_stdio_c (hid_t_f *prp_id) * SOURCE */ int_f -nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) +h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /******/ { int ret_value = -1; @@ -1093,7 +1093,7 @@ nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) * SOURCE */ int_f -nh5pset_fapl_sec2_c (hid_t_f *prp_id) +h5pset_fapl_sec2_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -1131,7 +1131,7 @@ nh5pset_fapl_sec2_c (hid_t_f *prp_id) * SOURCE */ int_f -nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) +h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /******/ { int ret_value = -1; @@ -1169,7 +1169,7 @@ nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) * SOURCE */ int_f -nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1208,7 +1208,7 @@ nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment * SOURCE */ int_f -nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1249,7 +1249,7 @@ nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment * SOURCE */ int_f -nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1289,7 +1289,7 @@ nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) * SOURCE */ int_f -nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1331,7 +1331,7 @@ nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) * SOURCE */ int_f -nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) +h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) /******/ { int ret_value = -1; @@ -1372,7 +1372,7 @@ nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist * SOURCE */ int_f -nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) +h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) /******/ { int ret_value = -1; @@ -1417,7 +1417,7 @@ nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist * SOURCE */ int_f -nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) +h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) /******/ { int ret_value = -1; @@ -1469,7 +1469,7 @@ nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size * SOURCE */ int_f -nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) +h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) /******/ { int ret_value = -1; @@ -1518,7 +1518,7 @@ nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_ * SOURCE */ int_f -nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) +h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1582,7 +1582,7 @@ DONE: * SOURCE */ int_f -nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) +h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1638,7 +1638,7 @@ nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, h * SOURCE */ int_f -nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1678,7 +1678,7 @@ nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) * SOURCE */ int_f -nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1715,7 +1715,7 @@ nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) * SOURCE */ int_f -nh5pset_layout_c (hid_t_f *prp_id, int_f* layout) +h5pset_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1754,7 +1754,7 @@ nh5pset_layout_c (hid_t_f *prp_id, int_f* layout) * SOURCE */ int_f -nh5pget_layout_c (hid_t_f *prp_id, int_f* layout) +h5pget_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1793,7 +1793,7 @@ nh5pget_layout_c (hid_t_f *prp_id, int_f* layout) * SOURCE */ int_f -nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int ret_value = -1; @@ -1841,7 +1841,7 @@ DONE: * SOURCE */ int_f -nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) +h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) /******/ { int ret_value = -1; @@ -1884,7 +1884,7 @@ nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) * MSB January 27, 2009 *---------------------------------------------------------------------------*/ 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) +h5pget_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) /******/ { unsigned int c_flags; @@ -1951,7 +1951,7 @@ DONE: * SOURCE */ int_f -nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes) +h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes) /******/ { int ret_value = -1; @@ -2002,7 +2002,7 @@ DONE: * SOURCE */ int_f -nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) +h5pget_external_count_c (hid_t_f *prp_id, int_f* count) /******/ { int ret_value = -1; @@ -2044,7 +2044,7 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) * SOURCE */ 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) +h5pget_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; @@ -2108,7 +2108,7 @@ DONE: * SOURCE */ int_f -nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2153,7 +2153,7 @@ nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri * SOURCE */ int_f -nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2198,7 +2198,7 @@ nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri */ int_f -nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2236,7 +2236,7 @@ nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) */ int_f -nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2272,7 +2272,7 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) */ int_f -nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2305,7 +2305,7 @@ nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -2339,7 +2339,7 @@ nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) +h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2373,7 +2373,7 @@ nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2406,7 +2406,7 @@ nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2440,7 +2440,7 @@ nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) +h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2473,7 +2473,7 @@ nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) +h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2507,7 +2507,7 @@ nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2540,7 +2540,7 @@ nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2573,7 +2573,7 @@ nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2606,7 +2606,7 @@ nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) */ int_f -nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2639,7 +2639,7 @@ nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) */ int_f -nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2672,7 +2672,7 @@ nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2705,7 +2705,7 @@ nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) */ int_f -nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2738,7 +2738,7 @@ nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) */ int_f -nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2771,7 +2771,7 @@ nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) * SOURCE */ int_f -nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls) +h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls) /******/ { int ret_value = -1; @@ -2853,7 +2853,7 @@ DONE: * SOURCE */ int_f -nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) +h5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) /******/ { int ret_value = -1; @@ -2909,7 +2909,7 @@ DONE: } int_f -nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pregister_c function @@ -2918,7 +2918,7 @@ nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, } int_f -nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pregister_c function @@ -2927,7 +2927,7 @@ nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, vo } int_f -nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pregister_c function @@ -2956,7 +2956,7 @@ nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, * SOURCE */ int_f -nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) +h5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) /******/ { int_f ret_value = -1; @@ -3012,7 +3012,7 @@ DONE: } int_f -nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pinsert_c function @@ -3021,7 +3021,7 @@ nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, } int_f -nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pinsert_c function @@ -3030,7 +3030,7 @@ nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, vo } int_f -nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +h5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) { /* * Call h5pinsert_c function @@ -3058,7 +3058,7 @@ nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, * SOURCE */ int_f -nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3099,7 +3099,7 @@ DONE: * SOURCE */ int_f -nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls) +h5pisa_class_c(hid_t_f *plist, hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -3138,7 +3138,7 @@ nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls) * SOURCE */ int_f -nh5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) +h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) /******/ { int_f ret_value = -1; @@ -3180,7 +3180,7 @@ DONE: * SOURCE */ int_f -nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) +h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) /******/ { int_f ret_value = -1; @@ -3218,7 +3218,7 @@ nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) * SOURCE */ int_f -nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) +h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) /******/ { int_f ret_value = -1; @@ -3258,7 +3258,7 @@ nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) * SOURCE */ int_f -nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) +h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3299,7 +3299,7 @@ DONE: * SOURCE */ int_f -nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) +h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3339,7 +3339,7 @@ DONE: * SOURCE */ int_f -nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3377,7 +3377,7 @@ DONE: * SOURCE */ int_f -nh5pclose_class_c(hid_t_f *cls) +h5pclose_class_c(hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -3411,7 +3411,7 @@ nh5pclose_class_c(hid_t_f *cls) * SOURCE */ int_f -nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3454,7 +3454,7 @@ DONE: * SOURCE */ int_f -nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) +h5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) /******/ { int_f ret_value = -1; @@ -3507,7 +3507,7 @@ DONE: } int_f -nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pset_c function @@ -3516,7 +3516,7 @@ nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) } int_f -nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pset_c function @@ -3525,7 +3525,7 @@ nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) } int_f -nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pset_c function @@ -3552,7 +3552,7 @@ nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) * SOURCE */ int_f -nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) +h5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) /******/ { int_f ret_value = -1; @@ -3606,7 +3606,7 @@ DONE: } int_f -nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pget_c function @@ -3615,7 +3615,7 @@ nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) } int_f -nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pget_c function @@ -3624,7 +3624,7 @@ nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) } int_f -nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +h5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) { /* * Call h5pget_c function @@ -3652,7 +3652,7 @@ nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) */ int_f -nh5pset_shuffle_c ( hid_t_f *prp_id ) +h5pset_shuffle_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3682,7 +3682,7 @@ nh5pset_shuffle_c ( hid_t_f *prp_id ) */ int_f -nh5pset_fletcher32_c ( hid_t_f *prp_id ) +h5pset_fletcher32_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3714,7 +3714,7 @@ nh5pset_fletcher32_c ( hid_t_f *prp_id ) */ int_f -nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3748,7 +3748,7 @@ nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) */ int_f -nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3780,7 +3780,7 @@ nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) */ int_f -nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) +h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /******/ { int_f ret_value = 0; @@ -3819,8 +3819,8 @@ nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) */ int_f -/*nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ -nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) +/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ +h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) /******/ { int_f ret_value = -1; @@ -3901,7 +3901,7 @@ DONE: */ int_f -nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) +h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) /******/ { int_f ret_value = -1; @@ -3945,7 +3945,7 @@ nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) +h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) /******/ { int_f ret_value = -1; @@ -4024,7 +4024,7 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); */ int_f -nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) +h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) /******/ { int_f ret_value = -1; @@ -4065,7 +4065,7 @@ nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) */ int_f -nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) +h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /******/ { int_f ret_value = -1; @@ -4112,7 +4112,7 @@ nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) * SOURCE */ 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) +h5pget_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) /******/ { unsigned int c_flags; @@ -4175,7 +4175,7 @@ DONE: * SOURCE */ int_f -nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int_f ret_value = -1; @@ -4223,7 +4223,7 @@ DONE: * SOURCE */ int_f -nh5premove_filter_c (hid_t_f *prp_id, int_f* filter) +h5premove_filter_c (hid_t_f *prp_id, int_f* filter) /******/ { int_f ret_value = -1; @@ -4263,7 +4263,7 @@ DONE: * SOURCE */ int_f -nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4303,7 +4303,7 @@ nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den * SOURCE */ int_f -nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) +h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -4345,7 +4345,7 @@ nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) * SOURCE */ int_f -nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) +h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /******/ { int ret_value = -1; @@ -4389,7 +4389,7 @@ nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) * SOURCE */ int_f -nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) +h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) /******/ { int ret_value = -1; @@ -4427,7 +4427,7 @@ nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type * SOURCE */ int_f -nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) +h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4470,7 +4470,7 @@ nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) * SOURCE */ int_f -nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) +h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /******/ { int ret_value = -1; @@ -4507,7 +4507,7 @@ nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) * SOURCE */ int_f -nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) +h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -4542,7 +4542,7 @@ nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) * SOURCE */ int_f -nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4584,7 +4584,7 @@ nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den */ int_f -nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4624,7 +4624,7 @@ nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) */ int_f -nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4667,7 +4667,7 @@ nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) */ int_f -nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -4706,7 +4706,7 @@ nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) * SOURCE */ int_f -nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) +h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4751,7 +4751,7 @@ nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) * SOURCE */ int_f -nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4793,7 +4793,7 @@ nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) * SOURCE */ int_f -nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4836,7 +4836,7 @@ nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) * SOURCE */ int_f -nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4875,7 +4875,7 @@ nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) * SOURCE */ int_f -nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4919,7 +4919,7 @@ nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) * SOURCE */ int_f -nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) +h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) /******/ { char *c_expression = NULL; /* Buffer to hold C string */ @@ -4981,7 +4981,7 @@ done: * SOURCE */ int_f -nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) +h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) /******/ { char* c_expression = NULL; /* Buffer to hold C string */ @@ -5030,7 +5030,7 @@ done: * SOURCE */ int_f -nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -5072,7 +5072,7 @@ nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) * SOURCE */ int_f -nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -5117,7 +5117,7 @@ nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam * SOURCE */ int_f -nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -5157,7 +5157,7 @@ nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) * SOURCE */ int_f -nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -5193,7 +5193,7 @@ nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam * SOURCE */ int_f -nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -5232,7 +5232,7 @@ nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den * SOURCE */ int_f -nh5pset_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size) +h5pset_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -5275,7 +5275,7 @@ nh5pset_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_ * SOURCE */ int_f -nh5pget_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size) +h5pget_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -5322,7 +5322,7 @@ nh5pget_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_ * SOURCE */ int_f -nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -5357,7 +5357,7 @@ nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den * SOURCE */ int_f -nh5pset_nbit_c(hid_t_f *plist_id ) +h5pset_nbit_c(hid_t_f *plist_id ) /******/ { int ret_value = -1; @@ -5390,7 +5390,7 @@ nh5pset_nbit_c(hid_t_f *plist_id ) * SOURCE */ int_f -nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) +h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) /******/ { int ret_value = -1; @@ -5425,7 +5425,7 @@ nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor * SOURCE */ int_f -nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5464,7 +5464,7 @@ nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) * SOURCE */ int_f -nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5502,7 +5502,7 @@ nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) * SOURCE */ int_f -nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -5537,7 +5537,7 @@ nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) *---------------------------------------------------------------------------*/ int_f -nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; @@ -5568,7 +5568,7 @@ nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb *---------------------------------------------------------------------------*/ int_f -nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; size_t c_rdcc_nslots; @@ -5680,7 +5680,7 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) * SOURCE */ int_f -nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) /******/ { int ret_value = -1; @@ -5719,7 +5719,7 @@ nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) * SOURCE */ int_f -nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) /******/ { int ret_value = -1; @@ -5758,7 +5758,7 @@ nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) * SOURCE */ int_f -nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) /******/ { int ret_value = -1; @@ -5809,7 +5809,7 @@ nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) * SOURCE */ int_f -nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) /******/ { int ret_value = -1; @@ -5862,7 +5862,7 @@ nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) * SOURCE */ int_f -nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) +h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index db51321..b038d23 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -11,7 +11,7 @@ ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * +! Copyright by the Board of Trustees of the University of Illinois. *S ! All rights reserved. * ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * @@ -35,6 +35,8 @@ MODULE H5P + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, & + c_char, c_int, C_NULL_CHAR, C_LOC USE H5GLOBAL INTERFACE h5pset_fapl_multi_f @@ -96,58 +98,58 @@ MODULE H5P INTERFACE INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & BIND(C, NAME='h5pget_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR), VALUE :: fillvalue END FUNCTION h5pget_fill_value_c END INTERFACE INTERFACE INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & BIND(C, NAME='h5pset_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR), VALUE :: fillvalue END FUNCTION h5pset_fill_value_c END INTERFACE INTERFACE INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & BIND(C, NAME='h5pset_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + IMPORT :: c_char, c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value + TYPE(C_PTR), VALUE :: value END FUNCTION h5pset_c END INTERFACE INTERFACE INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & BIND(C, NAME='h5pget_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + IMPORT :: c_char, c_ptr + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value + TYPE(C_PTR), VALUE :: value END FUNCTION h5pget_c END INTERFACE INTERFACE INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & BIND(C, NAME='h5pregister_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len @@ -159,8 +161,9 @@ MODULE H5P INTERFACE INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & BIND(C, NAME='h5pinsert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len @@ -221,15 +224,11 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: prp_id INTEGER , INTENT(OUT) :: hdferr !***** -! INTEGER, EXTERNAL :: h5pcreate_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pcreate_c(class, prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c - !DEC$ENDIF + INTEGER FUNCTION h5pcreate_c(class, prp_id) & + BIND(C,NAME='h5pcreate_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class INTEGER(HID_T), INTENT(OUT) :: prp_id END FUNCTION h5pcreate_c @@ -281,15 +280,11 @@ CONTAINS !***** INTEGER :: flag_c -! INTEGER, EXTERNAL :: h5pset_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) & + BIND(C,NAME='h5pset_preserve_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER :: flag_c END FUNCTION h5pset_preserve_c @@ -339,15 +334,11 @@ CONTAINS !***** INTEGER :: flag_c -! INTEGER, EXTERNAL :: h5pget_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) & + BIND(C,NAME='h5pget_preserve_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER :: flag_c END FUNCTION h5pget_preserve_c @@ -394,11 +385,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pget_class_c(prp_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_class_c(prp_id, classtype) & + BIND(C,NAME='h5pget_class_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(OUT) :: classtype END FUNCTION h5pget_class_c @@ -441,15 +431,11 @@ CONTAINS ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pcopy_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c - !DEC$ENDIF + INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) & + BIND(C,NAME='h5pcopy_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(OUT) :: new_prp_id END FUNCTION h5pcopy_c @@ -489,16 +475,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pclose_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pclose_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c - !DEC$ENDIF + INTEGER FUNCTION h5pclose_c(prp_id) & + BIND(C,NAME='h5pclose_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pclose_c END INTERFACE @@ -543,16 +524,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) & + BIND(C,NAME='h5pset_chunk_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: ndims INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims @@ -601,15 +577,12 @@ CONTAINS ! number of chunk dimensions on success, ! -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! + INTERFACE - INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) & + BIND(C,NAME='h5pget_chunk_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER :: ndims INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims @@ -657,11 +630,10 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_deflate_c(prp_id, level) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_deflate_c(prp_id, level) & + BIND(C,NAME='h5pset_deflate_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: level END FUNCTION h5pset_deflate_c @@ -716,15 +688,11 @@ CONTAINS ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_version_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) & + BIND(C,NAME='h5pget_version_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, DIMENSION(:), INTENT(OUT) :: boot INTEGER, DIMENSION(:), INTENT(OUT) :: freelist @@ -769,16 +737,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_userblock_c(prp_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_userblock_c(prp_id, size) & + BIND(C,NAME='h5pset_userblock_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(IN) :: size END FUNCTION h5pset_userblock_c @@ -822,15 +785,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) & + BIND(C,NAME='h5pget_userblock_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(OUT) :: block_size END FUNCTION h5pget_userblock_c @@ -876,15 +835,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pset_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) & + BIND(C,NAME='h5pset_sizes_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr INTEGER(SIZE_T), INTENT(IN) :: sizeof_size @@ -932,15 +887,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) & + BIND(C,NAME='h5pget_sizes_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size @@ -987,16 +938,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) & + BIND(C,NAME='h5pset_sym_k_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: ik INTEGER, INTENT(IN) :: lk @@ -1042,16 +988,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) & + BIND(C,NAME='h5pget_sym_k_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: ik INTEGER, INTENT(OUT) :: lk @@ -1095,16 +1036,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) & + BIND(C,NAME='h5pset_istore_k_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: ik END FUNCTION h5pset_istore_k_c @@ -1147,16 +1083,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) & + BIND(C,NAME='h5pget_istore_k_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: ik END FUNCTION h5pget_istore_k_c @@ -1200,15 +1131,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_driver_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_driver_c(prp_id, driver) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_driver_c(prp_id, driver) & + BIND(C,NAME='h5pget_driver_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(OUT) :: driver END FUNCTION h5pget_driver_c @@ -1249,16 +1176,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) & + BIND(C,NAME='h5pset_fapl_stdio_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pset_fapl_stdio_c END INTERFACE @@ -1337,16 +1259,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) & + BIND(C,NAME='h5pset_fapl_sec2_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier END FUNCTION h5pset_fapl_sec2_c END INTERFACE @@ -1427,16 +1344,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) & + BIND(C,NAME='h5pset_alignment_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(IN) :: threshold INTEGER(HSIZE_T), INTENT(IN) :: alignment @@ -1482,15 +1394,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) & + BIND(C,NAME='h5pget_alignment_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(OUT) :: threshold INTEGER(HSIZE_T), INTENT(OUT) :: alignment @@ -1538,17 +1446,12 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTEGER :: backing_store_flag - -! INTEGER, EXTERNAL :: h5pset_fapl_core_c -! MS FORTRAN needs explicit interface for C functions called here. -! + INTEGER :: backing_store_flag INTERFACE - INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) & + BIND(C,NAME='h5pset_fapl_core_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(IN) :: increment INTEGER :: backing_store_flag @@ -1600,11 +1503,10 @@ CONTAINS INTEGER :: backing_store_flag INTERFACE - INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) & + BIND(C,NAME='h5pget_fapl_core_c') + IMPORT :: HID_T,SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(OUT) :: increment INTEGER :: backing_store_flag @@ -1654,16 +1556,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) & + BIND(C,NAME='h5pset_fapl_family_c') + IMPORT :: HID_T,HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(IN) :: memb_size INTEGER(HID_T), INTENT(IN) :: memb_plist @@ -1710,16 +1607,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) & + BIND(C,NAME='h5pget_fapl_family_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(OUT) :: memb_size INTEGER(HID_T), INTENT(OUT) :: memb_plist @@ -1775,16 +1667,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & + BIND(C,NAME='h5pset_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: mdc_nelmts INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts @@ -1844,15 +1731,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & + BIND(C,NAME='h5pget_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: mdc_nelmts INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts @@ -1911,22 +1794,16 @@ CONTAINS ! 0 on success and -1 on failure !***** INTEGER :: meta_len, raw_len - -! INTEGER, EXTERNAL :: h5pset_fapl_split_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: meta_ext - !DEC$ATTRIBUTES reference :: raw_ext + INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) & + BIND(C,NAME='h5pset_fapl_split_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: meta_ext + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: meta_ext INTEGER(HID_T), INTENT(IN) :: meta_plist - CHARACTER(LEN=*), INTENT(IN) :: raw_ext + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: raw_ext INTEGER(HID_T), INTENT(IN) :: raw_plist INTEGER :: meta_len, raw_len END FUNCTION h5pset_fapl_split_c @@ -2025,16 +1902,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) & + BIND(C,NAME='h5pset_gc_references_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: gc_reference END FUNCTION h5pset_gc_references_c @@ -2079,16 +1951,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) & + BIND(C,NAME='h5pget_gc_references_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: gc_reference END FUNCTION h5pget_gc_references_c @@ -2140,16 +2007,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_layout_c(prp_id, layout) & + BIND(C,NAME='h5pset_layout_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: layout END FUNCTION h5pset_layout_c @@ -2200,16 +2062,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_layout_c(prp_id, layout) & + BIND(C,NAME='h5pget_layout_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: layout END FUNCTION h5pget_layout_c @@ -2256,16 +2113,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & + BIND(C,NAME='h5pset_filter_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: filter INTEGER, INTENT(IN) :: flags @@ -2312,16 +2164,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_nfilters_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) & + BIND(C,NAME='h5pget_nfilters_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: nfilters END FUNCTION h5pget_nfilters_c @@ -2390,19 +2237,18 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + cd_values, namelen, name, filter_id ) & + BIND(C,NAME='h5pget_filter_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: filter_number INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: filter_id END FUNCTION h5pget_filter_c END INTERFACE @@ -2455,18 +2301,16 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTEGER :: namelen INTERFACE - INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) & + BIND(C,NAME='h5pset_external_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, OFF_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: namelen INTEGER(OFF_T), INTENT(IN) :: offset INTEGER(HSIZE_T), INTENT(IN) :: bytes @@ -2513,15 +2357,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_external_count_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_external_count_c(prp_id, count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_external_count_c(prp_id, count) & + BIND(C,NAME='h5pget_external_count_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: count END FUNCTION h5pget_external_count_c @@ -2580,21 +2420,16 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_external_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) & + BIND(C,NAME='h5pget_external_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T, OFF_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: idx INTEGER(SIZE_T), INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name INTEGER(OFF_T), INTENT(OUT) :: offset INTEGER(HSIZE_T), INTENT(OUT) :: bytes END FUNCTION h5pget_external_c @@ -2643,16 +2478,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) & + BIND(C,NAME='h5pset_btree_ratios_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id REAL, INTENT(IN) :: left REAL, INTENT(IN) :: middle @@ -2703,17 +2533,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - - -! INTEGER, EXTERNAL :: h5pget_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) & + BIND(C,NAME='h5pget_btree_ratios_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id REAL, INTENT(OUT) :: left REAL, INTENT(OUT) :: middle @@ -2764,16 +2588,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_fclose_degree_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) & + BIND(C,NAME='h5pget_fclose_degree_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER, INTENT(OUT) :: degree END FUNCTION h5pget_fclose_degree_c @@ -2818,13 +2637,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) & + BIND(C,NAME='h5pset_fclose_degree_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER, INTENT(IN) :: degree END FUNCTION h5pset_fclose_degree_c @@ -2868,11 +2685,10 @@ CONTAINS INTEGER :: c_flag INTERFACE - INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c - !DEC$ENDIF + INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) & + BIND(C,NAME='h5pequal_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist1_id INTEGER(HID_T), INTENT(IN) :: plist2_id INTEGER, INTENT(OUT) :: c_flag @@ -2916,11 +2732,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pset_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) & + BIND(C,NAME='h5pset_buffer_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(IN) :: size END FUNCTION h5pset_buffer_c @@ -2962,11 +2777,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pget_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) & + BIND(C,NAME='h5pget_buffer_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_buffer_c @@ -3014,11 +2828,10 @@ CONTAINS ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c - !DEC$ENDIF + INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) & + BIND(C,NAME='h5pfill_value_defined_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag END FUNCTION h5pfill_value_defined_c @@ -3068,11 +2881,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) & + BIND(C,NAME='h5pset_alloc_time_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_alloc_time_c @@ -3122,11 +2934,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) & + BIND(C,NAME='h5pget_alloc_time_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_alloc_time_c @@ -3172,11 +2983,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) & + BIND(C,NAME='h5pset_fill_time_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fill_time_c @@ -3223,11 +3033,10 @@ CONTAINS !***** INTERFACE - INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) & + BIND(C,NAME='h5pget_fill_time_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_fill_time_c @@ -3266,11 +3075,10 @@ CONTAINS ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) & + BIND(C,NAME='h5pset_meta_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(IN) :: size END FUNCTION h5pset_meta_block_size_c @@ -3309,11 +3117,10 @@ CONTAINS ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) & + BIND(C,NAME='h5pget_meta_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_meta_block_size_c @@ -3351,13 +3158,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) & + BIND(C,NAME='h5pset_sieve_buf_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(SIZE_T), INTENT(IN) :: size END FUNCTION h5pset_sieve_buf_size_c @@ -3395,13 +3200,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) & + BIND(C,NAME='h5pget_sieve_buf_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(SIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_sieve_buf_size_c @@ -3439,13 +3242,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) & + BIND(C,NAME='h5pset_small_data_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(IN) :: size END FUNCTION h5pset_small_data_block_size_c @@ -3483,13 +3284,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) & + BIND(C,NAME='h5pget_small_data_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_small_data_block_size_c @@ -3527,13 +3326,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) & + BIND(C,NAME='h5pset_hyper_vector_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(SIZE_T), INTENT(IN) :: size END FUNCTION h5pset_hyper_vector_size_c @@ -3571,13 +3368,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) & + BIND(C,NAME='h5pget_hyper_vector_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(SIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_hyper_vector_size_c @@ -3620,14 +3415,13 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) & + BIND(C,NAME='h5pexist_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5pexist_c END INTERFACE @@ -3678,14 +3472,13 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) & + BIND(C,NAME='h5pget_size_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len INTEGER(SIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_size_c @@ -3723,13 +3516,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) & + BIND(C,NAME='h5pget_nprops_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(OUT) :: nprops END FUNCTION h5pget_nprops_c @@ -3777,14 +3568,13 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) & + BIND(C,NAME='h5pget_class_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(INOUT) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5pget_class_name_c END INTERFACE @@ -3827,13 +3617,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTERFACE - INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) & + BIND(C,NAME='h5pget_class_parent_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(OUT) :: parent_id END FUNCTION h5pget_class_parent_c @@ -3873,11 +3661,10 @@ CONTAINS ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pisa_class_c(plist, pclass) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c - !DEC$ENDIF + INTEGER FUNCTION h5pisa_class_c(plist, pclass) & + BIND(C,NAME='h5pisa_class_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist INTEGER(HID_T), INTENT(IN) :: pclass END FUNCTION h5pisa_class_c @@ -3925,15 +3712,14 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) & + BIND(C,NAME='h5pcopy_prop_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dst_id INTEGER(HID_T), INTENT(IN) :: src_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5pcopy_prop_c END INTERFACE @@ -3974,14 +3760,13 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5premove_c(plid, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5premove_c(plid, name, name_len) & + BIND(C,NAME='h5premove_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plid - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5premove_c END INTERFACE @@ -4021,14 +3806,13 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5punregister_c(class, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5punregister_c(class, name, name_len) & + BIND(C,NAME='h5punregister_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5punregister_c END INTERFACE @@ -4064,11 +3848,10 @@ CONTAINS ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pclose_class_c(class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c - !DEC$ENDIF + INTEGER FUNCTION h5pclose_class_c(class) & + BIND(C,NAME='h5pclose_class_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class END FUNCTION h5pclose_class_c END INTERFACE @@ -4100,16 +3883,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_shuffle_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_shuffle_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_shuffle_c(prp_id) & + BIND(C,NAME='h5pset_shuffle_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pset_shuffle_c END INTERFACE @@ -4147,16 +3925,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) & + BIND(C,NAME='h5pset_edc_check_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_edc_check_c @@ -4197,16 +3970,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pget_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) & + BIND(C,NAME='h5pget_edc_check_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_edc_check_c @@ -4241,17 +4009,12 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fletcher32_c -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_fletcher32_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fletcher32_c(prp_id) & + BIND(C,NAME='h5pset_fletcher32_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pset_fletcher32_c END INTERFACE @@ -4287,16 +4050,11 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - -! INTEGER, EXTERNAL :: h5pset_family_offset_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) & + BIND(C,NAME='h5pset_family_offset_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HSIZE_T), INTENT(IN) :: offset END FUNCTION h5pset_family_offset_c @@ -4346,17 +4104,15 @@ CONTAINS INTERFACE INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag) - USE H5GLOBAL + maxlen, memb_addr, flag) & + BIND(C,NAME='h5pset_fapl_multi_c') + IMPORT :: C_CHAR + IMPORT :: HID_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(*), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: memb_name REAL, DIMENSION(*), INTENT(IN) :: memb_addr INTEGER, DIMENSION(*) :: lenm INTEGER :: maxlen @@ -4402,16 +4158,11 @@ CONTAINS !***** INTEGER :: flag -! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) - USE H5GLOBAL + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) & + BIND(C,NAME='h5pset_fapl_multi_sc') + IMPORT :: HID_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc - !DEC$ENDIF INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fapl_multi_sc @@ -4469,17 +4220,15 @@ CONTAINS ! INTERFACE INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag, c_maxlen_out) - USE H5GLOBAL + maxlen, memb_addr, flag, c_maxlen_out) & + BIND(C,NAME='h5pget_fapl_multi_c') + IMPORT :: C_CHAR + IMPORT :: HID_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: memb_name REAL, DIMENSION(*), INTENT(OUT) :: memb_addr INTEGER, DIMENSION(*) :: lenm INTEGER :: maxlen @@ -4536,17 +4285,12 @@ CONTAINS ! in each data block INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_szip_c -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) & + BIND(C,NAME='h5pset_szip_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: options_mask INTEGER, INTENT(IN) :: pixels_per_block @@ -4591,16 +4335,12 @@ CONTAINS !***** INTEGER :: status -! INTEGER, EXTERNAL :: h5pall_filters_avail_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) & + BIND(C,NAME='h5pall_filters_avail_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: status END FUNCTION h5pall_filters_avail_c END INTERFACE @@ -4651,27 +4391,21 @@ CONTAINS CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_by_id_c -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + cd_values, namelen, name) & + BIND(C,NAME='h5pget_filter_by_id_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: filter_id INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name END FUNCTION h5pget_filter_by_id_c END INTERFACE @@ -4715,17 +4449,12 @@ CONTAINS INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pmodify_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c - !DEC$ENDIF + INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & + BIND(C,NAME='h5pmodify_filter_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: filter INTEGER, INTENT(IN) :: flags @@ -4766,17 +4495,12 @@ CONTAINS INTEGER, INTENT(IN) :: filter ! Filter to be removed INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5premove_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5premove_filter_c(prp_id, filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c - !DEC$ENDIF + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) & + BIND(C,NAME='h5premove_filter_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: filter END FUNCTION h5premove_filter_c @@ -4819,16 +4543,12 @@ CONTAINS ! (Default: 6) INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pget_attr_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(OUT) :: max_compact INTEGER, INTENT(OUT) :: min_dense @@ -4867,16 +4587,12 @@ CONTAINS INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c - !DEC$ENDIF + INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) & + BIND(C,NAME='h5pset_attr_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(IN) :: crt_order_flags @@ -4920,12 +4636,10 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c - !DEC$ENDIF - + INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) & + BIND(C,NAME='h5pset_shared_mesg_nindexes_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: nindexes @@ -4974,18 +4688,14 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c - !DEC$ENDIF - + INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) & + BIND(C,NAME='h5pset_shared_mesg_index_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl_id INTEGER, INTENT(IN) :: index_num INTEGER, INTENT(IN) :: mesg_type_flags INTEGER, INTENT(IN) :: min_mesg_size - END FUNCTION H5pset_shared_mesg_index_c END INTERFACE @@ -5027,15 +4737,12 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) & + BIND(C,NAME='h5pget_attr_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(OUT) :: crt_order_flags - END FUNCTION H5pget_attr_creation_order_c END INTERFACE @@ -5084,12 +4791,10 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) & + BIND(C,NAME='h5pset_libver_bounds_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER, INTENT(IN) :: low INTEGER, INTENT(IN) :: high @@ -5130,17 +4835,12 @@ CONTAINS INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) & + BIND(C,NAME='h5pset_link_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: crt_order_flags @@ -5181,16 +4881,12 @@ CONTAINS INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pget_link_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: max_compact INTEGER, INTENT(OUT) :: min_dense @@ -5237,11 +4933,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) & + BIND(C,NAME='h5pget_obj_track_times_c') + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(OUT) :: status END FUNCTION h5pget_obj_track_times_c @@ -5303,11 +4997,10 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) & + BIND(C,NAME='h5pset_obj_track_times_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(IN) :: status END FUNCTION h5pset_obj_track_times_c @@ -5354,16 +5047,12 @@ CONTAINS ! upon the creation of an object INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) & + BIND(C,NAME='h5pset_create_inter_group_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lcpl_id INTEGER, INTENT(IN) :: crt_intermed_group END FUNCTION h5pset_create_inter_group_c @@ -5402,17 +5091,12 @@ CONTAINS INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) & + BIND(C,NAME='h5pget_link_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: crt_order_flags @@ -5455,17 +5139,12 @@ CONTAINS ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) & + BIND(C,NAME='h5pset_char_encoding_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: encoding @@ -5510,17 +5189,12 @@ CONTAINS ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) & + BIND(C,NAME='h5pget_char_encoding_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: encoding @@ -5567,16 +5241,12 @@ CONTAINS ! H5O_COPY_WITHOUT_ATTR_FLAG_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) & + BIND(C,NAME='h5pset_copy_object_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocp_plist_id INTEGER, INTENT(IN) :: copy_options END FUNCTION h5pset_copy_object_c @@ -5620,16 +5290,12 @@ CONTAINS ! H5O_COPY_WITHOUT_ATTR_FLAG_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) & + BIND(C,NAME='h5pget_copy_object_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocp_plist_id INTEGER, INTENT(OUT) :: copy_options END FUNCTION h5pget_copy_object_c @@ -5677,18 +5343,14 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER :: expression_len INTEGER(SIZE_T) :: size_default - -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression + INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) & + BIND(C,NAME='h5pget_data_transform_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(OUT) :: expression + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: expression INTEGER(SIZE_T) :: size_default INTEGER :: expression_len END FUNCTION h5pget_data_transform_c @@ -5734,17 +5396,14 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) !***** INTEGER :: expression_len -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE - INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression + INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) & + BIND(C,NAME='h5pset_data_transform_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(IN) :: expression + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: expression INTEGER :: expression_len END FUNCTION h5pset_data_transform_c END INTERFACE @@ -5782,16 +5441,12 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) & + BIND(C,NAME='h5pget_local_heap_size_hint_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER(SIZE_T), INTENT(OUT) :: size_hint END FUNCTION H5Pget_local_heap_size_hint_c @@ -5834,16 +5489,12 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & + BIND(C,NAME='h5pget_est_link_info_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: est_num_entries INTEGER, INTENT(OUT) :: est_name_len @@ -5882,16 +5533,12 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) & + BIND(C,NAME='h5pset_local_heap_size_hint_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER(SIZE_T), INTENT(IN) :: size_hint END FUNCTION h5pset_local_heap_size_hint_c @@ -5931,16 +5578,12 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & + BIND(C,NAME='h5pset_est_link_info_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: est_num_entries INTEGER, INTENT(IN) :: est_name_len @@ -5981,20 +5624,15 @@ SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pset_link_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: max_compact INTEGER, INTENT(IN) :: min_dense - END FUNCTION h5pset_link_phase_change_c END INTERFACE @@ -6033,16 +5671,12 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & + BIND(C,NAME='h5pset_fapl_direct_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(IN) :: alignment INTEGER(SIZE_T), INTENT(IN) :: block_size @@ -6085,16 +5719,12 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & + BIND(C,NAME='h5pget_fapl_direct_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(OUT) :: alignment INTEGER(SIZE_T), INTENT(OUT) :: block_size @@ -6139,16 +5769,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! (Default: 6) INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pset_attr_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id INTEGER, INTENT(IN) :: max_compact INTEGER, INTENT(IN) :: min_dense @@ -6185,11 +5811,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION H5Pset_nbit_c(plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c - !DEC$ENDIF + INTEGER FUNCTION H5Pset_nbit_c(plist_id) & + BIND(C,NAME='h5pset_nbit_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id END FUNCTION H5Pset_nbit_c END INTERFACE @@ -6231,11 +5856,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** INTERFACE - INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) & + BIND(C,NAME='h5pset_scaleoffset_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: scale_type INTEGER, INTENT(IN) :: scale_factor @@ -6278,16 +5902,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) & + BIND(C,NAME='h5pset_nlinks_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lapl_id INTEGER(SIZE_T), INTENT(IN) :: nlinks END FUNCTION h5pset_nlinks_c @@ -6326,15 +5946,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** -! MS FORTRAN needs explicit interface for C functions called here. -! +!***** INTERFACE - INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) & + BIND(C,NAME='h5pget_nlinks_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lapl_id INTEGER(SIZE_T), INTENT(OUT) :: nlinks END FUNCTION h5pget_nlinks_c @@ -6380,11 +5997,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) & + BIND(C,NAME='h5pget_create_inter_group_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lcpl_id INTEGER, INTENT(IN) :: crt_intermed_group END FUNCTION h5pget_create_inter_group_c @@ -6449,11 +6065,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** INTERFACE - INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & + BIND(C,NAME='h5pset_chunk_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes @@ -6507,11 +6122,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! 0 on success and -1 on failure !***** INTERFACE - INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & + BIND(C,NAME='h5pget_chunk_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes @@ -6569,7 +6183,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6628,7 +6241,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6646,7 +6258,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6664,7 +6275,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6681,7 +6291,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fill_value_real SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6698,7 +6307,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_fill_value_char SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6776,7 +6384,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6833,7 +6440,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -6878,7 +6484,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -6896,10 +6501,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_integer SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify REAL, INTENT(IN), TARGET :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len @@ -6913,7 +6517,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_real SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -6981,7 +6584,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -6998,7 +6600,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_integer SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -7014,7 +6615,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_real SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -7075,7 +6675,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -7115,7 +6714,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify @@ -7164,7 +6762,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register @@ -7182,7 +6779,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_integer SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register @@ -7200,7 +6796,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_real SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register @@ -7266,7 +6861,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !***** SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register @@ -7312,7 +6906,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert @@ -7329,7 +6922,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pinsert_integer SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert @@ -7347,7 +6939,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pinsert_real SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert @@ -7415,7 +7006,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert @@ -7468,8 +7058,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! M. Scot Breitenfeld, July 3, 2008 ! ! Fortran2003 Interface: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) - USE iso_c_binding + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, & + copy, copy_data, CLOSE, close_data) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: parent CHARACTER(LEN=*), INTENT(IN) :: name @@ -7484,9 +7074,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTERFACE INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL + BIND(C, NAME='h5pcreate_class_c') + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: parent CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len @@ -7542,7 +7132,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Fortran2003 Interface: SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id TYPE(C_PTR) , INTENT(IN) :: buf_ptr @@ -7552,8 +7141,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTERFACE INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & BIND(C, NAME='h5pset_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: fapl_id TYPE(C_PTR), VALUE :: buf_ptr INTEGER(SIZE_T), INTENT(IN) :: buf_len @@ -7597,7 +7186,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Fortran2003 Interface: SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - USE iso_c_binding IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr @@ -7608,8 +7196,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTERFACE INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & BIND(C, NAME='h5pget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: fapl_id TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr @@ -7782,11 +7370,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE - INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) & + BIND(C,NAME='h5pget_mpio_actual_io_mode_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dxpl_id INTEGER , INTENT(OUT) :: actual_io_mode END FUNCTION h5pget_mpio_actual_io_mode_c diff --git a/fortran/src/H5_DBLE_InterfaceInclude.F90 b/fortran/src/H5_DBLE_InterfaceInclude.F90 index 44e8d48..56bb1a4 100644 --- a/fortran/src/H5_DBLE_InterfaceInclude.F90 +++ b/fortran/src/H5_DBLE_InterfaceInclude.F90 @@ -36,6 +36,7 @@ MODULE H5_DBLE_INTERFACE + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR USE H5GLOBAL ! @@ -132,15 +133,10 @@ CONTAINS DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_s_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -160,16 +156,10 @@ CONTAINS DOUBLE PRECISION, INTENT(IN), & DIMENSION(dims(1)) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_1_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -197,11 +187,8 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_2_c') + IMPORT :: HID_T, HSIZE_T INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -229,11 +216,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_3_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -261,11 +246,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_4_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -289,15 +272,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_5_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -321,15 +299,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_6_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -353,15 +326,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c - !DEC$ENDIF + INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_7_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -383,15 +351,10 @@ CONTAINS DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5aread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_s_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -413,15 +376,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5aread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_1_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -445,15 +403,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5aread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_2_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -481,11 +434,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_3_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -513,11 +464,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_4_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -545,11 +494,9 @@ CONTAINS ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_5_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -573,15 +520,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5aread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_6_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -605,15 +547,10 @@ CONTAINS ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5aread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE - INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c - !DEC$ENDIF + INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_7_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -648,9 +585,6 @@ CONTAINS INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - ! INTEGER, EXTERNAL :: h5dwrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! INTERFACE INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & mem_space_id_default, & @@ -668,7 +602,6 @@ CONTAINS END FUNCTION h5dwrite_double_s_c END INTERFACE - xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F @@ -1526,8 +1459,7 @@ CONTAINS ! -- H5P --- ! - SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) + SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of @@ -1537,11 +1469,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE - INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c - !DEC$ENDIF + INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) BIND(C,NAME='h5pset_fill_value_double_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(IN) :: type_id DOUBLE PRECISION, INTENT(IN) :: fillvalue @@ -1562,11 +1492,9 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE - INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c - !DEC$ENDIF + INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) BIND(C,NAME='h5pget_fill_value_double_c') + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(HID_T), INTENT(IN) :: type_id DOUBLE PRECISION :: fillvalue @@ -1607,14 +1535,12 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) BIND(C,NAME='h5pset_double_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len DOUBLE PRECISION, INTENT(IN) :: value END FUNCTION h5pset_double_c @@ -1655,14 +1581,12 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) BIND(C,NAME='h5pget_double_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len DOUBLE PRECISION, INTENT(OUT) :: value END FUNCTION h5pget_double_c @@ -1708,14 +1632,12 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) BIND(C,NAME='h5pregister_double_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len INTEGER(SIZE_T), INTENT(IN) :: size DOUBLE PRECISION, INTENT(IN) :: value @@ -1760,14 +1682,12 @@ CONTAINS INTEGER :: name_len INTERFACE - INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name + INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) BIND(C,NAME='h5pinsert_double_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len INTEGER(SIZE_T), INTENT(IN) :: size DOUBLE PRECISION, INTENT(IN) :: value diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index f0ca1a1..002004e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -283,215 +283,123 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f /* * Functions from H5Af.c */ -#define nh5acreate_c H5_FC_FUNC_(h5acreate_c, H5ACREATE_C) -#define nh5aclose_c H5_FC_FUNC_(h5aclose_c, H5ACLOSE_C) -#define nh5aopen_name_c H5_FC_FUNC_(h5aopen_name_c, H5AOPEN_NAME_C) -#define nh5awrite_c H5_FC_FUNC_(h5awrite_c, H5AWRITE_C) -#define nh5awrite_integer_s_c H5_FC_FUNC_(h5awrite_integer_s_c, H5AWRITE_INTEGER_S_C) -#define nh5awrite_integer_1_c H5_FC_FUNC_(h5awrite_integer_1_c, H5AWRITE_INTEGER_1_C) -#define nh5awrite_integer_2_c H5_FC_FUNC_(h5awrite_integer_2_c, H5AWRITE_INTEGER_2_C) -#define nh5awrite_integer_3_c H5_FC_FUNC_(h5awrite_integer_3_c, H5AWRITE_INTEGER_3_C) -#define nh5awrite_integer_4_c H5_FC_FUNC_(h5awrite_integer_4_c, H5AWRITE_INTEGER_4_C) -#define nh5awrite_integer_5_c H5_FC_FUNC_(h5awrite_integer_5_c, H5AWRITE_INTEGER_5_C) -#define nh5awrite_integer_6_c H5_FC_FUNC_(h5awrite_integer_6_c, H5AWRITE_INTEGER_6_C) -#define nh5awrite_integer_7_c H5_FC_FUNC_(h5awrite_integer_7_c, H5AWRITE_INTEGER_7_C) -#define nh5awrite_real_s_c H5_FC_FUNC_(h5awrite_real_s_c, H5AWRITE_REAL_S_C) -#define nh5awrite_real_1_c H5_FC_FUNC_(h5awrite_real_1_c, H5AWRITE_REAL_1_C) -#define nh5awrite_real_2_c H5_FC_FUNC_(h5awrite_real_2_c, H5AWRITE_REAL_2_C) -#define nh5awrite_real_3_c H5_FC_FUNC_(h5awrite_real_3_c, H5AWRITE_REAL_3_C) -#define nh5awrite_real_4_c H5_FC_FUNC_(h5awrite_real_4_c, H5AWRITE_REAL_4_C) -#define nh5awrite_real_5_c H5_FC_FUNC_(h5awrite_real_5_c, H5AWRITE_REAL_5_C) -#define nh5awrite_real_6_c H5_FC_FUNC_(h5awrite_real_6_c, H5AWRITE_REAL_6_C) -#define nh5awrite_real_7_c H5_FC_FUNC_(h5awrite_real_7_c, H5AWRITE_REAL_7_C) -#define nh5awrite_double_s_c H5_FC_FUNC_(h5awrite_double_s_c, H5AWRITE_DOUBLE_S_C) -#define nh5awrite_double_1_c H5_FC_FUNC_(h5awrite_double_1_c, H5AWRITE_DOUBLE_1_C) -#define nh5awrite_double_2_c H5_FC_FUNC_(h5awrite_double_2_c, H5AWRITE_DOUBLE_2_C) -#define nh5awrite_double_3_c H5_FC_FUNC_(h5awrite_double_3_c, H5AWRITE_DOUBLE_3_C) -#define nh5awrite_double_4_c H5_FC_FUNC_(h5awrite_double_4_c, H5AWRITE_DOUBLE_4_C) -#define nh5awrite_double_5_c H5_FC_FUNC_(h5awrite_double_5_c, H5AWRITE_DOUBLE_5_C) -#define nh5awrite_double_6_c H5_FC_FUNC_(h5awrite_double_6_c, H5AWRITE_DOUBLE_6_C) -#define nh5awrite_double_7_c H5_FC_FUNC_(h5awrite_double_7_c, H5AWRITE_DOUBLE_7_C) -#define nh5awritec_c H5_FC_FUNC_(h5awritec_c, H5AWRITEC_C) -#define nh5awritec_s_c H5_FC_FUNC_(h5awritec_s_c, H5AWRITEC_S_C) -#define nh5awritec_1_c H5_FC_FUNC_(h5awritec_1_c, H5AWRITEC_1_C) -#define nh5awritec_2_c H5_FC_FUNC_(h5awritec_2_c, H5AWRITEC_2_C) -#define nh5awritec_3_c H5_FC_FUNC_(h5awritec_3_c, H5AWRITEC_3_C) -#define nh5awritec_4_c H5_FC_FUNC_(h5awritec_4_c, H5AWRITEC_4_C) -#define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C) -#define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C) -#define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C) -#define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C) -#define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C) -#define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C) -#define nh5aread_integer_2_c H5_FC_FUNC_(h5aread_integer_2_c, H5AREAD_INTEGER_2_C) -#define nh5aread_integer_3_c H5_FC_FUNC_(h5aread_integer_3_c, H5AREAD_INTEGER_3_C) -#define nh5aread_integer_4_c H5_FC_FUNC_(h5aread_integer_4_c, H5AREAD_INTEGER_4_C) -#define nh5aread_integer_5_c H5_FC_FUNC_(h5aread_integer_5_c, H5AREAD_INTEGER_5_C) -#define nh5aread_integer_6_c H5_FC_FUNC_(h5aread_integer_6_c, H5AREAD_INTEGER_6_C) -#define nh5aread_integer_7_c H5_FC_FUNC_(h5aread_integer_7_c, H5AREAD_INTEGER_7_C) -#define nh5aread_real_s_c H5_FC_FUNC_(h5aread_real_s_c, H5AREAD_REAL_S_C) -#define nh5aread_real_1_c H5_FC_FUNC_(h5aread_real_1_c, H5AREAD_REAL_1_C) -#define nh5aread_real_2_c H5_FC_FUNC_(h5aread_real_2_c, H5AREAD_REAL_2_C) -#define nh5aread_real_3_c H5_FC_FUNC_(h5aread_real_3_c, H5AREAD_REAL_3_C) -#define nh5aread_real_4_c H5_FC_FUNC_(h5aread_real_4_c, H5AREAD_REAL_4_C) -#define nh5aread_real_5_c H5_FC_FUNC_(h5aread_real_5_c, H5AREAD_REAL_5_C) -#define nh5aread_real_6_c H5_FC_FUNC_(h5aread_real_6_c, H5AREAD_REAL_6_C) -#define nh5aread_real_7_c H5_FC_FUNC_(h5aread_real_7_c, H5AREAD_REAL_7_C) -#define nh5aread_double_s_c H5_FC_FUNC_(h5aread_double_s_c, H5AREAD_DOUBLE_S_C) -#define nh5aread_double_1_c H5_FC_FUNC_(h5aread_double_1_c, H5AREAD_DOUBLE_1_C) -#define nh5aread_double_2_c H5_FC_FUNC_(h5aread_double_2_c, H5AREAD_DOUBLE_2_C) -#define nh5aread_double_3_c H5_FC_FUNC_(h5aread_double_3_c, H5AREAD_DOUBLE_3_C) -#define nh5aread_double_4_c H5_FC_FUNC_(h5aread_double_4_c, H5AREAD_DOUBLE_4_C) -#define nh5aread_double_5_c H5_FC_FUNC_(h5aread_double_5_c, H5AREAD_DOUBLE_5_C) -#define nh5aread_double_6_c H5_FC_FUNC_(h5aread_double_6_c, H5AREAD_DOUBLE_6_C) -#define nh5aread_double_7_c H5_FC_FUNC_(h5aread_double_7_c, H5AREAD_DOUBLE_7_C) -#define nh5areadc_c H5_FC_FUNC_(h5areadc_c, H5AREADC_C) -#define nh5areadc_s_c H5_FC_FUNC_(h5areadc_s_c, H5AREADC_S_C) -#define nh5areadc_1_c H5_FC_FUNC_(h5areadc_1_c, H5AREADC_1_C) -#define nh5areadc_2_c H5_FC_FUNC_(h5areadc_2_c, H5AREADC_2_C) -#define nh5areadc_3_c H5_FC_FUNC_(h5areadc_3_c, H5AREADC_3_C) -#define nh5areadc_4_c H5_FC_FUNC_(h5areadc_4_c, H5AREADC_4_C) -#define nh5areadc_5_c H5_FC_FUNC_(h5areadc_5_c, H5AREADC_5_C) -#define nh5areadc_6_c H5_FC_FUNC_(h5areadc_6_c, H5AREADC_6_C) -#define nh5areadc_7_c H5_FC_FUNC_(h5areadc_7_c, H5AREADC_7_C) -#define nh5aget_name_c H5_FC_FUNC_(h5aget_name_c, H5AGET_NAME_C) -#define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C) -#define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C) -#define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C) -#define nh5aget_storage_size_c H5_FC_FUNC_(h5aget_storage_size_c, H5AGET_STORAGE_SIZE_C) -#define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C) -#define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C) -#define nh5adelete_by_name_c H5_FC_FUNC_(h5adelete_by_name_c,H5ADELETE_BY_NAME_C) -#define nh5adelete_by_idx_c H5_FC_FUNC_(h5adelete_by_idx_c,H5ADELETE_BY_IDX_C) -#define nh5aget_name_by_idx_c H5_FC_FUNC_(h5aget_name_by_idx_c,H5AGET_NAME_BY_IDX_C) -#define nh5aget_create_plist_c H5_FC_FUNC_(h5aget_create_plist_c,H5AGET_CREATE_PLIST_C) -#define nh5aopen_by_idx_c H5_FC_FUNC_(h5aopen_by_idx_c,H5AOPEN_BY_IDX_C) -#define nh5aget_info_c H5_FC_FUNC_(h5aget_info_c,H5AGET_INFO_C) -#define nh5aget_info_by_idx_c H5_FC_FUNC_(h5aget_info_by_idx_c,H5AGET_INFO_BY_IDX_C) -#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) -#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) -#define nh5acreate_by_name_c H5_FC_FUNC_(h5acreate_by_name_c,H5ACREATE_BY_NAME_C) -#define nh5aexists_c H5_FC_FUNC_(h5aexists_c,H5AEXISTS_C) -#define nh5aexists_by_name_c H5_FC_FUNC_(h5aexists_by_name_c,H5AEXISTS_BY_NAME_C) -#define nh5aopen_by_name_c H5_FC_FUNC_(h5aopen_by_name_c,H5AOPEN_BY_NAME_C) -#define nh5arename_c H5_FC_FUNC_(h5arename_c,H5ARENAME_C) -H5_FCDLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); -H5_FCDLL int_f nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); -H5_FCDLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); +H5_FCDLL int_f h5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); +H5_FCDLL int_f h5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f h5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f nh5aclose_c ( hid_t_f *attr_id ); +H5_FCDLL int_f h5aclose_c ( hid_t_f *attr_id ); H5_FCDLL int_f h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); -H5_FCDLL int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); -H5_FCDLL int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); +H5_FCDLL int_f h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); +H5_FCDLL int_f h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); +H5_FCDLL int_f h5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); H5_FCDLL int_f h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); -H5_FCDLL int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); -H5_FCDLL int_f nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); -H5_FCDLL int_f nh5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); +H5_FCDLL int_f h5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); +H5_FCDLL int_f h5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id ); -H5_FCDLL int_f nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id ); +H5_FCDLL int_f h5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +H5_FCDLL int_f h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ); -H5_FCDLL int_f nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); -H5_FCDLL int_f nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); +H5_FCDLL int_f h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists); -H5_FCDLL int_f nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id, +H5_FCDLL int_f h5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen); @@ -597,317 +505,167 @@ H5_FCDLL int_f h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *n /* * Functions from H5Pf.c */ -#define nh5pcreate_c H5_FC_FUNC_(h5pcreate_c, H5PCREATE_C) -#define nh5pclose_c H5_FC_FUNC_(h5pclose_c, H5PCLOSE_C) -#define nh5pcopy_c H5_FC_FUNC_(h5pcopy_c, H5PCOPY_C) -#define nh5pcreate_class_f90_c H5_FC_FUNC_(h5pcreate_class_f90_c, H5PCREATE_CLASS_F90_C) -#define nh5pequal_c H5_FC_FUNC_(h5pequal_c, H5PEQUAL_C) -#define nh5pget_class_c H5_FC_FUNC_(h5pget_class_c, H5PGET_CLASS_C) -#define nh5pset_deflate_c H5_FC_FUNC_(h5pset_deflate_c, H5PSET_DEFLATE_C) -#define nh5pset_preserve_c H5_FC_FUNC_(h5pset_preserve_c, H5PSET_PRESERVE_C) -#define nh5pget_preserve_c H5_FC_FUNC_(h5pget_preserve_c, H5PGET_PRESERVE_C) -#define nh5pset_chunk_c H5_FC_FUNC_(h5pset_chunk_c, H5PSET_CHUNK_C) -#define nh5pget_chunk_c H5_FC_FUNC_(h5pget_chunk_c, H5PGET_CHUNK_C) -#define nh5pset_fill_valuec_c H5_FC_FUNC_(h5pset_fill_valuec_c, H5PSET_FILL_VALUEC_C) -#define nh5pset_fill_value_integer_c H5_FC_FUNC_(h5pset_fill_value_integer_c, H5PSET_FILL_VALUE_INTEGER_C) -#define nh5pset_fill_value_real_c H5_FC_FUNC_(h5pset_fill_value_real_c, H5PSET_FILL_VALUE_REAL_C) -#define nh5pset_fill_value_double_c H5_FC_FUNC_(h5pset_fill_value_double_c, H5PSET_FILL_VALUE_DOUBLE_C) -#define nh5pget_fill_valuec_c H5_FC_FUNC_(h5pget_fill_valuec_c, H5PGET_FILL_VALUEC_C) -#define nh5pget_fill_value_integer_c H5_FC_FUNC_(h5pget_fill_value_integer_c, H5PGET_FILL_VALUE_INTEGER_C) -#define nh5pget_fill_value_real_c H5_FC_FUNC_(h5pget_fill_value_real_c, H5PGET_FILL_VALUE_REAL_C) -#define nh5pget_fill_value_double_c H5_FC_FUNC_(h5pget_fill_value_double_c, H5PGET_FILL_VALUE_DOUBLE_C) -#define nh5pget_version_c H5_FC_FUNC_(h5pget_version_c, H5PGET_VERSION_C) -#define nh5pget_userblock_c H5_FC_FUNC_(h5pget_userblock_c, H5PGET_USERBLOCK_C) -#define nh5pset_userblock_c H5_FC_FUNC_(h5pset_userblock_c, H5PSET_USERBLOCK_C) -#define nh5pset_sizes_c H5_FC_FUNC_(h5pset_sizes_c, H5PSET_SIZES_C) -#define nh5pget_sizes_c H5_FC_FUNC_(h5pget_sizes_c, H5PGET_SIZES_C) -#define nh5pget_sym_k_c H5_FC_FUNC_(h5pget_sym_k_c, H5PGET_SYM_K_C) -#define nh5pset_sym_k_c H5_FC_FUNC_(h5pset_sym_k_c, H5PSET_SYM_K_C) -#define nh5pget_istore_k_c H5_FC_FUNC_(h5pget_istore_k_c, H5PGET_ISTORE_K_C) -#define nh5pset_istore_k_c H5_FC_FUNC_(h5pset_istore_k_c, H5PSET_ISTORE_K_C) -#define nh5pget_driver_c H5_FC_FUNC_(h5pget_driver_c, H5PGET_DRIVER_C) -#define nh5pset_fapl_stdio_c H5_FC_FUNC_(h5pset_fapl_stdio_c, H5PSET_FAPL_STDIO_C) -#define nh5pget_fapl_stdio_c H5_FC_FUNC_(h5pget_fapl_stdio_c, H5PGET_FAPL_STDIO_C) -#define nh5pset_fapl_sec2_c H5_FC_FUNC_(h5pset_fapl_sec2_c, H5PSET_FAPL_SEC2_C) -#define nh5pget_fapl_sec2_c H5_FC_FUNC_(h5pget_fapl_sec2_c, H5PGET_FAPL_SEC2_C) -#define nh5pset_alignment_c H5_FC_FUNC_(h5pset_alignment_c, H5PSET_ALIGNMENT_C) -#define nh5pget_alignment_c H5_FC_FUNC_(h5pget_alignment_c, H5PGET_ALIGNMENT_C) -#define nh5pset_fapl_core_c H5_FC_FUNC_(h5pset_fapl_core_c, H5PSET_FAPL_CORE_C) -#define nh5pget_fapl_core_c H5_FC_FUNC_(h5pget_fapl_core_c, H5PGET_FAPL_CORE_C) -#define nh5pset_fapl_family_c H5_FC_FUNC_(h5pset_fapl_family_c, H5PSET_FAPL_FAMILY_C) -#define nh5pget_fapl_family_c H5_FC_FUNC_(h5pget_fapl_family_c, H5PGET_FAPL_FAMILY_C) -#define nh5pset_cache_c H5_FC_FUNC_(h5pset_cache_c, H5PSET_CACHE_C) -#define nh5pget_cache_c H5_FC_FUNC_(h5pget_cache_c, H5PGET_CACHE_C) -#define nh5pset_fapl_split_c H5_FC_FUNC_(h5pset_fapl_split_c, H5PSET_FAPL_SPLIT_C) -#define nh5pget_fapl_split_c H5_FC_FUNC_(h5pget_fapl_split_c, H5PGET_FAPL_SPLIT_C) -#define nh5pset_gc_references_c H5_FC_FUNC_(h5pset_gc_references_c, H5PSET_GC_REFERENCES_C) -#define nh5pget_gc_references_c H5_FC_FUNC_(h5pget_gc_references_c, H5PGET_GC_REFERENCES_C) -#define nh5pset_layout_c H5_FC_FUNC_(h5pset_layout_c, H5PSET_LAYOUT_C) -#define nh5pget_layout_c H5_FC_FUNC_(h5pget_layout_c, H5PGET_LAYOUT_C) -#define nh5pset_filter_c H5_FC_FUNC_(h5pset_filter_c, H5PSET_FILTER_C) -#define nh5premove_filter_c H5_FC_FUNC_(h5premove_filter_c, H5PREMOVE_FILTER_C) -#define nh5pmodify_filter_c H5_FC_FUNC_(h5pmodify_filter_c, H5PMODIFY_FILTER_C) -#define nh5pget_nfilters_c H5_FC_FUNC_(h5pget_nfilters_c, H5PGET_NFILTERS_C) -#define nh5pget_filter_c H5_FC_FUNC_(h5pget_filter_c, H5PGET_FILTER_C) -#define nh5pget_filter_by_id_c H5_FC_FUNC_(h5pget_filter_by_id_c, H5PGET_FILTER_BY_ID_C) -#define nh5pset_external_c H5_FC_FUNC_(h5pset_external_c, H5PSET_EXTERNAL_C) -#define nh5pget_external_count_c H5_FC_FUNC_(h5pget_external_count_c, H5PGET_EXTERNAL_COUNT_C) -#define nh5pget_external_c H5_FC_FUNC_(h5pget_external_c, H5PGET_EXTERNAL_C) -#define nh5pget_btree_ratios_c H5_FC_FUNC_(h5pget_btree_ratios_c, H5PGET_BTREE_RATIOS_C) -#define nh5pset_btree_ratios_c H5_FC_FUNC_(h5pset_btree_ratios_c, H5PSET_BTREE_RATIOS_C) -#define nh5pset_fapl_mpio_c H5_FC_FUNC_(h5pset_fapl_mpio_c, H5PSET_FAPL_MPIO_C) -#define nh5pget_fapl_mpio_c H5_FC_FUNC_(h5pget_fapl_mpio_c, H5PGET_FAPL_MPIO_C) -#define nh5pset_dxpl_mpio_c H5_FC_FUNC_(h5pset_dxpl_mpio_c, H5PSET_DXPL_MPIO_C) -#define nh5pget_dxpl_mpio_c H5_FC_FUNC_(h5pget_dxpl_mpio_c, H5PGET_DXPL_MPIO_C) -#define nh5pget_fclose_degree_c H5_FC_FUNC_(h5pget_fclose_degree_c, H5PGET_FCLOSE_DEGREE_C) -#define nh5pset_fclose_degree_c H5_FC_FUNC_(h5pset_fclose_degree_c, H5PSET_FCLOSE_DEGREE_C) -#define nh5pset_buffer_c H5_FC_FUNC_(h5pset_buffer_c, H5PSET_BUFFER_C) -#define nh5pget_buffer_c H5_FC_FUNC_(h5pget_buffer_c, H5PGET_BUFFER_C) -#define nh5pfill_value_defined_c H5_FC_FUNC_(h5pfill_value_defined_c, H5PFILL_VALUE_DEFINED_C) -#define nh5pset_alloc_time_c H5_FC_FUNC_(h5pset_alloc_time_c, H5PSET_ALLOC_TIME_C) -#define nh5pget_alloc_time_c H5_FC_FUNC_(h5pget_alloc_time_c, H5PGET_ALLOC_TIME_C) -#define nh5pset_fill_time_c H5_FC_FUNC_(h5pset_fill_time_c, H5PSET_FILL_TIME_C) -#define nh5pget_fill_time_c H5_FC_FUNC_(h5pget_fill_time_c, H5PGET_FILL_TIME_C) -#define nh5pset_meta_block_size_c H5_FC_FUNC_(h5pset_meta_block_size_c, H5PSET_META_BLOCK_SIZE_C) -#define nh5pget_meta_block_size_c H5_FC_FUNC_(h5pget_meta_block_size_c, H5PGET_META_BLOCK_SIZE_C) -#define nh5pset_sieve_buf_size_c H5_FC_FUNC_(h5pset_sieve_buf_size_c, H5PSET_SIEVE_BUF_SIZE_C) -#define nh5pget_sieve_buf_size_c H5_FC_FUNC_(h5pget_sieve_buf_size_c, H5PGET_SIEVE_BUF_SIZE_C) -#define nh5pset_hyper_vector_size_c H5_FC_FUNC_(h5pset_hyper_vector_size_c, H5PSET_HYPER_VECTOR_SIZE_C) -#define nh5pget_hyper_vector_size_c H5_FC_FUNC_(h5pget_hyper_vector_size_c, H5PGET_HYPER_VECTOR_SIZE_C) -#define nh5pset_small_data_block_size_c H5_FC_FUNC_(h5pset_small_data_block_size_c, H5PSET_SMALL_DATA_BLOCK_SIZE_C) -#define nh5pget_small_data_block_size_c H5_FC_FUNC_(h5pget_small_data_block_size_c, H5PGET_SMALL_DATA_BLOCK_SIZE_C) -#define nh5pregister_integer_c H5_FC_FUNC_(h5pregister_integer_c, H5PREGISTER_INTEGER_C) -#define nh5pregister_real_c H5_FC_FUNC_(h5pregister_real_c, H5PREGISTER_REAL_C) -#define nh5pregister_double_c H5_FC_FUNC_(h5pregister_double_c, H5PREGISTER_DOUBLE_C) -#define nh5pregisterc_c H5_FC_FUNC_(h5pregisterc_c, H5PREGISTERC_C) -#define nh5pinsert_integer_c H5_FC_FUNC_(h5pinsert_integer_c, H5PINSERT_INTEGER_C) -#define nh5pinsert_real_c H5_FC_FUNC_(h5pinsert_real_c, H5PINSERT_REAL_C) -#define nh5pinsert_double_c H5_FC_FUNC_(h5pinsert_double_c, H5PINSERT_DOUBLE_C) -#define nh5pinsertc_c H5_FC_FUNC_(h5pinsertc_c, H5PINSERTC_C) -#define nh5pset_integer_c H5_FC_FUNC_(h5pset_integer_c, H5PSET_INTEGER_C) -#define nh5pset_real_c H5_FC_FUNC_(h5pset_real_c, H5PSET_REAL_C) -#define nh5pset_double_c H5_FC_FUNC_(h5pset_double_c, H5PSET_DOUBLE_C) -#define nh5psetc_c H5_FC_FUNC_(h5psetc_c, H5PSETC_C) -#define nh5pget_integer_c H5_FC_FUNC_(h5pget_integer_c, H5PGET_INTEGER_C) -#define nh5pget_real_c H5_FC_FUNC_(h5pget_real_c, H5PGET_REAL_C) -#define nh5pget_double_c H5_FC_FUNC_(h5pget_double_c, H5PGET_DOUBLE_C) -#define nh5pgetc_c H5_FC_FUNC_(h5pgetc_c, H5PGETC_C) -#define nh5pexist_c H5_FC_FUNC_(h5pexist_c, H5PEXIST_C) -#define nh5pget_size_c H5_FC_FUNC_(h5pget_size_c, H5PGET_SIZE_C) -#define nh5pget_nprops_c H5_FC_FUNC_(h5pget_nprops_c, H5PGET_NPROPS_C) -#define nh5pget_class_parent_c H5_FC_FUNC_(h5pget_class_parent_c, H5PGET_CLASS_PARENT_C) -#define nh5pisa_class_c H5_FC_FUNC_(h5pisa_class_c, H5PISA_CLASS_C) -#define nh5pcopy_prop_c H5_FC_FUNC_(h5pcopy_prop_c, H5PCOPY_PROP_C) -#define nh5premove_c H5_FC_FUNC_(h5premove_c, H5PREMOVE_C) -#define nh5punregister_c H5_FC_FUNC_(h5punregister_c, H5PUNREGISTER_C) -#define nh5pclose_class_c H5_FC_FUNC_(h5pclose_class_c, H5PCLOSE_CLASS_C) -#define nh5pget_class_name_c H5_FC_FUNC_(h5pget_class_name_c, H5PGET_CLASS_NAME_C) -#define nh5pset_shuffle_c H5_FC_FUNC_(h5pset_shuffle_c, H5PSET_SHUFFLE_C) -#define nh5pset_fletcher32_c H5_FC_FUNC_(h5pset_fletcher32_c, H5PSET_FLETCHER32_C) -#define nh5pset_edc_check_c H5_FC_FUNC_(h5pset_edc_check_c, H5PSET_EDC_CHECK_C) -#define nh5pget_edc_check_c H5_FC_FUNC_(h5pget_edc_check_c, H5PGET_EDC_CHECK_C) -#define nh5pset_family_offset_c H5_FC_FUNC_(h5pset_family_offset_c, H5PSET_FAMILY_OFFSET_C) -#define nh5pget_fapl_multi_c H5_FC_FUNC_(h5pget_fapl_multi_c, H5PGET_FAPL_MULTI_C) -#define nh5pset_fapl_multi_c H5_FC_FUNC_(h5pset_fapl_multi_c, H5PSET_FAPL_MULTI_C) -#define nh5pset_fapl_multi_sc H5_FC_FUNC_(h5pset_fapl_multi_sc, H5PSET_FAPL_MULTI_SC) -#define nh5pset_szip_c H5_FC_FUNC_(h5pset_szip_c, H5PSET_SZIP_C) -#define nh5pall_filters_avail_c H5_FC_FUNC_(h5pall_filters_avail_c, H5PALL_FILTERS_AVAIL_C) -#define nh5pget_attr_phase_change_c H5_FC_FUNC_(h5pget_attr_phase_change_c, H5PGET_ATTR_PHASE_CHANGE_C) -#define nh5pset_attr_creation_order_c H5_FC_FUNC_(h5pset_attr_creation_order_c, H5PSET_ATTR_CREATION_ORDER_C) -#define nh5pset_shared_mesg_nindexes_c H5_FC_FUNC_(h5pset_shared_mesg_nindexes_c, H5PSET_SHARED_MESG_NINDEXES_C) -#define nh5pset_shared_mesg_index_c H5_FC_FUNC_(h5pset_shared_mesg_index_c,H5PSET_SHARED_MESG_INDEX_C) -#define nh5pget_attr_creation_order_c H5_FC_FUNC_(h5pget_attr_creation_order_c,H5PGET_ATTR_CREATION_ORDER_C) -#define nh5pset_libver_bounds_c H5_FC_FUNC_(h5pset_libver_bounds_c,H5PSET_LIBVER_BOUNDS_C) -#define nh5pset_link_creation_order_c H5_FC_FUNC_(h5pset_link_creation_order_c, H5PSET_LINK_CREATION_ORDER_C) -#define nh5pget_link_phase_change_c H5_FC_FUNC_(h5pget_link_phase_change_c, H5PGET_LINK_PHASE_CHANGE_C) -#define nh5pget_obj_track_times_c H5_FC_FUNC_(h5pget_obj_track_times_c, H5PGET_OBJ_TRACK_TIMES_C) -#define nh5pset_obj_track_times_c H5_FC_FUNC_(h5pset_obj_track_times_c, H5PSET_OBJ_TRACK_TIMES_C) -#define nh5pset_create_inter_group_c H5_FC_FUNC_(h5pset_create_inter_group_c,H5PSET_CREATE_INTER_GROUP_C) -#define nh5pget_create_inter_group_c H5_FC_FUNC_(h5pget_create_inter_group_c,H5PGET_CREATE_INTER_GROUP_C) -#define nh5pget_link_creation_order_c H5_FC_FUNC_(h5pget_link_creation_order_c,H5PGET_LINK_CREATION_ORDER_C) -#define nh5pset_char_encoding_c H5_FC_FUNC_(h5pset_char_encoding_c, H5PSET_CHAR_ENCODING_C) -#define nh5pget_char_encoding_c H5_FC_FUNC_(h5pget_char_encoding_c, H5PGET_CHAR_ENCODING_C) -#define nh5pset_copy_object_c H5_FC_FUNC_(h5pset_copy_object_c, H5PSET_COPY_OBJECT_C) -#define nh5pget_copy_object_c H5_FC_FUNC_(h5pget_copy_object_c, H5PGET_COPY_OBJECT_C) -#define nh5pget_data_transform_c H5_FC_FUNC_(h5pget_data_transform_c, H5PGET_DATA_TRANSFORM_C) -#define nh5pset_data_transform_c H5_FC_FUNC_(h5pset_data_transform_c, H5PSET_DATA_TRANSFORM_C) -#define nh5pget_local_heap_size_hint_c H5_FC_FUNC_(h5pget_local_heap_size_hint_c, H5PGET_LOCAL_HEAP_SIZE_HINT_C) -#define nh5pget_est_link_info_c H5_FC_FUNC_(h5pget_est_link_info_c,H5PGET_EST_LINK_INFO_C) -#define nh5pset_est_link_info_c H5_FC_FUNC_(h5pset_est_link_info_c,H5PSET_EST_LINK_INFO_C) -#define nh5pset_local_heap_size_hint_c H5_FC_FUNC_(h5pset_local_heap_size_hint_c, H5PSET_LOCAL_HEAP_SIZE_HINT_C) -#define nh5pset_link_phase_change_c H5_FC_FUNC_(h5pset_link_phase_change_c, H5PSET_LINK_PHASE_CHANGE_C) -#define nh5pset_fapl_direct_c H5_FC_FUNC_(h5pset_fapl_direct_c, H5PSET_FAPL_DIRECT_C) -#define nh5pget_fapl_direct_c H5_FC_FUNC_(h5pget_fapl_direct_c, H5PGET_FAPL_DIRECT_C) -#define nh5pset_attr_phase_change_c H5_FC_FUNC_(h5pset_attr_phase_change_c, H5PSET_ATTR_PHASE_CHANGE_C) -#define nh5pset_nbit_c H5_FC_FUNC_(h5pset_nbit_c, H5PSET_NBIT_C) -#define nh5pset_scaleoffset_c H5_FC_FUNC_(h5pset_scaleoffset_c, H5PSET_SCALEOFFSET_C) -#define nh5pset_nlinks_c H5_FC_FUNC_(h5pset_nlinks_c, H5PSET_NLINKS_C) -#define nh5pget_nlinks_c H5_FC_FUNC_(h5pget_nlinks_c, H5PGET_NLINKS_C) -#define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C) -#define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C) -#define nh5pget_mpio_actual_io_mode_c H5_FC_FUNC_(h5pget_mpio_actual_io_mode_c, H5PGET_MPIO_ACTUAL_IO_MODE_C) - -H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); -H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id ); -H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); -H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); -H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); -H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level); -H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); -H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); +H5_FCDLL int_f h5pclose_c ( hid_t_f *prp_id ); +H5_FCDLL int_f h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); +H5_FCDLL int_f h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); +H5_FCDLL int_f h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); +H5_FCDLL int_f h5pset_deflate_c ( hid_t_f *prp_id , int_f *level); +H5_FCDLL int_f h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); +H5_FCDLL int_f h5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); +H5_FCDLL int_f h5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); -H5_FCDLL int_f nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f nh5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver); -H5_FCDLL int_f nh5pset_fapl_stdio_c (hid_t_f *prp_id); -H5_FCDLL int_f nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io); -H5_FCDLL int_f nh5pset_fapl_sec2_c (hid_t_f *prp_id); -H5_FCDLL int_f nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2); -H5_FCDLL int_f nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f nh5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -H5_FCDLL int_f nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -H5_FCDLL int_f nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); -H5_FCDLL int_f nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); -H5_FCDLL int_f nh5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f nh5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f nh5pset_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f nh5pget_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f nh5premove_filter_c (hid_t_f *prp_id, int_f* filter); -H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -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, 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, 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); -H5_FCDLL int_f nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f nh5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f nh5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f nh5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pget_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pset_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pget_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); +H5_FCDLL int_f h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver); +H5_FCDLL int_f h5pset_fapl_stdio_c (hid_t_f *prp_id); +H5_FCDLL int_f h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io); +H5_FCDLL int_f h5pset_fapl_sec2_c (hid_t_f *prp_id); +H5_FCDLL int_f h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2); +H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); +H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); +H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f h5pset_layout_c (hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pget_layout_c (hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5premove_filter_c (hid_t_f *prp_id, int_f* filter); +H5_FCDLL int_f h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters); +H5_FCDLL int_f h5pget_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 h5pget_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 h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes); +H5_FCDLL int_f h5pget_external_count_c (hid_t_f *prp_id, int_f* count); +H5_FCDLL int_f h5pget_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 h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); +H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); +H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f h5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f h5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f h5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pget_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pset_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pget_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, void *close_data); -H5_FCDLL int_f nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); +H5_FCDLL int_f h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); +H5_FCDLL int_f h5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len); +H5_FCDLL int_f h5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f h5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5psetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); +H5_FCDLL int_f h5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5pset_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5psetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); H5_FCDLL int_f h5pget_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pgetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); -H5_FCDLL int_f nh5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); -H5_FCDLL int_f nh5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); -H5_FCDLL int_f nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); -H5_FCDLL int_f nh5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); -H5_FCDLL int_f nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pclose_class_c(hid_t_f * cls); -H5_FCDLL int_f nh5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pset_shuffle_c ( hid_t_f *prp_id); -H5_FCDLL int_f nh5pset_fletcher32_c ( hid_t_f *prp_id ); -H5_FCDLL int_f nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset); -H5_FCDLL int_f nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); -H5_FCDLL int_f nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); -H5_FCDLL int_f nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); -H5_FCDLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); -H5_FCDLL int_f nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); -H5_FCDLL int_f nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); -H5_FCDLL int_f nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); -H5_FCDLL int_f nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); -H5_FCDLL int_f nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); -H5_FCDLL int_f nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f nh5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_nbit_c(hid_t_f *plist_id ); -H5_FCDLL int_f nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); -H5_FCDLL int_f nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -H5_FCDLL int_f nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); +H5_FCDLL int_f h5pget_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5pget_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5pget_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f h5pgetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); +H5_FCDLL int_f h5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); +H5_FCDLL int_f h5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); +H5_FCDLL int_f h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); +H5_FCDLL int_f h5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); +H5_FCDLL int_f h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); +H5_FCDLL int_f h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pclose_class_c(hid_t_f * cls); +H5_FCDLL int_f h5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pset_shuffle_c ( hid_t_f *prp_id); +H5_FCDLL int_f h5pset_fletcher32_c ( hid_t_f *prp_id ); +H5_FCDLL int_f h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset); +H5_FCDLL int_f h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); +H5_FCDLL int_f h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); +H5_FCDLL int_f h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); +H5_FCDLL int_f h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); +H5_FCDLL int_f h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); +H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); +H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); +H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); +H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); +H5_FCDLL int_f h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); +H5_FCDLL int_f h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f h5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id ); +H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); +H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); /* * Functions frome H5Rf.c */ -- cgit v0.12 From a58b2dbb7ef88b8376d2a02076b000e012214e99 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 20 Apr 2015 11:03:54 -0500 Subject: [svn-r26846] BIND(C) added to H5 general functions --- fortran/src/H5_f.c | 20 ++++++------ fortran/src/H5_ff.F90 | 80 +++++++++++++++++++++--------------------------- fortran/src/H5f90proto.h | 32 ++++++------------- 3 files changed, 55 insertions(+), 77 deletions(-) diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index e4aadb6..8df4b36 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -49,7 +49,7 @@ * SOURCE */ int_f -nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) +h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) /******/ { int ret_value = -1; @@ -300,7 +300,7 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype * SOURCE */ int_f -nh5close_types_c( hid_t_f * types, int_f *lentypes, +h5close_types_c( hid_t_f * types, int_f *lentypes, hid_t_f * floatingtypes, int_f* floatinglen, hid_t_f * integertypes, int_f * integerlen ) /******/ @@ -368,7 +368,7 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes, * SOURCE */ int_f -nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, +h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, @@ -708,7 +708,7 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, } int_f -nh5init1_flags_c(int_f *h5lib_flags) +h5init1_flags_c(int_f *h5lib_flags) /******/ { int ret_value = -1; @@ -734,7 +734,7 @@ nh5init1_flags_c(int_f *h5lib_flags) * SOURCE */ int_f -nh5open_c(void) +h5open_c(void) /******/ { int ret_value = -1; @@ -755,7 +755,7 @@ nh5open_c(void) * SOURCE */ int_f -nh5close_c(void) +h5close_c(void) /******/ { int ret_value = -1; @@ -788,7 +788,7 @@ nh5close_c(void) * */ int_f -nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) +h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { @@ -826,7 +826,7 @@ nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) * SOURCE */ int_f -nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) +h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { int ret_value = -1; @@ -855,7 +855,7 @@ nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) * SOURCE */ int_f -nh5garbage_collect_c(void) +h5garbage_collect_c(void) /******/ { int ret_value = -1; @@ -878,7 +878,7 @@ nh5garbage_collect_c(void) * SOURCE */ int_f -nh5dont_atexit_c(void) +h5dont_atexit_c(void) /******/ { int ret_value = -1; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 3ca3979..d807d6e 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -32,7 +32,9 @@ MODULE H5LIB + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T USE H5GLOBAL + IMPLICIT NONE CONTAINS !****s* H5LIB/h5open_f @@ -60,21 +62,20 @@ CONTAINS ! October 13, 2011 ! Fortran90 Interface: SUBROUTINE h5open_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTEGER :: error_1, error_2, error_3 INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) - USE H5GLOBAL + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) & + BIND(C,NAME='h5init_types_c') + IMPORT :: HID_T + IMPORT :: PREDEF_TYPES_LEN, FLOATING_TYPES_LEN, INTEGER_TYPES_LEN + IMPLICIT NONE INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c - !DEC$ENDIF END FUNCTION h5init_types_c END INTERFACE INTERFACE @@ -96,8 +97,17 @@ CONTAINS i_H5S_hsize_flags, & i_H5T_flags, & i_H5Z_flags, & - i_H5generic_flags) - USE H5GLOBAL + i_H5generic_flags) & + BIND(C,NAME='h5init_flags_c') + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, & + H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, & + H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, & + H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, & + H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, & + H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & + H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN + IMPLICIT NONE INTEGER i_H5D_flags(H5D_FLAGS_LEN) INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) INTEGER i_H5E_flags(H5E_FLAGS_LEN) @@ -117,18 +127,14 @@ CONTAINS INTEGER i_H5T_flags(H5T_FLAGS_LEN) INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c - !DEC$ENDIF END FUNCTION h5init_flags_c END INTERFACE INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) - USE H5GLOBAL + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) & + BIND(C,NAME='h5init1_flags_c') + IMPORT :: H5LIB_FLAGS_LEN + IMPLICIT NONE INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c - !DEC$ENDIF END FUNCTION h5init1_flags_c END INTERFACE error_1 = h5init_types_c(predef_types, floating_types, integer_types) @@ -180,7 +186,6 @@ CONTAINS ! October 13, 2011 ! Fortran90 Interface: SUBROUTINE h5close_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** @@ -188,17 +193,15 @@ CONTAINS INTERFACE INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) - USE H5GLOBAL + i_types, I_TYPES_LEN ) & + BIND(C,NAME='h5close_types_c') + IMPORT :: HID_T INTEGER P_TYPES_LEN INTEGER F_TYPES_LEN INTEGER I_TYPES_LEN INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c - !DEC$ENDIF END FUNCTION h5close_types_c END INTERFACE error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & @@ -228,15 +231,13 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error !***** INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c - !DEC$ENDIF + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) & + BIND(C,NAME='h5get_libversion_c') + IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum END FUNCTION h5get_libversion_c END INTERFACE @@ -267,16 +268,14 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c - !DEC$ENDIF + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) & + BIND(C,NAME='h5check_version_c') + IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum END FUNCTION h5check_version_c END INTERFACE @@ -301,15 +300,12 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5garbage_collect_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5garbage_collect_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c - !DEC$ENDIF + INTEGER FUNCTION h5garbage_collect_c() & + BIND(C,NAME='h5garbage_collect_c') END FUNCTION h5garbage_collect_c END INTERFACE @@ -333,15 +329,12 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5dont_atexit_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5dont_atexit_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c - !DEC$ENDIF + INTEGER FUNCTION h5dont_atexit_c() & + BIND(C,NAME='h5dont_atexit_c') END FUNCTION h5dont_atexit_c END INTERFACE @@ -371,7 +364,6 @@ CONTAINS ! ! Fortran90 Interface: INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(IN) :: kind INTEGER, INTENT(IN) :: flag @@ -422,8 +414,6 @@ CONTAINS ! ! Fortran2003 Interface: FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL IMPLICIT NONE INTEGER(SIZE_T) :: offset TYPE(C_PTR), VALUE, INTENT(IN) :: start, end diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 002004e..4da66fb 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -708,32 +708,20 @@ H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t /* * Functions from H5f.c */ -#define nh5open_c H5_FC_FUNC_(h5open_c, H5OPEN_C) -#define nh5close_c H5_FC_FUNC_(h5close_c, H5CLOSE_C) -#define nh5init_types_c H5_FC_FUNC_(h5init_types_c, H5INIT_TYPES_C) -#define nh5close_types_c H5_FC_FUNC_(h5close_types_c, H5CLOSE_TYPES_C) -#define nh5init_flags_c H5_FC_FUNC_(h5init_flags_c, H5INIT_FLAGS_C) -#define nh5init1_flags_c H5_FC_FUNC_(h5init1_flags_c, H5INIT1_FLAGS_C) -#define nh5get_libversion_c H5_FC_FUNC_(h5get_libversion_c, H5GET_LIBVERSION_C) -#define nh5check_version_c H5_FC_FUNC_(h5check_version_c, H5CHECK_VERSION_C) -#define nh5garbage_collect_c H5_FC_FUNC_(h5garbage_collect_c, H5GARBAGE_COLLECT_C) -#define nh5dont_atexit_c H5_FC_FUNC_(h5dont_atexit_c, H5DONT_ATEXIT_C) - - -H5_FCDLL int_f nh5open_c(void); -H5_FCDLL int_f nh5close_c(void); -H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); -H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); -H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, +H5_FCDLL int_f h5open_c(void); +H5_FCDLL int_f h5close_c(void); +H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); +H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); +H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags); -H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags); -H5_FCDLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f nh5garbage_collect_c(void); -H5_FCDLL int_f nh5dont_atexit_c(void); +H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags); +H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f h5garbage_collect_c(void); +H5_FCDLL int_f h5dont_atexit_c(void); /* * Functions from H5Zf.c -- cgit v0.12 From 5fd5aa58ca66c387551f1d79f0d49bbb76067109 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 20 Apr 2015 14:15:30 -0500 Subject: [svn-r26847] combined H5test_kind programs --- MANIFEST | 7 +- configure | 59 +--- configure.ac | 18 +- fortran/src/CMakeLists.txt | 27 +- fortran/src/H5config_f.inc.in | 9 + fortran/src/H5test_kind.F90 | 255 +++++++-------- fortran/src/H5test_kind_SIZEOF.F90 | 228 -------------- fortran/src/H5test_kind_STORAGE_SIZE.F90 | 230 -------------- fortran/src/Makefile.am | 11 +- fortran/src/Makefile.in | 13 +- fortran/test/CMakeLists.txt | 14 +- fortran/test/Makefile.am | 18 +- fortran/test/Makefile.in | 83 ++--- fortran/test/tf.F90 | 520 +++++++++++++++++++++++++++++++ fortran/test/tf.f90 | 393 ----------------------- fortran/test/tf_F03.f90 | 128 -------- fortran/test/tf_F08.f90 | 128 -------- fortran/test/tf_F90.f90 | 33 -- src/H5config.h.in | 9 + 19 files changed, 734 insertions(+), 1449 deletions(-) delete mode 100644 fortran/src/H5test_kind_SIZEOF.F90 delete mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.F90 create mode 100644 fortran/test/tf.F90 delete mode 100644 fortran/test/tf.f90 delete mode 100644 fortran/test/tf_F03.f90 delete mode 100644 fortran/test/tf_F08.f90 delete mode 100644 fortran/test/tf_F90.f90 diff --git a/MANIFEST b/MANIFEST index 1d03f6d..b495598 100644 --- a/MANIFEST +++ b/MANIFEST @@ -306,8 +306,6 @@ ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h ./fortran/src/H5test_kind.F90 -./fortran/src/H5test_kind_SIZEOF.F90 -./fortran/src/H5test_kind_STORAGE_SIZE.F90 ./fortran/src/H5match_types.c ./fortran/src/HDF5.F90 ./fortran/src/H5config_f.inc.in @@ -327,10 +325,7 @@ ./fortran/test/fortranlib_test_F03.f90 ./fortran/test/t.c ./fortran/test/t.h -./fortran/test/tf.f90 -./fortran/test/tf_F90.f90 -./fortran/test/tf_F03.f90 -./fortran/test/tf_F08.f90 +./fortran/test/tf.F90 ./fortran/test/tH5A.f90 ./fortran/test/tH5A_1_8.f90 ./fortran/test/tH5D.f90 diff --git a/configure b/configure index 6de2d2f..a67a27b 100755 --- a/configure +++ b/configure @@ -726,12 +726,6 @@ FORTRAN_DEFAULT_REALisDBLE_F_FALSE FORTRAN_DEFAULT_REALisDBLE_F_TRUE FORTRAN_2003_CONDITIONAL_F_FALSE FORTRAN_2003_CONDITIONAL_F_TRUE -FORTRAN_HAVE_STORAGE_SIZE_FALSE -FORTRAN_HAVE_STORAGE_SIZE_TRUE -FORTRAN_HAVE_C_SIZEOF_FALSE -FORTRAN_HAVE_C_SIZEOF_TRUE -FORTRAN_HAVE_SIZEOF_FALSE -FORTRAN_HAVE_SIZEOF_TRUE FCLIBS F9XMODEXT F9XMODFLAG @@ -6539,6 +6533,23 @@ rm -f core conftest.err conftest.$ac_objext \ + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 + fi + + +$as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h + + + +$as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h + + + +$as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h + + ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. @@ -6635,30 +6646,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_SIZEOF_TRUE= - FORTRAN_HAVE_SIZEOF_FALSE='#' -else - FORTRAN_HAVE_SIZEOF_TRUE='#' - FORTRAN_HAVE_SIZEOF_FALSE= -fi - - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_SIZEOF_TRUE= - FORTRAN_HAVE_C_SIZEOF_FALSE='#' -else - FORTRAN_HAVE_C_SIZEOF_TRUE='#' - FORTRAN_HAVE_C_SIZEOF_FALSE= -fi - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_STORAGE_SIZE_TRUE= - FORTRAN_HAVE_STORAGE_SIZE_FALSE='#' -else - FORTRAN_HAVE_STORAGE_SIZE_TRUE='#' - FORTRAN_HAVE_STORAGE_SIZE_FALSE= -fi - if test "X$HAVE_FORTRAN_2003" = "Xyes"; then FORTRAN_2003_CONDITIONAL_F_TRUE= FORTRAN_2003_CONDITIONAL_F_FALSE='#' @@ -30223,18 +30210,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_HAVE_C_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_C_SIZEOF_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_C_SIZEOF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_HAVE_STORAGE_SIZE_TRUE}" && test -z "${FORTRAN_HAVE_STORAGE_SIZE_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_STORAGE_SIZE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 9555d37..77036d68 100644 --- a/configure.ac +++ b/configure.ac @@ -441,9 +441,20 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" PAC_PROG_FC_C_SIZEOF - + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - PAC_PROG_FC_STORAGE_SIZE + PAC_PROG_FC_STORAGE_SIZE + + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) + fi + + AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) + + AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + + AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. @@ -468,9 +479,6 @@ fi ## Change back to the C language AC_LANG_POP(Fortran) -AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"]) AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index f2f8ded..e38460d 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -21,27 +21,16 @@ endif (WIN32) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind(_SIZEOF,_STORAGE_SIZE).F90 used to generate H5fortran_detect.F90 -# H5fortran_detect.F90 used to generate H5fort_type_defines.h -# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 +# H5test_kind.F90 used to generate H5fortran_detect.F90 +# H5fortran_detect.F90 used to generate H5fort_type_defines.h +# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- -if (FORTRAN_HAVE_STORAGE_SIZE) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.F90 + +add_executable (H5test_FortranHavekind + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 ) - set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") -else (FORTRAN_HAVE_STORAGE_SIZE) - if (FORTRAN_HAVE_SIZEOF) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.F90 - ) - set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") - else (FORTRAN_HAVE_SIZEOF) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 - ) - endif (FORTRAN_HAVE_SIZEOF) -endif (FORTRAN_HAVE_STORAGE_SIZE) +set (H5_TEST_KIND_NAME "h5test_kind_mod") + if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) set_target_properties (H5test_FortranHavekind diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index aec8b08..ceecd36 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -2,3 +2,12 @@ ! Define if we have parallel support #undef HAVE_PARALLEL + +! Define if the intrinsic function STORAGE_SIZE exists +#undef FORTRAN_HAVE_STORAGE_SIZE + +! Define if the intrinsic function SIZEOF exists +#undef FORTRAN_HAVE_SIZEOF + +! Define if the intrinsic function C_SIZEOF exists +#undef FORTRAN_HAVE_C_SIZEOF diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 1a1a0ec..6cd75bc 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -13,13 +13,17 @@ ! depending on which of the KIND values are found. ! ! NOTES -! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only -! used when the Fortran intrinsic function SIZEOF is not available. It generates -! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less -! portable in comparison to using SIZEOF. +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. ! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -38,17 +42,22 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR -! Elena Pourma +! M. Scot Breitenfeld ! !***** +#include "H5config_f.inc" + PROGRAM test_kind IMPLICIT NONE INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) INTEGER :: ji, jr, jd last = -1 ii = 0 - j = SELECTED_INT_KIND(18) + + ikind_numbers = 0 + rkind_numbers = 0 + DO i = 1,100 j = SELECTED_INT_KIND(i) IF(j .NE. last) THEN @@ -88,11 +97,7 @@ WRITE(*,'(40(A,/))') & '! H5fort_type_defines.h. The source code itself was automatically generated by',& '! the program H5test_kind.f90',& '!',& -'! NOTES',& -'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be not available at',& -'! configure time',& -'!',& +'! COPYRIGHT',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '! Copyright by The HDF Group. *',& '! Copyright by the Board of Trustees of the University of Illinois. *',& @@ -113,156 +118,130 @@ WRITE(*,'(40(A,/))') & '!',& '!*****' -! Generate a program +! GENERATE A PROGRAM +! +! (a) Generate the module - WRITE(*,*) "PROGRAM int_kind" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM int_kind" + WRITE(*,*) "MODULE H5test_kind_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" j = 0 ji = KIND(1) WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" WRITE(*,*)" RETURN" WRITE(*,*)"END SUBROUTINE" - jr = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" WRITE(*,*)" RETURN" WRITE(*,*)"END SUBROUTINE" - jd = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: b=0" - WRITE(*,*)" INTEGER :: a(8)=0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: b_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1))" - WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" - WRITE(*,*)" IF (b_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (b_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" WRITE(*,*)" RETURN" WRITE(*,*)"END SUBROUTINE" DO i = 1, ii j = ikind_numbers(i) WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER(",j,") :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" ENDDO DO i = 1, ir j = rkind_numbers(i) WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL(KIND=",j,") :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind" + WRITE(*,*) "USE H5test_kind_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind" + END PROGRAM test_kind diff --git a/fortran/src/H5test_kind_SIZEOF.F90 b/fortran/src/H5test_kind_SIZEOF.F90 deleted file mode 100644 index 468086a..0000000 --- a/fortran/src/H5test_kind_SIZEOF.F90 +++ /dev/null @@ -1,228 +0,0 @@ -!****p* Program/H5test_kind_SIZEOF -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_SIZEOF.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! 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 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". -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_SIZEOF.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" - WRITE(*,*) "USE H5test_kind_SIZEOF_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" - -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.F90 b/fortran/src/H5test_kind_STORAGE_SIZE.F90 deleted file mode 100644 index 89c904c..0000000 --- a/fortran/src/H5test_kind_STORAGE_SIZE.F90 +++ /dev/null @@ -1,230 +0,0 @@ -!****p* Program/H5test_kind_STORAGE_SIZE -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_STORAGE_SIZE.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when -! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code -! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard -! compliant. This program is the preferred method. -! -! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_STORAGE_SIZE.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_C_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" - WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" - -END PROGRAM test_kind - - - diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 0250117..13e250b 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -159,15 +159,7 @@ H5fortran_detect.F90: H5test_kind$(EXEEXT) # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -if FORTRAN_HAVE_STORAGE_SIZE - H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 -else -if FORTRAN_HAVE_SIZEOF - H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 -else - H5test_kind_SOURCES = H5test_kind.F90 -endif -endif +H5test_kind_SOURCES = H5test_kind.f90 # Mark this directory as part of the Fortran API FORTRAN_API=yes @@ -180,7 +172,6 @@ H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo H5fortran_types.lo: H5fortran_types.F90 H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index df5f5a6..ea924f9 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -172,11 +172,7 @@ H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) -am__H5test_kind_SOURCES_DIST = H5test_kind.F90 H5test_kind_SIZEOF.F90 \ - H5test_kind_STORAGE_SIZE.F90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind_SIZEOF.$(OBJEXT) -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_H5test_kind_OBJECTS = H5test_kind_STORAGE_SIZE.$(OBJEXT) +am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) H5test_kind_OBJECTS = $(am_H5test_kind_OBJECTS) H5test_kind_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) @@ -242,7 +238,7 @@ SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ H5match_types.c $(H5test_kind_SOURCES) DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) \ $(H5fortran_detect_SOURCES) H5match_types.c \ - $(am__H5test_kind_SOURCES_DIST) + $(H5test_kind_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -772,12 +768,10 @@ BUILT_SOURCES = H5f90i_gen.h # Automake knows how to build fortran programs if we tell it the source # files. H5fortran_detect_SOURCES = H5fortran_detect.F90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.F90 -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 +H5test_kind_SOURCES = H5test_kind.f90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -1426,7 +1420,6 @@ H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo H5fortran_types.lo: H5fortran_types.F90 H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 2893156..335de81 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -23,18 +23,8 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then -# fall back to F2003. If F2003 not supported then use F90 for the tests. - -set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) -if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90) -elseif (HDF5_ENABLE_F2003) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F03.f90 tf.f90) -else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F90.f90 tf.f90) -endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - +set_source_files_properties (tf.F90 PROPERTIES LANGUAGE Fortran) +add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90) set (SHARED_LINK_FLAGS " ") if (WIN32) diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 735ab7a..f8c9d02 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -53,23 +53,7 @@ endif check_PROGRAMS=$(TEST_PROG) -if FORTRAN_HAVE_STORAGE_SIZE -if FORTRAN_HAVE_C_SIZEOF - libh5test_fortran_la_SOURCES = tf_F08.f90 -else - libh5test_fortran_la_SOURCES = tf_F03.f90 -endif -else -if FORTRAN_2003_CONDITIONAL_F - libh5test_fortran_la_SOURCES = tf_F03.f90 -else - libh5test_fortran_la_SOURCES = tf_F90.f90 -endif -endif - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -libh5test_fortran_la_SOURCES += tf.f90 t.c +libh5test_fortran_la_SOURCES = tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index a776c96..3259f0174 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -103,20 +103,7 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_fortran_la_LIBADD = -am__libh5test_fortran_la_SOURCES_DIST = tf_F90.f90 tf.f90 t.c \ - tf_F03.f90 tf_F08.f90 -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F90.lo \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo +am_libh5test_fortran_la_OBJECTS = tf.lo t.lo libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -192,6 +179,24 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -217,20 +222,12 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) -DIST_SOURCES = $(am__libh5test_fortran_la_SOURCES_DIST) \ - $(fflush1_SOURCES) $(fflush2_SOURCES) \ - $(fortranlib_test_SOURCES) $(fortranlib_test_1_8_SOURCES) \ +DIST_SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ + $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ + $(fortranlib_test_1_8_SOURCES) \ $(am__fortranlib_test_F03_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -742,30 +739,7 @@ noinst_LTLIBRARIES = libh5test_fortran.la # Our main targets, the tests themselves TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ $(am__append_2) - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F90.f90 \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F08.f90 \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c +libh5test_fortran_la_SOURCES = tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -813,7 +787,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -897,6 +871,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t.Plo@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 new file mode 100644 index 0000000..aabccd3 --- /dev/null +++ b/fortran/test/tf.F90 @@ -0,0 +1,520 @@ +!****h* root/fortran/test/tf.f90 +! +! NAME +! tf.f90 +! +! FUNCTION +! Contains subroutines which are needed in all the hdf5 fortran tests +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! CONTAINS SUBROUTINES +! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, +! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv +! +!***** + +#include "H5config_f.inc" + +MODULE TH5_MISC + + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors + + ! generic compound datatype + TYPE, BIND(C) :: comp_datatype + REAL :: a + INTEGER :: x + DOUBLE PRECISION :: y + CHARACTER(LEN=1) :: z + END TYPE comp_datatype + + PUBLIC :: H5_SIZEOF + INTERFACE H5_SIZEOF + MODULE PROCEDURE H5_SIZEOF_CMPD + MODULE PROCEDURE H5_SIZEOF_CHR + MODULE PROCEDURE H5_SIZEOF_I + MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP + END INTERFACE + +CONTAINS + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: dreal_eq +!DEC$endif + LOGICAL FUNCTION dreal_eq(a,b) + + ! Check if two double precision reals are equivalent + REAL(dp), INTENT (in):: a,b + REAL(dp), PARAMETER :: eps = 1.e-8 + dreal_eq = ABS(a-b) .LT. eps + + END FUNCTION dreal_eq + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_real_kind_7 +!DEC$endif + SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) + USE HDF5 + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + CHARACTER(LEN=*) :: string + REAL(real_kind_7) :: value, correct_value + INTEGER :: total_error + IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_real_kind_7 + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: write_test_status +!DEC$endif + SUBROUTINE write_test_status( test_result, test_title, total_error) + + ! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, --skip -- + ! 0 , passed + ! positive, failed + + CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test + INTEGER, INTENT(INOUT) :: total_error ! Accumulated error + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' + + + error_string = failure + IF (test_result == 0) THEN + error_string = success + ELSE IF (test_result == -1) THEN + error_string = skip + ENDIF + + WRITE(*, fmt = '(A, T72, A)') test_title, error_string + + IF(test_result.GT.0) total_error = total_error + test_result + + END SUBROUTINE write_test_status + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: check +!DEC$endif + SUBROUTINE check(string,error,total_error) + CHARACTER(LEN=*) :: string + INTEGER :: error, total_error + IF (error .LT. 0) THEN + total_error=total_error+1 + WRITE(*,*) string, " FAILED" + ENDIF + RETURN + END SUBROUTINE check + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify +!DEC$endif + SUBROUTINE VERIFY(string,value,correct_value,total_error) + CHARACTER(LEN=*) :: string + INTEGER :: value, correct_value, total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_INTEGER_HID_T +!DEC$endif + SUBROUTINE verify_INTEGER_HID_T(string,value,correct_value,total_error) + USE HDF5 + CHARACTER(LEN=*) :: string + INTEGER(HID_T) :: value, correct_value + INTEGER :: total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_INTEGER_HID_T + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_Fortran_INTEGER_4 +!DEC$endif + SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) + USE HDF5 + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors + CHARACTER(LEN=*) :: string + INTEGER(int_kind_8) :: value, correct_value + INTEGER :: total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_Fortran_INTEGER_4 + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verifyLogical +!DEC$endif + SUBROUTINE verifyLogical(string,value,correct_value,total_error) + CHARACTER(LEN=*) :: string + LOGICAL :: value, correct_value + INTEGER :: total_error + IF (value .NEQV. correct_value) THEN + total_error = total_error + 1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verifyLogical + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verifyString +!DEC$endif + SUBROUTINE verifyString(string, value,correct_value,total_error) + CHARACTER*(*) :: string + CHARACTER*(*) :: value, correct_value + INTEGER :: total_error + IF (TRIM(value) .NE. TRIM(correct_value)) THEN + total_error = total_error + 1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verifyString + + +!---------------------------------------------------------------------- +! Name: h5_fixname_f +! +! Purpose: Create a file name from the a file base name. +! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! full_name - full file name +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 13, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_fixname_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string +! INTEGER(HID_T) :: fapl_default + + INTERFACE + INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + !DEC$ATTRIBUTES reference :: full_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + CHARACTER(LEN=*), INTENT(IN) :: full_name + INTEGER(SIZE_T) :: full_namelen + END FUNCTION h5_fixname_c + END INTERFACE + + base_namelen = LEN(base_name) + full_namelen = LEN(full_name) + hdferr = h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + + END SUBROUTINE h5_fixname_f + +!---------------------------------------------------------------------- +! Name: h5_cleanup_f +! +! Purpose: Cleanups tests files +! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 19, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_cleanup_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + + INTERFACE + INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + END FUNCTION h5_cleanup_c + END INTERFACE + + base_namelen = LEN(base_name) + hdferr = h5_cleanup_c(base_name, base_namelen, fapl) + + END SUBROUTINE h5_cleanup_f + +!---------------------------------------------------------------------- +! Name: h5_exit_f +! +! Purpose: Exit application +! It is a fortran counterpart for the standard C 'exit()' routine +! Be careful not to overflow the exit value range since +! UNIX supports a very small range such as 1 byte. +! Therefore, exit(256) may end up as exit(0). +! +! Inputs: +! status - Status to return from application +! +! Outputs: +! none +! +! Programmer: Quincey Koziol +! December 14, 2004 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_exit_f(status) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_exit_f +!DEC$endif + IMPLICIT NONE + INTEGER, INTENT(IN) :: status ! Return code + + INTERFACE + SUBROUTINE h5_exit_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c + !DEC$ ENDIF + INTEGER, INTENT(IN) :: status + END SUBROUTINE h5_exit_c + END INTERFACE + + CALL h5_exit_c(status) + + END SUBROUTINE h5_exit_f + +!---------------------------------------------------------------------- +! Name: h5_env_nocleanup_f +! +! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran +! tests to determine if the output files should be removed +! +! Inputs: +! +! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files +! .false. - remove test files +! +! Programmer: M.S. Breitenfeld +! September 30, 2008 +! +!---------------------------------------------------------------------- + SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_env_nocleanup_f +!DEC$endif + IMPLICIT NONE + LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code + INTEGER :: status + + INTERFACE + SUBROUTINE h5_env_nocleanup_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c + !DEC$ ENDIF + INTEGER :: status + END SUBROUTINE h5_env_nocleanup_c + END INTERFACE + + CALL h5_env_nocleanup_c(status) + + HDF5_NOCLEANUP = .FALSE. + IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. + + END SUBROUTINE h5_env_nocleanup_f + +! --------------------------------------------------------------------------------------------------- +! H5_SIZEOF routines +! +! NOTES +! (1) The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: +! +! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a +! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. +! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows +! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger +! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and +! the variables receiving the result must be declared INTEGER*8." +! +! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or +! characters that do not have a set length (as used in tH5P_F03.f90), sigh... +! +! (2) F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. +! +! (3) Unfortunately we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different +! data types from the various tests. +! +! --------------------------------------------------------------------------------------------------- + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_cmpd +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) + IMPLICIT NONE + TYPE(comp_datatype), INTENT(in) :: a + +#ifdef H5_FORTRAN_FORTRAN_HAVE_C_SIZEOF + H5_SIZEOF_CMPD = C_SIZEOF(a) +#else + H5_SIZEOF_CMPD = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_CMPD + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_chr +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(in) :: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_CHR = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_CHR + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_i +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) + IMPLICIT NONE + INTEGER, INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_I = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_I + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_sp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) + IMPLICIT NONE + REAL(sp), INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_SP = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_SP + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_dp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) + IMPLICIT NONE + REAL(dp), INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_DP = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_DP + +END MODULE TH5_MISC diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90 deleted file mode 100644 index 450daf2..0000000 --- a/fortran/test/tf.f90 +++ /dev/null @@ -1,393 +0,0 @@ -!****h* root/fortran/test/tf.f90 -! -! NAME -! tf.f90 -! -! FUNCTION -! Contains subroutines which are needed in all the hdf5 fortran tests -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, -! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv -! -!***** -MODULE TH5_MISC - - USE TH5_MISC_PROVISIONAL - - IMPLICIT NONE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: dreal_eq -!DEC$endif - LOGICAL FUNCTION dreal_eq(a,b) - - ! Check if two double precision reals are equivalent - REAL(dp), INTENT (in):: a,b - REAL(dp), PARAMETER :: eps = 1.e-8 - dreal_eq = ABS(a-b) .LT. eps - - END FUNCTION dreal_eq - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_real_kind_7 -!DEC$endif - SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors - CHARACTER(LEN=*) :: string - REAL(real_kind_7) :: value, correct_value - INTEGER :: total_error - IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_real_kind_7 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: write_test_status -!DEC$endif - SUBROUTINE write_test_status( test_result, test_title, total_error) - - ! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, --skip -- - ! 0 , passed - ! positive, failed - - CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test - INTEGER, INTENT(INOUT) :: total_error ! Accumulated error - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' - - - error_string = failure - IF (test_result == 0) THEN - error_string = success - ELSE IF (test_result == -1) THEN - error_string = skip - ENDIF - - WRITE(*, fmt = '(A, T72, A)') test_title, error_string - - IF(test_result.GT.0) total_error = total_error + test_result - - END SUBROUTINE write_test_status - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: check -!DEC$endif - SUBROUTINE check(string,error,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: error, total_error - IF (error .LT. 0) THEN - total_error=total_error+1 - WRITE(*,*) string, " FAILED" - ENDIF - RETURN - END SUBROUTINE check - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify -!DEC$endif - SUBROUTINE VERIFY(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: value, correct_value, total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_INTEGER_HID_T -!DEC$endif - SUBROUTINE verify_INTEGER_HID_T(string,value,correct_value,total_error) - USE HDF5 - CHARACTER(LEN=*) :: string - INTEGER(HID_T) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_INTEGER_HID_T - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_Fortran_INTEGER_4 -!DEC$endif - SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors - CHARACTER(LEN=*) :: string - INTEGER(int_kind_8) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_Fortran_INTEGER_4 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyLogical -!DEC$endif - SUBROUTINE verifyLogical(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - LOGICAL :: value, correct_value - INTEGER :: total_error - IF (value .NEQV. correct_value) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyLogical - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyString -!DEC$endif - SUBROUTINE verifyString(string, value,correct_value,total_error) - CHARACTER*(*) :: string - CHARACTER*(*) :: value, correct_value - INTEGER :: total_error - IF (TRIM(value) .NE. TRIM(correct_value)) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyString - - -!---------------------------------------------------------------------- -! Name: h5_fixname_f -! -! Purpose: Create a file name from the a file base name. -! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! full_name - full file name -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 13, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_fixname_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string -! INTEGER(HID_T) :: fapl_default - - INTERFACE - INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - !DEC$ATTRIBUTES reference :: full_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - CHARACTER(LEN=*), INTENT(IN) :: full_name - INTEGER(SIZE_T) :: full_namelen - END FUNCTION h5_fixname_c - END INTERFACE - - base_namelen = LEN(base_name) - full_namelen = LEN(full_name) - hdferr = h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - - END SUBROUTINE h5_fixname_f - -!---------------------------------------------------------------------- -! Name: h5_cleanup_f -! -! Purpose: Cleanups tests files -! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 19, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_cleanup_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - - INTERFACE - INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - END FUNCTION h5_cleanup_c - END INTERFACE - - base_namelen = LEN(base_name) - hdferr = h5_cleanup_c(base_name, base_namelen, fapl) - - END SUBROUTINE h5_cleanup_f - -!---------------------------------------------------------------------- -! Name: h5_exit_f -! -! Purpose: Exit application -! It is a fortran counterpart for the standard C 'exit()' routine -! Be careful not to overflow the exit value range since -! UNIX supports a very small range such as 1 byte. -! Therefore, exit(256) may end up as exit(0). -! -! Inputs: -! status - Status to return from application -! -! Outputs: -! none -! -! Programmer: Quincey Koziol -! December 14, 2004 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_exit_f(status) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_exit_f -!DEC$endif - IMPLICIT NONE - INTEGER, INTENT(IN) :: status ! Return code - - INTERFACE - SUBROUTINE h5_exit_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c - !DEC$ ENDIF - INTEGER, INTENT(IN) :: status - END SUBROUTINE h5_exit_c - END INTERFACE - - CALL h5_exit_c(status) - - END SUBROUTINE h5_exit_f - -!---------------------------------------------------------------------- -! Name: h5_env_nocleanup_f -! -! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran -! tests to determine if the output files should be removed -! -! Inputs: -! -! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files -! .false. - remove test files -! -! Programmer: M.S. Breitenfeld -! September 30, 2008 -! -!---------------------------------------------------------------------- - SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_env_nocleanup_f -!DEC$endif - IMPLICIT NONE - LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code - INTEGER :: status - - INTERFACE - SUBROUTINE h5_env_nocleanup_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c - !DEC$ ENDIF - INTEGER :: status - END SUBROUTINE h5_env_nocleanup_c - END INTERFACE - - CALL h5_env_nocleanup_c(status) - - HDF5_NOCLEANUP = .FALSE. - IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. - - END SUBROUTINE h5_env_nocleanup_f -END MODULE TH5_MISC diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90 deleted file mode 100644 index b3f1399..0000000 --- a/fortran/test/tf_F03.f90 +++ /dev/null @@ -1,128 +0,0 @@ -!****h* root/fortran/test/tf_F03.f90 -! -! NAME -! tf_F03.f90 -! -! FUNCTION -! Contains functions that are part of the F2003 standard, and are not F2008 compliant. -! Needed by the hdf5 fortran tests. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! H5_SIZEOF -! -! NOTES -! The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: -! -! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a -! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. -! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows -! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger -! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and -! the variables receiving the result must be declared INTEGER*8." -! -! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or -! characters that do not have a set length (as used in tH5P_F03.f90), sigh... -! -!***** -MODULE TH5_MISC_PROVISIONAL - - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - - ! generic compound datatype - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z - END TYPE comp_datatype - - PUBLIC :: H5_SIZEOF - INTERFACE H5_SIZEOF - MODULE PROCEDURE H5_SIZEOF_CMPD - MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_CHR - MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP - END INTERFACE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_cmpd - !DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) - IMPLICIT NONE - TYPE(comp_datatype), INTENT(in) :: a - - H5_SIZEOF_CMPD = SIZEOF(a) - - END FUNCTION H5_SIZEOF_CMPD - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_chr -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) - IMPLICIT NONE - CHARACTER(LEN=1), INTENT(in):: a - - H5_SIZEOF_CHR = SIZEOF(a) - - END FUNCTION H5_SIZEOF_CHR - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_i -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) - IMPLICIT NONE - INTEGER, INTENT(in):: a - - H5_SIZEOF_I = SIZEOF(a) - - END FUNCTION H5_SIZEOF_I - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_sp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) - IMPLICIT NONE - REAL(sp), INTENT(in):: a - - H5_SIZEOF_SP = SIZEOF(a) - - END FUNCTION H5_SIZEOF_SP - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_dp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) - IMPLICIT NONE - REAL(dp), INTENT(in):: a - - H5_SIZEOF_DP = SIZEOF(a) - - END FUNCTION H5_SIZEOF_DP - -END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90 deleted file mode 100644 index 20c2859..0000000 --- a/fortran/test/tf_F08.f90 +++ /dev/null @@ -1,128 +0,0 @@ -!****h* root/fortran/test/tf_F08.f90 -! -! NAME -! tf_F08.f90 -! -! FUNCTION -! Contains functions that are part of the F2008 standard and needed by -! the hdf5 fortran tests. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! H5_SIZEOF -! -! NOTES -! This file contains "sizeof" functions that are F2008 standard compliant -! and replace the non-standard 'SIZEOF' functions found in the file tf_F03. -! Unfortunity we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different -! data types from the various tests. -! -! F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. -! -! This file will be build instead of tf_F03.f90 if the intrinsic fortran -! function C_SIZEOF/STORAGE_SIZE is found during configure. -! -!***** -MODULE TH5_MISC_PROVISIONAL - - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - - ! generic compound datatype - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z - END TYPE comp_datatype - - PUBLIC :: H5_SIZEOF - INTERFACE H5_SIZEOF - MODULE PROCEDURE H5_SIZEOF_CMPD - MODULE PROCEDURE H5_SIZEOF_CHR - MODULE PROCEDURE H5_SIZEOF_I - MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP - END INTERFACE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_cmpd -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) - IMPLICIT NONE - TYPE(comp_datatype), INTENT(in) :: a - - H5_SIZEOF_CMPD = C_SIZEOF(a) - - END FUNCTION H5_SIZEOF_CMPD - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_chr -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: a - - H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_CHR - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_i -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) - IMPLICIT NONE - INTEGER, INTENT(in):: a - - H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_I - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_sp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) - IMPLICIT NONE - REAL(sp), INTENT(in):: a - - H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_SP - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_dp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) - IMPLICIT NONE - REAL(dp), INTENT(in):: a - - H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_DP - -END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90 deleted file mode 100644 index 11a047c..0000000 --- a/fortran/test/tf_F90.f90 +++ /dev/null @@ -1,33 +0,0 @@ -!****h* root/fortran/test/tf_F90.f90 -! -! NAME -! tf_F90.f90 -! -! FUNCTION -! Module for when the compiler is not F2003 or F2008 compliant. -! Needed by tf.f90 for the test programs. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** -MODULE TH5_MISC_PROVISIONAL - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = KIND(0.0) - INTEGER, PARAMETER :: dp = KIND(0.D0) - -END MODULE TH5_MISC_PROVISIONAL diff --git a/src/H5config.h.in b/src/H5config.h.in index c089cd3..1cfc395 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -30,6 +30,15 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #undef FC_FUNC_ +/* Define if we have Fortran intrinsic C_SIZEOF */ +#undef FORTRAN_HAVE_C_SIZEOF + +/* Define if we have Fortran intrinsic SIZEOF */ +#undef FORTRAN_HAVE_SIZEOF + +/* Define if we have Fortran intrinsic STORAGE_SIZE */ +#undef FORTRAN_HAVE_STORAGE_SIZE + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM -- cgit v0.12 From aff66a3790e083fa13d05302a2191d6086268fc1 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 20 Apr 2015 16:28:05 -0500 Subject: [svn-r26856] various intel compiler fixes --- configure | 2 +- configure.ac | 2 +- fortran/src/H5Pff.F90 | 8 ++++---- fortran/src/Makefile.am | 2 +- fortran/src/Makefile.in | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configure b/configure index a67a27b..b4be929 100755 --- a/configure +++ b/configure @@ -22446,7 +22446,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" +##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. diff --git a/configure.ac b/configure.ac index 77036d68..b78ac89 100644 --- a/configure.ac +++ b/configure.ac @@ -975,7 +975,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" +##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index b038d23..b595100 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -694,10 +694,10 @@ CONTAINS IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(:), INTENT(OUT) :: boot - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist - INTEGER, DIMENSION(:), INTENT(OUT) :: stab - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr + INTEGER, DIMENSION(*), INTENT(OUT) :: boot + INTEGER, DIMENSION(*), INTENT(OUT) :: freelist + INTEGER, DIMENSION(*), INTENT(OUT) :: stab + INTEGER, DIMENSION(*), INTENT(OUT) :: shhdr END FUNCTION h5pget_version_c END INTERFACE diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 13e250b..3b2c0a0 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -159,7 +159,7 @@ H5fortran_detect.F90: H5test_kind$(EXEEXT) # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5test_kind_SOURCES = H5test_kind.f90 +H5test_kind_SOURCES = H5test_kind.F90 # Mark this directory as part of the Fortran API FORTRAN_API=yes diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index ea924f9..5a925df 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -771,7 +771,7 @@ H5fortran_detect_SOURCES = H5fortran_detect.F90 # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5test_kind_SOURCES = H5test_kind.f90 +H5test_kind_SOURCES = H5test_kind.F90 # Mark this directory as part of the Fortran API FORTRAN_API = yes -- cgit v0.12 From c88f2abea5c4295cd20564fede8b3010933c0e6f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 08:44:30 -0500 Subject: [svn-r26860] Fixed sizeof checks. --- configure | 8 +++++++- configure.ac | 16 +++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/configure b/configure index b4be929..2bc0848 100755 --- a/configure +++ b/configure @@ -6534,21 +6534,27 @@ rm -f core conftest.err conftest.$ac_objext \ ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 fi + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h + fi + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h + fi + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h + fi ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. diff --git a/configure.ac b/configure.ac index b78ac89..053f2e3 100644 --- a/configure.ac +++ b/configure.ac @@ -446,15 +446,21 @@ if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_STORAGE_SIZE ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) fi + + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) + fi - AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) - - AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + fi - AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) + fi ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. -- cgit v0.12 From 6813b25007280afa9b8bec13c19c134029acd26c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 11:53:40 -0500 Subject: [svn-r26866] Removed the default REAL and DOUBLE PRECESION dependency. --- CMakeLists.txt | 10 - MANIFEST | 2 - configure | 62 -- configure.ac | 11 - fortran/src/CMakeLists.txt | 23 - fortran/src/H5Af.c | 775 -------------- fortran/src/H5Aff.F90 | 577 +++++++--- fortran/src/H5Df.c | 1244 ++-------------------- fortran/src/H5Dff.F90 | 772 ++++++++++++-- fortran/src/H5Pf.c | 358 ------- fortran/src/H5Pff.F90 | 257 ++++- fortran/src/H5_DBLE_InterfaceExclude.F90 | 39 - fortran/src/H5_DBLE_InterfaceInclude.F90 | 1701 ------------------------------ fortran/src/H5f90proto.h | 176 ---- fortran/src/HDF5.F90 | 1 - fortran/src/Makefile.am | 18 +- fortran/src/Makefile.in | 21 +- fortran/src/hdf5_fortrandll.def.in | 66 -- m4/aclocal_fc.m4 | 33 - 19 files changed, 1469 insertions(+), 4677 deletions(-) delete mode 100644 fortran/src/H5_DBLE_InterfaceExclude.F90 delete mode 100644 fortran/src/H5_DBLE_InterfaceInclude.F90 diff --git a/CMakeLists.txt b/CMakeLists.txt index a4135f4..97b4463 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -886,16 +886,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") #----------------------------------------------------------------------------- -# Check if Fortran's default real is double precision. If it is and HL is -# being built then configure should fail due to bug HDFFV-889. -#----------------------------------------------------------------------------- - if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB ) - if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ") - endif (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - endif (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB ) - -#----------------------------------------------------------------------------- # Generate the H5pubconf.h file containing user settings needed by compilation #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY) diff --git a/MANIFEST b/MANIFEST index b495598..d772b6a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -272,8 +272,6 @@ ./fortran/src/H5_f.c ./fortran/src/H5_ff.F90 -./fortran/src/H5_DBLE_InterfaceInclude.F90 -./fortran/src/H5_DBLE_InterfaceExclude.F90 ./fortran/src/H5Af.c ./fortran/src/H5Aff.F90 ./fortran/src/H5Df.c diff --git a/configure b/configure index 2bc0848..136c200 100755 --- a/configure +++ b/configure @@ -722,8 +722,6 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS -FORTRAN_DEFAULT_REALisDBLE_F_FALSE -FORTRAN_DEFAULT_REALisDBLE_F_TRUE FORTRAN_2003_CONDITIONAL_F_FALSE FORTRAN_2003_CONDITIONAL_F_TRUE FCLIBS @@ -6556,48 +6554,6 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi - ## Check to see if -r8 was specified to determine if we need to - ## compile the DOUBLE PRECISION interfaces. - - FORTRAN_DEFAULT_REALisDBLE="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 -$as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } - - cat > conftest.$ac_ext <<_ACEOF - - MODULE type_mod - INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble - END INTERFACE - CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble - END MODULE type_mod - PROGRAM main - USE type_mod - REAL :: r - DOUBLE PRECISION :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - FORTRAN_DEFAULT_REALisDBLE="yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test "X$HDF_FORTRAN2003" = "Xyes"; then ## Checking if the compiler supports the required Fortran 2003 features and @@ -6660,14 +6616,6 @@ else FORTRAN_2003_CONDITIONAL_F_FALSE= fi - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - FORTRAN_DEFAULT_REALisDBLE_F_TRUE= - FORTRAN_DEFAULT_REALisDBLE_F_FALSE='#' -else - FORTRAN_DEFAULT_REALisDBLE_F_TRUE='#' - FORTRAN_DEFAULT_REALisDBLE_F_FALSE= -fi - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled @@ -7422,12 +7370,6 @@ if test "X$HDF5_HL" = "Xyes"; then $as_echo "#define INCLUDE_HL 1" >>confdefs.h - - ## If Fortran's default real is double precision and HL is being built then configure - ## should fail due to bug HDFFV-889. - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - as_fn_error $? "Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl." "$LINENO" 5 - fi else echo "no" fi @@ -30220,10 +30162,6 @@ if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDI as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 053f2e3..14b4335 100644 --- a/configure.ac +++ b/configure.ac @@ -462,10 +462,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi - ## Check to see if -r8 was specified to determine if we need to - ## compile the DOUBLE PRECISION interfaces. - PAC_PROG_FC_DEFAULT_REALisDBLE - if test "X$HDF_FORTRAN2003" = "Xyes"; then ## Checking if the compiler supports the required Fortran 2003 features and @@ -486,7 +482,6 @@ fi AC_LANG_POP(Fortran) AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled @@ -551,12 +546,6 @@ if test "X$HDF5_HL" = "Xyes"; then HL="hl" AC_DEFINE([INCLUDE_HL], [1], [Define if HDF5's high-level library headers should be included in hdf5.h]) - - ## If Fortran's default real is double precision and HL is being built then configure - ## should fail due to bug HDFFV-889. - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.]) - fi else echo "no" fi diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index e38460d..c0c2569 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -145,17 +145,6 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES ) #----------------------------------------------------------------------------- -# Fortran Real Size -#----------------------------------------------------------------------------- -if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - # default real is 4 bytes, so include double signatures - set (F_DBLE "Include") -else (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - # default real is 8 bytes, so exclude double signatures - set (F_DBLE "Exclude") -endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - -#----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- set (f90_F_SRCS @@ -178,7 +167,6 @@ set (f90_F_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.F90 ) set (f90_F_SRCS @@ -262,17 +250,6 @@ set (mod_files ${MOD_BUILD_DIR}/h5s.mod ${MOD_BUILD_DIR}/h5t.mod ${MOD_BUILD_DIR}/h5z.mod - ${MOD_BUILD_DIR}/h5a_provisional.mod - ${MOD_BUILD_DIR}/h5d_provisional.mod - ${MOD_BUILD_DIR}/h5e_provisional.mod - ${MOD_BUILD_DIR}/h5f_provisional.mod - ${MOD_BUILD_DIR}/h5l_provisional.mod - ${MOD_BUILD_DIR}/h5lib_provisional.mod - ${MOD_BUILD_DIR}/h5o_provisional.mod - ${MOD_BUILD_DIR}/h5p_provisional.mod - ${MOD_BUILD_DIR}/h5r_provisional.mod - ${MOD_BUILD_DIR}/h5t_provisional.mod - ${MOD_BUILD_DIR}/h5_dble_interface.mod ) install ( FILES diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index e71887d..d0821f6 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -118,383 +118,6 @@ done: return ret_value; } -/****if* H5Af/h5awritec_c - * NAME - * h5awritec_c - * PURPOSE - * Call h5awrite_c to write a character attribute - * INPUTS - * attr_id - dataset identifier - * mem_type_id - memory datatype identifier - * buf - character data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday , August 12, 1999 - * HISTORY - * dims paramete added. - * April 4, 2001 - * SOURCE -*/ -int_f -h5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -h5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - - - -/****if* H5Af/h5awrite_c - * NAME - * h5awrite_c - * PURPOSE - * Call H5Awrite to write a attribute - * INPUTS - * attr_id - attribute identifier - * mem_type_id - memory datatype identifier - * buf - data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims parameter added - * April 4, 2001 - * Added h5awrite_integer(real,double)_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -h5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return h5awrite_c(attr_id, mem_type_id, buf, dims); -} - int_f h5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) /******/ @@ -512,404 +135,6 @@ done: } -/****if* H5Af/h5areadc_c - * NAME - * h5areadc_c - * PURPOSE - * Call h5aread_c to read character attribute - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * OUTPUTS - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims parameter added. - * April 4, 2001 - * Added h5areadc_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -h5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -h5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -h5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -h5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - - - -/****if* H5Af/h5aread_c - * NAME - * h5aread_c - * PURPOSE - * Call H5Aread to read an attribute - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * OUTPUTS - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims paramete added. - * April 4, 2001 - * Added h5aread_integer(real,double)_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -h5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aread function. - */ - if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -int_f -h5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -h5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return h5aread_c(attr_id, mem_type_id, buf, dims); -} - /****if* H5Af/h5aclose_c * NAME diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 6518f10..0c209fa 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -66,7 +66,7 @@ MODULE H5A - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR, C_LOC, C_FLOAT, C_DOUBLE USE H5GLOBAL INTERFACE h5awrite_f @@ -86,14 +86,22 @@ MODULE H5A MODULE PROCEDURE h5awrite_char_5 MODULE PROCEDURE h5awrite_char_6 MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 + MODULE PROCEDURE h5awrite_c_float_scalar + MODULE PROCEDURE h5awrite_c_float_1 + MODULE PROCEDURE h5awrite_c_float_2 + MODULE PROCEDURE h5awrite_c_float_3 + MODULE PROCEDURE h5awrite_c_float_4 + MODULE PROCEDURE h5awrite_c_float_5 + MODULE PROCEDURE h5awrite_c_float_6 + MODULE PROCEDURE h5awrite_c_float_7 + MODULE PROCEDURE h5awrite_c_double_scalar + MODULE PROCEDURE h5awrite_c_double_1 + MODULE PROCEDURE h5awrite_c_double_2 + MODULE PROCEDURE h5awrite_c_double_3 + MODULE PROCEDURE h5awrite_c_double_4 + MODULE PROCEDURE h5awrite_c_double_5 + MODULE PROCEDURE h5awrite_c_double_6 + MODULE PROCEDURE h5awrite_c_double_7 ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr @@ -116,14 +124,22 @@ MODULE H5A MODULE PROCEDURE h5aread_char_5 MODULE PROCEDURE h5aread_char_6 MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 + MODULE PROCEDURE h5aread_c_float_scalar + MODULE PROCEDURE h5aread_c_float_1 + MODULE PROCEDURE h5aread_c_float_2 + MODULE PROCEDURE h5aread_c_float_3 + MODULE PROCEDURE h5aread_c_float_4 + MODULE PROCEDURE h5aread_c_float_5 + MODULE PROCEDURE h5aread_c_float_6 + MODULE PROCEDURE h5aread_c_float_7 + MODULE PROCEDURE h5aread_c_double_scalar + MODULE PROCEDURE h5aread_c_double_1 + MODULE PROCEDURE h5aread_c_double_2 + MODULE PROCEDURE h5aread_c_double_3 + MODULE PROCEDURE h5aread_c_double_4 + MODULE PROCEDURE h5aread_c_double_5 + MODULE PROCEDURE h5aread_c_double_6 + MODULE PROCEDURE h5aread_c_double_7 ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr @@ -133,8 +149,9 @@ MODULE H5A ! to the C H5Awrite routine INTERFACE INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), VALUE :: buf @@ -145,8 +162,9 @@ MODULE H5A ! to the C H5Aread routine INTERFACE INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), VALUE :: buf @@ -371,8 +389,8 @@ CONTAINS !***** INTERFACE INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_space END INTERFACE @@ -416,8 +434,8 @@ CONTAINS !***** INTERFACE INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: HID_T + IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_type END INTERFACE @@ -455,32 +473,55 @@ CONTAINS ! ! ! SOURCE - SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) + SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr - - CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf - + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! name length is successful, -1 if fail !***** INTERFACE - INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - INTEGER(SIZE_T), INTENT(IN), VALUE :: size + INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) & + BIND(C,NAME='h5aget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION H5Aget_name + END FUNCTION h5aget_name_c END INTERFACE - ! add 1 for the null char - hdferr = H5Aget_name(attr_id, size+1, c_buf) - - CALL H5_Fortran_string_c2f(c_buf, buf) + hdferr = h5aget_name_c(attr_id, size, buf) + END SUBROUTINE h5aget_name_f - END SUBROUTINE H5Aget_name_f +!!$ SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: attr_id +!!$ INTEGER(SIZE_T), INTENT(IN) :: size +!!$ CHARACTER(LEN=*), INTENT(INOUT) :: buf +!!$ INTEGER, INTENT(OUT) :: hdferr +!!$!***** +!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') +!!$ IMPORT :: C_CHAR +!!$ IMPORT :: HID_T, SIZE_T +!!$ INTEGER(HID_T), INTENT(IN), VALUE :: attr_id +!!$ INTEGER(SIZE_T), INTENT(IN), VALUE :: size +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf +!!$ END FUNCTION H5Aget_name +!!$ END INTERFACE +!!$ +!!$ ! add 1 for the null char +!!$ PRINT*,H5Aget_name(attr_id, size + 1_SIZE_T, c_buf) +!!$ hdferr = INT(H5Aget_name(attr_id, size + 1_SIZE_T, c_buf)) +!!$ +!!$ CALL H5_Fortran_string_c2f(c_buf, buf) +!!$ +!!$ +!!$ END SUBROUTINE H5Aget_name_f ! !****s* H5A/H5Aget_name_by_idx_f @@ -685,7 +726,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') - USE H5GLOBAL + IMPORT :: HID_T INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER, INTENT(OUT) :: attr_num END FUNCTION h5aget_num_attrs_c @@ -730,8 +771,8 @@ CONTAINS INTERFACE INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') - USE ISO_C_BINDING - USE H5GLOBAL + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER(SIZE_T) :: namelen @@ -859,6 +900,9 @@ CONTAINS creation_prop_id = H5Aget_create_plist(attr_id) + hdferr = 0 + IF(creation_prop_id.LT.0) hdferr = -1 + END SUBROUTINE H5Aget_create_plist_f ! @@ -1844,7 +1888,7 @@ CONTAINS ! ! NOTES ! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! ! Fortran90 Interface: @@ -1858,7 +1902,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1875,7 +1918,6 @@ CONTAINS END SUBROUTINE H5Awrite_integer_scalar SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1893,7 +1935,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1912,7 +1953,6 @@ CONTAINS END SUBROUTINE H5Awrite_integer_2 SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1930,7 +1970,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1949,7 +1988,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1968,7 +2006,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -1986,7 +2023,6 @@ CONTAINS SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2004,30 +2040,28 @@ CONTAINS END SUBROUTINE H5Awrite_integer_7 - SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), TARGET :: buf ! Attribute data + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_scalar + END SUBROUTINE H5Awrite_c_float_scalar - SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2036,17 +2070,16 @@ CONTAINS hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_1 + END SUBROUTINE H5Awrite_c_float_1 - SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2056,17 +2089,16 @@ CONTAINS hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_2 + END SUBROUTINE H5Awrite_c_float_2 - SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2075,17 +2107,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_3 + END SUBROUTINE H5Awrite_c_float_3 - SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2094,17 +2125,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_4 + END SUBROUTINE H5Awrite_c_float_4 - SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2113,17 +2143,16 @@ CONTAINS f_ptr = C_LOC(buf) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_5 + END SUBROUTINE H5Awrite_c_float_5 - SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2132,17 +2161,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_6 + END SUBROUTINE H5Awrite_c_float_6 - SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Awrite_c_float_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2150,10 +2178,150 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_7 + END SUBROUTINE H5Awrite_c_float_7 + + SUBROUTINE h5awrite_c_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_scalar + + SUBROUTINE h5awrite_c_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_1 + + + SUBROUTINE h5awrite_c_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_c_double_2 + + + SUBROUTINE h5awrite_c_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_3 + + + SUBROUTINE h5awrite_c_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_4 + + + SUBROUTINE h5awrite_c_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_5 + + + SUBROUTINE h5awrite_c_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_double_6 + + + SUBROUTINE h5awrite_c_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_c_double_7 SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2167,7 +2335,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_scalar SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2185,7 +2352,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_scalar_fix SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2202,7 +2368,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_1 SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2219,7 +2384,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_2 SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2237,7 +2401,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_3 SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2255,7 +2418,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_4 SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2274,7 +2436,6 @@ CONTAINS SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2292,7 +2453,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_6 SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2335,7 +2495,7 @@ CONTAINS ! ! NOTES ! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! ! Fortran2003 Interface: @@ -2347,7 +2507,6 @@ CONTAINS !***** SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier @@ -2396,7 +2555,7 @@ CONTAINS ! ! NOTES ! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! Fortran90 Interface: !! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) @@ -2407,7 +2566,6 @@ CONTAINS !! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2423,7 +2581,6 @@ CONTAINS END SUBROUTINE H5Aread_integer_scalar SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2440,7 +2597,6 @@ CONTAINS SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2457,7 +2613,6 @@ CONTAINS SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2475,7 +2630,6 @@ CONTAINS SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2493,7 +2647,6 @@ CONTAINS SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2511,7 +2664,6 @@ CONTAINS SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2529,7 +2681,6 @@ CONTAINS SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2546,30 +2697,28 @@ CONTAINS END SUBROUTINE H5Aread_integer_7 - SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), TARGET :: buf ! Attribute data + REAL(KIND=C_FLOAT), INTENT(INOUT), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_scalar + END SUBROUTINE H5Aread_c_float_scalar - SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2577,17 +2726,15 @@ CONTAINS f_ptr = C_LOC(buf(1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_1 - + END SUBROUTINE H5Aread_c_float_1 - SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2595,17 +2742,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_2 + END SUBROUTINE H5Aread_c_float_2 - SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -2614,17 +2760,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_3 + END SUBROUTINE H5Aread_c_float_3 - SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2632,17 +2777,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_4 + END SUBROUTINE H5Aread_c_float_4 - SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2650,17 +2794,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_5 + END SUBROUTINE H5Aread_c_float_5 - SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2668,17 +2811,16 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_6 + END SUBROUTINE H5Aread_c_float_6 - SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING + SUBROUTINE H5Aread_c_float_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr @@ -2686,10 +2828,148 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_7 + END SUBROUTINE H5Aread_c_float_7 + + SUBROUTINE h5aread_c_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_scalar + + SUBROUTINE h5aread_c_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_1 + + + SUBROUTINE h5aread_c_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_2 + + SUBROUTINE h5aread_c_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_3 + + SUBROUTINE h5aread_c_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_4 + + + SUBROUTINE h5aread_c_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_c_double_5 + + + SUBROUTINE h5aread_c_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_6 + + + SUBROUTINE h5aread_c_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_double_7 SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2703,7 +2983,6 @@ CONTAINS END SUBROUTINE H5Aread_char_scalar SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2720,7 +2999,6 @@ CONTAINS END SUBROUTINE H5Aread_char_scalar_fix SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2736,9 +3014,7 @@ CONTAINS END SUBROUTINE H5Aread_char_1 - SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2754,9 +3030,7 @@ CONTAINS END SUBROUTINE H5Aread_char_2 - SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2773,7 +3047,6 @@ CONTAINS END SUBROUTINE H5Aread_char_3 SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2791,7 +3064,6 @@ CONTAINS END SUBROUTINE H5Aread_char_4 SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2809,7 +3081,6 @@ CONTAINS SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2827,7 +3098,6 @@ CONTAINS SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype @@ -2879,7 +3149,7 @@ CONTAINS ! ! NOTES ! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! Fortran2003 Interface: !! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) @@ -2890,7 +3160,6 @@ CONTAINS !***** SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 2bffe02..5845cf8 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -129,1050 +129,143 @@ DONE: } -/****if* H5Df/h5dwritec_c - * NAME - * h5dwritec_c - * PURPOSE - * Call h5dwrite_c to write a dataset of characters - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function is added to accomodate oveloaded h5dwrite_f - * with the dims argument being of INTEGER(HSIZE_T) type - - * SOURCE -*/ -int_f -h5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -/****if* H5Df/h5dwrite_c - * NAME - * h5dwrite_c - * PURPOSE - * Call H5Dwrite to write a dataset - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function is added to accomodate oveloaded h5dwrite_f - * with the dims argument being of INTEGER(HSIZE_T) type - * - * Added h5dwrite_integer(real,double)_s,1-7_c functions to eliminate - * complains about wrong parameter types in h5dwrite_c function - * called by Fortran rouitnes - * October 10, 2006 EIP - * - * SOURCE -*/ -int_f -h5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -h5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -h5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return h5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -/****if* H5Df/h5dwrite_ref_obj_c - * NAME - * h5dwrite_ref_obj_c - * PURPOSE - * Call H5Dwrite to write a dataset of object references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success,e-1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argumnet being of INTEGER(HSIZE_T) type. - * SOURCE -*/ -int_f -h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hobj_ref_t *buf_c; - unsigned int i, n; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer and copy references from Fortran. - */ - n = (unsigned int)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) - HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); - } - else return ret_value; - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/****if* H5Df/h5dwrite_ref_reg_c - * NAME - * h5dwrite_ref_reg_c - * PURPOSE - * Call H5Dwrite to write a dataset of dataset region references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argument being of INTEGER(HSIZE_T) type - * SOURCE -*/ -int_f -h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c = NULL; - unsigned int i, n; - - n = (unsigned int)*dims; - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer and copy references from Fortran. - */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) { - HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); - buf = buf + REF_REG_BUF_LEN_F; - } - } - else return ret_value; - - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - - - -/****if* H5Df/h5dreadc_c - * NAME - * h5dreadc_c - * PURPOSE - * Call h5dread_c to read a dataset of characters - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * OUTPUTS - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, May 15, 2002 - * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. - * SOURCE -*/ -int_f -h5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -h5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -/****if* H5Df/h5dread_c - * NAME - * h5dread_c - * PURPOSE - * Call H5Draed to read a dataset - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * OUTPUTS - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, May 15, 2002 - * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. - * - * Added h5dread_integer(real,double)_s,1-7_c functions to eliminate - * complains about wrong parameter types in h5dwrite_c function - * called by Fortran rouitnes - * October 10, 2006 EIP - * - * SOURCE -*/ -int_f -h5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f UNUSED *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Call H5Dread function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -h5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - +/****if* H5Df/h5dwrite_ref_obj_c + * NAME + * h5dwrite_ref_obj_c + * PURPOSE + * Call H5Dwrite to write a dataset of object references + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer with references to the objects. + * n - number of references to be stored. + * RETURNS + * 0 on success,e-1 on failure + * AUTHOR + * Elena Pourmal + * Tuesday, May 14, 2002 + * HISTORY + * This function was added to accomodate h5dwrite_f with the + * dims argumnet being of INTEGER(HSIZE_T) type. + * SOURCE +*/ int_f -h5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - +h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) +/******/ { - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hobj_ref_t *buf_c; + unsigned int i, n; -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; -int_f -h5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + /* + * Allocate temporary buffer and copy references from Fortran. + */ + n = (unsigned int)*dims; + buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); + if ( buf_c != NULL ) { + for (i = 0; i < n; i++) + HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); + } + else return ret_value; -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + /* + * Call H5Dwrite function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + HDfree(buf_c); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; } +/****if* H5Df/h5dwrite_ref_reg_c + * NAME + * h5dwrite_ref_reg_c + * PURPOSE + * Call H5Dwrite to write a dataset of dataset region references + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer with references to the objects. + * n - number of references to be stored. + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Tuesday, May 14, 2002 + * HISTORY + * This function was added to accomodate h5dwrite_f with the + * dims argument being of INTEGER(HSIZE_T) type + * SOURCE +*/ int_f -h5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - +h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) +/******/ { - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hdset_reg_ref_t *buf_c = NULL; + unsigned int i, n; -{ + n = (unsigned int)*dims; /* - * Call h5dread_c function. + * Define transfer property */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -h5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + c_xfer_prp = (hid_t)*xfer_prp; -{ /* - * Call h5dread_c function. + * Allocate temporary buffer and copy references from Fortran. */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} + buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); + if ( buf_c != NULL ) { + for (i = 0; i < n; i++) { + HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); + buf = buf + REF_REG_BUF_LEN_F; + } + } + else return ret_value; -int_f -h5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) -{ /* - * Call h5dread_c function. + * Call H5Dwrite function. */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + HDfree(buf_c); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; } -int_f -h5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return h5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} /****if* H5Df/h5dread_ref_obj_c * NAME @@ -2058,39 +1151,6 @@ DONE: return ret_value; } -/****if* H5Df/h5dfillc_c - * NAME - * h5dfillc_c - * PURPOSE - * Call h5fill_c to fill memory buffer with a fill value - * INPUTS - * fill_value - fill value - * fill_type_id - fill value datatype identifier - * space_id - memory space selection identifier - * buf - memory buffer to fill - * mem_type_id - memory buffer dtatype identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, March 12, 2003 - * HISTORY - * - * SOURCE -*/ -int_f -h5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dfill_c function. - */ - ret_value = h5dfill_c(_fcdtocp(fill_value), fill_type_id, space_id, _fcdtocp(buf), mem_type_id); - - return ret_value; -} /****if* H5Df/h5dfill_c * NAME * h5dfill_c @@ -2135,78 +1195,6 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b return ret_value; } -int_f -h5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -h5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -h5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - /****if* H5Df/h5dget_space_status_c * NAME * h5dget_space_status_c diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 411a3bf..a7120f6 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -81,7 +81,7 @@ MODULE H5D - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC USE H5GLOBAL INTERFACE h5dextend_f @@ -120,14 +120,22 @@ MODULE H5D MODULE PROCEDURE h5dwrite_char_5 MODULE PROCEDURE h5dwrite_char_6 MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 + MODULE PROCEDURE h5dwrite_c_float_scalar + MODULE PROCEDURE h5dwrite_c_float_1 + MODULE PROCEDURE h5dwrite_c_float_2 + MODULE PROCEDURE h5dwrite_c_float_3 + MODULE PROCEDURE h5dwrite_c_float_4 + MODULE PROCEDURE h5dwrite_c_float_5 + MODULE PROCEDURE h5dwrite_c_float_6 + MODULE PROCEDURE h5dwrite_c_float_7 + MODULE PROCEDURE h5dwrite_c_double_scalar + MODULE PROCEDURE h5dwrite_c_double_1 + MODULE PROCEDURE h5dwrite_c_double_2 + MODULE PROCEDURE h5dwrite_c_double_3 + MODULE PROCEDURE h5dwrite_c_double_4 + MODULE PROCEDURE h5dwrite_c_double_5 + MODULE PROCEDURE h5dwrite_c_double_6 + MODULE PROCEDURE h5dwrite_c_double_7 ! This is the preferred way to call h5dwrite ! by passing an address @@ -155,14 +163,22 @@ MODULE H5D MODULE PROCEDURE h5dread_char_5 MODULE PROCEDURE h5dread_char_6 MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 + MODULE PROCEDURE h5dread_c_float_scalar + MODULE PROCEDURE h5dread_c_float_1 + MODULE PROCEDURE h5dread_c_float_2 + MODULE PROCEDURE h5dread_c_float_3 + MODULE PROCEDURE h5dread_c_float_4 + MODULE PROCEDURE h5dread_c_float_5 + MODULE PROCEDURE h5dread_c_float_6 + MODULE PROCEDURE h5dread_c_float_7 + MODULE PROCEDURE h5dread_c_double_scalar + MODULE PROCEDURE h5dread_c_double_1 + MODULE PROCEDURE h5dread_c_double_2 + MODULE PROCEDURE h5dread_c_double_3 + MODULE PROCEDURE h5dread_c_double_4 + MODULE PROCEDURE h5dread_c_double_5 + MODULE PROCEDURE h5dread_c_double_6 + MODULE PROCEDURE h5dread_c_double_7 ! This is the preferred way to call h5dread ! by passing an address @@ -170,6 +186,7 @@ MODULE H5D END INTERFACE + ! Interface for the function used to pass the C pointer of the buffer ! to the C H5Dwrite routine @@ -212,7 +229,8 @@ MODULE H5D INTERFACE h5dfill_f MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_c_float + MODULE PROCEDURE h5dfill_c_double MODULE PROCEDURE h5dfill_char END INTERFACE @@ -1862,14 +1880,14 @@ CONTAINS END SUBROUTINE h5dwrite_char_7 - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -1890,17 +1908,17 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_scalar + END SUBROUTINE h5dwrite_c_float_scalar - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1923,16 +1941,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_1 + END SUBROUTINE h5dwrite_c_float_1 - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1956,16 +1974,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_2 + END SUBROUTINE h5dwrite_c_float_2 - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -1988,16 +2006,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_3 + END SUBROUTINE h5dwrite_c_float_3 - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2020,16 +2038,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_4 + END SUBROUTINE h5dwrite_c_float_4 - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2052,16 +2070,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_5 + END SUBROUTINE h5dwrite_c_float_5 - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2084,16 +2102,16 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_6 + END SUBROUTINE h5dwrite_c_float_6 - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & + REAL(KIND=C_FLOAT), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2116,7 +2134,7 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_real_7 + END SUBROUTINE h5dwrite_c_float_7 ! ! NAME @@ -2807,7 +2825,7 @@ CONTAINS END SUBROUTINE h5dread_char_7 - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -2815,7 +2833,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + REAL(KIND=C_FLOAT), INTENT(INOUT), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier @@ -2837,16 +2855,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_scalar + END SUBROUTINE h5dread_c_float_scalar - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2869,16 +2887,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_1 + END SUBROUTINE h5dread_c_float_1 - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2901,16 +2919,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_2 + END SUBROUTINE h5dread_c_float_2 - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2933,16 +2951,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_3 + END SUBROUTINE h5dread_c_float_3 - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2965,16 +2983,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_4 + END SUBROUTINE h5dread_c_float_4 - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -2997,9 +3015,9 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_5 + END SUBROUTINE h5dread_c_float_5 - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -3007,7 +3025,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -3030,16 +3048,16 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_6 + END SUBROUTINE h5dread_c_float_6 - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & + REAL(KIND=C_FLOAT), INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier @@ -3063,7 +3081,571 @@ CONTAINS hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dread_real_7 + END SUBROUTINE h5dread_c_float_7 + + SUBROUTINE h5dread_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_scalar + + SUBROUTINE h5dread_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_1 + + SUBROUTINE h5dread_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_2 + + SUBROUTINE h5dread_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_3 + + SUBROUTINE h5dread_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_4 + + SUBROUTINE h5dread_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_5 + + SUBROUTINE h5dread_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_6 + + SUBROUTINE h5dread_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_double_7 + + SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_scalar + + SUBROUTINE h5dwrite_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_1 + + SUBROUTINE h5dwrite_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_2 + + SUBROUTINE h5dwrite_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_3 + + SUBROUTINE h5dwrite_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_4 + + SUBROUTINE h5dwrite_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_5 + + SUBROUTINE h5dwrite_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_6 + + SUBROUTINE h5dwrite_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_double_7 !****s* H5D (F03)/h5dwrite_f_F03 ! @@ -3247,7 +3829,7 @@ CONTAINS ! ! NAME -! h5dfill_real +! h5dfill_c_float ! ! PURPOSE ! Fills dataspace elements with a fill value in a memory buffer. @@ -3270,12 +3852,12 @@ CONTAINS ! Elena Pourmal ! March 12, 2003 ! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + REAL(KIND=C_FLOAT), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier @@ -3293,7 +3875,55 @@ CONTAINS hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & f_ptr_buf, mem_type_id) - END SUBROUTINE h5dfill_real + END SUBROUTINE h5dfill_c_float + + !---------------------------------------------------------------------- + ! Name: h5dfill_c_double + ! + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! of the fillvalues and buffers are supported. Buffer and fillvalue + ! are assumed to have the same datatype. + ! Only one-dimesional buffers are supported. + ! + ! Inputs: + ! fill_value - fill value + ! space_id - memory space selection identifier + ! buf - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_c_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_double ! ! NAME diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index bee2806..61259ff 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -394,36 +394,6 @@ h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) return ret_value; } -/****if* H5Pf/h5pset_fill_valuec_c - * NAME - * h5pset_fill_valuec_c - * PURPOSE - * Call h5pset_fill_value_c to a character fill value - * INPUTS - * prp_id - property list identifier - * type_id - datatype identifier (fill value is of type type_id) - * fillvalue - character value - * RETURNS - * 0 on success, -1 on failure - * Saturday, August 14, 1999 - * AUTHOR - * Elena Pourmal - * SOURCE -*/ -int_f -h5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) -/******/ -{ - int ret_value = -1; - - /* - * Call h5pset_fill_value_c function. - */ - ret_value = h5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); - - return ret_value; -} - /****if* H5Pf/h5pset_fill_value_c * NAME * h5pset_fill_value_c @@ -461,68 +431,6 @@ h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } -int_f -h5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -/******/ -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -h5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -h5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -/****if* H5Pf/h5pget_fill_valuec_c - * NAME - * h5pget_fill_valuec_c - * PURPOSE - * Call h5pget_fill_value_c to a character fill value - * INPUTS - * prp_id - property list identifier - * type_id - datatype identifier (fill value is of type type_id) - * fillvalue - character value - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Saturday, August 14, 1999 - * HISTORY - * Fixed wrong call to C wrapper, was h5pset_fill_value_c, changed - * to h5pget_fill_value_c. MSB - 7/21/2014 - * - * SOURCE -*/ -int_f -h5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) -/******/ -{ - int ret_value = -1; - - /* - * Call h5pget_fill_value_c function. - */ - ret_value = h5pget_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); - - return ret_value; -} - /****if* H5Pf/h5pget_fill_value_c * NAME * h5pget_fill_value_c @@ -560,33 +468,6 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } -int_f -h5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -h5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -h5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - /****if* H5Pf/h5pget_version_c * NAME * h5pget_version_c @@ -2831,40 +2712,6 @@ DONE: return ret_value; } - -/****if* H5Pf/h5pregisterc_c - * NAME - * h5pregisterc_c - * PURPOSE - * Call h5pregister_c to registers a permanent property - * INPUTS - * class - property list class identifier - * name - name of the new property - * name_len - length of the "name" buffer - * size - property size - * value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -h5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) -/******/ -{ - int ret_value = -1; - - /* - * Call h5pregister_c function - */ - ret_value = h5pregister_c(cls, name, name_len, size, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pregister_c * NAME * h5pregister_c @@ -2908,66 +2755,6 @@ DONE: return ret_value; } -int_f -h5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -int_f -h5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -int_f -h5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -/****if* H5Pf/h5pinsertc_c - * NAME - * h5pinsertc_c - * PURPOSE - * Call h5pinsert_c to register a temporary property - * INPUTS - * plist - property list identifier - * name - name of the new property - * name_len - length of the "name" buffer - * size - property size - * value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -h5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pinsert_c function - */ - ret_value = h5pinsert_c(plist, name, name_len, size, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pinsert_c * NAME * h5pinsert_c @@ -3011,33 +2798,6 @@ DONE: return ret_value; } -int_f -h5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - -int_f -h5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - -int_f -h5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - /****if* H5Pf/h5pexist_c * NAME * h5pexist_c @@ -3434,38 +3194,6 @@ DONE: return ret_value; } -/****if* H5Pf/h5psetc_c - * NAME - * h5psetc_c - * PURPOSE - * Call h5setc_c to set property with the character string value - * INPUTS - * plist - property list identifier - * name - name of property - * name_len - length of the "name" buffer - * value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -h5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pset_c function - */ - ret_value = h5pset_c(plist, name, name_len, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pset_c * NAME * h5pset_c @@ -3506,64 +3234,6 @@ DONE: return ret_value; } -int_f -h5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} - -int_f -h5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} - -int_f -h5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} -/****if* H5Pf/h5pgetc_c - * NAME - * h5pgetc_c - * PURPOSE - * Call h5set_c to set property with the character string value - * INPUTS - * plist - property list identifier - * name - name of property - * name_len - length of the "name" buffer - * Output: value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -h5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pget_c function - */ - ret_value = h5pget_c(plist, name, name_len, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pget_c * NAME * h5pget_c @@ -3605,34 +3275,6 @@ DONE: return ret_value; } -int_f -h5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - -int_f -h5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - -int_f -h5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - - /****if* H5Pf/h5pset_shuffle_c * NAME * h5pset_shuffle_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index b595100..3ec6e93 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -1,12 +1,10 @@ -!****h* ROBODoc/H5P (F90) +!****h* ROBODoc/H5Pff ! ! NAME -! H5P_PROVISIONAL +! H5P ! ! PURPOSE -! This file contains Fortran interfaces for H5P functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. +! This file contains Fortran interfaces for H5P functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -36,7 +34,7 @@ MODULE H5P USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, & - c_char, c_int, C_NULL_CHAR, C_LOC + c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT USE H5GLOBAL INTERFACE h5pset_fapl_multi_f @@ -46,7 +44,8 @@ MODULE H5P INTERFACE h5pset_fill_value_f MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_c_float + MODULE PROCEDURE h5pset_fill_value_c_double MODULE PROCEDURE h5pset_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pset_fill_value_ptr @@ -55,7 +54,8 @@ MODULE H5P INTERFACE h5pget_fill_value_f MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_c_float + MODULE PROCEDURE h5pget_fill_value_c_double MODULE PROCEDURE h5pget_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pget_fill_value_ptr @@ -64,7 +64,8 @@ MODULE H5P INTERFACE h5pset_f MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_c_float + MODULE PROCEDURE h5pset_c_double MODULE PROCEDURE h5pset_char ! Recommended procedure: MODULE PROCEDURE h5pset_ptr @@ -73,23 +74,24 @@ MODULE H5P INTERFACE h5pget_f MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char + MODULE PROCEDURE h5pget_c_float + MODULE PROCEDURE h5pget_c_double ! Recommended procedure: MODULE PROCEDURE h5pget_ptr END INTERFACE INTERFACE h5pregister_f MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char + MODULE PROCEDURE h5pregister_c_float + MODULE PROCEDURE h5pregister_c_double ! Recommended procedure: MODULE PROCEDURE h5pregister_ptr END INTERFACE INTERFACE h5pinsert_f MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_c_float + MODULE PROCEDURE h5pinsert_c_double MODULE PROCEDURE h5pinsert_char ! Recommended procedure: MODULE PROCEDURE h5pinsert_ptr @@ -6257,38 +6259,65 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fill_value_integer - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) + SUBROUTINE h5pset_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype ! (in memory) - REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - END SUBROUTINE h5pset_fill_value_real + END SUBROUTINE h5pset_fill_value_c_float + SUBROUTINE h5pset_fill_value_c_double(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) + f_ptr = C_LOC(fillvalue) + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + END SUBROUTINE h5pset_fill_value_c_double + + SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of ! of fillvalue datatype ! (in memory) - REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: fillvalue ! Fillvalue INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue) + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_c_float + SUBROUTINE h5pget_fill_value_c_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - END SUBROUTINE h5pget_fill_value_real + END SUBROUTINE h5pget_fill_value_c_double SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE @@ -6301,7 +6330,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pset_fill_value_char @@ -6331,7 +6359,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ENDIF f_ptr = C_LOC(chr(1)(1:1)) - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) DO i = 1, chr_len @@ -6500,11 +6527,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_integer - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + SUBROUTINE h5pset_c_float(prp_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN), TARGET :: value ! Property value + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6514,7 +6541,45 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) name_len = LEN(name) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pset_real + END SUBROUTINE h5pset_c_float + +! +!****s* H5P (F90)/h5pset_c_double +! +! NAME +! h5pset_c_double +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_c_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_c_double SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE @@ -6599,11 +6664,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_integer - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + SUBROUTINE h5pget_c_float(prp_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT), TARGET :: value ! Property value + REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6612,7 +6677,44 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) name_len = LEN(name) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_real + END SUBROUTINE h5pget_c_float + +!****s* H5P (F90)/h5pget_c_double +! +! NAME +! h5pget_c_double +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_c_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL(KIND=C_DOUBLE), INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_c_double SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE @@ -6778,12 +6880,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_integer - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + SUBROUTINE h5pregister_c_float(class, name, size, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6793,7 +6895,51 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) name_len = LEN(name) hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - END SUBROUTINE h5pregister_real + END SUBROUTINE h5pregister_c_float + +! +!****s* H5P (F90)/h5pregister_c_double +! +! NAME +! h5pregister_c_double +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_c_double(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_c_double SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE @@ -6921,13 +7067,54 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) END SUBROUTINE h5pinsert_integer - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + SUBROUTINE h5pinsert_c_float(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_c_float + +!****s* H5P (F90)/h5pinsert_c_double +! +! NAME +! +! h5pinsert_c_double +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_c_double(plist, name, size, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** INTEGER :: name_len TYPE(c_ptr) :: f_ptr @@ -6936,7 +7123,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) name_len = LEN(name) hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_real + END SUBROUTINE h5pinsert_c_double SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE diff --git a/fortran/src/H5_DBLE_InterfaceExclude.F90 b/fortran/src/H5_DBLE_InterfaceExclude.F90 deleted file mode 100644 index 2a3e26f..0000000 --- a/fortran/src/H5_DBLE_InterfaceExclude.F90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is of type DOUBLE PRECISION. -! We do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. -! -! NOTES -! Empty module. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.F90 b/fortran/src/H5_DBLE_InterfaceInclude.F90 deleted file mode 100644 index 56bb1a4..0000000 --- a/fortran/src/H5_DBLE_InterfaceInclude.F90 +++ /dev/null @@ -1,1701 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is not of the type DOUBLE PRECISION. -! We only do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. -! -! NOTES -! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines -! from the HDF function catagory H5A, H5D and H5P. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR - USE H5GLOBAL - - ! - ! ----- H5A ---- - ! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_double_scalar - MODULE PROCEDURE h5awrite_double_1 - MODULE PROCEDURE h5awrite_double_2 - MODULE PROCEDURE h5awrite_double_3 - MODULE PROCEDURE h5awrite_double_4 - MODULE PROCEDURE h5awrite_double_5 - MODULE PROCEDURE h5awrite_double_6 - MODULE PROCEDURE h5awrite_double_7 - END INTERFACE - - INTERFACE h5aread_f - MODULE PROCEDURE h5aread_double_scalar - MODULE PROCEDURE h5aread_double_1 - MODULE PROCEDURE h5aread_double_2 - MODULE PROCEDURE h5aread_double_3 - MODULE PROCEDURE h5aread_double_4 - MODULE PROCEDURE h5aread_double_5 - MODULE PROCEDURE h5aread_double_6 - MODULE PROCEDURE h5aread_double_7 - END INTERFACE - ! - ! ----- H5D ---- - ! - INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_double_scalar - MODULE PROCEDURE h5dwrite_double_1 - MODULE PROCEDURE h5dwrite_double_2 - MODULE PROCEDURE h5dwrite_double_3 - MODULE PROCEDURE h5dwrite_double_4 - MODULE PROCEDURE h5dwrite_double_5 - MODULE PROCEDURE h5dwrite_double_6 - MODULE PROCEDURE h5dwrite_double_7 - END INTERFACE - - INTERFACE h5dread_f - MODULE PROCEDURE h5dread_double_scalar - MODULE PROCEDURE h5dread_double_1 - MODULE PROCEDURE h5dread_double_2 - MODULE PROCEDURE h5dread_double_3 - MODULE PROCEDURE h5dread_double_4 - MODULE PROCEDURE h5dread_double_5 - MODULE PROCEDURE h5dread_double_6 - MODULE PROCEDURE h5dread_double_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_double - END INTERFACE - - ! - ! ----- H5P ---- - ! - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_double - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_double - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_double - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_double - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_double - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_double - END INTERFACE - -CONTAINS - - ! - ! ----- H5A ---- - ! - SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_s_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_double_s_c - END INTERFACE - - hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar - - SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTERFACE - INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_1_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_double_1_c - END INTERFACE - - hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_1 - - - SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_2_c') - IMPORT :: HID_T, HSIZE_T - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_double_2_c - END INTERFACE - - hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_2 - - - SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_3_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_double_3_c - END INTERFACE - - hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_3 - - - SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_4_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_double_4_c - END INTERFACE - - hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_4 - - - SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_5_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_double_5_c - END INTERFACE - - hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_5 - - - SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_6_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_double_6_c - END INTERFACE - - hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_6 - - - SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5awrite_double_7_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_double_7_c - END INTERFACE - - hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_7 - - - SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_s_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT)::buf - END FUNCTION h5aread_double_s_c - END INTERFACE - - hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar - - SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_1_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_double_1_c - END INTERFACE - - hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_1 - - - SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_2_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_double_2_c - END INTERFACE - - hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_2 - - - SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_3_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_double_3_c - END INTERFACE - - hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_3 - - - SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_4_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_double_4_c - END INTERFACE - - hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_4 - - - SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_5_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_double_5_c - END INTERFACE - - hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_5 - - - SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_6_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_double_6_c - END INTERFACE - - hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_6 - - - SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) BIND(C,NAME='h5aread_double_7_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_double_7_c - END INTERFACE - - hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_7 - - - ! - ! ----- H5D ---- - ! - SUBROUTINE h5dwrite_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_s_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf - END FUNCTION h5dwrite_double_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_scalar - - SUBROUTINE h5dwrite_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_1_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_1 - - SUBROUTINE h5dwrite_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_2_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_2 - - SUBROUTINE h5dwrite_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_3_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_3 - - SUBROUTINE h5dwrite_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_4_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_4 - - SUBROUTINE h5dwrite_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_5_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_5 - - SUBROUTINE h5dwrite_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_6_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_6 - - SUBROUTINE h5dwrite_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dwrite_double_7_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_7 - - SUBROUTINE h5dread_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_s_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(OUT) :: buf - END FUNCTION h5dread_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_scalar - - SUBROUTINE h5dread_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_1_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_1 - - SUBROUTINE h5dread_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_2_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_double_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_2 - - SUBROUTINE h5dread_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_3_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_3 - - SUBROUTINE h5dread_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTERFACE - INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_4_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_4 - - SUBROUTINE h5dread_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_5_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_5 - - SUBROUTINE h5dread_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_6_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_6 - - SUBROUTINE h5dread_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) BIND(C,NAME='h5dread_double_7_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_7 - - !---------------------------------------------------------------------- - ! Name: h5dfill_double - ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes - ! of the fillvalues and buffers are supported. Buffer and fillvalue - ! are assumed to have the same datatype. - ! Only one-dimesional buffers are supported. - ! - ! Inputs: - ! fill_value - fill value - ! space_id - memory space selection identifier - ! buf - data buffer iin memory ro apply selection to - ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - - SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - INTERFACE - INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) BIND(C,NAME='h5dfill_double_c') - IMPORT :: HID_T - IMPLICIT NONE - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_double_c - END INTERFACE - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - - END SUBROUTINE h5dfill_double - - ! - ! -- H5P --- - ! - - SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) BIND(C,NAME='h5pset_fill_value_double_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_double_c - END INTERFACE - - hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_double - - SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) BIND(C,NAME='h5pget_fill_value_double_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION :: fillvalue - END FUNCTION h5pget_fill_value_double_c - END INTERFACE - - hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_double - -! -!****s* H5P (F90)/h5pset_double -! -! NAME -! h5pset_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) BIND(C,NAME='h5pset_double_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pset_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_double - -!****s* H5P (F90)/h5pget_double -! -! NAME -! h5pget_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) BIND(C,NAME='h5pget_double_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(OUT) :: value - END FUNCTION h5pget_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_double - -! -!****s* H5P (F90)/h5pregister_double -! -! NAME -! h5pregister_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_double(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) BIND(C,NAME='h5pregister_double_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pregister_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_double_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_double - -!****s* H5P (F90)/h5pinsert_double -! -! NAME -! -! h5pinsert_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) BIND(C,NAME='h5pinsert_double_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pinsert_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_double_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_double - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 4da66fb..b62af4e 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -141,110 +141,25 @@ H5_FCDLL int_f h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); H5_FCDLL int_f h5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); H5_FCDLL int_f h5dclose_c ( hid_t_f *dset_id ); -H5_FCDLL int_f h5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); H5_FCDLL int_f h5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); H5_FCDLL int_f h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - H5_FCDLL int_f h5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); H5_FCDLL int_f h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f h5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f h5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); H5_FCDLL int_f h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); - - H5_FCDLL int_f h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); H5_FCDLL int_f h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); H5_FCDLL int_f h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); H5_FCDLL int_f h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); -H5_FCDLL int_f h5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id); H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f h5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f h5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f h5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); H5_FCDLL int_f h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); H5_FCDLL int_f h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); @@ -286,75 +201,7 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f H5_FCDLL int_f h5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); H5_FCDLL int_f h5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); -H5_FCDLL int_f h5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f h5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f h5aclose_c ( hid_t_f *attr_id ); H5_FCDLL int_f h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); @@ -514,17 +361,9 @@ H5_FCDLL int_f h5pset_deflate_c ( hid_t_f *prp_id , int_f *level); H5_FCDLL int_f h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); H5_FCDLL int_f h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); H5_FCDLL int_f h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); H5_FCDLL int_f h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); H5_FCDLL int_f h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); @@ -592,25 +431,10 @@ H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hi H5P_cls_close_func_t close, void *close_data); H5_FCDLL int_f h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); H5_FCDLL int_f h5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f h5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pset_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5psetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); H5_FCDLL int_f h5pget_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pget_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pget_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pget_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pgetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); H5_FCDLL int_f h5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); H5_FCDLL int_f h5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); H5_FCDLL int_f h5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index e23f833..9e25be2 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -41,6 +41,5 @@ MODULE HDF5 USE H5P USE H5R USE H5Z - USE H5_DBLE_INTERFACE USE H5LIB END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 3b2c0a0..4c38575 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,23 +42,11 @@ else AM_LDFLAGS+=-static endif -# Condition for including/excluding the DBLE interfaces for when the -# default REAL is of type DOUBLE PRECISION. -# We do not include the double precision interfaces if the defaut REAL is -# DOUBLE PRECISION since this would lead to a non-unique conflict with the -# generic interfaces declared as REAL. -if FORTRAN_DEFAULT_REALisDBLE_F - F_DBLE = Exclude -else - F_DBLE = Include -endif - # Source files for the library. libhdf5_fortran_la_SOURCES=H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 \ - H5_DBLE_Interface$(F_DBLE).F90 \ + H5Tff.F90 H5Zff.F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -186,13 +174,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 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo + H5Sff.lo H5Tff.lo H5Zff.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 5a925df..f3997c9 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -153,9 +153,9 @@ libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo H5f90kit.lo H5_f.lo H5Af.lo \ - H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo \ - H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo HDF5.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 HDF5.lo 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@) @@ -722,21 +722,12 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -@FORTRAN_DEFAULT_REALisDBLE_F_FALSE@F_DBLE = Include - -# Condition for including/excluding the DBLE interfaces for when the -# default REAL is of type DOUBLE PRECISION. -# We do not include the double precision interfaces if the defaut REAL is -# DOUBLE PRECISION since this would lead to a non-unique conflict with the -# generic interfaces declared as REAL. -@FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. libhdf5_fortran_la_SOURCES = H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 \ - H5_DBLE_Interface$(F_DBLE).F90 \ + H5Tff.F90 H5Zff.F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -1434,14 +1425,12 @@ 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 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_DBLE_Interface$(F_DBLE).lo + H5Sff.lo H5Tff.lo H5Zff.lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 48fb343..1f475ae 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -9,22 +9,6 @@ H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE @H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF ; H5_DBLE_INTERFACE -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_7 H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1 @@ -52,54 +36,6 @@ H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_1 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_2 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_3 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_4 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_5 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_6 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_7 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_REAL_1 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_2 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_3 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_4 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_5 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_6 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_7 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_1 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_2 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_3 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_4 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_5 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_6 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_7 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_1 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_2 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_3 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_4 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_5 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_6 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_7 -H5A_PROVISIONAL_mp_H5AREAD_REAL_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_REAL_1 -H5A_PROVISIONAL_mp_H5AREAD_REAL_2 -H5A_PROVISIONAL_mp_H5AREAD_REAL_3 -H5A_PROVISIONAL_mp_H5AREAD_REAL_4 -H5A_PROVISIONAL_mp_H5AREAD_REAL_5 -H5A_PROVISIONAL_mp_H5AREAD_REAL_6 -H5A_PROVISIONAL_mp_H5AREAD_REAL_7 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_CHAR_1 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_2 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_3 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_4 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_5 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_6 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_7 H5A_mp_H5AGET_SPACE_F H5A_mp_H5AGET_TYPE_F H5A_mp_H5AGET_NAME_F @@ -122,8 +58,6 @@ H5A_mp_H5AEXISTS_F H5A_mp_H5AEXISTS_BY_NAME_F H5A_mp_H5AOPEN_BY_NAME_F H5A_mp_H5ARENAME_F -@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR -@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR ; H5D H5D_mp_H5DCREATE_F H5D_mp_H5DOPEN_F diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index cda2fee..c177143 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -111,39 +111,6 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) -dnl Check to see if -r8 was specified to determine if we need to -dnl compile the DOUBLE PRECISION interfaces. - -AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ - FORTRAN_DEFAULT_REALisDBLE="no" - AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) - - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - MODULE type_mod - INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble - END INTERFACE - CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble - END MODULE type_mod - PROGRAM main - USE type_mod - REAL :: r - DOUBLE PRECISION :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - ])], [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - FORTRAN_DEFAULT_REALisDBLE="yes"]) -]) - dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. -- cgit v0.12 From 5e6d18e5be17b43ba446acbbc11d0fbe583abc47 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 13:33:25 -0500 Subject: [svn-r26869] removed the --enable-fortran2003 option, it is now just --enable-fortran --- Makefile.in | 3 -- c++/Makefile.in | 3 -- c++/examples/Makefile.in | 3 -- c++/src/Makefile.in | 3 -- c++/test/Makefile.in | 3 -- configure | 66 ++++------------------------------------- configure.ac | 47 +++++------------------------ examples/Makefile.in | 3 -- fortran/Makefile.in | 3 -- fortran/examples/CMakeLists.txt | 32 ++++++++++---------- fortran/examples/Makefile.am | 12 +++----- fortran/examples/Makefile.in | 27 +++++++---------- fortran/src/H5Aff.F90 | 18 ++++++----- fortran/src/Makefile.in | 3 -- fortran/test/CMakeLists.txt | 52 ++++++++++++++++---------------- fortran/test/Makefile.am | 20 ++----------- fortran/test/Makefile.in | 48 +++++++++--------------------- fortran/testpar/Makefile.in | 3 -- hl/Makefile.in | 3 -- hl/c++/Makefile.in | 3 -- hl/c++/examples/Makefile.in | 3 -- hl/c++/src/Makefile.in | 3 -- hl/c++/test/Makefile.in | 3 -- hl/examples/Makefile.in | 3 -- hl/fortran/Makefile.in | 3 -- hl/fortran/examples/Makefile.in | 3 -- hl/fortran/src/Makefile.in | 3 -- hl/fortran/test/Makefile.in | 3 -- hl/src/Makefile.in | 3 -- hl/test/Makefile.in | 3 -- hl/tools/Makefile.in | 3 -- hl/tools/gif2h5/Makefile.in | 3 -- src/Makefile.in | 3 -- src/libhdf5.settings.in | 1 - test/Makefile.in | 3 -- testpar/Makefile.in | 3 -- tools/Makefile.in | 3 -- tools/h5copy/Makefile.in | 3 -- tools/h5diff/Makefile.in | 3 -- tools/h5dump/Makefile.in | 3 -- tools/h5import/Makefile.in | 3 -- tools/h5jam/Makefile.in | 3 -- tools/h5ls/Makefile.in | 3 -- tools/h5repack/Makefile.in | 3 -- tools/h5stat/Makefile.in | 3 -- tools/lib/Makefile.in | 3 -- tools/misc/Makefile.in | 3 -- tools/perform/Makefile.in | 3 -- 48 files changed, 95 insertions(+), 342 deletions(-) diff --git a/Makefile.in b/Makefile.in index 73000af..faf439a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -289,7 +289,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -306,13 +305,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 1ada163..0efb387 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -449,7 +449,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -466,13 +465,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 0c09aa8..df861e3 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -397,7 +397,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -414,13 +413,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index a16360b..cf2026a 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -460,7 +460,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -477,13 +476,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index edaaa34..5279c32 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -451,7 +451,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -468,13 +467,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/configure b/configure index 603a9d4..f821112 100755 --- a/configure +++ b/configure @@ -722,8 +722,6 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS -FORTRAN_2003_CONDITIONAL_F_FALSE -FORTRAN_2003_CONDITIONAL_F_TRUE FCLIBS F9XMODEXT F9XMODFLAG @@ -740,7 +738,6 @@ HSIZE_T HADDR_T R_INTEGER R_LARGE -HAVE_FORTRAN_2003 HDF5_INTERFACES am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -770,9 +767,7 @@ INSTRUMENT HDF5_HL CXX HDF_CXX -FC2003 FC -HDF_FORTRAN2003 HDF_FORTRAN STATIC_EXEC MPE @@ -872,7 +867,6 @@ enable_maintainer_mode enable_dependency_tracking enable_unsupported enable_fortran -enable_fortran2003 enable_cxx enable_hl enable_shared @@ -1553,8 +1547,6 @@ Optional Features: speeds up one-time build --enable-unsupported Allow unsupported combinations of configure options --enable-fortran Compile the Fortran 90/95 interface [default=no] - --enable-fortran2003 Compile the Fortran 2003 interface, must also - specify --enable-fortran [default=no] --enable-cxx Compile the C++ interface [default=no] --enable-hl Enable the high level library [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -3853,7 +3845,6 @@ $as_echo "done" >&6; } ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. -## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -3872,9 +3863,7 @@ $as_echo "done" >&6; } MPE=no STATIC_EXEC=no HDF_FORTRAN=no - HDF_FORTRAN2003=no HDF_FORTRAN=no - HDF_FORTRAN2003=no HDF_CXX=no HDF_CXX=no HDF5_HL=yes @@ -5128,33 +5117,6 @@ else echo "no" fi - -## ---------------------------------------------------------------------- -## Check if they would like the Fortran 2003 interface compiled -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5 -$as_echo_n "checking if Fortran 2003 interface enabled... " >&6; } -# Check whether --enable-fortran2003 was given. -if test "${enable_fortran2003+set}" = set; then : - enableval=$enable_fortran2003; HDF_FORTRAN2003=$enableval -fi - - -## ---------------------------------------------------------------------- -## Check to make sure --enable-fortran is present if --enable-fortran2003 -## was specified - -if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then - echo "no" - as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5 -else - if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" - else - echo "no" - fi -fi - if test "X$HDF_FORTRAN" = "Xyes"; then ## We will output an include file for Fortran, H5config_f.inc which @@ -5166,7 +5128,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then HDF_FORTRAN=yes - HDF5_INTERFACES="$HDF5_INTERFACES fortran" ## -------------------------------------------------------------------- @@ -6554,10 +6515,9 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi - if test "X$HDF_FORTRAN2003" = "Xyes"; then - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } @@ -6590,11 +6550,10 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" - fi + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" fi else FC="no" @@ -6608,15 +6567,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X$HAVE_FORTRAN_2003" = "Xyes"; then - FORTRAN_2003_CONDITIONAL_F_TRUE= - FORTRAN_2003_CONDITIONAL_F_FALSE='#' -else - FORTRAN_2003_CONDITIONAL_F_TRUE='#' - FORTRAN_2003_CONDITIONAL_F_FALSE= -fi - - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## @@ -30173,10 +30123,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index aaaceb3..ee75444 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,6 @@ AC_MSG_RESULT([done]) ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. -## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -168,9 +167,7 @@ AC_SUBST([EXTERNAL_FILTERS]) AC_SUBST([MPE]) MPE=no AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no -AC_SUBST([HDF_FORTRAN2003]) HDF_FORTRAN2003=no AC_SUBST([FC]) HDF_FORTRAN=no -AC_SUBST([FC2003]) HDF_FORTRAN2003=no AC_SUBST([HDF_CXX]) HDF_CXX=no AC_SUBST([CXX]) HDF_CXX=no AC_SUBST([HDF5_HL]) HDF5_HL=yes @@ -362,31 +359,6 @@ else echo "no" fi - -## ---------------------------------------------------------------------- -## Check if they would like the Fortran 2003 interface compiled -## -AC_MSG_CHECKING([if Fortran 2003 interface enabled]) -AC_ARG_ENABLE([fortran2003], - [AS_HELP_STRING([--enable-fortran2003], - [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], - [HDF_FORTRAN2003=$enableval]) - -## ---------------------------------------------------------------------- -## Check to make sure --enable-fortran is present if --enable-fortran2003 -## was specified - -if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then - echo "no" - AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) -else - if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" - else - echo "no" - fi -fi - if test "X$HDF_FORTRAN" = "Xyes"; then ## We will output an include file for Fortran, H5config_f.inc which @@ -397,7 +369,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then [sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc]) AC_SUBST([FC]) HDF_FORTRAN=yes - AC_SUBST([HAVE_FORTRAN_2003]) HDF5_INTERFACES="$HDF5_INTERFACES fortran" @@ -462,17 +433,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi - if test "X$HDF_FORTRAN2003" = "Xyes"; then - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - PAC_PROG_FC_HAVE_F2003_REQUIREMENTS + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. + PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) - else - HAVE_FORTRAN_2003="yes" - fi + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) + else + HAVE_FORTRAN_2003="yes" fi else FC="no" @@ -481,8 +450,6 @@ fi ## Change back to the C language AC_LANG_POP(Fortran) -AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## diff --git a/examples/Makefile.in b/examples/Makefile.in index deadf9a..f215316 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -397,7 +397,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -414,13 +413,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index ee7caa5..04b17e7 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -453,7 +453,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -470,13 +469,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 2bf0bf6..8442b13 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -54,23 +54,21 @@ foreach (example ${examples}) ) endforeach (example ${examples}) -if (HDF5_ENABLE_F2003) - foreach (example ${F2003_examples}) - add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ") - target_link_libraries (f03_ex_${example} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} - ) - target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (f03_ex_${example} PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} - ) - endforeach (example ${F2003_examples}) -endif (HDF5_ENABLE_F2003) +foreach (example ${F2003_examples}) + add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example} ${LIB_TYPE}) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ") + target_link_libraries (f03_ex_${example} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} + ) + target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_target_properties (f03_ex_${example} PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran03 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + ) +endforeach (example ${F2003_examples}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index feed32c..74007d5 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -46,12 +46,10 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \ # Add attention tests for Fortran 2003 features -if FORTRAN_2003_CONDITIONAL_F - EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ - compound_fortran2003 compound_complex_fortran2003 - INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ - compound_fortran2003.f90 compound_complex_fortran2003.f90 -endif +EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ + compound_fortran2003 compound_complex_fortran2003 +INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ + compound_fortran2003.f90 compound_complex_fortran2003.f90 TEST_SCRIPT=testh5fc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -102,12 +100,10 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 -if FORTRAN_2003_CONDITIONAL_F rwdset_fortran2003: rwdset_fortran2003.f90 nested_derived_type: nested_derived_type.f90 compound_fortran2003: compound_fortran2003.f90 compound_complex_fortran2003: compound_complex_fortran2003.f90 -endif include $(top_srcdir)/config/examples.am include $(top_srcdir)/config/conclude.am diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 80abc16..408aaa6 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -104,14 +104,6 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ $(srcdir)/run-fortran-ex.sh.in $(srcdir)/testh5fc.sh.in \ $(top_srcdir)/bin/test-driver - -# Add attention tests for Fortran 2003 features -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_1 = rwdset_fortran2003 nested_derived_type \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003 compound_complex_fortran2003 - -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = rwdset_fortran2003.f90 nested_derived_type.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003.f90 compound_complex_fortran2003.f90 - TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -405,7 +397,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -422,13 +413,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -620,17 +609,21 @@ INSTALL_SCRIPT_FILES = run-fortran-ex.sh # be run. # We don't tell automake about these programs so that it doesn't try to # compile them with the regular fortran compiler. + +# Add attention tests for Fortran 2003 features 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) + rwdset_fortran2003 nested_derived_type compound_fortran2003 \ + compound_complex_fortran2003 # List files to be installed here 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) + rwdset_fortran2003.f90 nested_derived_type.f90 \ + compound_fortran2003.f90 compound_complex_fortran2003.f90 TEST_SCRIPT = testh5fc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -1067,10 +1060,10 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@rwdset_fortran2003: rwdset_fortran2003.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@nested_derived_type: nested_derived_type.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_fortran2003: compound_fortran2003.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_complex_fortran2003: compound_complex_fortran2003.f90 +rwdset_fortran2003: rwdset_fortran2003.f90 +nested_derived_type: nested_derived_type.f90 +compound_fortran2003: compound_fortran2003.f90 +compound_complex_fortran2003: compound_complex_fortran2003.f90 # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 0c209fa..a827738 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -494,7 +494,7 @@ CONTAINS hdferr = h5aget_name_c(attr_id, size, buf) END SUBROUTINE h5aget_name_f - +!!$ !!$ SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) !!$ IMPLICIT NONE !!$ INTEGER(HID_T), INTENT(IN) :: attr_id @@ -503,9 +503,10 @@ CONTAINS !!$ INTEGER, INTENT(OUT) :: hdferr !!$!***** !!$ CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf +!!$ INTEGER(SIZE_T) :: size_out !!$ !!$ INTERFACE -!!$ INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') +!!$ INTEGER(SIZE_T) FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') !!$ IMPORT :: C_CHAR !!$ IMPORT :: HID_T, SIZE_T !!$ INTEGER(HID_T), INTENT(IN), VALUE :: attr_id @@ -515,11 +516,14 @@ CONTAINS !!$ END INTERFACE !!$ !!$ ! add 1 for the null char -!!$ PRINT*,H5Aget_name(attr_id, size + 1_SIZE_T, c_buf) -!!$ hdferr = INT(H5Aget_name(attr_id, size + 1_SIZE_T, c_buf)) -!!$ -!!$ CALL H5_Fortran_string_c2f(c_buf, buf) -!!$ +!!$ size_out = H5Aget_name(attr_id, size + 1_SIZE_T, c_buf) +!!$ +!!$ hdferr = 0 +!!$ IF(size_out.LT.0)THEN +!!$ hdferr = -1 +!!$ ELSE +!!$ CALL H5_Fortran_string_c2f(c_buf, buf) +!!$ ENDIF !!$ !!$ END SUBROUTINE H5Aget_name_f diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index f3997c9..0e7f757 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -502,7 +502,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -519,13 +518,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 335de81..7a718f8 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -116,34 +116,32 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES ) #-- Adding test for fortranlib_test_F03 -if (HDF5_ENABLE_F2003) - add_executable (fortranlib_test_F03 - fortranlib_test_F03.f90 - tH5E_F03.f90 - tH5F_F03.f90 - tH5L_F03.f90 - tH5O_F03.f90 - tH5P_F03.f90 - tH5T_F03.f90 - tHDF5_F03.f90 +add_executable (fortranlib_test_F03 + fortranlib_test_F03.f90 + tH5E_F03.f90 + tH5F_F03.f90 + tH5L_F03.f90 + tH5O_F03.f90 + tH5P_F03.f90 + tH5T_F03.f90 + tHDF5_F03.f90 ) - TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 ${LIB_TYPE} " " " ") - target_link_libraries (fortranlib_test_F03 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03 "ws2_32.lib") - endif (WIN32 AND MSVC) - target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (fortranlib_test_F03 PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} - ) -endif (HDF5_ENABLE_F2003) +TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) +TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 ${LIB_TYPE} " " " ") +target_link_libraries (fortranlib_test_F03 + ${HDF5_F90_TEST_LIB_TARGET} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} +) +if (WIN32 AND MSVC) + target_link_libraries (fortranlib_test_F03 "ws2_32.lib") +endif (WIN32 AND MSVC) +target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_target_properties (fortranlib_test_F03 PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) #-- Adding test for fflush1 add_executable (fflush1 fflush1.f90) diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index f8c9d02..728b4d7 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -36,20 +36,8 @@ else AM_LDFLAGS+=-static endif -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -if FORTRAN_2003_CONDITIONAL_F - ff_PREFIX = F03 -else - ff_PREFIX = F90 -endif - # Our main targets, the tests themselves -TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 - -if FORTRAN_2003_CONDITIONAL_F - TEST_PROG += fortranlib_test_F03 -endif +TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 check_PROGRAMS=$(TEST_PROG) @@ -63,13 +51,11 @@ fortranlib_test_CFLAGS=$(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ fortranlib_test_1_8.f90 -if FORTRAN_2003_CONDITIONAL_F - fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ +fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 -endif fflush1_SOURCES=fflush1.f90 diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 3259f0174..578d65f 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -87,9 +87,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = fortranlib_test_F03 -check_PROGRAMS = $(am__EXEEXT_2) -TESTS = $(am__EXEEXT_2) +check_PROGRAMS = $(am__EXEEXT_1) +TESTS = $(am__EXEEXT_1) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ @@ -109,10 +108,9 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__EXEEXT_1 = \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03$(EXEEXT) -am__EXEEXT_2 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ - fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) $(am__EXEEXT_1) +am__EXEEXT_1 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ + fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) \ + fortranlib_test_F03$(EXEEXT) am_fflush1_OBJECTS = fflush1.$(OBJEXT) fflush1_OBJECTS = $(am_fflush1_OBJECTS) fflush1_LDADD = $(LDADD) @@ -147,18 +145,10 @@ fortranlib_test_1_8_OBJECTS = $(am_fortranlib_test_1_8_OBJECTS) fortranlib_test_1_8_LDADD = $(LDADD) fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ $(LIBH5F) $(LIBHDF5) -am__fortranlib_test_F03_SOURCES_DIST = tH5E_F03.f90 tH5F_F03.f90 \ - tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 \ - tHDF5_F03.f90 fortranlib_test_F03.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = \ -@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) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tHDF5_F03.$(OBJEXT) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03.$(OBJEXT) +am_fortranlib_test_F03_OBJECTS = tH5E_F03.$(OBJEXT) tH5F_F03.$(OBJEXT) \ + tH5L_F03.$(OBJEXT) tH5O_F03.$(OBJEXT) tH5P_F03.$(OBJEXT) \ + tH5T_F03.$(OBJEXT) tHDF5_F03.$(OBJEXT) \ + fortranlib_test_F03.$(OBJEXT) fortranlib_test_F03_OBJECTS = $(am_fortranlib_test_F03_OBJECTS) fortranlib_test_F03_LDADD = $(LDADD) fortranlib_test_F03_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ @@ -227,8 +217,7 @@ SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) DIST_SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ - $(fortranlib_test_1_8_SOURCES) \ - $(am__fortranlib_test_F03_SOURCES_DIST) + $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -520,7 +509,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -537,13 +525,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -730,15 +716,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.raw # The Fortran test library noinst_LTLIBRARIES = libh5test_fortran.la -@FORTRAN_2003_CONDITIONAL_F_FALSE@ff_PREFIX = F90 - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -@FORTRAN_2003_CONDITIONAL_F_TRUE@ff_PREFIX = F03 # Our main targets, the tests themselves -TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ - $(am__append_2) +TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 libh5test_fortran_la_SOURCES = tf.F90 t.c # Source files are used for both the library and fortranlib_test. @@ -748,11 +728,11 @@ fortranlib_test_CFLAGS = $(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ fortranlib_test_1_8.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 +fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 0663b5b..2ae7e8e 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -449,7 +449,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -466,13 +465,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/Makefile.in b/hl/Makefile.in index f1463c4..56650e2 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -453,7 +453,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -470,13 +469,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 4fce160..55e827b 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -449,7 +449,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -466,13 +465,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index fe8f142..a1efec5 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -396,7 +396,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -413,13 +412,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index b5cad03..c98a3a5 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -452,7 +452,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -469,13 +468,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index fed9c26..20f1039 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -449,7 +449,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -466,13 +465,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 8def1bb..41e510e 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -396,7 +396,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -413,13 +412,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 0a32f24..012c84a 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -453,7 +453,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -470,13 +469,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index db18194..ae07190 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -396,7 +396,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -413,13 +412,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index f719e2f..cdf2d44 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -470,7 +470,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -487,13 +486,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 74bfdb3..371b6fd 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -461,7 +461,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -478,13 +477,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index b04b736..2f619b8 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -451,7 +451,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -468,13 +467,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index f8ea4f3..f180d68 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -488,7 +488,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -505,13 +504,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 6415c3b..300e063 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -450,7 +450,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -467,13 +466,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 54b3564..a5b9948 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -464,7 +464,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -481,13 +480,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/src/Makefile.in b/src/Makefile.in index e0299b7..fc23c89 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -512,7 +512,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -529,13 +528,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 1eed645..2355543 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -39,7 +39,6 @@ Languages: ---------- Fortran: @HDF_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HAVE_FORTRAN_2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index 65f7ef2..1e5aa39 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -856,7 +856,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -873,13 +872,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 1922204..358523b 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -479,7 +479,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -496,13 +495,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 9a9ec89..ba872ae 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -450,7 +450,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -467,13 +466,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index e6e1017..e1554f2 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -458,7 +458,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -475,13 +474,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index afbf90f..538ff16 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -465,7 +465,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -482,13 +481,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 18958a9..87319f9 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -464,7 +464,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -481,13 +480,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 552ee9f..ee0600f 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -458,7 +458,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -475,13 +474,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 06ca74e..2634368 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -470,7 +470,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -487,13 +486,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 81d8b29..7403e90 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -450,7 +450,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -467,13 +466,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index e9e7ad5..d014c7a 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -482,7 +482,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -499,13 +498,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index a45ccf4..b859a59 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -460,7 +460,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -477,13 +476,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 50dc1b6..44fa676 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -447,7 +447,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -464,13 +463,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 2a022f8..1e6c795 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -485,7 +485,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -502,13 +501,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 0fe1012..f6508a6 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -489,7 +489,6 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ @@ -506,13 +505,11 @@ H5_LDFLAGS = @H5_LDFLAGS@ 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@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ -- cgit v0.12 From 0d947503914597fb30b989b806eb578fbf224808 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 13:40:02 -0500 Subject: [svn-r26870] added mising TARGET --- fortran/src/H5Aff.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index a827738..6792b45 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -2242,7 +2242,7 @@ CONTAINS ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr -- cgit v0.12 From c7529c3d838cf7b7ff7033fdc84a324159fc37c4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 14:53:56 -0500 Subject: [svn-r26873] Added BIND(C) and moved to .F90 extension. --- MANIFEST | 8 +- hl/fortran/src/H5DSfc.c | 36 +- hl/fortran/src/H5DSff.F90 | 518 ++++ hl/fortran/src/H5DSff.f90 | 545 ---- hl/fortran/src/H5IMfc.c | 24 +- hl/fortran/src/H5IMff.F90 | 737 +++++ hl/fortran/src/H5IMff.f90 | 783 ----- hl/fortran/src/H5LTf90proto.h | 76 +- hl/fortran/src/H5LTff.F90 | 6490 +++++++++++++++++++++++++++++++++++++++++ hl/fortran/src/H5LTff.f90 | 6490 ----------------------------------------- hl/fortran/src/H5TBff.F90 | 1900 ++++++++++++ hl/fortran/src/H5TBff.f90 | 1900 ------------ hl/fortran/src/Makefile.am | 12 +- hl/fortran/src/Makefile.in | 65 +- 14 files changed, 9743 insertions(+), 9841 deletions(-) create mode 100644 hl/fortran/src/H5DSff.F90 delete mode 100644 hl/fortran/src/H5DSff.f90 create mode 100644 hl/fortran/src/H5IMff.F90 delete mode 100644 hl/fortran/src/H5IMff.f90 create mode 100644 hl/fortran/src/H5LTff.F90 delete mode 100644 hl/fortran/src/H5LTff.f90 create mode 100644 hl/fortran/src/H5TBff.F90 delete mode 100644 hl/fortran/src/H5TBff.f90 diff --git a/MANIFEST b/MANIFEST index d772b6a..8a41f52 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2322,16 +2322,16 @@ ./hl/fortran/examples/exlite.f90 ./hl/fortran/examples/run-hlfortran-ex.sh.in ./hl/fortran/src/H5DSfc.c -./hl/fortran/src/H5DSff.f90 +./hl/fortran/src/H5DSff.F90 ./hl/fortran/src/H5IMcc.c ./hl/fortran/src/H5IMcc.h ./hl/fortran/src/H5IMfc.c -./hl/fortran/src/H5IMff.f90 +./hl/fortran/src/H5IMff.F90 ./hl/fortran/src/H5LTf90proto.h ./hl/fortran/src/H5LTfc.c -./hl/fortran/src/H5LTff.f90 +./hl/fortran/src/H5LTff.F90 ./hl/fortran/src/H5TBfc.c -./hl/fortran/src/H5TBff.f90 +./hl/fortran/src/H5TBff.F90 ./hl/fortran/src/Makefile.am ./hl/fortran/src/Makefile.in ./hl/fortran/test/Makefile.am diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index 1de3fff..af054e0 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -35,7 +35,7 @@ *------------------------------------------------------------------------- */ int_f -nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) +h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) { char *c_dimname = NULL; int_f ret_value = 0; @@ -61,7 +61,7 @@ nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) return ret_value; -} /* end nh5dsset_scale_c() */ +} /* end h5dsset_scale_c() */ /*------------------------------------------------------------------------- @@ -80,7 +80,7 @@ nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) *------------------------------------------------------------------------- */ int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -94,7 +94,7 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end nh5dsattach_scale_c() */ +} /* end h5dsattach_scale_c() */ /*------------------------------------------------------------------------- @@ -113,7 +113,7 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -127,7 +127,7 @@ nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end nh5dsdetach_scale_c() */ +} /* end h5dsdetach_scale_c() */ /*------------------------------------------------------------------------- @@ -146,7 +146,7 @@ nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) +h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) { int_f ret_value = 0; htri_t c_is_attached; @@ -163,7 +163,7 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) done: return ret_value; -} /* end nh5dsis_attached_c() */ +} /* end h5dsis_attached_c() */ /*------------------------------------------------------------------------- * Function: H5DSis_scale_c @@ -181,7 +181,7 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) *------------------------------------------------------------------------- */ int_f -nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) +h5dsis_scale_c( hid_t_f *did, int_f *is_scale) { int_f ret_value = 0; htri_t c_is_scale; @@ -198,7 +198,7 @@ nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) done: return ret_value; -} /* end nh5dsis_scale_c() */ +} /* end h5dsis_scale_c() */ /*------------------------------------------------------------------------- @@ -217,7 +217,7 @@ nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) *------------------------------------------------------------------------- */ int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) +h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) { char *c_label = NULL; int_f ret_value = 0; @@ -242,7 +242,7 @@ nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) return ret_value; -} /* end nh5dsset_label_c() */ +} /* end h5dsset_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_label_c @@ -260,7 +260,7 @@ nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) *------------------------------------------------------------------------- */ int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) +h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) { char *c_label = NULL; ssize_t size_c = -1; @@ -291,7 +291,7 @@ done: if(c_label) HDfree(c_label); return ret_value; -} /* end nh5dsget_label_c() */ +} /* end h5dsget_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_scale_name_c @@ -309,7 +309,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) +h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) { char *c_scale_name = NULL; ssize_t size_c = -1; @@ -338,7 +338,7 @@ done: if(c_scale_name) HDfree(c_scale_name); return ret_value; -} /* end nh5dsget_scale_name_c() */ +} /* end h5dsget_scale_name_c() */ /*------------------------------------------------------------------------- * Function: H5DSget_num_scales_c @@ -356,7 +356,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) +h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) { int_f ret_value = 0; @@ -370,4 +370,4 @@ nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) done: return ret_value; -} /* end nh5dsget_num_scales_c() */ +} /* end h5dsget_num_scales_c() */ diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90 new file mode 100644 index 0000000..00cf4d8 --- /dev/null +++ b/hl/fortran/src/H5DSff.F90 @@ -0,0 +1,518 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5DS functions +! + +MODULE h5ds + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_CHAR + USE h5fortran_types + USE hdf5 + +CONTAINS + +!------------------------------------------------------------------------- +! Function: H5DSset_scale_f +! +! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_scale_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) + + INTERFACE + INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len) & + BIND(C,NAME='h5dsset_scale_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname ! The dimension name + INTEGER(SIZE_T), INTENT(in) :: dimname_len + END FUNCTION H5DSset_scale_c + END INTERFACE + + IF(PRESENT(dimname))THEN + dimname_len = LEN(dimname) + errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) + ELSE + errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) + ENDIF + + END SUBROUTINE H5DSset_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSattach_scale_f +! +! Purpose: Attach dimension scale dsid to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsattach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx) & + BIND(C,NAME='h5dsattach_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + END FUNCTION H5DSattach_scale_c + END INTERFACE + + c_idx = idx -1 ! account for C-dimensions starting at 0 + + errcode = H5DSattach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSattach_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSdetach_scale_f +! +! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsdetach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx) & + BIND(C,NAME='h5dsdetach_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + END FUNCTION H5DSdetach_scale_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSdetach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSdetach_scale_f + + +!------------------------------------------------------------------------- +! Function: H5DSis_attached_f +! +! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_attached_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with + LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to + ! dimension idx of dataset did + INTEGER :: errcode ! error code + INTEGER :: c_is_attached + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached) & + BIND(C,NAME='h5dsis_attached_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to + END FUNCTION H5DSis_attached_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) + + is_attached = .FALSE. ! default + IF(c_is_attached.GT.0)THEN + is_attached = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_attached_f + +! +! H5DSiterate_scales: Impliment in F2003 +! + +!------------------------------------------------------------------------- +! Function: H5DSis_scale_f +! +! Purpose: Determines whether dset is a Dimension Scale. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the data set to query + LOGICAL , INTENT(out) :: is_scale ! logical: + ! .TRUE. if did is a Dimension Scale + INTEGER :: errcode ! error code + INTEGER :: c_is_scale + + INTERFACE + INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) & + BIND(C,NAME='h5dsis_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did + INTEGER, INTENT(out) :: c_is_scale + END FUNCTION H5DSis_scale_c + END INTERFACE + + errcode = H5DSis_scale_c(did, c_is_scale) + + is_scale = .FALSE. ! default + IF(c_is_scale.GT.0)THEN + is_scale = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSset_label_f +! +! Purpose: Set label for the dimension idx of did to the value label +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_label_f( did, idx, label, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: label_len ! Length of label + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) & + BIND(C,NAME='h5dsset_label_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label + END FUNCTION H5DSset_label_c + END INTERFACE + + c_idx = idx - 1 + + label_len = LEN(label) + errcode = H5DSset_label_c(did, c_idx, label, label_len) + + END SUBROUTINE H5DSset_label_f + +!------------------------------------------------------------------------- +! Function: H5DSget_label_f +! +! Purpose: Read the label for dimension idx of did into buffer label. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer + INTEGER :: errcode ! Error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) & + BIND(C,NAME='h5dsget_label_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label + END FUNCTION H5DSget_label_c + END INTERFACE + + c_idx = idx - 1 + + errcode = H5DSget_label_c(did, c_idx, label, size) + + END SUBROUTINE H5DSget_label_f + + +!------------------------------------------------------------------------- +! Function: H5DSget_scale_name_f +! +! Purpose: Read the name of scale did into buffer name. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_scale_name_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(LEN=*), INTENT(out) :: name ! The name + INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer + INTEGER :: errcode ! Error code + + INTERFACE + INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) & + bind(c,name='h5dsget_scale_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(out) :: name ! The name + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name + END FUNCTION H5DSget_scale_name_c + END INTERFACE + + errcode = H5DSget_scale_name_c(did, name, size) + + END SUBROUTINE H5DSget_scale_name_f + +!------------------------------------------------------------------------- +! Function: H5DSget_num_scales_f +! +! Purpose: Determines how many Dimension Scales are attached to dimension idx of did +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_num_scales_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) & + BIND(C,NAME='h5dsget_num_scales_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + END FUNCTION H5DSget_num_scales_c + END INTERFACE + + c_idx = idx - 1 + errcode = H5DSget_num_scales_c(did, c_idx, num_scales) + + END SUBROUTINE H5DSget_num_scales_f + +END MODULE h5ds + + + + + + diff --git a/hl/fortran/src/H5DSff.f90 b/hl/fortran/src/H5DSff.f90 deleted file mode 100644 index 04540a6..0000000 --- a/hl/fortran/src/H5DSff.f90 +++ /dev/null @@ -1,545 +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 file contains FORTRAN90 interfaces for H5DS functions -! - -MODULE h5ds - - USE h5fortran_types - USE hdf5 - -CONTAINS - - -!------------------------------------------------------------------------- -! Function: H5DSset_scale_f -! -! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_scale_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) - - INTERFACE - INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_SCALE_C'::h5dsset_scale_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dimname - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in) :: dimname ! The dimension name - INTEGER(SIZE_T), INTENT(in) :: dimname_len - END FUNCTION H5DSset_scale_c - END INTERFACE - - IF(PRESENT(dimname))THEN - dimname_len = LEN(dimname) - errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) - ELSE - errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) - ENDIF - - END SUBROUTINE H5DSset_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSattach_scale_f -! -! Purpose: Attach dimension scale dsid to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsattach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSATTACH_SCALE_C':: h5dsattach_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - END FUNCTION H5DSattach_scale_c - END INTERFACE - - c_idx = idx -1 ! account for C-dimensions starting at 0 - - errcode = H5DSattach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSattach_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSdetach_scale_f -! -! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsdetach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSDETACH_SCALE_C':: h5dsdetach_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - END FUNCTION H5DSdetach_scale_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSdetach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSdetach_scale_f - - -!------------------------------------------------------------------------- -! Function: H5DSis_attached_f -! -! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_attached_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with - LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to - ! dimension idx of dataset did - INTEGER :: errcode ! error code - INTEGER :: c_is_attached - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_ATTACHED_C':: h5dsis_attached_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to - END FUNCTION H5DSis_attached_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) - - is_attached = .FALSE. ! default - IF(c_is_attached.GT.0)THEN - is_attached = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_attached_f - -! -! H5DSiterate_scales: Impliment in F2003 -! - -!------------------------------------------------------------------------- -! Function: H5DSis_scale_f -! -! Purpose: Determines whether dset is a Dimension Scale. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - LOGICAL , INTENT(out) :: is_scale ! logical: - ! .TRUE. if did is a Dimension Scale - INTEGER :: errcode ! error code - INTEGER :: c_is_scale - - INTERFACE - INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_SCALE_C':: h5dsis_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - INTEGER, INTENT(out) :: c_is_scale - END FUNCTION H5DSis_scale_c - END INTERFACE - - errcode = H5DSis_scale_c(did, c_is_scale) - - is_scale = .FALSE. ! default - IF(c_is_scale.GT.0)THEN - is_scale = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSset_label_f -! -! Purpose: Set label for the dimension idx of did to the value label -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_label_f( did, idx, label, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: label_len ! Length of label - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_LABEL_C'::h5dsset_label_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: label - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label - END FUNCTION H5DSset_label_c - END INTERFACE - - c_idx = idx - 1 - - label_len = LEN(label) - errcode = H5DSset_label_c(did, c_idx, label, label_len) - - END SUBROUTINE H5DSset_label_f - -!------------------------------------------------------------------------- -! Function: H5DSget_label_f -! -! Purpose: Read the label for dimension idx of did into buffer label. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer - INTEGER :: errcode ! Error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_LABEL_C'::h5dsget_label_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: label - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label - END FUNCTION H5DSget_label_c - END INTERFACE - - c_idx = idx - 1 - - errcode = H5DSget_label_c(did, c_idx, label, size) - - END SUBROUTINE H5DSget_label_f - - -!------------------------------------------------------------------------- -! Function: H5DSget_scale_name_f -! -! Purpose: Read the name of scale did into buffer name. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_scale_name_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(out) :: name ! The name - INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer - INTEGER :: errcode ! Error code - - INTERFACE - INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_SCALE_NAME_C'::h5dsget_scale_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(out) :: name ! The name - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name - END FUNCTION H5DSget_scale_name_c - END INTERFACE - - errcode = H5DSget_scale_name_c(did, name, size) - - END SUBROUTINE H5DSget_scale_name_f - -!------------------------------------------------------------------------- -! Function: H5DSget_num_scales_f -! -! Purpose: Determines how many Dimension Scales are attached to dimension idx of did -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_num_scales_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_NUM_SCALES_C':: h5dsget_num_scales_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - END FUNCTION H5DSget_num_scales_c - END INTERFACE - - c_idx = idx - 1 - errcode = H5DSget_num_scales_c(did, c_idx, num_scales) - - END SUBROUTINE H5DSget_num_scales_f - -END MODULE h5ds - - - - - - diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c index 6acd410..7ad50d6 100644 --- a/hl/fortran/src/H5IMfc.c +++ b/hl/fortran/src/H5IMfc.c @@ -39,7 +39,7 @@ */ int_f -nh5immake_image_8bit_c (hid_t_f *loc_id, +h5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -100,7 +100,7 @@ done: */ int_f -nh5imread_image_c (hid_t_f *loc_id, +h5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf) @@ -153,7 +153,7 @@ done: */ int_f -nh5immake_image_24bit_c (hid_t_f *loc_id, +h5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -222,7 +222,7 @@ done: */ int_f -nh5imget_image_info_c(hid_t_f *loc_id, +h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -307,7 +307,7 @@ done: */ int_f -nh5imis_image_c(hid_t_f *loc_id, +h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -356,7 +356,7 @@ nh5imis_image_c(hid_t_f *loc_id, */ int_f -nh5immake_palette_c (hid_t_f *loc_id, +h5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -411,7 +411,7 @@ done: */ int_f -nh5imlink_palette_c (hid_t_f *loc_id, +h5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -476,7 +476,7 @@ done: */ int_f -nh5imunlink_palette_c (hid_t_f *loc_id, +h5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -542,7 +542,7 @@ done: */ int_f -nh5imget_npalettes_c(hid_t_f *loc_id, +h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals) @@ -604,7 +604,7 @@ done: int_f -nh5imget_palette_info_c(hid_t_f *loc_id, +h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -671,7 +671,7 @@ done: int_f -nh5imget_palette_c(hid_t_f *loc_id, +h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -729,7 +729,7 @@ done: */ int_f -nh5imis_palette_c(hid_t_f *loc_id, +h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 new file mode 100644 index 0000000..64fc644 --- /dev/null +++ b/hl/fortran/src/H5IMff.F90 @@ -0,0 +1,737 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5IM functions +! + +MODULE h5im + USE ISO_C_BINDING + USE h5fortran_types + USE hdf5 +CONTAINS + +!------------------------------------------------------------------------- +! Function: h5immake_image_8bit_f +! +! Purpose: Creates and writes an image an 8 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_image_8bit_f(loc_id,& + dset_name,& + width,& + height,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_image_8bit_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) & + BIND(C,NAME='h5immake_image_8bit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + INTEGER , INTENT(in), DIMENSION(*) :: buf ! buffer + END FUNCTION h5immake_image_8bit_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) + + END SUBROUTINE h5immake_image_8bit_f + +!------------------------------------------------------------------------- +! Function: h5imread_image_f +! +! Purpose: Reads image data from disk. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + SUBROUTINE h5imread_image_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imread_image_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imread_image_c(loc_id,namelen,dset_name,buf) & + BIND(C,NAME='h5imread_image_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + END FUNCTION h5imread_image_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) + + END SUBROUTINE h5imread_image_f + +!------------------------------------------------------------------------- +! Function: h5immake_image_24bit_f +! +! Purpose: Creates and writes an image a 24 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_image_24bit_f(loc_id,& + dset_name,& + width,& + height,& + il,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_image_24bit_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + CHARACTER(len=*), INTENT(in) :: il ! interlace + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) & + BIND(C,NAME='h5immake_image_24bit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il ! interlace + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: ILEN ! name length + + END FUNCTION h5immake_image_24bit_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(il) + errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) + + END SUBROUTINE h5immake_image_24bit_f + +!------------------------------------------------------------------------- +! Function: h5imget_image_info_f +! +! Purpose: Gets information about an image dataset (dimensions, interlace mode +! and number of associated palettes). +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_image_info_f(loc_id,& + dset_name,& + width,& + height,& + planes,& + interlace,& + npals,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_image_info_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: width ! width of image + INTEGER(hsize_t), INTENT(inout) :: height ! height of image + INTEGER(hsize_t), INTENT(inout) :: planes ! color planes + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + CHARACTER(len=*), INTENT(inout) :: interlace ! interlace + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) & + BIND(C,NAME='h5imget_image_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: width ! width of image + INTEGER(hsize_t), INTENT(inout) :: height ! height of image + INTEGER(hsize_t), INTENT(inout) :: planes ! color planes + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace ! interlace + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imget_image_info_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(interlace) + errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) + + END SUBROUTINE h5imget_image_info_f + +!------------------------------------------------------------------------- +! Function: h5imis_image_f +! +! Purpose: Inquires if a dataset is an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + INTEGER FUNCTION h5imis_image_f(loc_id,& + dset_name) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imis_image_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imis_image_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5imis_image_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5imis_image_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imis_image_c(loc_id,namelen,dset_name) + h5imis_image_f = errcode + + END FUNCTION h5imis_image_f + + +!------------------------------------------------------------------------- +! Function: h5immake_palette_f +! +! Purpose: Creates and writes a palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_palette_f(loc_id,& + dset_name,& + pal_dims,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_palette_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) & + BIND(C,NAME='h5immake_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + END FUNCTION h5immake_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) + + END SUBROUTINE h5immake_palette_f + +!------------------------------------------------------------------------- +! Function: h5imlink_palette_f +! +! Purpose: This function attaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imlink_palette_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: pal_name ! palette name + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + BIND(C,NAME='h5imlink_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imlink_palette_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(pal_name) + errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + + END SUBROUTINE h5imlink_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imunlink_palette_f +! +! Purpose: This function dettaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imunlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imunlink_palette_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: pal_name ! palette name + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + BIND(C,NAME='h5imunlink_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imunlink_palette_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(pal_name) + errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + + END SUBROUTINE h5imunlink_palette_f + +!------------------------------------------------------------------------- +! Function: h5imget_npalettes_f +! +! Purpose: Gets the number of palettes associated to an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_npalettes_f(loc_id,& + dset_name,& + npals,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_npalettes_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,dset_name,npals) & + BIND(C,NAME='h5imget_npalettes_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5imget_npalettes_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) + + END SUBROUTINE h5imget_npalettes_f + + +!------------------------------------------------------------------------- +! Function: h5imget_palette_info_f +! +! Purpose: Get palette information +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_palette_info_f(loc_id,& + dset_name,& + pal_number,& + dims,& + errcode ) + + IMPLICIT NONE + + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_palette_info_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) & + BIND(C,NAME='h5imget_palette_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5imget_palette_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) + + END SUBROUTINE h5imget_palette_info_f + +!------------------------------------------------------------------------- +! Function: h5imget_palette_f +! +! Purpose: Reads palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_palette_f(loc_id,& + dset_name,& + pal_number,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_palette_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) & + BIND(C,NAME='h5imget_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + END FUNCTION h5imget_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) + + END SUBROUTINE h5imget_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imis_palette_f +! +! Purpose: Inquires if a dataset is a palette +! +! Return: true, false, fail +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + INTEGER FUNCTION h5imis_palette_f(loc_id,& + dset_name) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imis_palette_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imis_palette_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5imis_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5imis_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imis_palette_c(loc_id,namelen,dset_name) + h5imis_palette_f = errcode + + END FUNCTION h5imis_palette_f + +END MODULE H5IM + + + + + diff --git a/hl/fortran/src/H5IMff.f90 b/hl/fortran/src/H5IMff.f90 deleted file mode 100644 index 50c6d8b..0000000 --- a/hl/fortran/src/H5IMff.f90 +++ /dev/null @@ -1,783 +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 file contains FORTRAN90 interfaces for H5IM functions -! - -module h5im -use h5fortran_types -use hdf5 -contains - - -!------------------------------------------------------------------------- -! Function: h5immake_image_8bit_f -! -! Purpose: Creates and writes an image an 8 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_image_8bit_f(loc_id,& - dset_name,& - width,& - height,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_8bit_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - interface - integer function h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_8BIT_C'::h5immake_image_8bit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - integer , intent(in), dimension(*) :: buf ! buffer - end function h5immake_image_8bit_c - end interface - - namelen = len(dset_name) - errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) - -end subroutine h5immake_image_8bit_f - - - -!------------------------------------------------------------------------- -! Function: h5imread_image_f -! -! Purpose: Reads image data from disk. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - -subroutine h5imread_image_f(loc_id,& - dset_name,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imread_image_f -!DEC$endif -! - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(inout), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - interface - integer function h5imread_image_c(loc_id,namelen,dset_name,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMREAD_IMAGE_C'::h5imread_image_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(inout), dimension(*) :: buf ! buffer - end function h5imread_image_c - end interface - - namelen = len(dset_name) - errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) - -end subroutine h5imread_image_f - - -!------------------------------------------------------------------------- -! Function: h5immake_image_24bit_f -! -! Purpose: Creates and writes an image a 24 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_image_24bit_f(loc_id,& - dset_name,& - width,& - height,& - il,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_24bit_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - character(len=*), intent(in) :: il ! interlace - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_24BIT_C'::h5immake_image_24bit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: il - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - character(len=*), intent(in) :: il ! interlace - integer, intent(in), dimension(*) :: buf ! buffer - integer(size_t) :: namelen ! length of name buffer - integer(size_t) :: ilen ! name length - - end function h5immake_image_24bit_c - end interface - - namelen = len(dset_name) - ilen = len(il) - errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) - -end subroutine h5immake_image_24bit_f - - -!------------------------------------------------------------------------- -! Function: h5imget_image_info_f -! -! Purpose: Gets information about an image dataset (dimensions, interlace mode -! and number of associated palettes). -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_image_info_f(loc_id,& - dset_name,& - width,& - height,& - planes,& - interlace,& - npals,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_image_info_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: width ! width of image - integer(hsize_t), intent(inout) :: height ! height of image - integer(hsize_t), intent(inout) :: planes ! color planes - integer(hsize_t), intent(inout) :: npals ! palettes - character(len=*), intent(inout) :: interlace ! interlace - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_IMAGE_INFO_C'::h5imget_image_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: interlace - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: width ! width of image - integer(hsize_t), intent(inout) :: height ! height of image - integer(hsize_t), intent(inout) :: planes ! color planes - integer(hsize_t), intent(inout) :: npals ! palettes - character(len=*), intent(inout) :: interlace ! interlace - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imget_image_info_c - end interface - - namelen = len(dset_name) - ilen = len(interlace) - errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) - -end subroutine h5imget_image_info_f - - -!------------------------------------------------------------------------- -! Function: h5imis_image_f -! -! Purpose: Inquires if a dataset is an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -integer function h5imis_image_f(loc_id,& - dset_name) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_image_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imis_image_c(loc_id,namelen,dset_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_IMAGE_C'::h5imis_image_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - end function h5imis_image_c - end interface - - namelen = len(dset_name) - errcode = h5imis_image_c(loc_id,namelen,dset_name) - h5imis_image_f = errcode - -end function h5imis_image_f - - -!------------------------------------------------------------------------- -! Function: h5immake_palette_f -! -! Purpose: Creates and writes a palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_palette_f(loc_id,& - dset_name,& - pal_dims,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_PALETTE_C'::h5immake_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions - integer, intent(in), dimension(*) :: buf ! buffer - end function h5immake_palette_c - end interface - - namelen = len(dset_name) - errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) - -end subroutine h5immake_palette_f - - - -!------------------------------------------------------------------------- -! Function: h5imlink_palette_f -! -! Purpose: This function attaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imlink_palette_f -!DEC$endif -! - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMLINK_PALETTE_C'::h5imlink_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: pal_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imlink_palette_c - end interface - - namelen = len(dset_name) - ilen = len(pal_name) - errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - -end subroutine h5imlink_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imunlink_palette_f -! -! Purpose: This function dettaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imunlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imunlink_palette_f -!DEC$endif -! - - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMUNLINK_PALETTE_C'::h5imunlink_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: pal_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imunlink_palette_c - end interface - - namelen = len(dset_name) - ilen = len(pal_name) - errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - -end subroutine h5imunlink_palette_f - - - -!------------------------------------------------------------------------- -! Function: h5imget_npalettes_f -! -! Purpose: Gets the number of palettes associated to an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_npalettes_f(loc_id,& - dset_name,& - npals,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_npalettes_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: npals ! palettes - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_npalettes_c(loc_id,namelen,dset_name,npals) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_NPALETTES_C'::h5imget_npalettes_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: npals ! palettes - integer(size_t) :: namelen ! name length - end function h5imget_npalettes_c - end interface - - namelen = len(dset_name) - errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) - -end subroutine h5imget_npalettes_f - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_info_f -! -! Purpose: Get palette information -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_palette_info_f(loc_id,& - dset_name,& - pal_number,& - dims,& - errcode ) - - implicit none - - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_info_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_INFO_C'::h5imget_palette_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions - integer(size_t) :: namelen ! name length - end function h5imget_palette_info_c - end interface - - namelen = len(dset_name) - errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) - -end subroutine h5imget_palette_info_f - - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_f -! -! Purpose: Reads palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - -subroutine h5imget_palette_f(loc_id,& - dset_name,& - pal_number,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer, intent(inout), dimension(*) :: buf ! buffer - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_C'::h5imget_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer, intent(inout), dimension(*) :: buf ! buffer - end function h5imget_palette_c - end interface - - namelen = len(dset_name) - errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) - -end subroutine h5imget_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imis_palette_f -! -! Purpose: Inquires if a dataset is a palette -! -! Return: true, false, fail -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -integer function h5imis_palette_f(loc_id,& - dset_name) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imis_palette_c(loc_id,namelen,dset_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_PALETTE_C'::h5imis_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - end function h5imis_palette_c - end interface - - namelen = len(dset_name) - errcode = h5imis_palette_c(loc_id,namelen,dset_name) - h5imis_palette_f = errcode - -end function h5imis_palette_f - - -! end -! -end module H5IM - - - - - diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 532d9d8..353b17a 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -27,20 +27,6 @@ H5_FCDLL char* HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); -/* - * Functions from H5DSfc.c - */ - -#define nh5dsset_scale_c H5_FC_FUNC_(h5dsset_scale_c, H5DSSET_SCALE_C) -#define nh5dsattach_scale_c H5_FC_FUNC_(h5dsattach_scale_c, H5DSATTACH_SCALE_C) -#define nh5dsdetach_scale_c H5_FC_FUNC_(h5dsdetach_scale_c, H5DSDETACH_SCALE_C) -#define nh5dsis_attached_c H5_FC_FUNC_(h5dsis_attached_c, H5DSIS_ATTACHED_C) -#define nh5dsis_scale_c H5_FC_FUNC_(h5dsis_scale_c, H5DSIS_SCALE_C) -#define nh5dsset_label_c H5_FC_FUNC_(h5dsset_label_c, H5DSSET_LABEL_C) -#define nh5dsget_label_c H5_FC_FUNC_(h5dsget_label_c, H5DSGET_LABEL_C) -#define nh5dsget_scale_name_c H5_FC_FUNC_(h5dsget_scale_name_c,H5DSGET_SCALE_NAME_C) -#define nh5dsget_num_scales_c H5_FC_FUNC_(h5dsget_num_scales_c,H5DSGET_NUM_SCALES_C) - /* * Functions from H5LTfc.c @@ -152,22 +138,6 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); #define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C) #define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C) -/*------------------------------------------------------------------------- -* Image -*------------------------------------------------------------------------- -*/ -#define nh5immake_image_8bit_c H5_FC_FUNC_(h5immake_image_8bit_c, H5IMMAKE_IMAGE_8BIT_C) -#define nh5immake_image_24bit_c H5_FC_FUNC_(h5immake_image_24bit_c, H5IMMAKE_IMAGE_24BIT_C) -#define nh5imread_image_c H5_FC_FUNC_(h5imread_image_c, H5IMREAD_IMAGE_C) -#define nh5imget_image_info_c H5_FC_FUNC_(h5imget_image_info_c, H5IMGET_IMAGE_INFO_C) -#define nh5imis_image_c H5_FC_FUNC_(h5imis_image_c, H5IMIS_IMAGE_C) -#define nh5immake_palette_c H5_FC_FUNC_(h5immake_palette_c, H5IMMAKE_PALETTE_C) -#define nh5imlink_palette_c H5_FC_FUNC_(h5imlink_palette_c, H5IMLINK_PALETTE_C) -#define nh5imunlink_palette_c H5_FC_FUNC_(h5imunlink_palette_c, H5IMUNLINK_PALETTE_C) -#define nh5imget_npalettes_c H5_FC_FUNC_(h5imget_npalettes_c, H5IMGET_NPALETTES_C) -#define nh5imget_palette_info_c H5_FC_FUNC_(h5imget_palette_info_c, H5IMGET_PALETTE_INFO_C) -#define nh5imget_palette_c H5_FC_FUNC_(h5imget_palette_c, H5IMGET_PALETTE_C) -#define nh5imis_palette_c H5_FC_FUNC_(h5imis_palette_c, H5IMIS_PALETTE_C) /*------------------------------------------------------------------------- * Table @@ -203,41 +173,44 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); #define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C) #define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C) +/* + * Functions from H5DSfc.c + */ HDF5_HL_F90CSTUBDLL int_f -nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); +h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); HDF5_HL_F90CSTUBDLL int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); +h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); +h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); +h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); HDF5_HL_F90CSTUBDLL int_f -nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); +h5dsis_scale_c(hid_t_f *did, int_f *is_scale); HDF5_HL_F90CSTUBDLL int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); +h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); HDF5_HL_F90CSTUBDLL int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); +h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f -nh5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); +h5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f -nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); +h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); HDF5_HL_F90CSTUBDLL @@ -1206,10 +1179,9 @@ nh5ltpath_valid_c(hid_t_f *loc_id, * Image *------------------------------------------------------------------------- */ - HDF5_HL_F90CSTUBDLL int_f -nh5immake_image_8bit_c (hid_t_f *loc_id, +h5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -1217,14 +1189,14 @@ nh5immake_image_8bit_c (hid_t_f *loc_id, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -nh5imread_image_c (hid_t_f *loc_id, +h5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -nh5immake_image_24bit_c (hid_t_f *loc_id, +h5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1234,7 +1206,7 @@ nh5immake_image_24bit_c (hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5imget_image_info_c(hid_t_f *loc_id, +h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -1247,14 +1219,14 @@ nh5imget_image_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imis_image_c(hid_t_f *loc_id, +h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -nh5immake_palette_c (hid_t_f *loc_id, +h5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1262,7 +1234,7 @@ nh5immake_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imlink_palette_c (hid_t_f *loc_id, +h5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1270,7 +1242,7 @@ nh5imlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imunlink_palette_c (hid_t_f *loc_id, +h5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1278,7 +1250,7 @@ nh5imunlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_npalettes_c(hid_t_f *loc_id, +h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals); @@ -1286,7 +1258,7 @@ nh5imget_npalettes_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_palette_info_c(hid_t_f *loc_id, +h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -1294,7 +1266,7 @@ nh5imget_palette_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_palette_c(hid_t_f *loc_id, +h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -1302,7 +1274,7 @@ nh5imget_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imis_palette_c(hid_t_f *loc_id, +h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 new file mode 100644 index 0000000..9393f7f --- /dev/null +++ b/hl/fortran/src/H5LTff.F90 @@ -0,0 +1,6490 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5LT functions +! + +MODULE h5lt + USE h5fortran_types + USE hdf5 + + INTERFACE h5ltmake_dataset_f + MODULE PROCEDURE h5ltmake_dataset_f_int1 + MODULE PROCEDURE h5ltmake_dataset_f_int2 + MODULE PROCEDURE h5ltmake_dataset_f_int3 + MODULE PROCEDURE h5ltmake_dataset_f_int4 + MODULE PROCEDURE h5ltmake_dataset_f_int5 + MODULE PROCEDURE h5ltmake_dataset_f_int6 + MODULE PROCEDURE h5ltmake_dataset_f_int7 + MODULE PROCEDURE h5ltmake_dataset_f_float1 + MODULE PROCEDURE h5ltmake_dataset_f_float2 + MODULE PROCEDURE h5ltmake_dataset_f_float3 + MODULE PROCEDURE h5ltmake_dataset_f_float4 + MODULE PROCEDURE h5ltmake_dataset_f_float5 + MODULE PROCEDURE h5ltmake_dataset_f_float6 + MODULE PROCEDURE h5ltmake_dataset_f_float7 + MODULE PROCEDURE h5ltmake_dataset_f_double1 + MODULE PROCEDURE h5ltmake_dataset_f_double2 + MODULE PROCEDURE h5ltmake_dataset_f_double3 + MODULE PROCEDURE h5ltmake_dataset_f_double4 + MODULE PROCEDURE h5ltmake_dataset_f_double5 + MODULE PROCEDURE h5ltmake_dataset_f_double6 + MODULE PROCEDURE h5ltmake_dataset_f_double7 + END INTERFACE + + INTERFACE h5ltread_dataset_f + MODULE PROCEDURE h5ltread_dataset_f_int1 + MODULE PROCEDURE h5ltread_dataset_f_int2 + MODULE PROCEDURE h5ltread_dataset_f_int3 + MODULE PROCEDURE h5ltread_dataset_f_int4 + MODULE PROCEDURE h5ltread_dataset_f_int5 + MODULE PROCEDURE h5ltread_dataset_f_int6 + MODULE PROCEDURE h5ltread_dataset_f_int7 + MODULE PROCEDURE h5ltread_dataset_f_float1 + MODULE PROCEDURE h5ltread_dataset_f_float2 + MODULE PROCEDURE h5ltread_dataset_f_float3 + MODULE PROCEDURE h5ltread_dataset_f_float4 + MODULE PROCEDURE h5ltread_dataset_f_float5 + MODULE PROCEDURE h5ltread_dataset_f_float6 + MODULE PROCEDURE h5ltread_dataset_f_float7 + MODULE PROCEDURE h5ltread_dataset_f_double1 + MODULE PROCEDURE h5ltread_dataset_f_double2 + MODULE PROCEDURE h5ltread_dataset_f_double3 + MODULE PROCEDURE h5ltread_dataset_f_double4 + MODULE PROCEDURE h5ltread_dataset_f_double5 + MODULE PROCEDURE h5ltread_dataset_f_double6 + MODULE PROCEDURE h5ltread_dataset_f_double7 + END INTERFACE + + INTERFACE h5ltmake_dataset_int_f + MODULE PROCEDURE h5ltmake_dataset_int_f_1 + MODULE PROCEDURE h5ltmake_dataset_int_f_2 + MODULE PROCEDURE h5ltmake_dataset_int_f_3 + MODULE PROCEDURE h5ltmake_dataset_int_f_4 + MODULE PROCEDURE h5ltmake_dataset_int_f_5 + MODULE PROCEDURE h5ltmake_dataset_int_f_6 + MODULE PROCEDURE h5ltmake_dataset_int_f_7 + END INTERFACE + + INTERFACE h5ltmake_dataset_float_f + MODULE PROCEDURE h5ltmake_dataset_float_f_1 + MODULE PROCEDURE h5ltmake_dataset_float_f_2 + MODULE PROCEDURE h5ltmake_dataset_float_f_3 + MODULE PROCEDURE h5ltmake_dataset_float_f_4 + MODULE PROCEDURE h5ltmake_dataset_float_f_5 + MODULE PROCEDURE h5ltmake_dataset_float_f_6 + MODULE PROCEDURE h5ltmake_dataset_float_f_7 + END INTERFACE + + INTERFACE h5ltmake_dataset_double_f + MODULE PROCEDURE h5ltmake_dataset_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_double_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_int_f + MODULE PROCEDURE h5ltread_dataset_int_f_1 + MODULE PROCEDURE h5ltread_dataset_int_f_2 + MODULE PROCEDURE h5ltread_dataset_int_f_3 + MODULE PROCEDURE h5ltread_dataset_int_f_4 + MODULE PROCEDURE h5ltread_dataset_int_f_5 + MODULE PROCEDURE h5ltread_dataset_int_f_6 + MODULE PROCEDURE h5ltread_dataset_int_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_float_f + MODULE PROCEDURE h5ltread_dataset_float_f_1 + MODULE PROCEDURE h5ltread_dataset_float_f_2 + MODULE PROCEDURE h5ltread_dataset_float_f_3 + MODULE PROCEDURE h5ltread_dataset_float_f_4 + MODULE PROCEDURE h5ltread_dataset_float_f_5 + MODULE PROCEDURE h5ltread_dataset_float_f_6 + MODULE PROCEDURE h5ltread_dataset_float_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_double_f + MODULE PROCEDURE h5ltread_dataset_double_f_1 + MODULE PROCEDURE h5ltread_dataset_double_f_2 + MODULE PROCEDURE h5ltread_dataset_double_f_3 + MODULE PROCEDURE h5ltread_dataset_double_f_4 + MODULE PROCEDURE h5ltread_dataset_double_f_5 + MODULE PROCEDURE h5ltread_dataset_double_f_6 + MODULE PROCEDURE h5ltread_dataset_double_f_7 + END INTERFACE + +CONTAINS + !------------------------------------------------------------------------- + ! Make/Read dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT1_C'::h5ltmake_dataset_int1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT2_C'::h5ltmake_dataset_int2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT3_C'::h5ltmake_dataset_int3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT4_C'::h5ltmake_dataset_int4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT5_C'::h5ltmake_dataset_int5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT6_C'::h5ltmake_dataset_int6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT7_C'::h5ltmake_dataset_int7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL1_C'::h5ltmake_dataset_fl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL2_C'::h5ltmake_dataset_fl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float4(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL4_C'::h5ltmake_dataset_fl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float5(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL5_C'::h5ltmake_dataset_fl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float6(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL6_C'::h5ltmake_dataset_fl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float7(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL7_C'::h5ltmake_dataset_fl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL2_C'::h5ltmake_dataset_dl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL3_C'::h5ltmake_dataset_dl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL4_C'::h5ltmake_dataset_dl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL5_C'::h5ltmake_dataset_dl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL6_C'::h5ltmake_dataset_dl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL7_C'::h5ltmake_dataset_dl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT1_C'::h5ltread_dataset_int1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf + INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT2_C'::h5ltread_dataset_int2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT3_C'::h5ltread_dataset_int3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT4_C'::h5ltread_dataset_int4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT5_C'::h5ltread_dataset_int5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT6_C'::h5ltread_dataset_int6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT7_C'::h5ltread_dataset_int7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL1_C'::h5ltread_dataset_fl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float2 + !DEC$endif + ! + + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL2_C'::h5ltread_dataset_fl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL3_C'::h5ltread_dataset_fl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL4_C'::h5ltread_dataset_fl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL5_C'::h5ltread_dataset_fl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL6_C'::h5ltread_dataset_fl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL7_C'::h5ltread_dataset_fl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport ::h5ltread_dataset_f_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL1_C'::h5ltread_dataset_dl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL2_C'::h5ltread_dataset_dl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL3_C'::h5ltread_dataset_dl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL4_C'::h5ltread_dataset_dl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL5_C'::h5ltread_dataset_dl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL6_C'::h5ltread_dataset_dl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL7_C'::h5ltread_dataset_dl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT1_C'::h5ltmake_dataset_nint1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT2_C'::h5ltmake_dataset_nint2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_2 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT3_C'::h5ltmake_dataset_nint3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT4_C'::h5ltmake_dataset_nint4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT5_C'::h5ltmake_dataset_nint5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT6_C'::h5ltmake_dataset_nint6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT7_C'::h5ltmake_dataset_nint7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL2_C'::h5ltmake_dataset_nfl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL3_C'::h5ltmake_dataset_nfl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_4 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL4_C'::h5ltmake_dataset_nfl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_5 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL5_C'::h5ltmake_dataset_nfl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_6 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL6_C'::h5ltmake_dataset_nfl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_7 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL7_C'::h5ltmake_dataset_nfl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL1_C'::h5ltmake_dataset_ndl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL2_C'::h5ltmake_dataset_ndl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL3_C'::h5ltmake_dataset_ndl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_4 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL4_C'::h5ltmake_dataset_ndl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_5 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL5_C'::h5ltmake_dataset_ndl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_6 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL6_C'::h5ltmake_dataset_ndl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_7 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL7_C'::h5ltmake_dataset_ndl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 + !DEC$endif + ! + + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT1_C'::h5ltread_dataset_nint1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT2_C'::h5ltread_dataset_nint2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT3_C'::h5ltread_dataset_nint3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT4_C'::h5ltread_dataset_nint4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT5_C'::h5ltread_dataset_nint5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT6_C'::h5ltread_dataset_nint6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT7_C'::h5ltread_dataset_nint7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL1_C'::h5ltread_dataset_nfl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL2_C'::h5ltread_dataset_nfl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL3_C'::h5ltread_dataset_nfl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL4_C'::h5ltread_dataset_nfl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL5_C'::h5ltread_dataset_nfl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL6_C'::h5ltread_dataset_nfl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL7_C'::h5ltread_dataset_nfl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL1_C'::h5ltread_dataset_ndl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL2_C'::h5ltread_dataset_ndl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL3_C'::h5ltread_dataset_ndl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL4_C'::h5ltread_dataset_ndl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL5_C'::h5ltread_dataset_ndl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL6_C'::h5ltread_dataset_ndl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL7_C'::h5ltread_dataset_ndl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_string_f + ! + ! Purpose: Creates and writes a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_string_f + !DEC$endif + ! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: buflen ! buffer length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_STRING_C'::h5ltmake_dataset_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: buflen ! length of data buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + buflen = LEN(buf) + errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) + + END SUBROUTINE h5ltmake_dataset_string_f + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_string_f + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_STRING_C'::h5ltread_dataset_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + END FUNCTION h5ltread_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) + + END SUBROUTINE h5ltread_dataset_string_f + + + + + !------------------------------------------------------------------------- + ! Make/Read attribute functions + !------------------------------------------------------------------------- + + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_int_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_int_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_INT_C'::h5ltset_attribute_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_int_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_int_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_float_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_float_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_FLOAT_C'::h5ltset_attribute_float_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_float_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_double_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_double_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_DOUBLE_C'::h5ltset_attribute_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_double_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_double_f + + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_string_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buflen ! data buffer length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_STRING_C'::h5ltset_attribute_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + INTEGER(size_t) :: buflen ! data buffer length + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + END FUNCTION h5ltset_attribute_string_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buflen = LEN(buf) + errcode = h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) + + END SUBROUTINE h5ltset_attribute_string_f + + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_int_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_int_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INT_C'::h5ltget_attribute_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_int_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_int_f + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_float_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_float_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_FLOAT_C'::h5ltget_attribute_float_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_float_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_double_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_double_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + DOUBLE PRECISION,INTENT(inout),DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_DOUBLE_C'::h5ltget_attribute_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_double_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_double_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_string_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buf_size ! buf size + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_STRING_C'::h5ltget_attribute_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER(size_t) :: buf_size ! data buffer size + END FUNCTION h5ltget_attribute_string_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buf_size = LEN(buf) + + errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + + END SUBROUTINE h5ltget_attribute_string_f + + !------------------------------------------------------------------------- + ! Query dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_ndims_f + ! + ! Purpose: Gets the dimensionality of a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& + dset_name,& + rank,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_dataset_ndims_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_NDIMS_C'::h5ltget_dataset_ndims_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_dataset_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) + + END SUBROUTINE h5ltget_dataset_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltfind_dataset_f + ! + ! Purpose: Inquires if a dataset named dset_name exists attached + ! to the object loc_id. + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& + dset_name) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltfind_dataset_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTFIND_DATASET_C'::h5ltfind_dataset_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5ltfind_dataset_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) + h5ltfind_dataset_f = errcode + + END FUNCTION h5ltfind_dataset_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_info_f + ! + ! Purpose: Gets information about a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_info_f(loc_id,& + dset_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_dataset_info_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_INFO_C'::h5ltget_dataset_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_dataset_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_dataset_info_f + + + !------------------------------------------------------------------------- + ! Query attribute functions + !------------------------------------------------------------------------- + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_ndims_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& + dset_name,& + attr_name,& + rank,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_ndims_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_NDIMS_C'::h5ltget_attribute_ndims_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_attribute_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + + END SUBROUTINE h5ltget_attribute_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_info_f + ! + ! Purpose: Gets information about an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_info_f(loc_id,& + dset_name,& + attr_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_info_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INFO_C'::h5ltget_attribute_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_attribute_info_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_attribute_info_f + + !------------------------------------------------------------------------- + ! Function: h5ltpath_valid_f + ! + ! Purpose: Validates a path + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: February 18, 2012 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) + + IMPLICIT NONE + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltpath_valid_f + !DEC$endif + ! + INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. + CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. + LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component + ! of the path resolves to a valid object + LOGICAL , INTENT(OUT) :: path_valid ! Object status + INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure + + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + INTEGER :: status + + INTERFACE + INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTPATH_VALID_C'::h5ltpath_valid_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: path + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: path + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + END FUNCTION h5ltpath_valid_c + END INTERFACE + + ! Initialize + path_valid = .FALSE. + errcode = 0 + + check_object_valid_c = 0 + IF(check_object_valid) check_object_valid_c = 1 + + pathlen = LEN(path) + status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) + + IF(status.EQ.1)THEN + path_valid = .TRUE. + ELSE IF(status.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE h5ltpath_valid_f + ! end + ! +END MODULE H5LT + + + + + + diff --git a/hl/fortran/src/H5LTff.f90 b/hl/fortran/src/H5LTff.f90 deleted file mode 100644 index 9393f7f..0000000 --- a/hl/fortran/src/H5LTff.f90 +++ /dev/null @@ -1,6490 +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 file contains FORTRAN90 interfaces for H5LT functions -! - -MODULE h5lt - USE h5fortran_types - USE hdf5 - - INTERFACE h5ltmake_dataset_f - MODULE PROCEDURE h5ltmake_dataset_f_int1 - MODULE PROCEDURE h5ltmake_dataset_f_int2 - MODULE PROCEDURE h5ltmake_dataset_f_int3 - MODULE PROCEDURE h5ltmake_dataset_f_int4 - MODULE PROCEDURE h5ltmake_dataset_f_int5 - MODULE PROCEDURE h5ltmake_dataset_f_int6 - MODULE PROCEDURE h5ltmake_dataset_f_int7 - MODULE PROCEDURE h5ltmake_dataset_f_float1 - MODULE PROCEDURE h5ltmake_dataset_f_float2 - MODULE PROCEDURE h5ltmake_dataset_f_float3 - MODULE PROCEDURE h5ltmake_dataset_f_float4 - MODULE PROCEDURE h5ltmake_dataset_f_float5 - MODULE PROCEDURE h5ltmake_dataset_f_float6 - MODULE PROCEDURE h5ltmake_dataset_f_float7 - MODULE PROCEDURE h5ltmake_dataset_f_double1 - MODULE PROCEDURE h5ltmake_dataset_f_double2 - MODULE PROCEDURE h5ltmake_dataset_f_double3 - MODULE PROCEDURE h5ltmake_dataset_f_double4 - MODULE PROCEDURE h5ltmake_dataset_f_double5 - MODULE PROCEDURE h5ltmake_dataset_f_double6 - MODULE PROCEDURE h5ltmake_dataset_f_double7 - END INTERFACE - - INTERFACE h5ltread_dataset_f - MODULE PROCEDURE h5ltread_dataset_f_int1 - MODULE PROCEDURE h5ltread_dataset_f_int2 - MODULE PROCEDURE h5ltread_dataset_f_int3 - MODULE PROCEDURE h5ltread_dataset_f_int4 - MODULE PROCEDURE h5ltread_dataset_f_int5 - MODULE PROCEDURE h5ltread_dataset_f_int6 - MODULE PROCEDURE h5ltread_dataset_f_int7 - MODULE PROCEDURE h5ltread_dataset_f_float1 - MODULE PROCEDURE h5ltread_dataset_f_float2 - MODULE PROCEDURE h5ltread_dataset_f_float3 - MODULE PROCEDURE h5ltread_dataset_f_float4 - MODULE PROCEDURE h5ltread_dataset_f_float5 - MODULE PROCEDURE h5ltread_dataset_f_float6 - MODULE PROCEDURE h5ltread_dataset_f_float7 - MODULE PROCEDURE h5ltread_dataset_f_double1 - MODULE PROCEDURE h5ltread_dataset_f_double2 - MODULE PROCEDURE h5ltread_dataset_f_double3 - MODULE PROCEDURE h5ltread_dataset_f_double4 - MODULE PROCEDURE h5ltread_dataset_f_double5 - MODULE PROCEDURE h5ltread_dataset_f_double6 - MODULE PROCEDURE h5ltread_dataset_f_double7 - END INTERFACE - - INTERFACE h5ltmake_dataset_int_f - MODULE PROCEDURE h5ltmake_dataset_int_f_1 - MODULE PROCEDURE h5ltmake_dataset_int_f_2 - MODULE PROCEDURE h5ltmake_dataset_int_f_3 - MODULE PROCEDURE h5ltmake_dataset_int_f_4 - MODULE PROCEDURE h5ltmake_dataset_int_f_5 - MODULE PROCEDURE h5ltmake_dataset_int_f_6 - MODULE PROCEDURE h5ltmake_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltmake_dataset_float_f - MODULE PROCEDURE h5ltmake_dataset_float_f_1 - MODULE PROCEDURE h5ltmake_dataset_float_f_2 - MODULE PROCEDURE h5ltmake_dataset_float_f_3 - MODULE PROCEDURE h5ltmake_dataset_float_f_4 - MODULE PROCEDURE h5ltmake_dataset_float_f_5 - MODULE PROCEDURE h5ltmake_dataset_float_f_6 - MODULE PROCEDURE h5ltmake_dataset_float_f_7 - END INTERFACE - - INTERFACE h5ltmake_dataset_double_f - MODULE PROCEDURE h5ltmake_dataset_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_double_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_int_f - MODULE PROCEDURE h5ltread_dataset_int_f_1 - MODULE PROCEDURE h5ltread_dataset_int_f_2 - MODULE PROCEDURE h5ltread_dataset_int_f_3 - MODULE PROCEDURE h5ltread_dataset_int_f_4 - MODULE PROCEDURE h5ltread_dataset_int_f_5 - MODULE PROCEDURE h5ltread_dataset_int_f_6 - MODULE PROCEDURE h5ltread_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_float_f - MODULE PROCEDURE h5ltread_dataset_float_f_1 - MODULE PROCEDURE h5ltread_dataset_float_f_2 - MODULE PROCEDURE h5ltread_dataset_float_f_3 - MODULE PROCEDURE h5ltread_dataset_float_f_4 - MODULE PROCEDURE h5ltread_dataset_float_f_5 - MODULE PROCEDURE h5ltread_dataset_float_f_6 - MODULE PROCEDURE h5ltread_dataset_float_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_double_f - MODULE PROCEDURE h5ltread_dataset_double_f_1 - MODULE PROCEDURE h5ltread_dataset_double_f_2 - MODULE PROCEDURE h5ltread_dataset_double_f_3 - MODULE PROCEDURE h5ltread_dataset_double_f_4 - MODULE PROCEDURE h5ltread_dataset_double_f_5 - MODULE PROCEDURE h5ltread_dataset_double_f_6 - MODULE PROCEDURE h5ltread_dataset_double_f_7 - END INTERFACE - -CONTAINS - !------------------------------------------------------------------------- - ! Make/Read dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT1_C'::h5ltmake_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT2_C'::h5ltmake_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT3_C'::h5ltmake_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT4_C'::h5ltmake_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT5_C'::h5ltmake_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT6_C'::h5ltmake_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT7_C'::h5ltmake_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL1_C'::h5ltmake_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL2_C'::h5ltmake_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float4(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL4_C'::h5ltmake_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float5(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL5_C'::h5ltmake_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float6(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL6_C'::h5ltmake_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float7(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL7_C'::h5ltmake_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL2_C'::h5ltmake_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL3_C'::h5ltmake_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL4_C'::h5ltmake_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL5_C'::h5ltmake_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL6_C'::h5ltmake_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL7_C'::h5ltmake_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT1_C'::h5ltread_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT2_C'::h5ltread_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT3_C'::h5ltread_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT4_C'::h5ltread_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT5_C'::h5ltread_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT6_C'::h5ltread_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT7_C'::h5ltread_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL1_C'::h5ltread_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float2 - !DEC$endif - ! - - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL2_C'::h5ltread_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL3_C'::h5ltread_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL4_C'::h5ltread_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL5_C'::h5ltread_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL6_C'::h5ltread_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL7_C'::h5ltread_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_double1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL1_C'::h5ltread_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL2_C'::h5ltread_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL3_C'::h5ltread_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL4_C'::h5ltread_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL5_C'::h5ltread_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL6_C'::h5ltread_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL7_C'::h5ltread_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT1_C'::h5ltmake_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT2_C'::h5ltmake_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_2 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT3_C'::h5ltmake_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT4_C'::h5ltmake_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT5_C'::h5ltmake_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT6_C'::h5ltmake_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT7_C'::h5ltmake_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL2_C'::h5ltmake_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL3_C'::h5ltmake_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_4 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL4_C'::h5ltmake_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_5 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL5_C'::h5ltmake_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_6 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL6_C'::h5ltmake_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_7 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL7_C'::h5ltmake_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL1_C'::h5ltmake_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL2_C'::h5ltmake_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL3_C'::h5ltmake_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_4 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL4_C'::h5ltmake_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_5 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL5_C'::h5ltmake_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_6 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL6_C'::h5ltmake_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_7 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL7_C'::h5ltmake_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 - !DEC$endif - ! - - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT1_C'::h5ltread_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT2_C'::h5ltread_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT3_C'::h5ltread_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT4_C'::h5ltread_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT5_C'::h5ltread_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT6_C'::h5ltread_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT7_C'::h5ltread_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL1_C'::h5ltread_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL2_C'::h5ltread_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL3_C'::h5ltread_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL4_C'::h5ltread_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL5_C'::h5ltread_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL6_C'::h5ltread_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL7_C'::h5ltread_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL1_C'::h5ltread_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL2_C'::h5ltread_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL3_C'::h5ltread_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL4_C'::h5ltread_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL5_C'::h5ltread_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL6_C'::h5ltread_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL7_C'::h5ltread_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_string_f - ! - ! Purpose: Creates and writes a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_string_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: buflen ! buffer length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_STRING_C'::h5ltmake_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - buflen = LEN(buf) - errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - - END SUBROUTINE h5ltmake_dataset_string_f - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_string_f - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_STRING_C'::h5ltread_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - END FUNCTION h5ltread_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - - END SUBROUTINE h5ltread_dataset_string_f - - - - - !------------------------------------------------------------------------- - ! Make/Read attribute functions - !------------------------------------------------------------------------- - - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_int_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_int_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_INT_C'::h5ltset_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_int_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_int_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_float_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_float_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_FLOAT_C'::h5ltset_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_float_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_double_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_double_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_DOUBLE_C'::h5ltset_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_double_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_double_f - - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_string_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buflen ! data buffer length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_STRING_C'::h5ltset_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - INTEGER(size_t) :: buflen ! data buffer length - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltset_attribute_string_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buflen = LEN(buf) - errcode = h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) - - END SUBROUTINE h5ltset_attribute_string_f - - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_int_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_int_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INT_C'::h5ltget_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_int_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_int_f - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_float_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_float_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_FLOAT_C'::h5ltget_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_float_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_double_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_double_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - DOUBLE PRECISION,INTENT(inout),DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_DOUBLE_C'::h5ltget_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_double_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_double_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_string_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buf_size ! buf size - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_STRING_C'::h5ltget_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: buf_size ! data buffer size - END FUNCTION h5ltget_attribute_string_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buf_size = LEN(buf) - - errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - - END SUBROUTINE h5ltget_attribute_string_f - - !------------------------------------------------------------------------- - ! Query dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_ndims_f - ! - ! Purpose: Gets the dimensionality of a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& - dset_name,& - rank,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_ndims_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_NDIMS_C'::h5ltget_dataset_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_dataset_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - - END SUBROUTINE h5ltget_dataset_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltfind_dataset_f - ! - ! Purpose: Inquires if a dataset named dset_name exists attached - ! to the object loc_id. - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& - dset_name) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltfind_dataset_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTFIND_DATASET_C'::h5ltfind_dataset_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - END FUNCTION h5ltfind_dataset_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) - h5ltfind_dataset_f = errcode - - END FUNCTION h5ltfind_dataset_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_info_f - ! - ! Purpose: Gets information about a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_info_f(loc_id,& - dset_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_info_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_INFO_C'::h5ltget_dataset_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_dataset_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_dataset_info_f - - - !------------------------------------------------------------------------- - ! Query attribute functions - !------------------------------------------------------------------------- - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_ndims_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& - dset_name,& - attr_name,& - rank,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_ndims_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_NDIMS_C'::h5ltget_attribute_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_attribute_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - - END SUBROUTINE h5ltget_attribute_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_info_f - ! - ! Purpose: Gets information about an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_info_f(loc_id,& - dset_name,& - attr_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_info_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INFO_C'::h5ltget_attribute_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_attribute_info_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_attribute_info_f - - !------------------------------------------------------------------------- - ! Function: h5ltpath_valid_f - ! - ! Purpose: Validates a path - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: February 18, 2012 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) - - IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltpath_valid_f - !DEC$endif - ! - INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. - CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. - LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component - ! of the path resolves to a valid object - LOGICAL , INTENT(OUT) :: path_valid ! Object status - INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure - - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - INTEGER :: status - - INTERFACE - INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTPATH_VALID_C'::h5ltpath_valid_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: path - INTEGER(hid_t), INTENT(in) :: loc_id - CHARACTER(len=*), INTENT(in) :: path - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - END FUNCTION h5ltpath_valid_c - END INTERFACE - - ! Initialize - path_valid = .FALSE. - errcode = 0 - - check_object_valid_c = 0 - IF(check_object_valid) check_object_valid_c = 1 - - pathlen = LEN(path) - status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - - IF(status.EQ.1)THEN - path_valid = .TRUE. - ELSE IF(status.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE h5ltpath_valid_f - ! end - ! -END MODULE H5LT - - - - - - diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 new file mode 100644 index 0000000..5846f49 --- /dev/null +++ b/hl/fortran/src/H5TBff.F90 @@ -0,0 +1,1900 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5TB functions +! + +MODULE h5tb +USE h5fortran_types +USE hdf5 + + +INTERFACE h5tbwrite_field_name_f + MODULE PROCEDURE h5tbwrite_field_name_f_int + MODULE PROCEDURE h5tbwrite_field_name_f_float + MODULE PROCEDURE h5tbwrite_field_name_f_double + MODULE PROCEDURE h5tbwrite_field_name_f_string +END INTERFACE + +INTERFACE h5tbread_field_name_f + MODULE PROCEDURE h5tbread_field_name_f_int + MODULE PROCEDURE h5tbread_field_name_f_float + MODULE PROCEDURE h5tbread_field_name_f_double + MODULE PROCEDURE h5tbread_field_name_f_string +END INTERFACE + +INTERFACE h5tbwrite_field_index_f + MODULE PROCEDURE h5tbwrite_field_index_f_int + MODULE PROCEDURE h5tbwrite_field_index_f_float + MODULE PROCEDURE h5tbwrite_field_index_f_double + MODULE PROCEDURE h5tbwrite_field_index_f_string +END INTERFACE + +INTERFACE h5tbread_field_index_f + MODULE PROCEDURE h5tbread_field_index_f_int + MODULE PROCEDURE h5tbread_field_index_f_float + MODULE PROCEDURE h5tbread_field_index_f_double + MODULE PROCEDURE h5tbread_field_index_f_string +END INTERFACE + + +INTERFACE h5tbinsert_field_f + MODULE PROCEDURE h5tbinsert_field_f_int + MODULE PROCEDURE h5tbinsert_field_f_float + MODULE PROCEDURE h5tbinsert_field_f_double + MODULE PROCEDURE h5tbinsert_field_f_string +END INTERFACE + + +CONTAINS + + +!------------------------------------------------------------------------- +! Function: h5tbmake_table_f +! +! Purpose: Make a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbmake_table_f(table_title,& + loc_id,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + IMPLICIT NONE +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbmake_table_f +!DEC$endif +! + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + INTEGER(hsize_t) :: i ! general purpose integer + + + INTERFACE + INTEGER FUNCTION h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names,& + max_char_size_field_names,& + field_names) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBMAKE_TABLE_C'::h5tbmake_table_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: table_title + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + END FUNCTION h5tbmake_table_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(table_title) + + ! Find the size of each character string in the array + DO i = 1, nfields + char_len_field_names(i) = LEN_TRIM(field_names(i)) + END DO + + max_char_size_field_names = LEN(field_names(1)) + + errcode = h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names, & + max_char_size_field_names, & + field_names) + +END SUBROUTINE h5tbmake_table_f + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_INT_C'::h5tbwrite_field_name_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_int + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_float +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_FL_C'::h5tbwrite_field_name_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_double +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_DL_C'::h5tbwrite_field_name_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_double + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_string +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_ST_C'::h5tbwrite_field_name_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_INT_C'::h5tbread_field_name_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_int + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_float +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_FL_C'::h5tbread_field_name_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_float + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_double +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_DL_C'::h5tbread_field_name_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_double + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_string +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_ST_C'::h5tbread_field_name_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_INT_C'::h5tbwrite_field_index_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_int + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_float +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_FL_C'::h5tbwrite_field_index_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_double +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_DL_C'::h5tbwrite_field_index_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_double + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_string +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_ST_C'::h5tbwrite_field_index_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport ::h5tbread_field_index_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_INT_C'::h5tbread_field_index_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_int + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_float +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_FL_C'::h5tbread_field_index_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_float + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_double +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_DL_C'::h5tbread_field_index_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_double + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_string +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_ST_C'::h5tbread_field_index_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_int +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_int(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_INT_C'::h5tbinsert_field_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_int + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_float +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_float(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_FL_C'::h5tbinsert_field_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_double +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_double(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_DL_C'::h5tbinsert_field_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_double + + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_string +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_string(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_ST_C'::h5tbinsert_field_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_string + + + + +!------------------------------------------------------------------------- +! Function: h5tbdelete_field_f +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbdelete_field_f(loc_id,& + dset_name,& + field_name,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbdelete_field_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBDELETE_FIELD_C'::h5tbdelete_field_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbdelete_field_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + +END SUBROUTINE h5tbdelete_field_f + + + +!------------------------------------------------------------------------- +! Function: h5tbget_table_info_f +! +! Purpose: Gets the number of records and fields of a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbget_table_info_f(loc_id,& + dset_name,& + nfields,& + nrecords,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbget_table_info_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_TABLE_INFO_C'::h5tbget_table_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbget_table_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + +END SUBROUTINE h5tbget_table_info_f + + +!------------------------------------------------------------------------- +! Function: h5tbget_field_info_f +! +! Purpose: Get information about fields +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! Added optional parameter for returning the maximum character length +! in the field name array. March 3, 2011 +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbget_field_info_f(loc_id,& + dset_name,& + nfields,& + field_names,& + field_sizes,& + field_offsets,& + type_size,& + errcode, maxlen_out ) + + IMPLICIT NONE +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbget_field_info_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER :: errcode ! error code + INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths + INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(size_t) :: maxlen + INTEGER(size_t) :: c_maxlen_out + + INTERFACE + INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& + field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_FIELD_INFO_C'::h5tbget_field_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in):: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: maxlen ! maxiumum length of input field names + INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths + INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element + END FUNCTION h5tbget_field_info_c + END INTERFACE + + namelen = LEN(dset_name) + DO i = 1, nfields + namelen2(i) = LEN_TRIM(field_names(i)) + END DO + maxlen = LEN(field_names(1)) + c_maxlen_out = 0 + + errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & + field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) + + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + +END SUBROUTINE h5tbget_field_info_f + +END MODULE H5TB + + + + + + diff --git a/hl/fortran/src/H5TBff.f90 b/hl/fortran/src/H5TBff.f90 deleted file mode 100644 index 5846f49..0000000 --- a/hl/fortran/src/H5TBff.f90 +++ /dev/null @@ -1,1900 +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 file contains FORTRAN90 interfaces for H5TB functions -! - -MODULE h5tb -USE h5fortran_types -USE hdf5 - - -INTERFACE h5tbwrite_field_name_f - MODULE PROCEDURE h5tbwrite_field_name_f_int - MODULE PROCEDURE h5tbwrite_field_name_f_float - MODULE PROCEDURE h5tbwrite_field_name_f_double - MODULE PROCEDURE h5tbwrite_field_name_f_string -END INTERFACE - -INTERFACE h5tbread_field_name_f - MODULE PROCEDURE h5tbread_field_name_f_int - MODULE PROCEDURE h5tbread_field_name_f_float - MODULE PROCEDURE h5tbread_field_name_f_double - MODULE PROCEDURE h5tbread_field_name_f_string -END INTERFACE - -INTERFACE h5tbwrite_field_index_f - MODULE PROCEDURE h5tbwrite_field_index_f_int - MODULE PROCEDURE h5tbwrite_field_index_f_float - MODULE PROCEDURE h5tbwrite_field_index_f_double - MODULE PROCEDURE h5tbwrite_field_index_f_string -END INTERFACE - -INTERFACE h5tbread_field_index_f - MODULE PROCEDURE h5tbread_field_index_f_int - MODULE PROCEDURE h5tbread_field_index_f_float - MODULE PROCEDURE h5tbread_field_index_f_double - MODULE PROCEDURE h5tbread_field_index_f_string -END INTERFACE - - -INTERFACE h5tbinsert_field_f - MODULE PROCEDURE h5tbinsert_field_f_int - MODULE PROCEDURE h5tbinsert_field_f_float - MODULE PROCEDURE h5tbinsert_field_f_double - MODULE PROCEDURE h5tbinsert_field_f_string -END INTERFACE - - -CONTAINS - - -!------------------------------------------------------------------------- -! Function: h5tbmake_table_f -! -! Purpose: Make a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbmake_table_f(table_title,& - loc_id,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbmake_table_f -!DEC$endif -! - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - INTEGER(hsize_t) :: i ! general purpose integer - - - INTERFACE - INTEGER FUNCTION h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names,& - max_char_size_field_names,& - field_names) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBMAKE_TABLE_C'::h5tbmake_table_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: table_title - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - END FUNCTION h5tbmake_table_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(table_title) - - ! Find the size of each character string in the array - DO i = 1, nfields - char_len_field_names(i) = LEN_TRIM(field_names(i)) - END DO - - max_char_size_field_names = LEN(field_names(1)) - - errcode = h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names, & - max_char_size_field_names, & - field_names) - -END SUBROUTINE h5tbmake_table_f - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_INT_C'::h5tbwrite_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_int - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_float -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_FL_C'::h5tbwrite_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_DL_C'::h5tbwrite_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_double - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_ST_C'::h5tbwrite_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_INT_C'::h5tbread_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_int - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_FL_C'::h5tbread_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_float - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_DL_C'::h5tbread_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_double - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_ST_C'::h5tbread_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_INT_C'::h5tbwrite_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_int - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_float -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_FL_C'::h5tbwrite_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_DL_C'::h5tbwrite_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_double - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_ST_C'::h5tbwrite_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport ::h5tbread_field_index_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_INT_C'::h5tbread_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_int - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_FL_C'::h5tbread_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_float - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_DL_C'::h5tbread_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_double - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_ST_C'::h5tbread_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_int -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_int(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_INT_C'::h5tbinsert_field_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_int - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_float -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_float(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_FL_C'::h5tbinsert_field_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_double -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_double(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_DL_C'::h5tbinsert_field_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_double - - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_string -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_string(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_ST_C'::h5tbinsert_field_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_string - - - - -!------------------------------------------------------------------------- -! Function: h5tbdelete_field_f -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbdelete_field_f(loc_id,& - dset_name,& - field_name,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbdelete_field_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBDELETE_FIELD_C'::h5tbdelete_field_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbdelete_field_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - -END SUBROUTINE h5tbdelete_field_f - - - -!------------------------------------------------------------------------- -! Function: h5tbget_table_info_f -! -! Purpose: Gets the number of records and fields of a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbget_table_info_f(loc_id,& - dset_name,& - nfields,& - nrecords,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_table_info_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_TABLE_INFO_C'::h5tbget_table_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbget_table_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - -END SUBROUTINE h5tbget_table_info_f - - -!------------------------------------------------------------------------- -! Function: h5tbget_field_info_f -! -! Purpose: Get information about fields -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! Added optional parameter for returning the maximum character length -! in the field name array. March 3, 2011 -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbget_field_info_f(loc_id,& - dset_name,& - nfields,& - field_names,& - field_sizes,& - field_offsets,& - type_size,& - errcode, maxlen_out ) - - IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_field_info_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER :: errcode ! error code - INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer - INTEGER(size_t) :: maxlen - INTEGER(size_t) :: c_maxlen_out - - INTERFACE - INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& - field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_FIELD_INFO_C'::h5tbget_field_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in):: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: maxlen ! maxiumum length of input field names - INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths - INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element - END FUNCTION h5tbget_field_info_c - END INTERFACE - - namelen = LEN(dset_name) - DO i = 1, nfields - namelen2(i) = LEN_TRIM(field_names(i)) - END DO - maxlen = LEN(field_names(1)) - c_maxlen_out = 0 - - errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & - field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) - - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - -END SUBROUTINE h5tbget_field_info_f - -END MODULE H5TB - - - - - - diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index c8c4541..0668230 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -42,12 +42,12 @@ endif # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 #endif # List sources to include in the HDF5 HL Fortran library. libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 + H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) @@ -79,9 +79,9 @@ uninstall-local: # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.f90 -H5LTff.lo: $(srcdir)/H5LTff.f90 -H5IMff.lo: $(srcdir)/H5IMff.f90 -H5TBff.lo: $(srcdir)/H5TBff.f90 +H5DSff.lo: $(srcdir)/H5DSff.F90 +H5LTff.lo: $(srcdir)/H5LTff.F90 +H5IMff.lo: $(srcdir)/H5IMff.F90 +H5TBff.lo: $(srcdir)/H5TBff.F90 include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index cdf2d44..510e4148 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -174,6 +174,24 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -192,21 +210,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = SOURCES = $(libhdf5hl_fortran_la_SOURCES) DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) am__can_run_installinfo = \ @@ -689,12 +692,12 @@ libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVI # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 #endif # List sources to include in the HDF5 HL Fortran library. libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 + H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 # HDF5 HL Fortran library depends on HDF5 Library. @@ -722,7 +725,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -805,6 +808,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LTfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TBfc.Plo@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -826,15 +838,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` - -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - mostlyclean-libtool: -rm -f *.lo @@ -1253,10 +1256,10 @@ uninstall-local: # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.f90 -H5LTff.lo: $(srcdir)/H5LTff.f90 -H5IMff.lo: $(srcdir)/H5IMff.f90 -H5TBff.lo: $(srcdir)/H5TBff.f90 +H5DSff.lo: $(srcdir)/H5DSff.F90 +H5LTff.lo: $(srcdir)/H5LTff.F90 +H5IMff.lo: $(srcdir)/H5IMff.F90 +H5TBff.lo: $(srcdir)/H5TBff.F90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -- cgit v0.12 From 68ad830cd919d61d6ac13877c0fcfaf9000ec646 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 15:09:56 -0500 Subject: [svn-r26874] Added interfaces to H5P parallel interfaces. --- fortran/src/H5Pff.F90 | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 3ec6e93..35f0827 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -7428,8 +7428,19 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! as defined in MPI_FILE_OPEN of MPI-2 INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTEGER, EXTERNAL :: h5pset_fapl_mpio_c + INTERFACE + INTEGER FUNCTION h5pset_fapl_mpio_c(prp_id, comm, info) & + BIND(C,NAME='h5pset_fapl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: comm + INTEGER , INTENT(IN) :: info + END FUNCTION h5pset_fapl_mpio_c + END INTERFACE + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pset_fapl_mpio_f !****s* H5P/h5pget_fapl_mpio_f @@ -7460,8 +7471,19 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! as defined in MPI_FILE_OPEN of MPI-2 INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTEGER, EXTERNAL :: h5pget_fapl_mpio_c + INTERFACE + INTEGER FUNCTION h5pget_fapl_mpio_c(prp_id, comm, info) & + BIND(C,NAME='h5pget_fapl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(OUT) :: comm + INTEGER , INTENT(OUT) :: info + END FUNCTION h5pget_fapl_mpio_c + END INTERFACE + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pget_fapl_mpio_f !****s* H5P/h5pset_dxpl_mpio_f @@ -7492,7 +7514,16 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! H5FD_MPIO_COLLECTIVE_F INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c + INTERFACE + INTEGER FUNCTION h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) & + BIND(C,NAME='h5pset_dxpl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: data_xfer_mode + END FUNCTION h5pset_dxpl_mpio_c + END INTERFACE + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) END SUBROUTINE h5pset_dxpl_mpio_f @@ -7525,7 +7556,16 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! H5FD_MPIO_COLLECTIVE_F INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c + INTERFACE + INTEGER FUNCTION h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) & + BIND(C,NAME='h5pget_dxpl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(OUT) :: data_xfer_mode + END FUNCTION h5pget_dxpl_mpio_c + END INTERFACE + hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) END SUBROUTINE h5pget_dxpl_mpio_f -- cgit v0.12 From 1ba402214dab7349a94c809dbe5290c3ea359e33 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 15:55:09 -0500 Subject: [svn-r26875] Added BIND(C) to interfaces. --- hl/fortran/src/H5LTf90proto.h | 94 +- hl/fortran/src/H5TBfc.c | 100 +- hl/fortran/src/H5TBff.F90 | 2460 ++++++++++++++++++++--------------------- 3 files changed, 1256 insertions(+), 1398 deletions(-) diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 353b17a..df5bb15 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -137,42 +137,6 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); #define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C) #define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C) #define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C) - - -/*------------------------------------------------------------------------- -* Table -*------------------------------------------------------------------------- -*/ -#define nh5tbmake_table_c H5_FC_FUNC_(h5tbmake_table_c, H5TBMAKE_TABLE_C) -#define nh5tbwrite_field_name_c H5_FC_FUNC_(h5tbwrite_field_name_c, H5TBWRITE_FIELD_NAME_C) -#define nh5tbwrite_field_name_int_c H5_FC_FUNC_(h5tbwrite_field_name_int_c, H5TBWRITE_FIELD_NAME_INT_C) -#define nh5tbwrite_field_name_fl_c H5_FC_FUNC_(h5tbwrite_field_name_fl_c, H5TBWRITE_FIELD_NAME_FL_C) -#define nh5tbwrite_field_name_dl_c H5_FC_FUNC_(h5tbwrite_field_name_dl_c, H5TBWRITE_FIELD_NAME_DL_C) -#define nh5tbwrite_field_name_st_c H5_FC_FUNC_(h5tbwrite_field_name_st_c, H5TBWRITE_FIELD_NAME_ST_C) -#define nh5tbread_field_name_c H5_FC_FUNC_(h5tbread_field_name_c, H5TBREAD_FIELD_NAME_C) -#define nh5tbread_field_name_int_c H5_FC_FUNC_(h5tbread_field_name_int_c, H5TBREAD_FIELD_NAME_INT_C) -#define nh5tbread_field_name_fl_c H5_FC_FUNC_(h5tbread_field_name_fl_c, H5TBREAD_FIELD_NAME_FL_C) -#define nh5tbread_field_name_dl_c H5_FC_FUNC_(h5tbread_field_name_dl_c, H5TBREAD_FIELD_NAME_DL_C) -#define nh5tbread_field_name_st_c H5_FC_FUNC_(h5tbread_field_name_st_c, H5TBREAD_FIELD_NAME_ST_C) -#define nh5tbwrite_field_index_c H5_FC_FUNC_(h5tbwrite_field_index_c, H5TBWRITE_FIELD_INDEX_C) -#define nh5tbwrite_field_index_int_c H5_FC_FUNC_(h5tbwrite_field_index_int_c, H5TBWRITE_FIELD_INDEX_INT_C) -#define nh5tbwrite_field_index_fl_c H5_FC_FUNC_(h5tbwrite_field_index_fl_c, H5TBWRITE_FIELD_INDEX_FL_C) -#define nh5tbwrite_field_index_dl_c H5_FC_FUNC_(h5tbwrite_field_index_dl_c, H5TBWRITE_FIELD_INDEX_DL_C) -#define nh5tbwrite_field_index_st_c H5_FC_FUNC_(h5tbwrite_field_index_st_c, H5TBWRITE_FIELD_INDEX_ST_C) -#define nh5tbread_field_index_c H5_FC_FUNC_(h5tbread_field_index_c, H5TBREAD_FIELD_INDEX_C) -#define nh5tbread_field_index_int_c H5_FC_FUNC_(h5tbread_field_index_int_c, H5TBREAD_FIELD_INDEX_INT_C) -#define nh5tbread_field_index_fl_c H5_FC_FUNC_(h5tbread_field_index_fl_c, H5TBREAD_FIELD_INDEX_FL_C) -#define nh5tbread_field_index_dl_c H5_FC_FUNC_(h5tbread_field_index_dl_c, H5TBREAD_FIELD_INDEX_DL_C) -#define nh5tbread_field_index_st_c H5_FC_FUNC_(h5tbread_field_index_st_c, H5TBREAD_FIELD_INDEX_ST_C) -#define nh5tbinsert_field_c H5_FC_FUNC_(h5tbinsert_field_c, H5TBINSERT_FIELD_C) -#define nh5tbinsert_field_int_c H5_FC_FUNC_(h5tbinsert_field_int_c, H5TBINSERT_FIELD_INT_C) -#define nh5tbinsert_field_fl_c H5_FC_FUNC_(h5tbinsert_field_fl_c, H5TBINSERT_FIELD_FL_C) -#define nh5tbinsert_field_dl_c H5_FC_FUNC_(h5tbinsert_field_dl_c, H5TBINSERT_FIELD_DL_C) -#define nh5tbinsert_field_st_c H5_FC_FUNC_(h5tbinsert_field_st_c, H5TBINSERT_FIELD_ST_C) -#define nh5tbdelete_field_c H5_FC_FUNC_(h5tbdelete_field_c, H5TBDELETE_FIELD_C) -#define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C) -#define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C) - /* * Functions from H5DSfc.c */ @@ -1287,7 +1251,7 @@ h5imis_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbmake_table_c(size_t_f *namelen1, +h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -1305,7 +1269,7 @@ nh5tbmake_table_c(size_t_f *namelen1, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_c(hid_t_f *loc_id, +h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1317,7 +1281,7 @@ nh5tbwrite_field_name_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_int_c(hid_t_f *loc_id, +h5tbwrite_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1329,7 +1293,7 @@ nh5tbwrite_field_name_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, +h5tbwrite_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1341,7 +1305,7 @@ nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, +h5tbwrite_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1353,7 +1317,7 @@ nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_st_c(hid_t_f *loc_id, +h5tbwrite_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1365,7 +1329,7 @@ nh5tbwrite_field_name_st_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_c(hid_t_f *loc_id, +h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1377,7 +1341,7 @@ nh5tbread_field_name_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_int_c(hid_t_f *loc_id, +h5tbread_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1389,7 +1353,7 @@ nh5tbread_field_name_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_fl_c(hid_t_f *loc_id, +h5tbread_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1401,7 +1365,7 @@ nh5tbread_field_name_fl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_dl_c(hid_t_f *loc_id, +h5tbread_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1413,7 +1377,7 @@ nh5tbread_field_name_dl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_st_c(hid_t_f *loc_id, +h5tbread_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1425,7 +1389,7 @@ nh5tbread_field_name_st_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_c(hid_t_f *loc_id, +h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1436,7 +1400,7 @@ nh5tbwrite_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_int_c(hid_t_f *loc_id, +h5tbwrite_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1447,7 +1411,7 @@ nh5tbwrite_field_index_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, +h5tbwrite_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1458,7 +1422,7 @@ nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, +h5tbwrite_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1469,7 +1433,7 @@ nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_st_c(hid_t_f *loc_id, +h5tbwrite_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1480,7 +1444,7 @@ nh5tbwrite_field_index_st_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_c(hid_t_f *loc_id, +h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1491,7 +1455,7 @@ nh5tbread_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_int_c(hid_t_f *loc_id, +h5tbread_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1502,7 +1466,7 @@ nh5tbread_field_index_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_fl_c(hid_t_f *loc_id, +h5tbread_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1513,7 +1477,7 @@ nh5tbread_field_index_fl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_dl_c(hid_t_f *loc_id, +h5tbread_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1524,7 +1488,7 @@ nh5tbread_field_index_dl_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_st_c(hid_t_f *loc_id, +h5tbread_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1535,7 +1499,7 @@ nh5tbread_field_index_st_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_c(hid_t_f *loc_id, +h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1546,7 +1510,7 @@ nh5tbinsert_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_int_c(hid_t_f *loc_id, +h5tbinsert_field_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1556,7 +1520,7 @@ nh5tbinsert_field_int_c(hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_fl_c(hid_t_f *loc_id, +h5tbinsert_field_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1566,7 +1530,7 @@ nh5tbinsert_field_fl_c(hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_dl_c(hid_t_f *loc_id, +h5tbinsert_field_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1576,7 +1540,7 @@ nh5tbinsert_field_dl_c(hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_st_c(hid_t_f *loc_id, +h5tbinsert_field_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1586,7 +1550,7 @@ nh5tbinsert_field_st_c(hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbdelete_field_c(hid_t_f *loc_id, +h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1595,7 +1559,7 @@ nh5tbdelete_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbget_table_info_c(hid_t_f *loc_id, +h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -1603,7 +1567,7 @@ nh5tbget_table_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbget_field_info_c(hid_t_f *loc_id, +h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index bf058fd..7a8c40a 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -37,7 +37,7 @@ *------------------------------------------------------------------------- */ int_f -nh5tbmake_table_c(size_t_f *namelen1, +h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -133,7 +133,7 @@ done: HDfree(c_field_types); return ret_value; -} /* end nh5tbmake_table_c() */ +} /* end h5tbmake_table_c() */ /*------------------------------------------------------------------------- * Function: h5tbwrite_field_name_c @@ -151,7 +151,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbwrite_field_name_c(hid_t_f *loc_id, +h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -191,7 +191,7 @@ done: } int_f -nh5tbwrite_field_name_int_c(hid_t_f *loc_id, +h5tbwrite_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -201,12 +201,12 @@ nh5tbwrite_field_name_int_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, +h5tbwrite_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -216,12 +216,12 @@ nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, +h5tbwrite_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -231,12 +231,12 @@ nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_name_st_c(hid_t_f *loc_id, +h5tbwrite_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -246,7 +246,7 @@ nh5tbwrite_field_name_st_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } @@ -266,7 +266,7 @@ nh5tbwrite_field_name_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbread_field_name_c(hid_t_f *loc_id, +h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -306,7 +306,7 @@ done: } int_f -nh5tbread_field_name_int_c(hid_t_f *loc_id, +h5tbread_field_name_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -316,12 +316,12 @@ nh5tbread_field_name_int_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbread_field_name_fl_c(hid_t_f *loc_id, +h5tbread_field_name_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -331,12 +331,12 @@ nh5tbread_field_name_fl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbread_field_name_dl_c(hid_t_f *loc_id, +h5tbread_field_name_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -346,12 +346,12 @@ nh5tbread_field_name_dl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } int_f -nh5tbread_field_name_st_c(hid_t_f *loc_id, +h5tbread_field_name_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -361,7 +361,7 @@ nh5tbread_field_name_st_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, start, nrecords, type_size, buf); } @@ -381,7 +381,7 @@ nh5tbread_field_name_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbwrite_field_index_c(hid_t_f *loc_id, +h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -417,7 +417,7 @@ done: } int_f -nh5tbwrite_field_index_int_c(hid_t_f *loc_id, +h5tbwrite_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -426,12 +426,12 @@ nh5tbwrite_field_index_int_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, +h5tbwrite_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -440,12 +440,12 @@ nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, +h5tbwrite_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -454,12 +454,12 @@ nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbwrite_field_index_st_c(hid_t_f *loc_id, +h5tbwrite_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -468,7 +468,7 @@ nh5tbwrite_field_index_st_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } @@ -488,7 +488,7 @@ nh5tbwrite_field_index_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbread_field_index_c(hid_t_f *loc_id, +h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -523,7 +523,7 @@ done: } int_f -nh5tbread_field_index_int_c(hid_t_f *loc_id, +h5tbread_field_index_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -532,12 +532,12 @@ nh5tbread_field_index_int_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbread_field_index_fl_c(hid_t_f *loc_id, +h5tbread_field_index_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -546,12 +546,12 @@ nh5tbread_field_index_fl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbread_field_index_dl_c(hid_t_f *loc_id, +h5tbread_field_index_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -560,12 +560,12 @@ nh5tbread_field_index_dl_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } int_f -nh5tbread_field_index_st_c(hid_t_f *loc_id, +h5tbread_field_index_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -574,7 +574,7 @@ nh5tbread_field_index_st_c(hid_t_f *loc_id, size_t_f *type_size, void *buf) { - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, nrecords, type_size, buf); } @@ -594,7 +594,7 @@ nh5tbread_field_index_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbinsert_field_c(hid_t_f *loc_id, +h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -632,7 +632,7 @@ done: } int_f -nh5tbinsert_field_int_c(hid_t_f *loc_id, +h5tbinsert_field_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -641,12 +641,12 @@ nh5tbinsert_field_int_c(hid_t_f *loc_id, int_f *position, void *buf) { - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf); } int_f -nh5tbinsert_field_fl_c(hid_t_f *loc_id, +h5tbinsert_field_fl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -655,12 +655,12 @@ nh5tbinsert_field_fl_c(hid_t_f *loc_id, int_f *position, void *buf) { - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf); } int_f -nh5tbinsert_field_dl_c(hid_t_f *loc_id, +h5tbinsert_field_dl_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -669,12 +669,12 @@ nh5tbinsert_field_dl_c(hid_t_f *loc_id, int_f *position, void *buf) { - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf); } int_f -nh5tbinsert_field_st_c(hid_t_f *loc_id, +h5tbinsert_field_st_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -683,7 +683,7 @@ nh5tbinsert_field_st_c(hid_t_f *loc_id, int_f *position, void *buf) { - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, field_type, position, buf); } @@ -703,7 +703,7 @@ nh5tbinsert_field_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbdelete_field_c(hid_t_f *loc_id, +h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -752,7 +752,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbget_table_info_c(hid_t_f *loc_id, +h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -802,7 +802,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbget_field_info_c(hid_t_f *loc_id, +h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 5846f49..c62c4a2 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -18,50 +18,49 @@ ! MODULE h5tb -USE h5fortran_types -USE hdf5 - - -INTERFACE h5tbwrite_field_name_f - MODULE PROCEDURE h5tbwrite_field_name_f_int - MODULE PROCEDURE h5tbwrite_field_name_f_float - MODULE PROCEDURE h5tbwrite_field_name_f_double - MODULE PROCEDURE h5tbwrite_field_name_f_string -END INTERFACE - -INTERFACE h5tbread_field_name_f - MODULE PROCEDURE h5tbread_field_name_f_int - MODULE PROCEDURE h5tbread_field_name_f_float - MODULE PROCEDURE h5tbread_field_name_f_double - MODULE PROCEDURE h5tbread_field_name_f_string -END INTERFACE - -INTERFACE h5tbwrite_field_index_f - MODULE PROCEDURE h5tbwrite_field_index_f_int - MODULE PROCEDURE h5tbwrite_field_index_f_float - MODULE PROCEDURE h5tbwrite_field_index_f_double - MODULE PROCEDURE h5tbwrite_field_index_f_string -END INTERFACE - -INTERFACE h5tbread_field_index_f - MODULE PROCEDURE h5tbread_field_index_f_int - MODULE PROCEDURE h5tbread_field_index_f_float - MODULE PROCEDURE h5tbread_field_index_f_double - MODULE PROCEDURE h5tbread_field_index_f_string -END INTERFACE - - -INTERFACE h5tbinsert_field_f - MODULE PROCEDURE h5tbinsert_field_f_int - MODULE PROCEDURE h5tbinsert_field_f_float - MODULE PROCEDURE h5tbinsert_field_f_double - MODULE PROCEDURE h5tbinsert_field_f_string -END INTERFACE + + USE ISO_C_BINDING + USE h5fortran_types + USE hdf5 + INTERFACE h5tbwrite_field_name_f + MODULE PROCEDURE h5tbwrite_field_name_f_int + MODULE PROCEDURE h5tbwrite_field_name_f_c_float + MODULE PROCEDURE h5tbwrite_field_name_f_c_double + MODULE PROCEDURE h5tbwrite_field_name_f_string + END INTERFACE + + INTERFACE h5tbread_field_name_f + MODULE PROCEDURE h5tbread_field_name_f_int + MODULE PROCEDURE h5tbread_field_name_f_c_float + MODULE PROCEDURE h5tbread_field_name_f_c_double + MODULE PROCEDURE h5tbread_field_name_f_string + END INTERFACE + + INTERFACE h5tbwrite_field_index_f + MODULE PROCEDURE h5tbwrite_field_index_f_int + MODULE PROCEDURE h5tbwrite_field_index_f_c_float + MODULE PROCEDURE h5tbwrite_field_index_f_c_double + MODULE PROCEDURE h5tbwrite_field_index_f_string + END INTERFACE + + INTERFACE h5tbread_field_index_f + MODULE PROCEDURE h5tbread_field_index_f_int + MODULE PROCEDURE h5tbread_field_index_f_c_float + MODULE PROCEDURE h5tbread_field_index_f_c_double + MODULE PROCEDURE h5tbread_field_index_f_string + END INTERFACE + + INTERFACE h5tbinsert_field_f + MODULE PROCEDURE h5tbinsert_field_f_int + MODULE PROCEDURE h5tbinsert_field_f_c_float + MODULE PROCEDURE h5tbinsert_field_f_c_double + MODULE PROCEDURE h5tbinsert_field_f_string + END INTERFACE + CONTAINS - !------------------------------------------------------------------------- ! Function: h5tbmake_table_f ! @@ -79,47 +78,94 @@ CONTAINS ! !------------------------------------------------------------------------- -SUBROUTINE h5tbmake_table_f(table_title,& - loc_id,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - IMPLICIT NONE + SUBROUTINE h5tbmake_table_f(table_title,& + loc_id,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) !DEC$attributes dllexport :: h5tbmake_table_f !DEC$endif ! - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - INTEGER(hsize_t) :: i ! general purpose integer - - - INTERFACE - INTEGER FUNCTION h5tbmake_table_c(namelen1,& + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + INTEGER(hsize_t) :: i ! general purpose integer + + + INTERFACE + INTEGER FUNCTION h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names,& + max_char_size_field_names,& + field_names) & + BIND(C,NAME='h5tbmake_table_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + END FUNCTION h5tbmake_table_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(table_title) + + ! Find the size of each character string in the array + DO i = 1, nfields + char_len_field_names(i) = LEN_TRIM(field_names(i)) + END DO + + max_char_size_field_names = LEN(field_names(1)) + + errcode = h5tbmake_table_c(namelen1,& table_title,& loc_id,& namelen,& @@ -131,62 +177,11 @@ SUBROUTINE h5tbmake_table_f(table_title,& field_types,& chunk_size,& compress,& - char_len_field_names,& - max_char_size_field_names,& + char_len_field_names, & + max_char_size_field_names, & field_names) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBMAKE_TABLE_C'::h5tbmake_table_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: table_title - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - END FUNCTION h5tbmake_table_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(table_title) - - ! Find the size of each character string in the array - DO i = 1, nfields - char_len_field_names(i) = LEN_TRIM(field_names(i)) - END DO - - max_char_size_field_names = LEN(field_names(1)) - - errcode = h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names, & - max_char_size_field_names, & - field_names) - -END SUBROUTINE h5tbmake_table_f + END SUBROUTINE h5tbmake_table_f !------------------------------------------------------------------------- @@ -204,69 +199,63 @@ END SUBROUTINE h5tbmake_table_f ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - + SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) !DEC$attributes dllexport :: h5tbwrite_field_name_f_int !DEC$endif ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_INT_C'::h5tbwrite_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_int - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_name_f_int + !------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_float +! Function: h5tbwrite_field_name_f_c_float ! ! Purpose: Writes one field ! @@ -280,71 +269,63 @@ END SUBROUTINE h5tbwrite_field_name_f_int ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - + SUBROUTINE h5tbwrite_field_name_f_c_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_float +!DEC$attributes dllexport :: h5tbwrite_field_name_f_c_float !DEC$endif ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_FL_C'::h5tbwrite_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_float - - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_fl_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_name_f_c_float !------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_double +! Function: h5tbwrite_field_name_f_c_double ! ! Purpose: Writes one field ! @@ -358,66 +339,61 @@ END SUBROUTINE h5tbwrite_field_name_f_float ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - + SUBROUTINE h5tbwrite_field_name_f_c_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_double +!DEC$attributes dllexport :: h5tbwrite_field_name_f_c_double !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_DL_C'::h5tbwrite_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_double + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_dl_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_name_f_c_double !------------------------------------------------------------------------- ! Function: h5tbwrite_field_name_f_string @@ -434,16 +410,16 @@ END SUBROUTINE h5tbwrite_field_name_f_double ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -452,48 +428,44 @@ SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_ST_C'::h5tbwrite_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_string + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_st_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_name_f_string !------------------------------------------------------------------------- @@ -511,16 +483,16 @@ END SUBROUTINE h5tbwrite_field_name_f_string ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -529,51 +501,47 @@ SUBROUTINE h5tbread_field_name_f_int(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_INT_C'::h5tbread_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_int + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name, & + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_name_f_int !------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_float +! Function: h5tbread_field_name_f_c_float ! ! Purpose: Reads one field ! @@ -587,69 +555,65 @@ END SUBROUTINE h5tbread_field_name_f_int ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_name_f_c_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_float +!DEC$attributes dllexport :: h5tbread_field_name_f_c_float !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_FL_C'::h5tbread_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_float + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_fl_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_name_f_c_float !------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_double +! Function: h5tbread_field_name_f_c_double ! ! Purpose: Reads one field ! @@ -663,66 +627,62 @@ END SUBROUTINE h5tbread_field_name_f_float ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_name_f_c_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_double +!DEC$attributes dllexport :: h5tbread_field_name_f_c_double !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_DL_C'::h5tbread_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_double + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_dl_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_name_f_c_double !------------------------------------------------------------------------- ! Function: h5tbread_field_name_f_string @@ -739,16 +699,16 @@ END SUBROUTINE h5tbread_field_name_f_double ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -757,48 +717,44 @@ SUBROUTINE h5tbread_field_name_f_string(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_ST_C'::h5tbread_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_string + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_st_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_name_f_string !------------------------------------------------------------------------- @@ -815,17 +771,17 @@ END SUBROUTINE h5tbread_field_name_f_string ! Modifications: ! !------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE + + SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -834,47 +790,44 @@ SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_INT_C'::h5tbwrite_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_int + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_index_f_int !------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_float +! Function: h5tbwrite_field_index_f_c_float ! ! Purpose: Writes one field ! @@ -888,67 +841,64 @@ END SUBROUTINE h5tbwrite_field_index_f_int ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE + SUBROUTINE h5tbwrite_field_index_f_c_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_float +!DEC$attributes dllexport :: h5tbwrite_field_index_f_c_float !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_FL_C'::h5tbwrite_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_float + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_fl_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_index_f_c_float !------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_double +! Function: h5tbwrite_field_index_f_c_double ! ! Purpose: Writes one field ! @@ -962,62 +912,59 @@ END SUBROUTINE h5tbwrite_field_index_f_float ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - + SUBROUTINE h5tbwrite_field_index_f_c_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_double +!DEC$attributes dllexport :: h5tbwrite_field_index_f_c_double !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_DL_C'::h5tbwrite_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_double + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_dl_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_index_f_c_double !------------------------------------------------------------------------- ! Function: h5tbwrite_field_index_f_string @@ -1034,16 +981,16 @@ END SUBROUTINE h5tbwrite_field_index_f_double ! !------------------------------------------------------------------------- -SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE + SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1052,44 +999,41 @@ SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_ST_C'::h5tbwrite_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_string + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_st_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbwrite_field_index_f_string !------------------------------------------------------------------------- @@ -1107,16 +1051,16 @@ END SUBROUTINE h5tbwrite_field_index_f_string ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE + SUBROUTINE h5tbread_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1124,48 +1068,44 @@ SUBROUTINE h5tbread_field_index_f_int(loc_id,& !DEC$attributes dllexport ::h5tbread_field_index_f_int !DEC$endif ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_INT_C'::h5tbread_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_int + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_index_f_int !------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_float +! Function: h5tbread_field_index_f_c_float ! ! Purpose: Reads one field ! @@ -1179,65 +1119,62 @@ END SUBROUTINE h5tbread_field_index_f_int ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_index_f_c_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_float +!DEC$attributes dllexport :: h5tbread_field_index_f_c_float !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_FL_C'::h5tbread_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_float + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_fl_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_index_f_c_float !------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_double +! Function: h5tbread_field_index_f_c_double ! ! Purpose: Reads one field ! @@ -1251,62 +1188,59 @@ END SUBROUTINE h5tbread_field_index_f_float ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_index_f_c_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_double +!DEC$attributes dllexport :: h5tbread_field_index_f_c_double !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_DL_C'::h5tbread_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_double + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_dl_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_index_f_c_double !------------------------------------------------------------------------- ! Function: h5tbread_field_index_f_string @@ -1323,16 +1257,16 @@ END SUBROUTINE h5tbread_field_index_f_double ! !------------------------------------------------------------------------- -SUBROUTINE h5tbread_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) + SUBROUTINE h5tbread_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1341,45 +1275,41 @@ SUBROUTINE h5tbread_field_index_f_string(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_ST_C'::h5tbread_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_string - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_st_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + END SUBROUTINE h5tbread_field_index_f_string !------------------------------------------------------------------------- ! Function: h5tbinsert_field_f_int @@ -1396,14 +1326,14 @@ END SUBROUTINE h5tbread_field_index_f_string ! !------------------------------------------------------------------------- -SUBROUTINE h5tbinsert_field_f_int(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE + SUBROUTINE h5tbinsert_field_f_int(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1412,51 +1342,44 @@ SUBROUTINE h5tbinsert_field_f_int(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_INT_C'::h5tbinsert_field_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_int - - - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + END SUBROUTINE h5tbinsert_field_f_int + !------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_float +! Function: h5tbinsert_field_f_c_float ! ! Purpose: Inserts one field ! @@ -1470,67 +1393,62 @@ END SUBROUTINE h5tbinsert_field_f_int ! !------------------------------------------------------------------------- -SUBROUTINE h5tbinsert_field_f_float(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE + SUBROUTINE h5tbinsert_field_f_c_float(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_float +!DEC$attributes dllexport :: h5tbinsert_field_f_c_float !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_FL_C'::h5tbinsert_field_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_float + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_fl_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + END SUBROUTINE h5tbinsert_field_f_c_float !------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_double +! Function: h5tbinsert_field_f_c_double ! ! Purpose: Inserts one field ! @@ -1544,65 +1462,58 @@ END SUBROUTINE h5tbinsert_field_f_float ! !------------------------------------------------------------------------- -SUBROUTINE h5tbinsert_field_f_double(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE + SUBROUTINE h5tbinsert_field_f_c_double(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_double +!DEC$attributes dllexport :: h5tbinsert_field_f_c_double !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_DL_C'::h5tbinsert_field_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_double - - - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_dl_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + END SUBROUTINE h5tbinsert_field_f_c_double !------------------------------------------------------------------------- ! Function: h5tbinsert_field_f_string @@ -1619,14 +1530,14 @@ END SUBROUTINE h5tbinsert_field_f_double ! !------------------------------------------------------------------------- -SUBROUTINE h5tbinsert_field_f_string(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE + SUBROUTINE h5tbinsert_field_f_string(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1635,49 +1546,41 @@ SUBROUTINE h5tbinsert_field_f_string(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_ST_C'::h5tbinsert_field_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_string - - - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_st_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + END SUBROUTINE h5tbinsert_field_f_string !------------------------------------------------------------------------- ! Function: h5tbdelete_field_f @@ -1694,11 +1597,11 @@ END SUBROUTINE h5tbinsert_field_f_string ! !------------------------------------------------------------------------- -SUBROUTINE h5tbdelete_field_f(loc_id,& - dset_name,& - field_name,& - errcode ) - IMPLICIT NONE + SUBROUTINE h5tbdelete_field_f(loc_id,& + dset_name,& + field_name,& + errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1707,38 +1610,34 @@ SUBROUTINE h5tbdelete_field_f(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code - INTERFACE - INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + INTERFACE + INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) & + BIND(C,NAME='h5tbdelete_field_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbdelete_field_c + END INTERFACE - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBDELETE_FIELD_C'::h5tbdelete_field_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbdelete_field_c - END INTERFACE + namelen = LEN(dset_name) + namelen1 = LEN(field_name) - namelen = LEN(dset_name) - namelen1 = LEN(field_name) + errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - -END SUBROUTINE h5tbdelete_field_f + END SUBROUTINE h5tbdelete_field_f @@ -1759,13 +1658,13 @@ END SUBROUTINE h5tbdelete_field_f ! !------------------------------------------------------------------------- -SUBROUTINE h5tbget_table_info_f(loc_id,& - dset_name,& - nfields,& - nrecords,& - errcode ) + SUBROUTINE h5tbget_table_info_f(loc_id,& + dset_name,& + nfields,& + nrecords,& + errcode ) - IMPLICIT NONE + IMPLICIT NONE ! !This definition is needed for Windows DLLs @@ -1774,34 +1673,32 @@ SUBROUTINE h5tbget_table_info_f(loc_id,& !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_TABLE_INFO_C'::h5tbget_table_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbget_table_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - -END SUBROUTINE h5tbget_table_info_f - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) & + BIND(C,NAME='h5tbget_table_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbget_table_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + + END SUBROUTINE h5tbget_table_info_f + !------------------------------------------------------------------------- ! Function: h5tbget_field_info_f @@ -1822,75 +1719,72 @@ END SUBROUTINE h5tbget_table_info_f ! !------------------------------------------------------------------------- -SUBROUTINE h5tbget_field_info_f(loc_id,& - dset_name,& - nfields,& - field_names,& - field_sizes,& - field_offsets,& - type_size,& - errcode, maxlen_out ) - - IMPLICIT NONE + SUBROUTINE h5tbget_field_info_f(loc_id,& + dset_name,& + nfields,& + field_names,& + field_sizes,& + field_offsets,& + type_size,& + errcode, maxlen_out ) + + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) !DEC$attributes dllexport :: h5tbget_field_info_f !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER :: errcode ! error code - INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer - INTEGER(size_t) :: maxlen - INTEGER(size_t) :: c_maxlen_out - - INTERFACE - INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& - field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_FIELD_INFO_C'::h5tbget_field_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in):: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: maxlen ! maxiumum length of input field names - INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths - INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element - END FUNCTION h5tbget_field_info_c - END INTERFACE - - namelen = LEN(dset_name) - DO i = 1, nfields - namelen2(i) = LEN_TRIM(field_names(i)) - END DO - maxlen = LEN(field_names(1)) - c_maxlen_out = 0 - - errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & - field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) - - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - -END SUBROUTINE h5tbget_field_info_f - + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER :: errcode ! error code + INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths + INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(size_t) :: maxlen + INTEGER(size_t) :: c_maxlen_out + + INTERFACE + INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& + field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) & + BIND(C,NAME='h5tbget_field_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in):: nfields ! nfields + CHARACTER(KIND=C_CHAR), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: maxlen ! maxiumum length of input field names + INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths + INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element + END FUNCTION h5tbget_field_info_c + END INTERFACE + + namelen = LEN(dset_name) + DO i = 1, nfields + namelen2(i) = LEN_TRIM(field_names(i)) + END DO + maxlen = LEN(field_names(1)) + c_maxlen_out = 0 + + errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & + field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) + + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + + END SUBROUTINE h5tbget_field_info_f + END MODULE H5TB -- cgit v0.12 From f981d2e11e67150fc03f9ab58e8d93ddb7504e92 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 15:59:45 -0500 Subject: [svn-r26876] changed argument to SIZEOF. --- fortran/src/H5Pff.F90 | 4 ++-- fortran/test/tf.F90 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 35f0827..3b40757 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -7433,8 +7433,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) BIND(C,NAME='h5pset_fapl_mpio_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER , INTENT(IN) :: comm + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: comm INTEGER , INTENT(IN) :: info END FUNCTION h5pset_fapl_mpio_c END INTERFACE diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index aabccd3..109c62e 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -461,9 +461,9 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: a #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) + H5_SIZEOF_CHR = storage_size(a(1:1), c_size_t)/storage_size(c_char_'a',c_size_t) #else - H5_SIZEOF_CHR = SIZEOF(a) + H5_SIZEOF_CHR = SIZEOF(a(1:1)) #endif END FUNCTION H5_SIZEOF_CHR -- cgit v0.12 From fd6ce02c921f91a3c76ffff11f9f3202f030824f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 16:06:52 -0500 Subject: [svn-r26877] removed references to F2003 --- config/cmake/HDF518_Examples.cmake.in | 3 +-- config/cmake/hdf5-config.cmake.in | 3 +-- config/cmake/libhdf5.settings.cmake.in | 1 - config/cmake/mccacheinit.cmake | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index d767f51..372ea76 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -13,7 +13,6 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_BUILD_CONFIGURATION "Release") #set(NO_MAC_FORTRAN "true") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") #set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") ############################################################################################################### @@ -123,4 +122,4 @@ if(res GREATER 0) endif(res GREATER 0) #----------------------------------------------------------------------------- ############################################################################################################## -message(STATUS "DONE") \ No newline at end of file +message(STATUS "DONE") diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 667d3e6..dec59da 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -20,7 +20,6 @@ set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS #----------------------------------------------------------------------------- set (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) set (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) -set (${HDF5_PACKAGE_NAME}_ENABLE_F2003 @HDF5_ENABLE_F2003@) set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@) set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) @@ -144,4 +143,4 @@ list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) endforeach () check_required_components(${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) - \ No newline at end of file + diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index a036ff8..3445917 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -38,7 +38,6 @@ Languages: ---------- Fortran: @HDF5_BUILD_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HDF5_ENABLE_F2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index af506e6..39ec124 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -16,8 +16,6 @@ set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) -set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE) - set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE) set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE) -- cgit v0.12 From cfeb1509c2f7055ee34daba23978b0932944818c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 09:37:02 -0500 Subject: [svn-r26881] Added BIND(C) to the Fortran HL APIs, and fixed the issue with -r8 (or equiv.) being specified. --- hl/fortran/src/H5LTf90proto.h | 317 ++---- hl/fortran/src/H5LTfc.c | 372 +++---- hl/fortran/src/H5LTff.F90 | 2302 +++++++++++++++++++---------------------- hl/fortran/test/tstlite.f90 | 5 +- 4 files changed, 1360 insertions(+), 1636 deletions(-) diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index df5bb15..4714b83 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -27,116 +27,6 @@ H5_FCDLL char* HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); - -/* - * Functions from H5LTfc.c - */ -#define nh5ltmake_dataset_c H5_FC_FUNC_(h5ltmake_dataset_c, H5LTMAKE_DATASET_C) -#define nh5ltmake_dataset_int1_c H5_FC_FUNC_(h5ltmake_dataset_int1_c, H5LTMAKE_DATASET_INT1_C) -#define nh5ltmake_dataset_int2_c H5_FC_FUNC_(h5ltmake_dataset_int2_c, H5LTMAKE_DATASET_INT2_C) -#define nh5ltmake_dataset_int3_c H5_FC_FUNC_(h5ltmake_dataset_int3_c, H5LTMAKE_DATASET_INT3_C) -#define nh5ltmake_dataset_int4_c H5_FC_FUNC_(h5ltmake_dataset_int4_c, H5LTMAKE_DATASET_INT4_C) -#define nh5ltmake_dataset_int5_c H5_FC_FUNC_(h5ltmake_dataset_int5_c, H5LTMAKE_DATASET_INT5_C) -#define nh5ltmake_dataset_int6_c H5_FC_FUNC_(h5ltmake_dataset_int6_c, H5LTMAKE_DATASET_INT6_C) -#define nh5ltmake_dataset_int7_c H5_FC_FUNC_(h5ltmake_dataset_int7_c, H5LTMAKE_DATASET_INT7_C) -#define nh5ltmake_dataset_fl1_c H5_FC_FUNC_(h5ltmake_dataset_fl1_c, H5LTMAKE_DATASET_FL1_C) -#define nh5ltmake_dataset_fl2_c H5_FC_FUNC_(h5ltmake_dataset_fl2_c, H5LTMAKE_DATASET_FL2_C) -#define nh5ltmake_dataset_fl3_c H5_FC_FUNC_(h5ltmake_dataset_fl3_c, H5LTMAKE_DATASET_FL3_C) -#define nh5ltmake_dataset_fl4_c H5_FC_FUNC_(h5ltmake_dataset_fl4_c, H5LTMAKE_DATASET_FL4_C) -#define nh5ltmake_dataset_fl5_c H5_FC_FUNC_(h5ltmake_dataset_fl5_c, H5LTMAKE_DATASET_FL5_C) -#define nh5ltmake_dataset_fl6_c H5_FC_FUNC_(h5ltmake_dataset_fl6_c, H5LTMAKE_DATASET_FL6_C) -#define nh5ltmake_dataset_fl7_c H5_FC_FUNC_(h5ltmake_dataset_fl7_c, H5LTMAKE_DATASET_FL7_C) -#define nh5ltmake_dataset_dl1_c H5_FC_FUNC_(h5ltmake_dataset_dl1_c, H5LTMAKE_DATASET_DL1_C) -#define nh5ltmake_dataset_dl2_c H5_FC_FUNC_(h5ltmake_dataset_dl2_c, H5LTMAKE_DATASET_DL2_C) -#define nh5ltmake_dataset_dl3_c H5_FC_FUNC_(h5ltmake_dataset_dl3_c, H5LTMAKE_DATASET_DL3_C) -#define nh5ltmake_dataset_dl4_c H5_FC_FUNC_(h5ltmake_dataset_dl4_c, H5LTMAKE_DATASET_DL4_C) -#define nh5ltmake_dataset_dl5_c H5_FC_FUNC_(h5ltmake_dataset_dl5_c, H5LTMAKE_DATASET_DL5_C) -#define nh5ltmake_dataset_dl6_c H5_FC_FUNC_(h5ltmake_dataset_dl6_c, H5LTMAKE_DATASET_DL6_C) -#define nh5ltmake_dataset_dl7_c H5_FC_FUNC_(h5ltmake_dataset_dl7_c, H5LTMAKE_DATASET_DL7_C) -#define nh5ltmake_dataset_nint1_c H5_FC_FUNC_(h5ltmake_dataset_nint1_c, H5LTMAKE_DATASET_NINT1_C) -#define nh5ltmake_dataset_nint2_c H5_FC_FUNC_(h5ltmake_dataset_nint2_c, H5LTMAKE_DATASET_NINT2_C) -#define nh5ltmake_dataset_nint3_c H5_FC_FUNC_(h5ltmake_dataset_nint3_c, H5LTMAKE_DATASET_NINT3_C) -#define nh5ltmake_dataset_nint4_c H5_FC_FUNC_(h5ltmake_dataset_nint4_c, H5LTMAKE_DATASET_NINT4_C) -#define nh5ltmake_dataset_nint5_c H5_FC_FUNC_(h5ltmake_dataset_nint5_c, H5LTMAKE_DATASET_NINT5_C) -#define nh5ltmake_dataset_nint6_c H5_FC_FUNC_(h5ltmake_dataset_nint6_c, H5LTMAKE_DATASET_NINT6_C) -#define nh5ltmake_dataset_nint7_c H5_FC_FUNC_(h5ltmake_dataset_nint7_c, H5LTMAKE_DATASET_NINT7_C) -#define nh5ltmake_dataset_nfl1_c H5_FC_FUNC_(h5ltmake_dataset_nfl1_c, H5LTMAKE_DATASET_NFL1_C) -#define nh5ltmake_dataset_nfl2_c H5_FC_FUNC_(h5ltmake_dataset_nfl2_c, H5LTMAKE_DATASET_NFL2_C) -#define nh5ltmake_dataset_nfl3_c H5_FC_FUNC_(h5ltmake_dataset_nfl3_c, H5LTMAKE_DATASET_NFL3_C) -#define nh5ltmake_dataset_nfl4_c H5_FC_FUNC_(h5ltmake_dataset_nfl4_c, H5LTMAKE_DATASET_NFL4_C) -#define nh5ltmake_dataset_nfl5_c H5_FC_FUNC_(h5ltmake_dataset_nfl5_c, H5LTMAKE_DATASET_NFL5_C) -#define nh5ltmake_dataset_nfl6_c H5_FC_FUNC_(h5ltmake_dataset_nfl6_c, H5LTMAKE_DATASET_NFL6_C) -#define nh5ltmake_dataset_nfl7_c H5_FC_FUNC_(h5ltmake_dataset_nfl7_c, H5LTMAKE_DATASET_NFL7_C) -#define nh5ltmake_dataset_ndl1_c H5_FC_FUNC_(h5ltmake_dataset_ndl1_c, H5LTMAKE_DATASET_NDL1_C) -#define nh5ltmake_dataset_ndl2_c H5_FC_FUNC_(h5ltmake_dataset_ndl2_c, H5LTMAKE_DATASET_NDL2_C) -#define nh5ltmake_dataset_ndl3_c H5_FC_FUNC_(h5ltmake_dataset_ndl3_c, H5LTMAKE_DATASET_NDL3_C) -#define nh5ltmake_dataset_ndl4_c H5_FC_FUNC_(h5ltmake_dataset_ndl4_c, H5LTMAKE_DATASET_NDL4_C) -#define nh5ltmake_dataset_ndl5_c H5_FC_FUNC_(h5ltmake_dataset_ndl5_c, H5LTMAKE_DATASET_NDL5_C) -#define nh5ltmake_dataset_ndl6_c H5_FC_FUNC_(h5ltmake_dataset_ndl6_c, H5LTMAKE_DATASET_NDL6_C) -#define nh5ltmake_dataset_ndl7_c H5_FC_FUNC_(h5ltmake_dataset_ndl7_c, H5LTMAKE_DATASET_NDL7_C) -#define nh5ltread_dataset_c H5_FC_FUNC_(h5ltread_dataset_c, H5LTREAD_DATASET_C) -#define nh5ltread_dataset_int1_c H5_FC_FUNC_(h5ltread_dataset_int1_c, H5LTREAD_DATASET_INT1_C) -#define nh5ltread_dataset_int2_c H5_FC_FUNC_(h5ltread_dataset_int2_c, H5LTREAD_DATASET_INT2_C) -#define nh5ltread_dataset_int3_c H5_FC_FUNC_(h5ltread_dataset_int3_c, H5LTREAD_DATASET_INT3_C) -#define nh5ltread_dataset_int4_c H5_FC_FUNC_(h5ltread_dataset_int4_c, H5LTREAD_DATASET_INT4_C) -#define nh5ltread_dataset_int5_c H5_FC_FUNC_(h5ltread_dataset_int5_c, H5LTREAD_DATASET_INT5_C) -#define nh5ltread_dataset_int6_c H5_FC_FUNC_(h5ltread_dataset_int6_c, H5LTREAD_DATASET_INT6_C) -#define nh5ltread_dataset_int7_c H5_FC_FUNC_(h5ltread_dataset_int7_c, H5LTREAD_DATASET_INT7_C) -#define nh5ltread_dataset_fl1_c H5_FC_FUNC_(h5ltread_dataset_fl1_c, H5LTREAD_DATASET_FL1_C) -#define nh5ltread_dataset_fl2_c H5_FC_FUNC_(h5ltread_dataset_fl2_c, H5LTREAD_DATASET_FL2_C) -#define nh5ltread_dataset_fl3_c H5_FC_FUNC_(h5ltread_dataset_fl3_c, H5LTREAD_DATASET_FL3_C) -#define nh5ltread_dataset_fl4_c H5_FC_FUNC_(h5ltread_dataset_fl4_c, H5LTREAD_DATASET_FL4_C) -#define nh5ltread_dataset_fl5_c H5_FC_FUNC_(h5ltread_dataset_fl5_c, H5LTREAD_DATASET_FL5_C) -#define nh5ltread_dataset_fl6_c H5_FC_FUNC_(h5ltread_dataset_fl6_c, H5LTREAD_DATASET_FL6_C) -#define nh5ltread_dataset_fl7_c H5_FC_FUNC_(h5ltread_dataset_fl7_c, H5LTREAD_DATASET_FL7_C) -#define nh5ltread_dataset_dl1_c H5_FC_FUNC_(h5ltread_dataset_dl1_c, H5LTREAD_DATASET_DL1_C) -#define nh5ltread_dataset_dl2_c H5_FC_FUNC_(h5ltread_dataset_dl2_c, H5LTREAD_DATASET_DL2_C) -#define nh5ltread_dataset_dl3_c H5_FC_FUNC_(h5ltread_dataset_dl3_c, H5LTREAD_DATASET_DL3_C) -#define nh5ltread_dataset_dl4_c H5_FC_FUNC_(h5ltread_dataset_dl4_c, H5LTREAD_DATASET_DL4_C) -#define nh5ltread_dataset_dl5_c H5_FC_FUNC_(h5ltread_dataset_dl5_c, H5LTREAD_DATASET_DL5_C) -#define nh5ltread_dataset_dl6_c H5_FC_FUNC_(h5ltread_dataset_dl6_c, H5LTREAD_DATASET_DL6_C) -#define nh5ltread_dataset_dl7_c H5_FC_FUNC_(h5ltread_dataset_dl7_c, H5LTREAD_DATASET_DL7_C) -#define nh5ltread_dataset_nint1_c H5_FC_FUNC_(h5ltread_dataset_nint1_c, H5LTREAD_DATASET_NINT1_C) -#define nh5ltread_dataset_nint2_c H5_FC_FUNC_(h5ltread_dataset_nint2_c, H5LTREAD_DATASET_NINT2_C) -#define nh5ltread_dataset_nint3_c H5_FC_FUNC_(h5ltread_dataset_nint3_c, H5LTREAD_DATASET_NINT3_C) -#define nh5ltread_dataset_nint4_c H5_FC_FUNC_(h5ltread_dataset_nint4_c, H5LTREAD_DATASET_NINT4_C) -#define nh5ltread_dataset_nint5_c H5_FC_FUNC_(h5ltread_dataset_nint5_c, H5LTREAD_DATASET_NINT5_C) -#define nh5ltread_dataset_nint6_c H5_FC_FUNC_(h5ltread_dataset_nint6_c, H5LTREAD_DATASET_NINT6_C) -#define nh5ltread_dataset_nint7_c H5_FC_FUNC_(h5ltread_dataset_nint7_c, H5LTREAD_DATASET_NINT7_C) -#define nh5ltread_dataset_nfl1_c H5_FC_FUNC_(h5ltread_dataset_nfl1_c, H5LTREAD_DATASET_NFL1_C) -#define nh5ltread_dataset_nfl2_c H5_FC_FUNC_(h5ltread_dataset_nfl2_c, H5LTREAD_DATASET_NFL2_C) -#define nh5ltread_dataset_nfl3_c H5_FC_FUNC_(h5ltread_dataset_nfl3_c, H5LTREAD_DATASET_NFL3_C) -#define nh5ltread_dataset_nfl4_c H5_FC_FUNC_(h5ltread_dataset_nfl4_c, H5LTREAD_DATASET_NFL4_C) -#define nh5ltread_dataset_nfl5_c H5_FC_FUNC_(h5ltread_dataset_nfl5_c, H5LTREAD_DATASET_NFL5_C) -#define nh5ltread_dataset_nfl6_c H5_FC_FUNC_(h5ltread_dataset_nfl6_c, H5LTREAD_DATASET_NFL6_C) -#define nh5ltread_dataset_nfl7_c H5_FC_FUNC_(h5ltread_dataset_nfl7_c, H5LTREAD_DATASET_NFL7_C) -#define nh5ltread_dataset_ndl1_c H5_FC_FUNC_(h5ltread_dataset_ndl1_c, H5LTREAD_DATASET_NDL1_C) -#define nh5ltread_dataset_ndl2_c H5_FC_FUNC_(h5ltread_dataset_ndl2_c, H5LTREAD_DATASET_NDL2_C) -#define nh5ltread_dataset_ndl3_c H5_FC_FUNC_(h5ltread_dataset_ndl3_c, H5LTREAD_DATASET_NDL3_C) -#define nh5ltread_dataset_ndl4_c H5_FC_FUNC_(h5ltread_dataset_ndl4_c, H5LTREAD_DATASET_NDL4_C) -#define nh5ltread_dataset_ndl5_c H5_FC_FUNC_(h5ltread_dataset_ndl5_c, H5LTREAD_DATASET_NDL5_C) -#define nh5ltread_dataset_ndl6_c H5_FC_FUNC_(h5ltread_dataset_ndl6_c, H5LTREAD_DATASET_NDL6_C) -#define nh5ltread_dataset_ndl7_c H5_FC_FUNC_(h5ltread_dataset_ndl7_c, H5LTREAD_DATASET_NDL7_C) -#define nh5ltmake_dataset_string_c H5_FC_FUNC_(h5ltmake_dataset_string_c, H5LTMAKE_DATASET_STRING_C) -#define nh5ltread_dataset_string_c H5_FC_FUNC_(h5ltread_dataset_string_c, H5LTREAD_DATASET_STRING_C) - -#define nh5ltset_attribute_int_c H5_FC_FUNC_(h5ltset_attribute_int_c, H5LTSET_ATTRIBUTE_INT_C) -#define nh5ltset_attribute_float_c H5_FC_FUNC_(h5ltset_attribute_float_c, H5LTSET_ATTRIBUTE_FLOAT_C) -#define nh5ltset_attribute_double_c H5_FC_FUNC_(h5ltset_attribute_double_c, H5LTSET_ATTRIBUTE_DOUBLE_C) -#define nh5ltset_attribute_string_c H5_FC_FUNC_(h5ltset_attribute_string_c, H5LTSET_ATTRIBUTE_STRING_C) - -#define nh5ltget_attribute_int_c H5_FC_FUNC_(h5ltget_attribute_int_c, H5LTGET_ATTRIBUTE_INT_C) -#define nh5ltget_attribute_float_c H5_FC_FUNC_(h5ltget_attribute_float_c, H5LTGET_ATTRIBUTE_FLOAT_C) -#define nh5ltget_attribute_double_c H5_FC_FUNC_(h5ltget_attribute_double_c, H5LTGET_ATTRIBUTE_DOUBLE_C) -#define nh5ltget_attribute_string_c H5_FC_FUNC_(h5ltget_attribute_string_c, H5LTGET_ATTRIBUTE_STRING_C) - -#define nh5ltget_dataset_ndims_c H5_FC_FUNC_(h5ltget_dataset_ndims_c, H5LTGET_DATASET_NDIMS_C) -#define nh5ltfind_dataset_c H5_FC_FUNC_(h5ltfind_dataset_c, H5LTFIND_DATASET_C) -#define nh5ltget_dataset_info_c H5_FC_FUNC_(h5ltget_dataset_info_c, H5LTGET_DATASET_INFO_C) - -#define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C) -#define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C) -#define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C) /* * Functions from H5DSfc.c */ @@ -176,10 +66,13 @@ HDF5_HL_F90CSTUBDLL int_f h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); +/* + * Functions from H5LTfc.c + */ HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_c (hid_t_f *loc_id, +h5ltmake_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -189,7 +82,7 @@ nh5ltmake_dataset_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int1_c (hid_t_f *loc_id, +h5ltmake_dataset_int1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -199,7 +92,7 @@ nh5ltmake_dataset_int1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int2_c (hid_t_f *loc_id, +h5ltmake_dataset_int2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -209,7 +102,7 @@ nh5ltmake_dataset_int2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int3_c (hid_t_f *loc_id, +h5ltmake_dataset_int3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -219,7 +112,7 @@ nh5ltmake_dataset_int3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int4_c (hid_t_f *loc_id, +h5ltmake_dataset_int4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -229,7 +122,7 @@ nh5ltmake_dataset_int4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int5_c (hid_t_f *loc_id, +h5ltmake_dataset_int5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -239,7 +132,7 @@ nh5ltmake_dataset_int5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int6_c (hid_t_f *loc_id, +h5ltmake_dataset_int6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -249,7 +142,7 @@ nh5ltmake_dataset_int6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_int7_c (hid_t_f *loc_id, +h5ltmake_dataset_int7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -260,7 +153,7 @@ nh5ltmake_dataset_int7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, +h5ltmake_dataset_fl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -270,7 +163,7 @@ nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, +h5ltmake_dataset_fl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -280,7 +173,7 @@ nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, +h5ltmake_dataset_fl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -290,7 +183,7 @@ nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, +h5ltmake_dataset_fl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -300,7 +193,7 @@ nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, +h5ltmake_dataset_fl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -310,7 +203,7 @@ nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, +h5ltmake_dataset_fl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -320,7 +213,7 @@ nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, +h5ltmake_dataset_fl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -331,7 +224,7 @@ nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, +h5ltmake_dataset_dl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -341,7 +234,7 @@ nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, +h5ltmake_dataset_dl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -351,7 +244,7 @@ nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, +h5ltmake_dataset_dl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -361,7 +254,7 @@ nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, +h5ltmake_dataset_dl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -371,7 +264,7 @@ nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, +h5ltmake_dataset_dl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -381,7 +274,7 @@ nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, +h5ltmake_dataset_dl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -391,7 +284,7 @@ nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, +h5ltmake_dataset_dl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -401,7 +294,7 @@ nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, +h5ltmake_dataset_nint1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -411,7 +304,7 @@ nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, +h5ltmake_dataset_nint2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -421,7 +314,7 @@ nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, +h5ltmake_dataset_nint3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -431,7 +324,7 @@ nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, +h5ltmake_dataset_nint4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -441,7 +334,7 @@ nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, +h5ltmake_dataset_nint5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -451,7 +344,7 @@ nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, +h5ltmake_dataset_nint6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -461,7 +354,7 @@ nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, +h5ltmake_dataset_nint7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -471,7 +364,7 @@ nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -481,7 +374,7 @@ nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -491,7 +384,7 @@ nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -501,7 +394,7 @@ nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -511,7 +404,7 @@ nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -521,7 +414,7 @@ nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -531,7 +424,7 @@ nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -541,7 +434,7 @@ nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -551,7 +444,7 @@ nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -561,7 +454,7 @@ nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -571,7 +464,7 @@ nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -581,7 +474,7 @@ nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -591,7 +484,7 @@ nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -601,7 +494,7 @@ nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -611,7 +504,7 @@ nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_c (hid_t_f *loc_id, +h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -621,7 +514,7 @@ nh5ltread_dataset_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int1_c (hid_t_f *loc_id, +h5ltread_dataset_int1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -630,7 +523,7 @@ nh5ltread_dataset_int1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int2_c (hid_t_f *loc_id, +h5ltread_dataset_int2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -639,7 +532,7 @@ nh5ltread_dataset_int2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int3_c (hid_t_f *loc_id, +h5ltread_dataset_int3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -648,7 +541,7 @@ nh5ltread_dataset_int3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int4_c (hid_t_f *loc_id, +h5ltread_dataset_int4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -657,7 +550,7 @@ nh5ltread_dataset_int4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int5_c (hid_t_f *loc_id, +h5ltread_dataset_int5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -666,7 +559,7 @@ nh5ltread_dataset_int5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int6_c (hid_t_f *loc_id, +h5ltread_dataset_int6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -675,7 +568,7 @@ nh5ltread_dataset_int6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_int7_c (hid_t_f *loc_id, +h5ltread_dataset_int7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -684,7 +577,7 @@ nh5ltread_dataset_int7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl1_c (hid_t_f *loc_id, +h5ltread_dataset_fl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -693,7 +586,7 @@ nh5ltread_dataset_fl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl2_c (hid_t_f *loc_id, +h5ltread_dataset_fl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -702,7 +595,7 @@ nh5ltread_dataset_fl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl3_c (hid_t_f *loc_id, +h5ltread_dataset_fl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -711,7 +604,7 @@ nh5ltread_dataset_fl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl4_c (hid_t_f *loc_id, +h5ltread_dataset_fl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -720,7 +613,7 @@ nh5ltread_dataset_fl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl5_c (hid_t_f *loc_id, +h5ltread_dataset_fl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -729,7 +622,7 @@ nh5ltread_dataset_fl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl6_c (hid_t_f *loc_id, +h5ltread_dataset_fl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -739,7 +632,7 @@ nh5ltread_dataset_fl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_fl7_c (hid_t_f *loc_id, +h5ltread_dataset_fl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -748,7 +641,7 @@ nh5ltread_dataset_fl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl1_c (hid_t_f *loc_id, +h5ltread_dataset_dl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -757,7 +650,7 @@ nh5ltread_dataset_dl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl2_c (hid_t_f *loc_id, +h5ltread_dataset_dl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -766,7 +659,7 @@ nh5ltread_dataset_dl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl3_c (hid_t_f *loc_id, +h5ltread_dataset_dl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -775,7 +668,7 @@ nh5ltread_dataset_dl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl4_c (hid_t_f *loc_id, +h5ltread_dataset_dl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -784,7 +677,7 @@ nh5ltread_dataset_dl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl5_c (hid_t_f *loc_id, +h5ltread_dataset_dl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -793,7 +686,7 @@ nh5ltread_dataset_dl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl6_c (hid_t_f *loc_id, +h5ltread_dataset_dl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -802,7 +695,7 @@ nh5ltread_dataset_dl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_dl7_c (hid_t_f *loc_id, +h5ltread_dataset_dl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -811,7 +704,7 @@ nh5ltread_dataset_dl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint1_c (hid_t_f *loc_id, +h5ltread_dataset_nint1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -820,7 +713,7 @@ nh5ltread_dataset_nint1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint2_c (hid_t_f *loc_id, +h5ltread_dataset_nint2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -829,7 +722,7 @@ nh5ltread_dataset_nint2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint3_c (hid_t_f *loc_id, +h5ltread_dataset_nint3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -838,7 +731,7 @@ nh5ltread_dataset_nint3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint4_c (hid_t_f *loc_id, +h5ltread_dataset_nint4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -847,7 +740,7 @@ nh5ltread_dataset_nint4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint5_c (hid_t_f *loc_id, +h5ltread_dataset_nint5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -856,7 +749,7 @@ nh5ltread_dataset_nint5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint6_c (hid_t_f *loc_id, +h5ltread_dataset_nint6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -865,7 +758,7 @@ nh5ltread_dataset_nint6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nint7_c (hid_t_f *loc_id, +h5ltread_dataset_nint7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -874,7 +767,7 @@ nh5ltread_dataset_nint7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, +h5ltread_dataset_nfl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -883,7 +776,7 @@ nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, +h5ltread_dataset_nfl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -892,7 +785,7 @@ nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, +h5ltread_dataset_nfl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -901,7 +794,7 @@ nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, +h5ltread_dataset_nfl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -910,7 +803,7 @@ nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, +h5ltread_dataset_nfl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -919,7 +812,7 @@ nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, +h5ltread_dataset_nfl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -928,7 +821,7 @@ nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, +h5ltread_dataset_nfl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -937,7 +830,7 @@ nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, +h5ltread_dataset_ndl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -946,7 +839,7 @@ nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, +h5ltread_dataset_ndl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -955,7 +848,7 @@ nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, +h5ltread_dataset_ndl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -964,7 +857,7 @@ nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, +h5ltread_dataset_ndl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -973,7 +866,7 @@ nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, +h5ltread_dataset_ndl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -982,7 +875,7 @@ nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, +h5ltread_dataset_ndl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -991,7 +884,7 @@ nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, +h5ltread_dataset_ndl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -1000,7 +893,7 @@ nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_int_c(hid_t_f *loc_id, +h5ltset_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1010,7 +903,7 @@ nh5ltset_attribute_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_float_c(hid_t_f *loc_id, +h5ltset_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1020,7 +913,7 @@ nh5ltset_attribute_float_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_double_c(hid_t_f *loc_id, +h5ltset_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1030,7 +923,7 @@ nh5ltset_attribute_double_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_string_c(hid_t_f *loc_id, +h5ltset_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1041,7 +934,7 @@ nh5ltset_attribute_string_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1050,7 +943,7 @@ nh5ltget_attribute_int_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_float_c(hid_t_f *loc_id, +h5ltget_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1059,7 +952,7 @@ nh5ltget_attribute_float_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_double_c(hid_t_f *loc_id, +h5ltget_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1068,7 +961,7 @@ nh5ltget_attribute_double_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_string_c(hid_t_f *loc_id, +h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1078,20 +971,20 @@ nh5ltget_attribute_string_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_dataset_ndims_c(hid_t_f *loc_id, +h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -nh5ltfind_dataset_c(hid_t_f *loc_id, +h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_dataset_info_c(hid_t_f *loc_id, +h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1100,7 +993,7 @@ nh5ltget_dataset_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_ndims_c(hid_t_f *loc_id, +h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1108,7 +1001,7 @@ nh5ltget_attribute_ndims_c(hid_t_f *loc_id, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_info_c(hid_t_f *loc_id, +h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -1119,7 +1012,7 @@ nh5ltget_attribute_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_string_c (hid_t_f *loc_id, +h5ltmake_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, @@ -1127,14 +1020,14 @@ nh5ltmake_dataset_string_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_string_c (hid_t_f *loc_id, +h5ltread_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf); HDF5_HL_F90CSTUBDLL int_f -nh5ltpath_valid_c(hid_t_f *loc_id, +h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c); diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 1e0a236..f5e9153 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -39,7 +39,7 @@ */ int_f -nh5ltmake_dataset_c (hid_t_f *loc_id, +h5ltmake_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -90,7 +90,7 @@ done: } int_f -nh5ltmake_dataset_int1_c (hid_t_f *loc_id, +h5ltmake_dataset_int1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -98,10 +98,10 @@ nh5ltmake_dataset_int1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int2_c (hid_t_f *loc_id, +h5ltmake_dataset_int2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -109,10 +109,10 @@ nh5ltmake_dataset_int2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int3_c (hid_t_f *loc_id, +h5ltmake_dataset_int3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -120,10 +120,10 @@ nh5ltmake_dataset_int3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int4_c (hid_t_f *loc_id, +h5ltmake_dataset_int4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -131,10 +131,10 @@ nh5ltmake_dataset_int4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int5_c (hid_t_f *loc_id, +h5ltmake_dataset_int5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -142,10 +142,10 @@ nh5ltmake_dataset_int5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int6_c (hid_t_f *loc_id, +h5ltmake_dataset_int6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -153,10 +153,10 @@ nh5ltmake_dataset_int6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_int7_c (hid_t_f *loc_id, +h5ltmake_dataset_int7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -164,10 +164,10 @@ nh5ltmake_dataset_int7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, +h5ltmake_dataset_fl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -175,10 +175,10 @@ nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, +h5ltmake_dataset_fl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -186,10 +186,10 @@ nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, +h5ltmake_dataset_fl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -197,10 +197,10 @@ nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, +h5ltmake_dataset_fl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -208,10 +208,10 @@ nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, +h5ltmake_dataset_fl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -219,10 +219,10 @@ nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, +h5ltmake_dataset_fl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -230,10 +230,10 @@ nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, +h5ltmake_dataset_fl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -241,10 +241,10 @@ nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, +h5ltmake_dataset_dl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -252,10 +252,10 @@ nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, +h5ltmake_dataset_dl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -263,10 +263,10 @@ nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, +h5ltmake_dataset_dl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -274,10 +274,10 @@ nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, +h5ltmake_dataset_dl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -285,10 +285,10 @@ nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, +h5ltmake_dataset_dl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -296,10 +296,10 @@ nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, +h5ltmake_dataset_dl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -307,10 +307,10 @@ nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, +h5ltmake_dataset_dl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -318,10 +318,10 @@ nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, +h5ltmake_dataset_nint1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -329,10 +329,10 @@ nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, +h5ltmake_dataset_nint2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -340,10 +340,10 @@ nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, +h5ltmake_dataset_nint3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -351,10 +351,10 @@ nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, +h5ltmake_dataset_nint4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -362,10 +362,10 @@ nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, +h5ltmake_dataset_nint5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -373,10 +373,10 @@ nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, +h5ltmake_dataset_nint6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -384,10 +384,10 @@ nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, +h5ltmake_dataset_nint7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -395,10 +395,10 @@ nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -406,10 +406,10 @@ nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -417,10 +417,10 @@ nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -428,10 +428,10 @@ nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -439,10 +439,10 @@ nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -450,10 +450,10 @@ nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -461,10 +461,10 @@ nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, +h5ltmake_dataset_nfl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -472,10 +472,10 @@ nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -483,10 +483,10 @@ nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -494,10 +494,10 @@ nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -505,10 +505,10 @@ nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -516,10 +516,10 @@ nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -527,10 +527,10 @@ nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -538,10 +538,10 @@ nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } int_f -nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, +h5ltmake_dataset_ndl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -549,7 +549,7 @@ nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, hid_t_f *type_id, void *buf) { - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); + return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); } /*------------------------------------------------------------------------- * Function: H5LTread_dataset_c @@ -571,7 +571,7 @@ nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, */ int_f -nh5ltread_dataset_c (hid_t_f *loc_id, +h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, @@ -612,424 +612,424 @@ done: } int_f -nh5ltread_dataset_int1_c (hid_t_f *loc_id, +h5ltread_dataset_int1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int2_c (hid_t_f *loc_id, +h5ltread_dataset_int2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int3_c (hid_t_f *loc_id, +h5ltread_dataset_int3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int4_c (hid_t_f *loc_id, +h5ltread_dataset_int4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int5_c (hid_t_f *loc_id, +h5ltread_dataset_int5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int6_c (hid_t_f *loc_id, +h5ltread_dataset_int6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_int7_c (hid_t_f *loc_id, +h5ltread_dataset_int7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl1_c (hid_t_f *loc_id, +h5ltread_dataset_fl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl2_c (hid_t_f *loc_id, +h5ltread_dataset_fl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl3_c (hid_t_f *loc_id, +h5ltread_dataset_fl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl4_c (hid_t_f *loc_id, +h5ltread_dataset_fl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl5_c (hid_t_f *loc_id, +h5ltread_dataset_fl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl6_c (hid_t_f *loc_id, +h5ltread_dataset_fl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_fl7_c (hid_t_f *loc_id, +h5ltread_dataset_fl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl1_c (hid_t_f *loc_id, +h5ltread_dataset_dl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl2_c (hid_t_f *loc_id, +h5ltread_dataset_dl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl3_c (hid_t_f *loc_id, +h5ltread_dataset_dl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl4_c (hid_t_f *loc_id, +h5ltread_dataset_dl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl5_c (hid_t_f *loc_id, +h5ltread_dataset_dl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl6_c (hid_t_f *loc_id, +h5ltread_dataset_dl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_dl7_c (hid_t_f *loc_id, +h5ltread_dataset_dl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint1_c (hid_t_f *loc_id, +h5ltread_dataset_nint1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint2_c (hid_t_f *loc_id, +h5ltread_dataset_nint2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint3_c (hid_t_f *loc_id, +h5ltread_dataset_nint3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint4_c (hid_t_f *loc_id, +h5ltread_dataset_nint4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint5_c (hid_t_f *loc_id, +h5ltread_dataset_nint5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint6_c (hid_t_f *loc_id, +h5ltread_dataset_nint6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nint7_c (hid_t_f *loc_id, +h5ltread_dataset_nint7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, +h5ltread_dataset_nfl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, +h5ltread_dataset_nfl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, +h5ltread_dataset_nfl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, +h5ltread_dataset_nfl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, +h5ltread_dataset_nfl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, +h5ltread_dataset_nfl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, +h5ltread_dataset_nfl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, +h5ltread_dataset_ndl1_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, +h5ltread_dataset_ndl2_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, +h5ltread_dataset_ndl3_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, +h5ltread_dataset_ndl4_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, +h5ltread_dataset_ndl5_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, +h5ltread_dataset_ndl6_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } int_f -nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, +h5ltread_dataset_ndl7_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, void *buf, hsize_t_f *dims) { - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); } /*------------------------------------------------------------------------- * Function: H5LTmake_dataset_string_c @@ -1051,7 +1051,7 @@ nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, */ int_f -nh5ltmake_dataset_string_c (hid_t_f *loc_id, +h5ltmake_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, @@ -1116,7 +1116,7 @@ done: */ int_f -nh5ltread_dataset_string_c (hid_t_f *loc_id, +h5ltread_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf) @@ -1174,7 +1174,7 @@ done: */ int_f -nh5ltset_attribute_int_c(hid_t_f *loc_id, +h5ltset_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1249,7 +1249,7 @@ done: */ int_f -nh5ltset_attribute_float_c(hid_t_f *loc_id, +h5ltset_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1318,7 +1318,7 @@ done: */ int_f -nh5ltset_attribute_double_c(hid_t_f *loc_id, +h5ltset_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1387,7 +1387,7 @@ done: */ int_f -nh5ltset_attribute_string_c(hid_t_f *loc_id, +h5ltset_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1462,7 +1462,7 @@ done: */ int_f -nh5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1536,7 +1536,7 @@ done: */ int_f -nh5ltget_attribute_float_c(hid_t_f *loc_id, +h5ltget_attribute_float_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1601,7 +1601,7 @@ done: */ int_f -nh5ltget_attribute_double_c(hid_t_f *loc_id, +h5ltget_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1667,7 +1667,7 @@ done: */ int_f -nh5ltget_attribute_string_c(hid_t_f *loc_id, +h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1742,7 +1742,7 @@ done: */ int_f -nh5ltget_dataset_ndims_c(hid_t_f *loc_id, +h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank) @@ -1802,7 +1802,7 @@ done: */ int_f -nh5ltfind_dataset_c(hid_t_f *loc_id, +h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -1850,7 +1850,7 @@ nh5ltfind_dataset_c(hid_t_f *loc_id, */ int_f -nh5ltget_dataset_info_c(hid_t_f *loc_id, +h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1929,7 +1929,7 @@ done: */ int_f -nh5ltget_attribute_ndims_c(hid_t_f *loc_id, +h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1998,7 +1998,7 @@ done: */ int_f -nh5ltget_attribute_info_c(hid_t_f *loc_id, +h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -2087,7 +2087,7 @@ done: */ int_f -nh5ltpath_valid_c(hid_t_f *loc_id, +h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 9393f7f..5e1db19 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -18,6 +18,7 @@ ! MODULE h5lt + USE ISO_C_BINDING USE h5fortran_types USE hdf5 @@ -29,20 +30,20 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_int5 MODULE PROCEDURE h5ltmake_dataset_f_int6 MODULE PROCEDURE h5ltmake_dataset_f_int7 - MODULE PROCEDURE h5ltmake_dataset_f_float1 - MODULE PROCEDURE h5ltmake_dataset_f_float2 - MODULE PROCEDURE h5ltmake_dataset_f_float3 - MODULE PROCEDURE h5ltmake_dataset_f_float4 - MODULE PROCEDURE h5ltmake_dataset_f_float5 - MODULE PROCEDURE h5ltmake_dataset_f_float6 - MODULE PROCEDURE h5ltmake_dataset_f_float7 - MODULE PROCEDURE h5ltmake_dataset_f_double1 - MODULE PROCEDURE h5ltmake_dataset_f_double2 - MODULE PROCEDURE h5ltmake_dataset_f_double3 - MODULE PROCEDURE h5ltmake_dataset_f_double4 - MODULE PROCEDURE h5ltmake_dataset_f_double5 - MODULE PROCEDURE h5ltmake_dataset_f_double6 - MODULE PROCEDURE h5ltmake_dataset_f_double7 + MODULE PROCEDURE h5ltmake_dataset_f_c_float1 + MODULE PROCEDURE h5ltmake_dataset_f_c_float2 + MODULE PROCEDURE h5ltmake_dataset_f_c_float3 + MODULE PROCEDURE h5ltmake_dataset_f_c_float4 + MODULE PROCEDURE h5ltmake_dataset_f_c_float5 + MODULE PROCEDURE h5ltmake_dataset_f_c_float6 + MODULE PROCEDURE h5ltmake_dataset_f_c_float7 + MODULE PROCEDURE h5ltmake_dataset_f_c_double1 + MODULE PROCEDURE h5ltmake_dataset_f_c_double2 + MODULE PROCEDURE h5ltmake_dataset_f_c_double3 + MODULE PROCEDURE h5ltmake_dataset_f_c_double4 + MODULE PROCEDURE h5ltmake_dataset_f_c_double5 + MODULE PROCEDURE h5ltmake_dataset_f_c_double6 + MODULE PROCEDURE h5ltmake_dataset_f_c_double7 END INTERFACE INTERFACE h5ltread_dataset_f @@ -53,20 +54,20 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_int5 MODULE PROCEDURE h5ltread_dataset_f_int6 MODULE PROCEDURE h5ltread_dataset_f_int7 - MODULE PROCEDURE h5ltread_dataset_f_float1 - MODULE PROCEDURE h5ltread_dataset_f_float2 - MODULE PROCEDURE h5ltread_dataset_f_float3 - MODULE PROCEDURE h5ltread_dataset_f_float4 - MODULE PROCEDURE h5ltread_dataset_f_float5 - MODULE PROCEDURE h5ltread_dataset_f_float6 - MODULE PROCEDURE h5ltread_dataset_f_float7 - MODULE PROCEDURE h5ltread_dataset_f_double1 - MODULE PROCEDURE h5ltread_dataset_f_double2 - MODULE PROCEDURE h5ltread_dataset_f_double3 - MODULE PROCEDURE h5ltread_dataset_f_double4 - MODULE PROCEDURE h5ltread_dataset_f_double5 - MODULE PROCEDURE h5ltread_dataset_f_double6 - MODULE PROCEDURE h5ltread_dataset_f_double7 + MODULE PROCEDURE h5ltread_dataset_f_c_float1 + MODULE PROCEDURE h5ltread_dataset_f_c_float2 + MODULE PROCEDURE h5ltread_dataset_f_c_float3 + MODULE PROCEDURE h5ltread_dataset_f_c_float4 + MODULE PROCEDURE h5ltread_dataset_f_c_float5 + MODULE PROCEDURE h5ltread_dataset_f_c_float6 + MODULE PROCEDURE h5ltread_dataset_f_c_float7 + MODULE PROCEDURE h5ltread_dataset_f_c_double1 + MODULE PROCEDURE h5ltread_dataset_f_c_double2 + MODULE PROCEDURE h5ltread_dataset_f_c_double3 + MODULE PROCEDURE h5ltread_dataset_f_c_double4 + MODULE PROCEDURE h5ltread_dataset_f_c_double5 + MODULE PROCEDURE h5ltread_dataset_f_c_double6 + MODULE PROCEDURE h5ltread_dataset_f_c_double7 END INTERFACE INTERFACE h5ltmake_dataset_int_f @@ -80,23 +81,37 @@ MODULE h5lt END INTERFACE INTERFACE h5ltmake_dataset_float_f - MODULE PROCEDURE h5ltmake_dataset_float_f_1 - MODULE PROCEDURE h5ltmake_dataset_float_f_2 - MODULE PROCEDURE h5ltmake_dataset_float_f_3 - MODULE PROCEDURE h5ltmake_dataset_float_f_4 - MODULE PROCEDURE h5ltmake_dataset_float_f_5 - MODULE PROCEDURE h5ltmake_dataset_float_f_6 - MODULE PROCEDURE h5ltmake_dataset_float_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 END INTERFACE INTERFACE h5ltmake_dataset_double_f - MODULE PROCEDURE h5ltmake_dataset_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_double_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_float_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 END INTERFACE INTERFACE h5ltread_dataset_int_f @@ -110,23 +125,37 @@ MODULE h5lt END INTERFACE INTERFACE h5ltread_dataset_float_f - MODULE PROCEDURE h5ltread_dataset_float_f_1 - MODULE PROCEDURE h5ltread_dataset_float_f_2 - MODULE PROCEDURE h5ltread_dataset_float_f_3 - MODULE PROCEDURE h5ltread_dataset_float_f_4 - MODULE PROCEDURE h5ltread_dataset_float_f_5 - MODULE PROCEDURE h5ltread_dataset_float_f_6 - MODULE PROCEDURE h5ltread_dataset_float_f_7 + MODULE PROCEDURE h5ltread_dataset_c_float_f_1 + MODULE PROCEDURE h5ltread_dataset_c_float_f_2 + MODULE PROCEDURE h5ltread_dataset_c_float_f_3 + MODULE PROCEDURE h5ltread_dataset_c_float_f_4 + MODULE PROCEDURE h5ltread_dataset_c_float_f_5 + MODULE PROCEDURE h5ltread_dataset_c_float_f_6 + MODULE PROCEDURE h5ltread_dataset_c_float_f_7 + MODULE PROCEDURE h5ltread_dataset_c_double_f_1 + MODULE PROCEDURE h5ltread_dataset_c_double_f_2 + MODULE PROCEDURE h5ltread_dataset_c_double_f_3 + MODULE PROCEDURE h5ltread_dataset_c_double_f_4 + MODULE PROCEDURE h5ltread_dataset_c_double_f_5 + MODULE PROCEDURE h5ltread_dataset_c_double_f_6 + MODULE PROCEDURE h5ltread_dataset_c_double_f_7 END INTERFACE INTERFACE h5ltread_dataset_double_f - MODULE PROCEDURE h5ltread_dataset_double_f_1 - MODULE PROCEDURE h5ltread_dataset_double_f_2 - MODULE PROCEDURE h5ltread_dataset_double_f_3 - MODULE PROCEDURE h5ltread_dataset_double_f_4 - MODULE PROCEDURE h5ltread_dataset_double_f_5 - MODULE PROCEDURE h5ltread_dataset_double_f_6 - MODULE PROCEDURE h5ltread_dataset_double_f_7 + MODULE PROCEDURE h5ltread_dataset_c_float_f_1 + MODULE PROCEDURE h5ltread_dataset_c_float_f_2 + MODULE PROCEDURE h5ltread_dataset_c_float_f_3 + MODULE PROCEDURE h5ltread_dataset_c_float_f_4 + MODULE PROCEDURE h5ltread_dataset_c_float_f_5 + MODULE PROCEDURE h5ltread_dataset_c_float_f_6 + MODULE PROCEDURE h5ltread_dataset_c_float_f_7 + MODULE PROCEDURE h5ltread_dataset_c_double_f_1 + MODULE PROCEDURE h5ltread_dataset_c_double_f_2 + MODULE PROCEDURE h5ltread_dataset_c_double_f_3 + MODULE PROCEDURE h5ltread_dataset_c_double_f_4 + MODULE PROCEDURE h5ltread_dataset_c_double_f_5 + MODULE PROCEDURE h5ltread_dataset_c_double_f_6 + MODULE PROCEDURE h5ltread_dataset_c_double_f_7 END INTERFACE CONTAINS @@ -178,17 +207,15 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int1_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT1_C'::h5ltmake_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer @@ -245,17 +272,15 @@ CONTAINS DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT2_C'::h5ltmake_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -303,7 +328,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -313,17 +338,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int3_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT3_C'::h5ltmake_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -366,7 +389,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -376,17 +399,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int4_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT4_C'::h5ltmake_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -429,7 +450,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -439,17 +460,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int5_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT5_C'::h5ltmake_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -492,7 +511,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -502,17 +521,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int6_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT6_C'::h5ltmake_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -555,7 +572,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -565,17 +582,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_int7_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT7_C'::h5ltmake_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -590,7 +605,7 @@ CONTAINS !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float1 + ! Function: h5ltmake_dataset_f_c_float1 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -606,7 +621,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float1(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_float1(loc_id,& dset_name,& rank,& dims,& @@ -619,44 +634,42 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float1 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl1_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL1_C'::h5ltmake_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl1_c END INTERFACE namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float1 + END SUBROUTINE h5ltmake_dataset_f_c_float1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float2 + ! Function: h5ltmake_dataset_f_c_float2 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -672,7 +685,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float2(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_float2(loc_id,& dset_name,& rank,& dims,& @@ -685,35 +698,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float2 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl2_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL2_C'::h5ltmake_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl2_c END INTERFACE @@ -721,10 +732,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float2 + END SUBROUTINE h5ltmake_dataset_f_c_float2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float3 + ! Function: h5ltmake_dataset_f_c_float3 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -740,7 +751,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float3(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_float3(loc_id,& dset_name,& rank,& dims,& @@ -753,23 +764,25 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float3 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl3_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c @@ -778,10 +791,10 @@ CONTAINS INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl3_c END INTERFACE @@ -789,10 +802,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float3 + END SUBROUTINE h5ltmake_dataset_f_c_float3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float4 + ! Function: h5ltmake_dataset_f_c_float4 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -808,7 +821,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float4(loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_f_c_float4(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE @@ -816,35 +829,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float4 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl4_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL4_C'::h5ltmake_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl4_c END INTERFACE @@ -852,10 +863,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float4 + END SUBROUTINE h5ltmake_dataset_f_c_float4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float5 + ! Function: h5ltmake_dataset_f_c_float5 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -871,7 +882,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float5(loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_f_c_float5(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE @@ -879,35 +890,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float5 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl5_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL5_C'::h5ltmake_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl5_c END INTERFACE @@ -915,10 +924,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float5 + END SUBROUTINE h5ltmake_dataset_f_c_float5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float6 + ! Function: h5ltmake_dataset_f_c_float6 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -934,7 +943,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float6(loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_f_c_float6(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE @@ -942,35 +951,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float6 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl6_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL6_C'::h5ltmake_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl6_c END INTERFACE @@ -978,10 +985,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float6 + END SUBROUTINE h5ltmake_dataset_f_c_float6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float7 + ! Function: h5ltmake_dataset_f_c_float7 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -997,7 +1004,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_float7(loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_f_c_float7(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE @@ -1005,35 +1012,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float7 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_fl7_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL7_C'::h5ltmake_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_fl7_c END INTERFACE @@ -1041,10 +1046,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_float7 + END SUBROUTINE h5ltmake_dataset_f_c_float7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double1 + ! Function: h5ltmake_dataset_f_c_double1 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1060,7 +1065,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double1(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_double1(loc_id,& dset_name,& rank,& dims,& @@ -1073,22 +1078,24 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double1 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl1_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c @@ -1097,20 +1104,20 @@ CONTAINS INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl1_c END INTERFACE namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double1 + END SUBROUTINE h5ltmake_dataset_f_c_double1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double2 + ! Function: h5ltmake_dataset_f_c_double2 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1126,7 +1133,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double2(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_double2(loc_id,& dset_name,& rank,& dims,& @@ -1139,35 +1146,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double2 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl2_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL2_C'::h5ltmake_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl2_c END INTERFACE @@ -1175,10 +1180,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double2 + END SUBROUTINE h5ltmake_dataset_f_c_double2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double3 + ! Function: h5ltmake_dataset_f_c_double3 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1194,7 +1199,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double3(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_double3(loc_id,& dset_name,& rank,& dims,& @@ -1207,35 +1212,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double3 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl3_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL3_C'::h5ltmake_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl3_c END INTERFACE @@ -1243,10 +1246,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double3 + END SUBROUTINE h5ltmake_dataset_f_c_double3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double4 + ! Function: h5ltmake_dataset_f_c_double4 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1262,7 +1265,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double4(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_f_c_double4(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE @@ -1270,35 +1273,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double4 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl4_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL4_C'::h5ltmake_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl4_c END INTERFACE @@ -1306,10 +1307,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double4 + END SUBROUTINE h5ltmake_dataset_f_c_double4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double5 + ! Function: h5ltmake_dataset_f_c_double5 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1325,7 +1326,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double5(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_f_c_double5(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE @@ -1333,35 +1334,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double5 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl5_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL5_C'::h5ltmake_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl5_c END INTERFACE @@ -1369,10 +1368,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double5 + END SUBROUTINE h5ltmake_dataset_f_c_double5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double6 + ! Function: h5ltmake_dataset_f_c_double6 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1388,7 +1387,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double6(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_f_c_double6(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE @@ -1396,35 +1395,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double6 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl6_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL6_C'::h5ltmake_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl6_c END INTERFACE @@ -1432,10 +1429,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double6 + END SUBROUTINE h5ltmake_dataset_f_c_double6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double7 + ! Function: h5ltmake_dataset_f_c_double7 ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1451,7 +1448,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_double7(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_f_c_double7(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE @@ -1459,35 +1456,33 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double7 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl7_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL7_C'::h5ltmake_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_dl7_c END INTERFACE @@ -1495,7 +1490,7 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltmake_dataset_f_double7 + END SUBROUTINE h5ltmake_dataset_f_c_double7 !------------------------------------------------------------------------- ! Function: h5ltread_dataset_f_int1 @@ -1531,7 +1526,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer @@ -1539,17 +1534,15 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int1_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT1_C'::h5ltread_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltread_dataset_int1_c @@ -1594,7 +1587,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1603,17 +1596,15 @@ CONTAINS DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT2_C'::h5ltread_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer @@ -1659,7 +1650,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1668,17 +1659,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int3_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT3_C'::h5ltread_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer @@ -1720,7 +1709,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1729,17 +1718,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int4_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT4_C'::h5ltread_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer @@ -1781,7 +1768,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1790,17 +1777,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int5_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT5_C'::h5ltread_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer @@ -1842,7 +1827,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1851,17 +1836,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int6_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT6_C'::h5ltread_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer @@ -1903,7 +1886,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -1912,17 +1895,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int7_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT7_C'::h5ltread_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer @@ -1936,7 +1917,7 @@ CONTAINS !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float1 + ! Function: h5ltread_dataset_f_c_float1 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -1952,7 +1933,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float1(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_float1(loc_id,& dset_name,& type_id,& buf,& @@ -1964,42 +1945,40 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float1 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl1_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL1_C'::h5ltread_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl1_c END INTERFACE namelen = LEN(dset_name) errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float1 + END SUBROUTINE h5ltread_dataset_f_c_float1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float2 + ! Function: h5ltread_dataset_f_c_float2 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2015,7 +1994,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float2(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_float2(loc_id,& dset_name,& type_id,& buf,& @@ -2027,34 +2006,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float2 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl2_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL2_C'::h5ltread_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl2_c END INTERFACE @@ -2062,10 +2039,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float2 + END SUBROUTINE h5ltread_dataset_f_c_float2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float3 + ! Function: h5ltread_dataset_f_c_float3 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2081,7 +2058,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float3(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_float3(loc_id,& dset_name,& type_id,& buf,& @@ -2093,33 +2070,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float3 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl3_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL3_C'::h5ltread_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl3_c END INTERFACE @@ -2127,10 +2102,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float3 + END SUBROUTINE h5ltread_dataset_f_c_float3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float4 + ! Function: h5ltread_dataset_f_c_float4 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2146,7 +2121,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float4(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_float4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2154,33 +2129,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float4 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl4_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL4_C'::h5ltread_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl4_c END INTERFACE @@ -2188,10 +2161,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float4 + END SUBROUTINE h5ltread_dataset_f_c_float4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float5 + ! Function: h5ltread_dataset_f_c_float5 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2207,7 +2180,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float5(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_float5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2215,33 +2188,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float5 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl5_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL5_C'::h5ltread_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl5_c END INTERFACE @@ -2249,10 +2220,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float5 + END SUBROUTINE h5ltread_dataset_f_c_float5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float6 + ! Function: h5ltread_dataset_f_c_float6 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2268,7 +2239,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float6(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_float6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2276,33 +2247,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float6 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl6_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL6_C'::h5ltread_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl6_c END INTERFACE @@ -2310,10 +2279,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float6 + END SUBROUTINE h5ltread_dataset_f_c_float6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float7 + ! Function: h5ltread_dataset_f_c_float7 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2329,7 +2298,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_float7(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_float7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2337,33 +2306,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float7 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl7_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL7_C'::h5ltread_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltread_dataset_fl7_c END INTERFACE @@ -2371,11 +2338,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_float7 + END SUBROUTINE h5ltread_dataset_f_c_float7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double1 + ! Function: h5ltread_dataset_f_c_double1 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2391,7 +2358,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double1(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_double1(loc_id,& dset_name,& type_id,& buf,& @@ -2403,42 +2370,40 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_double1 + !DEC$attributes dllexport ::h5ltread_dataset_f_c_double1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl1_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL1_C'::h5ltread_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl1_c END INTERFACE namelen = LEN(dset_name) errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double1 + END SUBROUTINE h5ltread_dataset_f_c_double1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double2 + ! Function: h5ltread_dataset_f_c_double2 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2454,7 +2419,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double2(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_double2(loc_id,& dset_name,& type_id,& buf,& @@ -2466,33 +2431,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double2 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl2_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL2_C'::h5ltread_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl2_c END INTERFACE @@ -2500,10 +2463,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double2 + END SUBROUTINE h5ltread_dataset_f_c_double2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double3 + ! Function: h5ltread_dataset_f_c_double3 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2519,7 +2482,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double3(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_double3(loc_id,& dset_name,& type_id,& buf,& @@ -2531,33 +2494,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double3 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl3_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL3_C'::h5ltread_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl3_c END INTERFACE @@ -2565,10 +2526,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double3 + END SUBROUTINE h5ltread_dataset_f_c_double3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double4 + ! Function: h5ltread_dataset_f_c_double4 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2584,7 +2545,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double4(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_double4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2592,33 +2553,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double4 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl4_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL4_C'::h5ltread_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl4_c END INTERFACE @@ -2626,10 +2585,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double4 + END SUBROUTINE h5ltread_dataset_f_c_double4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double5 + ! Function: h5ltread_dataset_f_c_double5 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2645,7 +2604,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double5(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_double5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2653,33 +2612,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double5 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl5_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL5_C'::h5ltread_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl5_c END INTERFACE @@ -2687,10 +2644,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double5 + END SUBROUTINE h5ltread_dataset_f_c_double5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double6 + ! Function: h5ltread_dataset_f_c_double6 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2706,7 +2663,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double6(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_double6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2714,33 +2671,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double6 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl6_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL6_C'::h5ltread_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl6_c END INTERFACE @@ -2748,10 +2703,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double6 + END SUBROUTINE h5ltread_dataset_f_c_double6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double7 + ! Function: h5ltread_dataset_f_c_double7 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2767,7 +2722,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_double7(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_c_double7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2775,33 +2730,31 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double7 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl7_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL7_C'::h5ltread_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltread_dataset_dl7_c END INTERFACE @@ -2809,7 +2762,7 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_double7 + END SUBROUTINE h5ltread_dataset_f_c_double7 !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_int_f_1 @@ -2845,7 +2798,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer @@ -2853,17 +2806,15 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint1_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT1_C'::h5ltmake_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer @@ -2909,7 +2860,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -2919,17 +2870,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT2_C'::h5ltmake_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -2977,7 +2926,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -2987,17 +2936,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint3_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT3_C'::h5ltmake_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -3040,7 +2987,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -3050,17 +2997,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint4_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT4_C'::h5ltmake_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -3103,7 +3048,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -3113,17 +3058,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint5_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT5_C'::h5ltmake_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -3166,7 +3109,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -3176,17 +3119,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint6_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT6_C'::h5ltmake_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -3229,7 +3170,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code @@ -3239,17 +3180,15 @@ CONTAINS INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint7_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT7_C'::h5ltmake_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(in), & @@ -3263,9 +3202,9 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_int_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_1 + ! Function: h5ltmake_dataset_c_float_f_1 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3279,7 +3218,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_1 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_float_f_1 (loc_id,& dset_name,& rank,& dims,& @@ -3291,21 +3230,23 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_1 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl1_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c @@ -3314,22 +3255,22 @@ CONTAINS INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl1_c END INTERFACE namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_1 + END SUBROUTINE h5ltmake_dataset_c_float_f_1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_2 + ! Function: h5ltmake_dataset_c_float_f_2 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3343,7 +3284,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_2 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_float_f_2 (loc_id,& dset_name,& rank,& dims,& @@ -3355,34 +3296,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_2 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl2_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL2_C'::h5ltmake_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl2_c END INTERFACE @@ -3390,12 +3329,12 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_2 + END SUBROUTINE h5ltmake_dataset_c_float_f_2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_3 + ! Function: h5ltmake_dataset_c_float_f_3 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3409,7 +3348,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_3 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_float_f_3 (loc_id,& dset_name,& rank,& dims,& @@ -3421,34 +3360,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_3 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl3_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL3_C'::h5ltmake_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl3_c END INTERFACE @@ -3456,12 +3393,12 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_3 + END SUBROUTINE h5ltmake_dataset_c_float_f_3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_4 + ! Function: h5ltmake_dataset_c_float_f_4 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3475,7 +3412,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_4 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_float_f_4 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE @@ -3483,34 +3420,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_4 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl4_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL4_C'::h5ltmake_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl4_c END INTERFACE @@ -3518,12 +3453,12 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_4 + END SUBROUTINE h5ltmake_dataset_c_float_f_4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_5 + ! Function: h5ltmake_dataset_c_float_f_5 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3537,7 +3472,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_5 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_float_f_5 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE @@ -3545,34 +3480,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl5_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL5_C'::h5ltmake_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl5_c END INTERFACE @@ -3580,12 +3513,12 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_5 + END SUBROUTINE h5ltmake_dataset_c_float_f_5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_6 + ! Function: h5ltmake_dataset_c_float_f_6 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3599,7 +3532,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_6 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_float_f_6 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE @@ -3607,34 +3540,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_6 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl6_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL6_C'::h5ltmake_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl6_c END INTERFACE @@ -3642,12 +3573,12 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_6 + END SUBROUTINE h5ltmake_dataset_c_float_f_6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_7 + ! Function: h5ltmake_dataset_c_float_f_7 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -3661,7 +3592,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_float_f_7 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_float_f_7 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE @@ -3669,34 +3600,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_7 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl7_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL7_C'::h5ltmake_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_nfl7_c END INTERFACE @@ -3704,11 +3633,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltmake_dataset_float_f_7 + END SUBROUTINE h5ltmake_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_1 + ! Function: h5ltmake_dataset_c_double_f_1 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -3724,7 +3653,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_1 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_1 (loc_id,& dset_name,& rank,& dims,& @@ -3736,34 +3665,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_1 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl1_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL1_C'::h5ltmake_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl1_c END INTERFACE @@ -3771,11 +3698,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_1 + END SUBROUTINE h5ltmake_dataset_c_double_f_1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_2 + ! Function: h5ltmake_dataset_c_double_f_2 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -3791,7 +3718,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_2 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_2 (loc_id,& dset_name,& rank,& dims,& @@ -3803,34 +3730,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_2 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl2_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL2_C'::h5ltmake_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl2_c END INTERFACE @@ -3838,10 +3763,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_2 + END SUBROUTINE h5ltmake_dataset_c_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_3 + ! Function: h5ltmake_dataset_c_double_f_3 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -3857,7 +3782,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_3 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_3 (loc_id,& dset_name,& rank,& dims,& @@ -3869,34 +3794,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_3 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl3_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL3_C'::h5ltmake_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl3_c END INTERFACE @@ -3904,10 +3827,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_3 + END SUBROUTINE h5ltmake_dataset_c_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_4 + ! Function: h5ltmake_dataset_c_double_f_4 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -3923,7 +3846,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_4 (loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_c_double_f_4 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3931,34 +3854,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_4 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl4_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL4_C'::h5ltmake_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl4_c END INTERFACE @@ -3966,10 +3887,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_4 + END SUBROUTINE h5ltmake_dataset_c_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_5 + ! Function: h5ltmake_dataset_c_double_f_5 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -3985,7 +3906,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_5 (loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_c_double_f_5 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3993,34 +3914,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl5_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL5_C'::h5ltmake_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl5_c END INTERFACE @@ -4028,10 +3947,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_5 + END SUBROUTINE h5ltmake_dataset_c_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_6 + ! Function: h5ltmake_dataset_c_double_f_6 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -4047,7 +3966,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_6 (loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_c_double_f_6 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -4055,34 +3974,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl6_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL6_C'::h5ltmake_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl6_c END INTERFACE @@ -4090,10 +4007,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_6 + END SUBROUTINE h5ltmake_dataset_c_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_7 + ! Function: h5ltmake_dataset_c_double_f_7 ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -4109,7 +4026,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_double_f_7 (loc_id, dset_name, rank, dims,& + SUBROUTINE h5ltmake_dataset_c_double_f_7 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -4117,34 +4034,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl7_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL7_C'::h5ltmake_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltmake_dataset_ndl7_c END INTERFACE @@ -4152,7 +4067,7 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_double_f_7 + END SUBROUTINE h5ltmake_dataset_c_double_f_7 !------------------------------------------------------------------------- ! Function: h5ltread_dataset_int_f_1 @@ -4187,7 +4102,7 @@ CONTAINS ! INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4195,17 +4110,15 @@ CONTAINS DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint1_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT1_C'::h5ltread_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer @@ -4251,7 +4164,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4259,17 +4172,15 @@ CONTAINS DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT2_C'::h5ltread_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer @@ -4314,7 +4225,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4322,17 +4233,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint3_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT3_C'::h5ltread_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer @@ -4373,7 +4282,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4381,17 +4290,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint4_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT4_C'::h5ltread_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer @@ -4432,7 +4339,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4440,17 +4347,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint5_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT5_C'::h5ltread_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer @@ -4491,7 +4396,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4499,17 +4404,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint6_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT6_C'::h5ltread_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer @@ -4550,7 +4453,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length @@ -4558,17 +4461,15 @@ CONTAINS DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint7_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT7_C'::h5ltread_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer @@ -4582,7 +4483,7 @@ CONTAINS !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_1 + ! Function: h5ltread_dataset_c_float_f_1 ! ! Purpose: Read a dataset ! @@ -4598,7 +4499,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_1(loc_id,& dset_name,& buf,& dims,& @@ -4609,32 +4510,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl1_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL1_C'::h5ltread_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl1_c END INTERFACE @@ -4642,11 +4541,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_1 + END SUBROUTINE h5ltread_dataset_c_float_f_1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_2 + ! Function: h5ltread_dataset_c_float_f_2 ! ! Purpose: Read a dataset ! @@ -4662,7 +4561,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_2(loc_id,& dset_name,& buf,& dims,& @@ -4673,32 +4572,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl2_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL2_C'::h5ltread_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl2_c END INTERFACE @@ -4706,10 +4603,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_2 + END SUBROUTINE h5ltread_dataset_c_float_f_2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_3 + ! Function: h5ltread_dataset_c_float_f_3 ! ! Purpose: Read a dataset ! @@ -4725,7 +4622,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_3(loc_id,& dset_name,& buf,& dims,& @@ -4736,32 +4633,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl3_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL3_C'::h5ltread_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl3_c END INTERFACE @@ -4769,10 +4664,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_3 + END SUBROUTINE h5ltread_dataset_c_float_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_4 + ! Function: h5ltread_dataset_c_float_f_4 ! ! Purpose: Read a dataset ! @@ -4788,39 +4683,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl4_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL4_C'::h5ltread_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl4_c END INTERFACE @@ -4828,10 +4721,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_4 + END SUBROUTINE h5ltread_dataset_c_float_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_5 + ! Function: h5ltread_dataset_c_float_f_5 ! ! Purpose: Read a dataset ! @@ -4847,39 +4740,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl5_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL5_C'::h5ltread_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl5_c END INTERFACE @@ -4887,10 +4778,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_5 + END SUBROUTINE h5ltread_dataset_c_float_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_6 + ! Function: h5ltread_dataset_c_float_f_6 ! ! Purpose: Read a dataset ! @@ -4906,39 +4797,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_6 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl6_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL6_C'::h5ltread_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl6_c END INTERFACE @@ -4946,10 +4835,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_6 + END SUBROUTINE h5ltread_dataset_c_float_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_7 + ! Function: h5ltread_dataset_c_float_f_7 ! ! Purpose: Read a dataset ! @@ -4965,39 +4854,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_float_f_7(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_7 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl7_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL7_C'::h5ltread_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltread_dataset_nfl7_c END INTERFACE @@ -5005,10 +4892,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_float_f_7 + END SUBROUTINE h5ltread_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_1 + ! Function: h5ltread_dataset_c_double_f_1 ! ! Purpose: Read a dataset ! @@ -5024,7 +4911,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_1(loc_id,& dset_name,& buf,& dims,& @@ -5035,32 +4922,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl1_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL1_C'::h5ltread_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl1_c END INTERFACE @@ -5068,11 +4953,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_1 + END SUBROUTINE h5ltread_dataset_c_double_f_1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_2 + ! Function: h5ltread_dataset_c_double_f_2 ! ! Purpose: Read a dataset ! @@ -5088,7 +4973,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_2(loc_id,& dset_name,& buf,& dims,& @@ -5099,32 +4984,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl2_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL2_C'::h5ltread_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl2_c END INTERFACE @@ -5132,10 +5015,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_2 + END SUBROUTINE h5ltread_dataset_c_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_3 + ! Function: h5ltread_dataset_c_double_f_3 ! ! Purpose: Read a dataset ! @@ -5151,7 +5034,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_3(loc_id,& dset_name,& buf,& dims,& @@ -5162,32 +5045,30 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl3_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL3_C'::h5ltread_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl3_c END INTERFACE @@ -5195,10 +5076,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_3 + END SUBROUTINE h5ltread_dataset_c_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_4 + ! Function: h5ltread_dataset_c_double_f_4 ! ! Purpose: Read a dataset ! @@ -5214,39 +5095,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl4_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL4_C'::h5ltread_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl4_c END INTERFACE @@ -5254,10 +5133,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_4 + END SUBROUTINE h5ltread_dataset_c_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_5 + ! Function: h5ltread_dataset_c_double_f_5 ! ! Purpose: Read a dataset ! @@ -5273,39 +5152,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl5_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL5_C'::h5ltread_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl5_c END INTERFACE @@ -5313,10 +5190,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_5 + END SUBROUTINE h5ltread_dataset_c_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_6 + ! Function: h5ltread_dataset_c_double_f_6 ! ! Purpose: Read a dataset ! @@ -5332,39 +5209,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_6 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl6_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL6_C'::h5ltread_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl6_c END INTERFACE @@ -5372,10 +5247,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_6 + END SUBROUTINE h5ltread_dataset_c_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_7 + ! Function: h5ltread_dataset_c_double_f_7 ! ! Purpose: Read a dataset ! @@ -5391,39 +5266,37 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_double_f_7(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_7 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global + INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl7_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL7_C'::h5ltread_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl7_c END INTERFACE @@ -5431,7 +5304,7 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_double_f_7 + END SUBROUTINE h5ltread_dataset_c_double_f_7 !------------------------------------------------------------------------- @@ -5464,25 +5337,23 @@ CONTAINS !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: buflen ! buffer length INTERFACE - INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - USE h5global + INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) & + BIND(C,NAME='h5ltmake_dataset_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_STRING_C'::h5ltmake_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer END FUNCTION h5ltmake_dataset_string_c END INTERFACE @@ -5524,23 +5395,21 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - USE h5global + INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) & + BIND(C,NAME='h5ltread_dataset_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_STRING_C'::h5ltread_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer END FUNCTION h5ltread_dataset_string_c END INTERFACE @@ -5591,8 +5460,8 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer @@ -5600,19 +5469,16 @@ CONTAINS INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global + INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & + BIND(C,NAME='h5ltset_attribute_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_INT_C'::h5ltset_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltset_attribute_int_c @@ -5653,35 +5519,32 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_float_f + !DEC$attributes dllexport :: h5ltset_attribute_c_float_f !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global + INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & + BIND(C,NAME='h5ltset_attribute_float_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_FLOAT_C'::h5ltset_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltset_attribute_float_c END INTERFACE @@ -5725,30 +5588,27 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global + INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & + BIND(C,NAME='h5ltset_attribute_double_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_DOUBLE_C'::h5ltset_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltset_attribute_double_c END INTERFACE @@ -5792,30 +5652,27 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(in) :: buf ! data buffer + CHARACTER(LEN=*), DIMENSION(*), INTENT(in) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTEGER(size_t) :: buflen ! data buffer length INTERFACE - INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) - USE h5global + INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) & + BIND(C,NAME='h5ltset_attribute_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_STRING_C'::h5ltset_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer INTEGER(size_t) :: buflen ! data buffer length - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(in) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer END FUNCTION h5ltset_attribute_string_c END INTERFACE @@ -5861,27 +5718,24 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global + INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & + BIND(C,NAME='h5ltget_attribute_int_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INT_C'::h5ltget_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltget_attribute_int_c END INTERFACE @@ -5894,7 +5748,7 @@ CONTAINS !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_float_f + ! Function: h5ltget_attribute_c_float_f ! ! Purpose: Reads an attribute named ATTR_NAME ! @@ -5926,28 +5780,25 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global + INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & + BIND(C,NAME='h5ltget_attribute_float_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_FLOAT_C'::h5ltget_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltget_attribute_float_c END INTERFACE @@ -5958,7 +5809,7 @@ CONTAINS END SUBROUTINE h5ltget_attribute_float_f !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_double_f + ! Function: h5ltget_attribute_c_double_f ! ! Purpose: Reads an attribute named ATTR_NAME ! @@ -5990,28 +5841,25 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - DOUBLE PRECISION,INTENT(inout),DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global + INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & + BIND(C,NAME='h5ltget_attribute_double_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_DOUBLE_C'::h5ltget_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer END FUNCTION h5ltget_attribute_double_c END INTERFACE @@ -6054,29 +5902,26 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTEGER(size_t) :: buf_size ! buf size INTERFACE - INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - USE h5global + INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) & + BIND(C,NAME='h5ltget_attribute_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_STRING_C'::h5ltget_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer INTEGER(size_t) :: buf_size ! data buffer size END FUNCTION h5ltget_attribute_string_c END INTERFACE @@ -6125,22 +5970,20 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(inout) :: rank ! rank INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - USE h5global + INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) & + BIND(C,NAME='h5ltget_dataset_ndims_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_NDIMS_C'::h5ltget_dataset_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(inout) :: rank ! rank END FUNCTION h5ltget_dataset_ndims_c END INTERFACE @@ -6182,21 +6025,19 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) - USE h5global + INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5ltfind_dataset_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTFIND_DATASET_C'::h5ltfind_dataset_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset END FUNCTION h5ltfind_dataset_c END INTERFACE @@ -6240,7 +6081,7 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions INTEGER, INTENT(inout) :: type_class ! type class INTEGER(size_t), INTENT(inout) :: type_size ! type size @@ -6248,16 +6089,14 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - USE h5global + INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) & + BIND(C,NAME='h5ltget_dataset_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_INFO_C'::h5ltget_dataset_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions INTEGER, INTENT(inout) :: type_class ! type class INTEGER(size_t), INTENT(inout) :: type_size ! type size @@ -6308,27 +6147,24 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER, INTENT(inout) :: rank ! rank INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - USE h5global + INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) & + BIND(C,NAME='h5ltget_attribute_ndims_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_NDIMS_C'::h5ltget_attribute_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER, INTENT(inout) :: rank ! rank END FUNCTION h5ltget_attribute_ndims_c END INTERFACE @@ -6375,8 +6211,8 @@ CONTAINS ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions INTEGER, INTENT(inout) :: type_class ! type class INTEGER(size_t), INTENT(inout) :: type_size ! type size @@ -6385,19 +6221,16 @@ CONTAINS INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - USE h5global + INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) & + BIND(C,NAME='h5ltget_attribute_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INFO_C'::h5ltget_attribute_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions INTEGER, INTENT(inout) :: type_class ! type class INTEGER(size_t), INTENT(inout) :: type_size ! type size @@ -6448,15 +6281,13 @@ CONTAINS INTEGER :: status INTERFACE - INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - USE h5global + INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) & + BIND(C,NAME='h5ltpath_valid_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTPATH_VALID_C'::h5ltpath_valid_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: path INTEGER(hid_t), INTENT(in) :: loc_id - CHARACTER(len=*), INTENT(in) :: path + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: path INTEGER(size_t) :: pathlen INTEGER :: check_object_valid_c END FUNCTION h5ltpath_valid_c @@ -6479,8 +6310,7 @@ CONTAINS ENDIF END SUBROUTINE h5ltpath_valid_f - ! end - ! + END MODULE H5LT diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index d035b89..314bf09 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -1335,6 +1335,7 @@ END SUBROUTINE test_datasets SUBROUTINE test_attributes() + USE ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -1358,8 +1359,8 @@ SUBROUTINE test_attributes() ! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1) :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer + REAL(C_FLOAT), DIMENSION(DIM1) :: buf3 ! Data buffer + REAL(C_FLOAT), DIMENSION(DIM1) :: bufr3 ! Data buffer DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer INTEGER :: errcode ! Error flag -- cgit v0.12 From aad4f74fa93734099be7f10b037bf768eb0d8596 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 09:38:33 -0500 Subject: [svn-r26882] renamed .f90 fo .F90 --- hl/fortran/src/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6e6e44a..c5ef916 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -39,10 +39,10 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES # Fortran Modules #----------------------------------------------------------------------------- set (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 ) set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) -- cgit v0.12 From 0a5ca8ad05ef2d2c8ffeb8205151e391e85b52c4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 13:50:29 -0500 Subject: [svn-r26885] Fixed issues with CMake and Fortran on linux. --- MANIFEST | 1 + fortran/src/CMakeLists.txt | 16 ++++++++++------ fortran/src/H5config_f.inc.cmake | 29 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 fortran/src/H5config_f.inc.cmake diff --git a/MANIFEST b/MANIFEST index 8a41f52..bf8e916 100644 --- a/MANIFEST +++ b/MANIFEST @@ -307,6 +307,7 @@ ./fortran/src/H5match_types.c ./fortran/src/HDF5.F90 ./fortran/src/H5config_f.inc.in +./fortran/src/H5config_f.inc.cmake ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c0c2569..e683725 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -19,6 +19,16 @@ if (WIN32) endif (BUILD_SHARED_LIBS) endif (WIN32) +# configure for Fortran preprocessor + +# Define Parallel variable for passing to H5config_f.inc.cmake +set (CMAKE_H5_HAVE_PARALLEL 0) +if (H5_HAVE_PARALLEL) + set (CMAKE_H5_HAVE_PARALLEL 1) +endif (H5_HAVE_PARALLEL) + +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) + #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities # H5test_kind.F90 used to generate H5fortran_detect.F90 @@ -120,12 +130,6 @@ set (f90CStub_C_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c ) -if (H5_HAVE_PARALLEL) - set (f90CStub_C_SRCS - ${f90CStub_C_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c - ) -endif (H5_HAVE_PARALLEL) set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake new file mode 100644 index 0000000..cbdfb9b --- /dev/null +++ b/fortran/src/H5config_f.inc.cmake @@ -0,0 +1,29 @@ +! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure + +! Define if we have parallel support +#define H5_HAVE_PARALLEL @CMAKE_H5_HAVE_PARALLEL@ + +#if H5_HAVE_PARALLEL==0 +#undef H5_HAVE_PARALLEL +#endif + +! Define if the intrinsic function STORAGE_SIZE exists +#define H5_FORTRAN_HAVE_STORAGE_SIZE @FORTRAN_HAVE_STORAGE_SIZE@ + +#if H5_FORTRAN_HAVE_STORAGE_SIZE==0 +#undef H5_FORTRAN_HAVE_STORAGE_SIZE +#endif + +! Define if the intrinsic function SIZEOF exists +#define H5_FORTRAN_HAVE_SIZEOF @FORTRAN_HAVE_SIZEOF@ + +#if H5_FORTRAN_HAVE_SIZEOF==0 +#undef H5_FORTRAN_HAVE_SIZEOF +#endif + +! Define if the intrinsic function C_SIZEOF exists +#define H5_FORTRAN_HAVE_C_SIZEOF @FORTRAN_HAVE_C_SIZEOF@ + +#if H5_FORTRAN_HAVE_C_SIZEOF==0 +#undef H5_FORTRAN_HAVE_C_SIZEOF +#endif -- cgit v0.12 From ab5e55bbf270172ccfa833e0068eaa2a0ccd7e07 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 14:19:29 -0500 Subject: [svn-r26886] Fixed source to avoid bug in gfortran < v4.7 Bug: 45190, 37829 --- fortran/src/H5Af.c | 18 ------------------ fortran/src/H5Pff.F90 | 5 +++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index d0821f6..7d343a2 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -118,24 +118,6 @@ done: return ret_value; } -int_f -h5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Awrite function. - */ - if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - - - /****if* H5Af/h5aclose_c * NAME * h5aclose_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 3b40757..8da1a3d 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -33,8 +33,9 @@ MODULE H5P - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, & - c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT +! Can't specify ONLY because of a bug in gfortran < v4.7 Bug: 45190, 37829 + USE, INTRINSIC :: ISO_C_BINDING !, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, & +! c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT USE H5GLOBAL INTERFACE h5pset_fapl_multi_f -- cgit v0.12 From bf47c596a5819249e427fa80724fe9c88fb9c5c2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 14:31:58 -0500 Subject: [svn-r26887] Fixed Function H5_SIZEOF_CHAR and assumed sized character length. --- fortran/test/tf.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index 109c62e..4dc339f 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -458,12 +458,12 @@ CONTAINS !DEC$endif INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: a + CHARACTER(LEN=1), INTENT(in) :: a #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_CHR = storage_size(a(1:1), c_size_t)/storage_size(c_char_'a',c_size_t) + H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) #else - H5_SIZEOF_CHR = SIZEOF(a(1:1)) + H5_SIZEOF_CHR = SIZEOF(a) #endif END FUNCTION H5_SIZEOF_CHR -- cgit v0.12 From 0cb2e26f5a6e006a8f55c0bf1a4539e6ba390d7c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 14:39:05 -0500 Subject: [svn-r26888] Removed the preprocessor option "-UNDEBUG" --- configure | 4 ++-- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f821112..d87638c 100755 --- a/configure +++ b/configure @@ -26405,13 +26405,13 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: default ($DEBUG_PKG)" >&5 $as_echo "default ($DEBUG_PKG)" >&6; } ;; X-all) DEBUG_PKG=$all_packages - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($DEBUG_PKG)" >&5 $as_echo "all ($DEBUG_PKG)" >&6; } ;; diff --git a/configure.ac b/configure.ac index ee75444..895cb30 100644 --- a/configure.ac +++ b/configure.ac @@ -1761,12 +1761,12 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([default ($DEBUG_PKG)]) ;; X-all) DEBUG_PKG=$all_packages - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([all ($DEBUG_PKG)]) ;; X-no|X-none) -- cgit v0.12 From 8884dc49af1682c03bcc3757a0627dc0ee9d30bb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 15:38:52 -0500 Subject: [svn-r26890] commented out -DNDEBUG --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d87638c..01fcbe4 100755 --- a/configure +++ b/configure @@ -26419,7 +26419,7 @@ $as_echo "all ($DEBUG_PKG)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } DEBUG_PKG= - H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_PKG" >&5 diff --git a/configure.ac b/configure.ac index 895cb30..c84d933 100644 --- a/configure.ac +++ b/configure.ac @@ -1772,7 +1772,7 @@ case "X-$DEBUG_PKG" in X-no|X-none) AC_MSG_RESULT([none]) DEBUG_PKG= - H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) AC_MSG_RESULT([$DEBUG_PKG]) -- cgit v0.12 From 5b7398b41d07c5a0a9107ef04081bad6aa18e29d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 22 Apr 2015 17:10:33 -0500 Subject: [svn-r26893] added c_long_double interfaces and updated DLLs --- fortran/src/H5Aff.F90 | 301 ++++++++++++++++++++++++++++- fortran/src/H5Dff.F90 | 338 ++++++++++++++++++++++++++++++++- fortran/src/hdf5_fortrandll.def.in | 376 +++++++++++++++++++++++-------------- 3 files changed, 873 insertions(+), 142 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 6792b45..dc54a0b 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -66,7 +66,8 @@ MODULE H5A - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR, C_LOC, C_FLOAT, C_DOUBLE + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR, C_LOC, & + C_FLOAT, C_DOUBLE, C_LONG_DOUBLE USE H5GLOBAL INTERFACE h5awrite_f @@ -102,6 +103,14 @@ MODULE H5A MODULE PROCEDURE h5awrite_c_double_5 MODULE PROCEDURE h5awrite_c_double_6 MODULE PROCEDURE h5awrite_c_double_7 + MODULE PROCEDURE h5awrite_c_long_double_scalar + MODULE PROCEDURE h5awrite_c_long_double_1 + MODULE PROCEDURE h5awrite_c_long_double_2 + MODULE PROCEDURE h5awrite_c_long_double_3 + MODULE PROCEDURE h5awrite_c_long_double_4 + MODULE PROCEDURE h5awrite_c_long_double_5 + MODULE PROCEDURE h5awrite_c_long_double_6 + MODULE PROCEDURE h5awrite_c_long_double_7 ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr @@ -140,6 +149,14 @@ MODULE H5A MODULE PROCEDURE h5aread_c_double_5 MODULE PROCEDURE h5aread_c_double_6 MODULE PROCEDURE h5aread_c_double_7 + MODULE PROCEDURE h5aread_c_long_double_scalar + MODULE PROCEDURE h5aread_c_long_double_1 + MODULE PROCEDURE h5aread_c_long_double_2 + MODULE PROCEDURE h5aread_c_long_double_3 + MODULE PROCEDURE h5aread_c_long_double_4 + MODULE PROCEDURE h5aread_c_long_double_5 + MODULE PROCEDURE h5aread_c_long_double_6 + MODULE PROCEDURE h5aread_c_long_double_7 ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr @@ -2325,6 +2342,149 @@ CONTAINS END SUBROUTINE h5awrite_c_double_7 + + SUBROUTINE h5awrite_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_scalar + + + SUBROUTINE h5awrite_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_1 + + + SUBROUTINE h5awrite_c_long_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_c_long_double_2 + + + SUBROUTINE h5awrite_c_long_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_3 + + + SUBROUTINE h5awrite_c_long_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_4 + + + SUBROUTINE h5awrite_c_long_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_5 + + + SUBROUTINE h5awrite_c_long_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_c_long_double_6 + + + SUBROUTINE h5awrite_c_long_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_c_long_double_7 + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -2973,6 +3133,145 @@ CONTAINS hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5aread_c_double_7 + SUBROUTINE h5aread_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_scalar + + SUBROUTINE h5aread_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_1 + + + SUBROUTINE h5aread_c_long_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_2 + + SUBROUTINE h5aread_c_long_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_3 + + SUBROUTINE h5aread_c_long_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_4 + + + SUBROUTINE h5aread_c_long_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_c_long_double_5 + + + SUBROUTINE h5aread_c_long_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_6 + + + SUBROUTINE h5aread_c_long_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_c_long_double_7 + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index a7120f6..5dee749 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -81,7 +81,7 @@ MODULE H5D - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_LONG_DOUBLE USE H5GLOBAL INTERFACE h5dextend_f @@ -136,6 +136,14 @@ MODULE H5D MODULE PROCEDURE h5dwrite_c_double_5 MODULE PROCEDURE h5dwrite_c_double_6 MODULE PROCEDURE h5dwrite_c_double_7 + MODULE PROCEDURE h5dwrite_c_long_double_scalar + MODULE PROCEDURE h5dwrite_c_long_double_1 + MODULE PROCEDURE h5dwrite_c_long_double_2 + MODULE PROCEDURE h5dwrite_c_long_double_3 + MODULE PROCEDURE h5dwrite_c_long_double_4 + MODULE PROCEDURE h5dwrite_c_long_double_5 + MODULE PROCEDURE h5dwrite_c_long_double_6 + MODULE PROCEDURE h5dwrite_c_long_double_7 ! This is the preferred way to call h5dwrite ! by passing an address @@ -179,6 +187,14 @@ MODULE H5D MODULE PROCEDURE h5dread_c_double_5 MODULE PROCEDURE h5dread_c_double_6 MODULE PROCEDURE h5dread_c_double_7 + MODULE PROCEDURE h5dread_c_long_double_scalar + MODULE PROCEDURE h5dread_c_long_double_1 + MODULE PROCEDURE h5dread_c_long_double_2 + MODULE PROCEDURE h5dread_c_long_double_3 + MODULE PROCEDURE h5dread_c_long_double_4 + MODULE PROCEDURE h5dread_c_long_double_5 + MODULE PROCEDURE h5dread_c_long_double_6 + MODULE PROCEDURE h5dread_c_long_double_7 ! This is the preferred way to call h5dread ! by passing an address @@ -3366,6 +3382,290 @@ CONTAINS END SUBROUTINE h5dread_c_double_7 + SUBROUTINE h5dread_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_scalar + + SUBROUTINE h5dread_c_long_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_1 + + SUBROUTINE h5dread_c_long_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_2 + + SUBROUTINE h5dread_c_long_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_3 + + SUBROUTINE h5dread_c_long_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_4 + + SUBROUTINE h5dread_c_long_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_5 + + SUBROUTINE h5dread_c_long_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_6 + + SUBROUTINE h5dread_c_long_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_c_long_double_7 + SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE @@ -3647,6 +3947,42 @@ CONTAINS END SUBROUTINE h5dwrite_c_double_7 + + SUBROUTINE h5dwrite_c_long_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_1 + !****s* H5D (F03)/h5dwrite_f_F03 ! ! NAME diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 1f475ae..10ae327 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -7,32 +7,128 @@ H5LIB_mp_H5CHECK_VERSION_F H5LIB_mp_H5GARBAGE_COLLECT_F H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE -@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF +H5LIB_mp_H5OFFSETOF ; H5_DBLE_INTERFACE -H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5PGET_DOUBLE -H5_DBLE_INTERFACE_mp_H5PSET_DOUBLE -H5_DBLE_INTERFACE_mp_H5PSET_FILL_VALUE_DOUBLE -H5_DBLE_INTERFACE_mp_H5PGET_FILL_VALUE_DOUBLE -H5_DBLE_INTERFACE_mp_H5PINSERT_DOUBLE -H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE +H5D_mp_H5DFILL_C_DOUBLE +H5D_mp_H5DREAD_C_DOUBLE_SCALAR +H5D_mp_H5DREAD_C_DOUBLE_1 +H5D_mp_H5DREAD_C_DOUBLE_2 +H5D_mp_H5DREAD_C_DOUBLE_3 +H5D_mp_H5DREAD_C_DOUBLE_4 +H5D_mp_H5DREAD_C_DOUBLE_5 +H5D_mp_H5DREAD_C_DOUBLE_6 +H5D_mp_H5DREAD_C_DOUBLE_7 +H5D_mp_H5DREAD_C_LONG_DOUBLE_SCALAR +H5D_mp_H5DREAD_C_LONG_DOUBLE_1 +H5D_mp_H5DREAD_C_LONG_DOUBLE_2 +H5D_mp_H5DREAD_C_LONG_DOUBLE_3 +H5D_mp_H5DREAD_C_LONG_DOUBLE_4 +H5D_mp_H5DREAD_C_LONG_DOUBLE_5 +H5D_mp_H5DREAD_C_LONG_DOUBLE_6 +H5D_mp_H5DREAD_C_LONG_DOUBLE_7 +H5D_mp_H5DWRITE_C_DOUBLE_SCALAR +H5D_mp_H5DWRITE_C_DOUBLE_1 +H5D_mp_H5DWRITE_C_DOUBLE_2 +H5D_mp_H5DWRITE_C_DOUBLE_3 +H5D_mp_H5DWRITE_C_DOUBLE_4 +H5D_mp_H5DWRITE_C_DOUBLE_5 +H5D_mp_H5DWRITE_C_DOUBLE_6 +H5D_mp_H5DWRITE_C_DOUBLE_7 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_SCALAR +H5D_mp_H5DWRITE_C_LONG_DOUBLE_1 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_2 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_3 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_4 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_5 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_6 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_7 +H5P_mp_H5PGET_C_DOUBLE +H5P_mp_H5PSET_C_DOUBLE +H5P_mp_H5PSET_FILL_VALUE_C_DOUBLE +H5P_mp_H5PGET_FILL_VALUE_C_DOUBLE +H5P_mp_H5PINSERT_C_DOUBLE +H5P_mp_H5PREGISTER_C_DOUBLE ; H5A +H5A_mp_H5AWRITE_INTEGER_SCALAR +H5A_mp_H5AWRITE_INTEGER_1 +H5A_mp_H5AWRITE_INTEGER_2 +H5A_mp_H5AWRITE_INTEGER_3 +H5A_mp_H5AWRITE_INTEGER_4 +H5A_mp_H5AWRITE_INTEGER_5 +H5A_mp_H5AWRITE_INTEGER_6 +H5A_mp_H5AWRITE_INTEGER_7 +H5A_mp_H5AWRITE_C_FLOAT_SCALAR +H5A_mp_H5AWRITE_C_FLOAT_1 +H5A_mp_H5AWRITE_C_FLOAT_2 +H5A_mp_H5AWRITE_C_FLOAT_3 +H5A_mp_H5AWRITE_C_FLOAT_4 +H5A_mp_H5AWRITE_C_FLOAT_5 +H5A_mp_H5AWRITE_C_FLOAT_6 +H5A_mp_H5AWRITE_C_FLOAT_7 +H5A_mp_H5AWRITE_CHAR_SCALAR +H5A_mp_H5AWRITE_CHAR_1 +H5A_mp_H5AWRITE_CHAR_2 +H5A_mp_H5AWRITE_CHAR_3 +H5A_mp_H5AWRITE_CHAR_4 +H5A_mp_H5AWRITE_CHAR_5 +H5A_mp_H5AWRITE_CHAR_6 +H5A_mp_H5AWRITE_CHAR_7 +H5A_mp_H5AREAD_INTEGER_SCALAR +H5A_mp_H5AREAD_INTEGER_1 +H5A_mp_H5AREAD_INTEGER_2 +H5A_mp_H5AREAD_INTEGER_3 +H5A_mp_H5AREAD_INTEGER_4 +H5A_mp_H5AREAD_INTEGER_5 +H5A_mp_H5AREAD_INTEGER_6 +H5A_mp_H5AREAD_INTEGER_7 +H5A_mp_H5AREAD_C_FLOAT_SCALAR +H5A_mp_H5AREAD_C_FLOAT_1 +H5A_mp_H5AREAD_C_FLOAT_2 +H5A_mp_H5AREAD_C_FLOAT_3 +H5A_mp_H5AREAD_C_FLOAT_4 +H5A_mp_H5AREAD_C_FLOAT_5 +H5A_mp_H5AREAD_C_FLOAT_6 +H5A_mp_H5AREAD_C_FLOAT_7 +H5A_mp_H5AREAD_CHAR_SCALAR +H5A_mp_H5AREAD_CHAR_1 +H5A_mp_H5AREAD_CHAR_2 +H5A_mp_H5AREAD_CHAR_3 +H5A_mp_H5AREAD_CHAR_4 +H5A_mp_H5AREAD_CHAR_5 +H5A_mp_H5AREAD_CHAR_6 +H5A_mp_H5AREAD_CHAR_7 +H5A_mp_H5AREAD_C_DOUBLE_SCALAR +H5A_mp_H5AREAD_C_DOUBLE_1 +H5A_mp_H5AREAD_C_DOUBLE_2 +H5A_mp_H5AREAD_C_DOUBLE_3 +H5A_mp_H5AREAD_C_DOUBLE_4 +H5A_mp_H5AREAD_C_DOUBLE_5 +H5A_mp_H5AREAD_C_DOUBLE_6 +H5A_mp_H5AREAD_C_DOUBLE_7 +H5A_mp_H5AWRITE_C_DOUBLE_SCALAR +H5A_mp_H5AWRITE_C_DOUBLE_1 +H5A_mp_H5AWRITE_C_DOUBLE_2 +H5A_mp_H5AWRITE_C_DOUBLE_3 +H5A_mp_H5AWRITE_C_DOUBLE_4 +H5A_mp_H5AWRITE_C_DOUBLE_5 +H5A_mp_H5AWRITE_C_DOUBLE_6 +H5A_mp_H5AWRITE_C_DOUBLE_7 +H5A_mp_H5AREAD_C_LONG_DOUBLE_SCALAR +H5A_mp_H5AREAD_C_LONG_DOUBLE_1 +H5A_mp_H5AREAD_C_LONG_DOUBLE_2 +H5A_mp_H5AREAD_C_LONG_DOUBLE_3 +H5A_mp_H5AREAD_C_LONG_DOUBLE_4 +H5A_mp_H5AREAD_C_LONG_DOUBLE_5 +H5A_mp_H5AREAD_C_LONG_DOUBLE_6 +H5A_mp_H5AREAD_C_LONG_DOUBLE_7 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_SCALAR +H5A_mp_H5AWRITE_C_LONG_DOUBLE_1 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_2 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_3 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_4 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_5 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_6 +H5A_mp_H5AWRITE_C_LONG_DOUBLE_7 H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F @@ -62,58 +158,58 @@ H5A_mp_H5ARENAME_F H5D_mp_H5DCREATE_F H5D_mp_H5DOPEN_F H5D_mp_H5DCLOSE_F -H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_OBJ -H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_DSETREG -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_1 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_2 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_3 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_4 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_5 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_6 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_7 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_1 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_2 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_3 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_4 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_5 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_6 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_7 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_REAL_1 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_2 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_3 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_4 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_5 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_6 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_7 -H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_OBJ -H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_DSETREG -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_1 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_2 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_3 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_4 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_5 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_6 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_7 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_CHAR_1 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_2 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_3 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_4 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_5 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_6 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_7 -H5D_PROVISIONAL_mp_H5DREAD_REAL_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_REAL_1 -H5D_PROVISIONAL_mp_H5DREAD_REAL_2 -H5D_PROVISIONAL_mp_H5DREAD_REAL_3 -H5D_PROVISIONAL_mp_H5DREAD_REAL_4 -H5D_PROVISIONAL_mp_H5DREAD_REAL_5 -H5D_PROVISIONAL_mp_H5DREAD_REAL_6 -H5D_PROVISIONAL_mp_H5DREAD_REAL_7 +H5D_mp_H5DWRITE_REFERENCE_OBJ +H5D_mp_H5DWRITE_REFERENCE_DSETREG +H5D_mp_H5DWRITE_INTEGER_SCALAR +H5D_mp_H5DWRITE_INTEGER_1 +H5D_mp_H5DWRITE_INTEGER_2 +H5D_mp_H5DWRITE_INTEGER_3 +H5D_mp_H5DWRITE_INTEGER_4 +H5D_mp_H5DWRITE_INTEGER_5 +H5D_mp_H5DWRITE_INTEGER_6 +H5D_mp_H5DWRITE_INTEGER_7 +H5D_mp_H5DWRITE_CHAR_SCALAR +H5D_mp_H5DWRITE_CHAR_1 +H5D_mp_H5DWRITE_CHAR_2 +H5D_mp_H5DWRITE_CHAR_3 +H5D_mp_H5DWRITE_CHAR_4 +H5D_mp_H5DWRITE_CHAR_5 +H5D_mp_H5DWRITE_CHAR_6 +H5D_mp_H5DWRITE_CHAR_7 +H5D_mp_H5DWRITE_C_FLOAT_SCALAR +H5D_mp_H5DWRITE_C_FLOAT_1 +H5D_mp_H5DWRITE_C_FLOAT_2 +H5D_mp_H5DWRITE_C_FLOAT_3 +H5D_mp_H5DWRITE_C_FLOAT_4 +H5D_mp_H5DWRITE_C_FLOAT_5 +H5D_mp_H5DWRITE_C_FLOAT_6 +H5D_mp_H5DWRITE_C_FLOAT_7 +H5D_mp_H5DREAD_REFERENCE_OBJ +H5D_mp_H5DREAD_REFERENCE_DSETREG +H5D_mp_H5DREAD_INTEGER_SCALAR +H5D_mp_H5DREAD_INTEGER_1 +H5D_mp_H5DREAD_INTEGER_2 +H5D_mp_H5DREAD_INTEGER_3 +H5D_mp_H5DREAD_INTEGER_4 +H5D_mp_H5DREAD_INTEGER_5 +H5D_mp_H5DREAD_INTEGER_6 +H5D_mp_H5DREAD_INTEGER_7 +H5D_mp_H5DREAD_CHAR_SCALAR +H5D_mp_H5DREAD_CHAR_1 +H5D_mp_H5DREAD_CHAR_2 +H5D_mp_H5DREAD_CHAR_3 +H5D_mp_H5DREAD_CHAR_4 +H5D_mp_H5DREAD_CHAR_5 +H5D_mp_H5DREAD_CHAR_6 +H5D_mp_H5DREAD_CHAR_7 +H5D_mp_H5DREAD_C_FLOAT_SCALAR +H5D_mp_H5DREAD_C_FLOAT_1 +H5D_mp_H5DREAD_C_FLOAT_2 +H5D_mp_H5DREAD_C_FLOAT_3 +H5D_mp_H5DREAD_C_FLOAT_4 +H5D_mp_H5DREAD_C_FLOAT_5 +H5D_mp_H5DREAD_C_FLOAT_6 +H5D_mp_H5DREAD_C_FLOAT_7 H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F @@ -126,9 +222,9 @@ H5D_mp_H5DWRITE_VL_REAL H5D_mp_H5DREAD_VL_REAL H5D_mp_H5DWRITE_VL_STRING H5D_mp_H5DREAD_VL_STRING -H5D_PROVISIONAL_mp_H5DFILL_INTEGER -H5D_PROVISIONAL_mp_H5DFILL_REAL -H5D_PROVISIONAL_mp_H5DFILL_CHAR +H5D_mp_H5DFILL_INTEGER +H5D_mp_H5DFILL_REAL +H5D_mp_H5DFILL_CHAR H5D_mp_H5DGET_SPACE_STATUS_F H5D_mp_H5DCREATE_ANON_F H5D_mp_H5DGET_SPACE_F @@ -138,15 +234,15 @@ H5D_mp_H5DGET_CREATE_PLIST_F H5D_mp_H5DGET_STORAGE_SIZE_F H5D_mp_H5DVLEN_GET_MAX_LEN_F H5D_mp_H5DGET_ACCESS_PLIST_F -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F +H5D_mp_H5DWRITE_PTR +H5D_mp_H5DREAD_PTR +H5D_mp_H5DVLEN_RECLAIM_F ; H5E H5E_mp_H5ECLEAR_F H5E_mp_H5EPRINT_F H5E_mp_H5EGET_MAJOR_F H5E_mp_H5EGET_MINOR_F -H5E_PROVISIONAL_mp_H5ESET_AUTO_F +H5E_mp_H5ESET_AUTO_F ; H5F H5F_mp_H5FCREATE_F H5F_mp_H5FFLUSH_F @@ -163,7 +259,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 +H5F_mp_H5FGET_FILE_IMAGE_F ; H5G H5G_mp_H5GOPEN_F H5G_mp_H5GCREATE_F @@ -225,8 +321,8 @@ H5L_mp_H5LGET_INFO_BY_IDX_F H5L_mp_H5LIS_REGISTERED_F H5L_mp_H5LMOVE_F H5L_mp_H5LGET_NAME_BY_IDX_F -@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F -@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F +H5L_mp_H5LITERATE_F +H5L_mp_H5LITERATE_BY_NAME_F ; H5O H5O_mp_H5OCLOSE_F H5O_mp_H5OCOPY_F @@ -241,11 +337,11 @@ H5O_mp_H5OOPEN_BY_IDX_F H5O_mp_H5OOPEN_F H5O_mp_H5OSET_COMMENT_F H5O_mp_H5OSET_COMMENT_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F +H5O_mp_H5OGET_INFO_BY_IDX_F +H5O_mp_H5OGET_INFO_BY_NAME_F +H5O_mp_H5OGET_INFO_F +H5O_mp_H5OVISIT_BY_NAME_F +H5O_mp_H5OVISIT_F ; H5P H5P_mp_H5PCREATE_F H5P_mp_H5PSET_PRESERVE_F @@ -256,12 +352,12 @@ H5P_mp_H5PCLOSE_F H5P_mp_H5PSET_CHUNK_F H5P_mp_H5PGET_CHUNK_F H5P_mp_H5PSET_DEFLATE_F -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_INTEGER -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_INTEGER -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_REAL -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_REAL -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_CHAR -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_CHAR +H5P_mp_H5PSET_FILL_VALUE_INTEGER +H5P_mp_H5PGET_FILL_VALUE_INTEGER +H5P_mp_H5PSET_FILL_VALUE_REAL +H5P_mp_H5PGET_FILL_VALUE_REAL +H5P_mp_H5PSET_FILL_VALUE_CHAR +H5P_mp_H5PGET_FILL_VALUE_CHAR H5P_mp_H5PGET_VERSION_F H5P_mp_H5PSET_USERBLOCK_F H5P_mp_H5PGET_USERBLOCK_F @@ -313,12 +409,12 @@ H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F -H5P_PROVISIONAL_mp_H5PSET_INTEGER -H5P_PROVISIONAL_mp_H5PSET_REAL -H5P_PROVISIONAL_mp_H5PSET_CHAR -H5P_PROVISIONAL_mp_H5PGET_INTEGER -H5P_PROVISIONAL_mp_H5PGET_REAL -H5P_PROVISIONAL_mp_H5PGET_CHAR +H5P_mp_H5PSET_INTEGER +H5P_mp_H5PSET_REAL +H5P_mp_H5PSET_CHAR +H5P_mp_H5PGET_INTEGER +H5P_mp_H5PGET_REAL +H5P_mp_H5PGET_CHAR H5P_mp_H5PEXIST_F H5P_mp_H5PGET_SIZE_F H5P_mp_H5PGET_NPROPS_F @@ -329,13 +425,13 @@ H5P_mp_H5PCOPY_PROP_F H5P_mp_H5PREMOVE_F H5P_mp_H5PUNREGISTER_F H5P_mp_H5PCLOSE_CLASS_F -H5P_PROVISIONAL_mp_H5PCREATE_CLASS_F -H5P_PROVISIONAL_mp_H5PREGISTER_INTEGER -H5P_PROVISIONAL_mp_H5PREGISTER_REAL -H5P_PROVISIONAL_mp_H5PREGISTER_CHAR -H5P_PROVISIONAL_mp_H5PINSERT_INTEGER -H5P_PROVISIONAL_mp_H5PINSERT_REAL -H5P_PROVISIONAL_mp_H5PINSERT_CHAR +H5P_mp_H5PCREATE_CLASS_F +H5P_mp_H5PREGISTER_INTEGER +H5P_mp_H5PREGISTER_REAL +H5P_mp_H5PREGISTER_CHAR +H5P_mp_H5PINSERT_INTEGER +H5P_mp_H5PINSERT_REAL +H5P_mp_H5PINSERT_CHAR H5P_mp_H5PSET_SHUFFLE_F H5P_mp_H5PSET_EDC_CHECK_F H5P_mp_H5PGET_EDC_CHECK_F @@ -382,28 +478,34 @@ H5P_mp_H5PGET_NLINKS_F H5P_mp_H5PGET_CREATE_INTER_GROUP_F H5P_mp_H5PSET_CHUNK_CACHE_F H5P_mp_H5PGET_CHUNK_CACHE_F -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILE_IMAGE_F -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILE_IMAGE_F +H5P_mp_H5PSET_FILL_VALUE_PTR +H5P_mp_H5PGET_FILL_VALUE_PTR +H5P_mp_H5PSET_PTR +H5P_mp_H5PGET_PTR +H5P_mp_H5PREGISTER_PTR +H5P_mp_H5PINSERT_PTR +H5P_mp_H5PGET_FILE_IMAGE_F +H5P_mp_H5PSET_FILE_IMAGE_F +; Parallel +@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PSET_DXPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_DXPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F ; H5R -H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F -H5R_PROVISIONAL_mp_H5RCREATE_REGION_F -H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F -H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F -H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F +H5R_mp_H5RCREATE_OBJECT_F +H5R_mp_H5RCREATE_REGION_F +H5R_mp_H5RDEREFERENCE_OBJECT_F +H5R_mp_H5RDEREFERENCE_REGION_F +H5R_mp_H5RGET_REGION_REGION_F H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F -H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F -H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F +H5R_mp_H5RGET_NAME_OBJECT_F +H5R_mp_H5RGET_NAME_REGION_F +H5R_mp_H5RGET_REGION_PTR_F +H5R_mp_H5RCREATE_PTR_F +H5R_mp_H5RDEREFERENCE_PTR_F +H5R_mp_H5RGET_NAME_PTR_F +H5R_mp_H5RGET_OBJ_TYPE_F ; H5S H5S_mp_H5SCREATE_SIMPLE_F H5S_mp_H5SCLOSE_F @@ -492,17 +594,11 @@ H5T_mp_H5TENCODE_F H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F -@H5_F03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F90 -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F03 +H5T_mp_H5TCONVERT_F +H5T_mp_H5TENUM_INSERT_F +H5T_mp_H5TENUM_INSERT_F90 +H5T_mp_H5TENUM_INSERT_F03 ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F H5Z_mp_H5ZGET_FILTER_INFO_F -; Parallel -@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F -- cgit v0.12 From 00dfc443c6aa74b961488f9e3e1c6b7e84deee4a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 09:12:22 -0500 Subject: [svn-r26895] Added missing interfaces for c_double_long. Added DLLs. --- fortran/src/H5Dff.F90 | 275 ++++++++++++++++++++++++++++++++++++- fortran/src/H5Pff.F90 | 124 ++++++++++++++++- fortran/src/hdf5_fortrandll.def.in | 112 ++++++++------- 3 files changed, 450 insertions(+), 61 deletions(-) diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 5dee749..00f3975 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -101,7 +101,6 @@ MODULE H5D END INTERFACE INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_reference_obj MODULE PROCEDURE h5dwrite_reference_dsetreg MODULE PROCEDURE h5dwrite_integer_scalar @@ -144,15 +143,12 @@ MODULE H5D MODULE PROCEDURE h5dwrite_c_long_double_5 MODULE PROCEDURE h5dwrite_c_long_double_6 MODULE PROCEDURE h5dwrite_c_long_double_7 - ! This is the preferred way to call h5dwrite ! by passing an address MODULE PROCEDURE h5dwrite_ptr - END INTERFACE INTERFACE h5dread_f - MODULE PROCEDURE h5dread_reference_obj MODULE PROCEDURE h5dread_reference_dsetreg MODULE PROCEDURE h5dread_integer_scalar @@ -195,7 +191,6 @@ MODULE H5D MODULE PROCEDURE h5dread_c_long_double_5 MODULE PROCEDURE h5dread_c_long_double_6 MODULE PROCEDURE h5dread_c_long_double_7 - ! This is the preferred way to call h5dread ! by passing an address MODULE PROCEDURE h5dread_ptr @@ -247,6 +242,7 @@ MODULE H5D MODULE PROCEDURE h5dfill_integer MODULE PROCEDURE h5dfill_c_float MODULE PROCEDURE h5dfill_c_double + MODULE PROCEDURE h5dfill_c_long_double MODULE PROCEDURE h5dfill_char END INTERFACE @@ -3947,6 +3943,39 @@ CONTAINS END SUBROUTINE h5dwrite_c_double_7 + SUBROUTINE h5dwrite_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_scalar SUBROUTINE h5dwrite_c_long_double_1(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) @@ -3983,6 +4012,218 @@ CONTAINS END SUBROUTINE h5dwrite_c_long_double_1 + SUBROUTINE h5dwrite_c_long_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_2 + + SUBROUTINE h5dwrite_c_long_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_3 + + SUBROUTINE h5dwrite_c_long_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_4 + + SUBROUTINE h5dwrite_c_long_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_5 + + SUBROUTINE h5dwrite_c_long_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_6 + + SUBROUTINE h5dwrite_c_long_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_c_long_double_7 + !****s* H5D (F03)/h5dwrite_f_F03 ! ! NAME @@ -4261,6 +4502,30 @@ CONTAINS END SUBROUTINE h5dfill_c_double + SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_long_double + ! ! NAME ! h5dfill_char diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 8da1a3d..4b5fc66 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -67,6 +67,7 @@ MODULE H5P MODULE PROCEDURE h5pset_integer MODULE PROCEDURE h5pset_c_float MODULE PROCEDURE h5pset_c_double + MODULE PROCEDURE h5pset_c_long_double MODULE PROCEDURE h5pset_char ! Recommended procedure: MODULE PROCEDURE h5pset_ptr @@ -77,6 +78,7 @@ MODULE H5P MODULE PROCEDURE h5pget_integer MODULE PROCEDURE h5pget_c_float MODULE PROCEDURE h5pget_c_double + MODULE PROCEDURE h5pget_c_long_double ! Recommended procedure: MODULE PROCEDURE h5pget_ptr END INTERFACE @@ -85,6 +87,7 @@ MODULE H5P MODULE PROCEDURE h5pregister_integer MODULE PROCEDURE h5pregister_c_float MODULE PROCEDURE h5pregister_c_double + MODULE PROCEDURE h5pregister_c_long_double ! Recommended procedure: MODULE PROCEDURE h5pregister_ptr END INTERFACE @@ -6581,6 +6584,43 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pset_c_double +! +!****s* H5P (F90)/h5pset_c_long_double +! +! NAME +! h5pset_c_long_double +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_c_long_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_c_long_double SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE @@ -6717,6 +6757,43 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pget_c_double +!****s* H5P (F90)/h5pget_c_long_double +! +! NAME +! h5pget_c_long_double +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_c_long_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL(KIND=C_LONG_DOUBLE), INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_c_long_double + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6828,8 +6905,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, value) END SUBROUTINE h5pget_ptr - - ! !****s* H5P (F03)/h5pregister_f_F90 ! @@ -6934,7 +7009,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER :: name_len TYPE(C_PTR) :: f_ptr ! C address - f_ptr = C_LOC(value) name_len = LEN(name) @@ -6942,6 +7016,50 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_c_double + +! +!****s* H5P/h5pregister_c_long_double +! +! NAME +! h5pregister_c_long_double +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_c_long_double(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_c_long_double + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 10ae327..5626ecb 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -8,46 +8,6 @@ H5LIB_mp_H5GARBAGE_COLLECT_F H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE H5LIB_mp_H5OFFSETOF -; H5_DBLE_INTERFACE -H5D_mp_H5DFILL_C_DOUBLE -H5D_mp_H5DREAD_C_DOUBLE_SCALAR -H5D_mp_H5DREAD_C_DOUBLE_1 -H5D_mp_H5DREAD_C_DOUBLE_2 -H5D_mp_H5DREAD_C_DOUBLE_3 -H5D_mp_H5DREAD_C_DOUBLE_4 -H5D_mp_H5DREAD_C_DOUBLE_5 -H5D_mp_H5DREAD_C_DOUBLE_6 -H5D_mp_H5DREAD_C_DOUBLE_7 -H5D_mp_H5DREAD_C_LONG_DOUBLE_SCALAR -H5D_mp_H5DREAD_C_LONG_DOUBLE_1 -H5D_mp_H5DREAD_C_LONG_DOUBLE_2 -H5D_mp_H5DREAD_C_LONG_DOUBLE_3 -H5D_mp_H5DREAD_C_LONG_DOUBLE_4 -H5D_mp_H5DREAD_C_LONG_DOUBLE_5 -H5D_mp_H5DREAD_C_LONG_DOUBLE_6 -H5D_mp_H5DREAD_C_LONG_DOUBLE_7 -H5D_mp_H5DWRITE_C_DOUBLE_SCALAR -H5D_mp_H5DWRITE_C_DOUBLE_1 -H5D_mp_H5DWRITE_C_DOUBLE_2 -H5D_mp_H5DWRITE_C_DOUBLE_3 -H5D_mp_H5DWRITE_C_DOUBLE_4 -H5D_mp_H5DWRITE_C_DOUBLE_5 -H5D_mp_H5DWRITE_C_DOUBLE_6 -H5D_mp_H5DWRITE_C_DOUBLE_7 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_SCALAR -H5D_mp_H5DWRITE_C_LONG_DOUBLE_1 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_2 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_3 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_4 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_5 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_6 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_7 -H5P_mp_H5PGET_C_DOUBLE -H5P_mp_H5PSET_C_DOUBLE -H5P_mp_H5PSET_FILL_VALUE_C_DOUBLE -H5P_mp_H5PGET_FILL_VALUE_C_DOUBLE -H5P_mp_H5PINSERT_C_DOUBLE -H5P_mp_H5PREGISTER_C_DOUBLE ; H5A H5A_mp_H5AWRITE_INTEGER_SCALAR H5A_mp_H5AWRITE_INTEGER_1 @@ -184,6 +144,22 @@ H5D_mp_H5DWRITE_C_FLOAT_4 H5D_mp_H5DWRITE_C_FLOAT_5 H5D_mp_H5DWRITE_C_FLOAT_6 H5D_mp_H5DWRITE_C_FLOAT_7 +H5D_mp_H5DWRITE_C_DOUBLE_SCALAR +H5D_mp_H5DWRITE_C_DOUBLE_1 +H5D_mp_H5DWRITE_C_DOUBLE_2 +H5D_mp_H5DWRITE_C_DOUBLE_3 +H5D_mp_H5DWRITE_C_DOUBLE_4 +H5D_mp_H5DWRITE_C_DOUBLE_5 +H5D_mp_H5DWRITE_C_DOUBLE_6 +H5D_mp_H5DWRITE_C_DOUBLE_7 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_SCALAR +H5D_mp_H5DWRITE_C_LONG_DOUBLE_1 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_2 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_3 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_4 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_5 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_6 +H5D_mp_H5DWRITE_C_LONG_DOUBLE_7 H5D_mp_H5DREAD_REFERENCE_OBJ H5D_mp_H5DREAD_REFERENCE_DSETREG H5D_mp_H5DREAD_INTEGER_SCALAR @@ -210,6 +186,22 @@ H5D_mp_H5DREAD_C_FLOAT_4 H5D_mp_H5DREAD_C_FLOAT_5 H5D_mp_H5DREAD_C_FLOAT_6 H5D_mp_H5DREAD_C_FLOAT_7 +H5D_mp_H5DREAD_C_DOUBLE_SCALAR +H5D_mp_H5DREAD_C_DOUBLE_1 +H5D_mp_H5DREAD_C_DOUBLE_2 +H5D_mp_H5DREAD_C_DOUBLE_3 +H5D_mp_H5DREAD_C_DOUBLE_4 +H5D_mp_H5DREAD_C_DOUBLE_5 +H5D_mp_H5DREAD_C_DOUBLE_6 +H5D_mp_H5DREAD_C_DOUBLE_7 +H5D_mp_H5DREAD_C_LONG_DOUBLE_SCALAR +H5D_mp_H5DREAD_C_LONG_DOUBLE_1 +H5D_mp_H5DREAD_C_LONG_DOUBLE_2 +H5D_mp_H5DREAD_C_LONG_DOUBLE_3 +H5D_mp_H5DREAD_C_LONG_DOUBLE_4 +H5D_mp_H5DREAD_C_LONG_DOUBLE_5 +H5D_mp_H5DREAD_C_LONG_DOUBLE_6 +H5D_mp_H5DREAD_C_LONG_DOUBLE_7 H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F @@ -222,9 +214,11 @@ H5D_mp_H5DWRITE_VL_REAL H5D_mp_H5DREAD_VL_REAL H5D_mp_H5DWRITE_VL_STRING H5D_mp_H5DREAD_VL_STRING -H5D_mp_H5DFILL_INTEGER -H5D_mp_H5DFILL_REAL H5D_mp_H5DFILL_CHAR +H5D_mp_H5DFILL_INTEGER +H5D_mp_H5DFILL_C_FLOAT +H5D_mp_H5DFILL_C_DOUBLE +H5D_mp_H5DFILL_C_LONG_DOUBLE H5D_mp_H5DGET_SPACE_STATUS_F H5D_mp_H5DCREATE_ANON_F H5D_mp_H5DGET_SPACE_F @@ -352,12 +346,16 @@ H5P_mp_H5PCLOSE_F H5P_mp_H5PSET_CHUNK_F H5P_mp_H5PGET_CHUNK_F H5P_mp_H5PSET_DEFLATE_F -H5P_mp_H5PSET_FILL_VALUE_INTEGER -H5P_mp_H5PGET_FILL_VALUE_INTEGER -H5P_mp_H5PSET_FILL_VALUE_REAL -H5P_mp_H5PGET_FILL_VALUE_REAL H5P_mp_H5PSET_FILL_VALUE_CHAR H5P_mp_H5PGET_FILL_VALUE_CHAR +H5P_mp_H5PSET_FILL_VALUE_INTEGER +H5P_mp_H5PGET_FILL_VALUE_INTEGER +H5P_mp_H5PSET_FILL_VALUE_C_FLOAT +H5P_mp_H5PGET_FILL_VALUE_C_FLOAT +H5P_mp_H5PSET_FILL_VALUE_C_DOUBLE +H5P_mp_H5PGET_FILL_VALUE_C_DOUBLE +H5P_mp_H5PSET_FILL_VALUE_C_LONG_DOUBLE +H5P_mp_H5PGET_FILL_VALUE_C_LONG_DOUBLE H5P_mp_H5PGET_VERSION_F H5P_mp_H5PSET_USERBLOCK_F H5P_mp_H5PGET_USERBLOCK_F @@ -409,12 +407,16 @@ H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F -H5P_mp_H5PSET_INTEGER -H5P_mp_H5PSET_REAL H5P_mp_H5PSET_CHAR -H5P_mp_H5PGET_INTEGER -H5P_mp_H5PGET_REAL +H5P_mp_H5PSET_INTEGER +H5P_mp_H5PSET_C_FLOAT +H5P_mp_H5PSET_C_DOUBLE +H5P_mp_H5PSET_C_LONG_DOUBLE H5P_mp_H5PGET_CHAR +H5P_mp_H5PGET_INTEGER +H5P_mp_H5PGET_C_FLOAT +H5P_mp_H5PGET_C_DOUBLE +H5P_mp_H5PGET_C_LONG_DOUBLE H5P_mp_H5PEXIST_F H5P_mp_H5PGET_SIZE_F H5P_mp_H5PGET_NPROPS_F @@ -427,11 +429,15 @@ H5P_mp_H5PUNREGISTER_F H5P_mp_H5PCLOSE_CLASS_F H5P_mp_H5PCREATE_CLASS_F H5P_mp_H5PREGISTER_INTEGER -H5P_mp_H5PREGISTER_REAL +H5P_mp_H5PREGISTER_C_FLOAT +H5P_mp_H5PREGISTER_C_DOUBLE +H5P_mp_H5PREGISTER_C_LONG_DOUBLE H5P_mp_H5PREGISTER_CHAR -H5P_mp_H5PINSERT_INTEGER -H5P_mp_H5PINSERT_REAL H5P_mp_H5PINSERT_CHAR +H5P_mp_H5PINSERT_INTEGER +H5P_mp_H5PINSERT_C_FLOAT +H5P_mp_H5PINSERT_C_DOUBLE +H5P_mp_H5PINSERT_C_LONG_DOUBLE H5P_mp_H5PSET_SHUFFLE_F H5P_mp_H5PSET_EDC_CHECK_F H5P_mp_H5PGET_EDC_CHECK_F -- cgit v0.12 From 36eec4b620f4ed7502ab832ae3baf3971f37e7f5 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 09:39:31 -0500 Subject: [svn-r26896] added LONG_DOUBLE interfaces --- hl/fortran/src/H5LTff.F90 | 3347 +++++++++++++++++++++++------- hl/fortran/src/hdf5_hl_fortrandll.def.in | 171 ++ 2 files changed, 2721 insertions(+), 797 deletions(-) create mode 100644 hl/fortran/src/hdf5_hl_fortrandll.def.in diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 5e1db19..92f067d 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -44,6 +44,13 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_double5 MODULE PROCEDURE h5ltmake_dataset_f_c_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_double7 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double1 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double2 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double3 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double4 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double5 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double6 + MODULE PROCEDURE h5ltmake_dataset_f_c_long_double7 END INTERFACE INTERFACE h5ltread_dataset_f @@ -68,6 +75,13 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_double5 MODULE PROCEDURE h5ltread_dataset_f_c_double6 MODULE PROCEDURE h5ltread_dataset_f_c_double7 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double1 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double2 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double3 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double4 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double5 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double6 + MODULE PROCEDURE h5ltread_dataset_f_c_long_double7 END INTERFACE INTERFACE h5ltmake_dataset_int_f @@ -95,6 +109,13 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 END INTERFACE INTERFACE h5ltmake_dataset_double_f @@ -112,6 +133,13 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 END INTERFACE INTERFACE h5ltread_dataset_int_f @@ -139,6 +167,13 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_4 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 END INTERFACE INTERFACE h5ltread_dataset_double_f @@ -156,6 +191,13 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_4 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 + MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 END INTERFACE CONTAINS @@ -1493,15 +1535,15 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_double7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int1 + ! Function: h5ltmake_dataset_f_c_long_double1 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: pvn@ncsa.uiuc.edu ! - ! Date: September 22, 2004 + ! Date: September 1, 2004 ! ! Comments: ! @@ -1509,11 +1551,12 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_long_double1(loc_id,& dset_name,& + rank,& + dims,& type_id,& buf,& - dims,& errcode ) IMPLICIT NONE @@ -1521,48 +1564,54 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int1 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double1 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int1_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl1_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int1_c + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int1 + END SUBROUTINE h5ltmake_dataset_f_c_long_double1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 + ! Function: h5ltmake_dataset_f_c_long_double2 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: pvn@ncsa.uiuc.edu ! - ! Date: September 22, 2004 + ! Date: September 1, 2004 ! ! Comments: ! @@ -1570,11 +1619,12 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_long_double2(loc_id,& dset_name,& + rank,& + dims,& type_id,& buf,& - dims,& errcode ) IMPLICIT NONE @@ -1582,50 +1632,52 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int2 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int2_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl2_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int2_c + END FUNCTION h5ltmake_dataset_dl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int2 + END SUBROUTINE h5ltmake_dataset_f_c_long_double2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int3 + ! Function: h5ltmake_dataset_f_c_long_double3 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: pvn@ncsa.uiuc.edu ! - ! Date: September 22, 2004 + ! Date: September 1, 2004 ! ! Comments: ! @@ -1633,11 +1685,12 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& + SUBROUTINE h5ltmake_dataset_f_c_long_double3(loc_id,& dset_name,& + rank,& + dims,& type_id,& buf,& - dims,& errcode ) IMPLICIT NONE @@ -1645,50 +1698,52 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int3 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int3_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl3_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int3_c + END FUNCTION h5ltmake_dataset_dl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int3 + END SUBROUTINE h5ltmake_dataset_f_c_long_double3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int4 + ! Function: h5ltmake_dataset_f_c_long_double4 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 12, 2011 + ! Date: March 7, 2011 ! ! Comments: ! @@ -1696,58 +1751,60 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_f_c_long_double4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int4 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int4_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl4_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int4_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int4 + END SUBROUTINE h5ltmake_dataset_f_c_long_double4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int5 + ! Function: h5ltmake_dataset_f_c_long_double5 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 12, 2011 + ! Date: March 7, 2011 ! ! Comments: ! @@ -1755,58 +1812,60 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_f_c_long_double5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int5 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int5_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl5_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int5_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int5 + END SUBROUTINE h5ltmake_dataset_f_c_long_double5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 + ! Function: h5ltmake_dataset_f_c_long_double6 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 12, 2011 + ! Date: March 7, 2011 ! ! Comments: ! @@ -1814,58 +1873,60 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - + SUBROUTINE h5ltmake_dataset_f_c_long_double6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int6 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int6_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl6_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int6_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - END SUBROUTINE h5ltread_dataset_f_int6 + END SUBROUTINE h5ltmake_dataset_f_c_long_double6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int7 + ! Function: h5ltmake_dataset_f_c_long_double7 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 12, 2011 + ! Date: March 7, 2011 ! ! Comments: ! @@ -1873,51 +1934,52 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_f_c_long_double7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int7 + !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int7_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_dl7_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int7_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int7 + errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + END SUBROUTINE h5ltmake_dataset_f_c_long_double7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float1 + ! Function: h5ltread_dataset_f_int1 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -1933,7 +1995,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float1(loc_id,& + SUBROUTINE h5ltread_dataset_f_int1(loc_id,& dset_name,& type_id,& buf,& @@ -1945,7 +2007,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float1 + !DEC$attributes dllexport :: h5ltread_dataset_f_int1 !DEC$endif ! @@ -1953,32 +2015,32 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl1_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int1_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl1_c + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf + INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float1 + END SUBROUTINE h5ltread_dataset_f_int1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float2 + ! Function: h5ltread_dataset_f_int2 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -1994,7 +2056,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float2(loc_id,& + SUBROUTINE h5ltread_dataset_f_int2(loc_id,& dset_name,& type_id,& buf,& @@ -2006,24 +2068,23 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float2 + !DEC$attributes dllexport :: h5ltread_dataset_f_int2 !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl2_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int2_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2031,18 +2092,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl2_c + END FUNCTION h5ltread_dataset_int2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float2 + END SUBROUTINE h5ltread_dataset_f_int2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float3 + ! Function: h5ltread_dataset_f_int3 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2058,7 +2119,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float3(loc_id,& + SUBROUTINE h5ltread_dataset_f_int3(loc_id,& dset_name,& type_id,& buf,& @@ -2070,7 +2131,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float3 + !DEC$attributes dllexport :: h5ltread_dataset_f_int3 !DEC$endif ! @@ -2080,13 +2141,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl3_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int3_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2094,18 +2155,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl3_c + END FUNCTION h5ltread_dataset_int3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float3 + END SUBROUTINE h5ltread_dataset_f_int3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float4 + ! Function: h5ltread_dataset_f_int4 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2113,7 +2174,7 @@ CONTAINS ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 8, 2011 + ! Date: March 12, 2011 ! ! Comments: ! @@ -2121,7 +2182,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float4(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2129,7 +2190,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float4 + !DEC$attributes dllexport :: h5ltread_dataset_f_int4 !DEC$endif ! @@ -2139,13 +2200,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl4_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int4_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2153,18 +2214,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl4_c + END FUNCTION h5ltread_dataset_int4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float4 + END SUBROUTINE h5ltread_dataset_f_int4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float5 + ! Function: h5ltread_dataset_f_int5 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2172,7 +2233,7 @@ CONTAINS ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 8, 2011 + ! Date: March 12, 2011 ! ! Comments: ! @@ -2180,7 +2241,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float5(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2188,7 +2249,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float5 + !DEC$attributes dllexport :: h5ltread_dataset_f_int5 !DEC$endif ! @@ -2198,13 +2259,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl5_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int5_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2212,18 +2273,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl5_c + END FUNCTION h5ltread_dataset_int5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float5 + END SUBROUTINE h5ltread_dataset_f_int5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float6 + ! Function: h5ltread_dataset_f_int6 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2231,7 +2292,7 @@ CONTAINS ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 8, 2011 + ! Date: March 12, 2011 ! ! Comments: ! @@ -2239,7 +2300,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float6(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2247,7 +2308,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float6 + !DEC$attributes dllexport :: h5ltread_dataset_f_int6 !DEC$endif ! @@ -2257,13 +2318,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl6_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int6_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2271,18 +2332,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl6_c + END FUNCTION h5ltread_dataset_int6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float6 + END SUBROUTINE h5ltread_dataset_f_int6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float7 + ! Function: h5ltread_dataset_f_int7 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2290,7 +2351,7 @@ CONTAINS ! ! Programmer: M. Scot Breitenfeld ! - ! Date: March 8, 2011 + ! Date: March 12, 2011 ! ! Comments: ! @@ -2298,7 +2359,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float7(loc_id, dset_name, type_id, buf, & + SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE @@ -2306,7 +2367,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float7 + !DEC$attributes dllexport :: h5ltread_dataset_f_int7 !DEC$endif ! @@ -2316,13 +2377,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl7_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_int7_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2330,19 +2391,19 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl7_c + END FUNCTION h5ltread_dataset_int7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_float7 + END SUBROUTINE h5ltread_dataset_f_int7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double1 + ! Function: h5ltread_dataset_f_c_float1 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2358,7 +2419,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double1(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_float1(loc_id,& dset_name,& type_id,& buf,& @@ -2370,7 +2431,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_c_double1 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float1 !DEC$endif ! @@ -2378,14 +2439,14 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl1_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl1_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2393,17 +2454,17 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl1_c + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_double1 + END SUBROUTINE h5ltread_dataset_f_c_float1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double2 + ! Function: h5ltread_dataset_f_c_float2 ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2419,7 +2480,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double2(loc_id,& + SUBROUTINE h5ltread_dataset_f_c_float2(loc_id,& dset_name,& type_id,& buf,& @@ -2431,23 +2492,24 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double2 + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float2 !DEC$endif ! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl2_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl2_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2455,20 +2517,1733 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl2_c + END FUNCTION h5ltread_dataset_fl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - END SUBROUTINE h5ltread_dataset_f_c_double2 + END SUBROUTINE h5ltread_dataset_f_c_float2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double3 + ! Function: h5ltread_dataset_f_c_float3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_float3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl3_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_float3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_float4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_float4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl4_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_float4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_float5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_float5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl5_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_float5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_float6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_float6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl6_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_float6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_float7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_float7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_float7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_fl7_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_float7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport ::h5ltread_dataset_f_c_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl1_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl2_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl3_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl4_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl5_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl6_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_double7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_double7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl7_c') + IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport ::h5ltread_dataset_f_c_long_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl1_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl2_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl3_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl4_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl5_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl6_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_c_long_double7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_c_long_double7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_dl7_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_c_long_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint1_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_2 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint3_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint4_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint5_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint6_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nint7_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_c_float_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_c_float_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl1_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_c_float_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_c_float_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_c_float_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl2_c') + IMPORT :: C_CHAR, C_FLOAT + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL(KIND=C_FLOAT), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_c_float_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_c_float_f_3 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -2482,11 +4257,11 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double3(loc_id,& + SUBROUTINE h5ltmake_dataset_c_float_f_3 (loc_id,& dset_name,& - type_id,& - buf,& + rank,& dims,& + buf,& errcode ) IMPLICIT NONE @@ -2494,44 +4269,45 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double3 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl3_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl3_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl3_c + END FUNCTION h5ltmake_dataset_nfl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltread_dataset_f_c_double3 + END SUBROUTINE h5ltmake_dataset_c_float_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double4 + ! Function: h5ltmake_dataset_c_float_f_4 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -2545,52 +4321,53 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double4(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_c_float_f_4 (loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double4 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl4_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl4_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl4_c + END FUNCTION h5ltmake_dataset_nfl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltread_dataset_f_c_double4 + END SUBROUTINE h5ltmake_dataset_c_float_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double5 + ! Function: h5ltmake_dataset_c_float_f_5 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -2604,52 +4381,53 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double5(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_c_float_f_5 (loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl5_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl5_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl5_c + END FUNCTION h5ltmake_dataset_nfl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltread_dataset_f_c_double5 + END SUBROUTINE h5ltmake_dataset_c_float_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double6 + ! Function: h5ltmake_dataset_c_float_f_6 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -2663,52 +4441,53 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double6(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_c_float_f_6 (loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double6 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl6_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl6_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl6_c + END FUNCTION h5ltmake_dataset_nfl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltread_dataset_f_c_double6 + END SUBROUTINE h5ltmake_dataset_c_float_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double7 + ! Function: h5ltmake_dataset_c_float_f_7 ! - ! Purpose: Read a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type ! ! Return: Success: 0, Failure: -1 ! @@ -2722,52 +4501,53 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double7(loc_id, dset_name, type_id, buf, & - dims, errcode ) + SUBROUTINE h5ltmake_dataset_c_float_f_7 (loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double7 + !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl7_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_nfl7_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + REAL(KIND=C_FLOAT), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl7_c + END FUNCTION h5ltmake_dataset_nfl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - END SUBROUTINE h5ltread_dataset_f_c_double7 + END SUBROUTINE h5ltmake_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_1 + ! Function: h5ltmake_dataset_c_double_f_1 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -2781,7 +4561,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_1 (loc_id,& dset_name,& rank,& dims,& @@ -2793,7 +4573,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_1 !DEC$endif ! @@ -2801,14 +4581,15 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint1_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl1_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2817,19 +4598,21 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint1_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) + errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_c_double_f_1 - END SUBROUTINE h5ltmake_dataset_int_f_1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_2 + ! Function: h5ltmake_dataset_c_double_f_2 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -2843,7 +4626,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_2 (loc_id,& dset_name,& rank,& dims,& @@ -2855,7 +4638,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_2 !DEC$endif ! @@ -2865,14 +4648,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint2_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl2_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2881,21 +4663,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint2_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_2 + errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + END SUBROUTINE h5ltmake_dataset_c_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_3 + ! Function: h5ltmake_dataset_c_double_f_3 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -2909,7 +4690,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_double_f_3 (loc_id,& dset_name,& rank,& dims,& @@ -2921,7 +4702,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_3 !DEC$endif ! @@ -2931,14 +4712,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint3_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl3_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2947,20 +4727,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint3_c + END FUNCTION h5ltmake_dataset_ndl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_int_f_3 + END SUBROUTINE h5ltmake_dataset_c_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_4 + ! Function: h5ltmake_dataset_c_double_f_4 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -2974,7 +4754,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_double_f_4 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -2982,7 +4762,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_4 !DEC$endif ! @@ -2992,14 +4772,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint4_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl4_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3008,20 +4787,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint4_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_int_f_4 + END SUBROUTINE h5ltmake_dataset_c_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_5 + ! Function: h5ltmake_dataset_c_double_f_5 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3035,7 +4814,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_double_f_5 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3043,7 +4822,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! @@ -3053,14 +4832,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint5_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl5_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3069,20 +4847,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint5_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_int_f_5 + END SUBROUTINE h5ltmake_dataset_c_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_6 + ! Function: h5ltmake_dataset_c_double_f_6 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3096,7 +4874,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_double_f_6 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3104,7 +4882,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! @@ -3114,14 +4892,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint6_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl6_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3130,20 +4907,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint6_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_int_f_6 + END SUBROUTINE h5ltmake_dataset_c_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_7 + ! Function: h5ltmake_dataset_c_double_f_7 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3157,7 +4934,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_double_f_7 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3165,7 +4942,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 + !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 !DEC$endif ! @@ -3175,14 +4952,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & + REAL(KIND=C_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint7_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl7_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3191,20 +4967,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint7_c + REAL(KIND=C_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_int_f_7 + END SUBROUTINE h5ltmake_dataset_c_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_1 + ! Function: h5ltmake_dataset_c_long_double_f_1 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3218,7 +4994,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_1 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_long_double_f_1 (loc_id,& dset_name,& rank,& dims,& @@ -3230,7 +5006,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_1 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_1 !DEC$endif ! @@ -3238,39 +5014,38 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl1_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl1_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl1_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_c_long_double_f_1 - END SUBROUTINE h5ltmake_dataset_c_float_f_1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_2 + ! Function: h5ltmake_dataset_c_long_double_f_2 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3284,7 +5059,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_2 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_long_double_f_2 (loc_id,& dset_name,& rank,& dims,& @@ -3296,7 +5071,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_2 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_2 !DEC$endif ! @@ -3306,13 +5081,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl2_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl2_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3321,20 +5096,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl2_c + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_c_float_f_2 + END SUBROUTINE h5ltmake_dataset_c_long_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_3 + ! Function: h5ltmake_dataset_c_long_double_f_3 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3348,7 +5123,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_3 (loc_id,& + SUBROUTINE h5ltmake_dataset_c_long_double_f_3 (loc_id,& dset_name,& rank,& dims,& @@ -3360,7 +5135,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_3 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_3 !DEC$endif ! @@ -3370,13 +5145,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl3_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl3_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3385,20 +5160,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl3_c + END FUNCTION h5ltmake_dataset_ndl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_c_float_f_3 + END SUBROUTINE h5ltmake_dataset_c_long_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_4 + ! Function: h5ltmake_dataset_c_long_double_f_4 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3412,7 +5187,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_4 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_long_double_f_4 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3420,7 +5195,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_4 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_4 !DEC$endif ! @@ -3430,13 +5205,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl4_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl4_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3445,20 +5220,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl4_c + END FUNCTION h5ltmake_dataset_ndl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_c_float_f_4 + END SUBROUTINE h5ltmake_dataset_c_long_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_5 + ! Function: h5ltmake_dataset_c_long_double_f_5 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3472,7 +5247,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_5 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_long_double_f_5 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3480,7 +5255,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_5 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 !DEC$endif ! @@ -3490,13 +5265,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl5_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl5_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3505,20 +5280,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl5_c + END FUNCTION h5ltmake_dataset_ndl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_c_float_f_5 + END SUBROUTINE h5ltmake_dataset_c_long_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_6 + ! Function: h5ltmake_dataset_c_long_double_f_6 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3532,7 +5307,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_6 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_long_double_f_6 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3540,7 +5315,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_6 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 !DEC$endif ! @@ -3550,13 +5325,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl6_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl6_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3565,20 +5340,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl6_c + END FUNCTION h5ltmake_dataset_ndl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - END SUBROUTINE h5ltmake_dataset_c_float_f_6 + END SUBROUTINE h5ltmake_dataset_c_long_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_7 + ! Function: h5ltmake_dataset_c_long_double_f_7 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! ! Return: Success: 0, Failure: -1 ! @@ -3592,7 +5367,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_7 (loc_id, dset_name, rank, dims, & + SUBROUTINE h5ltmake_dataset_c_long_double_f_7 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE @@ -3600,7 +5375,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_7 + !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 !DEC$endif ! @@ -3610,13 +5385,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl7_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_ndl7_c') + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3625,21 +5400,20 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & + REAL(KIND=C_LONG_DOUBLE), INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl7_c + END FUNCTION h5ltmake_dataset_ndl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_c_float_f_7 + errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + END SUBROUTINE h5ltmake_dataset_c_long_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_1 + ! Function: h5ltread_dataset_int_f_1 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3653,11 +5427,10 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_1 (loc_id,& + SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& dset_name,& - rank,& - dims,& buf,& + dims,& errcode ) IMPLICIT NONE @@ -3665,46 +5438,44 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 !DEC$endif ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl1_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint1_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl1_c + END FUNCTION h5ltread_dataset_nint1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_1 + END SUBROUTINE h5ltread_dataset_int_f_1 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_2 + ! Function: h5ltread_dataset_int_f_2 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3718,11 +5489,10 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_2 (loc_id,& + SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& dset_name,& - rank,& - dims,& buf,& + dims,& errcode ) IMPLICIT NONE @@ -3730,45 +5500,43 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl2_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint2_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl2_c + END FUNCTION h5ltread_dataset_nint2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_2 + END SUBROUTINE h5ltread_dataset_int_f_2 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_3 + ! Function: h5ltread_dataset_int_f_3 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3782,11 +5550,10 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_3 (loc_id,& + SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& dset_name,& - rank,& - dims,& buf,& + dims,& errcode ) IMPLICIT NONE @@ -3794,45 +5561,43 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl3_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint3_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl3_c + END FUNCTION h5ltread_dataset_nint3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_3 + END SUBROUTINE h5ltread_dataset_int_f_3 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_4 + ! Function: h5ltread_dataset_int_f_4 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3846,53 +5611,50 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_4 (loc_id, dset_name, rank, dims,& - buf, errcode ) + SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl4_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint4_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl4_c + END FUNCTION h5ltread_dataset_nint4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_4 + END SUBROUTINE h5ltread_dataset_int_f_4 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_5 + ! Function: h5ltread_dataset_int_f_5 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3906,53 +5668,50 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_5 (loc_id, dset_name, rank, dims,& - buf, errcode ) + SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl5_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint5_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl5_c + END FUNCTION h5ltread_dataset_nint5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_5 + END SUBROUTINE h5ltread_dataset_int_f_5 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_6 + ! Function: h5ltread_dataset_int_f_6 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -3966,53 +5725,50 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_6 (loc_id, dset_name, rank, dims,& - buf, errcode ) + SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl6_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint6_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl6_c + END FUNCTION h5ltread_dataset_nint6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - END SUBROUTINE h5ltmake_dataset_c_double_f_6 + END SUBROUTINE h5ltread_dataset_int_f_6 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_7 + ! Function: h5ltread_dataset_int_f_7 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -4026,51 +5782,49 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_7 (loc_id, dset_name, rank, dims,& - buf, errcode ) + SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 !DEC$endif ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl7_c') - IMPORT :: C_CHAR, C_DOUBLE + INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nint7_c') + IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl7_c + END FUNCTION h5ltread_dataset_nint7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_7 - END SUBROUTINE h5ltmake_dataset_c_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_1 + ! Function: h5ltread_dataset_c_float_f_1 ! ! Purpose: Read a dataset ! @@ -4086,7 +5840,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_1(loc_id,& dset_name,& buf,& dims,& @@ -4097,22 +5851,22 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_1 !DEC$endif ! - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint1_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl1_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4120,19 +5874,19 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint1_c + END FUNCTION h5ltread_dataset_nfl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_1 + END SUBROUTINE h5ltread_dataset_c_float_f_1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_2 + ! Function: h5ltread_dataset_c_float_f_2 ! ! Purpose: Read a dataset ! @@ -4148,7 +5902,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_2(loc_id,& dset_name,& buf,& dims,& @@ -4159,7 +5913,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_2 !DEC$endif ! @@ -4168,13 +5922,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint2_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl2_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4182,18 +5936,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint2_c + END FUNCTION h5ltread_dataset_nfl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_2 + END SUBROUTINE h5ltread_dataset_c_float_f_2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_3 + ! Function: h5ltread_dataset_c_float_f_3 ! ! Purpose: Read a dataset ! @@ -4209,7 +5963,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_c_float_f_3(loc_id,& dset_name,& buf,& dims,& @@ -4220,7 +5974,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_3 !DEC$endif ! @@ -4229,13 +5983,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint3_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl3_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4243,18 +5997,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint3_c + END FUNCTION h5ltread_dataset_nfl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_3 + END SUBROUTINE h5ltread_dataset_c_float_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_4 + ! Function: h5ltread_dataset_c_float_f_4 ! ! Purpose: Read a dataset ! @@ -4270,14 +6024,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_4 !DEC$endif ! @@ -4286,13 +6040,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint4_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl4_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4300,18 +6054,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint4_c + END FUNCTION h5ltread_dataset_nfl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_4 + END SUBROUTINE h5ltread_dataset_c_float_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_5 + ! Function: h5ltread_dataset_c_float_f_5 ! ! Purpose: Read a dataset ! @@ -4327,14 +6081,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_5 !DEC$endif ! @@ -4343,13 +6097,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint5_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl5_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4357,18 +6111,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint5_c + END FUNCTION h5ltread_dataset_nfl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_5 + END SUBROUTINE h5ltread_dataset_c_float_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_6 + ! Function: h5ltread_dataset_c_float_f_6 ! ! Purpose: Read a dataset ! @@ -4384,14 +6138,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_6 !DEC$endif ! @@ -4400,13 +6154,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint6_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl6_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4414,18 +6168,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint6_c + END FUNCTION h5ltread_dataset_nfl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - END SUBROUTINE h5ltread_dataset_int_f_6 + END SUBROUTINE h5ltread_dataset_c_float_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_7 + ! Function: h5ltread_dataset_c_float_f_7 ! ! Purpose: Read a dataset ! @@ -4441,14 +6195,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_float_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 + !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_7 !DEC$endif ! @@ -4457,13 +6211,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint7_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_nfl7_c') + IMPORT :: C_CHAR, C_FLOAT IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4471,19 +6225,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & + REAL(KIND=C_FLOAT), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint7_c + END FUNCTION h5ltread_dataset_nfl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_7 + errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + END SUBROUTINE h5ltread_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_1 + ! Function: h5ltread_dataset_c_double_f_1 ! ! Purpose: Read a dataset ! @@ -4499,7 +6252,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_1(loc_id,& dset_name,& buf,& dims,& @@ -4510,7 +6263,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_1 !DEC$endif ! @@ -4519,13 +6272,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl1_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl1_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4533,19 +6286,19 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl1_c + END FUNCTION h5ltread_dataset_ndl1_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_1 + END SUBROUTINE h5ltread_dataset_c_double_f_1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_2 + ! Function: h5ltread_dataset_c_double_f_2 ! ! Purpose: Read a dataset ! @@ -4561,7 +6314,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_2(loc_id,& dset_name,& buf,& dims,& @@ -4572,7 +6325,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_2 !DEC$endif ! @@ -4581,13 +6334,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl2_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl2_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4595,18 +6348,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl2_c + END FUNCTION h5ltread_dataset_ndl2_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_2 + END SUBROUTINE h5ltread_dataset_c_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_3 + ! Function: h5ltread_dataset_c_double_f_3 ! ! Purpose: Read a dataset ! @@ -4622,7 +6375,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_c_double_f_3(loc_id,& dset_name,& buf,& dims,& @@ -4633,7 +6386,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_3 !DEC$endif ! @@ -4642,13 +6395,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl3_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl3_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4656,18 +6409,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl3_c + END FUNCTION h5ltread_dataset_ndl3_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_3 + END SUBROUTINE h5ltread_dataset_c_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_4 + ! Function: h5ltread_dataset_c_double_f_4 ! ! Purpose: Read a dataset ! @@ -4683,14 +6436,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_4 !DEC$endif ! @@ -4699,13 +6452,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl4_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl4_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4713,18 +6466,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl4_c + END FUNCTION h5ltread_dataset_ndl4_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_4 + END SUBROUTINE h5ltread_dataset_c_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_5 + ! Function: h5ltread_dataset_c_double_f_5 ! ! Purpose: Read a dataset ! @@ -4740,14 +6493,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_5 !DEC$endif ! @@ -4756,13 +6509,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl5_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl5_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4770,18 +6523,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl5_c + END FUNCTION h5ltread_dataset_ndl5_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_5 + END SUBROUTINE h5ltread_dataset_c_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_6 + ! Function: h5ltread_dataset_c_double_f_6 ! ! Purpose: Read a dataset ! @@ -4797,14 +6550,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_6 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_6 !DEC$endif ! @@ -4813,13 +6566,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl6_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl6_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4827,18 +6580,18 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl6_c + END FUNCTION h5ltread_dataset_ndl6_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_6 + END SUBROUTINE h5ltread_dataset_c_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_7 + ! Function: h5ltread_dataset_c_double_f_7 ! ! Purpose: Read a dataset ! @@ -4854,14 +6607,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_7(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_double_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_7 + !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_7 !DEC$endif ! @@ -4869,33 +6622,33 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl7_c') - IMPORT :: C_CHAR, C_FLOAT + INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_ndl7_c') + IMPORT :: C_CHAR, C_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & + REAL(KIND=C_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl7_c + END FUNCTION h5ltread_dataset_ndl7_c END INTERFACE namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_float_f_7 + END SUBROUTINE h5ltread_dataset_c_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_1 + ! Function: h5ltread_dataset_c_long_double_f_1 ! ! Purpose: Read a dataset ! @@ -4911,7 +6664,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_c_long_double_f_1(loc_id,& dset_name,& buf,& dims,& @@ -4922,7 +6675,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_1 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_1 !DEC$endif ! @@ -4931,13 +6684,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl1_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -4945,7 +6698,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl1_c END INTERFACE @@ -4953,11 +6706,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_1 + END SUBROUTINE h5ltread_dataset_c_long_double_f_1 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_2 + ! Function: h5ltread_dataset_c_long_double_f_2 ! ! Purpose: Read a dataset ! @@ -4973,7 +6726,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_c_long_double_f_2(loc_id,& dset_name,& buf,& dims,& @@ -4984,7 +6737,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_2 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_2 !DEC$endif ! @@ -4993,13 +6746,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl2_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5007,7 +6760,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl2_c END INTERFACE @@ -5015,10 +6768,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_2 + END SUBROUTINE h5ltread_dataset_c_long_double_f_2 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_3 + ! Function: h5ltread_dataset_c_long_double_f_3 ! ! Purpose: Read a dataset ! @@ -5034,7 +6787,7 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_c_long_double_f_3(loc_id,& dset_name,& buf,& dims,& @@ -5045,7 +6798,7 @@ CONTAINS ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_3 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_3 !DEC$endif ! @@ -5054,13 +6807,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl3_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5068,7 +6821,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl3_c END INTERFACE @@ -5076,10 +6829,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_3 + END SUBROUTINE h5ltread_dataset_c_long_double_f_3 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_4 + ! Function: h5ltread_dataset_c_long_double_f_4 ! ! Purpose: Read a dataset ! @@ -5095,14 +6848,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_long_double_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_4 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_4 !DEC$endif ! @@ -5111,13 +6864,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl4_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5125,7 +6878,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl4_c END INTERFACE @@ -5133,10 +6886,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_4 + END SUBROUTINE h5ltread_dataset_c_long_double_f_4 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_5 + ! Function: h5ltread_dataset_c_long_double_f_5 ! ! Purpose: Read a dataset ! @@ -5152,14 +6905,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_long_double_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_5 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_5 !DEC$endif ! @@ -5168,13 +6921,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl5_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5182,7 +6935,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl5_c END INTERFACE @@ -5190,10 +6943,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_5 + END SUBROUTINE h5ltread_dataset_c_long_double_f_5 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_6 + ! Function: h5ltread_dataset_c_long_double_f_6 ! ! Purpose: Read a dataset ! @@ -5209,14 +6962,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_long_double_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_6 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_6 !DEC$endif ! @@ -5225,13 +6978,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl6_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5239,7 +6992,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl6_c END INTERFACE @@ -5247,10 +7000,10 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_6 + END SUBROUTINE h5ltread_dataset_c_long_double_f_6 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_7 + ! Function: h5ltread_dataset_c_long_double_f_7 ! ! Purpose: Read a dataset ! @@ -5266,14 +7019,14 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_7(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_c_long_double_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_7 + !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_7 !DEC$endif ! @@ -5282,13 +7035,13 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer INTERFACE INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & BIND(C,NAME='h5ltread_dataset_ndl7_c') - IMPORT :: C_CHAR, C_DOUBLE + IMPORT :: C_CHAR, C_LONG_DOUBLE IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -5296,7 +7049,7 @@ CONTAINS INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer END FUNCTION h5ltread_dataset_ndl7_c END INTERFACE @@ -5304,7 +7057,7 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - END SUBROUTINE h5ltread_dataset_c_double_f_7 + END SUBROUTINE h5ltread_dataset_c_long_double_f_7 !------------------------------------------------------------------------- diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in new file mode 100644 index 0000000..e4a29a5 --- /dev/null +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -0,0 +1,171 @@ +EXPORTS +; H5DS +H5DS_mp_H5DSSET_SCALE_F +H5DS_mp_H5DSATTACH_SCALE_F +H5DS_mp_H5DSDETACH_SCALE_F +H5DS_mp_H5DSIS_ATTACHED_F +H5DS_mp_H5DSIS_SCALE_F +H5DS_mp_H5DSSET_LABEL_F +H5DS_mp_H5DSGET_LABEL_F +H5DS_mp_H5DSGET_SCALE_NAME_F +H5DS_mp_H5DSGET_NUM_SCALES_F +; H5IM +H5I_mp_H5IMMAKE_IMAGE_8BIT_F +H5I_mp_H5IMREAD_IMAGE_F +H5I_mp_H5IMMAKE_IMAGE_24BIT_F +H5I_mp_H5IMGET_IMAGE_INFO_F +H5I_mp_H5IMIS_IMAGE_F +H5I_mp_H5IMMAKE_PALETTE_F +H5I_mp_H5IMLINK_PALETTE_F +H5I_mp_H5IMUNLINK_PALETTE_F +H5I_mp_H5IMGET_NPALETTES_F +H5I_mp_H5IMGET_PALETTE_INFO_F +H5I_mp_H5IMGET_PALETTE_F +H5I_mp_H5IMIS_PALETTE_F +; H5LT +H5LT_mp_H5LTMAKE_DATASET_F_INT1 +H5LT_mp_H5LTMAKE_DATASET_F_INT2 +H5LT_mp_H5LTMAKE_DATASET_F_INT3 +H5LT_mp_H5LTMAKE_DATASET_F_INT4 +H5LT_mp_H5LTMAKE_DATASET_F_INT5 +H5LT_mp_H5LTMAKE_DATASET_F_INT6 +H5LT_mp_H5LTMAKE_DATASET_F_INT7 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT1 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT2 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT3 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT4 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT5 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT6 +H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT7 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE1 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE2 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE3 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE4 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE5 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE6 +H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE7 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE1 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE2 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE3 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE4 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE5 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE6 +H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE7 +H5LT_mp_H5LTREAD_DATASET_F_INT1 +H5LT_mp_H5LTREAD_DATASET_F_INT2 +H5LT_mp_H5LTREAD_DATASET_F_INT3 +H5LT_mp_H5LTREAD_DATASET_F_INT4 +H5LT_mp_H5LTREAD_DATASET_F_INT5 +H5LT_mp_H5LTREAD_DATASET_F_INT6 +H5LT_mp_H5LTREAD_DATASET_F_INT7 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT1 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT2 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT3 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT4 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT5 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT6 +H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT7 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE1 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE2 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE3 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE4 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE5 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE6 +H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE7 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE1 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE2 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE3 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE4 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE5 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE6 +H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE7 +H5LT_mp_H5LTMAKE_DATASET_INT_F_1 +H5LT_mp_H5LTMAKE_DATASET_INT_F_2 +H5LT_mp_H5LTMAKE_DATASET_INT_F_3 +H5LT_mp_H5LTMAKE_DATASET_INT_F_4 +H5LT_mp_H5LTMAKE_DATASET_INT_F_5 +H5LT_mp_H5LTMAKE_DATASET_INT_F_6 +H5LT_mp_H5LTMAKE_DATASET_INT_F_7 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_1 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_2 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_3 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_4 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_6 +H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_7 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_1 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_2 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_3 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_4 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_1 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_2 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_3 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_4 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 +H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 +H5LT_mp_H5LTREAD_DATASET_INT_F_1 +H5LT_mp_H5LTREAD_DATASET_INT_F_2 +H5LT_mp_H5LTREAD_DATASET_INT_F_3 +H5LT_mp_H5LTREAD_DATASET_INT_F_4 +H5LT_mp_H5LTREAD_DATASET_INT_F_5 +H5LT_mp_H5LTREAD_DATASET_INT_F_6 +H5LT_mp_H5LTREAD_DATASET_INT_F_7 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_1 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_2 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_3 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_4 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_5 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_6 +H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_7 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_1 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_2 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_3 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_4 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_5 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_6 +H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_7 +H5LT_mp_H5LTMAKE_DATASET_STRING_F +H5LT_mp_H5LTREAD_DATASET_STRING_F +H5LT_mp_H5LTSET_ATTRIBUTE_INT_F +H5LT_mp_H5LTSET_ATTRIBUTE_C_FLOAT_F +H5LT_mp_H5LTSET_ATTRIBUTE_DOUBLE_F +H5LT_mp_H5LTSET_ATTRIBUTE_STRING_F +H5LT_mp_H5LTGET_ATTRIBUTE_INT_F +H5LT_mp_H5LTGET_ATTRIBUTE_FLOAT_F +H5LT_mp_H5LTGET_ATTRIBUTE_DOUBLE_F +H5LT_mp_H5LTGET_ATTRIBUTE_STRING_F +H5LT_mp_H5LTGET_DATASET_NDIMS_F +H5LT_mp_H5LTFIND_DATASET_F +H5LT_mp_H5LTGET_DATASET_INFO_F +H5LT_mp_H5LTGET_ATTRIBUTE_NDIMS_F +H5LT_mp_H5LTGET_ATTRIBUTE_INFO_F +H5LT_mp_H5LTPATH_VALID_F +; H5TB +H5TB_mp_H5TBMAKE_TABLE_F +H5TB_mp_H5TBWRITE_FIELD_NAME_F_INT +H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_FLOAT +H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_DOUBLE +H5TB_mp_H5TBWRITE_FIELD_NAME_F_STRING +H5TB_mp_H5TBREAD_FIELD_NAME_F_INT +H5TB_mp_H5TBREAD_FIELD_NAME_F_C_FLOAT +H5TB_mp_H5TBREAD_FIELD_NAME_F_C_DOUBLE +H5TB_mp_H5TBREAD_FIELD_NAME_F_STRING +H5TB_mp_H5TBWRITE_FIELD_INDEX_F_INT +H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_FLOAT +H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_DOUBLE +H5TB_mp_H5TBWRITE_FIELD_INDEX_F_STRING +H5TB_mp_H5TBREAD_FIELD_INDEX_F_INT +H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_FLOAT +H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_DOUBLE +H5TB_mp_H5TBREAD_FIELD_INDEX_F_STRING +H5TB_mp_H5TBINSERT_FIELD_F_INT +H5TB_mp_H5TBINSERT_FIELD_F_C_FLOAT +H5TB_mp_H5TBINSERT_FIELD_F_C_DOUBLE +H5TB_mp_H5TBINSERT_FIELD_F_STRING +H5TB_mp_H5TBDELETE_FIELD_F +H5TB_mp_H5TBGET_TABLE_INFO_F +H5TB_mp_H5TBGET_FIELD_INFO_F -- cgit v0.12 From 05a320e9eb464e7b905fcfd4fc3bb4f4d83793ed Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 09:46:21 -0500 Subject: [svn-r26897] Added DLL file for HL Fortran. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index bf8e916..5f3ffed 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2322,6 +2322,7 @@ ./hl/fortran/examples/ex_ds1.f90 ./hl/fortran/examples/exlite.f90 ./hl/fortran/examples/run-hlfortran-ex.sh.in +./hl/fortran/src/hdf5_hl_fortrandll.def.in ./hl/fortran/src/H5DSfc.c ./hl/fortran/src/H5DSff.F90 ./hl/fortran/src/H5IMcc.c -- cgit v0.12 From f0c4d55f914d3d7ee27703fbeb54c99ffa1603eb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 15:12:13 -0500 Subject: [svn-r26908] Added missing c_long_double interfaces, now handles promotion of reals and integers to 8 bytes, added C wrappers that take pointers from Fortran. --- hl/fortran/src/CMakeLists.txt | 10 + hl/fortran/src/H5IMff.F90 | 102 +- hl/fortran/src/H5LTf90proto.h | 1100 +----- hl/fortran/src/H5LTfc.c | 1188 +------ hl/fortran/src/H5LTff.F90 | 5412 ++++-------------------------- hl/fortran/src/H5TBfc.c | 287 -- hl/fortran/src/H5TBff.F90 | 1252 +++---- hl/fortran/src/hdf5_hl_fortrandll.def.in | 16 +- hl/fortran/test/tstlite.f90 | 4 +- hl/fortran/test/tsttable.f90 | 1 - 10 files changed, 1170 insertions(+), 8202 deletions(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index c5ef916..e52855c 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -2,6 +2,16 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- +# configure def file for shared libs on windows +if (WIN32) + if (BUILD_SHARED_LIBS) + if (MSVC) + configure_file (${HDF5_HL_F90_SRC_SOURCE_DIR}/hdf5_hl_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def @ONLY) + endif (MSVC) + endif (BUILD_SHARED_LIBS) +endif (WIN32) + +#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES ( diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 index 64fc644..4408dda 100644 --- a/hl/fortran/src/H5IMff.F90 +++ b/hl/fortran/src/H5IMff.F90 @@ -14,11 +14,24 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! This file contains FORTRAN90 interfaces for H5IM functions +! This file contains FORTRAN interfaces for H5IM functions +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. ! MODULE h5im - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 CONTAINS @@ -49,13 +62,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_8bit_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(in) :: width ! width of image @@ -106,13 +112,7 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imread_image_f -!DEC$endif -! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer @@ -164,13 +164,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_24bit_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(in) :: width ! width of image @@ -234,13 +227,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_image_info_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(inout) :: width ! width of image @@ -298,13 +284,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_image_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER :: errcode ! error code @@ -354,13 +333,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_palette_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions @@ -411,12 +383,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imlink_palette_f -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(len=*), INTENT(in) :: pal_name ! palette name @@ -468,13 +434,6 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imunlink_palette_f -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset @@ -527,13 +486,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_npalettes_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(inout) :: npals ! palettes @@ -583,14 +535,6 @@ CONTAINS errcode ) IMPLICIT NONE - - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_info_f -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset @@ -642,13 +586,6 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_f -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset @@ -699,13 +636,6 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_palette_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER :: errcode ! error code diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 4714b83..834e63a 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -82,882 +82,32 @@ h5ltmake_dataset_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltmake_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltmake_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltread_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); +h5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf); +h5ltset_attribute_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf, char *dtype); HDF5_HL_F90CSTUBDLL int_f -h5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltget_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltget_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf); + void *buf, char* dtype); HDF5_HL_F90CSTUBDLL int_f @@ -1172,53 +322,7 @@ h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); HDF5_HL_F90CSTUBDLL int_f @@ -1232,53 +336,7 @@ h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); HDF5_HL_F90CSTUBDLL int_f @@ -1293,50 +351,6 @@ h5tbwrite_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbwrite_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbwrite_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, @@ -1348,50 +362,6 @@ h5tbread_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbread_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5tbread_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, @@ -1403,46 +373,6 @@ h5tbinsert_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbinsert_field_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbinsert_field_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbinsert_field_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -h5tbinsert_field_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index f5e9153..b957d17 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -89,948 +89,66 @@ done: return ret_value; } +/*------------------------------------------------------------------------- +* Function: H5LTread_dataset_c +* +* Purpose: Call H5LTmake_dataset +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: September 09, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + int_f -h5ltmake_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -h5ltmake_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return h5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -/*------------------------------------------------------------------------- -* Function: H5LTread_dataset_c -* -* Purpose: Call H5LTmake_dataset -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: September 09, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - hid_t c_type_id; - char *c_name = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); - if (c_name == NULL) - goto done; - - /* - * call H5LTread_dataset function. - */ - c_loc_id = (hid_t)*loc_id; - c_type_id = (hid_t)*type_id; - - ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - - return ret_value; -} - -int_f -h5ltread_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -h5ltread_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) +h5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) { - return h5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + hid_t c_type_id; + char *c_name = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + if (c_name == NULL) + goto done; + + /* + * call H5LTread_dataset function. + */ + c_loc_id = (hid_t)*loc_id; + c_type_id = (hid_t)*type_id; + + ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + + return ret_value; } + /*------------------------------------------------------------------------- * Function: H5LTmake_dataset_string_c * @@ -1152,8 +270,6 @@ done: return ret_value; } - - /*------------------------------------------------------------------------- * Function: H5LTset_attribute_int_c * @@ -1174,19 +290,20 @@ done: */ int_f -h5ltset_attribute_int_c(hid_t_f *loc_id, +h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, size_t_f *size, - void *buf) + void *buf, char *dtype) { int ret_value = -1; herr_t ret; hid_t c_loc_id; char *c_name = NULL; char *c_attrname = NULL; + char *c_buf = NULL; size_t c_size; /* @@ -1206,17 +323,29 @@ h5ltset_attribute_int_c(hid_t_f *loc_id, c_loc_id = (hid_t)*loc_id; c_size = (size_t)*size; - if (sizeof(int_f) == sizeof(int)) + if( HDstrncmp(dtype,"I",1) == 0 ) { + if (sizeof(int_f) == sizeof(int)) ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); - else if (sizeof(int_f) == sizeof(long long)) + else if (sizeof(int_f) == sizeof(long)) + ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); + else if (sizeof(int_f) == sizeof(long long)) ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size); - else + else + goto done; + } else if ( HDstrncmp(dtype,"R",1) == 0 ) { + ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname, (float *)buf,c_size); + } else if ( HDstrncmp(dtype,"D",1) == 0 ) { + ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname, (double *)buf,c_size); + } else if ( HDstrncmp(dtype,"C",1) == 0 ) { + + c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); + if (c_buf == NULL) goto done; + ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); + } if (ret < 0) - goto done; + goto done; ret_value = 0; @@ -1225,6 +354,8 @@ done: HDfree(c_name); if(c_attrname!=NULL) HDfree(c_attrname); + if(c_buf!=NULL) + HDfree(c_buf); return ret_value; } @@ -1443,7 +574,7 @@ done: } /*------------------------------------------------------------------------- -* Function: H5LTget_attribute_int_c +* Function: H5LTget_attribute_c * * Purpose: Call H5LTget_attribute_int * @@ -1462,86 +593,12 @@ done: */ int_f -h5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * call H5LTget_attribute_int function. - */ - c_loc_id = (hid_t)*loc_id; - - if(sizeof(int_f) == sizeof(int)) - ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf); - else - goto done; - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - - return ret_value; -} - - -/*------------------------------------------------------------------------- -* Function: H5LTget_attribute_float_c -* -* Purpose: Call H5LTget_attribute_float -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltget_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf) + void *buf, char *dtype) { int ret_value = -1; herr_t ret; @@ -1565,79 +622,26 @@ h5ltget_attribute_float_c(hid_t_f *loc_id, */ c_loc_id = (hid_t)*loc_id; - ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - -/*------------------------------------------------------------------------- -* Function: H5LTget_attribute_double_c -* -* Purpose: Call H5LTget_attribute_double -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltget_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) + if( HDstrncmp(dtype,"I",1) == 0) { + if(sizeof(int_f) == sizeof(int)) + ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf); + else if (sizeof(int_f) == sizeof(long)) + ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf); + else if (sizeof(int_f) == sizeof(long long)) + ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf); + else goto done; - - /* - * call H5LTget_attribute_int function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf); + } else if ( HDstrncmp(dtype,"R",1) == 0 ) { + ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf); + } else if ( HDstrncmp(dtype,"D",1) == 0 ) { + ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf); + } if (ret < 0) goto done; ret_value = 0; - done: if(c_name!=NULL) HDfree(c_name); diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 92f067d..0d05a36 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -14,11 +14,24 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! This file contains FORTRAN90 interfaces for H5LT functions +! This file contains FORTRAN interfaces for H5LT functions +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. ! MODULE h5lt - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 @@ -200,13 +213,81 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 END INTERFACE + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + TYPE(C_PTR), VALUE :: buf ! data buffer + END FUNCTION h5ltmake_dataset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf,dims) & + BIND(C,NAME='h5ltread_dataset_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + TYPE(C_PTR), VALUE :: buf ! data buffer + END FUNCTION h5ltread_dataset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype) & + BIND(C,NAME='h5ltset_attribute_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + TYPE(C_PTR), VALUE :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the + ! the buffer: + ! R=Real, D=DOUBLE, I=Interger, C=Character + END FUNCTION h5ltset_attribute_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype) & + BIND(C,NAME='h5ltget_attribute_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + TYPE(C_PTR), VALUE :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the + ! the buffer: + ! R=Real, D=DOUBLE, I=Interger, C=Character + END FUNCTION h5ltget_attribute_c + END INTERFACE + CONTAINS !------------------------------------------------------------------------- ! Make/Read dataset functions !------------------------------------------------------------------------- !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int1 + ! Function(s): h5ltmake_dataset_f_int(1-7) ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -218,7 +299,7 @@ CONTAINS ! ! Comments: ! - ! Modifications: + ! Modifications: Changed to passing C_PTR. ! !------------------------------------------------------------------------- @@ -231,61 +312,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int1_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int1_c - END INTERFACE - + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& dset_name,& rank,& @@ -295,63 +337,24 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& dset_name,& rank,& @@ -361,14 +364,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -377,59 +372,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int3_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -438,59 +394,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int4_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -499,59 +416,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int5_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -560,59 +438,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int6_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -621,33 +460,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_int7_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int7 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float1 + ! Function(s): h5ltmake_dataset_f_c_float(1-7) ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -672,61 +496,23 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl1_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float2(loc_id,& dset_name,& rank,& @@ -736,14 +522,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -752,47 +530,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl2_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float3(loc_id,& dset_name,& rank,& @@ -802,14 +549,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -818,63 +557,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl3_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float4(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -883,59 +579,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl4_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float5(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -944,59 +601,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl5_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float6(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1005,59 +623,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl6_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_float7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float7(loc_id, dset_name, rank, dims,& type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_float7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1066,32 +645,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_fl7_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_float7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double1 + ! Function(s): h5ltmake_dataset_f_c_double(1-7) ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1116,65 +681,23 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl1_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double2(loc_id,& dset_name,& rank,& @@ -1184,14 +707,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1200,47 +715,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl2_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double3(loc_id,& dset_name,& rank,& @@ -1250,14 +734,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1266,59 +742,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl3_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl3_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double4(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1327,59 +763,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl4_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl4_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3), dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double5(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1388,59 +784,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl5_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl5_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double6(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1449,59 +805,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl6_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl6_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_double7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double7(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_double7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1510,32 +826,17 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl7_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl7_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_double7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double1 + ! Function(s): h5ltmake_dataset_f_c_long_double(1-7) ! ! Purpose: Creates and writes a dataset of a type TYPE_ID ! @@ -1560,65 +861,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl1_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl1_c - END INTERFACE + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double2(loc_id,& dset_name,& rank,& @@ -1628,14 +886,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1644,47 +894,15 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl2_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl2_c - END INTERFACE + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double3(loc_id,& dset_name,& rank,& @@ -1694,14 +912,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1710,59 +920,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl3_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl3_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double4(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1771,59 +941,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl4_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl4_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3), dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double5(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1832,59 +962,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl5_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl5_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double6(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1893,59 +982,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl6_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl6_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_c_long_double7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_long_double7(loc_id, dset_name, rank, dims, & type_id, buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_c_long_double7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -1954,32 +1003,17 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_dl7_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl7_c - END INTERFACE + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_c_long_double7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int1 + ! Function(s): h5ltread_dataset_f_int(1-7) ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2003,39 +1037,19 @@ CONTAINS errcode ) IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen + TYPE(C_PTR) :: f_ptr - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int1_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int1 @@ -2064,14 +1078,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2079,46 +1085,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& dset_name,& type_id,& @@ -2127,14 +1103,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2142,58 +1110,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int3_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2201,58 +1131,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int4_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2260,26 +1152,13 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int5_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int5 @@ -2304,14 +1183,6 @@ CONTAINS dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2319,58 +1190,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int6_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2378,32 +1211,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_int7_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_int7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float1 + ! Function(s): h5ltread_dataset_f_c_float(1-7) ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2427,59 +1247,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl1_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float1 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float2(loc_id,& dset_name,& type_id,& @@ -2488,15 +1271,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2504,46 +1278,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl2_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float3(loc_id,& dset_name,& type_id,& @@ -2552,14 +1296,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2567,58 +1303,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl3_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2626,58 +1324,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl4_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2685,26 +1345,13 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl5_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float5 @@ -2729,14 +1376,6 @@ CONTAINS dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2744,58 +1383,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl6_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_float7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_float7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2803,32 +1404,19 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_fl7_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_float7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double1 + ! Function(s): h5ltread_dataset_f_c_double(1-7) ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -2852,59 +1440,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_c_double1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl1_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double1 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double2(loc_id,& dset_name,& type_id,& @@ -2913,14 +1464,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2928,46 +1471,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl2_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double3(loc_id,& dset_name,& type_id,& @@ -2976,14 +1489,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -2991,58 +1496,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl3_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3050,58 +1517,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl4_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3109,58 +1538,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl5_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3168,58 +1559,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl6_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_double7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_double7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_double7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3227,31 +1580,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl7_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_double7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double1 + ! Function(s): h5ltread_dataset_f_c_long_double(1-7) ! ! Purpose: Read a dataset of a type TYPE_ID ! @@ -3275,59 +1615,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_c_long_double1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl1_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double1 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double2(loc_id,& dset_name,& type_id,& @@ -3336,14 +1639,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3351,46 +1646,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl2_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double3(loc_id,& dset_name,& type_id,& @@ -3399,14 +1664,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3414,58 +1671,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl3_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double4(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3473,58 +1692,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl4_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double5(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3532,58 +1713,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl5_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3591,58 +1734,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl6_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_long_double7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_c_long_double7(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_c_long_double7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier @@ -3650,26 +1755,13 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_dl7_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double7 @@ -3698,60 +1790,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint1_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint1_c - END INTERFACE + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& dset_name,& rank,& @@ -3760,14 +1814,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -3775,49 +1821,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& dset_name,& rank,& @@ -3826,14 +1839,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -3841,60 +1846,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint3_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -3902,60 +1867,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint4_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -3963,60 +1888,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint5_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4024,96 +1909,41 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint6_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nint7_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltmake_dataset_int_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_1 + ! Function(s): h5ltmake_dataset_c_float_f_(1-7) ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type + ! Purpose: Creates and writes a dataset of H5T_NATIVE_REAL type ! ! Return: Success: 0, Failure: -1 ! @@ -4135,64 +1965,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl1_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_1 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_2 (loc_id,& dset_name,& rank,& @@ -4201,14 +1989,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4216,47 +1996,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl2_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_3 (loc_id,& dset_name,& rank,& @@ -4265,14 +2014,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4280,59 +2021,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl3_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_4 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4340,59 +2042,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl4_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_5 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4400,59 +2063,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl5_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_6 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4460,59 +2084,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl6_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_float_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_C_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_float_f_7 (loc_id, dset_name, rank, dims, & buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_float_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4520,32 +2105,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_nfl7_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltmake_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_1 + ! Function9s): h5ltmake_dataset_c_double_f_(1-7) ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -4569,14 +2140,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4584,48 +2147,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl1_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_2 (loc_id,& dset_name,& rank,& @@ -4634,14 +2165,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4649,47 +2172,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl2_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_3 (loc_id,& dset_name,& rank,& @@ -4698,14 +2190,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4713,59 +2197,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl3_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_4 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4773,59 +2218,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl4_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_5 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4833,59 +2239,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl5_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_6 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4893,59 +2260,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl6_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_double_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_double_f_7 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -4953,32 +2281,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl7_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_1 + ! Function(s): h5ltmake_dataset_c_long_double_f_(1-7) ! ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type ! @@ -5002,14 +2316,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5017,48 +2323,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl1_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_2 (loc_id,& dset_name,& rank,& @@ -5067,14 +2341,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5082,47 +2348,16 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl2_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_3 (loc_id,& dset_name,& rank,& @@ -5131,14 +2366,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5146,59 +2373,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl3_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_4 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5206,59 +2394,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl4_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_5 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5266,59 +2415,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl5_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_6 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5326,59 +2436,20 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl6_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_c_long_double_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_c_long_double_f_7 (loc_id, dset_name, rank, dims,& buf, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_c_long_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank @@ -5386,32 +2457,18 @@ CONTAINS INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_ndl7_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_1 + ! Function(s): h5ltread_dataset_int_f_(1-7) ! ! Purpose: Read a dataset ! @@ -5434,61 +2491,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 - !DEC$endif - ! - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint1_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& dset_name,& buf,& @@ -5496,60 +2514,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& dset_name,& buf,& @@ -5557,274 +2537,101 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint3_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint4_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint5_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint6_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nint7_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) END SUBROUTINE h5ltread_dataset_int_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_1 + ! Function(s): h5ltread_dataset_c_float_f_(1-7) ! ! Purpose: Read a dataset ! @@ -5847,61 +2654,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl1_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_2(loc_id,& dset_name,& buf,& @@ -5909,60 +2677,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl2_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_3(loc_id,& dset_name,& buf,& @@ -5970,273 +2700,100 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl3_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl4_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_c_float_f_4 + f_ptr = C_LOC(buf(1,1,1,1)) - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + + END SUBROUTINE h5ltread_dataset_c_float_f_4 SUBROUTINE h5ltread_dataset_c_float_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl5_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl6_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_float_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_float_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_float_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_nfl7_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_float_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_1 + ! Function(s): h5ltread_dataset_c_double_f_(1-7) ! ! Purpose: Read a dataset ! @@ -6259,61 +2816,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl1_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl1_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_2(loc_id,& dset_name,& buf,& @@ -6321,60 +2839,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl2_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_3(loc_id,& dset_name,& buf,& @@ -6382,273 +2862,100 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl3_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl4_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl5_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl6_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_double_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_double_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl7_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_double_f_7 !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_1 + ! Function9s): h5ltread_dataset_c_long_double_f_(1-7) ! ! Purpose: Read a dataset ! @@ -6671,60 +2978,21 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_1 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl1_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + + END SUBROUTINE h5ltread_dataset_c_long_double_f_1 SUBROUTINE h5ltread_dataset_c_long_double_f_2(loc_id,& dset_name,& @@ -6733,60 +3001,22 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_2 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl2_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl2_c - END INTERFACE + f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_2 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_long_double_f_3(loc_id,& dset_name,& buf,& @@ -6794,268 +3024,95 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_3 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl3_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl3_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_3 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_long_double_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_4 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl4_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl4_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_4 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_long_double_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_5 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl5_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl5_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_long_double_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_6 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl6_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl6_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_6 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_c_long_double_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_long_double_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_c_long_double_f_7 - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) & - BIND(C,NAME='h5ltread_dataset_ndl7_c') - IMPORT :: C_CHAR, C_LONG_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl7_c - END INTERFACE + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_7 @@ -7083,12 +3140,6 @@ CONTAINS errcode ) IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_string_f - !DEC$endif - ! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: buf ! data buffer @@ -7102,11 +3153,11 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: buflen ! length of data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer END FUNCTION h5ltmake_dataset_string_c END INTERFACE @@ -7139,19 +3190,11 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_string_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) & @@ -7159,10 +3202,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer END FUNCTION h5ltread_dataset_string_c END INTERFACE @@ -7171,9 +3214,6 @@ CONTAINS END SUBROUTINE h5ltread_dataset_string_f - - - !------------------------------------------------------------------------- ! Make/Read attribute functions !------------------------------------------------------------------------- @@ -7204,42 +3244,21 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_int_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & - BIND(C,NAME='h5ltset_attribute_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_int_c - END INTERFACE + f_ptr = C_LOC(buf(1:1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'I'//C_NULL_CHAR) END SUBROUTINE h5ltset_attribute_int_f @@ -7268,42 +3287,21 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_c_float_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & - BIND(C,NAME='h5ltset_attribute_float_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_float_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'R'//C_NULL_CHAR) END SUBROUTINE h5ltset_attribute_float_f @@ -7332,42 +3330,21 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_double_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array INTEGER :: errcode ! error code - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) & - BIND(C,NAME='h5ltset_attribute_double_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_double_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'D'//C_NULL_CHAR) END SUBROUTINE h5ltset_attribute_double_f @@ -7396,48 +3373,25 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_string_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - CHARACTER(LEN=*), DIMENSION(*), INTENT(in) :: buf ! data buffer + CHARACTER(LEN=*), DIMENSION(*), INTENT(in), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buflen ! data buffer length + INTEGER(size_t) :: buflen ! data buffer length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) & - BIND(C,NAME='h5ltset_attribute_string_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - INTEGER(size_t) :: buflen ! data buffer length - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltset_attribute_string_c - END INTERFACE + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) buflen = LEN(buf) - errcode = h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,f_ptr,'C'//C_NULL_CHAR) END SUBROUTINE h5ltset_attribute_string_f - - !------------------------------------------------------------------------- ! Function: h5ltget_attribute_int_f ! @@ -7462,46 +3416,26 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_int_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & - BIND(C,NAME='h5ltget_attribute_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_int_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR) END SUBROUTINE h5ltget_attribute_int_f !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_c_float_f + ! Function: h5ltget_attribute_float_f ! ! Purpose: Reads an attribute named ATTR_NAME ! @@ -7524,40 +3458,20 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_float_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & - BIND(C,NAME='h5ltget_attribute_float_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_float_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR) END SUBROUTINE h5ltget_attribute_float_f @@ -7585,40 +3499,20 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_double_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*), TARGET :: buf INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) & - BIND(C,NAME='h5ltget_attribute_double_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_double_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'D'//C_NULL_CHAR) END SUBROUTINE h5ltget_attribute_double_f @@ -7646,24 +3540,16 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_string_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute INTEGER :: errcode ! error code - CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buf_size ! buf size + CHARACTER(LEN=*), INTENT(inout) :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buf_size ! buf size - INTERFACE + INTERFACE INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) & BIND(C,NAME='h5ltget_attribute_string_c') IMPORT :: C_CHAR @@ -7679,8 +3565,8 @@ CONTAINS END FUNCTION h5ltget_attribute_string_c END INTERFACE - namelen = LEN(dset_name) - attrlen = LEN(attr_name) + namelen = LEN(dset_name) + attrlen = LEN(attr_name) buf_size = LEN(buf) errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) @@ -7714,14 +3600,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_ndims_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(inout) :: rank ! rank @@ -7769,14 +3647,6 @@ CONTAINS dset_name) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltfind_dataset_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER :: errcode ! error code @@ -7825,14 +3695,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_info_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions @@ -7891,14 +3753,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_ndims_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute @@ -7955,14 +3809,6 @@ CONTAINS errcode ) IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_info_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute @@ -8016,12 +3862,6 @@ CONTAINS SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltpath_valid_f - !DEC$endif - ! INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 7a8c40a..99a7800 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -190,65 +190,6 @@ done: return ret_value; } -int_f -h5tbwrite_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} /*------------------------------------------------------------------------- * Function: h5tbread_field_name_c @@ -305,66 +246,6 @@ done: return ret_value; } -int_f -h5tbread_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbread_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbread_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -h5tbread_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbwrite_field_index_c * @@ -416,62 +297,6 @@ done: return ret_value; } -int_f -h5tbwrite_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbwrite_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbread_field_index_c * @@ -522,62 +347,6 @@ done: return ret_value; } -int_f -h5tbread_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbread_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbread_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -h5tbread_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return h5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbinsert_field_c * @@ -631,62 +400,6 @@ done: return ret_value; } -int_f -h5tbinsert_field_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -h5tbinsert_field_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -h5tbinsert_field_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -h5tbinsert_field_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return h5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbdelete_field_c * diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index c62c4a2..26f80dc 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -14,12 +14,26 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! -! This file contains FORTRAN90 interfaces for H5TB functions +! This file contains FORTRAN interfaces for H5TB functions +! +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. ! MODULE h5tb - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 @@ -28,6 +42,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_name_f_int MODULE PROCEDURE h5tbwrite_field_name_f_c_float MODULE PROCEDURE h5tbwrite_field_name_f_c_double + MODULE PROCEDURE h5tbwrite_field_name_f_c_long_double MODULE PROCEDURE h5tbwrite_field_name_f_string END INTERFACE @@ -35,6 +50,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_name_f_int MODULE PROCEDURE h5tbread_field_name_f_c_float MODULE PROCEDURE h5tbread_field_name_f_c_double + MODULE PROCEDURE h5tbread_field_name_f_c_long_double MODULE PROCEDURE h5tbread_field_name_f_string END INTERFACE @@ -42,6 +58,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_index_f_int MODULE PROCEDURE h5tbwrite_field_index_f_c_float MODULE PROCEDURE h5tbwrite_field_index_f_c_double + MODULE PROCEDURE h5tbwrite_field_index_f_c_long_double MODULE PROCEDURE h5tbwrite_field_index_f_string END INTERFACE @@ -49,6 +66,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_index_f_int MODULE PROCEDURE h5tbread_field_index_f_c_float MODULE PROCEDURE h5tbread_field_index_f_c_double + MODULE PROCEDURE h5tbread_field_index_f_c_long_double MODULE PROCEDURE h5tbread_field_index_f_string END INTERFACE @@ -56,8 +74,107 @@ MODULE h5tb MODULE PROCEDURE h5tbinsert_field_f_int MODULE PROCEDURE h5tbinsert_field_f_c_float MODULE PROCEDURE h5tbinsert_field_f_c_double + MODULE PROCEDURE h5tbinsert_field_f_c_long_double MODULE PROCEDURE h5tbinsert_field_f_string END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_c + END INTERFACE + + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name, & + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_c + END INTERFACE + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_c + END INTERFACE CONTAINS @@ -92,12 +209,6 @@ CONTAINS errcode ) IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbmake_table_f -!DEC$endif -! CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset @@ -116,7 +227,6 @@ CONTAINS INTEGER(size_t) :: max_char_size_field_names ! character len of field names INTEGER(hsize_t) :: i ! general purpose integer - INTERFACE INTEGER FUNCTION h5tbmake_table_c(namelen1,& table_title,& @@ -183,7 +293,6 @@ CONTAINS END SUBROUTINE h5tbmake_table_f - !------------------------------------------------------------------------- ! Function: h5tbwrite_field_name_f_int ! @@ -209,65 +318,26 @@ CONTAINS errcode ) IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_int -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_name_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_int_c - END INTERFACE - + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_int - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_c_float -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- SUBROUTINE h5tbwrite_field_name_f_c_float(loc_id,& dset_name,& @@ -279,66 +349,28 @@ CONTAINS errcode ) IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_c_float -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_name_fl_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_fl_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_c_float -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_c_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbwrite_field_name_f_c_double(loc_id,& dset_name,& field_name,& @@ -349,12 +381,6 @@ CONTAINS errcode ) IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_c_double -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset @@ -362,53 +388,54 @@ CONTAINS INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_name_dl_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_dl_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_c_double -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- + SUBROUTINE h5tbwrite_field_name_f_c_long_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_name_f_c_long_double SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& dset_name,& @@ -421,49 +448,25 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_string -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_name_st_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_st_c - END INTERFACE + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_string @@ -494,67 +497,28 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_int -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name, & - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_name_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_int_c - END INTERFACE + f_ptr = C_LOC(buf(1)) ! name length namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_name_f_int -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_c_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbread_field_name_f_c_float(loc_id,& dset_name,& field_name,& @@ -565,68 +529,28 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_c_float -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_name_fl_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_fl_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_name_f_c_float -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_c_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbread_field_name_f_c_double(loc_id,& dset_name,& field_name,& @@ -637,69 +561,29 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_c_double -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_name_dl_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_dl_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_name_f_c_double -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_name_f_string(loc_id,& + SUBROUTINE h5tbread_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& start,& @@ -709,125 +593,63 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_string -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_name_st_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_st_c - END INTERFACE - + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - END SUBROUTINE h5tbread_field_name_f_string + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + END SUBROUTINE h5tbread_field_name_f_c_long_double -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& + SUBROUTINE h5tbread_field_name_f_string(loc_id,& dset_name,& - field_index,& + field_name,& start,& nrecords,& type_size,& buf,& errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_int -!DEC$endif -! + IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_index_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_int_c - END INTERFACE + INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) + namelen1 = LEN(field_name) - errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) - END SUBROUTINE h5tbwrite_field_index_f_int + END SUBROUTINE h5tbread_field_name_f_string + !------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_c_float +! Function: h5tbwrite_field_index_f_int ! ! Purpose: Writes one field ! @@ -840,8 +662,8 @@ CONTAINS ! Modifications: ! !------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_index_f_c_float(loc_id,& + + SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& dset_name,& field_index,& start,& @@ -851,67 +673,56 @@ CONTAINS errcode ) IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_c_float -!DEC$endif -! + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_index_f_int + SUBROUTINE h5tbwrite_field_index_f_c_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_index_fl_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_fl_c - END INTERFACE + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_index_f_c_float - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_c_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbwrite_field_index_f_c_double(loc_id,& dset_name,& field_index,& @@ -922,66 +733,27 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_c_double -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_index_dl_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_dl_c - END INTERFACE - + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) - errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_index_f_c_double -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + SUBROUTINE h5tbwrite_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& start,& @@ -991,47 +763,52 @@ CONTAINS errcode ) IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_string -!DEC$endif -! + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_index_f_c_long_double + SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_index_st_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_st_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) - errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_index_f_string @@ -1061,64 +838,25 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport ::h5tbread_field_index_f_int -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_index_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_int_c - END INTERFACE - + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_int -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_c_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbread_field_index_f_c_float(loc_id,& dset_name,& field_index,& @@ -1130,64 +868,25 @@ CONTAINS IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_c_float -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_index_fl_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_fl_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_c_float -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_c_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbread_field_index_f_c_double(loc_id,& dset_name,& field_index,& @@ -1198,66 +897,26 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_c_double -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_index_dl_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_dl_c - END INTERFACE - + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_c_double -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_index_f_string(loc_id,& + SUBROUTINE h5tbread_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& start,& @@ -1267,52 +926,56 @@ CONTAINS errcode ) IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_string -!DEC$endif -! + END SUBROUTINE h5tbread_field_index_f_c_long_double + + SUBROUTINE h5tbread_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: field_index ! index INTEGER(hsize_t), INTENT(in) :: start ! start record INTEGER(hsize_t), INTENT(in) :: nrecords ! records INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_index_st_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_st_c - END INTERFACE - + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) - errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_string !------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_int +! Function: h5tbinsert_field_f ! ! Purpose: Inserts one field ! @@ -1334,64 +997,26 @@ CONTAINS buf,& errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_int -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hid_t), INTENT(in) :: field_type ! field type INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length INTEGER :: errcode ! error code - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) & - BIND(C,NAME='h5tbinsert_field_int_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_int_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) END SUBROUTINE h5tbinsert_field_f_int - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_c_float -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- SUBROUTINE h5tbinsert_field_f_c_float(loc_id,& dset_name,& @@ -1401,67 +1026,27 @@ CONTAINS buf,& errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_c_float -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hid_t), INTENT(in) :: field_type ! field type INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length INTEGER :: errcode ! error code - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) & - BIND(C,NAME='h5tbinsert_field_fl_c') - IMPORT :: C_CHAR, C_FLOAT - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_fl_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) END SUBROUTINE h5tbinsert_field_f_c_float - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_c_double -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5tbinsert_field_f_c_double(loc_id,& dset_name,& field_name,& @@ -1470,67 +1055,28 @@ CONTAINS buf,& errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_c_double -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hid_t), INTENT(in) :: field_type ! field type INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) & - BIND(C,NAME='h5tbinsert_field_dl_c') - IMPORT :: C_CHAR, C_DOUBLE - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_dl_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) END SUBROUTINE h5tbinsert_field_f_c_double -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_string -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbinsert_field_f_string(loc_id,& + SUBROUTINE h5tbinsert_field_f_c_long_double(loc_id,& dset_name,& field_name,& field_type,& @@ -1538,47 +1084,53 @@ CONTAINS buf,& errcode ) IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_string -!DEC$endif -! + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) + + END SUBROUTINE h5tbinsert_field_f_c_long_double + SUBROUTINE h5tbinsert_field_f_string(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field INTEGER(hid_t), INTENT(in) :: field_type ! field type INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length INTEGER :: errcode ! error code - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) & - BIND(C,NAME='h5tbinsert_field_st_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_st_c - END INTERFACE + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) - errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) END SUBROUTINE h5tbinsert_field_f_string @@ -1602,14 +1154,6 @@ CONTAINS field_name,& errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbdelete_field_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field @@ -1665,14 +1209,6 @@ CONTAINS errcode ) IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_table_info_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(inout):: nfields ! nfields @@ -1729,12 +1265,6 @@ CONTAINS errcode, maxlen_out ) IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_field_info_f -!DEC$endif -! INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), INTENT(in) :: nfields ! nfields diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in index e4a29a5..87276af 100644 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -127,11 +127,18 @@ H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_3 H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_4 H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_5 H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_6 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_7 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_7 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_1 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_2 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_3 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_4 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_5 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_6 +H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_7 H5LT_mp_H5LTMAKE_DATASET_STRING_F H5LT_mp_H5LTREAD_DATASET_STRING_F H5LT_mp_H5LTSET_ATTRIBUTE_INT_F -H5LT_mp_H5LTSET_ATTRIBUTE_C_FLOAT_F +H5LT_mp_H5LTSET_ATTRIBUTE_FLOAT_F H5LT_mp_H5LTSET_ATTRIBUTE_DOUBLE_F H5LT_mp_H5LTSET_ATTRIBUTE_STRING_F H5LT_mp_H5LTGET_ATTRIBUTE_INT_F @@ -149,22 +156,27 @@ H5TB_mp_H5TBMAKE_TABLE_F H5TB_mp_H5TBWRITE_FIELD_NAME_F_INT H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_FLOAT H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_DOUBLE +H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_LONG_DOUBLE H5TB_mp_H5TBWRITE_FIELD_NAME_F_STRING H5TB_mp_H5TBREAD_FIELD_NAME_F_INT H5TB_mp_H5TBREAD_FIELD_NAME_F_C_FLOAT H5TB_mp_H5TBREAD_FIELD_NAME_F_C_DOUBLE +H5TB_mp_H5TBREAD_FIELD_NAME_F_C_LONG_DOUBLE H5TB_mp_H5TBREAD_FIELD_NAME_F_STRING H5TB_mp_H5TBWRITE_FIELD_INDEX_F_INT H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_FLOAT H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_DOUBLE +H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_LONG_DOUBLE H5TB_mp_H5TBWRITE_FIELD_INDEX_F_STRING H5TB_mp_H5TBREAD_FIELD_INDEX_F_INT H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_FLOAT H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_DOUBLE +H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_LONG_DOUBLE H5TB_mp_H5TBREAD_FIELD_INDEX_F_STRING H5TB_mp_H5TBINSERT_FIELD_F_INT H5TB_mp_H5TBINSERT_FIELD_F_C_FLOAT H5TB_mp_H5TBINSERT_FIELD_F_C_DOUBLE +H5TB_mp_H5TBINSERT_FIELD_F_C_LONG_DOUBLE H5TB_mp_H5TBINSERT_FIELD_F_STRING H5TB_mp_H5TBDELETE_FIELD_F H5TB_mp_H5TBGET_TABLE_INFO_F diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 314bf09..60fc659 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -1361,8 +1361,8 @@ SUBROUTINE test_attributes() INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer REAL(C_FLOAT), DIMENSION(DIM1) :: buf3 ! Data buffer REAL(C_FLOAT), DIMENSION(DIM1) :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer + REAL(C_DOUBLE), DIMENSION(DIM1) :: buf4 ! Data buffer + REAL(C_DOUBLE), DIMENSION(DIM1) :: bufr4 ! Data buffer INTEGER :: errcode ! Error flag INTEGER :: i, n ! general purpose integer INTEGER(SIZE_T) size ! size of attribute array diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90 index bb88abf..f679982 100644 --- a/hl/fortran/test/tsttable.f90 +++ b/hl/fortran/test/tsttable.f90 @@ -21,7 +21,6 @@ PROGRAM table_test CALL test_table1() - END PROGRAM table_test -- cgit v0.12 From d4ef2d9b243d4222d29c5847ecd943145840b39b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 15:32:38 -0500 Subject: [svn-r26912] Removed unused 'set' --- fortran/src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index e683725..18af3f6 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -39,7 +39,6 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_D add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 ) -set (H5_TEST_KIND_NAME "h5test_kind_mod") if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) -- cgit v0.12 From 07a1ffde2c7291fcda37828c0ae332ddf430a678 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 15:52:54 -0500 Subject: [svn-r26915] Added missing long_double APIs. --- fortran/src/H5Pff.F90 | 74 ++++++++++++++++++++++++++++++++++++++ fortran/src/hdf5_fortrandll.def.in | 1 - 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 4b5fc66..b9d2240 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -47,6 +47,7 @@ MODULE H5P MODULE PROCEDURE h5pset_fill_value_integer MODULE PROCEDURE h5pset_fill_value_c_float MODULE PROCEDURE h5pset_fill_value_c_double + MODULE PROCEDURE h5pset_fill_value_c_long_double MODULE PROCEDURE h5pset_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pset_fill_value_ptr @@ -57,6 +58,7 @@ MODULE H5P MODULE PROCEDURE h5pget_fill_value_integer MODULE PROCEDURE h5pget_fill_value_c_float MODULE PROCEDURE h5pget_fill_value_c_double + MODULE PROCEDURE h5pget_fill_value_c_long_double MODULE PROCEDURE h5pget_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pget_fill_value_ptr @@ -96,6 +98,7 @@ MODULE H5P MODULE PROCEDURE h5pinsert_integer MODULE PROCEDURE h5pinsert_c_float MODULE PROCEDURE h5pinsert_c_double + MODULE PROCEDURE h5pinsert_c_long_double MODULE PROCEDURE h5pinsert_char ! Recommended procedure: MODULE PROCEDURE h5pinsert_ptr @@ -6292,6 +6295,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pset_fill_value_c_double + SUBROUTINE h5pset_fill_value_c_long_double(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + END SUBROUTINE h5pset_fill_value_c_long_double + SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6323,6 +6340,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fill_value_c_double + SUBROUTINE h5pget_fill_value_c_long_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_c_long_double + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -7244,6 +7277,47 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pinsert_c_double +!****s* H5P (F90)/h5pinsert_c_long_double +! +! NAME +! +! h5pinsert_c_long_double +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_c_long_double(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_c_long_double + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 5626ecb..1d29e6e 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -601,7 +601,6 @@ H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F H5T_mp_H5TCONVERT_F -H5T_mp_H5TENUM_INSERT_F H5T_mp_H5TENUM_INSERT_F90 H5T_mp_H5TENUM_INSERT_F03 ; H5Z -- cgit v0.12 From 47f189a194fc560af2afc937c1601e4bec733ae8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 15:58:27 -0500 Subject: [svn-r26916] cleaned-up comments --- fortran/src/H5Tff.F90 | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index 85666be..6b8f896 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -23,8 +23,15 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** -! If you add a new H5T function you must add the function name to the +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then 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. ! @@ -36,7 +43,7 @@ MODULE H5T USE H5GLOBAL IMPLICIT NONE -!****t* H5T (F03)/hvl_t +!****t* H5T/hvl_t ! Fortran2003 Derived Type: TYPE hvl_t INTEGER(size_t) :: len ! Length of VL data (in base type units) @@ -2912,7 +2919,7 @@ CONTAINS hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) END SUBROUTINE h5tget_native_type_f -!****s* H5T (F03)/H5Tconvert_f_F03 +!****s* H5T/H5Tconvert_f_F03 ! ! NAME ! H5Tconvert_f @@ -2975,7 +2982,7 @@ CONTAINS END SUBROUTINE h5tconvert_f ! -!****s* (F03) H5T/h5tenum_insert_f90 +!****s* H5T/h5tenum_insert_f90 ! ! NAME ! h5tenum_insert_f @@ -3024,7 +3031,7 @@ CONTAINS END SUBROUTINE h5tenum_insert_f90 ! -!****s* (F03) H5T/h5tenum_insert_f03 +!****s* H5T/h5tenum_insert_f03 ! ! NAME ! h5tenum_insert_f -- cgit v0.12 From fbf21b18ee7d83d2ff553ef3f920fba33708ded6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Apr 2015 17:16:30 -0500 Subject: [svn-r26917] added conditional for C_LONG_DOUBLE --- configure | 142 ++++++++++++++++++++++++++++-------------- configure.ac | 24 ++++--- fortran/src/H5Aff.F90 | 19 ++++-- fortran/src/H5Dff.F90 | 17 ++++- fortran/src/H5Pff.F90 | 31 +++++++-- fortran/src/H5config_f.inc.in | 3 + hl/fortran/src/H5LTff.F90 | 23 ++++++- hl/fortran/src/H5TBff.F90 | 23 ++++++- m4/aclocal_fc.m4 | 35 +++++++++++ src/H5config.h.in | 3 + 10 files changed, 250 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 01fcbe4..4f26f17 100755 --- a/configure +++ b/configure @@ -1805,10 +1805,10 @@ fi } # ac_fn_fc_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- +# ac_fn_fc_try_link LINENO +# ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext @@ -1828,7 +1828,7 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -1849,12 +1849,12 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_fc_try_link -# ac_fn_fc_try_link LINENO -# ------------------------ +# ac_fn_c_try_link LINENO +# ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext @@ -1874,7 +1874,7 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -1895,7 +1895,7 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_link +} # ac_fn_c_try_link # ac_fn_cxx_try_compile LINENO # ---------------------------- @@ -5728,6 +5728,46 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 +$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } + HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main + + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_F2003_REQUIREMENTS=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" + fi + ## -------------------------------------------------------------------- ## Define wrappers for the C compiler to use Fortran function names ## @@ -6492,6 +6532,49 @@ rm -f core conftest.err conftest.$ac_objext \ + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 @@ -6515,45 +6598,10 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi + if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - +$as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) - - - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" fi else FC="no" diff --git a/configure.ac b/configure.ac index c84d933..9afb028 100644 --- a/configure.ac +++ b/configure.ac @@ -401,6 +401,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + PAC_PROG_FC_HAVE_F2003_REQUIREMENTS + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) + else + HAVE_FORTRAN_2003="yes" + fi + ## -------------------------------------------------------------------- ## Define wrappers for the C compiler to use Fortran function names ## @@ -416,6 +426,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" PAC_PROG_FC_STORAGE_SIZE + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE + PAC_PROG_FC_HAVE_C_LONG_DOUBLE + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) @@ -433,15 +446,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi - - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) - else - HAVE_FORTRAN_2003="yes" + if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi else FC="no" diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index dc54a0b..3a59e3b 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -64,10 +64,12 @@ ! !***** +#include "H5config_f.inc" + MODULE H5A - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR, C_LOC, & - C_FLOAT, C_DOUBLE, C_LONG_DOUBLE + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL INTERFACE h5awrite_f @@ -103,6 +105,7 @@ MODULE H5A MODULE PROCEDURE h5awrite_c_double_5 MODULE PROCEDURE h5awrite_c_double_6 MODULE PROCEDURE h5awrite_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5awrite_c_long_double_scalar MODULE PROCEDURE h5awrite_c_long_double_1 MODULE PROCEDURE h5awrite_c_long_double_2 @@ -111,6 +114,7 @@ MODULE H5A MODULE PROCEDURE h5awrite_c_long_double_5 MODULE PROCEDURE h5awrite_c_long_double_6 MODULE PROCEDURE h5awrite_c_long_double_7 +#endif ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr @@ -149,6 +153,7 @@ MODULE H5A MODULE PROCEDURE h5aread_c_double_5 MODULE PROCEDURE h5aread_c_double_6 MODULE PROCEDURE h5aread_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5aread_c_long_double_scalar MODULE PROCEDURE h5aread_c_long_double_1 MODULE PROCEDURE h5aread_c_long_double_2 @@ -157,6 +162,7 @@ MODULE H5A MODULE PROCEDURE h5aread_c_long_double_5 MODULE PROCEDURE h5aread_c_long_double_6 MODULE PROCEDURE h5aread_c_long_double_7 +#endif ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr @@ -2323,7 +2329,6 @@ CONTAINS hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5awrite_c_double_6 - SUBROUTINE h5awrite_c_double_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -2342,7 +2347,7 @@ CONTAINS END SUBROUTINE h5awrite_c_double_7 - +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5awrite_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -2358,7 +2363,6 @@ CONTAINS hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5awrite_c_long_double_scalar - SUBROUTINE h5awrite_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -2484,6 +2488,7 @@ CONTAINS hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5awrite_c_long_double_7 +#endif SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE @@ -3133,6 +3138,8 @@ CONTAINS hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5aread_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + SUBROUTINE h5aread_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -3272,6 +3279,8 @@ CONTAINS hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) END SUBROUTINE h5aread_c_long_double_7 +#endif + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 00f3975..090ea08 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -79,9 +79,11 @@ ! !***** +#include "H5config_f.inc" + MODULE H5D - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_LONG_DOUBLE + USE, INTRINSIC :: ISO_C_BINDING USE H5GLOBAL INTERFACE h5dextend_f @@ -135,6 +137,7 @@ MODULE H5D MODULE PROCEDURE h5dwrite_c_double_5 MODULE PROCEDURE h5dwrite_c_double_6 MODULE PROCEDURE h5dwrite_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5dwrite_c_long_double_scalar MODULE PROCEDURE h5dwrite_c_long_double_1 MODULE PROCEDURE h5dwrite_c_long_double_2 @@ -143,6 +146,7 @@ MODULE H5D MODULE PROCEDURE h5dwrite_c_long_double_5 MODULE PROCEDURE h5dwrite_c_long_double_6 MODULE PROCEDURE h5dwrite_c_long_double_7 +#endif ! This is the preferred way to call h5dwrite ! by passing an address MODULE PROCEDURE h5dwrite_ptr @@ -183,6 +187,7 @@ MODULE H5D MODULE PROCEDURE h5dread_c_double_5 MODULE PROCEDURE h5dread_c_double_6 MODULE PROCEDURE h5dread_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5dread_c_long_double_scalar MODULE PROCEDURE h5dread_c_long_double_1 MODULE PROCEDURE h5dread_c_long_double_2 @@ -191,6 +196,7 @@ MODULE H5D MODULE PROCEDURE h5dread_c_long_double_5 MODULE PROCEDURE h5dread_c_long_double_6 MODULE PROCEDURE h5dread_c_long_double_7 +#endif ! This is the preferred way to call h5dread ! by passing an address MODULE PROCEDURE h5dread_ptr @@ -242,7 +248,9 @@ MODULE H5D MODULE PROCEDURE h5dfill_integer MODULE PROCEDURE h5dfill_c_float MODULE PROCEDURE h5dfill_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5dfill_c_long_double +#endif MODULE PROCEDURE h5dfill_char END INTERFACE @@ -3378,6 +3386,7 @@ CONTAINS END SUBROUTINE h5dread_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5dread_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE @@ -3661,6 +3670,7 @@ CONTAINS file_space_id_default, xfer_prp_default, f_ptr) END SUBROUTINE h5dread_c_long_double_7 +#endif SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) @@ -3943,6 +3953,7 @@ CONTAINS END SUBROUTINE h5dwrite_c_double_7 +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5dwrite_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE @@ -4223,6 +4234,7 @@ CONTAINS file_space_id_default, xfer_prp_default, f_ptr) END SUBROUTINE h5dwrite_c_long_double_7 +#endif !****s* H5D (F03)/h5dwrite_f_F03 ! @@ -4502,6 +4514,7 @@ CONTAINS END SUBROUTINE h5dfill_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr) IMPLICIT NONE REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value @@ -4525,7 +4538,7 @@ CONTAINS f_ptr_buf, mem_type_id) END SUBROUTINE h5dfill_c_long_double - +#endif ! ! NAME ! h5dfill_char diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index b9d2240..4e74b9c 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -33,9 +33,7 @@ MODULE H5P -! Can't specify ONLY because of a bug in gfortran < v4.7 Bug: 45190, 37829 - USE, INTRINSIC :: ISO_C_BINDING !, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, & -! c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT + USE, INTRINSIC :: ISO_C_BINDING USE H5GLOBAL INTERFACE h5pset_fapl_multi_f @@ -47,7 +45,9 @@ MODULE H5P MODULE PROCEDURE h5pset_fill_value_integer MODULE PROCEDURE h5pset_fill_value_c_float MODULE PROCEDURE h5pset_fill_value_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pset_fill_value_c_long_double +#endif MODULE PROCEDURE h5pset_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pset_fill_value_ptr @@ -58,7 +58,9 @@ MODULE H5P MODULE PROCEDURE h5pget_fill_value_integer MODULE PROCEDURE h5pget_fill_value_c_float MODULE PROCEDURE h5pget_fill_value_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pget_fill_value_c_long_double +#endif MODULE PROCEDURE h5pget_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pget_fill_value_ptr @@ -69,7 +71,9 @@ MODULE H5P MODULE PROCEDURE h5pset_integer MODULE PROCEDURE h5pset_c_float MODULE PROCEDURE h5pset_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pset_c_long_double +#endif MODULE PROCEDURE h5pset_char ! Recommended procedure: MODULE PROCEDURE h5pset_ptr @@ -80,7 +84,9 @@ MODULE H5P MODULE PROCEDURE h5pget_integer MODULE PROCEDURE h5pget_c_float MODULE PROCEDURE h5pget_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pget_c_long_double +#endif ! Recommended procedure: MODULE PROCEDURE h5pget_ptr END INTERFACE @@ -89,7 +95,9 @@ MODULE H5P MODULE PROCEDURE h5pregister_integer MODULE PROCEDURE h5pregister_c_float MODULE PROCEDURE h5pregister_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pregister_c_long_double +#endif ! Recommended procedure: MODULE PROCEDURE h5pregister_ptr END INTERFACE @@ -98,7 +106,9 @@ MODULE H5P MODULE PROCEDURE h5pinsert_integer MODULE PROCEDURE h5pinsert_c_float MODULE PROCEDURE h5pinsert_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5pinsert_c_long_double +#endif MODULE PROCEDURE h5pinsert_char ! Recommended procedure: MODULE PROCEDURE h5pinsert_ptr @@ -6295,6 +6305,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pset_fill_value_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5pset_fill_value_c_long_double(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6308,6 +6319,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) f_ptr = C_LOC(fillvalue) hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pset_fill_value_c_long_double +#endif SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE @@ -6340,6 +6352,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fill_value_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5pget_fill_value_c_long_double(prp_id, type_id, fillvalue, & hdferr) IMPLICIT NONE @@ -6355,6 +6368,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pget_fill_value_c_long_double +#endif SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE @@ -6617,6 +6631,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pset_c_double + + +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE ! !****s* H5P (F90)/h5pset_c_long_double ! @@ -6654,6 +6671,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pset_c_long_double +#endif SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE @@ -6790,6 +6808,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pget_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !****s* H5P (F90)/h5pget_c_long_double ! ! NAME @@ -6826,6 +6845,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) name_len = LEN(name) hdferr = h5pget_c(prp_id, name, name_len, f_ptr) END SUBROUTINE h5pget_c_long_double +#endif SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE @@ -7049,7 +7069,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_c_double - +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE ! !****s* H5P/h5pregister_c_long_double ! @@ -7092,6 +7112,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pregister_c(class, name, name_len, size, f_ptr) END SUBROUTINE h5pregister_c_long_double +#endif SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE @@ -7277,6 +7298,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pinsert_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !****s* H5P (F90)/h5pinsert_c_long_double ! ! NAME @@ -7317,6 +7339,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) END SUBROUTINE h5pinsert_c_long_double +#endif SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index ceecd36..dde4c11 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -11,3 +11,6 @@ ! Define if the intrinsic function C_SIZEOF exists #undef FORTRAN_HAVE_C_SIZEOF + +! Define if the intrinsic function C_LONG_DOUBLE exists +#undef FORTRAN_HAVE_C_LONG_DOUBLE diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 0d05a36..8334a76 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -30,6 +30,7 @@ ! This is needed for Windows based operating systems. ! +#include "H5config_f.inc" MODULE h5lt USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types @@ -57,6 +58,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_double5 MODULE PROCEDURE h5ltmake_dataset_f_c_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_double7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_f_c_long_double1 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double2 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double3 @@ -64,6 +66,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_long_double5 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double7 +#endif END INTERFACE INTERFACE h5ltread_dataset_f @@ -88,6 +91,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_double5 MODULE PROCEDURE h5ltread_dataset_f_c_double6 MODULE PROCEDURE h5ltread_dataset_f_c_double7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_f_c_long_double1 MODULE PROCEDURE h5ltread_dataset_f_c_long_double2 MODULE PROCEDURE h5ltread_dataset_f_c_long_double3 @@ -95,6 +99,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_long_double5 MODULE PROCEDURE h5ltread_dataset_f_c_long_double6 MODULE PROCEDURE h5ltread_dataset_f_c_long_double7 +#endif END INTERFACE INTERFACE h5ltmake_dataset_int_f @@ -122,6 +127,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -129,6 +135,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 +#endif END INTERFACE INTERFACE h5ltmake_dataset_double_f @@ -146,6 +153,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -153,6 +161,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 +#endif END INTERFACE INTERFACE h5ltread_dataset_int_f @@ -180,6 +189,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -187,6 +197,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 +#endif END INTERFACE INTERFACE h5ltread_dataset_double_f @@ -204,6 +215,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -211,6 +223,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 +#endif END INTERFACE INTERFACE @@ -835,6 +848,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_double7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_f_c_long_double(1-7) ! @@ -1012,6 +1026,8 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_long_double7 +#endif + !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_f_int(1-7) ! @@ -1590,6 +1606,7 @@ CONTAINS END SUBROUTINE h5ltread_dataset_f_c_double7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_f_c_long_double(1-7) ! @@ -1764,6 +1781,7 @@ CONTAINS errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) END SUBROUTINE h5ltread_dataset_f_c_long_double7 +#endif !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_int_f_1 @@ -2291,6 +2309,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_c_long_double_f_(1-7) ! @@ -2466,6 +2485,7 @@ CONTAINS errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltmake_dataset_c_long_double_f_7 +#endif !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_int_f_(1-7) @@ -2954,6 +2974,7 @@ CONTAINS END SUBROUTINE h5ltread_dataset_c_double_f_7 +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function9s): h5ltread_dataset_c_long_double_f_(1-7) ! @@ -3115,7 +3136,7 @@ CONTAINS errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) END SUBROUTINE h5ltread_dataset_c_long_double_f_7 - +#endif !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_string_f diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 26f80dc..34894a5 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -30,6 +30,7 @@ ! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. ! This is needed for Windows based operating systems. ! +#include "H5config_f.inc" MODULE h5tb @@ -37,12 +38,13 @@ MODULE h5tb USE h5fortran_types USE hdf5 - INTERFACE h5tbwrite_field_name_f MODULE PROCEDURE h5tbwrite_field_name_f_int MODULE PROCEDURE h5tbwrite_field_name_f_c_float MODULE PROCEDURE h5tbwrite_field_name_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbwrite_field_name_f_c_long_double +#endif MODULE PROCEDURE h5tbwrite_field_name_f_string END INTERFACE @@ -50,7 +52,9 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_name_f_int MODULE PROCEDURE h5tbread_field_name_f_c_float MODULE PROCEDURE h5tbread_field_name_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbread_field_name_f_c_long_double +#endif MODULE PROCEDURE h5tbread_field_name_f_string END INTERFACE @@ -58,7 +62,9 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_index_f_int MODULE PROCEDURE h5tbwrite_field_index_f_c_float MODULE PROCEDURE h5tbwrite_field_index_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbwrite_field_index_f_c_long_double +#endif MODULE PROCEDURE h5tbwrite_field_index_f_string END INTERFACE @@ -66,7 +72,9 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_index_f_int MODULE PROCEDURE h5tbread_field_index_f_c_float MODULE PROCEDURE h5tbread_field_index_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbread_field_index_f_c_long_double +#endif MODULE PROCEDURE h5tbread_field_index_f_string END INTERFACE @@ -74,7 +82,9 @@ MODULE h5tb MODULE PROCEDURE h5tbinsert_field_f_int MODULE PROCEDURE h5tbinsert_field_f_c_float MODULE PROCEDURE h5tbinsert_field_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbinsert_field_f_c_long_double +#endif MODULE PROCEDURE h5tbinsert_field_f_string END INTERFACE @@ -98,7 +108,6 @@ MODULE h5tb END FUNCTION h5tbwrite_field_name_c END INTERFACE - INTERFACE INTEGER FUNCTION h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name, & start,nrecords,type_size,buf) & @@ -404,6 +413,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_name_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbwrite_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -436,6 +446,7 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_c_long_double +#endif SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& dset_name,& @@ -583,6 +594,7 @@ CONTAINS END SUBROUTINE h5tbread_field_name_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbread_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -614,6 +626,7 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_name_f_c_long_double +#endif SUBROUTINE h5tbread_field_name_f_string(loc_id,& dset_name,& @@ -753,6 +766,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_index_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbwrite_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -782,6 +796,7 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_index_f_c_long_double +#endif SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& dset_name,& @@ -916,6 +931,7 @@ CONTAINS END SUBROUTINE h5tbread_field_index_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbread_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -944,6 +960,7 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_c_long_double +#endif SUBROUTINE h5tbread_field_index_f_string(loc_id,& dset_name,& @@ -1076,6 +1093,7 @@ CONTAINS END SUBROUTINE h5tbinsert_field_f_c_double +#ifdef FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbinsert_field_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -1104,6 +1122,7 @@ CONTAINS field_type,field_index,f_ptr) END SUBROUTINE h5tbinsert_field_f_c_long_double +#endif SUBROUTINE h5tbinsert_field_f_string(loc_id,& dset_name,& diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index c177143..571ad43 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -111,6 +111,41 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) +dnl Check to see C_LONG_DOUBLE is available, and if it +dnl is different from C_DOUBLE + +AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ + HAVE_C_LONG_DOUBLE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is valid]) + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + ])], [AC_MSG_RESULT([yes]) + HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. diff --git a/src/H5config.h.in b/src/H5config.h.in index 1cfc395..2b34ade 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -30,6 +30,9 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #undef FC_FUNC_ +/* Define if we have Fortran C_LONG_DOUBLE */ +#undef FORTRAN_HAVE_C_LONG_DOUBLE + /* Define if we have Fortran intrinsic C_SIZEOF */ #undef FORTRAN_HAVE_C_SIZEOF -- cgit v0.12 From 0f453502b98db079d966c29a7b9435984b1715c8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 24 Apr 2015 13:44:50 -0500 Subject: [svn-r26918] fixed H5_FORTRAN_HAVE_C_LONG_DOUBLE --- hl/fortran/src/H5LTff.F90 | 20 ++++++++++---------- hl/fortran/src/H5TBff.F90 | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 8334a76..fe81ca4 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -58,7 +58,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_double5 MODULE PROCEDURE h5ltmake_dataset_f_c_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_double7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_f_c_long_double1 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double2 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double3 @@ -91,7 +91,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_double5 MODULE PROCEDURE h5ltread_dataset_f_c_double6 MODULE PROCEDURE h5ltread_dataset_f_c_double7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_f_c_long_double1 MODULE PROCEDURE h5ltread_dataset_f_c_long_double2 MODULE PROCEDURE h5ltread_dataset_f_c_long_double3 @@ -127,7 +127,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -153,7 +153,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -189,7 +189,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -215,7 +215,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -848,7 +848,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_double7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_f_c_long_double(1-7) ! @@ -1606,7 +1606,7 @@ CONTAINS END SUBROUTINE h5ltread_dataset_f_c_double7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_f_c_long_double(1-7) ! @@ -2309,7 +2309,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_c_long_double_f_(1-7) ! @@ -2974,7 +2974,7 @@ CONTAINS END SUBROUTINE h5ltread_dataset_c_double_f_7 -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE !------------------------------------------------------------------------- ! Function9s): h5ltread_dataset_c_long_double_f_(1-7) ! diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 34894a5..9b40694 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -42,7 +42,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_name_f_int MODULE PROCEDURE h5tbwrite_field_name_f_c_float MODULE PROCEDURE h5tbwrite_field_name_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbwrite_field_name_f_c_long_double #endif MODULE PROCEDURE h5tbwrite_field_name_f_string @@ -52,7 +52,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_name_f_int MODULE PROCEDURE h5tbread_field_name_f_c_float MODULE PROCEDURE h5tbread_field_name_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbread_field_name_f_c_long_double #endif MODULE PROCEDURE h5tbread_field_name_f_string @@ -62,7 +62,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_index_f_int MODULE PROCEDURE h5tbwrite_field_index_f_c_float MODULE PROCEDURE h5tbwrite_field_index_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbwrite_field_index_f_c_long_double #endif MODULE PROCEDURE h5tbwrite_field_index_f_string @@ -72,7 +72,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_index_f_int MODULE PROCEDURE h5tbread_field_index_f_c_float MODULE PROCEDURE h5tbread_field_index_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbread_field_index_f_c_long_double #endif MODULE PROCEDURE h5tbread_field_index_f_string @@ -82,7 +82,7 @@ MODULE h5tb MODULE PROCEDURE h5tbinsert_field_f_int MODULE PROCEDURE h5tbinsert_field_f_c_float MODULE PROCEDURE h5tbinsert_field_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE MODULE PROCEDURE h5tbinsert_field_f_c_long_double #endif MODULE PROCEDURE h5tbinsert_field_f_string @@ -413,7 +413,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_name_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbwrite_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -594,7 +594,7 @@ CONTAINS END SUBROUTINE h5tbread_field_name_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbread_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -766,7 +766,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_index_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbwrite_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -931,7 +931,7 @@ CONTAINS END SUBROUTINE h5tbread_field_index_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbread_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -1093,7 +1093,7 @@ CONTAINS END SUBROUTINE h5tbinsert_field_f_c_double -#ifdef FORTRAN_HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE SUBROUTINE h5tbinsert_field_f_c_long_double(loc_id,& dset_name,& field_name,& -- cgit v0.12 From b8b7d33f4100e4bf5e01bf169411d33114949556 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 24 Apr 2015 13:54:25 -0500 Subject: [svn-r26919] fixed real promoted to 8 bytes --- fortran/src/H5match_types.c | 46 ++++++++-- fortran/src/H5test_kind.F90 | 48 ++++++++++- fortran/test/tH5T.f90 | 198 ++++++++++++++++++++++---------------------- 3 files changed, 185 insertions(+), 107 deletions(-) diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 14b76a4..d162634 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -51,6 +51,7 @@ FILE * fort_header; void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); void writeTypedefDefault(const char* c_typedef, unsigned int size); void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind); +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); static void initCfile(void) @@ -100,6 +101,7 @@ initFfile(void) !\n!\n\ ! This file is automatically generated and contains HDF5 Fortran90 type definitions.\n!\n\ MODULE H5FORTRAN_TYPES\n\ + USE ISO_C_BINDING\n\ !\n\ ! HDF5 integers\n\ !\n"); @@ -137,6 +139,11 @@ void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind) +{ + fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); + fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); +} int main(void) { @@ -532,12 +539,12 @@ int main(void) /* real_f */ #if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND if(H5_C_HAS_REAL_NATIVE_16 != 0) { - writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND); + writeToFilesChr("float","Fortran_REAL", "real_f", 16, "C_LONG_DOUBLE"); } #elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND - writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); + writeToFilesChr("float", "Fortran_REAL", "real_f", 8, "C_DOUBLE"); #elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND - writeToFiles("float", "Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); + writeToFilesChr("float", "Fortran_REAL", "real_f", 4, "C_FLOAT"); #else /* Error: couldn't find a size for real_f */ return -1; @@ -546,13 +553,13 @@ int main(void) /* double_f */ #if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND); + writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 16, "C_LONG_DOUBLE"); } else { #if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); + writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); } #elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); + writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 4, "C_FLOAT"); } #else /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ @@ -561,12 +568,37 @@ int main(void) #endif #elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND - writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND); + writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); #else /* Error: couldn't find a size for real_f */ return -1; #endif +/* /\* real_f *\/ */ +/* if(sizeof(float) == C_LONG_DOUBLE_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_LONG_DOUBLE"); */ +/* } else if(sizeof(float) == C_DOUBLE_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_DOUBLE"); */ +/* } else if(sizeof(float) == C_FLOAT_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_FLOAT"); */ +/* } else { */ +/* /\* Error: couldn't find a size for real_f *\/ */ +/* return -1; */ +/* } */ + +/* /\* double_f *\/ */ +/* if(sizeof(double) == C_LONG_DOUBLE_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_LONG_DOUBLE"); */ +/* } else if(sizeof(double) == C_DOUBLE_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_DOUBLE"); */ +/* } else if(sizeof(double) == C_FLOAT_SIZEOF) { */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_FLOAT"); */ +/* } else { */ +/* /\* Error: couldn't find a size for double_f *\/ */ +/* return -1; */ +/* } */ + + /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03' * in order to be interoperable with C's structure, the C buffer size * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4) diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 6cd75bc..3ad1a66 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -49,9 +49,17 @@ #include "H5config_f.inc" PROGRAM test_kind + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) INTEGER :: ji, jr, jd +#ifdef HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + last = -1 ii = 0 @@ -225,7 +233,8 @@ WRITE(*,'(40(A,/))') & WRITE(*,*) "PROGRAM H5test_kind" WRITE(*,*) "USE H5test_kind_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + WRITE(*,*) "CHARACTER(LEN=2) :: jchr2" + WRITE(*,*) "WRITE(*,*) "" /*generated header file*/ """ ji = 0 WRITE(*, "("" CALL i"", i2.2,""()"")") ji jr = 0 @@ -240,6 +249,43 @@ WRITE(*,'(40(A,/))') & j = rkind_numbers(i) WRITE(*, "("" CALL r"", i2.2,""()"")") j ENDDO +#ifdef HAVE_C_LONG_DOUBLE + +# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_longdble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +# else + sizeof_var = SIZEOF(c_longdble) +# endif + + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_LONG_DOUBLE + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" +#else + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND -1"' + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF -1"' +#endif + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_dble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + sizeof_var = SIZEOF(c_dble) +#endif + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_DOUBLE + WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_flt, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + sizeof_var = SIZEOF(c_flt) +#endif + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_FLOAT + WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_SIZEOF "'//"//ADJUSTL(jchr2)" + WRITE(*,*) "END PROGRAM H5test_kind" END PROGRAM test_kind diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 7822c16..8d91f66 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -178,47 +178,47 @@ CONTAINS ! during write/read to/from dataset with compound datatype. ! CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) - CALL check("h5pcreate_f", error, total_error) + CALL check("h5pcreate_f", error, total_error) CALL h5pset_preserve_f(plist_id, flag, error) - CALL check("h5pset_preserve_f", error, total_error) + CALL check("h5pset_preserve_f", error, total_error) ! ! Create a new file using default properties. ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + 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 check("h5fcreate_f", error, total_error) ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) + CALL check("h5screate_simple_f", error, total_error) ! ! Create compound datatype. ! ! First calculate total size by calculating sizes of each member ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt5_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt5_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt5_id, type_sizec, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) !write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized type_size = type_sizec + type_sizei + type_sized + type_sizer CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtype_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) ! ! Insert memebers ! @@ -226,19 +226,19 @@ CONTAINS ! offset = 0 CALL h5tinsert_f(dtype_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! INTEGER member ! offset = offset + type_sizec ! Offset of the second memeber is 2 CALL h5tinsert_f(dtype_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! DOUBLE PRECISION member ! offset = offset + type_sizei ! Offset of the third memeber is 6 CALL h5tinsert_f(dtype_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! REAL member ! @@ -250,70 +250,70 @@ CONTAINS ! CALL h5dcreate_f(file_id, dsetname, dtype_id, dspace_id, & dset_id, error) - CALL check("h5dcreate_f", error, total_error) + CALL check("h5dcreate_f", error, total_error) ! ! Create memory types. We have to create a compound datatype ! for each member we want to write. ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizec, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt2_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt2_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Write data by fields in the datatype. Fields order is not important. ! CALL h5dwrite_f(dset_id, dt4_id, real_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt1_id, char_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt2_id, int_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_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) + 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) + CALL check("h5sclose_f", error, total_error) ! ! Terminate access to the datatype ! CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) ! ! Create and store compound datatype with the character and @@ -321,52 +321,52 @@ CONTAINS ! type_size = type_sizec + elements*type_sizer ! Size of compound datatype CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtarray_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dtarray_id, "char_field", offset, H5T_NATIVE_CHARACTER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) offset = type_sizec CALL h5tarray_create_f(H5T_NATIVE_REAL, array_dims_range, array_dims, arrayt_id, error) - CALL check("h5tarray_create_f", error, total_error) + CALL check("h5tarray_create_f", error, total_error) CALL h5tinsert_f(dtarray_id,"array_field", offset, arrayt_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) CALL h5tcommit_f(file_id, "Compound_with_array_member", dtarray_id, error) - CALL check("h5tcommit_f", error, total_error) + CALL check("h5tcommit_f", error, total_error) CALL h5tclose_f(arrayt_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dtarray_id, error) - CALL check("h5tclose_f", error, total_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 check("h5fclose_f", error, total_error) ! ! Open the file. ! CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) + CALL check("h5fopen_f", error, total_error) ! ! Open the dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) + CALL check("h5dopen_f", error, total_error) ! ! Get datatype of the open dataset. ! Check it class, number of members, and member's names. ! CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f", error, total_error) + CALL check("h5dget_type_f", error, total_error) CALL h5tget_class_f(dtype_id, class, error) - CALL check("h5dget_class_f", error, total_error) + CALL check("h5dget_class_f", error, total_error) if (class .ne. H5T_COMPOUND_F) then write(*,*) " Wrong class type returned" total_error = total_error + 1 endif CALL h5tget_nmembers_f(dtype_id, num_members, error) - CALL check("h5dget_nmembers_f", error, total_error) + CALL check("h5dget_nmembers_f", error, total_error) if (num_members .ne. COMP_NUM_MEMBERS ) then write(*,*) " Wrong number of members returned" total_error = total_error + 1 @@ -377,11 +377,11 @@ CONTAINS ! do i = 1, num_members CALL h5tget_member_name_f(dtype_id, i-1, member_name, len, error) - CALL check("h5tget_member_name_f", error, total_error) + CALL check("h5tget_member_name_f", error, total_error) CALL h5tget_member_offset_f(dtype_id, i-1, offset_out, error) - CALL check("h5tget_member_offset_f", error, total_error) + CALL check("h5tget_member_offset_f", error, total_error) CALL h5tget_member_index_f(dtype_id, member_name(1:len), member_index, error) - CALL check("h5tget_member_index_f", error, total_error) + CALL check("h5tget_member_index_f", error, total_error) if(member_index .ne. i-1) then write(*,*) "Index returned is incorrect" write(*,*) member_index, i-1 @@ -394,16 +394,16 @@ CONTAINS write(*,*) "Offset of the char member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, dt5_id, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, dt5_id, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for character member" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_STRING_F) then write(*,*) "Wrong class returned for character member" total_error = total_error + 1 @@ -413,16 +413,16 @@ CONTAINS write(*,*) "Offset of the integer member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for integer memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_INTEGER_F) then write(*,*) "Wrong class returned for INTEGER member" total_error = total_error + 1 @@ -432,16 +432,16 @@ CONTAINS write(*,*) "Offset of the double precision member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for double precision memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for double precision member" total_error = total_error + 1 @@ -451,16 +451,16 @@ CONTAINS write(*,*) "Offset of the real member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for real memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for real member" total_error = total_error + 1 @@ -476,22 +476,22 @@ CONTAINS ! Create memory datatype to read character member of the compound datatype. ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt2_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt2_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt2_id, type_size, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt2_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (char_member_out(i) .ne. char_member(i)) then write(*,*) " Wrong character data is read back " @@ -500,15 +500,15 @@ CONTAINS enddo ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt5_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt5_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt5_id, int_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (int_member_out(i) .ne. int_member(i)) then write(*,*) " Wrong integer data is read back " @@ -518,15 +518,15 @@ CONTAINS ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize IF( .NOT.dreal_eq( REAL(double_member_out(i),dp), REAL( double_member(i), dp)) ) THEN write(*,*) " Wrong double precision data is read back " @@ -536,15 +536,15 @@ CONTAINS ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) DO i = 1, dimsize IF( .NOT.dreal_eq( REAL(real_member_out(i),dp), REAL( real_member(i), dp)) ) THEN WRITE(*,*) " Wrong real precision data is read back " @@ -583,22 +583,22 @@ CONTAINS ! Close all open objects. ! CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt5_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_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) + IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) RETURN END SUBROUTINE compoundtest -- cgit v0.12 From 7d692f042b6e8354fbe52d8b6bdcf971914a1c8c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 24 Apr 2015 16:42:05 -0500 Subject: [svn-r26920] fixed typo --- fortran/src/H5test_kind.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 3ad1a66..e3fd97d 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -53,7 +53,7 @@ PROGRAM test_kind IMPLICIT NONE INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) INTEGER :: ji, jr, jd -#ifdef HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE REAL(KIND=C_LONG_DOUBLE) :: c_longdble #endif REAL(KIND=C_DOUBLE) :: c_dble @@ -249,7 +249,7 @@ WRITE(*,'(40(A,/))') & j = rkind_numbers(i) WRITE(*, "("" CALL r"", i2.2,""()"")") j ENDDO -#ifdef HAVE_C_LONG_DOUBLE +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE # ifdef H5_FORTRAN_HAVE_STORAGE_SIZE sizeof_var = STORAGE_SIZE(c_longdble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -- cgit v0.12 From cec6cbe9cc0171c19eea826c91f2e625bbb66cf8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 27 Apr 2015 15:56:06 -0500 Subject: [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. --- fortran/src/H5Aff.F90 | 1671 ++++++++++--------------------------------- fortran/src/H5Dff.F90 | 1533 ++------------------------------------- fortran/src/H5Pf.c | 1 - fortran/src/H5Pff.F90 | 522 +------------- fortran/src/H5f90proto.h | 11 +- fortran/src/H5test_kind.F90 | 378 +++++++++- fortran/src/HDF5.F90 | 1 + fortran/src/Makefile.am | 5 +- fortran/src/Makefile.in | 11 +- 9 files changed, 829 insertions(+), 3304 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 3a59e3b..179eef6 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -64,7 +64,7 @@ ! !***** -#include "H5config_f.inc" +#include MODULE H5A @@ -89,32 +89,6 @@ MODULE H5A MODULE PROCEDURE h5awrite_char_5 MODULE PROCEDURE h5awrite_char_6 MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_c_float_scalar - MODULE PROCEDURE h5awrite_c_float_1 - MODULE PROCEDURE h5awrite_c_float_2 - MODULE PROCEDURE h5awrite_c_float_3 - MODULE PROCEDURE h5awrite_c_float_4 - MODULE PROCEDURE h5awrite_c_float_5 - MODULE PROCEDURE h5awrite_c_float_6 - MODULE PROCEDURE h5awrite_c_float_7 - MODULE PROCEDURE h5awrite_c_double_scalar - MODULE PROCEDURE h5awrite_c_double_1 - MODULE PROCEDURE h5awrite_c_double_2 - MODULE PROCEDURE h5awrite_c_double_3 - MODULE PROCEDURE h5awrite_c_double_4 - MODULE PROCEDURE h5awrite_c_double_5 - MODULE PROCEDURE h5awrite_c_double_6 - MODULE PROCEDURE h5awrite_c_double_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5awrite_c_long_double_scalar - MODULE PROCEDURE h5awrite_c_long_double_1 - MODULE PROCEDURE h5awrite_c_long_double_2 - MODULE PROCEDURE h5awrite_c_long_double_3 - MODULE PROCEDURE h5awrite_c_long_double_4 - MODULE PROCEDURE h5awrite_c_long_double_5 - MODULE PROCEDURE h5awrite_c_long_double_6 - MODULE PROCEDURE h5awrite_c_long_double_7 -#endif ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr @@ -137,32 +111,6 @@ MODULE H5A MODULE PROCEDURE h5aread_char_5 MODULE PROCEDURE h5aread_char_6 MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_c_float_scalar - MODULE PROCEDURE h5aread_c_float_1 - MODULE PROCEDURE h5aread_c_float_2 - MODULE PROCEDURE h5aread_c_float_3 - MODULE PROCEDURE h5aread_c_float_4 - MODULE PROCEDURE h5aread_c_float_5 - MODULE PROCEDURE h5aread_c_float_6 - MODULE PROCEDURE h5aread_c_float_7 - MODULE PROCEDURE h5aread_c_double_scalar - MODULE PROCEDURE h5aread_c_double_1 - MODULE PROCEDURE h5aread_c_double_2 - MODULE PROCEDURE h5aread_c_double_3 - MODULE PROCEDURE h5aread_c_double_4 - MODULE PROCEDURE h5aread_c_double_5 - MODULE PROCEDURE h5aread_c_double_6 - MODULE PROCEDURE h5aread_c_double_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5aread_c_long_double_scalar - MODULE PROCEDURE h5aread_c_long_double_1 - MODULE PROCEDURE h5aread_c_long_double_2 - MODULE PROCEDURE h5aread_c_long_double_3 - MODULE PROCEDURE h5aread_c_long_double_4 - MODULE PROCEDURE h5aread_c_long_double_5 - MODULE PROCEDURE h5aread_c_long_double_6 - MODULE PROCEDURE h5aread_c_long_double_7 -#endif ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr @@ -1007,6 +955,195 @@ CONTAINS END SUBROUTINE H5Arename_by_name_f +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_scalar + + SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_1 + + + SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_2 + + SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_3 + + + SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_4 + + + SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_5 + + + SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_6 + + + SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & + TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_7 + ! !****s* H5A/H5Aopen_f ! @@ -1876,1410 +2013,380 @@ CONTAINS END SUBROUTINE H5Arename_f + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code -!****s* H5A (F03)/H5Awrite_f_F90 -! -! NAME -! H5Awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** + CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + END SUBROUTINE H5Awrite_char_scalar - SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf) + f_ptr = C_LOC(buf(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_scalar + END SUBROUTINE H5Awrite_char_scalar_fix - SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) + + f_ptr = C_LOC(buf(1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_1 + END SUBROUTINE H5Awrite_char_1 - SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1)) - + f_ptr = C_LOC(buf(1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_2 + END SUBROUTINE H5Awrite_char_2 - SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1,1)) + f_ptr = C_LOC(buf(1,1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_3 - + END SUBROUTINE H5Awrite_char_3 - SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes - INTEGER, INTENT(IN), & + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1,1,1)) + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_4 - + END SUBROUTINE H5Awrite_char_4 - SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & + CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1,1,1,1)) + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_5 + END SUBROUTINE H5Awrite_char_5 - SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & + CHARACTER(LEN=*), INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1,1,1,1,1)) + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_6 + END SUBROUTINE H5Awrite_char_6 - SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_7 + END SUBROUTINE H5Awrite_char_7 + +!****s* H5A (F03)/H5Awrite_f_F03 +! +! NAME +! H5Awrite_f_F03 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran2003 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) + END SUBROUTINE H5Awrite_ptr - SUBROUTINE H5Awrite_c_float_scalar(attr_id, memtype_id, buf, dims, hdferr) +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_scalar + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_scalar - SUBROUTINE H5Awrite_c_float_1(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_c_float_1 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_1 - SUBROUTINE H5Awrite_c_float_2(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_c_float_2 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_2 - SUBROUTINE H5Awrite_c_float_3(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_3 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_3 - SUBROUTINE H5Awrite_c_float_4(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_4 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_4 - SUBROUTINE H5Awrite_c_float_5(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf) + f_ptr = C_LOC(buf(1,1,1,1,1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_5 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_5 - SUBROUTINE H5Awrite_c_float_6(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_6 + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_6 - SUBROUTINE H5Awrite_c_float_7(attr_id, memtype_id, buf, dims, hdferr) + SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(IN), & + INTEGER, INTENT(INOUT), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_c_float_7 - - SUBROUTINE h5awrite_c_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_scalar - - SUBROUTINE h5awrite_c_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_1 - - - SUBROUTINE h5awrite_c_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_c_double_2 - - - SUBROUTINE h5awrite_c_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_3 - - - SUBROUTINE h5awrite_c_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_4 - - - SUBROUTINE h5awrite_c_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_5 - - - SUBROUTINE h5awrite_c_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_double_6 - - SUBROUTINE h5awrite_c_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_c_double_7 - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5awrite_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_scalar - - SUBROUTINE h5awrite_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_1 - - - SUBROUTINE h5awrite_c_long_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_c_long_double_2 - - - SUBROUTINE h5awrite_c_long_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_3 - - - SUBROUTINE h5awrite_c_long_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_4 - - - SUBROUTINE h5awrite_c_long_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_5 - - - SUBROUTINE h5awrite_c_long_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_c_long_double_6 - - - SUBROUTINE h5awrite_c_long_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_c_long_double_7 -#endif - - SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE H5Awrite_char_scalar - - SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_scalar_fix - - SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_1 - - SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_2 - - SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_3 - - SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_4 - - SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_5 - - - SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_6 - - SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_7 - -!****s* H5A (F03)/H5Awrite_f_F03 -! -! NAME -! H5Awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Awrite_ptr - -!****s* H5A (F03)/H5Aread_f_F90 -! -! NAME -! H5Aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_scalar - - SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_1 - - - SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_2 - - - SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_3 - - - SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_4 - - - SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_5 - - - SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_6 - - - SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_7 - - - SUBROUTINE H5Aread_c_float_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_scalar - - SUBROUTINE H5Aread_c_float_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_1 - - SUBROUTINE H5Aread_c_float_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_2 - - - SUBROUTINE H5Aread_c_float_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_3 - - - SUBROUTINE H5Aread_c_float_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_4 - - - SUBROUTINE H5Aread_c_float_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_5 - - - SUBROUTINE H5Aread_c_float_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_6 - - - SUBROUTINE H5Aread_c_float_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_c_float_7 - - SUBROUTINE h5aread_c_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_scalar - - SUBROUTINE h5aread_c_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_1 - - - SUBROUTINE h5aread_c_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_2 - - SUBROUTINE h5aread_c_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_3 - - SUBROUTINE h5aread_c_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_4 - - - SUBROUTINE h5aread_c_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_c_double_5 - - - SUBROUTINE h5aread_c_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_6 - - - SUBROUTINE h5aread_c_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_double_7 - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - - SUBROUTINE h5aread_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_scalar - - SUBROUTINE h5aread_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_1 - - - SUBROUTINE h5aread_c_long_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_2 - - SUBROUTINE h5aread_c_long_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_3 - - SUBROUTINE h5aread_c_long_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_4 - - - SUBROUTINE h5aread_c_long_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_c_long_double_5 - - - SUBROUTINE h5aread_c_long_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_6 - - - SUBROUTINE h5aread_c_long_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_c_long_double_7 - -#endif + END SUBROUTINE H5Aread_integer_7 SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 090ea08..188dd65 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -79,7 +79,7 @@ ! !***** -#include "H5config_f.inc" +#include MODULE H5D @@ -121,32 +121,6 @@ MODULE H5D MODULE PROCEDURE h5dwrite_char_5 MODULE PROCEDURE h5dwrite_char_6 MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_c_float_scalar - MODULE PROCEDURE h5dwrite_c_float_1 - MODULE PROCEDURE h5dwrite_c_float_2 - MODULE PROCEDURE h5dwrite_c_float_3 - MODULE PROCEDURE h5dwrite_c_float_4 - MODULE PROCEDURE h5dwrite_c_float_5 - MODULE PROCEDURE h5dwrite_c_float_6 - MODULE PROCEDURE h5dwrite_c_float_7 - MODULE PROCEDURE h5dwrite_c_double_scalar - MODULE PROCEDURE h5dwrite_c_double_1 - MODULE PROCEDURE h5dwrite_c_double_2 - MODULE PROCEDURE h5dwrite_c_double_3 - MODULE PROCEDURE h5dwrite_c_double_4 - MODULE PROCEDURE h5dwrite_c_double_5 - MODULE PROCEDURE h5dwrite_c_double_6 - MODULE PROCEDURE h5dwrite_c_double_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5dwrite_c_long_double_scalar - MODULE PROCEDURE h5dwrite_c_long_double_1 - MODULE PROCEDURE h5dwrite_c_long_double_2 - MODULE PROCEDURE h5dwrite_c_long_double_3 - MODULE PROCEDURE h5dwrite_c_long_double_4 - MODULE PROCEDURE h5dwrite_c_long_double_5 - MODULE PROCEDURE h5dwrite_c_long_double_6 - MODULE PROCEDURE h5dwrite_c_long_double_7 -#endif ! This is the preferred way to call h5dwrite ! by passing an address MODULE PROCEDURE h5dwrite_ptr @@ -171,32 +145,6 @@ MODULE H5D MODULE PROCEDURE h5dread_char_5 MODULE PROCEDURE h5dread_char_6 MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_c_float_scalar - MODULE PROCEDURE h5dread_c_float_1 - MODULE PROCEDURE h5dread_c_float_2 - MODULE PROCEDURE h5dread_c_float_3 - MODULE PROCEDURE h5dread_c_float_4 - MODULE PROCEDURE h5dread_c_float_5 - MODULE PROCEDURE h5dread_c_float_6 - MODULE PROCEDURE h5dread_c_float_7 - MODULE PROCEDURE h5dread_c_double_scalar - MODULE PROCEDURE h5dread_c_double_1 - MODULE PROCEDURE h5dread_c_double_2 - MODULE PROCEDURE h5dread_c_double_3 - MODULE PROCEDURE h5dread_c_double_4 - MODULE PROCEDURE h5dread_c_double_5 - MODULE PROCEDURE h5dread_c_double_6 - MODULE PROCEDURE h5dread_c_double_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5dread_c_long_double_scalar - MODULE PROCEDURE h5dread_c_long_double_1 - MODULE PROCEDURE h5dread_c_long_double_2 - MODULE PROCEDURE h5dread_c_long_double_3 - MODULE PROCEDURE h5dread_c_long_double_4 - MODULE PROCEDURE h5dread_c_long_double_5 - MODULE PROCEDURE h5dread_c_long_double_6 - MODULE PROCEDURE h5dread_c_long_double_7 -#endif ! This is the preferred way to call h5dread ! by passing an address MODULE PROCEDURE h5dread_ptr @@ -2296,7 +2244,6 @@ CONTAINS END SUBROUTINE h5dread_reference_dsetreg - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -2845,1461 +2792,71 @@ CONTAINS END SUBROUTINE h5dread_char_7 - SUBROUTINE h5dread_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_scalar - - SUBROUTINE h5dread_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_1 - - SUBROUTINE h5dread_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_2 - - SUBROUTINE h5dread_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_3 - - SUBROUTINE h5dread_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_4 - - SUBROUTINE h5dread_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + TYPE(C_PTR), INTENT(IN) :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_5 - - SUBROUTINE h5dread_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_6 - - SUBROUTINE h5dread_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F + END SUBROUTINE h5dwrite_ptr - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_float_7 - - SUBROUTINE h5dread_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_scalar - - SUBROUTINE h5dread_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_1 - - SUBROUTINE h5dread_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_2 - - SUBROUTINE h5dread_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_3 - - SUBROUTINE h5dread_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_4 - - SUBROUTINE h5dread_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_5 - - SUBROUTINE h5dread_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_6 - - SUBROUTINE h5dread_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_double_7 - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5dread_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_scalar - - SUBROUTINE h5dread_c_long_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_1 - - SUBROUTINE h5dread_c_long_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_2 - - SUBROUTINE h5dread_c_long_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_3 - - SUBROUTINE h5dread_c_long_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_4 - - SUBROUTINE h5dread_c_long_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_5 - - SUBROUTINE h5dread_c_long_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_6 - - SUBROUTINE h5dread_c_long_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_c_long_double_7 -#endif - - SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_scalar - - SUBROUTINE h5dwrite_c_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_1 - - SUBROUTINE h5dwrite_c_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_2 - - SUBROUTINE h5dwrite_c_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_3 - - SUBROUTINE h5dwrite_c_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_4 - - SUBROUTINE h5dwrite_c_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_5 - - SUBROUTINE h5dwrite_c_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_6 - - SUBROUTINE h5dwrite_c_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_double_7 - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5dwrite_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_scalar - - SUBROUTINE h5dwrite_c_long_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_1 - - SUBROUTINE h5dwrite_c_long_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_2 - - SUBROUTINE h5dwrite_c_long_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_3 - - SUBROUTINE h5dwrite_c_long_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_4 - - SUBROUTINE h5dwrite_c_long_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_5 - - SUBROUTINE h5dwrite_c_long_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_6 - - SUBROUTINE h5dwrite_c_long_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_long_double_7 -#endif - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dwrite_ptr !****s* H5D (F03)/h5dread_f_F03 ! ! NAME diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 61259ff..edbd8c2 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -5301,7 +5301,6 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) } #ifdef H5_HAVE_PARALLEL - /****if* H5Pf/h5pset_fapl_mpio_c * NAME * h5pset_fapl_mpio_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 4e74b9c..bdffcd7 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -29,7 +29,7 @@ ! This is needed for Windows based operating systems. !***** -#include "H5config_f.inc" +#include MODULE H5P @@ -43,11 +43,6 @@ MODULE H5P INTERFACE h5pset_fill_value_f MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_c_float - MODULE PROCEDURE h5pset_fill_value_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pset_fill_value_c_long_double -#endif MODULE PROCEDURE h5pset_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pset_fill_value_ptr @@ -56,11 +51,6 @@ MODULE H5P INTERFACE h5pget_fill_value_f MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_c_float - MODULE PROCEDURE h5pget_fill_value_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pget_fill_value_c_long_double -#endif MODULE PROCEDURE h5pget_fill_value_char ! Recommended procedure: MODULE PROCEDURE h5pget_fill_value_ptr @@ -69,11 +59,6 @@ MODULE H5P INTERFACE h5pset_f MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_c_float - MODULE PROCEDURE h5pset_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pset_c_long_double -#endif MODULE PROCEDURE h5pset_char ! Recommended procedure: MODULE PROCEDURE h5pset_ptr @@ -82,33 +67,19 @@ MODULE H5P INTERFACE h5pget_f MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_c_float - MODULE PROCEDURE h5pget_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pget_c_long_double -#endif + MODULE PROCEDURE h5pget_char ! Recommended procedure: MODULE PROCEDURE h5pget_ptr END INTERFACE INTERFACE h5pregister_f MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_c_float - MODULE PROCEDURE h5pregister_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pregister_c_long_double -#endif ! Recommended procedure: MODULE PROCEDURE h5pregister_ptr END INTERFACE INTERFACE h5pinsert_f MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_c_float - MODULE PROCEDURE h5pinsert_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5pinsert_c_long_double -#endif MODULE PROCEDURE h5pinsert_char ! Recommended procedure: MODULE PROCEDURE h5pinsert_ptr @@ -6275,101 +6246,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fill_value_integer - - SUBROUTINE h5pset_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_c_float - - SUBROUTINE h5pset_fill_value_c_double(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - END SUBROUTINE h5pset_fill_value_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5pset_fill_value_c_long_double(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - END SUBROUTINE h5pset_fill_value_c_long_double -#endif - - SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_c_float - - SUBROUTINE h5pget_fill_value_c_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5pget_fill_value_c_long_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_c_long_double -#endif - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6578,101 +6454,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_integer - SUBROUTINE h5pset_c_float(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_c_float - -! -!****s* H5P (F90)/h5pset_c_double -! -! NAME -! h5pset_c_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_c_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_c_double - - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE -! -!****s* H5P (F90)/h5pset_c_long_double -! -! NAME -! h5pset_c_long_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_c_long_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_c_long_double -#endif - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6756,97 +6537,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_integer - SUBROUTINE h5pget_c_float(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_FLOAT), INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_c_float - -!****s* H5P (F90)/h5pget_c_double -! -! NAME -! h5pget_c_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_c_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_DOUBLE), INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE -!****s* H5P (F90)/h5pget_c_long_double -! -! NAME -! h5pget_c_long_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_c_long_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL(KIND=C_LONG_DOUBLE), INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_c_long_double -#endif - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier @@ -6879,7 +6569,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_char - ! !****s* H5P (F03)/h5pset_f_F03 ! @@ -7009,110 +6698,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_integer - SUBROUTINE h5pregister_c_float(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_c_float - -! -!****s* H5P (F90)/h5pregister_c_double -! -! NAME -! h5pregister_c_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_c_double(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE -! -!****s* H5P/h5pregister_c_long_double -! -! NAME -! h5pregister_c_long_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_c_long_double(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_c_long_double -#endif SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE @@ -7240,107 +6825,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) END SUBROUTINE h5pinsert_integer - SUBROUTINE h5pinsert_c_float(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_c_float - -!****s* H5P (F90)/h5pinsert_c_double -! -! NAME -! -! h5pinsert_c_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_c_double(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE -!****s* H5P (F90)/h5pinsert_c_long_double -! -! NAME -! -! h5pinsert_c_long_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_c_long_double(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_c_long_double -#endif - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier @@ -7612,9 +7096,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_file_image_f ! Fortran interfaces for H5P functions needed by parallel MPI programs. - #ifdef H5_HAVE_PARALLEL - !****s* H5P/h5pset_fapl_mpio_f ! ! NAME diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index b62af4e..2b3ca0a 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -18,6 +18,7 @@ #define _H5f90proto_H #include "H5public.h" +#include "H5f90.h" H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len); @@ -405,10 +406,6 @@ H5_FCDLL int_f h5pget_external_count_c (hid_t_f *prp_id, int_f* count); H5_FCDLL int_f h5pget_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 h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); -H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); H5_FCDLL int_f h5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); H5_FCDLL int_f h5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); H5_FCDLL int_f h5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); @@ -489,7 +486,13 @@ H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); H5_FCDLL int_f h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +#ifdef H5_HAVE_PARALLEL H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); +H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +#endif /* * Functions frome H5Rf.c */ diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index e3fd97d..2752a2f 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -46,12 +46,12 @@ ! !***** -#include "H5config_f.inc" +#include PROGRAM test_kind USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: i, j, k, ii, ir, last, ikind_numbers(10), rkind_numbers(10) INTEGER :: ji, jr, jd #ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE REAL(KIND=C_LONG_DOUBLE) :: c_longdble @@ -59,6 +59,29 @@ PROGRAM test_kind REAL(KIND=C_DOUBLE) :: c_dble REAL(KIND=C_FLOAT) :: c_flt INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) last = -1 ii = 0 @@ -288,6 +311,357 @@ WRITE(*,'(40(A,/))') & WRITE(*,*) "END PROGRAM H5test_kind" + +! Generate Fortran H5* interfaces having multiple KIND interfaces. +! +! Developer's notes: +! +! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 +! standard extended the maximum rank to 15, it was decided that they should use the +! new APIs to handle this use case. Handling rank 7 and less is for backward compatibility +! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. + + OPEN(11,FILE='H5_KINDff.F90') + WRITE(11,'(a)') "MODULE H5_KIND" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE H5GLOBAL' + + WRITE(11,'(A)') ' USE H5A' + WRITE(11,'(A)') ' USE H5D' + WRITE(11,'(A)') ' USE H5P' + WRITE(11,'(A)') ' IMPLICIT NONE' + +! H5Awrite_f + WRITE(11,'(A)') " INTERFACE h5awrite_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Aread_f + WRITE(11,'(A)') " INTERFACE h5aread_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Dwrite_f + WRITE(11,'(A)') " INTERFACE h5dwrite_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Dread_f + WRITE(11,'(A)') " INTERFACE h5dread_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pset_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pset_f + WRITE(11,'(A)') " INTERFACE h5pset_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_f + WRITE(11,'(A)') " INTERFACE h5pget_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pregister_f + WRITE(11,'(A)') " INTERFACE h5pregister_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pinsert_f + WRITE(11,'(A)') " INTERFACE h5pinsert_f" + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' +!********************** +! H5A interfaces +!********************** + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + WRITE(11,'(A)') ' SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + WRITE(11,'(A)') ' SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO +!********************** +! H5D interfaces +!********************** + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + WRITE(11,'(A)') ' SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + + ENDDO + ENDDO + + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +!********************** +! H5P interfaces +!********************** +! H5Pset_fill_value_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_fill_value_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pset_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + + WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pregister_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& + &//'(class, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: class' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pregister_c(class, name, name_len, size, f_ptr)' + WRITE(11,'(A)') 'END SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pinsert_f + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k + WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& + &//'(plist, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: plist' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(c_ptr) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = c_loc(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + + WRITE(11,'(A)') 'END MODULE H5_KIND' + END PROGRAM test_kind diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index 9e25be2..8d0513a 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -41,5 +41,6 @@ MODULE HDF5 USE H5P USE H5R USE H5Z + USE H5_KIND USE H5LIB END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 4c38575..c488ddf 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -46,7 +46,7 @@ endif libhdf5_fortran_la_SOURCES=H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 \ + H5Tff.F90 H5Zff.F90 H5_KINDff.f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -174,11 +174,12 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo + H5Sff.lo H5Tff.lo H5Zff.lo H5_KINDff.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 0e7f757..5a5ab96 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -153,9 +153,9 @@ libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ - 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 HDF5.lo + H5_KINDff.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 HDF5.lo 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@) @@ -724,7 +724,7 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI libhdf5_fortran_la_SOURCES = H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 \ + H5Tff.F90 H5Zff.F90 H5_KINDff.f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -1422,12 +1422,13 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo + H5Sff.lo H5Tff.lo H5Zff.lo H5_KINDff.lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -- cgit v0.12 From ea6364e818e6611865269a012d2f5480fe413a3d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 28 Apr 2015 10:11:12 -0500 Subject: [svn-r26937] added generated Fortran file to Fortran CMakeList.txt --- fortran/src/CMakeLists.txt | 11 ++++++-- fortran/src/H5match_types.c | 2 +- fortran/src/H5test_kind.F90 | 69 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 72 insertions(+), 10 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 18af3f6..eff133d 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -31,7 +31,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_D #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate H5fortran_detect.F90 +# H5test_kind.F90 used to generate H5fortran_detect.F90 and H5_KINDff.F90 # H5fortran_detect.F90 used to generate H5fort_type_defines.h # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -65,6 +65,11 @@ add_custom_command ( WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5test_FortranHavekind ) +add_custom_target (h5_kindff + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 +) +set_target_properties (h5_kindff PROPERTIES LINKER_LANGUAGE Fortran) #----------------------------------------------------------------------------- add_executable (H5fortran_detect ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 @@ -136,7 +141,7 @@ set (f90CStub_C_HDRS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) -add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) +add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS} ${h5_kindff}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") @@ -153,6 +158,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES set (f90_F_SRCS # generated files ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 @@ -253,6 +259,7 @@ set (mod_files ${MOD_BUILD_DIR}/h5s.mod ${MOD_BUILD_DIR}/h5t.mod ${MOD_BUILD_DIR}/h5z.mod + ${MOD_BUILD_DIR}/h5_kind.mod ) install ( FILES diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index d162634..ae4ef40 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -101,7 +101,7 @@ initFfile(void) !\n!\n\ ! This file is automatically generated and contains HDF5 Fortran90 type definitions.\n!\n\ MODULE H5FORTRAN_TYPES\n\ - USE ISO_C_BINDING\n\ + USE ISO_C_BINDING\n\ !\n\ ! HDF5 integers\n\ !\n"); diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 2752a2f..cb5af11 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -62,6 +62,7 @@ PROGRAM test_kind CHARACTER(LEN=2) :: chr2 ! subroutine rank of array being passed in CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & ' ', & ', DIMENSION(dims(1)) ', & @@ -72,6 +73,7 @@ PROGRAM test_kind ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & /) +! pointer to the buffer CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & ' f_ptr = C_LOC(buf) ', & ' f_ptr = C_LOC(buf(1)) ', & @@ -312,7 +314,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*) "END PROGRAM H5test_kind" -! Generate Fortran H5* interfaces having multiple KIND interfaces. +! (c) Generate Fortran H5* interfaces having multiple KIND interfaces. ! ! Developer's notes: ! @@ -322,6 +324,38 @@ WRITE(*,'(40(A,/))') & ! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. OPEN(11,FILE='H5_KINDff.F90') +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5_KINDff.F90',& +'!',& +'! NAME',& +'! H5_KIND',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5test_kind.F90 to handle all the',& +'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& +'! are H5A, H5D and H5P APIs',& +'!',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.F90',& +'!',& +'!*****' + WRITE(11,'(a)') "MODULE H5_KIND" WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' @@ -331,8 +365,12 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') ' USE H5D' WRITE(11,'(A)') ' USE H5P' WRITE(11,'(A)') ' IMPLICIT NONE' - +!*************** +! H5A INTERFACES +!*************** +! ! H5Awrite_f +! WRITE(11,'(A)') " INTERFACE h5awrite_f" DO i = 1, ir j = rkind_numbers(i) @@ -353,7 +391,10 @@ WRITE(*,'(40(A,/))') & ENDDO END DO WRITE(11,'(A)') " END INTERFACE" - +!*************** +! H5D INTERFACES +!*************** +! ! H5Dwrite_f WRITE(11,'(A)') " INTERFACE h5dwrite_f" DO i = 1, ir @@ -376,6 +417,10 @@ WRITE(*,'(40(A,/))') & END DO WRITE(11,'(A)') " END INTERFACE" +!*************** +! H5P INTERFACES +!*************** +! ! H5Pset_fill_value_f WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" DO i = 1, ir @@ -431,9 +476,12 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') " END INTERFACE" WRITE(11,'(A)') 'CONTAINS' + !********************** -! H5A interfaces +! H5A APIs !********************** +! +! H5Awrite_f DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k @@ -453,6 +501,8 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') ' END SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO +! +! H5Aread_f DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k @@ -472,9 +522,12 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') ' END SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO + !********************** -! H5D interfaces +! H5D APIs !********************** +! +! h5dread_f DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k @@ -509,7 +562,8 @@ WRITE(*,'(40(A,/))') & ENDDO ENDDO - +! +! h5dwrite_f DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k @@ -545,8 +599,9 @@ WRITE(*,'(40(A,/))') & ENDDO !********************** -! H5P interfaces +! H5P APIs !********************** +! ! H5Pset_fill_value_f DO i = 1, ir k = rkind_numbers(i) -- cgit v0.12 From 834fab687f2b98da0b14c1ca0da344e842ad9206 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 28 Apr 2015 14:01:52 -0500 Subject: [svn-r26950] Added DLL exports for windows. --- fortran/src/H5test_kind.F90 | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index cb5af11..f12f430 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -486,6 +486,13 @@ WRITE(*,'(40(A,/))') & k = rkind_numbers(i) WRITE(chr2,'(I2)') k DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -507,6 +514,11 @@ WRITE(*,'(40(A,/))') & k = rkind_numbers(i) WRITE(chr2,'(I2)') k DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -532,6 +544,11 @@ WRITE(*,'(40(A,/))') & k = rkind_numbers(i) WRITE(chr2,'(I2)') k DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' @@ -568,6 +585,11 @@ WRITE(*,'(40(A,/))') & k = rkind_numbers(i) WRITE(chr2,'(I2)') k DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' @@ -606,6 +628,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& &//'(prp_id, type_id, fillvalue, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -623,6 +650,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& &//'(prp_id, type_id, fillvalue, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -640,6 +672,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& &//'(prp_id, name, value, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -660,6 +697,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& &//'(prp_id, name, value, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -679,6 +721,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& &//'(class, name, size, value, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' @@ -699,6 +746,11 @@ WRITE(*,'(40(A,/))') & DO i = 1, ir k = rkind_numbers(i) WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& &//'(plist, name, size, value, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' -- cgit v0.12 From 515d59fd50a56c13707241dcfe83c38ff68021f4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 28 Apr 2015 15:31:08 -0500 Subject: [svn-r26952] Added dependencies for H5_KINDff.F90 --- fortran/src/Makefile.am | 2 +- fortran/src/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index c488ddf..9736bcc 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -174,7 +174,7 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo +H5_KINDff.lo: H5_KINDff.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 5a5ab96..249ba10 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -1422,7 +1422,7 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo +H5_KINDff.lo: H5_KINDff.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ -- cgit v0.12 From fe7877677ae2b11584e22f68f5949ecd50e2a9e2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 13:37:53 -0500 Subject: [svn-r26968] Removed H5A,H5D and H5P declarations which now use the KIND findings. --- fortran/src/hdf5_fortrandll.def.in | 117 ------------------------------------- 1 file changed, 117 deletions(-) diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 1d29e6e..ab24438 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -17,14 +17,6 @@ H5A_mp_H5AWRITE_INTEGER_4 H5A_mp_H5AWRITE_INTEGER_5 H5A_mp_H5AWRITE_INTEGER_6 H5A_mp_H5AWRITE_INTEGER_7 -H5A_mp_H5AWRITE_C_FLOAT_SCALAR -H5A_mp_H5AWRITE_C_FLOAT_1 -H5A_mp_H5AWRITE_C_FLOAT_2 -H5A_mp_H5AWRITE_C_FLOAT_3 -H5A_mp_H5AWRITE_C_FLOAT_4 -H5A_mp_H5AWRITE_C_FLOAT_5 -H5A_mp_H5AWRITE_C_FLOAT_6 -H5A_mp_H5AWRITE_C_FLOAT_7 H5A_mp_H5AWRITE_CHAR_SCALAR H5A_mp_H5AWRITE_CHAR_1 H5A_mp_H5AWRITE_CHAR_2 @@ -41,14 +33,6 @@ H5A_mp_H5AREAD_INTEGER_4 H5A_mp_H5AREAD_INTEGER_5 H5A_mp_H5AREAD_INTEGER_6 H5A_mp_H5AREAD_INTEGER_7 -H5A_mp_H5AREAD_C_FLOAT_SCALAR -H5A_mp_H5AREAD_C_FLOAT_1 -H5A_mp_H5AREAD_C_FLOAT_2 -H5A_mp_H5AREAD_C_FLOAT_3 -H5A_mp_H5AREAD_C_FLOAT_4 -H5A_mp_H5AREAD_C_FLOAT_5 -H5A_mp_H5AREAD_C_FLOAT_6 -H5A_mp_H5AREAD_C_FLOAT_7 H5A_mp_H5AREAD_CHAR_SCALAR H5A_mp_H5AREAD_CHAR_1 H5A_mp_H5AREAD_CHAR_2 @@ -57,38 +41,6 @@ H5A_mp_H5AREAD_CHAR_4 H5A_mp_H5AREAD_CHAR_5 H5A_mp_H5AREAD_CHAR_6 H5A_mp_H5AREAD_CHAR_7 -H5A_mp_H5AREAD_C_DOUBLE_SCALAR -H5A_mp_H5AREAD_C_DOUBLE_1 -H5A_mp_H5AREAD_C_DOUBLE_2 -H5A_mp_H5AREAD_C_DOUBLE_3 -H5A_mp_H5AREAD_C_DOUBLE_4 -H5A_mp_H5AREAD_C_DOUBLE_5 -H5A_mp_H5AREAD_C_DOUBLE_6 -H5A_mp_H5AREAD_C_DOUBLE_7 -H5A_mp_H5AWRITE_C_DOUBLE_SCALAR -H5A_mp_H5AWRITE_C_DOUBLE_1 -H5A_mp_H5AWRITE_C_DOUBLE_2 -H5A_mp_H5AWRITE_C_DOUBLE_3 -H5A_mp_H5AWRITE_C_DOUBLE_4 -H5A_mp_H5AWRITE_C_DOUBLE_5 -H5A_mp_H5AWRITE_C_DOUBLE_6 -H5A_mp_H5AWRITE_C_DOUBLE_7 -H5A_mp_H5AREAD_C_LONG_DOUBLE_SCALAR -H5A_mp_H5AREAD_C_LONG_DOUBLE_1 -H5A_mp_H5AREAD_C_LONG_DOUBLE_2 -H5A_mp_H5AREAD_C_LONG_DOUBLE_3 -H5A_mp_H5AREAD_C_LONG_DOUBLE_4 -H5A_mp_H5AREAD_C_LONG_DOUBLE_5 -H5A_mp_H5AREAD_C_LONG_DOUBLE_6 -H5A_mp_H5AREAD_C_LONG_DOUBLE_7 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_SCALAR -H5A_mp_H5AWRITE_C_LONG_DOUBLE_1 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_2 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_3 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_4 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_5 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_6 -H5A_mp_H5AWRITE_C_LONG_DOUBLE_7 H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F @@ -136,30 +88,6 @@ H5D_mp_H5DWRITE_CHAR_4 H5D_mp_H5DWRITE_CHAR_5 H5D_mp_H5DWRITE_CHAR_6 H5D_mp_H5DWRITE_CHAR_7 -H5D_mp_H5DWRITE_C_FLOAT_SCALAR -H5D_mp_H5DWRITE_C_FLOAT_1 -H5D_mp_H5DWRITE_C_FLOAT_2 -H5D_mp_H5DWRITE_C_FLOAT_3 -H5D_mp_H5DWRITE_C_FLOAT_4 -H5D_mp_H5DWRITE_C_FLOAT_5 -H5D_mp_H5DWRITE_C_FLOAT_6 -H5D_mp_H5DWRITE_C_FLOAT_7 -H5D_mp_H5DWRITE_C_DOUBLE_SCALAR -H5D_mp_H5DWRITE_C_DOUBLE_1 -H5D_mp_H5DWRITE_C_DOUBLE_2 -H5D_mp_H5DWRITE_C_DOUBLE_3 -H5D_mp_H5DWRITE_C_DOUBLE_4 -H5D_mp_H5DWRITE_C_DOUBLE_5 -H5D_mp_H5DWRITE_C_DOUBLE_6 -H5D_mp_H5DWRITE_C_DOUBLE_7 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_SCALAR -H5D_mp_H5DWRITE_C_LONG_DOUBLE_1 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_2 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_3 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_4 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_5 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_6 -H5D_mp_H5DWRITE_C_LONG_DOUBLE_7 H5D_mp_H5DREAD_REFERENCE_OBJ H5D_mp_H5DREAD_REFERENCE_DSETREG H5D_mp_H5DREAD_INTEGER_SCALAR @@ -178,30 +106,6 @@ H5D_mp_H5DREAD_CHAR_4 H5D_mp_H5DREAD_CHAR_5 H5D_mp_H5DREAD_CHAR_6 H5D_mp_H5DREAD_CHAR_7 -H5D_mp_H5DREAD_C_FLOAT_SCALAR -H5D_mp_H5DREAD_C_FLOAT_1 -H5D_mp_H5DREAD_C_FLOAT_2 -H5D_mp_H5DREAD_C_FLOAT_3 -H5D_mp_H5DREAD_C_FLOAT_4 -H5D_mp_H5DREAD_C_FLOAT_5 -H5D_mp_H5DREAD_C_FLOAT_6 -H5D_mp_H5DREAD_C_FLOAT_7 -H5D_mp_H5DREAD_C_DOUBLE_SCALAR -H5D_mp_H5DREAD_C_DOUBLE_1 -H5D_mp_H5DREAD_C_DOUBLE_2 -H5D_mp_H5DREAD_C_DOUBLE_3 -H5D_mp_H5DREAD_C_DOUBLE_4 -H5D_mp_H5DREAD_C_DOUBLE_5 -H5D_mp_H5DREAD_C_DOUBLE_6 -H5D_mp_H5DREAD_C_DOUBLE_7 -H5D_mp_H5DREAD_C_LONG_DOUBLE_SCALAR -H5D_mp_H5DREAD_C_LONG_DOUBLE_1 -H5D_mp_H5DREAD_C_LONG_DOUBLE_2 -H5D_mp_H5DREAD_C_LONG_DOUBLE_3 -H5D_mp_H5DREAD_C_LONG_DOUBLE_4 -H5D_mp_H5DREAD_C_LONG_DOUBLE_5 -H5D_mp_H5DREAD_C_LONG_DOUBLE_6 -H5D_mp_H5DREAD_C_LONG_DOUBLE_7 H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F @@ -216,9 +120,6 @@ H5D_mp_H5DWRITE_VL_STRING H5D_mp_H5DREAD_VL_STRING H5D_mp_H5DFILL_CHAR H5D_mp_H5DFILL_INTEGER -H5D_mp_H5DFILL_C_FLOAT -H5D_mp_H5DFILL_C_DOUBLE -H5D_mp_H5DFILL_C_LONG_DOUBLE H5D_mp_H5DGET_SPACE_STATUS_F H5D_mp_H5DCREATE_ANON_F H5D_mp_H5DGET_SPACE_F @@ -350,12 +251,6 @@ H5P_mp_H5PSET_FILL_VALUE_CHAR H5P_mp_H5PGET_FILL_VALUE_CHAR H5P_mp_H5PSET_FILL_VALUE_INTEGER H5P_mp_H5PGET_FILL_VALUE_INTEGER -H5P_mp_H5PSET_FILL_VALUE_C_FLOAT -H5P_mp_H5PGET_FILL_VALUE_C_FLOAT -H5P_mp_H5PSET_FILL_VALUE_C_DOUBLE -H5P_mp_H5PGET_FILL_VALUE_C_DOUBLE -H5P_mp_H5PSET_FILL_VALUE_C_LONG_DOUBLE -H5P_mp_H5PGET_FILL_VALUE_C_LONG_DOUBLE H5P_mp_H5PGET_VERSION_F H5P_mp_H5PSET_USERBLOCK_F H5P_mp_H5PGET_USERBLOCK_F @@ -409,14 +304,8 @@ H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F H5P_mp_H5PSET_CHAR H5P_mp_H5PSET_INTEGER -H5P_mp_H5PSET_C_FLOAT -H5P_mp_H5PSET_C_DOUBLE -H5P_mp_H5PSET_C_LONG_DOUBLE H5P_mp_H5PGET_CHAR H5P_mp_H5PGET_INTEGER -H5P_mp_H5PGET_C_FLOAT -H5P_mp_H5PGET_C_DOUBLE -H5P_mp_H5PGET_C_LONG_DOUBLE H5P_mp_H5PEXIST_F H5P_mp_H5PGET_SIZE_F H5P_mp_H5PGET_NPROPS_F @@ -429,15 +318,9 @@ H5P_mp_H5PUNREGISTER_F H5P_mp_H5PCLOSE_CLASS_F H5P_mp_H5PCREATE_CLASS_F H5P_mp_H5PREGISTER_INTEGER -H5P_mp_H5PREGISTER_C_FLOAT -H5P_mp_H5PREGISTER_C_DOUBLE -H5P_mp_H5PREGISTER_C_LONG_DOUBLE H5P_mp_H5PREGISTER_CHAR H5P_mp_H5PINSERT_CHAR H5P_mp_H5PINSERT_INTEGER -H5P_mp_H5PINSERT_C_FLOAT -H5P_mp_H5PINSERT_C_DOUBLE -H5P_mp_H5PINSERT_C_LONG_DOUBLE H5P_mp_H5PSET_SHUFFLE_F H5P_mp_H5PSET_EDC_CHECK_F H5P_mp_H5PGET_EDC_CHECK_F -- cgit v0.12 From 2fe77fad31a969fec3594339e8854e1b739b829e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 29 Apr 2015 13:41:42 -0500 Subject: [svn-r26969] Added H5KINDff.F90 to output and moved to end of source list. --- fortran/src/CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index eff133d..0ef7078 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -60,16 +60,12 @@ set_target_properties (H5test_FortranHavekind PROPERTIES set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 + ${HDF5_F90_BINARY_DIR}/H5KINDff.F90 COMMAND ${CMD} ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5test_FortranHavekind ) -add_custom_target (h5_kindff - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 -) -set_target_properties (h5_kindff PROPERTIES LINKER_LANGUAGE Fortran) #----------------------------------------------------------------------------- add_executable (H5fortran_detect ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 @@ -141,7 +137,7 @@ set (f90CStub_C_HDRS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) -add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS} ${h5_kindff}) +add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") @@ -158,7 +154,6 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES set (f90_F_SRCS # generated files ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 - ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 @@ -180,6 +175,7 @@ set (f90_F_SRCS set (f90_F_SRCS ${f90_F_SRCS} + ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) -- cgit v0.12 From 68e4b6ef398c946b723955553f00db2fd289b8d3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 15:12:34 -0500 Subject: [svn-r26970] Added new pointer APIs for h5ltmake_dataset ahd h5ltread_dataset. --- hl/fortran/src/H5LTfc.c | 25 ++--- hl/fortran/src/H5LTff.F90 | 156 +++++++++++++++++++++++++++++-- hl/fortran/src/hdf5_hl_fortrandll.def.in | 2 + hl/fortran/test/tstlite.f90 | 14 ++- 4 files changed, 172 insertions(+), 25 deletions(-) diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index b957d17..dc3c7b9 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -598,7 +598,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf, char *dtype) + void *buf, char *dtype, size_t_f *size_f) { int ret_value = -1; herr_t ret; @@ -623,20 +623,23 @@ h5ltget_attribute_c(hid_t_f *loc_id, c_loc_id = (hid_t)*loc_id; if( HDstrncmp(dtype,"I",1) == 0) { - if(sizeof(int_f) == sizeof(int)) - ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf); + if((size_t)*size_f == sizeof(int)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_INT,buf); + else if ((size_t)*size_f == sizeof(long)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LONG,buf); + else if ((size_t)*size_f == sizeof(long long)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LLONG,buf); else goto done; } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf); - } else if ( HDstrncmp(dtype,"D",1) == 0 ) { - ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf); + if((size_t)*size_f == sizeof(float)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); + else if((size_t)*size_f == sizeof(double)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); + else + goto done; } - + if (ret < 0) goto done; diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index fe81ca4..8f7ad6e 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -30,7 +30,8 @@ ! This is needed for Windows based operating systems. ! -#include "H5config_f.inc" +#include + MODULE h5lt USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types @@ -67,6 +68,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_long_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double7 #endif + MODULE PROCEDURE h5ltmake_dataset_f_ptr END INTERFACE INTERFACE h5ltread_dataset_f @@ -100,6 +102,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_long_double6 MODULE PROCEDURE h5ltread_dataset_f_c_long_double7 #endif + MODULE PROCEDURE h5ltread_dataset_f_ptr END INTERFACE INTERFACE h5ltmake_dataset_int_f @@ -277,7 +280,7 @@ MODULE h5lt END INTERFACE INTERFACE - INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype) & + INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype, SizeOf) & BIND(C,NAME='h5ltget_attribute_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -290,7 +293,8 @@ MODULE h5lt TYPE(C_PTR), VALUE :: buf ! data buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the ! the buffer: - ! R=Real, D=DOUBLE, I=Interger, C=Character + ! R=Real, D=DOUBLE, I=Interger + INTEGER(size_t) :: SizeOf ! Sizeof the buf datatype END FUNCTION h5ltget_attribute_c END INTERFACE @@ -300,6 +304,46 @@ CONTAINS !------------------------------------------------------------------------- !------------------------------------------------------------------------- + ! Function(s): h5ltmake_dataset_f_ptr + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: APR 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_ptr(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + TYPE(C_PTR) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_ptr + + !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_f_int(1-7) ! ! Purpose: Creates and writes a dataset of a type TYPE_ID @@ -1027,6 +1071,43 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_long_double7 #endif + !------------------------------------------------------------------------- + ! Function(s): h5ltread_dataset_f_ptr + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: Apr 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + TYPE(C_PTR) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf, dims) + + END SUBROUTINE h5ltread_dataset_f_ptr !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_f_int(1-7) @@ -3414,6 +3495,44 @@ CONTAINS END SUBROUTINE h5ltset_attribute_string_f !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: Apr 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + +!!$ SUBROUTINE h5ltget_attribute_f(loc_id,& +!!$ dset_name,& +!!$ attr_name,& +!!$ buf,& +!!$ errcode ) +!!$ +!!$ IMPLICIT NONE +!!$ INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier +!!$ CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset +!!$ CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute +!!$ INTEGER :: errcode ! error code +!!$ TYPE(C_PTR) :: buf! data buffer +!!$ INTEGER(size_t) :: namelen ! name length +!!$ INTEGER(size_t) :: attrlen ! name length +!!$ +!!$ namelen = LEN(dset_name) +!!$ attrlen = LEN(attr_name) +!!$ errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,'I'//C_NULL_CHAR) +!!$ +!!$ END SUBROUTINE h5ltget_attribute_f + + !------------------------------------------------------------------------- ! Function: h5ltget_attribute_int_f ! ! Purpose: Reads an attribute named ATTR_NAME @@ -3445,16 +3564,21 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf - f_ptr = C_LOC(buf(1)) + f_ptr = C_LOC(buf(1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf = SIZEOF(buf(1)) +#endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf) END SUBROUTINE h5ltget_attribute_int_f - !------------------------------------------------------------------------- ! Function: h5ltget_attribute_float_f ! @@ -3487,12 +3611,17 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf f_ptr = C_LOC(buf(1)) - +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf = SIZEOF(buf(1)) +#endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf) END SUBROUTINE h5ltget_attribute_float_f @@ -3528,12 +3657,19 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf - f_ptr = C_LOC(buf(1)) + f_ptr = C_LOC(buf(1)) + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf = SIZEOF(buf(1)) +#endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'D'//C_NULL_CHAR) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf) END SUBROUTINE h5ltget_attribute_double_f diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in index 87276af..1b68ace 100644 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -23,6 +23,7 @@ H5I_mp_H5IMGET_PALETTE_INFO_F H5I_mp_H5IMGET_PALETTE_F H5I_mp_H5IMIS_PALETTE_F ; H5LT +H5LT_mp_H5LTMAKE_DATASET_F_PTR H5LT_mp_H5LTMAKE_DATASET_F_INT1 H5LT_mp_H5LTMAKE_DATASET_F_INT2 H5LT_mp_H5LTMAKE_DATASET_F_INT3 @@ -51,6 +52,7 @@ H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE4 H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE5 H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE6 H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE7 +H5LT_mp_H5LTREAD_DATASET_F_PTR H5LT_mp_H5LTREAD_DATASET_F_INT1 H5LT_mp_H5LTREAD_DATASET_F_INT2 H5LT_mp_H5LTREAD_DATASET_F_INT3 diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 60fc659..3159367 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -578,6 +578,7 @@ END SUBROUTINE test_dataset3D SUBROUTINE test_datasetND(rank) + USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -628,6 +629,7 @@ SUBROUTINE test_datasetND(rank) INTEGER :: type_class INTEGER(SIZE_T) :: type_size CHARACTER(LEN=1) :: ichr1 + TYPE(C_PTR) :: f_ptr WRITE(ichr1,'(I1.1)') rank CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') @@ -768,7 +770,8 @@ SUBROUTINE test_datasetND(rank) IF(rank.EQ.4)THEN CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_5, errcode) + f_ptr = C_LOC(ibuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) ELSE IF(rank.EQ.7)THEN @@ -782,7 +785,8 @@ SUBROUTINE test_datasetND(rank) IF(rank.EQ.4)THEN CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_5, dims(1:rank), errcode) + f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, dims(1:rank), errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) ELSE IF(rank.EQ.7)THEN @@ -844,7 +848,8 @@ SUBROUTINE test_datasetND(rank) IF(rank.EQ.4)THEN CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_5, errcode) + f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) ELSE IF(rank.EQ.7)THEN @@ -858,7 +863,8 @@ SUBROUTINE test_datasetND(rank) IF(rank.EQ.4)THEN CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_4, dims(1:rank), errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_5, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, dims(1:rank), errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_6, dims(1:rank), errcode) ELSE IF(rank.EQ.7)THEN -- cgit v0.12 From eee4741a2f388ee543a059b540f799a564724823 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 15:24:56 -0500 Subject: [svn-r26971] fixed declaration of h5ltget_attribute_c --- hl/fortran/src/H5LTf90proto.h | 2 +- hl/fortran/src/H5LTfc.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 834e63a..6234635 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -107,7 +107,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf, char* dtype); + void *buf, char* dtype, size_t_f *sizeof_val); HDF5_HL_F90CSTUBDLL int_f diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index dc3c7b9..7f52eb2 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -598,7 +598,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf, char *dtype, size_t_f *size_f) + void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; herr_t ret; @@ -623,18 +623,18 @@ h5ltget_attribute_c(hid_t_f *loc_id, c_loc_id = (hid_t)*loc_id; if( HDstrncmp(dtype,"I",1) == 0) { - if((size_t)*size_f == sizeof(int)) + if((size_t)*sizeof_val == sizeof(int)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_INT,buf); - else if ((size_t)*size_f == sizeof(long)) + else if ((size_t)*sizeof_val == sizeof(long)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LONG,buf); - else if ((size_t)*size_f == sizeof(long long)) + else if ((size_t)*sizeof_val == sizeof(long long)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LLONG,buf); else goto done; } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - if((size_t)*size_f == sizeof(float)) + if((size_t)*sizeof_val == sizeof(float)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); - else if((size_t)*size_f == sizeof(double)) + else if((size_t)*sizeof_val == sizeof(double)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); else goto done; -- cgit v0.12 From d59229751acc1a2c334d52cb2ec2b7524af62998 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 16:57:05 -0500 Subject: [svn-r26972] Removed unused C functions. See HDFFV-9291: Check for unused C functions --- fortran/src/H5Af.c | 75 -------------- fortran/src/H5Df.c | 136 -------------------------- fortran/src/H5Rf.c | 248 ----------------------------------------------- fortran/src/H5f90proto.h | 10 -- 4 files changed, 469 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 7d343a2..d0ed250f 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -73,81 +73,6 @@ done: return ret_value; } -/****if* H5Af/h5aopen_name_c - * NAME - * h5aopen_name_c - * PURPOSE - * Call H5Aopen to open an attribute - * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * OUTPUTS - * attr_id - dataset identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) -/*******/ -{ - char *c_name = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; /* Return value */ - - /* - * Convert FORTRAN name to C name - */ - if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) - HGOTO_DONE(FAIL); - - /* - * Call H5Aopen function. - */ - if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_name, H5P_DEFAULT)) < 0) - HGOTO_DONE(FAIL); - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} - -/****if* H5Af/h5aclose_c - * NAME - * h5aclose_c - * PURPOSE - * Call H5Aclose to close an attribute - * INPUTS - * attr_id - identifier of an attribute to be closed - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ - -int_f -h5aclose_c ( hid_t_f *attr_id ) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if (H5Aclose((hid_t)*attr_id) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - /****if* H5Af/h5adelete_c * NAME * h5adelete_c diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 5845cf8..050d7e0 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -128,74 +128,6 @@ DONE: return ret_value; } - -/****if* H5Df/h5dwrite_ref_obj_c - * NAME - * h5dwrite_ref_obj_c - * PURPOSE - * Call H5Dwrite to write a dataset of object references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success,e-1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argumnet being of INTEGER(HSIZE_T) type. - * SOURCE -*/ -int_f -h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hobj_ref_t *buf_c; - unsigned int i, n; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer and copy references from Fortran. - */ - n = (unsigned int)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) - HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); - } - else return ret_value; - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - /****if* H5Df/h5dwrite_ref_reg_c * NAME * h5dwrite_ref_reg_c @@ -266,74 +198,6 @@ h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i return ret_value; } - -/****if* H5Df/h5dread_ref_obj_c - * NAME - * h5dread_ref_obj_c - * PURPOSE - * Call H5Dread to read a dataset of object references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer to store references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, May 15, 2002 - * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. - * SOURCE -*/ -int_f -h5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret = -1; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hobj_ref_t *buf_c = NULL; - hsize_t i,n; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer. - */ - n = (hsize_t)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n); - if ( buf_c != NULL ) { - /* - * Call H5Dread function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - if (ret >=0) { - for (i = 0; i < n; i++) - HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t)); - } - if ( buf_c != NULL ) HDfree(buf_c); - } - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - /****if* H5Df/h5dread_ref_reg_c * NAME * h5dread_ref_reg_c diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 271bfee..b196c71 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -24,53 +24,6 @@ #include "H5f90.h" #include "H5Eprivate.h" -/****if* H5Rf/h5rcreate_object_c - * NAME - * h5rcreate_object_c - * PURPOSE - * Call H5Rcreate to create a reference to an object - * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * OUTPUTS - * ref - reference to the object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * SOURCE -*/ -int_f -h5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) -/******/ -{ - char *c_name = NULL; - hobj_ref_t ref_c; - int_f ret_value = 0; - - /* - * Convert FORTRAN name to C name - */ - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rcreate function. - */ - if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0) - HGOTO_DONE(FAIL) - - /* Copy the reference created */ - *ref = (haddr_t_f)ref_c; - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} /* h5rcreate_object_c() */ - /****if* H5Rf/h5rcreate_region_c * NAME * h5rcreate_region_c @@ -165,89 +118,6 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r return ret_value; } -/****if* H5Rf/h5rdereference_region_c - * NAME - * h5rdereference_region_c - * PURPOSE - * Call H5Rdereference to dereference to dataset region - * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region - * OUTPUTS - * obj_id - dereferenced dataset identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) -/******/ -{ - hdset_reg_ref_t ref_c; - hid_t c_obj_id; - int_f ret_value = 0; - - /* Copy the reference to dereference */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end h5rdereference_region_c() */ - -/****if* H5Rf/h5rdereference_object_c - * NAME - * h5rdereference_object_c - * PURPOSE - * Call H5Rdereference to dereference an object - * INPUTS - * dset_id - dataset identifier - * ref - reference to an object - * OUTPUTS - * obj_id - dereferenced object identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) -/******/ -{ - hid_t c_obj_id; - hobj_ref_t ref_c = (hobj_ref_t)*ref; - int_f ret_value = 0; - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_OBJECT, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end h5rdereference_object_c() */ - /****if* H5Rf/h5rdereference_ptr_c * NAME * h5rdereference_ptr_c @@ -410,124 +280,6 @@ done: return ret_value; } /* end h5rget_object_type_obj_c() */ -/****if* H5Rf/h5rget_name_object_c - * NAME - * h5rget_name_object_c - * PURPOSE - * Call H5Rget_name for an object - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -h5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hobj_ref_t ref_c = (hobj_ref_t)*ref; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * Convert C name to FORTRAN and place it in the given buffer - */ - HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1); - *size_default = (size_t_f)c_size; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} /* end h5rget_name_object_c() */ - -/****if* H5Rf/h5rget_name_region_c - * NAME - * h5rget_name_region_c - * PURPOSE - * Call H5Rget_name for a dataset region - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -h5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hdset_reg_ref_t ref_c; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - /* Copy the reference to query */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * Convert C name to FORTRAN and place it in the given buffer - */ - HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1); - *size_default = (size_t_f)c_size; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} - /****if* H5Rf/h5rget_name_ptr_c * NAME * h5rget_name_ptr_c diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 2b3ca0a..e77219d 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -146,12 +146,10 @@ H5_FCDLL int_f h5dclose_c ( hid_t_f *dset_id ); H5_FCDLL int_f h5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); H5_FCDLL int_f h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); H5_FCDLL int_f h5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); H5_FCDLL int_f h5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); H5_FCDLL int_f h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); H5_FCDLL int_f h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); H5_FCDLL int_f h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); @@ -201,10 +199,8 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f */ H5_FCDLL int_f h5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); -H5_FCDLL int_f h5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5aclose_c ( hid_t_f *attr_id ); H5_FCDLL int_f h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); H5_FCDLL int_f h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); H5_FCDLL int_f h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); @@ -426,7 +422,6 @@ H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hi H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, void *close_data); -H5_FCDLL int_f h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); H5_FCDLL int_f h5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); @@ -496,17 +491,12 @@ H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); /* * Functions frome H5Rf.c */ -H5_FCDLL int_f h5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); H5_FCDLL int_f h5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f h5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); -H5_FCDLL int_f h5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); H5_FCDLL int_f h5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f h5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f h5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* -- cgit v0.12 From ecae912a96f12b478a9297238a95b87e2e071a45 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 17:00:35 -0500 Subject: [svn-r26973] changed "_c (" to "_c(" --- fortran/src/H5f90proto.h | 456 +++++++++++++++++++++++------------------------ 1 file changed, 228 insertions(+), 228 deletions(-) diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index e77219d..9164ef1 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -81,113 +81,113 @@ typedef struct H5O_info_t_f { /* * Functions from H5Ff.c */ -H5_FCDLL int_f h5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag); -H5_FCDLL int_f h5fclose_c (hid_t_f *file_id); -H5_FCDLL int_f h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); -H5_FCDLL int_f h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen); -H5_FCDLL int_f h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2); -H5_FCDLL int_f h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id); -H5_FCDLL int_f h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id); -H5_FCDLL int_f h5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count); -H5_FCDLL int_f h5fget_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 h5fget_freespace_c (hid_t_f *file_id, hssize_t_f *free_space); +H5_FCDLL int_f h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fis_hdf5_c(_fcd name, int_f *namelen, int_f *flag); +H5_FCDLL int_f h5fclose_c(hid_t_f *file_id); +H5_FCDLL int_f h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); +H5_FCDLL int_f h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen); +H5_FCDLL int_f h5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2); +H5_FCDLL int_f h5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id); +H5_FCDLL int_f h5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id); +H5_FCDLL int_f h5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count); +H5_FCDLL int_f h5fget_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 h5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space); H5_FCDLL int_f h5fget_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 h5fflush_c (hid_t_f *obj_id, int_f *scope); +H5_FCDLL int_f h5fflush_c(hid_t_f *obj_id, int_f *scope); H5_FCDLL int_f h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen); H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size); /* * Functions from H5Sf.c */ -H5_FCDLL int_f h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); -H5_FCDLL int_f h5sclose_c ( hid_t_f *space_id ); -H5_FCDLL int_f h5screate_c ( int_f *classtype, hid_t_f *space_id ); -H5_FCDLL int_f h5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id); +H5_FCDLL int_f h5screate_simple_c( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); +H5_FCDLL int_f h5sclose_c( hid_t_f *space_id ); +H5_FCDLL int_f h5screate_c( int_f *classtype, hid_t_f *space_id ); +H5_FCDLL int_f h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id); H5_FCDLL int_f h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); H5_FCDLL int_f h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); H5_FCDLL int_f h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); H5_FCDLL int_f h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); H5_FCDLL int_f h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); -H5_FCDLL int_f h5sselect_all_c ( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ); -H5_FCDLL int_f h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ); -H5_FCDLL int_f h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ); -H5_FCDLL int_f h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset); -H5_FCDLL int_f h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); -H5_FCDLL int_f h5sis_simple_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f h5sextent_class_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); -H5_FCDLL int_f h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id); -H5_FCDLL int_f h5sset_extent_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); -H5_FCDLL int_f h5sget_select_type_c ( hid_t_f *space_id , int_f *op); -H5_FCDLL int_f h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); -H5_FCDLL int_f h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); -H5_FCDLL int_f h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); -H5_FCDLL int_f h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); -H5_FCDLL int_f h5sdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); +H5_FCDLL int_f h5sselect_all_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_none_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_valid_c( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sget_simple_extent_npoints_c( hid_t_f *space_id , hsize_t_f *npoints ); +H5_FCDLL int_f h5sget_select_npoints_c( hid_t_f *space_id , hssize_t_f *npoints ); +H5_FCDLL int_f h5sget_simple_extent_ndims_c( hid_t_f *space_id , int_f *ndims ); +H5_FCDLL int_f h5sget_simple_extent_type_c( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f h5soffset_simple_c( hid_t_f *space_id , hssize_t_f *offset); +H5_FCDLL int_f h5sset_extent_simple_c( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); +H5_FCDLL int_f h5sis_simple_c( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sextent_class_c( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f h5sget_simple_extent_dims_c( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); +H5_FCDLL int_f h5sextent_copy_c( hid_t_f *dest_space_id , hid_t_f *source_space_id); +H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); +H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op); +H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); +H5_FCDLL int_f h5scombine_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); +H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); +H5_FCDLL int_f h5sselect_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); +H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); /* * Functions from H5Df.c */ -H5_FCDLL int_f h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dclose_c ( hid_t_f *dset_id ); +H5_FCDLL int_f h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); +H5_FCDLL int_f h5dclose_c( hid_t_f *dset_id ); -H5_FCDLL int_f h5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); -H5_FCDLL int_f h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); -H5_FCDLL int_f h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); -H5_FCDLL int_f h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); -H5_FCDLL int_f h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); -H5_FCDLL int_f h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); +H5_FCDLL int_f h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); +H5_FCDLL int_f h5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id); +H5_FCDLL int_f h5dget_space_c( hid_t_f *dset_id , hid_t_f *space_id); +H5_FCDLL int_f h5dget_type_c( hid_t_f *dset_id , hid_t_f *type_id); +H5_FCDLL int_f h5dget_create_plist_c( hid_t_f *dset_id , hid_t_f *plist_id); +H5_FCDLL int_f h5dset_extent_c( hid_t_f *dset_id , hsize_t_f *dims); H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); -H5_FCDLL int_f h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dget_space_status_c( hid_t_f *dset_id, int_f *flag); +H5_FCDLL int_f h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dread_f_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dvlen_reclaim_c (hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); +H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); /* * Functions from H5Gf.c */ -H5_FCDLL int_f h5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, +H5_FCDLL int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id); -H5_FCDLL int_f h5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f h5gclose_c ( hid_t_f *grp_id ); -H5_FCDLL int_f h5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); -H5_FCDLL int_f h5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); -H5_FCDLL int_f h5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f h5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f h5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f h5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f h5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f h5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); -H5_FCDLL int_f h5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); -H5_FCDLL int_f h5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); -H5_FCDLL int_f h5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gclose_c( hid_t_f *grp_id ); +H5_FCDLL int_f h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); +H5_FCDLL int_f h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); +H5_FCDLL int_f h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); +H5_FCDLL int_f h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); +H5_FCDLL int_f h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); +H5_FCDLL int_f h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); -H5_FCDLL int_f h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); +H5_FCDLL int_f h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); H5_FCDLL int_f h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); @@ -198,39 +198,39 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f * Functions from H5Af.c */ -H5_FCDLL int_f h5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); -H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); -H5_FCDLL int_f h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); -H5_FCDLL int_f h5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); -H5_FCDLL int_f h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); +H5_FCDLL int_f h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); +H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); +H5_FCDLL int_f h5aopen_idx_c(hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); +H5_FCDLL int_f h5aget_space_c(hid_t_f *attr_id, hid_t_f *space_id); +H5_FCDLL int_f h5aget_type_c(hid_t_f *attr_id, hid_t_f *type_id); +H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num); H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); -H5_FCDLL int_f h5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); -H5_FCDLL int_f h5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_storage_size_c( hid_t_f *attr_id, hsize_t_f *size ); +H5_FCDLL int_f h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f h5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_c( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id); -H5_FCDLL int_f h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id); -H5_FCDLL int_f h5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f h5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id); -H5_FCDLL int_f h5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id ); -H5_FCDLL int_f h5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_create_plist_c( hid_t_f *attr_id, hid_t_f *creation_prop_id ); +H5_FCDLL int_f h5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f h5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); @@ -238,10 +238,10 @@ H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ); -H5_FCDLL int_f h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); -H5_FCDLL int_f h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); +H5_FCDLL int_f h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists); -H5_FCDLL int_f h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); H5_FCDLL int_f h5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, @@ -252,48 +252,48 @@ H5_FCDLL int_f h5arename_c( hid_t_f *loc_id, */ H5_FCDLL int_f h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); -H5_FCDLL int_f h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); -H5_FCDLL int_f h5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f h5tclose_c ( hid_t_f *type_id ); -H5_FCDLL int_f h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); -H5_FCDLL int_f h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id); -H5_FCDLL int_f h5tget_class_c ( hid_t_f *type_id , int_f *classtype); -H5_FCDLL int_f h5tget_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f h5tset_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f h5tget_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f h5tset_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f h5tcommitted_c (hid_t_f *dtype_id); -H5_FCDLL int_f h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); -H5_FCDLL int_f h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); -H5_FCDLL int_f h5tget_sign_c ( hid_t_f *type_id , int_f* sign); -H5_FCDLL int_f h5tset_sign_c ( hid_t_f *type_id , int_f *sign); -H5_FCDLL int_f h5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f h5tget_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f h5tset_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f h5tget_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f h5tget_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f h5tset_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f h5tget_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members); -H5_FCDLL int_f h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); -H5_FCDLL int_f h5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); -H5_FCDLL int_f h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); -H5_FCDLL int_f h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); -H5_FCDLL int_f h5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); +H5_FCDLL int_f h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); +H5_FCDLL int_f h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f h5tclose_c( hid_t_f *type_id ); +H5_FCDLL int_f h5tequal_c( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); +H5_FCDLL int_f h5tcopy_c( hid_t_f *type_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tget_class_c( hid_t_f *type_id , int_f *classtype); +H5_FCDLL int_f h5tget_order_c( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tset_order_c( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tget_size_c( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tset_size_c( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tcommitted_c(hid_t_f *dtype_id); +H5_FCDLL int_f h5tget_precision_c( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tset_precision_c( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tget_offset_c( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tset_offset_c( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tget_pad_c( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); +H5_FCDLL int_f h5tset_pad_c( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); +H5_FCDLL int_f h5tget_sign_c( hid_t_f *type_id , int_f* sign); +H5_FCDLL int_f h5tset_sign_c( hid_t_f *type_id , int_f *sign); +H5_FCDLL int_f h5tget_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tset_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tget_ebias_c( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tset_ebias_c( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tget_norm_c( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tset_norm_c( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tget_inpad_c( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tset_inpad_c( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tget_cset_c( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tset_cset_c( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tget_strpad_c( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tset_strpad_c( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tget_nmembers_c( hid_t_f *type_id , int_f * num_members); +H5_FCDLL int_f h5tget_member_name_c( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); +H5_FCDLL int_f h5tget_member_dims_c( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); +H5_FCDLL int_f h5tget_member_offset_c( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); +H5_FCDLL int_f h5tget_member_type_c( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); +H5_FCDLL int_f h5tget_member_index_c( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); H5_FCDLL int_f h5tpack_c(hid_t_f * type_id); H5_FCDLL int_f h5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); H5_FCDLL int_f h5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); -H5_FCDLL int_f h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tenum_create_c( hid_t_f *parent_id , hid_t_f *new_type_id); H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); @@ -302,17 +302,17 @@ H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* H5_FCDLL int_f h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); H5_FCDLL int_f h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); H5_FCDLL int_f h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); -H5_FCDLL int_f h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims); -H5_FCDLL int_f h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims); -H5_FCDLL int_f h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); -H5_FCDLL int_f h5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id); -H5_FCDLL int_f h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); -H5_FCDLL int_f h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ); +H5_FCDLL int_f h5tget_array_dims_c( hid_t_f *type_id , hsize_t_f * dims); +H5_FCDLL int_f h5tget_array_ndims_c( hid_t_f *type_id , int_f * ndims); +H5_FCDLL int_f h5tget_super_c( hid_t_f *type_id , hid_t_f *base_type_id); +H5_FCDLL int_f h5tvlen_create_c( hid_t_f *type_id , hid_t_f *vltype_id); +H5_FCDLL int_f h5tis_variable_str_c( hid_t_f *type_id , int_f *flag ); +H5_FCDLL int_f h5tget_member_class_c( hid_t_f *type_id , int_f *member_no, int_f *cls ); H5_FCDLL int_f h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f h5tdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id); -H5_FCDLL int_f h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); +H5_FCDLL int_f h5tdecode_c( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5tget_create_plist_c( hid_t_f *dtype_id, hid_t_f *dtpl_id); +H5_FCDLL int_f h5tcompiler_conv_c( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); H5_FCDLL int_f h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id); @@ -320,85 +320,85 @@ H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, * Functions from H5Of.c */ -H5_FCDLL int_f h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); -H5_FCDLL int_f h5oclose_c (hid_t_f *object_id ); -H5_FCDLL int_f h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); -H5_FCDLL int_f h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +H5_FCDLL int_f h5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); +H5_FCDLL int_f h5oclose_c(hid_t_f *object_id ); +H5_FCDLL int_f h5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); +H5_FCDLL int_f h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5ovisit_c (hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); +H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data, hid_t_f *lapl_id ); -H5_FCDLL int_f h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, +H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info); +H5_FCDLL int_f h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, +H5_FCDLL int_f h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +H5_FCDLL int_f h5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ); -H5_FCDLL int_f h5odecr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f h5oincr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); -H5_FCDLL int_f h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen); -H5_FCDLL int_f h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); -H5_FCDLL int_f h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5odecr_refcount_c(hid_t_f *object_id); +H5_FCDLL int_f h5oincr_refcount_c(hid_t_f *object_id); +H5_FCDLL int_f h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen); +H5_FCDLL int_f h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); -H5_FCDLL int_f h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +H5_FCDLL int_f h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); +H5_FCDLL int_f h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id); /* * Functions from H5Pf.c */ -H5_FCDLL int_f h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); -H5_FCDLL int_f h5pclose_c ( hid_t_f *prp_id ); -H5_FCDLL int_f h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); -H5_FCDLL int_f h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); -H5_FCDLL int_f h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); -H5_FCDLL int_f h5pset_deflate_c ( hid_t_f *prp_id , int_f *level); -H5_FCDLL int_f h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); -H5_FCDLL int_f h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); -H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); -H5_FCDLL int_f h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f h5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver); -H5_FCDLL int_f h5pset_fapl_stdio_c (hid_t_f *prp_id); -H5_FCDLL int_f h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io); -H5_FCDLL int_f h5pset_fapl_sec2_c (hid_t_f *prp_id); -H5_FCDLL int_f h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2); +H5_FCDLL int_f h5pcreate_c( hid_t_f *cls, hid_t_f *prp_id ); +H5_FCDLL int_f h5pclose_c( hid_t_f *prp_id ); +H5_FCDLL int_f h5pcopy_c( hid_t_f *prp_id , hid_t_f *new_prp_id); +H5_FCDLL int_f h5pequal_c( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); +H5_FCDLL int_f h5pget_class_c( hid_t_f *prp_id , hid_t_f *classtype); +H5_FCDLL int_f h5pset_deflate_c( hid_t_f *prp_id , int_f *level); +H5_FCDLL int_f h5pset_chunk_c( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pget_chunk_c( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_preserve_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_preserve_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); +H5_FCDLL int_f h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pget_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f*driver); +H5_FCDLL int_f h5pset_fapl_stdio_c(hid_t_f *prp_id); +H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f* io); +H5_FCDLL int_f h5pset_fapl_sec2_c(hid_t_f *prp_id); +H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f* sec2); H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f h5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f h5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f h5pset_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f h5pget_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f h5premove_filter_c (hid_t_f *prp_id, int_f* filter); -H5_FCDLL int_f h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters); +H5_FCDLL int_f h5pset_layout_c(hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pget_layout_c(hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pset_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5premove_filter_c(hid_t_f *prp_id, int_f* filter); +H5_FCDLL int_f h5pmodify_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5pget_nfilters_c(hid_t_f *prp_id, int_f* nfilters); H5_FCDLL int_f h5pget_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 h5pget_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 h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes); -H5_FCDLL int_f h5pget_external_count_c (hid_t_f *prp_id, int_f* count); +H5_FCDLL int_f h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes); +H5_FCDLL int_f h5pget_external_count_c(hid_t_f *prp_id, int_f* count); H5_FCDLL int_f h5pget_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 h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); @@ -437,18 +437,18 @@ H5_FCDLL int_f h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); H5_FCDLL int_f h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); H5_FCDLL int_f h5pclose_class_c(hid_t_f * cls); H5_FCDLL int_f h5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f h5pset_shuffle_c ( hid_t_f *prp_id); -H5_FCDLL int_f h5pset_fletcher32_c ( hid_t_f *prp_id ); -H5_FCDLL int_f h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset); -H5_FCDLL int_f h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); -H5_FCDLL int_f h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); +H5_FCDLL int_f h5pset_shuffle_c( hid_t_f *prp_id); +H5_FCDLL int_f h5pset_fletcher32_c( hid_t_f *prp_id ); +H5_FCDLL int_f h5pset_edc_check_c( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pget_edc_check_c( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pset_family_offset_c( hid_t_f *prp_id , hsize_t_f *offset); +H5_FCDLL int_f h5pget_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); +H5_FCDLL int_f h5pset_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); H5_FCDLL int_f h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); -H5_FCDLL int_f h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); -H5_FCDLL int_f h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_szip_c( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); +H5_FCDLL int_f h5pall_filters_avail_c( hid_t_f *prp_id , int_f *status); +H5_FCDLL int_f h5pfill_value_defined_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); @@ -474,7 +474,7 @@ H5_FCDLL int_f h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f h5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id ); H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); @@ -491,14 +491,14 @@ H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); /* * Functions frome H5Rf.c */ -H5_FCDLL int_f h5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); -H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); -H5_FCDLL int_f h5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); +H5_FCDLL int_f h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); +H5_FCDLL int_f h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); -H5_FCDLL int_f h5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* * Functions from H5If.c */ @@ -543,9 +543,9 @@ H5_FCDLL int_f h5dont_atexit_c(void); /* * Functions from H5Zf.c */ -H5_FCDLL int_f h5zunregister_c (int_f *filter); -H5_FCDLL int_f h5zfilter_avail_c (int_f *filter, int_f *flag); -H5_FCDLL int_f h5zget_filter_info_c (int_f *filter, int_f *flag); +H5_FCDLL int_f h5zunregister_c(int_f *filter); +H5_FCDLL int_f h5zfilter_avail_c(int_f *filter, int_f *flag); +H5_FCDLL int_f h5zget_filter_info_c(int_f *filter, int_f *flag); /* * Functions from H5Lf.c @@ -566,10 +566,10 @@ H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ); H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); -H5_FCDLL int_f h5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); +H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -- cgit v0.12 From 0e742cb8d0218046f71ea79bb7be990ee066a52a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 29 Apr 2015 17:04:24 -0500 Subject: [svn-r26974] spelling --- hl/src/H5LT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 8541cfe..8444e27 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -3357,7 +3357,7 @@ herr_t H5LTget_attribute_long( hid_t loc_id, * * Date: June 17, 2005 * -* Comments: This funstion was added to suuport INTEGER*8 Fortran types +* Comments: This function was added to support INTEGER*8 Fortran types * * Modifications: * -- cgit v0.12 From 29f4e850948469008c2a7c1734a1918b35a2a079 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Apr 2015 08:43:23 -0500 Subject: [svn-r26975] Renamed variable to eliminate conflict. --- hl/fortran/src/H5LTff.F90 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 8f7ad6e..10169c5 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -280,7 +280,7 @@ MODULE h5lt END INTERFACE INTERFACE - INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype, SizeOf) & + INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype, SizeOf_buf) & BIND(C,NAME='h5ltget_attribute_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -294,7 +294,7 @@ MODULE h5lt CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the ! the buffer: ! R=Real, D=DOUBLE, I=Interger - INTEGER(size_t) :: SizeOf ! Sizeof the buf datatype + INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype END FUNCTION h5ltget_attribute_c END INTERFACE @@ -3564,18 +3564,18 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf + INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else - SizeOf = SIZEOF(buf(1)) + SizeOf_buf = SIZEOF(buf(1)) #endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_int_f @@ -3611,17 +3611,17 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf + INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else - SizeOf = SIZEOF(buf(1)) + SizeOf_buf = SIZEOF(buf(1)) #endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_float_f @@ -3657,19 +3657,19 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf + INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else - SizeOf = SIZEOF(buf(1)) + SizeOf_buf = SIZEOF(buf(1)) #endif namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_double_f -- cgit v0.12 From 213aa4d0603ed360d6f92a92a78d8599b90a48ca Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Apr 2015 08:54:48 -0500 Subject: [svn-r26976] Added TARGET. --- hl/fortran/test/tstlite.f90 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 3159367..22b99a5 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -599,19 +599,19 @@ SUBROUTINE test_datasetND(rank) CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name INTEGER(HID_T) :: file_id ! File identifier INTEGER(HSIZE_T), DIMENSION(7) :: dims - INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibuf_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibufr_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer + INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibuf_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibufr_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbuf_4 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbufr_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbuf_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbufr_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbuf_6 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbufr_6 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbuf_7 ! Data buffer -- cgit v0.12 From 82c1ce78d5fe5bc102be39f4fc4e74301c9492dd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Apr 2015 09:39:57 -0500 Subject: [svn-r26983] Added C_CHAR to compound type. --- fortran/test/tf.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index 4dc339f..c308243 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -32,7 +32,7 @@ MODULE TH5_MISC - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -44,7 +44,7 @@ MODULE TH5_MISC REAL :: a INTEGER :: x DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z + CHARACTER(KIND=C_CHAR, LEN=1) :: z END TYPE comp_datatype PUBLIC :: H5_SIZEOF -- cgit v0.12 From d52e65a95f4ba380101bbf908755c0b02d16b0bb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 1 May 2015 10:07:03 -0500 Subject: [svn-r26988] Fix name of generated file --- fortran/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 0ef7078..d6e77ba 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -60,7 +60,7 @@ set_target_properties (H5test_FortranHavekind PROPERTIES set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 - ${HDF5_F90_BINARY_DIR}/H5KINDff.F90 + ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 COMMAND ${CMD} ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} @@ -175,7 +175,11 @@ set (f90_F_SRCS set (f90_F_SRCS ${f90_F_SRCS} + + # generated file ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 + + # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) -- cgit v0.12 From 2c575bb79a1e762653aa4393b141bf0c3b78cb01 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 1 May 2015 11:25:32 -0500 Subject: [svn-r26989] Changed the BIND(C) derived types from: CHARACTER(LEN=1) to CHARACTER(KIND=C_CHAR) to make Sun compilers happy. --- fortran/test/tH5L_F03.f90 | 4 ++-- fortran/test/tH5O_F03.f90 | 4 ++-- fortran/test/tf.F90 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90 index 795f1e2..0d3b6b4 100644 --- a/fortran/test/tH5L_F03.f90 +++ b/fortran/test/tH5L_F03.f90 @@ -45,7 +45,7 @@ MODULE liter_cb_mod ! Custom group iteration callback data TYPE, bind(c) :: iter_info - CHARACTER(LEN=1), DIMENSION(1:10) :: name ! The name of the object + CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object INTEGER(c_int) :: TYPE ! The TYPE of the object INTEGER(c_int) :: command ! The TYPE of RETURN value END TYPE iter_info @@ -125,7 +125,7 @@ SUBROUTINE test_iter_group(total_error) USE HDF5 USE TH5_MISC - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE liter_cb_mod IMPLICIT NONE diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.f90 index 8e014f4..834308b 100644 --- a/fortran/test/tH5O_F03.f90 +++ b/fortran/test/tH5O_F03.f90 @@ -31,7 +31,7 @@ MODULE visit_cb USE HDF5 - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -53,7 +53,7 @@ MODULE visit_cb ! ! Object visit structs TYPE, bind(c) :: obj_visit_t - CHARACTER(LEN=1), DIMENSION(1:180) :: path ! Path to object + CHARACTER(KIND=C_CHAR), DIMENSION(1:180) :: path ! Path to object INTEGER :: type_obj ! type of object END TYPE obj_visit_t diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index c308243..ba4f492 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -44,7 +44,7 @@ MODULE TH5_MISC REAL :: a INTEGER :: x DOUBLE PRECISION :: y - CHARACTER(KIND=C_CHAR, LEN=1) :: z + CHARACTER(KIND=C_CHAR) :: z END TYPE comp_datatype PUBLIC :: H5_SIZEOF -- cgit v0.12 From 60960ec8a7d0e3d8cca85d18b6894eeb2c1e3748 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 1 May 2015 11:32:52 -0500 Subject: [svn-r26990] Updated the F2003 error statement when find a nonF2003 compiler. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4f26f17..a886828 100755 --- a/configure +++ b/configure @@ -5763,7 +5763,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 else HAVE_FORTRAN_2003="yes" fi diff --git a/configure.ac b/configure.ac index 9afb028..701682a 100644 --- a/configure.ac +++ b/configure.ac @@ -406,7 +406,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_HAVE_F2003_REQUIREMENTS if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) + AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran]) else HAVE_FORTRAN_2003="yes" fi -- cgit v0.12 From e9735c156a079447d66b3ee40902f5eaa4cbf1cb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 4 May 2015 10:01:35 -0500 Subject: [svn-r27002] removed the use of deprecated APIs --- fortran/src/H5Aff.F90 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 179eef6..a2b84c4 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -259,17 +259,19 @@ CONTAINS !***** CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name +! H5Aopen_name is deprecated INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') + INTEGER(HID_T) FUNCTION H5Aopen(obj_id, name, aapl_id) BIND(C,NAME='H5Aopen') IMPORT :: C_CHAR IMPORT :: HID_T INTEGER(HID_T), INTENT(IN), VALUE :: obj_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - END FUNCTION H5Aopen_name + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id + END FUNCTION H5Aopen END INTERFACE c_name = TRIM(name)//C_NULL_CHAR - attr_id = H5Aopen_name(obj_id, c_name) + attr_id = H5Aopen(obj_id, c_name, H5P_DEFAULT_F) hdferr = 0 IF(attr_id.LT.0) hdferr = -1 @@ -309,17 +311,17 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** - +! H5Aopen_idx is deprecated in favor of the function H5Aopen_by_idx. INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') + INTEGER(HID_T) FUNCTION H5Aopen_by_idx(obj_id, index) BIND(C,NAME='H5Aopen_by_idx') IMPORT :: HID_T IMPORT :: C_INT INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER(C_INT), INTENT(IN) :: index - END FUNCTION H5Aopen_idx + END FUNCTION H5Aopen_by_idx END INTERFACE - attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) + attr_id = H5Aopen_by_idx(obj_id, INT(index, C_INT)) hdferr = 0 IF(attr_id.LT.0) hdferr = -1 -- cgit v0.12 From 1166efe1312f1406433350d3644edcb46b33e4c7 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 4 May 2015 10:16:59 -0500 Subject: [svn-r27006] Added hdf5_hl_fortrandll.def to hl library build. --- hl/fortran/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index e52855c..9cbf634 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -65,7 +65,7 @@ if (BUILD_SHARED_LIBS) BUILD_HDF5_HL_DLL ) if (MSVC) - set (SHARED_LINK_FLAGS "/DLL") + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif (MSVC) endif (WIN32) endif (BUILD_SHARED_LIBS) -- cgit v0.12 From ad71dbe12c146592b238b8029fa1e3a8ef5e407f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 5 May 2015 13:55:29 -0500 Subject: [svn-r27019] Fixed print statement. --- fortran/src/H5test_kind.F90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index f12f430..7c5a6d6 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -133,7 +133,6 @@ WRITE(*,'(40(A,/))') & '! 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 *',& @@ -324,7 +323,7 @@ WRITE(*,'(40(A,/))') & ! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. OPEN(11,FILE='H5_KINDff.F90') -WRITE(*,'(40(A,/))') & + WRITE(11,'(40(A,/))') & '!****h* ROBODoc/H5_KINDff.F90',& '!',& '! NAME',& @@ -338,7 +337,6 @@ WRITE(*,'(40(A,/))') & '! 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 *',& -- cgit v0.12 From 5ffdaa87fc1b59654e9b568a9bceeea87a5970c7 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 5 May 2015 14:46:14 -0500 Subject: [svn-r27020] fixed HL Fortran Binary dir. --- hl/fortran/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 9cbf634..85846e6 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -65,7 +65,7 @@ if (BUILD_SHARED_LIBS) BUILD_HDF5_HL_DLL ) if (MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif (MSVC) endif (WIN32) endif (BUILD_SHARED_LIBS) -- cgit v0.12 From aa403a1a5dc9d117cac88c6b47a6c20480b9d61d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 5 May 2015 15:09:19 -0500 Subject: [svn-r27021] Added hdf5_hl_fortrandll.def to hl library build. --- hl/fortran/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 85846e6..4f266a4 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -6,7 +6,7 @@ PROJECT(HDF5_HL_F90_SRC C CXX Fortran) if (WIN32) if (BUILD_SHARED_LIBS) if (MSVC) - configure_file (${HDF5_HL_F90_SRC_SOURCE_DIR}/hdf5_hl_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def @ONLY) + configure_file (${HDF5_HL_F90_SRC_SOURCE_DIR}/hdf5_hl_fortrandll.def.in ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def @ONLY) endif (MSVC) endif (BUILD_SHARED_LIBS) endif (WIN32) -- cgit v0.12 From b15fc6e4a0b7a5f35c68742de8ceb8dabcb7bad0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 5 May 2015 15:28:47 -0500 Subject: [svn-r27023] Changed H5I to H5IM --- hl/fortran/src/hdf5_hl_fortrandll.def.in | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in index 1b68ace..d294ad7 100644 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -10,18 +10,18 @@ H5DS_mp_H5DSGET_LABEL_F H5DS_mp_H5DSGET_SCALE_NAME_F H5DS_mp_H5DSGET_NUM_SCALES_F ; H5IM -H5I_mp_H5IMMAKE_IMAGE_8BIT_F -H5I_mp_H5IMREAD_IMAGE_F -H5I_mp_H5IMMAKE_IMAGE_24BIT_F -H5I_mp_H5IMGET_IMAGE_INFO_F -H5I_mp_H5IMIS_IMAGE_F -H5I_mp_H5IMMAKE_PALETTE_F -H5I_mp_H5IMLINK_PALETTE_F -H5I_mp_H5IMUNLINK_PALETTE_F -H5I_mp_H5IMGET_NPALETTES_F -H5I_mp_H5IMGET_PALETTE_INFO_F -H5I_mp_H5IMGET_PALETTE_F -H5I_mp_H5IMIS_PALETTE_F +H5IM_mp_H5IMMAKE_IMAGE_8BIT_F +H5IM_mp_H5IMREAD_IMAGE_F +H5IM_mp_H5IMMAKE_IMAGE_24BIT_F +H5IM_mp_H5IMGET_IMAGE_INFO_F +H5IM_mp_H5IMIS_IMAGE_F +H5IM_mp_H5IMMAKE_PALETTE_F +H5IM_mp_H5IMLINK_PALETTE_F +H5IM_mp_H5IMUNLINK_PALETTE_F +H5IM_mp_H5IMGET_NPALETTES_F +H5IM_mp_H5IMGET_PALETTE_INFO_F +H5IM_mp_H5IMGET_PALETTE_F +H5IM_mp_H5IMIS_PALETTE_F ; H5LT H5LT_mp_H5LTMAKE_DATASET_F_PTR H5LT_mp_H5LTMAKE_DATASET_F_INT1 -- cgit v0.12 From 244784ab2cf816b135f27bf03b5a4fb91502aed9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 27 May 2015 17:07:18 -0500 Subject: [svn-r27115] Moved testing KINDs and SIZEOFs to configure. --- Makefile.in | 11 + c++/Makefile.in | 11 + c++/examples/Makefile.in | 11 + c++/src/Makefile.in | 11 + c++/test/Makefile.in | 11 + configure | 4050 +++++++++++++++++++++------------------ configure.ac | 42 +- examples/Makefile.in | 11 + fortran/Makefile.in | 11 + fortran/examples/Makefile.in | 11 + fortran/src/H5_f.c | 26 +- fortran/src/H5_ff.F90 | 12 +- fortran/src/H5config_f.inc.in | 3 + fortran/src/H5f90global.F90 | 12 +- fortran/src/H5match_types.c | 607 +++--- fortran/src/Makefile.am | 16 +- fortran/src/Makefile.in | 55 +- fortran/test/Makefile.in | 11 + fortran/test/tH5R.f90 | 2 - fortran/test/tH5T.f90 | 1 - fortran/test/tH5T_F03.f90 | 18 +- fortran/test/tf.F90 | 2 +- fortran/testpar/Makefile.in | 11 + hl/Makefile.in | 11 + hl/c++/Makefile.in | 11 + hl/c++/examples/Makefile.in | 11 + hl/c++/src/Makefile.in | 11 + hl/c++/test/Makefile.in | 11 + hl/examples/Makefile.in | 11 + hl/fortran/Makefile.in | 11 + hl/fortran/examples/Makefile.in | 11 + hl/fortran/src/H5LTf90proto.h | 5 +- hl/fortran/src/H5LTfc.c | 34 +- hl/fortran/src/H5LTff.F90 | 271 ++- hl/fortran/src/Makefile.in | 11 + hl/fortran/test/Makefile.in | 11 + hl/fortran/test/tstlite.f90 | 242 ++- hl/src/Makefile.in | 11 + hl/test/Makefile.in | 11 + hl/tools/Makefile.in | 11 + hl/tools/gif2h5/Makefile.in | 11 + m4/aclocal_fc.m4 | 191 +- src/H5config.h.in | 6 + src/Makefile.in | 11 + test/Makefile.in | 11 + testpar/Makefile.in | 11 + tools/Makefile.in | 11 + tools/h5copy/Makefile.in | 11 + tools/h5diff/Makefile.in | 11 + tools/h5dump/Makefile.in | 11 + tools/h5import/Makefile.in | 11 + tools/h5jam/Makefile.in | 11 + tools/h5ls/Makefile.in | 11 + tools/h5repack/Makefile.in | 11 + tools/h5stat/Makefile.in | 11 + tools/lib/Makefile.in | 11 + tools/misc/Makefile.in | 11 + tools/perform/Makefile.in | 11 + 58 files changed, 3614 insertions(+), 2410 deletions(-) diff --git a/Makefile.in b/Makefile.in index faf439a..65115ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -305,6 +305,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -351,6 +352,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 0efb387..d4bc007 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index df861e3..6c25046 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index cf2026a..96c1f2b 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -522,6 +523,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 5279c32..4e616cd 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -513,6 +514,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/configure b/configure index a886828..ced18b9 100755 --- a/configure +++ b/configure @@ -199,6 +199,7 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,8 +207,7 @@ test -x / || exit 1" ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -682,7 +682,6 @@ AM_MAKEFLAGS LT_STATIC_EXEC USE_PLUGINS_CONDITIONAL_FALSE USE_PLUGINS_CONDITIONAL_TRUE -CPP OTOOL64 OTOOL LIPO @@ -699,8 +698,6 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP -EGREP -GREP SED LIBTOOL FORTRAN_SHARED_CONDITIONAL_FALSE @@ -722,6 +719,16 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF +PAC_FORTRAN_NATIVE_DOUBLE_KIND +PAC_FORTRAN_NATIVE_REAL_SIZEOF +PAC_FORTRAN_NATIVE_REAL_KIND +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF +PAC_FORTRAN_NATIVE_INTEGER_KIND +PAC_FC_ALL_INTEGER_KINDS_SIZEOF +PAC_FC_ALL_REAL_KINDS_SIZEOF +PAC_FC_ALL_INTEGER_KINDS +PAC_FC_ALL_REAL_KINDS FCLIBS F9XMODEXT F9XMODFLAG @@ -739,6 +746,9 @@ HADDR_T R_INTEGER R_LARGE HDF5_INTERFACES +EGREP +GREP +CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -761,6 +771,7 @@ enable_shared STATIC_SHARED THREADSAFE DIRECT_VFD +HAVE_FLOAT128 HAVE_DMALLOC CODESTACK INSTRUMENT @@ -911,13 +922,13 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS CXX CXXFLAGS CCC -CXXCPP -CPP' +CXXCPP' # Initialize some variables set by options. @@ -1642,12 +1653,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1767,59 +1778,245 @@ fi } # ac_fn_c_try_compile -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" + if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_link") 2>&5 ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=$ac_status fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_compile +} # ac_fn_c_try_run -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1827,19 +2024,126 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_compile + +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1897,6 +2201,48 @@ fi } # ac_fn_c_try_link +# ac_fn_fc_try_run LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_fc_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_run + # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2018,11 +2364,10 @@ fi } # ac_fn_cxx_try_link -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2032,190 +2377,81 @@ if eval \${$3+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$4 -#include <$2> +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $2 (); + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_header_compile +} # ac_fn_c_check_func -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2364,75 +2600,19 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -2448,197 +2628,22 @@ $4 int main () { -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; #endif #endif -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break + eval "$3=yes" else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -3852,6 +3857,7 @@ $as_echo "done" >&6; } ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -3870,6 +3876,7 @@ $as_echo "done" >&6; } CODESTACK=no HAVE_DMALLOC=no + HAVE_FLOAT128=no DIRECT_VFD=no THREADSAFE=no @@ -5099,331 +5106,490 @@ $as_echo "yes" >&6; } ;; esac -## ---------------------------------------------------------------------- -## Check if they would like the Fortran interface compiled -## - HDF5_INTERFACES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 -$as_echo_n "checking if Fortran interface enabled... " >&6; } -# Check whether --enable-fortran was given. -if test "${enable_fortran+set}" = set; then : - enableval=$enable_fortran; HDF_FORTRAN=$enableval -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -if test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" else - echo "no" + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -if test "X$HDF_FORTRAN" = "Xyes"; then - -## We will output an include file for Fortran, H5config_f.inc which -## contains various configure definitions used by the Fortran Library. -## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro -## names and those generated by another software package that uses the HDF5 library. - ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - HDF_FORTRAN=yes - - HDF5_INTERFACES="$HDF5_INTERFACES fortran" - - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## - + done + ac_cv_prog_CPP=$CPP +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## -------------------------------------------------------------------- - ## Fortran source extention - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_GREP=$GREP fi - - test -n "$FC" && break - done fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_EGREP=$EGREP fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - test -n "$ac_ct_FC" && break -done - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - ac_compiler_gnu=no + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu +rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif - end +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes +if ac_fn_c_try_run "$LINENO"; then : + else - ac_cv_prog_fc_g=no + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : +fi + +done + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if ${ac_cv_sizeof_long_double+:} false; then : $as_echo_n "(cached) " >&6 else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break +else + if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_double=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF + +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## + HDF5_INTERFACES="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 +$as_echo_n "checking if Fortran interface enabled... " >&6; } +# Check whether --enable-fortran was given. +if test "${enable_fortran+set}" = set; then : + enableval=$enable_fortran; HDF_FORTRAN=$enableval fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" +else + echo "no" +fi +if test "X$HDF_FORTRAN" = "Xyes"; then +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## + + HDF_FORTRAN=yes + + HDF5_INTERFACES="$HDF5_INTERFACES fortran" + + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## + + + + + + + + + + ## -------------------------------------------------------------------- + ## Fortran source extention + ## ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -5467,7 +5633,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5623,96 +5789,61 @@ if test $ac_compiler_gnu = yes; then else GFC= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 -$as_echo_n "checking what $FC does with modules... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * - -cat >conftest.$ac_ext <&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main - case "$f" in - *.o) F9XMODEXT="o" ;; - *.mod) F9XMODEXT="mod" ;; - *.M) F9XMODEXT="M" ;; - esac - fi + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save -echo $modfiles 6>&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" else - echo yes 6>&1 + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 fi -fi -cd .. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 -$as_echo_n "checking how $FC finds modules... " >&6; } - -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - F9XMODFLAG=$flag - break - fi -done -if test -n "$F9XMODFLAG"; then - echo $F9XMODFLAG 1>&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" -else - echo unknown 1>&6 fi - - -rm -rf conftest* ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5721,187 +5852,495 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## Change to the Fortran 90 language + + + ## -------------------------------------------------------------------- + ## Check for a Fortran compiler and how to include modules. + ## ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - - - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" - fi + test -n "$ac_ct_FC" && break +done - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main +#ifndef __GNUC__ + choke me +#endif end _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes +else + ac_cv_prog_fc_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 +$as_echo_n "checking what $FC does with modules... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; +test -d conftestdir || mkdir conftestdir +cd conftestdir +rm -rf * - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; +cat >conftest.$ac_ext <&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo $modfiles 6>&1 +if test "$modfiles" = file.o; then + echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 + OLD_FCFLAGS=$FCFLAGS + FCFLAGS="$FCFLAGS -em" + eval $ac_compile + modfiles="" + for f in file.o module.mod MODULE.mod module.M MODULE.M; do + test -f $f && modfiles="$f" + done + if test "$modfiles" = "file.o"; then + FCFLAGS=$OLD_FCFLAGS + echo no 6>&1 + else + echo yes 6>&1 + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. -else +cd .. -cat > conftest.$ac_ext <<_ACEOF - program main +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 +$as_echo_n "checking how $FC finds modules... " >&6; } - end -_ACEOF +for flag in "-I" "-M" "-p"; do + cat >conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + F9XMODFLAG=$flag + break + fi +done + +if test -n "$F9XMODFLAG"; then + echo $F9XMODFLAG 1>&6 + FCFLAGS="$F9XMODFLAG. $FCFLAGS" +else + echo unknown 1>&6 +fi + + +rm -rf conftest* +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 +$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } + HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main + + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_F2003_REQUIREMENTS=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" + fi + + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_fc_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_fc_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_fc_v"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$FCLIBS" != "x"; then + ac_cv_fc_libs="$FCLIBS" # Let the user override the test. +else + +cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get @@ -6087,142 +6526,572 @@ done # restore positional arguments set X $ac_save_positional; shift -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } +FCLIBS="$ac_cv_fc_libs" + + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fc_dm_save_LIBS=$LIBS + LIBS="$LIBS $FCLIBS" + ac_fortran_dm_var=FC_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # First, try linking without a dummy main: + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=none +else + ac_cv_fortran_dummy_main=unknown +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define $ac_fortran_dm_var $ac_func +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=$ac_func; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_fc_dm_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } +FC_DUMMY_MAIN=$ac_cv_fc_dummy_main +if test "$FC_DUMMY_MAIN" != unknown; then : + if test $FC_DUMMY_MAIN != none; then + +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF + + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h + + fi +fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success=yes; break 2 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success_extra=yes; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi + + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +case $ac_cv_fc_mangling in + "lower case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + ;; + "lower case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + ;; + "upper case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + ;; + "upper case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + ;; +esac ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 + + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" + + HAVE_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + i = sizeof(x) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_SIZEOF_FORTRAN="yes" else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - # First, try linking without a dummy main: - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + + HAVE_C_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_SIZEOF_FORTRAN="yes" else - ac_cv_fortran_dummy_main=unknown + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + + HAVE_STORAGE_SIZE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM + _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_STORAGE_SIZE_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} + + + + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then +rm -f pac_fconftest.out +if test "$cross_compiling" = yes; then : -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then +else + cat > conftest.$ac_ext <<_ACEOF -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - fi -fi + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 +$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=${ac_fc_srcext-f} @@ -6230,350 +7099,300 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of native KINDS" >&5 +$as_echo_n "checking sizeof of native KINDS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else + +pack_int_sizeof="" +rm -f pac_fconftest.out cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + program main + integer a + real b + double precision c + open(8, file="pac_fconftest.out", form="formatted") + write(8,*) sizeof(a) + write(8,*) kind(a) + write(8,*) sizeof(b) + write(8,*) kind(b) + write(8,*) sizeof(c) + write(8,*) kind(c) + close(8) + end + -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + +else + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pack_int_sizeof" >&5 +$as_echo "$pack_int_sizeof" >&6; } +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} + +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi - else - ac_cv_fc_mangling="unknown" - fi +rm -f pac_fconftest.out +if test "$cross_compiling" = yes; then : + - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat > conftest.$ac_ext <<_ACEOF + + + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 +$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 +$as_echo_n "checking sizeof of available INTEGER KINDs... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h +pack_int_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validIntKinds; do + cat > conftest.$ac_ext <<_ACEOF - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + program main + integer (kind=$kind) a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h +_ACEOF + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + +else + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available REAL KINDs" >&5 +$as_echo_n "checking sizeof of available REAL KINDs... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validRealKinds; do + cat > conftest.$ac_ext <<_ACEOF - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" - HAVE_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF + program main + REAL (kind=$kind) :: a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end - PROGRAM main - i = sizeof(x) - END PROGRAM _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - + if test "$cross_compiling" = yes; then : - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + pack_real_sizeof="" - HAVE_C_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF +else + if ac_fn_fc_try_run "$LINENO"; then : - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_SIZEOF_FORTRAN="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - HAVE_STORAGE_SIZE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_STORAGE_SIZE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - HAVE_C_LONG_DOUBLE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 -$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then + ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) + ##fi + + ##PAC_FC_AVAIL_INTEGER_MODELS ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then @@ -6603,6 +7422,9 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h fi + +$as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h + else FC="no" fi @@ -7875,136 +8697,6 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : @@ -10831,269 +11523,21 @@ else rm -rf libconftest.dylib* rm -f conftest.* fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -11111,114 +11555,87 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - ac_cv_header_stdc=no + lt_cv_ld_exported_symbols_list=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM fi - -done - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac for ac_header in dlfcn.h do : @@ -23141,39 +23558,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double -_ACEOF - - +## MOVED EARLIER FOR FORTRAN --MSB-- AC_CHECK_SIZEOF([long double], [8]) ## Checkpoint the cache cat >confcache <<\_ACEOF @@ -24326,6 +24711,42 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## Check for the __FLOAT128 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5 +$as_echo_n "checking for __float128... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +__float128 x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ## ---------------------------------------------------------------------- ## Check if the dev_t type is a scalar type (must come after the check for ## sys/types.h) @@ -30031,7 +30452,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31327,6 +31748,7 @@ do "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;; "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;; + "fortran/src/H5fort_type_defines.h") CONFIG_FILES="$CONFIG_FILES fortran/src/H5fort_type_defines.h" ;; "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;; "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;; "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;; diff --git a/configure.ac b/configure.ac index 701682a..edef8c2 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ AC_MSG_RESULT([done]) ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -174,6 +175,7 @@ AC_SUBST([HDF5_HL]) HDF5_HL=yes AC_SUBST([INSTRUMENT]) AC_SUBST([CODESTACK]) CODESTACK=no AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no +AC_SUBST([HAVE_FLOAT128]) HAVE_FLOAT128=no AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no AC_SUBST([THREADSAFE]) THREADSAFE=no AC_SUBST([STATIC_SHARED]) @@ -343,6 +345,8 @@ case "X-$ALLOW_UNSUPPORTED" in ;; esac +AC_CHECK_SIZEOF([long double], [8]) + ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -428,6 +432,29 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE PAC_PROG_FC_HAVE_C_LONG_DOUBLE + + PAC_FC_NATIVE_INTEGER + + PAC_FC_AVAIL_KINDS + PAC_FC_SIZEOF_INT_KINDS + PAC_FC_SIZEOF_REAL_KINDS + + AC_SUBST([PAC_FC_ALL_REAL_KINDS]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) + AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) + + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then + ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) + ##fi + + ##PAC_FC_AVAIL_INTEGER_MODELS ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then @@ -449,6 +476,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi + AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) else FC="no" fi @@ -1022,7 +1050,7 @@ AC_CHECK_SIZEOF([long long], [8]) AC_CHECK_SIZEOF([__int64], [8]) AC_CHECK_SIZEOF([float], [4]) AC_CHECK_SIZEOF([double], [8]) -AC_CHECK_SIZEOF([long double], [8]) +## MOVED EARLIER FOR FORTRAN --MSB-- AC_CHECK_SIZEOF([long double], [8]) ## Checkpoint the cache AC_CACHE_SAVE @@ -1079,6 +1107,17 @@ AC_CHECK_SIZEOF([off64_t], [8]) ## Checkpoint the cache AC_CACHE_SAVE +## Check for the __FLOAT128 + +AC_MSG_CHECKING([for __float128]) +AC_TRY_COMPILE([], + [__float128 x;], + [AC_DEFINE([HAVE_FLOAT128], [1], + [__float128 is available]) + AC_MSG_RESULT([yes])], + AC_MSG_RESULT([no]) +) + ## ---------------------------------------------------------------------- ## Check if the dev_t type is a scalar type (must come after the check for ## sys/types.h) @@ -2850,6 +2889,7 @@ AC_CONFIG_FILES([src/libhdf5.settings fortran/Makefile fortran/src/h5fc fortran/src/Makefile + fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile diff --git a/examples/Makefile.in b/examples/Makefile.in index f215316..ac7f3e2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 04b17e7..253302f 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 408aaa6..fb3aeb6 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 8df4b36..993b358 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -56,7 +56,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes hid_t c_type_id; size_t tmp_val; -/* Fortran INTEGER is may not be the same as C in; do all checking to find +/* Fortran INTEGER may not be the same as C; do all checking to find an appropriate size */ if (sizeof(int_f) == sizeof(int)) { @@ -174,44 +174,44 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ /* - * FIND H5T_NATIVE_REAL_4 + * FIND H5T_NATIVE_REAL_C_FLOAT */ - if (sizeof(real_4_f) == sizeof(float)) { + if (sizeof(real_C_FLOAT_f) == sizeof(float)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_4_f) == sizeof(double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_4_f) == sizeof(long double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(long double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_8 + * FIND H5T_NATIVE_REAL_C_DOUBLE */ - if (sizeof(real_8_f) == sizeof(float)) { + if (sizeof(real_C_DOUBLE_f) == sizeof(float)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_8_f) == sizeof(double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_8_f) == sizeof(long double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(long double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_16 + * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE */ - if (sizeof(real_16_f) == sizeof(float)) { + if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_16_f) == sizeof(double)) { + else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_16_f) == sizeof(long double)) { + else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index d807d6e..d7d9efe 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -379,12 +379,12 @@ CONTAINS h5_type = H5T_NATIVE_INTEGER_8 ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_4)THEN - h5_type = H5T_NATIVE_REAL_4 - ELSE IF(kind.EQ.Fortran_REAL_8)THEN - h5_type = H5T_NATIVE_REAL_8 - ELSE IF(kind.EQ.Fortran_REAL_16)THEN - h5_type = H5T_NATIVE_REAL_16 + IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN + h5_type = H5T_NATIVE_REAL_C_FLOAT + ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_DOUBLE + ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index dde4c11..3786130 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -14,3 +14,6 @@ ! Define if the intrinsic function C_LONG_DOUBLE exists #undef FORTRAN_HAVE_C_LONG_DOUBLE + +! Define the size of C's long double +#define H5_SIZEOF_LONG_DOUBLE diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index ac368d1..5e67220 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -82,9 +82,9 @@ MODULE H5GLOBAL H5T_NATIVE_INTEGER_2, & H5T_NATIVE_INTEGER_4, & H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_4, & - H5T_NATIVE_REAL_8, & - H5T_NATIVE_REAL_16, & + H5T_NATIVE_REAL_C_FLOAT, & + H5T_NATIVE_REAL_C_DOUBLE, & + H5T_NATIVE_REAL_C_LONG_DOUBLE, & H5T_NATIVE_INTEGER, & H5T_NATIVE_REAL, & H5T_NATIVE_DOUBLE, & @@ -144,9 +144,9 @@ MODULE H5GLOBAL EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_C_FLOAT) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_C_DOUBLE) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_C_LONG_DOUBLE) EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index ae4ef40..ef0a1f3 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -31,6 +31,7 @@ */ #include +#include #include #include "H5public.h" @@ -48,9 +49,9 @@ FILE * fort_header; #define FFILE "H5fortran_types.F90" /* Prototypes for the write routines */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); -void writeTypedefDefault(const char* c_typedef, unsigned int size); -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind); +void writeTypedef(const char* c_typedef, const char* c_type, int size); +void writeTypedefDefault(const char* c_typedef, int size); +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind); void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); static void @@ -121,20 +122,20 @@ endFfile(void) } /* Define a c_int_x type in the C header */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size) +void writeTypedef(const char* c_typedef, const char* c_type, int size) { fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type); } /* Call this function if there is no matching C type for sizes > 1 */ -void writeTypedefDefault(const char* c_typedef, unsigned int size) +void writeTypedefDefault(const char* c_typedef, int size) { assert(size %2 == 0); fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); } /* Create matching Fortran and C types by writing to both files */ -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind) +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind) { fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); @@ -144,17 +145,25 @@ void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } - int main(void) { - int FoundIntSize[4]; - unsigned FoundIntSizeKind[4]; - int FoundRealSize[3]; - unsigned FoundRealSizeKind[3]; - int i,j,flag; + int FoundIntSize[10]; + int FoundIntSizeKind[10]; + int FoundRealSize[10]; + int FoundRealSizeKind[10]; + int i, j,flag; char chrA[20],chrB[20]; int H5_C_HAS_REAL_NATIVE_16; + int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; + int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF; + int RealKinds[] = H5_FORTRAN_REAL_KINDS; + int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF; + char Real_C_TYPES[10][32]; + + int H5_FORTRAN_NUM_INTEGER_KINDS; + int H5_FORTRAN_NUM_REAL_KINDS; + /* Open target files */ c_header = fopen(CFILE, "w"); fort_header = fopen(FFILE, "w"); @@ -166,213 +175,123 @@ int main(void) initCfile(); initFfile(); - /* First, define c_int_x */ - -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - if(sizeof(long long) == 1) - writeTypedef("int", "long long", 1); - else if(sizeof(long) == 1) - writeTypedef("int", "long", 1); - else if(sizeof(int) == 1) - writeTypedef("int", "int", 1); - else if(sizeof(short) == 1) - writeTypedef("int", "short", 1); - else - writeTypedef("int", "char", 1); - /* Actually, char is not necessarily one byte. - * But if char isn't, then nothing is, so this - * is as close as we can get. */ - if(sizeof(size_t) == 1) - writeTypedef("size_t", "size_t", 1); - if(sizeof(hsize_t) == 1) - writeTypedef("hsize_t", "hsize_t", 1); -#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - if(sizeof(long long) == 2) - writeTypedef("int", "long long", 2); - else if(sizeof(long) == 2) - writeTypedef("int", "long", 2); - else if(sizeof(int) == 2) - writeTypedef("int", "int", 2); - else if(sizeof(short) == 2) - writeTypedef("int", "short", 2); - else - writeTypedefDefault("int",2); - - if(sizeof(size_t) == 2) - writeTypedef("size_t", "size_t", 2); - if(sizeof(hsize_t) == 2) - writeTypedef("hsize_t", "hsize_t", 2); -#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - if(sizeof(long long) == 4) - writeTypedef("int", "long long", 4); - else if(sizeof(long) == 4) - writeTypedef("int", "long", 4); - else if(sizeof(int) == 4) - writeTypedef("int", "int", 4); - else if(sizeof(short) == 4) - writeTypedef("int", "short", 4); - else - writeTypedefDefault("int",4); - - if(sizeof(size_t) == 4) - writeTypedef("size_t", "size_t", 4); - if(sizeof(hsize_t) == 4) - writeTypedef("hsize_t", "hsize_t", 4); - -#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - if(sizeof(long long) == 8) - writeTypedef("int", "long long", 8); - else if(sizeof(long) == 8) - writeTypedef("int", "long", 8); - else if(sizeof(int) == 8) - writeTypedef("int", "int", 8); - else if(sizeof(short) == 8) - writeTypedef("int", "short", 8); - else - writeTypedefDefault("int",8); - - if(sizeof(size_t) == 8) - writeTypedef("size_t", "size_t", 8); - if(sizeof(hsize_t) == 8) - writeTypedef("hsize_t", "hsize_t", 8); - -#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/ - - /* Define c_float_x */ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND - if(sizeof(long double) == 4) - writeTypedef("float", "long double", 4); - else if(sizeof(double) == 4) - writeTypedef("float", "double", 4); - else if(sizeof(float) == 4) - writeTypedef("float", "float", 4); - else - { printf("Fortran REAL is 4 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_4_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND - if(sizeof(long double) == 8) - writeTypedef("float", "long double", 8); - else if(sizeof(double) == 8) - writeTypedef("float", "double", 8); - else if(sizeof(float) == 8) - writeTypedef("float", "float", 8); - else - { printf("Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_8_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND - if(sizeof(long double) == 16) - writeTypedef("float", "long double", 16); - else if(sizeof(double) == 16) - writeTypedef("float", "double", 16); - else if(sizeof(float) == 16) - writeTypedef("float", "float", 16); - else /*C has no 16 byte float so disable it in Fortran*/ - { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf(" Disabling Fortran 16 byte REALs\n"); - H5_C_HAS_REAL_NATIVE_16 = 0; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_16_KIND*/ + /* (a) define c_int_x */ + + H5_FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds)/sizeof(IntKinds[0])); + H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds)/sizeof(RealKinds[0])); + + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(sizeof(long long) == IntKinds_SizeOf[i]) + writeTypedef("int", "long long", IntKinds[i]); + else if(sizeof(long) == IntKinds[i]) + writeTypedef("int", "long", IntKinds[i]); + else if(sizeof(int) == IntKinds_SizeOf[i]) + writeTypedef("int", "int", IntKinds[i]); + else if(sizeof(short) == IntKinds_SizeOf[i]) + writeTypedef("int", "short", IntKinds[i]); + else + if(IntKinds_SizeOf[i] == 1) { + writeTypedef("int", "char", IntKinds[i]); + /* Actually, char is not necessarily one byte. + * But if char isn't, then nothing is, so this + * is as close as we can get. */ + } else { + writeTypedefDefault("int",IntKinds[i]); + } + if(sizeof(size_t) == IntKinds_SizeOf[i]) + writeTypedef("size_t", "size_t", IntKinds[i]); + if(sizeof(hsize_t) == IntKinds_SizeOf[i]) + writeTypedef("hsize_t", "hsize_t", IntKinds[i]); + } + + /* (b) Define c_float_x */ + + for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { +#ifdef HAVE_FLOAT128 +/* should fail */ + if(sizeof(__float128) == RealKinds_SizeOf[i]) { + writeTypedef("float", "__float128", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } else +#endif + if(sizeof(long double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); + } else if(sizeof(double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_DOUBLE"); + } else if(sizeof(float) == RealKinds_SizeOf[i]) { + writeTypedef("float", "float", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT"); + } else { + printf(" **** HDF5 WARNING ****/n"); + printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); + printf("Fortran Interfaces for Fortran REALs of %d bytes will not exist\n",RealKinds_SizeOf[i]); + } + } /* Now begin defining fortran types. */ fprintf(c_header, "\n"); + /* haddr_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8 - writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4 - writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2 - writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1 - writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for haddr_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) { + writeToFiles("int","HADDR_T", "haddr_t_f", H5_SIZEOF_HADDR_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for haddr_t */ + return -1; + } /* hsize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hsize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) { + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", H5_SIZEOF_HSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hsize_t */ + return -1; + } /* hssize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hssize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) { + writeToFiles("int","HSSIZE_T", "hssize_t_f", H5_SIZEOF_HSSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hssize_t */ + return -1; + } /* off_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8 - writeToFiles("int","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("int","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("int","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("int","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 + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) { + writeToFiles("int","OFF_T", "off_t_f", H5_SIZEOF_OFF_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for off_t */ + return -1; + } /* size_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8 - writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4 - writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2 - writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1 - writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for size_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) { + writeToFiles("size_t","SIZE_T", "size_t_f", H5_SIZEOF_SIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for size_t */ + return -1; + } /* int */ -#if defined H5_FORTRAN_HAS_NATIVE_8_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND); -#else - /* Error: couldn't find a size for int */ - return -1; -#endif + writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_SIZEOF, H5_FORTRAN_NATIVE_INTEGER_KIND); + + /* int_1, int_2, int_4, int_8 */ @@ -381,29 +300,20 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundIntSize[0] = -1; - FoundIntSize[1] = -2; - FoundIntSize[2] = -4; - FoundIntSize[3] = -8; -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - FoundIntSize[0] = 1; - FoundIntSizeKind[0] = H5_FORTRAN_HAS_INTEGER_1_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - FoundIntSize[1] = 2; - FoundIntSizeKind[1] = H5_FORTRAN_HAS_INTEGER_2_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - FoundIntSize[2] = 4; - FoundIntSizeKind[2] = H5_FORTRAN_HAS_INTEGER_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - FoundIntSize[3] = 8; - FoundIntSizeKind[3] = H5_FORTRAN_HAS_INTEGER_8_KIND ; -#endif + FoundIntSize[0] = -1; + FoundIntSize[1] = -1; + FoundIntSize[2] = -1; + FoundIntSize[3] = -1; + FoundIntSize[4] = -1; + + for(i=0;i 0) /* Found the integer type */ { sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]); @@ -450,129 +360,144 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundRealSize[0] = -4; - FoundRealSize[1] = -8; - FoundRealSize[2] = -16; - -#if defined H5_FORTRAN_HAS_REAL_4_KIND - FoundRealSize[0] = 4; - FoundRealSizeKind[0] = H5_FORTRAN_HAS_REAL_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_REAL_8_KIND - FoundRealSize[1] = 8; - FoundRealSizeKind[1] = H5_FORTRAN_HAS_REAL_8_KIND; -#endif - -#if defined H5_FORTRAN_HAS_REAL_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - FoundRealSize[2] = 16; - FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND; - } -#endif - - for(i=0;i<3;i++) { - if( FoundRealSize[i] > 0) /* Found the real type */ - { - sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]); - sprintf(chrB, "real_%d_f", FoundRealSize[i]); - writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); - } - else /* Did not find the real type */ - { - flag = 0; /* flag indicating if found the next highest */ - for(j=i+1;j<3;j++) /* search for next highest */ - { - if( FoundRealSize[j] > 0) /* Found the next highest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) { - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - flag = 1; - } - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ + FoundRealSize[0] = -1; + FoundRealSize[1] = -1; + FoundRealSize[2] = -1; + FoundRealSize[3] = -1; + FoundRealSize[4] = -1; + + for(i=0;i 0) /\* Found the real type *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", Real_C_TYPES[i]); */ +/* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); */ +/* } */ +/* else /\* Did not find the real type *\/ */ +/* { */ +/* flag = 0; /\* flag indicating if found the next highest *\/ */ +/* for(j=i+1;j<3;j++) /\* search for next highest *\/ */ +/* { */ +/* if( FoundRealSize[j] > 0) /\* Found the next highest *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ +/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ +/* if(FoundRealSize[j]>4) { */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ +/* flag = 1; */ /* } */ - flag = 1; - break; - } - } - if(flag == 0) /* No higher one found, so find next lowest */ - { - for(j=1;j>-1;j--) /* Search for next lowest */ - { - if( FoundRealSize[j] > 0) /* Found the next lowest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ -/* } */ - flag = 1; - break; - } - } - } - if(flag == 0) /* No higher or lower one found, indicating an error */ - return -1; - } - } +/* /\* else { *\/ */ +/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ +/* /\* } *\/ */ +/* flag = 1; */ +/* break; */ +/* } */ +/* } */ +/* if(flag == 0) /\* No higher one found, so find next lowest *\/ */ +/* { */ +/* for(j=1;j>-1;j--) /\* Search for next lowest *\/ */ +/* { */ +/* if( FoundRealSize[j] > 0) /\* Found the next lowest *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ +/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ +/* if(FoundRealSize[j]>4) */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ +/* /\* else { *\/ */ +/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ +/* /\* } *\/ */ +/* flag = 1; */ +/* break; */ +/* } */ +/* } */ +/* } */ +/* if(flag == 0) /\* No higher or lower one found, indicating an error *\/ */ +/* return -1; */ +/* } */ +/* } */ /* hid_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2 - writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1 - writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#else - /* Error: couldn't find a size for hid_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) { + writeToFiles("int","HID_T", "hid_t_f", H5_SIZEOF_HID_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hid_t */ + return -1; + } /* real_f */ -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - writeToFilesChr("float","Fortran_REAL", "real_f", 16, "C_LONG_DOUBLE"); - } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND - writeToFilesChr("float", "Fortran_REAL", "real_f", 8, "C_DOUBLE"); -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND - writeToFilesChr("float", "Fortran_REAL", "real_f", 4, "C_FLOAT"); -#else - /* Error: couldn't find a size for real_f */ - return -1; -#endif + if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else { + /* No exact match, choose the next highest */ + if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else + /* Error: couldn't find a size for real_f */ + return -1; + } /* double_f */ -#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 16, "C_LONG_DOUBLE"); - } else { -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); - } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 4, "C_FLOAT"); - } -#else - /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ - return -1; - } -#endif + if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT"); + else { +/* /\* No exact match, choose the next highest *\/ */ +/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(long double)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(double)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(double), "C_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(float)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(float), "C_FLOAT"); */ +/* else */ + /* Error: couldn't find a size for double_f */ +/* printf("Error: couldn't find a size for double_f \n"); */ +/* return -1; */ + } + + + +/* /\* double_f *\/ */ +/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_LONG_DOUBLE_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_LONG_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_DOUBLE_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_FLOAT_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_FLOAT"); */ +/* else */ +/* /\* Error: couldn't find a size for double_f *\/ */ +/* return -1; */ -#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); -#else - /* Error: couldn't find a size for real_f */ - return -1; -#endif +/* writeToFiles("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, H5_FORTRAN_NATIVE_DOUBLE_KIND); */ + +/* #elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND */ +/* writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); */ +/* #else */ +/* /\* Error: couldn't find a size for real_f *\/ */ +/* return -1; */ +/* #endif */ /* /\* real_f *\/ */ /* if(sizeof(float) == C_LONG_DOUBLE_SIZEOF) { */ diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 9736bcc..43a5f3f 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -114,7 +114,7 @@ endif # and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind +noinst_PROGRAMS = H5match_types H5test_kind # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create @@ -129,19 +129,19 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. # Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h +#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) +# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h -H5match_types.$(OBJEXT): H5fort_type_defines.h +#H5match_types.$(OBJEXT): H5fort_type_defines.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.F90 +#H5fortran_detect_SOURCES = H5fortran_detect.F90 # H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.F90: H5test_kind$(EXEEXT) +H5_KINDff.F90: H5test_kind$(EXEEXT) $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # H5test_kind.F90 is included in the distribution, and Automake knows @@ -157,8 +157,8 @@ FORTRAN_API=yes # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.F90 -H5fortran_detect.lo: H5fortran_detect.F90 +#H5fortran_types.lo: H5fortran_types.F90 +#H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 249ba10..f746ccf 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -101,14 +101,14 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \ $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \ - $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver README + $(srcdir)/H5fort_type_defines.h.in $(top_srcdir)/bin/depcomp \ + $(top_srcdir)/bin/test-driver README # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ - H5test_kind$(EXEEXT) +noinst_PROGRAMS = H5match_types$(EXEEXT) H5test_kind$(EXEEXT) TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -118,7 +118,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc -CONFIG_CLEAN_FILES = h5fc +CONFIG_CLEAN_FILES = h5fc H5fort_type_defines.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -166,9 +166,6 @@ libhdf5_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) -am_H5fortran_detect_OBJECTS = H5fortran_detect.$(OBJEXT) -H5fortran_detect_OBJECTS = $(am_H5fortran_detect_OBJECTS) -H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) @@ -234,10 +231,9 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ - H5match_types.c $(H5test_kind_SOURCES) -DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) \ - $(H5fortran_detect_SOURCES) H5match_types.c \ +SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ + $(H5test_kind_SOURCES) +DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ $(H5test_kind_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -518,6 +514,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -564,6 +561,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -753,10 +760,6 @@ MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ # H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# Automake knows how to build fortran programs if we tell it the source -# files. -H5fortran_detect_SOURCES = H5fortran_detect.F90 - # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. H5test_kind_SOURCES = H5test_kind.F90 @@ -832,6 +835,8 @@ distclean-hdr: -rm -f H5config_f.inc stamp-h2 h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +H5fort_type_defines.h: $(top_builddir)/config.status $(srcdir)/H5fort_type_defines.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -880,10 +885,6 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -H5fortran_detect$(EXEEXT): $(H5fortran_detect_OBJECTS) $(H5fortran_detect_DEPENDENCIES) $(EXTRA_H5fortran_detect_DEPENDENCIES) - @rm -f H5fortran_detect$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5fortran_detect_OBJECTS) $(H5fortran_detect_LDADD) $(LIBS) - H5match_types$(EXEEXT): $(H5match_types_OBJECTS) $(H5match_types_DEPENDENCIES) $(EXTRA_H5match_types_DEPENDENCIES) @rm -f H5match_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(H5match_types_OBJECTS) $(H5match_types_LDADD) $(LIBS) @@ -1389,15 +1390,19 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. # Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h +#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) +# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h + +#H5match_types.$(OBJEXT): H5fort_type_defines.h -H5match_types.$(OBJEXT): H5fort_type_defines.h +# Automake knows how to build fortran programs if we tell it the source +# files. +#H5fortran_detect_SOURCES = H5fortran_detect.F90 # H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.F90: H5test_kind$(EXEEXT) +H5_KINDff.F90: H5test_kind$(EXEEXT) $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # Hardcode the dependencies of these files. There isn't a known way of @@ -1405,8 +1410,8 @@ H5fortran_detect.F90: H5test_kind$(EXEEXT) # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.F90 -H5fortran_detect.lo: H5fortran_detect.F90 +#H5fortran_types.lo: H5fortran_types.F90 +#H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 578d65f..866e28c 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -525,6 +525,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -571,6 +572,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index bd6264f..fba9e25 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -125,7 +125,6 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "MyType", type_id, error) CALL check("h5tcommit_f",error,total_error) - ! ! Close dataspaces, groups and integer dataset ! @@ -233,7 +232,6 @@ SUBROUTINE refobjtest(cleanup, 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 diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 8d91f66..761dfcb 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -314,7 +314,6 @@ CONTAINS CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) CALL check("h5tclose_f", error, total_error) - ! ! Create and store compound datatype with the character and ! array members. diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index 32531b0..5cac62d 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -739,10 +739,10 @@ END SUBROUTINE test_array_compound_atomic CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) CALL check("h5tget_size_f", error, total_error) IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error) + CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) CALL check("h5tget_size_f", error, total_error) ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error) + CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) CALL check("h5tget_size_f", error, total_error) ENDIF @@ -757,8 +757,8 @@ END SUBROUTINE test_array_compound_atomic ! Initialize the data type IDs ! ---------------------------- dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; - dtsinfo%datatype(2) = H5T_NATIVE_REAL_4; - dtsinfo%datatype(3) = H5T_NATIVE_REAL_8; + dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; + dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; ! Initialize the names of data members @@ -866,7 +866,7 @@ END SUBROUTINE test_array_compound_atomic CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) CALL check("h5tcreate_f", error, total_error) - CALL h5tarray_create_f(H5T_NATIVE_REAL_4, 1, dima, array_dt, error) + CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) CALL check("h5tarray_create_f", error, total_error) CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) @@ -1023,8 +1023,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_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !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 @@ -2978,7 +2978,7 @@ SUBROUTINE test_nbit(total_error ) USE ISO_C_BINDING IMPLICIT NONE - INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors INTEGER, INTENT(INOUT) :: total_error INTEGER(hid_t) :: file @@ -3128,7 +3128,7 @@ SUBROUTINE t_enum_conv(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, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! Handles INTEGER(hid_t) :: file ! Handles diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index ba4f492..505d945 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -76,7 +76,7 @@ CONTAINS !DEC$endif SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) USE HDF5 - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors CHARACTER(LEN=*) :: string REAL(real_kind_7) :: value, correct_value INTEGER :: total_error diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 2ae7e8e..6b2269b 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 56650e2..8e47cce 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 55e827b..5458d35 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index a1efec5..e5abead 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index c98a3a5..49a6c27 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -468,6 +468,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -514,6 +515,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 20f1039..10ba6fb 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 41e510e..b9b7f68 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 012c84a..3380d01 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index ae07190..4150781 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 6234635..02409d9 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -86,8 +86,7 @@ h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, - void *buf, - hsize_t_f *dims); + void *buf); HDF5_HL_F90CSTUBDLL int_f @@ -97,7 +96,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *attrnamelen, _fcd attrname, size_t_f *size, - void *buf, char *dtype); + void *buf, char *dtype, size_t_f *sizeof_val); HDF5_HL_F90CSTUBDLL diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 7f52eb2..3122b60 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -113,8 +113,7 @@ h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, - void *buf, - hsize_t_f *dims) + void *buf) { int ret_value = -1; herr_t ret; @@ -296,7 +295,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *attrnamelen, _fcd attrname, size_t_f *size, - void *buf, char *dtype) + void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; herr_t ret; @@ -324,18 +323,25 @@ h5ltset_attribute_c(hid_t_f *loc_id, c_size = (size_t)*size; if( HDstrncmp(dtype,"I",1) == 0 ) { - if (sizeof(int_f) == sizeof(int)) - ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size); + if ((size_t)*sizeof_val == sizeof(int)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_INT, (const int *)buf); + else if ((size_t)*sizeof_val == sizeof(long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LONG, (const long *)buf); + else if ((size_t)*sizeof_val == sizeof(long long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LLONG, (const long long *)buf); else goto done; } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname, (float *)buf,c_size); - } else if ( HDstrncmp(dtype,"D",1) == 0 ) { - ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname, (double *)buf,c_size); + if((size_t)*sizeof_val == sizeof(float)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_FLOAT, (const float *)buf); + else if((size_t)*sizeof_val == sizeof(double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_DOUBLE, (const double *)buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LDOUBLE, (const long double *)buf); +#endif + else + goto done; } else if ( HDstrncmp(dtype,"C",1) == 0 ) { c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); @@ -636,6 +642,10 @@ h5ltget_attribute_c(hid_t_f *loc_id, ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); else if((size_t)*sizeof_val == sizeof(double)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LDOUBLE,buf); +#endif else goto done; } diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 10169c5..c1ca6be 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -246,7 +246,7 @@ MODULE h5lt END INTERFACE INTERFACE - INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf,dims) & + INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf) & BIND(C,NAME='h5ltread_dataset_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -255,13 +255,12 @@ MODULE h5lt INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf TYPE(C_PTR), VALUE :: buf ! data buffer END FUNCTION h5ltread_dataset_c END INTERFACE INTERFACE - INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype) & + INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype, SizeOf_buf) & BIND(C,NAME='h5ltset_attribute_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -276,6 +275,7 @@ MODULE h5lt CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the ! the buffer: ! R=Real, D=DOUBLE, I=Interger, C=Character + INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype END FUNCTION h5ltset_attribute_c END INTERFACE @@ -1092,20 +1092,18 @@ CONTAINS dset_name,& type_id,& buf,& - dims,& errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf TYPE(C_PTR) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf, dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) END SUBROUTINE h5ltread_dataset_f_ptr @@ -1146,7 +1144,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int1 @@ -1188,7 +1186,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int2 @@ -1213,7 +1211,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int3 @@ -1234,7 +1232,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int4 @@ -1255,7 +1253,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int5 @@ -1293,7 +1291,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int6 @@ -1314,7 +1312,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int7 @@ -1356,7 +1354,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float1 @@ -1381,7 +1379,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float2 @@ -1406,7 +1404,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float3 @@ -1427,7 +1425,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float4 @@ -1448,7 +1446,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float5 @@ -1486,7 +1484,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float6 @@ -1507,7 +1505,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float7 @@ -1549,7 +1547,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double1 @@ -1574,7 +1572,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double2 @@ -1599,7 +1597,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double3 @@ -1620,7 +1618,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double4 @@ -1641,7 +1639,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double5 @@ -1662,7 +1660,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double6 @@ -1683,7 +1681,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double7 @@ -1725,7 +1723,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double1 @@ -1750,7 +1748,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double2 @@ -1775,7 +1773,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double3 @@ -1796,7 +1794,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double4 @@ -1817,7 +1815,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double5 @@ -1838,7 +1836,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double6 @@ -1859,7 +1857,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double7 #endif @@ -2604,7 +2602,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_1 @@ -2627,7 +2625,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_2 @@ -2650,7 +2648,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_3 @@ -2669,7 +2667,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_4 @@ -2688,7 +2686,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_5 @@ -2707,7 +2705,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_6 @@ -2726,7 +2724,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_7 @@ -2767,7 +2765,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_1 @@ -2790,7 +2788,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_2 @@ -2813,7 +2811,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_3 @@ -2832,7 +2830,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_4 @@ -2851,7 +2849,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_5 @@ -2870,7 +2868,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_6 @@ -2889,7 +2887,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_7 @@ -2929,7 +2927,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_1 @@ -2952,7 +2950,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_2 @@ -2975,7 +2973,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_3 @@ -2994,7 +2992,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_4 @@ -3013,7 +3011,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_5 @@ -3032,7 +3030,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_6 @@ -3051,7 +3049,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_7 @@ -3092,7 +3090,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_1 @@ -3115,7 +3113,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_2 @@ -3138,7 +3136,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_3 @@ -3157,7 +3155,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_4 @@ -3176,7 +3174,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_5 @@ -3195,7 +3193,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_6 @@ -3214,7 +3212,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_7 #endif @@ -3320,6 +3318,61 @@ CONTAINS ! Make/Read attribute functions !------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: May 4, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf,& + buf_type, SizeOf_buf_type, & + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + TYPE(C_PTR) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in) :: buf_type ! + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + buf,buf_type_uppercase(1:1)//C_NULL_CHAR, SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_f !------------------------------------------------------------------------- ! Function: h5ltset_attribute_int_f @@ -3355,12 +3408,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1:1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'I'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'I'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_int_f @@ -3398,12 +3459,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'R'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_float_f @@ -3441,12 +3510,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'D'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_double_f @@ -3484,13 +3561,21 @@ CONTAINS INTEGER(size_t) :: attrlen ! name length INTEGER(size_t) :: buflen ! data buffer length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)(1:1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF((buf(1)(1:1)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) buflen = LEN(buf) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,f_ptr,'C'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,& + f_ptr,'C'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_string_f @@ -3511,26 +3596,40 @@ CONTAINS ! !------------------------------------------------------------------------- -!!$ SUBROUTINE h5ltget_attribute_f(loc_id,& -!!$ dset_name,& -!!$ attr_name,& -!!$ buf,& -!!$ errcode ) -!!$ -!!$ IMPLICIT NONE -!!$ INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier -!!$ CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset -!!$ CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute -!!$ INTEGER :: errcode ! error code -!!$ TYPE(C_PTR) :: buf! data buffer -!!$ INTEGER(size_t) :: namelen ! name length -!!$ INTEGER(size_t) :: attrlen ! name length -!!$ -!!$ namelen = LEN(dset_name) -!!$ attrlen = LEN(attr_name) -!!$ errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,'I'//C_NULL_CHAR) -!!$ -!!$ END SUBROUTINE h5ltget_attribute_f + SUBROUTINE h5ltget_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf, buf_type, SizeOf_buf_type, & + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(out) :: errcode ! error code + CHARACTER(LEN=*), INTENT(in) :: buf_type + TYPE(C_PTR) :: buf! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name, & + buf, buf_type_uppercase//C_NULL_CHAR, SizeOf_buf_type) + + + END SUBROUTINE h5ltget_attribute_f !------------------------------------------------------------------------- ! Function: h5ltget_attribute_int_f diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 510e4148..f513337 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,6 +489,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -535,6 +536,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 371b6fd..2c75fa5 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -477,6 +477,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -523,6 +524,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 22b99a5..8fe9612 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -38,6 +38,7 @@ END PROGRAM lite_test SUBROUTINE test_dataset1D() +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -55,11 +56,12 @@ INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer REAL, DIMENSION(DIM1) :: buf2 ! Data buffer REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: bufr3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer INTEGER :: errcode ! Error flag INTEGER :: i ! general purpose integer - +TYPE(C_PTR) :: f_ptr +integer(HID_T) :: mytype CALL test_begin(' Make/Read datasets (1D) ') @@ -101,7 +103,7 @@ CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, err ! DO i = 1, DIM1 IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (I)' PRINT *, bufr1(i), ' and ', buf1(i) STOP ENDIF @@ -126,7 +128,7 @@ CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcod ! DO i = 1, DIM1 IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (R)' PRINT *, bufr2(i), ' and ', buf2(i) STOP ENDIF @@ -139,19 +141,30 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) - +f_ptr = C_LOC(buf3(1)) +!PRINT*,h5kind_to_type(INT(KIND(buf3(1))), INT(H5_REAL_KIND)), H5T_NATIVE_REAL_8,H5T_NATIVE_REAL,H5T_NATIVE_REAL_16 +PRINT*, KIND(buf3(1)), Fortran_REAL_16 +mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +PRINT*,sizeof(buf3(1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & + mytype, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) +! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +stop ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) +f_ptr = C_LOC(bufr3(1)) +CALL h5ltread_dataset_f(file_id, dsetname3, & + h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) ! ! compare read and write buffers. ! DO i = 1, DIM1 IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (D)' PRINT *, bufr3(i), ' and ', buf3(i) STOP ENDIF @@ -179,6 +192,7 @@ END SUBROUTINE test_dataset1D SUBROUTINE test_dataset2D() +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -199,12 +213,13 @@ INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4r ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, n ! general purpose integers +TYPE(C_PTR) :: f_ptr CALL test_begin(' Make/Read datasets (2D) ') @@ -296,12 +311,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) +f_ptr = C_LOC(buf3(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) +f_ptr = C_LOC(buf3r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) ! ! compare read and write buffers. @@ -323,12 +342,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) +f_ptr = C_LOC(buf4(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) ! ! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) +f_ptr = C_LOC(buf4r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) ! ! compare read and write buffers. @@ -366,7 +389,7 @@ END SUBROUTINE test_dataset2D SUBROUTINE test_dataset3D() - +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -387,16 +410,16 @@ INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4r ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer INTEGER :: rank = 3 ! Dataset rank INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers INTEGER :: type_class INTEGER(SIZE_T) :: type_size - +TYPE(C_PTR) :: f_ptr CALL test_begin(' Make/Read datasets (3D) ') @@ -492,12 +515,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) +f_ptr = C_LOC(buf3(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) +f_ptr = C_LOC(buf3r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) ! ! compare read and write buffers. @@ -521,12 +548,14 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) +f_ptr = C_LOC(buf4(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) +f_ptr = C_LOC(buf4r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ! ! compare read and write buffers. @@ -608,22 +637,22 @@ SUBROUTINE test_datasetND(rank) INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbuf_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbufr_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbuf_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbufr_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbuf_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbufr_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbuf_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbufr_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbuf_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbufr_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbuf_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbufr_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbuf_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbufr_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers INTEGER :: type_class @@ -786,7 +815,7 @@ SUBROUTINE test_datasetND(rank) CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, dims(1:rank), errcode) + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) ELSE IF(rank.EQ.7)THEN @@ -846,14 +875,20 @@ SUBROUTINE test_datasetND(rank) ! write dataset. ! IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + f_ptr = C_LOC(rbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) + f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) + f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) ENDIF @@ -861,14 +896,17 @@ SUBROUTINE test_datasetND(rank) ! read dataset. ! IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_4, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, dims(1:rank), errcode) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_6, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_7, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ENDIF ! @@ -925,13 +963,17 @@ SUBROUTINE test_datasetND(rank) ! write dataset. ! IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_4, errcode) + f_ptr = C_LOC(dbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_5, errcode) + f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_6, errcode) + f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_7, errcode) + f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ENDIF @@ -939,13 +981,17 @@ SUBROUTINE test_datasetND(rank) ! read dataset. ! IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_4, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_5, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_6, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_7, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ENDIF ! @@ -1042,6 +1088,7 @@ END SUBROUTINE test_datasetND SUBROUTINE test_datasets() + USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -1064,10 +1111,10 @@ SUBROUTINE test_datasets() CHARACTER(LEN=8) :: buf1r ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1) :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer + REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer INTEGER :: i, n ! general purpose integer INTEGER :: has ! general purpose integer INTEGER :: type_class @@ -1075,6 +1122,7 @@ SUBROUTINE test_datasets() LOGICAL :: path_valid ! status of the path CHARACTER(LEN=6) :: chr_exact CHARACTER(LEN=8) :: chr_lg + TYPE(C_PTR) :: f_ptr ! ! Initialize FORTRAN predefined datatypes. @@ -1137,12 +1185,14 @@ SUBROUTINE test_datasets() ! ! write dataset. ! - CALL h5ltmake_dataset_float_f(file_id, dsetname3, rank, dims, buf3, errcode) + f_ptr = C_LOC(buf3(1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) ! ! read dataset. ! - CALL h5ltread_dataset_float_f(file_id, dsetname3, bufr3, dims, errcode) + f_ptr = C_LOC(bufr3(1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ! ! compare read and write buffers. @@ -1167,12 +1217,16 @@ SUBROUTINE test_datasets() ! ! write dataset. ! - CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) ! ! read dataset. ! - CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) ! ! compare read and write buffers. @@ -1341,7 +1395,7 @@ END SUBROUTINE test_datasets SUBROUTINE test_attributes() - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -1365,10 +1419,10 @@ SUBROUTINE test_attributes() ! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL(C_FLOAT), DIMENSION(DIM1) :: buf3 ! Data buffer - REAL(C_FLOAT), DIMENSION(DIM1) :: bufr3 ! Data buffer - REAL(C_DOUBLE), DIMENSION(DIM1) :: buf4 ! Data buffer - REAL(C_DOUBLE), DIMENSION(DIM1) :: bufr4 ! Data buffer + REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer + REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer INTEGER :: errcode ! Error flag INTEGER :: i, n ! general purpose integer INTEGER(SIZE_T) size ! size of attribute array @@ -1380,7 +1434,8 @@ SUBROUTINE test_attributes() INTEGER :: rank = 1 ! Dataset rank CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name INTEGER, DIMENSION(DIM1) :: buf ! Data buffer - + INTEGER(SIZE_T) :: SizeOf_buf_type + TYPE(C_PTR) :: f_ptr ! ! Initialize FORTRAN predefined datatypes. @@ -1448,11 +1503,26 @@ SUBROUTINE test_attributes() ! ! write attribute. ! - CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + f_ptr = C_LOC(buf3(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) + !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) ! ! read attribute. ! - CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + + f_ptr = C_LOC(bufr3(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) + !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) ! ! compare read and write buffers. @@ -1473,15 +1543,30 @@ SUBROUTINE test_attributes() CALL test_begin(' Set/Get attributes double ') + SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + ! ! write attribute. ! - CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4,size,errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) + + !CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,f_ptr,"Real", SizeOf_buf_type, size, errcode) ! ! read attribute. ! - CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) + +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + + f_ptr = C_LOC(bufr4(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) + +! CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) ! ! compare read and write buffers. @@ -1611,11 +1696,6 @@ SUBROUTINE test_attributes() ! END SUBROUTINE test_attributes - - - - - !------------------------------------------------------------------------- ! test_begin !------------------------------------------------------------------------- diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 2f619b8..a1bf57d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -513,6 +514,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index f180d68..074ed79 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -504,6 +504,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -550,6 +551,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 300e063..42b09c6 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index a5b9948..b26df4b 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -526,6 +527,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 571ad43..65bb817 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -282,4 +282,193 @@ dnl Try link a simple MPI program. dnl Change to the C language AC_LANG_POP(Fortran) ]) - + +dnl ------------------------------------------------------ +dnl Determine the available KINDs for REALs and INTEGERs +dnl ------------------------------------------------------ +dnl +dnl This is a runtime test. +dnl +AC_DEFUN([PAC_FC_AVAIL_KINDS],[ +AC_LANG_PUSH([Fortran]) +rm -f pac_fconftest.out +AC_RUN_IFELSE([ + AC_LANG_SOURCE([ + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + ]) +],[ + if test -s pac_fconftest.out ; then + + dnl pac_flag="`sed -e 's/ */ /g' pac_fconftest.out | tr '\012' ','`" + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + AC_MSG_CHECKING([for Fortran INTEGER KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) + AC_MSG_CHECKING([for Fortran REAL KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + else + AC_MSG_RESULT([Error]) + AC_MSG_WARN([No output from test program!]) + fi + dnl rm -f pac_fconftest.out +],[ + AC_MSG_RESULT([Error]) + AC_MSG_WARN([Failed to run program to determine available KINDs]) +],[ + dnl Even when cross_compiling=yes, + dnl pac_validKinds needs to be set for PAC_FC_INTEGER_MODEL_MAP() + dnl pac_validKinds="`echo \"$2\" | tr ',' ':'`" + dnl AC_MSG_RESULT([$2]) + dnl ifelse([$1],[],[PAC_FC_ALL_INTEGER_MODELS=$2],[$1=$2]) +]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validIntKinds; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + integer (kind=$kind) a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available REAL KINDs]) +AC_LANG_PUSH([Fortran]) +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validRealKinds; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + REAL (kind=$kind) :: a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_real_sizeof="$2" + ]) +done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }" +AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_NATIVE_INTEGER],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of native KINDS]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + integer a + real b + double precision c + open(8, file="pac_fconftest.out", form="formatted") + write(8,*) sizeof(a) + write(8,*) kind(a) + write(8,*) sizeof(b) + write(8,*) kind(b) + write(8,*) sizeof(c) + write(8,*) kind(c) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +dnl PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +AC_MSG_RESULT([$pack_int_sizeof]) +AC_LANG_POP([Fortran]) +]) diff --git a/src/H5config.h.in b/src/H5config.h.in index 2b34ade..a5083a8 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -42,6 +42,9 @@ /* Define if we have Fortran intrinsic STORAGE_SIZE */ #undef FORTRAN_HAVE_STORAGE_SIZE +/* Determine the size of C long double */ +#undef FORTRAN_SIZEOF_LONG_DOUBLE + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -94,6 +97,9 @@ /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP +/* __float128 is available */ +#undef HAVE_FLOAT128 + /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK diff --git a/src/Makefile.in b/src/Makefile.in index fc23c89..e84322a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -528,6 +528,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -574,6 +575,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/test/Makefile.in b/test/Makefile.in index 1e5aa39..9e0e615 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -872,6 +872,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -918,6 +919,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 358523b..d1329b9 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -495,6 +495,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -541,6 +542,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/Makefile.in b/tools/Makefile.in index ba872ae..7160874 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index e1554f2..760cf07 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -520,6 +521,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 538ff16..2e0dd0c 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -481,6 +481,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -527,6 +528,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 87319f9..0d6f10b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -526,6 +527,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index ee0600f..8ce37dd 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -520,6 +521,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 2634368..01b3784 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -486,6 +486,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -532,6 +533,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 7403e90..303065c 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index d014c7a..7c35da7 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -498,6 +498,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -544,6 +545,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index b859a59..524d8d7 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -522,6 +523,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 44fa676..6df09d7 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -463,6 +463,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -509,6 +510,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1e6c795..c5d1f37 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -501,6 +501,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -547,6 +548,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index f6508a6..8fa1eda 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -505,6 +505,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -551,6 +552,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -- cgit v0.12 From d1feb5307de48c3d69ec8c509862714ac88ec99f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 28 May 2015 09:17:47 -0500 Subject: [svn-r27118] fixed character length --- fortran/src/H5match_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index ef0a1f3..89ea786 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -152,7 +152,7 @@ int main(void) int FoundRealSize[10]; int FoundRealSizeKind[10]; int i, j,flag; - char chrA[20],chrB[20]; + char chrA[32],chrB[32]; int H5_C_HAS_REAL_NATIVE_16; int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; -- cgit v0.12 From 0560c11c20476a8c99316bd88f1b6924afa057f9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 28 May 2015 10:01:37 -0500 Subject: [svn-r27119] handles INTEGER*16 case --- configure | 8 ++++---- fortran/src/H5match_types.c | 2 +- m4/aclocal_fc.m4 | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index e01b5c2..15a76dc 100755 --- a/configure +++ b/configure @@ -7041,8 +7041,8 @@ else ENDIF IF (k .LE. 0) EXIT ENDDO - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " - WRITE(8,'(/)') + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + WRITE(8,'(/)') WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) DO ik=2,30 @@ -7197,8 +7197,8 @@ else ENDIF IF (k .LE. 0) EXIT ENDDO - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " - WRITE(8,'(/)') + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + WRITE(8,'(/)') WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) DO ik=2,30 diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 89ea786..35dbc19 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -131,7 +131,7 @@ void writeTypedef(const char* c_typedef, const char* c_type, int size) void writeTypedefDefault(const char* c_typedef, int size) { assert(size %2 == 0); - fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); + fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u;\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); } /* Create matching Fortran and C types by writing to both files */ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 65bb817..c8db176 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -308,8 +308,8 @@ AC_RUN_IFELSE([ ENDIF IF (k .LE. 0) EXIT ENDDO - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " - dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + dnl IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " WRITE(8,'(/)') WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) -- cgit v0.12 From 52e5579fbae41ee79f91eaeb66d452e8b1cc9e09 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 28 May 2015 11:53:15 -0500 Subject: [svn-r27122] removed dependency on generatored fortran source code --- Makefile.in | 1 - c++/Makefile.in | 1 - c++/examples/Makefile.in | 1 - c++/src/Makefile.in | 1 - c++/test/Makefile.in | 1 - configure | 7 ++----- configure.ac | 5 +---- examples/Makefile.in | 1 - fortran/Makefile.in | 1 - fortran/examples/Makefile.in | 1 - fortran/src/H5match_types.c | 10 +++++++--- fortran/src/H5test_kind.F90 | 3 +++ fortran/src/Makefile.am | 9 ++++----- fortran/src/Makefile.in | 11 ++++------- fortran/test/Makefile.in | 1 - fortran/testpar/Makefile.in | 1 - hl/Makefile.in | 1 - hl/c++/Makefile.in | 1 - hl/c++/examples/Makefile.in | 1 - hl/c++/src/Makefile.in | 1 - hl/c++/test/Makefile.in | 1 - hl/examples/Makefile.in | 1 - hl/fortran/Makefile.in | 1 - hl/fortran/examples/Makefile.in | 1 - hl/fortran/src/Makefile.in | 1 - hl/fortran/test/Makefile.in | 1 - hl/src/Makefile.in | 1 - hl/test/Makefile.in | 1 - hl/tools/Makefile.in | 1 - hl/tools/gif2h5/Makefile.in | 1 - m4/aclocal_fc.m4 | 4 ++-- src/H5config.h.in | 2 +- src/Makefile.in | 1 - test/Makefile.in | 1 - testpar/Makefile.in | 1 - tools/Makefile.in | 1 - tools/h5copy/Makefile.in | 1 - tools/h5diff/Makefile.in | 1 - tools/h5dump/Makefile.in | 1 - tools/h5import/Makefile.in | 1 - tools/h5jam/Makefile.in | 1 - tools/h5ls/Makefile.in | 1 - tools/h5repack/Makefile.in | 1 - tools/h5stat/Makefile.in | 1 - tools/lib/Makefile.in | 1 - tools/misc/Makefile.in | 1 - tools/perform/Makefile.in | 1 - 47 files changed, 24 insertions(+), 66 deletions(-) diff --git a/Makefile.in b/Makefile.in index 65115ad..0e1d3e3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -305,7 +305,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/Makefile.in b/c++/Makefile.in index d4bc007..42b0f4d 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -465,7 +465,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index abbd25e..5568998 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -413,7 +413,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 94726b0..5cd59e6 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -476,7 +476,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 4e616cd..cf04ba0 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -467,7 +467,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/configure b/configure index 15a76dc..ebec6b5 100755 --- a/configure +++ b/configure @@ -771,7 +771,6 @@ enable_shared STATIC_SHARED THREADSAFE DIRECT_VFD -HAVE_FLOAT128 HAVE_DMALLOC CODESTACK INSTRUMENT @@ -3876,7 +3875,6 @@ $as_echo "done" >&6; } CODESTACK=no HAVE_DMALLOC=no - HAVE_FLOAT128=no DIRECT_VFD=no THREADSAFE=no @@ -7053,7 +7051,7 @@ else ENDIF IF (k .LE. 0) EXIT ENDDO - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " END @@ -7209,7 +7207,7 @@ else ENDIF IF (k .LE. 0) EXIT ENDDO - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " END @@ -24712,7 +24710,6 @@ fi rm -f confcache ## Check for the __FLOAT128 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5 $as_echo_n "checking for __float128... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.ac b/configure.ac index 9dde1f5..f5eff26 100644 --- a/configure.ac +++ b/configure.ac @@ -175,7 +175,6 @@ AC_SUBST([HDF5_HL]) HDF5_HL=yes AC_SUBST([INSTRUMENT]) AC_SUBST([CODESTACK]) CODESTACK=no AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no -AC_SUBST([HAVE_FLOAT128]) HAVE_FLOAT128=no AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no AC_SUBST([THREADSAFE]) THREADSAFE=no AC_SUBST([STATIC_SHARED]) @@ -1108,12 +1107,10 @@ AC_CHECK_SIZEOF([off64_t], [8]) AC_CACHE_SAVE ## Check for the __FLOAT128 - AC_MSG_CHECKING([for __float128]) AC_TRY_COMPILE([], [__float128 x;], - [AC_DEFINE([HAVE_FLOAT128], [1], - [__float128 is available]) + [AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]) ) diff --git a/examples/Makefile.in b/examples/Makefile.in index ac7f3e2..90fb879 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -413,7 +413,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 253302f..3cc4f13 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -469,7 +469,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index dc1de56..c9b7586 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -413,7 +413,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 35dbc19..2067f60 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -206,15 +206,19 @@ int main(void) /* (b) Define c_float_x */ + /* make sure we find long double first before checking for __float128 + * ideally we need to match precision instead of matching sizeof */ + + int found_longdb = 0; for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { -#ifdef HAVE_FLOAT128 -/* should fail */ - if(sizeof(__float128) == RealKinds_SizeOf[i]) { +#ifdef H5_HAVE_FLOAT128 + if(sizeof(__float128) == RealKinds_SizeOf[i] && found_longdb == 1) { writeTypedef("float", "__float128", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); } else #endif if(sizeof(long double) == RealKinds_SizeOf[i]) { + found_longdb = 1; writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } else if(sizeof(double) == RealKinds_SizeOf[i]) { diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 7c5a6d6..018e603 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -117,6 +117,8 @@ PROGRAM test_kind ENDIF ENDDO + GOTO 10 + ! Generate program information: WRITE(*,'(40(A,/))') & @@ -312,6 +314,7 @@ WRITE(*,'(40(A,/))') & WRITE(*,*) "END PROGRAM H5test_kind" +10 CONTINUE ! (c) Generate Fortran H5* interfaces having multiple KIND interfaces. ! diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 43a5f3f..d2e06f8 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -60,8 +60,7 @@ DISTCLEANFILES=h5fc # H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.F90 +MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -138,11 +137,11 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # files. #H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if -# intrinsic function SIZEOF is available. +# H5test_kind.F90 generates all the APIs that have a KIND type associated +# with them. H5_KINDff.F90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 + $(RUNSERIAL) ./H5test_kind$(EXEEXT) # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 1de8d8a..43cc686 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -514,7 +514,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -746,9 +745,7 @@ DISTCLEANFILES = h5fc # H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.F90 - +MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h @BUILD_PARALLEL_CONDITIONAL_FALSE@H5FC_NAME = h5fc # Custom rule for installing h5fc, since it will be named h5pfc if hdf5 @@ -1399,11 +1396,11 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # files. #H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if -# intrinsic function SIZEOF is available. +# H5test_kind.F90 generates all the APIs that have a KIND type associated +# with them. H5_KINDff.F90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 + $(RUNSERIAL) ./H5test_kind$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 866e28c..be0d503 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -525,7 +525,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 6b2269b..20eb895 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -465,7 +465,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 8e47cce..e3c6e4c 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -469,7 +469,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 5458d35..1149d55 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -465,7 +465,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 76570bc..f41c41d 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -412,7 +412,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 6440a63..83ea19c 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -468,7 +468,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 10ba6fb..4a7c181 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -465,7 +465,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index b9b7f68..eebefb1 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -412,7 +412,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 3380d01..b99b8fe 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -469,7 +469,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index feb1864..38b0581 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -412,7 +412,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index fb3e161..0fecd04 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,7 +489,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 2c75fa5..82e1f0d 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -477,7 +477,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 33d040f..7ca596a 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -467,7 +467,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 074ed79..776cc84 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -504,7 +504,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 42b09c6..e899e77 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -466,7 +466,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index b26df4b..fc4f5f0 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -480,7 +480,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index c8db176..d2eef67 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -321,8 +321,8 @@ AC_RUN_IFELSE([ ENDIF IF (k .LE. 0) EXIT ENDDO - dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " - IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + dnl IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " END ]) diff --git a/src/H5config.h.in b/src/H5config.h.in index a5083a8..61ca128 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -97,7 +97,7 @@ /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP -/* __float128 is available */ +/* Determine if __float128 is available */ #undef HAVE_FLOAT128 /* Define to 1 if you have the `fork' function. */ diff --git a/src/Makefile.in b/src/Makefile.in index 4559f12..aa42511 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -528,7 +528,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/test/Makefile.in b/test/Makefile.in index 9e0e615..2cd3f90 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -872,7 +872,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index d1329b9..91d1ec0 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -495,7 +495,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 7160874..2c355f0 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -466,7 +466,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 760cf07..ddb3e17 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -474,7 +474,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 2e0dd0c..8eb19cc 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -481,7 +481,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 0d6f10b..f615ca0 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -480,7 +480,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 8ce37dd..d93c9b6 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -474,7 +474,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 01b3784..06c0f16 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -486,7 +486,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 303065c..8735c09 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -466,7 +466,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 7c35da7..f1f1add 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -498,7 +498,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 524d8d7..7a0efb1 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -476,7 +476,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 6df09d7..1c23ced 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -463,7 +463,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index c5d1f37..ce2ce0c 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -501,7 +501,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 8fa1eda..40c9d63 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -505,7 +505,6 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -- cgit v0.12 From 2069dbf25e1d0c31e258a0568971fcc4fb1922b0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 1 Jun 2015 14:49:54 -0500 Subject: [svn-r27134] Switched to uses a verify for each kind for the tests. Testing quad precision. --- MANIFEST | 2 +- configure | 24 + configure.ac | 3 + fortran/src/H5_f.c | 50 +- fortran/src/H5_ff.F90 | 6 + fortran/src/H5config_f.inc.in | 3 + fortran/src/H5f90global.F90 | 7 +- fortran/src/H5test_kind.F90 | 177 ++- fortran/test/Makefile.am | 4 +- fortran/test/Makefile.in | 6 +- fortran/test/tH5A.f90 | 19 +- fortran/test/tH5A_1_8.f90 | 177 +-- fortran/test/tH5D.f90 | 1 + fortran/test/tH5E_F03.f90 | 19 +- fortran/test/tH5F_F03.f90 | 13 +- fortran/test/tH5G_1_8.f90 | 207 ++- fortran/test/tH5I.f90 | 10 +- fortran/test/tH5L_F03.f90 | 25 +- fortran/test/tH5MISC_1_8.f90 | 53 +- fortran/test/tH5O.f90 | 56 +- fortran/test/tH5P.f90 | 71 +- fortran/test/tH5P_F03.f90 | 65 +- fortran/test/tH5R.f90 | 35 +- fortran/test/tH5S.f90 | 6 +- fortran/test/tH5Sselect.f90 | 211 ++- fortran/test/tH5T.f90 | 59 +- fortran/test/tH5T_F03.F90 | 3419 ++++++++++++++++++++++++++++++++++++++++ fortran/test/tH5T_F03.f90 | 3453 ----------------------------------------- fortran/test/tH5VL.f90 | 30 +- fortran/test/tHDF5.f90 | 1 + fortran/test/tf.F90 | 108 -- m4/aclocal_fc.m4 | 14 + 32 files changed, 4164 insertions(+), 4170 deletions(-) create mode 100644 fortran/test/tH5T_F03.F90 delete mode 100644 fortran/test/tH5T_F03.f90 diff --git a/MANIFEST b/MANIFEST index f3e0236..edc88f7 100644 --- a/MANIFEST +++ b/MANIFEST @@ -344,7 +344,7 @@ ./fortran/test/tH5R.f90 ./fortran/test/tH5S.f90 ./fortran/test/tH5Sselect.f90 -./fortran/test/tH5T_F03.f90 +./fortran/test/tH5T_F03.F90 ./fortran/test/tH5T.f90 ./fortran/test/tH5VL.f90 ./fortran/test/tH5Z.f90 diff --git a/configure b/configure index ebec6b5..2ac5c25 100755 --- a/configure +++ b/configure @@ -7011,6 +7011,30 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + + HAVE_ISO_FORTRAN_ENV="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE, INTRINSIC :: ISO_FORTRAN_ENV + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_ISO_FORTRAN_ENV="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' diff --git a/configure.ac b/configure.ac index f5eff26..24ef3ac 100644 --- a/configure.ac +++ b/configure.ac @@ -432,6 +432,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE PAC_PROG_FC_HAVE_C_LONG_DOUBLE + ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + PAC_PROG_FC_ISO_FORTRAN_ENV + PAC_FC_NATIVE_INTEGER PAC_FC_AVAIL_KINDS diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 5eb6ef8..6a6be41 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -126,7 +126,11 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; } /*end if */ else if (sizeof(int_1_f) == sizeof(long long)) { - if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + } /*end if */ + else { + if ((types[6] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[6], 128) < 0) return ret_value; } /*end else */ /* * FIND H5T_NATIVE_INTEGER_2 @@ -143,6 +147,10 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_2_f) == sizeof(long long)) { if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[7] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[7], 128) < 0) return ret_value; + } /*end else */ /* * FIND H5T_NATIVE_INTEGER_4 */ @@ -158,6 +166,10 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_4_f) == sizeof(long long)) { if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[8] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[8], 128) < 0) return ret_value; + } /*end else */ /* * FIND H5T_NATIVE_INTEGER_8 */ @@ -173,6 +185,11 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_8_f) == sizeof(long long)) { if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[9] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[9], 128) < 0) return ret_value; + } /*end else */ + /* * FIND H5T_NATIVE_REAL_C_FLOAT */ @@ -221,7 +238,36 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0) return ret_value; if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0) return ret_value; if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value; - if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; + if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; + +/* #ifdef -MSB- */ + /* + * FIND H5T_NATIVE_INTEGER_16 + */ + if (sizeof(int_16_f) == sizeof(char)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(short)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(int)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(long long)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + } /*end else */ + else { + if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[17], 128) < 0) return ret_value; + } /*end else */ + + +/* #ifdef -MSB- */ + /* + * FIND H5T_NATIVE_FLOAT_128 + */ + if ((types[18] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[18], 128) < 0) return ret_value; if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value; if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index d7d9efe..25c7eab 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -377,6 +377,9 @@ CONTAINS h5_type = H5T_NATIVE_INTEGER_4 ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN h5_type = H5T_NATIVE_INTEGER_8 +! NEED ifdef -MSB- + ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN + h5_type = H5T_NATIVE_INTEGER_16 ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN @@ -385,6 +388,9 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_DOUBLE ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE +! NEED ifdef -MSB- + ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN + h5_type = H5T_NATIVE_FLOAT_128 ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 3786130..0203315 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -15,5 +15,8 @@ ! Define if the intrinsic function C_LONG_DOUBLE exists #undef FORTRAN_HAVE_C_LONG_DOUBLE +! Define if the intrinsic module ISO_FORTRAN_ENV exists +#undef HAVE_ISO_FORTRAN_ENV + ! Define the size of C's long double #define H5_SIZEOF_LONG_DOUBLE diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 5e67220..c88327c 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -66,7 +66,7 @@ MODULE H5GLOBAL INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref END TYPE hdset_reg_ref_t_f - INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this + INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 19 ! Do not forget to change this ! value when new predefined ! datatypes are added @@ -108,6 +108,9 @@ MODULE H5GLOBAL H5T_STD_U16BE, & H5T_STD_U16LE, & H5T_STD_U32BE + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_16 ! NEED IFDEF -MSB- + INTEGER(HID_T) :: H5T_NATIVE_FLOAT_128 ! NEED IFDEF -MSB- ! NOTE: Splitting the line since the Fortran 95 standard limits the number of ! continuation lines to 39; the F03/F08 standard limits the number @@ -151,6 +154,8 @@ MODULE H5GLOBAL EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) + EQUIVALENCE (predef_types(18), H5T_NATIVE_INTEGER_16) ! ADDED NEW TYPE -MSB- + EQUIVALENCE (predef_types(19), H5T_NATIVE_FLOAT_128) ! ADDED NEW TYPE -MSB- INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 index 018e603..e83139a 100644 --- a/fortran/src/H5test_kind.F90 +++ b/fortran/src/H5test_kind.F90 @@ -322,7 +322,7 @@ WRITE(*,'(40(A,/))') & ! ! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 ! standard extended the maximum rank to 15, it was decided that they should use the -! new APIs to handle this use case. Handling rank 7 and less is for backward compatibility +! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility ! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. OPEN(11,FILE='H5_KINDff.F90') @@ -770,6 +770,181 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') 'END MODULE H5_KIND' + CLOSE(11) + +! (b) Generate Fortran Check routines for the tests KIND interfaces. + OPEN(11,FILE='../test/tf_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/TH5_MISC_gen.F90',& +'!',& +'! NAME',& +'! TH5_MISC_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5test_kind.F90 to handle checking ',& +'! in the tests all the detected KINDs.',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE TH5_MISC_gen" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE H5GLOBAL' + +! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs + + WRITE(11,'(A)') ' INTERFACE verify' + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) + END DO + DO i = 1, ii + j = ikind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " MODULE PROCEDURE verify_character" + WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') ' INTERFACE check_real_eq' + DO i = 1, ir + j = rkind_numbers(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +! *************************** +! VALIDATE INTEGERS +! *************************** + DO i = 1, ii + k = ikind_numbers(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE REALS +! *************************** + DO i = 1, ir + k = rkind_numbers(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) + + +! *********************************** +! TEST IF TWO REAL NUMBERS ARE EQUAL +! *********************************** + + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' + WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' + WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE CHARACTER STRINGS +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER*(*) :: string' + WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_character' + +! *************************** +! VALIDATE LOGICAL +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' LOGICAL :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + + WRITE(11,'(A)') ' END SUBROUTINE verify_logical' + + + + WRITE(11,'(A)') "END MODULE TH5_MISC_gen" + + CLOSE(11) + END PROGRAM test_kind diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 728b4d7..9c5b4f0 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -41,7 +41,7 @@ TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F0 check_PROGRAMS=$(TEST_PROG) -libh5test_fortran_la_SOURCES = tf.F90 t.c +libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -55,7 +55,7 @@ fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 fortranlib_test_1_8.f90 fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES=fflush1.f90 diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index be0d503..037ec97 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -102,7 +102,7 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_fortran_la_LIBADD = -am_libh5test_fortran_la_OBJECTS = tf.lo t.lo +am_libh5test_fortran_la_OBJECTS = tf_gen.lo tf.lo t.lo libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -729,7 +729,7 @@ noinst_LTLIBRARIES = libh5test_fortran.la # Our main targets, the tests themselves TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 -libh5test_fortran_la_SOURCES = tf.F90 t.c +libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -742,7 +742,7 @@ fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 fortranlib_test_1_8.f90 fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90 index e3b3b2a..5b814fa 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.f90 @@ -29,6 +29,10 @@ !***** MODULE TH5A + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE attribute_test(cleanup, total_error) @@ -36,9 +40,6 @@ CONTAINS ! h5acreate_f, h5awrite_f, h5aclose_f,h5aread_f, h5aopen_name_f, ! h5aget_name_f,h5aget_space_f, h5aget_type_f, ! - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -309,7 +310,7 @@ CONTAINS ! CALL h5aget_storage_size_f(attr_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) -! CALL VERIFY("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) +! CALL verify("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) CALL h5aget_storage_size_f(attr2_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) ! CALL verify("h5aget_storage_size_f",attr_storage,1,total_error) @@ -517,21 +518,15 @@ CONTAINS data_dims(1) = 1 CALL h5aread_f(attr3_id, H5T_NATIVE_DOUBLE, aread_double_data, data_dims, error) CALL check("h5aread_f",error,total_error) + CALL VERIFY("Read back double attrbute is wrong", aread_double_data(1),3.459_Fortran_DOUBLE,total_error) - IF( .NOT.dreal_eq( REAL(aread_double_data(1),dp), 3.459_dp) )THEN - WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1) - total_error = total_error + 1 - ENDIF ! !read the real attribute data back to memory ! data_dims(1) = 1 CALL h5aread_f(attr4_id, H5T_NATIVE_REAL, aread_real_data, data_dims, error) CALL check("h5aread_f",error,total_error) - IF( .NOT.dreal_eq( REAL(aread_real_data(1),dp), 4.0_dp) )THEN - WRITE(*,*) "Read back real attrbute is wrong", aread_real_data(1) - total_error = total_error + 1 - ENDIF + CALL VERIFY("Read back real attrbute is wrong", aread_real_data(1),4.0,total_error) ! !read the Integer attribute data back to memory ! diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90 index 8e20100..c70e288 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.f90 @@ -32,6 +32,10 @@ !***** MODULE TH5A_1_8 + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE attribute_test_1_8(cleanup, total_error) @@ -41,8 +45,6 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) ! H5Pset_shared_mesg_index_f ! - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -199,8 +201,6 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Needed for get_info_by_name - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE @@ -350,7 +350,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) @@ -363,7 +363,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) END DO @@ -389,8 +389,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) !** Tests storing attribute with "null" dataspace !** !*************************************************************** - USE HDF5 - USE TH5_MISC + IMPLICIT NONE @@ -473,22 +472,22 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL H5Sextent_equal_f(attr_sid, null_sid, equal, error) CALL check("H5Sextent_equal_f",error,total_error) - CALL Verifylogical("H5Sextent_equal_f",equal,.TRUE.,total_error) + CALL verify("H5Sextent_equal_f",equal,.TRUE.,total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_storage_size_f",INT(storage_size),0,total_error) + CALL verify("h5aget_storage_size_f",INT(storage_size),0,total_error) CALL h5aget_info_f(attr, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f", error, total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f.corder",corder,0,total_error) + CALL verify("h5aget_info_f.corder",corder,0,total_error) - CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) CALL h5aclose_f(attr,error) CALL check("h5aclose_f",error,total_error) @@ -520,9 +519,6 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(SIZE_T), PARAMETER :: NAME_BUF_SIZE = 7 @@ -735,9 +731,6 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL :: new_format @@ -859,24 +852,24 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, 0_hsize_t, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,hsize_t), & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) CALL h5aget_name_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & hzero, tmpname, error, size, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_name_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_name_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form @@ -941,9 +934,6 @@ END SUBROUTINE test_attr_info_by_idx SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER :: error, total_error @@ -974,7 +964,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing creation order @@ -983,12 +973,12 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & n, tmpname, error, NAME_BUF_SIZE) CALL check("h5aget_name_by_idx_f",error,total_error) - CALL VERIFY("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) + CALL verify("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) IF(attrname.NE.tmpname)THEN error = -1 ENDIF - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ! Don't test "native" order if there is no creation order index, since ! * there's not a good way to easily predict the attribute's order in the name @@ -999,13 +989,13 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) ! Verify the information for new attribute, in native creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing native order CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, & @@ -1015,14 +1005,14 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) WRITE(*,*) "ERROR: attribute name size wrong!" error = -1 ENDIF - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) END IF CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & @@ -1033,41 +1023,41 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) END SUBROUTINE attr_info_by_idx_check @@ -1082,9 +1072,6 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -1371,7 +1358,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! Check size of file !filesize = h5_get_file_size(FILENAME); - !VERIFY(filesize, empty_filesize, "h5_get_file_size"); + !verify(filesize, empty_filesize, "h5_get_file_size"); ENDDO ! Close dataspaces @@ -1392,9 +1379,6 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -1518,7 +1502,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deleting non-existant attribute !EP CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, 0_HSIZE_T,error, lapl_id=H5P_DEFAULT_F) CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, hzero,error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form DO u = 0, max_compact - 1 @@ -1546,7 +1530,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for out of bound deletions CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO @@ -1584,10 +1568,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL VERIFY("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) + CALL verify("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1604,7 +1588,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ENDDO ! Delete last attribute @@ -1655,7 +1639,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDDO ! Check for out of bound deletion CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Work on all the datasets @@ -1684,10 +1668,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) f_corder_valid, corder, cset, data_size, error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL VERIFY("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) + CALL verify("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1705,7 +1689,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ENDDO @@ -1716,7 +1700,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deletion on empty attribute storage again CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Close Datasets @@ -1753,9 +1737,6 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2030,9 +2011,6 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2169,7 +2147,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) ! Check size of file ! filesize = h5_get_file_size(FILENAME); - ! VERIFY(filesize, empty_filesize, "h5_get_file_size") + ! verify(filesize, empty_filesize, "h5_get_file_size") END SUBROUTINE test_attr_dense_open @@ -2182,9 +2160,6 @@ END SUBROUTINE test_attr_dense_open SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -2227,7 +2202,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_F", error, total_error) - CALL VERIFY("H5Aread_F", value, u, total_error) + CALL verify("H5Aread_F", value, u, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2259,7 +2234,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) data_dims(1) = 1 CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_f", error, total_error) - CALL VERIFY("H5Aread_f", value, u, total_error) + CALL verify("H5Aread_f", value, u, total_error) ! Close attribute @@ -2278,9 +2253,6 @@ END SUBROUTINE test_attr_dense_verify SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2314,14 +2286,14 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Get creation order indexing on object CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Setting invalid combination of a attribute order creation order indexing on should fail CALL H5Pset_attr_creation_order_f(dcpl, H5P_CRT_ORDER_INDEXED_F, error) - CALL VERIFY("H5Pset_attr_creation_order_f",error , minusone, total_error) + CALL verify("H5Pset_attr_creation_order_f",error , minusone, total_error) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Set attribute creation order tracking & indexing for object CALL h5pset_attr_creation_order_f(dcpl, IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), error) @@ -2329,7 +2301,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error) ! Create dataspace for dataset @@ -2374,7 +2346,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Query the attribute creation properties CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error ) ! Close property list @@ -2401,9 +2373,6 @@ END SUBROUTINE test_attr_corder_create_basic SUBROUTINE test_attr_basic_write(fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl @@ -2512,7 +2481,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL h5aget_storage_size_f(attr, attr_size, error) CALL check("h5aget_storage_size_f",error,total_error) -!EP CALL VERIFY("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) +!EP CALL verify("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) ! Read attribute information immediately, without closing attribute @@ -2521,7 +2490,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) ! Verify values read in DO i = 1, ATTR1_DIM1 - CALL VERIFY('h5aread_f',attr_data1(i),read_data1(i), total_error) + CALL verify('h5aread_f',attr_data1(i),read_data1(i), total_error) ENDDO ! CLOSE attribute @@ -2570,7 +2539,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) size = 18 CALL H5Aget_name_f(attr, size, chr_exact_size, error) CALL check('H5Aget_name_f',error,total_error) - CALL VerifyString('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) + CALL verify('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2599,9 +2568,6 @@ END SUBROUTINE test_attr_basic_write SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -2656,19 +2622,19 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) WRITE(chr5,'(I5.5)') u attrname = 'attr '//chr5 CALL H5Aexists_f( gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.FALSE.,total_error ) + CALL verify("H5Aexists",exists,.FALSE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error, lapl_id = H5P_DEFAULT_F) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.FALSE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.FALSE.,total_error ) CALL h5acreate_f(gid, attrname, H5T_NATIVE_INTEGER, sid, aid, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) + CALL verify("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) attr_data1(1) = u data_dims(1) = 1 @@ -2680,10 +2646,10 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) CALL check("h5aclose_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) + CALL verify("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) ENDDO @@ -2717,9 +2683,6 @@ END SUBROUTINE test_attr_many SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fid CHARACTER(LEN=*), INTENT(IN) :: dsetname @@ -2757,13 +2720,13 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check that the object's attributes are correct - CALL VERIFY("h5aget_info_f.corder",corder,u,total_error) - CALL Verifylogical("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f.corder",corder,u,total_error) + CALL verify("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) ! Close attribute @@ -2778,12 +2741,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f",corder,u,total_error) - CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f",corder,u,total_error) + CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) @@ -2800,12 +2763,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f",corder,u,total_error) - CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f",corder,u,total_error) + CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90 index c0eb8f9..6d136b5 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.f90 @@ -40,6 +40,7 @@ CONTAINS SUBROUTINE datasettest(cleanup, total_error) USE HDF5 ! This module contains all necessary modules USE TH5_MISC + USE TH5_MISC_GEN IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.f90 index a7d45f2..63e70a3 100644 --- a/fortran/test/tH5E_F03.f90 +++ b/fortran/test/tH5E_F03.f90 @@ -36,6 +36,9 @@ ! ***************************************** MODULE test_my_hdf5_error_handler + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -49,8 +52,6 @@ CONTAINS ! This error function handle works with only version 2 error stack - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -74,8 +75,6 @@ CONTAINS ! This error function handle works with only version 2 error stack - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -102,8 +101,6 @@ CONTAINS SUBROUTINE test_error(total_error) - USE HDF5 - USE TH5_MISC USE ISO_C_BINDING USE test_my_hdf5_error_handler @@ -147,15 +144,15 @@ SUBROUTINE test_error(total_error) ! Create the erring dataset CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL VERIFY("h5dcreate_f", error, -1, total_error) + CALL verify("h5dcreate_f", error, -1, total_error) -!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) -!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) +!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) +!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) !!$ ! Test enabling and disabling default printing !!$ !!$ CALL H5Eget_auto_f(H5E_DEFAULT_F, func1, f_ptr1, error) -!!$ CALL VERIFY("H5Eget_auto_f", error, 0, total_error) +!!$ CALL verify("H5Eget_auto_f", error, 0, total_error) ! PRINT*,c_associated(f_ptr1) @@ -187,7 +184,7 @@ SUBROUTINE test_error(total_error) CALL H5Eset_auto_f(1, error, H5E_DEFAULT_F, func, f_ptr) CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL VERIFY("h5dcreate_f", error, -1, total_error) + CALL verify("h5dcreate_f", error, -1, total_error) ! turn on automatic printing with h5eprint_f which prints an error stack in the default manner. diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90 index c878a59..9e23d19 100644 --- a/fortran/test/tH5F_F03.f90 +++ b/fortran/test/tH5F_F03.f90 @@ -38,16 +38,17 @@ MODULE TH5F_F03 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + CONTAINS SUBROUTINE test_get_file_image(total_error) ! ! Tests the wrapper for h5fget_file_image ! - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error ! returns error @@ -128,8 +129,8 @@ SUBROUTINE test_get_file_image(total_error) 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) + 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)) diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90 index ab75163..ddc3736 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.f90 @@ -31,11 +31,13 @@ MODULE TH5G_1_8 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE group_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -139,9 +141,6 @@ END SUBROUTINE group_test SUBROUTINE group_info(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -269,7 +268,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Check for out of bound query by index on empty group, should fail CALL H5Gget_info_by_idx_f(group_id, ".", H5_INDEX_NAME_F, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error) - CALL VERIFY("H5Gget_info_by_idx_f", error, -1, total_error) + CALL verify("H5Gget_info_by_idx_f", error, -1, total_error) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 @@ -287,29 +286,29 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, 0, total_error) - CALL verifyLogical("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error, mounted=mounted) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) - CALL verifyLogical("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) ! Create objects in new group created DO v = 0, u @@ -331,27 +330,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f",max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f",max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information IF(order.NE.H5_ITER_NATIVE_F)THEN @@ -359,17 +358,17 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(u,HSIZE_T), & storage_type, nlinks, max_corder, error,lapl_id=H5P_DEFAULT_F, mounted=mounted) CALL check("H5Gget_info_by_idx_f", error, total_error) - CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) ELSE CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error, mounted=mounted) - CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) CALL check("H5Gget_info_by_idx_f", error, total_error) ENDIF ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_idx_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_idx_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_idx_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_idx_f", nlinks, u+1, total_error) ENDIF ! Close group created CALL H5Gclose_f(group_id2, error) @@ -380,27 +379,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(group_id, ".", storage_type, nlinks, max_corder, error, H5P_DEFAULT_F) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Create soft link in another group, to objects in main group valname = CORDER_GROUP_NAME//objname @@ -412,9 +411,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check soft link group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ENDDO ! Close the groups @@ -456,9 +455,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE timestamps(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -491,7 +487,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL VerifyLogical("H5Pget_obj_track_times",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times",track_times,.TRUE.,total_error) ! Set a non-default object timestamp setting CALL H5Pset_obj_track_times_f(gcpl_id, .FALSE., error) @@ -502,7 +498,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL VerifyLogical("H5Pget_obj_track_times",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times",track_times,.FALSE.,total_error) ! Create file !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -533,10 +529,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) ! Query the object information for each group ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -593,10 +589,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) !!$ !!$ Query the object information for each group !!$ if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -653,9 +649,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE mklinks(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -711,12 +704,12 @@ SUBROUTINE group_info(cleanup, fapl, total_error) error, H5P_DEFAULT_F) CALL check("H5Lget_info_f",error,total_error) -! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) +! CALL verify("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) - CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) + CALL verify("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) ! should be '/d1' + NULL character = 4 - CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) + CALL verify("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) ! Create a symbolic link to something that doesn't exist @@ -749,9 +742,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE test_move_preserves(fapl_id, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl_id @@ -798,14 +788,14 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) + CALL verify("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) CALL H5Pset_link_creation_order_f(fcpl_id, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_link_creation_order_f", error, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) + CALL verify("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) ! Create file ! (with creation order tracking for the root group) @@ -835,10 +825,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR old_cset = cset - CALL VERIFY("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) - CALL VerifyLogical("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) + CALL verify("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) old_corder = corder; - CALL VERIFY("H5Lget_info_f",old_corder,0,total_error) + CALL verify("H5Lget_info_f",old_corder,0,total_error) ! old_modification_time = oinfo.mtime; @@ -956,10 +946,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! SUBROUTINE lifecycle(cleanup, fapl2, total_error) - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl2 @@ -1105,10 +1091,6 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) SUBROUTINE cklinks(fapl, total_error) -! USE ISO_C_BINDING - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1146,10 +1128,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Lexists_f(file,"d1",Lexists, error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) CALL H5Lexists_f(file,"grp1/hard",Lexists, error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) ! Cleanup CALL H5Fclose_f(file,error) @@ -1176,9 +1158,6 @@ END SUBROUTINE cklinks ! SUBROUTINE delete_by_idx(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1294,7 +1273,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! Check for deletion on empty group CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) - CALL VERIFY("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL verify("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 ! Make name for link @@ -1319,7 +1298,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) - CALL VERIFY("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL verify("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Delete links from compact group @@ -1340,21 +1319,21 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Iget_type_f(grp, id_type, error) CALL check("H5Iget_type_f", error, total_error) - CALL VERIFY("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) + CALL verify("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) CALL H5Gclose_f(grp, error) CALL check("H5Gclose_f", error, total_error) - CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) - CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) + CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) IF(iorder.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, u+1, total_error) ELSE - CALL VERIFY("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) + CALL verify("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) ENDIF - CALL VERIFY("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) + CALL verify("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) @@ -1371,7 +1350,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ ENDIF !!$ objname = 'fill '//chr2 !!$ PRINT*,objname, tmpname -!!$ CALL verifyString("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) +!!$ CALL verify("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) ENDDO ! Close the group @@ -1418,9 +1397,6 @@ END SUBROUTINE delete_by_idx SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: group_id @@ -1455,14 +1431,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", corder, 0, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) ! Verify the link information for new link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", corder, n, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, n, total_error) ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN @@ -1481,21 +1457,21 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_small, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname_small)), tmpname_small(1:LEN(tmpname_small)), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! try it with the correct size CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname, error, size=size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname)), tmpname(1:LEN(tmpname)), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_big, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:7), tmpname_big(1:7), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! Try with a buffer set to small @@ -1522,9 +1498,6 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & SUBROUTINE test_lcpl(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1591,7 +1564,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- - CALL VERIFY("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) + CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) ! Create and commit a datatype with the default LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) @@ -1652,10 +1625,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & DO i = 1, 2 tmp1 = INT(dimsout(i)) tmp2 = INT(extend_dim(i)) - CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) tmp1 = INT(maxdimsout(i)) tmp2 = INT(dims(i)) - CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) ENDDO ! close data set @@ -1722,7 +1695,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Pget_char_encoding_f(lcpl_id, encoding, error) CALL check("H5Pget_char_encoding_f", error, total_error) - CALL VERIFY("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) + CALL verify("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "dataset2", & @@ -1744,7 +1717,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lexists_f(file_id,"/dataset2_link",Lexists, error) CALL check("H5Lexists",error, total_error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) ! Check that its character encoding is ASCII CALL H5Lget_info_f(file_id, "/dataset2_link", & @@ -1834,9 +1807,6 @@ END SUBROUTINE test_lcpl SUBROUTINE objcopy(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1867,7 +1837,7 @@ SUBROUTINE objcopy(fapl, total_error) ! Verify object copy flags CALL H5Pget_copy_object_f(pid, cpy_flags, error) CALL check("H5Pget_copy_object_f",error, total_error) - CALL VERIFY("H5Pget_copy_object_f", cpy_flags, flag, total_error) + CALL verify("H5Pget_copy_object_f", cpy_flags, flag, total_error) !!$ !!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, @@ -1898,9 +1868,6 @@ END SUBROUTINE objcopy SUBROUTINE lapl_nlinks( fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -1972,7 +1939,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) - CALL VERIFY("H5Pset_nlinks_f",INT(nlinks), 20, total_error) + CALL verify("H5Pset_nlinks_f",INT(nlinks), 20, total_error) ! Open object through what is normally too many soft links using @@ -1984,7 +1951,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft17", total_error) + CALL verify("h5iget_name_f", TRIM(objname),"/soft17", total_error) ! Create group using soft link CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) @@ -2006,12 +1973,12 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pget_nlinks_f",error,total_error) - CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 4, total_error) + CALL verify("H5Pget_nlinks_f", INT(nlinks), 4, total_error) ! Try opening through what is now too many soft links CALL H5Oopen_f(fid,"soft5",gid,error,plist) - CALL VERIFY("H5Oopen_f", error, -1, total_error) ! should fail + CALL verify("H5Oopen_f", error, -1, total_error) ! should fail ! Open object through lesser soft link CALL H5Oopen_f(fid,"soft4",gid,error,plist) @@ -2020,7 +1987,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft4", total_error) + CALL verify("h5iget_name_f", TRIM(objname),"/soft4", total_error) ! Test other functions that should use a LAPL nlinks = 20 diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90 index 088b4eb..97c48c6 100644 --- a/fortran/test/tH5I.f90 +++ b/fortran/test/tH5I.f90 @@ -27,6 +27,10 @@ ! !***** MODULE TH5I + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -34,8 +38,6 @@ CONTAINS ! This subroutine tests following functionalities: h5iget_type_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -88,7 +90,7 @@ CONTAINS dtype = -1 CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL VerifyLogical("H5Iis_valid_f", tri_ret, .FALSE., total_error) + CALL verify("H5Iis_valid_f", tri_ret, .FALSE., total_error) ! Create a datatype id CALL H5Tcopy_f(H5T_NATIVE_INTEGER,dtype,error) @@ -97,7 +99,7 @@ CONTAINS ! Check that the ID is valid CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", tri_ret, .TRUE., total_error) + CALL verify("H5Tequal_f", tri_ret, .TRUE., total_error) CALL H5Tclose_f(dtype, error) CALL check("H5Tclose_f", error, total_error) diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90 index 0d3b6b4..40afdbc 100644 --- a/fortran/test/tH5L_F03.f90 +++ b/fortran/test/tH5L_F03.f90 @@ -32,8 +32,10 @@ !***** MODULE liter_cb_mod - USE HDF5 - USE ISO_C_BINDING + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE TYPE iter_enum @@ -60,8 +62,6 @@ CONTAINS INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C) - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), VALUE :: group @@ -123,9 +123,6 @@ CONTAINS !*************************************************************** SUBROUTINE test_iter_group(total_error) - USE HDF5 - USE TH5_MISC - USE, INTRINSIC :: ISO_C_BINDING USE liter_cb_mod IMPLICIT NONE @@ -251,11 +248,11 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT ! Verify return value from iterator gets propagated correctly - CALL VERIFY("H5Literate", ret_value, 2, total_error) + CALL verify("H5Literate", ret_value, 2, total_error) ! Increment the number of times "2" is returned i = i + 1 ! Verify that the index is the correct value - CALL VERIFY("H5Literate", INT(idx), INT(i), total_error) + CALL verify("H5Literate", INT(idx), INT(i), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"ERROR: Group iteration function walked too far!" ENDIF @@ -264,14 +261,14 @@ SUBROUTINE test_iter_group(total_error) DO j = 1, 10 ichr10(j:j) = info%name(j)(1:1) ENDDO - CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.52)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIXME- scot END DO ! put check if did not walk far enough -scot FIXME IF(i .NE. (NDATASETS + 2)) THEN - CALL VERIFY("H5Literate_f", i, INT(NDATASETS + 2), total_error) + CALL verify("H5Literate_f", i, INT(NDATASETS + 2), total_error) PRINT*,"ERROR: Group iteration function didn't perform multiple iterations correctly" ENDIF @@ -288,13 +285,13 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT - CALL VERIFY("H5Literate_f", ret_value, 1, total_error) + CALL verify("H5Literate_f", ret_value, 1, total_error) ! Increment the number of times "1" is returned i = i + 1 ! Verify that the index is the correct value - CALL VERIFY("H5Literate_f", INT(idx), INT(i+10), total_error) + CALL verify("H5Literate_f", INT(idx), INT(i+10), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"Group iteration function walked too far!" @@ -304,7 +301,7 @@ SUBROUTINE test_iter_group(total_error) ichr10(j:j) = info%name(j)(1:1) ENDDO ! Verify that the correct name is retrieved - CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.42)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIX- scot ENDDO diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90 index efaf594..ba3f095 100644 --- a/fortran/test/tH5MISC_1_8.f90 +++ b/fortran/test/tH5MISC_1_8.f90 @@ -25,11 +25,13 @@ !***** MODULE TH5MISC_1_8 + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE dtransform(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -57,22 +59,22 @@ SUBROUTINE dtransform(cleanup, total_error) CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to small CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_small, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to big CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_big, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) @@ -92,9 +94,6 @@ END SUBROUTINE dtransform SUBROUTINE test_genprop_basic_class(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -117,7 +116,7 @@ SUBROUTINE test_genprop_basic_class(total_error) cid1 = 456 CALL H5Pget_class_name_f(cid1, name, size, error) - CALL VERIFY("H5Pget_class_name", error, -1, error) + CALL verify("H5Pget_class_name", error, -1, error) ! Create a new generic class, derived from the root of the class hierarchy CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error) @@ -126,8 +125,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name CALL H5Pget_class_name_f(cid1, name, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", name, CLASS1_NAME, error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", name, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -136,8 +135,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name smaller buffer CALL H5Pget_class_name_f(cid1, name_small, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name_small(1:4), 'CLASS1_NAME=',CLASS1_NAME(1:4) total_error = total_error + 1 @@ -146,8 +145,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name bigger buffer CALL H5Pget_class_name_f(cid1, name_big, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',TRIM(name_small), 'CLASS1_NAME=',TRIM(CLASS1_NAME) total_error = total_error + 1 @@ -160,13 +159,13 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Verify class parent correct CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) + CALL verify("H5Pequal_f", flag, .TRUE., total_error) ! Make certain false postives aren't being returned CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .FALSE., total_error) + CALL verify("H5Pequal_f", flag, .FALSE., total_error) ! Close parent class CALL H5Pclose_class_f(cid2, error) @@ -187,8 +186,6 @@ SUBROUTINE test_h5s_encode(total_error) !** !*************************************************************** - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -241,7 +238,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Try decoding bogus buffer CALL H5Sdecode_f(sbuf, decoded_sid1, error) - CALL VERIFY("H5Sdecode", error, -1, total_error) + CALL verify("H5Sdecode", error, -1, total_error) CALL H5Sencode_f(sid1, sbuf, sbuf_size, error) CALL check("H5Sencode", error, total_error) @@ -254,7 +251,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Verify the decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & + CALL verify("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & total_error) ! @@ -297,16 +294,16 @@ SUBROUTINE test_h5s_encode(total_error) CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error) CALL check("H5Sget_simple_extent_type_f", error, total_error) - CALL VERIFY("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) + CALL verify("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) ! Verify decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) + CALL verify("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) CALL H5Sget_simple_extent_ndims_f(decoded_sid3, rank, error) CALL CHECK("H5Sget_simple_extent_ndims_f", error, total_error) - CALL VERIFY("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) + CALL verify("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) CALL h5sclose_f(sid3, error) CALL check("h5sclose_f", error, total_error) @@ -335,8 +332,6 @@ END SUBROUTINE test_h5s_encode SUBROUTINE test_scaleoffset(cleanup, total_error ) - USE HDF5 - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90 index 99d4c22..51e1d64 100644 --- a/fortran/test/tH5O.f90 +++ b/fortran/test/tH5O.f90 @@ -28,11 +28,13 @@ !***** MODULE TH5O + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE test_h5o(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -57,9 +59,6 @@ END SUBROUTINE test_h5o SUBROUTINE test_h5o_link(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -157,7 +156,7 @@ SUBROUTINE test_h5o_link(total_error) CALL H5Tcommitted_f(type_id, committed, error) CALL check("H5Tcommitted_f",error,total_error) - CALL verifyLogical("H5Tcommitted_f", committed, .TRUE., total_error) + CALL verify("H5Tcommitted_f", committed, .TRUE., total_error) ! Create a dataset with no name using the committed datatype CALL H5Dcreate_anon_f(file_id, type_id, space_id, dset_id, error ) ! using no optional parameters @@ -181,7 +180,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL VERIFY("H5Dread_f",wdata(i,j),rdata(i,j),total_error) + CALL verify("H5Dread_f",wdata(i,j),rdata(i,j),total_error) wdata(i,j) = i*j ENDDO ENDDO @@ -229,7 +228,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL VERIFY("H5Dread",wdata(i,j),rdata(i,j),total_error) + CALL verify("H5Dread",wdata(i,j),rdata(i,j),total_error) ENDDO ENDDO ! Close open IDs @@ -464,7 +463,7 @@ SUBROUTINE test_h5o_link(total_error) nlinks = 0 CALL h5pget_nlinks_f(plist, nlinks, error) CALL check("h5pget_nlinks_f",error,total_error) - CALL VERIFY("h5pget_nlinks_f", INT(nlinks), 2, total_error) + CALL verify("h5pget_nlinks_f", INT(nlinks), 2, total_error) ! See if the link exists CALL h5oexists_by_name_f(file_id,"/G1_LINK", link_exists, error, plist) @@ -578,9 +577,6 @@ END SUBROUTINE test_h5o_link SUBROUTINE test_h5o_plist(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -631,18 +627,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Create a group, dataset, and committed datatype within the file, ! using the respective type of creation property lists. @@ -700,18 +696,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) @@ -757,18 +753,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index 7dcc580..39d8c1e 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -27,6 +27,9 @@ ! !***** MODULE TH5P + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -36,8 +39,6 @@ SUBROUTINE external_test(cleanup, total_error) ! h5pset_external_f, h5pget_external_count_f, ! h5pget_external_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -153,8 +154,6 @@ SUBROUTINE external_test(cleanup, total_error) END SUBROUTINE external_test SUBROUTINE multi_file_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -421,10 +420,7 @@ END SUBROUTINE multi_file_test ! April 16, 2009 !------------------------------------------------------------------------- ! -SUBROUTINE test_chunk_cache(cleanup, total_error) - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC +SUBROUTINE test_chunk_cache(cleanup, total_error) IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -470,19 +466,16 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Pget_cache_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl1, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_1), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_1), INT(nbytes_4), total_error) - - IF( .NOT.dreal_eq( REAL(w0_1,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", nslots_1, nslots_4, total_error) + CALL verify("H5Pget_chunk_cache_f", nbytes_1, nbytes_4, total_error) + CALL verify("H5Pget_chunk_cache_f", w0_1, w0_4, total_error) ! 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) CALL check("H5Pget_nlinks_f", error, total_error) - CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 134, total_error) + CALL verify("H5Pget_nlinks_f", INT(nlinks), 134, total_error) CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl_local, error) @@ -529,11 +522,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -561,11 +552,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -581,11 +570,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -601,11 +588,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) ! Don't close dapl2, we will use it in the next section ! Modify cache values on fapl_local @@ -638,11 +623,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) ! Test H5D_CHUNK_CACHE_NSLOTS_DEFAULT and H5D_CHUNK_CACHE_W0_DEFAULT nslots_2 = H5D_CHUNK_CACHE_NSLOTS_DFLT_F @@ -663,11 +646,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) ! Close diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90 index 56f9679..ec9fef2 100644 --- a/fortran/test/tH5P_F03.f90 +++ b/fortran/test/tH5P_F03.f90 @@ -52,8 +52,6 @@ CONTAINS INTEGER FUNCTION test_genprop_cls_cb1_f(list_id, create_data ) bind(C) - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: list_id @@ -71,6 +69,11 @@ END MODULE test_genprop_cls_cb1_mod MODULE TH5P_F03 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + CONTAINS !------------------------------------------------------------------------- @@ -92,9 +95,6 @@ CONTAINS SUBROUTINE test_create(total_error) - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -187,18 +187,12 @@ SUBROUTINE test_create(total_error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_DOUBLE, dpfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - IF(.NOT.dreal_eq( REAL(dpfill,dp), 1.0_dp))THEN - PRINT*,"***ERROR: Returned wrong fill value (double)" - total_error = total_error + 1 - ENDIF + CALL VERIFY("***ERROR: Returned wrong fill value (double)", dpfill, 1.0_dp, total_error) CALL H5Pset_fill_value_f(dcpl, H5T_NATIVE_REAL, 2.0, error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_REAL, rfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - IF(.NOT.dreal_eq( REAL(rfill,dp), REAL(2.0,dp)))THEN - PRINT*,"***ERROR: Returned wrong fill value (real)" - total_error = total_error + 1 - ENDIF + CALL VERIFY("***ERROR: Returned wrong fill value (real)", rfill, 2.0, total_error) ! For the actual compound type CALL H5Pset_fill_value_f(dcpl, comp_type_id, f_ptr, error) @@ -234,10 +228,10 @@ SUBROUTINE test_create(total_error) CALL H5Pget_fill_value_f(dcpl, comp_type_id, f_ptr, error) CALL check("H5Pget_fill_value_f", error, total_error) + CALL verify("***ERROR: Returned wrong fill value", rd_c%a, fill_ctype%a, total_error) + CALL verify("***ERROR: Returned wrong fill value", rd_c%y, fill_ctype%y, total_error) - IF( .NOT.dreal_eq( REAL(rd_c%a,dp), REAL(fill_ctype%a, dp)) .OR. & - .NOT.dreal_eq( REAL(rd_c%y,dp), REAL(fill_ctype%y, dp)) .OR. & - rd_c%x .NE. fill_ctype%x .OR. & + IF( rd_c%x .NE. fill_ctype%x .OR. & rd_c%z .NE. fill_ctype%z )THEN PRINT*,"***ERROR: Returned wrong fill value" @@ -269,9 +263,6 @@ SUBROUTINE test_genprop_class_callback(total_error) ! ! - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING USE test_genprop_cls_cb1_mod IMPLICIT NONE @@ -330,7 +321,7 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check the number of properties in class CALL h5pget_nprops_f(cid1, nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Initialize class callback structs @@ -350,12 +341,12 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check that the list's class is correct CALL H5Pequal_f(cid2, cid1, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) + CALL verify("H5Pequal_f", flag, .TRUE., total_error) ! Check the class name CALL H5Pget_class_name_f(cid2, CLASS1_NAME_BUF, CLASS1_NAME_SIZE, error) CALL check("H5Pget_class_name_f", error, total_error) - CALL verifystring("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) + CALL verify("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',CLASS1_NAME_BUF, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -365,42 +356,42 @@ SUBROUTINE test_genprop_class_callback(total_error) CALL check("h5pclose_class_f", error, total_error) ! Verify that the creation callback occurred - CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 1, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid1, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%count, 1, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%id, lid1, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid1,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Create another property list from the class CALL h5pcreate_f(cid1, lid2, error) CALL check("h5pcreate_f", error, total_error) ! Verify that the creation callback occurred - CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 2, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid2, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%count, 2, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%id, lid2, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid2,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Close first list CALL h5pclose_f(lid1, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 1, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid1, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%count, 1, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%id, lid1, total_error) ! Close second list CALL h5pclose_f(lid2, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 2, total_error) - CALL verify_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid2, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%count, 2, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%id, lid2, total_error) ! Close class CALL h5pclose_class_f(cid1, error) @@ -423,8 +414,6 @@ END SUBROUTINE test_genprop_class_callback SUBROUTINE test_h5p_file_image(total_error) - USE HDF5 - USE TH5_MISC USE, INTRINSIC :: iso_c_binding IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -475,11 +464,11 @@ SUBROUTINE test_h5p_file_image(total_error) CALL check("h5pget_file_image_f", error, total_error) ! Check that sizes are the same, and that the buffers are identical but separate - CALL VERIFY("h5pget_file_image_f", INT(temp_size), INT(size), total_error) + CALL verify("h5pget_file_image_f", INT(temp_size), INT(size), total_error) ! Verify the image data is correct DO i = 1, count - CALL VERIFY("h5pget_file_image_f", temp(i), buffer(i), total_error) + CALL verify("h5pget_file_image_f", temp(i), buffer(i), total_error) ENDDO END SUBROUTINE test_h5p_file_image @@ -499,10 +488,6 @@ END SUBROUTINE test_h5p_file_image ! SUBROUTINE external_test_offset(cleanup,total_error) - USE ISO_C_BINDING - USE TH5_MISC - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index fba9e25..ef392b4 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -33,11 +33,13 @@ ! MODULE TH5R + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE refobjtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -163,22 +165,22 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7, total_error) - CALL VerifyString("H5Rget_name_f", buf, "/GROUP1", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7, total_error) + CALL verify("H5Rget_name_f", buf, "/GROUP1", total_error) ! with buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) ! getting path to dataset in /Group1 CALL H5Rget_name_f(dsetr_id, ref(2), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),14,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),14,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) ! !Close the dataset @@ -242,9 +244,6 @@ END SUBROUTINE refobjtest ! and h5rdereference_f functionalities ! SUBROUTINE refregtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC -! use iso_c_binding ! NOTE: if this is uncommented, then need to move subroutine into another file. IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -406,23 +405,23 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(1), buf, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", buf, "/MATRIX", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", buf, "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer smaller then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_small, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) ! ! Dereference the first reference. ! @@ -434,7 +433,7 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the second region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(2), buf, error) ! no optional size CALL check("H5Rget_name_f", error, total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) + CALL verify("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) ! ! Read selected data from the dataset. ! diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90 index eaaf29a..7223772 100644 --- a/fortran/test/tH5S.f90 +++ b/fortran/test/tH5S.f90 @@ -35,12 +35,14 @@ !***** MODULE TH5S + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE dataspace_basic_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90 index 7d07308..10139ea 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.f90 @@ -38,13 +38,14 @@ !***** MODULE TH5SSELECT + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE test_select_hyperslab(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -699,8 +700,6 @@ CONTAINS SUBROUTINE test_basic_select(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1036,8 +1035,6 @@ CONTAINS !*************************************************************** SUBROUTINE test_select_point(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1140,9 +1137,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1171,9 +1168,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1202,8 +1199,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO !!$ @@ -1238,8 +1235,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1284,8 +1281,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(0,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1311,8 +1308,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(POINT1_NPOINTS,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1363,8 +1360,6 @@ END SUBROUTINE test_select_point !*************************************************************** SUBROUTINE test_select_combine(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1400,7 +1395,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(all_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Copy base dataspace and set selection to "none" CALL h5scopy_f(base_id, none_id, error) @@ -1411,7 +1406,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(none_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) ! Copy "all" selection & space CALL H5Scopy_f(all_id, space1, error) @@ -1429,7 +1424,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that it's still "all" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1451,12 +1446,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same at the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) @@ -1464,10 +1459,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1490,12 +1485,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined @@ -1507,19 +1502,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1542,12 +1537,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1559,19 +1554,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace @@ -1594,7 +1589,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1617,13 +1612,13 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1631,10 +1626,10 @@ SUBROUTINE test_select_combine(total_error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1657,7 +1652,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1680,23 +1675,23 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1719,7 +1714,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1741,12 +1736,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is ONLY one BLOCK CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined @@ -1757,10 +1752,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1785,8 +1780,6 @@ END SUBROUTINE test_select_combine !*************************************************************** SUBROUTINE test_select_bounds(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1817,10 +1810,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) ! Set offset for selection offset(1:2) = 1 @@ -1847,7 +1840,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for 'none' selection, should fail CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set point selection @@ -1863,10 +1856,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error) ! Set bad offset for selection @@ -1876,7 +1869,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/2,-2/) @@ -1887,10 +1880,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1911,10 +1904,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 37, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 37, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 37, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 37, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1923,7 +1916,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1934,10 +1927,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 42, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 35, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 42, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 35, total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1958,10 +1951,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 50, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 50, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 50, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 50, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1970,7 +1963,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1981,10 +1974,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 55, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 48, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 55, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 48, total_error) ! Reset offset for selection offset(1:2) = 0 diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 761dfcb..9aaaa73 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -29,6 +29,10 @@ MODULE TH5T + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE compoundtest(cleanup, total_error) @@ -47,8 +51,6 @@ CONTAINS ! h5tget_class_f, h5tget_member_name_f, h5tget_member_offset_f, h5tget_member_type_f, ! h5tequal_f, h5tinsert_array_f, h5tcommit_f, h5tencode_f, h5tdecode_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -526,12 +528,9 @@ CONTAINS ! CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error) CALL check("h5dread_f", error, total_error) - do i = 1, dimsize - IF( .NOT.dreal_eq( REAL(double_member_out(i),dp), REAL( double_member(i), dp)) ) THEN - write(*,*) " Wrong double precision data is read back " - total_error = total_error + 1 - endif - enddo + DO i = 1, dimsize + CALL VERIFY("h5dread_f:Wrong double precision data is read back", double_member_out(i), double_member(i), total_error) + ENDDO ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) @@ -544,12 +543,9 @@ CONTAINS ! CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error) CALL check("h5dread_f", error, total_error) - DO i = 1, dimsize - IF( .NOT.dreal_eq( REAL(real_member_out(i),dp), REAL( real_member(i), dp)) ) THEN - WRITE(*,*) " Wrong real precision data is read back " - total_error = total_error + 1 - ENDIF - ENDDO + DO i = 1, dimsize + CALL VERIFY("h5dread_f:Wrong double precision data is read back", real_member_out(i), real_member(i), total_error) + ENDDO ! ! *----------------------------------------------------------------------- ! * Test encoding and decoding compound datatypes @@ -564,7 +560,7 @@ CONTAINS ! Try decoding bogus buffer CALL H5Tdecode_f(cmpd_buf, decoded_tid1, error) - CALL VERIFY("H5Tdecode_f", error, -1, total_error) + CALL verify("H5Tdecode_f", error, -1, total_error) CALL H5Tencode_f(dtype_id, cmpd_buf, cmpd_buf_size, error) CALL check("H5Tencode_f", error, total_error) @@ -577,7 +573,7 @@ CONTAINS CALL H5Tequal_f(decoded_tid1, dtype_id, flag, error) CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) ! ! Close all open objects. ! @@ -613,9 +609,6 @@ CONTAINS ! H5tset_norm_f, H5tget_inpad_f, H5tset_inpad_f, H5tget_cset_f, ! H5tset_cset_f, H5tget_strpad_f, H5tset_strpad_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error @@ -901,7 +894,7 @@ CONTAINS CALL check("H5Tget_order_f",error, total_error) CALL H5Tget_order_f(H5T_NATIVE_INTEGER, order2, error) CALL check("H5Tget_order_f",error, total_error) - CALL VERIFY("H5Tget_native_type_f",order1, order2, total_error) + CALL verify("H5Tget_native_type_f",order1, order2, total_error) ! this test depends on whether -i8 was specified @@ -909,11 +902,11 @@ CONTAINS !!$ CALL check("H5Tget_size_f",error, total_error) !!$ CALL H5Tget_size_f(H5T_STD_I32BE, type_size2, error) !!$ CALL check("H5Tget_size_f",error, total_error) -!!$ CALL VERIFY("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) +!!$ CALL verify("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) CALL H5Tget_class_f(native_type, class, error) CALL check("H5Tget_class_f",error, total_error) - CALL VERIFY("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) + CALL verify("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) CALL h5dclose_f(dset_id,error) CALL check("h5dclose_f", error, total_error) @@ -971,8 +964,6 @@ CONTAINS SUBROUTINE test_derived_flt(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1059,24 +1050,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.44 .OR. epos.NE.34 .OR. esize.NE.10 .OR. mpos.NE.3 .OR. msize.NE.31)THEN - CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) + CALL verify("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid1, precision1, error) CALL check("H5Tget_precision_f", error, total_error) - CALL VERIFY("H5Tget_precision_f", INT(precision1), 42, total_error) + CALL verify("H5Tget_precision_f", INT(precision1), 42, total_error) CALL H5Tget_offset_f(tid1, offset1, error) CALL check("H5Tget_offset_f", error, total_error) - CALL VERIFY("H5Tget_offset_f", INT(offset1), 3, total_error) + CALL verify("H5Tget_offset_f", INT(offset1), 3, total_error) CALL H5Tget_size_f(tid1, size1, error) CALL check("H5Tget_size_f", error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size1), 7, total_error) + CALL verify("H5Tget_size_f", INT(size1), 7, total_error) CALL H5Tget_ebias_f(tid1, ebias1, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL VERIFY("H5Tget_ebias_f", INT(ebias1), 511, total_error) + CALL verify("H5Tget_ebias_f", INT(ebias1), 511, total_error) !-------------------------------------------------------------------------- ! * 2nd floating-point type @@ -1120,24 +1111,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.23 .OR. epos.NE.16 .OR. esize.NE.7 .OR. mpos.NE.0 .OR. msize.NE.16)THEN - CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) + CALL verify("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid2, precision2, error) CALL check("H5Tget_precision_f", error, total_error) - CALL VERIFY("H5Tget_precision_f", INT(precision2), 24, total_error) + CALL verify("H5Tget_precision_f", INT(precision2), 24, total_error) CALL H5Tget_offset_f(tid2, offset2, error) CALL check("H5Tget_offset_f", error, total_error) - CALL VERIFY("H5Tget_offset_f", INT(offset2), 0, total_error) + CALL verify("H5Tget_offset_f", INT(offset2), 0, total_error) CALL H5Tget_size_f(tid2, size2, error) CALL check("H5Tget_size_f", error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size2), 3, total_error) + CALL verify("H5Tget_size_f", INT(size2), 3, total_error) CALL H5Tget_ebias_f(tid2, ebias2, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL VERIFY("H5Tget_ebias_f", INT(ebias2), 63, total_error) + CALL verify("H5Tget_ebias_f", INT(ebias2), 63, total_error) CALL h5tclose_f(tid1, error) CALL check("h5tclose_f", error, total_error) diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 new file mode 100644 index 0000000..8117578 --- /dev/null +++ b/fortran/test/tH5T_F03.F90 @@ -0,0 +1,3419 @@ +!****h* root/fortran/test/tH5T_F03.f90 +! +! NAME +! tH5T_F03.f90 +! +! FUNCTION +! Test FORTRAN HDF5 H5T 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! +! CONTAINS SUBROUTINES +! test_array_compound_atomic, test_array_compound_array, +! test_array_bkg, test_h5kind_to_type +! +!***** + +! ***************************************** +! *** H 5 T T E S T S +! ***************************************** + +!*************************************************************** +!** +!** test_array_compound_atomic(): Test basic array datatype code. +!** Tests 1-D array of compound datatypes (with no array fields) +!** +!*************************************************************** +! + +MODULE TH5T_F03 + + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + +CONTAINS + +SUBROUTINE test_array_compound_atomic(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + ! 1-D dataset WITH fixed dimensions + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" + + TYPE s1_t + INTEGER :: i + REAL :: f + END TYPE s1_t + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + INTEGER(hid_t) :: sid1 ! Dataspace ID + INTEGER(hid_t) :: tid1 ! Array Datatype ID + INTEGER(hid_t) :: tid2 ! Compound Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER :: ndims ! Array rank for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER :: i,j ! counting variables + + INTEGER :: error ! Generic RETURN value + INTEGER :: namelen + LOGICAL :: flag + + TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work + + ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + wdata(i,j)%i = i * 10 + j + wdata(i,j)%f = i * 2.5 + j + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Insert float field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write dataset to disk + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2, error) + CALL check("h5tclose_f", error, total_error) + + ! Read dataset from disk + + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',wdata(i,j)%f, rdata(i,j)%f, total_error) + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + +END SUBROUTINE test_array_compound_atomic +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_compound_array(): Test basic array datatype code. +!!$!** Tests 1-D array of compound datatypes (with array fields) +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_compound_array(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 3 + INTEGER, PARAMETER :: ARRAY2_DIM1= 5 + + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" + + TYPE st_t_struct ! Typedef for compound datatype + INTEGER :: i + REAL, DIMENSION(1:ARRAY2_DIM1) :: f + CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c + END TYPE st_t_struct + ! Information to write + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata + ! Information read in + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata + + + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + integer(hid_t) :: sid1 ! Dataspace ID + integer(hid_t) :: tid1 ! Array Datatype ID + integer(hid_t) :: tid2 ! Compound Datatype ID + integer(hid_t) :: tid3 ! Nested Array Datatype ID + integer(hid_t) :: tid4 ! Nested Array Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) + + INTEGER ndims ! Array rank for reading + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER(hid_t) :: mtid2 ! Datatype ID for field + + INTEGER :: mclass ! Datatype class for field + INTEGER :: i,j,k ! counting variables + + INTEGER :: error + CHARACTER(LEN=2) :: ichr2 + INTEGER :: namelen + LOGICAL :: flag + INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier + INTEGER(SIZE_T) :: attrlen ! Length of the attribute string + + TYPE(c_ptr) :: f_ptr + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, array1_DIM1 + wdata(i,j)%i = i*10+j + DO k = 1, ARRAY2_DIM1 + wdata(i,j)%f(k) = 10*i+j+.5 + WRITE(ichr2,'(I2.2)') k + wdata(i,j)%c(k) = ichr2 + ENDDO + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + ! Create a compound datatype to refer to + ! + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array of floats datatype + CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) + CALL check("h5tarray_create_f", error, total_error) + ! Insert float array field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) + CALL check("h5tinsert_f", error, total_error) + + ! + ! Create datatype for the String attribute. + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) + CALL check("h5tcopy_f",error,total_error) + + attrlen = LEN(wdata(1,1)%c(1)) + CALL h5tset_size_f(atype_id, attrlen, error) + CALL check("h5tset_size_f",error,total_error) + + ! Create an array of character datatype + CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) + 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)(1:1))), tid4, error) + CALL check("h5tinsert2_f", error, total_error) + + ! Close array of floats field datatype + CALL h5tclose_f(tid3,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5tclose_f(tid4,error) + CALL check("h5tclose_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + + ! Write dataset to disk + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 2nd field's class + CALL H5Tget_class_f(mtid, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the 3rd field's name + CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"c", total_error) + + ! Check the 3rd field's offset + 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)(1:1)))), total_error) + + ! Check the 3rd field's datatype + CALL H5Tget_member_type_f(tid2, 2, mtid2, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 3rd field's class + CALL H5Tget_class_f(mtid2, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid2, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid2, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid2, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, atype_id, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + ! Close the array's base type datatype + CALL h5tclose_f(tid3, error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! READ dataset from disk + + f_ptr = c_null_ptr + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + DO k = 1, ARRAY2_DIM1 + + IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN + PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN + PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + END SUBROUTINE test_array_compound_array +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_bkg(): Test basic array datatype code. +!!$!** Tests reading compound datatype with array fields and +!!$!** writing partial fields. +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_bkg(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: LENGTH = 5 + INTEGER, PARAMETER :: ALEN = 10 + INTEGER, PARAMETER :: RANK = 1 + INTEGER, PARAMETER :: NMAX = 100 + CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" + + INTEGER(hid_t) :: fid, array_dt + INTEGER(hid_t) :: space + INTEGER(hid_t) :: type + INTEGER(hid_t) :: dataset + + INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) + INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) + + INTEGER :: i, j + INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) + + TYPE CmpField_struct + INTEGER, DIMENSION(1:ALEN) :: a + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + REAL(KIND=dp), DIMENSION(1:ALEN) :: c + ENDTYPE CmpField_struct + + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr + + TYPE CmpDTSinfo_struct + INTEGER :: nsubfields + CHARACTER(LEN=5), DIMENSION(1:nmax) :: name + INTEGER(size_t), DIMENSION(1:nmax) :: offset + INTEGER(hid_t), DIMENSION(1:nmax) :: datatype + END TYPE CmpDTSinfo_struct + + TYPE(CmpDTSinfo_struct) :: dtsinfo + + TYPE fld_t_struct + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + END TYPE fld_t_struct + + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double datatype + INTEGER(SIZE_T) :: sizeof_compound ! total size of compound + + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr + + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + + INTEGER :: error + TYPE(c_ptr) :: f_ptr + +! Initialize the data +! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + cf(i)%a(j) = 100*(i+1) + j + cf(i)%b(j) = (100.*(i+1) + 0.01*j) + cf(i)%c(j) = 100.*(i+1) + 0.02*j + ENDDO + ENDDO + + ! Set the number of data members + ! ------------------------------ + + dtsinfo%nsubfields = 3 + + ! Initialize the offsets + ! ----------------------- + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) + CALL check("h5tget_size_f", error, total_error) + IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ENDIF + + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) + CALL check("h5tget_size_f", error, total_error) + + dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) + dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) + dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) + + + ! Initialize the data type IDs + ! ---------------------------- + dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; + dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; + dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; + + + ! Initialize the names of data members + ! ------------------------------------ + + dtsinfo%name(1) = "One " + dtsinfo%name(2) = "Two " + dtsinfo%name(3) = "Three" + + ! Create file + ! ----------- + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create data space + ! ----------------- + CALL h5screate_simple_f(RANK, dim, space, error) + CALL check("h5screate_simple_f", error, total_error) + + + ! Create the memory data type + ! --------------------------- + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) + CALL check("h5tcreate_f", error, total_error) + + ! Add members to the compound data type + ! -------------------------------------- + + DO i = 1, dtsinfo%nsubfields + CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + ENDDO + + ! Create the dataset + ! ------------------ / + CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write data to the dataset + ! ------------------------- + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(cf(1)) + + CALL h5dwrite_f(dataset, type, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ALLOCATE(rdims1(1:2)) ! dummy not needed + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, type, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j), cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + + ! Release IDs + ! ----------- + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + CALL h5sclose_f(space,error) + CALL check("h5sclose_f", error, total_error) + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + !**************************** + ! Reopen the file and update + !**************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + sizeof_compound = INT( type_sizer*ALEN, size_t) + + CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) + CALL check("h5tcreate_f", error, total_error) + + CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + + CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + ! Initialize the data to overwrite + ! -------------------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + fld(i)%b(j) = 1.313 + cf(i)%b(j) = fld(i)%b(j) + ENDDO + ENDDO + + f_ptr = C_LOC(fld(1)) + + CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ! Read just the field changed + + f_ptr = C_LOC(fldr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',fld(i)%b(j), fldr(i)%b(j), total_error) + ENDDO + ENDDO + CALL h5tclose_f(TYPE,error) + CALL check("h5tclose_f", error, total_error) + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Read the entire dataset again + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + +!************************************************** +! Reopen the file and print out all the data again +!************************************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Reset the data to read in + ! ------------------------- + + DO i = 1, LENGTH + cfr(i)%a(:) = 0 + cfr(i)%b(:) = 0 + cfr(i)%c(:) = 0 + ENDDO + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + END SUBROUTINE test_array_bkg + + + + SUBROUTINE test_h5kind_to_type(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + +! INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors +! INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors +! 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 :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors +!#ifdef + INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors + INTEGER(int_kind_32), DIMENSION(1:4), TARGET :: dset_data_i32, data_out_i32 + INTEGER(HID_T) :: dset_id32 ! Dataset identifier + CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name +!#endif + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !should map to REAL*8 on most modern processors + +!#ifdef + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) + REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 + INTEGER(HID_T) :: dset_idr16 ! Dataset identifier + CHARACTER(LEN=7), PARAMETER :: dsetnamer16 = "dsetr16" ! Dataset name + +!#endif + CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id1 ! Dataset identifier + INTEGER(HID_T) :: dset_id4 ! Dataset identifier + INTEGER(HID_T) :: dset_id8 ! Dataset identifier + INTEGER(HID_T) :: dset_id16 ! Dataset identifier + INTEGER(HID_T) :: dset_idr ! Dataset identifier + INTEGER(HID_T) :: dset_idr4 ! Dataset identifier + INTEGER(HID_T) :: dset_idr8 ! Dataset identifier + + INTEGER :: error ! Error flag + INTEGER :: i + +! Data buffers: + + INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 + INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 + INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 + INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 + + REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r + REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 + REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 + + INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize the dset_data array. + ! + DO i = 1, 4 + dset_data_i1(i) = 2**(4)-i + dset_data_i4(i) = 2**(10)-i + dset_data_i8(i) = 2**(28)-i + dset_data_i16(i) = 2**(28)-i +!#ifdef + dset_data_i32(i) = 2**(28)-i +!#endif + dset_data_r(i) = (i)*100. + dset_data_r7(i) = (i)*100. + dset_data_r15(i) = (i)*1000. +!#ifdef + dset_data_r31(i) = 3.141592653589793238462643383279_real_kind_31 +!#endif + + END DO + + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspaces for datasets + ! + CALL h5screate_simple_f(1, data_dims , dspace_id, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset. + ! + CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) + CALL check("H5Dcreate_f",error, total_error) +!#ifdef + CALL H5Dcreate_f(file_id, dsetname16, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), dspace_id, dset_id32, error) + CALL check("H5Dcreate_f",error, total_error) +!#endif + CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) + CALL check("H5Dcreate_f",error, total_error) +!#ifdef + CALL H5Dcreate_f(file_id, dsetnamer16, h5kind_to_type(real_kind_31,H5_REAL_KIND), dspace_id, dset_idr16, error) + CALL check("H5Dcreate_f",error, total_error) +!#endif + ! + ! Write the dataset. + ! + f_ptr = C_LOC(dset_data_i1(1)) + CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i4(1)) + CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i8(1)) + CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i16(1)) + CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#ifdef + f_ptr = C_LOC(dset_data_i32(1)) + CALL h5dwrite_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#endif + f_ptr = C_LOC(dset_data_r(1)) + CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r7(1)) + CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r15(1)) + CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#ifdef + f_ptr = C_LOC(dset_data_r31(1)) + CALL h5dwrite_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#endif + ! + ! Close the file + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + + ! Open the file + + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error, total_error) + ! + ! Read the dataset. + ! + ! Read data back into an integer size that is larger then the original size used for + ! writing the data + f_ptr = C_LOC(data_out_i1) + CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i4) + CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i8) + CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i16) + CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +!#ifdef + f_ptr = C_LOC(data_out_i32) + CALL h5dread_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +!#endif + f_ptr = C_LOC(data_out_r) + CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r7) + CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r15) + CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +!#ifdef + f_ptr = C_LOC(data_out_r31) + CALL h5dread_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +!#endif + DO i = 1, 4 + + CALL verify("h5kind_to_type1",dset_data_i1(i),data_out_i1(i),total_error) + CALL verify("h5kind_to_type2",dset_data_i4(i),data_out_i4(i),total_error) +!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) +!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) + +!#ifdef +! PRINT*,dset_data_i16(i),data_out_i16(i) +!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) +!#endif + CALL verify("h5kind_to_type5",dset_data_r(i),data_out_r(i),total_error) + CALL verify("h5kind_to_type6",dset_data_r7(i),data_out_r7(i),total_error) + CALL verify("h5kind_to_type7",dset_data_r15(i),data_out_r15(i),total_error) + + END DO + + ! + ! Close the dataset. + ! + CALL h5dclose_f(dset_id1, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id8, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id16, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr8, error) + CALL check("h5dclose_f",error, total_error) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE test_h5kind_to_type + +!************************************************************ +! +! This test reads and writes array datatypes +! to a dataset. The test first writes integers arrays of +! dimension ADIM0xADIM1 to a dataset with a dataspace of +! DIM0, then closes the file. Next, it reopens the file, +! reads back the data. +! +!************************************************************ +SUBROUTINE t_array(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: adim0 = 3 + INTEGER , PARAMETER :: adim1 = 5 + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: i, j, k + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + + ! + ! Initialize data. i is the element in the dataspace, j and k the + ! elements within the array datatype. + ! + DO i = 1, dim0 + DO j = 1, adim0 + DO k = 1, adim1 + wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) + ENDDO + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, error) + ! + ! Create array datatypes for file and memory. + ! + CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) + CALL check("H5Tarray_create_f",error, total_error) + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the array data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset, and attribute. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its dimensions. + ! + CALL h5dget_type_f(dset, filetype, error) + CALL check("h5dget_type_f",error, error) + CALL H5Tget_array_dims_f(filetype, adims, error) + CALL check("h5dget_type_f",error, total_error) + CALL VERIFY("H5Tget_array_dims_f", INT(adims(1)), adim0, total_error) + CALL VERIFY("H5Tget_array_dims_f", INT(adims(2)), adim1, total_error) + ! + ! Get dataspace and allocate memory for read buffer. This is a + ! three dimensional attribute when the array datatype is included. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) + ! + ! Create the memory datatype. + ! + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j=1, INT(adim0) + DO k = 1, INT(adim1) + CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_array + +SUBROUTINE t_enum(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + INTEGER(HID_T) :: F_BASET ! File base type + INTEGER(HID_T) :: M_BASET ! Memory base type + INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 + +! Enumerated type + INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER, DIMENSION(1:1), TARGET :: val + + CHARACTER(LEN=6), DIMENSION(1:4) :: & + names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) + CHARACTER(LEN=NAME_BUF_SIZE) :: name + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j, idx + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize DATA. + ! + F_BASET = H5T_STD_I16BE ! File base type + M_BASET = H5T_NATIVE_INTEGER ! Memory base type + DO i = 1, dim0 + DO j = 1, dim1 + wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create the enumerated datatypes for file and memory. This + ! process is simplified IF native types are used for the file, + ! as only one type must be defined. + ! + CALL h5tenum_create_f(F_BASET, filetype, error) + CALL check("h5tenum_create_f",error, total_error) + + CALL h5tenum_create_f(M_BASET, memtype, error) + CALL check("h5tenum_create_f",error, total_error) + + DO i = SOLID, PLASMA + ! + ! Insert enumerated value for memtype. + ! + val(1) = i + f_ptr = C_LOC(val(1)) + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, error) + CALL check("H5Tenum_insert_f", error, total_error) + ! + ! Insert enumerated value for filetype. We must first convert + ! the numerical value val to the base type of the destination. + ! + f_ptr = C_LOC(val(1)) + CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) + CALL check("H5Tconvert_f",error, total_error) + IF(i.GE.1)THEN ! test both F90 and F03 APIs + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) + ELSE + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + ENDIF + CALL check("H5Tenum_insert_f",error, total_error) + ENDDO + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, total_error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the enumerated data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f (file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset,space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + + ALLOCATE(rdata(1:dims(1),1:dims(2))) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1,1)) + CALL h5dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + ! + ! Get the name of the enumeration member. + ! + CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) + CALL check("h5tenum_nameof_f",error, total_error) + idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 + CALL verify("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_enum + +SUBROUTINE t_bit(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + + INTEGER(HID_T) :: file, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: A, B, C, D + INTEGER :: Aw, Bw, Cw, Dw + INTEGER :: i, j + INTEGER, PARAMETER :: hex = Z'00000003' + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize data. We will manually pack 4 2-bit integers into + ! each unsigned char data element. + ! + DO i = 0, dim0-1 + DO j = 0, dim1-1 + wdata(i+1,j+1) = 0 + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the bitfield data to it. + ! + CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + ALLOCATE(rdata(1:dims(1),1:dims(2))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" + B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" + C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" + D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" + + Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) + Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) + Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) + Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) + + CALL VERIFY("bitfield", A, Aw, total_error) + CALL VERIFY("bitfield", B, Bw, total_error) + CALL VERIFY("bitfield", C, Cw, total_error) + CALL VERIFY("bitfield", D, Dw, total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + +END SUBROUTINE t_bit + +SUBROUTINE t_opaque(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: size = 7 + INTEGER(HID_T) :: file, space, dtype, dset ! Handles + INTEGER(size_t) :: len + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) + + CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + CHARACTER(LEN=size-1) :: str = "OPAQUE" + + CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into + CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact + CHARACTER(LEN=17) :: tag_big ! and to big. + + INTEGER :: taglen + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hsize_t) :: i + CHARACTER(LEN=1) :: ichr + TYPE(C_PTR) :: f_ptr + INTEGER :: error + ! + ! Initialize data. + ! + DO i = 1, dim0 + WRITE(ichr,'(I1)') i-1 + wdata(i) = str//ichr + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create opaque datatype and set the tag to something appropriate. + ! For this example we will write and view the data as a character + ! array. + ! + CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) + CALL check("h5tcreate_f",error, total_error) + CALL h5tset_tag_f(dtype,"Character array",error) + CALL check("h5tset_tag_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the opaque data to it. + ! + CALL h5dcreate_f(file, dataset, dtype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)(1:1)) + CALL h5dwrite_f(dset, dtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get datatype and properties for the datatype. + ! + CALL h5dget_type_f(dset, dtype, error) + CALL check("h5dget_type_f",error, total_error) + CALL h5tget_size_f(dtype, len, error) + CALL check("h5tget_size_f",error, total_error) + + ! Next tests should return + ! opaque_tag = tag = "Character array" and the actual length = 15 + + ! Test reading into a string that is to small + CALL h5tget_tag_f(dtype, tag_sm, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_sm,"Character arra", total_error) + + ! Test reading into a string that is exact + CALL h5tget_tag_f(dtype, tag_exact, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_exact,"Character array", total_error) + + ! Test reading into a string that is to big + CALL h5tget_tag_f(dtype, tag_big, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_big,"Character array ", total_error) + + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL h5dread_f(dset, dtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + DO i = 1, dims(1) + CALL verify("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_opaque + +SUBROUTINE t_objref(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 2 + + INTEGER(HID_T) :: file, space, dset, obj ! Handles + INTEGER :: error + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) + TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: objtype + INTEGER(SIZE_T) :: name_size + CHARACTER(LEN=80) :: name + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER :: i + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with a null dataspace. + ! + CALL h5screate_f(H5S_NULL_F,space,error) + CALL check("h5screate_f",error, total_error) + CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) + CALL check("h5dcreate_f",error, total_error) + ! + CALL h5dclose_f(obj , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create a group. + ! + CALL h5gcreate_f(file, "G1", obj, error) + CALL check("h5gcreate_f",error, total_error) + CALL h5gclose_f(obj, error) + CALL check("h5gclose_f",error, total_error) + ! + ! Create references to the previously created objects. note, space_id + ! is not needed for object references. + ! + f_ptr = C_LOC(wdata(1)) + CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the object references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:maxdims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, INT(maxdims(1)) + ! + ! Open the referenced object, get its name and type. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) + CALL check("H5Rdereference_f",error, total_error) + CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) + CALL check("H5Rget_obj_type_f",error, total_error) + ! + ! Get the length of the name and name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) + CALL check("H5Iget_name_f",error, total_error) + ! + ! Print the object type and close the object. + ! + IF(objtype.EQ.H5G_GROUP_F)THEN + CALL verify("t_objref", name(1:name_size),"/G1", total_error) + ELSE IF(objtype.EQ.H5G_DATASET_F)THEN + CALL verify("t_objref", name(1:name_size),"/DS2", total_error) + ELSE + total_error = total_error + 1 + ENDIF + CALL h5oclose_f(obj, error) + CALL check("h5oclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + +END SUBROUTINE t_objref + + +SUBROUTINE t_regref(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" + INTEGER , PARAMETER :: dim0 = 2 + INTEGER , PARAMETER :: ds2dim0 = 16 + INTEGER , PARAMETER :: ds2dim1 = 3 + + INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) + + INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) + + INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) + + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hssize_t) :: npoints + TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + + INTEGER(size_t) :: size + CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 + + CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 + CHARACTER(LEN=80) :: name + INTEGER(hsize_t) :: i + TYPE(C_PTR) :: f_ptr + CHARACTER(LEN=ds2dim0) :: chrvar + CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct + + chrvar = "The quick brown " + READ(chrvar,'(16A1)') wdata2(1:16,1) + chrvar = "fox jumps over " + READ(chrvar,'(16A1)') wdata2(1:16,2) + chrvar = "the 5 lazy dogs " + READ(chrvar,'(16A1)') wdata2(1:16,3) + + chrref_correct(1) = 'hdf5' + chrref_correct(2) = 'Therowthedog' + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with character data. + ! + CALL h5screate_simple_f(2, dims2, space, error) + CALL check("h5screate_simple_f",error, total_error) + CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata2(1,1)) + CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Create reference to a list of elements in dset2. + ! + CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) + CALL check("h5sselect_elements_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + ! + ! Create reference to a hyperslab in dset2, close dataspace. + ! + CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) + CALL check("h5sselect_hyperslab_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + + ! + ! Create the dataset and write the region references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset2, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + ALLOCATE(rdata(1:dims(1))) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + + ! + ! Open the referenced object, retrieve its region as a + ! dataspace selection. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) + CALL check("H5Rdereference_f",error, total_error) + + CALL H5Rget_region_f(dset, f_ptr, space, error) + CALL check("H5Rget_region_f",error, total_error) + + ! + ! Get the object's name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) + CALL check("H5Iget_name_f",error, total_error) + CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) + CALL verify("H5Iget_name_f",name(1:size),TRIM(name), total_error) + ! + ! Allocate space for the read buffer. + ! + CALL H5Sget_select_npoints_f(space, npoints, error) + CALL check("H5Sget_select_npoints_f",error, total_error) + CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) + + dims3(1) = npoints + ! + ! Read the dataset region. + ! + CALL h5screate_simple_f(1, dims3, memspace, error) + CALL check("h5screate_simple_f",error, total_error) + + 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 verify("h5dread_f",rdata2(1)(1:npoints),TRIM(chrref_correct(i)), total_error) + + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Sclose_f(memspace, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Dclose_f(dset2, error) + CALL check("h5dclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_regref + +SUBROUTINE t_vlen(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER, PARAMETER :: LEN0 = 3 + INTEGER, PARAMETER :: LEN1 = 12 + INTEGER(hsize_t) :: dim0 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j + + ! vl data + TYPE vl + INTEGER, DIMENSION(:), POINTER :: DATA + END TYPE vl + TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr + + + TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures + TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) + INTEGER, DIMENSION(:), POINTER :: ptr_r + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize variable-length data. wdata(1) is a countdown of + ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. + ! + wdata(1)%len = LEN0 + wdata(2)%len = LEN1 + + ALLOCATE( ptr(1:2) ) + ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) + ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) + + DO i=1, wdata(1)%len + ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 + ENDDO + wdata(1)%p = C_LOC(ptr(1)%data(1)) + + ptr(2)%data(1:2) = 1 + DO i = 3, wdata(2)%len + ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) + ENDDO + wdata(2)%p = C_LOC(ptr(2)%data(1)) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create variable-length datatype for file and memory. + ! + CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) + CALL check("H5Tvlen_create_f",error, total_error) + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length data to it. + ! + CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. Note the use of H5Dvlen_reclaim + ! removes the need to manually deallocate the previously allocated + ! data. + ! + + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + + ! + ! Get dataspace and allocate memory for array of vlen structures. + ! This does not actually allocate memory for the vlen data, that + ! will be done by the library. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + dim0 = dims(1) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ! + ! Create the memory datatype. + ! + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, INT(dims(1)) + CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) + DO j = 1, rdata(i)%len + CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) + ENDDO + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(ptr) + CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlen + + +SUBROUTINE t_vlstring(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + + INTEGER(SIZE_T), PARAMETER :: dim0 = 4 + INTEGER(SIZE_T), PARAMETER :: sdim = 7 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) + INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) + INTEGER(hsize_t) :: i + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this example we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) + CALL check("H5Tset_strpad_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) + CALL check("h5dwrite_vl_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ALLOCATE(rdata(1:dims(1))) + + ! + ! Read the data. + ! + CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) + CALL check("H5Dread_vl_f",error, total_error) + + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + CALL verify("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring + +SUBROUTINE t_vlstring_readwrite(total_error) + +! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" + + INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 + INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR + CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D + + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer + CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string + TYPE(C_PTR) :: f_ptr + INTEGER(hsize_t) :: i, j + INTEGER :: len + INTEGER :: error + + ! Initialize array of C pointers + + 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)(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) + data2D_w(1,3) = A13(1) + data2D_w(1,4) = A14(1) + data2D_w(2,1) = A21(1) + data2D_w(2,2) = A22(1) + data2D_w(2,3) = A23(1) + data2D_w(2,4) = A24(1) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this test we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(2, dims2D, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata2D(1,1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this test. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims(1) + CALL C_F_POINTER(rdata(i), data) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verify("h5dread_f",data(1:len), data_w(i)(1:len), total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Test reading in 2D dataset + ! + CALL h5dopen_f(file, dataset2D, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + + CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) + + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata2D(1,1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims2D(1) + DO j = 1, dims2D(2) + CALL C_F_POINTER(rdata2D(i,j), DATA) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verify("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) + ENDDO + END DO + + DEALLOCATE(rdata2D) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring_readwrite + + +SUBROUTINE t_string(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: sdim = 8 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata + INTEGER(hsize_t) :: i + INTEGER(SIZE_T) :: size + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file datatypes. For this example we will save + ! the strings as FORTRAN strings + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(filetype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the string data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)(1:1)) + CALL H5Dwrite_f(dset, filetype, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its size. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + CALL H5Tget_size_f(filetype, size, error) + CALL check("H5Tget_size_f",error, total_error) + CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) + ! + ! Get dataspace. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:dims(1))) + ! + ! Create the memory datatype. + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(memtype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL H5Dread_f(dset, memtype, f_ptr, error, space) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, dims(1) + CALL verify("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + + +END SUBROUTINE t_string + +SUBROUTINE vl_test_special_char(total_error) + + IMPLICIT NONE + +! INTERFACE +! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) +! USE HDF5 +! USE ISO_C_BINDING +! IMPLICIT NONE +! CHARACTER(len=*), DIMENSION(:) :: data_in +! INTEGER(size_t), DIMENSION(:) :: line_lengths +! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type +! END SUBROUTINE setup_buffer +! END INTERFACE + + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" + INTEGER, PARAMETER :: line_length = 10 + INTEGER(hid_t) :: file + INTEGER(hid_t) :: dataset0 + CHARACTER(len=line_length), DIMENSION(1:100) :: data_in + CHARACTER(len=line_length), DIMENSION(1:100) :: data_out + INTEGER(size_t), DIMENSION(1:100) :: line_lengths + INTEGER(hid_t) :: string_id, space, dcpl + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) + INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) + INTEGER, PARAMETER :: ncontrolchar = 7 + CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & + (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) + INTEGER :: i, j, n, error + n = 8 + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + + max_dims = (/H5S_UNLIMITED_F/) + + ! + ! Create the memory datatype. + ! + CALL h5tcopy_f(h5t_string, string_id, error) + CALL check("h5tcopy_f", error, total_error) + CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) + CALL check("h5tset_strpad_f", error, total_error) + dims(1) = n + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error, max_dims) + CALL check("h5screate_simple_f", error, total_error) + CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) + CALL check("h5pcreate_f", error, total_error) + CALL h5pset_chunk_f(dcpl, 1, chunk, error) + CALL check("h5pset_chunk_f", error, total_error) + + data_dims(1) = line_length + data_dims(2) = n + ! + ! Create data with strings containing various control characters. + ! + DO i = 1, ncontrolchar + ! + ! Create the dataset, for the string with control character and write the string data to it. + ! + CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) + CALL check("h5dcreate_f", error, total_error) + CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) + CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dwrite_vl_f", error, total_error) + ! + ! Read the string back. + ! + CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dread_vl_f", error, total_error) + + DO j = 1, n + IF(data_in(j).NE.data_out(j))THEN + total_error = total_error + 1 + EXIT + ENDIF + ENDDO + + CALL h5dclose_f(dataset0, error) + CALL check("h5dclose_f", error, total_error) + ENDDO + + 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) + +END SUBROUTINE vl_test_special_char + + +SUBROUTINE setup_buffer(data_in, line_lengths, char_type) + + IMPLICIT NONE + + ! Creates a simple "Data_in" consisting of the letters of the alphabet, + ! one per line, with a control character. + + CHARACTER(len=10), DIMENSION(:) :: data_in + INTEGER(size_t), DIMENSION(:) :: line_lengths + INTEGER, DIMENSION(1:3) :: letters + CHARACTER(LEN=3) :: lets + CHARACTER(KIND=C_CHAR,LEN=*) :: char_type + CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp + INTEGER :: i, j, n, ff + + ! Convert the letters and special character to integers + lets = 'abc' + + READ(lets,'(3A1)') letters + READ(char_type,'(A1)') ff + n = SIZE(data_in) + j = 1 + DO i=1,n-1 + IF( j .EQ. 4 )THEN + WRITE(char_tmp,'(A1)') ff + data_in(i:i) = char_tmp + ELSE + WRITE(char_tmp,'(A1)') letters(j) + data_in(i:i) = char_tmp + ENDIF + line_lengths(i) = LEN_TRIM(data_in(i)) + j = j + 1 + IF( j .EQ. 5 ) j = 1 + END DO + WRITE(char_tmp,'(A1)') ff + data_in(n:n) = char_tmp + line_lengths(n) = 1 + +END SUBROUTINE setup_buffer + +!------------------------------------------------------------------------- +! Function: test_nbit +! +! Purpose: Tests (real, 4 byte) datatype for nbit filter +! +! Return: Success: 0 +! Failure: >0 +! +! Programmer: M. Scot Breitenfeld +! Decemeber 7, 2010 +! +! Modifications: Moved this subroutine from the 1.8 test file and +! modified it to use F2003 features. +! This routine requires 4 byte reals, so we use F2003 features to +! ensure the requirement is satisfied in a portable way. +! The need for this arises when a user specifies the default real is 8 bytes. +! MSB 7/31/12 +! +!------------------------------------------------------------------------- +! + +SUBROUTINE test_nbit(total_error ) + + IMPLICIT NONE + INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, INTENT(INOUT) :: total_error + INTEGER(hid_t) :: file + + INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) + INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) + ! orig_data[] are initialized to be within the range that can be represented by + ! dataset datatype (no precision loss during datatype conversion) + ! + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & + RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & + 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data + INTEGER(size_t) :: PRECISION, offset + INTEGER :: error + LOGICAL :: status + INTEGER(hsize_t) :: i, j + TYPE(C_PTR) :: f_ptr + + ! check to see if filter is available + CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) + IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter + total_error = -1 ! so return + RETURN + ENDIF + + CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) + CALL check("H5Fcreate_f", error, total_error) + + ! Define dataset datatype (integer), and set precision, offset + CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) + CALL CHECK(" H5Tcopy_f", error, total_error) + CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) + CALL CHECK(" H5Tset_fields_f", error, total_error) + offset = 7 + CALL H5Tset_offset_f(datatype, offset, error) + CALL CHECK(" H5Tset_offset_f", error, total_error) + PRECISION = 20 + CALL H5Tset_precision_f(datatype,PRECISION, error) + CALL CHECK(" H5Tset_precision_f", error, total_error) + + CALL H5Tset_size_f(datatype, 4_size_t, error) + CALL CHECK(" H5Tset_size_f", error, total_error) + + CALL H5Tset_ebias_f(datatype, 31_size_t, error) + CALL CHECK(" H5Tset_ebias_f", error, total_error) + + ! Create the data space + CALL H5Screate_simple_f(2, dims, space, error) + CALL CHECK(" H5Screate_simple_f", error, total_error) + + ! USE nbit filter + CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) + CALL CHECK(" H5Pcreate_f", error, total_error) + + CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) + CALL CHECK(" H5Pset_chunk_f", error, total_error) + CALL H5Pset_nbit_f(dc, error) + CALL CHECK(" H5Pset_nbit_f", error, total_error) + + ! Create the dataset + CALL H5Dcreate_f(file, "nbit_real", datatype, & + space, dataset, error, dc) + CALL CHECK(" H5Dcreate_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 1: Test nbit by setting up a chunked dataset and writing + ! to it. + !---------------------------------------------------------------------- + ! + mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) + + f_ptr = C_LOC(orig_data(1,1)) + CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dwrite_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 2: Try to read the data we just wrote. + !---------------------------------------------------------------------- + ! + f_ptr = C_LOC(new_data(1,1)) + CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dread_f", error, total_error) + + ! Check that the values read are the same as the values written + ! Assume size of long long = size of double + ! + i_loop: DO i = 1, dims(1) + j_loop: DO j = 1, dims(2) + + IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN + + IF( .NOT.check_real_eq( new_data(i,j), orig_data(i,j)) ) THEN + total_error = total_error + 1 + WRITE(*,'(" Read different values than written.")') + WRITE(*,'(" At index ", 2(1X,I0))') i, j + EXIT i_loop + END IF + ENDDO j_loop + ENDDO i_loop + + !---------------------------------------------------------------------- + ! Cleanup + !---------------------------------------------------------------------- + ! + CALL H5Tclose_f(datatype, error) + CALL CHECK(" H5Tclose_f", error, total_error) + CALL H5Pclose_f(dc, error) + CALL CHECK(" H5Pclose_f", error, total_error) + CALL H5Sclose_f(space, error) + CALL CHECK(" H5Sclose_f", error, total_error) + CALL H5Dclose_f(dataset, error) + CALL CHECK(" H5Dclose_f", error, total_error) + CALL H5Fclose_f(file, error) + CALL CHECK(" H5Fclose_f", error, 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. +!------------------------------------------------------------------------- +! + + 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_C_FLOAT) !should map to REAL*4 on most modern processors + + INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& + INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + 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(hsize_t) :: ih + 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", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_GREEN + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "GREEN", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLUE + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "BLUE", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_WHITE + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "WHITE", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLACK + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "BLACK", f_ptr, 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data2(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_short(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & + ih, INT(data1(ih)), ih, INT(data_double(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i8(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i8(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i16(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i16(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_r7(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_int(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_i16(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) + 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 + +END MODULE TH5T_F03 diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 deleted file mode 100644 index 5cac62d..0000000 --- a/fortran/test/tH5T_F03.f90 +++ /dev/null @@ -1,3453 +0,0 @@ -!****h* root/fortran/test/tH5T_F03.f90 -! -! NAME -! tH5T_F03.f90 -! -! FUNCTION -! Test FORTRAN HDF5 H5T 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! CONTAINS SUBROUTINES -! test_array_compound_atomic, test_array_compound_array, -! test_array_bkg, test_h5kind_to_type -! -!***** - -! ***************************************** -! *** H 5 T T E S T S -! ***************************************** - -!*************************************************************** -!** -!** test_array_compound_atomic(): Test basic array datatype code. -!** Tests 1-D array of compound datatypes (with no array fields) -!** -!*************************************************************** -! - -MODULE TH5T_F03 - - USE HDF5 - USE ISO_C_BINDING - -CONTAINS - -SUBROUTINE test_array_compound_atomic(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - ! 1-D dataset WITH fixed dimensions - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" - - TYPE s1_t - INTEGER :: i - REAL :: f - END TYPE s1_t - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - INTEGER(hid_t) :: sid1 ! Dataspace ID - INTEGER(hid_t) :: tid1 ! Array Datatype ID - INTEGER(hid_t) :: tid2 ! Compound Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER :: ndims ! Array rank for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER :: i,j ! counting variables - - INTEGER :: error ! Generic RETURN value - INTEGER :: namelen - LOGICAL :: flag - - TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work - - ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - wdata(i,j)%i = i * 10 + j - wdata(i,j)%f = i * 2.5 + j - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Insert float field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write dataset to disk - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2, error) - CALL check("h5tclose_f", error, total_error) - - ! Read dataset from disk - - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(wdata(i,j)%f,dp), REAL( rdata(i,j)%f, dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - -END SUBROUTINE test_array_compound_atomic -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_compound_array(): Test basic array datatype code. -!!$!** Tests 1-D array of compound datatypes (with array fields) -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_compound_array(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 3 - INTEGER, PARAMETER :: ARRAY2_DIM1= 5 - - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" - - TYPE st_t_struct ! Typedef for compound datatype - INTEGER :: i - REAL, DIMENSION(1:ARRAY2_DIM1) :: f - CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c - END TYPE st_t_struct - ! Information to write - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata - ! Information read in - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata - - - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - integer(hid_t) :: sid1 ! Dataspace ID - integer(hid_t) :: tid1 ! Array Datatype ID - integer(hid_t) :: tid2 ! Compound Datatype ID - integer(hid_t) :: tid3 ! Nested Array Datatype ID - integer(hid_t) :: tid4 ! Nested Array Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) - - INTEGER ndims ! Array rank for reading - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER(hid_t) :: mtid2 ! Datatype ID for field - - INTEGER :: mclass ! Datatype class for field - INTEGER :: i,j,k ! counting variables - - INTEGER :: error - CHARACTER(LEN=2) :: ichr2 - INTEGER :: namelen - LOGICAL :: flag - INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier - INTEGER(SIZE_T) :: attrlen ! Length of the attribute string - - TYPE(c_ptr) :: f_ptr - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, array1_DIM1 - wdata(i,j)%i = i*10+j - DO k = 1, ARRAY2_DIM1 - wdata(i,j)%f(k) = 10*i+j+.5 - WRITE(ichr2,'(I2.2)') k - wdata(i,j)%c(k) = ichr2 - ENDDO - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - ! Create a compound datatype to refer to - ! - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array of floats datatype - CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) - CALL check("h5tarray_create_f", error, total_error) - ! Insert float array field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) - CALL check("h5tinsert_f", error, total_error) - - ! - ! Create datatype for the String attribute. - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) - CALL check("h5tcopy_f",error,total_error) - - attrlen = LEN(wdata(1,1)%c(1)) - CALL h5tset_size_f(atype_id, attrlen, error) - CALL check("h5tset_size_f",error,total_error) - - ! Create an array of character datatype - CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) - 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)(1:1))), tid4, error) - CALL check("h5tinsert2_f", error, total_error) - - ! Close array of floats field datatype - CALL h5tclose_f(tid3,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5tclose_f(tid4,error) - CALL check("h5tclose_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - - ! Write dataset to disk - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 2nd field's class - CALL H5Tget_class_f(mtid, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the 3rd field's name - CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"c", total_error) - - ! Check the 3rd field's offset - 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)(1:1)))), total_error) - - ! Check the 3rd field's datatype - CALL H5Tget_member_type_f(tid2, 2, mtid2, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 3rd field's class - CALL H5Tget_class_f(mtid2, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid2, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid2, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid2, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, atype_id, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - ! Close the array's base type datatype - CALL h5tclose_f(tid3, error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! READ dataset from disk - - f_ptr = c_null_ptr - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - DO k = 1, ARRAY2_DIM1 - - IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN - PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN - PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - END SUBROUTINE test_array_compound_array -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_bkg(): Test basic array datatype code. -!!$!** Tests reading compound datatype with array fields and -!!$!** writing partial fields. -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_bkg(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: LENGTH = 5 - INTEGER, PARAMETER :: ALEN = 10 - INTEGER, PARAMETER :: RANK = 1 - INTEGER, PARAMETER :: NMAX = 100 - CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" - - INTEGER(hid_t) :: fid, array_dt - INTEGER(hid_t) :: space - INTEGER(hid_t) :: type - INTEGER(hid_t) :: dataset - - INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) - INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) - - INTEGER :: i, j - INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) - - TYPE CmpField_struct - INTEGER, DIMENSION(1:ALEN) :: a - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - REAL(KIND=dp), DIMENSION(1:ALEN) :: c - ENDTYPE CmpField_struct - - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr - - TYPE CmpDTSinfo_struct - INTEGER :: nsubfields - CHARACTER(LEN=5), DIMENSION(1:nmax) :: name - INTEGER(size_t), DIMENSION(1:nmax) :: offset - INTEGER(hid_t), DIMENSION(1:nmax) :: datatype - END TYPE CmpDTSinfo_struct - - TYPE(CmpDTSinfo_struct) :: dtsinfo - - TYPE fld_t_struct - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - END TYPE fld_t_struct - - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double datatype - INTEGER(SIZE_T) :: sizeof_compound ! total size of compound - - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr - - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - - INTEGER :: error - TYPE(c_ptr) :: f_ptr - -! Initialize the data -! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - cf(i)%a(j) = 100*(i+1) + j - cf(i)%b(j) = (100.*(i+1) + 0.01*j) - cf(i)%c(j) = 100.*(i+1) + 0.02*j - ENDDO - ENDDO - - ! Set the number of data members - ! ------------------------------ - - dtsinfo%nsubfields = 3 - - ! Initialize the offsets - ! ----------------------- - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) - IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ENDIF - - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) - - dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) - dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) - dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) - - - ! Initialize the data type IDs - ! ---------------------------- - dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; - dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; - dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; - - - ! Initialize the names of data members - ! ------------------------------------ - - dtsinfo%name(1) = "One " - dtsinfo%name(2) = "Two " - dtsinfo%name(3) = "Three" - - ! Create file - ! ----------- - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create data space - ! ----------------- - CALL h5screate_simple_f(RANK, dim, space, error) - CALL check("h5screate_simple_f", error, total_error) - - - ! Create the memory data type - ! --------------------------- - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) - CALL check("h5tcreate_f", error, total_error) - - ! Add members to the compound data type - ! -------------------------------------- - - DO i = 1, dtsinfo%nsubfields - CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - ENDDO - - ! Create the dataset - ! ------------------ / - CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write data to the dataset - ! ------------------------- - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(cf(1)) - - CALL h5dwrite_f(dataset, type, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ALLOCATE(rdims1(1:2)) ! dummy not needed - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, type, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL( cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL( cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - - ! Release IDs - ! ----------- - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - CALL h5sclose_f(space,error) - CALL check("h5sclose_f", error, total_error) - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - !**************************** - ! Reopen the file and update - !**************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - sizeof_compound = INT( type_sizer*ALEN, size_t) - - CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) - CALL check("h5tcreate_f", error, total_error) - - CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - - CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - ! Initialize the data to overwrite - ! -------------------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - fld(i)%b(j) = 1.313 - cf(i)%b(j) = fld(i)%b(j) - ENDDO - ENDDO - - f_ptr = C_LOC(fld(1)) - - CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ! Read just the field changed - - f_ptr = C_LOC(fldr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( .NOT.dreal_eq( REAL(fld(i)%b(j),dp), REAL( fldr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - CALL h5tclose_f(TYPE,error) - CALL check("h5tclose_f", error, total_error) - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Read the entire dataset again - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - -!************************************************** -! Reopen the file and print out all the data again -!************************************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Reset the data to read in - ! ------------------------- - - DO i = 1, LENGTH - cfr(i)%a(:) = 0 - cfr(i)%b(:) = 0 - cfr(i)%c(:) = 0 - ENDDO - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - END SUBROUTINE test_array_bkg - - - - SUBROUTINE test_h5kind_to_type(total_error) - - USE ISO_C_BINDING - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors - 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_C_FLOAT) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !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 - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id1 ! Dataset identifier - INTEGER(HID_T) :: dset_id4 ! Dataset identifier - INTEGER(HID_T) :: dset_id8 ! Dataset identifier - INTEGER(HID_T) :: dset_id16 ! Dataset identifier - INTEGER(HID_T) :: dset_idr ! Dataset identifier - INTEGER(HID_T) :: dset_idr4 ! Dataset identifier - INTEGER(HID_T) :: dset_idr8 ! Dataset identifier - - INTEGER :: error ! Error flag - INTEGER :: i - -! Data buffers: - - INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 - INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 - INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 - INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 - - REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r - REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 - REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 - - INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize the dset_data array. - ! - DO i = 1, 4 - dset_data_i1(i) = i - dset_data_i4(i) = i - dset_data_i8(i) = i - dset_data_i16(i) = i - - dset_data_r(i) = (i)*100. - dset_data_r7(i) = (i)*100. - dset_data_r15(i) = (i)*1000. - - END DO - - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspaces for datasets - ! - CALL h5screate_simple_f(1, data_dims , dspace_id, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) - CALL check("H5Dcreate_f",error, total_error) - - CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) - CALL check("H5Dcreate_f",error, total_error) - - ! - ! Write the dataset. - ! - f_ptr = C_LOC(dset_data_i1(1)) - CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i4(1)) - CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i8(1)) - CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i16(1)) - CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r(1)) - CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r7(1)) - CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r15(1)) - CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - ! - ! Close the file - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - - ! Open the file - - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error, total_error) - ! - ! Read the dataset. - ! - ! Read data back into an integer size that is larger then the original size used for - ! writing the data - f_ptr = C_LOC(data_out_i1) - CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i4) - CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i8) - CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i16) - CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r) - CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r7) - CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r15) - CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - - DO i = 1, 4 - - CALL verify_Fortran_INTEGER_4("h5kind_to_type1",INT(dset_data_i1(i),int_kind_8),INT(data_out_i1(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type2",INT(dset_data_i4(i),int_kind_8),INT(data_out_i4(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) - - CALL verify_real_kind_7("h5kind_to_type5",REAL(dset_data_r(i),real_kind_7),REAL(data_out_r(i),real_kind_7),total_error) - CALL verify_real_kind_7("h5kind_to_type6",REAL(dset_data_r7(i),real_kind_7),REAL(data_out_r7(i),real_kind_7),total_error) - CALL verify_real_kind_7("h5kind_to_type7",REAL(dset_data_r15(i),real_kind_7),REAL(data_out_r15(i),real_kind_7),total_error) - - END DO - - ! - ! Close the dataset. - ! - CALL h5dclose_f(dset_id1, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id8, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id16, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr8, error) - CALL check("h5dclose_f",error, total_error) - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE test_h5kind_to_type - -!************************************************************ -! -! This test reads and writes array datatypes -! to a dataset. The test first writes integers arrays of -! dimension ADIM0xADIM1 to a dataset with a dataspace of -! DIM0, then closes the file. Next, it reopens the file, -! reads back the data. -! -!************************************************************ -SUBROUTINE t_array(total_error) - - USE ISO_C_BINDING - USE HDF5 - USE TH5_MISC - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: adim0 = 3 - INTEGER , PARAMETER :: adim1 = 5 - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: i, j, k - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - - ! - ! Initialize data. i is the element in the dataspace, j and k the - ! elements within the array datatype. - ! - DO i = 1, dim0 - DO j = 1, adim0 - DO k = 1, adim1 - wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) - ENDDO - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, error) - ! - ! Create array datatypes for file and memory. - ! - CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) - CALL check("H5Tarray_create_f",error, total_error) - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the array data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset, and attribute. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its dimensions. - ! - CALL h5dget_type_f(dset, filetype, error) - CALL check("h5dget_type_f",error, error) - CALL H5Tget_array_dims_f(filetype, adims, error) - CALL check("h5dget_type_f",error, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(1)), adim0, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(2)), adim1, total_error) - ! - ! Get dataspace and allocate memory for read buffer. This is a - ! three dimensional attribute when the array datatype is included. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) - ! - ! Create the memory datatype. - ! - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j=1, INT(adim0) - DO k = 1, INT(adim1) - CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_array - -SUBROUTINE t_enum(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - INTEGER(HID_T) :: F_BASET ! File base type - INTEGER(HID_T) :: M_BASET ! Memory base type - INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 - -! Enumerated type - INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER, DIMENSION(1:1), TARGET :: val - - CHARACTER(LEN=6), DIMENSION(1:4) :: & - names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) - CHARACTER(LEN=NAME_BUF_SIZE) :: name - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j, idx - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize DATA. - ! - F_BASET = H5T_STD_I16BE ! File base type - M_BASET = H5T_NATIVE_INTEGER ! Memory base type - DO i = 1, dim0 - DO j = 1, dim1 - wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create the enumerated datatypes for file and memory. This - ! process is simplified IF native types are used for the file, - ! as only one type must be defined. - ! - CALL h5tenum_create_f(F_BASET, filetype, error) - CALL check("h5tenum_create_f",error, total_error) - - CALL h5tenum_create_f(M_BASET, memtype, error) - CALL check("h5tenum_create_f",error, total_error) - - DO i = SOLID, PLASMA - ! - ! Insert enumerated value for memtype. - ! - val(1) = i - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), C_LOC(val(1)), error) - CALL check("H5Tenum_insert_f", error, total_error) - ! - ! Insert enumerated value for filetype. We must first convert - ! the numerical value val to the base type of the destination. - ! - f_ptr = C_LOC(val(1)) - CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) - CALL check("H5Tconvert_f",error, total_error) - IF(i.GE.1)THEN ! test both F90 and F03 APIs - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) - ELSE - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) - ENDIF - CALL check("H5Tenum_insert_f",error, total_error) - ENDDO - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, total_error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the enumerated data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f (file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset,space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) - - ALLOCATE(rdata(1:dims(1),1:dims(2))) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1,1)) - CALL h5dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - ! - ! Get the name of the enumeration member. - ! - CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) - CALL check("h5tenum_nameof_f",error, total_error) - idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 - CALL verifystring("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_enum - -SUBROUTINE t_bit(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - - INTEGER(HID_T) :: file, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: A, B, C, D - INTEGER :: Aw, Bw, Cw, Dw - INTEGER :: i, j - INTEGER, PARAMETER :: hex = Z'00000003' - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize data. We will manually pack 4 2-bit integers into - ! each unsigned char data element. - ! - DO i = 0, dim0-1 - DO j = 0, dim1-1 - wdata(i+1,j+1) = 0 - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the bitfield data to it. - ! - CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) - ALLOCATE(rdata(1:dims(1),1:dims(2))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" - B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" - C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" - D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" - - Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) - Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) - Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) - Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) - - CALL VERIFY("bitfield", A, Aw, total_error) - CALL VERIFY("bitfield", B, Bw, total_error) - CALL VERIFY("bitfield", C, Cw, total_error) - CALL VERIFY("bitfield", D, Dw, total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - -END SUBROUTINE t_bit - -SUBROUTINE t_opaque(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: size = 7 - INTEGER(HID_T) :: file, space, dtype, dset ! Handles - INTEGER(size_t) :: len - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) - - CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - CHARACTER(LEN=size-1) :: str = "OPAQUE" - - CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into - CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact - CHARACTER(LEN=17) :: tag_big ! and to big. - - INTEGER :: taglen - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hsize_t) :: i - CHARACTER(LEN=1) :: ichr - TYPE(C_PTR) :: f_ptr - INTEGER :: error - ! - ! Initialize data. - ! - DO i = 1, dim0 - WRITE(ichr,'(I1)') i-1 - wdata(i) = str//ichr - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create opaque datatype and set the tag to something appropriate. - ! For this example we will write and view the data as a character - ! array. - ! - CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) - CALL check("h5tcreate_f",error, total_error) - CALL h5tset_tag_f(dtype,"Character array",error) - CALL check("h5tset_tag_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the opaque data to it. - ! - CALL h5dcreate_f(file, dataset, dtype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)(1:1)) - CALL h5dwrite_f(dset, dtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get datatype and properties for the datatype. - ! - CALL h5dget_type_f(dset, dtype, error) - CALL check("h5dget_type_f",error, total_error) - CALL h5tget_size_f(dtype, len, error) - CALL check("h5tget_size_f",error, total_error) - - ! Next tests should return - ! opaque_tag = tag = "Character array" and the actual length = 15 - - ! Test reading into a string that is to small - CALL h5tget_tag_f(dtype, tag_sm, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_sm,"Character arra", total_error) - - ! Test reading into a string that is exact - CALL h5tget_tag_f(dtype, tag_exact, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_exact,"Character array", total_error) - - ! Test reading into a string that is to big - CALL h5tget_tag_f(dtype, tag_big, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_big,"Character array ", total_error) - - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL h5dread_f(dset, dtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - DO i = 1, dims(1) - CALL verifystring("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_opaque - -SUBROUTINE t_objref(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 2 - - INTEGER(HID_T) :: file, space, dset, obj ! Handles - INTEGER :: error - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) - TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: objtype - INTEGER(SIZE_T) :: name_size - CHARACTER(LEN=80) :: name - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER :: i - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with a null dataspace. - ! - CALL h5screate_f(H5S_NULL_F,space,error) - CALL check("h5screate_f",error, total_error) - CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) - CALL check("h5dcreate_f",error, total_error) - ! - CALL h5dclose_f(obj , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create a group. - ! - CALL h5gcreate_f(file, "G1", obj, error) - CALL check("h5gcreate_f",error, total_error) - CALL h5gclose_f(obj, error) - CALL check("h5gclose_f",error, total_error) - ! - ! Create references to the previously created objects. note, space_id - ! is not needed for object references. - ! - f_ptr = C_LOC(wdata(1)) - CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the object references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:maxdims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, INT(maxdims(1)) - ! - ! Open the referenced object, get its name and type. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) - CALL check("H5Rdereference_f",error, total_error) - CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) - CALL check("H5Rget_obj_type_f",error, total_error) - ! - ! Get the length of the name and name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) - CALL check("H5Iget_name_f",error, total_error) - ! - ! Print the object type and close the object. - ! - IF(objtype.EQ.H5G_GROUP_F)THEN - CALL verifystring("t_objref", name(1:name_size),"/G1", total_error) - ELSE IF(objtype.EQ.H5G_DATASET_F)THEN - CALL verifystring("t_objref", name(1:name_size),"/DS2", total_error) - ELSE - total_error = total_error + 1 - ENDIF - CALL h5oclose_f(obj, error) - CALL check("h5oclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - -END SUBROUTINE t_objref - - -SUBROUTINE t_regref(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" - INTEGER , PARAMETER :: dim0 = 2 - INTEGER , PARAMETER :: ds2dim0 = 16 - INTEGER , PARAMETER :: ds2dim1 = 3 - - INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) - - INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) - - INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) - - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hssize_t) :: npoints - TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - - INTEGER(size_t) :: size - CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 - - CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 - CHARACTER(LEN=80) :: name - INTEGER(hsize_t) :: i - TYPE(C_PTR) :: f_ptr - CHARACTER(LEN=ds2dim0) :: chrvar - CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct - - chrvar = "The quick brown " - READ(chrvar,'(16A1)') wdata2(1:16,1) - chrvar = "fox jumps over " - READ(chrvar,'(16A1)') wdata2(1:16,2) - chrvar = "the 5 lazy dogs " - READ(chrvar,'(16A1)') wdata2(1:16,3) - - chrref_correct(1) = 'hdf5' - chrref_correct(2) = 'Therowthedog' - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with character data. - ! - CALL h5screate_simple_f(2, dims2, space, error) - CALL check("h5screate_simple_f",error, total_error) - CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata2(1,1)) - CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Create reference to a list of elements in dset2. - ! - CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) - CALL check("h5sselect_elements_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - ! - ! Create reference to a hyperslab in dset2, close dataspace. - ! - CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) - CALL check("h5sselect_hyperslab_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - - ! - ! Create the dataset and write the region references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset2, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - ALLOCATE(rdata(1:dims(1))) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - - ! - ! Open the referenced object, retrieve its region as a - ! dataspace selection. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) - CALL check("H5Rdereference_f",error, total_error) - - CALL H5Rget_region_f(dset, f_ptr, space, error) - CALL check("H5Rget_region_f",error, total_error) - - ! - ! Get the object's name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) - CALL check("H5Iget_name_f",error, total_error) - CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) - CALL verifystring("H5Iget_name_f",name(1:size),TRIM(name), total_error) - ! - ! Allocate space for the read buffer. - ! - CALL H5Sget_select_npoints_f(space, npoints, error) - CALL check("H5Sget_select_npoints_f",error, total_error) - CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) - - dims3(1) = npoints - ! - ! Read the dataset region. - ! - CALL h5screate_simple_f(1, dims3, memspace, error) - CALL check("h5screate_simple_f",error, total_error) - - 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) - - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Sclose_f(memspace, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Dclose_f(dset2, error) - CALL check("h5dclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_regref - -SUBROUTINE t_vlen(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER, PARAMETER :: LEN0 = 3 - INTEGER, PARAMETER :: LEN1 = 12 - INTEGER(hsize_t) :: dim0 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j - - ! vl data - TYPE vl - INTEGER, DIMENSION(:), POINTER :: DATA - END TYPE vl - TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr - - - TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures - TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) - INTEGER, DIMENSION(:), POINTER :: ptr_r - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize variable-length data. wdata(1) is a countdown of - ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. - ! - wdata(1)%len = LEN0 - wdata(2)%len = LEN1 - - ALLOCATE( ptr(1:2) ) - ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) - ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) - - DO i=1, wdata(1)%len - ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 - ENDDO - wdata(1)%p = C_LOC(ptr(1)%data(1)) - - ptr(2)%data(1:2) = 1 - DO i = 3, wdata(2)%len - ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) - ENDDO - wdata(2)%p = C_LOC(ptr(2)%data(1)) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create variable-length datatype for file and memory. - ! - CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) - CALL check("H5Tvlen_create_f",error, total_error) - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length data to it. - ! - CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. Note the use of H5Dvlen_reclaim - ! removes the need to manually deallocate the previously allocated - ! data. - ! - - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - - ! - ! Get dataspace and allocate memory for array of vlen structures. - ! This does not actually allocate memory for the vlen data, that - ! will be done by the library. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - dim0 = dims(1) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ! - ! Create the memory datatype. - ! - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, INT(dims(1)) - CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) - DO j = 1, rdata(i)%len - CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) - ENDDO - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(ptr) - CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlen - - -SUBROUTINE t_vlstring(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - - INTEGER(SIZE_T), PARAMETER :: dim0 = 4 - INTEGER(SIZE_T), PARAMETER :: sdim = 7 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) - INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) - INTEGER(hsize_t) :: i - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this example we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) - CALL check("H5Tset_strpad_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) - CALL check("h5dwrite_vl_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ALLOCATE(rdata(1:dims(1))) - - ! - ! Read the data. - ! - CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) - CALL check("H5Dread_vl_f",error, total_error) - - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - CALL verifystring("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring - -SUBROUTINE t_vlstring_readwrite(total_error) - -! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" - - INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 - INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR - CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D - - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer - CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string - TYPE(C_PTR) :: f_ptr - INTEGER(hsize_t) :: i, j - INTEGER :: len - INTEGER :: error - - ! Initialize array of C pointers - - 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)(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) - data2D_w(1,3) = A13(1) - data2D_w(1,4) = A14(1) - data2D_w(2,1) = A21(1) - data2D_w(2,2) = A22(1) - data2D_w(2,3) = A23(1) - data2D_w(2,4) = A24(1) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this test we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(2, dims2D, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata2D(1,1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this test. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims(1) - CALL C_F_POINTER(rdata(i), data) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verifystring("h5dread_f",data(1:len), data_w(i)(1:len), total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Test reading in 2D dataset - ! - CALL h5dopen_f(file, dataset2D, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - - CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) - - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata2D(1,1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims2D(1) - DO j = 1, dims2D(2) - CALL C_F_POINTER(rdata2D(i,j), DATA) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verifystring("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) - ENDDO - END DO - - DEALLOCATE(rdata2D) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring_readwrite - - -SUBROUTINE t_string(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: sdim = 8 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata - INTEGER(hsize_t) :: i - INTEGER(SIZE_T) :: size - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file datatypes. For this example we will save - ! the strings as FORTRAN strings - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(filetype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the string data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)(1:1)) - CALL H5Dwrite_f(dset, filetype, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its size. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - CALL H5Tget_size_f(filetype, size, error) - CALL check("H5Tget_size_f",error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) - ! - ! Get dataspace. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:dims(1))) - ! - ! Create the memory datatype. - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(memtype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL H5Dread_f(dset, memtype, f_ptr, error, space) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, dims(1) - CALL verifystring("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - - -END SUBROUTINE t_string - -SUBROUTINE vl_test_special_char(total_error) - - USE HDF5 - USE TH5_MISC - IMPLICIT NONE - -! INTERFACE -! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) -! USE HDF5 -! USE ISO_C_BINDING -! IMPLICIT NONE -! CHARACTER(len=*), DIMENSION(:) :: data_in -! INTEGER(size_t), DIMENSION(:) :: line_lengths -! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type -! END SUBROUTINE setup_buffer -! END INTERFACE - - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" - INTEGER, PARAMETER :: line_length = 10 - INTEGER(hid_t) :: file - INTEGER(hid_t) :: dataset0 - CHARACTER(len=line_length), DIMENSION(1:100) :: data_in - CHARACTER(len=line_length), DIMENSION(1:100) :: data_out - INTEGER(size_t), DIMENSION(1:100) :: line_lengths - INTEGER(hid_t) :: string_id, space, dcpl - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) - INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) - INTEGER, PARAMETER :: ncontrolchar = 7 - CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & - (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) - INTEGER :: i, j, n, error - n = 8 - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - - max_dims = (/H5S_UNLIMITED_F/) - - ! - ! Create the memory datatype. - ! - CALL h5tcopy_f(h5t_string, string_id, error) - CALL check("h5tcopy_f", error, total_error) - CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) - CALL check("h5tset_strpad_f", error, total_error) - dims(1) = n - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error, max_dims) - CALL check("h5screate_simple_f", error, total_error) - CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) - CALL check("h5pcreate_f", error, total_error) - CALL h5pset_chunk_f(dcpl, 1, chunk, error) - CALL check("h5pset_chunk_f", error, total_error) - - data_dims(1) = line_length - data_dims(2) = n - ! - ! Create data with strings containing various control characters. - ! - DO i = 1, ncontrolchar - ! - ! Create the dataset, for the string with control character and write the string data to it. - ! - CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) - CALL check("h5dcreate_f", error, total_error) - CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) - CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dwrite_vl_f", error, total_error) - ! - ! Read the string back. - ! - CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dread_vl_f", error, total_error) - - DO j = 1, n - IF(data_in(j).NE.data_out(j))THEN - total_error = total_error + 1 - EXIT - ENDIF - ENDDO - - CALL h5dclose_f(dataset0, error) - CALL check("h5dclose_f", error, total_error) - ENDDO - - 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) - -END SUBROUTINE vl_test_special_char - - -SUBROUTINE setup_buffer(data_in, line_lengths, char_type) - - USE HDF5 - USE ISO_C_BINDING - - IMPLICIT NONE - - ! Creates a simple "Data_in" consisting of the letters of the alphabet, - ! one per line, with a control character. - - CHARACTER(len=10), DIMENSION(:) :: data_in - INTEGER(size_t), DIMENSION(:) :: line_lengths - INTEGER, DIMENSION(1:3) :: letters - CHARACTER(LEN=3) :: lets - CHARACTER(KIND=C_CHAR,LEN=*) :: char_type - CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp - INTEGER :: i, j, n, ff - - ! Convert the letters and special character to integers - lets = 'abc' - - READ(lets,'(3A1)') letters - READ(char_type,'(A1)') ff - n = SIZE(data_in) - j = 1 - DO i=1,n-1 - IF( j .EQ. 4 )THEN - WRITE(char_tmp,'(A1)') ff - data_in(i:i) = char_tmp - ELSE - WRITE(char_tmp,'(A1)') letters(j) - data_in(i:i) = char_tmp - ENDIF - line_lengths(i) = LEN_TRIM(data_in(i)) - j = j + 1 - IF( j .EQ. 5 ) j = 1 - END DO - WRITE(char_tmp,'(A1)') ff - data_in(n:n) = char_tmp - line_lengths(n) = 1 - -END SUBROUTINE setup_buffer - -!------------------------------------------------------------------------- -! Function: test_nbit -! -! Purpose: Tests (real, 4 byte) datatype for nbit filter -! -! Return: Success: 0 -! Failure: >0 -! -! Programmer: M. Scot Breitenfeld -! Decemeber 7, 2010 -! -! Modifications: Moved this subroutine from the 1.8 test file and -! modified it to use F2003 features. -! This routine requires 4 byte reals, so we use F2003 features to -! ensure the requirement is satisfied in a portable way. -! The need for this arises when a user specifies the default real is 8 bytes. -! MSB 7/31/12 -! -!------------------------------------------------------------------------- -! - -SUBROUTINE test_nbit(total_error ) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors - INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: file - - INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) - INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) - ! orig_data[] are initialized to be within the range that can be represented by - ! dataset datatype (no precision loss during datatype conversion) - ! - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & - RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & - 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data - INTEGER(size_t) :: PRECISION, offset - INTEGER :: error - LOGICAL :: status - INTEGER(hsize_t) :: i, j - TYPE(C_PTR) :: f_ptr - - ! check to see if filter is available - CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) - IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter - total_error = -1 ! so return - RETURN - ENDIF - - CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) - CALL check("H5Fcreate_f", error, total_error) - - ! Define dataset datatype (integer), and set precision, offset - CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) - CALL CHECK(" H5Tcopy_f", error, total_error) - CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) - CALL CHECK(" H5Tset_fields_f", error, total_error) - offset = 7 - CALL H5Tset_offset_f(datatype, offset, error) - CALL CHECK(" H5Tset_offset_f", error, total_error) - PRECISION = 20 - CALL H5Tset_precision_f(datatype,PRECISION, error) - CALL CHECK(" H5Tset_precision_f", error, total_error) - - CALL H5Tset_size_f(datatype, 4_size_t, error) - CALL CHECK(" H5Tset_size_f", error, total_error) - - CALL H5Tset_ebias_f(datatype, 31_size_t, error) - CALL CHECK(" H5Tset_ebias_f", error, total_error) - - ! Create the data space - CALL H5Screate_simple_f(2, dims, space, error) - CALL CHECK(" H5Screate_simple_f", error, total_error) - - ! USE nbit filter - CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) - CALL CHECK(" H5Pcreate_f", error, total_error) - - CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) - CALL CHECK(" H5Pset_chunk_f", error, total_error) - CALL H5Pset_nbit_f(dc, error) - CALL CHECK(" H5Pset_nbit_f", error, total_error) - - ! Create the dataset - CALL H5Dcreate_f(file, "nbit_real", datatype, & - space, dataset, error, dc) - CALL CHECK(" H5Dcreate_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 1: Test nbit by setting up a chunked dataset and writing - ! to it. - !---------------------------------------------------------------------- - ! - mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) - - f_ptr = C_LOC(orig_data(1,1)) - CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dwrite_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 2: Try to read the data we just wrote. - !---------------------------------------------------------------------- - ! - f_ptr = C_LOC(new_data(1,1)) - CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dread_f", error, total_error) - - ! Check that the values read are the same as the values written - ! Assume size of long long = size of double - ! - i_loop: DO i = 1, dims(1) - j_loop: DO j = 1, dims(2) - IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN - IF( .NOT.dreal_eq( REAL(new_data(i,j),dp), REAL( orig_data(i,j), dp)) ) THEN - total_error = total_error + 1 - WRITE(*,'(" Read different values than written.")') - WRITE(*,'(" At index ", 2(1X,I0))') i, j - EXIT i_loop - END IF - ENDDO j_loop - ENDDO i_loop - - !---------------------------------------------------------------------- - ! Cleanup - !---------------------------------------------------------------------- - ! - CALL H5Tclose_f(datatype, error) - CALL CHECK(" H5Tclose_f", error, total_error) - CALL H5Pclose_f(dc, error) - CALL CHECK(" H5Pclose_f", error, total_error) - CALL H5Sclose_f(space, error) - CALL CHECK(" H5Sclose_f", error, total_error) - CALL H5Dclose_f(dataset, error) - CALL CHECK(" H5Dclose_f", error, total_error) - CALL H5Fclose_f(file, error) - CALL CHECK(" H5Fclose_f", error, 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 TH5_MISC - 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_C_FLOAT) !should map to REAL*4 on most modern processors - - INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& - INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - 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(hsize_t) :: ih - 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", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_GREEN - CALL H5Tenum_insert_f(dtype, "GREEN", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLUE - CALL H5Tenum_insert_f(dtype, "BLUE", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_WHITE - CALL H5Tenum_insert_f(dtype, "WHITE", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLACK - CALL H5Tenum_insert_f(dtype, "BLACK", C_LOC(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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data2(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_short(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & - ih, INT(data1(ih)), ih, INT(data_double(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i8(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i8(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i16(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i16(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_r7(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_int(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_i16(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) - 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 - -END MODULE TH5T_F03 diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.f90 index 651ca75..834fbde 100644 --- a/fortran/test/tH5VL.f90 +++ b/fortran/test/tH5VL.f90 @@ -28,12 +28,13 @@ !***** MODULE TH5VL + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS SUBROUTINE vl_test_integer(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -194,8 +195,6 @@ CONTAINS END SUBROUTINE vl_test_integer SUBROUTINE vl_test_real(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -328,18 +327,15 @@ CONTAINS CALL h5dread_vl_f(dset_id, vltype_id, vl_real_data_out, data_dims, len_out, & error, mem_space_id = dspace_id, file_space_id = dspace_id) CALL check("h5dread_real_f", error, total_error) - do ih = 1, data_dims(2) - do jh = 1, len_out(ih) - IF( .NOT.dreal_eq( REAL(vl_real_data(jh,ih),dp), REAL(vl_real_data_out(jh,ih), dp)) ) THEN - total_error = total_error + 1 - WRITE(*,*) "h5dread_vl_f returned incorrect data" - ENDIF - enddo - if (len(ih) .ne. len_out(ih)) then - total_error = total_error + 1 - write(*,*) "h5dread_vl_f returned incorrect data" - endif - enddo + DO ih = 1, data_dims(2) + DO jh = 1, len_out(ih) + CALL VERIFY("h5dread_vl_f returned incorrect data",vl_real_data(jh,ih),vl_real_data_out(jh,ih), total_error) + ENDDO + IF (LEN(ih) .NE. len_out(ih)) THEN + total_error = total_error + 1 + WRITE(*,*) "h5dread_vl_f returned incorrect data" + ENDIF + ENDDO ! @@ -367,8 +363,6 @@ CONTAINS END SUBROUTINE vl_test_real SUBROUTINE vl_test_string(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.f90 index e73fed2..d12bb25 100644 --- a/fortran/test/tHDF5.f90 +++ b/fortran/test/tHDF5.f90 @@ -29,6 +29,7 @@ MODULE THDF5 USE TH5_MISC + USE TH5_MISC_GEN USE TH5A USE TH5D USE TH5E diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index 505d945..7d67f30 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -59,36 +59,6 @@ CONTAINS !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: dreal_eq -!DEC$endif - LOGICAL FUNCTION dreal_eq(a,b) - - ! Check if two double precision reals are equivalent - REAL(dp), INTENT (in):: a,b - REAL(dp), PARAMETER :: eps = 1.e-8 - dreal_eq = ABS(a-b) .LT. eps - - END FUNCTION dreal_eq - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_real_kind_7 -!DEC$endif - SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors - CHARACTER(LEN=*) :: string - REAL(real_kind_7) :: value, correct_value - INTEGER :: total_error - IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_real_kind_7 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) !DEC$attributes dllexport :: write_test_status !DEC$endif SUBROUTINE write_test_status( test_result, test_title, total_error) @@ -140,84 +110,6 @@ CONTAINS RETURN END SUBROUTINE check -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify -!DEC$endif - SUBROUTINE VERIFY(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: value, correct_value, total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_INTEGER_HID_T -!DEC$endif - SUBROUTINE verify_INTEGER_HID_T(string,value,correct_value,total_error) - USE HDF5 - CHARACTER(LEN=*) :: string - INTEGER(HID_T) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_INTEGER_HID_T - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_Fortran_INTEGER_4 -!DEC$endif - SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors - CHARACTER(LEN=*) :: string - INTEGER(int_kind_8) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_Fortran_INTEGER_4 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyLogical -!DEC$endif - SUBROUTINE verifyLogical(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - LOGICAL :: value, correct_value - INTEGER :: total_error - IF (value .NEQV. correct_value) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyLogical - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyString -!DEC$endif - SUBROUTINE verifyString(string, value,correct_value,total_error) - CHARACTER*(*) :: string - CHARACTER*(*) :: value, correct_value - INTEGER :: total_error - IF (TRIM(value) .NE. TRIM(correct_value)) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyString - - !---------------------------------------------------------------------- ! Name: h5_fixname_f ! diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index d2eef67..5107cc1 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -63,6 +63,20 @@ dnl was required" problem when libtool is also used dnl [1] MPICH.org dnl +dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + +AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[ + HAVE_ISO_FORTRAN_ENV="no" + AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + USE, INTRINSIC :: ISO_FORTRAN_ENV + END PROGRAM + ])],[AC_MSG_RESULT([yes]) + HAVE_ISO_FORTRAN_ENV="yes"], + [AC_MSG_RESULT([no])]) +]) + dnl See if the fortran compiler supports the intrinsic function "SIZEOF" AC_DEFUN([PAC_PROG_FC_SIZEOF],[ -- cgit v0.12 From 17a9efa359e335542f84dcedf5d30c87420cbd9d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 2 Jun 2015 09:19:00 -0500 Subject: [svn-r27136] defines size and kinds --- fortran/src/H5fort_type_defines.h.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 fortran/src/H5fort_type_defines.h.in diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in new file mode 100644 index 0000000..ad7b666 --- /dev/null +++ b/fortran/src/H5fort_type_defines.h.in @@ -0,0 +1,19 @@ +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ +#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@ +#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ +#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@ +#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ +#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define C_LONG_DOUBLE_KIND 10 +#define C_LONG_DOUBLE_SIZEOF 12 +#define C_DOUBLE_KIND 8 +#define C_DOUBLE_SIZEOF 8 +#define C_FLOAT_KIND 4 +#define C_FLOAT_SIZEOF 4 -- cgit v0.12 From 4d500d49023156f1f8ef60375e63ac22e79e1749 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 3 Jun 2015 09:13:58 -0500 Subject: [svn-r27140] fixed interger*16 support --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 21 ++- configure.ac | 12 +- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/CMakeLists.txt | 52 +++--- fortran/src/H5_f.c | 18 ++- fortran/src/H5_ff.F90 | 8 +- fortran/src/H5config_f.inc.cmake | 28 ++++ fortran/src/H5config_f.inc.in | 12 +- fortran/src/H5fort_type_defines.h.in | 1 + fortran/src/Makefile.in | 1 + fortran/test/CMakeLists.txt | 2 +- fortran/test/Makefile.in | 1 + fortran/test/fflush2.f90 | 297 +++++++++++++++++------------------ fortran/test/tH5T_F03.F90 | 84 +++++----- fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 5 +- src/H5config.h.in | 3 + src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 53 files changed, 346 insertions(+), 237 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0e1d3e3..09c161c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -305,6 +305,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 42b0f4d..7390f73 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 5568998..aa77f81 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 16c309f..e637d93 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index cf04ba0..ef150e0 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/configure b/configure index ffb0f1e..b6bf787 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF PAC_FORTRAN_NATIVE_DOUBLE_KIND PAC_FORTRAN_NATIVE_REAL_SIZEOF @@ -6970,7 +6971,7 @@ rm -f core conftest.err conftest.$ac_objext \ ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - HAVE_C_LONG_DOUBLE_FORTRAN="no" + FORTRAN_HAVE_C_LONG_DOUBLE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 $as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } @@ -7003,7 +7004,7 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" + FORTRAN_HAVE_C_LONG_DOUBLE="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -7410,6 +7411,20 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 1" >>confdefs.h + + else + HAVE_Fortran_INTEGER_SIZEOF_16="0" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h + + fi + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) ##fi @@ -24733,7 +24748,7 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache -## Check for the __FLOAT128 +## Check for __FLOAT128 extension { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5 $as_echo_n "checking for __float128... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.ac b/configure.ac index 09f99e5..d5e0919 100644 --- a/configure.ac +++ b/configure.ac @@ -451,6 +451,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) + AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [1], [Determine if INTEGER*16 is available]) + else + HAVE_Fortran_INTEGER_SIZEOF_16="0" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) + fi ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) @@ -1109,7 +1119,7 @@ AC_CHECK_SIZEOF([off64_t], [8]) ## Checkpoint the cache AC_CACHE_SAVE -## Check for the __FLOAT128 +## Check for __FLOAT128 extension AC_MSG_CHECKING([for __float128]) AC_TRY_COMPILE([], [__float128 x;], diff --git a/examples/Makefile.in b/examples/Makefile.in index 90fb879..3140a07 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 3cc4f13..8359314 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index c9b7586..bc82f9f 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index d6e77ba..03db548 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -31,7 +31,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_D #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate H5fortran_detect.F90 and H5_KINDff.F90 +# H5test_kind.F90 used to generate various KIND interfaces # H5fortran_detect.F90 used to generate H5fort_type_defines.h # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -67,31 +67,31 @@ add_custom_command ( DEPENDS H5test_FortranHavekind ) #----------------------------------------------------------------------------- -add_executable (H5fortran_detect - ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 -) -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif (WIN32 AND MSVC) -set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) - -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5fortran_detect -) +#add_executable (H5fortran_detect +# ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 +#) +#if (WIN32 AND MSVC) +# if (BUILD_SHARED_LIBS) +# set_target_properties (H5fortran_detect +# PROPERTIES +# COMPILE_FLAGS "/MT" +# ) +# endif (BUILD_SHARED_LIBS) +# set_target_properties (H5fortran_detect +# PROPERTIES +# LINK_FLAGS "/SUBSYSTEM:CONSOLE" +# ) +#endif (WIN32 AND MSVC) +#set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) +# +#set (CMD $) +#add_custom_command ( +# OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h +# COMMAND ${CMD} +# ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h +# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} +# DEPENDS H5fortran_detect +#) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 6a6be41..c12b610 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -240,7 +240,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value; if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; -/* #ifdef -MSB- */ +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 /* * FIND H5T_NATIVE_INTEGER_16 */ @@ -260,6 +260,10 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; if ( H5Tset_precision (types[17], 128) < 0) return ret_value; } /*end else */ +#else + if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[17], 128) < 0) return ret_value; +#endif /* #ifdef -MSB- */ @@ -356,16 +360,16 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, int i; for (i = 0; i < *lentypes; i++) { - c_type_id = types[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = types[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *floatinglen; i++) { - c_type_id = floatingtypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = floatingtypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *integerlen; i++) { - c_type_id = integertypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = integertypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } ret_value = 0; return ret_value; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 25c7eab..f4090cc 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -30,6 +30,8 @@ ! !***** +#include + MODULE H5LIB USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T @@ -377,9 +379,10 @@ CONTAINS h5_type = H5T_NATIVE_INTEGER_4 ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN h5_type = H5T_NATIVE_INTEGER_8 -! NEED ifdef -MSB- +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN h5_type = H5T_NATIVE_INTEGER_16 +#endif ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN @@ -388,9 +391,10 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_DOUBLE ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -! NEED ifdef -MSB- +#if H5_HAVE_FLOAT128!=0 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 +#endif ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index cbdfb9b..cb1d9e8 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -27,3 +27,31 @@ #if H5_FORTRAN_HAVE_C_SIZEOF==0 #undef H5_FORTRAN_HAVE_C_SIZEOF #endif + +! Define if the intrinsic function FORTRAN_HAVE_C_LONG_DOUBLE exists +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ + +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 +#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#endif + +! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + +#if H5_SIZEOF_LONG_DOUBLE==0 +#undef H5_SIZEOF_LONG_DOUBLE +#endif + +! Define if the C intrinsic __FLOAT128 exists +#define H5_HAVE_FLOAT128 @HAVE_FLOAT128@ + +#if H5_HAVE_FLOAT128==0 +#undef H5_HAVE_FLOAT128 +#endif + +! Define if INTEGER*16 is available +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ + +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16==0 +#undef H5_HAVE_Fortran_INTEGER_SIZEOF_16 +#endif diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 0203315..b227c13 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -1,5 +1,8 @@ ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure +! The script to replace the defines in H5config_f.inc.in is +! located in configure.ac in the Fortran section. + ! Define if we have parallel support #undef HAVE_PARALLEL @@ -19,4 +22,11 @@ #undef HAVE_ISO_FORTRAN_ENV ! Define the size of C's long double -#define H5_SIZEOF_LONG_DOUBLE +#undef SIZEOF_LONG_DOUBLE + +! Define if the C intrinsic __FLOAT128 exists +#undef HAVE_FLOAT128 + +! Define if INTEGER*16 is available +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index ad7b666..9e8015c 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -11,6 +11,7 @@ #define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ #define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ #define C_LONG_DOUBLE_KIND 10 #define C_LONG_DOUBLE_SIZEOF 12 #define C_DOUBLE_KIND 8 diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 3809775..8aea063 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -514,6 +514,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 7a718f8..d71fefd 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -123,7 +123,7 @@ add_executable (fortranlib_test_F03 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 - tH5T_F03.f90 + tH5T_F03.F90 tHDF5_F03.f90 ) TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 037ec97..a8a207e 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -525,6 +525,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90 index 04ce439..4230832 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.f90 @@ -27,152 +27,151 @@ ! !***** - PROGRAM FFLUSH2EXAMPLE - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" - CHARACTER(LEN=80) :: fix_filename - - ! - !data space rank and dimensions - ! - INTEGER, PARAMETER :: NX = 4 - INTEGER, PARAMETER :: NY = 5 - - ! - ! File identifiers - ! - INTEGER(HID_T) :: file_id - - ! - ! Group identifier - ! - INTEGER(HID_T) :: gid - - ! - ! dataset identifier - ! - INTEGER(HID_T) :: dset_id - - - ! - ! data type identifier - ! - INTEGER(HID_T) :: dtype_id - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !general purpose integer - ! - INTEGER :: i, j, total_error = 0 - - ! - !data buffers - ! - INTEGER, DIMENSION(NX,NY) :: data_out - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - data_dims(1) = NX - data_dims(2) = NY - - ! - !Initialize FORTRAN predifined datatypes - ! - CALL h5open_f(error) - CALL check("h5open_f",error,total_error) - - ! - !Open the file. - ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) - if (error .ne. 0) then - write(*,*) "Cannot modify filename" - CALL h5_exit_f (1) - endif - CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error,total_error) - - ! - !Open the dataset - ! - CALL h5dopen_f(file_id, "/D", dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's data type. - ! - CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f",error,total_error) - - ! - !Read the dataset. - ! - CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) - CALL check("h5dread_f",error,total_error) - - ! - !Print the dataset. - ! - do i = 1, NX - write(*,*) (data_out(i,j), j = 1, NY) - end do -! -!result of the print statement -! -! 0, 1, 2, 3, 4 -! 1, 2, 3, 4, 5 -! 2, 3, 4, 5, 6 -! 3, 4, 5, 6, 7 - - ! - !Open the group. - ! - CALL h5gopen_f(file_id, "G", gid, error) - CALL check("h5gopen_f",error,total_error) - - ! - !In case error happens, exit. - ! - IF (error == -1) CALL h5_exit_f (1) - ! - !Close the datatype - ! - CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the group. - ! - CALL h5gclose_f(gid, error) - CALL check("h5gclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !Close FORTRAN predifined datatypes - ! - CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL h5close_f(error) - CALL check("h5close_types_f",error,total_error) - - ! if errors detected, exit with non-zero code. - IF (total_error .ne. 0) CALL h5_exit_f (1) - - END PROGRAM FFLUSH2EXAMPLE +PROGRAM FFLUSH2EXAMPLE + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" + CHARACTER(LEN=80) :: fix_filename + + ! + !data space rank and dimensions + ! + INTEGER, PARAMETER :: NX = 4 + INTEGER, PARAMETER :: NY = 5 + + ! + ! File identifiers + ! + INTEGER(HID_T) :: file_id + + ! + ! Group identifier + ! + INTEGER(HID_T) :: gid + + ! + ! dataset identifier + ! + INTEGER(HID_T) :: dset_id + + + ! + ! data type identifier + ! + INTEGER(HID_T) :: dtype_id + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !general purpose integer + ! + INTEGER :: i, j, total_error = 0 + + ! + !data buffers + ! + INTEGER, DIMENSION(NX,NY) :: data_out + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + data_dims(1) = NX + data_dims(2) = NY + + ! + !Initialize FORTRAN predifined datatypes + ! + CALL h5open_f(error) + CALL check("h5open_f",error,total_error) + + ! + !Open the file. + ! + CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + IF (error .NE. 0) THEN + WRITE(*,*) "Cannot modify filename" + CALL h5_exit_f (1) + ENDIF + CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error,total_error) + + ! + !Open the dataset + ! + CALL h5dopen_f(file_id, "/D", dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's data type. + ! + CALL h5dget_type_f(dset_id, dtype_id, error) + CALL check("h5dget_type_f",error,total_error) + ! + !Read the dataset. + ! + CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) + CALL check("h5dread_f",error,total_error) + + ! + !Print the dataset. + ! + DO i = 1, NX + WRITE(*,*) (data_out(i,j), j = 1, NY) + END DO + ! + !result of the print statement + ! + ! 0, 1, 2, 3, 4 + ! 1, 2, 3, 4, 5 + ! 2, 3, 4, 5, 6 + ! 3, 4, 5, 6, 7 + + ! + !Open the group. + ! + CALL h5gopen_f(file_id, "G", gid, error) + CALL check("h5gopen_f",error,total_error) + + ! + !In case error happens, exit. + ! + IF (error == -1) CALL h5_exit_f (1) + ! + !Close the datatype + ! + CALL h5tclose_f(dtype_id, error) + CALL check("h5tclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the group. + ! + CALL h5gclose_f(gid, error) + CALL check("h5gclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !Close FORTRAN predifined datatypes + ! + CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL h5close_f(error) + CALL check("h5close_types_f",error,total_error) + + ! if errors detected, exit with non-zero code. + IF (total_error .ne. 0) CALL h5_exit_f (1) + +END PROGRAM FFLUSH2EXAMPLE diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index 8117578..076769b 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -41,6 +41,7 @@ !** !*************************************************************** ! +#include MODULE TH5T_F03 @@ -969,8 +970,6 @@ END SUBROUTINE test_array_compound_atomic END SUBROUTINE test_array_bkg - - SUBROUTINE test_h5kind_to_type(total_error) IMPLICIT NONE @@ -986,22 +985,24 @@ END SUBROUTINE test_array_compound_atomic INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors INTEGER(int_kind_32), DIMENSION(1:4), TARGET :: dset_data_i32, data_out_i32 INTEGER(HID_T) :: dset_id32 ! Dataset identifier CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name -!#endif - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !should map to REAL*8 on most modern processors +#endif + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(C_DOUBLE) !should map to REAL*8 on most modern processors -!#ifdef +#if H5_HAVE_FLOAT128!=0 INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +#else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(C_LONG_DOUBLE) +#endif REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 INTEGER(HID_T) :: dset_idr16 ! Dataset identifier CHARACTER(LEN=7), PARAMETER :: dsetnamer16 = "dsetr16" ! Dataset name - -!#endif + CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name @@ -1043,19 +1044,17 @@ END SUBROUTINE test_array_compound_atomic ! Initialize the dset_data array. ! DO i = 1, 4 - dset_data_i1(i) = 2**(4)-i - dset_data_i4(i) = 2**(10)-i - dset_data_i8(i) = 2**(28)-i - dset_data_i16(i) = 2**(28)-i -!#ifdef - dset_data_i32(i) = 2**(28)-i -!#endif - dset_data_r(i) = (i)*100. - dset_data_r7(i) = (i)*100. - dset_data_r15(i) = (i)*1000. -!#ifdef - dset_data_r31(i) = 3.141592653589793238462643383279_real_kind_31 -!#endif + dset_data_i1(i) = HUGE(0_int_kind_1)-i + dset_data_i4(i) = HUGE(0_int_kind_4)-i + dset_data_i8(i) = HUGE(0_int_kind_8)-i + dset_data_i16(i) = HUGE(0_int_kind_16)-i +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + dset_data_i32(i) = HUGE(0_int_kind_32)-i +#endif + dset_data_r(i) = 4.0*ATAN(1.0)-REAL(i-1) + dset_data_r7(i) = 4.0_real_kind_7*ATAN(1.0_real_kind_7)-REAL(i-1,real_kind_7) + dset_data_r15(i) = 4.0_real_kind_15*ATAN(1.0_real_kind_15)-REAL(i-1,real_kind_15) + dset_data_r31(i) = 4.0_real_kind_31*ATAN(1.0_real_kind_31)-REAL(i-1,real_kind_31) END DO @@ -1077,17 +1076,17 @@ END SUBROUTINE test_array_compound_atomic CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) CALL check("H5Dcreate_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 CALL H5Dcreate_f(file_id, dsetname16, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), dspace_id, dset_id32, error) CALL check("H5Dcreate_f",error, total_error) -!#endif +#endif CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) CALL check("H5Dcreate_f",error, total_error) -!#ifdef +!#ifdef H5_HAVE_FLOAT128 CALL H5Dcreate_f(file_id, dsetnamer16, h5kind_to_type(real_kind_31,H5_REAL_KIND), dspace_id, dset_idr16, error) CALL check("H5Dcreate_f",error, total_error) !#endif @@ -1106,11 +1105,11 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(dset_data_i16(1)) CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 f_ptr = C_LOC(dset_data_i32(1)) CALL h5dwrite_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#endif +#endif f_ptr = C_LOC(dset_data_r(1)) CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) CALL check("H5Dwrite_f",error, total_error) @@ -1120,7 +1119,7 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(dset_data_r15(1)) CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#ifdef +!#ifdef H5_HAVE_FLOAT128 f_ptr = C_LOC(dset_data_r31(1)) CALL h5dwrite_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) @@ -1152,11 +1151,11 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(data_out_i16) CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 f_ptr = C_LOC(data_out_i32) CALL h5dread_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#endif +#endif f_ptr = C_LOC(data_out_r) CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) CALL check("h5dread_f",error, total_error) @@ -1166,26 +1165,23 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(data_out_r15) CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#ifdef f_ptr = C_LOC(data_out_r31) CALL h5dread_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#endif DO i = 1, 4 - CALL verify("h5kind_to_type1",dset_data_i1(i),data_out_i1(i),total_error) - CALL verify("h5kind_to_type2",dset_data_i4(i),data_out_i4(i),total_error) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) + CALL verify("h5kind_to_type",dset_data_i1(i),data_out_i1(i),total_error) + CALL verify("h5kind_to_type",dset_data_i4(i),data_out_i4(i),total_error) + CALL verify("h5kind_to_type",dset_data_i8(i),data_out_i8(i),total_error) + CALL verify("h5kind_to_type",dset_data_i16(i),data_out_i16(i),total_error) -!#ifdef -! PRINT*,dset_data_i16(i),data_out_i16(i) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) -!#endif - CALL verify("h5kind_to_type5",dset_data_r(i),data_out_r(i),total_error) - CALL verify("h5kind_to_type6",dset_data_r7(i),data_out_r7(i),total_error) - CALL verify("h5kind_to_type7",dset_data_r15(i),data_out_r15(i),total_error) - +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + CALL verify("h5kind_to_type",dset_data_i32(i),data_out_i32(i),total_error) +#endif + CALL verify("h5kind_to_type",dset_data_r(i),data_out_r(i),total_error) + CALL verify("h5kind_to_type",dset_data_r7(i),data_out_r7(i),total_error) + CALL verify("h5kind_to_type",dset_data_r15(i),data_out_r15(i),total_error) + CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error) END DO ! diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 20eb895..000d2f0 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/Makefile.in b/hl/Makefile.in index e3c6e4c..b9291d0 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 1149d55..8593085 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index f41c41d..6633339 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index ca68491..1377756 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -468,6 +468,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 4a7c181..cae4d25 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index eebefb1..b21c80d 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index b99b8fe..192b062 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 38b0581..f974fad 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 53bcac1..eb8865e 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,6 +489,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 82e1f0d..1a06949 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -477,6 +477,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 90a7ce9..0f6187d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 776cc84..dc63ead 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -504,6 +504,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index e899e77..d133ddb 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index fc4f5f0..7213967 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 5107cc1..ea773b8 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -129,7 +129,7 @@ dnl Check to see C_LONG_DOUBLE is available, and if it dnl is different from C_DOUBLE AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ - HAVE_C_LONG_DOUBLE_FORTRAN="no" + FORTRAN_HAVE_C_LONG_DOUBLE="no" AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is valid]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -156,7 +156,7 @@ AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ CALL h5t(d) END PROGRAM main ])], [AC_MSG_RESULT([yes]) - HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + FORTRAN_HAVE_C_LONG_DOUBLE="yes"], [AC_MSG_RESULT([no])]) ]) @@ -482,7 +482,6 @@ rm -f pac_fconftest.out ],[ pack_int_sizeof="$2" ]) -dnl PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" AC_MSG_RESULT([$pack_int_sizeof]) AC_LANG_POP([Fortran]) ]) diff --git a/src/H5config.h.in b/src/H5config.h.in index 61ca128..d2166f0 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -130,6 +130,9 @@ /* Define if the compiler understands the __FUNCTION__ keyword */ #undef HAVE_FUNCTION +/* Determine if INTEGER*16 is available */ +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + /* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ #undef HAVE_GETCONSOLESCREENBUFFERINFO diff --git a/src/Makefile.in b/src/Makefile.in index aaff35b..80cfc82 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -528,6 +528,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/test/Makefile.in b/test/Makefile.in index 2cd3f90..579252a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -872,6 +872,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 91d1ec0..8229729 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -495,6 +495,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 2c355f0..e101d75 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index ddb3e17..a6dd483 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 8eb19cc..ff49111 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -481,6 +481,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index f615ca0..b7539fb 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index d93c9b6..7dc4adf 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 06c0f16..3e1946c 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -486,6 +486,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 8735c09..9b7c8ba 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index f1f1add..78ff9ff 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -498,6 +498,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 7a0efb1..5efd8b8 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 1c23ced..4d33c14 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -463,6 +463,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index ce2ce0c..498dca6 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -501,6 +501,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 40c9d63..28aae68 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -505,6 +505,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -- cgit v0.12 From 043173a689015960758c0276486eca9e7a223366 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 4 Jun 2015 15:26:02 -0500 Subject: [svn-r27151] fixed __float128 errors --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + config/cmake/ConfigureChecks.cmake | 5 ++ configure | 170 +++++++++++++++++++++++------------ configure.ac | 25 ++++-- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/CMakeLists.txt | 6 ++ fortran/src/H5_ff.F90 | 2 +- fortran/src/H5config_f.inc.cmake | 2 +- fortran/src/H5config_f.inc.in | 4 +- fortran/src/H5fort_type_defines.h.in | 1 + fortran/src/H5match_types.c | 34 +++---- fortran/src/Makefile.in | 1 + fortran/test/Makefile.in | 1 + fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 114 ++++++++++++++--------- src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 50 files changed, 278 insertions(+), 125 deletions(-) diff --git a/Makefile.in b/Makefile.in index 09c161c..10e9d76 100644 --- a/Makefile.in +++ b/Makefile.in @@ -356,6 +356,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 7390f73..96c1a36 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -516,6 +516,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index aa77f81..3b82177 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -464,6 +464,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index e637d93..69e8abd 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -527,6 +527,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index ef150e0..147a31a 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -518,6 +518,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index e223553..4edec03 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -197,6 +197,11 @@ MACRO (H5MiscConversionTest VAR TEST msg) ENDMACRO (H5MiscConversionTest) #----------------------------------------------------------------------------- +# Check if C has __float128 extension +#----------------------------------------------------------------------------- +CHECK_TYPE_SIZE("__float128" _FLOAT128) + +#----------------------------------------------------------------------------- # Check various conversion capabilities #----------------------------------------------------------------------------- diff --git a/configure b/configure index b6bf787..69dee64 100755 --- a/configure +++ b/configure @@ -729,6 +729,7 @@ PAC_FORTRAN_NATIVE_INTEGER_KIND PAC_FC_ALL_INTEGER_KINDS_SIZEOF PAC_FC_ALL_REAL_KINDS_SIZEOF PAC_FC_ALL_INTEGER_KINDS +PAC_FC_MAX_REAL_PRECISION PAC_FC_ALL_REAL_KINDS FCLIBS F9XMODEXT @@ -6969,6 +6970,24 @@ rm -f core conftest.err conftest.$ac_objext \ + + ## Set the sizeof function for use later in the fortran tests + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then + FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + else + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then + FC_SIZEOF_A="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(a)" + FC_SIZEOF_C="SIZEOF(a)" + else + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 + fi + fi + + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE FORTRAN_HAVE_C_LONG_DOUBLE="no" @@ -7052,31 +7071,43 @@ else PROGRAM main IMPLICIT NONE - INTEGER :: ik, k, lastkind + INTEGER :: ik, k, lastkind, max_decimal_prec lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE="pac_fconftest.out", form="formatted") - WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs - DO ik=2,30 + OPEN(8, FILE='pac_fconftest.out', form='formatted') + WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' ENDIF IF (k .LE. 0) EXIT ENDDO - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " - WRITE(8,'(/)') - WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + IF (lastkind.NE.-1) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'B ' + ENDIF + WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) - DO ik=2,30 + max_decimal_prec = 1 + DO ik=2,36 k = SELECTED_REAL_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + IF (lastkind.NE.-1)THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'D' + ENDIF + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' END @@ -7086,8 +7117,11 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" - pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + + tmp="`cat pac_fconftest.out`" + pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" + pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" + PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 @@ -7098,6 +7132,10 @@ $as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } $as_echo_n "checking for Fortran REAL KINDs... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 +$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 $as_echo "Error" >&6; } @@ -7137,19 +7175,21 @@ rm -f pac_fconftest.out cat > conftest.$ac_ext <<_ACEOF - program main - integer a - real b - double precision c - open(8, file="pac_fconftest.out", form="formatted") - write(8,*) sizeof(a) - write(8,*) kind(a) - write(8,*) sizeof(b) - write(8,*) kind(b) - write(8,*) sizeof(c) - write(8,*) kind(c) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,*) $FC_SIZEOF_A + WRITE(8,*) kind(a) + WRITE(8,*) $FC_SIZEOF_B + WRITE(8,*) kind(b) + WRITE(8,*) $FC_SIZEOF_C + WRITE(8,*) kind(c) + CLOSE(8) + END _ACEOF @@ -7208,31 +7248,43 @@ else PROGRAM main IMPLICIT NONE - INTEGER :: ik, k, lastkind + INTEGER :: ik, k, lastkind, max_decimal_prec lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE="pac_fconftest.out", form="formatted") - WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs - DO ik=2,30 + OPEN(8, FILE='pac_fconftest.out', form='formatted') + WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' ENDIF IF (k .LE. 0) EXIT ENDDO - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " - WRITE(8,'(/)') - WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + IF (lastkind.NE.-1) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'B ' + ENDIF + WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) - DO ik=2,30 + max_decimal_prec = 1 + DO ik=2,36 k = SELECTED_REAL_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + IF (lastkind.NE.-1)THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'D' + ENDIF + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' END @@ -7242,8 +7294,11 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" - pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + + tmp="`cat pac_fconftest.out`" + pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" + pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" + PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 @@ -7254,6 +7309,10 @@ $as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } $as_echo_n "checking for Fortran REAL KINDs... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 +$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 $as_echo "Error" >&6; } @@ -7294,12 +7353,14 @@ for kind in $pac_validIntKinds; do cat > conftest.$ac_ext <<_ACEOF - program main - integer (kind=$kind) a - open(8, file="pac_fconftest.out", form="formatted") - write(8,'(I0)') sizeof(a) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=$kind) a + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END _ACEOF @@ -7354,12 +7415,14 @@ for kind in $pac_validRealKinds; do cat > conftest.$ac_ext <<_ACEOF - program main - REAL (kind=$kind) :: a - open(8, file="pac_fconftest.out", form="formatted") - write(8,'(I0)') sizeof(a) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=$kind) :: a + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END _ACEOF @@ -7412,6 +7475,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7431,10 +7495,6 @@ $as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h ##PAC_FC_AVAIL_INTEGER_MODELS - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then - as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 - fi if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then diff --git a/configure.ac b/configure.ac index d5e0919..ce5c8cd 100644 --- a/configure.ac +++ b/configure.ac @@ -429,6 +429,24 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" PAC_PROG_FC_STORAGE_SIZE + + ## Set the sizeof function for use later in the fortran tests + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then + FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + else + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then + FC_SIZEOF_A="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(a)" + FC_SIZEOF_C="SIZEOF(a)" + else + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) + fi + fi + + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE PAC_PROG_FC_HAVE_C_LONG_DOUBLE @@ -442,6 +460,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then PAC_FC_SIZEOF_REAL_KINDS AC_SUBST([PAC_FC_ALL_REAL_KINDS]) + AC_SUBST([PAC_FC_MAX_REAL_PRECISION]) AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) @@ -467,11 +486,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ##fi ##PAC_FC_AVAIL_INTEGER_MODELS - - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then - AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) - fi + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) diff --git a/examples/Makefile.in b/examples/Makefile.in index 3140a07..29e414b 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -464,6 +464,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 8359314..5fd05e7 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -520,6 +520,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index bc82f9f..5db1685 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -464,6 +464,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 03db548..5317346 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -27,7 +27,13 @@ if (H5_HAVE_PARALLEL) set (CMAKE_H5_HAVE_PARALLEL 1) endif (H5_HAVE_PARALLEL) +set (CMAKE_H5_HAVE_FLOAT128 0) +if (HAVE_FLOAT128) + set (CMAKE_H5_HAVE_FLOAT128 1) +endif(HAVE_FLOAT128) + configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index f4090cc..aba9d1b 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -391,7 +391,7 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_DOUBLE ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -#if H5_HAVE_FLOAT128!=0 +#if H5_PAC_FC_MAX_REAL_PRECISION > 28 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 #endif diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index cb1d9e8..9fbc987 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -28,7 +28,7 @@ #undef H5_FORTRAN_HAVE_C_SIZEOF #endif -! Define if the intrinsic function FORTRAN_HAVE_C_LONG_DOUBLE exists +! Define if the intrinsic C_LONG_DOUBLE exists #define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ #if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index b227c13..a28480c 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -24,8 +24,8 @@ ! Define the size of C's long double #undef SIZEOF_LONG_DOUBLE -! Define if the C intrinsic __FLOAT128 exists -#undef HAVE_FLOAT128 +! Define the maximum decimal precision for reals +#undef PAC_FC_MAX_REAL_PRECISION ! Define if INTEGER*16 is available #undef HAVE_Fortran_INTEGER_SIZEOF_16 diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index 9e8015c..dc2fc94 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -11,6 +11,7 @@ #define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ #define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define H5_PAC_FC_MAX_REAL_PRECISION @PAC_FC_MAX_REAL_PRECISION@ #define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ #define C_LONG_DOUBLE_KIND 10 #define C_LONG_DOUBLE_SIZEOF 12 diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 2067f60..5ac5c80 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -206,28 +206,28 @@ int main(void) /* (b) Define c_float_x */ - /* make sure we find long double first before checking for __float128 - * ideally we need to match precision instead of matching sizeof */ - - int found_longdb = 0; + int found_long_double = 0; for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { + + if (sizeof(float) == RealKinds_SizeOf[i]) { + writeTypedef("float", "float", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT"); + } else if(sizeof(double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_DOUBLE"); + } else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); + found_long_double = 1; + } #ifdef H5_HAVE_FLOAT128 - if(sizeof(__float128) == RealKinds_SizeOf[i] && found_longdb == 1) { + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { writeTypedef("float", "__float128", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } else + } #endif - if(sizeof(long double) == RealKinds_SizeOf[i]) { - found_longdb = 1; - writeTypedef("float", "long double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); - } else if(sizeof(double) == RealKinds_SizeOf[i]) { - writeTypedef("float", "double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_DOUBLE"); - } else if(sizeof(float) == RealKinds_SizeOf[i]) { - writeTypedef("float", "float", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT"); - } else { + else { printf(" **** HDF5 WARNING ****/n"); printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); printf("Fortran Interfaces for Fortran REALs of %d bytes will not exist\n",RealKinds_SizeOf[i]); diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 8aea063..eaf0244 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -565,6 +565,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index a8a207e..eb132fb 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -576,6 +576,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 000d2f0..3b924f2 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -516,6 +516,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/Makefile.in b/hl/Makefile.in index b9291d0..b845fbf 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -520,6 +520,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 8593085..cc05017 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -516,6 +516,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 6633339..2867e2b 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -463,6 +463,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 1377756..50e3d3f 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -519,6 +519,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index cae4d25..9ef27d1 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -516,6 +516,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index b21c80d..fe03288 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -463,6 +463,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 192b062..296d21a 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -520,6 +520,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index f974fad..c905cb0 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -463,6 +463,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index eb8865e..9a6511a 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -540,6 +540,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 1a06949..7d41c72 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -528,6 +528,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 0f6187d..6d40b4f 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -518,6 +518,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index dc63ead..b73370c 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -555,6 +555,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index d133ddb..9322ef4 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -517,6 +517,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 7213967..4373a06 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -531,6 +531,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index ea773b8..35e55f0 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -310,48 +310,69 @@ AC_RUN_IFELSE([ AC_LANG_SOURCE([ PROGRAM main IMPLICIT NONE - INTEGER :: ik, k, lastkind + INTEGER :: ik, k, lastkind, max_decimal_prec lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE="pac_fconftest.out", form="formatted") - WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs - DO ik=2,30 + OPEN(8, FILE='pac_fconftest.out', form='formatted') + WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' ENDIF IF (k .LE. 0) EXIT ENDDO - dnl IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " - WRITE(8,'(/)') - WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + IF (lastkind.NE.-1) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'B ' + ENDIF + WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs lastkind=SELECTED_REAL_KIND(1) - DO ik=2,30 + max_decimal_prec = 1 + DO ik=2,36 k = SELECTED_REAL_KIND(ik) IF (k .NE. lastkind) THEN - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO - IF (lastkind.NE.-1) WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " - dnl IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " - + IF (lastkind.NE.-1)THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + ELSE + WRITE(8,'(A)',ADVANCE='NO') 'D' + ENDIF + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' + END ]) ],[ if test -s pac_fconftest.out ; then - - dnl pac_flag="`sed -e 's/ */ /g' pac_fconftest.out | tr '\012' ','`" - pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" - pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + + dnl The output from the above program will be something like + dnl A1 4 8 16B C4 8 10D E30F where: + dnl - valid integer kinds are the numbers between A and B + dnl - valid real kinds are the numbers between A and B + dnl - max decimal precision for reals is the number between E and F + + dnl pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + dnl pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + tmp="`cat pac_fconftest.out`" + pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" + pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" + PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" AC_MSG_CHECKING([for Fortran INTEGER KINDs]) AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) AC_MSG_CHECKING([for Fortran REAL KINDs]) AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) + AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) else AC_MSG_RESULT([Error]) AC_MSG_WARN([No output from test program!]) @@ -369,7 +390,6 @@ AC_RUN_IFELSE([ ]) AC_LANG_POP([Fortran]) ]) - AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ AC_REQUIRE([PAC_FC_AVAIL_KINDS]) AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) @@ -379,12 +399,14 @@ rm -f pac_fconftest.out for kind in $pac_validIntKinds; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ - program main - integer (kind=$kind) a - open(8, file="pac_fconftest.out", form="formatted") - write(8,'(I0)') sizeof(a) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=$kind) a + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END ]) ]) AC_RUN_IFELSE([],[ @@ -415,12 +437,14 @@ rm -f pac_fconftest.out for kind in $pac_validRealKinds; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ - program main - REAL (kind=$kind) :: a - open(8, file="pac_fconftest.out", form="formatted") - write(8,'(I0)') sizeof(a) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=$kind) :: a + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END ]) ]) AC_RUN_IFELSE([],[ @@ -450,19 +474,21 @@ pack_int_sizeof="" rm -f pac_fconftest.out AC_LANG_CONFTEST([ AC_LANG_SOURCE([ - program main - integer a - real b - double precision c - open(8, file="pac_fconftest.out", form="formatted") - write(8,*) sizeof(a) - write(8,*) kind(a) - write(8,*) sizeof(b) - write(8,*) kind(b) - write(8,*) sizeof(c) - write(8,*) kind(c) - close(8) - end + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + WRITE(8,*) $FC_SIZEOF_A + WRITE(8,*) kind(a) + WRITE(8,*) $FC_SIZEOF_B + WRITE(8,*) kind(b) + WRITE(8,*) $FC_SIZEOF_C + WRITE(8,*) kind(c) + CLOSE(8) + END ]) ]) AC_RUN_IFELSE([],[ diff --git a/src/Makefile.in b/src/Makefile.in index 80cfc82..4e9445a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -579,6 +579,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/test/Makefile.in b/test/Makefile.in index 579252a..06cd5c4 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -923,6 +923,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 8229729..79d0844 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -546,6 +546,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/Makefile.in b/tools/Makefile.in index e101d75..b404903 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -517,6 +517,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index a6dd483..01e1393 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -525,6 +525,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index ff49111..9dffa38 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -532,6 +532,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index b7539fb..1cfca3a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -531,6 +531,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 7dc4adf..22994fe 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -525,6 +525,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 3e1946c..cc04a20 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -537,6 +537,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 9b7c8ba..e6d283e 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -517,6 +517,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 78ff9ff..4225a4f 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -549,6 +549,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 5efd8b8..6ff4d0a 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -527,6 +527,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 4d33c14..fdccf62 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -514,6 +514,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 498dca6..07c88d0 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -552,6 +552,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 28aae68..367145f 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -556,6 +556,7 @@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -- cgit v0.12 From 8641814c4e5b4211e0980df783c3d2d25f484226 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 5 Jun 2015 17:17:13 -0500 Subject: [svn-r27154] fixed issue with mis-matching long double between Fortran and C --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 27 +++++++++++---- configure.ac | 4 ++- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/H5_f.c | 9 +++-- fortran/src/H5_ff.F90 | 4 ++- fortran/src/H5config_f.inc.in | 3 ++ fortran/src/H5fort_type_defines.h.in | 7 +--- fortran/src/H5match_types.c | 28 ++++++++++++---- fortran/src/Makefile.in | 1 + fortran/test/Makefile.in | 1 + fortran/test/tH5Sselect.f90 | 64 ++++++++++++++++++------------------ fortran/test/tH5T_F03.F90 | 30 ++++++++--------- fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/fortran/test/tstlite.f90 | 4 --- hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 11 +++---- src/H5config.h.in | 3 ++ src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 52 files changed, 155 insertions(+), 79 deletions(-) diff --git a/Makefile.in b/Makefile.in index 10e9d76..a1edd4c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -294,6 +294,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 96c1a36..8fdfb06 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 3b82177..433f3e2 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 69e8abd..dcfac25 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -465,6 +465,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 147a31a..0b8ae50 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -456,6 +456,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/configure b/configure index 69dee64..8fddc6a 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +FORTRAN_HAVE_C_LONG_DOUBLE HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF PAC_FORTRAN_NATIVE_DOUBLE_KIND @@ -7118,10 +7119,15 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - tmp="`cat pac_fconftest.out`" + tmp="`cat pac_fconftest.out`" pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + +cat >>confdefs.h <<_ACEOF +#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION +_ACEOF + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 @@ -7142,6 +7148,7 @@ $as_echo "Error" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi + rm -f pac_fconftest.out else @@ -7181,7 +7188,7 @@ rm -f pac_fconftest.out INTEGER a REAL b DOUBLE PRECISION c - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,*) $FC_SIZEOF_A WRITE(8,*) kind(a) WRITE(8,*) $FC_SIZEOF_B @@ -7295,10 +7302,15 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - tmp="`cat pac_fconftest.out`" + tmp="`cat pac_fconftest.out`" pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + +cat >>confdefs.h <<_ACEOF +#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION +_ACEOF + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 @@ -7319,6 +7331,7 @@ $as_echo "Error" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi + rm -f pac_fconftest.out else @@ -7357,7 +7370,7 @@ for kind in $pac_validIntKinds; do USE ISO_C_BINDING IMPLICIT NONE INTEGER (KIND=$kind) a - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,'(I0)') $FC_SIZEOF_A CLOSE(8) END @@ -7419,7 +7432,7 @@ for kind in $pac_validRealKinds; do USE ISO_C_BINDING IMPLICIT NONE REAL (KIND=$kind) :: a - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,'(I0)') $FC_SIZEOF_A CLOSE(8) END @@ -7476,6 +7489,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7513,8 +7527,9 @@ $as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi - + FORTRAN_HAVE_C_LONG_DOUBLE="0" if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_C_LONG_DOUBLE="1" $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index ce5c8cd..dc06081 100644 --- a/configure.ac +++ b/configure.ac @@ -471,6 +471,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) + AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then @@ -499,8 +500,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi - + FORTRAN_HAVE_C_LONG_DOUBLE="0" if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_C_LONG_DOUBLE="1" AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) diff --git a/examples/Makefile.in b/examples/Makefile.in index 29e414b..1056bd2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 5fd05e7..d3b941d 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 5db1685..c517d7a 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index c12b610..241af79 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -227,9 +227,14 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ -#if H5_SIZEOF_LONG_DOUBLE!=0 +#if FORTRAN_HAVE_C_LONG_DOUBLE!=0 + else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { + if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; + } /*end else */ +#else else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { - if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 128) < 0) return ret_value; } /*end else */ #endif /* diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index aba9d1b..74838cf 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -391,10 +391,12 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_DOUBLE ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -#if H5_PAC_FC_MAX_REAL_PRECISION > 28 +#if H5_PAC_FC_MAX_REAL_PRECISION > 28 +#ifdef H5_HAVE_FLOAT128 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 #endif +#endif ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index a28480c..c8fcf31 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -27,6 +27,9 @@ ! Define the maximum decimal precision for reals #undef PAC_FC_MAX_REAL_PRECISION +! If C has quad precision +#undef HAVE_FLOAT128 + ! Define if INTEGER*16 is available #undef HAVE_Fortran_INTEGER_SIZEOF_16 diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index dc2fc94..279deb9 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -13,9 +13,4 @@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ #define H5_PAC_FC_MAX_REAL_PRECISION @PAC_FC_MAX_REAL_PRECISION@ #define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ -#define C_LONG_DOUBLE_KIND 10 -#define C_LONG_DOUBLE_SIZEOF 12 -#define C_DOUBLE_KIND 8 -#define C_DOUBLE_SIZEOF 8 -#define C_FLOAT_KIND 4 -#define C_FLOAT_SIZEOF 4 +#define H5_HAVE_Fortran_INTRINSIC_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 5ac5c80..366e3da 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -215,6 +215,7 @@ int main(void) } else if(sizeof(double) == RealKinds_SizeOf[i]) { writeTypedef("float", "double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_DOUBLE"); +/* may not have long double in fortran need check */ } else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); @@ -227,12 +228,27 @@ int main(void) strcpy(Real_C_TYPES[i], "C_FLOAT128"); } #endif - else { - printf(" **** HDF5 WARNING ****/n"); - printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); - printf("Fortran Interfaces for Fortran REALs of %d bytes will not exist\n",RealKinds_SizeOf[i]); - } - } +/* else { */ + /* /\* Did not find the real type, use the next smallest *\/ */ +/* sprintf(chrA, "%d", RealKinds[i]); */ +/* if(sizeof(float) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ +/* writeTypedef("float", "float", RealKinds[i]); */ +/* strcpy(Real_C_TYPES[i], chrA); */ +/* } else if(sizeof(double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ +/* writeTypedef("float", "double", RealKinds[i]); */ +/* strcpy(Real_C_TYPES[i], chrA); */ +/* } else if(sizeof(long double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ +/* writeTypedef("float", "long double", RealKinds[i]); */ +/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ + else { + printf(" **** HDF5 WARNING ****\n"); + printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); + printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]); + + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } + } +/* } */ /* Now begin defining fortran types. */ fprintf(c_header, "\n"); diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index eaf0244..54f2065 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -503,6 +503,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index eb132fb..431c42a 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -514,6 +514,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90 index 10139ea..aeb80e9 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.f90 @@ -1810,10 +1810,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) ! Set offset for selection offset(1:2) = 1 @@ -1824,10 +1824,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1856,10 +1856,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-4,hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-4,hsize_t), total_error) ! Set bad offset for selection @@ -1880,10 +1880,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 5_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-2,hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-6,hsize_t), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1904,10 +1904,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 37, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 37, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 37_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 37_hsize_t, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1927,10 +1927,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 42, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 35, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 42_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 35_hsize_t, total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1951,10 +1951,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 50, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 50, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 50_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 50_hsize_t, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1974,10 +1974,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), 55, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), 48, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 55_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 48_hsize_t, total_error) ! Reset offset for selection offset(1:2) = 0 diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index 076769b..ee9f2f2 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -991,13 +991,13 @@ END SUBROUTINE test_array_compound_atomic INTEGER(HID_T) :: dset_id32 ! Dataset identifier CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name #endif - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(C_FLOAT) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(C_DOUBLE) !should map to REAL*8 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors #if H5_HAVE_FLOAT128!=0 INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) #else - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(C_LONG_DOUBLE) + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(17) #endif REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 INTEGER(HID_T) :: dset_idr16 ! Dataset identifier @@ -1183,7 +1183,7 @@ END SUBROUTINE test_array_compound_atomic CALL verify("h5kind_to_type",dset_data_r15(i),data_out_r15(i),total_error) CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error) END DO - + ! ! Close the dataset. ! @@ -1302,8 +1302,8 @@ SUBROUTINE t_array(total_error) CALL check("h5dget_type_f",error, error) CALL H5Tget_array_dims_f(filetype, adims, error) CALL check("h5dget_type_f",error, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(1)), adim0, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(2)), adim1, total_error) + CALL VERIFY("H5Tget_array_dims_f", adims(1), INT(adim0,hsize_t), total_error) + CALL VERIFY("H5Tget_array_dims_f", adims(2), INT(adim1,hsize_t), total_error) ! ! Get dataspace and allocate memory for read buffer. This is a ! three dimensional attribute when the array datatype is included. @@ -1312,7 +1312,7 @@ SUBROUTINE t_array(total_error) CALL check("H5Dget_space_f",error, error) CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) ! @@ -1477,8 +1477,8 @@ SUBROUTINE t_enum(total_error) CALL check("H5Dget_space_f",error, total_error) CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) ALLOCATE(rdata(1:dims(1),1:dims(2))) @@ -1597,8 +1597,8 @@ SUBROUTINE t_bit(total_error) CALL check("H5Dget_space_f",error, total_error) CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) ALLOCATE(rdata(1:dims(1),1:dims(2))) ! ! Read the data. @@ -1758,7 +1758,7 @@ SUBROUTINE t_opaque(total_error) CALL check("H5Dget_space_f",error, total_error) CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) ALLOCATE(rdata(1:dims(1))) ! ! Read the data. @@ -1879,7 +1879,7 @@ SUBROUTINE t_objref(total_error) CALL check("H5Dget_space_f",error, total_error) CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) ALLOCATE(rdata(1:maxdims(1))) ! @@ -2058,7 +2058,7 @@ SUBROUTINE t_regref(total_error) CALL check("H5Dget_space_f",error, total_error) CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) ALLOCATE(rdata(1:dims(1))) CALL h5sclose_f(space, error) CALL check("h5sclose_f",error, total_error) @@ -2733,7 +2733,7 @@ SUBROUTINE t_string(total_error) CALL check("H5Dget_space_f",error, total_error) CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) ALLOCATE(rdata(1:dims(1))) ! diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 3b924f2..6c81b76 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/Makefile.in b/hl/Makefile.in index b845fbf..e1f7ed5 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index cc05017..68a8868 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 2867e2b..c19b82a 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 50e3d3f..ea6449e 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -457,6 +457,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 9ef27d1..2188d62 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index fe03288..891d82f 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 296d21a..81194a5 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index c905cb0..8803e1e 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 9a6511a..a06331c 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -478,6 +478,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 7d41c72..be12387 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -466,6 +466,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 8fe9612..da44eb7 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -142,15 +142,11 @@ END DO ! write dataset. ! f_ptr = C_LOC(buf3(1)) -!PRINT*,h5kind_to_type(INT(KIND(buf3(1))), INT(H5_REAL_KIND)), H5T_NATIVE_REAL_8,H5T_NATIVE_REAL,H5T_NATIVE_REAL_16 -PRINT*, KIND(buf3(1)), Fortran_REAL_16 mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -PRINT*,sizeof(buf3(1)) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & mytype, f_ptr, errcode) !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) ! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -stop ! ! read dataset. ! diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 6d40b4f..ef49563 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -456,6 +456,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index b73370c..6d6df30 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -493,6 +493,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 9322ef4..d1f3002 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 4373a06..e79cadb 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -469,6 +469,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 35e55f0..8051752 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -359,12 +359,11 @@ AC_RUN_IFELSE([ dnl - valid real kinds are the numbers between A and B dnl - max decimal precision for reals is the number between E and F - dnl pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" - dnl pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" tmp="`cat pac_fconftest.out`" pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" AC_MSG_CHECKING([for Fortran INTEGER KINDs]) @@ -377,7 +376,7 @@ AC_RUN_IFELSE([ AC_MSG_RESULT([Error]) AC_MSG_WARN([No output from test program!]) fi - dnl rm -f pac_fconftest.out + rm -f pac_fconftest.out ],[ AC_MSG_RESULT([Error]) AC_MSG_WARN([Failed to run program to determine available KINDs]) @@ -403,7 +402,7 @@ for kind in $pac_validIntKinds; do USE ISO_C_BINDING IMPLICIT NONE INTEGER (KIND=$kind) a - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,'(I0)') $FC_SIZEOF_A CLOSE(8) END @@ -441,7 +440,7 @@ for kind in $pac_validRealKinds; do USE ISO_C_BINDING IMPLICIT NONE REAL (KIND=$kind) :: a - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,'(I0)') $FC_SIZEOF_A CLOSE(8) END @@ -480,7 +479,7 @@ rm -f pac_fconftest.out INTEGER a REAL b DOUBLE PRECISION c - OPEN(8, FILE="pac_fconftest.out", FORM="formatted") + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') WRITE(8,*) $FC_SIZEOF_A WRITE(8,*) kind(a) WRITE(8,*) $FC_SIZEOF_B diff --git a/src/H5config.h.in b/src/H5config.h.in index d2166f0..ffbc4c2 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -422,6 +422,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define Fortran Maximum Real Decimal Precision */ +#undef PAC_FC_MAX_REAL_PRECISION + /* Width for printf() for type `long long' or `__int64', use `ll' */ #undef PRINTF_LL_WIDTH diff --git a/src/Makefile.in b/src/Makefile.in index 4e9445a..75feb9e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -517,6 +517,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index 06cd5c4..e26066a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -861,6 +861,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 79d0844..83c39d9 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -484,6 +484,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/Makefile.in b/tools/Makefile.in index b404903..7f4b9d7 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 01e1393..10d1385 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -463,6 +463,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 9dffa38..b0157f7 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -470,6 +470,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 1cfca3a..b8ea56a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -469,6 +469,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 22994fe..18de006 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -463,6 +463,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index cc04a20..3cd0190 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -475,6 +475,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index e6d283e..174ad99 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 4225a4f..4c188bd 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -487,6 +487,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 6ff4d0a..084b75b 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -465,6 +465,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index fdccf62..d747707 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -452,6 +452,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 07c88d0..818dd6b 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -490,6 +490,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 367145f..d7f240d 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -494,6 +494,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ -- cgit v0.12 From 32703c9fc5a315a005abf26965d5545043fd3605 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 8 Jun 2015 16:13:15 -0500 Subject: [svn-r27164] various bug fixes for DT --- MANIFEST | 8 +- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 86 +- configure.ac | 13 +- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/examples/rwdset_fortran2003.f90 | 12 +- fortran/src/H5_ff.F90 | 2 + fortran/src/H5config_f.inc.in | 3 + fortran/src/H5match_types.c | 4 +- fortran/src/Makefile.in | 1 + fortran/test/Makefile.in | 1 + fortran/test/tH5T.f90 | 2 + fortran/test/tH5T_F03.F90 | 17 +- fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/H5LTff.F90 | 2 +- hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.am | 8 +- hl/fortran/test/Makefile.in | 40 +- hl/fortran/test/tstds.F90 | 353 +++++++ hl/fortran/test/tstds.f90 | 353 ------- hl/fortran/test/tstimage.F90 | 339 ++++++ hl/fortran/test/tstimage.f90 | 339 ------ hl/fortran/test/tstlite.F90 | 1715 +++++++++++++++++++++++++++++++ hl/fortran/test/tstlite.f90 | 1711 ------------------------------ hl/fortran/test/tsttable.F90 | 465 +++++++++ hl/fortran/test/tsttable.f90 | 465 --------- hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 34 + src/H5config.h.in | 3 + src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 61 files changed, 3096 insertions(+), 2917 deletions(-) create mode 100644 hl/fortran/test/tstds.F90 delete mode 100644 hl/fortran/test/tstds.f90 create mode 100644 hl/fortran/test/tstimage.F90 delete mode 100644 hl/fortran/test/tstimage.f90 create mode 100644 hl/fortran/test/tstlite.F90 delete mode 100644 hl/fortran/test/tstlite.f90 create mode 100644 hl/fortran/test/tsttable.F90 delete mode 100644 hl/fortran/test/tsttable.f90 diff --git a/MANIFEST b/MANIFEST index 8ff62b6..7da4d28 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2339,10 +2339,10 @@ ./hl/fortran/src/Makefile.in ./hl/fortran/test/Makefile.am ./hl/fortran/test/Makefile.in -./hl/fortran/test/tstds.f90 -./hl/fortran/test/tstimage.f90 -./hl/fortran/test/tstlite.f90 -./hl/fortran/test/tsttable.f90 +./hl/fortran/test/tstds.F90 +./hl/fortran/test/tstimage.F90 +./hl/fortran/test/tstlite.F90 +./hl/fortran/test/tsttable.F90 # hl c++ ./hl/c++/COPYING diff --git a/Makefile.in b/Makefile.in index a1edd4c..6088c33 100644 --- a/Makefile.in +++ b/Makefile.in @@ -353,6 +353,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 8fdfb06..c916f89 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 433f3e2..bebe35d 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index dcfac25..83d515a 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -524,6 +524,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 0b8ae50..bba5059 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -515,6 +515,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/configure b/configure index 8fddc6a..554db12 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +PAC_C_MAX_REAL_PRECISION FORTRAN_HAVE_C_LONG_DOUBLE HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF @@ -6980,8 +6981,8 @@ rm -f core conftest.err conftest.$ac_objext \ else if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(a)" - FC_SIZEOF_C="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(b)" + FC_SIZEOF_C="SIZEOF(c)" else ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 @@ -7490,6 +7491,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7537,18 +7539,88 @@ $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h $as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h -else - FC="no" -fi - ## Change back to the C language -ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 +$as_echo_n "checking maximum decimal precision for C... " >&6; } +rm -f pac_Cconftest.out + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #if __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n", C_LDBL_DIG); + + ; + return 0; +} + +_ACEOF + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + if ac_fn_c_try_run "$LINENO"; then : + + if test -s pac_Cconftest.out ; then + LDBL_DIG="`cat pac_Cconftest.out`" + +cat >>confdefs.h <<_ACEOF +#define PAC_C_MAX_REAL_PRECISION $LDBL_DIG +_ACEOF + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_Cconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: C program fails to build or run!" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDBL_DIG" >&5 +$as_echo "$LDBL_DIG" >&6; } + +else + FC="no" +fi + ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## diff --git a/configure.ac b/configure.ac index dc06081..90f7d67 100644 --- a/configure.ac +++ b/configure.ac @@ -438,8 +438,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then else if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(a)" - FC_SIZEOF_C="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(b)" + FC_SIZEOF_C="SIZEOF(c)" else ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) @@ -472,6 +472,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) + AC_SUBST([PAC_C_MAX_REAL_PRECISION]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then @@ -487,7 +488,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ##fi ##PAC_FC_AVAIL_INTEGER_MODELS - + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) @@ -506,13 +507,13 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) +## Change back to the C language + AC_LANG_POP(Fortran) + PAC_LDBL_DIG else FC="no" fi -## Change back to the C language -AC_LANG_POP(Fortran) - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## diff --git a/examples/Makefile.in b/examples/Makefile.in index 1056bd2..20b0183 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index d3b941d..6427d4c 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index c517d7a..d0400c0 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90 index d65db9e..cd932bd 100644 --- a/fortran/examples/rwdset_fortran2003.f90 +++ b/fortran/examples/rwdset_fortran2003.f90 @@ -28,13 +28,13 @@ PROGRAM RWDSET_FORTRAN2003 IMPLICIT NONE - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors - 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 :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !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(6,37) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(15,307) !should map to REAL*8 on most modern processors CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 74838cf..7939644 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -397,6 +397,8 @@ CONTAINS h5_type = H5T_NATIVE_FLOAT_128 #endif #endif + ELSE + h5_type = -1 ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index c8fcf31..dbbf43b 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -33,3 +33,6 @@ ! Define if INTEGER*16 is available #undef HAVE_Fortran_INTEGER_SIZEOF_16 +! Maximum decimal precision for C +#undef PAC_C_MAX_REAL_PRECISION + diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 366e3da..c22f423 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -163,6 +163,7 @@ int main(void) int H5_FORTRAN_NUM_INTEGER_KINDS; int H5_FORTRAN_NUM_REAL_KINDS; + int found_long_double = 0; /* Open target files */ c_header = fopen(CFILE, "w"); @@ -206,7 +207,6 @@ int main(void) /* (b) Define c_float_x */ - int found_long_double = 0; for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { if (sizeof(float) == RealKinds_SizeOf[i]) { @@ -551,12 +551,12 @@ int main(void) fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 ); - /* Close files */ endCfile(); endFfile(); fclose(c_header); fclose(fort_header); + return 0; } diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 54f2065..0abfb53 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -562,6 +562,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 431c42a..6478b50 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -573,6 +573,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 9aaaa73..d845f73 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -213,8 +213,10 @@ CONTAINS CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) CALL check("h5tget_size_f", error, total_error) + PRINT*,H5T_NATIVE_DOUBLE CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) CALL check("h5tget_size_f", error, total_error) + stop CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error) CALL check("h5tget_size_f", error, total_error) !write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index ee9f2f2..995243f 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -994,10 +994,25 @@ END SUBROUTINE test_array_compound_atomic INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors +! Check if C has quad precision extension #if H5_HAVE_FLOAT128!=0 +! Check if Fortran supports quad precision +# if H5_PAC_FC_MAX_REAL_PRECISION > 26 INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif #else - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(17) +! Check if the default of long double is quad precision +# if H5_PAC_C_MAX_REAL_PRECISION > 26 +# if H5_PAC_FC_MAX_REAL_PRECISION > 26 + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif #endif REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 INTEGER(HID_T) :: dset_idr16 ! Dataset identifier diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 6c81b76..79db2dc 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/Makefile.in b/hl/Makefile.in index e1f7ed5..a178fc1 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 68a8868..08e1fff 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index c19b82a..3eb154a 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index ea6449e..88056fd 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -516,6 +516,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 2188d62..dc4e8a2 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 891d82f..602cd7c 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 81194a5..08cf1d8 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 8803e1e..72f00da 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index c1ca6be..3216b0a 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -3568,7 +3568,7 @@ CONTAINS #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else - SizeOf_buf_type = SIZEOF((buf(1)(1:1)) + SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) #endif namelen = LEN(dset_name) diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index a06331c..35886b6 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -537,6 +537,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index fa3a803..18fdaf3 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -39,10 +39,10 @@ check_PROGRAMS=$(TEST_PROG) LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES=tstds.f90 -tstlite_SOURCES=tstlite.f90 -tstimage_SOURCES=tstimage.f90 -tsttable_SOURCES=tsttable.f90 +tstds_SOURCES=tstds.F90 +tstlite_SOURCES=tstlite.F90 +tstimage_SOURCES=tstimage.F90 +tsttable_SOURCES=tsttable.F90 # Temporary files. CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f1tab.h5 tstds.h5 diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index be12387..6389d6b 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -151,13 +151,16 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = FCLD = $(FC) FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ @@ -525,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ @@ -685,10 +689,10 @@ TEST_PROG = tstds tstlite tstimage tsttable LDADD = $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES = tstds.f90 -tstlite_SOURCES = tstlite.f90 -tstimage_SOURCES = tstimage.f90 -tsttable_SOURCES = tsttable.f90 +tstds_SOURCES = tstds.F90 +tstlite_SOURCES = tstlite.F90 +tstimage_SOURCES = tstimage.F90 +tsttable_SOURCES = tsttable.F90 # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) @@ -716,7 +720,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -780,14 +784,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo diff --git a/hl/fortran/test/tstds.F90 b/hl/fortran/test/tstds.F90 new file mode 100644 index 0000000..cbf6c38 --- /dev/null +++ b/hl/fortran/test/tstds.F90 @@ -0,0 +1,353 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +PROGRAM test_ds + + IMPLICIT NONE + + INTEGER :: err + + CALL test_testds(err) + + IF(err.LT.0)THEN + WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" + ENDIF + +END PROGRAM test_ds + +SUBROUTINE test_testds(err) + + USE HDF5 + USE H5LT + USE H5DS + + IMPLICIT NONE + + INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset + INTEGER, PARAMETER :: DIM_DATA = 12 + INTEGER, PARAMETER :: DIM1_SIZE = 3 + INTEGER, PARAMETER :: DIM2_SIZE = 4 + INTEGER, PARAMETER :: DIM1 = 1 + INTEGER, PARAMETER :: DIM2 = 2 + INTEGER, PARAMETER :: FAILED = -1 + + CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" + CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" + + + INTEGER(hid_t) :: fid ! file ID + INTEGER(hid_t) :: did ! dataset ID + INTEGER(hid_t) :: dsid ! DS dataset ID + INTEGER :: rankds = 1 ! rank of DS dataset + INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset + INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset + REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset + INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset + INTEGER :: err + INTEGER :: num_scales + INTEGER(size_t) :: name_len + CHARACTER(LEN=80) :: name + INTEGER(size_t) :: label_len + CHARACTER(LEN=80) :: label + LOGICAL :: is_attached, is_scale + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(err) + IF(err.LT.0) RETURN + + ! create a file using default properties + CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) + IF(err.LT.0) RETURN + + ! make a dataset + CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the first dimension + CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the second dimension + CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Attaching Dimension Scale ') + + ! get the dataset id for DSET_NAME + CALL H5Dopen_f(fid, DSET_NAME, did, err) + IF(err.LT.0) RETURN + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! check attaching to a non-existent dimension; should fail + CALL H5DSattach_scale_f(did, dsid, 20, err) + IF(err.NE.-1) THEN + err = FAILED ! should fail, mark as an error + CALL write_test_status(err) + RETURN + ENDIF + + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 + CALL H5DSattach_scale_f(did, dsid, DIM1, err) + IF(err.EQ.-1) THEN + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale Attached ') + + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.EQ.-1.OR..NOT.is_attached) THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Check to see how many Dimension Scales are attached + + CALL test_begin(' Test Getting Number Dimension Scales ') + + CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) + IF(err.LT.0.OR.num_scales.NE.1)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test Detaching Dimension Scale ') + + ! Detach scale + CALL H5DSdetach_scale_f(did, dsid, DIM1, err) + IF(err.LT.0) RETURN + + ! Check to see if a dimension scale is attached, should be .false. + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + !------------------------------------------------------------------------- + ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Setting Dimension Scale ') + + CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale ') + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Get scale name; test to large character buffer + + CALL test_begin(' Test Getting Dimension Scale By Name ') + + name_len = 25 + name = '' + CALL H5DSget_scale_name_f(dsid, name, name_len, err) + IF(err.LT.0 .OR. & + name_len.NE.21 .OR. & + TRIM(name).NE."Dimension Scale Set 1" .OR. & + name(22:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test exact size character buffer + name_len = 21 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test to small character buffer + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_2_NAME dimension scale to DSET_NAME + !------------------------------------------------------------------------- + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) + CALL H5DSattach_scale_f(did, dsid, DIM2, err) + IF(err.LT.0) RETURN + + CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) + IF(err.LT.0) RETURN + + ! test sending no Dimension Scale name + + CALL H5DSset_scale_f(dsid, err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name when there is no scale name + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + CALL write_test_status(err) + + CALL test_begin(' Test Setting Dimension Scale Label ') + + CALL H5DSset_label_f(did, DIM2, "Label12", err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to small + + label_len = 5 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is exact + + label_len = 7 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to big + + label_len = 25 + label = '' + CALL H5DSget_label_f(did, DIM2, label, label_len, err) + IF(err.LT.0.OR. & + label(1:label_len).NE."Label12" .OR. & + label_len.NE.7 .OR. & + label(8:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + ! close file + CALL H5Fclose_f(fid, err) + IF(err.LT.0) RETURN + +END SUBROUTINE test_testds + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed/failed +!------------------------------------------------------------------------- +SUBROUTINE write_test_status( test_result) + +! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, failed + ! 0 , passed + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + + error_string = failure + IF (test_result .EQ. 0) THEN + error_string = success + ENDIF + + WRITE(*, fmt = '(T34, A)') error_string + +END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstds.f90 b/hl/fortran/test/tstds.f90 deleted file mode 100644 index cbf6c38..0000000 --- a/hl/fortran/test/tstds.f90 +++ /dev/null @@ -1,353 +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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -PROGRAM test_ds - - IMPLICIT NONE - - INTEGER :: err - - CALL test_testds(err) - - IF(err.LT.0)THEN - WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" - ENDIF - -END PROGRAM test_ds - -SUBROUTINE test_testds(err) - - USE HDF5 - USE H5LT - USE H5DS - - IMPLICIT NONE - - INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset - INTEGER, PARAMETER :: DIM_DATA = 12 - INTEGER, PARAMETER :: DIM1_SIZE = 3 - INTEGER, PARAMETER :: DIM2_SIZE = 4 - INTEGER, PARAMETER :: DIM1 = 1 - INTEGER, PARAMETER :: DIM2 = 2 - INTEGER, PARAMETER :: FAILED = -1 - - CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" - CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" - - - INTEGER(hid_t) :: fid ! file ID - INTEGER(hid_t) :: did ! dataset ID - INTEGER(hid_t) :: dsid ! DS dataset ID - INTEGER :: rankds = 1 ! rank of DS dataset - INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset - INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset - REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset - INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset - INTEGER :: err - INTEGER :: num_scales - INTEGER(size_t) :: name_len - CHARACTER(LEN=80) :: name - INTEGER(size_t) :: label_len - CHARACTER(LEN=80) :: label - LOGICAL :: is_attached, is_scale - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(err) - IF(err.LT.0) RETURN - - ! create a file using default properties - CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) - IF(err.LT.0) RETURN - - ! make a dataset - CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the first dimension - CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the second dimension - CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Attaching Dimension Scale ') - - ! get the dataset id for DSET_NAME - CALL H5Dopen_f(fid, DSET_NAME, did, err) - IF(err.LT.0) RETURN - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! check attaching to a non-existent dimension; should fail - CALL H5DSattach_scale_f(did, dsid, 20, err) - IF(err.NE.-1) THEN - err = FAILED ! should fail, mark as an error - CALL write_test_status(err) - RETURN - ENDIF - - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 - CALL H5DSattach_scale_f(did, dsid, DIM1, err) - IF(err.EQ.-1) THEN - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale Attached ') - - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.EQ.-1.OR..NOT.is_attached) THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Check to see how many Dimension Scales are attached - - CALL test_begin(' Test Getting Number Dimension Scales ') - - CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) - IF(err.LT.0.OR.num_scales.NE.1)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test Detaching Dimension Scale ') - - ! Detach scale - CALL H5DSdetach_scale_f(did, dsid, DIM1, err) - IF(err.LT.0) RETURN - - ! Check to see if a dimension scale is attached, should be .false. - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - !------------------------------------------------------------------------- - ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Setting Dimension Scale ') - - CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale ') - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Get scale name; test to large character buffer - - CALL test_begin(' Test Getting Dimension Scale By Name ') - - name_len = 25 - name = '' - CALL H5DSget_scale_name_f(dsid, name, name_len, err) - IF(err.LT.0 .OR. & - name_len.NE.21 .OR. & - TRIM(name).NE."Dimension Scale Set 1" .OR. & - name(22:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test exact size character buffer - name_len = 21 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test to small character buffer - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_2_NAME dimension scale to DSET_NAME - !------------------------------------------------------------------------- - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) - CALL H5DSattach_scale_f(did, dsid, DIM2, err) - IF(err.LT.0) RETURN - - CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) - IF(err.LT.0) RETURN - - ! test sending no Dimension Scale name - - CALL H5DSset_scale_f(dsid, err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name when there is no scale name - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - CALL write_test_status(err) - - CALL test_begin(' Test Setting Dimension Scale Label ') - - CALL H5DSset_label_f(did, DIM2, "Label12", err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to small - - label_len = 5 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is exact - - label_len = 7 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to big - - label_len = 25 - label = '' - CALL H5DSget_label_f(did, DIM2, label, label_len, err) - IF(err.LT.0.OR. & - label(1:label_len).NE."Label12" .OR. & - label_len.NE.7 .OR. & - label(8:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - ! close file - CALL H5Fclose_f(fid, err) - IF(err.LT.0) RETURN - -END SUBROUTINE test_testds - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed/failed -!------------------------------------------------------------------------- -SUBROUTINE write_test_status( test_result) - -! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, failed - ! 0 , passed - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - - error_string = failure - IF (test_result .EQ. 0) THEN - error_string = success - ENDIF - - WRITE(*, fmt = '(T34, A)') error_string - -END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstimage.F90 b/hl/fortran/test/tstimage.F90 new file mode 100644 index 0000000..0bff6b2 --- /dev/null +++ b/hl/fortran/test/tstimage.F90 @@ -0,0 +1,339 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +program image_test + +call make_image1() + +end program image_test + + +!------------------------------------------------------------------------- +! make_image1 +!------------------------------------------------------------------------- + +subroutine make_image1() + +use h5im ! module of H5IM +use hdf5 ! module of HDF5 library + +implicit none + +character(len=8), parameter :: filename = "f1img.h5" ! file name +character(len=4), parameter :: dsetname1 = "img1" ! dataset name +character(len=4), parameter :: dsetname2 = "img2" ! dataset name +character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name +integer(hid_t) :: file_id ! file identifier +integer(hsize_t), parameter :: width = 500 ! width of image +integer(hsize_t), parameter :: height = 200 ! height of image +integer, parameter :: pal_entries = 9 ! palette number of entries +integer, dimension(width*height) :: buf1 ! data buffer +integer, dimension(width*height) :: bufr1 ! data buffer +integer, dimension(width*height*3) :: buf2 ! data buffer +integer, dimension(width*height*3) :: bufr2 ! data buffer +integer(hsize_t) :: widthr ! width of image +integer(hsize_t) :: heightr ! height of image +integer(hsize_t) :: planesr ! color planes +integer(hsize_t) :: npalsr ! palettes +character(len=15) :: interlacer ! interlace +integer :: errcode ! error flag +integer :: is_image ! error flag +integer :: i, j, n ! general purpose integers +! +! palette +! create a 9 entry palette +! +character(len=4), parameter :: pal_name = "pal1" ! dataset name +integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions +integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions +integer, dimension(pal_entries*3) :: pal_data_out ! data buffer +integer(hsize_t) :: npals ! number of palettes +integer :: pal_number ! palette number +integer :: is_palette ! is palette +integer :: space +integer, dimension(pal_entries*3) :: pal_data_in = (/& + 0,0,168,& ! dark blue + 0,0,252,& ! blue + 0,168,252,& ! ocean blue + 84,252,252,& ! light blue + 168,252,168,& ! light green + 0,252,168,& ! green + 252,252,84,& ! yellow + 252,168,0,& ! orange + 252,0,0/) ! red + + +! create an 8bit image of 9 values divided evenly by the array +! +space = width*height / pal_entries; +n = 0; j = 0; +do i = 1, width*height + buf1(i) = n + if ( j > space ) then + n = n + 1; + j = 0; + endif + if (n>pal_entries-1) n=0; + j = j +1; +end do + +! +! create a 3 byte rgb image +! +n = 0; j = 0; +do i = 1, width*height*3 + buf2(i) = n; + if (j == 3) then + n = n + 1; + j = 0; + endif + if (n>255) n=0; + j = j +1; +end do + + +! Initialize FORTRAN predefined datatypes. +! +call h5open_f(errcode) +! +! Create a new file using default properties. +! +call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! indexed image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 8bit ') + +! +! write image. +! +call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) +! +! read image. +! +call h5imread_image_f(file_id,dsetname1,bufr1,errcode) +! +! compare read and write buffers. +! +do i = 1, width*height + if ( buf1(i) /= bufr1(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr1(i), ' and ', buf1(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname1) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + +call passed() + +!------------------------------------------------------------------------- +! true color image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 24bit ') + +! +! write image. +! +call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) + +! +! read image. +! +call h5imread_image_f(file_id,dsetname2,bufr2,errcode) + +! +! compare read and write buffers. +! +do i = 1, width*height*3 + if ( buf2(i) /= bufr2(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr2(i), ' and ', buf2(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname2) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + + +call passed() + +!------------------------------------------------------------------------- +! palette +!------------------------------------------------------------------------- + +call test_begin(' Make palette ') + +! +! make palette. +! +call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) + +call passed() + + +call test_begin(' Link/Unlink palette ') + +! +! link palette. +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + + +! +! read palette. +! +pal_number = 0 +call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) + +! +! compare read and write buffers. +! +do i = 1, pal_entries*3 + if ( pal_data_in(i) /= pal_data_out(i) ) then + print *, 'read buffer differs from write buffer' + print *, pal_data_in(i), ' and ', pal_data_out(i) + stop + endif +end do + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) + +if ( npals /= 1) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + +! +! get palette info +! +pal_number = 0 +call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) + +if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then + print *, 'h5imget_palette_info_f bad value' + stop +endif + +! +! is palette +! +is_palette = h5imis_palette_f(file_id,pal_name) + +if ( is_palette /= 1 ) then + print *, 'h5imis_palette_f bad value' + stop +endif + +! +! unlink palette. +! +call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) + +if ( npals /= 0) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + + +! +! link palette again +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + +call passed() + + +!------------------------------------------------------------------------- +! end +!------------------------------------------------------------------------- + +! +! Close the file. +! +call h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +call h5close_f(errcode) + +! +! end function. +! +end subroutine make_image1 + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +subroutine test_begin(string) +character(len=*), intent(in) :: string +write(*, fmt = '(14a)', advance = 'no') string +write(*, fmt = '(40x,a)', advance = 'no') ' ' +end subroutine test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +subroutine passed() +write(*, fmt = '(6a)') 'PASSED' +end subroutine passed diff --git a/hl/fortran/test/tstimage.f90 b/hl/fortran/test/tstimage.f90 deleted file mode 100644 index 0bff6b2..0000000 --- a/hl/fortran/test/tstimage.f90 +++ /dev/null @@ -1,339 +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 file contains the FORTRAN90 tests for H5LT -! - -program image_test - -call make_image1() - -end program image_test - - -!------------------------------------------------------------------------- -! make_image1 -!------------------------------------------------------------------------- - -subroutine make_image1() - -use h5im ! module of H5IM -use hdf5 ! module of HDF5 library - -implicit none - -character(len=8), parameter :: filename = "f1img.h5" ! file name -character(len=4), parameter :: dsetname1 = "img1" ! dataset name -character(len=4), parameter :: dsetname2 = "img2" ! dataset name -character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name -integer(hid_t) :: file_id ! file identifier -integer(hsize_t), parameter :: width = 500 ! width of image -integer(hsize_t), parameter :: height = 200 ! height of image -integer, parameter :: pal_entries = 9 ! palette number of entries -integer, dimension(width*height) :: buf1 ! data buffer -integer, dimension(width*height) :: bufr1 ! data buffer -integer, dimension(width*height*3) :: buf2 ! data buffer -integer, dimension(width*height*3) :: bufr2 ! data buffer -integer(hsize_t) :: widthr ! width of image -integer(hsize_t) :: heightr ! height of image -integer(hsize_t) :: planesr ! color planes -integer(hsize_t) :: npalsr ! palettes -character(len=15) :: interlacer ! interlace -integer :: errcode ! error flag -integer :: is_image ! error flag -integer :: i, j, n ! general purpose integers -! -! palette -! create a 9 entry palette -! -character(len=4), parameter :: pal_name = "pal1" ! dataset name -integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions -integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions -integer, dimension(pal_entries*3) :: pal_data_out ! data buffer -integer(hsize_t) :: npals ! number of palettes -integer :: pal_number ! palette number -integer :: is_palette ! is palette -integer :: space -integer, dimension(pal_entries*3) :: pal_data_in = (/& - 0,0,168,& ! dark blue - 0,0,252,& ! blue - 0,168,252,& ! ocean blue - 84,252,252,& ! light blue - 168,252,168,& ! light green - 0,252,168,& ! green - 252,252,84,& ! yellow - 252,168,0,& ! orange - 252,0,0/) ! red - - -! create an 8bit image of 9 values divided evenly by the array -! -space = width*height / pal_entries; -n = 0; j = 0; -do i = 1, width*height - buf1(i) = n - if ( j > space ) then - n = n + 1; - j = 0; - endif - if (n>pal_entries-1) n=0; - j = j +1; -end do - -! -! create a 3 byte rgb image -! -n = 0; j = 0; -do i = 1, width*height*3 - buf2(i) = n; - if (j == 3) then - n = n + 1; - j = 0; - endif - if (n>255) n=0; - j = j +1; -end do - - -! Initialize FORTRAN predefined datatypes. -! -call h5open_f(errcode) -! -! Create a new file using default properties. -! -call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! indexed image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 8bit ') - -! -! write image. -! -call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) -! -! read image. -! -call h5imread_image_f(file_id,dsetname1,bufr1,errcode) -! -! compare read and write buffers. -! -do i = 1, width*height - if ( buf1(i) /= bufr1(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr1(i), ' and ', buf1(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname1) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - -call passed() - -!------------------------------------------------------------------------- -! true color image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 24bit ') - -! -! write image. -! -call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) - -! -! read image. -! -call h5imread_image_f(file_id,dsetname2,bufr2,errcode) - -! -! compare read and write buffers. -! -do i = 1, width*height*3 - if ( buf2(i) /= bufr2(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr2(i), ' and ', buf2(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname2) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - - -call passed() - -!------------------------------------------------------------------------- -! palette -!------------------------------------------------------------------------- - -call test_begin(' Make palette ') - -! -! make palette. -! -call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) - -call passed() - - -call test_begin(' Link/Unlink palette ') - -! -! link palette. -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - - -! -! read palette. -! -pal_number = 0 -call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) - -! -! compare read and write buffers. -! -do i = 1, pal_entries*3 - if ( pal_data_in(i) /= pal_data_out(i) ) then - print *, 'read buffer differs from write buffer' - print *, pal_data_in(i), ' and ', pal_data_out(i) - stop - endif -end do - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) - -if ( npals /= 1) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - -! -! get palette info -! -pal_number = 0 -call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) - -if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then - print *, 'h5imget_palette_info_f bad value' - stop -endif - -! -! is palette -! -is_palette = h5imis_palette_f(file_id,pal_name) - -if ( is_palette /= 1 ) then - print *, 'h5imis_palette_f bad value' - stop -endif - -! -! unlink palette. -! -call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) - -if ( npals /= 0) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - - -! -! link palette again -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - -call passed() - - -!------------------------------------------------------------------------- -! end -!------------------------------------------------------------------------- - -! -! Close the file. -! -call h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -call h5close_f(errcode) - -! -! end function. -! -end subroutine make_image1 - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -subroutine test_begin(string) -character(len=*), intent(in) :: string -write(*, fmt = '(14a)', advance = 'no') string -write(*, fmt = '(40x,a)', advance = 'no') ' ' -end subroutine test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -subroutine passed() -write(*, fmt = '(6a)') 'PASSED' -end subroutine passed diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 new file mode 100644 index 0000000..26e9467 --- /dev/null +++ b/hl/fortran/test/tstlite.F90 @@ -0,0 +1,1715 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! +#include + +PROGRAM lite_test + + CALL test_dataset1D() + CALL test_dataset2D() + CALL test_dataset3D() + CALL test_datasetND(4) + CALL test_datasetND(5) + CALL test_datasetND(6) + CALL test_datasetND(7) + CALL test_datasets() + CALL test_attributes() + +END PROGRAM lite_test + + +!------------------------------------------------------------------------- +! test_dataset1D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset1D() + +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array +CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions +INTEGER :: rank = 1 ! Dataset rank +INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer +INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer +REAL, DIMENSION(DIM1) :: buf2 ! Data buffer +REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER :: i ! general purpose integer +TYPE(C_PTR) :: f_ptr +integer(HID_T) :: mytype + +CALL test_begin(' Make/Read datasets (1D) ') + +! +! Initialize the data array. +! +DO i = 1, DIM1 + buf1(i) = i; + buf2(i) = i; + buf3(i) = i; +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INTEGER +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf1(i) .NE. bufr1(i) ) THEN + PRINT *, 'read buffer differs from write buffer (I)' + PRINT *, bufr1(i), ' and ', buf1(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer (R)' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1)) +mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & + mytype, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) +! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +! +! read dataset. +! +f_ptr = C_LOC(bufr3(1)) +CALL h5ltread_dataset_f(file_id, dsetname3, & + h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer (D)' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset1D + +!------------------------------------------------------------------------- +! test_dataset2D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset2D() + +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + + +INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns +INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows +CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions +INTEGER :: rank = 2 ! Dataset rank +INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, n ! general purpose integers +TYPE(C_PTR) :: f_ptr + +CALL test_begin(' Make/Read datasets (2D) ') + + +! +! Initialize the data arrays. +! +n=1 +DO i = 1, DIM1*DIM2 + buf(i) = INT(n) + n = n + 1 +END DO + +DO i = 1, dims(1) + DO j = 1, dims(2) + buf2(i,j) = INT((i-1)*dims(2) + j) + buf3(i,j) = INT((i-1)*dims(2) + j) + buf4(i,j) = INT((i-1)*dims(2) + j) + END DO +END DO + + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 2D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j), ' and ', buf2(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf3r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j), ' and ', buf3(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf4(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) + +! +! read dataset. +f_ptr = C_LOC(buf4r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j), ' and ', buf4(i,j) + STOP + ENDIF + END DO +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset2D + + +!------------------------------------------------------------------------- +! test_dataset3D +!------------------------------------------------------------------------- + + +SUBROUTINE test_dataset3D() +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 6 ! columns +INTEGER, PARAMETER :: DIM2 = 4 ! rows +INTEGER, PARAMETER :: DIM3 = 2 ! layers +CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions +INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer +INTEGER :: rank = 3 ! Dataset rank +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers +INTEGER :: type_class +INTEGER(SIZE_T) :: type_size +TYPE(C_PTR) :: f_ptr +CALL test_begin(' Make/Read datasets (3D) ') + + +! +! Initialize the data array. +! +n=1 +DO i = 1, DIM1*DIM2*DIM3 + buf(i) = INT(n) + n = n + 1 +END DO + +n = 1 +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + buf2(i,j,k) = INT(n) + buf3(i,j,k) = INT(n) + buf4(i,j,k) = INT(n) + n = n + 1 + END DO + END DO +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2*DIM3 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 3D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf3r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf4(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf4r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + +! +! compare dimensions +! +DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset3D + +!------------------------------------------------------------------------- +! test_datasetND +!------------------------------------------------------------------------- + + +SUBROUTINE test_datasetND(rank) + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + INTEGER :: rank ! Dataset rank + + INTEGER, PARAMETER :: DIM1 = 2 ! columns + INTEGER, PARAMETER :: DIM2 = 4 ! rows + INTEGER, PARAMETER :: DIM3 = 2 ! layers + INTEGER, PARAMETER :: DIM4 = 5 ! columns + INTEGER, PARAMETER :: DIM5 = 4 ! rows + INTEGER, PARAMETER :: DIM6 = 3 ! layers + INTEGER, PARAMETER :: DIM7 = 2 ! layers + CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(7) :: dims + INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibuf_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibufr_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + CHARACTER(LEN=1) :: ichr1 + TYPE(C_PTR) :: f_ptr + + WRITE(ichr1,'(I1.1)') rank + CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') +! +! Initialize the data array. +! + IF(rank.EQ.4)THEN + + ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + ibuf_4(i,j,k,l) = INT(nn) + rbuf_4(i,j,k,l) = INT(nn) + dbuf_4(i,j,k,l) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + + ELSE IF(rank.EQ.5)THEN + + ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + ibuf_5(i,j,k,l,m) = INT(nn) + rbuf_5(i,j,k,l,m) = INT(nn) + dbuf_5(i,j,k,l,m) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + + ELSE IF(rank.EQ.6)THEN + + ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + ibuf_6(i,j,k,l,m,n) = INT(nn) + rbuf_6(i,j,k,l,m,n) = INT(nn) + dbuf_6(i,j,k,l,m,n) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + + ELSE IF(rank.EQ.7)THEN + + ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + DO o = 1, DIM7 + ibuf_7(i,j,k,l,m,n,o) = INT(nn) + rbuf_7(i,j,k,l,m,n,o) = INT(nn) + dbuf_7(i,j,k,l,m,n,o) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + ENDDO + + ENDIF + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT ND buffer + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(ibuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(rbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(rbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(dbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(dbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! DEALLOCATE RESOURCES + + IF(rank.EQ.4)THEN + DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) + ELSE IF(rank.EQ.5)THEN + DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) + ELSE IF(rank.EQ.6)THEN + DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) + ELSE IF(rank.EQ.7)THEN + DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) + ENDIF + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasetND + + + +!------------------------------------------------------------------------- +! test_datasets +!------------------------------------------------------------------------- + +SUBROUTINE test_datasets() + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER :: errcode ! Error flag + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + INTEGER :: rankr ! Dataset rank + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=8) :: buf1r ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer + INTEGER :: i, n ! general purpose integer + INTEGER :: has ! general purpose integer + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + LOGICAL :: path_valid ! status of the path + CHARACTER(LEN=6) :: chr_exact + CHARACTER(LEN=8) :: chr_lg + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + ! + ! Initialize the data array. + ! + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (integer) ') + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! real + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (float) ') + + + ! + ! write dataset. + ! + f_ptr = C_LOC(buf3(1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) + + ! + ! read dataset. + ! + f_ptr = C_LOC(bufr3(1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (double) ') + + + ! + ! write dataset. + ! + f_ptr = C_LOC(buf4(1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + + ! + ! read dataset. + ! + !!!f_ptr = C_LOC(buf4(1)) MSB + !!!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) MSB + CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (string) ') + + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. buf1r ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', buf1r + STOP + ENDIF + + CALL passed() + + CALL test_begin(' Test h5ltpath_valid_f ') + ! + ! test function h5ltpath_valid_f + ! + chr_exact = "/"//dsetname2 ! test character buffer the exact size needed + CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + chr_lg = "/"//dsetname2 ! test character buffer larger then needed + CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dataset does not exist + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Create a dangling soft link + CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) + + ! Should pass, does not check for dangled link + CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) + IF(.NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dangled link + CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) + IF(path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL passed() + + + CALL test_begin(' Get dataset dimensions/info ') + + !------------------------------------------------------------------------- + ! h5ltget_dataset_ndims_f + !------------------------------------------------------------------------- + + CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) + IF ( rankr .NE. rank ) THEN + PRINT *, 'h5ltget_dataset_ndims_f return error' + STOP + ENDIF + + + !------------------------------------------------------------------------- + ! test h5ltfind_dataset_f function + !------------------------------------------------------------------------- + + + has = h5ltfind_dataset_f(file_id,dsetname4) + IF ( has .NE. 1 ) THEN + PRINT *, 'h5ltfind_dataset_f return error' + STOP + ENDIF + + !------------------------------------------------------------------------- + ! test h5ltget_dataset_info_f function + !------------------------------------------------------------------------- + + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT + PRINT *, 'wrong type class ' + STOP + ENDIF + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasets + + + +!------------------------------------------------------------------------- +! test_attributes +!------------------------------------------------------------------------- + +SUBROUTINE test_attributes() + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name + CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file + INTEGER(HID_T) :: file_id ! File identifier +! INTEGER(HID_T) :: file_id1 + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" + CHARACTER(LEN=8) :: bufr1 ! Data buffer + CHARACTER(LEN=10) :: bufr1_lg ! Data buffer +! CHARACTER(LEN=16) :: bufr_c ! Data buffer +! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer + REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER :: i, n ! general purpose integer + INTEGER(SIZE_T) size ! size of attribute array + INTEGER :: rankr ! rank + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER, DIMENSION(DIM1) :: buf ! Data buffer + INTEGER(SIZE_T) :: SizeOf_buf_type + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + ! + ! make a dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) + + ! + ! Initialize the data array. + ! + size = DIM1 + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes int ') + + + ! + ! write attribute. + ! + CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) + + ! + ! read attribute. + ! + CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! float + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes float ') + + + ! + ! write attribute. + ! +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf3(1)) +#endif + f_ptr = C_LOC(buf3(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) + !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) + ! + ! read attribute. + ! +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(bufr3(1)) +#endif + + f_ptr = C_LOC(bufr3(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) + !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes double ') + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf4(1)) +#endif + ! + ! write attribute. + ! + f_ptr = C_LOC(buf4(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) + + !CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,f_ptr,"Real", SizeOf_buf_type, size, errcode) + + ! + ! read attribute. + ! + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(bufr4(1)) +#endif + + f_ptr = C_LOC(bufr4(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) + +! CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes string ') + + ! + ! write attribute. + ! + CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) + + ! + ! read attribute into a fortran character buf that is the same size as buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. bufr1 ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1 + STOP + ENDIF + + ! + ! read attribute into a fortran character buf that is larger then buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) + + ! + ! compare read and write buffers, make sure C NULL character was removed. + ! + IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN + PRINT *, 'larger read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1_lg + STOP + ENDIF + + ! + ! ** Test reading a string that was created with a C program ** + ! + +!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) +!!$ +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) +!!$ ! +!!$ ! compare read and write buffers. +!!$ ! +!!$ IF ( bufr_c .NE. buf_c ) THEN +!!$ PRINT *, 'read buffer differs from write buffer' +!!$ PRINT *, bufr1, ' and ', buf_c +!!$ STOP +!!$ ENDIF +!!$ ! +!!$ ! read attribute into a fortran character buf that is larger then buf_c. +!!$ ! +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) +!!$ +!!$ ! +!!$ ! compare read and write buffers, make sure C NULL character was removed. +!!$ ! +!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN +!!$ PRINT *, 'larger read buffer differs from write buffer' +!!$ PRINT *, buf_c, ' and ', bufr_c_lg +!!$ STOP +!!$ ENDIF + +!!$ CALL h5fclose_f(file_id1, errcode) + + CALL passed() + + !------------------------------------------------------------------------- + ! get attribute rank + !------------------------------------------------------------------------- + + CALL test_begin(' Get attribute rank/info ') + + + CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) + + IF ( rankr .NE. 1 ) THEN + PRINT *, 'h5ltget_attribute_ndims_f return error' + STOP + ENDIF + + + CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_attributes + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 deleted file mode 100644 index da44eb7..0000000 --- a/hl/fortran/test/tstlite.f90 +++ /dev/null @@ -1,1711 +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 file contains the FORTRAN90 tests for H5LT -! - -PROGRAM lite_test - - CALL test_dataset1D() - CALL test_dataset2D() - CALL test_dataset3D() - CALL test_datasetND(4) - CALL test_datasetND(5) - CALL test_datasetND(6) - CALL test_datasetND(7) - CALL test_datasets() - CALL test_attributes() - -END PROGRAM lite_test - - -!------------------------------------------------------------------------- -! test_dataset1D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset1D() - -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array -CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions -INTEGER :: rank = 1 ! Dataset rank -INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer -INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer -REAL, DIMENSION(DIM1) :: buf2 ! Data buffer -REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER :: i ! general purpose integer -TYPE(C_PTR) :: f_ptr -integer(HID_T) :: mytype - -CALL test_begin(' Make/Read datasets (1D) ') - -! -! Initialize the data array. -! -DO i = 1, DIM1 - buf1(i) = i; - buf2(i) = i; - buf3(i) = i; -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INTEGER -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer (I)' - PRINT *, bufr1(i), ' and ', buf1(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer (R)' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1)) -mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & - mytype, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) -! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -! -! read dataset. -! -f_ptr = C_LOC(bufr3(1)) -CALL h5ltread_dataset_f(file_id, dsetname3, & - h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer (D)' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset1D - -!------------------------------------------------------------------------- -! test_dataset2D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset2D() - -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - - -INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns -INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows -CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions -INTEGER :: rank = 2 ! Dataset rank -INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, n ! general purpose integers -TYPE(C_PTR) :: f_ptr - -CALL test_begin(' Make/Read datasets (2D) ') - - -! -! Initialize the data arrays. -! -n=1 -DO i = 1, DIM1*DIM2 - buf(i) = INT(n) - n = n + 1 -END DO - -DO i = 1, dims(1) - DO j = 1, dims(2) - buf2(i,j) = INT((i-1)*dims(2) + j) - buf3(i,j) = INT((i-1)*dims(2) + j) - buf4(i,j) = INT((i-1)*dims(2) + j) - END DO -END DO - - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 2D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j), ' and ', buf2(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j), ' and ', buf3(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) - -! -! read dataset. -f_ptr = C_LOC(buf4r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j), ' and ', buf4(i,j) - STOP - ENDIF - END DO -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset2D - - -!------------------------------------------------------------------------- -! test_dataset3D -!------------------------------------------------------------------------- - - -SUBROUTINE test_dataset3D() -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 6 ! columns -INTEGER, PARAMETER :: DIM2 = 4 ! rows -INTEGER, PARAMETER :: DIM3 = 2 ! layers -CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions -INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer -INTEGER :: rank = 3 ! Dataset rank -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers -INTEGER :: type_class -INTEGER(SIZE_T) :: type_size -TYPE(C_PTR) :: f_ptr -CALL test_begin(' Make/Read datasets (3D) ') - - -! -! Initialize the data array. -! -n=1 -DO i = 1, DIM1*DIM2*DIM3 - buf(i) = INT(n) - n = n + 1 -END DO - -n = 1 -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - buf2(i,j,k) = INT(n) - buf3(i,j,k) = INT(n) - buf4(i,j,k) = INT(n) - n = n + 1 - END DO - END DO -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2*DIM3 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 3D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf4r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - -! -! compare dimensions -! -DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset3D - -!------------------------------------------------------------------------- -! test_datasetND -!------------------------------------------------------------------------- - - -SUBROUTINE test_datasetND(rank) - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - INTEGER :: rank ! Dataset rank - - INTEGER, PARAMETER :: DIM1 = 2 ! columns - INTEGER, PARAMETER :: DIM2 = 4 ! rows - INTEGER, PARAMETER :: DIM3 = 2 ! layers - INTEGER, PARAMETER :: DIM4 = 5 ! columns - INTEGER, PARAMETER :: DIM5 = 4 ! rows - INTEGER, PARAMETER :: DIM6 = 3 ! layers - INTEGER, PARAMETER :: DIM7 = 2 ! layers - CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), DIMENSION(7) :: dims - INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibuf_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibufr_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - CHARACTER(LEN=1) :: ichr1 - TYPE(C_PTR) :: f_ptr - - WRITE(ichr1,'(I1.1)') rank - CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') -! -! Initialize the data array. -! - IF(rank.EQ.4)THEN - - ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - ibuf_4(i,j,k,l) = INT(nn) - rbuf_4(i,j,k,l) = INT(nn) - dbuf_4(i,j,k,l) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - - ELSE IF(rank.EQ.5)THEN - - ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - ibuf_5(i,j,k,l,m) = INT(nn) - rbuf_5(i,j,k,l,m) = INT(nn) - dbuf_5(i,j,k,l,m) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - - ELSE IF(rank.EQ.6)THEN - - ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - ibuf_6(i,j,k,l,m,n) = INT(nn) - rbuf_6(i,j,k,l,m,n) = INT(nn) - dbuf_6(i,j,k,l,m,n) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - - ELSE IF(rank.EQ.7)THEN - - ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - DO o = 1, DIM7 - ibuf_7(i,j,k,l,m,n,o) = INT(nn) - rbuf_7(i,j,k,l,m,n,o) = INT(nn) - dbuf_7(i,j,k,l,m,n,o) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - ENDDO - - ENDIF - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - !------------------------------------------------------------------------- - ! H5T_NATIVE_INT ND buffer - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(ibuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - !------------------------------------------------------------------------- - ! H5T_NATIVE_REAL - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(rbuf_4(1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(rbufr_4(1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - !------------------------------------------------------------------------- - ! H5T_NATIVE_DOUBLE - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(dbuf_4(1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(dbufr_4(1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! DEALLOCATE RESOURCES - - IF(rank.EQ.4)THEN - DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) - ELSE IF(rank.EQ.5)THEN - DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) - ELSE IF(rank.EQ.6)THEN - DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) - ELSE IF(rank.EQ.7)THEN - DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) - ENDIF - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasetND - - - -!------------------------------------------------------------------------- -! test_datasets -!------------------------------------------------------------------------- - -SUBROUTINE test_datasets() - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER :: errcode ! Error flag - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - INTEGER :: rankr ! Dataset rank - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=8) :: buf1r ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer - INTEGER :: i, n ! general purpose integer - INTEGER :: has ! general purpose integer - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - LOGICAL :: path_valid ! status of the path - CHARACTER(LEN=6) :: chr_exact - CHARACTER(LEN=8) :: chr_lg - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - ! - ! Initialize the data array. - ! - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (integer) ') - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! real - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (float) ') - - - ! - ! write dataset. - ! - f_ptr = C_LOC(buf3(1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) - - ! - ! read dataset. - ! - f_ptr = C_LOC(bufr3(1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (double) ') - - - ! - ! write dataset. - ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) - !CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) - - ! - ! read dataset. - ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - !CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (string) ') - - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. buf1r ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', buf1r - STOP - ENDIF - - CALL passed() - - CALL test_begin(' Test h5ltpath_valid_f ') - ! - ! test function h5ltpath_valid_f - ! - chr_exact = "/"//dsetname2 ! test character buffer the exact size needed - CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - chr_lg = "/"//dsetname2 ! test character buffer larger then needed - CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dataset does not exist - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Create a dangling soft link - CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) - - ! Should pass, does not check for dangled link - CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) - IF(.NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dangled link - CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) - IF(path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL passed() - - - CALL test_begin(' Get dataset dimensions/info ') - - !------------------------------------------------------------------------- - ! h5ltget_dataset_ndims_f - !------------------------------------------------------------------------- - - CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) - IF ( rankr .NE. rank ) THEN - PRINT *, 'h5ltget_dataset_ndims_f return error' - STOP - ENDIF - - - !------------------------------------------------------------------------- - ! test h5ltfind_dataset_f function - !------------------------------------------------------------------------- - - - has = h5ltfind_dataset_f(file_id,dsetname4) - IF ( has .NE. 1 ) THEN - PRINT *, 'h5ltfind_dataset_f return error' - STOP - ENDIF - - !------------------------------------------------------------------------- - ! test h5ltget_dataset_info_f function - !------------------------------------------------------------------------- - - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT - PRINT *, 'wrong type class ' - STOP - ENDIF - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasets - - - -!------------------------------------------------------------------------- -! test_attributes -!------------------------------------------------------------------------- - -SUBROUTINE test_attributes() - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name - CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file - INTEGER(HID_T) :: file_id ! File identifier -! INTEGER(HID_T) :: file_id1 - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" - CHARACTER(LEN=8) :: bufr1 ! Data buffer - CHARACTER(LEN=10) :: bufr1_lg ! Data buffer -! CHARACTER(LEN=16) :: bufr_c ! Data buffer -! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer - REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER :: i, n ! general purpose integer - INTEGER(SIZE_T) size ! size of attribute array - INTEGER :: rankr ! rank - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER, DIMENSION(DIM1) :: buf ! Data buffer - INTEGER(SIZE_T) :: SizeOf_buf_type - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - ! - ! make a dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) - - ! - ! Initialize the data array. - ! - size = DIM1 - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes int ') - - - ! - ! write attribute. - ! - CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) - - ! - ! read attribute. - ! - CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! float - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes float ') - - - ! - ! write attribute. - ! -!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -!#else -! SizeOf_buf_type = SIZEOF(bufr4(1)) -!#endif - f_ptr = C_LOC(buf3(1)) - CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) - !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) - ! - ! read attribute. - ! -!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -!#else -! SizeOf_buf_type = SIZEOF(bufr4(1)) -!#endif - - f_ptr = C_LOC(bufr3(1)) - CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) - !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes double ') - - SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) - - ! - ! write attribute. - ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) - - !CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,f_ptr,"Real", SizeOf_buf_type, size, errcode) - - ! - ! read attribute. - ! - -!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -!#else -! SizeOf_buf_type = SIZEOF(bufr4(1)) -!#endif - - f_ptr = C_LOC(bufr4(1)) - CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) - -! CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes string ') - - ! - ! write attribute. - ! - CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) - - ! - ! read attribute into a fortran character buf that is the same size as buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. bufr1 ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1 - STOP - ENDIF - - ! - ! read attribute into a fortran character buf that is larger then buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) - - ! - ! compare read and write buffers, make sure C NULL character was removed. - ! - IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN - PRINT *, 'larger read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1_lg - STOP - ENDIF - - ! - ! ** Test reading a string that was created with a C program ** - ! - -!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) -!!$ -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) -!!$ ! -!!$ ! compare read and write buffers. -!!$ ! -!!$ IF ( bufr_c .NE. buf_c ) THEN -!!$ PRINT *, 'read buffer differs from write buffer' -!!$ PRINT *, bufr1, ' and ', buf_c -!!$ STOP -!!$ ENDIF -!!$ ! -!!$ ! read attribute into a fortran character buf that is larger then buf_c. -!!$ ! -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) -!!$ -!!$ ! -!!$ ! compare read and write buffers, make sure C NULL character was removed. -!!$ ! -!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN -!!$ PRINT *, 'larger read buffer differs from write buffer' -!!$ PRINT *, buf_c, ' and ', bufr_c_lg -!!$ STOP -!!$ ENDIF - -!!$ CALL h5fclose_f(file_id1, errcode) - - CALL passed() - - !------------------------------------------------------------------------- - ! get attribute rank - !------------------------------------------------------------------------- - - CALL test_begin(' Get attribute rank/info ') - - - CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) - - IF ( rankr .NE. 1 ) THEN - PRINT *, 'h5ltget_attribute_ndims_f return error' - STOP - ENDIF - - - CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_attributes - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 new file mode 100644 index 0000000..f679982 --- /dev/null +++ b/hl/fortran/test/tsttable.F90 @@ -0,0 +1,465 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +PROGRAM table_test + + CALL test_table1() + +END PROGRAM table_test + + +!------------------------------------------------------------------------- +! test_table1 +!------------------------------------------------------------------------- + +SUBROUTINE test_table1() + + USE H5TB ! module of H5TB + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields + INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords + CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset + INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types + INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size + INTEGER, PARAMETER :: compress = 0 ! compress + INTEGER :: errcode = 0 ! Error flag + INTEGER :: i ! general purpose integer + INTEGER(SIZE_T) :: type_size ! Size of the datatype + INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) + INTEGER(SIZE_T) :: offset ! Member's offset + INTEGER(HSIZE_T) :: start = 0 ! start record + INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer + INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer + REAL, DIMENSION(nrecords) :: bufr ! Data buffer + REAL, DIMENSION(nrecords) :: bufrr ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer + INTEGER(HSIZE_T) :: nfieldsr ! nfields + INTEGER(HSIZE_T) :: nrecordsr ! nrecords + CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes + INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype + INTEGER :: maxlen = 0 ! max chararter length of a field name + + + ! + ! Initialize the data arrays. + ! + DO i = 1, nrecords + bufi(i) = i + bufr(i) = i + bufd(i) = i + END DO + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + + !------------------------------------------------------------------------- + ! make table + ! initialize the table parameters + !------------------------------------------------------------------------- + + field_names(1) = "field1" + field_names(2) = "field2a" + field_names(3) = "field3ab" + field_names(4) = "field4abc" + + ! + ! calculate total size by calculating sizes of each member + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) + type_size = 2 + CALL h5tset_size_f(type_id_c, type_size, errcode) + CALL h5tget_size_f(type_id_c, type_sizec, errcode) + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) + CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) + type_size = type_sizec + type_sizei + type_sized + type_sizer + + ! + ! type ID's + ! + field_types(1) = type_id_c + field_types(2) = H5T_NATIVE_INTEGER + field_types(3) = H5T_NATIVE_DOUBLE + field_types(4) = H5T_NATIVE_REAL + + ! + ! offsets + ! + offset = 0 + field_offset(1) = offset + offset = offset + type_sizec ! Offset of the second memeber is 2 + field_offset(2) = offset + offset = offset + type_sizei ! Offset of the second memeber is 6 + field_offset(3) = offset + offset = offset + type_sized ! Offset of the second memeber is 14 + field_offset(4) = offset + + !------------------------------------------------------------------------- + ! make table + !------------------------------------------------------------------------- + + CALL test_begin(' Make table ') + + CALL h5tbmake_table_f(dsetname1,& + file_id,& + dsetname1,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + CALL passed() + + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by name ') + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufi,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufd,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufr,errcode) + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + ! Read an invalid field, should fail + CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& + bufsr,errcode) + + IF(errcode.GE.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! Read a valid field, should pass + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufsr,errcode) + IF(errcode.LT.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufir,errcode) + + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by index ') + + CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufi,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufd,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufr,errcode) + + + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufsr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufir,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + + !------------------------------------------------------------------------- + ! Insert field + ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) + !------------------------------------------------------------------------- + + CALL test_begin(' Insert field ') + + CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) + CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& + bufrr,errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + !------------------------------------------------------------------------- + ! Delete field + !------------------------------------------------------------------------- + + CALL test_begin(' Delete field ') + + CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) + + CALL passed() + + + !------------------------------------------------------------------------- + ! Gets the number of records and fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get table info ') + + CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) + + IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN + PRINT *, 'h5tbget_table_info_f return error' + STOP + ENDIF + + CALL passed() + + !------------------------------------------------------------------------- + ! Get information about fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get fields info ') + + CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& + field_offsetr, type_sizeout, errcode, maxlen ) + + IF ( errcode.NE.0 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') + STOP + ENDIF + + ! "field4abc" was deleted and "field5" was added. + field_names(4) = "field5" + + IF ( maxlen .NE. 8 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') + WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 + STOP + ENDIF + + DO i = 1, nfields + IF ( field_namesr(i) .NE. field_names(i)) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') + WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! end + !------------------------------------------------------------------------- + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! + ! end function. + ! +END SUBROUTINE test_table1 + + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed + + diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90 deleted file mode 100644 index f679982..0000000 --- a/hl/fortran/test/tsttable.f90 +++ /dev/null @@ -1,465 +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 file contains the FORTRAN90 tests for H5LT -! - -PROGRAM table_test - - CALL test_table1() - -END PROGRAM table_test - - -!------------------------------------------------------------------------- -! test_table1 -!------------------------------------------------------------------------- - -SUBROUTINE test_table1() - - USE H5TB ! module of H5TB - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields - INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords - CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset - INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types - INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size - INTEGER, PARAMETER :: compress = 0 ! compress - INTEGER :: errcode = 0 ! Error flag - INTEGER :: i ! general purpose integer - INTEGER(SIZE_T) :: type_size ! Size of the datatype - INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) - INTEGER(SIZE_T) :: offset ! Member's offset - INTEGER(HSIZE_T) :: start = 0 ! start record - INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer - INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer - REAL, DIMENSION(nrecords) :: bufr ! Data buffer - REAL, DIMENSION(nrecords) :: bufrr ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer - INTEGER(HSIZE_T) :: nfieldsr ! nfields - INTEGER(HSIZE_T) :: nrecordsr ! nrecords - CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes - INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype - INTEGER :: maxlen = 0 ! max chararter length of a field name - - - ! - ! Initialize the data arrays. - ! - DO i = 1, nrecords - bufi(i) = i - bufr(i) = i - bufd(i) = i - END DO - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - - !------------------------------------------------------------------------- - ! make table - ! initialize the table parameters - !------------------------------------------------------------------------- - - field_names(1) = "field1" - field_names(2) = "field2a" - field_names(3) = "field3ab" - field_names(4) = "field4abc" - - ! - ! calculate total size by calculating sizes of each member - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) - type_size = 2 - CALL h5tset_size_f(type_id_c, type_size, errcode) - CALL h5tget_size_f(type_id_c, type_sizec, errcode) - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) - CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) - type_size = type_sizec + type_sizei + type_sized + type_sizer - - ! - ! type ID's - ! - field_types(1) = type_id_c - field_types(2) = H5T_NATIVE_INTEGER - field_types(3) = H5T_NATIVE_DOUBLE - field_types(4) = H5T_NATIVE_REAL - - ! - ! offsets - ! - offset = 0 - field_offset(1) = offset - offset = offset + type_sizec ! Offset of the second memeber is 2 - field_offset(2) = offset - offset = offset + type_sizei ! Offset of the second memeber is 6 - field_offset(3) = offset - offset = offset + type_sized ! Offset of the second memeber is 14 - field_offset(4) = offset - - !------------------------------------------------------------------------- - ! make table - !------------------------------------------------------------------------- - - CALL test_begin(' Make table ') - - CALL h5tbmake_table_f(dsetname1,& - file_id,& - dsetname1,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - CALL passed() - - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by name ') - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufi,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufd,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufr,errcode) - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - ! Read an invalid field, should fail - CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& - bufsr,errcode) - - IF(errcode.GE.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! Read a valid field, should pass - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufsr,errcode) - IF(errcode.LT.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufir,errcode) - - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by index ') - - CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufi,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufd,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufr,errcode) - - - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufsr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufir,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - - !------------------------------------------------------------------------- - ! Insert field - ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) - !------------------------------------------------------------------------- - - CALL test_begin(' Insert field ') - - CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) - CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& - bufrr,errcode) - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - !------------------------------------------------------------------------- - ! Delete field - !------------------------------------------------------------------------- - - CALL test_begin(' Delete field ') - - CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) - - CALL passed() - - - !------------------------------------------------------------------------- - ! Gets the number of records and fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get table info ') - - CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) - - IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN - PRINT *, 'h5tbget_table_info_f return error' - STOP - ENDIF - - CALL passed() - - !------------------------------------------------------------------------- - ! Get information about fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get fields info ') - - CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& - field_offsetr, type_sizeout, errcode, maxlen ) - - IF ( errcode.NE.0 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') - STOP - ENDIF - - ! "field4abc" was deleted and "field5" was added. - field_names(4) = "field5" - - IF ( maxlen .NE. 8 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') - WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 - STOP - ENDIF - - DO i = 1, nfields - IF ( field_namesr(i) .NE. field_names(i)) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') - WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! end - !------------------------------------------------------------------------- - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! - ! end function. - ! -END SUBROUTINE test_table1 - - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed - - diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index ef49563..2092562 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -515,6 +515,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 6d6df30..1bfce03 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -552,6 +552,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index d1f3002..b8babca 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index e79cadb..9928c00 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -528,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 8051752..febd73c 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -510,3 +510,37 @@ rm -f pac_fconftest.out AC_MSG_RESULT([$pack_int_sizeof]) AC_LANG_POP([Fortran]) ]) + +AC_DEFUN([PAC_LDBL_DIG],[ +AC_MSG_CHECKING([maximum decimal precision for C]) +rm -f pac_Cconftest.out + AC_LANG_CONFTEST([ + AC_LANG_PROGRAM([ + #include + #include + #if __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + ],[[ + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n", C_LDBL_DIG); + ]]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_Cconftest.out ; then + LDBL_DIG="`cat pac_Cconftest.out`" + AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $LDBL_DIG, [Determine the decimal precision of C long double]) + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_Cconftest.out + ],[ + AC_MSG_WARN([C program fails to build or run!]) + ],[]) +AC_MSG_RESULT([$LDBL_DIG]) +]) + + diff --git a/src/H5config.h.in b/src/H5config.h.in index ffbc4c2..3f432d5 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -422,6 +422,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Determine the decimal precision of C long double */ +#undef PAC_C_MAX_REAL_PRECISION + /* Define Fortran Maximum Real Decimal Precision */ #undef PAC_FC_MAX_REAL_PRECISION diff --git a/src/Makefile.in b/src/Makefile.in index 75feb9e..de573f0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -576,6 +576,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/test/Makefile.in b/test/Makefile.in index e26066a..38986f8 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -920,6 +920,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 83c39d9..1e022e2 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -543,6 +543,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 7f4b9d7..eb45a0d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 10d1385..b20c389 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -522,6 +522,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index b0157f7..d071705 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -529,6 +529,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index b8ea56a..36d32bb 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -528,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 18de006..091125e 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -522,6 +522,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 3cd0190..4498f09 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -534,6 +534,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 174ad99..adb3b2f 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 4c188bd..ed58bd6 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -546,6 +546,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 084b75b..ff4e99a 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -524,6 +524,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index d747707..9d62e57 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -511,6 +511,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 818dd6b..8767a53 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -549,6 +549,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index d7f240d..0539283 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -553,6 +553,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -- cgit v0.12 From 62401ac7c61dc71ea5980e44e895ab757df15a01 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 9 Jun 2015 12:05:09 -0500 Subject: [svn-r27167] more DT fixes --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 130 +++++++++++++++++++++++------------ configure.ac | 25 +++++-- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/H5_f.c | 10 ++- fortran/src/H5_ff.F90 | 2 + fortran/src/H5config_f.inc.in | 3 + fortran/src/H5fort_type_defines.h.in | 3 +- fortran/src/H5match_types.c | 30 ++++---- fortran/src/Makefile.in | 1 + fortran/test/Makefile.in | 1 + fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/H5LTff.F90 | 21 +++--- hl/fortran/src/H5TBff.F90 | 20 +++--- hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/fortran/test/tstlite.F90 | 11 +-- hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 26 +++++-- src/H5config.h.in | 3 + src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 52 files changed, 225 insertions(+), 99 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6088c33..f50da2d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -294,6 +294,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/c++/Makefile.in b/c++/Makefile.in index c916f89..d41ddd6 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index bebe35d..9c21416 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 83d515a..34b2962 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -465,6 +465,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index bba5059..89e2acc 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -456,6 +456,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/configure b/configure index 554db12..0c9b346 100755 --- a/configure +++ b/configure @@ -719,8 +719,9 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS -PAC_C_MAX_REAL_PRECISION +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE FORTRAN_HAVE_C_LONG_DOUBLE +PAC_C_MAX_REAL_PRECISION HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF PAC_FORTRAN_NATIVE_DOUBLE_KIND @@ -6989,50 +6990,6 @@ rm -f core conftest.err conftest.$ac_objext \ fi fi - - ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - - FORTRAN_HAVE_C_LONG_DOUBLE="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 -$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } - - cat > conftest.$ac_ext <<_ACEOF - - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - FORTRAN_HAVE_C_LONG_DOUBLE="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" HAVE_ISO_FORTRAN_ENV="no" @@ -7492,6 +7449,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7529,6 +7487,32 @@ $as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi + + ## See if C_LONG_DOUBLE is available + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_LONG_DOUBLE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_LONG_DOUBLE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + FORTRAN_HAVE_C_LONG_DOUBLE="0" if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then FORTRAN_HAVE_C_LONG_DOUBLE="1" @@ -7537,8 +7521,64 @@ $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h fi + ## Is C_LONG_DOUBLE different from C_DOUBLE + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then + + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "X$FORTRAN_C_LONG_DOUBLE_IS_UNIQUE" = "Xyes"; then + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" + +$as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h + + else + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + fi + fi + + $as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h + ## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' diff --git a/configure.ac b/configure.ac index 90f7d67..2baa0a4 100644 --- a/configure.ac +++ b/configure.ac @@ -446,10 +446,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then fi fi - - ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - PAC_PROG_FC_HAVE_C_LONG_DOUBLE - ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" PAC_PROG_FC_ISO_FORTRAN_ENV @@ -471,8 +467,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) - AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) AC_SUBST([PAC_C_MAX_REAL_PRECISION]) + AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) + AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then @@ -501,12 +498,30 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi + + ## See if C_LONG_DOUBLE is available + PAC_PROG_FC_HAVE_C_LONG_DOUBLE + FORTRAN_HAVE_C_LONG_DOUBLE="0" if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then FORTRAN_HAVE_C_LONG_DOUBLE="1" AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi + + ## Is C_LONG_DOUBLE different from C_DOUBLE + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then + PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE + if test "X$FORTRAN_C_LONG_DOUBLE_IS_UNIQUE" = "Xyes"; then + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" + AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) + else + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + fi + fi + AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) + ## Change back to the C language AC_LANG_POP(Fortran) PAC_LDBL_DIG diff --git a/examples/Makefile.in b/examples/Makefile.in index 20b0183..dd80474 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 6427d4c..c8a309d 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index d0400c0..15e98ac 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -402,6 +402,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 241af79..cca36fb 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -221,21 +221,27 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes /* * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE */ +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ -#if FORTRAN_HAVE_C_LONG_DOUBLE!=0 +# if FORTRAN_HAVE_C_LONG_DOUBLE!=0 else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ -#else +# else else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; if ( H5Tset_precision (types[12], 128) < 0) return ret_value; } /*end else */ +# endif + +#else + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 64) < 0) return ret_value; #endif /* * FIND H5T_NATIVE_B_8 diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 7939644..3ef6331 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -389,8 +389,10 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_FLOAT ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_DOUBLE +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE +#endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 #ifdef H5_HAVE_FLOAT128 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index dbbf43b..d6909ed 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -18,6 +18,9 @@ ! Define if the intrinsic function C_LONG_DOUBLE exists #undef FORTRAN_HAVE_C_LONG_DOUBLE +! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE +#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE + ! Define if the intrinsic module ISO_FORTRAN_ENV exists #undef HAVE_ISO_FORTRAN_ENV diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index 279deb9..5511742 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -13,4 +13,5 @@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ #define H5_PAC_FC_MAX_REAL_PRECISION @PAC_FC_MAX_REAL_PRECISION@ #define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ -#define H5_HAVE_Fortran_INTRINSIC_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index c22f423..27d314e 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -211,16 +211,16 @@ int main(void) if (sizeof(float) == RealKinds_SizeOf[i]) { writeTypedef("float", "float", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT"); - } else if(sizeof(double) == RealKinds_SizeOf[i]) { + strcpy(Real_C_TYPES[i], "C_FLOAT"); } + else if(sizeof(double) == RealKinds_SizeOf[i]) { writeTypedef("float", "double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_DOUBLE"); -/* may not have long double in fortran need check */ - } else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { + strcpy(Real_C_TYPES[i], "C_DOUBLE"); } +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 + else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); - found_long_double = 1; - } + found_long_double = 1; } +#endif #ifdef H5_HAVE_FLOAT128 /* Don't select a higher precision than Fortran can support */ else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { @@ -240,15 +240,15 @@ int main(void) /* } else if(sizeof(long double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ /* writeTypedef("float", "long double", RealKinds[i]); */ /* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ - else { - printf(" **** HDF5 WARNING ****\n"); - printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); - printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]); + else { + printf(" **** HDF5 WARNING ****\n"); + printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); + printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]); - writeTypedef("float", "long double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } - } -/* } */ +/* writeTypedef("float", "long double", RealKinds[i]); */ +/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ + } + } /* Now begin defining fortran types. */ fprintf(c_header, "\n"); diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 0abfb53..5c9de7c 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -503,6 +503,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 6478b50..bef4842 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -514,6 +514,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 79db2dc..e40dda7 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/Makefile.in b/hl/Makefile.in index a178fc1..97edc1c 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 08e1fff..b6f4f55 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 3eb154a..69d548b 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 88056fd..eb80bc2 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -457,6 +457,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index dc4e8a2..1abbb4f 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -454,6 +454,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 602cd7c..db82ec7 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 08cf1d8..468101e 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -458,6 +458,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 72f00da..0a58477 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -401,6 +401,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 3216b0a..8dc20f2 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -59,7 +59,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_c_double5 MODULE PROCEDURE h5ltmake_dataset_f_c_double6 MODULE PROCEDURE h5ltmake_dataset_f_c_double7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double1 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double2 MODULE PROCEDURE h5ltmake_dataset_f_c_long_double3 @@ -93,7 +93,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_c_double5 MODULE PROCEDURE h5ltread_dataset_f_c_double6 MODULE PROCEDURE h5ltread_dataset_f_c_double7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltread_dataset_f_c_long_double1 MODULE PROCEDURE h5ltread_dataset_f_c_long_double2 MODULE PROCEDURE h5ltread_dataset_f_c_long_double3 @@ -130,7 +130,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -156,7 +156,7 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 @@ -192,7 +192,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -218,7 +218,7 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_c_double_f_5 MODULE PROCEDURE h5ltread_dataset_c_double_f_6 MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 @@ -892,7 +892,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_c_double7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_f_c_long_double(1-7) ! @@ -1684,8 +1684,7 @@ CONTAINS errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double7 - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_f_c_long_double(1-7) ! @@ -2388,7 +2387,7 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 !------------------------------------------------------------------------- ! Function(s): h5ltmake_dataset_c_long_double_f_(1-7) ! @@ -3053,7 +3052,7 @@ CONTAINS END SUBROUTINE h5ltread_dataset_c_double_f_7 -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 !------------------------------------------------------------------------- ! Function9s): h5ltread_dataset_c_long_double_f_(1-7) ! diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 9b40694..50eab2d 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -42,7 +42,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_name_f_int MODULE PROCEDURE h5tbwrite_field_name_f_c_float MODULE PROCEDURE h5tbwrite_field_name_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5tbwrite_field_name_f_c_long_double #endif MODULE PROCEDURE h5tbwrite_field_name_f_string @@ -52,7 +52,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_name_f_int MODULE PROCEDURE h5tbread_field_name_f_c_float MODULE PROCEDURE h5tbread_field_name_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5tbread_field_name_f_c_long_double #endif MODULE PROCEDURE h5tbread_field_name_f_string @@ -62,7 +62,7 @@ MODULE h5tb MODULE PROCEDURE h5tbwrite_field_index_f_int MODULE PROCEDURE h5tbwrite_field_index_f_c_float MODULE PROCEDURE h5tbwrite_field_index_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5tbwrite_field_index_f_c_long_double #endif MODULE PROCEDURE h5tbwrite_field_index_f_string @@ -72,7 +72,7 @@ MODULE h5tb MODULE PROCEDURE h5tbread_field_index_f_int MODULE PROCEDURE h5tbread_field_index_f_c_float MODULE PROCEDURE h5tbread_field_index_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5tbread_field_index_f_c_long_double #endif MODULE PROCEDURE h5tbread_field_index_f_string @@ -82,7 +82,7 @@ MODULE h5tb MODULE PROCEDURE h5tbinsert_field_f_int MODULE PROCEDURE h5tbinsert_field_f_c_float MODULE PROCEDURE h5tbinsert_field_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 MODULE PROCEDURE h5tbinsert_field_f_c_long_double #endif MODULE PROCEDURE h5tbinsert_field_f_string @@ -413,7 +413,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_name_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5tbwrite_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -594,7 +594,7 @@ CONTAINS END SUBROUTINE h5tbread_field_name_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5tbread_field_name_f_c_long_double(loc_id,& dset_name,& field_name,& @@ -766,7 +766,7 @@ CONTAINS END SUBROUTINE h5tbwrite_field_index_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5tbwrite_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -931,7 +931,7 @@ CONTAINS END SUBROUTINE h5tbread_field_index_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5tbread_field_index_f_c_long_double(loc_id,& dset_name,& field_index,& @@ -1093,7 +1093,7 @@ CONTAINS END SUBROUTINE h5tbinsert_field_f_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5tbinsert_field_f_c_long_double(loc_id,& dset_name,& field_name,& diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 35886b6..66cf45d 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -478,6 +478,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 6389d6b..1b6ff38 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -469,6 +469,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 index 26e9467..4c1ca14 100644 --- a/hl/fortran/test/tstlite.F90 +++ b/hl/fortran/test/tstlite.F90 @@ -1214,17 +1214,18 @@ SUBROUTINE test_datasets() ! ! write dataset. ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) - !CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + !f_ptr = C_LOC(buf4(1)) + !CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) ! ! read dataset. ! - !!!f_ptr = C_LOC(buf4(1)) MSB - !!!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) MSB + !f_ptr = C_LOC(buf4(1)) + !CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + ! ! compare read and write buffers. ! diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 2092562..9558e2c 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -456,6 +456,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 1bfce03..8f577a1 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -493,6 +493,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index b8babca..cf13ceb 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 9928c00..55fe87c 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -469,6 +469,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index febd73c..5ff22a8 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -125,12 +125,27 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) -dnl Check to see C_LONG_DOUBLE is available, and if it -dnl is different from C_DOUBLE +dnl Check to see C_LONG_DOUBLE is available AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ - FORTRAN_HAVE_C_LONG_DOUBLE="no" - AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is valid]) + HAVE_C_LONG_DOUBLE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_LONG_DOUBLE]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + ])], [AC_MSG_RESULT([yes]) + HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + +dnl Check if C_LONG_DOUBLE is different from C_DOUBLE + +if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then +AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="no" + AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ MODULE type_mod @@ -156,9 +171,10 @@ AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ CALL h5t(d) END PROGRAM main ])], [AC_MSG_RESULT([yes]) - FORTRAN_HAVE_C_LONG_DOUBLE="yes"], + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="yes"], [AC_MSG_RESULT([no])]) ]) +fi dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. diff --git a/src/H5config.h.in b/src/H5config.h.in index 3f432d5..a174c6a 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -30,6 +30,9 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #undef FC_FUNC_ +/* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */ +#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE + /* Define if we have Fortran C_LONG_DOUBLE */ #undef FORTRAN_HAVE_C_LONG_DOUBLE diff --git a/src/Makefile.in b/src/Makefile.in index de573f0..a3ded58 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -517,6 +517,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/test/Makefile.in b/test/Makefile.in index 38986f8..fe84ed2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -861,6 +861,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 1e022e2..52c5c4f 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -484,6 +484,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/Makefile.in b/tools/Makefile.in index eb45a0d..77c99f6 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index b20c389..91efac5 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -463,6 +463,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index d071705..944b68b 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -470,6 +470,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 36d32bb..e43f6c2 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -469,6 +469,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 091125e..baee94c 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -463,6 +463,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 4498f09..44f964e 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -475,6 +475,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index adb3b2f..0cb99d6 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -455,6 +455,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index ed58bd6..f90d071 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -487,6 +487,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index ff4e99a..23e4929 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -465,6 +465,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 9d62e57..351fa23 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -452,6 +452,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 8767a53..fc74c15 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -490,6 +490,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 0539283..58778aa 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -494,6 +494,7 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -- cgit v0.12 From 5097bd442939cabc9b85976c87de3649bc26417c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 9 Jun 2015 13:25:41 -0500 Subject: [svn-r27170] added new precompiler directives --- hl/fortran/src/H5LTff.F90 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 8dc20f2..7b24730 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -3411,7 +3411,7 @@ CONTAINS f_ptr = C_LOC(buf(1:1)) -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -3461,8 +3461,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -3513,7 +3512,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -3564,7 +3563,7 @@ CONTAINS f_ptr = C_LOC(buf(1)(1:1)) -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) @@ -3666,7 +3665,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) @@ -3712,7 +3711,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) @@ -3758,8 +3757,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE +#if FORTRAN_HAVE_STORAGE_SIZE!=0 SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) -- cgit v0.12 From 625fc9db698903a472d499d14739a3267aa60ad3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 9 Jun 2015 16:51:27 -0500 Subject: [svn-r27176] Removed debugging statements. --- fortran/test/tH5T.f90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index d845f73..9aaaa73 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -213,10 +213,8 @@ CONTAINS CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) CALL check("h5tget_size_f", error, total_error) - PRINT*,H5T_NATIVE_DOUBLE CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) CALL check("h5tget_size_f", error, total_error) - stop CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error) CALL check("h5tget_size_f", error, total_error) !write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized -- cgit v0.12 From 48741994ac625bf13d0aaa8906ac0e4bfe9e20f7 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 10 Jun 2015 08:54:16 -0500 Subject: [svn-r27178] changed to using SELECTED_*_KIND with numerical precision specified --- fortran/examples/nested_derived_type.f90 | 12 ++++++------ fortran/examples/rwdset_fortran2003.f90 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90 index f806110..65e7e75 100644 --- a/fortran/examples/nested_derived_type.f90 +++ b/fortran/examples/nested_derived_type.f90 @@ -23,13 +23,13 @@ PROGRAM main IMPLICIT NONE ! KIND parameters - INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(Fortran_INTEGER_1) ! This should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(Fortran_INTEGER_2) ! This should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! This should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(Fortran_INTEGER_8) ! This should map to INTEGER*8 on most modern processors + INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(2) ! This should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(4) ! This should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(9) ! This should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(18) ! This should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(Fortran_REAL_4) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(Fortran_REAL_8) ! This should map to REAL*8 on most modern processors + INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(6,37) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(15,307) ! This should map to REAL*8 on most modern processors ! FILES diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90 index cd932bd..682676f 100644 --- a/fortran/examples/rwdset_fortran2003.f90 +++ b/fortran/examples/rwdset_fortran2003.f90 @@ -148,12 +148,12 @@ PROGRAM RWDSET_FORTRAN2003 CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) ! memory type - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_1): ',data_out_i8a - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_4): ',data_out_i4 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_8): ',data_out_i8 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_16): ',data_out_i16 - WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(Fortran_REAL_7): ',data_out_r7 - WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(Fortran_REAL_15): ',data_out_r15 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(2): ',data_out_i8a + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(4): ',data_out_i4 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(9): ',data_out_i8 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(18): ',data_out_i16 + WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(6,37): ',data_out_r7 + WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(15,307): ',data_out_r15 ! ! Close the dataset. ! -- cgit v0.12 From 7a496037323aae440087a2d9aec726b41d1b5125 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 10 Jun 2015 10:57:27 -0500 Subject: [svn-r27183] removed the use of -i in sed, used mv instead from a temporary file. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0c9b346..5530d20 100755 --- a/configure +++ b/configure @@ -32701,7 +32701,7 @@ $as_echo X"$file" | done } ;; - "fortran/src/H5config_f.inc":H) sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc ;; + "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -- fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/configure.ac b/configure.ac index 2baa0a4..937b32c 100644 --- a/configure.ac +++ b/configure.ac @@ -369,7 +369,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro ## names and those generated by another software package that uses the HDF5 library. AC_CONFIG_HEADERS([fortran/src/H5config_f.inc], - [sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc]) + [cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc]) AC_SUBST([FC]) HDF_FORTRAN=yes -- cgit v0.12 From 202ea3747ebc1bca71c455ca083492960f032ec5 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 10 Jun 2015 11:45:07 -0500 Subject: [svn-r27184] added case for real*16 when C does not have that precision --- fortran/src/H5match_types.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 27d314e..cac50ab 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -226,7 +226,12 @@ int main(void) else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { writeTypedef("float", "__float128", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } + } +#else + else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } #endif /* else { */ /* /\* Did not find the real type, use the next smallest *\/ */ -- cgit v0.12 From f2d14c76b8a8e7c09285fff9db25b101a84354b0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 10 Jun 2015 14:15:08 -0500 Subject: [svn-r27186] added fix for jam with promoted reals and integers --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 9 +++++++-- configure.ac | 6 ++++-- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/H5_f.c | 8 +++++++- fortran/src/H5match_types.c | 10 ++++++++++ fortran/src/Makefile.in | 1 + fortran/test/Makefile.in | 1 + fortran/test/tH5T.f90 | 1 - fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 45 files changed, 68 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index f50da2d..34dfa99 100644 --- a/Makefile.in +++ b/Makefile.in @@ -296,6 +296,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/Makefile.in b/c++/Makefile.in index d41ddd6..50f5b31 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -456,6 +456,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 9c21416..115c118 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -404,6 +404,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 34b2962..8362633 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,6 +467,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 89e2acc..feb6054 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -458,6 +458,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/configure b/configure index 5530d20..d78890d 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +FORTRAN_SIZEOF_LONG_DOUBLE FORTRAN_C_LONG_DOUBLE_IS_UNIQUE FORTRAN_HAVE_C_LONG_DOUBLE PAC_C_MAX_REAL_PRECISION @@ -7450,6 +7451,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7575,8 +7577,11 @@ $as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h fi fi + FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} -$as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FORTRAN_SIZEOF_LONG_DOUBLE "${ac_cv_sizeof_long_double}" +_ACEOF ## Change back to the C language @@ -32701,7 +32706,7 @@ $as_echo X"$file" | done } ;; - "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -- fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; + "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/configure.ac b/configure.ac index 937b32c..20eb696 100644 --- a/configure.ac +++ b/configure.ac @@ -470,6 +470,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_C_MAX_REAL_PRECISION]) AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) + AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then @@ -519,8 +520,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" fi fi - - AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) + + FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} + AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double]) ## Change back to the C language AC_LANG_POP(Fortran) diff --git a/examples/Makefile.in b/examples/Makefile.in index dd80474..1ea46a2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -404,6 +404,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index c8a309d..54465a8 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -460,6 +460,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 15e98ac..0f6cb1a 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -404,6 +404,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index cca36fb..f21528f 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -22,7 +22,7 @@ */ #include "H5f90.h" - +#include "H5fort_type_defines.h" /****if* H5_f/h5init_types_c * NAME * h5init_types_c @@ -92,6 +92,12 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; }/*end else */ #endif +#ifdef H5_HAVE_FLOAT128 + else if(sizeof(double_f)==sizeof(__float128)) { + if ((types[2] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[2], 128) < 0) return ret_value; + }/*end else */ +#endif /* if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value; diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index cac50ab..b0e682d 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -488,6 +488,16 @@ int main(void) writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE"); else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float)) writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT"); +#ifdef H5_HAVE_FLOAT128 + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); + } +#else + else if(sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); + } +#endif else { /* /\* No exact match, choose the next highest *\/ */ /* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(long double)) */ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 5c9de7c..eac35d6 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -505,6 +505,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index bef4842..30f7c55 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -516,6 +516,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 9aaaa73..efbceea 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -157,7 +157,6 @@ CONTAINS CALL h5tclose_f(fixed_str2,error) CALL check("h5tclose_f", error, total_error) - data_dims(1) = dimsize ! ! Initialize data buffer. diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index e40dda7..31184b3 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -456,6 +456,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 97edc1c..a451c55 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -460,6 +460,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index b6f4f55..8016029 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -456,6 +456,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 69d548b..c463f1d 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -403,6 +403,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index eb80bc2..171964a 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -459,6 +459,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 1abbb4f..116aac4 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -456,6 +456,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index db82ec7..95e6124 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -403,6 +403,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 468101e..a7a4a15 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -460,6 +460,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 0a58477..c60a93e 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -403,6 +403,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 66cf45d..5882ada 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -480,6 +480,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 1b6ff38..0f2f2a5 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -471,6 +471,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 9558e2c..7b52771 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -458,6 +458,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 8f577a1..4919a52 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -495,6 +495,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index cf13ceb..5aaf85b 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -457,6 +457,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 55fe87c..5d4e6e3 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -471,6 +471,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/src/Makefile.in b/src/Makefile.in index a3ded58..593d2d4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -519,6 +519,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index fe84ed2..5ca332b 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -863,6 +863,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 52c5c4f..ba1e43f 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -486,6 +486,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 77c99f6..feebdc4 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -457,6 +457,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 91efac5..8b07885 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -465,6 +465,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 944b68b..dc79985 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -472,6 +472,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index e43f6c2..d423072 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -471,6 +471,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index baee94c..4ee206c 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -465,6 +465,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 44f964e..0c6274a 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -477,6 +477,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 0cb99d6..e1ffa9a 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -457,6 +457,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index f90d071..637d9dd 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -489,6 +489,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 23e4929..de1df70 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -467,6 +467,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 351fa23..5d20d4f 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -454,6 +454,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index fc74c15..89b7d5e 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -492,6 +492,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 58778aa..7ca11ef 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -496,6 +496,7 @@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ -- cgit v0.12 From 133a5c36817c0645a8baa5478c436d7fa285503b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 10 Jun 2015 14:58:34 -0500 Subject: [svn-r27188] Switch to using parameters for SELECTED_*_KIND and instead use numerical precision. --- fortran/test/tH5T_F03.F90 | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index 995243f..d50b76d 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -976,11 +976,6 @@ END SUBROUTINE test_array_compound_atomic INTEGER, INTENT(INOUT) :: total_error -! INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors -! INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors -! 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 :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors @@ -2951,7 +2946,7 @@ END SUBROUTINE setup_buffer SUBROUTINE test_nbit(total_error ) IMPLICIT NONE - INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: wp = C_FLOAT !should map to REAL*4 on most modern processors INTEGER, INTENT(INOUT) :: total_error INTEGER(hid_t) :: file @@ -3097,10 +3092,10 @@ SUBROUTINE t_enum_conv(total_error) 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 :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! Handles INTEGER(hid_t) :: file ! Handles @@ -3245,8 +3240,8 @@ SUBROUTINE t_enum_conv(total_error) 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 + ! Test converting the data to (SELECTED_INT_KIND(9)) number. + ! Read enum data back as (SELECTED_INT_KIND(9)) number m_baset = h5kind_to_type(int_kind_8, H5_INTEGER_KIND) ! Memory base type f_ptr = C_LOC(data_i8(1)) @@ -3262,8 +3257,8 @@ SUBROUTINE t_enum_conv(total_error) 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 + ! Test converting the data to (SELECTED_INT_KIND(18)) number. + ! Read enum data back as (SELECTED_INT_KIND(18)) number m_baset = h5kind_to_type(int_kind_16, H5_INTEGER_KIND) ! Memory base type f_ptr = C_LOC(data_i16(1)) @@ -3279,8 +3274,8 @@ SUBROUTINE t_enum_conv(total_error) 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 + ! Test converting the data to C_FLOAT number. + ! Read enum data back as C_FLOAT number m_baset = h5kind_to_type(KIND(data_r7(1)), H5_REAL_KIND) ! Memory base type f_ptr = C_LOC(data_r7(1)) @@ -3357,10 +3352,10 @@ SUBROUTINE t_enum_conv(total_error) CALL check("h5dclose_f", error, total_error) !********************************************************* - !* Dataset of real SELECTED_REAL_KIND(Fortran_REAL_4) type + !* Dataset of real C_FLOAT type !********************************************************* - ! Create a dataset of SELECTED_REAL_KIND(Fortran_REAL_4) and write enum data to it + ! Create a dataset of C_FLOAT 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) @@ -3385,10 +3380,10 @@ SUBROUTINE t_enum_conv(total_error) CALL check("h5dclose_f", error, total_error) ! ***************************************************************** - ! * Dataset of integer SELECTED_INT_KIND(Fortran_INTEGER_8) type + ! * Dataset of integer SELECTED_INT_KIND(18) type ! ***************************************************************** - ! Create a integer dataset of (SELECTED_INT_KIND(Fortran_INTEGER_8)) and write enum data to it + ! Create a integer dataset of (SELECTED_INT_KIND(18)) 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) -- cgit v0.12 From 85bcb7790404198084b47f9dcf49d8ab08f4aa4f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 16 Jun 2015 16:47:00 -0500 Subject: [svn-r27221] Reworked Fortran autools REAL KIND detection. --- Makefile.in | 5 + c++/Makefile.in | 5 + c++/examples/Makefile.in | 5 + c++/src/Makefile.in | 5 + c++/test/Makefile.in | 5 + configure | 302 ++++++++++++++++++++++++----------- configure.ac | 91 ++++++++--- examples/Makefile.in | 5 + fortran/Makefile.in | 5 + fortran/examples/Makefile.in | 5 + fortran/src/H5_f.c | 24 +-- fortran/src/H5config_f.inc.in | 15 ++ fortran/src/H5fort_type_defines.h.in | 1 - fortran/src/H5match_types.c | 53 +++--- fortran/src/H5test_kind.F90 | 158 ++++++++---------- fortran/src/Makefile.in | 5 + fortran/test/Makefile.in | 5 + fortran/testpar/Makefile.in | 5 + hl/Makefile.in | 5 + hl/c++/Makefile.in | 5 + hl/c++/examples/Makefile.in | 5 + hl/c++/src/Makefile.in | 5 + hl/c++/test/Makefile.in | 5 + hl/examples/Makefile.in | 5 + hl/fortran/Makefile.in | 5 + hl/fortran/examples/Makefile.in | 5 + hl/fortran/src/H5LTff.F90 | 14 +- hl/fortran/src/Makefile.in | 5 + hl/fortran/test/Makefile.in | 5 + hl/src/Makefile.in | 5 + hl/test/Makefile.in | 5 + hl/tools/Makefile.in | 5 + hl/tools/gif2h5/Makefile.in | 5 + m4/aclocal_fc.m4 | 40 ++++- src/H5config.h.in | 18 +++ src/Makefile.in | 5 + test/Makefile.in | 5 + testpar/Makefile.in | 5 + tools/Makefile.in | 5 + tools/h5copy/Makefile.in | 5 + tools/h5diff/Makefile.in | 5 + tools/h5dump/Makefile.in | 5 + tools/h5import/Makefile.in | 5 + tools/h5jam/Makefile.in | 5 + tools/h5ls/Makefile.in | 5 + tools/h5repack/Makefile.in | 5 + tools/h5stat/Makefile.in | 5 + tools/lib/Makefile.in | 5 + tools/misc/Makefile.in | 5 + tools/perform/Makefile.in | 5 + 50 files changed, 672 insertions(+), 244 deletions(-) diff --git a/Makefile.in b/Makefile.in index 34dfa99..ce0c833 100644 --- a/Makefile.in +++ b/Makefile.in @@ -299,6 +299,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 50f5b31..2315cc2 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -459,6 +459,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 115c118..6b0f894 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 3ca4f55..42c7a86 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -470,6 +470,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index feb6054..0da1d86 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -461,6 +461,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/configure b/configure index c79ee83..456b846 100755 --- a/configure +++ b/configure @@ -710,7 +710,6 @@ PARALLEL TIME TR AR -PERL HL_FOR HL CXXCPP @@ -719,6 +718,11 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +H5CONFIG_F_IKIND +H5CONFIG_F_NUM_IKIND +H5CONFIG_F_RKIND_SIZEOF +H5CONFIG_F_RKIND +H5CONFIG_F_NUM_RKIND FORTRAN_SIZEOF_LONG_DOUBLE FORTRAN_C_LONG_DOUBLE_IS_UNIQUE FORTRAN_HAVE_C_LONG_DOUBLE @@ -837,6 +841,7 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +PERL target_alias host_alias build_alias @@ -3011,6 +3016,60 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING +## -------------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## + PERL="" +##if test "X$GCC" = "Xyes"; then + for ac_prog in perl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PERL="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PERL=$ac_cv_prog_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PERL" && break +done + +##fi + + ac_config_headers="$ac_config_headers src/H5config.h" @@ -5542,6 +5601,46 @@ _ACEOF +## Check for __FLOAT128 extension +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __float128" >&5 +$as_echo_n "checking size of __float128... " >&6; } +if ${ac_cv_sizeof___float128+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__float128))" "ac_cv_sizeof___float128" "$ac_includes_default"; then : + +else + if test "$ac_cv_type___float128" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (__float128) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof___float128=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___float128" >&5 +$as_echo "$ac_cv_sizeof___float128" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF___FLOAT128 $ac_cv_sizeof___float128 +_ACEOF + + +if test "$ac_cv_sizeof___float128" != 0; then + +$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h + +fi + ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -6974,7 +7073,6 @@ rm -f core conftest.err conftest.$ac_objext \ - ## Set the sizeof function for use later in the fortran tests if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" @@ -7032,12 +7130,15 @@ else PROGRAM main IMPLICIT NONE INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 lastkind=SELECTED_INT_KIND(1) OPEN(8, FILE='pac_fconftest.out', form='formatted') WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' @@ -7045,16 +7146,19 @@ else IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' ELSE WRITE(8,'(A)',ADVANCE='NO') 'B ' ENDIF WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs + num_rkinds = 0 lastkind=SELECTED_REAL_KIND(1) max_decimal_prec = 1 DO ik=2,36 k = SELECTED_REAL_KIND(ik) IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' @@ -7063,12 +7167,16 @@ else IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' ELSE WRITE(8,'(A)',ADVANCE='NO') 'D' ENDIF WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b' + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d' + END @@ -7087,8 +7195,24 @@ cat >>confdefs.h <<_ACEOF #define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION _ACEOF + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)" + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 $as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 @@ -7215,12 +7339,15 @@ else PROGRAM main IMPLICIT NONE INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 lastkind=SELECTED_INT_KIND(1) OPEN(8, FILE='pac_fconftest.out', form='formatted') WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' @@ -7228,16 +7355,19 @@ else IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' ELSE WRITE(8,'(A)',ADVANCE='NO') 'B ' ENDIF WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs + num_rkinds = 0 lastkind=SELECTED_REAL_KIND(1) max_decimal_prec = 1 DO ik=2,36 k = SELECTED_REAL_KIND(ik) IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' @@ -7246,12 +7376,16 @@ else IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' ELSE WRITE(8,'(A)',ADVANCE='NO') 'D' ENDIF WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b' + WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d' + END @@ -7270,8 +7404,24 @@ cat >>confdefs.h <<_ACEOF #define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION _ACEOF + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)" + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 $as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 @@ -7363,7 +7513,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 $as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } ac_ext=${ac_fc_srcext-f} @@ -7425,7 +7575,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }" +PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 $as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } ac_ext=${ac_fc_srcext-f} @@ -7452,6 +7602,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + + ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7584,6 +7739,50 @@ cat >>confdefs.h <<_ACEOF _ACEOF + + + max_real_fortran_sizeof="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" + max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" + + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + " >&5 +$as_echo "$as_me: WARNING: + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + " >&2;} + PAC_FC_ALL_REAL_KINDS="`echo \"$PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5 +$as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'`/)" + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND_SIZEOF $H5CONFIG_F_RKIND_SIZEOF +_ACEOF + + + + ## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7601,10 +7800,16 @@ rm -f pac_Cconftest.out #include #include - #if __STDC_VERSION__ >= 199901L - #define C_LDBL_DIG DECIMAL_DIG + #define CHECK_FLOAT128 $ac_cv_sizeof___float128 + #if CHECK_FLOAT128!=0 + #include + #define C_LDBL_DIG FLT128_DIG #else + # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + # else #define C_LDBL_DIG LDBL_DIG + # endif #endif #ifdef FC_DUMMY_MAIN @@ -8425,56 +8630,6 @@ fi ## ---------------------------------------------------------------------- -## Check if they have Perl installed on their system. We only need Perl -## if they're using a GNU compiler. -## - PERL="" -if test "X$GCC" = "Xyes"; then - for ac_prog in perl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PERL"; then - ac_cv_prog_PERL="$PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PERL="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PERL=$ac_cv_prog_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PERL" && break -done - -fi - -## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. ## @@ -24940,41 +25095,6 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache -## Check for __FLOAT128 extension -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5 -$as_echo_n "checking for __float128... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -__float128 x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ## ---------------------------------------------------------------------- ## Check if the dev_t type is a scalar type (must come after the check for ## sys/types.h) diff --git a/configure.ac b/configure.ac index 96c43f9..9272c99 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,19 @@ AC_PREREQ([2.69]) ## release!!! ## AC_INIT([HDF5], [1.9.222], [help@hdfgroup.org]) + + + +## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING +## -------------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## +AC_SUBST([PERL]) PERL="" +##if test "X$GCC" = "Xyes"; then + AC_CHECK_PROGS([PERL], [perl],, [$PATH]) +##fi + AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) @@ -346,6 +359,12 @@ esac AC_CHECK_SIZEOF([long double], [8]) +## Check for __FLOAT128 extension +AC_CHECK_SIZEOF([__float128]) +if test "$ac_cv_sizeof___float128" != 0; then + AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) +fi + ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -429,7 +448,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" PAC_PROG_FC_STORAGE_SIZE - ## Set the sizeof function for use later in the fortran tests if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" @@ -471,6 +489,11 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) + AC_SUBST([H5CONFIG_F_NUM_RKIND]) + AC_SUBST([H5CONFIG_F_RKIND]) + AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) + AC_SUBST([H5CONFIG_F_NUM_IKIND]) + AC_SUBST([H5CONFIG_F_IKIND]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then @@ -524,6 +547,54 @@ if test "X$HDF_FORTRAN" = "Xyes"; then FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double]) + + dnl get the largest sizeof for REAL kinds + dnl max_real_fortran_sizeof="`echo $pack_real_sizeof | sed -e 's/, *$//g' | sed -e [0-9]*$`" + dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/, }//g' | sed -e [0-9]*$`" + dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/\(, \}\)//g' | sed -e 's/.* //g'`" + + max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" + max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" + + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + AC_MSG_WARN([ + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + ]) + PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + fi + AC_MSG_CHECKING([for Fortran interoperable KINDS with C]) + AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + + dnl count the number of real kinds + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'`/)" + + AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) + + dnl remove the invalid kind from the list + dnl AC_MSG_WARN([...$PAC_FC_ALL_REAL_KINDS_SIZEOF...$PAC_FC_ALL_REAL_KINDS...]) + dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}" + dnl tmp3="`echo $PAC_FC_ALL_REAL_KINDS | perl -pe 's/,[0-9]*\}$/\}/g'`" + dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`" + dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`" + dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`" + dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF" + dnl echo "$tmp3" + dnl tmp2=`echo $tmp3 | sed -e 's/[0-9]//'` + dnl AC_MSG_WARN([here $tmp2....]) + + dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}" + dnl echo "$PAC_FC_ALL_REAL_KINDS" + dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`" + dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`" + dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`" + dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF" + ## Change back to the C language AC_LANG_POP(Fortran) PAC_LDBL_DIG @@ -600,15 +671,6 @@ fi ## ---------------------------------------------------------------------- -## Check if they have Perl installed on their system. We only need Perl -## if they're using a GNU compiler. -## -AC_SUBST([PERL]) PERL="" -if test "X$GCC" = "Xyes"; then - AC_CHECK_PROGS([PERL], [perl],, [$PATH]) -fi - -## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. ## @@ -1154,15 +1216,6 @@ AC_CHECK_SIZEOF([off64_t], [8]) ## Checkpoint the cache AC_CACHE_SAVE -## Check for __FLOAT128 extension -AC_MSG_CHECKING([for __float128]) -AC_TRY_COMPILE([], - [__float128 x;], - [AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) - AC_MSG_RESULT([yes])], - AC_MSG_RESULT([no]) -) - ## ---------------------------------------------------------------------- ## Check if the dev_t type is a scalar type (must come after the check for ## sys/types.h) diff --git a/examples/Makefile.in b/examples/Makefile.in index 1ea46a2..79232ae 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 54465a8..8585623 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -463,6 +463,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 0f6cb1a..f97fdc8 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index f21528f..fa96ebe 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -227,27 +227,29 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes /* * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE */ -#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ -# if FORTRAN_HAVE_C_LONG_DOUBLE!=0 +# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { - if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; - } /*end else */ + if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) { + if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; + } + else { + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 128) < 0) return ret_value; + } + } # else - else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { - if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[12], 128) < 0) return ret_value; - } /*end else */ + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 64) < 0) return ret_value; # endif - #else - if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[12], 64) < 0) return ret_value; + if ((types[12] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; #endif /* * FIND H5T_NATIVE_B_8 diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index d6909ed..b0de405 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -39,3 +39,18 @@ ! Maximum decimal precision for C #undef PAC_C_MAX_REAL_PRECISION +! number of valid REAL KINDs +#undef H5CONFIG_F_NUM_RKIND + +! valid REAL KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_RKIND + +! valid REAL KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_RKIND_SIZEOF + +! number of valid INTEGER KINDs +#undef H5CONFIG_F_NUM_IKIND + +! valid INTEGER KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_IKIND + diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index 5511742..0e14e86 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -11,7 +11,6 @@ #define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ #define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -#define H5_PAC_FC_MAX_REAL_PRECISION @PAC_FC_MAX_REAL_PRECISION@ #define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ #define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ #define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index b0e682d..360f224 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -153,7 +153,6 @@ int main(void) int FoundRealSizeKind[10]; int i, j,flag; char chrA[32],chrB[32]; - int H5_C_HAS_REAL_NATIVE_16; int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF; @@ -169,9 +168,6 @@ int main(void) c_header = fopen(CFILE, "w"); fort_header = fopen(FFILE, "w"); - /* Default is C has 16 byte float */ - H5_C_HAS_REAL_NATIVE_16 = 1; - /* Write copyright, boilerplate to both files */ initCfile(); initFfile(); @@ -208,30 +204,45 @@ int main(void) /* (b) Define c_float_x */ for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { - if (sizeof(float) == RealKinds_SizeOf[i]) { writeTypedef("float", "float", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT"); } + strcpy(Real_C_TYPES[i], "C_FLOAT"); + } else if(sizeof(double) == RealKinds_SizeOf[i]) { writeTypedef("float", "double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_DOUBLE"); } + strcpy(Real_C_TYPES[i], "C_DOUBLE"); + } #if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); - found_long_double = 1; } -#endif -#ifdef H5_HAVE_FLOAT128 + found_long_double = 1; + } +# ifdef H5_HAVE_FLOAT128 /* Don't select a higher precision than Fortran can support */ else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { writeTypedef("float", "__float128", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); } -#else +# else else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); } +# endif +#else /* There is no C_LONG_DOUBLE intrinsic */ +# ifdef H5_HAVE_FLOAT128 + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == RealKinds_SizeOf[i] ) { + writeTypedef("float", "__float128", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# else + else if(sizeof(long double) == RealKinds_SizeOf[i] ) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# endif #endif /* else { */ /* /\* Did not find the real type, use the next smallest *\/ */ @@ -246,10 +257,12 @@ int main(void) /* writeTypedef("float", "long double", RealKinds[i]); */ /* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ else { - printf(" **** HDF5 WARNING ****\n"); - printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); - printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]); + printf("\n **** HDF5 WARNING ****\n"); + printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]); + printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",RealKinds[i]); + RealKinds_SizeOf[i] = -1; + RealKinds[i] = -1; /* writeTypedef("float", "long double", RealKinds[i]); */ /* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ } @@ -392,12 +405,14 @@ int main(void) FoundRealSize[4] = -1; for(i=0;i 0) { + FoundRealSize[i] = (int)RealKinds[i]; + FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i]; + sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]); /* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */ - sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); - writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); + sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); + writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); + } } /* for(i=0;i #include - #if __STDC_VERSION__ >= 199901L + #define CHECK_FLOAT128 $ac_cv_sizeof___float128 + #if CHECK_FLOAT128!=0 + #include + #define C_LDBL_DIG FLT128_DIG + #else + # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG - #else + # else #define C_LDBL_DIG LDBL_DIG + # endif #endif ],[[ FILE * pFile; diff --git a/src/H5config.h.in b/src/H5config.h.in index a174c6a..d7d1487 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -48,6 +48,21 @@ /* Determine the size of C long double */ #undef FORTRAN_SIZEOF_LONG_DOUBLE +/* Define valid Fortran INTEGER KINDs */ +#undef H5CONFIG_F_IKIND + +/* Define number of valid Fortran INTEGER KINDs */ +#undef H5CONFIG_F_NUM_IKIND + +/* Define number of valid Fortran REAL KINDs */ +#undef H5CONFIG_F_NUM_RKIND + +/* Define valid Fortran REAL KINDs */ +#undef H5CONFIG_F_RKIND + +/* Define valid Fortran REAL KINDs Sizeof */ +#undef H5CONFIG_F_RKIND_SIZEOF + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -548,6 +563,9 @@ /* The size of `unsigned', as computed by sizeof. */ #undef SIZEOF_UNSIGNED +/* The size of `__float128', as computed by sizeof. */ +#undef SIZEOF___FLOAT128 + /* The size of `__int64', as computed by sizeof. */ #undef SIZEOF___INT64 diff --git a/src/Makefile.in b/src/Makefile.in index 9390993..ffa6fa9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,6 +522,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index 5ca332b..d3f1b86 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -866,6 +866,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 228d678..5797dfc 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -493,6 +493,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/Makefile.in b/tools/Makefile.in index feebdc4..0f5684d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -460,6 +460,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 8b07885..1b50662 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -468,6 +468,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index dc79985..7b4d121 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -475,6 +475,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index d423072..9865e3a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -474,6 +474,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 4ee206c..d6e784a 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -468,6 +468,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 0c6274a..c915437 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -480,6 +480,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index e1ffa9a..8fb9822 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -460,6 +460,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 637d9dd..c0b6685 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -492,6 +492,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index de1df70..6bf37f3 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -470,6 +470,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 5d20d4f..fcfb019 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -457,6 +457,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 89b7d5e..2688e8d 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -495,6 +495,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 7ca11ef..4804533 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -499,6 +499,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ -- cgit v0.12 From 1ea65644191f8e260a31ccdc7ca4ba073791951b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 09:14:40 -0500 Subject: [svn-r27223] Added check for quadmath.h --- configure | 197 +++++++++++++++++++++++++++++------------------------- configure.ac | 4 ++ m4/aclocal_fc.m4 | 2 + src/H5config.h.in | 3 + 4 files changed, 115 insertions(+), 91 deletions(-) diff --git a/configure b/configure index 456b846..41da790 100755 --- a/configure +++ b/configure @@ -2081,6 +2081,97 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## -------------------------------- ## +## Report this to help@hdfgroup.org ## +## -------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + # ac_fn_fc_try_compile LINENO # --------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2449,97 +2540,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------- ## -## Report this to help@hdfgroup.org ## -## -------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -5639,8 +5639,21 @@ if test "$ac_cv_sizeof___float128" != 0; then $as_echo "#define HAVE_FLOAT128 1" >>confdefs.h + HAVE_QUADMATH=0 + for ac_header in quadmath.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "quadmath.h" "ac_cv_header_quadmath_h" "$ac_includes_default" +if test "x$ac_cv_header_quadmath_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_QUADMATH_H 1 +_ACEOF + HAVE_QUADMATH=1 fi +done + + fi + ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -7802,7 +7815,9 @@ rm -f pac_Cconftest.out #include #define CHECK_FLOAT128 $ac_cv_sizeof___float128 #if CHECK_FLOAT128!=0 + # if $HAVE_QUADMATH!=0 #include + # endif #define C_LDBL_DIG FLT128_DIG #else # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L diff --git a/configure.ac b/configure.ac index 9272c99..b836611 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,10 @@ AC_CHECK_SIZEOF([long double], [8]) AC_CHECK_SIZEOF([__float128]) if test "$ac_cv_sizeof___float128" != 0; then AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) + HAVE_QUADMATH=0 + AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) + dnl AC_MSG_CHECKING([for quadmath.h]) + dnl AC_MSG_RESULT([$HAVE_QUADMATH]) fi ## ---------------------------------------------------------------------- diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index e069560..e55165c 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -560,7 +560,9 @@ rm -f pac_Cconftest.out #include #define CHECK_FLOAT128 $ac_cv_sizeof___float128 #if CHECK_FLOAT128!=0 + # if $HAVE_QUADMATH!=0 #include + # endif #define C_LDBL_DIG FLT128_DIG #else # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L diff --git a/src/H5config.h.in b/src/H5config.h.in index d7d1487..387c4d5 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -248,6 +248,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_QUADMATH_H + /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM -- cgit v0.12 From f51fcf3ffa96b31b3d94434aec6a20ed0432975d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 10:40:24 -0500 Subject: [svn-r27225] new test for __float128 --- configure | 179 +++++++++++++++++++++++++++--------------------------- configure.ac | 23 +++++-- m4/aclocal_fc.m4 | 16 +++-- src/H5config.h.in | 2 +- 4 files changed, 116 insertions(+), 104 deletions(-) diff --git a/configure b/configure index 41da790..692388f 100755 --- a/configure +++ b/configure @@ -726,7 +726,6 @@ H5CONFIG_F_NUM_RKIND FORTRAN_SIZEOF_LONG_DOUBLE FORTRAN_C_LONG_DOUBLE_IS_UNIQUE FORTRAN_HAVE_C_LONG_DOUBLE -PAC_C_MAX_REAL_PRECISION HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF PAC_FORTRAN_NATIVE_DOUBLE_KIND @@ -775,6 +774,7 @@ ac_ct_CC LDFLAGS CFLAGS CC +PAC_C_MAX_REAL_PRECISION UNAME_INFO enable_static enable_shared @@ -3947,6 +3947,7 @@ $as_echo "done" >&6; } UNAME_INFO=`uname -a` + ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check ## that it actually does what it's supposed to do. Catch this early @@ -5635,12 +5636,9 @@ cat >>confdefs.h <<_ACEOF _ACEOF -if test "$ac_cv_sizeof___float128" != 0; then - -$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h - - HAVE_QUADMATH=0 - for ac_header in quadmath.h +HAVE_FLOAT128=0 +HAVE_QUADMATH=0 +for ac_header in quadmath.h do : ac_fn_c_check_header_mongrel "$LINENO" "quadmath.h" "ac_cv_header_quadmath_h" "$ac_includes_default" if test "x$ac_cv_header_quadmath_h" = xyes; then : @@ -5652,8 +5650,93 @@ fi done - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 +$as_echo_n "checking maximum decimal precision for C... " >&6; } +rm -f pac_Cconftest.out + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #define CHECK_FLOAT128 $ac_cv_sizeof___float128 + #if CHECK_FLOAT128!=0 + # if $HAVE_QUADMATH!=0 + #include + # endif + #define C_FLT128_DIG FLT128_DIG + #endif + #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + +int +main () +{ + + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n %d\n", C_LDBL_DIG, C_FLT128_DIG); + + ; + return 0; +} + +_ACEOF + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + if ac_fn_c_try_run "$LINENO"; then : + + if test -s pac_Cconftest.out ; then + LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" + FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_Cconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: C program fails to build or run!" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + + +if test "$ac_cv_sizeof___float128" != 0; then +## Check if __float128 and c_long_double are the same size and precision + if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then + +$as_echo "#define HAVE_FLOAT128 0" >>confdefs.h + + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG + else + +$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h + + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG + fi +else + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG +fi + +cat >>confdefs.h <<_ACEOF +#define PAC_C_MAX_REAL_PRECISION $PAC_C_MAX_REAL_PRECISION +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_C_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_C_MAX_REAL_PRECISION" >&6; } ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -7619,7 +7702,6 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then HAVE_Fortran_INTEGER_SIZEOF_16="1" @@ -7803,85 +7885,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 -$as_echo_n "checking maximum decimal precision for C... " >&6; } -rm -f pac_Cconftest.out - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - #define CHECK_FLOAT128 $ac_cv_sizeof___float128 - #if CHECK_FLOAT128!=0 - # if $HAVE_QUADMATH!=0 - #include - # endif - #define C_LDBL_DIG FLT128_DIG - #else - # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define C_LDBL_DIG DECIMAL_DIG - # else - #define C_LDBL_DIG LDBL_DIG - # endif - #endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - FILE * pFile; - pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n", C_LDBL_DIG); - - ; - return 0; -} - -_ACEOF - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - if ac_fn_c_try_run "$LINENO"; then : - - if test -s pac_Cconftest.out ; then - LDBL_DIG="`cat pac_Cconftest.out`" - -cat >>confdefs.h <<_ACEOF -#define PAC_C_MAX_REAL_PRECISION $LDBL_DIG -_ACEOF - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_Cconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: C program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDBL_DIG" >&5 -$as_echo "$LDBL_DIG" >&6; } - else FC="no" fi diff --git a/configure.ac b/configure.ac index b836611..3842734 100644 --- a/configure.ac +++ b/configure.ac @@ -194,6 +194,7 @@ AC_SUBST([STATIC_SHARED]) AC_SUBST([enable_shared]) AC_SUBST([enable_static]) AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` +AC_SUBST([PAC_C_MAX_REAL_PRECISION]) ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check @@ -361,14 +362,26 @@ AC_CHECK_SIZEOF([long double], [8]) ## Check for __FLOAT128 extension AC_CHECK_SIZEOF([__float128]) +HAVE_FLOAT128=0 +HAVE_QUADMATH=0 +AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) +PAC_LDBL_DIG if test "$ac_cv_sizeof___float128" != 0; then - AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) - HAVE_QUADMATH=0 - AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) +## Check if __float128 and c_long_double are the same size and precision + if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then + AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG + else + AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG dnl AC_MSG_CHECKING([for quadmath.h]) dnl AC_MSG_RESULT([$HAVE_QUADMATH]) + fi +else + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi - +AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C]) +AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION]) ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -489,7 +502,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) - AC_SUBST([PAC_C_MAX_REAL_PRECISION]) AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) @@ -601,7 +613,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Change back to the C language AC_LANG_POP(Fortran) - PAC_LDBL_DIG else FC="no" fi diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index e55165c..678ed0f 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -563,24 +563,23 @@ rm -f pac_Cconftest.out # if $HAVE_QUADMATH!=0 #include # endif - #define C_LDBL_DIG FLT128_DIG - #else - # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define C_FLT128_DIG FLT128_DIG + #endif + #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG - # else + #else #define C_LDBL_DIG LDBL_DIG - # endif #endif ],[[ FILE * pFile; pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n", C_LDBL_DIG); + fprintf(pFile, "%d\n %d\n", C_LDBL_DIG, C_FLT128_DIG); ]]) ]) AC_RUN_IFELSE([],[ if test -s pac_Cconftest.out ; then - LDBL_DIG="`cat pac_Cconftest.out`" - AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $LDBL_DIG, [Determine the decimal precision of C long double]) + LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" + FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" else AC_MSG_WARN([No output from test program!]) fi @@ -588,7 +587,6 @@ rm -f pac_Cconftest.out ],[ AC_MSG_WARN([C program fails to build or run!]) ],[]) -AC_MSG_RESULT([$LDBL_DIG]) ]) diff --git a/src/H5config.h.in b/src/H5config.h.in index 387c4d5..4a4b6e0 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -443,7 +443,7 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Determine the decimal precision of C long double */ +/* Determine the maximum decimal precision in C */ #undef PAC_C_MAX_REAL_PRECISION /* Define Fortran Maximum Real Decimal Precision */ -- cgit v0.12 From 3bf582bae9fa8f7d35ba88280cfb8d9dff0abe5a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 11:47:17 -0500 Subject: [svn-r27226] restricted __float128 to gnu compilers --- configure | 15 +++++---------- configure.ac | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 692388f..31a20bb 100755 --- a/configure +++ b/configure @@ -5714,20 +5714,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi -if test "$ac_cv_sizeof___float128" != 0; then -## Check if __float128 and c_long_double are the same size and precision - if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then - -$as_echo "#define HAVE_FLOAT128 0" >>confdefs.h - PAC_C_MAX_REAL_PRECISION=$LDBL_DIG - else +## __float seems to work for __float128, but it should be _Quad type instead +if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then +## Check if __float128 and c_long_double are the same size and precision $as_echo "#define HAVE_FLOAT128 1" >>confdefs.h - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG - fi -else + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG + else PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi diff --git a/configure.ac b/configure.ac index 3842734..0279d3c 100644 --- a/configure.ac +++ b/configure.ac @@ -366,17 +366,26 @@ HAVE_FLOAT128=0 HAVE_QUADMATH=0 AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) PAC_LDBL_DIG -if test "$ac_cv_sizeof___float128" != 0; then + +## __float seems to work for __float128, but it should be _Quad type instead +if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then ## Check if __float128 and c_long_double are the same size and precision - if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then - AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) - PAC_C_MAX_REAL_PRECISION=$LDBL_DIG - else - AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG + dnl if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double"; then + dnl if test "$LDBL_DIG" = "$FLT128_DIG"; then + dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) + dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG + dnl else + dnl if test "$FLT128_DIG" > "$LDBL_DIG";then + dnl choose the larger precision + AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG + dnl else + dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) + dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG + dnl fi dnl AC_MSG_CHECKING([for quadmath.h]) dnl AC_MSG_RESULT([$HAVE_QUADMATH]) - fi + dnl fi else PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi -- cgit v0.12 From 2962171a1c664f6e648cea6129a821572c6f2ba6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 11:52:14 -0500 Subject: [svn-r27227] restricted __float128 to gnu compilers --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0279d3c..8ea73eb 100644 --- a/configure.ac +++ b/configure.ac @@ -362,12 +362,14 @@ AC_CHECK_SIZEOF([long double], [8]) ## Check for __FLOAT128 extension AC_CHECK_SIZEOF([__float128]) +AC_CHECK_SIZEOF([_Quad]) HAVE_FLOAT128=0 HAVE_QUADMATH=0 AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) PAC_LDBL_DIG -## __float seems to work for __float128, but it should be _Quad type instead +## __float128 seems to work intel compilers, but it should be _Quad type instead + if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then ## Check if __float128 and c_long_double are the same size and precision dnl if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double"; then -- cgit v0.12 From 3256437a00df1ad3ed134fc257e98a465eefdddb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 11:52:49 -0500 Subject: [svn-r27228] restricted __float128 to gnu compilers --- configure | 36 +++++++++++++++++++++++++++++++++++- src/H5config.h.in | 3 +++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 31a20bb..6dcabac 100755 --- a/configure +++ b/configure @@ -5636,6 +5636,39 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Quad" >&5 +$as_echo_n "checking size of _Quad... " >&6; } +if ${ac_cv_sizeof__Quad+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Quad))" "ac_cv_sizeof__Quad" "$ac_includes_default"; then : + +else + if test "$ac_cv_type__Quad" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (_Quad) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof__Quad=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Quad" >&5 +$as_echo "$ac_cv_sizeof__Quad" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF__QUAD $ac_cv_sizeof__Quad +_ACEOF + + HAVE_FLOAT128=0 HAVE_QUADMATH=0 for ac_header in quadmath.h @@ -5715,7 +5748,8 @@ fi -## __float seems to work for __float128, but it should be _Quad type instead +## __float128 seems to work intel compilers, but it should be _Quad type instead + if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then ## Check if __float128 and c_long_double are the same size and precision diff --git a/src/H5config.h.in b/src/H5config.h.in index 4a4b6e0..02dc75d 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -566,6 +566,9 @@ /* The size of `unsigned', as computed by sizeof. */ #undef SIZEOF_UNSIGNED +/* The size of `_Quad', as computed by sizeof. */ +#undef SIZEOF__QUAD + /* The size of `__float128', as computed by sizeof. */ #undef SIZEOF___FLOAT128 -- cgit v0.12 From 0cf5413849f8c5f1ae4118686b912718e84e7f71 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 13:29:20 -0500 Subject: [svn-r27230] added test for float128 --- configure | 7 +++++-- m4/aclocal_fc.m4 | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 6dcabac..5aaa455 100755 --- a/configure +++ b/configure @@ -5698,7 +5698,11 @@ rm -f pac_Cconftest.out # if $HAVE_QUADMATH!=0 #include # endif + # ifdef FLT128_DIG #define C_FLT128_DIG FLT128_DIG + # else + #define C_FLT128_DIG 0 + # endif #endif #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG @@ -5738,8 +5742,7 @@ $as_echo "$as_me: WARNING: No output from test program!" >&2;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: C program fails to build or run!" >&2;} + as_fn_error $? "C program fails to build or run!" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 678ed0f..dc7626e 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -563,7 +563,11 @@ rm -f pac_Cconftest.out # if $HAVE_QUADMATH!=0 #include # endif + # ifdef FLT128_DIG #define C_FLT128_DIG FLT128_DIG + # else + #define C_FLT128_DIG 0 + # endif #endif #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG @@ -585,7 +589,7 @@ rm -f pac_Cconftest.out fi rm -f pac_Cconftest.out ],[ - AC_MSG_WARN([C program fails to build or run!]) + AC_MSG_ERROR([C program fails to build or run!]) ],[]) ]) -- cgit v0.12 From 8353d79d26b6b4ad513e4e4e7c346eda2797f3d6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 17 Jun 2015 14:25:32 -0500 Subject: [svn-r27232] fixed C test program for float128 --- configure | 2 ++ m4/aclocal_fc.m4 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure b/configure index 5aaa455..cc68365 100755 --- a/configure +++ b/configure @@ -5703,6 +5703,8 @@ rm -f pac_Cconftest.out # else #define C_FLT128_DIG 0 # endif + #else + #define C_FLT128_DIG 0 #endif #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index dc7626e..a9d18ba 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -568,6 +568,8 @@ rm -f pac_Cconftest.out # else #define C_FLT128_DIG 0 # endif + #else + #define C_FLT128_DIG 0 #endif #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define C_LDBL_DIG DECIMAL_DIG -- cgit v0.12 From f30ab55f41296667eab0b273132ffc20c4323717 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 17 Jun 2015 19:58:49 -0500 Subject: [svn-r27237] Description: Merge v3 metadata cache changes to trunk. Yay! :-) Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial & parallel (daily tested on branch) --- src/H5AC.c | 98 +- src/H5ACpkg.h | 6 + src/H5ACprivate.h | 108 +- src/H5B.c | 34 +- src/H5B2.c | 23 +- src/H5B2cache.c | 967 +++--- src/H5B2dbg.c | 13 +- src/H5B2int.c | 94 +- src/H5B2pkg.h | 11 +- src/H5B2test.c | 4 +- src/H5Bcache.c | 363 +- src/H5Bdbg.c | 6 +- src/H5C.c | 3235 +++++++++++++----- src/H5Cpkg.h | 272 +- src/H5Cprivate.h | 1120 ++++++- src/H5Dlayout.c | 2 +- src/H5EA.c | 31 +- src/H5EAcache.c | 2043 ++++++------ src/H5EAdbg.c | 14 +- src/H5EAdblkpage.c | 8 +- src/H5EAdblock.c | 10 +- src/H5EAhdr.c | 13 +- src/H5EAiblock.c | 10 +- src/H5EApkg.h | 23 +- src/H5EAsblock.c | 11 +- src/H5FA.c | 16 +- src/H5FAcache.c | 1099 +++--- src/H5FAdbg.c | 8 +- src/H5FAdblkpage.c | 8 +- src/H5FAdblock.c | 10 +- src/H5FAhdr.c | 13 +- src/H5FApkg.h | 15 +- src/H5FDfamily.c | 2 +- src/H5FDpublic.h | 6 +- src/H5FS.c | 23 +- src/H5FScache.c | 1397 ++++---- src/H5FSdbg.c | 4 +- src/H5FSpkg.h | 4 +- src/H5FSsection.c | 33 +- src/H5Fint.c | 8 + src/H5Fpkg.h | 55 +- src/H5Fsuper.c | 463 ++- src/H5Fsuper_cache.c | 1439 ++++---- src/H5Gcache.c | 400 +-- src/H5Gent.c | 2 +- src/H5Gnode.c | 24 +- src/H5Gstab.c | 22 +- src/H5Gtest.c | 6 +- src/H5HF.c | 8 +- src/H5HFcache.c | 2432 ++++++++------ src/H5HFdbg.c | 12 +- src/H5HFdblock.c | 27 +- src/H5HFhdr.c | 11 +- src/H5HFiblock.c | 38 +- src/H5HFiter.c | 2 +- src/H5HFman.c | 20 +- src/H5HFpkg.h | 35 +- src/H5HFsection.c | 12 +- src/H5HG.c | 17 +- src/H5HGcache.c | 498 +-- src/H5HGdbg.c | 2 +- src/H5HGpkg.h | 2 +- src/H5HL.c | 25 +- src/H5HLcache.c | 778 +++-- src/H5HLdbg.c | 2 +- src/H5HLpkg.h | 4 + src/H5HLprivate.h | 2 +- src/H5O.c | 39 +- src/H5Oattribute.c | 10 +- src/H5Ocache.c | 1029 +++--- src/H5Ochunk.c | 6 +- src/H5Ocopy.c | 2 +- src/H5Odbg.c | 2 +- src/H5Oefl.c | 6 +- src/H5Omessage.c | 14 +- src/H5Oprivate.h | 4 +- src/H5Otest.c | 14 +- src/H5SM.c | 30 +- src/H5SMcache.c | 781 +++-- src/H5SMtest.c | 2 +- test/cache.c | 9063 +++++++++++++++++++++++++++++++------------------- test/cache_api.c | 3 + test/cache_common.c | 2326 ++++++++----- test/cache_common.h | 88 +- test/cache_tagging.c | 6 +- test/earray.c | 335 +- test/lheap.c | 4 +- test/ohdr.c | 6 +- testpar/t_cache.c | 911 +++-- 89 files changed, 19349 insertions(+), 12835 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index db5a06f..c6b0b47 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -128,8 +128,7 @@ static herr_t H5AC__receive_haddr_list(MPI_Comm mpi_comm, int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); static herr_t H5AC__receive_candidate_list(const H5AC_t *cache_ptr, int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); -static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t primary_dxpl_id, - hid_t secondary_dxpl_id); +static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id); static herr_t H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, haddr_t *candidates_list_ptr); static herr_t H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id); @@ -201,6 +200,7 @@ static const char *H5AC_entry_type_names[H5AC_NTYPES] = "fixed array data block", "fixed array data block pages", "superblock", + "driver info", "test entry" /* for testing only -- not used for actual files */ }; @@ -575,7 +575,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id) #endif /* H5_HAVE_PARALLEL */ /* Destroy the cache */ - if(H5C_dest(f, dxpl_id, H5AC_dxpl_id) < 0) + if(H5C_dest(f, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache") f->shared->cache = NULL; @@ -628,8 +628,7 @@ H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, HDassert(f->shared); HDassert(f->shared->cache); HDassert(type); - HDassert(type->clear); - HDassert(type->dest); + HDassert(type->serialize); HDassert(H5F_addr_defined(addr)); #if H5AC__TRACE_FILE_ENABLED @@ -645,7 +644,7 @@ H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, } #endif /* H5AC__TRACE_FILE_ENABLED */ - if(H5C_expunge_entry(f, dxpl_id, H5AC_dxpl_id, type, addr, flags) < 0) + if(H5C_expunge_entry(f, dxpl_id, type, addr, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed.") done: @@ -710,7 +709,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id) /* Flush the cache */ /* (Again, in parallel - writes out the superblock) */ - if(H5C_flush_cache(f, dxpl_id, H5AC_dxpl_id, H5AC__NO_FLAGS_SET) < 0) + if(H5C_flush_cache(f, dxpl_id, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache.") done: @@ -818,8 +817,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add HDassert(f->shared); HDassert(f->shared->cache); HDassert(type); - HDassert(type->flush); - HDassert(type->size); + HDassert(type->serialize); HDassert(H5F_addr_defined(addr)); HDassert(thing); @@ -841,7 +839,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add #endif /* H5AC__TRACE_FILE_ENABLED */ /* Insert entry into metadata cache */ - if(H5C_insert_entry(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0) + if(H5C_insert_entry(f, dxpl_id, type, addr, thing, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C_insert_entry() failed") #if H5AC__TRACE_FILE_ENABLED @@ -1138,9 +1136,8 @@ done: */ void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, - void *udata, H5AC_protect_t rw) + void *udata, unsigned flags) { - unsigned protect_flags = H5C__NO_FLAGS_SET; void * thing; /* Pointer to native data structure for entry */ #if H5AC__TRACE_FILE_ENABLED char trace[128] = ""; @@ -1156,47 +1153,36 @@ H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, HDassert(f->shared); HDassert(f->shared->cache); HDassert(type); - HDassert(type->flush); - HDassert(type->load); + HDassert(type->serialize); HDassert(H5F_addr_defined(addr)); + /* Check for unexpected flags -- H5C__FLUSH_COLLECTIVELY_FLAG + * only permitted in the parallel case. + */ +#ifdef H5_HAVE_PARALLEL + HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | \ + H5C__FLUSH_LAST_FLAG | \ + H5C__FLUSH_COLLECTIVELY_FLAG)))); +#else /* H5_HAVE_PARALLEL */ + HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | \ + H5C__FLUSH_LAST_FLAG)))); +#endif /* H5_HAVE_PARALLEL */ + /* Check for invalid access request */ - if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR) && rw == H5AC_WRITE) + if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file") #if H5AC__TRACE_FILE_ENABLED - /* For the protect call, only the addr and type id is really necessary - * in the trace file. Include the size of the entry protected as a - * sanity check. Also indicate whether the call was successful to - * catch occult errors. + /* For the protect call, only the addr, size, type id, and flags are + * necessary in the trace file. Also indicate whether the call was + * successful to catch occult errors. */ - if(NULL != (trace_file_ptr = H5C_get_trace_file_ptr(cache_ptr))) { - - const char * rw_string; - - if ( rw == H5AC_WRITE ) { - - rw_string = "H5AC_WRITE"; - - } else if ( rw == H5AC_READ ) { - - rw_string = "H5AC_READ"; - - } else { - - rw_string = "???"; - } - - sprintf(trace, "%s 0x%lx %d %s", FUNC, (unsigned long)addr, - (int)(type->id), rw_string); - } + if(NULL != (trace_file_ptr = H5C_get_trace_file_ptr(cache_ptr))) + sprintf(trace, "%s 0x%lx %d 0x%x", FUNC, (unsigned long)addr, + (int)(type->id), flags); #endif /* H5AC__TRACE_FILE_ENABLED */ - if ( rw == H5AC_READ ) - protect_flags |= H5C__READ_ONLY_FLAG; - - if(NULL == (thing = H5C_protect(f, dxpl_id, H5AC_dxpl_id, type, addr, udata, protect_flags))) - + if(NULL == (thing = H5C_protect(f, dxpl_id, type, addr, udata, flags))) HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_protect() failed.") #if H5AC__TRACE_FILE_ENABLED @@ -1438,8 +1424,8 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, HDassert(f->shared); HDassert(f->shared->cache); HDassert(type); - HDassert(type->clear); - HDassert(type->flush); + HDassert(type->deserialize); + HDassert(type->image_len); HDassert(H5F_addr_defined(addr)); HDassert(thing); HDassert( ((H5AC_info_t *)thing)->addr == addr ); @@ -1462,9 +1448,11 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, * the entry. */ if(dirtied && !deleted) { + hbool_t curr_compressed = FALSE; /* dummy for call */ size_t curr_size = 0; + size_t curr_compressed_size = 0; /* dummy for call */ - if((type->size)(f, thing, &curr_size) < 0) + if((type->image_len)(thing, &curr_size, &curr_compressed, &curr_compressed_size) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing") if(((H5AC_info_t *)thing)->size != curr_size) @@ -1483,7 +1471,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, } /* end if */ #endif /* H5_HAVE_PARALLEL */ - if(H5C_unprotect(f, dxpl_id, H5AC_dxpl_id, type, addr, thing, flags) < 0) + if(H5C_unprotect(f, dxpl_id, type, addr, thing, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed.") #ifdef H5_HAVE_PARALLEL @@ -3419,7 +3407,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id) aux_ptr->write_permitted = TRUE; /* Apply the candidate list */ - result = H5C_apply_candidate_list(f, dxpl_id, dxpl_id, cache_ptr, num_candidates, + result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_candidates, candidates_list_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); /* Disable writes again */ @@ -3563,7 +3551,7 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id) HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0); } /* end if */ else { - if(H5AC__receive_and_apply_clean_list(f, dxpl_id, H5AC_dxpl_id) < 0) + if(H5AC__receive_and_apply_clean_list(f, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.") } /* end else */ @@ -3667,7 +3655,7 @@ done: */ #ifdef H5_HAVE_PARALLEL static herr_t -H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id) +H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id) { H5AC_t * cache_ptr; H5AC_aux_t * aux_ptr; @@ -3693,7 +3681,7 @@ H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t primary_dxpl_id, hid_t second if(num_entries > 0) /* mark the indicated entries as clean */ - if(H5C_mark_entries_as_clean(f, primary_dxpl_id, secondary_dxpl_id, (int32_t)num_entries, haddr_buf_ptr) < 0) + if(H5C_mark_entries_as_clean(f, dxpl_id, (int32_t)num_entries, haddr_buf_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.") /* if it is defined, call the sync point done callback. Note @@ -3860,7 +3848,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id) aux_ptr->write_permitted = TRUE; /* Apply the candidate list */ - result = H5C_apply_candidate_list(f, dxpl_id, dxpl_id, cache_ptr, num_entries, + result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_entries, haddr_buf_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); /* Disable writes again */ @@ -4073,7 +4061,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id) aux_ptr->write_permitted = TRUE; /* Flush the cache */ - result = H5C_flush_cache(f, dxpl_id, dxpl_id, H5AC__NO_FLAGS_SET); + result = H5C_flush_cache(f, dxpl_id, H5AC__NO_FLAGS_SET); /* Disable writes again */ aux_ptr->write_permitted = FALSE; @@ -4197,7 +4185,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) aux_ptr->write_permitted = TRUE; /* Flush the cache */ - result = H5C_flush_to_min_clean(f, dxpl_id, H5AC_dxpl_id); + result = H5C_flush_to_min_clean(f, dxpl_id); /* Disable writes again */ aux_ptr->write_permitted = FALSE; diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index 950bdea..28965d2 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -392,6 +392,12 @@ typedef struct H5AC_aux_t } H5AC_aux_t; /* struct H5AC_aux_t */ +/* Package scoped functions */ +H5_DLL herr_t H5AC_set_sync_point_done_callback(H5C_t *cache_ptr, + void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl)); +H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr, + void (* write_done)(void)); + #endif /* H5_HAVE_PARALLEL */ #endif /* _H5ACpkg_H */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index a4e7c5a..584ce9d 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -79,6 +79,7 @@ typedef enum { H5AC_FARRAY_DBLOCK_ID, /*fixed array data block */ H5AC_FARRAY_DBLK_PAGE_ID, /*fixed array data block page */ H5AC_SUPERBLOCK_ID, /* file superblock */ + H5AC_DRVRINFO_ID, /* driver info block (supplements superblock)*/ H5AC_TEST_ID, /*test entry -- not used for actual files */ H5AC_NTYPES /* Number of types, must be last */ } H5AC_type_t; @@ -91,6 +92,17 @@ typedef enum { * times for debugging purposes. * * Hence the following, somewhat odd set of #defines. + * + * NOTE: test/cache plays games with the f->shared->cache, and thus + * setting H5AC_DUMP_STATS_ON_CLOSE will generate constant, + * irrelevant data when run with that test program. See + * comments on setup_cache() / takedown_cache() in test/cache_common.c. + * for details. + * + * If you need to dump stats at file close in test/cache.c, + * use the dump_stats parameter to takedown_cache(), or call + * H5C_stats() directly. + * JRM -- 4/12/15 */ #if H5C_COLLECT_CACHE_STATS @@ -113,81 +125,48 @@ typedef enum { /* * Class methods pertaining to caching. Each type of cached object will * have a constant variable with permanent life-span that describes how - * to cache the object. That variable will be of type H5AC_class_t and - * have the following required fields... - * - * LOAD: Loads an object from disk to memory. The function - * should allocate some data structure and return it. - * - * FLUSH: Writes some data structure back to disk. It would be - * wise for the data structure to include dirty flags to - * indicate whether it really needs to be written. This - * function is also responsible for freeing memory allocated - * by the LOAD method if the DEST argument is non-zero (by - * calling the DEST method). - * - * DEST: Just frees memory allocated by the LOAD method. - * - * CLEAR: Just marks object as non-dirty. - * - * NOTIFY: Notify client that an action on an entry has taken/will take - * place - * - * SIZE: Report the size (on disk) of the specified cache object. - * Note that the space allocated on disk may not be contiguous. + * to cache the object. */ -#define H5AC_CALLBACK__NO_FLAGS_SET H5C_CALLBACK__NO_FLAGS_SET -#define H5AC_CALLBACK__SIZE_CHANGED_FLAG H5C_CALLBACK__SIZE_CHANGED_FLAG -#define H5AC_CALLBACK__MOVED_FLAG H5C_CALLBACK__MOVED_FLAG +#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG +#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG +#define H5AC__SERIALIZE_COMPRESSED_FLAG H5C__SERIALIZE_COMPRESSED_FLAG /* Aliases for 'notify action' type & values */ typedef H5C_notify_action_t H5AC_notify_action_t; #define H5AC_NOTIFY_ACTION_AFTER_INSERT H5C_NOTIFY_ACTION_AFTER_INSERT +#define H5AC_NOTIFY_ACTION_AFTER_LOAD H5C_NOTIFY_ACTION_AFTER_LOAD +#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH #define H5AC_NOTIFY_ACTION_BEFORE_EVICT H5C_NOTIFY_ACTION_BEFORE_EVICT -typedef H5C_load_func_t H5AC_load_func_t; -typedef H5C_flush_func_t H5AC_flush_func_t; -typedef H5C_dest_func_t H5AC_dest_func_t; -typedef H5C_clear_func_t H5AC_clear_func_t; -typedef H5C_notify_func_t H5AC_notify_func_t; -typedef H5C_size_func_t H5AC_size_func_t; +#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET +#define H5AC__CLASS_SPECULATIVE_LOAD_FLAG H5C__CLASS_SPECULATIVE_LOAD_FLAG +#define H5AC__CLASS_COMPRESSED_FLAG H5C__CLASS_COMPRESSED_FLAG -typedef H5C_class_t H5AC_class_t; +/* The following flags should only appear in test code */ +#define H5AC__CLASS_NO_IO_FLAG H5C__CLASS_NO_IO_FLAG +#define H5AC__CLASS_SKIP_READS H5C__CLASS_SKIP_READS +#define H5AC__CLASS_SKIP_WRITES H5C__CLASS_SKIP_WRITES +typedef H5C_get_load_size_func_t H5AC_get_load_size_func_t; +typedef H5C_deserialize_func_t H5AC_deserialize_func_t; +typedef H5C_image_len_func_t H5AC_image_len_func_t; -/* The H5AC_NSLOTS #define is now obsolete, as the metadata cache no longer - * uses slots. However I am leaving it in for now to avoid modifying the - * interface between the metadata cache and the rest of HDF. It should - * be removed when we get to dealing with the size_hint parameter in - * H5AC_create(). - * JRM - 5/20/04 - * - * Old comment on H5AC_NSLOTS follows: - * - * A cache has a certain number of entries. Objects are mapped into a - * cache entry by hashing the object's file address. Each file has its - * own cache, an array of slots. - */ -#define H5AC_NSLOTS 10330 /* The library "likes" this number... */ - - -typedef H5C_cache_entry_t H5AC_info_t; +#define H5AC__SERIALIZE_NO_FLAGS_SET H5C__SERIALIZE_NO_FLAGS_SET +#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG +#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG +typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t; +typedef H5C_serialize_func_t H5AC_serialize_func_t; +typedef H5C_notify_func_t H5AC_notify_func_t; +typedef H5C_free_icr_func_t H5AC_free_icr_func_t; +typedef H5C_clear_func_t H5AC_clear_func_t; +typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t; -/*===----------------------------------------------------------------------=== - * Protect Types - *===----------------------------------------------------------------------=== - * - * These are for the wrapper functions to H5AC_protect. They specify what - * type of operation you're planning on doing to the metadata. The - * Flexible Parallel HDF5 locking can then act accordingly. - */ +typedef H5C_class_t H5AC_class_t; -typedef enum H5AC_protect_t { - H5AC_WRITE, /* Protect object for writing */ - H5AC_READ /* Protect object for reading */ -} H5AC_protect_t; +/* Cache entry info */ +typedef H5C_cache_entry_t H5AC_info_t; /* Typedef for metadata cache (defined in H5Cpkg.h) */ @@ -317,6 +296,7 @@ H5_DLLVAR hid_t H5AC_ind_dxpl_id; #define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG #define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG #define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG +#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG #define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG #define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG #define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG @@ -346,7 +326,7 @@ H5_DLL herr_t H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *typ H5_DLL herr_t H5AC_pin_protected_entry(void *thing); H5_DLL herr_t H5AC_create_flush_dependency(void *parent_thing, void *child_thing); H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, - haddr_t addr, void *udata, H5AC_protect_t rw); + haddr_t addr, void *udata, unsigned flags); H5_DLL herr_t H5AC_resize_entry(void *thing, size_t new_size); H5_DLL herr_t H5AC_unpin_entry(void *thing); H5_DLL herr_t H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing); @@ -359,10 +339,6 @@ H5_DLL herr_t H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, H5_DLL herr_t H5AC_dest(H5F_t *f, hid_t dxpl_id); H5_DLL herr_t H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsigned flags); -H5_DLL herr_t H5AC_set_sync_point_done_callback(H5C_t *cache_ptr, - void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl)); -H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr, - void (* write_done)(void)); H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr, H5AC_cache_config_t *config_ptr); H5_DLL herr_t H5AC_get_cache_size(H5AC_t *cache_ptr, size_t *max_size_ptr, diff --git a/src/H5B.c b/src/H5B.c index 765a57e..b1f3388 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -336,7 +336,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") rt = bt->nchildren; @@ -485,7 +485,7 @@ H5B__split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx, cache_udata.f = f; cache_udata.type = shared->type; cache_udata.rc_shared = bt_ud->bt->rc_shared; - if(NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC_WRITE))) + if(NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree") split_bt_ud->bt->level = bt_ud->bt->level; @@ -518,7 +518,7 @@ H5B__split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx, if(H5F_addr_defined(bt_ud->bt->right)) { H5B_t *tmp_bt; - if(NULL == (tmp_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, &cache_udata, H5AC_WRITE))) + if(NULL == (tmp_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt_ud->bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load right sibling") tmp_bt->left = split_bt_ud->addr; @@ -597,7 +597,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void cache_udata.type = type; cache_udata.rc_shared = rc_shared; bt_ud.addr = addr; - if(NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE))) + if(NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to locate root of B-tree") /* Insert the object */ @@ -901,7 +901,7 @@ H5B__insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, * Follow the minimum branch out of this node to a subtree. */ child_bt_ud.addr = bt->child[idx]; - if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE))) + if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") if((int)(my_ins = H5B__insert_helper(f, dxpl_id, &child_bt_ud, type, @@ -947,7 +947,7 @@ H5B__insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, */ idx = bt->nchildren - 1; child_bt_ud.addr = bt->child[idx]; - if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE))) + if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") if((int)(my_ins = H5B__insert_helper(f, dxpl_id, &child_bt_ud, type, @@ -1002,7 +1002,7 @@ H5B__insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, */ HDassert(idx < bt->nchildren); child_bt_ud.addr = bt->child[idx]; - if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC_WRITE))) + if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") if((int)(my_ins = H5B__insert_helper(f, dxpl_id, &child_bt_ud, type, @@ -1164,7 +1164,7 @@ H5B__iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load B-tree node") /* Iterate over node's children */ @@ -1287,7 +1287,7 @@ H5B__remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *typ cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node") rt = bt->nchildren; @@ -1387,7 +1387,7 @@ H5B__remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *typ * "critical" for any child in its node to maintain this * consistency (and avoid breaking key/child consistency) */ if(H5F_addr_defined(bt->left)) { - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC_WRITE))) + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node from tree") /* Copy right-most key from deleted node to right-most key @@ -1404,7 +1404,7 @@ H5B__remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *typ sibling = NULL; /* Make certain future references will be caught */ } /* end if */ if(H5F_addr_defined(bt->right)) { - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC_WRITE))) + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to unlink node from tree") /* Copy left-most key from deleted node to left-most key in @@ -1524,7 +1524,7 @@ H5B__remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *typ HDassert(level > 0); /* Update the rightmost key in the left sibling */ - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC_WRITE))) + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node") HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren), @@ -1539,7 +1539,7 @@ H5B__remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *typ HDassert(level > 0); /* Update the lefttmost key in the right sibling */ - if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC_WRITE))) + if(NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node") HDmemcpy(H5B_NKEY(sibling, shared, 0), @@ -1646,7 +1646,7 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_WRITE))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") /* Iterate over all children in tree, deleting them */ @@ -1908,7 +1908,7 @@ H5B__get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t a cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") /* Cache information from this node */ @@ -1932,7 +1932,7 @@ H5B__get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t a while(H5F_addr_defined(next_addr)) { /* Protect the next node to the right */ addr = next_addr; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "B-tree node") /* Cache information from this node */ @@ -2059,7 +2059,7 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr) cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node") done: diff --git a/src/H5B2.c b/src/H5B2.c index 0c0f24f..7b5aa16 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -155,8 +155,9 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udat /* Look up the B-tree header */ cache_udata.f = f; + cache_udata.addr = hdr_addr; cache_udata.ctx_udata = ctx_udata; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_WRITE))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree header") /* Point v2 B-tree wrapper at header and bump it's ref count */ @@ -215,8 +216,9 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata) /* Look up the B-tree header */ cache_udata.f = f; + cache_udata.addr = addr; cache_udata.ctx_udata = ctx_udata; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree header") /* Check for pending heap deletion */ @@ -479,7 +481,7 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op, H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */ /* Lock B-tree current node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") /* Locate node pointer for child */ @@ -542,7 +544,7 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op, H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */ /* Lock B-tree leaf node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Locate record */ @@ -662,7 +664,7 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx, unsigned u; /* Local index variable */ /* Lock B-tree current node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") /* Search for record with correct index */ @@ -734,7 +736,7 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx, H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */ /* Lock B-tree leaf node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Sanity check index */ @@ -1070,7 +1072,7 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op, H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */ /* Lock B-tree current node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_WRITE))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") /* Locate node pointer for child */ @@ -1142,7 +1144,7 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op, hbool_t changed = FALSE;/* Whether the 'modify' callback changed the record */ /* Lock B-tree leaf node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_WRITE))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Locate record */ @@ -1276,7 +1278,7 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id) /* Lock the v2 B-tree header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(bt2->f, dxpl_id, H5AC_BT2_HDR, bt2_addr, NULL, H5AC_WRITE))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(bt2->f, dxpl_id, H5AC_BT2_HDR, bt2_addr, NULL, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header") /* Set the shared v2 B-tree header's file context for this operation */ @@ -1352,8 +1354,9 @@ H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr); #endif /* QAK */ cache_udata.f = f; + cache_udata.addr = addr; cache_udata.ctx_udata = ctx_udata; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_WRITE))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header") /* Remember the callback & context for later */ diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 3b30e02..64e304c 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -37,7 +37,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5B2pkg.h" /* v2 B-trees */ #include "H5Eprivate.h" /* Error handling */ -#include "H5MFprivate.h" /* File memory management */ #include "H5WBprivate.h" /* Wrapped Buffers */ @@ -50,9 +49,6 @@ #define H5B2_INT_VERSION 0 /* Internal node */ #define H5B2_LEAF_VERSION 0 /* Leaf node */ -/* Size of stack buffer for serialized headers */ -#define H5B2_HDR_BUF_SIZE 128 - /******************/ /* Local Typedefs */ @@ -69,22 +65,32 @@ /********************/ /* Metadata cache callbacks */ -static H5B2_hdr_t *H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); -static herr_t H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); -static herr_t H5B2__cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); -static H5B2_internal_t *H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); -static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); -static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); -static H5B2_leaf_t *H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); -static herr_t H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); -static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); - +static herr_t H5B2__cache_hdr_get_load_size(const void *udata, size_t *image_len); +static void *H5B2__cache_hdr_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5B2__cache_hdr_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5B2__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5B2__cache_hdr_free_icr(void *thing); + +static herr_t H5B2__cache_int_get_load_size(const void *udata, size_t *image_len); +static void *H5B2__cache_int_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5B2__cache_int_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5B2__cache_int_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5B2__cache_int_free_icr(void *thing); + +static herr_t H5B2__cache_leaf_get_load_size(const void *udata, size_t *image_len); +static void *H5B2__cache_leaf_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5B2__cache_leaf_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5B2__cache_leaf_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5B2__cache_leaf_free_icr(void *thing); /*********************/ /* Package Variables */ @@ -92,35 +98,53 @@ static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_HDR[1] = {{ - H5AC_BT2_HDR_ID, - (H5AC_load_func_t)H5B2__cache_hdr_load, - (H5AC_flush_func_t)H5B2__cache_hdr_flush, - (H5AC_dest_func_t)H5B2__cache_hdr_dest, - (H5AC_clear_func_t)H5B2__cache_hdr_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2__cache_hdr_size, + H5AC_BT2_HDR_ID, /* Metadata client ID */ + "v2 B-tree header", /* Metadata client name (for debugging) */ + H5FD_MEM_BTREE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5B2__cache_hdr_get_load_size, /* 'get_load_size' callback */ + H5B2__cache_hdr_deserialize, /* 'deserialize' callback */ + H5B2__cache_hdr_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5B2__cache_hdr_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5B2__cache_hdr_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_INT[1] = {{ - H5AC_BT2_INT_ID, - (H5AC_load_func_t)H5B2__cache_internal_load, - (H5AC_flush_func_t)H5B2__cache_internal_flush, - (H5AC_dest_func_t)H5B2__cache_internal_dest, - (H5AC_clear_func_t)H5B2__cache_internal_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2__cache_internal_size, + H5AC_BT2_INT_ID, /* Metadata client ID */ + "v2 B-tree internal node", /* Metadata client name (for debugging) */ + H5FD_MEM_BTREE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5B2__cache_int_get_load_size, /* 'get_load_size' callback */ + H5B2__cache_int_deserialize, /* 'deserialize' callback */ + H5B2__cache_int_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5B2__cache_int_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5B2__cache_int_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ - H5AC_BT2_LEAF_ID, - (H5AC_load_func_t)H5B2__cache_leaf_load, - (H5AC_flush_func_t)H5B2__cache_leaf_flush, - (H5AC_dest_func_t)H5B2__cache_leaf_dest, - (H5AC_clear_func_t)H5B2__cache_leaf_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2__cache_leaf_size, + H5AC_BT2_LEAF_ID, /* Metadata client ID */ + "v2 B-tree leaf node", /* Metadata client name (for debugging) */ + H5FD_MEM_BTREE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5B2__cache_leaf_get_load_size, /* 'get_load_size' callback */ + H5B2__cache_leaf_deserialize, /* 'deserialize' callback */ + H5B2__cache_leaf_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5B2__cache_leaf_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5B2__cache_leaf_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -136,7 +160,38 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B2__cache_hdr_load + * Function: H5B2__cache_hdr_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 18, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5B2__cache_hdr_get_load_size(const void *_udata, size_t *image_len) +{ + const H5B2_hdr_cache_ud_t *udata = (const H5B2_hdr_cache_ud_t *)_udata; /* User data for callback */ + + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(udata); + HDassert(image_len); + + /* Set the image length size */ + *image_len = H5B2_HEADER_SIZE_FILE(udata->f); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B2__cache_hdr_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5B2__cache_hdr_deserialize * * Purpose: Loads a B-tree header from the disk. * @@ -149,8 +204,9 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ * *------------------------------------------------------------------------- */ -static H5B2_hdr_t * -H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata; @@ -159,78 +215,59 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) uint16_t depth; /* Depth of B-tree */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */ - uint8_t *buf; /* Pointer to header buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ H5B2_hdr_t *ret_value; /* Return value */ FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(udata); /* Allocate new B-tree header and reset cache info */ if(NULL == (hdr = H5B2__hdr_alloc(udata->f))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header") - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree header") - - /* Get temporary pointer to serialized header */ - p = buf; - /* Magic number */ - if(HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5B2_HDR_VERSION) + if(*image++ != H5B2_HDR_VERSION) HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version") /* B-tree class */ - id = (H5B2_subid_t)*p++; + id = (H5B2_subid_t)*image++; if(id >= H5B2_NUM_BTREE_ID) HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") /* Node size (in bytes) */ - UINT32DECODE(p, cparam.node_size); + UINT32DECODE(image, cparam.node_size); /* Raw key size (in bytes) */ - UINT16DECODE(p, cparam.rrec_size); + UINT16DECODE(image, cparam.rrec_size); /* Depth of tree */ - UINT16DECODE(p, depth); + UINT16DECODE(image, depth); /* Split & merge %s */ - cparam.split_percent = *p++; - cparam.merge_percent = *p++; + cparam.split_percent = *image++; + cparam.merge_percent = *image++; /* Root node pointer */ - H5F_addr_decode(udata->f, (const uint8_t **)&p, &(hdr->root.addr)); - UINT16DECODE(p, hdr->root.node_nrec); - H5F_DECODE_LENGTH(udata->f, p, hdr->root.all_nrec); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &(hdr->root.addr)); + UINT16DECODE(image, hdr->root.node_nrec); + H5F_DECODE_LENGTH(udata->f, image, hdr->root.all_nrec); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - (const uint8_t *)buf) == hdr->hdr_size); + HDassert((size_t)(image - (const uint8_t *)_image) == hdr->hdr_size); /* Compute checksum on entire header */ - computed_chksum = H5_checksum_metadata(buf, (hdr->hdr_size - H5B2_SIZEOF_CHKSUM), 0); + computed_chksum = H5_checksum_metadata(_image, (hdr->hdr_size - H5B2_SIZEOF_CHKSUM), 0); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -242,131 +279,59 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info") /* Set the B-tree header's address */ - hdr->addr = addr; + hdr->addr = udata->addr; + + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) <= len); /* Set return value */ ret_value = hdr; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && hdr) if(H5B2__hdr_free(hdr) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B2__cache_hdr_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_hdr_flush + * Function: H5B2__cache_hdr_image_len * - * Purpose: Flushes a dirty B-tree header to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 1 2005 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 20, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5B2_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr) +H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5B2_hdr_t *hdr = (const H5B2_hdr_t *)_thing; /* Pointer to the B-tree header */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); HDassert(hdr); + HDassert(image_len); - if(hdr->cache_info.is_dirty) { - uint8_t *buf; /* Pointer to header buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Set the B-tree header's file context for this operation */ - hdr->f = f; - - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->hdr_size))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Get temporary pointer to serialized header */ - p = buf; - - /* Magic number */ - HDmemcpy(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5B2_HDR_VERSION; - - /* B-tree type */ - *p++ = hdr->cls->id; + /* Set the image length size */ + *image_len = hdr->hdr_size; - /* Node size (in bytes) */ - UINT32ENCODE(p, hdr->node_size); - - /* Raw key size (in bytes) */ - UINT16ENCODE(p, hdr->rrec_size); - - /* Depth of tree */ - UINT16ENCODE(p, hdr->depth); - - /* Split & merge %s */ - H5_CHECK_OVERFLOW(hdr->split_percent, /* From: */ unsigned, /* To: */ uint8_t); - *p++ = (uint8_t)hdr->split_percent; - H5_CHECK_OVERFLOW(hdr->merge_percent, /* From: */ unsigned, /* To: */ uint8_t); - *p++ = (uint8_t)hdr->merge_percent; - - /* Root node pointer */ - H5F_addr_encode(f, &p, hdr->root.addr); - UINT16ENCODE(p, hdr->root.node_nrec); - H5F_ENCODE_LENGTH(f, p, hdr->root.all_nrec); - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (hdr->hdr_size - H5B2_SIZEOF_CHKSUM), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the B-tree header. */ - HDassert((size_t)(p - buf) == hdr->hdr_size); - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, hdr->hdr_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree header to disk") - - hdr->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5B2__cache_hdr_dest(f, hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") - -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2__cache_hdr_flush() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B2__cache_hdr_image_len() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_hdr_dest + * Function: H5B2__cache_hdr_serialize * - * Purpose: Destroys a B-tree header in memory. + * Purpose: Flushes a dirty B-tree header to disk. * * Return: Non-negative on success/Negative on failure * @@ -377,109 +342,132 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) +H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5B2_hdr_t *hdr = (H5B2_hdr_t *)_thing; /* Pointer to the B-tree header */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR - /* Check arguments */ + /* check arguments */ + HDassert(f); + HDassert(image); HDassert(hdr); - HDassert(hdr->rc == 0); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr)); + /* Magic number */ + HDmemcpy(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; + + /* Version # */ + *image++ = H5B2_HDR_VERSION; - /* Check for freeing file space for B-tree header */ - if(hdr->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->hdr_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header") - } /* end if */ + /* B-tree type */ + *image++ = hdr->cls->id; - /* Release B-tree header info */ - if(H5B2__hdr_free(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header info") + /* Node size (in bytes) */ + UINT32ENCODE(image, hdr->node_size); -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_hdr_dest() */ + /* Raw key size (in bytes) */ + UINT16ENCODE(image, hdr->rrec_size); + + /* Depth of tree */ + UINT16ENCODE(image, hdr->depth); + + /* Split & merge %s */ + H5_CHECK_OVERFLOW(hdr->split_percent, /* From: */ unsigned, /* To: */ uint8_t); + *image++ = (uint8_t)hdr->split_percent; + H5_CHECK_OVERFLOW(hdr->merge_percent, /* From: */ unsigned, /* To: */ uint8_t); + *image++ = (uint8_t)hdr->merge_percent; + + /* Root node pointer */ + H5F_addr_encode(f, &image, hdr->root.addr); + UINT16ENCODE(image, hdr->root.node_nrec); + H5F_ENCODE_LENGTH(f, image, hdr->root.all_nrec); + + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (hdr->hdr_size - H5B2_SIZEOF_CHKSUM), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5B2__cache_hdr_serialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_hdr_clear + * Function: H5B2__cache_hdr_free_icr * - * Purpose: Mark a B-tree header in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 1 2005 + * Programmer: Mike McGreevy + * mcgreevy@hdfgroup.org + * June 18, 2008 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) +H5B2__cache_hdr_free_icr(void *thing) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(hdr); - - /* Reset the dirty flag. */ - hdr->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(thing); - if(destroy) - if(H5B2__cache_hdr_dest(f, hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") + /* Destroy v2 B-tree header */ + if(H5B2__hdr_free((H5B2_hdr_t *)thing) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_hdr_clear() */ +} /* H5B2__cache_hdr_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_hdr_size + * Function: H5B2__cache_int_get_load_size * - * Purpose: Compute the size in bytes of a B-tree header - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the data structure on disk. * - * Return: SUCCEED (Can't fail) + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * koziol@hdfgroup.org - * Feb 1 2005 + * May 18, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) +H5B2__cache_int_get_load_size(const void *_udata, size_t *image_len) { + const H5B2_internal_cache_ud_t *udata = (const H5B2_internal_cache_ud_t *)_udata; /* User data for callback */ + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(hdr); - HDassert(size_ptr); + HDassert(udata); + HDassert(udata->hdr); + HDassert(image_len); - /* Set size value */ - *size_ptr = hdr->hdr_size; + /* Set the image length size */ + *image_len = udata->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2__cache_hdr_size() */ +} /* end H5B2__cache_int_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_internal_load + * Function: H5B2__cache_int_deserialize * - * Purpose: Loads a B-tree internal node from the disk. + * Purpose: Deserialize a B-tree internal node from the disk. * * Return: Success: Pointer to a new B-tree internal node. * Failure: NULL @@ -490,12 +478,13 @@ H5B2__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_hdr_t *hdr, size_ * *------------------------------------------------------------------------- */ -static H5B2_internal_t * -H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */ H5B2_internal_t *internal = NULL; /* Internal node read */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint8_t *native; /* Pointer to native record info */ H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */ uint32_t stored_chksum; /* Stored metadata checksum value */ @@ -506,8 +495,7 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(udata); /* Allocate new internal node and reset cache info */ @@ -515,9 +503,6 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") HDmemset(&internal->cache_info, 0, sizeof(H5AC_info_t)); - /* Set the B-tree header's file context for this operation */ - udata->hdr->f = f; - /* Increment ref. count on B-tree header */ if(H5B2__hdr_incr(udata->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") @@ -525,23 +510,17 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Share B-tree information */ internal->hdr = udata->hdr; - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree internal node") - - p = udata->hdr->page; - /* Magic number */ - if(HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5B2_INT_VERSION) + if(*image++ != H5B2_INT_VERSION) HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree internal node version") /* B-tree type */ - if(*p++ != (uint8_t)udata->hdr->cls->id) + if(*image++ != (uint8_t)udata->hdr->cls->id) HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") /* Allocate space for the native keys in memory */ @@ -560,11 +539,11 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) native = internal->int_native; for(u = 0; u < internal->nrec; u++) { /* Decode record */ - if((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cls->decode)(image, native, udata->hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode B-tree record") /* Move to next record */ - p += udata->hdr->rrec_size; + image += udata->hdr->rrec_size; native += udata->hdr->cls->nrec_size; } /* end for */ @@ -572,10 +551,10 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) int_node_ptr = internal->node_ptrs; for(u = 0; u < (unsigned)(internal->nrec + 1); u++) { /* Decode node pointer */ - H5F_addr_decode(udata->f, (const uint8_t **)&p, &(int_node_ptr->addr)); - UINT64DECODE_VAR(p, int_node_ptr->node_nrec, udata->hdr->max_nrec_size); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &(int_node_ptr->addr)); + UINT64DECODE_VAR(image, int_node_ptr->node_nrec, udata->hdr->max_nrec_size); if(udata->depth > 1) - UINT64DECODE_VAR(p, int_node_ptr->all_nrec, udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size) + UINT64DECODE_VAR(image, int_node_ptr->all_nrec, udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size) else int_node_ptr->all_nrec = int_node_ptr->node_nrec; @@ -584,13 +563,13 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) } /* end for */ /* Compute checksum on internal node */ - computed_chksum = H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check parsing */ - HDassert((size_t)(p - (const uint8_t *)udata->hdr->page) <= udata->hdr->node_size); + HDassert((size_t)(image - (const uint8_t *)_image) <= len); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -605,224 +584,194 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2__cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_int_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_internal_flush + * Function: H5B2__cache_int_image_len * - * Purpose: Flushes a dirty B-tree internal node to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 3 2005 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 20, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned H5_ATTR_UNUSED * flags_ptr) +H5B2__cache_int_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5B2_internal_t *internal = (const H5B2_internal_t *)_thing; /* Pointer to the B-tree internal node */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); HDassert(internal); HDassert(internal->hdr); + HDassert(image_len); - if(internal->cache_info.is_dirty) { - uint8_t *p; /* Pointer into raw data buffer */ - uint8_t *native; /* Pointer to native record info */ - H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - unsigned u; /* Local index variable */ - - /* Set the B-tree header's file context for this operation */ - internal->hdr->f = f; - - p = internal->hdr->page; - - /* Magic number */ - HDmemcpy(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5B2_INT_VERSION; - - /* B-tree type */ - *p++ = internal->hdr->cls->id; - HDassert((size_t)(p - internal->hdr->page) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); - - /* Serialize records for internal node */ - native = internal->int_native; - for(u = 0; u < internal->nrec; u++) { - /* Encode record */ - if((internal->hdr->cls->encode)(p, native, internal->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") - - /* Move to next record */ - p += internal->hdr->rrec_size; - native += internal->hdr->cls->nrec_size; - } /* end for */ - - /* Serialize node pointers for internal node */ - int_node_ptr = internal->node_ptrs; - for(u = 0; u < (unsigned)(internal->nrec + 1); u++) { - /* Encode node pointer */ - H5F_addr_encode(f, &p, int_node_ptr->addr); - UINT64ENCODE_VAR(p, int_node_ptr->node_nrec, internal->hdr->max_nrec_size); - if(internal->depth > 1) - UINT64ENCODE_VAR(p, int_node_ptr->all_nrec, internal->hdr->node_info[internal->depth - 1].cum_max_nrec_size); - - /* Move to next node pointer */ - int_node_ptr++; - } /* end for */ - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(internal->hdr->page, (size_t)(p - internal->hdr->page), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the B-tree internal node */ - HDassert((size_t)(p - internal->hdr->page) <= internal->hdr->node_size); - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, internal->hdr->node_size, dxpl_id, internal->hdr->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree internal node to disk") + /* Set the image length size */ + *image_len = internal->hdr->node_size; - internal->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5B2__cache_internal_dest(f, internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2__cache_internal_flush() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B2__cache_int_image_len() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_internal_dest + * Function: H5B2__cache_int_serialize * - * Purpose: Destroys a B-tree internal node in memory. + * Purpose: Serializes a B-tree internal node for writing to disk. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * koziol@ncsa.uiuc.edu - * Feb 2 2005 + * Feb 3 2005 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) +H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5B2_internal_t *internal = (H5B2_internal_t *)_thing; /* Pointer to the B-tree internal node */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint8_t *native; /* Pointer to native record info */ + H5B2_node_ptr_t *int_node_ptr; /* Pointer to node pointer info */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* Check arguments */ + /* check arguments */ HDassert(f); + HDassert(image); HDassert(internal); HDassert(internal->hdr); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!internal->cache_info.free_file_space_on_destroy || H5F_addr_defined(internal->cache_info.addr)); + /* Magic number */ + HDmemcpy(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; + + /* Version # */ + *image++ = H5B2_INT_VERSION; - /* Check for freeing file space for B-tree internal node */ - if(internal->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, internal->cache_info.addr, (hsize_t)internal->hdr->node_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree internal node") - } /* end if */ + /* B-tree type */ + *image++ = internal->hdr->cls->id; + HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); - /* Release v2 b-tree internal node */ - if(H5B2__internal_free(internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node") + /* Serialize records for internal node */ + native = internal->int_native; + for(u = 0; u < internal->nrec; u++) { + /* Encode record */ + if((internal->hdr->cls->encode)(image, native, internal->hdr->cb_ctx) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") + + /* Move to next record */ + image += internal->hdr->rrec_size; + native += internal->hdr->cls->nrec_size; + } /* end for */ + + /* Serialize node pointers for internal node */ + int_node_ptr = internal->node_ptrs; + for(u = 0; u < (unsigned)(internal->nrec + 1); u++) { + /* Encode node pointer */ + H5F_addr_encode(f, &image, int_node_ptr->addr); + UINT64ENCODE_VAR(image, int_node_ptr->node_nrec, internal->hdr->max_nrec_size); + if(internal->depth > 1) + UINT64ENCODE_VAR(image, int_node_ptr->all_nrec, internal->hdr->node_info[internal->depth - 1].cum_max_nrec_size); + + /* Move to next node pointer */ + int_node_ptr++; + } /* end for */ + + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_internal_dest() */ +} /* H5B2__cache_int_serialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_internal_clear + * Function: H5B2__cache_int_free_icr * - * Purpose: Mark a B-tree internal node in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 2 2005 + * Programmer: Mike McGreevy + * mcgreevy@hdfgroup.org + * June 18, 2008 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) +H5B2__cache_int_free_icr(void *thing) { - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(internal); - - /* Reset the dirty flag. */ - internal->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(thing); - if(destroy) - if(H5B2__cache_internal_dest(f, internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") + /* Release v2 B-tree internal node */ + if(H5B2__internal_free((H5B2_internal_t *)thing) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_internal_clear() */ +} /* H5B2__cache_int_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_internal_size + * Function: H5B2__cache_leaf_get_load_size * - * Purpose: Compute the size in bytes of a B-tree internal node - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 2 2005 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 18, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_internal_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) +H5B2__cache_leaf_get_load_size(const void *_udata, size_t *image_len) { + const H5B2_leaf_cache_ud_t *udata = (const H5B2_leaf_cache_ud_t *)_udata; /* User data for callback */ + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(internal); - HDassert(internal->hdr); - HDassert(size_ptr); + HDassert(udata); + HDassert(udata->hdr); + HDassert(image_len); - /* Set size value */ - *size_ptr = internal->hdr->node_size; + /* Set the image length size */ + *image_len = udata->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2__cache_internal_size() */ +} /* end H5B2__cache_leaf_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_leaf_load + * Function: H5B2__cache_leaf_deserialize * - * Purpose: Loads a B-tree leaf from the disk. + * Purpose: Deserialize a B-tree leaf from the disk. * * Return: Success: Pointer to a new B-tree leaf node. * Failure: NULL @@ -833,12 +782,13 @@ H5B2__cache_internal_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_internal_t * * *------------------------------------------------------------------------- */ -static H5B2_leaf_t * -H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata; H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint8_t *native; /* Pointer to native keys */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ @@ -848,8 +798,7 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(udata); /* Allocate new leaf node and reset cache info */ @@ -857,9 +806,6 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed") HDmemset(&leaf->cache_info, 0, sizeof(H5AC_info_t)); - /* Set the B-tree header's file context for this operation */ - udata->hdr->f = udata->f; - /* Increment ref. count on B-tree header */ if(H5B2__hdr_incr(udata->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") @@ -867,23 +813,17 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void /* Share B-tree header information */ leaf->hdr = udata->hdr; - /* Read header from disk */ - if(H5F_block_read(udata->f, H5FD_MEM_BTREE, addr, udata->hdr->node_size, dxpl_id, udata->hdr->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree leaf node") - - p = udata->hdr->page; - /* Magic number */ - if(HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5B2_LEAF_VERSION) + if(*image++ != H5B2_LEAF_VERSION) HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree leaf node version") /* B-tree type */ - if(*p++ != (uint8_t)udata->hdr->cls->id) + if(*image++ != (uint8_t)udata->hdr->cls->id) HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") /* Allocate space for the native keys in memory */ @@ -897,27 +837,30 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void native = leaf->leaf_native; for(u = 0; u < leaf->nrec; u++) { /* Decode record */ - if((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cls->decode)(image, native, udata->hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, NULL, "unable to decode B-tree record") /* Move to next record */ - p += udata->hdr->rrec_size; + image += udata->hdr->rrec_size; native += udata->hdr->cls->nrec_size; } /* end for */ /* Compute checksum on leaf node */ - computed_chksum = H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check parsing */ - HDassert((size_t)(p - (const uint8_t *)udata->hdr->page) <= udata->hdr->node_size); + HDassert((size_t)(image - (const uint8_t *)_image) <= udata->hdr->node_size); /* Verify checksum */ if(stored_chksum != computed_chksum) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 leaf node") + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) <= len); + /* Set return value */ ret_value = leaf; @@ -927,96 +870,46 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2__cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_leaf_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_leaf_flush + * Function: H5B2__cache_leaf_image_len * - * Purpose: Flushes a dirty B-tree leaf node to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 2 2005 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 20, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned H5_ATTR_UNUSED * flags_ptr) +H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5B2_leaf_t *leaf = (const H5B2_leaf_t *)_thing; /* Pointer to the B-tree leaf node */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); HDassert(leaf); HDassert(leaf->hdr); + HDassert(image_len); - if(leaf->cache_info.is_dirty) { - uint8_t *p; /* Pointer into raw data buffer */ - uint8_t *native; /* Pointer to native keys */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - unsigned u; /* Local index variable */ - - /* Set the B-tree header's file context for this operation */ - leaf->hdr->f = f; - - p = leaf->hdr->page; - - /* magic number */ - HDmemcpy(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* version # */ - *p++ = H5B2_LEAF_VERSION; - - /* b-tree type */ - *p++ = leaf->hdr->cls->id; - HDassert((size_t)(p - leaf->hdr->page) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); + /* Set the image length size */ + *image_len = leaf->hdr->node_size; - /* Serialize records for leaf node */ - native = leaf->leaf_native; - for(u = 0; u < leaf->nrec; u++) { - /* Encode record */ - if((leaf->hdr->cls->encode)(p, native, leaf->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") - - /* Move to next record */ - p += leaf->hdr->rrec_size; - native += leaf->hdr->cls->nrec_size; - } /* end for */ - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(leaf->hdr->page, (size_t)(p - leaf->hdr->page), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the B-tree leaf node */ - HDassert((size_t)(p - leaf->hdr->page) <= leaf->hdr->node_size); - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, leaf->hdr->node_size, dxpl_id, leaf->hdr->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree leaf node to disk") - - leaf->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5B2__cache_leaf_dest(f, leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2__cache_leaf_flush() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B2__cache_leaf_image_len() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_leaf_dest + * Function: H5B2__cache_leaf_serialize * - * Purpose: Destroys a B-tree leaf node in memory. + * Purpose: Serializes a B-tree leaf node for writing to disk. * * Return: Non-negative on success/Negative on failure * @@ -1027,102 +920,90 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) +H5B2__cache_leaf_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5B2_leaf_t *leaf = (H5B2_leaf_t *)_thing; /* Pointer to the B-tree leaf node */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint8_t *native; /* Pointer to native keys */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* Check arguments */ + /* check arguments */ HDassert(f); + HDassert(image); HDassert(leaf); HDassert(leaf->hdr); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!leaf->cache_info.free_file_space_on_destroy || H5F_addr_defined(leaf->cache_info.addr)); - - /* Check for freeing file space for B-tree leaf node */ - if(leaf->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, leaf->cache_info.addr, (hsize_t)leaf->hdr->node_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree leaf node") - } /* end if */ + /* magic number */ + HDmemcpy(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Destroy v2 b-tree leaf node */ - if(H5B2__leaf_free(leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") + /* version # */ + *image++ = H5B2_LEAF_VERSION; -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_leaf_dest() */ + /* B-tree type */ + *image++ = leaf->hdr->cls->id; + HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); - -/*------------------------------------------------------------------------- - * Function: H5B2__cache_leaf_clear - * - * Purpose: Mark a B-tree leaf node in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 2 2005 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) -{ - herr_t ret_value = SUCCEED; + /* Serialize records for leaf node */ + native = leaf->leaf_native; + for(u = 0; u < leaf->nrec; u++) { + /* Encode record */ + if((leaf->hdr->cls->encode)(image, native, leaf->hdr->cb_ctx) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") - FUNC_ENTER_STATIC + /* Move to next record */ + image += leaf->hdr->rrec_size; + native += leaf->hdr->cls->nrec_size; + } /* end for */ - /* - * Check arguments. - */ - HDassert(leaf); + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)((const uint8_t *)image - (const uint8_t *)_image), 0); - /* Reset the dirty flag. */ - leaf->cache_info.is_dirty = FALSE; + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - if(destroy) - if(H5B2__cache_leaf_dest(f, leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2__cache_leaf_clear() */ +} /* H5B2__cache_leaf_serialize() */ /*------------------------------------------------------------------------- - * Function: H5B2__cache_leaf_size + * Function: H5B2__cache_leaf_free_icr * - * Purpose: Compute the size in bytes of a B-tree leaf node - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 2 2005 + * Programmer: Mike McGreevy + * mcgreevy@hdfgroup.org + * June 18, 2008 * *------------------------------------------------------------------------- */ static herr_t -H5B2__cache_leaf_size(const H5F_t H5_ATTR_UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) +H5B2__cache_leaf_free_icr(void *thing) { - FUNC_ENTER_STATIC_NOERR + herr_t ret_value = SUCCEED; /* Return value */ - /* check arguments */ - HDassert(leaf); - HDassert(leaf->hdr); - HDassert(size_ptr); + FUNC_ENTER_STATIC - /* Set size value */ - *size_ptr = leaf->hdr->node_size; + /* Check arguments */ + HDassert(thing); - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2__cache_leaf_size() */ + /* Destroy v2 B-tree leaf node */ + if(H5B2__leaf_free((H5B2_leaf_t *)thing) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5B2__cache_leaf_free_icr() */ diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 50283f8..6e1250b 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -123,8 +123,9 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, * Load the B-tree header. */ cache_udata.f = f; + cache_udata.addr = addr; cache_udata.ctx_udata = dbg_ctx; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC_READ))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header") /* Set file pointer for this B-tree operation */ @@ -241,8 +242,9 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, * Load the B-tree header. */ cache_udata.f = f; + cache_udata.addr = hdr_addr; cache_udata.ctx_udata = dbg_ctx; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header") /* Set file pointer for this B-tree operation */ @@ -253,7 +255,7 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, */ H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t); H5_CHECK_OVERFLOW(depth, unsigned, uint16_t); - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, addr, (uint16_t)nrec, (uint16_t)depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, addr, (uint16_t)nrec, (uint16_t)depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node") /* Print opening message */ @@ -375,8 +377,9 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent * Load the B-tree header. */ cache_udata.f = f; + cache_udata.addr = hdr_addr; cache_udata.ctx_udata = dbg_ctx; - if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC_READ))) + if(NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree header") /* Set file pointer for this B-tree operation */ @@ -386,7 +389,7 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent * Load the B-tree leaf node */ H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t); - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, addr, (uint16_t)nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, addr, (uint16_t)nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Print opening message */ diff --git a/src/H5B2int.c b/src/H5B2int.c index 638b4b3..0f884c2 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -215,9 +215,9 @@ H5B2__split1(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Protect both leaves */ - if(NULL == (left_int = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (left_int = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (right_int = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (right_int = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* More setup for child nodes */ @@ -244,9 +244,9 @@ H5B2__split1(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Protect both leaves */ - if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE))) + if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for child nodes */ @@ -403,7 +403,7 @@ H5B2__split_root(H5B2_hdr_t *hdr, hid_t dxpl_id) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node") /* Protect new root node */ - if(NULL == (new_root = H5B2__protect_internal(hdr, dxpl_id, hdr->root.addr, hdr->root.node_nrec, hdr->depth, H5AC_WRITE))) + if(NULL == (new_root = H5B2__protect_internal(hdr, dxpl_id, hdr->root.addr, hdr->root.node_nrec, hdr->depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Set first node pointer in root node to old root node pointer info */ @@ -467,9 +467,9 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock left & right B-tree child nodes */ - if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for child nodes */ @@ -492,9 +492,9 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock left & right B-tree child nodes */ - if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE))) + if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for child nodes */ @@ -704,11 +704,11 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock B-tree child nodes */ - if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (middle_internal = H5B2__protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (middle_internal = H5B2__protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* More setup for child nodes */ @@ -737,11 +737,11 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock B-tree child nodes */ - if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE))) + if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (middle_leaf = H5B2__protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (middle_leaf = H5B2__protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE))) + if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for child nodes */ @@ -1084,9 +1084,9 @@ H5B2__merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock left & right B-tree child nodes */ - if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* More setup for accessing child node information */ @@ -1109,9 +1109,9 @@ H5B2__merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock left & right B-tree child nodes */ - if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE))) + if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for accessing child node information */ @@ -1246,11 +1246,11 @@ H5B2__merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock B-tree child nodes */ - if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (left_internal = H5B2__protect_internal(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (middle_internal = H5B2__protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (middle_internal = H5B2__protect_internal(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") - if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (right_internal = H5B2__protect_internal(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* More setup for accessing child node information */ @@ -1279,11 +1279,11 @@ H5B2__merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, right_addr = internal->node_ptrs[idx + 1].addr; /* Lock B-tree child nodes */ - if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC_WRITE))) + if(NULL == (left_leaf = H5B2__protect_leaf(hdr, dxpl_id, left_addr, internal->node_ptrs[idx - 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (middle_leaf = H5B2__protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (middle_leaf = H5B2__protect_leaf(hdr, dxpl_id, middle_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") - if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC_WRITE))) + if(NULL == (right_leaf = H5B2__protect_leaf(hdr, dxpl_id, right_addr, internal->node_ptrs[idx + 1].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for accessing child node information */ @@ -1460,7 +1460,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, child_addr = internal->node_ptrs[idx].addr; /* Lock B-tree child nodes */ - if(NULL == (child_internal = H5B2__protect_internal(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC_WRITE))) + if(NULL == (child_internal = H5B2__protect_internal(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, (uint16_t)(depth - 1), H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* More setup for accessing child node information */ @@ -1475,7 +1475,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, child_addr = internal->node_ptrs[idx].addr; /* Lock B-tree child node */ - if(NULL == (child_leaf = H5B2__protect_leaf(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, H5AC_WRITE))) + if(NULL == (child_leaf = H5B2__protect_leaf(hdr, dxpl_id, child_addr, internal->node_ptrs[idx].node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* More setup for accessing child node information */ @@ -1538,7 +1538,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr HDassert(H5F_addr_defined(curr_node_ptr->addr)); /* Lock current B-tree node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_WRITE))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Must have a leaf node with enough space to insert a record now */ @@ -1637,7 +1637,7 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, HDassert(H5F_addr_defined(curr_node_ptr->addr)); /* Lock current B-tree node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Split or redistribute child node pointers, if necessary */ @@ -1834,7 +1834,7 @@ done: */ H5B2_leaf_t * H5B2__protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, uint16_t nrec, - H5AC_protect_t rw) + unsigned flags) { H5B2_leaf_cache_ud_t udata; /* User-data for callback */ H5B2_leaf_t *ret_value; /* Return value */ @@ -1845,13 +1845,16 @@ H5B2__protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, uint16_t nrec, HDassert(hdr); HDassert(H5F_addr_defined(addr)); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data for callback */ udata.f = hdr->f; udata.hdr = hdr; H5_CHECKED_ASSIGN(udata.nrec, uint16_t, nrec, unsigned) /* Protect the leaf node */ - if(NULL == (ret_value = (H5B2_leaf_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_LEAF, addr, &udata, rw))) + if(NULL == (ret_value = (H5B2_leaf_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_LEAF, addr, &udata, flags))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree leaf node") done: @@ -1953,7 +1956,7 @@ done: */ H5B2_internal_t * H5B2__protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, - uint16_t nrec, uint16_t depth, H5AC_protect_t rw) + uint16_t nrec, uint16_t depth, unsigned flags) { H5B2_internal_cache_ud_t udata; /* User data to pass through to cache 'deserialize' callback */ H5B2_internal_t *ret_value; /* Return value */ @@ -1965,6 +1968,9 @@ H5B2__protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, HDassert(H5F_addr_defined(addr)); HDassert(depth > 0); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data for callback */ udata.f = hdr->f; udata.hdr = hdr; @@ -1972,7 +1978,7 @@ H5B2__protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, udata.depth = depth; /* Protect the internal node */ - if(NULL == (ret_value = (H5B2_internal_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_INT, addr, &udata, rw))) + if(NULL == (ret_value = (H5B2_internal_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_BT2_INT, addr, &udata, flags))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree internal node") done: @@ -2021,7 +2027,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, H5B2_internal_t *internal; /* Pointer to internal node */ /* Lock the current B-tree node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Set up information about current node */ @@ -2040,7 +2046,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, H5B2_leaf_t *leaf; /* Pointer to leaf node */ /* Lock the current B-tree node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Set up information about current node */ @@ -2125,7 +2131,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr /* Lock current B-tree node */ leaf_addr = curr_node_ptr->addr; - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Sanity check number of records */ @@ -2234,7 +2240,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, /* Lock current B-tree node */ internal_addr = curr_node_ptr->addr; - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Determine the correct number of records to merge at */ @@ -2443,7 +2449,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, /* Lock B-tree leaf node */ leaf_addr = curr_node_ptr->addr; - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC_WRITE))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, leaf_addr, curr_node_ptr->node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Sanity check number of records */ @@ -2551,7 +2557,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, /* Lock current B-tree node */ internal_addr = curr_node_ptr->addr; - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC_WRITE))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, internal_addr, curr_node_ptr->node_nrec, depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") HDassert(internal->nrec == curr_node_ptr->node_nrec); HDassert(depth == hdr->depth || internal->nrec > 1); @@ -2827,7 +2833,7 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_p HDassert(op); /* Lock current B-tree node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Locate node pointer for child */ @@ -2914,7 +2920,7 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, HDassert(op); /* Lock current B-tree node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, curr_node_ptr->node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Locate node pointer for child */ @@ -2987,7 +2993,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, unsigned u; /* Local index */ /* Lock the current B-tree node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_WRITE))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Set up information about current node */ @@ -3004,7 +3010,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, H5B2_leaf_t *leaf; /* Pointer to leaf node */ /* Lock the current B-tree node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC_WRITE))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Set up information about current node */ @@ -3063,7 +3069,7 @@ H5B2__node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth, HDassert(depth > 0); /* Lock the current B-tree node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node->addr, curr_node->node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") /* Recursively descend into child nodes, if we are above the "twig" level in the B-tree */ diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index a2d32e6..b13c58d 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -231,6 +231,7 @@ typedef enum H5B2_nodepos_t { /* Callback info for loading a free space header into the cache */ typedef struct H5B2_hdr_cache_ud_t { H5F_t *f; /* File that v2 b-tree header is within */ + haddr_t addr; /* Address of B-tree header in the file */ void *ctx_udata; /* User-data for protecting */ } H5B2_hdr_cache_ud_t; @@ -305,11 +306,11 @@ H5_DLL herr_t H5B2__hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id); /* Routines for operating on leaf nodes */ H5B2_leaf_t *H5B2__protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, - uint16_t nrec, H5AC_protect_t rw); + uint16_t nrec, unsigned flags); /* Routines for operating on internal nodes */ H5_DLL H5B2_internal_t *H5B2__protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, - haddr_t addr, uint16_t nrec, uint16_t depth, H5AC_protect_t rw); + haddr_t addr, uint16_t nrec, uint16_t depth, unsigned flags); /* Routines for allocating nodes */ H5_DLL herr_t H5B2__split_root(H5B2_hdr_t *hdr, hid_t dxpl_id); @@ -347,7 +348,7 @@ H5_DLL herr_t H5B2__neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, /* Routines for removing records */ H5_DLL herr_t H5B2__remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, void *swap_loc, uint16_t depth, - H5AC_info_t *parent_cache_info, hbool_t *parent_cache_info_dirtied_ptr, + H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op, void *op_data); H5_DLL herr_t H5B2__remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, @@ -355,8 +356,8 @@ H5_DLL herr_t H5B2__remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, void *udata, H5B2_remove_t op, void *op_data); H5_DLL herr_t H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased, void *swap_loc, uint16_t depth, - H5AC_info_t *parent_cache_info, hbool_t *parent_cache_info_dirtied_ptr, - H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t idx, + H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr, + H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n, H5B2_remove_t op, void *op_data); H5_DLL herr_t H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, diff --git a/src/H5B2test.c b/src/H5B2test.c index 1d31af8..35771f2 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -430,7 +430,7 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_node_ptr_t next_node_ptr; /* Node pointer info for next node */ /* Lock B-tree current node */ - if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC_READ))) + if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, depth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") /* Locate node pointer for child */ @@ -470,7 +470,7 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */ /* Lock B-tree leaf node */ - if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC_READ))) + if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr.addr, curr_node_ptr.node_nrec, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") /* Locate record */ diff --git a/src/H5Bcache.c b/src/H5Bcache.c index a161e88..dfa4dab 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -37,7 +37,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Bpkg.h" /* B-link trees */ #include "H5Eprivate.h" /* Error handling */ -#include "H5MFprivate.h" /* File memory management */ /****************/ @@ -55,11 +54,14 @@ /********************/ /* Metadata cache callbacks */ -static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5B__dest(H5F_t *f, H5B_t *bt); -static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy); -static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); +static herr_t H5B__get_load_size(const void *udata, size_t *image_len); +static void *H5B__deserialize(const void *image, size_t len, void *udata, + hbool_t *dirty); +static herr_t H5B__image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5B__serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5B__free_icr(void *thing); /*********************/ @@ -68,13 +70,19 @@ static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_pt /* H5B inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT[1] = {{ - H5AC_BT_ID, - (H5AC_load_func_t)H5B__load, - (H5AC_flush_func_t)H5B__flush, - (H5AC_dest_func_t)H5B__dest, - (H5AC_clear_func_t)H5B__clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B__compute_size, + H5AC_BT_ID, /* Metadata client ID */ + "v1 B-tree", /* Metadata client name (for debugging) */ + H5FD_MEM_BTREE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5B__get_load_size, /* 'get_load_size' callback */ + H5B__deserialize, /* 'deserialize' callback */ + H5B__image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5B__serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5B__free_icr, /* 'free_icr' callback */ + NULL, /* 'clear" callback */ + NULL, /* 'fsf_size' callback */ }}; /*******************/ @@ -84,35 +92,71 @@ const H5AC_class_t H5AC_BT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B__load + * Function: H5B__get_load_size * - * Purpose: Loads a B-tree node from the disk. + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 18, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5B__get_load_size(const void *_udata, size_t *image_len) +{ + const H5B_cache_ud_t *udata = (const H5B_cache_ud_t *)_udata; /* User data for callback */ + H5B_shared_t *shared; /* Pointer to shared B-tree info */ + + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(udata); + HDassert(image_len); + + /* Get shared info for B-tree */ + shared = (H5B_shared_t *)H5UC_GET_OBJ(udata->rc_shared); + HDassert(shared); + + /* Set the image length size */ + *image_len = shared->sizeof_rnode; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B__get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5B__deserialize + * + * Purpose: Deserialize the data structure from disk. * * Return: Success: Pointer to a new B-tree node. * Failure: NULL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 24, 2008 * *------------------------------------------------------------------------- */ -static H5B_t * -H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5B__deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */ H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into image buffer */ uint8_t *native; /* Pointer to native keys */ unsigned u; /* Local index variable */ H5B_t *ret_value; /* Return value */ FUNC_ENTER_STATIC - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* check arguments */ + HDassert(image); HDassert(udata); /* Allocate the B-tree node in memory */ @@ -134,53 +178,50 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) if(NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for child addresses") - if(H5F_block_read(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree node") - - /* Set the pointer into the raw data buffer */ - p = shared->page; - /* magic number */ - if(HDmemcmp(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature") - p += 4; + image += H5_SIZEOF_MAGIC; /* node type and level */ - if(*p++ != (uint8_t)udata->type->id) + if(*image++ != (uint8_t)udata->type->id) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type") - bt->level = *p++; + bt->level = *image++; /* entries used */ - UINT16DECODE(p, bt->nchildren); + UINT16DECODE(image, bt->nchildren); /* Check if bt->nchildren is greater than two_k */ if(bt->nchildren > shared->two_k) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum") /* sibling pointers */ - H5F_addr_decode(udata->f, (const uint8_t **)&p, &(bt->left)); - H5F_addr_decode(udata->f, (const uint8_t **)&p, &(bt->right)); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &(bt->left)); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &(bt->right)); /* the child/key pairs */ native = bt->native; for(u = 0; u < bt->nchildren; u++) { /* Decode native key value */ - if((udata->type->decode)(shared, p, native) < 0) + if((udata->type->decode)(shared, image, native) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") - p += shared->sizeof_rkey; + image += shared->sizeof_rkey; native += udata->type->sizeof_nkey; /* Decode address value */ - H5F_addr_decode(udata->f, (const uint8_t **)&p, bt->child + u); + H5F_addr_decode(udata->f, (const uint8_t **)&image, bt->child + u); } /* end for */ /* Decode final key */ if(bt->nchildren > 0) { /* Decode native key value */ - if((udata->type->decode)(shared, p, native) < 0) + if((udata->type->decode)(shared, image, native) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") } /* end if */ + /* Sanity check */ + HDassert((size_t)((const uint8_t *)image - (const uint8_t *)_image) <= len); + /* Set return value */ ret_value = bt; @@ -190,223 +231,151 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B__deserialize() */ /*------------------------------------------------------------------------- - * Function: H5B__flush + * Function: H5B__image_len * - * Purpose: Flushes a dirty B-tree node to disk. + * Purpose: Compute the size of the data structure on disk. * * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 20, 2010 * *------------------------------------------------------------------------- */ static herr_t -H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned H5_ATTR_UNUSED * flags_ptr) +H5B__image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { + const H5B_t *bt = (const H5B_t *)_thing; /* Pointer to the B-tree node */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ - herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(bt); + HDassert(image_len); + + /* Get shared info for B-tree */ shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); - HDassert(shared->type); - HDassert(shared->type->encode); - if(bt->cache_info.is_dirty) { - uint8_t *p; /* Pointer into raw data buffer */ - uint8_t *native; /* Pointer to native keys */ - unsigned u; /* Local index variable */ - - p = shared->page; - - /* magic number */ - HDmemcpy(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += 4; - - /* node type and level */ - *p++ = (uint8_t)shared->type->id; - H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t); - *p++ = (uint8_t)bt->level; - - /* entries used */ - UINT16ENCODE(p, bt->nchildren); - - /* sibling pointers */ - H5F_addr_encode(f, &p, bt->left); - H5F_addr_encode(f, &p, bt->right); - - /* child keys and pointers */ - native = bt->native; - for(u = 0; u < bt->nchildren; ++u) { - /* encode the key */ - if(shared->type->encode(shared, p, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") - p += shared->sizeof_rkey; - native += shared->type->sizeof_nkey; - - /* encode the child address */ - H5F_addr_encode(f, &p, bt->child[u]); - } /* end for */ - if(bt->nchildren > 0) { - /* Encode the final key */ - if(shared->type->encode(shared, p, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") - } /* end if */ - - /* - * Write the disk page. We always write the header, but we don't - * bother writing data for the child entries that don't exist or - * for the final unchanged children. - */ - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree node to disk") - - bt->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5B__dest(f, bt) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") + /* Set the image length size */ + *image_len = shared->sizeof_rnode; -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B__flush() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5B__image_len() */ /*------------------------------------------------------------------------- - * Function: H5B__dest + * Function: H5B__serialize * - * Purpose: Destroys a B-tree node in memory. + * Purpose: Serialize the data structure for writing to disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 24, 2008 * *------------------------------------------------------------------------- */ static herr_t -H5B__dest(H5F_t *f, H5B_t *bt) +H5B__serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5B_t *bt = (H5B_t *)_thing; /* Pointer to the B-tree node */ + H5B_shared_t *shared; /* Pointer to shared B-tree info */ + uint8_t *image = (uint8_t *)_image; /* Pointer into image buffer */ + uint8_t *native; /* Pointer to native keys */ + unsigned u; /* Local index counter */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(f); + /* check arguments */ + HDassert(image); HDassert(bt); HDassert(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); + HDassert(shared); + HDassert(shared->type); + HDassert(shared->type->encode); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!bt->cache_info.free_file_space_on_destroy || H5F_addr_defined(bt->cache_info.addr)); + /* magic number */ + HDmemcpy(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += 4; - /* Check for freeing file space for B-tree node */ - if(bt->cache_info.free_file_space_on_destroy) { - H5B_shared_t *shared; /* Pointer to shared B-tree info */ + /* node type and level */ + *image++ = (uint8_t)shared->type->id; + H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t); + *image++ = (uint8_t)bt->level; - /* Get the pointer to the shared B-tree info */ - shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); - HDassert(shared); + /* entries used */ + UINT16ENCODE(image, bt->nchildren); + + /* sibling pointers */ + H5F_addr_encode(f, &image, bt->left); + H5F_addr_encode(f, &image, bt->right); - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, bt->cache_info.addr, (hsize_t)shared->sizeof_rnode) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free B-tree node") + /* child keys and pointers */ + native = bt->native; + for(u = 0; u < bt->nchildren; ++u) { + /* encode the key */ + if(shared->type->encode(shared, image, native) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + image += shared->sizeof_rkey; + native += shared->type->sizeof_nkey; + + /* encode the child address */ + H5F_addr_encode(f, &image, bt->child[u]); + } /* end for */ + if(bt->nchildren > 0) { + /* Encode the final key */ + if(shared->type->encode(shared, image, native) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") } /* end if */ - /* Destroy B-tree node */ - if(H5B__node_dest(bt) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") + /* Sanity check */ + HDassert((size_t)((const uint8_t *)image - (const uint8_t *)_image) <= len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B__dest() */ +} /* end H5B__serialize() */ /*------------------------------------------------------------------------- - * Function: H5B__clear + * Function: H5B__free_icr * - * Purpose: Mark a B-tree node in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data structure * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 20 2003 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 26, 2008 * *------------------------------------------------------------------------- */ static herr_t -H5B__clear(H5F_t *f, H5B_t *bt, hbool_t destroy) +H5B__free_icr(void *thing) { - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(bt); - - /* Reset the dirty flag. */ - bt->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(thing); - if(destroy) - if(H5B__dest(f, bt) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") + /* Destroy B-tree node */ + if(H5B__node_dest((H5B_t *)thing) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B__clear() */ - - -/*------------------------------------------------------------------------- - * Function: H5B__compute_size - * - * Purpose: Compute the size in bytes of the specified instance of - * H5B_t on disk, and return it in *len_ptr. On failure, - * the value of *len_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/13/04 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5B__compute_size(const H5F_t H5_ATTR_UNUSED *f, const H5B_t *bt, size_t *size_ptr) -{ - H5B_shared_t *shared; /* Pointer to shared B-tree info */ - - FUNC_ENTER_STATIC_NOERR - - /* check arguments */ - HDassert(f); - HDassert(bt); - HDassert(bt->rc_shared); - shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); - HDassert(shared); - HDassert(shared->type); - HDassert(size_ptr); - - /* Set size value */ - *size_ptr = shared->sizeof_rnode; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B__compute_size() */ +} /* end H5B__free_icr() */ diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index 526a647..e6d54dc 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -89,7 +89,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ))) + if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") /* @@ -206,7 +206,7 @@ H5B__assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void cache_udata.f = f; cache_udata.type = type; cache_udata.rc_shared = rc_shared; - bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ); + bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG); HDassert(bt); shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); @@ -227,7 +227,7 @@ H5B__assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void * test. */ for(ncell = 0; cur; ncell++) { - bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, &cache_udata, H5AC_READ); + bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG); HDassert(bt); /* Check node header */ diff --git a/src/H5C.c b/src/H5C.c index 5cdd65f..fc4e8a5 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -85,12 +85,23 @@ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ #include "H5SLprivate.h" /* Skip lists */ /* + * Private macros. + */ +#if H5C_DO_MEMORY_SANITY_CHECKS +#define H5C_IMAGE_EXTRA_SPACE 8 +#define H5C_IMAGE_SANITY_VALUE "DeadBeef" +#else /* H5C_DO_MEMORY_SANITY_CHECKS */ +#define H5C_IMAGE_EXTRA_SPACE 0 +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ + +/* * Private file-scope variables. */ @@ -103,27 +114,21 @@ H5FL_DEFINE_STATIC(H5C_t); */ static herr_t H5C__auto_adjust_cache_size(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr); + hid_t dxpl_id, + hbool_t write_permitted); static herr_t H5C__autoadjust__ageout(H5F_t * f, + hid_t dxpl_id, double hit_rate, enum H5C_resize_status * status_ptr, size_t * new_max_cache_size_ptr, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr); + hbool_t write_permitted); static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr); static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr); + hid_t dxpl_id, + hbool_t write_permitted); static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr); @@ -135,19 +140,16 @@ static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr, size_t old_entry_size, size_t new_entry_size); -static herr_t H5C_flush_single_entry(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - const H5C_class_t * type_ptr, - haddr_t addr, - unsigned flags, - hbool_t * first_flush_ptr, - hbool_t del_entry_from_slist_on_destroy); +static herr_t H5C_flush_single_entry(const H5F_t * f, + hid_t dxpl_id, + haddr_t addr, + unsigned flags, + hbool_t del_entry_from_slist_on_destroy, + int64_t *entry_size_change_ptr); -static herr_t H5C_flush_invalidate_cache(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - unsigned flags); +static herr_t H5C_flush_invalidate_cache(const H5F_t * f, + hid_t dxpl_id, + unsigned flags); static void * H5C_load_entry(H5F_t * f, hid_t dxpl_id, @@ -156,19 +158,16 @@ static void * H5C_load_entry(H5F_t * f, void * udata); static herr_t H5C_make_space_in_cache(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - size_t space_needed, - hbool_t write_permitted, - hbool_t * first_flush_ptr); + hid_t dxpl_id, + size_t space_needed, + hbool_t write_permitted); static herr_t H5C_tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id); static herr_t H5C_flush_tagged_entries(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, H5C_t * cache_ptr, haddr_t tag); @@ -176,20 +175,29 @@ static herr_t H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag); static herr_t H5C_flush_marked_entries(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, H5C_t * cache_ptr); #if H5C_DO_TAGGING_SANITY_CHECKS static herr_t H5C_verify_tag(int id, haddr_t tag); #endif +#if H5C_DO_SLIST_SANITY_CHECKS +static hbool_t H5C_entry_in_skip_list(H5C_t * cache_ptr, + H5C_cache_entry_t *target_ptr); +#endif /* H5C_DO_SLIST_SANITY_CHECKS */ + #if H5C_DO_EXTREME_SANITY_CHECKS static herr_t H5C_validate_lru_list(H5C_t * cache_ptr); static herr_t H5C_validate_pinned_entry_list(H5C_t * cache_ptr); static herr_t H5C_validate_protected_entry_list(H5C_t * cache_ptr); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ +#if 0 /* debugging routines */ +herr_t H5C_dump_cache(H5C_t * cache_ptr, const char * cache_name); +herr_t H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn); +#endif /* debugging routines */ + /**************************************************************************** * @@ -208,25 +216,53 @@ static herr_t H5C_validate_protected_entry_list(H5C_t * cache_ptr); #define H5C__EPOCH_MARKER_TYPE H5C__MAX_NUM_TYPE_IDS -static void *H5C_epoch_marker_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, - void *udata); -static herr_t H5C_epoch_marker_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, - unsigned *flags_ptr); -static herr_t H5C_epoch_marker_dest(H5F_t *f, void *thing); -static herr_t H5C_epoch_marker_clear(H5F_t *f, void *thing, hbool_t dest); -static herr_t H5C_epoch_marker_notify(H5C_notify_action_t action, void *thing); -static herr_t H5C_epoch_marker_size(const H5F_t *f, const void *thing, size_t *size_ptr); +static herr_t H5C__epoch_marker_get_load_size(const void *udata_ptr, + size_t *image_len_ptr); +static void * H5C__epoch_marker_deserialize(const void * image_ptr, + size_t len, + void * udata, + hbool_t * dirty_ptr); +static herr_t H5C__epoch_marker_image_len(const void * thing, + size_t *image_len_ptr, + hbool_t *compressed_ptr, + size_t *compressed_len_ptr); +static herr_t H5C__epoch_marker_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void * thing, + haddr_t addr, + size_t len, + size_t compressed_len, + haddr_t * new_addr_ptr, + size_t * new_len_ptr, + size_t * new_compressed_len_ptr, + unsigned * flags_ptr); +static herr_t H5C__epoch_marker_serialize(const H5F_t *f, + void * image_ptr, + size_t len, + void * thing); +static herr_t H5C__epoch_marker_notify(H5C_notify_action_t action, void *thing); +static herr_t H5C__epoch_marker_free_icr(void * thing); + +static herr_t H5C__epoch_marker_clear(const H5F_t *f, void * thing, + hbool_t about_to_destroy); +static herr_t H5C__epoch_marker_fsf_size(const void H5_ATTR_UNUSED * thing, + size_t H5_ATTR_UNUSED * fsf_size_ptr); const H5C_class_t epoch_marker_class = { - /* id = */ H5C__EPOCH_MARKER_TYPE, - /* load = */ &H5C_epoch_marker_load, - /* flush = */ &H5C_epoch_marker_flush, - /* dest = */ &H5C_epoch_marker_dest, - /* clear = */ &H5C_epoch_marker_clear, - /* notify = */&H5C_epoch_marker_notify, - /* size = */ &H5C_epoch_marker_size + /* id = */ H5C__EPOCH_MARKER_TYPE, + /* name = */ "epoch marker", + /* mem_type = */ H5FD_MEM_DEFAULT, /* value doesn't matter */ + /* flags = */ H5AC__CLASS_NO_FLAGS_SET, + /* get_load_size = */ H5C__epoch_marker_get_load_size, + /* deserialize = */ H5C__epoch_marker_deserialize, + /* image_len = */ H5C__epoch_marker_image_len, + /* pre_serialize = */ H5C__epoch_marker_pre_serialize, + /* serialize = */ H5C__epoch_marker_serialize, + /* notify = */ H5C__epoch_marker_notify, + /* free_icr = */ H5C__epoch_marker_free_icr, + /* clear = */ H5C__epoch_marker_clear, + /* fsf_size = */ H5C__epoch_marker_fsf_size, }; @@ -239,107 +275,114 @@ const H5C_class_t epoch_marker_class = * JRM - 11/16/04 * ***************************************************************************/ - -static void * -H5C_epoch_marker_load(H5F_t H5_ATTR_UNUSED * f, - hid_t H5_ATTR_UNUSED dxpl_id, - haddr_t H5_ATTR_UNUSED addr, - void H5_ATTR_UNUSED * udata) +static herr_t +H5C__epoch_marker_get_load_size(const void H5_ATTR_UNUSED *udata_ptr, + size_t H5_ATTR_UNUSED *image_len_ptr) { - void * ret_value = NULL; /* Return value */ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - FUNC_ENTER_NOAPI_NOINIT + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "called unreachable fcn.") + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_get_load_size() */ -done: + +static void * +H5C__epoch_marker_deserialize(const void H5_ATTR_UNUSED * image_ptr, size_t H5_ATTR_UNUSED len, + void H5_ATTR_UNUSED * udata, hbool_t H5_ATTR_UNUSED * dirty_ptr) +{ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - FUNC_LEAVE_NOAPI(ret_value) -} + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); + FUNC_LEAVE_NOAPI(NULL) +} /* end H5C__epoch_marker_deserialize() */ static herr_t -H5C_epoch_marker_flush(H5F_t H5_ATTR_UNUSED *f, - hid_t H5_ATTR_UNUSED dxpl_id, - hbool_t H5_ATTR_UNUSED dest, - haddr_t H5_ATTR_UNUSED addr, - void H5_ATTR_UNUSED *thing, - unsigned H5_ATTR_UNUSED * flags_ptr) +H5C__epoch_marker_image_len(const void H5_ATTR_UNUSED *thing, + size_t H5_ATTR_UNUSED *image_len_ptr, hbool_t H5_ATTR_UNUSED *compressed_ptr, + size_t H5_ATTR_UNUSED *compressed_len_ptr) { - herr_t ret_value = FAIL; /* Return value */ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - FUNC_ENTER_NOAPI_NOINIT + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.") + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_image_len() */ -done: + +static herr_t +H5C__epoch_marker_pre_serialize(const H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, + void H5_ATTR_UNUSED *thing, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED len, + size_t H5_ATTR_UNUSED compressed_len, haddr_t H5_ATTR_UNUSED *new_addr_ptr, + size_t H5_ATTR_UNUSED *new_len_ptr, size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned H5_ATTR_UNUSED *flags_ptr) +{ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - FUNC_LEAVE_NOAPI(ret_value) -} + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_pre_serialize() */ static herr_t -H5C_epoch_marker_dest(H5F_t H5_ATTR_UNUSED * f, - void H5_ATTR_UNUSED * thing) +H5C__epoch_marker_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *image_ptr, + size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing) { - herr_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.") + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); -done: - - FUNC_LEAVE_NOAPI(ret_value) -} + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_serialize() */ + static herr_t -H5C_epoch_marker_clear(H5F_t H5_ATTR_UNUSED * f, - void H5_ATTR_UNUSED * thing, - hbool_t H5_ATTR_UNUSED dest) +H5C__epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, + void H5_ATTR_UNUSED * thing) { - herr_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.") + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); -done: - - FUNC_LEAVE_NOAPI(ret_value) -} + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_notify() */ + static herr_t -H5C_epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action, - void H5_ATTR_UNUSED * thing) +H5C__epoch_marker_free_icr(void H5_ATTR_UNUSED * thing) { - herr_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.") + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); -done: - FUNC_LEAVE_NOAPI(ret_value) -} + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_free_icr() */ -static herr_t -H5C_epoch_marker_size(const H5F_t H5_ATTR_UNUSED * f, - const void H5_ATTR_UNUSED * thing, - size_t H5_ATTR_UNUSED * size_ptr) + +static herr_t +H5C__epoch_marker_clear(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED * thing, hbool_t H5_ATTR_UNUSED about_to_destroy) { - herr_t ret_value = FAIL; /* Return value */ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ - FUNC_ENTER_NOAPI_NOINIT + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.") + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_clear() */ -done: + +static herr_t +H5C__epoch_marker_fsf_size(const void H5_ATTR_UNUSED * thing, size_t H5_ATTR_UNUSED *fsf_size_ptr) +{ + FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */ + + HERROR(H5E_CACHE, H5E_SYSTEM, "called unreachable fcn."); + + FUNC_LEAVE_NOAPI(FAIL) +} /* end H5C__epoch_marker_fsf_size() */ - FUNC_LEAVE_NOAPI(ret_value) -} /*------------------------------------------------------------------------- @@ -423,21 +466,46 @@ done: * Programmer: John Mainzer * 3/17/10 * + * Changes: Ported code to detect next entry status changes as the + * the result of a flush from the serial code in the scan of + * the LRU. Also added code to detect and adapt to the + * removal from the cache of the next entry in the scan of + * the LRU. + * + * Note that at present, all of these changes should not + * be required as the operations on entries as they are + * flushed that can cause these condiditions are not premitted + * in the parallel case. However, Quincey indicates that + * this may change, and thus has requested the modification. + * + * Note the assert(FALSE) in the if statement whose body + * restarts the scan of the LRU. As the body of the if + * statement should be unreachable, it should never be + * triggered until the constraints on the parallel case + * are relaxed. Please remove the assertion at that time. + * + * Also added warning on the Pinned Entry List scan, as it + * is potentially subject to the same issue. As there is + * no cognate of this scan in the serial code, I don't have + * a fix to port to it. + * + * JRM -- 4/10/19 + * *------------------------------------------------------------------------- */ #ifdef H5_HAVE_PARALLEL #define H5C_APPLY_CANDIDATE_LIST__DEBUG 0 herr_t H5C_apply_candidate_list(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, H5C_t * cache_ptr, int num_candidates, haddr_t * candidates_list_ptr, int mpi_rank, int mpi_size) { - hbool_t first_flush = FALSE; + hbool_t restart_scan; + hbool_t prev_is_dirty; int i; int m; int n; @@ -457,6 +525,7 @@ H5C_apply_candidate_list(H5F_t * f, int * candidate_assignment_table = NULL; haddr_t addr; H5C_cache_entry_t * clear_ptr = NULL; + H5C_cache_entry_t * next_ptr = NULL; H5C_cache_entry_t * entry_ptr = NULL; H5C_cache_entry_t * flush_ptr = NULL; H5C_cache_entry_t * delayed_ptr = NULL; @@ -634,16 +703,29 @@ H5C_apply_candidate_list(H5F_t * f, * should be reworked to account for additional cases. * ===================================================================== */ + HDassert(entries_to_flush >= 0); + + restart_scan = FALSE; entries_examined = 0; initial_list_len = cache_ptr->LRU_list_len; entry_ptr = cache_ptr->LRU_tail_ptr; /* Examine each entry in the LRU list */ - while((entry_ptr != NULL) && (entries_examined <= initial_list_len) && - ((entries_cleared + entries_flushed) < num_candidates)) { + while ( ( entry_ptr != NULL ) + && + ( entries_examined <= (entries_to_flush + 1) * initial_list_len ) + && + ( (entries_cleared + entries_flushed) < num_candidates ) ) { + + if ( entry_ptr->prev != NULL ) + prev_is_dirty = entry_ptr->prev->is_dirty; /* If this process needs to clear this entry. */ if(entry_ptr->clear_on_unprotect) { + + HDassert(entry_ptr->is_dirty); + + next_ptr = entry_ptr->next; entry_ptr->clear_on_unprotect = FALSE; clear_ptr = entry_ptr; entry_ptr = entry_ptr->prev; @@ -654,20 +736,26 @@ H5C_apply_candidate_list(H5F_t * f, (long long)clear_ptr->addr); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + /* No need to check for the next entry in the scan being + * removed from the cache, as this call to H5C_flush_single_entry() + * will not call either the pre_serialize or serialize callbacks. + */ + if(H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - clear_ptr->type, + dxpl_id, clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE) < 0) + TRUE, + NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end if */ /* Else, if this process needs to flush this entry. */ else if (entry_ptr->flush_immediately) { + HDassert(entry_ptr->is_dirty); + + next_ptr = entry_ptr->next; entry_ptr->flush_immediately = FALSE; flush_ptr = entry_ptr; entry_ptr = entry_ptr->prev; @@ -678,22 +766,94 @@ H5C_apply_candidate_list(H5F_t * f, (long long)flush_ptr->addr); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + /* reset entries_removed_counter and + * last_entry_removed_ptr prior to the call to + * H5C_flush_single_entry() so that we can spot + * unexpected removals of entries from the cache, + * and set the restart_scan flag if proceeding + * would be likely to cause us to scan an entry + * that is no longer in the cache. + * + * Note that as of this writing (April 2015) this + * case cannot occur in the parallel case. However + * Quincey is making noises about changing this, hence + * the insertion of this test. + * + * Note also that there is no test code to verify + * that this code actually works (although similar code + * in the serial version exists and is tested). + * + * Implementing a test will likely require implementing + * flush op like facilities in the parallel tests. At + * a guess this will not be terribly painful, but it + * will take a bit of time. + */ + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; + if(H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - flush_ptr->type, + dxpl_id, flush_ptr->addr, H5C__NO_FLAGS_SET, - &first_flush, - TRUE) < 0) + TRUE, + NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.") + + if ( ( cache_ptr->entries_removed_counter > 1 ) || + ( cache_ptr->last_entry_removed_ptr == entry_ptr ) ) + + restart_scan = TRUE; + } /* end else-if */ /* Otherwise, no action to be taken on this entry. Grab the next. */ else { entry_ptr = entry_ptr->prev; + + if ( entry_ptr != NULL ) + next_ptr = entry_ptr->next; + } /* end else */ + if ( ( entry_ptr != NULL ) + && + ( ( restart_scan ) + || + ( entry_ptr->is_dirty != prev_is_dirty ) + || + ( entry_ptr->next != next_ptr ) + || + ( entry_ptr->is_protected ) + || + ( entry_ptr->is_pinned ) + ) + ) { + + /* something has happened to the LRU -- start over + * from the tail. + * + * Recall that this code should be un-reachable at present, + * as all the operations by entries on flush that could cause + * it to be reachable are disallowed in the parallel case at + * present. Hence the following assertion which should be + * removed if the above changes. + */ + + HDassert( ! restart_scan ); + HDassert( entry_ptr->is_dirty == prev_is_dirty ); + HDassert( entry_ptr->next == next_ptr ); + HDassert( ! entry_ptr->is_protected ); + HDassert( ! entry_ptr->is_pinned ); + + HDassert(FALSE); /* see comment above */ + + restart_scan = FALSE; + entry_ptr = cache_ptr->LRU_tail_ptr; +/* + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) +*/ + } + entries_examined++; } /* end while */ @@ -705,6 +865,30 @@ H5C_apply_candidate_list(H5F_t * f, /* It is also possible that some of the cleared entries are on the * pinned list. Must scan that also. + * + * WARNING: + * + * As we now allow unpinning, and removal of other entries as a side + * effect of flushing an entry, it is possible that the next entry + * in a PEL scan could either be no longer pinned, or no longer in + * the cache by the time we get to it. + * + * At present, this is not possible in this case, as we disallow such + * operations in the parallel version of the library. However, Quincey + * has been making noises about relaxing this. If and when he does, + * we have a potential problem here. + * + * The same issue exists in the serial cache, and there are tests + * to detect this problem when it occurs, and adjust to it. As seen + * above in the LRU scan, I have ported such tests to the parallel + * code where a close cognate exists in the serial code. + * + * I haven't done so here, as there are no PEL scans where the problem + * can occur in the serial code. Needless to say, this will have to + * be repaired if the constraints on pre_serialize and serialize + * callbacks are relaxed in the parallel version of the metadata cache. + * + * JRM -- 4/1/15 */ #if H5C_APPLY_CANDIDATE_LIST__DEBUG @@ -772,14 +956,12 @@ H5C_apply_candidate_list(H5F_t * f, #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ if(H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - clear_ptr->type, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + dxpl_id, + clear_ptr->addr, + H5C__FLUSH_CLEAR_ONLY_FLAG, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end else-if */ /* Else, if this process needs to independently flush this entry. */ @@ -795,14 +977,12 @@ H5C_apply_candidate_list(H5F_t * f, #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ if(H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - flush_ptr->type, - flush_ptr->addr, - H5C__NO_FLAGS_SET, - &first_flush, - TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.") + dxpl_id, + flush_ptr->addr, + H5C__NO_FLAGS_SET, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end else-if */ } /* end if */ @@ -843,13 +1023,11 @@ H5C_apply_candidate_list(H5F_t * f, } /* end if */ if(H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - delayed_ptr->type, + dxpl_id, delayed_ptr->addr, H5C__NO_FLAGS_SET, - &first_flush, - TRUE) < 0) + TRUE, + NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry collectively.") @@ -1184,6 +1362,9 @@ H5C_create(size_t max_cache_size, /* Tagging Field Initializations */ cache_ptr->ignore_tags = FALSE; + cache_ptr->slist_changed = FALSE; + cache_ptr->slist_change_in_pre_serialize = FALSE; + cache_ptr->slist_change_in_serialize = FALSE; cache_ptr->slist_len = 0; cache_ptr->slist_size = (size_t)0; @@ -1197,6 +1378,9 @@ H5C_create(size_t max_cache_size, (cache_ptr->index)[i] = NULL; } + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; + cache_ptr->pl_len = 0; cache_ptr->pl_size = (size_t)0; cache_ptr->pl_head_ptr = NULL; @@ -1271,11 +1455,8 @@ H5C_create(size_t max_cache_size, /* Set non-zero/FALSE/NULL fields for epoch markers */ for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ ) { - (cache_ptr->epoch_marker_active)[i] = FALSE; -#ifndef NDEBUG ((cache_ptr->epoch_markers)[i]).magic = H5C__H5C_CACHE_ENTRY_T_MAGIC; -#endif /* NDEBUG */ ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i; ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class; } @@ -1530,9 +1711,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, *------------------------------------------------------------------------- */ herr_t -H5C_dest(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id) +H5C_dest(H5F_t * f, hid_t dxpl_id) { H5C_t * cache_ptr = f->shared->cache; herr_t ret_value = SUCCEED; /* Return value */ @@ -1544,8 +1723,7 @@ H5C_dest(H5F_t * f, HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); /* Flush and invalidate all cache entries */ - if(H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id, - H5C__NO_FLAGS_SET) < 0 ) + if(H5C_flush_invalidate_cache(f, dxpl_id, H5C__NO_FLAGS_SET) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") if(cache_ptr->slist_ptr != NULL) { @@ -1570,7 +1748,9 @@ H5C_dest(H5F_t * f, #endif /* H5C_DO_SANITY_CHECKS */ #endif /* NDEBUG */ +#ifndef NDEBUG cache_ptr->magic = 0; +#endif /* NDEBUG */ cache_ptr = H5FL_FREE(H5C_t, cache_ptr); @@ -1595,17 +1775,16 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C_expunge_entry(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - const H5C_class_t * type, - haddr_t addr, - unsigned flags) +H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, + haddr_t addr, unsigned flags) { H5C_t * cache_ptr; - herr_t result; - hbool_t first_flush = TRUE; H5C_cache_entry_t * entry_ptr = NULL; + unsigned flush_flags = (H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG); +#if H5C_DO_SANITY_CHECKS + hbool_t entry_was_dirty; + hsize_t entry_size; +#endif /* H5C_DO_SANITY_CHECKS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1616,8 +1795,6 @@ H5C_expunge_entry(H5F_t * f, HDassert(cache_ptr); HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); HDassert(type); - HDassert(type->clear); - HDassert(type->dest); HDassert(H5F_addr_defined(addr)); #if H5C_DO_EXTREME_SANITY_CHECKS @@ -1641,27 +1818,34 @@ H5C_expunge_entry(H5F_t * f, if(entry_ptr->is_pinned) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is pinned.") - /* Pass along 'free file space' flag to cache client */ - entry_ptr->free_file_space_on_destroy = ( (flags & H5C__FREE_FILE_SPACE_FLAG) != 0 ); - /* If we get this far, call H5C_flush_single_entry() with the * H5C__FLUSH_INVALIDATE_FLAG and the H5C__FLUSH_CLEAR_ONLY_FLAG. * This will clear the entry, and then delete it from the cache. */ - result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, - entry_ptr->addr, - H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE); - if ( result < 0 ) { + /* Pass along 'free file space' flag to cache client. */ + flush_flags |= (flags & H5C__FREE_FILE_SPACE_FLAG); + +#if H5C_DO_SANITY_CHECKS + entry_was_dirty = entry_ptr->is_dirty; + entry_size = entry_ptr->size; +#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ + + if(H5C_flush_single_entry(f, dxpl_id, entry_ptr->addr, flush_flags, TRUE, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_flush_single_entry() failed.") - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \ - "H5C_flush_single_entry() failed.") +#if H5C_DO_SANITY_CHECKS + if ( entry_was_dirty ) + { + /* we have just removed an entry from the skip list. Thus + * we must touch up cache_ptr->slist_len_increase and + * cache_ptr->slist_size_increase to keep from skewing + * the sanity checks on flushes. + */ + cache_ptr->slist_len_increase -= 1; + cache_ptr->slist_size_increase -= (int64_t)(entry_size); } +#endif /* H5C_DO_SANITY_CHECKS */ done: #if H5C_DO_EXTREME_SANITY_CHECKS @@ -1698,10 +1882,24 @@ done: * Programmer: John Mainzer * 6/2/04 * + * Changes: Modified function to test for slist chamges in + * pre_serialize and serialize callbacks, and re-start + * scans through the slist when such changes occur. + * + * This has been a potential problem for some time, + * and there has been code in this function to deal + * with elements of this issue. However the shift + * to the V3 cache in combination with the activities + * of some of the cache clients (in particular the + * free space manager and the fractal heap) have + * made this re-work necessary. + * + * JRM -- 12/13/14 + * *------------------------------------------------------------------------- */ herr_t -H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsigned flags) +H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) { H5C_t * cache_ptr = f->shared->cache; herr_t status; @@ -1709,9 +1907,9 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign hbool_t destroy; hbool_t flushed_entries_last_pass; hbool_t flush_marked_entries; - hbool_t first_flush = TRUE; hbool_t ignore_protected; hbool_t tried_to_flush_protected_entry = FALSE; + hbool_t restart_slist_scan; int32_t passes = 0; int32_t protected_entries = 0; H5SL_node_t * node_ptr = NULL; @@ -1722,6 +1920,10 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign int64_t flushed_entries_size = 0; int64_t initial_slist_len = 0; size_t initial_slist_size = 0; + int64_t entry_size_change; + int64_t * entry_size_change_ptr = &entry_size_change; +#else /* H5C_DO_SANITY_CHECKS */ + int64_t * entry_size_change_ptr = NULL; #endif /* H5C_DO_SANITY_CHECKS */ FUNC_ENTER_NOAPI(FAIL) @@ -1758,10 +1960,7 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign if ( destroy ) { - status = H5C_flush_invalidate_cache(f, - primary_dxpl_id, - secondary_dxpl_id, - flags); + status = H5C_flush_invalidate_cache(f, dxpl_id, flags); if ( status < 0 ) { @@ -1780,6 +1979,18 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign flushed_entries_last_pass = TRUE; + /* set the cache_ptr->slist_change_in_pre_serialize and + * cache_ptr->slist_change_in_serialize to false. + * + * These flags are set to TRUE by H5C_flush_single_entry if the + * slist is modified by a pre_serialize or serialize call respectively. + * H5C_flush_cache uses these flags to detect any modifications + * to the slist that might corrupt the scan of the slist -- and + * restart the scan in this event. + */ + cache_ptr->slist_change_in_pre_serialize = FALSE; + cache_ptr->slist_change_in_serialize = FALSE; + while ( ( passes < H5C__MAX_PASSES_ON_FLUSH ) && ( cache_ptr->slist_len != 0 ) && ( protected_entries == 0 ) && @@ -1797,18 +2008,6 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign { hbool_t flushed_during_dep_loop = FALSE; - /* Start at beginning of skip list each time */ - node_ptr = H5SL_first(cache_ptr->slist_ptr); - HDassert( node_ptr != NULL ); - - /* Get cache entry for this node */ - next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); - if ( NULL == next_entry_ptr ) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") - HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); - HDassert( next_entry_ptr->is_dirty ); - HDassert( next_entry_ptr->in_slist ); - #if H5C_DO_SANITY_CHECKS /* For sanity checking, try to verify that the skip list has * the expected size and number of entries at the end of each @@ -1818,8 +2017,10 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign * or may not flush all the entries in the slist. * * To make things more entertaining, with the advent of the - * fractal heap, the entry flush callback can cause entries - * to be dirtied, resized, and/or moved. + * fractal heap, the entry serialize callback can cause entries + * to be dirtied, resized, and/or moved. Also, the + * pre_serialize callback can result in an entry being + * removed from the cache via the take ownership flag. * * To deal with this, we first make note of the initial * skip list length and size: @@ -1834,7 +2035,8 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign flushed_entries_size = 0; /* As mentioned above, there is the possibility that - * entries will be dirtied, resized, and/or flushed during + * entries will be dirtied, resized, flushed, or removed + * from the cache via the take ownership flag during * our pass through the skip list. To capture the number * of entries added, and the skip list size delta, * zero the slist_len_increase and slist_size_increase of @@ -1851,53 +2053,60 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign */ #endif /* H5C_DO_SANITY_CHECKS */ - while ( node_ptr != NULL ) + restart_slist_scan = TRUE; + + while ( ( restart_slist_scan ) || ( node_ptr != NULL ) ) { - entry_ptr = next_entry_ptr; + if ( restart_slist_scan ) + { + restart_slist_scan = FALSE; - /* With the advent of the fractal heap, it is possible - * that the flush callback will dirty and/or resize - * other entries in the cache. In particular, while - * Quincey has promised me that this will never happen, - * it is possible that the flush callback for an - * entry may protect an entry that is not in the cache, - * perhaps causing the cache to flush and possibly - * evict the entry associated with node_ptr to make - * space for the new entry. - * - * Thus we do a bit of extra sanity checking on entry_ptr, - * and break out of this scan of the skip list if we - * detect minor problems. We have a bit of leaway on the - * number of passes though the skip list, so this shouldn't - * be an issue in the flush in and of itself, as it should - * be all but impossible for this to happen more than once - * in any flush. - * - * Observe that that breaking out of the scan early - * shouldn't break the sanity checks just after the end - * of this while loop. - * - * If an entry has merely been marked clean and removed from - * the s-list, we simply break out of the scan. - * - * If the entry has been evicted, we flag an error and - * exit. - */ -#ifndef NDEBUG - if ( entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) { + /* Start at beginning of skip list */ + node_ptr = H5SL_first(cache_ptr->slist_ptr); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry_ptr->magic is invalid ?!?!") + if ( node_ptr == NULL ) + { + /* the slist is empty -- break out of inner loop */ + break; + } + HDassert( node_ptr != NULL ); - } else -#endif /* NDEBUG */ - if ( ( ! entry_ptr->is_dirty ) || - ( ! entry_ptr->in_slist ) ) { + /* Get cache entry for this node */ + next_entry_ptr = + (H5C_cache_entry_t *)H5SL_item(node_ptr); - /* the s-list has been modified out from under us. - * break out of the loop. - */ - goto end_of_inner_loop;; + if(NULL == next_entry_ptr) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "next_entry_ptr == NULL ?!?!") + + HDassert( next_entry_ptr->magic == \ + H5C__H5C_CACHE_ENTRY_T_MAGIC ); + HDassert( next_entry_ptr->is_dirty ); + HDassert( next_entry_ptr->in_slist ); } + + entry_ptr = next_entry_ptr; + + /* With the advent of the fractal heap, the free space + * manager, and the version 3 cache, it is possible + * that the pre-serialize or serialize callback will + * dirty, resize, or take ownership of other entries + * in the cache. + * + * To deal with this, I have inserted code to detect any + * change in the skip list not directly under the control + * of this function. If such modifications are detected, + * we must re-start the scan of the skip list to avoid + * the possibility that the target of the next_entry_ptr + * may have been flushed or deleted from the cache. + * + * To verify that all such possibilities have been dealt + * with, we do a bit of extra sanity checking on + * entry_ptr. + */ + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(entry_ptr->in_slist); + HDassert(entry_ptr->is_dirty); /* increment node pointer now, before we delete its target * from the slist. @@ -1911,6 +2120,7 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); HDassert( next_entry_ptr->is_dirty ); HDassert( next_entry_ptr->in_slist ); + HDassert( entry_ptr != next_entry_ptr ); } else { next_entry_ptr = NULL; } @@ -1927,9 +2137,9 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign if ( entry_ptr->is_protected ) { - /* we probably have major problems -- but lets flush - * everything we can before we decide whether to flag - * an error. + /* we probably have major problems -- but lets + * flush everything we can before we decide + * whether to flag an error. */ tried_to_flush_protected_entry = TRUE; protected_entries++; @@ -1944,15 +2154,14 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign #if H5C_DO_SANITY_CHECKS flushed_entries_count++; flushed_entries_size += (int64_t)entry_ptr->size; + entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ status = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - NULL, - entry_ptr->addr, - flags, - &first_flush, - FALSE); + dxpl_id, + entry_ptr->addr, + flags, + FALSE, + entry_size_change_ptr); if ( status < 0 ) { /* This shouldn't happen -- if it does, @@ -1961,7 +2170,35 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ "dirty pinned entry flush failed.") } /* end if */ + +#if H5C_DO_SANITY_CHECKS + /* it is possible that the entry size changed + * during flush -- update flushed_entries_size + * to account for this. + */ + flushed_entries_size += entry_size_change; +#endif /* H5C_DO_SANITY_CHECKS */ + flushed_during_dep_loop = TRUE; + + if ((cache_ptr->slist_change_in_serialize) || + (cache_ptr->slist_change_in_pre_serialize)) + { + /* The slist has been modified by something + * other than the simple removal of the + * of the flushed entry after the flush. + * + * This has the potential to corrupt the + * scan through the slist, so restart it. + */ + restart_slist_scan = TRUE; + cache_ptr->slist_change_in_pre_serialize + = FALSE; + cache_ptr->slist_change_in_serialize + = FALSE; + + H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) + } } /* end if */ else if(entry_ptr->flush_dep_height < curr_flush_dep_height) /* This shouldn't happen -- if it does, just scream and die. */ @@ -1977,15 +2214,14 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign #if H5C_DO_SANITY_CHECKS flushed_entries_count++; flushed_entries_size += (int64_t)entry_ptr->size; + entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ status = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - NULL, - entry_ptr->addr, - flags, - &first_flush, - FALSE); + dxpl_id, + entry_ptr->addr, + flags, + FALSE, + entry_size_change_ptr); if ( status < 0 ) { /* This shouldn't happen -- if it does, @@ -1994,14 +2230,42 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ "Can't flush entry.") } + +#if H5C_DO_SANITY_CHECKS + /* it is possible that the entry size changed + * during flush -- update flushed_entries_size + * to account for this. + */ + flushed_entries_size += entry_size_change; +#endif /* H5C_DO_SANITY_CHECKS */ + flushed_during_dep_loop = TRUE; + + if ((cache_ptr->slist_change_in_serialize) || + (cache_ptr->slist_change_in_pre_serialize)) + { + /* The slist has been modified by something + * other than the simple removal of the + * of the flushed entry after the flush. + * + * This has the potential to corrupt the + * scan through the slist, so restart it. + */ + restart_slist_scan = TRUE; + cache_ptr->slist_change_in_pre_serialize + = FALSE; + cache_ptr->slist_change_in_serialize + = FALSE; + + H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) + } } /* end if */ else if(entry_ptr->flush_dep_height < curr_flush_dep_height) /* This shouldn't happen -- if it does, just scream and die. */ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry below current flush dep. height.") } /* end else */ } /* end if */ - } /* while ( node_ptr != NULL ) */ + } /* while ( ( restart_slist_scan ) || ( node_ptr != NULL ) ) */ /* Check for incrementing flush dependency height */ if(flushed_during_dep_loop) { @@ -2020,7 +2284,8 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign curr_flush_dep_height++; } /* while ( curr_flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS) */ -end_of_inner_loop: + + passes++; #if H5C_DO_SANITY_CHECKS /* Verify that the slist size and length are as expected. */ @@ -2032,8 +2297,6 @@ end_of_inner_loop: flushed_entries_size) == cache_ptr->slist_size ); #endif /* H5C_DO_SANITY_CHECKS */ - passes++; - } /* while */ HDassert( protected_entries <= cache_ptr->pl_len ); @@ -2098,12 +2361,10 @@ done: */ herr_t H5C_flush_to_min_clean(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id) + hid_t dxpl_id) { H5C_t * cache_ptr; herr_t result; - hbool_t first_flush = TRUE; hbool_t write_permitted; #if 0 /* modified code -- commented out for now */ int i; @@ -2146,11 +2407,9 @@ H5C_flush_to_min_clean(H5F_t * f, } #if 1 /* original code */ result = H5C_make_space_in_cache(f, - primary_dxpl_id, - secondary_dxpl_id, + dxpl_id, (size_t)0, - write_permitted, - &first_flush); + write_permitted); if ( result < 0 ) { @@ -2645,8 +2904,7 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr) */ herr_t H5C_insert_entry(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, const H5C_class_t * type, haddr_t addr, void * thing, @@ -2654,7 +2912,6 @@ H5C_insert_entry(H5F_t * f, { H5C_t * cache_ptr; herr_t result; - hbool_t first_flush = TRUE; hbool_t insert_pinned; hbool_t flush_last; #ifdef H5_HAVE_PARALLEL @@ -2678,8 +2935,6 @@ H5C_insert_entry(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( type ); - HDassert( type->flush ); - HDassert( type->size ); HDassert( H5F_addr_defined(addr) ); HDassert( thing ); @@ -2718,15 +2973,16 @@ H5C_insert_entry(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "duplicate entry in cache.") } /* end if */ -#ifndef NDEBUG entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC; -#endif /* NDEBUG */ entry_ptr->cache_ptr = cache_ptr; entry_ptr->addr = addr; entry_ptr->type = type; + entry_ptr->image_ptr = NULL; + entry_ptr->image_up_to_date = FALSE; + /* Apply tag to newly inserted entry */ - if(H5C_tag_entry(cache_ptr, entry_ptr, primary_dxpl_id) < 0) + if(H5C_tag_entry(cache_ptr, entry_ptr, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry") entry_ptr->is_protected = FALSE; @@ -2747,10 +3003,27 @@ H5C_insert_entry(H5F_t * f, /* not protected, so can't be dirtied */ entry_ptr->dirtied = FALSE; - /* Retrieve the size of the thing */ - if((type->size)(f, thing, &(entry_ptr->size)) < 0) + /* Retrieve the size of the thing. Set the compressed field to FALSE + * and the compressed_size field to zero first, as they may not be + * initialized by the image_len call. + */ + entry_ptr->compressed = FALSE; + entry_ptr->compressed_size = 0; + if((type->image_len)(thing, &(entry_ptr->size), &(entry_ptr->compressed), + &(entry_ptr->compressed_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing") HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE); + HDassert(((type->flags & H5C__CLASS_COMPRESSED_FLAG) != 0) || + (entry_ptr->compressed == FALSE)); + + /* entry has just been inserted -- thus compressed size cannot have + * been computed yet. Thus if entry_ptr->compressed is TRUE, + * entry_ptr->size must equal entry_ptr->compressed_size. + */ + HDassert((entry_ptr->compressed == FALSE) || + (entry_ptr->size == entry_ptr->compressed_size)); + HDassert((entry_ptr->compressed == TRUE) || + (entry_ptr->compressed_size == 0)); entry_ptr->in_slist = FALSE; @@ -2761,7 +3034,6 @@ H5C_insert_entry(H5F_t * f, entry_ptr->flush_in_progress = FALSE; entry_ptr->destroy_in_progress = FALSE; - entry_ptr->free_file_space_on_destroy = FALSE; /* Initialize flush dependency height fields */ entry_ptr->flush_dep_parent = NULL; @@ -2860,11 +3132,9 @@ H5C_insert_entry(H5F_t * f, */ result = H5C_make_space_in_cache(f, - primary_dxpl_id, - secondary_dxpl_id, + dxpl_id, space_needed, - write_permitted, - &first_flush); + write_permitted); if ( result < 0 ) { @@ -2956,18 +3226,39 @@ done: * Programmer: John Mainzer * 7/5/05 * + * Changes: Tidied up code, removeing some old commented out + * code that had been left in pending success of the + * new version. + * + * Note that unlike H5C_apply_candidate_list(), + * H5C_mark_entries_as_clean() makes all its calls to + * H6C_flush_single_entry() with the + * H5C__FLUSH_CLEAR_ONLY_FLAG set. As a result, + * the pre_serialize() and serialize calls are not made. + * + * This then implies that (assuming such actions were + * permitted in the parallel case) no loads, dirties, + * resizes, or removals of other entries can occur as + * a side effect of the flush. Hence, there is no need + * for the checks for entry removal / status change + * that I ported to H5C_apply_candidate_list(). + * + * However, if (in addition to allowing such operations + * in the parallel case), we allow such operations outside + * of the pre_serialize / serialize routines, this may + * cease to be the case -- requiring a review of this + * function. + * *------------------------------------------------------------------------- */ #ifdef H5_HAVE_PARALLEL herr_t H5C_mark_entries_as_clean(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, int32_t ce_array_len, haddr_t * ce_array_ptr) { H5C_t * cache_ptr; - hbool_t first_flush = TRUE; int entries_cleared; int entries_examined; int i; @@ -3061,27 +3352,9 @@ H5C_mark_entries_as_clean(H5F_t * f, #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Listed entry not dirty?!?!?.") -#if 0 /* original code */ - } else if ( entry_ptr->is_protected ) { - - entry_ptr->clear_on_unprotect = TRUE; } else { - if ( H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, - addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE) < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } - } -#else /* modified code */ - } else { /* Mark the entry to be cleared on unprotect. We will * scan the LRU list shortly, and clear all those entries * not currently protected. @@ -3102,13 +3375,32 @@ H5C_mark_entries_as_clean(H5F_t * f, } #endif /* H5C_DO_SANITY_CHECKS */ } -#endif /* end modified code */ } -#if 1 /* modified code */ + /* Scan through the LRU list from back to front, and flush the * entries whose clear_on_unprotect flags are set. Observe that * any protected entries will not be on the LRU, and therefore * will not be flushed at this time. + * + * Note that unlike H5C_apply_candidate_list(), + * H5C_mark_entries_as_clean() makes all its calls to + * H6C_flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG + * set. As a result, the pre_serialize() and serialize calls are + * not made. + * + * This then implies that (assuming such actions were + * permitted in the parallel case) no loads, dirties, + * resizes, or removals of other entries can occur as + * a side effect of the flush. Hence, there is no need + * for the checks for entry removal / status change + * that I ported to H5C_apply_candidate_list(). + * + * However, if (in addition to allowing such operations + * in the parallel case), we allow such operations outside + * of the pre_serialize / serialize routines, this may + * cease to be the case -- requiring a review of this + * point. + * JRM -- 4/7/15 */ entries_cleared = 0; @@ -3128,13 +3420,11 @@ H5C_mark_entries_as_clean(H5F_t * f, entries_cleared++; if ( H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - clear_ptr->type, + dxpl_id, clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE) < 0 ) { + TRUE, + NULL) < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } @@ -3165,13 +3455,11 @@ H5C_mark_entries_as_clean(H5F_t * f, entries_cleared++; if ( H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - clear_ptr->type, + dxpl_id, clear_ptr->addr, H5C__FLUSH_CLEAR_ONLY_FLAG, - &first_flush, - TRUE) < 0 ) { + TRUE, + NULL) < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } @@ -3202,7 +3490,6 @@ H5C_mark_entries_as_clean(H5F_t * f, } HDassert( (entries_cleared + i) == ce_array_len ); #endif /* H5C_DO_SANITY_CHECKS */ -#endif /* modified code */ done: @@ -3278,6 +3565,7 @@ H5C_mark_entry_dirty(void *thing) /* mark the entry as dirty if it isn't already */ entry_ptr->is_dirty = TRUE; + entry_ptr->image_up_to_date = FALSE; if ( was_pinned_unprotected_and_clean ) { @@ -3427,36 +3715,32 @@ H5C_move_entry(H5C_t * cache_ptr, was_dirty = entry_ptr->is_dirty; #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - if ( ! ( entry_ptr->flush_in_progress ) ) { - - entry_ptr->is_dirty = TRUE; - } + entry_ptr->is_dirty = TRUE; + /* This shouldn't be needed, but it keeps the test code happy */ + entry_ptr->image_up_to_date = FALSE; H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL) - if ( ! ( entry_ptr->flush_in_progress ) ) { - - H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) + H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) #if H5C_DO_SANITY_CHECKS - if ( removed_entry_from_slist ) { - - /* we just removed the entry from the slist. Thus we - * must touch up cache_ptr->slist_len_increase and - * cache_ptr->slist_size_increase to keep from skewing - * the sanity checks. - */ - HDassert( cache_ptr->slist_len_increase > 1 ); - HDassert( cache_ptr->slist_size_increase > - (int64_t)(entry_ptr->size) ); + if ( removed_entry_from_slist ) { - cache_ptr->slist_len_increase -= 1; - cache_ptr->slist_size_increase -= (int64_t)(entry_ptr->size); - } + /* we just removed the entry from the slist. Thus we + * must touch up cache_ptr->slist_len_increase and + * cache_ptr->slist_size_increase to keep from skewing + * the sanity checks. + */ + cache_ptr->slist_len_increase -= 1; + cache_ptr->slist_size_increase -= (int64_t)(entry_ptr->size); + } #endif /* H5C_DO_SANITY_CHECKS */ + if ( ! ( entry_ptr->flush_in_progress ) ) { + + /* skip the update if a flush is in progress */ H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL) } } @@ -3536,6 +3820,11 @@ H5C_resize_entry(void *thing, size_t new_size) /* mark the entry as dirty if it isn't already */ entry_ptr->is_dirty = TRUE; + entry_ptr->image_up_to_date = FALSE; + + /* Release the current image */ + if( entry_ptr->image_ptr ) + entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); /* do a flash cache size increase if appropriate */ if ( cache_ptr->flash_size_increase_possible ) { @@ -3743,18 +4032,6 @@ done: * or flushed -- nor may it be accessed by another call to * H5C_protect. Any attempt to do so will result in a failure. * - * The primary_dxpl_id and secondary_dxpl_id parameters - * specify the dxpl_ids used on the first write occasioned - * by the insertion (primary_dxpl_id), and on all subsequent - * writes (secondary_dxpl_id). This is useful in the - * metadata cache, but may not be needed elsewhere. If so, - * just use the same dxpl_id for both parameters. - * - * All reads are performed with the primary_dxpl_id. - * - * Similarly, the primary_dxpl_id is passed to the - * check_write_permitted function if it is called. - * * Return: Success: Ptr to the desired entry * Failure: NULL * @@ -3776,12 +4053,21 @@ done: * entries long before we actually have to evict something * to make space. * + * JRM -- 9/1/14 + * Replace the old rw parameter with the flags parameter. + * This allows H5C_protect to accept flags other than + * H5C__READ_ONLY_FLAG. + * + * Added support for the H5C__FLUSH_LAST_FLAG and + * H5C__FLUSH_COLLECTIVELY_FLAG flags. At present, these + * flags are only applied if the entry is not in cache, and + * is loaded into the cache as a result of this call. + * *------------------------------------------------------------------------- */ void * H5C_protect(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, const H5C_class_t * type, haddr_t addr, void * udata, @@ -3789,9 +4075,12 @@ H5C_protect(H5F_t * f, { H5C_t * cache_ptr; hbool_t hit; - hbool_t first_flush; hbool_t have_write_permitted = FALSE; hbool_t read_only = FALSE; + hbool_t flush_last; +#ifdef H5_HAVE_PARALLEL + hbool_t flush_collectively; +#endif /* H5_HAVE_PARALLEL */ hbool_t write_permitted; herr_t result; size_t empty_space; @@ -3812,8 +4101,6 @@ H5C_protect(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( type ); - HDassert( type->flush ); - HDassert( type->load ); HDassert( H5F_addr_defined(addr) ); #if H5C_DO_EXTREME_SANITY_CHECKS @@ -3827,6 +4114,10 @@ H5C_protect(H5F_t * f, #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ read_only = ( (flags & H5C__READ_ONLY_FLAG) != 0 ); + flush_last = ( (flags & H5C__FLUSH_LAST_FLAG) != 0 ); +#ifdef H5_HAVE_PARALLEL + flush_collectively = ( (flags & H5C__FLUSH_COLLECTIVELY_FLAG) != 0 ); +#endif /* H5_HAVE_PARALLEL */ /* first check to see if the target is in cache */ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, NULL) @@ -3845,7 +4136,7 @@ H5C_protect(H5F_t * f, from disk. */ /* Get the dataset transfer property list */ - if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(primary_dxpl_id, H5I_GENPROP_LST))) + if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list"); /* Get the tag from the DXPL */ @@ -3871,7 +4162,7 @@ H5C_protect(H5F_t * f, hit = FALSE; - thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata); + thing = H5C_load_entry(f, dxpl_id, type, addr, udata); if ( thing == NULL ) { @@ -3881,7 +4172,7 @@ H5C_protect(H5F_t * f, entry_ptr = (H5C_cache_entry_t *)thing; /* Apply tag to newly protected entry */ - if(H5C_tag_entry(cache_ptr, entry_ptr, primary_dxpl_id) < 0) + if(H5C_tag_entry(cache_ptr, entry_ptr, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Cannot tag metadata entry") /* If the entry is very large, and we are configured to allow it, @@ -3936,7 +4227,6 @@ H5C_protect(H5F_t * f, have_write_permitted = TRUE; - first_flush = TRUE; } } else { @@ -3944,7 +4234,6 @@ H5C_protect(H5F_t * f, have_write_permitted = TRUE; - first_flush = TRUE; } HDassert( entry_ptr->size <= H5C_MAX_ENTRY_SIZE ); @@ -3985,10 +4274,10 @@ H5C_protect(H5F_t * f, * see no point in worrying about the fourth. */ - result = H5C_make_space_in_cache(f, primary_dxpl_id, - secondary_dxpl_id, - space_needed, write_permitted, - &first_flush); + result = H5C_make_space_in_cache(f, + dxpl_id, + space_needed, + write_permitted); if ( result < 0 ) { @@ -4002,7 +4291,24 @@ H5C_protect(H5F_t * f, * * This is no longer true -- due to a bug fix, we may modify * data on load to repair a file. + * + * ******************************************* + * + * Set the flush_last (and possibly flush_collectively) fields + * of the newly loaded entry before inserting it into the + * index. Must do this, as the index tracked the number of + * entries with the flush_last field set, but assumes that + * the field will not change after insertion into the index. + * + * Note that this means that the H5C__FLUSH_LAST_FLAG and + * H5C__FLUSH_COLLECTIVELY_FLAG flags are ignored if the + * entry is already in cache. */ + entry_ptr->flush_me_last = flush_last; +#ifdef H5_HAVE_PARALLEL + entry_ptr->flush_me_collectively = flush_collectively; +#endif + H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL) if ( ( entry_ptr->is_dirty ) && ( ! (entry_ptr->in_slist) ) ) { @@ -4017,11 +4323,11 @@ H5C_protect(H5F_t * f, */ H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, NULL) - /* If the entry's type has a 'notify' callback send a 'after insertion' + /* If the entry's type has a 'notify' callback send a 'after load' * notice now that the entry is fully integrated into the cache. */ if(entry_ptr->type->notify && - (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_INSERT, entry_ptr) < 0) + (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_LOAD, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, NULL, "can't notify client about entry inserted into cache") } @@ -4083,7 +4389,6 @@ H5C_protect(H5F_t * f, have_write_permitted = TRUE; - first_flush = TRUE; } } else { @@ -4091,7 +4396,6 @@ H5C_protect(H5F_t * f, have_write_permitted = TRUE; - first_flush = TRUE; } } @@ -4100,10 +4404,8 @@ H5C_protect(H5F_t * f, (cache_ptr->resize_ctl).epoch_length ) ) { result = H5C__auto_adjust_cache_size(f, - primary_dxpl_id, - secondary_dxpl_id, - write_permitted, - &first_flush); + dxpl_id, + write_permitted); if ( result != SUCCEED ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \ @@ -4137,10 +4439,10 @@ H5C_protect(H5F_t * f, if(cache_ptr->index_size > cache_ptr->max_cache_size) cache_ptr->cache_full = TRUE; - result = H5C_make_space_in_cache(f, primary_dxpl_id, - secondary_dxpl_id, - (size_t)0, write_permitted, - &first_flush); + result = H5C_make_space_in_cache(f, + dxpl_id, + (size_t)0, + write_permitted); if ( result < 0 ) { @@ -4636,6 +4938,10 @@ done: * total_entries_skipped_in_msic, total_entries_scanned_in_msic, * and max_entries_skipped_in_msic fields. * + * JRM -- 4/11/15 + * Added code displaying the new slist_scan_restarts, + * LRU_scan_restarts, and hash_bucket_scan_restarts fields; + * *------------------------------------------------------------------------- */ herr_t @@ -4659,6 +4965,7 @@ H5C_stats(H5C_t * cache_ptr, int64_t total_clears = 0; int64_t total_flushes = 0; int64_t total_evictions = 0; + int64_t total_take_ownerships = 0; int64_t total_moves = 0; int64_t total_entry_flush_moves = 0; int64_t total_cache_flush_moves = 0; @@ -4687,6 +4994,8 @@ H5C_stats(H5C_t * cache_ptr, FUNC_ENTER_NOAPI(FAIL) + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + /* This would normally be an assert, but we need to use an HGOTO_ERROR * call to shut up the compiler. */ @@ -4713,6 +5022,7 @@ H5C_stats(H5C_t * cache_ptr, total_clears += cache_ptr->clears[i]; total_flushes += cache_ptr->flushes[i]; total_evictions += cache_ptr->evictions[i]; + total_take_ownerships += cache_ptr->take_ownerships[i]; total_moves += cache_ptr->moves[i]; total_entry_flush_moves += cache_ptr->entry_flush_moves[i]; total_cache_flush_moves += cache_ptr->cache_flush_moves[i]; @@ -4864,11 +5174,16 @@ H5C_stats(H5C_t * cache_ptr, (long)max_read_protects); HDfprintf(stdout, - "%s Total clears / flushes / evictions = %ld / %ld / %ld\n", + "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix, (long)total_clears, - (long)total_flushes, - (long)total_evictions); + (long)total_flushes); + + HDfprintf(stdout, + "%s Total evictions / take ownerships = %ld / %ld\n", + cache_ptr->prefix, + (long)total_evictions, + (long)total_take_ownerships); HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", @@ -4940,6 +5255,13 @@ H5C_stats(H5C_t * cache_ptr, (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); + HDfprintf(stdout, + "%s slist/LRU/hash bkt scan restarts = %lld / %lld / %lld.\n", + cache_ptr->prefix, + (long long)(cache_ptr->slist_scan_restarts), + (long long)(cache_ptr->LRU_scan_restarts), + (long long)(cache_ptr->hash_bucket_scan_restarts)); + #if H5C_COLLECT_CACHE_ENTRY_STATS HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", @@ -4993,11 +5315,16 @@ H5C_stats(H5C_t * cache_ptr, (int)(cache_ptr->max_read_protects[i])); HDfprintf(stdout, - "%s clears / flushes / evictions = %ld / %ld / %ld\n", + "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix, (long)(cache_ptr->clears[i]), - (long)(cache_ptr->flushes[i]), - (long)(cache_ptr->evictions[i])); + (long)(cache_ptr->flushes[i])); + + HDfprintf(stdout, + "%s evictions / take ownerships = %ld / %ld\n", + cache_ptr->prefix, + (long)(cache_ptr->evictions[i]), + (long)(cache_ptr->take_ownerships[i])); HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", @@ -5092,6 +5419,11 @@ done: * total_entries_skipped_in_msic, total_entries_scanned_in_msic, * and max_entries_skipped_in_msic fields. * + * JRM 4/11/15 + * Added code to initialize the new slist_scan_restarts, + * LRU_scan_restarts, hash_bucket_scan_restarts, and + * take_ownerships fields. + * *------------------------------------------------------------------------- */ void @@ -5125,6 +5457,7 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr) cache_ptr->clears[i] = 0; cache_ptr->flushes[i] = 0; cache_ptr->evictions[i] = 0; + cache_ptr->take_ownerships[i] = 0; cache_ptr->moves[i] = 0; cache_ptr->entry_flush_moves[i] = 0; cache_ptr->cache_flush_moves[i] = 0; @@ -5167,6 +5500,10 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr) cache_ptr->max_entries_scanned_in_msic = 0; cache_ptr->entries_scanned_to_make_space = 0; + cache_ptr->slist_scan_restarts = 0; + cache_ptr->LRU_scan_restarts = 0; + cache_ptr->hash_bucket_scan_restarts = 0; + #if H5C_COLLECT_CACHE_ENTRY_STATS for ( i = 0; i <= cache_ptr->max_type_id; i++ ) @@ -5319,24 +5656,125 @@ done: /*------------------------------------------------------------------------- - * Function: H5C_unpin_entry_from_client() + * Function: H5C_dump_cache_skip_list * - * Purpose: Internal routine to unpin a cache entry from a client action. + * Purpose: Debugging routine that prints a summary of the contents of + * the skip list used by the metadata cache metadata cache to + * maintain an address sorted list of dirty entries. * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * 3/24/09 + * Programmer: John Mainzer + * 11/15/14 * *------------------------------------------------------------------------- */ -static herr_t -H5C_unpin_entry_from_client(H5C_t * cache_ptr, - H5C_cache_entry_t * entry_ptr, - hbool_t update_rp) +#if 0 /* debugging routine */ +herr_t +H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn) { - herr_t ret_value = SUCCEED; /* Return value */ - + herr_t ret_value = SUCCEED; /* Return value */ + int i; + H5C_cache_entry_t * entry_ptr = NULL; + H5SL_node_t * node_ptr = NULL; + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(calling_fcn != NULL); + + HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", + calling_fcn); + HDfprintf(stdout, " slist len = %d.\n", cache_ptr->slist_len); + HDfprintf(stdout, " slist size = %lld.\n", + (long long)(cache_ptr->slist_size)); + + if ( cache_ptr->slist_len > 0 ) + { + /* If we get this far, all entries in the cache are listed in the + * skip list -- scan the skip list generating the desired output. + */ + + HDfprintf(stdout, + "Num: Addr: Len: Prot/Pind: Dirty: Type:\n"); + + i = 0; + + node_ptr = H5SL_first(cache_ptr->slist_ptr); + + if ( node_ptr != NULL ) { + + entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); + + } else { + + entry_ptr = NULL; + } + + while ( entry_ptr != NULL ) { + + HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); + + HDfprintf(stdout, + "%s%d 0x%016llx %4lld %d/%d %d %s\n", + cache_ptr->prefix, i, + (long long)(entry_ptr->addr), + (long long)(entry_ptr->size), + (int)(entry_ptr->is_protected), + (int)(entry_ptr->is_pinned), + (int)(entry_ptr->is_dirty), + entry_ptr->type->name); + + HDfprintf(stdout, " node_ptr = 0x%llx, item = 0x%llx\n", + (unsigned long long)node_ptr, + (unsigned long long)H5SL_item(node_ptr)); + + /* increment node_ptr before we delete its target */ + node_ptr = H5SL_next(node_ptr); + + if ( node_ptr != NULL ) { + + entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); + + } else { + + entry_ptr = NULL; + } + + i++; + } + } + + HDfprintf(stdout, "\n\n"); + +done: + + FUNC_LEAVE_NOAPI(ret_value) + +} /* H5C_dump_cache_skip_list() */ +#endif /* debugging routine */ + + +/*------------------------------------------------------------------------- + * Function: H5C_unpin_entry_from_client() + * + * Purpose: Internal routine to unpin a cache entry from a client action. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * 3/24/09 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5C_unpin_entry_from_client(H5C_t * cache_ptr, + H5C_cache_entry_t * entry_ptr, + hbool_t update_rp) +{ + herr_t ret_value = SUCCEED; /* Return value */ + FUNC_ENTER_NOAPI_NOINIT /* Sanity checking */ @@ -5474,8 +5912,7 @@ done: */ herr_t H5C_unprotect(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, const H5C_class_t * type, haddr_t addr, void * thing, @@ -5515,8 +5952,6 @@ H5C_unprotect(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( type ); - HDassert( type->clear ); - HDassert( type->flush ); HDassert( H5F_addr_defined(addr) ); HDassert( thing ); HDassert( ! ( pin_entry && unpin_entry ) ); @@ -5615,6 +6050,19 @@ H5C_unprotect(H5F_t * f, /* Mark the entry as dirty if appropriate */ entry_ptr->is_dirty = (entry_ptr->is_dirty || dirtied); + /* the image_up_to_date field was introduced to support + * journaling. Until we re-introduce journaling, this + * field should be equal to !entry_ptr->is_dirty. + * + * When journaling is re-enabled it should be set + * to FALSE if dirtied is TRUE. + */ +#if 1 /* JRM */ + entry_ptr->image_up_to_date = FALSE; +#else /* JRM */ + entry_ptr->image_up_to_date = !entry_ptr->is_dirty; +#endif /* JRM */ + /* Update index for newly dirtied entry */ if(was_clean && entry_ptr->is_dirty) H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr) @@ -5656,13 +6104,6 @@ H5C_unprotect(H5F_t * f, * JRM - 5/19/04 */ if ( deleted ) { - - /* the following first flush flag will never be used as we are - * calling H5C_flush_single_entry with both the - * H5C__FLUSH_CLEAR_ONLY_FLAG and H5C__FLUSH_INVALIDATE_FLAG flags. - * However, it is needed for the function call. - */ - hbool_t dummy_first_flush = TRUE; unsigned flush_flags = (H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_INVALIDATE_FLAG); @@ -5684,36 +6125,40 @@ H5C_unprotect(H5F_t * f, "hash table contains multiple entries for addr?!?.") } - /* Pass along 'free file space' flag to cache client */ - - entry_ptr->free_file_space_on_destroy = free_file_space; + /* Set the 'free file space' flag for the flush, if needed */ + if(free_file_space) + flush_flags |= H5C__FREE_FILE_SPACE_FLAG; /* Set the "take ownership" flag for the flush, if needed */ if(take_ownership) flush_flags |= H5C__TAKE_OWNERSHIP_FLAG; if ( H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - type, + dxpl_id, addr, flush_flags, - &dummy_first_flush, - TRUE) < 0 ) { + TRUE, + NULL) < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush.") } + +#if H5C_DO_SANITY_CHECKS + if ( ( take_ownership ) && ( ! was_clean ) ) + { + /* we have just removed an entry from the skip list. Thus + * we must touch up cache_ptr->slist_len_increase and + * cache_ptr->slist_size_increase to keep from skewing + * the sanity checks on flushes. + */ + cache_ptr->slist_len_increase -= 1; + cache_ptr->slist_size_increase -= (int64_t)(entry_ptr->size); + } +#endif /* H5C_DO_SANITY_CHECKS */ } #ifdef H5_HAVE_PARALLEL else if ( clear_entry ) { - /* the following first flush flag will never be used as we are - * calling H5C_flush_single_entry with the - * H5C__FLUSH_CLEAR_ONLY_FLAG flag. However, it is needed for - * the function call. - */ - hbool_t dummy_first_flush = TRUE; - /* verify that the target entry is in the cache. */ H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL) @@ -5730,13 +6175,11 @@ H5C_unprotect(H5F_t * f, } if ( H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - type, + dxpl_id, addr, H5C__FLUSH_CLEAR_ONLY_FLAG, - &dummy_first_flush, - TRUE) < 0 ) { + TRUE, + NULL) < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear.") } @@ -6392,10 +6835,8 @@ done: */ static herr_t H5C__auto_adjust_cache_size(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr) + hid_t dxpl_id, + hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; herr_t result; @@ -6596,13 +7037,11 @@ H5C__auto_adjust_cache_size(H5F_t * f, } else { result = H5C__autoadjust__ageout(f, + dxpl_id, hit_rate, &status, &new_max_cache_size, - primary_dxpl_id, - secondary_dxpl_id, - write_permitted, - first_flush_ptr); + write_permitted); if ( result != SUCCEED ) { @@ -6745,13 +7184,11 @@ done: */ static herr_t H5C__autoadjust__ageout(H5F_t * f, + hid_t dxpl_id, double hit_rate, enum H5C_resize_status * status_ptr, size_t * new_max_cache_size_ptr, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr) + hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; herr_t result; @@ -6792,8 +7229,7 @@ H5C__autoadjust__ageout(H5F_t * f, if ( cache_ptr->max_cache_size > (cache_ptr->resize_ctl).min_size ){ /* evict aged out cache entries if appropriate... */ - if(H5C__autoadjust__ageout__evict_aged_out_entries(f, primary_dxpl_id, - secondary_dxpl_id, write_permitted, first_flush_ptr) < 0) + if(H5C__autoadjust__ageout__evict_aged_out_entries(f, dxpl_id, write_permitted) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries.") /* ... and then reduce cache size if appropriate */ @@ -6990,20 +7426,32 @@ done: * * Programmer: John Mainzer, 11/22/04 * + * Changes: Modified function to detect deletions of entries + * during a scan of the LRU, and where appropriate, + * restart the scan to avoid proceeding with a next + * entry that is no longer in the cache. + * + * Note the absence of checks after flushes of clean + * entries. As a second entry can only be removed by + * by a call to the pre_serialize or serialize callback + * of the first, and as these callbacks will not be called + * on clean entries, no checks are needed. + * + * JRM -- 4/6/15 + * *------------------------------------------------------------------------- */ static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - hbool_t write_permitted, - hbool_t * first_flush_ptr) + hid_t dxpl_id, + hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; herr_t result; size_t eviction_size_limit; size_t bytes_evicted = 0; hbool_t prev_is_dirty = FALSE; + hbool_t restart_scan; H5C_cache_entry_t * entry_ptr; H5C_cache_entry_t * next_ptr; H5C_cache_entry_t * prev_ptr; @@ -7032,13 +7480,17 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, if ( write_permitted ) { + restart_scan = FALSE; entry_ptr = cache_ptr->LRU_tail_ptr; while ( ( entry_ptr != NULL ) && ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) && ( bytes_evicted < eviction_size_limit ) ) { + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert( ! (entry_ptr->is_protected) ); + HDassert( ! (entry_ptr->is_read_only) ); + HDassert( (entry_ptr->ro_ref_count) == 0 ); next_ptr = entry_ptr->next; prev_ptr = entry_ptr->prev; @@ -7050,26 +7502,39 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, if ( entry_ptr->is_dirty ) { + /* reset entries_removed_counter and + * last_entry_removed_ptr prior to the call to + * H5C_flush_single_entry() so that we can spot + * unexpected removals of entries from the cache, + * and set the restart_scan flag if proceeding + * would be likely to cause us to scan an entry + * that is no longer in the cache. + */ + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; + result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, - first_flush_ptr, - FALSE); + FALSE, + NULL); + + if ( ( cache_ptr->entries_removed_counter > 1 ) || + ( cache_ptr->last_entry_removed_ptr == prev_ptr ) ) + + restart_scan = TRUE; + } else { bytes_evicted += entry_ptr->size; result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, - first_flush_ptr, - TRUE); + TRUE, + NULL); } if ( result < 0 ) { @@ -7079,30 +7544,25 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, } if ( prev_ptr != NULL ) { -#ifndef NDEBUG - if ( prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) { - - /* something horrible has happened to *prev_ptr -- - * scream and die. - */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "*prev_ptr corrupt") - } else -#endif /* NDEBUG */ - if ( ( prev_ptr->is_dirty != prev_is_dirty ) - || - ( prev_ptr->next != next_ptr ) - || - ( prev_ptr->is_protected ) - || - ( prev_ptr->is_pinned ) ) { + if ( ( restart_scan ) + || + ( prev_ptr->is_dirty != prev_is_dirty ) + || + ( prev_ptr->next != next_ptr ) + || + ( prev_ptr->is_protected ) + || + ( prev_ptr->is_pinned ) ) { /* something has happened to the LRU -- start over * from the tail. */ + restart_scan = FALSE; entry_ptr = cache_ptr->LRU_tail_ptr; + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) + } else { entry_ptr = prev_ptr; @@ -7161,13 +7621,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, if ( ! (entry_ptr->is_dirty) ) { result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, - first_flush_ptr, - TRUE); + TRUE, + NULL); if ( result < 0 ) { @@ -7177,6 +7635,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, } /* just skip the entry if it is dirty, as we can't do * anything with it now since we can't write. + * + * Since all entries are clean, serialize() will not be called, + * and thus we needn't test to see if the LRU has been changed + * out from under us. */ entry_ptr = prev_ptr; @@ -7640,17 +8102,45 @@ done: * Programmer: John Mainzer * 3/24/065 * + * Changes: Modified function to test for slist chamges in + * pre_serialize and serialize callbacks, and re-start + * scans through the slist when such changes occur. + * + * This has been a potential problem for some time, + * and there has been code in this function to deal + * with elements of this issue. However the shift + * to the V3 cache in combination with the activities + * of some of the cache clients (in particular the + * free space manager and the fractal heap) have + * made this re-work necessary in H5C_flush_cache. + * + * At present, this issue doesn't seem to be causing problems + * in H5C_flush_invalidate_cache(). However, it seems + * prudent to port the H5C_flush_cache changes to this + * function as well. + * + * JRM -- 12/14/14 + * + * Added code to track entry size change during flush single + * entry. This didn't used to be a problem, as the entry + * was largely removed from the cache data structures before + * the flush proper. However, re-entrant calls to the cache + * in the parallel case required a re-factoring of the + * H5C_flush_single_entry() function to keep entries fully + * in the cache until after the pre-serialize and serialize + * calls. + * JRM -- 12/25/14 + * *------------------------------------------------------------------------- */ static herr_t -H5C_flush_invalidate_cache(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, +H5C_flush_invalidate_cache(const H5F_t * f, + hid_t dxpl_id, unsigned flags) { H5C_t * cache_ptr = f->shared->cache; herr_t status; - hbool_t first_flush = TRUE; + hbool_t restart_slist_scan; int32_t protected_entries = 0; int32_t i; int32_t cur_pel_len; @@ -7661,10 +8151,14 @@ H5C_flush_invalidate_cache(H5F_t * f, H5C_cache_entry_t * entry_ptr = NULL; H5C_cache_entry_t * next_entry_ptr = NULL; #if H5C_DO_SANITY_CHECKS - int64_t actual_slist_len = 0; + int64_t flushed_slist_len = 0; int64_t initial_slist_len = 0; - size_t actual_slist_size = 0; + int64_t flushed_slist_size = 0; size_t initial_slist_size = 0; + int64_t entry_size_change; + int64_t * entry_size_change_ptr = &entry_size_change; +#else /* H5C_DO_SANITY_CHECKS */ + int64_t * entry_size_change_ptr = NULL; #endif /* H5C_DO_SANITY_CHECKS */ herr_t ret_value = SUCCEED; @@ -7743,25 +8237,6 @@ H5C_flush_invalidate_cache(H5F_t * f, * may be created by the flush call backs. Thus it is possible * that the slist will not be empty after we finish the scan. */ - if ( cache_ptr->slist_len == 0 ) { - - node_ptr = NULL; - HDassert( cache_ptr->slist_size == 0 ); - - } else { - - /* Start at beginning of skip list each time */ - node_ptr = H5SL_first(cache_ptr->slist_ptr); - HDassert( node_ptr != NULL ); - - /* Get cache entry for this node */ - next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); - if ( NULL == next_entry_ptr ) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") - HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); - HDassert( next_entry_ptr->is_dirty ); - HDassert( next_entry_ptr->in_slist ); - } #if H5C_DO_SANITY_CHECKS /* Depending on circumstances, H5C_flush_single_entry() will @@ -7785,63 +8260,80 @@ H5C_flush_invalidate_cache(H5F_t * f, cache_ptr->slist_len_increase = 0; cache_ptr->slist_size_increase = 0; - /* Finally, reset the actual_slist_len and actual_slist_size + /* Finally, reset the flushed_slist_len and flushed_slist_size * fields to zero, as these fields are used to accumulate * the slist lenght and size that we see as we scan through * the slist. */ - actual_slist_len = 0; - actual_slist_size = 0; + flushed_slist_len = 0; + flushed_slist_size = 0; #endif /* H5C_DO_SANITY_CHECKS */ - while ( node_ptr != NULL ) + /* set the cache_ptr->slist_change_in_pre_serialize and + * cache_ptr->slist_change_in_serialize to false. + * + * These flags are set to TRUE by H5C_flush_single_entry if the + * slist is modified by a pre_serialize or serialize call + * respectively. + * + * H5C_flush_invalidate_cache() uses these flags to detect any + * modifications to the slist that might corrupt the scan of + * the slist -- and restart the scan in this event. + */ + cache_ptr->slist_change_in_pre_serialize = FALSE; + cache_ptr->slist_change_in_serialize = FALSE; + + /* this done, start the scan of the slist */ + + restart_slist_scan = TRUE; + + while ( ( restart_slist_scan ) || ( node_ptr != NULL ) ) { - entry_ptr = next_entry_ptr; + if ( restart_slist_scan ) + { + restart_slist_scan = FALSE; - /* With the advent of the fractal heap, it is possible - * that the flush callback will dirty and/or resize - * other entries in the cache. In particular, while - * Quincey has promised me that this will never happen, - * it is possible that the flush callback for an - * entry may protect an entry that is not in the cache, - * perhaps causing the cache to flush and possibly - * evict the entry associated with node_ptr to make - * space for the new entry. - * - * Thus we do a bit of extra sanity checking on entry_ptr, - * and break out of this scan of the skip list if we - * detect major problems. We have a bit of leaway on the - * number of passes though the skip list, so this shouldn't - * be an issue in the flush in and of itself, as it should - * be all but impossible for this to happen more than once - * in any flush. - * - * Observe that that breaking out of the scan early - * shouldn't break the sanity checks just after the end - * of this while loop. - * - * If an entry has merely been marked clean and removed from - * the s-list, we simply break out of the scan. - * - * If the entry has been evicted, we flag an error and - * exit. - */ -#ifndef NDEBUG - if ( entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) { + /* Start at beginning of skip list */ + node_ptr = H5SL_first(cache_ptr->slist_ptr); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry_ptr->magic is invalid ?!?!") + if ( node_ptr == NULL ) + { + /* the slist is empty -- break out of inner loop */ + break; + } + HDassert( node_ptr != NULL ); - } else -#endif /* NDEBUG */ - if ( ( ! entry_ptr->is_dirty ) || - ( ! entry_ptr->in_slist ) ) { + /* Get cache entry for this node */ + next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); - /* the s-list has been modified out from under us. - * break out of the loop. - */ - goto end_of_inner_loop;; + if(NULL == next_entry_ptr) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "next_entry_ptr == NULL ?!?!") + + HDassert( next_entry_ptr->magic == \ + H5C__H5C_CACHE_ENTRY_T_MAGIC ); + HDassert( next_entry_ptr->is_dirty ); + HDassert( next_entry_ptr->in_slist ); } + entry_ptr = next_entry_ptr; + + /* It is possible that entries will be dirtied, resized, + * flushed, or removed from the cache via the take ownership + * flag as the result of pre_serialize or serialized callbacks. + * + * This in turn can corrupt the scan through the slist. + * + * We test for slist modifications in the pre_serialize + * and serialize callbacks, and restart the scan of the + * slist if we find them. However, best we do some extra + * sanity checking just in case. + */ + + HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); + HDassert( entry_ptr->in_slist ); + HDassert( entry_ptr->is_dirty ); + /* increment node pointer now, before we delete its target * from the slist. */ @@ -7854,6 +8346,7 @@ H5C_flush_invalidate_cache(H5F_t * f, HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); HDassert( next_entry_ptr->is_dirty ); HDassert( next_entry_ptr->in_slist ); + HDassert( entry_ptr != next_entry_ptr ); } else { next_entry_ptr = NULL; } @@ -7877,21 +8370,6 @@ H5C_flush_invalidate_cache(H5F_t * f, ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) ) ) { -#if H5C_DO_SANITY_CHECKS - /* update actual_slist_len & actual_slist_size before - * the flush. Note that the entry will be removed - * from the slist after the flush, and thus may be - * resized by the flush callback. This is OK, as - * we will catch the size delta in - * cache_ptr->slist_size_increase. - * - * Note that we include pinned entries in this count, even - * though we will not actually flush them. - */ - actual_slist_len++; - actual_slist_size += entry_ptr->size; -#endif /* H5C_DO_SANITY_CHECKS */ - if ( entry_ptr->is_protected ) { /* we have major problems -- but lets flush @@ -7907,14 +8385,26 @@ H5C_flush_invalidate_cache(H5F_t * f, * as pinned entries can't be evicted. */ if(entry_ptr->flush_dep_height == curr_flush_dep_height ) { +#if H5C_DO_SANITY_CHECKS + /* update flushed_slist_len & flushed_slist_size + * before the flush. Note that the entry will + * be removed from the slist after the flush, + * and thus may be resized by the flush callback. + * This is OK, as we will catch the size delta in + * cache_ptr->slist_size_increase. + * + */ + flushed_slist_len++; + flushed_slist_size += (int64_t)entry_ptr->size; + entry_size_change = 0; +#endif /* H5C_DO_SANITY_CHECKS */ + status = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - NULL, + dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, - &first_flush, - FALSE); + FALSE, + entry_size_change_ptr); if ( status < 0 ) { /* This shouldn't happen -- if it does, we @@ -7924,7 +8414,32 @@ H5C_flush_invalidate_cache(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ "dirty pinned entry flush failed.") } /* end if */ + +#if H5C_DO_SANITY_CHECKS + /* entry size may have changed during the flush. + * Update flushed_slist_size to account for this. + */ + flushed_slist_size += entry_size_change; +#endif /* H5C_DO_SANITY_CHECKS */ + flushed_during_dep_loop = TRUE; + + if ( ( cache_ptr->slist_change_in_serialize ) || + ( cache_ptr->slist_change_in_pre_serialize ) ) + { + /* The slist has been modified by something + * other than the simple removal of the + * of the flushed entry after the flush. + * + * This has the potential to corrupt the + * scan through the slist, so restart it. + */ + restart_slist_scan = TRUE; + cache_ptr->slist_change_in_pre_serialize + = FALSE; + cache_ptr->slist_change_in_serialize = FALSE; + H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr); + } } /* end if */ else if(entry_ptr->flush_dep_height < curr_flush_dep_height) /* This shouldn't happen -- if it does, just scream and die. */ @@ -7932,15 +8447,26 @@ H5C_flush_invalidate_cache(H5F_t * f, } /* end if */ else { if(entry_ptr->flush_dep_height == curr_flush_dep_height ){ +#if H5C_DO_SANITY_CHECKS + /* update flushed_slist_len & flushed_slist_size + * before the flush. Note that the entry will + * be removed from the slist after the flush, + * and thus may be resized by the flush callback. + * This is OK, as we will catch the size delta in + * cache_ptr->slist_size_increase. + * + */ + flushed_slist_len++; + flushed_slist_size += (int64_t)entry_ptr->size; + entry_size_change = 0; +#endif /* H5C_DO_SANITY_CHECKS */ status = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - NULL, - entry_ptr->addr, - (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), - &first_flush, - TRUE); + dxpl_id, + entry_ptr->addr, + (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), + TRUE, + entry_size_change_ptr); if ( status < 0 ) { /* This shouldn't happen -- if it does, we @@ -7950,7 +8476,32 @@ H5C_flush_invalidate_cache(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ "dirty entry flush destroy failed.") } /* end if */ + +#if H5C_DO_SANITY_CHECKS + /* entry size may have changed during the flush. + * Update flushed_slist_size to account for this. + */ + flushed_slist_size += entry_size_change; +#endif /* H5C_DO_SANITY_CHECKS */ + flushed_during_dep_loop = TRUE; + + if ((cache_ptr->slist_change_in_serialize) || + (cache_ptr->slist_change_in_pre_serialize)) + { + /* The slist has been modified by something + * other than the simple removal of the + * of the flushed entry after the flush. + * + * This has the potential to corrupt the + * scan through the slist, so restart it. + */ + restart_slist_scan = TRUE; + cache_ptr->slist_change_in_pre_serialize + = FALSE; + cache_ptr->slist_change_in_serialize = FALSE; + H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) + } } /* end if */ else if(entry_ptr->flush_dep_height < curr_flush_dep_height) /* This shouldn't happen -- if it does, just scream and die. */ @@ -7971,11 +8522,10 @@ H5C_flush_invalidate_cache(H5F_t * f, if ( node_ptr == NULL ) { - HDassert( (actual_slist_len + cache_ptr->slist_len) == + HDassert( (flushed_slist_len + cache_ptr->slist_len) == (initial_slist_len + cache_ptr->slist_len_increase) ); - HDassert( (actual_slist_size + cache_ptr->slist_size) == - (initial_slist_size + - (size_t)(cache_ptr->slist_size_increase)) ); + HDassert( (flushed_slist_size + (int64_t)cache_ptr->slist_size) == + ((int64_t)initial_slist_size + cache_ptr->slist_size_increase) ); } #endif /* H5C_DO_SANITY_CHECKS */ @@ -7997,9 +8547,7 @@ H5C_flush_invalidate_cache(H5F_t * f, while ( next_entry_ptr != NULL ) { entry_ptr = next_entry_ptr; -#ifndef NDEBUG HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); -#endif /* NDEBUG */ next_entry_ptr = entry_ptr->ht_next; HDassert ( ( next_entry_ptr == NULL ) || @@ -8028,14 +8576,40 @@ H5C_flush_invalidate_cache(H5F_t * f, * If we can, go ahead and flush. */ if(entry_ptr->flush_dep_height == curr_flush_dep_height ){ + /* if *entry_ptr is dirty, it is possible + * that one or more other entries may be + * either removed from the cache, loaded + * into the cache, or moved to a new location + * in the file as a side effect of the flush. + * + * If this happens, and one of the target + * entries happens to be the next entry in + * the hash bucket, we could find ourselves + * either find ourselves either scanning a + * non-existant entry, scanning through a + * different bucket, or skipping an entry. + * + * Neither of these are good, so restart the + * the scan at the head of the hash bucket + * after the flush if *entry_ptr was dirty, + * on the off chance that the next entry was + * a target. + * + * This is not as inefficient at it might seem, + * as hash buckets typically have at most two + * or three entries. + */ + hbool_t entry_was_dirty; + + entry_was_dirty = entry_ptr->is_dirty; + status = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - NULL, - entry_ptr->addr, - (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), - &first_flush, - TRUE); + dxpl_id, + entry_ptr->addr, + (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), + TRUE, + NULL); + if ( status < 0 ) { /* This shouldn't happen -- if it does, @@ -8045,6 +8619,17 @@ H5C_flush_invalidate_cache(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ "Entry flush destroy failed.") } + + if ( entry_was_dirty ) { + + /* update stats for hash bucket scan + * restart here. + * -- JRM + */ + next_entry_ptr = cache_ptr->index[i]; + H5C__UPDATE_STATS_FOR_HASH_BUCKET_SCAN_RESTART(cache_ptr) + } + flushed_during_dep_loop = TRUE; } /* end if */ else if(entry_ptr->flush_dep_height < curr_flush_dep_height) @@ -8060,7 +8645,7 @@ H5C_flush_invalidate_cache(H5F_t * f, * of pinned entries from pass to pass. If it stops * shrinking before it hits zero, we scream and die. */ - /* if the flush function on the entry we last evicted + /* if the serialize function on the entry we last evicted * loaded an entry into cache (as Quincey has promised me * it never will), and if the cache was full, it is * possible that *next_entry_ptr was flushed or evicted. @@ -8069,8 +8654,13 @@ H5C_flush_invalidate_cache(H5F_t * f, * test is triggred, we are accessing a deallocated piece * of dynamically allocated memory, so we just scream and * die. + * + * Update: The code to restart the scan after flushes + * of dirty entries should make it impossible + * to satisfy the following test. Leave it in + * in case I am wrong. + * -- JRM */ -#ifndef NDEBUG if ( ( next_entry_ptr != NULL ) && ( next_entry_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) ) { @@ -8081,7 +8671,6 @@ H5C_flush_invalidate_cache(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "next_entry_ptr->magic is invalid?!?!?.") } -#endif /* NDEBUG */ } /* end while loop scanning hash table bin */ } /* end for loop scanning hash table */ @@ -8099,7 +8688,6 @@ H5C_flush_invalidate_cache(H5F_t * f, curr_flush_dep_height++; } /* end while loop over flush dependency heights */ -end_of_inner_loop: old_pel_len = cur_pel_len; cur_pel_len = cache_ptr->pel_len; @@ -8177,22 +8765,9 @@ done: * Attempts to flush a protected entry will result in an * error. * - * *first_flush_ptr should be true if only one - * flush is contemplated before the next load, or if this - * is the first of a sequence of flushes that will be - * completed before the next load. *first_flush_ptr is set - * to false if a flush actually takes place, and should be - * left false until the end of the sequence. - * - * The primary_dxpl_id is used if *first_flush_ptr is TRUE - * on entry, and a flush actually takes place. The - * secondary_dxpl_id is used in any subsequent flush where - * *first_flush_ptr is FALSE on entry. - * * If the H5C__FLUSH_INVALIDATE_FLAG flag is set, the entry will - * be cleared and not flushed -- in the case *first_flush_ptr, - * primary_dxpl_id, and secondary_dxpl_id are all irrelevent, - * and the call can't be part of a sequence of flushes. + * be cleared and not flushed, and the call can't be part of a + * sequence of flushes. * * If the caller knows the address of the skip list node at * which the target entry resides, it can avoid a lookup @@ -8209,26 +8784,57 @@ done: * * Programmer: John Mainzer, 5/5/04 * + * Changes: Refactored function to remove the type_ptr parameter. + * + * JRM -- 8/7/14 + * + * Added code to check for slist changes in pre_serialize and + * serialize calls, and set + * cache_ptr->slist_change_in_pre_serialize and + * cache_ptr->slist_change_in_serialize as appropriate. + * + * JRM -- 12/13/14 + * + * Refactored function to delay all modifications of the + * metadata cache data structures until after any calls + * to the pre-serialize or serialize callbacks. + * + * Need to do this, as some pre-serialize or serialize + * calls result in calls to the metadata cache and + * modifications to its data structures. Thus, at the + * time of any such call, the target entry flags and + * the metadata cache must all be consistant. + * + * Also added the entry_size_change_ptr parameter, which + * allows the function to report back any change in the size + * of the entry during the flush. Such size changes may + * occur during the pre-serialize callback. + * + * JRM -- 12/24/14 + * *------------------------------------------------------------------------- */ static herr_t -H5C_flush_single_entry(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, - const H5C_class_t * type_ptr, +H5C_flush_single_entry(const H5F_t * f, + hid_t dxpl_id, haddr_t addr, unsigned flags, - hbool_t * first_flush_ptr, - hbool_t del_entry_from_slist_on_destroy) + hbool_t del_entry_from_slist_on_destroy, + int64_t * entry_size_change_ptr) { H5C_t * cache_ptr = f->shared->cache; hbool_t destroy; /* external flag */ hbool_t clear_only; /* external flag */ + hbool_t free_file_space; /* external flag */ hbool_t take_ownership; /* external flag */ + hbool_t write_entry; /* internal flag */ + hbool_t destroy_entry; /* internal flag */ hbool_t was_dirty; - hbool_t destroy_entry; herr_t status; - unsigned flush_flags = H5C_CALLBACK__NO_FLAGS_SET; + haddr_t new_addr = HADDR_UNDEF; + haddr_t old_addr = HADDR_UNDEF; + size_t new_len = 0; + size_t new_compressed_len = 0; H5C_cache_entry_t * entry_ptr = NULL; herr_t ret_value = SUCCEED; /* Return value */ @@ -8238,11 +8844,15 @@ H5C_flush_single_entry(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( H5F_addr_defined(addr) ); - HDassert( first_flush_ptr ); + + /* If defined, initialize *entry_size_change_ptr to 0 */ + if(entry_size_change_ptr != NULL) + *entry_size_change_ptr = 0; /* setup external flags from the flags parameter */ destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0); clear_only = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0); + free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0); take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0); /* Set the flag for destroying the entry, based on the 'take ownership' @@ -8256,6 +8866,14 @@ H5C_flush_single_entry(H5F_t * f, /* attempt to find the target entry in the hash table */ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) + /* we will write the entry to disk if it exists, is dirty, and if the + * clear only flag is not set. + */ + if ( ( entry_ptr != NULL ) && ( entry_ptr->is_dirty ) && ( ! clear_only ) ) + write_entry = TRUE; + else + write_entry = FALSE; + /* run initial sanity checks */ #if H5C_DO_SANITY_CHECKS if ( entry_ptr != NULL ) { @@ -8264,6 +8882,8 @@ H5C_flush_single_entry(H5F_t * f, if ( entry_ptr->in_slist ) { + HDassert(entry_ptr->is_dirty); + if ( ( ( entry_ptr->flush_marker ) && ( ! entry_ptr->is_dirty ) ) || ( entry_ptr->addr != addr ) ) { @@ -8272,6 +8892,10 @@ H5C_flush_single_entry(H5F_t * f, } } else { + HDassert(!entry_ptr->is_dirty); + HDassert(!entry_ptr->flush_marker); + HDassert(entry_ptr->addr == addr); + if ( ( entry_ptr->is_dirty ) || ( entry_ptr->flush_marker ) || ( entry_ptr->addr != addr ) ) { @@ -8285,22 +8909,32 @@ H5C_flush_single_entry(H5F_t * f, if ( ( entry_ptr != NULL ) && ( entry_ptr->is_protected ) ) { + HDassert(!entry_ptr->is_protected); /* Attempt to flush a protected entry -- scream and die. */ HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, \ "Attempt to flush a protected entry.") } - if ( ( entry_ptr != NULL ) && - ( ( type_ptr == NULL ) || ( type_ptr->id == entry_ptr->type->id ) ) ) + /* if the entry exists, set entry_ptr->flush_in_progress = TRUE + * and set entry_ptr->flush_marker = FALSE + * + * in the parallel case, do some sanity checking in passing. + */ + if ( entry_ptr != NULL ) { /* we have work to do */ + HDassert(entry_ptr->type); + + was_dirty = entry_ptr->is_dirty; /* needed later for logging */ /* We will set flush_in_progress back to FALSE at the end if the * entry still exists at that point. */ entry_ptr->flush_in_progress = TRUE; + entry_ptr->flush_marker = FALSE; + #ifdef H5_HAVE_PARALLEL #ifndef NDEBUG /* If MPI based VFD is used, do special parallel I/O sanity checks. @@ -8314,7 +8948,7 @@ H5C_flush_single_entry(H5F_t * f, unsigned coll_meta; /* Collective metadata write flag */ /* Get the dataset transfer property list */ - if(NULL == (dxpl = H5I_object(primary_dxpl_id))) + if(NULL == (dxpl = H5I_object(dxpl_id))) HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list") /* Get the collective metadata write property */ @@ -8326,273 +8960,644 @@ H5C_flush_single_entry(H5F_t * f, } /* end if */ #endif /* NDEBUG */ #endif /* H5_HAVE_PARALLEL */ + } - was_dirty = entry_ptr->is_dirty; - - entry_ptr->flush_marker = FALSE; - - if ( clear_only ) { - H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) - } else { - H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) - } - - if ( destroy ) { - H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) - } + if ( ( entry_ptr != NULL ) && ( write_entry ) ) + { + /* serialize the entry if necessary, and then write it to disk. */ - /* If the entry's type has a 'notify' callback and the entry is about - * to be removed from the cache, send a 'before eviction' notice while - * the entry is still fully integrated in the cache. - */ - if(destroy) { - if(entry_ptr->type->notify && - (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict") - } /* end if */ + unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET; - /* Always remove the entry from the hash table on a destroy. On a - * flush with destroy, it is cheaper to discard the skip list all at - * once rather than remove the entries one by one, so we only delete - * from the slist only if requested. + /* The entry is dirty, and we are doing either a flush, + * or a flush destroy. In either case, serialize the + * entry and write it to disk. * - * We must do deletions now as the callback routines will free the - * entry if destroy is true. + * Note that this may cause the entry to be re-sized and/or + * moved in the cache. * - * Note that it is possible that the entry will be moved during - * its call to flush. This will upset H5C_move_entry() if we - * don't tell it that it doesn't have to worry about updating the - * index and SLIST. Use the destroy_in_progress field for this - * purpose. + * As we will not update the metadata cache's data structures + * until we we finish the write, we must touch up these + * data structures for size and location changes even if we + * are about to delete the entry from the cache (i.e. on a + * flush destroy). */ - if ( destroy ) { - - entry_ptr->destroy_in_progress = TRUE; - - H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) - - if ( ( entry_ptr->in_slist ) && - ( del_entry_from_slist_on_destroy ) ) { - H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) - } - } + HDassert(entry_ptr->is_dirty); - /* Update the replacement policy for the flush or eviction. - * Again, do this now so we don't have to reference freed - * memory in the destroy case. - */ - if ( destroy ) { /* AKA eviction */ +#if H5C_DO_SANITY_CHECKS + if ( ( cache_ptr->check_write_permitted == NULL ) && + ( !(cache_ptr->write_permitted) ) ) - H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Write when writes are always forbidden!?!?!") +#endif /* H5C_DO_SANITY_CHECKS */ - } else { + if ( NULL == entry_ptr->image_ptr ) + { + size_t image_size; - H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL) - } + if ( entry_ptr->compressed ) + image_size = entry_ptr->compressed_size; + else + image_size = entry_ptr->size; - /* Clear the dirty flag only, if requested */ - if ( clear_only ) { + HDassert(image_size > 0); - if ( destroy ) { -#ifndef NDEBUG - /* we are about to call the clear callback with the - * destroy flag set -- this will result in *entry_ptr - * being freed. Set the magic field to bad magic - * so we can detect a freed cache entry if we see - * one. - */ - entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; -#endif /* NDEBUG */ - entry_ptr->cache_ptr = NULL; - } - /* Call the callback routine to clear all dirty flags for object */ - if ( (entry_ptr->type->clear)(f, entry_ptr, destroy_entry) < 0 ) { + entry_ptr->image_ptr = + H5MM_malloc(image_size + H5C_IMAGE_EXTRA_SPACE); - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry") + if ( NULL == entry_ptr->image_ptr) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ + "memory allocation failed for on disk image buffer") } - } else { +#if H5C_DO_MEMORY_SANITY_CHECKS -#if H5C_DO_SANITY_CHECKS - if ( ( entry_ptr->is_dirty ) && - ( cache_ptr->check_write_permitted == NULL ) && - ( ! (cache_ptr->write_permitted) ) ) + HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, + H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Write when writes are always forbidden!?!?!") -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ - if ( destroy ) { -#ifndef NDEBUG - /* we are about to call the flush callback with the - * destroy flag set -- this will result in *entry_ptr - * being freed. Set the magic field to bad magic - * so we can detect a freed cache entry if we see - * one. - */ - entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; -#endif /* NDEBUG */ - entry_ptr->cache_ptr = NULL; - } + } /* end if */ - /* Only block for all the processes on the first piece of metadata + if ( ! (entry_ptr->image_up_to_date) ) + { + /* reset cache_ptr->slist_changed so we can detect slist + * modifications in the pre_serialize call. */ + cache_ptr->slist_changed = FALSE; + + /* make note of the entry's current address */ + old_addr = entry_ptr->addr; + + /* Call client's pre-serialize callback, if there's one */ + if ( ( entry_ptr->type->pre_serialize != NULL ) && + ( (entry_ptr->type->pre_serialize)(f, dxpl_id, + (void *)entry_ptr, + entry_ptr->addr, + entry_ptr->size, + entry_ptr->compressed_size, + &new_addr, &new_len, + &new_compressed_len, + &serialize_flags) < 0 ) ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "unable to pre-serialize entry") + } - if ( *first_flush_ptr && entry_ptr->is_dirty ) { + /* set cache_ptr->slist_change_in_pre_serialize if the + * slist was modified. + */ + if ( cache_ptr->slist_changed ) + cache_ptr->slist_change_in_pre_serialize = TRUE; - status = (entry_ptr->type->flush)(f, primary_dxpl_id, destroy_entry, - entry_ptr->addr, entry_ptr, - &flush_flags); - *first_flush_ptr = FALSE; + /* Check for any flags set in the pre-serialize callback */ + if ( serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET ) + { + /* Check for unexpected flags from serialize callback */ + if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | + H5C__SERIALIZE_MOVED_FLAG | + H5C__SERIALIZE_COMPRESSED_FLAG)) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "unknown serialize flag(s)") + } +#ifdef H5_HAVE_PARALLEL + /* In the parallel case, resizes and moves in + * the serialize operation can cause problems. + * If they occur, scream and die. + * + * At present, in the parallel case, the aux_ptr + * will only be set if there is more than one + * process. Thus we can use this to detect + * the parallel case. + * + * This works for now, but if we start using the + * aux_ptr for other purposes, we will have to + * change this test accordingly. + * + * NB: While this test detects entryies that attempt + * to resize or move themselves during a flush + * in the parallel case, it will not detect an + * entry that dirties, resizes, and/or moves + * other entries during its flush. + * + * From what Quincey tells me, this test is + * sufficient for now, as any flush routine that + * does the latter will also do the former. + * + * If that ceases to be the case, further + * tests will be necessary. + */ + if ( cache_ptr->aux_ptr != NULL ) - } else { + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "resize/move in serialize occured in parallel case.") +#endif /* H5_HAVE_PARALLEL */ + + /* Resize the buffer if required */ + if ( ( ( ! entry_ptr->compressed ) && + ( serialize_flags & H5C__SERIALIZE_RESIZED_FLAG ) ) || + ( ( entry_ptr->compressed ) && + ( serialize_flags & H5C__SERIALIZE_COMPRESSED_FLAG ) ) ) + { + size_t new_image_size; + + if ( entry_ptr->compressed ) + new_image_size = new_compressed_len; + else + new_image_size = new_len; + + HDassert(new_image_size > 0); + + /* Release the current image */ + if ( entry_ptr->image_ptr ) + { + entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); + } + + /* Allocate a new image buffer */ + entry_ptr->image_ptr = + H5MM_malloc(new_image_size + H5C_IMAGE_EXTRA_SPACE); + + if ( NULL == entry_ptr->image_ptr ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ + "memory allocation failed for on disk image buffer") + } + +#if H5C_DO_MEMORY_SANITY_CHECKS + + HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + new_image_size, + H5C_IMAGE_SANITY_VALUE, + H5C_IMAGE_EXTRA_SPACE); + +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ + + } /* end if */ + + /* If required, update the entry and the cache data structures + * for a resize. + */ + if ( serialize_flags & H5C__SERIALIZE_RESIZED_FLAG ) { + + H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, \ + entry_ptr, new_len) + + /* update the hash table for the size change*/ + H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, \ + entry_ptr->size, \ + new_len, entry_ptr, \ + !(entry_ptr->is_dirty)); + + /* The entry can't be protected since we are + * in the process of flushing it. Thus we must + * update the replacement policy data + * structures for the size change. The macro + * deals with the pinned case. + */ + H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_len); + + /* as we haven't updated the cache data structures for + * for the flush or flush destroy yet, the entry should + * be in the slist. Thus update it for the size change. + */ + HDassert(entry_ptr->in_slist); + H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \ + new_len) + + /* if defined, update *entry_size_change_ptr for the + * change in entry size. + */ + if(entry_size_change_ptr != NULL) + *entry_size_change_ptr = (int64_t)new_len - (int64_t)(entry_ptr->size); + + /* finally, update the entry for its new size */ + entry_ptr->size = new_len; + } /* end if */ + + /* If required, udate the entry and the cache data structures + * for a move + */ + if(serialize_flags & H5C__SERIALIZE_MOVED_FLAG) + { +#if H5C_DO_SANITY_CHECKS + int64_t saved_slist_len_increase; + int64_t saved_slist_size_increase; +#endif /* H5C_DO_SANITY_CHECKS */ + + H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) + + if ( entry_ptr->addr == old_addr ) + { + /* we must update cache data structures for the + * change in address. + */ + + /* delete the entry from the hash table and the slist */ + H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) + H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) + + /* update the entry for its new address */ + entry_ptr->addr = new_addr; + + /* and then reinsert in the index and slist */ + H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL) + +#if H5C_DO_SANITY_CHECKS + /* save cache_ptr->slist_len_increase and + * cache_ptr->slist_size_increase before the + * reinsertion into the slist, and restore + * them afterwards to avoid skewing our sanity + * checking. + */ + saved_slist_len_increase = cache_ptr->slist_len_increase; + saved_slist_size_increase = cache_ptr->slist_size_increase; +#endif /* H5C_DO_SANITY_CHECKS */ + + H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) + +#if H5C_DO_SANITY_CHECKS + cache_ptr->slist_len_increase = saved_slist_len_increase; + cache_ptr->slist_size_increase = saved_slist_size_increase; +#endif /* H5C_DO_SANITY_CHECKS */ + } + else /* move is alread done for us -- just do sanity checks */ + { + HDassert(entry_ptr->addr == new_addr); + } + } /* end if */ + + if ( serialize_flags & H5C__SERIALIZE_COMPRESSED_FLAG ) { + /* just save the new compressed entry size in + * entry_ptr->compressed_size. We don't need to + * do more, as compressed size is only used for I/O. + */ + HDassert(entry_ptr->compressed); + entry_ptr->compressed_size = new_compressed_len; + } + } /* end if ( serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET ) */ + + /* Serialize object into buffer */ + { + size_t image_len; + + if ( entry_ptr->compressed ) + image_len = entry_ptr->compressed_size; + else + image_len = entry_ptr->size; + + /* reset cache_ptr->slist_changed so we can detect slist + * modifications in the serialize call. + */ + cache_ptr->slist_changed = FALSE; + + + if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, + image_len, + (void *)entry_ptr) < 0 ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "unable to serialize entry") + } - status = (entry_ptr->type->flush)(f, secondary_dxpl_id, - destroy_entry, entry_ptr->addr, - entry_ptr, &flush_flags); + /* set cache_ptr->slist_change_in_serialize if the + * slist was modified. + */ + if ( cache_ptr->slist_changed ) + cache_ptr->slist_change_in_pre_serialize = TRUE; + +#if H5C_DO_MEMORY_SANITY_CHECKS + + HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + + image_len, + H5C_IMAGE_SANITY_VALUE, + H5C_IMAGE_EXTRA_SPACE)); + +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ + + entry_ptr->image_up_to_date = TRUE; } + } /* end if ( ! (entry_ptr->image_up_to_date) ) */ + + /* Finally, write the image to disk. + * + * Note that if either the H5C__CLASS_NO_IO_FLAG or the + * the H5AC__CLASS_SKIP_WRITES flag is set in the + * in the entry's type, we silently skip the write. This + * flag should only be used in test code. + */ + if ( ( ((entry_ptr->type->flags) & H5C__CLASS_NO_IO_FLAG) == 0 ) && + ( ((entry_ptr->type->flags) & H5C__CLASS_SKIP_WRITES) == 0 ) ) + { + /* If compression is not enabled, the size of the entry on + * disk is entry_prt->size. However if entry_ptr->compressed + * is TRUE, the on disk size is entry_ptr->compressed_size. + */ + size_t image_size; - if ( status < 0 ) { + if ( entry_ptr->compressed ) + image_size = entry_ptr->compressed_size; + else + image_size = entry_ptr->size; + if ( ( H5F_block_write(f, entry_ptr->type->mem_type, + entry_ptr->addr, + image_size, dxpl_id, + entry_ptr->image_ptr) < 0 ) ) + { HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry") + "Can't write image to file.") } + } -#ifdef H5_HAVE_PARALLEL - if ( flush_flags != H5C_CALLBACK__NO_FLAGS_SET ) { - - /* In the parallel case, flush operations can - * cause problems. If they occur, scream and - * die. - * - * At present, in the parallel case, the aux_ptr - * will only be set if there is more than one - * process. Thus we can use this to detect - * the parallel case. - * - * This works for now, but if we start using the - * aux_ptr for other purposes, we will have to - * change this test accordingly. - * - * NB: While this test detects entryies that attempt - * to resize or move themselves during a flush - * in the parallel case, it will not detect an - * entry that dirties, resizes, and/or moves - * other entries during its flush. - * - * From what Quincey tells me, this test is - * sufficient for now, as any flush routine that - * does the latter will also do the former. - * - * If that ceases to be the case, further - * tests will be necessary. - */ - if ( cache_ptr->aux_ptr != NULL ) + /* if the entry has a notify callback, notify it that we have + * just flushed the entry. + */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "resize/move in serialize occured in parallel case.") + if ( ( entry_ptr->type->notify ) && + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, + entry_ptr) < 0 ) ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ + "can't notify client of entry flush") + } + } /* if ( ( entry_ptr != NULL ) && ( write_entry ) ) */ + + + /* At this point, all pre-serialize and serialize calls have been + * made if it was appropriate to make them. Similarly, the entry + * has been written to disk if desired. + * + * Thus it is now safe to update the cache data structures for the + * flush. + */ + + if ( entry_ptr != NULL ) + { + /* start by updating the statistics */ + + if ( clear_only ) { + + /* only log a clear if the entry was dirty */ + if ( was_dirty ) { + + H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) + } + } else if ( write_entry ) { + + HDassert( was_dirty ); + + /* only log a flush if we actually wrote to disk */ + H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) - } -#endif /* H5_HAVE_PARALLEL */ } - if ( ( ! destroy ) && ( entry_ptr->in_slist ) ) { + if ( destroy ) + { + if ( take_ownership ) + { + HDassert(!destroy_entry); + } + else + { + HDassert(destroy_entry); + } - H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) + H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, \ + take_ownership) + } + /* If the entry's type has a 'notify' callback and the entry is about + * to be removed from the cache, send a 'before eviction' notice while + * the entry is still fully integrated in the cache. + */ + if ( destroy ) { + + if ( ( entry_ptr->type->notify ) && + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, + entry_ptr) < 0 ) ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ + "can't notify client about entry to evict") + } + } /* end if */ + + + /* Update the cache internal data structures. */ + if ( destroy ) + { + /* Update the cache internal data structures as appropriate + * for a destroy. Specifically: + * + * 1) Delete it from the index + * + * 2) Delete it from the skip list if requested. + * + * 3) Update the replacement policy for eviction + * + * Finally, if the destroy_entry flag is set, discard the + * entry. + */ + + H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) + + if ( ( entry_ptr->in_slist ) && + ( del_entry_from_slist_on_destroy ) ) { + + H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) + } + + H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) } + else + { + HDassert(clear_only || write_entry); + HDassert(entry_ptr->is_dirty); + HDassert(entry_ptr->in_slist); + + /* We are either doing a flush or a clear. + * + * A clear and a flush are the same from the point of + * view of the replacement policy and the slist. + * Hence no differentiation between them. + * + * JRM -- 7/7/07 + */ + + H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL) + + H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) - if ( ( ! destroy ) && ( was_dirty ) ) { + + /* mark the entry as clean and update the index for + * entry clean. Also, call the clear callback + * if defined. + */ + + entry_ptr->is_dirty = FALSE; H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr); + + if ( ( entry_ptr->type->clear != NULL ) && + ( (entry_ptr->type->clear)(f, (void *)entry_ptr, FALSE) ) ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "unable to clear entry") + } } - if ( ! destroy ) { /* i.e. if the entry still exists */ + /* reset the flush_in progress flag */ - HDassert( !(entry_ptr->is_dirty) ); - HDassert( !(entry_ptr->flush_marker) ); - HDassert( !(entry_ptr->in_slist) ); - HDassert( !(entry_ptr->is_protected) ); - HDassert( !(entry_ptr->is_read_only) ); - HDassert( (entry_ptr->ro_ref_count) == 0 ); + entry_ptr->flush_in_progress = FALSE; - if ( (flush_flags & H5C_CALLBACK__SIZE_CHANGED_FLAG) != 0 ) { + } /* end if */ - /* The entry size changed as a result of the flush. - * - * Most likely, the entry was compressed, and the - * new version is of a different size than the old. - * - * In any case, we must update entry and cache size - * accordingly. - */ - size_t new_size; - if ( (entry_ptr->type->size)(f, (void *)entry_ptr, &new_size) - < 0 ) { + /* Internal cache data structures should now be up to date, and + * consistant with the status of the entry. + * + * Now discard the entry if appropriate. + */ + if ( entry_ptr != NULL ) + { + if ( destroy ) + { + /* start by freeing the buffer for the on disk image */ + if(entry_ptr->image_ptr != NULL) + entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); + + /* Check whether we should free the space in the file that + * the entry occupies + */ + if ( free_file_space ) + { + + size_t fsf_size; + + /* Sanity checks */ + HDassert(H5F_addr_defined(entry_ptr->addr)); + HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr)); +#ifndef NDEBUG +{ + hbool_t curr_compressed = FALSE; + size_t curr_len; + size_t curr_compressed_len = 0; + + /* Get the actual image size for the thing again */ + entry_ptr->type->image_len((void *)entry_ptr, &curr_len, &curr_compressed, &curr_compressed_len); + HDassert(curr_len == entry_ptr->size); + HDassert(curr_compressed == entry_ptr->compressed); + HDassert(curr_compressed_len == entry_ptr->compressed_size); +} +#endif /* NDEBUG */ - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, \ - "Can't get entry size after flush") + /* if the file space free size callback is defined, use + * it to get the size of the block of file space to free. + * Otherwise use entry_ptr->compressed_size if + * entry_ptr->compressed == TRUE, and entry_ptr->size + * if entry_ptr->compressed == FALSE. + */ + if ( entry_ptr->type->fsf_size ) + { + if ( (entry_ptr->type->fsf_size)((void *)entry_ptr, + &fsf_size) < 0 ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \ + "unable to get file space free size") + } + } + else if ( entry_ptr->compressed ) /* use compressed size */ + { + fsf_size = entry_ptr->compressed_size; + } + else /* no file space free size callback -- use entry size */ + { + fsf_size = entry_ptr->size; } - if ( new_size != entry_ptr->size ) { + /* Release the space on disk */ + if ( H5MF_xfree(f, entry_ptr->type->mem_type, dxpl_id, + entry_ptr->addr, (hsize_t)fsf_size) < 0) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \ + "unable to free file space for cache entry") + } + } /* end if ( free_file_space ) */ - HDassert( entry_ptr->size < H5C_MAX_ENTRY_SIZE ); - /* update the hash table for the size change - * We pass TRUE as the was_clean parameter, as we - * have already updated the clean and dirty index - * size fields for the fact that the entry has - * been flushed. (See above call to - * H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN()). - */ - H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), \ - (entry_ptr->size), \ - (new_size), \ - (entry_ptr), \ - (TRUE)) - - /* The entry can't be protected since we just flushed it. - * Thus we must update the replacement policy data - * structures for the size change. The macro deals - * with the pinned case. - */ - H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, \ - new_size) + /* Reset the pointer to the cache the entry is within. -QAK */ + entry_ptr->cache_ptr = NULL; - /* The entry can't be in the slist, so no need to update - * the slist for the size change. - */ + /* increment entries_removed_counter and set + * last_entry_removed_ptr. As we are likely abuut to + * free the entry, recall that last_entry_removed_ptr + * must NEVER be dereferenced. + * + * Recall that these fields are maintained to allow functions + * that perform scans of lists of entries to detect the + * unexpected removal of entries (via expunge, eviction, + * or take ownership at present), so that they can re-start + * their scans if necessary. + */ + cache_ptr->last_entry_removed_ptr++; + cache_ptr->last_entry_removed_ptr = entry_ptr; - /* update stats for the size change */ - H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, \ - entry_ptr, \ - new_size) + /* Check for actually destroying the entry in memory */ + /* (As opposed to taking ownership of it) */ + if ( destroy_entry ) + { + /* if the entry is dirty and it has a clear callback, + * call this callback now. Since this callback exists, + * it follows tht the client maintains its own dirty bits, + * which must be cleared before the entry is freed to avoid + * sanity check failures. Also clear the dirty flag for + * the same reason. + */ - /* finally, update the entry size proper */ - entry_ptr->size = new_size; - } - } + if ( entry_ptr->is_dirty ) { - if ( (flush_flags & H5C_CALLBACK__MOVED_FLAG) != 0 ) { - - /* The entry was moved as the result of the flush. - * - * Most likely, the entry was compressed, and the - * new version is larger than the old and thus had - * to be relocated. - * - * At preset, all processing for this case is - * handled elsewhere. But lets keep the if statement - * around just in case. - */ + entry_ptr->is_dirty = FALSE; - } + if ( ( entry_ptr->type->clear != NULL ) && + ( (entry_ptr->type->clear)(f, (void *)entry_ptr, TRUE) ) ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "unable to clear entry") + } + } - /* reset the flush_in progress flag */ - entry_ptr->flush_in_progress = FALSE; - } + /* we are about to discard the in core representation -- + * set the magic field to bad magic so we can detect a + * freed entry if we see one. + */ + entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; + + + /* verify that the image has been freed */ + HDassert( entry_ptr->image_ptr == NULL ); + + if ( entry_ptr->type->free_icr((void *)entry_ptr) < 0 ) + { + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ + "free_icr callback failed.") + } + } + else + { + HDassert(take_ownership); + + /* client is taking ownership of the entry. + * set bad magic here too so the cache will choke + * unless the entry is re-inserted properly + */ + entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; + } + } /* if ( destroy ) */ + } + if ( entry_ptr != NULL ) + { if ( cache_ptr->log_flush ) { status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, flags); @@ -8606,8 +9611,14 @@ H5C_flush_single_entry(H5F_t * f, } done: - HDassert( ( destroy ) || + + HDassert( ( ret_value != SUCCEED ) || ( destroy_entry ) || ( ( entry_ptr ) && ( ! entry_ptr->flush_in_progress ) ) ); + + HDassert( ( ret_value != SUCCEED ) || ( destroy_entry ) || + ( take_ownership ) || + ( ( entry_ptr ) && ( ! entry_ptr->is_dirty ) ) ); + FUNC_LEAVE_NOAPI(ret_value) } /* H5C_flush_single_entry() */ @@ -8637,8 +9648,19 @@ H5C_load_entry(H5F_t * f, haddr_t addr, void * udata) { + hbool_t dirty = FALSE; /* Flag indicating whether thing was dirtied during deserialize */ + hbool_t compressed = FALSE; /* flag indicating whether thing */ + /* will be run through filters on */ + /* on read and write. Usually FALSE */ + /* set to true if appropriate. */ + size_t compressed_size = 0; /* entry compressed size if */ + /* known -- otherwise uncompressed. */ + /* Zero indicates compression not */ + /* enabled. */ + void * image = NULL; /* Buffer for disk image */ void * thing = NULL; /* Pointer to thing loaded */ H5C_cache_entry_t * entry; /* Alias for thing loaded, as cache entry */ + size_t len; /* Size of image in file */ unsigned u; /* Local index variable */ void * ret_value; /* Return value */ @@ -8648,14 +9670,310 @@ H5C_load_entry(H5F_t * f, HDassert(f->shared); HDassert(f->shared->cache); HDassert(type); - HDassert(type->load); - HDassert(type->size); + + /* verify absence of prohibited or unsupported type flag combinations */ + HDassert(!(type->flags & H5C__CLASS_NO_IO_FLAG)); + + /* for now, we do not combine the speculative load and compressed flags */ + HDassert(!((type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG) && + (type->flags & H5C__CLASS_COMPRESSED_FLAG))); + + /* Can't see how skip reads could be usefully combined with + * either the speculative read or compressed flags. Hence disallow. + */ + HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && + (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG))); + HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && + (type->flags & H5C__CLASS_COMPRESSED_FLAG))); + HDassert(H5F_addr_defined(addr)); + HDassert(type->get_load_size); + HDassert(type->deserialize); + + /* Call the get_load_size callback, to retrieve the initial + * size of image + */ + if(type->get_load_size(udata, &len) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't retrieve image size") + + HDassert(len > 0); + + /* Check for possible speculative read off the end of the file */ + if(type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG) { + +/* Quincey has added patches for eoa calculations -- leave the original + * code around until we see the effect of these patches. + * JRM -- 1/1/15 + */ +#if 0 /* original code */ /* JRM */ + /* the original version of this code has several problems: + * + * First, the sblock is not available until the sblock + * has been read in, which causes a seg fault. This is + * dealt with easily enough by testing to see if + * f->shared->sblock is NULL, and calling H5FD_get_base_addr() + * to obtain the base addr when it is. + * + * The second issue is more subtle. H5F_get_eoa() calls + * H5FD_get_eoa(). However, this function returns the EOA as + * a relative address -- i.e. relative to the base address. + * This means that the base addr + addr < eoa sanity check will + * fail whenever the super block is not at address 0 when + * reading in the first chunk of the super block. + * + * To address these issues, I have rewritten the code to + * simply verify that the address plus length is less than + * the eoa. I think this is sufficient, but further testing + * should tell me if it isn't. + * JRM -- 8/29/14 + */ + haddr_t eoa; /* End-of-allocation in the file */ + haddr_t base_addr; /* Base address of file data */ + + /* Get the file's end-of-allocation value */ + eoa = H5F_get_eoa(f, type->mem_type); + HDassert(H5F_addr_defined(eoa)); + + /* Get the file's base address */ + if ( f->shared->sblock ) + + base_addr = H5F_BASE_ADDR(f); + + else { /* sblock not loaded yet -- use file driver info */ + + HDassert(f->shared->lf); + base_addr = H5FD_get_base_addr(f->shared->lf); + + } + HDassert(H5F_addr_defined(base_addr)); + + /* Check for bad address in general */ + if((addr + base_addr) > eoa) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, \ + "address of object past end of allocation") + + /* Check if the amount of data to read will be past the eoa */ + if((addr + base_addr + len) > eoa) + /* Trim down the length of the metadata */ + len = (size_t)(eoa - (addr + base_addr)); + +#else /* modified code */ /* JRM */ + + haddr_t eoa; /* End-of-allocation in the file */ + H5FD_mem_t cooked_type; + + /* if type == H5FD_MEM_GHEAP, H5F_block_read() forces + * type to H5FD_MEM_DRAW via its call to H5F__accum_read(). + * Thus we do the same for purposes of computing the eoa + * for sanity checks. + */ + cooked_type = + (type->mem_type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type->mem_type; + + /* Get the file's end-of-allocation value */ + eoa = H5F_get_eoa(f, cooked_type); + + HDassert(H5F_addr_defined(eoa)); + + /* Check for bad address in general */ + if ( H5F_addr_gt(addr, eoa) ) + + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, \ + "address of object past end of allocation") + + /* Check if the amount of data to read will be past the eoa */ + if( H5F_addr_gt((addr + len), eoa) ) { + + /* Trim down the length of the metadata */ + + /* Note that for some cache clients, this will cause an + * assertion failure. JRM -- 8/29/14 + */ + len = (size_t)(eoa - addr); + } + + if ( len <= 0 ) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, \ + "len not positive after adjustment for EOA.") + +#endif /* modified code */ /* JRM */ + } + /* Allocate the buffer for reading the on-disk entry image */ + if(NULL == (image = H5MM_malloc(len + H5C_IMAGE_EXTRA_SPACE))) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, \ + "memory allocation failed for on disk image buffer.") + +#if H5C_DO_MEMORY_SANITY_CHECKS + HDmemcpy(((uint8_t *)image) + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ + + /* Get the on-disk entry image */ + if ( 0 == (type->flags & H5C__CLASS_SKIP_READS) ) + if(H5F_block_read(f, type->mem_type, addr, len, dxpl_id, image) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*") + + /* Deserialize the on-disk image into the native memory form */ + if(NULL == (thing = type->deserialize(image, len, udata, &dirty))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't deserialize image") + + /* If the client's cache has an image_len callback, check it */ + if(type->image_len) { + size_t new_len; /* New size of on-disk image */ + + /* set magic and type field in *entry_ptr. While the image_len + * callback shouldn't touch the cache specific fields, it may check + * these fields to ensure that it it has received the expected + * value. + * + * Note that this initialization is repeated below on the off + * chance that we had to re-try the deserialization. + */ + entry = (H5C_cache_entry_t *)thing; + entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC; + entry->type = type; + + /* verify that compressed and compressed_len are initialized */ + HDassert(compressed == FALSE); + HDassert(compressed_size == 0); + + /* Get the actual image size for the thing */ + if(type->image_len(thing, &new_len, &compressed, &compressed_size) < 0) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, \ + "can't retrieve image length") + + if(new_len == 0) + + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "image length is 0") - if(NULL == (thing = (type->load)(f, dxpl_id, addr, udata))) + HDassert(((type->flags & H5C__CLASS_COMPRESSED_FLAG) != 0) || + ((compressed == FALSE) && (compressed_size == 0))); + HDassert((compressed == TRUE) || (compressed_size == 0)); - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "unable to load entry") + if(new_len != len) { + + if(type->flags & H5C__CLASS_COMPRESSED_FLAG) { + + /* if new_len != len, then compression must be + * enabled on the entry. In this case, the image_len + * callback should have set compressed to TRUE, set + * new_len equal to the uncompressed size of the + * entry, and compressed_len equal to the compressed + * size -- which must equal len. + * + * We can't verify the uncompressed size, but we can + * verify the rest with the following assertions. + */ + HDassert(compressed); + HDassert(compressed_size == len); + + /* new_len should contain the uncompressed size. Set len + * equal to new_len, so that the cache will use the + * uncompressed size for purposes of space allocation, etc. + */ + len = new_len; + } else if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG) { + + void *new_image; /* Buffer for disk image */ + + /* compressed must be FALSE, and compressed_size + * must be zero. + */ + HDassert(!compressed); + HDassert(compressed_size == 0); + + /* Adjust the size of the image to match new_len */ + if(NULL == (new_image = H5MM_realloc(image, + new_len + H5C_IMAGE_EXTRA_SPACE))) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, \ + "image null after H5MM_realloc()") + + image = new_image; + +#if H5C_DO_MEMORY_SANITY_CHECKS + + HDmemcpy(((uint8_t *)image) + new_len, + H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); + +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ + + /* If the thing's image needs to be bigger for a speculatively + * loaded thing, free the thing and retry with new length + */ + if (new_len > len) { + + /* Release previous (possibly partially initialized) + * thing. Note that we must set entry->magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC and set one or + * two other fields before the call to free_icr + * so as to avoid sanity check failures. + */ + entry->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; + + entry->addr = addr; + + if ( type->free_icr(thing) < 0 ) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, \ + "free_icr callback failed") + + /* Go get the on-disk image again */ + if(H5F_block_read(f, type->mem_type, addr, + new_len, dxpl_id, image) < 0) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, \ + "Can't read image") + + /* Deserialize on-disk image into native memory + * form again + */ + if(NULL == (thing = type->deserialize(image, new_len, + udata, &dirty))) + + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, \ + "Can't deserialize image") + +#ifndef NDEBUG + { + /* new_compressed and new_compressed_size must be + * initialize to FALSE / 0 respectively, as clients + * that don't use compression may ignore these two + * parameters. + */ + hbool_t new_compressed = FALSE; + size_t new_compressed_size = 0; + size_t new_new_len; + + /* Get the actual image size for the thing again. Note + * that since this is a new thing, we have to set + * the magic and type fields again so as to avoid + * failing sanity checks. + */ + entry = (H5C_cache_entry_t *)thing; + entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC; + entry->type = type; + + type->image_len(thing, &new_new_len, &new_compressed, &new_compressed_size); + HDassert(new_new_len == new_len); + HDassert(!new_compressed); + HDassert(new_compressed_size == 0); + } +#endif /* NDEBUG */ + } /* end if (new_len > len) */ + + /* Retain adjusted size */ + len = new_len; + + } else { /* throw an error */ + + HGOTO_ERROR(H5E_CACHE, H5E_UNSUPPORTED, NULL, \ + "size of non-speculative, non-compressed object changed") + } + } /* end if (new_len != len) */ + } /* end if */ entry = (H5C_cache_entry_t *)thing; @@ -8663,35 +9981,39 @@ H5C_load_entry(H5F_t * f, * * However, when this code is used in the metadata cache, it is * possible that object headers will be dirty at this point, as - * the load function will alter object headers if necessary to + * the deserialize function will alter object headers if necessary to * fix an old bug. * - * To support this bug fix, I have replace the old assert: + * In the following assert: * - * HDassert( entry->is_dirty == FALSE ); + * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) ); * - * with: - * - * HDassert( ( entry->is_dirty == FALSE ) || ( type->id == 5 ) ); - * - * Note that type id 5 is associated with object headers in the metadata - * cache. + * note that type ids 5 & 6 are associated with object headers in the + * metadata cache. * * When we get to using H5C for other purposes, we may wish to * tighten up the assert so that the loophole only applies to the * metadata cache. */ - HDassert( ( entry->is_dirty == FALSE ) || ( type->id == 5 ) ); -#ifndef NDEBUG + HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6) ); + entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC; -#endif /* NDEBUG */ entry->cache_ptr = f->shared->cache; entry->addr = addr; + entry->size = len; + HDassert(entry->size < H5C_MAX_ENTRY_SIZE); + entry->compressed = compressed; + entry->compressed_size = compressed_size; + entry->image_ptr = image; + entry->image_up_to_date = TRUE; entry->type = type; + entry->is_dirty = dirty; + entry->dirtied = FALSE; entry->is_protected = FALSE; entry->is_read_only = FALSE; entry->ro_ref_count = 0; + entry->is_pinned = FALSE; entry->in_slist = FALSE; entry->flush_marker = FALSE; #ifdef H5_HAVE_PARALLEL @@ -8700,13 +10022,6 @@ H5C_load_entry(H5F_t * f, #endif /* H5_HAVE_PARALLEL */ entry->flush_in_progress = FALSE; entry->destroy_in_progress = FALSE; - entry->free_file_space_on_destroy = FALSE; - - if((type->size)(f, thing, &(entry->size)) < 0) - - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, NULL, "Can't get size of thing") - - HDassert( entry->size < H5C_MAX_ENTRY_SIZE ); /* Initialize flush dependency height fields */ entry->flush_dep_parent = NULL; @@ -8727,6 +10042,18 @@ H5C_load_entry(H5F_t * f, ret_value = thing; done: + /* Cleanup on error */ + if(NULL == ret_value) { + + /* Release resources */ + if ( thing && type->free_icr(thing) < 0 ) + + HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, \ + "free_icr callback failed") + + if(image) + image = H5MM_xfree(image); + } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* H5C_load_entry() */ @@ -8765,36 +10092,45 @@ done: * * Programmer: John Mainzer, 5/14/04 * - * JRM -- 11/13/08 - * Modified function to always observe the min_clean_size - * whether we are maintaining the clean and dirt LRU lists - * or not. To do this, we had to add the new clean_index_size - * and dirty_index_size fields to H5C_t, and supporting code - * as needed throughout the cache. + * Changes: Modified function to skip over entries with the + * flush_in_progress flag set. If this is not done, + * an infinite recursion is possible if the cache is + * full, and the pre-serialize or serialize routine + * attempts to load another entry. * - * The purpose of this modification is to avoid "metadata - * blizzards" in the write only case. In such instances, - * the cache was allowed to fill with dirty metadata. When - * we finally needed to evict an entry to make space, we had - * to flush out a whole cache full of metadata -- which has - * interesting performance effects. We hope to avoid (or - * perhaps more accurately hide) this effect by maintaining - * the min_clean_size, which should force us to start flushing - * entries long before we actually have to evict something - * to make space. + * This error was exposed by a re-factor of the + * H5C_flush_single_entry() routine. However, it was + * a potential bug from the moment that entries were + * allowed to load other entries on flush. + * + * In passing, note that the primary and secondary dxpls + * mentioned in the comment above have been replaced by + * a single dxpl at some point, and thus the discussion + * above is somewhat obsolete. Date of this change is + * unkown. + * + * JRM -- 12/26/14 + * + * Modified function to detect deletions of entries + * during a scan of the LRU, and where appropriate, + * restart the scan to avoid proceeding with a next + * entry that is no longer in the cache. + * + * Note the absence of checks after flushes of clean + * entries. As a second entry can only be removed by + * by a call to the pre_serialize or serialize callback + * of the first, and as these callbacks will not be called + * on clean entries, no checks are needed. + * + * JRM -- 4/6/15 * - * MAM -- 01/06/09 - * Added code to maintain clean_entries_skipped and total_entries - * scanned statistics. *------------------------------------------------------------------------- */ static herr_t H5C_make_space_in_cache(H5F_t * f, - hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, + hid_t dxpl_id, size_t space_needed, - hbool_t write_permitted, - hbool_t * first_flush_ptr) + hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; herr_t result; @@ -8807,6 +10143,7 @@ H5C_make_space_in_cache(H5F_t * f, size_t empty_space; hbool_t prev_is_dirty = FALSE; hbool_t didnt_flush_entry = FALSE; + hbool_t restart_scan; H5C_cache_entry_t * entry_ptr; H5C_cache_entry_t * prev_ptr; H5C_cache_entry_t * next_ptr; @@ -8817,13 +10154,12 @@ H5C_make_space_in_cache(H5F_t * f, HDassert( f ); HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( first_flush_ptr != NULL ); - HDassert( ( *first_flush_ptr == TRUE ) || ( *first_flush_ptr == FALSE ) ); HDassert( cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size) ); if ( write_permitted ) { + restart_scan = FALSE; initial_list_len = cache_ptr->LRU_list_len; entry_ptr = cache_ptr->LRU_tail_ptr; @@ -8854,6 +10190,7 @@ H5C_make_space_in_cache(H5F_t * f, ( entry_ptr != NULL ) ) { + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert( ! (entry_ptr->is_protected) ); HDassert( ! (entry_ptr->is_read_only) ); HDassert( (entry_ptr->ro_ref_count) == 0 ); @@ -8866,7 +10203,8 @@ H5C_make_space_in_cache(H5F_t * f, prev_is_dirty = prev_ptr->is_dirty; } - if ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) { + if ( ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) && + ( ! entry_ptr->flush_in_progress ) ) { didnt_flush_entry = FALSE; @@ -8881,14 +10219,29 @@ H5C_make_space_in_cache(H5F_t * f, } #endif /* H5C_COLLECT_CACHE_STATS */ + /* reset entries_removed_counter and + * last_entry_removed_ptr prior to the call to + * H5C_flush_single_entry() so that we can spot + * unexpected removals of entries from the cache, + * and set the restart_scan flag if proceeding + * would be likely to cause us to scan an entry + * that is no longer in the cache. + */ + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; + result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, - first_flush_ptr, - FALSE); + FALSE, + NULL); + + if ( ( cache_ptr->entries_removed_counter > 1 ) || + ( cache_ptr->last_entry_removed_ptr == prev_ptr ) ) + + restart_scan = TRUE; + } else if ( (cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size ) { @@ -8897,13 +10250,12 @@ H5C_make_space_in_cache(H5F_t * f, #endif /* H5C_COLLECT_CACHE_STATS */ result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, - first_flush_ptr, - TRUE); + TRUE, + NULL); + } else { /* We have enough space so don't flush clean entry. @@ -8924,7 +10276,8 @@ H5C_make_space_in_cache(H5F_t * f, } else { - /* Skip epoch markers. Set result to SUCCEED to avoid + /* Skip epoch markers and entries that are in the process + * of being flushed. Set result to SUCCEED to avoid * triggering the error code below. */ didnt_flush_entry = TRUE; @@ -8938,26 +10291,20 @@ H5C_make_space_in_cache(H5F_t * f, } if ( prev_ptr != NULL ) { -#ifndef NDEBUG - if ( prev_ptr->magic != H5C__H5C_CACHE_ENTRY_T_MAGIC ) { - /* something horrible has happened to *prev_ptr -- - * scream and die. - */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "*prev_ptr corrupt 1") - - } -#endif /* NDEBUG */ if ( didnt_flush_entry ) { - /* epoch markers don't get flushed, so the sanity checks - * on normal entries will fail -- thus just set entry_ptr - * to prev_ptr and go on. + /* epoch markers don't get flushed, and we don't touch + * entries that are in the process of being flushed. + * Hence no need for sanity checks, as we haven't + * flushed anything. Thus just set entry_ptr to prev_ptr + * and go on. */ entry_ptr = prev_ptr; - } else if ( ( prev_ptr->is_dirty != prev_is_dirty ) + } else if ( ( restart_scan ) + || + ( prev_ptr->is_dirty != prev_is_dirty ) || ( prev_ptr->next != next_ptr ) || @@ -8968,7 +10315,9 @@ H5C_make_space_in_cache(H5F_t * f, /* something has happened to the LRU -- start over * from the tail. */ + restart_scan = FALSE; entry_ptr = cache_ptr->LRU_tail_ptr; + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) } else { @@ -9056,13 +10405,11 @@ H5C_make_space_in_cache(H5F_t * f, prev_ptr = entry_ptr->aux_prev; result = H5C_flush_single_entry(f, - primary_dxpl_id, - secondary_dxpl_id, - entry_ptr->type, + dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, - first_flush_ptr, - TRUE); + TRUE, + NULL); if ( result < 0 ) { @@ -9070,6 +10417,12 @@ H5C_make_space_in_cache(H5F_t * f, "unable to flush entry") } + /* we are scanning the clean LRU, so the serialize function + * will not be called on any entry -- thus there is no + * concern about the list being modified out from under + * this function. + */ + entry_ptr = prev_ptr; entries_examined++; } @@ -9482,6 +10835,66 @@ done: /*------------------------------------------------------------------------- * + * Function: H5C_entry_in_skip_list + * + * Purpose: Debugging function that scans skip list to see if it + * is in present. We need this, as it is possible for + * an entry to be in the skip list twice. + * + * Return: FALSE if the entry is not in the skip list, and TRUE + * if it is. + * + * Programmer: John Mainzer, 11/1/14 + * + * Changes: + * + * None. + * + *------------------------------------------------------------------------- + */ +#if H5C_DO_SLIST_SANITY_CHECKS + +static hbool_t +H5C_entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr) +{ + hbool_t in_slist = FALSE; + H5SL_node_t * node_ptr = NULL; + H5C_cache_entry_t * entry_ptr = NULL; + + HDassert( cache_ptr ); + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + HDassert( cache_ptr->slist_ptr ); + + node_ptr = H5SL_first(cache_ptr->slist_ptr); + + while ( ( node_ptr != NULL ) && ( ! in_slist ) ) + { + entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); + + HDassert( entry_ptr ); + HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ); + HDassert( entry_ptr->is_dirty ); + HDassert( entry_ptr->in_slist ); + + if ( entry_ptr == target_ptr ) { + + in_slist = TRUE; + + } else { + + node_ptr = H5SL_next(node_ptr); + } + } + + return(in_slist); + +} /* H5C_entry_in_skip_list() */ + +#endif /* H5C_DO_SLIST_SANITY_CHECKS */ + + +/*------------------------------------------------------------------------- + * * Function: H5C_get_entry_ptr_from_addr() * * Purpose: Debugging function that attempts to look up an entry in the @@ -9784,7 +11197,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5C_flush_tagged_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, H5C_t * cache_ptr, haddr_t tag) +H5C_flush_tagged_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr, haddr_t tag) { herr_t ret_value = SUCCEED; @@ -9800,7 +11213,7 @@ H5C_flush_tagged_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries") /* Flush all marked entries */ - if(H5C_flush_marked_entries(f, primary_dxpl_id, secondary_dxpl_id, cache_ptr) < 0) + if(H5C_flush_marked_entries(f, dxpl_id, cache_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries") done: @@ -9873,7 +11286,7 @@ H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag) *------------------------------------------------------------------------- */ static herr_t -H5C_flush_marked_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, H5C_t * cache_ptr) +H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr) { herr_t ret_value = SUCCEED; @@ -9885,8 +11298,7 @@ H5C_flush_marked_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); /* Flush all marked entries */ - if(H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id, - H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) + if(H5C_flush_cache(f, dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache") done: @@ -9929,7 +11341,7 @@ H5C_verify_tag(int id, haddr_t tag) * constraints are met. */ /* Superblock */ - if(id == H5AC_SUPERBLOCK_ID) { + if((id == H5AC_SUPERBLOCK_ID) || (id == H5AC_DRVRINFO_ID)) { if(tag != H5AC__SUPERBLOCK_TAG) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "superblock not tagged with H5AC__SUPERBLOCK_TAG") } @@ -10001,10 +11413,9 @@ H5C_retag_copied_metadata(H5C_t * cache_ptr, haddr_t metadata_tag) next_entry_ptr = cache_ptr->index[u]; while(next_entry_ptr != NULL) { - if(cache_ptr->index[u] != NULL) { + if(cache_ptr->index[u] != NULL) if((cache_ptr->index[u])->tag == H5AC__COPIED_TAG) (cache_ptr->index[u])->tag = metadata_tag; - } /* end if */ next_entry_ptr = next_entry_ptr->ht_next; } /* end while */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 5df84cd..988dfff 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -60,7 +60,7 @@ /* Cache configuration settings */ #define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ #define H5C__H5C_T_MAGIC 0x005CAC0E -#define H5C__MAX_NUM_TYPE_IDS 27 +#define H5C__MAX_NUM_TYPE_IDS 28 #define H5C__PREFIX_LEN 32 /**************************************************************************** @@ -573,6 +573,15 @@ if ( ( (entry_ptr) == NULL ) || \ #define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \ ((cache_ptr)->unpins)[(entry_ptr)->type->id]++; +#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) \ + ((cache_ptr)->slist_scan_restarts)++; + +#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) \ + ((cache_ptr)->LRU_scan_restarts)++; + +#define H5C__UPDATE_STATS_FOR_HASH_BUCKET_SCAN_RESTART(cache_ptr) \ + ((cache_ptr)->hash_bucket_scan_restarts)++; + #if H5C_COLLECT_CACHE_ENTRY_STATS #define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) \ @@ -599,9 +608,12 @@ if ( ( (entry_ptr) == NULL ) || \ ((entry_ptr)->flushes)++; \ } -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ -{ \ - (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \ +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) \ +{ \ + if ( take_ownership ) \ + (((cache_ptr)->take_ownerships)[(entry_ptr)->type->id])++; \ + else \ + (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \ if ( (entry_ptr)->accesses > \ ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] ) \ ((cache_ptr)->max_accesses)[(entry_ptr)->type->id] = \ @@ -709,8 +721,13 @@ if ( ( (entry_ptr) == NULL ) || \ (((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \ } -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \ - (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) \ +{ \ + if ( take_ownership ) \ + (((cache_ptr)->take_ownerships)[(entry_ptr)->type->id])++; \ + else \ + (((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \ +} #define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \ { \ @@ -780,10 +797,13 @@ if ( ( (entry_ptr) == NULL ) || \ #define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) #define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) #define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) -#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) #define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) #define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) #define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) +#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) +#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) +#define H5C__UPDATE_STATS_FOR_HASH_BUCKET_SCAN_RESTART(cache_ptr) #endif /* H5C_COLLECT_CACHE_STATS */ @@ -828,11 +848,25 @@ if ( ( (cache_ptr) == NULL ) || \ ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) ) { \ + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ "Pre HT insert SC failed") \ } +#define H5C__POST_HT_INSERT_SC(cache_ptr, fail_val) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Post HT insert SC failed") \ +} + #define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ @@ -853,10 +887,28 @@ if ( ( (cache_ptr) == NULL ) || \ ( (entry_ptr)->ht_prev != NULL ) ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) ) { \ + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \ } +#define H5C__POST_HT_REMOVE_SC(cache_ptr, entry_ptr) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (entry_ptr) == NULL ) || \ + ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ + ( (entry_ptr)->size <= 0 ) || \ + ( (entry_ptr)->ht_prev != NULL ) || \ + ( (entry_ptr)->ht_prev != NULL ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Post HT remove SC failed") \ +} + /* (Keep in sync w/H5C_TEST__PRE_HT_SEARCH_SC macro in test/cache_common.h -QAK) */ #define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ if ( ( (cache_ptr) == NULL ) || \ @@ -915,6 +967,8 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( ( !( was_clean ) || \ ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ ( ( (was_clean) ) || \ @@ -933,6 +987,8 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( ( !((entry_ptr)->is_dirty ) || \ ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ ( ( ((entry_ptr)->is_dirty) ) || \ @@ -953,7 +1009,9 @@ if ( \ ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ ( (cache_ptr)->dirty_index_size < (entry_ptr)->size ) || \ ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Pre HT update for entry clean SC failed") \ } @@ -968,21 +1026,27 @@ if ( \ ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ ( (cache_ptr)->clean_index_size < (entry_ptr)->size ) || \ ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Pre HT update for entry dirty SC failed") \ } #define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ -if ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ +if ( ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Post HT update for entry clean SC failed") \ } #define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ -if ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ +if ( ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ + ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Post HT update for entry dirty SC failed") \ } @@ -990,7 +1054,9 @@ if ( (cache_ptr)->index_size != \ #else /* H5C_DO_SANITY_CHECKS */ #define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) +#define H5C__POST_HT_INSERT_SC(cache_ptr, fail_val) #define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) +#define H5C__POST_HT_REMOVE_SC(cache_ptr, entry_ptr) #define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) #define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) #define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) @@ -1026,9 +1092,10 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->clean_index_size += (entry_ptr)->size; \ if ((entry_ptr)->flush_me_last) { \ (cache_ptr)->num_last_entries++; \ - HDassert((cache_ptr)->num_last_entries == 1); \ + HDassert((cache_ptr)->num_last_entries <= 2); \ } \ H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ + H5C__POST_HT_INSERT_SC(cache_ptr, fail_val) \ } #define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \ @@ -1052,9 +1119,10 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ if ((entry_ptr)->flush_me_last) { \ (cache_ptr)->num_last_entries--; \ - HDassert((cache_ptr)->num_last_entries == 0); \ + HDassert((cache_ptr)->num_last_entries <= 1); \ } \ H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ + H5C__POST_HT_REMOVE_SC(cache_ptr, entry_ptr) \ } #define H5C__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \ @@ -1205,9 +1273,20 @@ if ( (cache_ptr)->index_size != \ * able to dirty, resize and/or move entries during the * flush. * + * JRM -- 12/13/14 + * Added code to set cache_ptr->slist_changed to TRUE + * when an entry is inserted in the slist. + * *------------------------------------------------------------------------- */ +#if H5C_DO_SLIST_SANITY_CHECKS +#define ENTRY_IN_SLIST(cache_ptr, entry_ptr) \ + H5C_entry_in_skip_list((cache_ptr), (entry_ptr)) +#else /* H5C_DO_SLIST_SANITY_CHECKS */ +#define ENTRY_IN_SLIST(cache_ptr, entry_ptr) FALSE +#endif /* H5C_DO_SLIST_SANITY_CHECKS */ + #if H5C_DO_SANITY_CHECKS #define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ @@ -1218,12 +1297,14 @@ if ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ HDassert( !((entry_ptr)->in_slist) ); \ + HDassert( !ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \ \ if(H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) < 0) \ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ "Can't insert entry in skip list") \ \ (entry_ptr)->in_slist = TRUE; \ + (cache_ptr)->slist_changed = TRUE; \ (cache_ptr)->slist_len++; \ (cache_ptr)->slist_size += (entry_ptr)->size; \ (cache_ptr)->slist_len_increase++; \ @@ -1244,12 +1325,14 @@ if ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ HDassert( !((entry_ptr)->in_slist) ); \ + HDassert( !ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \ \ if(H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &(entry_ptr)->addr) < 0) \ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), \ "Can't insert entry in skip list") \ \ (entry_ptr)->in_slist = TRUE; \ + (cache_ptr)->slist_changed = TRUE; \ (cache_ptr)->slist_len++; \ (cache_ptr)->slist_size += (entry_ptr)->size; \ \ @@ -1290,6 +1373,10 @@ if ( (cache_ptr)->index_size != \ * Updated sanity checks for the new is_read_only and * ro_ref_count fields in H5C_cache_entry_t. * + * JRM -- 12/13/14 + * Added code to set cache_ptr->slist_changed to TRUE + * when an entry is removed from the slist. + * *------------------------------------------------------------------------- */ @@ -1311,6 +1398,7 @@ if ( (cache_ptr)->index_size != \ "Can't delete entry from skip list.") \ \ HDassert( (cache_ptr)->slist_len > 0 ); \ + (cache_ptr)->slist_changed = TRUE; \ (cache_ptr)->slist_len--; \ HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \ (cache_ptr)->slist_size -= (entry_ptr)->size; \ @@ -1341,6 +1429,11 @@ if ( (cache_ptr)->index_size != \ * able to dirty, resize and/or move entries during the * flush. * + * JRM -- 12/13/14 + * Note that we do not set cache_ptr->slist_changed to TRUE + * in this case, as the structure of the slist is not + * modified. + * *------------------------------------------------------------------------- */ @@ -2706,6 +2799,10 @@ if ( (cache_ptr)->index_size != \ * the max_cache_size limit until the next time the cache * attempts to load or insert an entry. * + * d) When the evictions_enabled field is false (see below), + * the cache size will increase without limit until the + * field is set to true. + * * min_clean_size: Nominal minimum number of clean bytes in the cache. * The cache attempts to maintain this number of bytes of * clean data so as to avoid case b) above. Again, this is @@ -2756,7 +2853,7 @@ if ( (cache_ptr)->index_size != \ * This value should not be mistaken for footprint of the * cache in memory. The average cache entry is small, and * the cache has a considerable overhead. Multiplying the - * index_size by two should yield a conservative estimate + * index_size by three should yield a conservative estimate * of the cache's memory footprint. * * clean_index_size: Number of bytes of clean entries currently stored in @@ -2767,12 +2864,7 @@ if ( (cache_ptr)->index_size != \ * * WARNING: * - * 1) The clean_index_size field is not maintained by the - * index macros, as the hash table doesn't care whether - * the entry is clean or dirty. Instead the field is - * maintained in the H5C__UPDATE_RP macros. - * - * 2) The value of the clean_index_size must not be mistaken + * The value of the clean_index_size must not be mistaken * for the current clean size of the cache. Rather, the * clean size of the cache is the current value of * clean_index_size plus the amount of empty space (if any) @@ -2784,13 +2876,6 @@ if ( (cache_ptr)->index_size != \ * Thus we should have the invariant that clean_index_size + * dirty_index_size == index_size. * - * WARNING: - * - * 1) The dirty_index_size field is not maintained by the - * index macros, as the hash table doesn't care whether - * the entry is clean or dirty. Instead the field is - * maintained in the H5C__UPDATE_RP macros. - * * index: Array of pointer to H5C_cache_entry_t of size * H5C__HASH_TABLE_LEN. At present, this value is a power * of two, not the usual prime number. @@ -2806,6 +2891,37 @@ if ( (cache_ptr)->index_size != \ * changing the H5C__HASH_FCN macro and the deletion of the * H5C__HASH_MASK #define. No other changes should be required. * + * With the addition of the take ownership flag, it is possible that + * an entry may be removed from the cache as the result of the flush of + * a second entry. In general, this causes little trouble, but it is + * possible that the entry removed may be the next entry in the scan of + * a list. In this case, we must be able to detect the fact that the + * entry has been removed, so that the scan doesn't attempt to proceed with + * an entry that is no longer in the cache. + * + * The following fields are maintained to facilitate this. + * + * entries_removed_counter: Counter that is incremented each time an + * entry is removed from the cache by any means (eviction, + * expungement, or take ownership at this point in time). + * Functions that perform scans on lists may set this field + * to zero prior to calling H5C_flush_single_entry(). + * Unexpected changes to the counter indicate that an entry + * was removed from the cache as a side effect of the flush. + * + * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t + * which contained the last entry to be removed from the cache, + * or NULL if there either is no such entry, or if a function + * performing a scan of a list has set this field to NULL prior + * to calling H5C_flush_single_entry(). + * + * WARNING!!! This field must NEVER be dereferenced. It is + * maintained to allow functions that perform scans of lists + * to compare this pointer with their pointers to next, thus + * allowing them to avoid unnecessary restarts of scans if the + * pointers don't match, and if entries_removed_counter is + * one. + * * * With the addition of cache entry tagging, it is possible that * an entry may be inserted into the cache without a tag during testing @@ -2825,6 +2941,21 @@ if ( (cache_ptr)->index_size != \ * are flushed. (this has been changed -- dirty entries are now removed from * the skip list as they are flushed. JRM - 10/25/05) * + * slist_changed: Boolean flag used to indicate whether the contents of + * the slist has changed since the last time this flag was + * reset. This is used in the cache flush code to detect + * conditions in which pre-serialize or serialize callbacks + * have modified the slist -- which obliges us to restart + * the scan of the slist from the beginning. + * + * slist_change_in_pre_serialize: Boolean flag used to indicate that + * a pre_serialize call has modified the slist since the + * last time this flag was reset. + * + * slist_change_in_serialize: Boolean flag used to indicate that + * a serialize call has modified the slist since the + * last time this flag was reset. + * * slist_len: Number of entries currently in the skip list * used to maintain a sorted list of dirty entries in the * cache. @@ -2855,6 +2986,11 @@ if ( (cache_ptr)->index_size != \ * explicit tests for that case should be added when said * HDasserts are removed. * + * Update: There are now two possible last entries + * (superblock and file driver info message). This + * number will probably increase as we add superblock + * messages. JRM -- 11/18/14 + * * With the addition of the fractal heap, the cache must now deal with * the case in which entries may be dirtied, moved, or have their sizes * changed during a flush. To allow sanity checks in this situation, the @@ -2863,10 +2999,11 @@ if ( (cache_ptr)->index_size != \ * * slist_len_increase: Number of entries that have been added to the * slist since the last time this field was set to zero. + * Note that this value can be negative. * * slist_size_increase: Total size of all entries that have been added * to the slist since the last time this field was set to - * zero. + * zero. Note that this value can be negative. * * * When a cache entry is protected, it must be removed from the LRU @@ -2905,9 +3042,9 @@ if ( (cache_ptr)->index_size != \ * replacement policy code). * * 2) A pinned entry can be accessed or modified at any time. - * Therefore, the cache must check with the entry owner - * before flushing it. If permission is denied, the - * cache just skips the entry in the flush. + * This places an additional burden on the associated pre-serialize + * and serialize callbacks, which must ensure the the entry is in + * a consistant state before creating an image of it. * * 3) A pinned entry can be marked as dirty (and possibly * change size) while it is unprotected. @@ -2965,7 +3102,8 @@ if ( (cache_ptr)->index_size != \ * be collective and the other processes will not know to participate. * * To deal with this issue, I have modified the usual LRU policy by adding - * clean and dirty LRU lists to the usual LRU list. + * clean and dirty LRU lists to the usual LRU list. In general, these + * lists are only exist in parallel builds. * * The clean LRU list is simply the regular LRU list with all dirty cache * entries removed. @@ -2982,7 +3120,7 @@ if ( (cache_ptr)->index_size != \ * * Even if we start with a completely clean cache, a sequence of protects * without unprotects can empty the clean LRU list. In this case, the - * cache must grow temporarily. At the next write, we will attempt to + * cache must grow temporarily. At the next sync point, we will attempt to * evict enough entries to reduce index_size to less than max_cache_size. * While this will usually be possible, all bets are off if enough entries * are protected. @@ -2992,14 +3130,14 @@ if ( (cache_ptr)->index_size != \ * * LRU_list_len: Number of cache entries currently on the LRU list. * - * Observe that LRU_list_len + pl_len must always equal - * index_len. + * Observe that LRU_list_len + pl_len + pel_len must always + * equal index_len. * * LRU_list_size: Number of bytes of cache entries currently residing on the * LRU list. * - * Observe that LRU_list_size + pl_size must always equal - * index_size. + * Observe that LRU_list_size + pl_size + pel_size must always + * equal index_size. * * LRU_head_ptr: Pointer to the head of the doubly linked LRU list. Cache * entries on this list are linked by their next and prev fields. @@ -3244,6 +3382,11 @@ if ( (cache_ptr)->index_size != \ * equal to the array index has been evicted from the cache in * the current epoch. * + * take_ownerships: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The + * cells are used to record the number of times an entry with + * type id equal to the array index has been removed from the + * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch. + * * moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells * are used to record the number of times an entry with type * id equal to the array index has been moved in the current @@ -3252,7 +3395,7 @@ if ( (cache_ptr)->index_size != \ * entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. * The cells are used to record the number of times an entry * with type id equal to the array index has been moved - * during its flush callback in the current epoch. + * during its pre-serialize callback in the current epoch. * * cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. * The cells are used to record the number of times an entry @@ -3297,7 +3440,8 @@ if ( (cache_ptr)->index_size != \ * entry_flush_size_changes: Array of int64 of length * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record * the number of times an entry with type id equal to the - * array index has changed size while in its flush callback. + * array index has changed size while in its pre-serialize + * callback. * * cache_flush_size_changes: Array of int64 of length * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record @@ -3370,7 +3514,33 @@ if ( (cache_ptr)->index_size != \ * * entries_scanned_to_make_space: Number of entries scanned only when looking * for entries to evict in order to make space in cache. - + * + * + * As entries are now capable of moving, loading, dirtying, and deleting + * other entries in their pre_serialize and serialize callbacks, it has + * been necessary to insert code to restart scans of lists so as to avoid + * improper behavior if the next entry in the list is the target of one on + * these operations. + * + * The following fields are use to count such occurances. They are used + * both in tests (to verify that the scan has been restarted), and to + * obtain estimates of how frequently these restarts occur. + * + * slist_scan_restarts: Number of times a scan of the slist (that contains + * calls to H5C_flush_single_entry()) has been restarted to + * avoid potential issues with change of status of the next + * entry in the scan. + * + * LRU_scan_restarts: Number of times a scan of the LRU list (that contains + * calls to H5C_flush_single_entry()) has been restarted to + * avoid potential issues with change of status of the next + * entry in the scan. + * + * hash_bucket_scan_restarts: Number of times a scan of a hash bucket list + * (that contains calls to H5C_flush_single_entry()) has been + * restarted to avoid potential issues with change of status + * of the next entry in the scan. + * * The remaining stats are collected only when both H5C_COLLECT_CACHE_STATS * and H5C_COLLECT_CACHE_ENTRY_STATS are true. * @@ -3438,9 +3608,17 @@ struct H5C_t { size_t dirty_index_size; H5C_cache_entry_t * (index[H5C__HASH_TABLE_LEN]); + /* Fields to detect entries removed during scans */ + int64_t entries_removed_counter; + H5C_cache_entry_t * last_entry_removed_ptr; + /* Field to disable tag validation */ hbool_t ignore_tags; + /* Fields for maintaining list of in-order entries, for flushing */ + hbool_t slist_changed; + hbool_t slist_change_in_pre_serialize; + hbool_t slist_change_in_serialize; int32_t slist_len; size_t slist_size; H5SL_t * slist_ptr; @@ -3515,6 +3693,7 @@ struct H5C_t { int64_t clears[H5C__MAX_NUM_TYPE_IDS + 1]; int64_t flushes[H5C__MAX_NUM_TYPE_IDS + 1]; int64_t evictions[H5C__MAX_NUM_TYPE_IDS + 1]; + int64_t take_ownerships[H5C__MAX_NUM_TYPE_IDS + 1]; int64_t moves[H5C__MAX_NUM_TYPE_IDS + 1]; int64_t entry_flush_moves[H5C__MAX_NUM_TYPE_IDS + 1]; int64_t cache_flush_moves[H5C__MAX_NUM_TYPE_IDS + 1]; @@ -3559,6 +3738,11 @@ struct H5C_t { int32_t max_entries_skipped_in_msic; int32_t max_entries_scanned_in_msic; int64_t entries_scanned_to_make_space; + + /* Fields for tracking skip list scan restarts */ + int64_t slist_scan_restarts; + int64_t LRU_scan_restarts; + int64_t hash_bucket_scan_restarts; #if H5C_COLLECT_CACHE_ENTRY_STATS int32_t max_accesses[H5C__MAX_NUM_TYPE_IDS + 1]; diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 3413381..a9ffb70 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -40,9 +40,30 @@ /* Library Private Macros */ /**************************/ -#define H5C_DO_SANITY_CHECKS 0 +#ifndef NDEBUG +#define H5C_DO_SANITY_CHECKS 1 +#define H5C_DO_SLIST_SANITY_CHECKS 0 #define H5C_DO_TAGGING_SANITY_CHECKS 1 #define H5C_DO_EXTREME_SANITY_CHECKS 0 +#else /* NDEBUG */ +/* With rare execptions, the following defines should be set + * to 0 if NDEBUG is defined + */ +#define H5C_DO_SANITY_CHECKS 0 +#define H5C_DO_SLIST_SANITY_CHECKS 0 +#define H5C_DO_TAGGING_SANITY_CHECKS 0 +#define H5C_DO_EXTREME_SANITY_CHECKS 0 +#endif /* NDEBUG */ + +/* Note: The memory sanity checks aren't going to work until I/O filters are + * changed to call a particular alloc/free routine for their buffers, + * because the H5AC__SERIALIZE_RESIZED_FLAG set by the fractal heap + * direct block serialize callback calls H5Z_pipeline(). When the I/O + * filters are changed, then we should implement "cache image alloc/free" + * routines that the fractal heap direct block (and global heap) serialize + * calls can use when resizing (and re-allocating) their image in the + * cache. -QAK */ +#define H5C_DO_MEMORY_SANITY_CHECKS 0 /* This sanity checking constant was picked out of the air. Increase * or decrease it if appropriate. Its purposes is to detect corrupt @@ -53,9 +74,15 @@ #define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) /* H5C_COLLECT_CACHE_STATS controls overall collection of statistics - * on cache activity. In general, this #define should be set to 0. + * on cache activity. In general, this #define should be set to 1 in + * debug mode, and 0 in production mode.. */ + +#ifndef NDEBUG +#define H5C_COLLECT_CACHE_STATS 1 +#else /* NDEBUG */ #define H5C_COLLECT_CACHE_STATS 0 +#endif /* NDEBUG */ /* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics * in individual cache entries. @@ -82,10 +109,20 @@ #define H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS 0 #endif /* H5_HAVE_PARALLEL */ -/* Flags returned from the 'flush' callback */ -#define H5C_CALLBACK__NO_FLAGS_SET 0x0 -#define H5C_CALLBACK__SIZE_CHANGED_FLAG 0x1 -#define H5C_CALLBACK__MOVED_FLAG 0x2 +/* Flags for cache client class behavior */ +#define H5C__CLASS_NO_FLAGS_SET ((unsigned)0x0) +#define H5C__CLASS_SPECULATIVE_LOAD_FLAG ((unsigned)0x1) +#define H5C__CLASS_COMPRESSED_FLAG ((unsigned)0x2) +/* The following flags may only appear in test code */ +#define H5C__CLASS_NO_IO_FLAG ((unsigned)0x4) +#define H5C__CLASS_SKIP_READS ((unsigned)0x8) +#define H5C__CLASS_SKIP_WRITES ((unsigned)0x10) + +/* Flags for pre-serialize callback */ +#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0) +#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1) +#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2) +#define H5C__SERIALIZE_COMPRESSED_FLAG ((unsigned)0x4) /* Upper and lower limits on cache size. These limits are picked * out of a hat -- you should be able to change them as necessary. @@ -112,11 +149,9 @@ */ #define H5C__NUM_FLUSH_DEP_HEIGHTS 6 -#ifndef NDEBUG /* Values for cache entry magic field */ #define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A #define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef -#endif /* NDEBUG */ /* Cache configuration validation definitions */ #define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1 @@ -169,9 +204,13 @@ * These flags apply to H5C_insert_entry(): * H5C__SET_FLUSH_MARKER_FLAG * H5C__PIN_ENTRY_FLAG + * H5C__FLUSH_LAST_FLAG ; super block only + * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only * * These flags apply to H5C_protect() * H5C__READ_ONLY_FLAG + * H5C__FLUSH_LAST_FLAG ; super block only + * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only * * These flags apply to H5C_unprotect(): * H5C__SET_FLUSH_MARKER_FLAG @@ -223,63 +262,842 @@ typedef struct H5C_t H5C_t; -/* - * Class methods pertaining to caching. Each type of cached object will - * have a constant variable with permanent life-span that describes how - * to cache the object. That variable will be of type H5C_class_t and - * have the following required fields... +/*************************************************************************** + * + * Struct H5C_class_t + * + * Instances of H5C_class_t are used to specify the callback functions + * used by the metadata cache for each class of metadata cache entry. + * The fields of the structure are discussed below: + * + * id: Integer field containing the unique ID of the class of metadata + * cache entries. + * + * name: Pointer to a string containing the name of the class of metadata + * cache entries. + * + * mem_type: Instance of H5FD_mem_t, that is used to supply the + * mem type passed into H5F_block_read(). + * + * flags: Flags indicating class-specific behavior. + * + * Whoever created the flags field neglected to document the meanings + * of the flags he created. Hence the following discussion of the + * H5C__CLASS_SPECULATIVE_LOAD_FLAG and (to a lesser extent) + * H5C__CLASS_COMPRESSED_FLAG should be viewed with suspicion, + * as the meanings are divined from the source code, and thus may be + * inaccurate. Please correct any errors you find. + * + * Possible flags are: + * + * H5C__CLASS_NO_FLAGS_SET: No special processing. + * + * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag appears to be used + * only in H5C_load_entry(). When it is set, entries are + * permitted to change their sizes on the first attempt + * to load. + * + * If the new size is larger than the old, the read buffer + * is reallocated to the new size, loaded from file, and the + * deserialize routine is called a second time on the + * new buffer. The entry returned by the first call to + * the deserialize routine is discarded (via the free_icr + * call) after the new size is retrieved (via the image_len + * call). Note that the new size is used as the size of the + * entry in the cache. + * + * If the new size is smaller than the old, no new loads + * or desearializes are performed, but the new size becomes + * the size of the entry in the cache. + * + * When this flag is set, an attempt to read past the + * end of file is pemitted. In this case, if the size + * returned get_load_size callback would result in a + * read past the end of file, the size is trunkated to + * avoid this, and processing proceeds as normal. * - * LOAD: Loads an object from disk to memory. The function - * should allocate some data structure and return it. + * H5C__CLASS_COMPRESSED_FLAG: This flags indicates that the entry + * may be compressed -- i.e. its on disk image is run through + * filters on the way to and from disk. Thus the uncompressed + * (or unfiltered) size of the entry may be different from the + * size of the entry in file. * - * FLUSH: Writes some data structure back to disk. It would be - * wise for the data structure to include dirty flags to - * indicate whether it really needs to be written. This - * function is also responsible for freeing memory allocated - * by the LOAD method if the DEST argument is non-zero (by - * calling the DEST method). + * This has the following implications: * - * DEST: Just frees memory allocated by the LOAD method. + * On load, uncompressed size and load size may be different. + * Presumably, load size will be smaller than uncompressed + * size, but there is no requirement for this in the code + * (but note that I have inserted an assertion to this effect, + * which has not been triggered to date). * - * CLEAR: Just marks object as non-dirty. + * On insertion, compressed (AKA filtered, AKA on disk) size + * is unknown, as the entry has yet to be run through filters. + * Compressed size is computed whenever the entry is + * written (or the image is updated -- not relevant until + * journaling is brought back). * - * NOTIFY: Notify client that an action on an entry has taken/will take - * place + * On dirty (of a clean entry), compressed (AKA filtered, + * AKA on disk) size becomes unknown. Thus, compressed size + * must be computed by the pre-serialize callback before the + * entry may be written. * - * SIZE: Report the size (on disk) of the specified cache object. - * Note that the space allocated on disk may not be contiguous. - */ + * Once the compressed size becomes unknown, it remains so + * until the on disk image is constructed. + * + * Observe that the cache needs to know the size of the entry + * for space allocation purposes. Since the compressed size + * can change or become unknown, it uses the uncompressed + * size which may change, but which should always be known. + * The compressed size is used only for journaling and disk I/O. + * + * While there is no logical reason why they could not be + * combined, due to absence of need and for simplicity of code, + * the cache does not permit both the the + * H5C__CLASS_COMPRESSED_FLAG and the + * H5C__CLASS_SPECULATIVE_LOAD_FLAG to be set in the same + * instance of H5C_class_t. + * + * The following flags may only appear in test code. + * + * H5C__CLASS_NO_IO_FLAG: This flag is intended only for use in test + * code. When it is set, any attempt to load an entry of + * the type with this flag set will trigger an assertion + * failure, and any flush of an entry with this flag set + * will not result in any write to file. + * + * H5C__CLASS_SKIP_READS: This flags is intended only for use in test + * code. When it is set, reads on load will be skipped, + * and an uninitialize buffer will be passed to the + * deserialize function. + * + * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test + * code. When it is set, writes of buffers prepared by the + * serialize callback will be skipped. + * + * GET_LOAD_SIZE: Pointer to the 'get load size' function. + * + * This function must be able to determine the size of the disk image of + * a metadata cache entry, given the 'udata' that will be passed to the + * 'deserialize' callback. + * + * Note that if either the H5C__CLASS_SPECULATIVE_LOAD_FLAG or + * the H5C__CLASS_COMPRESSED_FLAG is set, the disk image size + * returned by this callback is either a first guess (if the + * H5C__CLASS_SPECULATIVE_LOAD_FLAG is set) or (if the + * H5C__CLASS_COMPRESSED_FLAG is set), the exact on disk size + * of the entry whether it has been run through filters or not. + * In all other cases, the value returned should be the correct + * uncompressed size of the entry. + * + * The typedef for the deserialize callback is as follows: + * + * typedef herr_t (*H5C_get_load_size_func_t)(void *udata_ptr, + * size_t *image_len_ptr); + * + * The parameters of the deserialize callback are as follows: + * + * udata_ptr: Pointer to user data provided in the protect call, which + * will also be passed through to the deserialize callback. + * + * image_len_ptr: Pointer to the location in which the length in bytes + * of the in file image to be deserialized is to be returned. + * + * This value is used by the cache to determine the size of + * the disk image for the metadata, in order to read the disk + * image from the file. + * + * Processing in the get_load_size function should proceed as follows: + * + * If successful, the function will place the length of the on disk + * image associated with supplied user data in *image_len_ptr, and + * then return SUCCEED. + * + * On failure, the function must return FAIL and push error information + * onto the error stack with the error API routines, without modifying + * the value pointed to by the image_len_ptr. + * + * + * DESERIALIZE: Pointer to the deserialize function. + * + * This function must be able to read a buffer containing the on disk + * image of a metadata cache entry, allocate and load the equivalent + * in core representation, and return a pointer to that representation. + * + * The typedef for the deserialize callback is as follows: + * + * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr, + * size_t len, + * void * udata_ptr, + * boolean * dirty_ptr); + * + * The parameters of the deserialize callback are as follows: + * + * image_ptr: Pointer to a buffer of length len containing the + * contents of the file starting at addr and continuing + * for len bytes. + * + * len: Length in bytes of the in file image to be deserialized. + * + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. + * + * udata_ptr: Pointer to user data provided in the protect call, which + * must be passed through to the deserialize callback. + * + * dirty_ptr: Pointer to boolean which the deserialize function + * must use to mark the entry dirty if it has to modify + * the entry to clean up file corruption left over from + * an old bug in the HDF5 library. + * + * Processing in the deserialize function should proceed as follows: + * + * If the image contains valid data, and is of the correct length, + * the deserialize function must allocate space for an in core + * representation of that data, load the contents of the image into + * the space allocated for the in core representation, and return + * a pointer to the in core representation. Observe that an + * instance of H5C_cache_entry_t must be the first item in this + * representation. The cache will initialize it after the callback + * returns. + * + * Note that the structure of the in core representation is otherwise + * up to the cache client. All that is required is that the pointer + * returned be sufficient for the clients purposes when it is returned + * on a protect call. + * + * If the deserialize function has to clean up file corruption + * left over from an old bug in the HDF5 library, it must set + * *dirty_ptr to TRUE. If it doesn't, no action is needed as + * *dirty_ptr will be set to FALSE before the deserialize call. + * + * If the operation fails for any reason (i.e. bad data in buffer, bad + * buffer length, malloc failure, etc.) the function must return NULL and + * push error information on the error stack with the error API routines. + * + * Exceptions to the above: + * + * If the H5C__CLASS_SPECULATIVE_LOAD_FLAG is set, the buffer supplied + * to the function need not be currect on the first invocation of the + * callback in any single attempt to load the entry. + * + * In this case, if the buffer is larger than necessary, the function + * should load the entry as described above and not flag an error due + * to the oversized buffer. The cache will correct its mis-apprehension + * of the entry size with a subsequent call to the image_len callback. + * + * If the buffer is too small, and this is the first deserialize call + * in the entry load operation, the function should not flag an error. + * Instead, it must compute the correct size of the entry, allocate an + * in core representation and initialize it to the extent that an + * immediate call to the image len callback will return the correct + * image size. + * + * In this case, when the deserialize callback returns, the cache will + * call the image length callback, realize that the supplied buffer was + * too small, discard the returned in core representation, allocate + * and load a new buffer of the correct size from file, and then call + * the deserialize callback again. + * + * If the H5C__CLASS_COMPRESSED_FLAG is set, exceptions are as per the + * H5C__CLASS_SPECULATIVE_LOAD_FLAG, save that only oversized buffers + * are permitted. + * + * + * IMAGE_LEN: Pointer to the image length callback. + * + * This callback exists primarily to support + * H5C__CLASS_SPECULATIVE_LOAD_FLAG and H5C__CLASS_COMPRESSED_FLAG + * discussed above, although it is also used to obtain the size of + * newly inserted entries. + * + * In the case of the H5C__CLASS_SPECULATIVE_LOAD_FLAG, it is used to + * allow the client to change the size of an entry in the deserialize + * callback. + * + * For the H5C__CLASS_COMPRESSED_FLAG, it is used to allow the client + * to indicate whether the entry is compressed (i.e. whether entries + * are run through filters) and if so, to report both the uncompressed + * and the compressed entry size (i.e. the actual on disk size after + * the entry has been run through filters) if that value is known. + * + * The callback is also used in H5C_insert_entry() to obtain the + * size of the newly inserted entry. + * + * The typedef for the image_len callback is as follows: + * + * typedef herr_t (*H5C_image_len_func_t)(void *thing, + * size_t *image_len_ptr, + * hbool_t *compressed_ptr, + * size_t *compressed_image_len_ptr); + * + * The parameters of the image_len callback are as follows: + * + * thing: Pointer to the in core representation of the entry. + * + * image_len_ptr: Pointer to size_t in which the callback will return + * the length (in bytes) of the cache entry. + * + * If the H5C__CLASS_COMPRESSED_FLAG is not set in the + * associated instance of H5C_class_t, or if the flag is + * set, and the callback sets *compressed_ptr to FALSE, + * this size is the actual size of the entry on disk. + * + * Otherwise, this size is the uncompressed size of the + * entry -- which the cache will use for all purposes OTHER + * than journal writes and disk I/O. + * + * compressed_ptr: Pointer to a boolean flag indicating whether + * the cache entry will be compressed / uncompressed on + * disk writes / reads. + * + * If the H5C__CLASS_COMPRESSED_FLAG is not set in the + * associated instance of H5C_class_t, *compressed_ptr + * must be set to FALSE. + * + * If the H5C__CLASS_COMPRESSED_FLAG is set in the + * associated instance of H5C_class_t, and filters are + * not enabled, *compressed_ptr must be set to FALSE. + * + * If the H5C__CLASS_COMPRESSED_FLAG is set in the + * associated instance of H5C_class_t, and filters are + * enabled, the callback must set *compressed_ptr to TRUE. + * + * Note that *compressed_ptr will always be set to FALSE + * by the caller prior to invocation of the callback. Thus + * callbacks for clients that don't set the + * H5C__CLASS_COMPRESSED_FLAG can ignore this parameter. + * + * compressed_image_len_ptr: Pointer to size_t in which the callback + * may return the length (in bytes) of the compressed on + * disk image of the entry, or the uncompressed size if the + * compressed size has not yet been calculated. + * + * Since computing the compressed image len is expensive, + * the callback should only report the most recently computed + * value -- which will typically be incorrect if the entry + * is dirty. + * + * If *compressed_ptr is set to FALSE, *compressed_image_len_ptr + * should be set to zero. However, as *compressed_image_len_ptr + * will be initialize to zero prior to the call, the callback + * need not modify it if the H5C__CLASS_COMPRESSED_FLAG is + * not set. + * + * If the H5C__CLASS_COMPRESSED_FLAG is not set in the associated + * instance of H5C_class_t, processing in the image_len function + * should proceed as follows: + * + * If successful, the function will place the length of the on disk + * image associated with the in core representation provided in the + * thing parameter in *image_len_ptr, and then return SUCCEED. Since + * *compressed_ptr and *compressed_image_len_ptr will be initialized to + * FALSE and zero respectively before the call, the callback need not + * modify these values, and may declare the associated parameters as + * UNUSED. + * + * If the H5C__CLASS_COMPRESSED_FLAG is set in the associated + * instance of H5C_class_t, processing in the image_len function + * should proceed as follows: + * + * If successful, the function will place the uncompressed length of + * the on disk image associated with the in core representation + * provided in the thing parameter in *image_len_ptr. If filters + * are not enabled for the entry, it will set *compressed_ptr to FALSE, + * and *compressed_image_len_ptr to zero. If filters are enabled, + * it will set *compressed_ptr to TRUE. In this case, it must set + * *compressed_image_len_ptr equal to the last computed compressed + * if the compressed size, or to the uncompressed size if that value + * is yet to be computed. In all cases, it will return SUCCEED if + * successful. + * + * In either case, if the function fails, it must return FAIL and + * push error information onto the error stack with the error API + * routines, and return without modifying the values pointed to by + * the image_len_ptr, compressed_ptr, and compressed_image_len_ptr + * parameters. + * + * PRE_SERIALIZE: Pointer to the pre-serialize callback. + * + * The pre-serialize callback is invoked by the metadata cache before + * it needs a current on-disk image of the metadata entry for purposes + * either constructing a journal or flushing the entry to disk. + * + * If the client needs to change the address or compressed or + * uncompressed length of the entry prior to flush, the pre-serialize + * callback is responsible for these actions, so that the actual + * serialize callback (described below) is only responsible for + * serializing the data structure, not moving it on disk or resizing it. + * + * In addition, the client may use the pre-serialize callback to + * ensure that the entry is ready to be flushed -- in particular, + * if the entry contains references to other entries that are in + * temporary file space, the pre-serialize callback must move those + * entries into real file space so that the serialzed entry will + * contain no invalid data. + * + * One would think that the base address and length of + * the length of the entry's image on disk would be well known. + * However, that need not be the case as free space section info + * entries will change size (and possibly location) depending on the + * number of blocks of free space being manages, and fractal heap + * direct blocks can change compressed size (and possibly location) + * on serialization if compression is enabled. Similarly, it may + * be necessary to move entries from temporary to real file space. + * + * The pre-serialize callback must report any such changes to the + * cache, which must then update its internal structures as needed. + * + * The typedef for the pre-serialize callback is as follows: + * + * typedef herr_t (*H5C_pre_serialize_func_t)(const H5F_t *f, + * hid_t dxpl_id, + * void * thing, + * haddr_t addr, + * size_t len, + * size_t compressed_len, + * haddr_t * new_addr_ptr, + * size_t * new_len_ptr, + * size_t * new_compressed_len_ptr, + * unsigned * flags_ptr); + * + * The parameters of the pre-serialize callback are as follows: + * + * f: File pointer -- needed if other metadata cache entries + * must be modified in the process of serializing the + * target entry. + * + * dxpl_id: dxpl_id passed with the file pointer to the cache, and + * passed on to the callback. Necessary as some callbacks + * revise the size and location of the target entry, or + * possibly other entries on pre-serialize. + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. + * This is the same pointer returned by a protect of the + * addr and len given above. + * + * addr: Base address in file of the entry to be serialized. + * + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. + * + * len: Length in bytes of the in file image of the entry to be + * serialized. Also the size the image passed to the + * serialize callback (discussed below) unless either that + * value is altered by this function, or the entry will be + * compressed. In the latter case, the compressed size + * of the entry will be reported in *new_compressed_len_ptr. + * + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. + * + * compressed_len: If the entry is to be compressed (i.e. run through + * filters) prior to flush, Length in bytes of the last know + * compressed size of the entry -- or the uncompressed size + * if no such value exists (i.e. the entry has been inserted, + * but never flushed). This parameter should be set to zero + * in all other cases. + * + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. + * + * new_addr_ptr: Pointer to haddr_t. If the entry is moved by + * the serialize function, the new on disk base address must + * be stored in *new_addr_ptr, and the appropriate flag set + * in *flags_ptr. + * + * If the entry is not moved by the serialize function, + * *new_addr_ptr is undefined on pre-serialize callback + * return. + * + * new_len_ptr: Pointer to size_t. If the entry is resized by the + * serialize function, the new length of the on disk image + * must be stored in *new_len_ptr, and the appropriate flag set + * in *flags_ptr. + * + * If the entry is not resized by the pre-serialize function, + * *new_len_ptr is undefined on pre-serialize callback + * return. + * + * new_compressed_len_ptr: Pointer to size_t. If the image will be + * compressed (i.e. run through filters) prior to being + * written to disk, the compressed size (in bytes) of the + * on disk image must be stored in *new_compressed_len_ptr, + * and the appropriate flag set in *flags_ptr. + * + * flags_ptr: Pointer to an unsigned integer used to return flags + * indicating whether the preserialize function resized or moved + * the entry, or computed its compressed size. If the entry was + * neither resized or moved, nor will be compressed, + * the serialize function must set *flags_ptr to zero. + * H5C__SERIALIZE_RESIZED_FLAG, H5C__SERIALIZE_MOVED_FLAG + * and H5C__SERIALIZE_COMPRESSED_FLAG must be set to indicate + * a resize, a move, or compression respectively. + * + * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length + * must be stored in *new_len_ptr. + * + * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the + * new image base address must be stored in *new_addr_ptr. + * + * If the H5C__SERIALIZE_COMPRESSED_FLAG is set, the + * compressed size of the new image must be stored in + * *new_compressed_len_ptr. + * + * Processing in the pre-serialize function should proceed as follows: + * + * The pre-serialize function must examine the in core representation + * indicated by the thing parameter, if the pre-serialize function does + * not need to change the size or location of the on-disk image, or + * compute its compress size, it must set *flags_ptr to zero. + * + * If the (uncompressed) size of the on-disk image must be changed, + * the pre-serialize function must load the length of the new image + * into *new_len_ptr, and set the H5C__SERIALIZE_RESIZED_FLAG in + * *flags_ptr. + * + * If the base address of the on disk image must be changed, the + * pre-serialize function must set *new_addr_ptr to the new base address, + * and set the H5C__SERIALIZE_MOVED_FLAG in *flags_ptr. + * + * If the H5C__CLASS_COMPRESSED_FLAG is set in the assocated instance + * of H5C_class_t, and filters (i.e. compression) are enabled, the + * pre-serialize function must compute the compressed size of the + * on disk image, and if it has changed, load this value into + * *new_compressed_len_ptr, and set H5C__SERIALIZE_COMPRESSED_FLAG in + * *flags_ptr. + * + * Note that to do this, the preserialize function will typically have + * to serialize the entry, and run it through the filters to obtain + * the compressed size. For efficiency, the compressed image may + * be stored to be copied into the supplied buffer by the + * serialize callback. Needless to say this is awkward. We may + * want to re-work the API for cache clients to simplify this. + * + * In addition, the pre-serialize callback may perform any other + * processing required before the entry is written to disk + * + * If it is successful, the function must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + * + * SERIALIZE: Pointer to the serialize callback. + * + * The serialize callback is invoked by the metadata cache whenever + * it needs a current on disk image of the metadata entry for purposes + * either constructing a journal entry or flushing the entry to disk. + * + * At this point, the base address and length of the entry's image on + * disk must be well known and not change during the serialization + * process. + * + * While any size and/or location changes must have been handled + * by a pre-serialize call, the client may elect to handle any other + * changes to the entry required to place it in correct form for + * writing to disk in this call. + * + * The typedef for the serialize callback is as follows: + * + * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f, + * void * image_ptr, + * size_t len, + * void * thing); + * + * The parameters of the serialize callback are as follows: + * + * f: File pointer -- needed if other metadata cache entries + * must be modified in the process of serializing the + * target entry. + * + * image_ptr: Pointer to a buffer of length len bytes into which a + * serialized image of the target metadata cache entry is + * to be written. + * + * Note that this buffer will not in general be initialized + * to any particular value. Thus the serialize function may + * not assume any initial value and must set each byte in + * the buffer. + * + * len: Length in bytes of the in file image of the entry to be + * serialized. Also the size of *image_ptr (below). If + * compression is not enabled, this value is simply the + * uncompressed size of the entry's image on disk. If + * compression is enabled, this value is the size of the + * compressed image. + * + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. + * This is the same pointer returned by a protect of the + * addr and len given above. + * + * Processing in the serialize function should proceed as follows: + * + * If there are any remaining changes to the entry required before + * write to disk, they must be dealt with first. + * + * The serialize function must then examine the in core + * representation indicated by the thing parameter, and write a + * serialized (and possibly compressed) image of its contents into + * the provided buffer. + * + * If it is successful, the function must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + * + * NOTIFY: Pointer to the notify callback. + * + * The notify callback is invoked by the metadata cache when a cache + * action on an entry has taken/will take place and the client indicates + * it wishes to be notified about the action. + * + * The typedef for the notify callback is as follows: + * + * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, + * void *thing); + * + * The parameters of the notify callback are as follows: + * + * action: An enum indicating the metadata cache action that has taken/ + * will take place. + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect + * of the addr and len of the entry. + * + * Processing in the notify function should proceed as follows: + * + * The notify function may perform any action it would like, including + * metadata cache calls. + * + * If the function is successful, it must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + * + * FREE_ICR: Pointer to the free ICR callback. + * + * The free ICR callback is invoked by the metadata cache when it + * wishes to evict an entry, and needs the client to free the memory + * allocated for the in core representation. + * + * The typedef for the free ICR callback is as follows: + * + * typedef herr_t (*H5C_free_icr_func_t)(void * thing)); + * + * The parameters of the free ICR callback are as follows: + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect + * of the addr and len of the entry. + * + * Processing in the free ICR function should proceed as follows: + * + * The free ICR function must free all memory allocated to the + * in core representation. + * + * If the function is successful, it must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + * At least when compiled with debug, it would be useful if the + * free ICR call would fail if the in core representation has been + * modified since the last serialize of clear callback. + * + * CLEAR: Pointer to the clear callback. + * + * In principle, there should be no need for the clear callback, + * as the dirty flag should be maintained by the metadata cache. + *. + * However, some clients maintain dirty bits on internal data, + * and we need some way of keeping these dirty bits in sync with + * those maintained by the metadata cache. This callback exists + * to serve this purpose. If defined, it is called whenever the + * cache marks dirty entry clean, or when the cache is about to + * discard a dirty entry without writing it to disk (This + * happens as the result of an unprotect call with the + * H5AC__DELETED_FLAG set, and the H5C__TAKE_OWNERSHIP_FLAG not + * set.) + * + * Arguably, this functionality should be in the NOTIFY callback. + * However, this callback is specific to only a few clients, and + * it will be called relatively frequently. Hence it is made its + * own callback to minimize overhead. + * + * The typedef for the clear callback is as follows: + * + * typedef herr_t (*H5C_clear_func_t)(const H5F_t *f, + * void * thing, + * hbool_t about_to_destroy); + * + * The parameters of the clear callback are as follows: + * + * f: File pointer. + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect() + * call of the associated addr and len. + * + * about_to_destroy: Boolean flag used to indicate whether the + * metadata cache is about to destroy the target metadata + * cache entry. The callback may use this flag to omit + * operations that are irrelevant it the entry is about + * to be destroyed. + * + * Processing in the clear function should proceed as follows: + * + * Reset all internal dirty bits in the target metadata cache entry. + * + * If the about_to_destroy flag is TRUE, the clear function may + * ommit any dirty bit that will not trigger a sanity check failure + * or otherwise cause problems in the subsequent free icr call. + * In particular, the call must ensure that the free icr call will + * not fail due to changes prior to this call, and after the + * last serialize or clear call. + * + * If the function is successful, it must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + * GET_FSF_SIZE: Pointer to the get file space free size callback. + * + * In principle, there is no need for the get file space free size + * callback. However, as an optimization, it is sometimes convenient + * to allocate and free file space for a number of cache entries + * simultaneously in a single contiguous block of file space. + * + * File space allocation is done by the client, so the metadata cache + * need not be involved. However, since the metadata cache typically + * handles file space release when an entry is destroyed, some + * adjustment on the part of the metadata cache is required for this + * operation. + * + * The get file space free size callback exists to support this + * operation. + * + * If a group of cache entries that were allocated as a group are to + * be discarded and their file space released, the type of the first + * (i.e. lowest address) entry in the group must implement the + * get free file space size callback. + * + * To free the file space of all entries in the group in a single + * operation, first expunge all entries other than the first without + * the free file space flag. + * + * Then, to complete the operation, unprotect or expunge the first + * entry in the block with the free file space flag set. Since + * the get free file space callback is implemented, the metadata + * cache will use this callback to get the size of the block to be + * freed, instead of using the size of the entry as is done otherwise. + * + * At present this callback is used only by the H5FA and H5EA dblock + * and dblock page client classes. + * + * The typedef for the clear callback is as follows: + * + * typedef herr_t (*H5C_get_fsf_size_t)(const void * thing, + * size_t *fsf_size_ptr); + * + * The parameters of the clear callback are as follows: + * + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect() + * call of the associated addr and len. + * + * fs_size_ptr: Pointer to size_t in which the callback will return + * the size of the piece of file space to be freed. Note + * that the space to be freed is presumed to have the same + * base address as the cache entry. + * + * The function simply returns the size of the block of file space + * to be freed in *fsf_size_ptr. + * + * If the function is successful, it must return SUCCEED. + * + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. + * + ***************************************************************************/ /* Actions that can be reported to 'notify' client callback */ typedef enum H5C_notify_action_t { - H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache */ - /* (could be loaded from file with - * 'protect' call, or inserted - * with 'set' call) + H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache + * via the insert call + */ + H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the + * from file via the protect call + */ + H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to + * file. + */ + H5C_NOTIFY_ACTION_BEFORE_EVICT /* Entry is about to be evicted + * from cache. */ - H5C_NOTIFY_ACTION_BEFORE_EVICT /* Entry is about to be evicted from cache */ } H5C_notify_action_t; /* Cache client callback function pointers */ -typedef void *(*H5C_load_func_t)(H5F_t *f, hid_t dxpl_id, haddr_t addr, - void *udata); -typedef herr_t (*H5C_flush_func_t)(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned *flags_ptr); -typedef herr_t (*H5C_dest_func_t)(H5F_t *f, void *thing); -typedef herr_t (*H5C_clear_func_t)(H5F_t *f, void *thing, hbool_t dest); +typedef herr_t (*H5C_get_load_size_func_t)(const void *udata_ptr, + size_t *image_len_ptr); +typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, + size_t len, void *udata_ptr, hbool_t *dirty_ptr); +typedef herr_t (*H5C_image_len_func_t)(const void *thing, + size_t *image_len_ptr, hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +typedef herr_t (*H5C_pre_serialize_func_t)(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr_ptr, size_t *new_len_ptr, size_t *new_compressed_len_ptr, + unsigned *flags_ptr); +typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f, void *image_ptr, + size_t len, void *thing); typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, void *thing); -typedef herr_t (*H5C_size_func_t)(const H5F_t *f, const void *thing, - size_t *size_ptr); +typedef herr_t (*H5C_free_icr_func_t)(void *thing); +typedef herr_t (*H5C_clear_func_t)(const H5F_t *f, void * thing, + hbool_t about_to_destroy); +typedef herr_t (*H5C_get_fsf_size_t)(const void * thing, size_t *fsf_size_ptr); /* Metadata cache client class definition */ typedef struct H5C_class_t { - int id; - H5C_load_func_t load; - H5C_flush_func_t flush; - H5C_dest_func_t dest; - H5C_clear_func_t clear; - H5C_notify_func_t notify; - H5C_size_func_t size; + int id; + const char * name; + H5FD_mem_t mem_type; + unsigned flags; + H5C_get_load_size_func_t get_load_size; + H5C_deserialize_func_t deserialize; + H5C_image_len_func_t image_len; + H5C_pre_serialize_func_t pre_serialize; + H5C_serialize_func_t serialize; + H5C_notify_func_t notify; + H5C_free_icr_func_t free_icr; + H5C_clear_func_t clear; + H5C_get_fsf_size_t fsf_size; } H5C_class_t; /* Type defintions of callback functions used by the cache as a whole */ @@ -312,7 +1130,7 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * just before the entry is freed. * * This is necessary, as the LRU list can be changed out - * from under H5C_make_space_in_cache() by the flush + * from under H5C_make_space_in_cache() by the serialize * callback which may change the size of an existing entry, * and/or load a new entry while serializing the target entry. * @@ -325,18 +1143,66 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * detect this case, and re-start its scan from the bottom * of the LRU when this situation occurs. * - * This field is only compiled in debug mode. + * cache_ptr: Pointer to the cache that this entry is contained within. * * addr: Base address of the cache entry on disk. * - * size: Length of the cache entry on disk. Note that unlike normal - * caches, the entries in this cache are of variable length. - * The entries should never overlap, and when we do writebacks, - * we will want to writeback adjacent entries where possible. + * size: Length of the cache entry on disk in bytes(exception: if + * the entry is compressed on disk, this field contains the + * uncompressed size of the entry -- see discussion of + * compressed entries below). Note that unlike normal + * caches, the entries in this cache are of arbitrary size. + * + * With the exception of compressed entries, the file space + * allocations for cache entries implied by the addr and size + * fields must be disjoint. For compressed entries, + * the size field contains the uncompressed size -- thus in + * in this case, substitution of compressed size for size + * must result in disjoint file space allocations. However, + * as discussed below, the compressed size may not be know. + * + * Any entry whose associated instance of H5C_class_t has the + * H5C__CLASS_COMPRESSED_FLAG set may be compressed. When + * an entry is compressed (that is, when filters are enabled + * on it), the compressed flag (see below) must be set, and + * the compressed size (if known), must be stored in + * the compressed_size field. + * + * Since the compressed size will be unknown unless the + * entry is clean, or has an up to date image (see the + * image_ptr and image_up_to_date fields below), we use the + * uncompressed size for all purposes other than disk I/O. + * + * compressed: Boolean flag that is set iff the instance of H5C_class_t + * associated with the entry has the H5C__CLASS_COMPRESSED_FLAG + * set, and filters are enabled on the entry. + * + * compressed_size: If compressed is TRUE, this field contains the actual + * compressed size of the entry in bytes, which is also its + * true size on disk -- or the uncompressed size if the + * compressed size is unknown (i.e. the entry has been + * inserted in the cache, but it has not been compressed yet). + * Note that this value will usually be incorrect if the + * entry is dirty. + * + * Since this value is frequently out of date and expensive to + * compute, it is used only for disk I/O. The uncompressed + * size of the entry (stored in the size field above) is used + * for all other purposes (i.e. computing the sum of the sizes + * of all entries in the cache, etc.). + * + * If compressed is FALSE, this field should contain 0. + * + * image_ptr: Pointer to void. When not NULL, this field points to a + * dynamically allocated block of size bytes in which the + * on disk image of the metadata cache entry is stored. + * + * If the entry is dirty, the pre-serialize and serialize + * callbacks must be used to update this image before it is + * written to disk * - * NB: At present, entries need not be contiguous on disk. Until - * we fix this, we can't do much with writing back adjacent - * entries. + * image_up_to_date: Boolean flag that is set to TRUE when *image_ptr + * is up to date, and set to false when the entry is dirtied. * * type: Pointer to the instance of H5C_class_t containing pointers * to the methods for cache entries of the current type. This @@ -366,6 +1232,9 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * modules using the cache. These still clear the * is_dirty field as before. -- JRM 7/5/05 * + * Update: Management of the is_dirty field is now entirely + * in the cache. -- JRM 7/5/07 + * * dirtied: Boolean flag used to indicate that the entry has been * dirtied while protected. * @@ -422,9 +1291,10 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * policy code (LRU at present). * * 2) A pinned entry can be accessed or modified at any time. - * Therefore, the cache must check with the entry owner - * before flushing it. If permission is denied, the - * cache does not flush the entry. + * This places an extra burden on the pre-serialize and + * serialize callbacks, which must ensure that a pinned + * entry is consistant and ready to write to disk before + * generating an image. * * 3) A pinned entry can be marked as dirty (and possibly * change size) while it is unprotected. @@ -466,6 +1336,11 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * will need to be expanded and tested appropriately if that * functionality is desired. * + * Update: There are now two possible last entries + * (superblock and file driver info message). This + * number will probably increase as we add superblock + * messages. JRM -- 11/18/14 + * * clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used * to implement the metadata cache In the parallel case, only * the cache with mpi rank 0 is allowed to actually write to @@ -493,11 +1368,6 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * destroy_in_progress: Boolean flag that is set to true iff the entry * is in the process of being flushed and destroyed. * - * free_file_space_on_destroy: Boolean flag that is set to true iff the entry - * is in the process of being flushed and destroyed and the file - * space used by the object should be freed by the cache client's - * 'dest' callback routine. - * * * Fields supporting the 'flush dependency' feature: * @@ -581,63 +1451,43 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * The use of the replacement policy fields under the Modified LRU policy * is discussed below: * - * next: Next pointer in either the LRU or the protected list, - * depending on the current value of protected. If there - * is no next entry on the list, this field should be set - * to NULL. + * next: Next pointer in either the LRU, the protected list, or + * the pinned list depending on the current values of + * is_protected and is_pinned. If there is no next entry + * on the list, this field should be set to NULL. * - * prev: Prev pointer in either the LRU or the protected list, - * depending on the current value of protected. If there - * is no previous entry on the list, this field should be - * set to NULL. + * prev: Prev pointer in either the LRU, the protected list, + * or the pinned list depending on the current values of + * is_protected and is_pinned. If there is no previous + * entry on the list, this field should be set to NULL. * * aux_next: Next pointer on either the clean or dirty LRU lists. - * This entry should be NULL when protected is true. When - * protected is false, and dirty is true, it should point - * to the next item on the dirty LRU list. When protected - * is false, and dirty is false, it should point to the - * next item on the clean LRU list. In either case, when - * there is no next item, it should be NULL. + * This entry should be NULL when either is_protected or + * is_pinned is true. + * + * When is_protected and is_pinned are false, and is_dirty is + * true, it should point to the next item on the dirty LRU + * list. + * + * When is_protected and is_pinned are false, and is_dirty is + * false, it should point to the next item on the clean LRU + * list. In either case, when there is no next item, it + * should be NULL. * * aux_prev: Previous pointer on either the clean or dirty LRU lists. - * This entry should be NULL when protected is true. When - * protected is false, and dirty is true, it should point - * to the previous item on the dirty LRU list. When protected - * is false, and dirty is false, it should point to the - * previous item on the clean LRU list. In either case, when - * there is no previous item, it should be NULL. - * - * - * Fields supporting metadata journaling: - * - * last_trans: unit64_t containing the ID of the last transaction in - * which this entry was dirtied. If journaling is disabled, - * or if the entry has never been dirtied in a transaction, - * this field should be set to zero. Once we notice that - * the specified transaction has made it to disk, we will - * reset this field to zero as well. - * - * We must maintain this field, as to avoid messages from - * the future, we must not flush a dirty entry to disk - * until the last transaction in which it was dirtied - * has made it to disk in the journal file. - * - * trans_next: Next pointer in the entries modified in the current - * transaction list. This field should always be null - * unless journaling is enabled, the entry is dirty, - * and last_trans field contains the current transaction - * number. Even if all these conditions are fulfilled, - * the field will still be NULL if this is the last - * entry on the list. - * - * trans_prev: Previous pointer in the entries modified in the current - * transaction list. This field should always be null - * unless journaling is enabled, the entry is dirty, - * and last_trans field contains the current transaction - * number. Even if all these conditions are fulfilled, - * the field will still be NULL if this is the first - * entry on the list. + * This entry should be NULL when either is_protected or + * is_pinned is true. + * + * When is_protected and is_pinned are false, and is_dirty is + * true, it should point to the previous item on the dirty + * LRU list. + * + * When is_protected and is_pinned are false, and is_dirty + * is false, it should point to the previous item on the + * clean LRU list. * + * In either case, when there is no previous item, it should + * be NULL. * * Cache entry stats collection fields: * @@ -659,12 +1509,14 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t *cache_ptr, haddr_t addr, * ****************************************************************************/ typedef struct H5C_cache_entry_t { -#ifndef NDEBUG uint32_t magic; -#endif /* NDEBUG */ H5C_t * cache_ptr; haddr_t addr; size_t size; + hbool_t compressed; + size_t compressed_size; + void * image_ptr; + hbool_t image_up_to_date; const H5C_class_t * type; haddr_t tag; hbool_t is_dirty; @@ -683,7 +1535,6 @@ typedef struct H5C_cache_entry_t { #endif /* H5_HAVE_PARALLEL */ hbool_t flush_in_progress; hbool_t destroy_in_progress; - hbool_t free_file_space_on_destroy; /* fields supporting the 'flush dependency' feature: */ struct H5C_cache_entry_t * flush_dep_parent; @@ -1012,12 +1863,11 @@ H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, int32_t version, double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size, size_t new_max_cache_size, size_t old_min_clean_size, size_t new_min_clean_size); -H5_DLL herr_t H5C_dest(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id); -H5_DLL herr_t H5C_expunge_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, +H5_DLL herr_t H5C_dest(H5F_t *f, hid_t dxpl_id); +H5_DLL herr_t H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, haddr_t addr, unsigned flags); -H5_DLL herr_t H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, - unsigned flags); -H5_DLL herr_t H5C_flush_to_min_clean(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id); +H5_DLL herr_t H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags); +H5_DLL herr_t H5C_flush_to_min_clean(H5F_t *f, hid_t dxpl_id); H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr); H5_DLL herr_t H5C_get_cache_size(H5C_t *cache_ptr, size_t *max_size_ptr, @@ -1031,17 +1881,17 @@ H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr, H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr); H5_DLL FILE *H5C_get_trace_file_ptr(const H5C_t *cache_ptr); H5_DLL FILE *H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr); -H5_DLL herr_t H5C_insert_entry(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, - const H5C_class_t *type, haddr_t addr, void *thing, unsigned int flags); -H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, int32_t ce_array_len, haddr_t *ce_array_ptr); +H5_DLL herr_t H5C_insert_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, + haddr_t addr, void *thing, unsigned int flags); +H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t dxpl_id, int32_t ce_array_len, + haddr_t *ce_array_ptr); H5_DLL herr_t H5C_mark_entry_dirty(void *thing); H5_DLL herr_t H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, haddr_t new_addr); H5_DLL herr_t H5C_pin_protected_entry(void *thing); H5_DLL herr_t H5C_create_flush_dependency(void *parent_thing, void *child_thing); -H5_DLL void * H5C_protect(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, - const H5C_class_t *type, haddr_t addr, void *udata, unsigned flags); +H5_DLL void * H5C_protect(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, + haddr_t addr, void *udata, unsigned flags); H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t *cache_ptr); H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size); H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, @@ -1055,17 +1905,17 @@ H5_DLL void H5C_stats__reset(H5C_t *cache_ptr); H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name); H5_DLL herr_t H5C_unpin_entry(void *thing); H5_DLL herr_t H5C_destroy_flush_dependency(void *parent_thing, void *child_thing); -H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, - const H5C_class_t *type, haddr_t addr, void *thing, unsigned int flags); +H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, + haddr_t addr, void *thing, unsigned int flags); H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests); H5_DLL herr_t H5C_ignore_tags(H5C_t *cache_ptr); H5_DLL void H5C_retag_copied_metadata(H5C_t *cache_ptr, haddr_t metadata_tag); #ifdef H5_HAVE_PARALLEL -H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, hid_t primary_dxpl_id, - hid_t secondary_dxpl_id, H5C_t *cache_ptr, int num_candidates, - haddr_t *candidates_list_ptr, int mpi_rank, int mpi_size); +H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, hid_t dxpl_id, + H5C_t *cache_ptr, int num_candidates, haddr_t *candidates_list_ptr, + int mpi_rank, int mpi_size); H5_DLL herr_t H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr); H5_DLL herr_t H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr); #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index d7d7b88..01898f2 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -253,7 +253,7 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset, HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create EFL file name heap") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(file, dxpl_id, efl->heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(file, dxpl_id, efl->heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect EFL file name heap") /* Insert "empty" name first */ diff --git a/src/H5EA.c b/src/H5EA.c index 37682e7..d96f9c2 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -148,7 +148,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array info") /* Lock the array header into memory */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_WRITE))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Point extensible array wrapper at header and bump it's ref count */ @@ -209,7 +209,7 @@ H5EA_open(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata)) #ifdef QAK HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr); #endif /* QAK */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_READ))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header, address = %llu", (unsigned long long)ea_addr) /* Check for pending array deletion */ @@ -333,7 +333,7 @@ END_FUNC(PRIV) /* end H5EA_get_addr() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__lookup_elmt(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_protect_t thing_acc, +H5EA__lookup_elmt(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, unsigned thing_acc, void **thing, uint8_t **thing_elmt_buf, hsize_t *thing_elmt_idx, H5EA__unprotect_func_t *thing_unprot_func)) @@ -362,6 +362,9 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); HDassert(thing_elmt_buf); HDassert(thing_unprot_func); + /* only the H5AC__READ_ONLY_FLAG may be set in thing_acc */ + HDassert((thing_acc & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set the shared array header's file context for this operation */ hdr->f = ea->f; @@ -377,7 +380,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); HDfprintf(stderr, "%s: Index block address not defined!\n", FUNC, idx); #endif /* QAK */ /* Check if we are allowed to create the thing */ - if(H5AC_WRITE == thing_acc) { + if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ /* Create the index block */ hdr->idx_blk_addr = H5EA__iblock_create(hdr, dxpl_id, &stats_changed); if(!H5F_addr_defined(hdr->idx_blk_addr)) @@ -435,7 +438,7 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i /* Check if the data block has been allocated on disk yet */ if(!H5F_addr_defined(iblock->dblk_addrs[dblk_idx])) { /* Check if we are allowed to create the thing */ - if(H5AC_WRITE == thing_acc) { + if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ haddr_t dblk_addr; /* Address of data block created */ hsize_t dblk_off; /* Offset of data block in array */ @@ -475,7 +478,7 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i /* Check if the super block has been allocated on disk yet */ if(!H5F_addr_defined(iblock->sblk_addrs[sblk_off])) { /* Check if we are allowed to create the thing */ - if(H5AC_WRITE == thing_acc) { + if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ haddr_t sblk_addr; /* Address of data block created */ /* Create super block */ @@ -508,7 +511,7 @@ HDfprintf(stderr, "%s: dblk_idx = %u, sblock->ndblks = %Zu\n", FUNC, dblk_idx, s /* Check if the data block has been allocated on disk yet */ if(!H5F_addr_defined(sblock->dblk_addrs[dblk_idx])) { /* Check if we are allowed to create the thing */ - if(H5AC_WRITE == thing_acc) { + if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ haddr_t dblk_addr; /* Address of data block created */ hsize_t dblk_off; /* Offset of data block in array */ @@ -568,7 +571,7 @@ HDfprintf(stderr, "%s: sblock->dblk_page_size = %Zu\n", FUNC, sblock->dblk_page_ /* Check if page has been initialized yet */ if(!H5VM_bit_get(sblock->page_init, page_init_idx)) { /* Check if we are allowed to create the thing */ - if(H5AC_WRITE == thing_acc) { + if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ /* Create the data block page */ if(H5EA__dblk_page_create(hdr, dxpl_id, sblock, dblk_page_addr) < 0) H5E_THROW(H5E_CANTCREATE, "unable to create data block page") @@ -677,7 +680,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); hdr->f = ea->f; /* Look up the array metadata containing the element we want to set */ - if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_WRITE, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) + if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC__NO_FLAGS_SET, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) H5E_THROW(H5E_CANTPROTECT, "unable to protect array metadata") /* Sanity check */ @@ -762,7 +765,7 @@ HDfprintf(stderr, "%s: Index block address is: %a\n", FUNC, hdr->idx_blk_addr); hdr->f = ea->f; /* Look up the array metadata containing the element we want to set */ - if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_READ, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) + if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC__READ_ONLY_FLAG, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) H5E_THROW(H5E_CANTPROTECT, "unable to protect array metadata") /* Check if the thing holding the element has been created yet */ @@ -905,7 +908,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); HDassert(ea); /* Look up the array metadata containing the element we want to set */ - if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_WRITE, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) + if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC__NO_FLAGS_SET, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) H5E_THROW(H5E_CANTPROTECT, "unable to protect array metadata") /* Sanity check */ @@ -960,7 +963,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); HDassert(ea); /* Look up the array metadata containing the element we want to set */ - if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_READ, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) + if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC__READ_ONLY_FLAG, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) H5E_THROW(H5E_CANTPROTECT, "unable to protect array metadata") /* Sanity check */ @@ -1048,7 +1051,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); /* Lock the array header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ - if(NULL == (hdr = H5EA__hdr_protect(ea->f, dxpl_id, ea_addr, NULL, H5AC_WRITE))) + if(NULL == (hdr = H5EA__hdr_protect(ea->f, dxpl_id, ea_addr, NULL, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTLOAD, "unable to load extensible array header") /* Set the shared array header's file context for this operation */ @@ -1112,7 +1115,7 @@ H5EA_delete(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata)) #ifdef QAK HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr); #endif /* QAK */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_WRITE))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr) /* Check for files using shared array header */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 70686fb..0d83fb3 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -57,13 +57,6 @@ #define H5EA_SBLOCK_VERSION 0 /* Super block */ #define H5EA_DBLOCK_VERSION 0 /* Data block */ -/* Size of stack buffer for serialization buffers */ -#define H5EA_HDR_BUF_SIZE 512 -#define H5EA_IBLOCK_BUF_SIZE 512 -#define H5EA_SBLOCK_BUF_SIZE 512 -#define H5EA_DBLOCK_BUF_SIZE 512 -#define H5EA_DBLK_PAGE_BUF_SIZE 512 - /******************/ /* Local Typedefs */ @@ -80,35 +73,59 @@ /********************/ /* Metadata cache (H5AC) callbacks */ -static H5EA_hdr_t *H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5EA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5EA_hdr_t *hdr, unsigned * flags_ptr); -static herr_t H5EA__cache_hdr_clear(H5F_t *f, H5EA_hdr_t *hdr, hbool_t destroy); -static herr_t H5EA__cache_hdr_size(const H5F_t *f, const H5EA_hdr_t *hdr, size_t *size_ptr); -static herr_t H5EA__cache_hdr_dest(H5F_t *f, H5EA_hdr_t *hdr); -static H5EA_iblock_t *H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5EA__cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5EA_iblock_t *iblock, unsigned * flags_ptr); -static herr_t H5EA__cache_iblock_clear(H5F_t *f, H5EA_iblock_t *iblock, hbool_t destroy); -static herr_t H5EA__cache_iblock_notify(H5AC_notify_action_t action, H5EA_iblock_t *iblock); -static herr_t H5EA__cache_iblock_size(const H5F_t *f, const H5EA_iblock_t *iblock, size_t *size_ptr); -static herr_t H5EA__cache_iblock_dest(H5F_t *f, H5EA_iblock_t *iblock); -static H5EA_sblock_t *H5EA__cache_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5EA__cache_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5EA_sblock_t *sblock, unsigned * flags_ptr); -static herr_t H5EA__cache_sblock_clear(H5F_t *f, H5EA_sblock_t *sblock, hbool_t destroy); -static herr_t H5EA__cache_sblock_size(const H5F_t *f, const H5EA_sblock_t *sblock, size_t *size_ptr); -static herr_t H5EA__cache_sblock_notify(H5AC_notify_action_t action, H5EA_sblock_t *sblock); -static herr_t H5EA__cache_sblock_dest(H5F_t *f, H5EA_sblock_t *sblock); -static H5EA_dblock_t *H5EA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5EA__cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5EA_dblock_t *dblock, unsigned * flags_ptr); -static herr_t H5EA__cache_dblock_clear(H5F_t *f, H5EA_dblock_t *dblock, hbool_t destroy); -static herr_t H5EA__cache_dblock_size(const H5F_t *f, const H5EA_dblock_t *dblock, size_t *size_ptr); -static herr_t H5EA__cache_dblock_notify(H5AC_notify_action_t action, H5EA_dblock_t *dblock); -static herr_t H5EA__cache_dblock_dest(H5F_t *f, H5EA_dblock_t *dblock); -static H5EA_dblk_page_t *H5EA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5EA__cache_dblk_page_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5EA_dblk_page_t *dblk_page, unsigned * flags_ptr); -static herr_t H5EA__cache_dblk_page_clear(H5F_t *f, H5EA_dblk_page_t *dblk_page, hbool_t destroy); -static herr_t H5EA__cache_dblk_page_size(const H5F_t *f, const H5EA_dblk_page_t *dblk_page, size_t *size_ptr); -static herr_t H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, H5EA_dblk_page_t *dblk_page); -static herr_t H5EA__cache_dblk_page_dest(H5F_t *f, H5EA_dblk_page_t *dblk_page); +static herr_t H5EA__cache_hdr_get_load_size(const void *udata, size_t *image_len); +static void *H5EA__cache_hdr_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5EA__cache_hdr_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5EA__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5EA__cache_hdr_free_icr(void *thing); + +static herr_t H5EA__cache_iblock_get_load_size(const void *udata, size_t *image_len); +static void *H5EA__cache_iblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5EA__cache_iblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5EA__cache_iblock_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *thing); +static herr_t H5EA__cache_iblock_free_icr(void *thing); + +static herr_t H5EA__cache_sblock_get_load_size(const void *udata, size_t *image_len); +static void *H5EA__cache_sblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5EA__cache_sblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5EA__cache_sblock_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *thing); +static herr_t H5EA__cache_sblock_free_icr(void *thing); + +static herr_t H5EA__cache_dblock_get_load_size(const void *udata, size_t *image_len); +static void *H5EA__cache_dblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5EA__cache_dblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5EA__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *thing); +static herr_t H5EA__cache_dblock_free_icr(void *thing); +static herr_t H5EA__cache_dblock_fsf_size(const void *thing, size_t *fsf_size); + +static herr_t H5EA__cache_dblk_page_get_load_size(const void *udata, size_t *image_len); +static void *H5EA__cache_dblk_page_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5EA__cache_dblk_page_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5EA__cache_dblk_page_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *thing); +static herr_t H5EA__cache_dblk_page_free_icr(void *thing); /*********************/ @@ -117,57 +134,87 @@ static herr_t H5EA__cache_dblk_page_dest(H5F_t *f, H5EA_dblk_page_t *dblk_page); /* H5EA header inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_HDR[1] = {{ - H5AC_EARRAY_HDR_ID, - (H5AC_load_func_t)H5EA__cache_hdr_load, - (H5AC_flush_func_t)H5EA__cache_hdr_flush, - (H5AC_dest_func_t)H5EA__cache_hdr_dest, - (H5AC_clear_func_t)H5EA__cache_hdr_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5EA__cache_hdr_size, + H5AC_EARRAY_HDR_ID, /* Metadata client ID */ + "Extensible Array Header", /* Metadata client name (for debugging) */ + H5FD_MEM_EARRAY_HDR, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5EA__cache_hdr_get_load_size, /* 'get_load_size' callback */ + H5EA__cache_hdr_deserialize, /* 'deserialize' callback */ + H5EA__cache_hdr_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5EA__cache_hdr_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5EA__cache_hdr_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5EA index block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_IBLOCK[1] = {{ - H5AC_EARRAY_IBLOCK_ID, - (H5AC_load_func_t)H5EA__cache_iblock_load, - (H5AC_flush_func_t)H5EA__cache_iblock_flush, - (H5AC_dest_func_t)H5EA__cache_iblock_dest, - (H5AC_clear_func_t)H5EA__cache_iblock_clear, - (H5AC_notify_func_t)H5EA__cache_iblock_notify, - (H5AC_size_func_t)H5EA__cache_iblock_size, + H5AC_EARRAY_IBLOCK_ID, /* Metadata client ID */ + "Extensible Array Index Block", /* Metadata client name (for debugging) */ + H5FD_MEM_EARRAY_IBLOCK, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5EA__cache_iblock_get_load_size, /* 'get_load_size' callback */ + H5EA__cache_iblock_deserialize, /* 'deserialize' callback */ + H5EA__cache_iblock_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5EA__cache_iblock_serialize, /* 'serialize' callback */ + H5EA__cache_iblock_notify, /* 'notify' callback */ + H5EA__cache_iblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5EA super block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_SBLOCK[1] = {{ - H5AC_EARRAY_SBLOCK_ID, - (H5AC_load_func_t)H5EA__cache_sblock_load, - (H5AC_flush_func_t)H5EA__cache_sblock_flush, - (H5AC_dest_func_t)H5EA__cache_sblock_dest, - (H5AC_clear_func_t)H5EA__cache_sblock_clear, - (H5AC_notify_func_t)H5EA__cache_sblock_notify, - (H5AC_size_func_t)H5EA__cache_sblock_size, + H5AC_EARRAY_SBLOCK_ID, /* Metadata client ID */ + "Extensible Array Super Block", /* Metadata client name (for debugging) */ + H5FD_MEM_EARRAY_SBLOCK, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5EA__cache_sblock_get_load_size, /* 'get_load_size' callback */ + H5EA__cache_sblock_deserialize, /* 'deserialize' callback */ + H5EA__cache_sblock_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5EA__cache_sblock_serialize, /* 'serialize' callback */ + H5EA__cache_sblock_notify, /* 'notify' callback */ + H5EA__cache_sblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5EA data block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_DBLOCK[1] = {{ - H5AC_EARRAY_DBLOCK_ID, - (H5AC_load_func_t)H5EA__cache_dblock_load, - (H5AC_flush_func_t)H5EA__cache_dblock_flush, - (H5AC_dest_func_t)H5EA__cache_dblock_dest, - (H5AC_clear_func_t)H5EA__cache_dblock_clear, - (H5AC_notify_func_t)H5EA__cache_dblock_notify, - (H5AC_size_func_t)H5EA__cache_dblock_size, + H5AC_EARRAY_DBLOCK_ID, /* Metadata client ID */ + "Extensible Array Data Block", /* Metadata client name (for debugging) */ + H5FD_MEM_EARRAY_DBLOCK, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5EA__cache_dblock_get_load_size, /* 'get_load_size' callback */ + H5EA__cache_dblock_deserialize, /* 'deserialize' callback */ + H5EA__cache_dblock_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5EA__cache_dblock_serialize, /* 'serialize' callback */ + H5EA__cache_dblock_notify, /* 'notify' callback */ + H5EA__cache_dblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + H5EA__cache_dblock_fsf_size, /* 'fsf_size' callback */ }}; /* H5EA data block page inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1] = {{ - H5AC_EARRAY_DBLK_PAGE_ID, - (H5AC_load_func_t)H5EA__cache_dblk_page_load, - (H5AC_flush_func_t)H5EA__cache_dblk_page_flush, - (H5AC_dest_func_t)H5EA__cache_dblk_page_dest, - (H5AC_clear_func_t)H5EA__cache_dblk_page_clear, - (H5AC_notify_func_t)H5EA__cache_dblk_page_notify, - (H5AC_size_func_t)H5EA__cache_dblk_page_size, + H5AC_EARRAY_DBLK_PAGE_ID, /* Metadata client ID */ + "Extensible Array Data Block Page", /* Metadata client name (for debugging) */ + H5FD_MEM_EARRAY_DBLK_PAGE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5EA__cache_dblk_page_get_load_size, /* 'get_load_size' callback */ + H5EA__cache_dblk_page_deserialize, /* 'deserialize' callback */ + H5EA__cache_dblk_page_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5EA__cache_dblk_page_serialize, /* 'serialize' callback */ + H5EA__cache_dblk_page_notify, /* 'notify' callback */ + H5EA__cache_dblk_page_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -183,97 +230,111 @@ const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1] = {{ /*------------------------------------------------------------------------- - * Function: H5EA__cache_hdr_load + * Function: H5EA__cache_hdr_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 16, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_hdr_get_load_size(const void *_udata, size_t *image_len)) + + /* Local variables */ + const H5EA_hdr_cache_ud_t *udata = (const H5EA_hdr_cache_ud_t *)_udata; /* User data for callback */ + + /* Check arguments */ + HDassert(udata); + HDassert(udata->f); + HDassert(H5F_addr_defined(udata->addr)); + HDassert(image_len); + + /* Set the image length size */ + *image_len = (size_t)H5EA_HEADER_SIZE_FILE(udata->f); + +END_FUNC(STATIC) /* end H5EA__cache_hdr_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_hdr_deserialize * - * Purpose: Loads an extensible array header from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new extensible array + * Return: Success: Pointer to a new B-tree. * Failure: NULL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 26 2008 + * koziol@hdfgroup.org + * July 16, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5EA_hdr_t *, NULL, NULL, -H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) +void *, NULL, NULL, +H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5EA_cls_id_t id; /* ID of extensible array class, as found in file */ H5EA_hdr_t *hdr = NULL; /* Extensible array info */ - size_t size; /* Header size */ - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5EA_HDR_BUF_SIZE]; /* Buffer for header */ - uint8_t *buf; /* Pointer to header buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5EA_hdr_cache_ud_t *udata = (H5EA_hdr_cache_ud_t *)_udata; + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); + HDassert(udata); + HDassert(udata->f); + HDassert(H5F_addr_defined(udata->addr)); /* Allocate space for the extensible array data structure */ - if(NULL == (hdr = H5EA__hdr_alloc(f))) + if(NULL == (hdr = H5EA__hdr_alloc(udata->f))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array shared header") /* Set the extensible array header's address */ - hdr->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the 'base' size of the extensible array header on disk */ - size = H5EA_HEADER_SIZE_HDR(hdr); - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_EARRAY_HDR, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read extensible array header") - - /* Get temporary pointer to serialized header */ - p = buf; + hdr->addr = udata->addr; /* Magic number */ - if(HDmemcmp(p, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong extensible array header signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5EA_HDR_VERSION) + if(*image++ != H5EA_HDR_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array header version") /* Extensible array class */ - id = (H5EA_cls_id_t)*p++; + id = (H5EA_cls_id_t)*image++; if(id >= H5EA_NUM_CLS_ID) H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") hdr->cparam.cls = H5EA_client_class_g[id]; /* General array creation/configuration information */ - hdr->cparam.raw_elmt_size = *p++; /* Element size in file (in bytes) */ - hdr->cparam.max_nelmts_bits = *p++; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ - hdr->cparam.idx_blk_elmts = *p++; /* # of elements to store in index block */ - hdr->cparam.data_blk_min_elmts = *p++; /* Min. # of elements per data block */ - hdr->cparam.sup_blk_min_data_ptrs = *p++; /* Min. # of data block pointers for a super block */ - hdr->cparam.max_dblk_page_nelmts_bits = *p++; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ + hdr->cparam.raw_elmt_size = *image++; /* Element size in file (in bytes) */ + hdr->cparam.max_nelmts_bits = *image++; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ + hdr->cparam.idx_blk_elmts = *image++; /* # of elements to store in index block */ + hdr->cparam.data_blk_min_elmts = *image++; /* Min. # of elements per data block */ + hdr->cparam.sup_blk_min_data_ptrs = *image++; /* Min. # of data block pointers for a super block */ + hdr->cparam.max_dblk_page_nelmts_bits = *image++; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ /* Array statistics */ - hdr->stats.computed.hdr_size = size; /* Size of header in file */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.nsuper_blks); /* Number of super blocks created */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.super_blk_size); /* Size of super blocks created */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.ndata_blks); /* Number of data blocks created */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.data_blk_size); /* Size of data blocks created */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.max_idx_set); /* Max. index set (+1) */ - H5F_DECODE_LENGTH(f, p, hdr->stats.stored.nelmts); /* Number of elements 'realized' */ + hdr->stats.computed.hdr_size = len; /* Size of header in file */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.nsuper_blks); /* Number of super blocks created */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.super_blk_size); /* Size of super blocks created */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.ndata_blks); /* Number of data blocks created */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.data_blk_size); /* Size of data blocks created */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.max_idx_set); /* Max. index set (+1) */ + H5F_DECODE_LENGTH(udata->f, image, hdr->stats.stored.nelmts); /* Number of elements 'realized' */ /* Internal information */ - H5F_addr_decode(f, &p, &hdr->idx_blk_addr); /* Address of index block */ + H5F_addr_decode(udata->f, &image, &hdr->idx_blk_addr); /* Address of index block */ /* Index block statistics */ if(H5F_addr_defined(hdr->idx_blk_addr)) { @@ -298,26 +359,26 @@ H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM)); /* Compute checksum on entire header */ /* (including the filter information, if present) */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); - - /* Sanity check */ - HDassert((size_t)(p - buf) == size); + UINT32DECODE(image, stored_chksum); /* Verify checksum */ if(stored_chksum != computed_chksum) H5E_THROW(H5E_BADVALUE, "incorrect metadata checksum for extensible array header") + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) == len); + /* Finish initializing extensible array header */ - if(H5EA__hdr_init(hdr, udata) < 0) + if(H5EA__hdr_init(hdr, udata->ctx_udata) < 0) H5E_THROW(H5E_CANTINIT, "initialization failed for extensible array header") - HDassert(hdr->size == size); + HDassert(hdr->size == len); /* Set return value */ ret_value = hdr; @@ -325,263 +386,211 @@ H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(hdr && H5EA__hdr_dest(hdr) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array header") -END_FUNC(STATIC) /* end H5EA__cache_hdr_load() */ +END_FUNC(STATIC) /* end H5EA__cache_hdr_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_hdr_flush + * Function: H5EA__cache_hdr_image_len * - * Purpose: Flushes a dirty extensible array header to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 26 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 16, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5EA_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_hdr_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5EA_HDR_BUF_SIZE]; /* Buffer for header */ + /* Local variables */ + const H5EA_hdr_t *hdr = (const H5EA_hdr_t *)_thing; /* Pointer to the object */ - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(hdr); + HDassert(image_len); - if(hdr->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Header size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ + /* Set the image length size */ + *image_len = hdr->size; - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") +END_FUNC(STATIC) /* end H5EA__cache_hdr_image_len() */ - /* Compute the size of the array header on disk */ - size = hdr->size; - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Get temporary pointer to serialized header */ - p = buf; - - /* Magic number */ - HDmemcpy(p, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5EA_HDR_VERSION; + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_hdr_serialize + * + * Purpose: Flushes a dirty object to disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 16, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) - /* Extensible array type */ - *p++ = hdr->cparam.cls->id; + /* Local variables */ + H5EA_hdr_t *hdr = (H5EA_hdr_t *)_thing; /* Pointer to the extensible array header */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ - /* General array creation/configuration information */ - *p++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */ - *p++ = hdr->cparam.max_nelmts_bits; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ - *p++ = hdr->cparam.idx_blk_elmts; /* # of elements to store in index block */ - *p++ = hdr->cparam.data_blk_min_elmts; /* Min. # of elements per data block */ - *p++ = hdr->cparam.sup_blk_min_data_ptrs; /* Min. # of data block pointers for a super block */ - *p++ = hdr->cparam.max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ + /* check arguments */ + HDassert(f); + HDassert(image); + HDassert(hdr); - /* Array statistics */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.nsuper_blks); /* Number of super blocks created */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.super_blk_size); /* Size of super blocks created */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.ndata_blks); /* Number of data blocks created */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.data_blk_size); /* Size of data blocks created */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.max_idx_set); /* Max. index set (+1) */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.stored.nelmts); /* Number of elements 'realized' */ + /* Magic number */ + HDmemcpy(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Internal information */ - H5F_addr_encode(f, &p, hdr->idx_blk_addr); /* Address of index block */ + /* Version # */ + *image++ = H5EA_HDR_VERSION; - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + /* Extensible array type */ + *image++ = hdr->cparam.cls->id; - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* General array creation/configuration information */ + *image++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */ + *image++ = hdr->cparam.max_nelmts_bits; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ + *image++ = hdr->cparam.idx_blk_elmts; /* # of elements to store in index block */ + *image++ = hdr->cparam.data_blk_min_elmts; /* Min. # of elements per data block */ + *image++ = hdr->cparam.sup_blk_min_data_ptrs; /* Min. # of data block pointers for a super block */ + *image++ = hdr->cparam.max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ - /* Write the array header. */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_EARRAY_HDR, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save extensible array header to disk") + /* Array statistics */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.nsuper_blks); /* Number of super blocks created */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.super_blk_size); /* Size of super blocks created */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.ndata_blks); /* Number of data blocks created */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.data_blk_size); /* Size of data blocks created */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.max_idx_set); /* Max. index set (+1) */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.stored.nelmts); /* Number of elements 'realized' */ - hdr->cache_info.is_dirty = FALSE; - } /* end if */ + /* Internal information */ + H5F_addr_encode(f, &image, hdr->idx_blk_addr); /* Address of index block */ - if(destroy) - if(H5EA__cache_hdr_dest(f, hdr) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array header") + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); -CATCH + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); -END_FUNC(STATIC) /* end H5EA__cache_hdr_flush() */ +END_FUNC(STATIC) /* end H5EA__cache_hdr_serialize() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_hdr_clear + * Function: H5EA__cache_hdr_free_icr * - * Purpose: Mark a extensible array header in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 26 2008 + * koziol@hdfgroup.org + * July 16, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_hdr_clear(H5F_t *f, H5EA_hdr_t *hdr, hbool_t destroy)) +H5EA__cache_hdr_free_icr(void *thing)) - /* Sanity check */ - HDassert(hdr); - - /* Reset the dirty flag. */ - hdr->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(thing); - if(destroy) - if(H5EA__cache_hdr_dest(f, hdr) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array header") + /* Release the extensible array header */ + if(H5EA__hdr_dest((H5EA_hdr_t *)thing) < 0) + H5E_THROW(H5E_CANTFREE, "can't free extensible array header") CATCH -END_FUNC(STATIC) /* end H5EA__cache_hdr_clear() */ +END_FUNC(STATIC) /* end H5EA__cache_hdr_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_hdr_size + * Function: H5EA__cache_iblock_get_load_size * - * Purpose: Compute the size in bytes of a extensible array header - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 26 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, -H5EA__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5EA_hdr_t *hdr, - size_t *size_ptr)) - - /* Sanity check */ - HDassert(f); - HDassert(hdr); - HDassert(size_ptr); - - /* Set size value */ - *size_ptr = hdr->size; - -END_FUNC(STATIC) /* end H5EA__cache_hdr_size() */ +H5EA__cache_iblock_get_load_size(const void *_udata, size_t *image_len)) - -/*------------------------------------------------------------------------- - * Function: H5EA__cache_hdr_dest - * - * Purpose: Destroys an extensible array header in memory. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 26 2008 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_hdr_dest(H5F_t *f, H5EA_hdr_t *hdr)) + /* Local variables */ + const H5EA_hdr_t *hdr = (const H5EA_hdr_t *)_udata; /* User data for callback */ + H5EA_iblock_t iblock; /* Fake index block for computing size */ /* Check arguments */ - HDassert(f); HDassert(hdr); + HDassert(image_len); - /* Verify that header is clean */ - HDassert(hdr->cache_info.is_dirty == FALSE); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr)); + /* Set up fake index block for computing size on disk */ + HDmemset(&iblock, 0, sizeof(iblock)); + iblock.hdr = (H5EA_hdr_t *)hdr; /* Casting away 'const' OK - QAK */ + iblock.nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs); + iblock.ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1); + iblock.nsblk_addrs = hdr->nsblks - iblock.nsblks; - /* Check for freeing file space for extensible array header */ - if(hdr->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(hdr->addr, hdr->cache_info.addr)); + /* Set the image length size */ + *image_len = (size_t)H5EA_IBLOCK_SIZE(&iblock); - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_EARRAY_HDR, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free extensible array header") - } /* end if */ - - /* Release the extensible array header */ - if(H5EA__hdr_dest(hdr) < 0) - H5E_THROW(H5E_CANTFREE, "can't free extensible array header") - -CATCH - -END_FUNC(STATIC) /* end H5EA__cache_hdr_dest() */ +END_FUNC(STATIC) /* end H5EA__cache_iblock_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_iblock_load + * Function: H5EA__cache_iblock_deserialize * - * Purpose: Loads an extensible array index block from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new extensible array index block + * Return: Success: Pointer to a new B-tree. * Failure: NULL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 9 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5EA_iblock_t *, NULL, NULL, -H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5EA__cache_iblock_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ - H5EA_hdr_t *hdr = (H5EA_hdr_t *)_udata; /* Shared extensible array information */ H5EA_iblock_t *iblock = NULL; /* Index block info */ - size_t size; /* Index block size */ - H5WB_t *wb = NULL; /* Wrapped buffer for index block data */ - uint8_t iblock_buf[H5EA_IBLOCK_BUF_SIZE]; /* Buffer for index block */ - uint8_t *buf; /* Pointer to index block buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5EA_hdr_t *hdr = (H5EA_hdr_t *)_udata; /* User data for callback */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ haddr_t arr_addr; /* Address of array header in the file */ size_t u; /* Local index variable */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ + HDassert(image); HDassert(hdr); /* Allocate the extensible array index block */ @@ -589,41 +598,23 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array index block") /* Set the extensible array index block's address */ - iblock->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the extensible array index block on disk */ - size = H5EA_IBLOCK_SIZE(iblock); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read index block from disk */ - if(H5F_block_read(f, H5FD_MEM_EARRAY_IBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read extensible array index block") - - /* Get temporary pointer to serialized header */ - p = buf; + iblock->addr = hdr->idx_blk_addr; /* Magic number */ - if(HDmemcmp(p, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong extensible array index block signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5EA_IBLOCK_VERSION) + if(*image++ != H5EA_IBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array index block version") /* Extensible array type */ - if(*p++ != (uint8_t)hdr->cparam.cls->id) + if(*image++ != (uint8_t)hdr->cparam.cls->id) H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") /* Address of header for array that owns this block (just for file integrity checks) */ - H5F_addr_decode(f, &p, &arr_addr); + H5F_addr_decode(hdr->f, &image, &arr_addr); if(H5F_addr_ne(arr_addr, hdr->addr)) H5E_THROW(H5E_BADVALUE, "wrong extensible array header address") @@ -632,40 +623,40 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) /* Decode elements in index block */ if(hdr->cparam.idx_blk_elmts > 0) { /* Convert from raw elements on disk into native elements in memory */ - if((hdr->cparam.cls->decode)(p, iblock->elmts, (size_t)hdr->cparam.idx_blk_elmts, hdr->cb_ctx) < 0) + if((hdr->cparam.cls->decode)(image, iblock->elmts, (size_t)hdr->cparam.idx_blk_elmts, hdr->cb_ctx) < 0) H5E_THROW(H5E_CANTDECODE, "can't decode extensible array index elements") - p += (hdr->cparam.idx_blk_elmts * hdr->cparam.raw_elmt_size); + image += (hdr->cparam.idx_blk_elmts * hdr->cparam.raw_elmt_size); } /* end if */ /* Decode data block addresses in index block */ if(iblock->ndblk_addrs > 0) { /* Decode addresses of data blocks in index block */ for(u = 0; u < iblock->ndblk_addrs; u++) - H5F_addr_decode(f, &p, &iblock->dblk_addrs[u]); + H5F_addr_decode(hdr->f, &image, &iblock->dblk_addrs[u]); } /* end if */ /* Decode super block addresses in index block */ if(iblock->nsblk_addrs > 0) { /* Decode addresses of super blocks in index block */ for(u = 0; u < iblock->nsblk_addrs; u++) - H5F_addr_decode(f, &p, &iblock->sblk_addrs[u]); + H5F_addr_decode(hdr->f, &image, &iblock->sblk_addrs[u]); } /* end if */ /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM)); /* Save the index block's size */ - iblock->size = size; + iblock->size = len; /* Compute checksum on index block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata((const uint8_t *)_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == iblock->size); + HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -677,161 +668,128 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(iblock && H5EA__iblock_dest(iblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block") -END_FUNC(STATIC) /* end H5EA__cache_iblock_load() */ +END_FUNC(STATIC) /* end H5EA__cache_iblock_deserialize() */ + + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_iblock_image_len + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_iblock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) + + /* Local variables */ + const H5EA_iblock_t *iblock = (const H5EA_iblock_t *)_thing; /* Pointer to the object */ + + /* Check arguments */ + HDassert(iblock); + HDassert(image_len); + + /* Set the image length size */ + *image_len = iblock->size; + +END_FUNC(STATIC) /* end H5EA__cache_iblock_image_len() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_iblock_flush + * Function: H5EA__cache_iblock_serialize * - * Purpose: Flushes a dirty extensible array index block to disk. + * Purpose: Flushes a dirty object to disk. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 9 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5EA_iblock_t *iblock, unsigned H5_ATTR_UNUSED * flags_ptr)) +H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5EA_IBLOCK_BUF_SIZE]; /* Serialization buffer */ + H5EA_iblock_t *iblock = (H5EA_iblock_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ - /* Sanity check */ + /* check arguments */ HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(iblock); HDassert(iblock->hdr); - if(iblock->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the index block on disk */ - size = iblock->size; - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") + /* Get temporary pointer to serialized info */ - /* Get temporary pointer to serialized info */ - p = buf; - - /* Magic number */ - HDmemcpy(p, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5EA_IBLOCK_VERSION; - - /* Extensible array type */ - *p++ = iblock->hdr->cparam.cls->id; - - /* Address of array header for array which owns this block */ - H5F_addr_encode(f, &p, iblock->hdr->addr); - - /* Internal information */ - - /* Encode elements in index block */ - if(iblock->hdr->cparam.idx_blk_elmts > 0) { - /* Convert from native elements in memory into raw elements on disk */ - if((iblock->hdr->cparam.cls->encode)(p, iblock->elmts, (size_t)iblock->hdr->cparam.idx_blk_elmts, iblock->hdr->cb_ctx) < 0) - H5E_THROW(H5E_CANTENCODE, "can't encode extensible array index elements") - p += (iblock->hdr->cparam.idx_blk_elmts * iblock->hdr->cparam.raw_elmt_size); - } /* end if */ - - /* Encode data block addresses in index block */ - if(iblock->ndblk_addrs > 0) { - size_t u; /* Local index variable */ + /* Magic number */ + HDmemcpy(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Encode addresses of data blocks in index block */ - for(u = 0; u < iblock->ndblk_addrs; u++) - H5F_addr_encode(f, &p, iblock->dblk_addrs[u]); - } /* end if */ + /* Version # */ + *image++ = H5EA_IBLOCK_VERSION; - /* Encode data block addresses in index block */ - if(iblock->nsblk_addrs > 0) { - size_t u; /* Local index variable */ + /* Extensible array type */ + *image++ = iblock->hdr->cparam.cls->id; - /* Encode addresses of super blocks in index block */ - for(u = 0; u < iblock->nsblk_addrs; u++) - H5F_addr_encode(f, &p, iblock->sblk_addrs[u]); - } /* end if */ + /* Address of array header for array which owns this block */ + H5F_addr_encode(f, &image, iblock->hdr->addr); - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + /* Internal information */ - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* Encode elements in index block */ + if(iblock->hdr->cparam.idx_blk_elmts > 0) { + /* Convert from native elements in memory into raw elements on disk */ + if((iblock->hdr->cparam.cls->encode)(image, iblock->elmts, (size_t)iblock->hdr->cparam.idx_blk_elmts, iblock->hdr->cb_ctx) < 0) + H5E_THROW(H5E_CANTENCODE, "can't encode extensible array index elements") + image += (iblock->hdr->cparam.idx_blk_elmts * iblock->hdr->cparam.raw_elmt_size); + } /* end if */ - /* Write the index block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_EARRAY_IBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save extensible array index block to disk") + /* Encode data block addresses in index block */ + if(iblock->ndblk_addrs > 0) { + size_t u; /* Local index variable */ - iblock->cache_info.is_dirty = FALSE; + /* Encode addresses of data blocks in index block */ + for(u = 0; u < iblock->ndblk_addrs; u++) + H5F_addr_encode(f, &image, iblock->dblk_addrs[u]); } /* end if */ - if(destroy) - if(H5EA__cache_iblock_dest(f, iblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block") - -CATCH + /* Encode data block addresses in index block */ + if(iblock->nsblk_addrs > 0) { + size_t u; /* Local index variable */ - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") + /* Encode addresses of super blocks in index block */ + for(u = 0; u < iblock->nsblk_addrs; u++) + H5F_addr_encode(f, &image, iblock->sblk_addrs[u]); + } /* end if */ -END_FUNC(STATIC) /* end H5EA__cache_iblock_flush() */ + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); - -/*------------------------------------------------------------------------- - * Function: H5EA__cache_iblock_clear - * - * Purpose: Mark a extensible array index block in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 9 2008 - * - *------------------------------------------------------------------------- - */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_iblock_clear(H5F_t *f, H5EA_iblock_t *iblock, hbool_t destroy)) + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert(iblock); - - /* Reset the dirty flag */ - iblock->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5EA__cache_iblock_dest(f, iblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block") + HDassert((size_t)(image - (uint8_t *)_image) <= len); CATCH -END_FUNC(STATIC) /* end H5EA__cache_iblock_clear() */ +END_FUNC(STATIC) /* end H5EA__cache_iblock_serialize() */ /*------------------------------------------------------------------------- @@ -843,13 +801,16 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_clear() */ * * Programmer: Quincey Koziol * koziol@hdfgroup.org - * Mar 31 2009 + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_iblock_notify(H5AC_notify_action_t action, H5EA_iblock_t *iblock)) +H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)) + + /* Local variables */ + H5EA_iblock_t *iblock = (H5EA_iblock_t *)_thing; /* Pointer to the object */ /* Sanity check */ HDassert(iblock); @@ -857,11 +818,16 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, H5EA_iblock_t *iblock)) /* Determine which action to take */ switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on extensible array header */ if(H5EA__create_flush_depend((H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0) H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between index block and header, address = %llu", (unsigned long long)iblock->addr) break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on extensible array header */ if(H5EA__destroy_flush_depend((H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0) @@ -878,165 +844,155 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_notify() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_iblock_size + * Function: H5EA__cache_iblock_free_icr * - * Purpose: Compute the size in bytes of a extensible array index block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 9 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, -H5EA__cache_iblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5EA_iblock_t *iblock, - size_t *size_ptr)) +BEGIN_FUNC(STATIC, ERR, +herr_t, SUCCEED, FAIL, +H5EA__cache_iblock_free_icr(void *thing)) - /* Sanity check */ - HDassert(f); - HDassert(iblock); - HDassert(size_ptr); + /* Check arguments */ + HDassert(thing); + + /* Release the extensible array index block */ + if(H5EA__iblock_dest((H5EA_iblock_t *)thing) < 0) + H5E_THROW(H5E_CANTFREE, "can't free extensible array index block") - /* Set size value */ - *size_ptr = iblock->size; +CATCH -END_FUNC(STATIC) /* end H5EA__cache_iblock_size() */ +END_FUNC(STATIC) /* end H5EA__cache_iblock_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_iblock_dest + * Function: H5EA__cache_sblock_get_load_size * - * Purpose: Destroys an extensible array index block in memory. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 9 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_iblock_dest(H5F_t *f, H5EA_iblock_t *iblock)) - - /* Sanity check */ - HDassert(f); - HDassert(iblock); - - /* Verify that index block is clean */ - HDassert(iblock->cache_info.is_dirty == FALSE); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!iblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(iblock->cache_info.addr)); +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_sblock_get_load_size(const void *_udata, size_t *image_len)) - /* Check for freeing file space for extensible array index block */ - if(iblock->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr)); + /* Local variables */ + const H5EA_sblock_cache_ud_t *udata = (const H5EA_sblock_cache_ud_t *)_udata; /* User data */ + H5EA_sblock_t sblock; /* Fake super block for computing size */ - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_EARRAY_IBLOCK, H5AC_dxpl_id, iblock->cache_info.addr, (hsize_t)iblock->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free extensible array index block") + /* Check arguments */ + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(udata->sblk_idx > 0); + HDassert(H5F_addr_defined(udata->sblk_addr)); + HDassert(image_len); + + /* Set up fake super block for computing size on disk */ + /* (Note: extracted from H5EA__sblock_alloc) */ + HDmemset(&sblock, 0, sizeof(sblock)); + sblock.hdr = udata->hdr; + sblock.ndblks = udata->hdr->sblk_info[udata->sblk_idx].ndblks; + sblock.dblk_nelmts = udata->hdr->sblk_info[udata->sblk_idx].dblk_nelmts; + + /* Check if # of elements in data blocks requires paging */ + if(sblock.dblk_nelmts > udata->hdr->dblk_page_nelmts) { + /* Compute # of pages in each data block from this super block */ + sblock.dblk_npages = sblock.dblk_nelmts / udata->hdr->dblk_page_nelmts; + + /* Sanity check that we have at least 2 pages in data block */ + HDassert(sblock.dblk_npages > 1); + + /* Sanity check for integer truncation */ + HDassert((sblock.dblk_npages * udata->hdr->dblk_page_nelmts) == sblock.dblk_nelmts); + + /* Compute size of buffer for each data block's 'page init' bitmask */ + sblock.dblk_page_init_size = ((sblock.dblk_npages) + 7) / 8; + HDassert(sblock.dblk_page_init_size > 0); } /* end if */ - /* Release the index block */ - if(H5EA__iblock_dest(iblock) < 0) - H5E_THROW(H5E_CANTFREE, "can't free extensible array index block") - -CATCH + /* Set the image length size */ + *image_len = (size_t)H5EA_SBLOCK_SIZE(&sblock); -END_FUNC(STATIC) /* end H5EA__cache_iblock_dest() */ +END_FUNC(STATIC) /* end H5EA__cache_sblock_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_sblock_load + * Function: H5EA__cache_sblock_deserialize * - * Purpose: Loads an extensible array super block from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new extensible array super block + * Return: Success: Pointer to a new B-tree. * Failure: NULL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 30 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5EA_sblock_t *, NULL, NULL, -H5EA__cache_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5EA__cache_sblock_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5EA_sblock_t *sblock = NULL; /* Super block info */ - H5EA_sblock_cache_ud_t *udata = (H5EA_sblock_cache_ud_t *)_udata; /* User data for loading super block */ - size_t size; /* Super block size */ - H5WB_t *wb = NULL; /* Wrapped buffer for super block data */ - uint8_t sblock_buf[H5EA_IBLOCK_BUF_SIZE]; /* Buffer for super block */ - uint8_t *buf; /* Pointer to super block buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5EA_sblock_cache_ud_t *udata = (H5EA_sblock_cache_ud_t *)_udata; /* User data */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ haddr_t arr_addr; /* Address of array header in the file */ size_t u; /* Local index variable */ /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata && udata->hdr && udata->parent && udata->sblk_idx > 0); + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(udata->sblk_idx > 0); + HDassert(H5F_addr_defined(udata->sblk_addr)); /* Allocate the extensible array super block */ if(NULL == (sblock = H5EA__sblock_alloc(udata->hdr, udata->parent, udata->sblk_idx))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array super block") /* Set the extensible array super block's address */ - sblock->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(sblock_buf, sizeof(sblock_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the extensible array super block on disk */ - size = H5EA_SBLOCK_SIZE(sblock); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read super block from disk */ - if(H5F_block_read(f, H5FD_MEM_EARRAY_SBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read extensible array super block") - - /* Get temporary pointer to serialized header */ - p = buf; + sblock->addr = udata->sblk_addr; /* Magic number */ - if(HDmemcmp(p, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong extensible array super block signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5EA_SBLOCK_VERSION) + if(*image++ != H5EA_SBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array super block version") /* Extensible array type */ - if(*p++ != (uint8_t)udata->hdr->cparam.cls->id) + if(*image++ != (uint8_t)udata->hdr->cparam.cls->id) H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") /* Address of header for array that owns this block (just for file integrity checks) */ - H5F_addr_decode(f, &p, &arr_addr); + H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if(H5F_addr_ne(arr_addr, udata->hdr->addr)) H5E_THROW(H5E_BADVALUE, "wrong extensible array header address") /* Offset of block within the array's address space */ - UINT64DECODE_VAR(p, sblock->block_off, udata->hdr->arr_off_size); + UINT64DECODE_VAR(image, sblock->block_off, udata->hdr->arr_off_size); /* Internal information */ @@ -1045,29 +1001,29 @@ H5EA__cache_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) size_t tot_page_init_size = sblock->ndblks * sblock->dblk_page_init_size; /* Compute total size of 'page init' buffer */ /* Retrieve the 'page init' bitmasks */ - HDmemcpy(sblock->page_init, p, tot_page_init_size); - p += tot_page_init_size; + HDmemcpy(sblock->page_init, image, tot_page_init_size); + image += tot_page_init_size; } /* end if */ /* Decode data block addresses */ for(u = 0; u < sblock->ndblks; u++) - H5F_addr_decode(f, &p, &sblock->dblk_addrs[u]); + H5F_addr_decode(udata->hdr->f, &image, &sblock->dblk_addrs[u]); /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM)); /* Save the super block's size */ - sblock->size = size; + sblock->size = len; /* Compute checksum on super block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == sblock->size); + HDassert((size_t)(image - (const uint8_t *)_image) == sblock->size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -1079,183 +1035,115 @@ H5EA__cache_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(sblock && H5EA__sblock_dest(sblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block") -END_FUNC(STATIC) /* end H5EA__cache_sblock_load() */ +END_FUNC(STATIC) /* end H5EA__cache_sblock_deserialize() */ + + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_sblock_image_len + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_sblock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) + + /* Local variables */ + const H5EA_sblock_t *sblock = (const H5EA_sblock_t *)_thing; /* Pointer to the object */ + + /* Check arguments */ + HDassert(sblock); + HDassert(image_len); + + /* Set the image length size */ + *image_len = sblock->size; + +END_FUNC(STATIC) /* end H5EA__cache_sblock_image_len() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_sblock_flush + * Function: H5EA__cache_sblock_serialize * - * Purpose: Flushes a dirty extensible array super block to disk. + * Purpose: Flushes a dirty object to disk. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 30 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5EA_sblock_t *sblock, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5EA_SBLOCK_BUF_SIZE]; /* Serialization buffer */ + H5EA_sblock_t *sblock = (H5EA_sblock_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + size_t u; /* Local index variable */ - /* Sanity check */ + /* check arguments */ HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(sblock); HDassert(sblock->hdr); - if(sblock->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - size_t u; /* Local index variable */ - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") + /* Magic number */ + HDmemcpy(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Compute the size of the super block on disk */ - size = sblock->size; + /* Version # */ + *image++ = H5EA_SBLOCK_VERSION; - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") + /* Extensible array type */ + *image++ = sblock->hdr->cparam.cls->id; - /* Get temporary pointer to serialized info */ - p = buf; + /* Address of array header for array which owns this block */ + H5F_addr_encode(f, &image, sblock->hdr->addr); - /* Magic number */ - HDmemcpy(p, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + /* Offset of block in array */ + UINT64ENCODE_VAR(image, sblock->block_off, sblock->hdr->arr_off_size); - /* Version # */ - *p++ = H5EA_SBLOCK_VERSION; + /* Internal information */ - /* Extensible array type */ - *p++ = sblock->hdr->cparam.cls->id; - - /* Address of array header for array which owns this block */ - H5F_addr_encode(f, &p, sblock->hdr->addr); - - /* Offset of block in array */ - UINT64ENCODE_VAR(p, sblock->block_off, sblock->hdr->arr_off_size); - - /* Internal information */ - - /* Check for 'page init' bitmasks for this super block */ - if(sblock->dblk_npages > 0) { - size_t tot_page_init_size = sblock->ndblks * sblock->dblk_page_init_size; /* Compute total size of 'page init' buffer */ - - /* Store the 'page init' bitmasks */ - HDmemcpy(p, sblock->page_init, tot_page_init_size); - p += tot_page_init_size; - } /* end if */ - - /* Encode addresses of data blocks in super block */ - for(u = 0; u < sblock->ndblks; u++) - H5F_addr_encode(f, &p, sblock->dblk_addrs[u]); - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the super block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_EARRAY_SBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save extensible array super block to disk") + /* Check for 'page init' bitmasks for this super block */ + if(sblock->dblk_npages > 0) { + size_t tot_page_init_size = sblock->ndblks * sblock->dblk_page_init_size; /* Compute total size of 'page init' buffer */ - sblock->cache_info.is_dirty = FALSE; + /* Store the 'page init' bitmasks */ + HDmemcpy(image, sblock->page_init, tot_page_init_size); + image += tot_page_init_size; } /* end if */ - if(destroy) - if(H5EA__cache_sblock_dest(f, sblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block") - -CATCH - - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") - -END_FUNC(STATIC) /* end H5EA__cache_sblock_flush() */ - - -/*------------------------------------------------------------------------- - * Function: H5EA__cache_sblock_clear - * - * Purpose: Mark a extensible array super block in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 30 2008 - * - *------------------------------------------------------------------------- - */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_sblock_clear(H5F_t *f, H5EA_sblock_t *sblock, hbool_t destroy)) - - /* Sanity check */ - HDassert(sblock); - - /* Reset the dirty flag */ - sblock->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5EA__cache_sblock_dest(f, sblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block") - -CATCH + /* Encode addresses of data blocks in super block */ + for(u = 0; u < sblock->ndblks; u++) + H5F_addr_encode(f, &image, sblock->dblk_addrs[u]); -END_FUNC(STATIC) /* end H5EA__cache_sblock_clear() */ + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); - -/*------------------------------------------------------------------------- - * Function: H5EA__cache_sblock_size - * - * Purpose: Compute the size in bytes of a extensible array super block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 30 2008 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, -H5EA__cache_sblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5EA_sblock_t *sblock, - size_t *size_ptr)) + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert(sblock); - HDassert(size_ptr); + HDassert((size_t)(image - (uint8_t *)_image) <= len); - /* Set size value */ - *size_ptr = sblock->size; - -END_FUNC(STATIC) /* end H5EA__cache_sblock_size() */ +END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */ /*------------------------------------------------------------------------- @@ -1273,7 +1161,10 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_size() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_sblock_notify(H5AC_notify_action_t action, H5EA_sblock_t *sblock)) +H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)) + + /* Local variables */ + H5EA_sblock_t *sblock = (H5EA_sblock_t *)_thing; /* Pointer to the object */ /* Sanity check */ HDassert(sblock); @@ -1281,11 +1172,16 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, H5EA_sblock_t *sblock)) /* Determine which action to take */ switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on index block */ if(H5EA__create_flush_depend((H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0) H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between super block and index block, address = %llu", (unsigned long long)sblock->addr) break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on index block */ if(H5EA__destroy_flush_depend((H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0) @@ -1302,135 +1198,158 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_notify() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_sblock_dest + * Function: H5EA__cache_sblock_free_icr * - * Purpose: Destroys an extensible array super block in memory. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 30 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_sblock_dest(H5F_t *f, H5EA_sblock_t *sblock)) +H5EA__cache_sblock_free_icr(void *thing)) - /* Sanity check */ - HDassert(f); - HDassert(sblock); + /* Check arguments */ + HDassert(thing); - /* Verify that super block is clean */ - HDassert(sblock->cache_info.is_dirty == FALSE); + /* Release the extensible array super block */ + if(H5EA__sblock_dest((H5EA_sblock_t *)thing) < 0) + H5E_THROW(H5E_CANTFREE, "can't free extensible array super block") - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!sblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(sblock->cache_info.addr)); +CATCH - /* Check for freeing file space for extensible array super block */ - if(sblock->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(sblock->addr, sblock->cache_info.addr)); +END_FUNC(STATIC) /* end H5EA__cache_sblock_free_icr() */ - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_EARRAY_SBLOCK, H5AC_dxpl_id, sblock->cache_info.addr, (hsize_t)sblock->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free extensible array super block") - } /* end if */ + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_dblock_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_dblock_get_load_size(const void *_udata, size_t *image_len)) - /* Release the super block */ - if(H5EA__sblock_dest(sblock) < 0) - H5E_THROW(H5E_CANTFREE, "can't free extensible array super block") + /* Local variables */ + const H5EA_dblock_cache_ud_t *udata = (const H5EA_dblock_cache_ud_t *)_udata; /* User data */ + H5EA_dblock_t dblock; /* Fake data block for computing size */ -CATCH + /* Check arguments */ + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(udata->nelmts > 0); + HDassert(image_len); + + /* Set up fake data block for computing size on disk */ + /* (Note: extracted from H5EA__dblock_alloc) */ + HDmemset(&dblock, 0, sizeof(dblock)); + + /* need to set: + * + * dblock.hdr + * dblock.npages + * dblock.nelmts + * + * before we invoke either H5EA_DBLOCK_PREFIX_SIZE() or + * H5EA_DBLOCK_SIZE(). + */ + dblock.hdr = udata->hdr; + dblock.nelmts = udata->nelmts; + + if(udata->nelmts > udata->hdr->dblk_page_nelmts) { + /* Set the # of pages in the direct block */ + dblock.npages = udata->nelmts / udata->hdr->dblk_page_nelmts; + HDassert(udata->nelmts==(dblock.npages * udata->hdr->dblk_page_nelmts)); + } /* end if */ -END_FUNC(STATIC) /* end H5EA__cache_sblock_dest() */ + /* Set the image length size */ + if(!dblock.npages) + *image_len = H5EA_DBLOCK_SIZE(&dblock); + else + *image_len = H5EA_DBLOCK_PREFIX_SIZE(&dblock); + +END_FUNC(STATIC) /* end H5EA__cache_dblock_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblock_load + * Function: H5EA__cache_dblock_deserialize * - * Purpose: Loads an extensible array data block from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new extensible array data block + * Return: Success: Pointer to a new B-tree. * Failure: NULL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 16 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5EA_dblock_t *, NULL, NULL, -H5EA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5EA__cache_dblock_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5EA_dblock_t *dblock = NULL; /* Data block info */ - H5EA_dblock_cache_ud_t *udata = (H5EA_dblock_cache_ud_t *)_udata; /* User data for loading data block */ - size_t size; /* Data block size */ - H5WB_t *wb = NULL; /* Wrapped buffer for data block data */ - uint8_t dblock_buf[H5EA_DBLOCK_BUF_SIZE]; /* Buffer for data block */ - uint8_t *buf; /* Pointer to data block buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5EA_dblock_cache_ud_t *udata = (H5EA_dblock_cache_ud_t *)_udata; /* User data */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ haddr_t arr_addr; /* Address of array header in the file */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata && udata->hdr && udata->parent && udata->nelmts > 0); + /* Check arguments */ + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(udata->nelmts > 0); + HDassert(H5F_addr_defined(udata->dblk_addr)); /* Allocate the extensible array data block */ if(NULL == (dblock = H5EA__dblock_alloc(udata->hdr, udata->parent, udata->nelmts))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array data block") - /* Set the extensible array data block's information */ - dblock->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(dblock_buf, sizeof(dblock_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") + HDassert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) || + (len == H5EA_DBLOCK_PREFIX_SIZE(dblock))); - /* Compute the size of the extensible array data block on disk */ - if(!dblock->npages) - size = H5EA_DBLOCK_SIZE(dblock); - else - size = H5EA_DBLOCK_PREFIX_SIZE(dblock); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read data block from disk */ - if(H5F_block_read(f, H5FD_MEM_EARRAY_DBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read extensible array data block") - - /* Get temporary pointer to serialized header */ - p = buf; + /* Set the extensible array data block's information */ + dblock->addr = udata->dblk_addr; /* Magic number */ - if(HDmemcmp(p, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong extensible array data block signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5EA_DBLOCK_VERSION) + if(*image++ != H5EA_DBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array data block version") /* Extensible array type */ - if(*p++ != (uint8_t)udata->hdr->cparam.cls->id) + if(*image++ != (uint8_t)udata->hdr->cparam.cls->id) H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") /* Address of header for array that owns this block (just for file integrity checks) */ - H5F_addr_decode(f, &p, &arr_addr); + H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if(H5F_addr_ne(arr_addr, udata->hdr->addr)) H5E_THROW(H5E_BADVALUE, "wrong extensible array header address") /* Offset of block within the array's address space */ - UINT64DECODE_VAR(p, dblock->block_off, udata->hdr->arr_off_size); + UINT64DECODE_VAR(image, dblock->block_off, udata->hdr->arr_off_size); /* Internal information */ @@ -1438,26 +1357,27 @@ H5EA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) if(!dblock->npages) { /* Decode elements in data block */ /* Convert from raw elements on disk into native elements in memory */ - if((udata->hdr->cparam.cls->decode)(p, dblock->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cparam.cls->decode)(image, dblock->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) H5E_THROW(H5E_CANTDECODE, "can't decode extensible array data elements") - p += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); + image += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); } /* end if */ /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM)); /* Set the data block's size */ + /* (Note: This is not the same as the image length, for paged data blocks) */ dblock->size = H5EA_DBLOCK_SIZE(dblock); /* Compute checksum on data block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == size); + HDassert((size_t)(image - (const uint8_t *)_image) == len); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -1469,151 +1389,116 @@ H5EA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(dblock && H5EA__dblock_dest(dblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block") -END_FUNC(STATIC) /* end H5EA__cache_dblock_load() */ +END_FUNC(STATIC) /* end H5EA__cache_dblock_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblock_flush + * Function: H5EA__cache_dblock_image_len * - * Purpose: Flushes a dirty extensible array data block to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 18 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5EA_dblock_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_dblock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5EA_DBLOCK_BUF_SIZE]; /* Serialization buffer */ + const H5EA_dblock_t *dblock = (const H5EA_dblock_t *)_thing; /* Pointer to the object */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(dblock); - HDassert(dblock->hdr); - - if(dblock->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the data block on disk */ - if(!dblock->npages) - size = dblock->size; - else - size = H5EA_DBLOCK_PREFIX_SIZE(dblock); + HDassert(image_len); - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Get temporary pointer to serialized info */ - p = buf; - - /* Magic number */ - HDmemcpy(p, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5EA_DBLOCK_VERSION; - - /* Extensible array type */ - *p++ = dblock->hdr->cparam.cls->id; - - /* Address of array header for array which owns this block */ - H5F_addr_encode(f, &p, dblock->hdr->addr); - - /* Offset of block in array */ - UINT64ENCODE_VAR(p, dblock->block_off, dblock->hdr->arr_off_size); - - /* Internal information */ - - /* Only encode elements if the data block is not paged */ - if(!dblock->npages) { - /* Encode elements in data block */ - - /* Convert from native elements in memory into raw elements on disk */ - if((dblock->hdr->cparam.cls->encode)(p, dblock->elmts, dblock->nelmts, dblock->hdr->cb_ctx) < 0) - H5E_THROW(H5E_CANTENCODE, "can't encode extensible array data elements") - p += (dblock->nelmts * dblock->hdr->cparam.raw_elmt_size); - } /* end if */ - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the data block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_EARRAY_DBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save extensible array data block to disk") - - dblock->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5EA__cache_dblock_dest(f, dblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block") - -CATCH - - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") + /* Set the image length size */ + if(!dblock->npages) + *image_len = dblock->size; + else + *image_len = (size_t)H5EA_DBLOCK_PREFIX_SIZE(dblock); -END_FUNC(STATIC) /* end H5EA__cache_dblock_flush() */ +END_FUNC(STATIC) /* end H5EA__cache_dblock_image_len() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblock_clear + * Function: H5EA__cache_dblock_serialize * - * Purpose: Mark a extensible array data block in memory as non-dirty. + * Purpose: Flushes a dirty object to disk. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 18 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblock_clear(H5F_t *f, H5EA_dblock_t *dblock, hbool_t destroy)) +H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) - /* Sanity check */ + /* Local variables */ + H5EA_dblock_t *dblock = (H5EA_dblock_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + + /* check arguments */ + HDassert(f); + HDassert(image); HDassert(dblock); + HDassert(dblock->hdr); - /* Reset the dirty flag */ - dblock->cache_info.is_dirty = FALSE; + /* Magic number */ + HDmemcpy(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - if(destroy) - if(H5EA__cache_dblock_dest(f, dblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block") + /* Version # */ + *image++ = H5EA_DBLOCK_VERSION; + + /* Extensible array type */ + *image++ = dblock->hdr->cparam.cls->id; + + /* Address of array header for array which owns this block */ + H5F_addr_encode(f, &image, dblock->hdr->addr); + + /* Offset of block in array */ + UINT64ENCODE_VAR(image, dblock->block_off, dblock->hdr->arr_off_size); + + /* Internal information */ + + /* Only encode elements if the data block is not paged */ + if(!dblock->npages) { + /* Encode elements in data block */ + + /* Convert from native elements in memory into raw elements on disk */ + if((dblock->hdr->cparam.cls->encode)(image, dblock->elmts, dblock->nelmts, dblock->hdr->cb_ctx) < 0) + H5E_THROW(H5E_CANTENCODE, "can't encode extensible array data elements") + image += (dblock->nelmts * dblock->hdr->cparam.raw_elmt_size); + } /* end if */ + + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); CATCH -END_FUNC(STATIC) /* end H5EA__cache_dblock_clear() */ +END_FUNC(STATIC) /* end H5EA__cache_dblock_serialize() */ /*------------------------------------------------------------------------- @@ -1631,19 +1516,27 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_clear() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblock_notify(H5AC_notify_action_t action, H5EA_dblock_t *dblock)) +H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)) - /* Sanity check */ + /* Local variables */ + H5EA_dblock_t *dblock = (H5EA_dblock_t *)_thing; /* Pointer to the object */ + + /* Check arguments */ HDassert(dblock); /* Determine which action to take */ switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on parent */ if(H5EA__create_flush_depend((H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0) H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block and parent, address = %llu", (unsigned long long)dblock->addr) break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if(H5EA__destroy_flush_depend((H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0) @@ -1660,171 +1553,175 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_notify() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblock_size + * Function: H5EA__cache_dblock_free_icr * - * Purpose: Compute the size in bytes of a extensible array data block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sept 18 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, -H5EA__cache_dblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5EA_dblock_t *dblock, - size_t *size_ptr)) +BEGIN_FUNC(STATIC, ERR, +herr_t, SUCCEED, FAIL, +H5EA__cache_dblock_free_icr(void *thing)) - /* Sanity check */ - HDassert(f); - HDassert(dblock); - HDassert(size_ptr); + /* Check arguments */ + HDassert(thing); - /* Set size value */ - if(!dblock->npages) - *size_ptr = dblock->size; - else - *size_ptr = H5EA_DBLOCK_PREFIX_SIZE(dblock); + /* Release the extensible array data block */ + if(H5EA__dblock_dest((H5EA_dblock_t *)thing) < 0) + H5E_THROW(H5E_CANTFREE, "can't free extensible array data block") + +CATCH -END_FUNC(STATIC) /* end H5EA__cache_dblock_size() */ +END_FUNC(STATIC) /* end H5EA__cache_dblock_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblock_dest + * Function: H5EA__cache_dblock_fsf_size * - * Purpose: Destroys an extensible array data block in memory. + * Purpose: Tell the metadata cache the actual amount of file space + * to free when a dblock entry is destroyed with the free + * file space block set. * - * Return: Non-negative on success/Negative on failure + * This function is needed when the data block is paged, as + * the datablock header and all its pages are allocted as a + * single contiguous chunk of file space, and must be + * deallocated the same way. * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 18 2008 + * The size of the chunk of memory in which the dblock + * header and all its pages is stored in the size field, + * so we simply pass that value back to the cache. + * + * If the datablock is not paged, then the size field of + * the cache_info contains the correct size. However this + * value will be the same as the size field, so we return + * the contents of the size field to the cache in this case + * as well. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 12/5/14 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_dblock_dest(H5F_t *f, H5EA_dblock_t *dblock)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_dblock_fsf_size(const void *_thing, size_t *fsf_size)) - /* Sanity check */ - HDassert(f); + /* Local variables */ + const H5EA_dblock_t *dblock = (const H5EA_dblock_t *)_thing; /* Pointer to the object */ + + /* Check arguments */ HDassert(dblock); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_EARRAY_DBLOCK); + HDassert(fsf_size); - /* Verify that data block is clean */ - HDassert(dblock->cache_info.is_dirty == FALSE); + *fsf_size = dblock->size; - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!dblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblock->cache_info.addr)); +END_FUNC(STATIC) /* end H5EA__cache_dblock_fsf_size() */ - /* Check for freeing file space for extensible array data block */ - if(dblock->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(dblock->addr, dblock->cache_info.addr)); + +/*------------------------------------------------------------------------- + * Function: H5EA__cache_dblk_page_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_dblk_page_get_load_size(const void *_udata, size_t *image_len)) - /* Release the space on disk */ - /* (Includes space for pages!) */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_EARRAY_DBLOCK, H5AC_dxpl_id, dblock->cache_info.addr, (hsize_t)dblock->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free extensible array data block") - } /* end if */ + /* Local variables */ + const H5EA_dblk_page_cache_ud_t *udata = (const H5EA_dblk_page_cache_ud_t *)_udata; /* User data */ - /* Release the data block */ - if(H5EA__dblock_dest(dblock) < 0) - H5E_THROW(H5E_CANTFREE, "can't free extensible array data block") + /* Check arguments */ + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(image_len); -CATCH + *image_len = (size_t)H5EA_DBLK_PAGE_SIZE(udata->hdr); -END_FUNC(STATIC) /* end H5EA__cache_dblock_dest() */ +END_FUNC(STATIC) /* end H5EA__cache_dblk_page_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblk_page_load + * Function: H5EA__cache_dblk_page_deserialize * - * Purpose: Loads an extensible array data block page from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new extensible array data block page + * Return: Success: Pointer to a new B-tree. * Failure: NULL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 20 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5EA_dblk_page_t *, NULL, NULL, -H5EA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5EA_dblk_page_t *dblk_page = NULL; /* Data block page info */ H5EA_dblk_page_cache_ud_t *udata = (H5EA_dblk_page_cache_ud_t *)_udata; /* User data for loading data block page */ - size_t size; /* Data block page size */ - H5WB_t *wb = NULL; /* Wrapped buffer for data block page data */ - uint8_t dblk_page_buf[H5EA_DBLK_PAGE_BUF_SIZE]; /* Buffer for data block page */ - uint8_t *buf; /* Pointer to data block page buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata && udata->hdr && udata->parent); + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->parent); + HDassert(H5F_addr_defined(udata->dblk_page_addr)); /* Allocate the extensible array data block page */ if(NULL == (dblk_page = H5EA__dblk_page_alloc(udata->hdr, udata->parent))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array data block page") - /* Set the extensible array data block's information */ - dblk_page->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(dblk_page_buf, sizeof(dblk_page_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the extensible array data block page on disk */ - size = H5EA_DBLK_PAGE_SIZE(udata->hdr); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read data block page from disk */ - if(H5F_block_read(f, H5FD_MEM_EARRAY_DBLK_PAGE, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read extensible array data block page") - - /* Get temporary pointer to serialized header */ - p = buf; + /* Set the extensible array data block page's information */ + dblk_page->addr = udata->dblk_page_addr; /* Internal information */ /* Decode elements in data block page */ /* Convert from raw elements on disk into native elements in memory */ - if((udata->hdr->cparam.cls->decode)(p, dblk_page->elmts, udata->hdr->dblk_page_nelmts, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cparam.cls->decode)(image, dblk_page->elmts, udata->hdr->dblk_page_nelmts, udata->hdr->cb_ctx) < 0) H5E_THROW(H5E_CANTDECODE, "can't decode extensible array data elements") - p += (udata->hdr->dblk_page_nelmts * udata->hdr->cparam.raw_elmt_size); + image += (udata->hdr->dblk_page_nelmts * udata->hdr->cparam.raw_elmt_size); /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM)); /* Set the data block page's size */ - dblk_page->size = size; + dblk_page->size = len; - /* Compute checksum on data block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + /* Compute checksum on data block page */ + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == dblk_page->size); + HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -1836,129 +1733,94 @@ H5EA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(dblk_page && H5EA__dblk_page_dest(dblk_page) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block page") -END_FUNC(STATIC) /* end H5EA__cache_dblk_page_load() */ +END_FUNC(STATIC) /* end H5EA__cache_dblk_page_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblk_page_flush + * Function: H5EA__cache_dblk_page_image_len * - * Purpose: Flushes a dirty extensible array data block page to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 20 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5EA__cache_dblk_page_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5EA_dblk_page_t *dblk_page, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5EA__cache_dblk_page_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5EA_DBLK_PAGE_BUF_SIZE]; /* Serialization buffer */ + const H5EA_dblk_page_t *dblk_page = (const H5EA_dblk_page_t *)_thing; /* Pointer to the object */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(dblk_page); - HDassert(dblk_page->hdr); - - if(dblk_page->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the data block on disk */ - size = dblk_page->size; - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Get temporary pointer to serialized info */ - p = buf; - - /* Internal information */ - - /* Encode elements in data block page */ - - /* Convert from native elements in memory into raw elements on disk */ - if((dblk_page->hdr->cparam.cls->encode)(p, dblk_page->elmts, dblk_page->hdr->dblk_page_nelmts, dblk_page->hdr->cb_ctx) < 0) - H5E_THROW(H5E_CANTENCODE, "can't encode extensible array data elements") - p += (dblk_page->hdr->dblk_page_nelmts * dblk_page->hdr->cparam.raw_elmt_size); - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + HDassert(image_len); - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* Set the image length size */ + *image_len = dblk_page->size; - /* Write the data block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_EARRAY_DBLK_PAGE, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save extensible array data block page to disk") - - dblk_page->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5EA__cache_dblk_page_dest(f, dblk_page) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block page") - -CATCH - - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") - -END_FUNC(STATIC) /* end H5EA__cache_dblk_page_flush() */ +END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblk_page_clear + * Function: H5EA__cache_dblk_page_serialize * - * Purpose: Mark a extensible array data block page in memory as non-dirty. + * Purpose: Flushes a dirty object to disk. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 20 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblk_page_clear(H5F_t *f, H5EA_dblk_page_t *dblk_page, hbool_t destroy)) +H5EA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) - /* Sanity check */ + /* Local variables */ + H5EA_dblk_page_t *dblk_page = (H5EA_dblk_page_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + + /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(dblk_page); + HDassert(dblk_page->hdr); - /* Reset the dirty flag */ - dblk_page->cache_info.is_dirty = FALSE; + /* Internal information */ - if(destroy) - if(H5EA__cache_dblk_page_dest(f, dblk_page) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block page") + /* Encode elements in data block page */ + + /* Convert from native elements in memory into raw elements on disk */ + if((dblk_page->hdr->cparam.cls->encode)(image, dblk_page->elmts, dblk_page->hdr->dblk_page_nelmts, dblk_page->hdr->cb_ctx) < 0) + H5E_THROW(H5E_CANTENCODE, "can't encode extensible array data elements") + image += (dblk_page->hdr->dblk_page_nelmts * dblk_page->hdr->cparam.raw_elmt_size); + + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); CATCH -END_FUNC(STATIC) /* end H5EA__cache_dblk_page_clear() */ +END_FUNC(STATIC) /* end H5EA__cache_dblk_page_serialize() */ /*------------------------------------------------------------------------- @@ -1976,7 +1838,10 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_clear() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, H5EA_dblk_page_t *dblk_page)) +H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)) + + /* Local variables */ + H5EA_dblk_page_t *dblk_page = (H5EA_dblk_page_t *)_thing; /* Pointer to the object */ /* Sanity check */ HDassert(dblk_page); @@ -1984,11 +1849,16 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, H5EA_dblk_page_t *dblk /* Determine which action to take */ switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on parent */ if(H5EA__create_flush_depend((H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0) H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block page and parent, address = %llu", (unsigned long long)dblk_page->addr) break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if(H5EA__destroy_flush_depend((H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0) @@ -2005,70 +1875,31 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_notify() */ /*------------------------------------------------------------------------- - * Function: H5EA__cache_dblk_page_size - * - * Purpose: Compute the size in bytes of a extensible array data block page - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 20 2008 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, -H5EA__cache_dblk_page_size(const H5F_t H5_ATTR_UNUSED *f, const H5EA_dblk_page_t *dblk_page, - size_t *size_ptr)) - - /* Sanity check */ - HDassert(f); - HDassert(dblk_page); - HDassert(size_ptr); - - /* Set size value */ - *size_ptr = dblk_page->size; - -END_FUNC(STATIC) /* end H5EA__cache_dblk_page_size() */ - - -/*------------------------------------------------------------------------- - * Function: H5EA__cache_dblk_page_dest - * - * Purpose: Destroys an extensible array data block page in memory. + * Function: H5EA__cache_dblk_page_free_icr * - * Note: Does _not_ free the space for the page on disk, that is - * handled through the data block that "owns" the page. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 20 2008 + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblk_page_dest(H5F_t H5_ATTR_UNUSED *f, H5EA_dblk_page_t *dblk_page)) +H5EA__cache_dblk_page_free_icr(void *thing)) - /* Sanity check */ - HDassert(f); - HDassert(dblk_page); - - /* Verify that data block page is clean */ - HDassert(dblk_page->cache_info.is_dirty == FALSE); + /* Check arguments */ + HDassert(thing); - /* Release the data block page */ - if(H5EA__dblk_page_dest(dblk_page) < 0) + /* Release the extensible array data block page */ + if(H5EA__dblk_page_dest((H5EA_dblk_page_t *)thing) < 0) H5E_THROW(H5E_CANTFREE, "can't free extensible array data block page") CATCH -END_FUNC(STATIC) /* end H5EA__cache_dblk_page_dest() */ +END_FUNC(STATIC) /* end H5EA__cache_dblk_page_free_icr() */ diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index ff55722..9c3ce6d 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -119,7 +119,7 @@ H5EA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, } /* end if */ /* Load the extensible array header */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Print opening message */ @@ -218,14 +218,14 @@ H5EA__iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *s } /* end if */ /* Load the extensible array header */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Sanity check */ HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr)); /* Protect index block */ - if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC_READ))) + if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array index block, address = %llu", (unsigned long long)hdr->idx_blk_addr) /* Print opening message */ @@ -343,12 +343,12 @@ H5EA__sblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde } /* end if */ /* Load the extensible array header */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Protect super block */ /* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */ - if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, (H5EA_iblock_t *)hdr, addr, sblk_idx, H5AC_READ))) + if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, (H5EA_iblock_t *)hdr, addr, sblk_idx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array super block, address = %llu", (unsigned long long)addr) /* Print opening message */ @@ -437,12 +437,12 @@ H5EA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde } /* end if */ /* Load the extensible array header */ - if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Protect data block */ /* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */ - if(NULL == (dblock = H5EA__dblock_protect(hdr, dxpl_id, hdr, addr, dblk_nelmts, H5AC_READ))) + if(NULL == (dblock = H5EA__dblock_protect(hdr, dxpl_id, hdr, addr, dblk_nelmts, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %llu", (unsigned long long)addr) /* Print opening message */ diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c index 37fd68b..5d188c2 100644 --- a/src/H5EAdblkpage.c +++ b/src/H5EAdblkpage.c @@ -210,7 +210,7 @@ END_FUNC(PKG) /* end H5EA__dblk_page_create() */ BEGIN_FUNC(PKG, ERR, H5EA_dblk_page_t *, NULL, NULL, H5EA__dblk_page_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_sblock_t *parent, - haddr_t dblk_page_addr, H5AC_protect_t rw)) + haddr_t dblk_page_addr, unsigned flags)) /* Local variables */ H5EA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */ @@ -223,12 +223,16 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(hdr); HDassert(H5F_addr_defined(dblk_page_addr)); + /* only the H5AC__READ_ONLY_FLAG may be set */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data */ udata.hdr = hdr; udata.parent = parent; + udata.dblk_page_addr = dblk_page_addr; /* Protect the data block page */ - if(NULL == (ret_value = (H5EA_dblk_page_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_DBLK_PAGE, dblk_page_addr, &udata, rw))) + if(NULL == (ret_value = (H5EA_dblk_page_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_DBLK_PAGE, dblk_page_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block page, address = %llu", (unsigned long long)dblk_page_addr) CATCH diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c index dd1e7b0..24be87a 100644 --- a/src/H5EAdblock.c +++ b/src/H5EAdblock.c @@ -304,7 +304,7 @@ END_FUNC(PKG) /* end H5EA__dblock_sblk_idx() */ BEGIN_FUNC(PKG, ERR, H5EA_dblock_t *, NULL, NULL, H5EA__dblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, void *parent, - haddr_t dblk_addr, size_t dblk_nelmts, H5AC_protect_t rw)) + haddr_t dblk_addr, size_t dblk_nelmts, unsigned flags)) /* Local variables */ H5EA_dblock_cache_ud_t udata; /* Information needed for loading data block */ @@ -318,13 +318,17 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(H5F_addr_defined(dblk_addr)); HDassert(dblk_nelmts); + /* only the H5AC__READ_ONLY_FLAG may be set */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data */ udata.hdr = hdr; udata.parent = parent; udata.nelmts = dblk_nelmts; + udata.dblk_addr = dblk_addr; /* Protect the data block */ - if(NULL == (ret_value = (H5EA_dblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_DBLOCK, dblk_addr, &udata, rw))) + if(NULL == (ret_value = (H5EA_dblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_DBLOCK, dblk_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %llu", (unsigned long long)dblk_addr) CATCH @@ -399,7 +403,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(dblk_nelmts > 0); /* Protect data block */ - if(NULL == (dblock = H5EA__dblock_protect(hdr, dxpl_id, parent, dblk_addr, dblk_nelmts, H5AC_WRITE))) + if(NULL == (dblock = H5EA__dblock_protect(hdr, dxpl_id, parent, dblk_addr, dblk_nelmts, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %llu", (unsigned long long)dblk_addr) /* Check if this is a paged data block */ diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c index 76ea6d8..e30bbac 100644 --- a/src/H5EAhdr.c +++ b/src/H5EAhdr.c @@ -627,16 +627,25 @@ END_FUNC(PKG) /* end H5EA__hdr_modified() */ BEGIN_FUNC(PKG, ERR, H5EA_hdr_t *, NULL, NULL, H5EA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata, - H5AC_protect_t rw)) + unsigned flags)) /* Local variables */ + H5EA_hdr_cache_ud_t udata; /* User data for cache callbacks */ /* Sanity check */ HDassert(f); HDassert(H5F_addr_defined(ea_addr)); + /* only the H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + + /* Set up user data for cache callbacks */ + udata.f = f; + udata.addr = ea_addr; + udata.ctx_udata = ctx_udata; + /* Protect the header */ - if(NULL == (ret_value = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, ctx_udata, rw))) + if(NULL == (ret_value = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr) CATCH diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c index 3c2894a..364b443 100644 --- a/src/H5EAiblock.c +++ b/src/H5EAiblock.c @@ -279,7 +279,7 @@ END_FUNC(PKG) /* end H5EA__iblock_create() */ */ BEGIN_FUNC(PKG, ERR, H5EA_iblock_t *, NULL, NULL, -H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, H5AC_protect_t rw)) +H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, unsigned flags)) #ifdef QAK HDfprintf(stderr, "%s: Called\n", FUNC); @@ -288,8 +288,11 @@ HDfprintf(stderr, "%s: Called\n", FUNC); /* Sanity check */ HDassert(hdr); + /* only the H5AC__READ_ONLY_FLAG may be set */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Protect the index block */ - if(NULL == (ret_value = (H5EA_iblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, hdr->idx_blk_addr, hdr, rw))) + if(NULL == (ret_value = (H5EA_iblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, hdr->idx_blk_addr, hdr, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array index block, address = %llu", (unsigned long long)hdr->idx_blk_addr) CATCH @@ -361,7 +364,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(H5F_addr_defined(hdr->idx_blk_addr)); /* Protect index block */ - if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC_WRITE))) + if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array index block, address = %llu", (unsigned long long)hdr->idx_blk_addr) /* Check for index block having data block pointers */ @@ -436,7 +439,6 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)) /* Sanity check */ HDassert(iblock); - HDassert(iblock->rc == 0); /* Check if shared header field has been initialized */ if(iblock->hdr) { diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 5382eac..d328c05 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -229,7 +229,6 @@ typedef struct H5EA_iblock_t { haddr_t *sblk_addrs; /* Buffer for addresses of super blocks in index block */ /* Internal array information (not stored) */ - size_t rc; /* Reference count of objects using this block */ H5EA_hdr_t *hdr; /* Shared array header info */ haddr_t addr; /* Address of this index block on disk */ size_t size; /* Size of index block on disk */ @@ -251,7 +250,6 @@ typedef struct H5EA_sblock_t { uint8_t *page_init; /* Bitmap of whether a data block page is initialized */ /* Internal array information (not stored) */ - size_t rc; /* Reference count of objects using this block */ H5EA_hdr_t *hdr; /* Shared array header info */ H5EA_iblock_t *parent; /* Parent object for super block (index block) */ haddr_t addr; /* Address of this index block on disk */ @@ -312,11 +310,19 @@ struct H5EA_t { /* Metadata cache callback user data types */ +/* Info needed for loading header */ +typedef struct H5EA_hdr_cache_ud_t { + H5F_t *f; /* Pointer to file for extensible array */ + haddr_t addr; /* Address of header on disk */ + void *ctx_udata; /* User context for class */ +} H5EA_hdr_cache_ud_t; + /* Info needed for loading super block */ typedef struct H5EA_sblock_cache_ud_t { H5EA_hdr_t *hdr; /* Shared extensible array information */ H5EA_iblock_t *parent; /* Pointer to parent object for super block (index block) */ unsigned sblk_idx; /* Index of super block */ + haddr_t sblk_addr; /* Address of super block */ } H5EA_sblock_cache_ud_t; /* Info needed for loading data block */ @@ -324,12 +330,14 @@ typedef struct H5EA_dblock_cache_ud_t { H5EA_hdr_t *hdr; /* Shared extensible array information */ void *parent; /* Pointer to parent object for data block (index or super block) */ size_t nelmts; /* Number of elements in data block */ + haddr_t dblk_addr; /* Address of data block */ } H5EA_dblock_cache_ud_t; /* Info needed for loading data block page */ typedef struct H5EA_dblk_page_cache_ud_t { H5EA_hdr_t *hdr; /* Shared extensible array information */ H5EA_sblock_t *parent; /* Pointer to parent object for data block page (super block) */ + haddr_t dblk_page_addr; /* Address of data block page */ } H5EA_dblk_page_cache_ud_t; #ifdef H5EA_TESTING @@ -388,7 +396,7 @@ H5_DLL herr_t H5EA__hdr_fuse_incr(H5EA_hdr_t *hdr); H5_DLL size_t H5EA__hdr_fuse_decr(H5EA_hdr_t *hdr); H5_DLL herr_t H5EA__hdr_modified(H5EA_hdr_t *hdr); H5_DLL H5EA_hdr_t *H5EA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, - void *ctx_udata, H5AC_protect_t rw); + void *ctx_udata, unsigned flags); H5_DLL herr_t H5EA__hdr_unprotect(H5EA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5EA__hdr_delete(H5EA_hdr_t *hdr, hid_t dxpl_id); H5_DLL herr_t H5EA__hdr_dest(H5EA_hdr_t *hdr); @@ -398,7 +406,7 @@ H5_DLL H5EA_iblock_t *H5EA__iblock_alloc(H5EA_hdr_t *hdr); H5_DLL haddr_t H5EA__iblock_create(H5EA_hdr_t *hdr, hid_t dxpl_id, hbool_t *stats_changed); H5_DLL H5EA_iblock_t *H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, - H5AC_protect_t rw); + unsigned flags); H5_DLL herr_t H5EA__iblock_unprotect(H5EA_iblock_t *iblock, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5EA__iblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id); @@ -410,7 +418,8 @@ H5_DLL H5EA_sblock_t *H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, H5_DLL haddr_t H5EA__sblock_create(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_iblock_t *parent, hbool_t *stats_changed, unsigned sblk_idx); H5_DLL H5EA_sblock_t *H5EA__sblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, - H5EA_iblock_t *parent, haddr_t sblk_addr, unsigned sblk_idx, H5AC_protect_t rw); + H5EA_iblock_t *parent, haddr_t sblk_addr, unsigned sblk_idx, + unsigned flags); H5_DLL herr_t H5EA__sblock_unprotect(H5EA_sblock_t *sblock, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5EA__sblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id, @@ -424,7 +433,7 @@ H5_DLL haddr_t H5EA__dblock_create(H5EA_hdr_t *hdr, hid_t dxpl_id, void *parent, hbool_t *stats_changed, hsize_t dblk_off, size_t nelmts); H5_DLL unsigned H5EA__dblock_sblk_idx(const H5EA_hdr_t *hdr, hsize_t idx); H5_DLL H5EA_dblock_t *H5EA__dblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, - void *parent, haddr_t dblk_addr, size_t dblk_nelmts, H5AC_protect_t rw); + void *parent, haddr_t dblk_addr, size_t dblk_nelmts, unsigned flags); H5_DLL herr_t H5EA__dblock_unprotect(H5EA_dblock_t *dblock, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5EA__dblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id, void *parent, @@ -436,7 +445,7 @@ H5_DLL H5EA_dblk_page_t *H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *p H5_DLL herr_t H5EA__dblk_page_create(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_sblock_t *parent, haddr_t addr); H5_DLL H5EA_dblk_page_t *H5EA__dblk_page_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, - H5EA_sblock_t *parent, haddr_t dblk_page_addr, H5AC_protect_t rw); + H5EA_sblock_t *parent, haddr_t dblk_page_addr, unsigned flags); H5_DLL herr_t H5EA__dblk_page_unprotect(H5EA_dblk_page_t *dblk_page, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page); diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c index 1cc8bd9..33f34c9 100644 --- a/src/H5EAsblock.c +++ b/src/H5EAsblock.c @@ -276,7 +276,7 @@ END_FUNC(PKG) /* end H5EA__sblock_create() */ BEGIN_FUNC(PKG, ERR, H5EA_sblock_t *, NULL, NULL, H5EA__sblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_iblock_t *parent, - haddr_t sblk_addr, unsigned sblk_idx, H5AC_protect_t rw)) + haddr_t sblk_addr, unsigned sblk_idx, unsigned flags)) /* Local variables */ H5EA_sblock_cache_ud_t udata; /* Information needed for loading super block */ @@ -290,13 +290,17 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(hdr); HDassert(H5F_addr_defined(sblk_addr)); + /* only the H5AC__READ_ONLY_FLAG may be set */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data */ udata.hdr = hdr; udata.parent = parent; udata.sblk_idx = sblk_idx; + udata.sblk_addr = sblk_addr; /* Protect the super block */ - if(NULL == (ret_value = (H5EA_sblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_SBLOCK, sblk_addr, &udata, rw))) + if(NULL == (ret_value = (H5EA_sblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_SBLOCK, sblk_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array super block, address = %llu", (unsigned long long)sblk_addr) CATCH @@ -370,7 +374,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(H5F_addr_defined(sblk_addr)); /* Protect super block */ - if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, parent, sblk_addr, sblk_idx, H5AC_WRITE))) + if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, parent, sblk_addr, sblk_idx, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array super block, address = %llu", (unsigned long long)sblk_addr) /* Iterate over data blocks */ @@ -412,7 +416,6 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)) /* Sanity check */ HDassert(sblock); - HDassert(sblock->rc == 0); #ifdef QAK HDfprintf(stderr, "%s: sblock->hdr->dblk_page_nelmts = %Zu, sblock->ndblks = %Zu, sblock->dblk_nelmts = %Zu\n", FUNC, sblock->hdr->dblk_page_nelmts, sblock->ndblks, sblock->dblk_nelmts); #endif /* QAK */ diff --git a/src/H5FA.c b/src/H5FA.c index 1acb10b..bfb2a00 100644 --- a/src/H5FA.c +++ b/src/H5FA.c @@ -141,7 +141,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array info") /* Lock the array header into memory */ - if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_WRITE))) + if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header") /* Point fixed array wrapper at header and bump it's ref count */ @@ -201,7 +201,7 @@ H5FA_open(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata)) #ifdef H5FA_DEBUG HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr); #endif /* H5FA_DEBUG */ - if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_READ))) + if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header, address = %llu", (unsigned long long)fa_addr) /* Check for pending array deletion */ @@ -359,7 +359,7 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx HDassert(idx < hdr->cparam.nelmts); /* Protect data block */ - if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC_WRITE))) + if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr) /* Check for paging data block */ @@ -400,7 +400,7 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx } /* end if */ /* Protect the data block page */ - if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC_WRITE))) + if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) /* Set the element in the data block page */ @@ -467,7 +467,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); else { /* Get the data block */ HDassert(H5F_addr_defined(hdr->dblk_addr)); - if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC_READ))) + if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr) /* Check for paged data block */ @@ -507,7 +507,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); dblk_page_nelmts = dblock->dblk_page_nelmts; /* Protect the data block page */ - if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC_READ))) + if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) /* Retrieve element from data block */ @@ -592,7 +592,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); /* Lock the array header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ - if(NULL == (hdr = H5FA__hdr_protect(fa->f, dxpl_id, fa_addr, NULL, H5AC_WRITE))) + if(NULL == (hdr = H5FA__hdr_protect(fa->f, dxpl_id, fa_addr, NULL, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTLOAD, "unable to load fixed array header") /* Set the shared array header's file context for this operation */ @@ -655,7 +655,7 @@ H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata)) #ifdef H5FA_DEBUG HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr); #endif /* H5FA_DEBUG */ - if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_WRITE))) + if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array header, address = %llu", (unsigned long long)fa_addr) /* Check for files using shared array header */ diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 9a1fc57..298eb56 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -55,11 +55,6 @@ #define H5FA_HDR_VERSION 0 /* Header */ #define H5FA_DBLOCK_VERSION 0 /* Data block */ -/* Size of stack buffer for serialization buffers */ -#define H5FA_HDR_BUF_SIZE 512 -#define H5FA_DBLOCK_BUF_SIZE 512 -#define H5FA_DBLK_PAGE_BUF_SIZE 512 - /******************/ /* Local Typedefs */ @@ -76,23 +71,35 @@ /********************/ /* Metadata cache (H5AC) callbacks */ -static H5FA_hdr_t *H5FA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5FA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FA_hdr_t *hdr, unsigned * flags_ptr); -static herr_t H5FA__cache_hdr_clear(H5F_t *f, H5FA_hdr_t *hdr, hbool_t destroy); -static herr_t H5FA__cache_hdr_size(const H5F_t *f, const H5FA_hdr_t *hdr, size_t *size_ptr); -static herr_t H5FA__cache_hdr_dest(H5F_t *f, H5FA_hdr_t *hdr); - -static H5FA_dblock_t *H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5FA__cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FA_dblock_t *dblock, unsigned * flags_ptr); -static herr_t H5FA__cache_dblock_clear(H5F_t *f, H5FA_dblock_t *dblock, hbool_t destroy); -static herr_t H5FA__cache_dblock_size(const H5F_t *f, const H5FA_dblock_t *dblock, size_t *size_ptr); -static herr_t H5FA__cache_dblock_dest(H5F_t *f, H5FA_dblock_t *dblock); - -static H5FA_dblk_page_t *H5FA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5FA__cache_dblk_page_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FA_dblk_page_t *dblk_page, unsigned * flags_ptr); -static herr_t H5FA__cache_dblk_page_clear(H5F_t *f, H5FA_dblk_page_t *dblk_page, hbool_t destroy); -static herr_t H5FA__cache_dblk_page_size(const H5F_t *f, const H5FA_dblk_page_t *dblk_page, size_t *size_ptr); -static herr_t H5FA__cache_dblk_page_dest(H5F_t *f, H5FA_dblk_page_t *dblk_page); +static herr_t H5FA__cache_hdr_get_load_size(const void *udata, size_t *image_len); +static void *H5FA__cache_hdr_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5FA__cache_hdr_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5FA__cache_hdr_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5FA__cache_hdr_free_icr(void *thing); + +static herr_t H5FA__cache_dblock_get_load_size(const void *udata, size_t *image_len); +static void *H5FA__cache_dblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5FA__cache_dblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5FA__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5FA__cache_dblock_free_icr(void *thing); +static herr_t H5FA__cache_dblock_fsf_size(const void *thing, size_t *fsf_size); + +static herr_t H5FA__cache_dblk_page_get_load_size(const void *udata, size_t *image_len); +static void *H5FA__cache_dblk_page_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5FA__cache_dblk_page_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5FA__cache_dblk_page_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5FA__cache_dblk_page_free_icr(void *thing); /*********************/ @@ -101,36 +108,53 @@ static herr_t H5FA__cache_dblk_page_dest(H5F_t *f, H5FA_dblk_page_t *dblk_page); /* H5FA header inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FARRAY_HDR[1] = {{ - H5AC_FARRAY_HDR_ID, - (H5AC_load_func_t)H5FA__cache_hdr_load, - (H5AC_flush_func_t)H5FA__cache_hdr_flush, - (H5AC_dest_func_t)H5FA__cache_hdr_dest, - (H5AC_clear_func_t)H5FA__cache_hdr_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5FA__cache_hdr_size, + H5AC_FARRAY_HDR_ID, /* Metadata client ID */ + "Fixed-array Header", /* Metadata client name (for debugging) */ + H5FD_MEM_FARRAY_HDR, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5FA__cache_hdr_get_load_size, /* 'get_load_size' callback */ + H5FA__cache_hdr_deserialize, /* 'deserialize' callback */ + H5FA__cache_hdr_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5FA__cache_hdr_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5FA__cache_hdr_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; - /* H5FA data block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FARRAY_DBLOCK[1] = {{ - H5AC_FARRAY_DBLOCK_ID, - (H5AC_load_func_t)H5FA__cache_dblock_load, - (H5AC_flush_func_t)H5FA__cache_dblock_flush, - (H5AC_dest_func_t)H5FA__cache_dblock_dest, - (H5AC_clear_func_t)H5FA__cache_dblock_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5FA__cache_dblock_size, + H5AC_FARRAY_DBLOCK_ID, /* Metadata client ID */ + "Fixed Array Data Block", /* Metadata client name (for debugging) */ + H5FD_MEM_FARRAY_DBLOCK, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5FA__cache_dblock_get_load_size, /* 'get_load_size' callback */ + H5FA__cache_dblock_deserialize, /* 'deserialize' callback */ + H5FA__cache_dblock_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5FA__cache_dblock_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5FA__cache_dblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + H5FA__cache_dblock_fsf_size, /* 'fsf_size' callback */ }}; /* H5FA data block page inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1] = {{ - H5AC_FARRAY_DBLK_PAGE_ID, - (H5AC_load_func_t)H5FA__cache_dblk_page_load, - (H5AC_flush_func_t)H5FA__cache_dblk_page_flush, - (H5AC_dest_func_t)H5FA__cache_dblk_page_dest, - (H5AC_clear_func_t)H5FA__cache_dblk_page_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5FA__cache_dblk_page_size, + H5AC_FARRAY_DBLK_PAGE_ID, /* Metadata client ID */ + "Fixed Array Data Block Page", /* Metadata client name (for debugging) */ + H5FD_MEM_FARRAY_DBLK_PAGE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5FA__cache_dblk_page_get_load_size, /* 'get_load_size' callback */ + H5FA__cache_dblk_page_deserialize, /* 'deserialize' callback */ + H5FA__cache_dblk_page_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5FA__cache_dblk_page_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5FA__cache_dblk_page_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -146,88 +170,101 @@ const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1] = {{ /*------------------------------------------------------------------------- - * Function: H5FA__cache_hdr_load + * Function: H5FA__cache_hdr_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 31, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_hdr_get_load_size(const void *_udata, size_t *image_len)) + + /* Local variables */ + const H5FA_hdr_cache_ud_t *udata = (const H5FA_hdr_cache_ud_t *)_udata; /* User data for callback */ + + /* Check arguments */ + HDassert(udata); + HDassert(udata->f); + HDassert(image_len); + + /* Set the image length size */ + *image_len = (size_t)H5FA_HEADER_SIZE_FILE(udata->f); + +END_FUNC(STATIC) /* end H5FA__cache_hdr_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5FA__cache_hdr_deserialize * - * Purpose: Loads a fixed array header from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new fixed array + * Return: Success: Pointer to a new B-tree. * Failure: NULL * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 12, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5FA_hdr_t *, NULL, NULL, -H5FA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) +void *, NULL, NULL, +H5FA__cache_hdr_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5FA_cls_id_t id; /* ID of fixed array class, as found in file */ H5FA_hdr_t *hdr = NULL; /* Fixed array info */ - size_t size; /* Header size */ - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5FA_HDR_BUF_SIZE]; /* Buffer for header */ - uint8_t *buf; /* Pointer to header buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5FA_hdr_cache_ud_t *udata = (H5FA_hdr_cache_ud_t *)_udata; + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(udata); + HDassert(udata->f); + HDassert(H5F_addr_defined(udata->addr)); /* Allocate space for the fixed array data structure */ - if(NULL == (hdr = H5FA__hdr_alloc(f))) + if(NULL == (hdr = H5FA__hdr_alloc(udata->f))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array shared header") /* Set the fixed array header's address */ - hdr->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the 'base' size of the fixed array header on disk */ - size = H5FA_HEADER_SIZE_HDR(hdr); - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_FARRAY_HDR, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read fixed array header") - - /* Get temporary pointer to serialized header */ - p = buf; + hdr->addr = udata->addr; /* Magic number */ - if(HDmemcmp(p, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong fixed array header signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5FA_HDR_VERSION) + if(*image++ != H5FA_HDR_VERSION) H5E_THROW(H5E_VERSION, "wrong fixed array header version") /* Fixed array class */ - id = (H5FA_cls_id_t)*p++; + id = (H5FA_cls_id_t)*image++; if(id >= H5FA_NUM_CLS_ID) H5E_THROW(H5E_BADTYPE, "incorrect fixed array class") hdr->cparam.cls = H5FA_client_class_g[id]; /* General array creation/configuration information */ - hdr->cparam.raw_elmt_size = *p++; /* Element size in file (in bytes) */ - hdr->cparam.max_dblk_page_nelmts_bits = *p++; /* Log2(Max. # of elements in data block page) - - i.e. # of bits needed to store max. # of - elements in data block page. */ + hdr->cparam.raw_elmt_size = *image++; /* Element size in file (in bytes) */ + hdr->cparam.max_dblk_page_nelmts_bits = *image++; /* Log2(Max. # of elements in data block page) - + i.e. # of bits needed to store max. # of + elements in data block page. */ /* Array statistics */ - H5F_DECODE_LENGTH(f, p, hdr->cparam.nelmts); /* Number of elements */ + H5F_DECODE_LENGTH(udata->f, image, hdr->cparam.nelmts); /* Number of elements */ /* Internal information */ - H5F_addr_decode(f, &p, &hdr->dblk_addr); /* Address of index block */ + H5F_addr_decode(udata->f, &image, &hdr->dblk_addr); /* Address of index block */ /* Check for data block */ if(H5F_addr_defined(hdr->dblk_addr)) { @@ -250,26 +287,26 @@ H5FA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5FA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM)); /* Compute checksum on entire header */ /* (including the filter information, if present) */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == size); + HDassert((size_t)(image - (const uint8_t *)_image) == len); /* Verify checksum */ if(stored_chksum != computed_chksum) H5E_THROW(H5E_BADVALUE, "incorrect metadata checksum for fixed array header") /* Finish initializing fixed array header */ - if(H5FA__hdr_init(hdr, udata) < 0) + if(H5FA__hdr_init(hdr, udata->ctx_udata) < 0) H5E_THROW(H5E_CANTINIT, "initialization failed for fixed array header") - HDassert(hdr->size == size); + HDassert(hdr->size == len); /* Set return value */ ret_value = hdr; @@ -277,326 +314,277 @@ H5FA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(hdr && H5FA__hdr_dest(hdr) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array header") -END_FUNC(STATIC) /* end H5FA__cache_hdr_load() */ +END_FUNC(STATIC) /* end H5FA__cache_hdr_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_hdr_flush + * Function: H5FA__cache_hdr_image_len * - * Purpose: Flushes a dirty fixed array header to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 12, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5FA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5FA_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_hdr_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5FA_HDR_BUF_SIZE]; /* Buffer for header */ + /* Local variables */ + const H5FA_hdr_t *hdr = (const H5FA_hdr_t *)_thing; /* Pointer to the object */ - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(hdr); + HDassert(image_len); - if(hdr->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Header size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the array header on disk */ - size = hdr->size; - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Get temporary pointer to serialized header */ - p = buf; + /* Set the image length size */ + *image_len = hdr->size; - /* Magic number */ - HDmemcpy(p, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; +END_FUNC(STATIC) /* end H5FA__cache_hdr_image_len() */ - /* Version # */ - *p++ = H5FA_HDR_VERSION; + +/*------------------------------------------------------------------------- + * Function: H5FA__cache_hdr_serialize + * + * Purpose: Flushes a dirty object to disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 12, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) - /* Fixed array type */ - *p++ = hdr->cparam.cls->id; + /* Local variables */ + H5FA_hdr_t *hdr = (H5FA_hdr_t *)_thing; /* Pointer to the fixed array header */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ - /* General array creation/configuration information */ - *p++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */ - *p++ = hdr->cparam.max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ + /* check arguments */ + HDassert(f); + HDassert(image); + HDassert(hdr); - /* Array statistics */ - H5F_ENCODE_LENGTH(f, p, hdr->stats.nelmts); /* Number of elements for the fixed array */ + /* Magic number */ + HDmemcpy(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Internal information */ - H5F_addr_encode(f, &p, hdr->dblk_addr); /* Address of fixed array data block */ + /* Version # */ + *image++ = H5FA_HDR_VERSION; - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + /* Fixed array type */ + *image++ = hdr->cparam.cls->id; - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* General array creation/configuration information */ + *image++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */ + *image++ = hdr->cparam.max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ - /* Write the array header. */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_FARRAY_HDR, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save fixed array header to disk") + /* Array statistics */ + H5F_ENCODE_LENGTH(f, image, hdr->stats.nelmts); /* Number of elements for the fixed array */ - hdr->cache_info.is_dirty = FALSE; - } /* end if */ + /* Internal information */ + H5F_addr_encode(f, &image, hdr->dblk_addr); /* Address of fixed array data block */ - if(destroy) - if(H5FA__cache_hdr_dest(f, hdr) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array header") + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); -CATCH + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); -END_FUNC(STATIC) /* end H5FA__cache_hdr_flush() */ +END_FUNC(STATIC) /* end H5FA__cache_hdr_serialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_hdr_clear + * Function: H5FA__cache_hdr_free_icr * - * Purpose: Mark a fixed array header in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 12, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5FA__cache_hdr_clear(H5F_t *f, H5FA_hdr_t *hdr, hbool_t destroy)) - - /* Sanity check */ - HDassert(hdr); +H5FA__cache_hdr_free_icr(void *thing)) - /* Reset the dirty flag. */ - hdr->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(thing); - if(destroy) - if(H5FA__cache_hdr_dest(f, hdr) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array header") + /* Release the extensible array header */ + if(H5FA__hdr_dest((H5FA_hdr_t *)thing) < 0) + H5E_THROW(H5E_CANTFREE, "can't free fixed array header") CATCH -END_FUNC(STATIC) /* end H5FA__cache_hdr_clear() */ +END_FUNC(STATIC) /* end H5FA__cache_hdr_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_hdr_size + * Function: H5FA__cache_dblock_get_load_size * - * Purpose: Compute the size in bytes of a fixed array header - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 12, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, -H5FA__cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5FA_hdr_t *hdr, - size_t *size_ptr)) - - /* Sanity check */ - HDassert(f); - HDassert(hdr); - HDassert(size_ptr); - - /* Set size value */ - *size_ptr = hdr->size; - -END_FUNC(STATIC) /* end H5FA__cache_hdr_size() */ +H5FA__cache_dblock_get_load_size(const void *_udata, size_t *image_len)) - -/*------------------------------------------------------------------------- - * Function: H5FA__cache_hdr_dest - * - * Purpose: Destroys a fixed array header in memory. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5FA__cache_hdr_dest(H5F_t *f, H5FA_hdr_t *hdr)) + /* Local variables */ + const H5FA_dblock_cache_ud_t *udata = (const H5FA_dblock_cache_ud_t *)_udata; /* User data */ + H5FA_dblock_t dblock; /* Fake data block for computing size */ + size_t dblk_page_nelmts; /* # of elements per data block page */ /* Check arguments */ - HDassert(f); - HDassert(hdr); - - /* Verify that header is clean */ - HDassert(hdr->cache_info.is_dirty == FALSE); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr)); - - /* Check for freeing file space for fixed array header */ - if(hdr->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(hdr->addr, hdr->cache_info.addr)); - - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FARRAY_HDR, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free fixed array header") + HDassert(udata); + HDassert(udata->hdr); + HDassert(image_len); + + /* Set up fake data block for computing size on disk */ + /* (Note: extracted from H5FA__dblock_alloc) */ + HDmemset(&dblock, 0, sizeof(dblock)); + + /* Set up fake data block for computing size on disk + * + * need: dblock->hdr + * dblock->npages + * dblock->dblk_page_init_size + */ + + dblock.hdr = udata->hdr; + dblk_page_nelmts = (size_t)1 << udata->hdr->cparam.max_dblk_page_nelmts_bits; + if(udata->hdr->cparam.nelmts > dblk_page_nelmts) { + dblock.npages = (size_t)(((udata->hdr->cparam.nelmts + dblk_page_nelmts) - 1) / dblk_page_nelmts); + dblock.dblk_page_init_size = (dblock.npages + 7) / 8; } /* end if */ - /* Release the fixed array header */ - if(H5FA__hdr_dest(hdr) < 0) - H5E_THROW(H5E_CANTFREE, "can't free fixed array header") - -CATCH + /* Set the image length size */ + if(!dblock.npages) + *image_len = (size_t)H5FA_DBLOCK_SIZE(&dblock); + else + *image_len = (size_t)H5FA_DBLOCK_PREFIX_SIZE(&dblock); -END_FUNC(STATIC) /* end H5FA__cache_hdr_dest() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblock_load + * Function: H5FA__cache_dblock_deserialize * - * Purpose: Loads a fixed array data block from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new fixed array data block + * Return: Success: Pointer to a new B-tree. * Failure: NULL * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5FA_dblock_t *, NULL, NULL, -H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5FA__cache_dblock_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5FA_dblock_t *dblock = NULL; /* Data block info */ H5FA_dblock_cache_ud_t *udata = (H5FA_dblock_cache_ud_t *)_udata; /* User data for loading data block */ - size_t size; /* Data block size */ - H5WB_t *wb = NULL; /* Wrapped buffer for data block data */ - uint8_t dblock_buf[H5FA_DBLOCK_BUF_SIZE]; /* Buffer for data block */ - uint8_t *buf; /* Pointer to data block buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ haddr_t arr_addr; /* Address of array header in the file */ /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata && udata->hdr); + HDassert(udata); + HDassert(udata->hdr); /* Allocate the fixed array data block */ if(NULL == (dblock = H5FA__dblock_alloc(udata->hdr))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block") - /* Set the fixed array data block's information */ - dblock->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(dblock_buf, sizeof(dblock_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the fixed array data block on disk */ - if(!dblock->npages) - size = (size_t)H5FA_DBLOCK_SIZE(dblock); - else - size = H5FA_DBLOCK_PREFIX_SIZE(dblock); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") + HDassert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) + || (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock))); - /* Read data block from disk */ - if(H5F_block_read(f, H5FD_MEM_FARRAY_DBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read fixed array data block") - - /* Get temporary pointer to serialized header */ - p = buf; + /* Set the fixed array data block's information */ + dblock->addr = udata->dblk_addr; /* Magic number */ - if(HDmemcmp(p, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) H5E_THROW(H5E_BADVALUE, "wrong fixed array data block signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5FA_DBLOCK_VERSION) + if(*image++ != H5FA_DBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong fixed array data block version") /* Fixed array type */ - if(*p++ != (uint8_t)udata->hdr->cparam.cls->id) + if(*image++ != (uint8_t)udata->hdr->cparam.cls->id) H5E_THROW(H5E_BADTYPE, "incorrect fixed array class") /* Address of header for array that owns this block (just for file integrity checks) */ - H5F_addr_decode(f, &p, &arr_addr); + H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if(H5F_addr_ne(arr_addr, udata->hdr->addr)) H5E_THROW(H5E_BADVALUE, "wrong fixed array header address") /* Page initialization flags */ if(dblock->npages > 0) { - HDmemcpy(dblock->dblk_page_init, p, dblock->dblk_page_init_size); - p += dblock->dblk_page_init_size; + HDmemcpy(dblock->dblk_page_init, image, dblock->dblk_page_init_size); + image += dblock->dblk_page_init_size; } /* end if */ /* Only decode elements if the data block is not paged */ if(!dblock->npages) { /* Decode elements in data block */ /* Convert from raw elements on disk into native elements in memory */ - if((udata->hdr->cparam.cls->decode)(p, dblock->elmts, (size_t)udata->hdr->stats.nelmts, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cparam.cls->decode)(image, dblock->elmts, (size_t)udata->hdr->cparam.nelmts, udata->hdr->cb_ctx) < 0) H5E_THROW(H5E_CANTDECODE, "can't decode fixed array data elements") - p += (udata->hdr->stats.nelmts * udata->hdr->cparam.raw_elmt_size); + image += (udata->hdr->cparam.nelmts * udata->hdr->cparam.raw_elmt_size); } /* end if */ /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5FA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM)); /* Set the data block's size */ dblock->size = H5FA_DBLOCK_SIZE(dblock); /* Compute checksum on data block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == size); + HDassert((size_t)(image - (const uint8_t *)_image) == len); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -608,317 +596,292 @@ H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(dblock && H5FA__dblock_dest(dblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block") -END_FUNC(STATIC) /* end H5FA__cache_dblock_load() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblock_flush + * Function: H5FA__cache_dblock_image_len * - * Purpose: Flushes a dirty fixed array data block to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5FA__cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5FA_dblock_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_dblock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5FA_DBLOCK_BUF_SIZE]; /* Serialization buffer */ + const H5FA_dblock_t *dblock = (const H5FA_dblock_t *)_thing; /* Pointer to the object */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(dblock); - HDassert(dblock->hdr); - - if(dblock->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ + HDassert(image_len); - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the data block on disk */ - if(!dblock->npages) - size = (size_t)dblock->size; - else - size = H5FA_DBLOCK_PREFIX_SIZE(dblock); + /* Set the image length size */ + if(!dblock->npages) + *image_len = (size_t)dblock->size; + else + *image_len = H5FA_DBLOCK_PREFIX_SIZE(dblock); - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") +END_FUNC(STATIC) /* end H5FA__cache_dblock_image_len() */ - /* Get temporary pointer to serialized info */ - p = buf; + +/*------------------------------------------------------------------------- + * Function: H5FA__cache_dblock_serialize + * + * Purpose: Flushes a dirty object to disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(STATIC, ERR, +herr_t, SUCCEED, FAIL, +H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) - /* Magic number */ - HDmemcpy(p, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + /* Local variables */ + H5FA_dblock_t *dblock = (H5FA_dblock_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ - /* Version # */ - *p++ = H5FA_DBLOCK_VERSION; + /* Check arguments */ + HDassert(f); + HDassert(image); + HDassert(dblock); + HDassert(dblock->hdr); - /* Fixed array type */ - *p++ = dblock->hdr->cparam.cls->id; + /* Magic number */ + HDmemcpy(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Address of array header for array which owns this block */ - H5F_addr_encode(f, &p, dblock->hdr->addr); + /* Version # */ + *image++ = H5FA_DBLOCK_VERSION; - /* Page init flags */ - if(dblock->npages > 0) { - /* Store the 'page init' bitmasks */ - HDmemcpy(p, dblock->dblk_page_init, dblock->dblk_page_init_size); - p += dblock->dblk_page_init_size; - } /* end if */ + /* Fixed array type */ + *image++ = dblock->hdr->cparam.cls->id; - /* Only encode elements if the data block is not paged */ - if(!dblock->npages) { - /* Encode elements in data block */ + /* Address of array header for array which owns this block */ + H5F_addr_encode(f, &image, dblock->hdr->addr); - /* Convert from native elements in memory into raw elements on disk */ - H5_CHECK_OVERFLOW(dblock->hdr->cparam.nelmts, /* From: */hsize_t, /* To: */size_t); - if((dblock->hdr->cparam.cls->encode)(p, dblock->elmts, (size_t)dblock->hdr->cparam.nelmts, dblock->hdr->cb_ctx) < 0) - H5E_THROW(H5E_CANTENCODE, "can't encode fixed array data elements") - p += (dblock->hdr->cparam.nelmts * dblock->hdr->cparam.raw_elmt_size); - } /* end if */ + /* Page init flags */ + if(dblock->npages > 0) { + /* Store the 'page init' bitmasks */ + HDmemcpy(image, dblock->dblk_page_init, dblock->dblk_page_init_size); + image += dblock->dblk_page_init_size; + } /* end if */ - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + /* Only encode elements if the data block is not paged */ + if(!dblock->npages) { + /* Encode elements in data block */ - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* Convert from native elements in memory into raw elements on disk */ + H5_CHECK_OVERFLOW(dblock->hdr->cparam.nelmts, /* From: */hsize_t, /* To: */size_t); + if((dblock->hdr->cparam.cls->encode)(image, dblock->elmts, (size_t)dblock->hdr->cparam.nelmts, dblock->hdr->cb_ctx) < 0) + H5E_THROW(H5E_CANTENCODE, "can't encode fixed array data elements") + image += (dblock->hdr->cparam.nelmts * dblock->hdr->cparam.raw_elmt_size); + } /* end if */ - /* Write the data block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_FARRAY_DBLOCK, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save fixed array data block to disk") + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); - dblock->cache_info.is_dirty = FALSE; - } /* end if */ + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - if(destroy) - if(H5FA__cache_dblock_dest(f, dblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block") + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); CATCH - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") - -END_FUNC(STATIC) /* end H5FA__cache_dblock_flush() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_serialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblock_clear + * Function: H5FA__cache_dblock_free_icr * - * Purpose: Mark a fixed array data block in memory as non-dirty. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5FA__cache_dblock_clear(H5F_t *f, H5FA_dblock_t *dblock, hbool_t destroy)) +H5FA__cache_dblock_free_icr(void *_thing)) - /* Sanity check */ - HDassert(dblock); + H5FA_dblock_t *dblock = (H5FA_dblock_t *)_thing; /* Pointer to the object */ - /* Reset the dirty flag */ - dblock->cache_info.is_dirty = FALSE; + /* Check arguments */ + HDassert(dblock); - if(destroy) - if(H5FA__cache_dblock_dest(f, dblock) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block") + /* Release the fixed array data block */ + if(H5FA__dblock_dest(dblock) < 0) + H5E_THROW(H5E_CANTFREE, "can't free fixed array data block") CATCH -END_FUNC(STATIC) /* end H5FA__cache_dblock_clear() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblock_size - * - * Purpose: Compute the size in bytes of a fixed array data block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. - * + * Function: H5FA__cache_dblock_fsf_size + * + * Purpose: Tell the metadata cache the actual amount of file space + * to free when a dblock entry is destroyed with the free + * file space block set. + * + * This function is needed when the data block is paged, as + * the datablock header and all its pages are allocted as a + * single contiguous chunk of file space, and must be + * deallocated the same way. + * + * The size of the chunk of memory in which the dblock + * header and all its pages is stored in the size field, + * so we simply pass that value back to the cache. + * + * If the datablock is not paged, then the size field of + * the cache_info contains the correct size. However this + * value will be the same as the size field, so we return + * the contents of the size field to the cache in this case + * as well. + * * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: John Mainzer + * 12/5/14 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, -H5FA__cache_dblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5FA_dblock_t *dblock, - size_t *size_ptr)) +H5FA__cache_dblock_fsf_size(const void *_thing, size_t *fsf_size)) - /* Sanity check */ - HDassert(f); + const H5FA_dblock_t *dblock = (const H5FA_dblock_t *)_thing; /* Pointer to the object */ + + /* Check arguments */ HDassert(dblock); - HDassert(size_ptr); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FARRAY_DBLOCK); + HDassert(fsf_size); - /* Set size value */ - if(!dblock->npages) - *size_ptr = (size_t)dblock->size; - else - *size_ptr = H5FA_DBLOCK_PREFIX_SIZE(dblock); + *fsf_size = dblock->size; -END_FUNC(STATIC) /* end H5FA__cache_dblock_size() */ +END_FUNC(STATIC) /* end H5FA__cache_dblock_fsf_size() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblock_dest + * Function: H5FA__cache_dblk_page_get_load_size * - * Purpose: Destroys a fixed array data block in memory. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5FA__cache_dblock_dest(H5F_t *f, H5FA_dblock_t *dblock)) - - /* Sanity check */ - HDassert(f); - HDassert(dblock); - - /* Verify that data block is clean */ - HDassert(dblock->cache_info.is_dirty == FALSE); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!dblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblock->cache_info.addr)); - - /* Check for freeing file space for fixed array data block */ - if(dblock->cache_info.free_file_space_on_destroy) { - /* Sanity check address */ - HDassert(H5F_addr_eq(dblock->addr, dblock->cache_info.addr)); +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_dblk_page_get_load_size(const void *_udata, size_t *image_len)) - /* Release the space on disk */ - /* (Includes space for pages!) */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FARRAY_DBLOCK, H5AC_dxpl_id, dblock->cache_info.addr, (hsize_t)dblock->size) < 0) - H5E_THROW(H5E_CANTFREE, "unable to free fixed array data block") - } /* end if */ + /* Local variables */ + const H5FA_dblk_page_cache_ud_t *udata = (const H5FA_dblk_page_cache_ud_t *)_udata; /* User data */ - /* Release the data block */ - if(H5FA__dblock_dest(dblock) < 0) - H5E_THROW(H5E_CANTFREE, "can't free fixed array data block") + /* Check arguments */ + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->nelmts > 0); + HDassert(image_len); -CATCH + *image_len = (size_t)H5FA_DBLK_PAGE_SIZE(udata->hdr, udata->nelmts); -END_FUNC(STATIC) /* end H5FA__cache_dblock_dest() */ +END_FUNC(STATIC) /* end H5FA__cache_dblk_page_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblk_page_load + * Function: H5FA__cache_dblk_page_deserialize * - * Purpose: Loads a fixed array data block page from the disk. + * Purpose: Loads a data structure from the disk. * - * Return: Success: Pointer to a new fixed array data block page + * Return: Success: Pointer to a new B-tree. * Failure: NULL * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, -H5FA_dblk_page_t *, NULL, NULL, -H5FA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) +void *, NULL, NULL, +H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ H5FA_dblk_page_t *dblk_page = NULL; /* Data block page info */ H5FA_dblk_page_cache_ud_t *udata = (H5FA_dblk_page_cache_ud_t *)_udata; /* User data for loading data block page */ - size_t size; /* Data block page size */ - H5WB_t *wb = NULL; /* Wrapped buffer for data block page data */ - uint8_t dblk_page_buf[H5FA_DBLK_PAGE_BUF_SIZE]; /* Buffer for data block page */ - uint8_t *buf; /* Pointer to data block page buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata && udata->hdr && udata->nelmts > 0); + HDassert(udata); + HDassert(udata->hdr); + HDassert(udata->nelmts > 0); + HDassert(H5F_addr_defined(udata->dblk_page_addr)); /* Allocate the fixed array data block page */ if(NULL == (dblk_page = H5FA__dblk_page_alloc(udata->hdr, udata->nelmts))) H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block page") /* Set the fixed array data block's information */ - dblk_page->addr = addr; - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(dblk_page_buf, sizeof(dblk_page_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the fixed array data block page on disk */ - size = H5FA_DBLK_PAGE_SIZE(udata->hdr, udata->nelmts); - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Read data block page from disk */ - if(H5F_block_read(f, H5FD_MEM_FARRAY_DBLK_PAGE, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_READERROR, "can't read fixed array data block page") - - /* Get temporary pointer to serialized header */ - p = buf; + dblk_page->addr = udata->dblk_page_addr; /* Internal information */ /* Decode elements in data block page */ /* Convert from raw elements on disk into native elements in memory */ - if((udata->hdr->cparam.cls->decode)(p, dblk_page->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) + if((udata->hdr->cparam.cls->decode)(image, dblk_page->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) H5E_THROW(H5E_CANTDECODE, "can't decode fixed array data elements") - p += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); + image += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - buf) == (size - H5FA_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM)); /* Set the data block page's size */ - dblk_page->size = size; + dblk_page->size = len; /* Compute checksum on data block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) == dblk_page->size); + HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -930,192 +893,122 @@ H5FA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) CATCH /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") if(!ret_value) if(dblk_page && H5FA__dblk_page_dest(dblk_page) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block page") -END_FUNC(STATIC) /* end H5FA__cache_dblk_page_load() */ +END_FUNC(STATIC) /* end H5FA__cache_dblk_page_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblk_page_flush + * Function: H5FA__cache_dblk_page_image_len * - * Purpose: Flushes a dirty fixed array data block page to disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, ERR, -herr_t, SUCCEED, FAIL, -H5FA__cache_dblk_page_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5FA_dblk_page_t *dblk_page, unsigned H5_ATTR_UNUSED * flags_ptr)) +BEGIN_FUNC(STATIC, NOERR, +herr_t, SUCCEED, -, +H5FA__cache_dblk_page_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr)) /* Local variables */ - H5WB_t *wb = NULL; /* Wrapped buffer for serializing data */ - uint8_t ser_buf[H5FA_DBLK_PAGE_BUF_SIZE]; /* Serialization buffer */ + const H5FA_dblk_page_t *dblk_page = (const H5FA_dblk_page_t *)_thing; /* Pointer to the object */ - /* Sanity check */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(dblk_page); - HDassert(dblk_page->hdr); - - if(dblk_page->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Index block size on disk */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - - /* Wrap the local buffer for serialized info */ - if(NULL == (wb = H5WB_wrap(ser_buf, sizeof(ser_buf)))) - H5E_THROW(H5E_CANTINIT, "can't wrap buffer") - - /* Compute the size of the data block on disk */ - size = dblk_page->size; - - /* Get a pointer to a buffer that's large enough for serialized info */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - H5E_THROW(H5E_CANTGET, "can't get actual buffer") - - /* Get temporary pointer to serialized info */ - p = buf; - - /* Internal information */ - - /* Encode elements in data block page */ - - /* Convert from native elements in memory into raw elements on disk */ - if((dblk_page->hdr->cparam.cls->encode)(p, dblk_page->elmts, dblk_page->nelmts, dblk_page->hdr->cb_ctx) < 0) - H5E_THROW(H5E_CANTENCODE, "can't encode fixed array data elements") - p += (dblk_page->nelmts * dblk_page->hdr->cparam.raw_elmt_size); - - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Write the data block */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_FARRAY_DBLK_PAGE, addr, size, dxpl_id, buf) < 0) - H5E_THROW(H5E_WRITEERROR, "unable to save fixed array data block page to disk") - - dblk_page->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5FA__cache_dblk_page_dest(f, dblk_page) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block page") + HDassert(image_len); -CATCH - - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer") + /* Set the image length size */ + *image_len = dblk_page->size; -END_FUNC(STATIC) /* end H5FA__cache_dblk_page_flush() */ +END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblk_page_clear + * Function: H5FA__cache_dblk_page_serialize * - * Purpose: Mark a fixed array data block page in memory as non-dirty. + * Purpose: Flushes a dirty object to disk. * * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5FA__cache_dblk_page_clear(H5F_t *f, H5FA_dblk_page_t *dblk_page, hbool_t destroy)) +H5FA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing)) + + /* Local variables */ + H5FA_dblk_page_t *dblk_page = (H5FA_dblk_page_t *)_thing; /* Pointer to the object to serialize */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ /* Sanity check */ + HDassert(f); + HDassert(image); HDassert(dblk_page); + HDassert(dblk_page->hdr); - /* Reset the dirty flag */ - dblk_page->cache_info.is_dirty = FALSE; + /* Internal information */ - if(destroy) - if(H5FA__cache_dblk_page_dest(f, dblk_page) < 0) - H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block page") + /* Encode elements in data block page */ -CATCH + /* Convert from native elements in memory into raw elements on disk */ + if((dblk_page->hdr->cparam.cls->encode)(image, dblk_page->elmts, dblk_page->nelmts, dblk_page->hdr->cb_ctx) < 0) + H5E_THROW(H5E_CANTENCODE, "can't encode fixed array data elements") + image += (dblk_page->nelmts * dblk_page->hdr->cparam.raw_elmt_size); -END_FUNC(STATIC) /* end H5FA__cache_dblk_page_clear() */ + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); - -/*------------------------------------------------------------------------- - * Function: H5FA__cache_dblk_page_size - * - * Purpose: Compute the size in bytes of a fixed array data block page - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 - * - *------------------------------------------------------------------------- - */ -/* ARGSUSED */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, -H5FA__cache_dblk_page_size(const H5F_t H5_ATTR_UNUSED *f, const H5FA_dblk_page_t *dblk_page, - size_t *size_ptr)) + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert(f); - HDassert(dblk_page); - HDassert(size_ptr); + HDassert((size_t)(image - (uint8_t *)_image) <= len); - /* Set size value */ - *size_ptr = dblk_page->size; +CATCH -END_FUNC(STATIC) /* end H5FA__cache_dblk_page_size() */ +END_FUNC(STATIC) /* end H5FA__cache_dblk_page_serialize() */ /*------------------------------------------------------------------------- - * Function: H5FA__cache_dblk_page_dest - * - * Purpose: Destroys a fixed array data block page in memory. + * Function: H5FA__cache_dblk_page_free_icr * - * Note: Does _not_ free the space for the page on disk, that is - * handled through the data block that "owns" the page. + * Purpose: Destroy/release an "in core representation" of a data + * structure * * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi - * Thursday, April 30, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5FA__cache_dblk_page_dest(H5F_t H5_ATTR_UNUSED *f, H5FA_dblk_page_t *dblk_page)) +H5FA__cache_dblk_page_free_icr(void *thing)) - /* Sanity check */ - HDassert(f); - HDassert(dblk_page); - - /* Verify that data block page is clean */ - HDassert(dblk_page->cache_info.is_dirty == FALSE); + /* Check arguments */ + HDassert(thing); - /* Release the data block page */ - if(H5FA__dblk_page_dest(dblk_page) < 0) + /* Release the fixed array data block page */ + if(H5FA__dblk_page_dest((H5FA_dblk_page_t *)thing) < 0) H5E_THROW(H5E_CANTFREE, "can't free fixed array data block page") CATCH -END_FUNC(STATIC) /* end H5FA__cache_dblk_page_dest() */ +END_FUNC(STATIC) /* end H5FA__cache_dblk_page_free_icr() */ diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index d5239d3..6a84fc9 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -117,7 +117,7 @@ H5FA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, } /* end if */ /* Load the fixed array header */ - if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header") /* Print opening message */ @@ -198,11 +198,11 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde } /* end if */ /* Load the fixed array header */ - if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ))) + if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header") /* Protect data block */ - if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, addr, H5AC_READ))) + if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, addr, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)addr) /* Print opening message */ @@ -246,7 +246,7 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde if(((page_idx + 1) == dblock->npages) && (nelmts_left = hdr->cparam.nelmts % dblock->dblk_page_nelmts)) dblk_page_nelmts = (size_t)nelmts_left; - if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC_READ))) + if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC__READ_ONLY_FLAG))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) HDfprintf(stream, "%*sElements in page %Zu:\n", indent, "", page_idx); diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 1f6b706..e1ea3ac 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -207,7 +207,7 @@ END_FUNC(PKG) /* end H5FA__dblk_page_create() */ BEGIN_FUNC(PKG, ERR, H5FA_dblk_page_t *, NULL, NULL, H5FA__dblk_page_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_page_addr, - size_t dblk_page_nelmts, H5AC_protect_t rw)) + size_t dblk_page_nelmts, unsigned flags)) /* Local variables */ H5FA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */ @@ -220,12 +220,16 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(hdr); HDassert(H5F_addr_defined(dblk_page_addr)); + /* only the H5AC__READ_ONLY_FLAG is permitted */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data */ udata.hdr = hdr; udata.nelmts = dblk_page_nelmts; + udata.dblk_page_addr = dblk_page_addr; /* Protect the data block page */ - if(NULL == (ret_value = (H5FA_dblk_page_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page_addr, &udata, rw))) + if(NULL == (ret_value = (H5FA_dblk_page_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) CATCH diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c index e6e0e74..42dafeb 100644 --- a/src/H5FAdblock.c +++ b/src/H5FAdblock.c @@ -263,7 +263,7 @@ END_FUNC(PKG) /* end H5FA__dblock_create() */ BEGIN_FUNC(PKG, ERR, H5FA_dblock_t *, NULL, NULL, H5FA__dblock_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr, - H5AC_protect_t rw)) + unsigned flags)) /* Local variables */ H5FA_dblock_cache_ud_t udata; /* Information needed for loading data block */ @@ -276,11 +276,15 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(hdr); HDassert(H5F_addr_defined(dblk_addr)); + /* only the H5AC__READ_ONLY_FLAG flag is permitted */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up user data */ udata.hdr = hdr; + udata.dblk_addr = dblk_addr; /* Protect the data block */ - if(NULL == (ret_value = (H5FA_dblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblk_addr, &udata, rw))) + if(NULL == (ret_value = (H5FA_dblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblk_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)dblk_addr) CATCH @@ -350,7 +354,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); HDassert(H5F_addr_defined(dblk_addr)); /* Protect data block */ - if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, dblk_addr, H5AC_WRITE))) + if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, dblk_addr, H5AC__NO_FLAGS_SET))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)dblk_addr) /* Check if data block is paged */ diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 23c20bc..9083a52 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -408,16 +408,25 @@ END_FUNC(PKG) /* end H5FA__hdr_modified() */ BEGIN_FUNC(PKG, ERR, H5FA_hdr_t *, NULL, NULL, H5FA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata, - H5AC_protect_t rw)) + unsigned flags)) /* Local variables */ + H5FA_hdr_cache_ud_t udata; /* User data for cache callbacks */ /* Sanity check */ HDassert(f); HDassert(H5F_addr_defined(fa_addr)); + /* only the H5AC__READ_ONLY_FLAG is permitted */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + + /* Set up user data for cache callbacks */ + udata.f = f; + udata.addr = fa_addr; + udata.ctx_udata = ctx_udata; + /* Protect the header */ - if(NULL == (ret_value = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, ctx_udata, rw))) + if(NULL == (ret_value = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, &udata, flags))) H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array header, address = %llu", (unsigned long long)fa_addr) CATCH diff --git a/src/H5FApkg.h b/src/H5FApkg.h index e7993a6..bed9c83 100644 --- a/src/H5FApkg.h +++ b/src/H5FApkg.h @@ -206,15 +206,24 @@ struct H5FA_t { /* Metadata cache callback user data types */ +/* Info needed for loading header */ +typedef struct H5FA_hdr_cache_ud_t { + H5F_t *f; /* Pointer to file for fixed array */ + haddr_t addr; /* Address of header on disk */ + void *ctx_udata; /* User context for class */ +} H5FA_hdr_cache_ud_t; + /* Info needed for loading data block */ typedef struct H5FA_dblock_cache_ud_t { H5FA_hdr_t *hdr; /* Shared fixed array information */ + haddr_t dblk_addr; /* Address of data block on disk */ } H5FA_dblock_cache_ud_t; /* Info needed for loading data block page */ typedef struct H5FA_dblk_page_cache_ud_t { H5FA_hdr_t *hdr; /* Shared fixed array information */ size_t nelmts; /* Number of elements in data block page */ + haddr_t dblk_page_addr; /* Address of data block page on disk */ } H5FA_dblk_page_cache_ud_t; @@ -254,7 +263,7 @@ H5_DLL herr_t H5FA__hdr_fuse_incr(H5FA_hdr_t *hdr); H5_DLL size_t H5FA__hdr_fuse_decr(H5FA_hdr_t *hdr); H5_DLL herr_t H5FA__hdr_modified(H5FA_hdr_t *hdr); H5_DLL H5FA_hdr_t *H5FA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, - void *ctx_udata, H5AC_protect_t rw); + void *ctx_udata, unsigned flags); H5_DLL herr_t H5FA__hdr_unprotect(H5FA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5FA__hdr_delete(H5FA_hdr_t *hdr, hid_t dxpl_id); H5_DLL herr_t H5FA__hdr_dest(H5FA_hdr_t *hdr); @@ -264,7 +273,7 @@ H5_DLL H5FA_dblock_t *H5FA__dblock_alloc(H5FA_hdr_t *hdr); H5_DLL haddr_t H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty); H5_DLL unsigned H5FA__dblock_sblk_idx(const H5FA_hdr_t *hdr, hsize_t idx); H5_DLL H5FA_dblock_t *H5FA__dblock_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, - haddr_t dblk_addr, H5AC_protect_t rw); + haddr_t dblk_addr, unsigned flags); H5_DLL herr_t H5FA__dblock_unprotect(H5FA_dblock_t *dblock, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id, @@ -276,7 +285,7 @@ H5_DLL herr_t H5FA__dblk_page_create(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, size_t nelmts); H5_DLL H5FA_dblk_page_t *H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts); H5_DLL H5FA_dblk_page_t *H5FA__dblk_page_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, - haddr_t dblk_page_addr, size_t dblk_page_nelmts, H5AC_protect_t rw); + haddr_t dblk_page_addr, size_t dblk_page_nelmts, unsigned flags); H5_DLL herr_t H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, hid_t dxpl_id, unsigned cache_flags); H5_DLL herr_t H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page); diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index d993ad0..9edbc72 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -905,7 +905,7 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */) /* Check for flags that are set by h5repart */ if(file && file->repart_members) - *flags |= H5FD_FEAT_DIRTY_SBLK_LOAD; /* Mark the superblock dirty when it is loaded (so the family member sizes are rewritten) */ + *flags |= H5FD_FEAT_DIRTY_DRVRINFO_LOAD; /* Mark the superblock dirty when it is loaded (so the family member sizes are rewritten) */ } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index df5d5cf..58066cc 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -198,12 +198,12 @@ typedef enum H5F_mem_t H5FD_mem_t; */ #define H5FD_FEAT_IGNORE_DRVRINFO 0x00000020 /* - * Defining the H5FD_FEAT_DIRTY_SBLK_LOAD for a VFL driver means that - * the library will mark the superblock dirty when the file is opened + * Defining the H5FD_FEAT_DIRTY_DRVRINFO_LOAD for a VFL driver means that + * the library will mark the driver info dirty when the file is opened * R/W. This will cause the driver info to be re-encoded when the file * is flushed/closed. */ -#define H5FD_FEAT_DIRTY_SBLK_LOAD 0x00000040 +#define H5FD_FEAT_DIRTY_DRVRINFO_LOAD 0x00000040 /* * Defining the H5FD_FEAT_POSIX_COMPAT_HANDLE for a VFL driver means that * the handle for the VFD (returned with the 'get_handle' callback) is diff --git a/src/H5FS.c b/src/H5FS.c index 42ea070..182ac05 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -216,7 +216,7 @@ HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\ cache_udata.addr = fs_addr; /* Protect the free space header */ - if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ))) + if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header") #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr); @@ -329,7 +329,7 @@ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_ad #endif /* H5FS_DEBUG */ /* Protect the free space header */ - if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_WRITE))) + if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header") /* Sanity check */ @@ -361,8 +361,19 @@ HDfprintf(stderr, "%s: Expunging free space section info from cache\n", FUNC); #endif /* H5FS_DEBUG */ /* Evict the free space section info from the metadata cache */ /* (Free file space) */ - if(H5AC_expunge_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove free space section info from cache") + { + unsigned cache_flags = H5AC__NO_FLAGS_SET; + + /* if the indirect block is in real file space, tell + * the cache to free its file space. + */ + if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)) + cache_flags |= H5AC__FREE_FILE_SPACE_FLAG; + + if(H5AC_expunge_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, cache_flags) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove free space section info from cache") + } + #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC); #endif /* H5FS_DEBUG */ @@ -938,7 +949,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) cache_udata.f = f; cache_udata.dxpl_id = dxpl_id; cache_udata.fspace = fspace; - if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC_READ))) + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info") /* Unload and release ownership of the free-space manager section info */ @@ -979,7 +990,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) cache_udata.nclasses = 0; cache_udata.classes = NULL; cache_udata.cls_init_udata = NULL; - if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, &cache_udata, H5AC_READ))) + if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info") /* Unpin the free-space manager header */ diff --git a/src/H5FScache.c b/src/H5FScache.c index 461af99..25a9c5e 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -49,9 +49,6 @@ #define H5FS_HDR_VERSION 0 /* Header */ #define H5FS_SINFO_VERSION 0 /* Serialized sections */ -/* Size of stack buffer for serialized headers */ -#define H5FS_HDR_BUF_SIZE 256 - /******************/ /* Local Typedefs */ @@ -60,7 +57,7 @@ /* User data for skip list iterator callback for iterating over section size nodes when syncing */ typedef struct { H5FS_sinfo_t *sinfo; /* Free space section info */ - uint8_t **p; /* Pointer to address of buffer pointer to serialize with */ + uint8_t **image; /* Pointer to address of buffer pointer to serialize with */ unsigned sect_cnt_size; /* # of bytes to encode section size counts in */ } H5FS_iter_ud_t; @@ -75,20 +72,35 @@ typedef struct { /********************/ /* Section info routines */ -static herr_t H5FS_sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata); -static herr_t H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata); +static herr_t H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata); +static herr_t H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata); /* Metadata cache callbacks */ -static H5FS_t *H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace); -static herr_t H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy); -static herr_t H5FS_cache_hdr_size(const H5F_t *f, const H5FS_t *fspace, size_t *size_ptr); -static H5FS_sinfo_t *H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_sinfo_t *sinfo, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo); -static herr_t H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy); -static herr_t H5FS_cache_sinfo_size(const H5F_t *f, const H5FS_sinfo_t *sinfo, size_t *size_ptr); +static herr_t H5FS__cache_hdr_get_load_size(const void *udata, size_t *image_len); +static void *H5FS__cache_hdr_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5FS__cache_hdr_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr, size_t *new_len, size_t *new_compressed_len, + unsigned *flags); +static herr_t H5FS__cache_hdr_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5FS__cache_hdr_free_icr(void *thing); + +static herr_t H5FS__cache_sinfo_get_load_size(const void *udata, size_t *image_len); +static void *H5FS__cache_sinfo_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5FS__cache_sinfo_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5FS__cache_sinfo_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr, size_t *new_len, size_t *new_compressed_len, + unsigned *flags); +static herr_t H5FS__cache_sinfo_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5FS__cache_sinfo_free_icr(void *thing); /*********************/ @@ -97,24 +109,36 @@ static herr_t H5FS_cache_sinfo_size(const H5F_t *f, const H5FS_sinfo_t *sinfo, s /* H5FS header inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FSPACE_HDR[1] = {{ - H5AC_FSPACE_HDR_ID, - (H5AC_load_func_t)H5FS_cache_hdr_load, - (H5AC_flush_func_t)H5FS_cache_hdr_flush, - (H5AC_dest_func_t)H5FS_cache_hdr_dest, - (H5AC_clear_func_t)H5FS_cache_hdr_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5FS_cache_hdr_size, + H5AC_FSPACE_HDR_ID, /* Metadata client ID */ + "Free Space Header", /* Metadata client name (for debugging) */ + H5FD_MEM_FSPACE_HDR, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5FS__cache_hdr_get_load_size, /* 'get_load_size' callback */ + H5FS__cache_hdr_deserialize, /* 'deserialize' callback */ + H5FS__cache_hdr_image_len, /* 'image_len' callback */ + H5FS__cache_hdr_pre_serialize, /* 'pre_serialize' callback */ + H5FS__cache_hdr_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5FS__cache_hdr_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; -/* H5FS serialized sections inherit cache-like properties from H5AC */ +/* H5FS section info inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FSPACE_SINFO[1] = {{ - H5AC_FSPACE_SINFO_ID, - (H5AC_load_func_t)H5FS_cache_sinfo_load, - (H5AC_flush_func_t)H5FS_cache_sinfo_flush, - (H5AC_dest_func_t)H5FS_cache_sinfo_dest, - (H5AC_clear_func_t)H5FS_cache_sinfo_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5FS_cache_sinfo_size, + H5AC_FSPACE_SINFO_ID, /* Metadata client ID */ + "Free Space Section Info", /* Metadata client name (for debugging) */ + H5FD_MEM_FSPACE_SINFO, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5FS__cache_sinfo_get_load_size, /* 'get_load_size' callback */ + H5FS__cache_sinfo_deserialize, /* 'deserialize' callback */ + H5FS__cache_sinfo_image_len, /* 'image_len' callback */ + H5FS__cache_sinfo_pre_serialize, /* 'pre_serialize' callback */ + H5FS__cache_sinfo_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5FS__cache_sinfo_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -127,44 +151,73 @@ const H5AC_class_t H5AC_FSPACE_SINFO[1] = {{ /* Local Variables */ /*******************/ -/* Declare a free list to manage free space section data to/from disk */ -H5FL_BLK_DEFINE_STATIC(sect_block); - /*------------------------------------------------------------------------- - * Function: H5FS_cache_hdr_load + * Function: H5FS__cache_hdr_get_load_size * - * Purpose: Loads a free space manager header from the disk. + * Purpose: Compute the size of the data structure on disk. * - * Return: Success: Pointer to a new free space header - * Failure: NULL + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 2 2006 + * koziol@hdfgroup.org + * August 14, 2013 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5FS__cache_hdr_get_load_size(const void *_udata, size_t *image_len) +{ + const H5FS_hdr_cache_ud_t *udata = (const H5FS_hdr_cache_ud_t *)_udata; /* User-data for metadata cache callback */ + + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(image_len); + + /* Set the image length size */ + *image_len = (size_t)H5FS_HEADER_SIZE(udata->f); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5FS__cache_hdr_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5FS__cache_hdr_deserialize + * + * Purpose: Given a buffer containing the on disk image of the free space + * manager section info, allocate an instance of H5FS_t, load + * it with the data contained in the image, and return a pointer + * to the new instance. + * + * Return: Success: Pointer to new object + * Failure: NULL + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 18 2013 * *------------------------------------------------------------------------- */ -static H5FS_t * -H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5FS__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { H5FS_t *fspace = NULL; /* Free space header info */ - H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* user data for callback */ - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */ - uint8_t *hdr; /* Pointer to header buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5FS_hdr_cache_ud_t *udata = (H5FS_hdr_cache_ud_t *)_udata; /* User data for callback */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ unsigned nclasses; /* Number of section classes */ H5FS_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); + HDassert(image); HDassert(udata); + HDassert(udata->f); /* Allocate a new free space manager */ if(NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata))) @@ -173,80 +226,69 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Set free space manager's internal information */ fspace->addr = udata->addr; - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for header */ - if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space header") - - p = hdr; - /* Magic number */ - if(HDmemcmp(p, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5FS_HDR_VERSION) + if(*image++ != H5FS_HDR_VERSION) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version") /* Client ID */ - fspace->client = (H5FS_client_t)*p++; + fspace->client = (H5FS_client_t)*image++; if(fspace->client >= H5FS_NUM_CLIENT_ID) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header") /* Total space tracked */ - H5F_DECODE_LENGTH(udata->f, p, fspace->tot_space); + H5F_DECODE_LENGTH(udata->f, image, fspace->tot_space); /* Total # of free space sections tracked */ - H5F_DECODE_LENGTH(udata->f, p, fspace->tot_sect_count); + H5F_DECODE_LENGTH(udata->f, image, fspace->tot_sect_count); /* # of serializable free space sections tracked */ - H5F_DECODE_LENGTH(udata->f, p, fspace->serial_sect_count); + H5F_DECODE_LENGTH(udata->f, image, fspace->serial_sect_count); /* # of ghost free space sections tracked */ - H5F_DECODE_LENGTH(udata->f, p, fspace->ghost_sect_count); + H5F_DECODE_LENGTH(udata->f, image, fspace->ghost_sect_count); /* # of section classes */ /* (only check if we actually have some classes) */ - UINT16DECODE(p, nclasses); + UINT16DECODE(image, nclasses); if(fspace->nclasses > 0 && fspace->nclasses != nclasses) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch") /* Shrink percent */ - UINT16DECODE(p, fspace->shrink_percent); + UINT16DECODE(image, fspace->shrink_percent); /* Expand percent */ - UINT16DECODE(p, fspace->expand_percent); + UINT16DECODE(image, fspace->expand_percent); - /* Size of address space free space sections are within (log2 of actual value) */ - UINT16DECODE(p, fspace->max_sect_addr); + /* Size of address space free space sections are within + * (log2 of actual value) + */ + UINT16DECODE(image, fspace->max_sect_addr); /* Max. size of section to track */ - H5F_DECODE_LENGTH(udata->f, p, fspace->max_sect_size); + H5F_DECODE_LENGTH(udata->f, image, fspace->max_sect_size); /* Address of serialized free space sections */ - H5F_addr_decode(udata->f, &p, &fspace->sect_addr); + H5F_addr_decode(udata->f, &image, &fspace->sect_addr); /* Size of serialized free space sections */ - H5F_DECODE_LENGTH(udata->f, p, fspace->sect_size); + H5F_DECODE_LENGTH(udata->f, image, fspace->sect_size); /* Allocated size of serialized free space sections */ - H5F_DECODE_LENGTH(udata->f, p, fspace->alloc_sect_size); + H5F_DECODE_LENGTH(udata->f, image, fspace->alloc_sect_size); /* Compute checksum on indirect block */ - computed_chksum = H5_checksum_metadata(hdr, (size_t)(p - (const uint8_t *)hdr), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); - HDassert((size_t)(p - (const uint8_t *)hdr) == fspace->hdr_size); + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) <= len); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -257,177 +299,432 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) done: /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && fspace) if(H5FS__hdr_dest(fspace) < 0) HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5FS__cache_hdr_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_hdr_flush + * Function: H5FS__cache_hdr_image_len * - * Purpose: Flushes a dirty free space header to disk. + * Purpose: Compute the size of the data structure on disk and return + * it in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 2 2006 + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ static herr_t -H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_t *fspace, unsigned H5_ATTR_UNUSED * flags_ptr) +H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5FS_t *fspace = (const H5FS_t *)_thing; /* Pointer to the object */ + + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(fspace); + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(image_len); + + /* Set the image length size */ + *image_len = fspace->hdr_size; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5FS__cache_hdr_image_len() */ + + +/*------------------------------------------------------------------------- + * Function: H5FS__cache_hdf_pre_serialize + * + * Purpose: The free space manager header contains the address, size, and + * allocation size of the free space manager section info. However, + * since it is possible for the section info to either not be allocated + * at all, or be allocated in temporary (AKA imaginary) files space, + * it is possible for the above mentioned fields to contain giberish + * when the free space manager header is serialized. + * + * This function exists to prevent this problem. It does so by + * forcing allocation of real file space for the section information. + * + * Note that in the Version 2 cache, this problem was dealt with by + * simply flushing the section info before flushing the header. This + * was possible, since the clients handled file I/O directly. As + * this responsibility has moved to the cache in Version 3, this + * solution is no longer directly applicable. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, + haddr_t addr, size_t H5_ATTR_UNUSED len, size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr, size_t *new_len, size_t H5_ATTR_UNUSED *new_compressed_len, + unsigned *flags) +{ + H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) - /* check arguments */ + /* Sanity check */ HDassert(f); - HDassert(H5F_addr_defined(addr)); HDassert(fspace); - HDassert(H5F_addr_defined(fspace->addr)); + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(H5F_addr_defined(addr)); + HDassert(new_addr); + HDassert(new_len); + HDassert(flags); - /* Check if the header "owns" the section info */ if(fspace->sinfo) { - /* Sanity check - should not be trying to destroy header if it still - * "owns" section info + /* This implies that the header "owns" the section info. + * + * Unfortunately, the comments in the code are not clear as to + * what this means, but from reviewing the code (most particularly + * H5FS_close(), H5FS_sinfo_lock, and H5FS_sinfo_unlock()), I + * gather that it means that the header is maintaining a pointer to + * an instance of H5FS_sinfo_t in which free space data is + * maintained, and either: + * + * 1) The instance of H5FS_sinfo_t is not in the metadata cache. + * + * This will be TRUE iff H5F_addr_defined(fspace->sect_addr) + * is FALSE, and fspace->sinfo is not NULL. This is sometimes + * referred to as "floating" section info in the comments. + * + * If the section info structure contains free space data + * that must be placed on disk eventually, then + * + * fspace->serial_sect_count > 0 + * + * and + * + * H5F_addr_defined(fspace->addr) + * + * will both be TRUE. If this contition does not hold, then + * either the free space info is not persistant + * (!H5F_addr_defined(fspace->addr)???) or the section info + * contains no free space data that must be written to file + * ( fspace->serial_sect_count == 0 ). + * + * 2) The instance of H5FS_sinfo_t is in the metadata cache with + * address in temporary file space (AKA imaginary file space). + * The entry may or may not be protected, and if protected, it + * may be protected either RW or RO (as indicated by + * fspace->sinfo_protected and fspace->sinfo_accmod). + * + * 3) The instance of H5FS_sinfo_t is in the metadata cache with + * address in real file space. As in case 2) above, the entry + * may or may not be protected, and if protected, it + * may be protected either RW or RO (as indicated by + * fspace->sinfo_protected and fspace->sinfo_accmod). + * + * Observe that fspace->serial_sect_count > 0 must be TRUE in + * cases 2) and 3), as the section info should not be stored on + * disk if it doesn't exist. Similarly, since the section info + * will not be stored to disk unless the header is, + * H5F_addr_defined(fspace->addr) must hold as well. + * + * As the objective is to touch up the free space manager header + * so that it contains sensical data on the size and location of + * the section information, we have to handle each of the above + * cases differently. + * + * Case 1) If either fspace->serial_sect_count == 0 or + * ! H5F_addr_defined(fspace->addr) do nothing as either + * the free space manager data is not persistant, or the + * section info is empty. + * + * Otherwise, allocate space for the section info in real + * file space, insert the section info at this location, and + * set fspace->sect_addr, fspace->sect_size, and + * fspace->alloc_sect_size to reflect the new location + * of the section info. Note that it is not necessary to + * force a write of the section info. + * + * Case 2) Allocate space for the section info in real file space, + * and tell the metadata cache to relocate the entry. + * Update fspace->sect_addr, fspace->sect_size, and + * fspace->alloc_sect_size to reflect the new location. + * + * Case 3) Nothing to be done in this case, although it is useful + * to perform sanity checks. + * + * Note that while we may alter the contents of the free space + * header in cases 1) and 2), there is no need to mark the header + * as dirty, as the metadata cache would not be attempting to + * serialize the header if it though it was clean. */ - HDassert(!destroy); - - /* Check if the section info is dirty */ - if(fspace->sinfo->dirty) { - if(fspace->serial_sect_count > 0) { - /* Check if we need to allocate space for section info */ - if(H5F_IS_TMP_ADDR(f, fspace->sect_addr) || !H5F_addr_defined(fspace->sect_addr)) { - /* Sanity check */ - HDassert(fspace->sect_size > 0); - - /* Allocate space for the section info in file */ - if(HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") - fspace->alloc_sect_size = (size_t)fspace->sect_size; - - /* Mark header dirty */ - /* (don't use cache API, since we're in a callback) */ - fspace->cache_info.is_dirty = TRUE; - } /* end if */ - - /* Write section info to file */ - if(H5FS_cache_sinfo_flush(f, dxpl_id, FALSE, fspace->sect_addr, fspace->sinfo, NULL) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space section info to disk") + if(fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) { + /* Sanity check */ + HDassert(fspace->sect_size > 0); + + if(!H5F_addr_defined(fspace->sect_addr)) { /* case 1 */ + /* allocate file space for the section info, and insert it + * into the metadata cache. + */ + if(HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") + + fspace->alloc_sect_size = (size_t)fspace->sect_size; + if(H5AC_insert_entry((H5F_t *)f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") + + HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size); + + /* the metadata cache is now managing the section info, + * so set fspace->sinfo to NULL. + */ + fspace->sinfo = NULL; } /* end if */ - - /* Mark section info clean */ - fspace->sinfo->dirty = FALSE; - } /* end if */ + else if(H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { /* case 2 */ + haddr_t new_sect_addr; + + /* move the section info from temporary (AKA imaginary) file + * space to real file space. + */ + + /* if my reading of the code is correct, this should always + * be the case. If not, we will have to add code to resize + * file space allocation for section info as well as moving it. + */ + HDassert(fspace->sect_size > 0); + HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size); + + /* Allocate space for the section info in file */ + if(HADDR_UNDEF == (new_sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") + + fspace->alloc_sect_size = (size_t)fspace->sect_size; + HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size); + + /* Let the metadata cache know the section info moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move section info") + + fspace->sect_addr = new_sect_addr; + } /* end else-if */ + else { /* case 3 -- nothing to do but sanity checking */ + /* if my reading of the code is correct, this should always + * be the case. If not, we will have to add code to resize + * file space allocation for section info. + */ + HDassert(fspace->sect_size > 0); + HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size); + } /* end else */ + } /* end else */ + else { + /* for one reason or another (see comment above) there should + * not be any file space allocated for the section info. + */ + HDassert(!H5F_addr_defined(fspace->sect_addr)); + } /* end else */ } /* end if */ - else if(fspace->serial_sect_count > 0) - /* Sanity check that section info has address */ - HDassert(H5F_addr_defined(fspace->sect_addr)); + else if(H5F_addr_defined(fspace->sect_addr)) { + /* Here the metadata cache is managing the section info. + * + * Do some sanity checks, and then test to see if the section + * info is in real file space. If it isn't relocate it into + * real file space lest the header be written to file with + * a nonsense section info address. + */ + HDassert(fspace->serial_sect_count > 0); + HDassert(fspace->sect_size > 0); + HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size); + + if(H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { + unsigned sect_status = 0; + haddr_t new_sect_addr; + + /* we have work to do -- must relocate section info into + * real file space. + * + * Since the section info address is in temporary space (AKA + * imaginary space), it follows that the entry must be in + * cache. Further, since fspace->sinfo is NULL, it must be + * unprotected and un-pinned. Start by verifying this. + */ + if(H5AC_get_entry_status(f, fspace->sect_addr, §_status) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info status") + + HDassert(sect_status & H5AC_ES__IN_CACHE); + HDassert((sect_status & H5AC_ES__IS_PROTECTED) == 0); + HDassert((sect_status & H5AC_ES__IS_PINNED) == 0); - if(fspace->cache_info.is_dirty) { - uint8_t *hdr; /* Pointer to header buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ + /* Allocate space for the section info in file */ + if(HADDR_UNDEF == (new_sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't wrap buffer") + fspace->alloc_sect_size = (size_t)fspace->sect_size; - /* Get a pointer to a buffer that's large enough for header */ - if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, fspace->hdr_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "can't get actual buffer") + /* Sanity check */ + HDassert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr)); - /* Get temporary pointer to header */ - p = hdr; + /* Let the metadata cache know the section info moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info") - /* Magic number */ - HDmemcpy(p, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + /* Update the internal address for the section info */ + fspace->sect_addr = new_sect_addr; - /* Version # */ - *p++ = H5FS_HDR_VERSION; + /* No need to mark the header dirty, as we are about to + * serialize it. + */ + } /* end if */ + } /* end else-if */ + else { /* there is no section info at present */ + /* do some sanity checks */ + HDassert(fspace->serial_sect_count == 0); + HDassert(fspace->tot_sect_count == fspace->ghost_sect_count); + } /* end else */ - /* Client ID */ - *p++ = fspace->client; + /* what ever happened above, set *flags to 0 */ + *flags = 0; - /* Total space tracked */ - H5F_ENCODE_LENGTH(f, p, fspace->tot_space); +done: + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) +} /* end H5FS__cache_hdr_pre_serialize() */ - /* Total # of free space sections tracked */ - H5F_ENCODE_LENGTH(f, p, fspace->tot_sect_count); + +/*------------------------------------------------------------------------- + * Function: H5FS__cache_hdr_serialize + * + * Purpose: Given an instance of H5FS_t and a suitably sized buffer, + * serialize the contents of the instance of H5FS_t and write + * its contents to the buffer. This buffer will be used to + * write the image of the instance to file. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) +{ + H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + herr_t ret_value = SUCCEED; /* Return value */ - /* # of serializable free space sections tracked */ - H5F_ENCODE_LENGTH(f, p, fspace->serial_sect_count); + FUNC_ENTER_STATIC_NOERR - /* # of ghost free space sections tracked */ - H5F_ENCODE_LENGTH(f, p, fspace->ghost_sect_count); + /* Check arguments */ + HDassert(f); + HDassert(image); + HDassert(fspace); + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(fspace->hdr_size == len); + + /* The section information does not always exits, and if it does, + * it is not always in the cache. To make matters more interesting, + * even if it is in the cache, it may not be in real file space. + * + * The pre-serialize function should have moved the section info + * into real file space if necessary before this function was called. + * The following asserts are a cursory check on this. + */ + HDassert((! H5F_addr_defined(fspace->sect_addr)) || (! H5F_IS_TMP_ADDR(f, fspace->sect_addr))); + HDassert((! H5F_addr_defined(fspace->sect_addr)) || + ((fspace->serial_sect_count > 0) && + (fspace->sect_size > 0) && + (fspace->alloc_sect_size == (size_t)fspace->sect_size))); - /* # of section classes */ - UINT16ENCODE(p, fspace->nclasses); + /* Magic number */ + HDmemcpy(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Shrink percent */ - UINT16ENCODE(p, fspace->shrink_percent); + /* Version # */ + *image++ = H5FS_HDR_VERSION; - /* Expand percent */ - UINT16ENCODE(p, fspace->expand_percent); + /* Client ID */ + *image++ = fspace->client; - /* Size of address space free space sections are within (log2 of actual value) */ - UINT16ENCODE(p, fspace->max_sect_addr); + /* Total space tracked */ + H5F_ENCODE_LENGTH(f, image, fspace->tot_space); - /* Max. size of section to track */ - H5F_ENCODE_LENGTH(f, p, fspace->max_sect_size); + /* Total # of free space sections tracked */ + H5F_ENCODE_LENGTH(f, image, fspace->tot_sect_count); - /* Address of serialized free space sections */ - H5F_addr_encode(f, &p, fspace->sect_addr); + /* # of serializable free space sections tracked */ + H5F_ENCODE_LENGTH(f, image, fspace->serial_sect_count); - /* Size of serialized free space sections */ - H5F_ENCODE_LENGTH(f, p, fspace->sect_size); + /* # of ghost free space sections tracked */ + H5F_ENCODE_LENGTH(f, image, fspace->ghost_sect_count); - /* Allocated size of serialized free space sections */ - H5F_ENCODE_LENGTH(f, p, fspace->alloc_sect_size); + /* # of section classes */ + UINT16ENCODE(image, fspace->nclasses); - /* Compute checksum */ - metadata_chksum = H5_checksum_metadata(hdr, (size_t)(p - (uint8_t *)hdr), 0); + /* Shrink percent */ + UINT16ENCODE(image, fspace->shrink_percent); - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* Expand percent */ + UINT16ENCODE(image, fspace->expand_percent); - /* Write the free space header. */ - HDassert((size_t)(p - hdr) == fspace->hdr_size); - if(H5F_block_write(f, H5FD_MEM_FSPACE_HDR, addr, fspace->hdr_size, dxpl_id, hdr) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space header to disk") + /* Size of address space free space sections are within (log2 of + * actual value) + */ + UINT16ENCODE(image, fspace->max_sect_addr); - fspace->cache_info.is_dirty = FALSE; - } /* end if */ + /* Max. size of section to track */ + H5F_ENCODE_LENGTH(f, image, fspace->max_sect_size); - if(destroy) - if(H5FS_cache_hdr_dest(f, fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header") + /* Address of serialized free space sections */ + H5F_addr_encode(f, &image, fspace->sect_addr); -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") + /* Size of serialized free space sections */ + H5F_ENCODE_LENGTH(f, image, fspace->sect_size); + + /* Allocated size of serialized free space sections */ + H5F_ENCODE_LENGTH(f, image, fspace->alloc_sect_size); + + /* Compute checksum */ + metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* sanity checks */ + HDassert((size_t)(image - (uint8_t *)_image) == fspace->hdr_size); FUNC_LEAVE_NOAPI(ret_value) -} /* H5FS_cache_hdr_flush() */ +} /* H5FS__cache_hdr_serialize() */ + +/***************************************/ +/* no H5FS__cache_hdr_notify() function */ +/***************************************/ /*------------------------------------------------------------------------- - * Function: H5FS_cache_hdr_dest + * Function: H5FS__cache_hdr_free_icr * * Purpose: Destroys a free space header in memory. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). + * + * Return: Success: SUCCEED + * Failure: FAIL * * Programmer: Quincey Koziol * koziol@ncsa.uiuc.edu @@ -436,175 +733,133 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace) +H5FS__cache_hdr_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments */ + /* Sanity checks */ HDassert(fspace); + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); /* We should not still be holding on to the free space section info */ HDassert(!fspace->sinfo); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!fspace->cache_info.free_file_space_on_destroy || H5F_addr_defined(fspace->cache_info.addr)); - - /* Check for freeing file space for free space header */ - if(fspace->cache_info.free_file_space_on_destroy) { - /* Sanity check */ - HDassert(H5F_addr_defined(fspace->addr)); - - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, H5AC_dxpl_id, fspace->cache_info.addr, (hsize_t)fspace->hdr_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header") - } /* end if */ - /* Destroy free space header */ if(H5FS__hdr_dest(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_hdr_dest() */ +} /* end H5FS__cache_hdr_free_icr() */ - -/*------------------------------------------------------------------------- - * Function: H5FS_cache_hdr_clear - * - * Purpose: Mark a free space header in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 2 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* - * Check arguments. - */ - HDassert(fspace); - - /* Reset the dirty flag. */ - fspace->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5FS_cache_hdr_dest(f, fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_hdr_clear() */ +/********************************************************/ +/* metadata cache callback definitions for section info */ +/********************************************************/ /*------------------------------------------------------------------------- - * Function: H5FS_cache_hdr_size + * Function: H5FS__cache_sinfo_get_load_size() * - * Purpose: Compute the size in bytes of a free space header - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the on disk image of the free space + * manager section info, and place this value in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 2 2006 + * Programmer: John Mainzer + * 7/7/14 * *------------------------------------------------------------------------- */ -static herr_t -H5FS_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5FS_t *fspace, size_t *size_ptr) +static herr_t +H5FS__cache_sinfo_get_load_size(const void *_udata, size_t *image_len) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5FS_t *fspace; /* free space manager */ + const H5FS_sinfo_cache_ud_t *udata = (const H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */ - /* check arguments */ - HDassert(f); + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(udata); + fspace = udata->fspace; HDassert(fspace); - HDassert(size_ptr); + HDassert(fspace->sect_size > 0); + HDassert(image_len); - /* Set size value */ - *size_ptr = fspace->hdr_size; + *image_len = (size_t)(fspace->sect_size); FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5FS_cache_hdr_size() */ +} /* end H5FS__cache_sinfo_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_sinfo_load + * Function: H5FS__cache_sinfo_deserialize * - * Purpose: Loads free space sections from the disk. + * Purpose: Given a buffer containing the on disk image of the free space + * manager section info, allocate an instance of H5FS_sinfo_t, load + * it with the data contained in the image, and return a pointer to + * the new instance. * - * Return: Success: Pointer to a new free space section info - * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * July 31 2006 + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 7/7/14 * *------------------------------------------------------------------------- */ -static H5FS_sinfo_t * -H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_udata) +static void * +H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata, + hbool_t *dirty) { - H5FS_sinfo_t *sinfo = NULL; /* Free space section info */ - H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* user data for callback */ - haddr_t fs_addr; /* Free space header address */ - size_t old_sect_size; /* Old section size */ - uint8_t *buf = NULL; /* Temporary buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ - uint32_t stored_chksum; /* Stored metadata checksum value */ - uint32_t computed_chksum; /* Computed metadata checksum value */ - H5FS_sinfo_t *ret_value; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Check arguments */ - HDassert(f); + H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */ + H5FS_t *fspace; /* free space manager */ + H5FS_sinfo_t *sinfo = NULL; /* Free space section info */ + haddr_t fs_addr; /* Free space header address */ + size_t old_sect_size; /* Old section size */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t stored_chksum; /* Stored metadata checksum */ + uint32_t computed_chksum; /* Computed metadata checksum */ + void * ret_value; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(image); HDassert(udata); + fspace = udata->fspace; + HDassert(fspace); + HDassert(fspace->sect_size == len); + HDassert(dirty); /* Allocate a new free space section info */ - if(NULL == (sinfo = H5FS_sinfo_new(udata->f, udata->fspace))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - /* Allocate space for the buffer to serialize the sections into */ - H5_CHECKED_ASSIGN(old_sect_size, size_t, udata->fspace->sect_size, hsize_t); - if(NULL == (buf = H5FL_BLK_MALLOC(sect_block, (size_t)udata->fspace->sect_size))) + if(NULL == (sinfo = H5FS_sinfo_new(udata->f, fspace))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - /* Read buffer from disk */ - if(H5F_block_read(f, H5FD_MEM_FSPACE_SINFO, udata->fspace->sect_addr, (size_t)udata->fspace->sect_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_READERROR, NULL, "can't read free space sections") - - /* Deserialize free sections from buffer available */ - p = buf; + /* initialize old_sect_size */ + H5_CHECKED_ASSIGN(old_sect_size, size_t, udata->fspace->sect_size, hsize_t); /* Magic number */ - if(HDmemcmp(p, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5FS_SINFO_VERSION) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version") + if(*image++ != H5FS_SINFO_VERSION) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version") /* Address of free space header for these sections */ - H5F_addr_decode(udata->f, &p, &fs_addr); + H5F_addr_decode(udata->f, &image, &fs_addr); if(H5F_addr_ne(fs_addr, udata->fspace->addr)) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections") /* Check for any serialized sections */ - if(udata->fspace->serial_sect_count > 0) { + if(fspace->serial_sect_count > 0) { hsize_t old_tot_sect_count; /* Total section count from header */ hsize_t old_serial_sect_count; /* Total serializable section count from header */ hsize_t old_ghost_sect_count; /* Total ghost section count from header */ @@ -615,27 +870,27 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void sect_cnt_size = H5VM_limit_enc_size((uint64_t)udata->fspace->serial_sect_count); /* Reset the section count, the "add" routine will update it */ - old_tot_sect_count = udata->fspace->tot_sect_count; - old_serial_sect_count = udata->fspace->serial_sect_count; - old_ghost_sect_count = udata->fspace->ghost_sect_count; - old_tot_space = udata->fspace->tot_space; - udata->fspace->tot_sect_count = 0; - udata->fspace->serial_sect_count = 0; - udata->fspace->ghost_sect_count = 0; - udata->fspace->tot_space = 0; - - /* Walk through the buffer, deserializing sections */ + old_tot_sect_count = fspace->tot_sect_count; + old_serial_sect_count = fspace->serial_sect_count; + old_ghost_sect_count = fspace->ghost_sect_count; + old_tot_space = fspace->tot_space; + fspace->tot_sect_count = 0; + fspace->serial_sect_count = 0; + fspace->ghost_sect_count = 0; + fspace->tot_space = 0; + + /* Walk through the image, deserializing sections */ do { hsize_t sect_size; /* Current section size */ size_t node_count; /* # of sections of this size */ size_t u; /* Local index variable */ /* The number of sections of this node's size */ - UINT64DECODE_VAR(p, node_count, sect_cnt_size); + UINT64DECODE_VAR(image, node_count, sect_cnt_size); HDassert(node_count); /* The size of the sections for this node */ - UINT64DECODE_VAR(p, sect_size, sinfo->sect_len_size); + UINT64DECODE_VAR(image, sect_size, sinfo->sect_len_size); HDassert(sect_size); /* Loop over nodes of this size */ @@ -646,324 +901,306 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void unsigned des_flags; /* Flags from deserialize callback */ /* The address of the section */ - UINT64DECODE_VAR(p, sect_addr, sinfo->sect_off_size); + UINT64DECODE_VAR(image, sect_addr, sinfo->sect_off_size); /* The type of this section */ - sect_type = *p++; + sect_type = *image++; /* Call 'deserialize' callback for this section */ des_flags = 0; HDassert(udata->fspace->sect_cls[sect_type].deserialize); - if(NULL == (new_sect = (*udata->fspace->sect_cls[sect_type].deserialize)(&udata->fspace->sect_cls[sect_type], udata->dxpl_id, p, sect_addr, sect_size, &des_flags))) + if(NULL == (new_sect = (*fspace->sect_cls[sect_type].deserialize) (&fspace->sect_cls[sect_type], udata->dxpl_id, image, sect_addr, sect_size, &des_flags))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTDECODE, NULL, "can't deserialize section") - /* Update offset in serialization buffer */ - p += udata->fspace->sect_cls[sect_type].serial_size; + /* Update offset in serialization image */ + image += udata->fspace->sect_cls[sect_type].serial_size; /* Insert section in free space manager, unless requested not to */ if(!(des_flags & H5FS_DESERIALIZE_NO_ADD)) if(H5FS_sect_add(udata->f, udata->dxpl_id, udata->fspace, new_sect, H5FS_ADD_DESERIALIZING, NULL) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, NULL, "can't add section to free space manager") } /* end for */ - } while(p < ((buf + old_sect_size) - H5FS_SIZEOF_CHKSUM)); + } while(image < (((const uint8_t *)_image + old_sect_size) - H5FS_SIZEOF_CHKSUM)); /* Sanity check */ - HDassert((size_t)(p - buf) == (old_sect_size - H5FS_SIZEOF_CHKSUM)); - HDassert(old_sect_size == udata->fspace->sect_size); - HDassert(old_tot_sect_count == udata->fspace->tot_sect_count); - HDassert(old_serial_sect_count == udata->fspace->serial_sect_count); - HDassert(old_ghost_sect_count == udata->fspace->ghost_sect_count); - HDassert(old_tot_space == udata->fspace->tot_space); + HDassert((size_t)(image - (const uint8_t *)_image) == (old_sect_size - H5FS_SIZEOF_CHKSUM)); + HDassert(old_sect_size == fspace->sect_size); + HDassert(old_tot_sect_count == fspace->tot_sect_count); + HDassert(old_serial_sect_count == fspace->serial_sect_count); + HDassert(old_ghost_sect_count == fspace->ghost_sect_count); + HDassert(old_tot_space == fspace->tot_space); } /* end if */ /* Compute checksum on indirect block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - (const uint8_t *)buf), 0); + computed_chksum = H5_checksum_metadata((const uint8_t *)_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Verify checksum */ if(stored_chksum != computed_chksum) - HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block") + HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block") /* Sanity check */ - HDassert((size_t)(p - (const uint8_t *)buf) == old_sect_size); + HDassert((size_t)(image - (const uint8_t *)_image) == old_sect_size); /* Set return value */ ret_value = sinfo; done: - if(buf) - buf = H5FL_BLK_FREE(sect_block, buf); if(!ret_value && sinfo) if(H5FS_sinfo_dest(sinfo) < 0) HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space info") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_sinfo_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5FS__cache_sinfo_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5FS_sinfo_serialize_sect_cb + * Function: H5FS__cache_sinfo_image_len * - * Purpose: Skip list iterator callback to serialize free space sections - * of a particular size + * Purpose: Compute the size of the data structure on disk and return + * it in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Monday, May 8, 2006 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * August 14, 2013 * *------------------------------------------------------------------------- */ static herr_t -H5FS_sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) +H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5FS_section_class_t *sect_cls; /* Class of section */ - H5FS_section_info_t *sect= (H5FS_section_info_t *)_item; /* Free space section to work on */ - H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Check arguments. */ - HDassert(sect); - HDassert(udata->sinfo); - HDassert(udata->p); + const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)_thing; /* Pointer to the object */ + const H5FS_t *fspace; /* Free space header */ - /* Get section's class */ - sect_cls = &udata->sinfo->fspace->sect_cls[sect->type]; - - /* Check if this section should be serialized (i.e. is not a ghost section) */ - if(!(sect_cls->flags & H5FS_CLS_GHOST_OBJ)) { - /* The address of the section */ - UINT64ENCODE_VAR(*udata->p, sect->addr, udata->sinfo->sect_off_size); - - /* The type of this section */ - *(*udata->p)++ = (uint8_t)sect->type; + FUNC_ENTER_STATIC_NOERR - /* Call 'serialize' callback for this section */ - if(sect_cls->serialize) { - if((*sect_cls->serialize)(sect_cls, sect, *udata->p) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTSERIALIZE, FAIL, "can't syncronize section") + /* Sanity checks */ + HDassert(sinfo); + HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); + fspace = sinfo->fspace; + HDassert(fspace); + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(image_len); - /* Update offset in serialization buffer */ - (*udata->p) += sect_cls->serial_size; - } /* end if */ - else - HDassert(sect_cls->serial_size == 0); - } /* end if */ + /* Set the image length size */ + H5_CHECKED_ASSIGN(*image_len, size_t, sinfo->fspace->alloc_sect_size, hsize_t); -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5FS_sinfo_serialize_sect_cb() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5FS__cache_sinfo_image_len() */ /*------------------------------------------------------------------------- - * Function: H5FS_sinfo_serialize_node_cb + * Function: H5FS__cache_sinfo_pre_serialize * - * Purpose: Skip list iterator callback to serialize free space sections - * in a bin + * Purpose: The objective of this function is to test to see if file space + * for the section info is located in temporary (AKA imaginary) file + * space. If it is, relocate file space for the section info to + * regular file space. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * Monday, May 8, 2006 + * Programmer: John Mainzer + * 7/7/14 * *------------------------------------------------------------------------- */ -static herr_t -H5FS_sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) +static herr_t +H5FS__cache_sinfo_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, + haddr_t addr, size_t len, size_t H5_ATTR_UNUSED compressed_len, haddr_t *new_addr, + size_t *new_len, size_t H5_ATTR_UNUSED *new_compressed_len, unsigned *flags) { - H5FS_node_t *fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */ - H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */ - herr_t ret_value = SUCCEED; /* Return value */ + H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ + H5FS_t *fspace; /* Free space header */ + haddr_t sinfo_addr; /* Address for section info */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments. */ - HDassert(fspace_node); - HDassert(udata->sinfo); - HDassert(udata->p); + /* Sanity checks */ + HDassert(f); + HDassert(sinfo); + HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); + fspace = sinfo->fspace; + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(fspace->cache_info.is_pinned); + HDassert(H5F_addr_defined(addr)); + HDassert(H5F_addr_eq(fspace->sect_addr, addr)); + HDassert(fspace->sect_size == len); + HDassert(new_addr); + HDassert(new_len); + HDassert(flags); - /* Check if this node has any serializable sections */ - if(fspace_node->serial_count > 0) { - /* The number of serializable sections of this node's size */ - UINT64ENCODE_VAR(*udata->p, fspace_node->serial_count, udata->sect_cnt_size); + /* we shouldn't be called if the section info is empty */ + HDassert(fspace->serial_sect_count > 0); - /* The size of the sections for this node */ - UINT64ENCODE_VAR(*udata->p, fspace_node->sect_size, udata->sinfo->sect_len_size); + sinfo_addr = addr; /* this will change if we relocate the section data */ - /* Iterate through all the sections of this size */ - HDassert(fspace_node->sect_list); - if(H5SL_iterate(fspace_node->sect_list, H5FS_sinfo_serialize_sect_cb, udata) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes") + /* Check for section info at temporary address */ + if(H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { + /* Sanity check */ + HDassert(fspace->sect_size > 0); + HDassert(H5F_addr_eq(fspace->sect_addr, addr)); + + /* Allocate space for the section info in file */ + if(HADDR_UNDEF == (sinfo_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") + + fspace->alloc_sect_size = (size_t)fspace->sect_size; + + /* Sanity check */ + HDassert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr)); + + /* Let the metadata cache know the section info moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, sinfo->fspace->sect_addr, sinfo_addr) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info") + + /* Update the internal address for the section info */ + sinfo->fspace->sect_addr = sinfo_addr; + + /* Mark free space header as dirty */ + if(H5AC_mark_entry_dirty(fspace) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + } /* end if */ + + if(!H5F_addr_eq(addr, sinfo_addr)) { + *new_addr = sinfo_addr; + *flags = H5C__SERIALIZE_MOVED_FLAG; } /* end if */ + else + *flags = 0; done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5FS_sinfo_serialize_node_cb() */ +} /* end H5FS__cache_sinfo_pre_serialize() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_sinfo_flush + * Function: H5FS__cache_sinfo_serialize * - * Purpose: Flushes a dirty free space section info to disk. + * Purpose: Given an instance of H5FS_sinfo_t and a suitably sized buffer, + * serialize the contents of the instance of H5FS_sinfo_t and write + * its contents to the buffer. This buffer will be used to write + * the image of the instance to file. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * July 31 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5FS_sinfo_t *sinfo, unsigned H5_ATTR_UNUSED * flags_ptr) +static herr_t +H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ + H5FS_t *fspace; /* Free space header */ + H5FS_iter_ud_t udata; /* User data for callbacks */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + unsigned bin; /* Current bin we are on */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* check arguments */ + /* Sanity checks */ HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); HDassert(sinfo); - HDassert(sinfo->fspace); - HDassert(sinfo->fspace->sect_cls); - - if(sinfo->cache_info.is_dirty || sinfo->dirty) { - H5FS_iter_ud_t udata; /* User data for callbacks */ - uint8_t *buf = NULL; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - unsigned bin; /* Current bin we are on */ - - /* Sanity check address */ - if(H5F_addr_ne(addr, sinfo->fspace->sect_addr)) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "incorrect address for free space sections") + HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); + fspace = sinfo->fspace; + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(fspace->cache_info.is_pinned); + HDassert(fspace->sect_size == len); + HDassert(fspace->sect_cls); - /* Allocate temporary buffer */ - if((buf = H5FL_BLK_MALLOC(sect_block, (size_t)sinfo->fspace->sect_size)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - - p = buf; - - /* Magic number */ - HDmemcpy(p, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5FS_SINFO_VERSION; - - /* Address of free space header for these sections */ - H5F_addr_encode(f, &p, sinfo->fspace->addr); - - /* Set up user data for iterator */ - udata.sinfo = sinfo; - udata.p = &p; - udata.sect_cnt_size = H5VM_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count); - - /* Iterate over all the bins */ - for(bin = 0; bin < sinfo->nbins; bin++) - /* Check if there are any sections in this bin */ - if(sinfo->bins[bin].bin_list) - /* Iterate over list of section size nodes for bin */ - if(H5SL_iterate(sinfo->bins[bin].bin_list, H5FS_sinfo_serialize_node_cb, &udata) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes") - - /* Compute checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Sanity check */ - HDassert((size_t)(p - buf) == sinfo->fspace->sect_size); - HDassert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size); - - /* Check for section info at temporary address */ - if(H5F_IS_TMP_ADDR(f, sinfo->fspace->sect_addr)) { - /* Sanity check */ - HDassert(sinfo->fspace->sect_size > 0); - HDassert(H5F_addr_eq(sinfo->fspace->sect_addr, addr)); - - /* Allocate space for the section info in file */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, sinfo->fspace->sect_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") - sinfo->fspace->alloc_sect_size = (size_t)sinfo->fspace->sect_size; + /* Magic number */ + HDmemcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Sanity check */ - HDassert(!H5F_addr_eq(sinfo->fspace->sect_addr, addr)); + /* Version # */ + *image++ = H5FS_SINFO_VERSION; - /* Let the metadata cache know the section info moved */ - if(H5AC_move_entry(f, H5AC_FSPACE_SINFO, sinfo->fspace->sect_addr, addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block") + /* Address of free space header for these sections */ + H5F_addr_encode(f, &image, sinfo->fspace->addr); - /* Update the internal address for the section info */ - sinfo->fspace->sect_addr = addr; + /* Set up user data for iterator */ + udata.sinfo = sinfo; + udata.image = ℑ + udata.sect_cnt_size = H5VM_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count); - /* Mark free space header as dirty */ - if(H5AC_mark_entry_dirty(sinfo->fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") - } /* end if */ + /* Iterate over all the bins */ + for(bin = 0; bin < sinfo->nbins; bin++) + /* Check if there are any sections in this bin */ + if(sinfo->bins[bin].bin_list) + /* Iterate over list of section size nodes for bin */ + if(H5SL_iterate(sinfo->bins[bin].bin_list, H5FS__sinfo_serialize_node_cb, &udata) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes") - /* Write buffer to disk */ - if(H5F_block_write(f, H5FD_MEM_FSPACE_SINFO, sinfo->fspace->sect_addr, (size_t)sinfo->fspace->sect_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space sections to disk") - buf = H5FL_BLK_FREE(sect_block, buf); + /* Compute checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); - sinfo->cache_info.is_dirty = FALSE; - sinfo->dirty = FALSE; - } /* end if */ + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - if(destroy) - if(H5FS_cache_sinfo_dest(f, sinfo) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info") + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) == sinfo->fspace->sect_size); + HDassert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size); done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5FS_cache_sinfo_flush() */ +} /* end H5FS__cache_sinfo_serialize() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_sinfo_dest + * Function: H5FS__cache_sinfo_free_icr * - * Purpose: Destroys a free space section info in memory. + * Purpose: Free the memory used for the in core representation of the + * free space manager section info. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * July 31 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo) +static herr_t +H5FS__cache_sinfo_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ + H5FS_t *fspace; /* Free space header */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments */ + /* Sanity checks */ HDassert(sinfo); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!sinfo->cache_info.free_file_space_on_destroy || H5F_addr_defined(sinfo->cache_info.addr)); - - /* Check for freeing file space for free space section info */ - if(sinfo->cache_info.free_file_space_on_destroy) { - /* Sanity check */ - HDassert(sinfo->fspace->alloc_sect_size > 0); - - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(!H5F_IS_TMP_ADDR(f, sinfo->cache_info.addr)) - if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, H5AC_dxpl_id, sinfo->cache_info.addr, (hsize_t)sinfo->fspace->alloc_sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space section info") - } /* end if */ + HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); + fspace = sinfo->fspace; + HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(fspace->cache_info.is_pinned); /* Destroy free space info */ if(H5FS_sinfo_dest(sinfo) < 0) @@ -971,73 +1208,107 @@ H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_sinfo_dest() */ +} /* end H5FS__cache_sinfo_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_sinfo_clear + * Function: H5FS__sinfo_serialize_sect_cb * - * Purpose: Mark a free space section info in memory as non-dirty. + * Purpose: Skip list iterator callback to serialize free space sections + * of a particular size * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * July 31 2006 + * Monday, May 8, 2006 * *------------------------------------------------------------------------- */ static herr_t -H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy) +H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) { + H5FS_section_class_t *sect_cls; /* Class of section */ + H5FS_section_info_t *sect= (H5FS_section_info_t *)_item; /* Free space section to work on */ + H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(sinfo); + /* Check arguments. */ + HDassert(sect); + HDassert(udata->sinfo); + HDassert(udata->image); - /* Reset the dirty flag. */ - sinfo->cache_info.is_dirty = FALSE; + /* Get section's class */ + sect_cls = &udata->sinfo->fspace->sect_cls[sect->type]; - if(destroy) - if(H5FS_cache_sinfo_dest(f, sinfo) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space section info") + /* Check if this section should be serialized (i.e. is not a ghost section) */ + if(!(sect_cls->flags & H5FS_CLS_GHOST_OBJ)) { + /* The address of the section */ + UINT64ENCODE_VAR(*udata->image, sect->addr, udata->sinfo->sect_off_size); + + /* The type of this section */ + *(*udata->image)++ = (uint8_t)sect->type; + + /* Call 'serialize' callback for this section */ + if(sect_cls->serialize) { + if((*sect_cls->serialize)(sect_cls, sect, *udata->image) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTSERIALIZE, FAIL, "can't syncronize section") + + /* Update offset in serialization buffer */ + (*udata->image) += sect_cls->serial_size; + } /* end if */ + else + HDassert(sect_cls->serial_size == 0); + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FS_cache_sinfo_clear() */ +} /* H5FS__sinfo_serialize_sect_cb() */ /*------------------------------------------------------------------------- - * Function: H5FS_cache_sinfo_size + * Function: H5FS__sinfo_serialize_node_cb * - * Purpose: Compute the size in bytes of a free space section info - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Skip list iterator callback to serialize free space sections + * in a bin * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * July 31 2006 + * Monday, May 8, 2006 * *------------------------------------------------------------------------- */ static herr_t -H5FS_cache_sinfo_size(const H5F_t H5_ATTR_UNUSED *f, const H5FS_sinfo_t *sinfo, size_t *size_ptr) +H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + H5FS_node_t *fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */ + H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */ + herr_t ret_value = SUCCEED; /* Return value */ - /* check arguments */ - HDassert(sinfo); - HDassert(size_ptr); + FUNC_ENTER_STATIC + + /* Check arguments. */ + HDassert(fspace_node); + HDassert(udata->sinfo); + HDassert(udata->image); - /* Set size value */ - H5_CHECKED_ASSIGN(*size_ptr, size_t, sinfo->fspace->alloc_sect_size, hsize_t); + /* Check if this node has any serializable sections */ + if(fspace_node->serial_count > 0) { + /* The number of serializable sections of this node's size */ + UINT64ENCODE_VAR(*udata->image, fspace_node->serial_count, udata->sect_cnt_size); - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5FS_cache_sinfo_size() */ + /* The size of the sections for this node */ + UINT64ENCODE_VAR(*udata->image, fspace_node->sect_size, udata->sinfo->sect_len_size); + + /* Iterate through all the sections of this size */ + HDassert(fspace_node->sect_list); + if(H5SL_iterate(fspace_node->sect_list, H5FS__sinfo_serialize_sect_cb, udata) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes") + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5FS__sinfo_serialize_node_cb() */ diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index b180efd..de66ebd 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -121,7 +121,7 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int /* * Load the free space header. */ - if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC_READ))) + if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header") /* Print opening message */ @@ -263,7 +263,7 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str /* * Load the free space header. */ - if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ))) + if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header") /* Retrieve the client id */ diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index 78afde8..2c1eba7 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -182,7 +182,9 @@ struct H5FS_t { unsigned sinfo_lock_count; /* # of times the section info has been locked */ hbool_t sinfo_protected; /* Whether the section info was protected when locked */ hbool_t sinfo_modified; /* Whether the section info has been modified while locked */ - H5AC_protect_t sinfo_accmode; /* Access mode for protecting the section info */ + unsigned sinfo_accmode; /* Access mode for protecting the section info */ + /* must be either H5C__NO_FLAGS_SET (i.e r/w) */ + /* or H5AC__READ_ONLY_FLAG (i.e. r/o). */ size_t max_cls_serial_size; /* Max. additional size of serialized form of section */ hsize_t threshold; /* Threshold for alignment */ hsize_t alignment; /* Alignment */ diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 8fe4075..0b47f51 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -204,7 +204,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5AC_protect_t accmode) +H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, unsigned accmode) { H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -220,14 +220,21 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" HDassert(f); HDassert(fspace); + /* only H5AC__READ_ONLY_FLAG may appear in accmode */ + HDassert((accmode & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* If the free space header doesn't already "own" the section info, load * section info or create it */ if(fspace->sinfo) { /* Check if the section info was protected & we want a different access mode */ + + /* only H5AC__READ_ONLY_FLAG may appear in fspace->sinfo_accmode */ + HDassert(((fspace->sinfo_accmode) & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + if(fspace->sinfo_protected && accmode != fspace->sinfo_accmode) { /* Check if we need to switch from read-only access to read-write */ - if(H5AC_WRITE == accmode) { + if(0 == (accmode & (unsigned)(~H5AC__READ_ONLY_FLAG))) { /* Unprotect the read-only section info */ if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info") @@ -236,11 +243,11 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" cache_udata.f = f; cache_udata.dxpl_id = dxpl_id; cache_udata.fspace = fspace; - if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC_WRITE))) + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") /* Switch the access mode we have */ - fspace->sinfo_accmode = H5AC_WRITE; + fspace->sinfo_accmode = H5AC__NO_FLAGS_SET; } /* end if */ } /* end if */ } /* end if */ @@ -331,7 +338,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" /* Check if we modified any section */ if(modified) { /* Check if the section info was protected with a different access mode */ - if(fspace->sinfo_protected && fspace->sinfo_accmode != H5AC_WRITE) + if(fspace->sinfo_protected && (0 != ((fspace->sinfo_accmode) & H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTDIRTY, FAIL, "attempt to modify read-only section info") /* If we modified the section info, mark it dirty */ @@ -915,7 +922,7 @@ H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, HDassert(sect); /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -1396,7 +1403,7 @@ HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->siz HDassert(sect->size); /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -1494,7 +1501,7 @@ HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_se H5FS_section_info_t *sect; /* Temporary free space section */ /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -1613,7 +1620,7 @@ H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t HDassert(sect->size); /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; saved_fs_size = sect->size; @@ -1849,7 +1856,7 @@ HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_se #endif /* QAK */ if(fspace->tot_sect_count > 0) { /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -1997,7 +2004,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_c unsigned bin; /* Current bin we are on */ /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_READ) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__READ_ONLY_FLAG) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -2089,7 +2096,7 @@ H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, HDassert(new_class < fspace->nclasses); /* Get a pointer to the section info */ - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; @@ -2403,7 +2410,7 @@ H5FS_sect_try_shrink_eoa(const H5F_t *f, hid_t dxpl_id, const H5FS_t *fspace, vo /* Check arguments. */ HDassert(fspace); - if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0) + if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") sinfo_valid = TRUE; diff --git a/src/H5Fint.c b/src/H5Fint.c index df8e886..0e77349 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -803,6 +803,14 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") } /* end if */ + /* if it exists, unpin the driver information block cache entry, + * since we're about to destroy the cache + */ + if(f->shared->drvinfo) + if(H5AC_unpin_entry(f->shared->drvinfo) < 0) + /* Push error, but keep going*/ + HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin drvinfo") + /* Unpin the superblock, since we're about to destroy the cache */ if(H5AC_unpin_entry(f->shared->sblock) < 0) /* Push error, but keep going*/ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 9f70e12..175fa88 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -81,6 +81,21 @@ #define H5F_SUPERBLOCK_FIXED_SIZE ( H5F_SIGNATURE_LEN \ + 1) /* superblock version */ +/* The H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE is the minimal amount of super block + * variable length data guarnateed to load the sizeof offsets and the sizeof + * lengths fields in all versions of the superblock. + * + * This is necessary in the V3 cache, as on the initial load, we need to + * get enough of the superblock to determine its version and size so that + * the metadata cache can load the correct amount of data from file to + * allow the second deserialization attempt to succeed. + * + * The value selected will have to be revisited for each new version + * of the super block. Note that the current value is one byte larger + * than it needs to be. + */ +#define H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE 7 + /* Macros for computing variable-size superblock size */ #define H5F_SUPERBLOCK_VARLEN_SIZE_COMMON \ (2 /* freespace, and root group versions */ \ @@ -113,20 +128,38 @@ + (sizeof_addr) /* EOF address */ \ + (sizeof_addr) /* root group object header address */ \ + H5F_SIZEOF_CHKSUM) /* superblock checksum (keep this last) */ -#define H5F_SUPERBLOCK_VARLEN_SIZE(v, f) ( \ - (v == 0 ? H5F_SUPERBLOCK_VARLEN_SIZE_V0(H5F_SIZEOF_ADDR(f), H5F_SIZEOF_SIZE(f)) : 0) \ - + (v == 1 ? H5F_SUPERBLOCK_VARLEN_SIZE_V1(H5F_SIZEOF_ADDR(f), H5F_SIZEOF_SIZE(f)) : 0) \ - + (v == 2 ? H5F_SUPERBLOCK_VARLEN_SIZE_V2(H5F_SIZEOF_ADDR(f)) : 0)) +#define H5F_SUPERBLOCK_VARLEN_SIZE(v, sizeof_addr, sizeof_size) ( \ + (v == 0 ? H5F_SUPERBLOCK_VARLEN_SIZE_V0(sizeof_addr, sizeof_size) : 0) \ + + (v == 1 ? H5F_SUPERBLOCK_VARLEN_SIZE_V1(sizeof_addr, sizeof_size) : 0) \ + + (v == 2 ? H5F_SUPERBLOCK_VARLEN_SIZE_V2(sizeof_addr) : 0)) /* Total size of superblock, depends on superblock version */ -#define H5F_SUPERBLOCK_SIZE(v, f) ( H5F_SUPERBLOCK_FIXED_SIZE \ - + H5F_SUPERBLOCK_VARLEN_SIZE(v, f)) +#define H5F_SUPERBLOCK_SIZE(s) ( H5F_SUPERBLOCK_FIXED_SIZE \ + + H5F_SUPERBLOCK_VARLEN_SIZE((s)->super_vers, (s)->sizeof_addr, (s)->sizeof_size)) /* Forward declaration external file cache struct used below (defined in * H5Fefc.c) */ typedef struct H5F_efc_t H5F_efc_t; +/* Structure for passing 'user data' to superblock cache callbacks */ +typedef struct H5F_superblock_cache_ud_t { +/* IN: */ + H5F_t *f; /* Pointer to file */ + hbool_t ignore_drvrinfo; /* Indicate if the driver info should be ignored */ +/* OUT: */ + unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */ + unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree key values for each type */ + haddr_t stored_eof; /* End-of-file in file */ + hbool_t drvrinfo_removed; /* Indicate if the driver info was removed */ +} H5F_superblock_cache_ud_t; + +/* Structure for passing 'user data' to driver info block cache callbacks */ +typedef struct H5F_drvrinfo_cache_ud_t { + H5F_t *f; /* Pointer to file */ + haddr_t driver_addr; /* address of driver info block */ +} H5F_drvrinfo_cache_ud_t; + /* Structure for metadata & "small [raw] data" block aggregation fields */ struct H5F_blk_aggr_t { unsigned long feature_flag; /* Feature flag type */ @@ -176,6 +209,8 @@ typedef struct H5F_mtab_t { typedef struct H5F_super_t { H5AC_info_t cache_info; /* Cache entry information structure */ unsigned super_vers; /* Superblock version */ + uint8_t sizeof_addr; /* Size of addresses in file */ + uint8_t sizeof_size; /* Size of offsets in file */ uint8_t status_flags; /* File status flags */ unsigned sym_leaf_k; /* Size of leaves in symbol tables */ unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree key values for each type */ @@ -197,6 +232,13 @@ typedef struct H5F_super_t { struct H5F_file_t { H5FD_t *lf; /* Lower level file handle for I/O */ H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */ + H5O_drvinfo_t *drvinfo; /* Pointer to the (pinned) driver info + * cache entry. This field is only defined + * for older versions of the super block, + * and then only when a driver information + * block is present. At all other times + * it should be NULL. + */ unsigned nrefs; /* Ref count for times file is opened */ unsigned flags; /* Access Permissions for file */ H5F_mtab_t mtab; /* File mount table */ @@ -283,6 +325,7 @@ H5FL_EXTERN(H5F_t); H5FL_EXTERN(H5F_file_t); H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1]; +H5_DLLVAR const H5AC_class_t H5AC_DRVRINFO[1]; /******************************/ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 166247a..e83330d 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -258,14 +258,21 @@ H5F__super_read(H5F_t *f, hid_t dxpl_id) { H5P_genplist_t *dxpl; /* DXPL object */ H5F_super_t * sblock = NULL; /* Superblock structure */ + H5F_superblock_cache_ud_t udata; /* User data for cache callbacks */ + H5P_genplist_t *c_plist; /* File creation property list */ unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */ haddr_t super_addr; /* Absolute address of superblock */ - H5AC_protect_t rw; /* Read/write permissions for file */ - hbool_t dirtied = FALSE; /* Bool for sblock protect call */ + haddr_t eof; /* End of file address */ + unsigned rw_flags; /* Read/write permissions for file */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL) + /* initialize the drvinfo to NULL -- we will overwrite this if there + * is a driver information block + */ + f->shared->drvinfo = NULL; + /* Get the DXPL plist object for DXPL ID */ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") @@ -284,23 +291,358 @@ H5F__super_read(H5F_t *f, hid_t dxpl_id) } /* end if */ /* Determine file intent for superblock protect */ - if(H5F_INTENT(f) & H5F_ACC_RDWR) - rw = H5AC_WRITE; - else - rw = H5AC_READ; + + /* Must tell cache at protect time that the super block is to be + * flushed last (and collectively in the parallel case). + */ + rw_flags = H5AC__FLUSH_LAST_FLAG; +#ifdef H5_HAVE_PARALLEL + rw_flags |= H5C__FLUSH_COLLECTIVELY_FLAG; +#endif /* H5_HAVE_PARALLEL */ + if(!(H5F_INTENT(f) & H5F_ACC_RDWR)) + rw_flags |= H5AC__READ_ONLY_FLAG; + + /* Get the shared file creation property list */ + if(NULL == (c_plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list") + + /* Make certain we can read the fixed-size portion of the superblock */ + if(H5F__set_eoa(f, H5FD_MEM_SUPER, + H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed") + + /* Set up the user data for cache callbacks */ + udata.f = f; + udata.ignore_drvrinfo = H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO); + udata.sym_leaf_k = 0; + if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + udata.stored_eof = HADDR_UNDEF; + udata.drvrinfo_removed = FALSE; /* Look up the superblock */ - if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &dirtied, rw))) + if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags))) HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock") - /* Mark the superblock dirty if it was modified during loading or VFD indicated to do so */ - if((H5AC_WRITE == rw) && (dirtied || H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_SBLK_LOAD))) - sblock_flags |= H5AC__DIRTIED_FLAG; - /* Pin the superblock in the cache */ if(H5AC_pin_protected_entry(sblock) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTPIN, FAIL, "unable to pin superblock") + /* Mark the superblock dirty if it was modified during loading */ + if(((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && udata.ignore_drvrinfo && udata.drvrinfo_removed) { + HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2); + sblock_flags |= H5AC__DIRTIED_FLAG; + } /* end if */ + + /* The superblock must be flushed last (and collectively in parallel) */ + sblock_flags |= H5AC__FLUSH_LAST_FLAG; +#ifdef H5_HAVE_PARALLEL + sblock_flags |= H5AC__FLUSH_COLLECTIVELY_FLAG; +#endif /* H5_HAVE_PARALLEL */ + + /* Check if superblock address is different from base address and adjust + * base address and "end of address" address if so. + */ + if(!H5F_addr_eq(super_addr, sblock->base_addr)) { + /* Check if the superblock moved earlier in the file */ + if(H5F_addr_lt(super_addr, sblock->base_addr)) + udata.stored_eof -= (sblock->base_addr - super_addr); + else + /* The superblock moved later in the file */ + udata.stored_eof += (super_addr - sblock->base_addr); + + /* Adjust base address for offsets of the HDF5 data in the file */ + sblock->base_addr = super_addr; + + /* Set the base address for the file in the VFD now */ + if(H5F__set_base_addr(f, sblock->base_addr) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver") + + /* Indicate that the superblock should be marked dirty */ + if((rw_flags & H5AC__READ_ONLY_FLAG) == 0) + sblock_flags |= H5AC__DIRTIED_FLAG; + } /* end if */ + + /* Set information in the file's creation property list */ + if(H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &sblock->super_vers) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set superblock version") + if(H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sblock->sizeof_addr) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number in an address") + if(H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sblock->sizeof_size) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number for object size") + + /* Handle the B-tree 'K' values */ + if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { + /* Sanity check */ + HDassert(udata.sym_leaf_k != 0); + + /* Set the symbol table internal node 'K' value */ + if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &udata.sym_leaf_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes") + sblock->sym_leaf_k = udata.sym_leaf_k; + + /* Set the B-tree internal node values, etc */ + if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes") + HDmemcpy(sblock->btree_k, udata.btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID); + } /* end if */ + else { + /* Get the (default) B-tree internal node values, etc */ + /* (Note: these may be reset in a superblock extension) */ + if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, sblock->btree_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + if(H5P_get(c_plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + } /* end else */ + + /* + * The user-defined data is the area of the file before the base + * address. + */ + if(H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &sblock->base_addr) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set userblock size") + + /* + * Make sure that the data is not truncated. One case where this is + * possible is if the first file of a family of files was opened + * individually. + */ + if(HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT))) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to determine file size") + + /* (Account for the stored EOA being absolute offset -QAK) */ + if((eof + sblock->base_addr) < udata.stored_eof) + HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, FAIL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)udata.stored_eof) + + /* + * Tell the file driver how much address space has already been + * allocated so that it knows how to allocate additional memory. + */ + + /* Decode the optional driver information block */ + if(H5F_addr_defined(sblock->driver_addr)) { + H5O_drvinfo_t *drvinfo; /* Driver info */ + H5F_drvrinfo_cache_ud_t drvrinfo_udata; /* User data for metadata callbacks */ + unsigned drvinfo_flags = H5AC__NO_FLAGS_SET; /* Flags used in driver info block unprotect call */ + + /* Sanity check - driver info block should only be defined for + * superblock version < 2. + */ + HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2); + + /* Set up user data */ + drvrinfo_udata.f = f; + drvrinfo_udata.driver_addr = sblock->driver_addr; + + /* extend EOA so we can read at least the fixed sized + * portion of the driver info block + */ + if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */ + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, \ + "set end of space allocation request failed") + + /* Look up the driver info block */ + if(NULL == (drvinfo = (H5O_drvinfo_t *)H5AC_protect(f, dxpl_id, H5AC_DRVRINFO, sblock->driver_addr, &drvrinfo_udata, rw_flags))) + HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load driver info block") + + /* Loading the driver info block is enough to set up the right info */ + + /* Check if we need to rewrite the driver info block info */ + if ( ( (rw_flags & H5AC__READ_ONLY_FLAG) == 0 ) && + ( H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD) ) ) { + + drvinfo_flags |= H5AC__DIRTIED_FLAG; + } /* end if */ + + /* set the pin entry flag so that the driver information block + * cache entry will be pinned in the cache. + */ + drvinfo_flags |= H5AC__PIN_ENTRY_FLAG; + + /* Release the driver info block */ + if(H5AC_unprotect(f, dxpl_id, H5AC_DRVRINFO, sblock->driver_addr, drvinfo, drvinfo_flags) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to release driver info block") + + /* save a pointer to the driver information cache entry */ + f->shared->drvinfo = drvinfo; + } /* end if */ + + /* (Account for the stored EOA being absolute offset -NAF) */ + if(H5F__set_eoa(f, H5FD_MEM_SUPER, udata.stored_eof - sblock->base_addr) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file") + + /* Decode the optional superblock extension info */ + if(H5F_addr_defined(sblock->ext_addr)) { + H5O_loc_t ext_loc; /* "Object location" for superblock extension */ + H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */ + H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */ + size_t u; /* Local index variable */ + htri_t status; /* Status for message existing */ + + /* Sanity check - superblock extension should only be defined for + * superblock version >= 2. + */ + HDassert(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2); + + /* Check for superblock extension being located "outside" the stored + * 'eoa' value, which can occur with the split/multi VFD. + */ + if(H5F_addr_gt(sblock->ext_addr, udata.stored_eof)) { + /* Set the 'eoa' for the object header memory type large enough + * to give some room for a reasonably sized superblock extension. + * (This is _rather_ a kludge -QAK) + */ + if(H5F__set_eoa(f, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file") + } /* end if */ + + /* Open the superblock extension */ + if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") + + /* Check for the extension having a 'driver info' message */ + if((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID, dxpl_id)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + if(status) { + /* Check for ignoring the driver info for this file */ + if(!udata.ignore_drvrinfo) { + + /* Retrieve the 'driver info' structure */ + if(NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo, dxpl_id)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver info message not present") + + /* Validate and decode driver information */ + if(H5FD_sb_load(f->shared->lf, drvinfo.name, drvinfo.buf) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "unable to decode driver information") + + /* Reset driver info message */ + H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo); + } /* end else */ + } /* end if */ + + /* Read in the shared OH message information if there is any */ + if(H5SM_get_info(&ext_loc, c_plist, dxpl_id) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to read SOHM table information") + + /* Check for the extension having a 'v1 B-tree "K"' message */ + if((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID, dxpl_id)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + if(status) { + /* Retrieve the 'v1 B-tree "K"' structure */ + if(NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek, dxpl_id)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "v1 B-tree 'K' info message not present") + + /* Set non-default v1 B-tree 'K' value info from file */ + sblock->btree_k[H5B_CHUNK_ID] = btreek.btree_k[H5B_CHUNK_ID]; + sblock->btree_k[H5B_SNODE_ID] = btreek.btree_k[H5B_SNODE_ID]; + sblock->sym_leaf_k = btreek.sym_leaf_k; + + /* Set non-default v1 B-tree 'K' values in the property list */ + if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes") + if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes") + } /* end if */ + + /* Check for the extension having a 'free-space manager info' message */ + if((status = H5O_msg_exists(&ext_loc, H5O_FSINFO_ID, dxpl_id)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + if(status) { + H5O_fsinfo_t fsinfo; /* Free-space manager info message from superblock extension */ + + /* Retrieve the 'free-space manager info' structure */ + if(NULL == H5O_msg_read(&ext_loc, H5O_FSINFO_ID, &fsinfo, dxpl_id)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get free-space manager info message") + + /* Check for non-default info */ + if(f->shared->fs_strategy != fsinfo.strategy) { + f->shared->fs_strategy = fsinfo.strategy; + + /* Set non-default strategy in the property list */ + if(H5P_set(c_plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &fsinfo.strategy) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy") + } /* end if */ + if(f->shared->fs_threshold != fsinfo.threshold) { + f->shared->fs_threshold = fsinfo.threshold; + + /* Set non-default threshold in the property list */ + if(H5P_set(c_plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &fsinfo.threshold) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy") + } /* end if */ + + /* Set free-space manager addresses */ + f->shared->fs_addr[0] = HADDR_UNDEF; + for(u = 1; u < NELMTS(f->shared->fs_addr); u++) + f->shared->fs_addr[u] = fsinfo.fs_addr[u-1]; + } /* end if */ + + /* Close superblock extension */ + if(H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension") + } /* end if */ + + /* Update the driver info if VFD indicated to do so */ + /* (NOTE: only for later versions of superblock, earlier versions are handled + * earlier in this routine. + */ + if(((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && + sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && + H5F_addr_defined(sblock->ext_addr)) { + /* Check for modifying the driver info when opening the file */ + if(H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD)) { + size_t driver_size; /* Size of driver info block (bytes) */ + + /* Check for driver info message */ + H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); + if(driver_size > 0) { + H5O_drvinfo_t drvinfo; /* Driver info */ + uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */ + + /* Sanity check */ + HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE); + + /* Encode driver-specific data */ + if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + + /* Set the driver info information for the superblock extension */ + drvinfo.len = driver_size; + drvinfo.buf = dbuf; + + /* Write driver info information to the superblock extension */ + +#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ + /* KLUGE ALERT!! + * + * H5F_super_ext_write_msg() expects f->shared->sblock to + * be set -- verify that it is NULL, and then set it. + * Set it back to NULL when we are done. + */ + HDassert(f->shared->sblock == NULL); + f->shared->sblock = sblock; +#endif /* JRM */ + + if(H5F_super_ext_write_msg(f, dxpl_id, &drvinfo, H5O_DRVINFO_ID, FALSE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension") + +#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ + f->shared->sblock = NULL; +#endif /* JRM */ + + } /* end if */ + } /* end if */ + /* Check for eliminating the driver info block */ + else if(H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) { + /* Remove the driver info message from the superblock extension */ + if(H5F_super_ext_remove_msg(f, dxpl_id, H5O_DRVINFO_ID) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension") + + /* Check if the superblock extension was removed */ + if(!H5F_addr_defined(sblock->ext_addr)) + sblock_flags |= H5AC__DIRTIED_FLAG; + } /* end if */ + } /* end if */ + /* Set the pointer to the pinned superblock */ f->shared->sblock = sblock; @@ -309,6 +651,32 @@ done: if(sblock && H5AC_unprotect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock") + /* If we have failed, make sure no entries are left in the + * metadata cache, so that it can be shut down and discarded. + */ + if(ret_value < 0) { + /* Unpin and discard drvinfo cache entry */ + if(f->shared->drvinfo) { + if(H5AC_unpin_entry(f->shared->drvinfo) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTUNPIN, FAIL, "unable to unpin driver info") + + /* Evict the driver info block from the cache */ + if(H5AC_expunge_entry(f, dxpl_id, H5AC_DRVRINFO, sblock->driver_addr, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge driver info block") + } /* end if */ + + /* Unpin & discard superblock */ + if(sblock) { + /* Unpin superblock in cache */ + if(H5AC_unpin_entry(sblock) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock") + + /* Evict the superblock from the cache */ + if(H5AC_expunge_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge superblock") + } /* end if */ + } /* end if */ + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5F__super_read() */ @@ -334,6 +702,8 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) { H5F_super_t *sblock = NULL; /* Superblock cache structure */ hbool_t sblock_in_cache = FALSE; /* Whether the superblock has been inserted into the metadata cache */ + H5O_drvinfo_t *drvinfo = NULL; /* Driver info */ + hbool_t drvinfo_in_cache = FALSE; /* Whether the driver info block has been inserted into the metadata cache */ H5P_genplist_t *plist; /* File creation property list */ hsize_t userblock_size; /* Size of userblock, in bytes */ hsize_t superblock_size; /* Size of superblock, in bytes */ @@ -427,11 +797,13 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) if(H5F__set_base_addr(f, sblock->base_addr) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set base address for file driver") - /* Save a local copy of the superblock version number */ + /* Save a local copy of the superblock version number, size of addresses & offsets */ sblock->super_vers = super_vers; + sblock->sizeof_addr = f->shared->sizeof_addr; + sblock->sizeof_size = f->shared->sizeof_size; /* Compute the size of the superblock */ - superblock_size = (hsize_t)H5F_SUPERBLOCK_SIZE(super_vers, f); + superblock_size = (hsize_t)H5F_SUPERBLOCK_SIZE(sblock); /* Compute the size of the driver information block */ H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); @@ -446,10 +818,10 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) } /* end if */ /* - * Allocate space for the userblock, superblock & driver info blocks. - * We do it with one allocation request because the userblock and - * superblock need to be at the beginning of the file and only the first - * allocation request is required to return memory at format address zero. + * Allocate space for the superblock & driver info block. + * We do it with one allocation request because the superblock needs to be + * at the beginning of the file and only the first allocation request is + * required to return memory at format address zero. */ if(super_vers < HDF5_SUPERBLOCK_VERSION_2) superblock_size += driver_size; @@ -466,6 +838,9 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) /* Keep a copy of the superblock info */ f->shared->sblock = sblock; + /* set the drvinfo filed to NULL -- will overwrite this later if needed */ + f->shared->drvinfo = NULL; + /* * Determine if we will need a superblock extension */ @@ -572,6 +947,33 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message") } /* end if */ } /* end if */ + else { + /* Check for creating an "old-style" driver info block */ + if(driver_size > 0) { + /* Sanity check */ + HDassert(H5F_addr_defined(sblock->driver_addr)); + + /* Allocate space for the driver info */ + if(NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "memory allocation failed for driver info message") + + /* Set up driver info message */ + /* (NOTE: All the actual information (name & driver information) is + * actually based on the VFD info in the file handle and + * will be encoded by the VFD's 'encode' callback, so it + * doesn't need to be set here. -QAK, 7/20/2013 + */ + H5_CHECKED_ASSIGN(drvinfo->len, size_t, H5FD_sb_size(f->shared->lf), hsize_t); + + /* Insert driver info block into cache */ + if(H5AC_insert_entry(f, dxpl_id, H5AC_DRVRINFO, sblock->driver_addr, drvinfo, H5AC__PIN_ENTRY_FLAG | H5AC__FLUSH_LAST_FLAG | H5AC__FLUSH_COLLECTIVELY_FLAG) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINS, FAIL, "can't add driver info block to cache") + drvinfo_in_cache = TRUE; + f->shared->drvinfo = drvinfo; + } /* end if */ + else + HDassert(!H5F_addr_defined(sblock->driver_addr)); + } /* end if */ done: /* Close superblock extension, if it was created */ @@ -580,6 +982,23 @@ done: /* Cleanup on failure */ if(ret_value < 0) { + /* Check if the driver info block has been allocated yet */ + if(drvinfo) { + /* Check if we've cached it already */ + if(drvinfo_in_cache) { + /* Unpin drvinfo in cache */ + if(H5AC_unpin_entry(drvinfo) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTUNPIN, FAIL, "unable to unpin driver info") + + /* Evict the driver info block from the cache */ + if(H5AC_expunge_entry(f, dxpl_id, H5AC_DRVRINFO, sblock->driver_addr, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTEXPUNGE, FAIL, "unable to expunge driver info block") + } /* end if */ + else + /* Free driver info block */ + H5MM_xfree(drvinfo); + } /* end if */ + /* Check if the superblock has been allocated yet */ if(sblock) { /* Check if we've cached it already */ @@ -635,6 +1054,14 @@ H5F_super_dirty(H5F_t *f) if(H5AC_mark_entry_dirty(f->shared->sblock) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + /* if the driver information block exists, mark it dirty as well + * so that the change in eoa will be reflected there as well if + * appropriate. + */ + if ( f->shared->drvinfo ) + if(H5AC_mark_entry_dirty(f->shared->drvinfo) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark drvinfo as dirty") + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_super_dirty() */ @@ -698,7 +1125,7 @@ H5F__super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext /* Set the superblock size */ if(super_size) - *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock->super_vers, f); + *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock); /* Set the superblock extension size */ if(super_ext_size) { diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index ded845d..cf14770 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -51,9 +51,6 @@ /* Local Macros */ /****************/ -/* Maximum size of super-block buffers */ -#define H5F_MAX_SUPERBLOCK_SIZE 134 - /******************/ /* Local Typedefs */ @@ -70,28 +67,70 @@ /********************/ /* Metadata cache (H5AC) callbacks */ -static H5F_super_t *H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F_super_t *sblock); -static herr_t H5F_sblock_dest(H5F_t *f, H5F_super_t * sblock); -static herr_t H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy); -static herr_t H5F_sblock_size(const H5F_t *f, const H5F_super_t *sblock, size_t *size_ptr); +static herr_t H5F__cache_superblock_get_load_size(const void *udata, size_t *image_len); +static void *H5F__cache_superblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5F__cache_superblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5F__cache_superblock_pre_serialize(const H5F_t *f, + hid_t dxpl_id, void *thing, haddr_t addr, size_t len, + size_t compressed_len, haddr_t *new_addr, size_t *new_len, + size_t *new_compressed_len, unsigned *flags); +static herr_t H5F__cache_superblock_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5F__cache_superblock_free_icr(void *thing); + +static herr_t H5F__cache_drvrinfo_get_load_size(const void *udata, size_t *image_len); +static void *H5F__cache_drvrinfo_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5F__cache_drvrinfo_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5F__cache_drvrinfo_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5F__cache_drvrinfo_free_icr(void *thing); /*********************/ /* Package Variables */ /*********************/ -/* H5F inherits cache-like properties from H5AC */ +/* H5F superblock inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_SUPERBLOCK[1] = {{ - H5AC_SUPERBLOCK_ID, - (H5AC_load_func_t)H5F_sblock_load, - (H5AC_flush_func_t)H5F_sblock_flush, - (H5AC_dest_func_t)H5F_sblock_dest, - (H5AC_clear_func_t)H5F_sblock_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5F_sblock_size, + H5AC_SUPERBLOCK_ID, /* Metadata client ID */ + "Superblock", /* Metadata client name (for debugging) */ + H5FD_MEM_SUPER, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5F__cache_superblock_get_load_size,/* 'get_load_size' callback */ + H5F__cache_superblock_deserialize, /* 'deserialize' callback */ + H5F__cache_superblock_image_len, /* 'image_len' callback */ + H5F__cache_superblock_pre_serialize,/* 'pre_serialize' callback */ + H5F__cache_superblock_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5F__cache_superblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ +}}; + +/* H5F driver info block inherits cache-like properties from H5AC */ +const H5AC_class_t H5AC_DRVRINFO[1] = {{ + H5AC_DRVRINFO_ID, /* Metadata client ID */ + "Driver info block", /* Metadata client name (for debugging) */ + H5FD_MEM_SUPER, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5F__cache_drvrinfo_get_load_size, /* 'get_load_size' callback */ + H5F__cache_drvrinfo_deserialize, /* 'deserialize' callback */ + H5F__cache_drvrinfo_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5F__cache_drvrinfo_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5F__cache_drvrinfo_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; + /*****************************/ /* Library Private Variables */ /*****************************/ @@ -107,546 +146,470 @@ H5FL_EXTERN(H5F_super_t); /*------------------------------------------------------------------------- - * Function: H5F_sblock_load + * Function: H5F__cache_superblock_get_load_size * - * Purpose: Loads the superblock from the file, and deserializes - * its information into the H5F_super_t structure. + * Purpose: Compute the size of the data structure on disk. * - * Return: Success: SUCCEED - * Failure: NULL + * Return: Non-negative on success/Negative on failure * - * Programmer: Mike McGreevy - * mamcgree@hdfgroup.org - * April 8, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 17, 2013 * *------------------------------------------------------------------------- */ -static H5F_super_t * -H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_udata) +static herr_t +H5F__cache_superblock_get_load_size(const void H5_ATTR_UNUSED *udata, size_t *image_len) { - H5F_super_t *sblock = NULL; /* File's superblock */ - haddr_t base_addr = HADDR_UNDEF; /* Base address of file */ - uint8_t sbuf[H5F_MAX_SUPERBLOCK_SIZE]; /* Buffer for superblock */ - H5P_genplist_t *dxpl; /* DXPL object */ - H5P_genplist_t *c_plist; /* File creation property list */ - H5F_file_t *shared; /* shared part of `file' */ - H5FD_t *lf; /* file driver part of `shared' */ - haddr_t stored_eof; /* stored end-of-file address in file */ - haddr_t eof; /* end of file address */ - uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */ - uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */ - const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */ - size_t variable_size; /*variable sizeof superblock */ - uint8_t *p; /* Temporary pointer into encoding buffer */ - unsigned super_vers; /* Superblock version */ - hbool_t *dirtied = (hbool_t *)_udata; /* Set up dirtied out value */ - H5F_super_t *ret_value; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_eq(addr, 0)); - HDassert(dirtied); + HDassert(image_len); - /* Short cuts */ - shared = f->shared; - lf = shared->lf; + /* Set the initial image length size */ + *image_len = H5F_SUPERBLOCK_FIXED_SIZE + /* Fixed size of superblock */ + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE; - /* Get the shared file creation property list */ - if(NULL == (c_plist = (H5P_genplist_t *)H5I_object(shared->fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5F__cache_superblock_get_load_size() */ - /* Get the base address for the file in the VFD */ - if(HADDR_UNDEF == (base_addr = H5FD_get_base_addr(lf))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "failed to get base address for file driver") + +/*------------------------------------------------------------------------- + * Function: H5F__cache_superblock_deserialize + * + * Purpose: Loads an object from the disk. + * + * Return: Success: Pointer to new object + * Failure: NULL + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 18 2013 + * + *------------------------------------------------------------------------- + */ +static void * +H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) +{ + H5F_super_t *sblock = NULL; /* File's superblock */ + H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ + size_t variable_size; /* Sariable size of superblock */ + unsigned super_vers; /* Superblock version */ + uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */ + uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */ + H5F_super_t *ret_value; /* Return value */ + + FUNC_ENTER_STATIC + + /* Check arguments */ + HDassert(image); + HDassert(udata); + HDassert(udata->f); /* Allocate space for the superblock */ if(NULL == (sblock = H5FL_CALLOC(H5F_super_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - /* The superblock must be flushed last (and collectively in parallel) */ - sblock->cache_info.flush_me_last = TRUE; -#ifdef H5_HAVE_PARALLEL - sblock->cache_info.flush_me_collectively = TRUE; -#endif - - /* Get the DXPL plist object for DXPL ID */ - if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list") - - /* Read fixed-size portion of the superblock */ - p = sbuf; - H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t); - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") - if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0) - HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock") - /* Skip over signature (already checked when locating the superblock) */ - p += H5F_SIGNATURE_LEN; + image += H5F_SIGNATURE_LEN; /* Superblock version */ - super_vers = *p++; + super_vers = *image++; if(super_vers > HDF5_SUPERBLOCK_VERSION_LATEST) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad superblock version number") - if(H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set superblock version") /* Record the superblock version */ sblock->super_vers = super_vers; /* Sanity check */ - HDassert(((size_t)(p - sbuf)) == fixed_size); + HDassert(((size_t)(image - (const uint8_t *)_image)) == H5F_SUPERBLOCK_FIXED_SIZE); + HDassert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6); + + /* Determine the size of addresses & size of offsets, for computing the + * variable-sized portion of the superblock. + */ + if(super_vers < HDF5_SUPERBLOCK_VERSION_2) { + sizeof_addr = image[4]; + sizeof_size = image[5]; + } /* end if */ + else { + sizeof_addr = image[0]; + sizeof_size = image[1]; + } /* end else */ + if(sizeof_addr != 2 && sizeof_addr != 4 && + sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address") + if(sizeof_size != 2 && sizeof_size != 4 && + sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size") + sblock->sizeof_addr = sizeof_addr; + sblock->sizeof_size = sizeof_size; /* Determine the size of the variable-length part of the superblock */ - variable_size = (size_t)H5F_SUPERBLOCK_VARLEN_SIZE(super_vers, f); + variable_size = (size_t)H5F_SUPERBLOCK_VARLEN_SIZE(super_vers, sizeof_addr, sizeof_size); HDassert(variable_size > 0); - HDassert(fixed_size + variable_size <= sizeof(sbuf)); - /* Read in variable-sized portion of superblock */ - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)(fixed_size + variable_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") - if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read superblock") + /* Handle metadata cache retry for variable-sized portion of the superblock */ + if(len != (H5F_SUPERBLOCK_FIXED_SIZE + variable_size)) { + /* Sanity check */ + HDassert(len == (H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE)); - /* Check for older version of superblock format */ - if(super_vers < HDF5_SUPERBLOCK_VERSION_2) { - uint32_t status_flags; /* File status flags */ - unsigned btree_k[H5B_NUM_BTREE_ID]; /* B-tree internal node 'K' values */ - unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */ - - /* Freespace version (hard-wired) */ - if(HDF5_FREESPACE_VERSION != *p++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad free space version number") - - /* Root group version number (hard-wired) */ - if(HDF5_OBJECTDIR_VERSION != *p++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad object directory version number") - - /* Skip over reserved byte */ - p++; - - /* Shared header version number (hard-wired) */ - if(HDF5_SHAREDHEADER_VERSION != *p++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad shared-header format version number") - - /* Size of file addresses */ - sizeof_addr = *p++; - if(sizeof_addr != 2 && sizeof_addr != 4 && - sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address") - if(H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number in an address") - shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */ - - /* Size of file sizes */ - sizeof_size = *p++; - if(sizeof_size != 2 && sizeof_size != 4 && - sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size") - if(H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number for object size") - shared->sizeof_size = sizeof_size; /* Keep a local copy also */ - - /* Skip over reserved byte */ - p++; - - /* Various B-tree sizes */ - UINT16DECODE(p, sym_leaf_k); - if(sym_leaf_k == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad symbol table leaf node 1/2 rank") - if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &sym_leaf_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for symbol table leaf nodes") - sblock->sym_leaf_k = sym_leaf_k; /* Keep a local copy also */ - - /* Need 'get' call to set other array values */ - if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes") - UINT16DECODE(p, btree_k[H5B_SNODE_ID]); - if(btree_k[H5B_SNODE_ID] == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad 1/2 rank for btree internal nodes") - /* - * Delay setting the value in the property list until we've checked - * for the indexed storage B-tree internal 'K' value later. - */ - - /* File status flags (not really used yet) */ - UINT32DECODE(p, status_flags); - HDassert(status_flags <= 255); - sblock->status_flags = (uint8_t)status_flags; - if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") - - /* - * If the superblock version # is greater than 0, read in the indexed - * storage B-tree internal 'K' value - */ - if(super_vers > HDF5_SUPERBLOCK_VERSION_DEF) { - UINT16DECODE(p, btree_k[H5B_CHUNK_ID]); - /* Reserved bytes are present only in version 1 */ - if(super_vers == HDF5_SUPERBLOCK_VERSION_1) - p += 2; /* reserved */ - } /* end if */ - else - btree_k[H5B_CHUNK_ID] = HDF5_BTREE_CHUNK_IK_DEF; + /* Make certain we can read the variabled-sized portion of the superblock */ + if(H5F__set_eoa(udata->f, H5FD_MEM_SUPER, (haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + variable_size)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") + } /* end if */ + else { + /* Check for older version of superblock format */ + if(super_vers < HDF5_SUPERBLOCK_VERSION_2) { + uint32_t status_flags; /* File status flags */ + unsigned sym_leaf_k; /* Symbol table leaf node's 'K' value */ + unsigned snode_btree_k; /* B-tree symbol table internal node 'K' value */ + unsigned chunk_btree_k; /* B-tree chunk internal node 'K' value */ + + /* Freespace version (hard-wired) */ + if(HDF5_FREESPACE_VERSION != *image++) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad free space version number") + + /* Root group version number (hard-wired) */ + if(HDF5_OBJECTDIR_VERSION != *image++) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad object directory version number") + + /* Skip over reserved byte */ + image++; + + /* Shared header version number (hard-wired) */ + if(HDF5_SHAREDHEADER_VERSION != *image++) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad shared-header format version number") + + /* Size of file addresses */ + sizeof_addr = *image++; + if(sizeof_addr != 2 && sizeof_addr != 4 && + sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address") + sblock->sizeof_addr = sizeof_addr; + udata->f->shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */ + + /* Size of file sizes */ + sizeof_size = *image++; + if(sizeof_size != 2 && sizeof_size != 4 && + sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size") + sblock->sizeof_size = sizeof_size; + udata->f->shared->sizeof_size = sizeof_size; /* Keep a local copy also */ + + /* Skip over reserved byte */ + image++; + + /* Various B-tree sizes */ + UINT16DECODE(image, sym_leaf_k); + if(sym_leaf_k == 0) + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad symbol table leaf node 1/2 rank") + udata->sym_leaf_k = sym_leaf_k; /* Keep a local copy also */ + + /* Need 'get' call to set other array values */ + UINT16DECODE(image, snode_btree_k); + if(snode_btree_k == 0) + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad 1/2 rank for btree internal nodes") + udata->btree_k[H5B_SNODE_ID] = snode_btree_k; - /* Set the B-tree internal node values, etc */ - if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for btree internal nodes") - HDmemcpy(sblock->btree_k, btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID); /* Keep a local copy also */ + /* + * Delay setting the value in the property list until we've checked + * for the indexed storage B-tree internal 'K' value later. + */ - /* Remainder of "variable-sized" portion of superblock */ - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &stored_eof/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->driver_addr/*out*/); + /* File status flags (not really used yet) */ + UINT32DECODE(image, status_flags); + HDassert(status_flags <= 255); + sblock->status_flags = (uint8_t)status_flags; + if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") - /* Allocate space for the root group symbol table entry */ - HDassert(!sblock->root_ent); - if(NULL == (sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't allocate space for root group symbol table entry") + /* + * If the superblock version # is greater than 0, read in the indexed + * storage B-tree internal 'K' value + */ + if(super_vers > HDF5_SUPERBLOCK_VERSION_DEF) { + UINT16DECODE(image, chunk_btree_k); - /* decode the root group symbol table entry */ - if(H5G_ent_decode(f, (const uint8_t **)&p, sblock->root_ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode root group symbol table entry") + /* Reserved bytes are present only in version 1 */ + if(super_vers == HDF5_SUPERBLOCK_VERSION_1) + image += 2; /* reserved */ + } /* end if */ + else + chunk_btree_k = HDF5_BTREE_CHUNK_IK_DEF; + udata->btree_k[H5B_CHUNK_ID] = chunk_btree_k; + + /* Remainder of "variable-sized" portion of superblock */ + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->base_addr/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->ext_addr/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &udata->stored_eof/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->driver_addr/*out*/); + + /* Allocate space for the root group symbol table entry */ + HDassert(!sblock->root_ent); + if(NULL == (sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t)))) + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't allocate space for root group symbol table entry") + + /* decode the root group symbol table entry */ + if(H5G_ent_decode(udata->f, (const uint8_t **)&image, sblock->root_ent) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode root group symbol table entry") + + /* Set the root group address to the correct value */ + sblock->root_addr = sblock->root_ent->header; + + /* This step is for h5repart tool only. If user wants to change file driver + * from family to sec2 while using h5repart, set the driver address to + * undefined to let the library ignore the family driver information saved + * in the superblock. + */ + if(udata->ignore_drvrinfo && H5F_addr_defined(sblock->driver_addr)) { + /* Eliminate the driver info */ + sblock->driver_addr = HADDR_UNDEF; + udata->drvrinfo_removed = TRUE; + } /* end if */ - /* Set the root group address to the correct value */ - sblock->root_addr = sblock->root_ent->header; + /* NOTE: Driver info block is decoded separately, later */ - /* - * Check if superblock address is different from base address and - * adjust base address and "end of address" address if so. - */ - if(!H5F_addr_eq(base_addr, sblock->base_addr)) { - /* Check if the superblock moved earlier in the file */ - if(H5F_addr_lt(base_addr, sblock->base_addr)) - stored_eof -= (sblock->base_addr - base_addr); - else - /* The superblock moved later in the file */ - stored_eof += (base_addr - sblock->base_addr); + } /* end if */ + else { + uint32_t computed_chksum; /* Computed checksum */ + uint32_t read_chksum; /* Checksum read from file */ + + /* Size of file addresses */ + sizeof_addr = *image++; + if(sizeof_addr != 2 && sizeof_addr != 4 && + sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address") + sblock->sizeof_addr = sizeof_addr; + udata->f->shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */ + + /* Size of file sizes */ + sizeof_size = *image++; + if(sizeof_size != 2 && sizeof_size != 4 && + sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size") + sblock->sizeof_size = sizeof_size; + udata->f->shared->sizeof_size = sizeof_size; /* Keep a local copy also */ + + /* File status flags (not really used yet) */ + sblock->status_flags = *image++; + if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") + + /* Base, superblock extension, end of file & root group object header addresses */ + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->base_addr/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->ext_addr/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &udata->stored_eof/*out*/); + H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->root_addr/*out*/); + + /* Compute checksum for superblock */ + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); + + /* Decode checksum */ + UINT32DECODE(image, read_chksum); + + /* Verify correct checksum */ + if(read_chksum != computed_chksum) + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "bad checksum on driver information block") + + /* The Driver Information Block may not appear with the version + * 2 super block. Thus we set the driver_addr field of the in + * core representation of the super block HADDR_UNDEF to prevent + * any attempt to load the Driver Information Block. + */ + sblock->driver_addr = HADDR_UNDEF; + } /* end else */ + } /* end else */ - /* Adjust base address for offsets of the HDF5 data in the file */ - sblock->base_addr = base_addr; + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) <= len); - /* Set the base address for the file in the VFD now */ - if(H5FD_set_base_addr(lf, sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "failed to set base address for file driver") + /* Set return value */ + ret_value = sblock; - /* Indicate that the superblock should be marked dirty */ - *dirtied = TRUE; - } /* end if */ +done: + /* Release the [possibly partially initialized] superblock on error */ + if(!ret_value && sblock) + if(H5F__super_free(sblock) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTFREE, NULL, "unable to destroy superblock data") - /* This step is for h5repart tool only. If user wants to change file driver - * from family to sec2 while using h5repart, set the driver address to - * undefined to let the library ignore the family driver information saved - * in the superblock. - */ - if(H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) { - /* Eliminate the driver info */ - sblock->driver_addr = HADDR_UNDEF; + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5F__cache_superblock_deserialize() */ - /* Indicate that the superblock should be marked dirty */ - *dirtied = TRUE; - } /* end if */ + +/*------------------------------------------------------------------------- + * Function: H5F__cache_superblock_image_len + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 19, 2013 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5F__cache_superblock_image_len(const void *_thing, size_t *image_len, hbool_t *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) +{ + const H5F_super_t *sblock = (const H5F_super_t *)_thing; /* Pointer to the object */ - /* Decode the optional driver information block */ - if(H5F_addr_defined(sblock->driver_addr)) { - uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Buffer for driver info block */ - char drv_name[9]; /* Name of driver */ - unsigned drv_vers; /* Version of driver info block */ - size_t drv_variable_size; /* Size of variable-length portion of driver info block, in bytes */ - - /* Read in fixed-sized portion of driver info block */ - p = dbuf; - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") - if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read driver information block") - - /* Version number */ - drv_vers = *p++; - if(drv_vers != HDF5_DRIVERINFO_VERSION_0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "bad driver information block version number") - - p += 3; /* reserved bytes */ - - /* Driver info size */ - UINT32DECODE(p, drv_variable_size); - - /* Sanity check */ - HDassert(H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size <= sizeof(dbuf)); - - /* Driver name and/or version */ - HDstrncpy(drv_name, (const char *)p, (size_t)8); - drv_name[8] = '\0'; - p += 8; /* advance past name/version */ - - /* Read in variable-sized portion of driver info block */ - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") - if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information") - - /* Decode driver information */ - if(H5FD_sb_load(lf, drv_name, p) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information") - } /* end if */ - } /* end if */ - else { - uint32_t computed_chksum; /* Computed checksum */ - uint32_t read_chksum; /* Checksum read from file */ - - /* Size of file addresses */ - sizeof_addr = *p++; - if(sizeof_addr != 2 && sizeof_addr != 4 && - sizeof_addr != 8 && sizeof_addr != 16 && sizeof_addr != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number in an address") - if(H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sizeof_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number in an address") - shared->sizeof_addr = sizeof_addr; /* Keep a local copy also */ - - /* Size of file sizes */ - sizeof_size = *p++; - if(sizeof_size != 2 && sizeof_size != 4 && - sizeof_size != 8 && sizeof_size != 16 && sizeof_size != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad byte number for object size") - if(H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sizeof_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set byte number for object size") - shared->sizeof_size = sizeof_size; /* Keep a local copy also */ - - /* File status flags (not really used yet) */ - sblock->status_flags = *p++; - if(sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") - - /* Base, superblock extension, end of file & root group object header addresses */ - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->base_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->ext_addr/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &stored_eof/*out*/); - H5F_addr_decode(f, (const uint8_t **)&p, &sblock->root_addr/*out*/); - - /* Compute checksum for superblock */ - computed_chksum = H5_checksum_metadata(sbuf, (size_t)(p - sbuf), 0); - - /* Decode checksum */ - UINT32DECODE(p, read_chksum); - - /* Verify correct checksum */ - if(read_chksum != computed_chksum) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "bad checksum on driver information block") + FUNC_ENTER_STATIC_NOERR - /* - * Check if superblock address is different from base address and - * adjust base address and "end of address" address if so. - */ - if(!H5F_addr_eq(base_addr, sblock->base_addr)) { - /* Check if the superblock moved earlier in the file */ - if(H5F_addr_lt(base_addr, sblock->base_addr)) - stored_eof -= (sblock->base_addr - base_addr); - else - /* The superblock moved later in the file */ - stored_eof += (base_addr - sblock->base_addr); + /* Check arguments */ + HDassert(sblock); + HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK); + HDassert(image_len); + HDassert(compressed_ptr); - /* Adjust base address for offsets of the HDF5 data in the file */ - sblock->base_addr = base_addr; + /* Set the image length size */ + *image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock); - /* Set the base address for the file in the VFD now */ - if(H5FD_set_base_addr(lf, sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "failed to set base address for file driver") + /* Set *compressed_ptr to FALSE unconditionally */ + *compressed_ptr; - /* Indicate that the superblock should be marked dirty */ - *dirtied = TRUE; - } /* end if */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5F__cache_superblock_image_len() */ - /* Get the B-tree internal node values, etc */ - if(H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, sblock->btree_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes") - if(H5P_get(c_plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get rank for btree internal nodes") - } /* end else */ + +/*------------------------------------------------------------------------- + * Function: H5FS__cache_hdf_pre_serialize + * + * Purpose: The current use of this function is a cludge to repair an + * oversight in the conversion of the superblock code to use the + * version 3 cache. + * + * In the V2 metadata cache callbacks, the superblock dirver info + * message was updated in the flush routine. Note that this + * operation only applies to version 2 or later superblocks. + * + * Somehow, this functionality was lost in the conversion to use + * the V3 cache, causing failures with the multi file driver + * (and possibly the family file driver as well). + * + * Performing this operation is impossible in the current + * serialize routine, as the dxpl_id is not available. While + * I am pretty sure that this is not the correct place for this + * functionality, as I can see it causing problems with both + * journaling and possibly parallel HDF5 as well, I am placing + * code for the necessary update in the pre_serialize call for + * now for testing purposes. We will almost certainly want to + * change this. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 10/82/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5F__cache_superblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *_thing, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED len, + size_t H5_ATTR_UNUSED compressed_len, haddr_t H5_ATTR_UNUSED *new_addr, + size_t H5_ATTR_UNUSED *new_len, size_t H5_ATTR_UNUSED *new_compressed_len, + unsigned H5_ATTR_UNUSED *flags) +{ + H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the super block */ + herr_t ret_value = SUCCEED; /* Return value */ - /* - * The user-defined data is the area of the file before the base - * address. - */ - if(H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &sblock->base_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set userblock size") + FUNC_ENTER_NOAPI_NOINIT - /* - * Make sure that the data is not truncated. One case where this is - * possible is if the first file of a family of files was opened - * individually. - */ - if(HADDR_UNDEF == (eof = H5FD_get_eof(lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to determine file size") - - /* (Account for the stored EOF being absolute offset -QAK) */ - if((eof + sblock->base_addr) < stored_eof) - HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, - "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eof = %llu", - (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eof) - - /* - * Tell the file driver how much address space has already been - * allocated so that it knows how to allocate additional memory. - */ - /* (Account for the stored EOA being absolute offset -NAF) */ - if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eof - sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to set end-of-address marker for file") - - /* Read the file's superblock extension, if there is one. */ - if(H5F_addr_defined(sblock->ext_addr)) { - H5O_loc_t ext_loc; /* "Object location" for superblock extension */ - H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */ - H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */ - size_t u; /* Local index variable */ - htri_t status; /* Status for message existing */ - - /* Sanity check - superblock extension should only be defined for - * superblock version >= 2. + /* Sanity check */ + HDassert(f); + HDassert(sblock); + HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK); + HDassert(flags); + + if(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2) { + /* WARNING: This code almost certainly doesn't belong here. Must + * discuss with Quincey where to put it. Note issues + * for journaling and possibly parallel. + * + * -- JRM */ - HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2); - - /* Check for superblock extension being located "outside" the stored - * 'eoa' value, which can occur with the split/multi VFD. + /* Update the driver information message in the superblock extension + * if appropriate. */ - if(H5F_addr_gt(sblock->ext_addr, stored_eof)) { - /* Set the 'eoa' for the object header memory type large enough - * to give some room for a reasonably sized superblock extension. - * (This is _rather_ a kludge -QAK) - */ - if(H5FD_set_eoa(lf, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to set end-of-address marker for file") - } /* end if */ + if(H5F_addr_defined(sblock->ext_addr)) { + size_t driver_size; /* Size of driver info block (bytes)*/ + H5O_loc_t ext_loc; /* "Object location" for superblock extension */ - /* Open the superblock extension */ - if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, NULL, "unable to open file's superblock extension") + HDassert(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2); + + /* Open the superblock extension's object header */ + if(H5F_super_ext_open((H5F_t *)f, sblock->ext_addr, &ext_loc) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") - /* Check for the extension having a 'driver info' message */ - if((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID, dxpl_id)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to read object header") - if(status) { /* Check for ignoring the driver info for this file */ - if(H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) { - /* Indicate that the superblock should be marked dirty */ - *dirtied = TRUE; - } /* end if */ - else { - /* Retrieve the 'driver info' structure */ - if(NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo, dxpl_id)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "driver info message not present") - - /* Decode driver information */ - if(H5FD_sb_load(lf, drvinfo.name, drvinfo.buf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information") - - /* Reset driver info message */ - H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo); - } /* end else */ - } /* end if */ + if(!H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) { + /* Check for driver info message */ + H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); + if(driver_size > 0) { + H5O_drvinfo_t drvinfo; /* Driver info */ + uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */ - /* Read in the shared OH message information if there is any */ - if(H5SM_get_info(&ext_loc, c_plist, dxpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read SOHM table information") - - /* Check for the extension having a 'v1 B-tree "K"' message */ - if((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID, dxpl_id)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to read object header") - if(status) { - /* Retrieve the 'v1 B-tree "K"' structure */ - if(NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek, dxpl_id)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "v1 B-tree 'K' info message not present") - - /* Set non-default v1 B-tree 'K' value info from file */ - sblock->btree_k[H5B_CHUNK_ID] = btreek.btree_k[H5B_CHUNK_ID]; - sblock->btree_k[H5B_SNODE_ID] = btreek.btree_k[H5B_SNODE_ID]; - sblock->sym_leaf_k = btreek.sym_leaf_k; - - /* Set non-default v1 B-tree 'K' values in the property list */ - if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for btree internal nodes") - if(H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, NULL, "unable to set rank for symbol table leaf nodes") - } /* end if */ + /* Sanity check */ + HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE); - /* Check for the extension having a 'free-space manager info' message */ - if((status = H5O_msg_exists(&ext_loc, H5O_FSINFO_ID, dxpl_id)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to check object header") - if(status) { - H5O_fsinfo_t fsinfo; /* Free-space manager info message from superblock extension */ - - /* Retrieve the 'free-space manager info' structure */ - if(NULL == H5O_msg_read(&ext_loc, H5O_FSINFO_ID, &fsinfo, dxpl_id)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get free-space manager info message") - - if(shared->fs_strategy != fsinfo.strategy) { - shared->fs_strategy = fsinfo.strategy; - - /* Set non-default strategy in the property list */ - if(H5P_set(c_plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &fsinfo.strategy) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "unable to set file space strategy") - } /* end if */ - if(shared->fs_threshold != fsinfo.threshold) { - shared->fs_threshold = fsinfo.threshold; - - /* Set non-default threshold in the property list */ - if(H5P_set(c_plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &fsinfo.threshold) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "unable to set file space strategy") - } /* end if */ - - /* set free-space manager addresses */ - shared->fs_addr[0] = HADDR_UNDEF; - for(u = 1; u < NELMTS(f->shared->fs_addr); u++) - shared->fs_addr[u] = fsinfo.fs_addr[u-1]; - } /* end if */ + /* Encode driver-specific data */ + if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") - /* Close superblock extension */ - if(H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, NULL, "unable to close file's superblock extension") - } /* end if */ + /* Write driver info information to the superblock extension */ + drvinfo.len = driver_size; + drvinfo.buf = dbuf; + if(H5O_msg_write(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0) + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "unable to update driver info header message") + } /* end if */ + } /* end if */ - /* Set return value */ - ret_value = sblock; + /* Close the superblock extension object header */ + if(H5F_super_ext_close((H5F_t *)f, &ext_loc, dxpl_id, FALSE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension") + } /* end if */ + } /* end if */ done: - /* Release the [possibly partially initialized] superblock on errors */ - if(!ret_value && sblock) - if(H5F__super_free(sblock) < 0) - HDONE_ERROR(H5E_FILE, H5E_CANTFREE, NULL, "unable to destroy superblock data") - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F_sblock_load() */ +} /* end H5FS_cache_superblock_pre_serialize() */ /*------------------------------------------------------------------------- - * Function: H5F_sblock_flush + * Function: H5F__cache_superblock_serialize * - * Purpose: Flushes the superblock. + * Purpose: Flushes a dirty object to disk. * - * Return: Success: SUCCEED - * Failure: NULL + * Return: Non-negative on success/Negative on failure * - * Programmer: Mike McGreevy - * mamcgree@hdfgroup.org - * April 8, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 19 2013 * *------------------------------------------------------------------------- */ static herr_t -H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, - H5F_super_t *sblock) +H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, + void *_thing) { - herr_t ret_value = SUCCEED; + H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the object */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + haddr_t rel_eof; /* Relative EOF for file */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* check arguments */ + /* Sanity check */ HDassert(f); - HDassert(H5F_addr_eq(addr, 0)); + HDassert(image); HDassert(sblock); - + /* Assert that the superblock is marked as being flushed last (and collectively in parallel) */ /* (We'll rely on the cache to make sure it actually *is* flushed @@ -656,301 +619,403 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSE HDassert(sblock->cache_info.flush_me_collectively); #endif - if(sblock->cache_info.is_dirty) { - H5P_genplist_t *dxpl; /* DXPL object */ - uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */ - uint8_t *p; /* Ptr into encoding buffer */ - haddr_t rel_eof; /* Relative EOF for file */ - size_t superblock_size; /* Size of superblock, in bytes */ - size_t driver_size; /* Size of driver info block (bytes)*/ + /* Encode the common portion of the file superblock for all versions */ + HDmemcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN); + image += H5F_SIGNATURE_LEN; + *image++ = (uint8_t)sblock->super_vers; - /* Encode the common portion of the file superblock for all versions */ - p = buf; - HDmemcpy(p, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN); - p += H5F_SIGNATURE_LEN; - *p++ = (uint8_t)sblock->super_vers; + /* Check for older version of superblock format */ + if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { + *image++ = (uint8_t)HDF5_FREESPACE_VERSION; /* (hard-wired) */ + *image++ = (uint8_t)HDF5_OBJECTDIR_VERSION; /* (hard-wired) */ + *image++ = 0; /* reserved*/ - /* Check for older version of superblock format */ - if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { - *p++ = (uint8_t)HDF5_FREESPACE_VERSION; /* (hard-wired) */ - *p++ = (uint8_t)HDF5_OBJECTDIR_VERSION; /* (hard-wired) */ - *p++ = 0; /* reserved*/ + *image++ = (uint8_t)HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */ + *image++ = sblock->sizeof_addr; + *image++ = sblock->sizeof_size; + *image++ = 0; /* reserved */ - *p++ = (uint8_t)HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */ - *p++ = (uint8_t)H5F_SIZEOF_ADDR(f); - *p++ = (uint8_t)H5F_SIZEOF_SIZE(f); - *p++ = 0; /* reserved */ + UINT16ENCODE(image, sblock->sym_leaf_k); + UINT16ENCODE(image, sblock->btree_k[H5B_SNODE_ID]); + UINT32ENCODE(image, (uint32_t)sblock->status_flags); - UINT16ENCODE(p, sblock->sym_leaf_k); - UINT16ENCODE(p, sblock->btree_k[H5B_SNODE_ID]); - UINT32ENCODE(p, (uint32_t)sblock->status_flags); + /* + * Versions of the superblock >0 have the indexed storage B-tree + * internal 'K' value stored + */ + if(sblock->super_vers > HDF5_SUPERBLOCK_VERSION_DEF) { + UINT16ENCODE(image, sblock->btree_k[H5B_CHUNK_ID]); + *image++ = 0; /*reserved */ + *image++ = 0; /*reserved */ + } /* end if */ - /* - * Versions of the superblock >0 have the indexed storage B-tree - * internal 'K' value stored - */ - if(sblock->super_vers > HDF5_SUPERBLOCK_VERSION_DEF) { - UINT16ENCODE(p, sblock->btree_k[H5B_CHUNK_ID]); - *p++ = 0; /*reserved */ - *p++ = 0; /*reserved */ - } /* end if */ + /* Encode the base address */ + H5F_addr_encode(f, &image, sblock->base_addr); - /* Encode the base address */ - H5F_addr_encode(f, &p, sblock->base_addr); - - /* Encode the address of global free-space index */ - H5F_addr_encode(f, &p, sblock->ext_addr); - - /* Encode the end-of-file address. Note that at this point in time, - * the EOF value itself may not be reflective of the file's size, as - * we will eventually truncate the file to match the EOA value. As - * such, use the EOA value in its place, knowing that the current EOF - * value will ultimately match it. */ - if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") - H5F_addr_encode(f, &p, (rel_eof + sblock->base_addr)); - - /* Encode the driver informaton block address */ - H5F_addr_encode(f, &p, sblock->driver_addr); - - /* Encode the root group object entry, including the cached stab info */ - if(H5G_ent_encode(f, &p, sblock->root_ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry") - - /* Encode the driver information block. */ - H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); - - /* Checking whether driver block address is defined here is to handle backward - * compatibility. If the file was created with v1.6 library or earlier and no - * driver info block was written in the superblock, we don't write it either even - * though there's some driver info. Otherwise, the driver block extended will - * overwrite the (meta)data right after the superblock. This situation happens to - * the family driver particularly. SLU - 2009/3/24 - */ - if(driver_size > 0 && H5F_addr_defined(sblock->driver_addr)) { - char driver_name[9]; /* Name of driver, for driver info block */ - uint8_t *dbuf = p; /* Pointer to beginning of driver info */ + /* Encode the address of global free-space index */ + H5F_addr_encode(f, &image, sblock->ext_addr); - /* Encode the driver information block */ - *p++ = HDF5_DRIVERINFO_VERSION_0; /* Version */ - *p++ = 0; /* reserved */ - *p++ = 0; /* reserved */ - *p++ = 0; /* reserved */ + /* Encode the end-of-file address. Note that at this point in time, + * the EOF value itself may not be reflective of the file's size, as + * we will eventually truncate the file to match the EOA value. As + * such, use the EOA value in its place, knowing that the current EOF + * value will ultimately match it. */ + if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + H5F_addr_encode(f, &image, (rel_eof + sblock->base_addr)); - /* Driver info size, excluding header */ - UINT32ENCODE(p, driver_size); + /* Encode the driver informaton block address */ + H5F_addr_encode(f, &image, sblock->driver_addr); - /* Encode driver-specific data */ - if(H5FD_sb_encode(f->shared->lf, driver_name, dbuf + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + /* Encode the root group object entry, including the cached stab info */ + if(H5G_ent_encode(f, &image, sblock->root_ent) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry") - /* Store driver name (set in 'H5FD_sb_encode' call above) */ - HDmemcpy(p, driver_name, (size_t)8); + /* NOTE: Driver info block is handled separately */ - /* Advance buffer pointer past name & variable-sized portion of driver info */ - /* (for later use in computing the superblock size) */ - p += 8 + driver_size; - } /* end if */ - } /* end if */ - else { - uint32_t chksum; /* Checksum temporary variable */ - H5O_loc_t *root_oloc; /* Pointer to root group's object location */ + } /* end if */ + else { /* sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 */ + uint32_t chksum; /* Checksum temporary variable */ + H5O_loc_t *root_oloc; /* Pointer to root group's object location */ - /* Size of file addresses & offsets, and status flags */ - *p++ = (uint8_t)H5F_SIZEOF_ADDR(f); - *p++ = (uint8_t)H5F_SIZEOF_SIZE(f); - *p++ = sblock->status_flags; + /* Size of file addresses & offsets, and status flags */ + *image++ = sblock->sizeof_addr; + *image++ = sblock->sizeof_size; + *image++ = sblock->status_flags; - /* Encode the base address */ - H5F_addr_encode(f, &p, sblock->base_addr); + /* Encode the base address */ + H5F_addr_encode(f, &image, sblock->base_addr); - /* Encode the address of the superblock extension */ - H5F_addr_encode(f, &p, sblock->ext_addr); + /* Encode the address of the superblock extension */ + H5F_addr_encode(f, &image, sblock->ext_addr); - /* At this point in time, the EOF value itself may - * not be reflective of the file's size, since we'll eventually - * truncate it to match the EOA value. As such, use the EOA value - * in its place, knowing that the current EOF value will - * ultimately match it. */ - if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") - H5F_addr_encode(f, &p, (rel_eof + sblock->base_addr)); + /* At this point in time, the EOF value itself may + * not be reflective of the file's size, since we'll eventually + * truncate it to match the EOA value. As such, use the EOA value + * in its place, knowing that the current EOF value will + * ultimately match it. */ + if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + H5F_addr_encode(f, &image, (rel_eof + sblock->base_addr)); - /* Retrieve information for root group */ - if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information") + /* Retrieve information for root group */ + if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp))) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information") - /* Encode address of root group's object header */ - H5F_addr_encode(f, &p, root_oloc->addr); + /* Encode address of root group's object header */ + H5F_addr_encode(f, &image, root_oloc->addr); - /* Compute superblock checksum */ - chksum = H5_checksum_metadata(buf, ((size_t)H5F_SUPERBLOCK_SIZE(sblock->super_vers, f) - H5F_SIZEOF_CHKSUM), 0); + /* Compute superblock checksum */ + chksum = H5_checksum_metadata(_image, ((size_t)H5F_SUPERBLOCK_SIZE(sblock) - H5F_SIZEOF_CHKSUM), 0); - /* Superblock checksum */ - UINT32ENCODE(p, chksum); + /* Superblock checksum */ + UINT32ENCODE(image, chksum); - /* Sanity check */ - HDassert((size_t)(p - buf) == (size_t)H5F_SUPERBLOCK_SIZE(sblock->super_vers, f)); - } /* end else */ + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock)); + } /* end else */ - /* Retrieve the total size of the superblock info */ - H5_CHECKED_ASSIGN(superblock_size, size_t, (p - buf), ptrdiff_t); + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); - /* Double check we didn't overrun the block (unlikely) */ - HDassert(superblock_size <= sizeof(buf)); +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__cache_superblock_serialize() */ - /* Get the DXPL plist object for DXPL ID */ - if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + +/*------------------------------------------------------------------------- + * Function: H5F__cache_superblock_free_icr + * + * Purpose: Destroy/release an "in core representation" of a data + * structure + * + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20, 2013 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5F__cache_superblock_free_icr(void *_thing) +{ + H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the object */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Write superblock */ - /* (always at relative address 0) */ - if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write superblock") + FUNC_ENTER_STATIC - /* Check for newer version of superblock format & superblock extension */ - if(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && H5F_addr_defined(sblock->ext_addr)) { - H5O_loc_t ext_loc; /* "Object location" for superblock extension */ + /* Sanity check */ + HDassert(sblock); + HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK); - /* Open the superblock extension's object header */ - if(H5F_super_ext_open(f, sblock->ext_addr, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") + /* Destroy superblock */ + if(H5F__super_free(sblock) < 0) + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free superblock") - /* Check for ignoring the driver info for this file */ - if(!H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO)) { - /* Check for driver info message */ - H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); - if(driver_size > 0) { - H5O_drvinfo_t drvinfo; /* Driver info */ - uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */ +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__cache_superblock_free_icr() */ - /* Sanity check */ - HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE); + +/*------------------------------------------------------------------------- + * Function: H5F__cache_drvrinfo_get_load_size + * + * Purpose: Compute the size of the data structure on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20, 2013 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5F__cache_drvrinfo_get_load_size(const void H5_ATTR_UNUSED *udata, size_t *image_len) +{ + FUNC_ENTER_STATIC_NOERR - /* Encode driver-specific data */ - if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + /* Check arguments */ + HDassert(image_len); - /* Write driver info information to the superblock extension */ - drvinfo.len = driver_size; - drvinfo.buf = dbuf; - if(H5O_msg_write(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "unable to update driver info header message") + /* Set the initial image length size */ + *image_len = H5F_DRVINFOBLOCK_HDR_SIZE; /* Fixed size portion of driver info block */ - } /* end if */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5F__cache_drvrinfo_get_load_size() */ - } /* end if */ + +/*------------------------------------------------------------------------- + * Function: H5F__cache_drvrinfo_deserialize + * + * Purpose: Loads an object from the disk. + * + * Return: Success: Pointer to a new B-tree. + * Failure: NULL + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20 2013 + * + *------------------------------------------------------------------------- + */ +static void * +H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) +{ + H5O_drvinfo_t *drvinfo = NULL; /* Driver info */ + H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ + char drv_name[9]; /* Name of driver */ + unsigned drv_vers; /* Version of driver info block */ + H5O_drvinfo_t *ret_value; /* Return value */ - /* Close the superblock extension object header */ - if(H5F_super_ext_close(f, &ext_loc, dxpl_id, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension") - } /* end if */ + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(image); + HDassert(len >= H5F_DRVINFOBLOCK_HDR_SIZE); + HDassert(udata); + HDassert(udata->f); + + /* Allocate space for the driver info */ + if(NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "memory allocation failed for driver info message") + + /* Version number */ + drv_vers = *image++; + if(drv_vers != HDF5_DRIVERINFO_VERSION_0) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad driver information block version number") + + image += 3; /* reserved bytes */ + + /* Driver info size */ + UINT32DECODE(image, drvinfo->len); + + /* Driver name and/or version */ + HDstrncpy(drv_name, (const char *)image, (size_t)8); + drv_name[8] = '\0'; + image += 8; /* advance past name/version */ + + /* Handle metadata cache retry for variable-sized portion of the driver info block */ + if(len != (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len)) { + /* Sanity check */ + HDassert(len == H5F_DRVINFOBLOCK_HDR_SIZE); + + /* extend the eoa if required so that we can read the complete driver info block */ + { + haddr_t eoa; + haddr_t min_eoa; + + /* get current eoa... */ + if ((eoa = H5FD_get_eoa(udata->f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, NULL, "driver get_eoa request failed") + + /* ... if it is too small, extend it. */ + min_eoa = udata->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len; + + if ( H5F_addr_gt(min_eoa, eoa) ) + if(H5FD_set_eoa(udata->f->shared->lf, H5FD_MEM_SUPER, min_eoa) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, \ + "set end of space allocation request failed") + } - /* Reset the dirty flag. */ - sblock->cache_info.is_dirty = FALSE; + } /* end if */ + else { + /* Validate and decode driver information */ + if(H5FD_sb_load(udata->f->shared->lf, drv_name, image) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "unable to decode driver information") } /* end if */ - if(destroy) - if(H5F_sblock_dest(f, sblock) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CLOSEERROR, FAIL, "can't close superblock") + /* Sanity check */ + HDassert((size_t)(image - (const uint8_t *)_image) <= len); + + /* Set return value */ + ret_value = drvinfo; done: + /* Release the [possibly partially initialized] driver info message on error */ + if(!ret_value && drvinfo) + H5MM_xfree(drvinfo); + FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F_sblock_flush() */ +} /* end H5F__cache_drvrinfo_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5F_sblock_dest + * Function: H5F__cache_drvrinfo_image_len * - * Purpose: Frees memory used by the superblock. + * Purpose: Compute the size of the data structure on disk. * * Return: Non-negative on success/Negative on failure * - * Programmer: Mike McGreevy - * April 8, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20, 2013 * *------------------------------------------------------------------------- */ static herr_t -H5F_sblock_dest(H5F_t H5_ATTR_UNUSED *f, H5F_super_t* sblock) +H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5O_drvinfo_t *drvinfo = (const H5O_drvinfo_t *)_thing; /* Pointer to the object */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* Sanity check */ - HDassert(sblock); + /* Check arguments */ + HDassert(drvinfo); + HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO); + HDassert(image_len); + HDassert(compressed_ptr); - /* Free superblock */ - if(H5F__super_free(sblock) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock") + /* Set the image length size */ + *image_len = (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + /* Fixed-size portion of driver info block */ + drvinfo->len); /* Variable-size portion of driver info block */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F_sblock_dest() */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5F__cache_drvrinfo_image_len() */ /*------------------------------------------------------------------------- - * Function: H5F_sblock_clear + * Function: H5F__cache_drvrinfo_serialize * - * Purpose: Mark the superblock as no longer being dirty. + * Purpose: Flushes a dirty object to disk. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mike McGreevy - * April 8, 2009 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20 2013 * *------------------------------------------------------------------------- */ static herr_t -H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy) +H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint8_t *dbuf; /* Pointer to beginning of driver info */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ - HDassert(sblock); + /* check arguments */ + HDassert(f); + HDassert(image); + HDassert(drvinfo); + HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO); + HDassert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len)); + + /* Save pointer to beginning of driver info */ + dbuf = image; + + /* Encode the driver information block */ + *image++ = HDF5_DRIVERINFO_VERSION_0; /* Version */ + *image++ = 0; /* reserved */ + *image++ = 0; /* reserved */ + *image++ = 0; /* reserved */ + + /* Driver info size, excluding header */ + UINT32ENCODE(image, drvinfo->len); - /* Reset the dirty flag. */ - sblock->cache_info.is_dirty = FALSE; + /* Encode driver-specific data */ + if(H5FD_sb_encode(f->shared->lf, (char *)image, dbuf + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") - if(destroy) - if(H5F_sblock_dest(f, sblock) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to delete superblock") + /* Advance buffer pointer past name & variable-sized portion of driver info */ + image += 8 + drvinfo->len; + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F_sblock_clear() */ +} /* H5F__cache_drvrinfo_serialize() */ /*------------------------------------------------------------------------- - * Function: H5F_sblock_size + * Function: H5F__cache_drvrinfo_free_icr * - * Purpose: Returns the size of the superblock encoded on disk. + * Purpose: Destroy/release an "in core representation" of a data + * structure * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Mike McGreevy - * April 8, 2009 + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * July 20, 2013 * *------------------------------------------------------------------------- */ static herr_t -H5F_sblock_size(const H5F_t *f, const H5F_super_t *sblock, size_t *size_ptr) +H5F__cache_drvrinfo_free_icr(void *_thing) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */ - /* check arguments */ - HDassert(f); - HDassert(sblock); - HDassert(size_ptr); + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(drvinfo); + HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO); - /* Set size value */ - *size_ptr = (size_t)H5F_SUPERBLOCK_SIZE(sblock->super_vers, f); + /* Destroy driver info message */ + H5MM_xfree(drvinfo); FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5F_sblock_size() */ +} /* H5F__cache_drvrinfo_free_icr() */ diff --git a/src/H5Gcache.c b/src/H5Gcache.c index bedceb6..8dfecb1 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -46,7 +46,6 @@ /****************/ #define H5G_NODE_VERS 1 /* Symbol table node version number */ -#define H5G_NODE_BUF_SIZE 512 /* Size of stack buffer for serialized nodes */ /******************/ @@ -64,12 +63,14 @@ /********************/ /* Metadata cache (H5AC) callbacks */ -static H5G_node_t *H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5G_node_t *sym, unsigned *flags_ptr); -static herr_t H5G_node_dest(H5F_t *f, H5G_node_t *sym); -static herr_t H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy); -static herr_t H5G_node_size(const H5F_t *f, const H5G_node_t *sym, size_t *size_ptr); +static herr_t H5G__cache_node_get_load_size(const void *udata, size_t *image_len); +static void *H5G__cache_node_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5G__cache_node_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5G__cache_node_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5G__cache_node_free_icr(void *thing); /*********************/ @@ -88,13 +89,19 @@ static herr_t H5G_node_size(const H5F_t *f, const H5G_node_t *sym, size_t *size_ /* Symbol table nodes inherit cache-like properties from H5AC */ const H5AC_class_t H5AC_SNODE[1] = {{ - H5AC_SNODE_ID, - (H5AC_load_func_t)H5G_node_load, - (H5AC_flush_func_t)H5G_node_flush, - (H5AC_dest_func_t)H5G_node_dest, - (H5AC_clear_func_t)H5G_node_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5G_node_size, + H5AC_SNODE_ID, /* Metadata client ID */ + "Symbol table node", /* Metadata client name (for debugging) */ + H5FD_MEM_BTREE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5G__cache_node_get_load_size, /* 'get_load_size' callback */ + H5G__cache_node_deserialize, /* 'deserialize' callback */ + H5G__cache_node_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5G__cache_node_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5G__cache_node_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -106,42 +113,80 @@ H5FL_SEQ_EXTERN(H5G_entry_t); /*------------------------------------------------------------------------- - * Function: H5G_node_load + * Function: H5G__cache_node_get_load_size() * - * Purpose: Loads a symbol table node from the file. + * Purpose: Determine the size of the on disk image of the node, and + * return this value in *image_len. * - * Return: Success: Ptr to the new table. + * Note that this computation requires access to the file pointer, + * which is not provided in the parameter list for this callback. + * Finesse this issue by passing in the file pointer twice to the + * H5AC_protect() call -- once as the file pointer proper, and + * again as the user data. + * + * Return: Success: SUCCEED + * Failure: FAIL * - * Failure: NULL - * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: John Mainzer + * 7/21/14 * *------------------------------------------------------------------------- */ -static H5G_node_t * -H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +static herr_t +H5G__cache_node_get_load_size(const void *_udata, size_t *image_len) { - H5G_node_t *sym = NULL; - H5WB_t *wb = NULL; /* Wrapped buffer for node data */ - uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */ - uint8_t *node; /* Pointer to node buffer */ - const uint8_t *p; - H5G_node_t *ret_value; /*for error handling */ - - FUNC_ENTER_NOAPI_NOINIT - - /* - * Check arguments. - */ + const H5F_t *f = (const H5F_t *)_udata; /* User data for callback */ + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata); + HDassert(image_len); + + /* report image length */ + *image_len = (size_t)(H5G_NODE_SIZE(f)); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5G__cache_node_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5G__cache_node_deserialize + * + * Purpose: Given a buffer containing the on disk image of a symbol table + * node, allocate an instance of H5G_node_t, load the contence of the + * image into it, and return a pointer to the instance. + * + * Note that deserializing the image requires access to the file + * pointer, which is not included in the parameter list for this + * callback. Finesse this issue by passing in the file pointer + * twice to the H5AC_protect() call -- once as the file pointer + * proper, and again as the user data + * + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static void * +H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) +{ + H5F_t *f = (H5F_t *)_udata; /* User data for callback */ + H5G_node_t *sym = NULL; /* Symbol table node created */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer to image to deserialize */ + void * ret_value; /* Return value */ - /* - * Initialize variables. - */ + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(image); + HDassert(len > 0); + HDassert(f); + HDassert(dirty); /* Allocate symbol table data structures */ if(NULL == (sym = H5FL_CALLOC(H5G_node_t))) @@ -150,262 +195,175 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - /* Wrap the local buffer for serialized node info */ - if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf)))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for node */ - if(NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read the serialized symbol table node. */ - if(H5F_block_read(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0) - HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL, "unable to read symbol table node") - - /* Get temporary pointer to serialized node */ - p = node; - /* magic */ - if(HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature") + image += H5_SIZEOF_MAGIC; /* version */ - if(H5G_NODE_VERS != *p++) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version") + if(H5G_NODE_VERS != *image++) + HGOTO_ERROR(H5E_SYM, H5E_VERSION, NULL, "bad symbol table node version") /* reserved */ - p++; + image++; /* number of symbols */ - UINT16DECODE(p, sym->nsyms); + UINT16DECODE(image, sym->nsyms); /* entries */ - if(H5G__ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0) + if(H5G__ent_decode_vec(f, &image, sym->entry, sym->nsyms) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries") /* Set return value */ ret_value = sym; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value) if(sym && H5G__node_free(sym) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTFREE, NULL, "unable to destroy symbol table node") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_node_load() */ +} /* end H5G__cache_node_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5G_node_flush + * Function: H5G__cache_node_image_len * - * Purpose: Flush a symbol table node to disk. + * Purpose: Compute the size of the data structure on disk and return + * it in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_t *sym, unsigned H5_ATTR_UNUSED * flags_ptr) +H5G__cache_node_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for node data */ - uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5G_node_t *sym = (const H5G_node_t *)_thing; /* Pointer to object */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* - * Check arguments. - */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ HDassert(sym); + HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sym->cache_info.type == H5AC_SNODE); + HDassert(image_len); - /* - * Write the symbol node to disk. - */ - if(sym->cache_info.is_dirty) { - uint8_t *node; /* Pointer to node buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - - /* Wrap the local buffer for serialized node info */ - if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf)))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for node */ - if(NULL == (node = (uint8_t *)H5WB_actual(wb, sym->node_size))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Get temporary pointer to serialized symbol table node */ - p = node; - - /* magic number */ - HDmemcpy(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* version number */ - *p++ = H5G_NODE_VERS; - - /* reserved */ - *p++ = 0; - - /* number of symbols */ - UINT16ENCODE(p, sym->nsyms); - - /* entries */ - if(H5G__ent_encode_vec(f, &p, sym->entry, sym->nsyms) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize") - HDmemset(p, 0, sym->node_size - (size_t)(p - node)); - - /* Write the serialized symbol table node. */ - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, sym->node_size, dxpl_id, node) < 0) - HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "unable to write symbol table node to the file") - - /* Reset the node's dirty flag */ - sym->cache_info.is_dirty = FALSE; - } /* end if */ + *image_len = sym->node_size; - /* - * Destroy the symbol node? This might happen if the node is being - * preempted from the cache. - */ - if(destroy) - if(H5G_node_dest(f, sym) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5G__cache_node_image_len() */ -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_node_flush() */ +/*************************************/ +/* no H5G__cache_node_pre_serialize() */ +/*************************************/ /*------------------------------------------------------------------------- - * Function: H5G_node_dest + * Function: H5G__cache_node_serialize * - * Purpose: Destroy a symbol table node in memory. + * Purpose: Given a correctly sized buffer and an instace of H5G_node_t, + * serialize the contents of the instance of H5G_node_t, and write + * this data into the supplied buffer. This buffer will be written + * to disk. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: John Mainzer + * 7/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5G_node_dest(H5F_t *f, H5G_node_t *sym) +H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5G_node_t *sym = (H5G_node_t *)_thing; /* Pointer to object */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ HDassert(f); + HDassert(image); HDassert(sym); + HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sym->cache_info.type == H5AC_SNODE); + HDassert(len == sym->node_size); - /* Verify that node is clean */ - HDassert(sym->cache_info.is_dirty == FALSE); + /* magic number */ + HDmemcpy(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!sym->cache_info.free_file_space_on_destroy || H5F_addr_defined(sym->cache_info.addr)); + /* version number */ + *image++ = H5G_NODE_VERS; - /* Check for freeing file space for symbol table node */ - if(sym->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_BTREE, H5AC_dxpl_id, sym->cache_info.addr, (hsize_t)sym->node_size) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to free symbol table node") - } /* end if */ + /* reserved */ + *image++ = 0; - /* Destroy symbol table node */ - if(H5G__node_free(sym) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node") + /* number of symbols */ + UINT16ENCODE(image, sym->nsyms); + + /* entries */ + if(H5G__ent_encode_vec(f, &image, sym->entry, sym->nsyms) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize") + + /* Clear rest of symbol table node */ + HDmemset(image, 0, sym->node_size - (size_t)(image - (uint8_t *)_image)); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_node_dest() */ +} /* end H5G__cache_node_serialize() */ + + +/***************************************/ +/* no H5G__cache_node_notify() function */ +/***************************************/ /*------------------------------------------------------------------------- - * Function: H5G_node_clear + * Function: H5G__cache_node_free_icr * - * Purpose: Mark a symbol table node in memory as non-dirty. + * Purpose: Destroys a symbol table node in memory. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 20 2003 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy) +H5G__cache_node_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; + H5G_node_t *sym = (H5G_node_t *)_thing; /* Pointer to the object */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ HDassert(sym); + HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(sym->cache_info.type == H5AC_SNODE); - /* Reset the node's dirty flag */ - sym->cache_info.is_dirty = FALSE; - - /* - * Destroy the symbol node? This might happen if the node is being - * preempted from the cache. - */ - if(destroy) - if(H5G_node_dest(f, sym) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node") + /* Destroy symbol table node */ + if(H5G__node_free(sym) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_node_clear() */ - - -/*------------------------------------------------------------------------- - * Function: H5G_node_size - * - * Purpose: Compute the size in bytes of the specified instance of - * H5G_node_t on disk, and return it in *size_ptr. On failure - * the value of size_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/13/04 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G_node_size(const H5F_t H5_ATTR_UNUSED *f, const H5G_node_t *sym, size_t *size_ptr) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* - * Check arguments. - */ - HDassert(f); - HDassert(size_ptr); - - *size_ptr = sym->node_size; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5G_node_size() */ +} /* end H5G__cache_node_free_icr() */ diff --git a/src/H5Gent.c b/src/H5Gent.c index 3f243de..3809933 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -460,7 +460,7 @@ H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name, targ_oloc.addr = lnk->u.hard.addr; /* Get the object header */ - if(NULL == (oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(&targ_oloc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, FAIL, "unable to protect target object header") /* Check if a symbol table message exists */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index d695dac..cbb9a8e 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -541,7 +541,7 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED /* * Load the symbol table node for exclusive access. */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node") /* Get base address of heap */ @@ -647,7 +647,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, /* * Load the symbol node. */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") /* Get base address of heap */ @@ -691,7 +691,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, if(H5G_node_create(f, dxpl_id, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p/*out*/) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node") - if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC_WRITE))) + if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node") HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f), @@ -808,7 +808,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, HDassert(udata && udata->common.heap); /* Load the symbol table */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_WRITE))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") /* "Normal" removal of a single entry from the symbol table node */ @@ -1001,7 +1001,7 @@ H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, h HDassert(udata && udata->heap); /* Protect the symbol table node & local heap while we iterate over entries */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* @@ -1078,7 +1078,7 @@ H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, had HDassert(num_objs); /* Find the object node and add the number of symbol entries. */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") *num_objs += sn->nsyms; @@ -1123,7 +1123,7 @@ H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, ha HDassert(udata); /* Get a pointer to the symbol table node */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* Find the node, locate the object symbol table entry and retrieve the name */ @@ -1261,11 +1261,11 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd HDassert(udata); /* load the symbol table into memory from the source file */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* get the base address of the heap */ - if(NULL == (heap = H5HL_protect(f, dxpl_id, udata->src_heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, udata->src_heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to protect symbol name") /* copy object in this node one by one */ @@ -1420,7 +1420,7 @@ H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_ke * Save information about the symbol table node since we can't lock it * because we're about to call an application function. */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* Check if the link table needs to be extended */ @@ -1527,14 +1527,14 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, /* Pin the heap down in memory */ if(heap_addr > 0 && H5F_addr_defined(heap_addr)) - if(NULL == (heap = H5HL_protect(f, dxpl_id, heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table heap") /* * If we couldn't load the symbol table node, then try loading the * B-tree node. */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) { + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) { H5G_bt_common_t udata; /*data to pass through B-tree */ H5E_clear_stack(NULL); /* discard that error */ diff --git a/src/H5Gstab.c b/src/H5Gstab.c index 4c338c9..08188ae 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -160,7 +160,7 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Insert name into the heap */ @@ -276,7 +276,7 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, HDassert(obj_lnk); /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Initialize data to pass through B-tree */ @@ -373,7 +373,7 @@ H5G__stab_remove(const H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_ HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(loc->file, dxpl_id, stab.heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(loc->file, dxpl_id, stab.heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Initialize data to pass through B-tree */ @@ -431,7 +431,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *gr HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Initialize data to pass through B-tree */ @@ -485,7 +485,7 @@ H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab) HDassert(H5F_addr_defined(stab->heap_addr)); /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Set up user data for B-tree deletion */ @@ -546,7 +546,7 @@ H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order, HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Check on iteration order */ @@ -766,7 +766,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Remap index for decreasing iteration order */ @@ -888,7 +888,7 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk, HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't read message") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Set up user data to pass to 'find' operation callback */ @@ -989,7 +989,7 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") /* Remap index for decreasing iteration order */ @@ -1081,10 +1081,10 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab) } /* end if */ /* Check if the symbol table message's heap address is valid */ - if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) { + if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) { /* Address is invalid, try the heap address in the alternate symbol * table message */ - if(!alt_stab || NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, alt_stab->heap_addr, H5AC_READ))) + if(!alt_stab || NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, alt_stab->heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "unable to locate heap") else { /* The alternate symbol table's heap address is valid. Adjust the diff --git a/src/H5Gtest.c b/src/H5Gtest.c index 89b4a37..1c0adea 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -637,7 +637,7 @@ H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "b-tree address is invalid") /* Verify that the heap address is valid */ - if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(grp_oloc->file, dxpl_id, stab.heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "heap address is invalid") done: @@ -686,7 +686,7 @@ H5G_verify_cached_stabs_test_cb(H5F_t *f, hid_t dxpl_id, HDassert(H5F_addr_defined(addr)); /* Load the node */ - if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC_READ))) + if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* Check each target object to see if its stab message (if present) matches @@ -701,7 +701,7 @@ H5G_verify_cached_stabs_test_cb(H5F_t *f, hid_t dxpl_id, targ_oloc.addr = sn->entry[i].header; /* Load target object header */ - if(NULL == (targ_oh = H5O_protect(&targ_oloc, dxpl_id, H5AC_READ))) + if(NULL == (targ_oh = H5O_protect(&targ_oloc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header") /* Check if a symbol table message exists */ diff --git a/src/H5HF.c b/src/H5HF.c index f57c5e2..0464da4 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -172,7 +172,7 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info") /* Lock the heap header into memory */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") /* Point fractal heap wrapper at header and bump it's ref count */ @@ -231,7 +231,7 @@ H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr) HDassert(H5F_addr_defined(fh_addr)); /* Load the heap header into memory */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") /* Check for pending heap deletion */ @@ -821,7 +821,7 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id) H5HF_hdr_t *hdr; /* Another pointer to fractal heap header */ /* Lock the heap header into memory */ - if(NULL == (hdr = H5HF_hdr_protect(fh->f, dxpl_id, heap_addr, H5AC_WRITE))) + if(NULL == (hdr = H5HF_hdr_protect(fh->f, dxpl_id, heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* Delete heap, starting with header (unprotects header) */ @@ -865,7 +865,7 @@ H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr) HDassert(H5F_addr_defined(fh_addr)); /* Lock the heap header into memory */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_WRITE))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* Check for files using shared heap header */ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 07e5b36..ec8d9a6 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -53,12 +53,6 @@ #define H5HF_DBLOCK_VERSION 0 /* Direct block */ #define H5HF_IBLOCK_VERSION 0 /* Indirect block */ -/* Size of stack buffer for serialized headers */ -#define H5HF_HDR_BUF_SIZE 512 - -/* Size of stack buffer for serialized indirect blocks */ -#define H5HF_IBLOCK_BUF_SIZE 4096 - /******************/ /* Local Typedefs */ @@ -79,24 +73,48 @@ static herr_t H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *d static herr_t H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable); /* Metadata cache (H5AC) callbacks */ -static H5HF_hdr_t *H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr); -static herr_t H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy); -static herr_t H5HF_cache_hdr_size(const H5F_t *f, const H5HF_hdr_t *hdr, size_t *size_ptr); -static H5HF_indirect_t *H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_indirect_t *iblock, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock); -static herr_t H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy); -static herr_t H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock); -static herr_t H5HF_cache_iblock_size(const H5F_t *f, const H5HF_indirect_t *iblock, size_t *size_ptr); -static H5HF_direct_t *H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_direct_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock); -static herr_t H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy); -static herr_t H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t *dblock); -static herr_t H5HF_cache_dblock_size(const H5F_t *f, const H5HF_direct_t *dblock, size_t *size_ptr); - +static herr_t H5HF__cache_hdr_get_load_size(const void *udata, size_t *image_len); +static void *H5HF__cache_hdr_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HF__cache_hdr_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5HF__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr, size_t *new_len, size_t *new_compressed_len, + unsigned *flags); +static herr_t H5HF__cache_hdr_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HF__cache_hdr_free_icr(void *thing); + +static herr_t H5HF__cache_iblock_get_load_size(const void *udata, size_t *image_len); +static void *H5HF__cache_iblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HF__cache_iblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5HF__cache_iblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr, size_t *new_len, size_t *new_compressed_len, + unsigned *flags); +static herr_t H5HF__cache_iblock_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HF__cache_iblock_notify(H5C_notify_action_t action, void *thing); +static herr_t H5HF__cache_iblock_free_icr(void *thing); + +static herr_t H5HF__cache_dblock_get_load_size(const void *udata, size_t *image_len); +static void *H5HF__cache_dblock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HF__cache_dblock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5HF__cache_dblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, + void *thing, haddr_t addr, size_t len, size_t compressed_len, + haddr_t *new_addr, size_t *new_len, size_t *new_compressed_len, + unsigned *flags); +static herr_t H5HF__cache_dblock_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HF__cache_dblock_notify(H5C_notify_action_t action, void *thing); +static herr_t H5HF__cache_dblock_free_icr(void *thing); /* Debugging Function Prototypes */ #ifndef NDEBUG @@ -117,35 +135,53 @@ static herr_t H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, hid_t dxpl_i /* H5HF header inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FHEAP_HDR[1] = {{ - H5AC_FHEAP_HDR_ID, - (H5AC_load_func_t)H5HF_cache_hdr_load, - (H5AC_flush_func_t)H5HF_cache_hdr_flush, - (H5AC_dest_func_t)H5HF_cache_hdr_dest, - (H5AC_clear_func_t)H5HF_cache_hdr_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5HF_cache_hdr_size, + H5AC_FHEAP_HDR_ID, /* Metadata client ID */ + "fractal heap header", /* Metadata client name (for debugging) */ + H5FD_MEM_FHEAP_HDR, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5HF__cache_hdr_get_load_size, /* 'get_load_size' callback */ + H5HF__cache_hdr_deserialize, /* 'deserialize' callback */ + H5HF__cache_hdr_image_len, /* 'image_len' callback */ + H5HF__cache_hdr_pre_serialize, /* 'pre_serialize' callback */ + H5HF__cache_hdr_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5HF__cache_hdr_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5HF indirect block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FHEAP_IBLOCK[1] = {{ - H5AC_FHEAP_IBLOCK_ID, - (H5AC_load_func_t)H5HF_cache_iblock_load, - (H5AC_flush_func_t)H5HF_cache_iblock_flush, - (H5AC_dest_func_t)H5HF_cache_iblock_dest, - (H5AC_clear_func_t)H5HF_cache_iblock_clear, - (H5AC_notify_func_t)H5HF_cache_iblock_notify, - (H5AC_size_func_t)H5HF_cache_iblock_size, + H5AC_FHEAP_IBLOCK_ID, /* Metadata client ID */ + "fractal heap indirect block", /* Metadata client name (for debugging) */ + H5FD_MEM_FHEAP_IBLOCK, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5HF__cache_iblock_get_load_size, /* 'get_load_size' callback */ + H5HF__cache_iblock_deserialize, /* 'deserialize' callback */ + H5HF__cache_iblock_image_len, /* 'image_len' callback */ + H5HF__cache_iblock_pre_serialize, /* 'pre_serialize' callback */ + H5HF__cache_iblock_serialize, /* 'serialize' callback */ + H5HF__cache_iblock_notify, /* 'notify' callback */ + H5HF__cache_iblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5HF direct block inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_FHEAP_DBLOCK[1] = {{ - H5AC_FHEAP_DBLOCK_ID, - (H5AC_load_func_t)H5HF_cache_dblock_load, - (H5AC_flush_func_t)H5HF_cache_dblock_flush, - (H5AC_dest_func_t)H5HF_cache_dblock_dest, - (H5AC_clear_func_t)H5HF_cache_dblock_clear, - (H5AC_notify_func_t)H5HF_cache_dblock_notify, - (H5AC_size_func_t)H5HF_cache_dblock_size, + H5AC_FHEAP_DBLOCK_ID, /* Metadata client ID */ + "fractal heap direct block", /* Metadata client name (for debugging) */ + H5FD_MEM_FHEAP_DBLOCK, /* File space memory type for client */ + H5C__CLASS_COMPRESSED_FLAG, /* Client class behavior flags */ + H5HF__cache_dblock_get_load_size, /* 'get_load_size' callback */ + H5HF__cache_dblock_deserialize, /* 'deserialize' callback */ + H5HF__cache_dblock_image_len, /* 'image_len' callback */ + H5HF__cache_dblock_pre_serialize, /* 'pre_serialize' callback */ + H5HF__cache_dblock_serialize, /* 'serialize' callback */ + H5HF__cache_dblock_notify, /* 'notify' callback */ + H5HF__cache_dblock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -268,119 +304,191 @@ H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable) /*------------------------------------------------------------------------- - * Function: H5HF_cache_hdr_load + * Function: H5HF__cache_hdr_get_load_size() * - * Purpose: Loads a fractal heap header from the disk. + * Purpose: Determine the size of the fractal heap header on disk, + * and set *image_len to this value. * - * Return: Success: Pointer to a new fractal heap + * This code is based on the old H5HF_cache_hdr_load() routine + * that was used with the version 2 metadata cache. Note the + * use of a dummy header to compute the on disk size of the header. + * + * Note also that the value returned by this function presumes that + * there is no I/O filtering data in the header. If there is, the + * size reported will be too small, and H5C_load_entry() + * will have to make two tries to load the fractal heap header. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_hdr_get_load_size(const void *_udata, size_t *image_len) +{ + const H5HF_hdr_cache_ud_t *udata = (const H5HF_hdr_cache_ud_t *)_udata; /* pointer to user data */ + H5HF_hdr_t dummy_hdr; /* dummy header -- to compute size */ + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(udata); + HDassert(image_len); + + /* Set the internal parameters for the heap */ + dummy_hdr.f = udata->f; + dummy_hdr.sizeof_size = H5F_SIZEOF_SIZE(udata->f); + dummy_hdr.sizeof_addr = H5F_SIZEOF_ADDR(udata->f); + + /* Compute the 'base' size of the fractal heap header on disk */ + *image_len = (size_t)H5HF_HEADER_SIZE(&dummy_hdr); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HF__cache_hdr_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_hdr_deserialize + * + * Purpose: Given a buffer containing an on disk image of a fractal heap + * header block, allocate an instance of H5HF_hdr_t, load the contents + * of the buffer into into the new instance of H5HF_hdr_t, and then + * return a pointer to the new instance. + * + * Since H5HF__cache_hdr_get_load_size() reports header on disk size + * base on the assumption that the header contains no I/O filtering + * data, it is possible that the provided image will be too small. + * + * In this case, we DO NOT flag an error when this is discovered. + * Instead, we make note of the correct image size, and report + * success. + * + * Since H5HF__cache_hdr_image_len() callback is defined, + * H5C_load_entry() will call H5HF__cache_hdr_image_len() and + * obtain the correct image length. + * + * Since the H5AC__CLASS_SPECULATIVE_LOAD_FLAG is set, + * H5C_load_entry() will load an image of the correct size, and + * then call this function again to deserialize it. Before doing + * so, it will also call H5HF__cache_hdr_free_icr() to discard the + * result of the first deserialize call. + * + * Note that the v2 B-tree and free space manager associated + * with the fractal heap (roots stored in the huge_bt2 and fspace + * fields respectively) are not loaded at this time. As best I can + * tell from reviewing the code, they are loaded or created when + * they are accessed. + * + * Return: Success: Pointer to in core representation * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static H5HF_hdr_t * -H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5HF_hdr_t *hdr = NULL; /* Fractal heap info */ - H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata; - size_t size; /* Header size */ - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */ - uint8_t *buf; /* Pointer to header buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5HF_hdr_t *hdr = NULL; /* Fractal heap info */ + H5HF_hdr_cache_ud_t *udata = (H5HF_hdr_cache_ud_t *)_udata; /* User data for callback */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into into supplied image */ + size_t size; /* Header size */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ uint8_t heap_flags; /* Status flags for heap */ - H5HF_hdr_t *ret_value; /* Return value */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ + HDassert(image); + HDassert(len > 0); HDassert(udata); + HDassert(dirty); /* Allocate space for the fractal heap data structure */ if(NULL == (hdr = H5HF_hdr_alloc(udata->f))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't wrap buffer") - /* Compute the 'base' size of the fractal heap header on disk */ size = (size_t)H5HF_HEADER_SIZE(hdr); - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap header") - - /* Get temporary pointer to serialized header */ - p = buf; + /* the size we have just calculated presumes that there is no I/O + * filter information in the header. If there is no filter information, + * the deserialize operation should succeed. + * + * If there is filter information, the first attempt to deserialize + * the header will reveal this. In this case, we will be unable to + * deserialize the header as the supplied image will be too small. + * However, we will make note of the correct size and report success + * anyway. + * + * When H5C_load_entry() calls H5HF__cache_hdr_image_len(), we will report + * the correct size. Since the H5C__CLASS_SPECULATIVE_LOAD_FLAG is set, + * this will prompt H5C_load_entry() to load the correct size image, + * discard the result of the first attempt at deserialization, and + * call this routine a second time to deserialize the correct size + * buffer. + */ + HDassert(size <= len); /* Magic number */ - if(HDmemcmp(p, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap header signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5HF_HDR_VERSION) + if(*image++ != H5HF_HDR_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap header version") /* General heap information */ - UINT16DECODE(p, hdr->id_len); /* Heap ID length */ - UINT16DECODE(p, hdr->filter_len); /* I/O filters' encoded length */ + UINT16DECODE(image, hdr->id_len); /* Heap ID length */ + UINT16DECODE(image, hdr->filter_len); /* I/O filters' encoded length */ /* Heap status flags */ /* (bit 0: "huge" object IDs have wrapped) */ /* (bit 1: checksum direct blocks) */ - heap_flags = *p++; + heap_flags = *image++; hdr->huge_ids_wrapped = heap_flags & H5HF_HDR_FLAGS_HUGE_ID_WRAPPED; hdr->checksum_dblocks = heap_flags & H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS; /* "Huge" object information */ - UINT32DECODE(p, hdr->max_man_size); /* Max. size of "managed" objects */ - H5F_DECODE_LENGTH(udata->f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */ - H5F_addr_decode(udata->f, &p, &hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */ + UINT32DECODE(image, hdr->max_man_size); /* Max. size of "managed" objects */ + H5F_DECODE_LENGTH(udata->f, image, hdr->huge_next_id); /* Next ID to use for "huge" object */ + H5F_addr_decode(udata->f, &image, &hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */ /* "Managed" object free space information */ - H5F_DECODE_LENGTH(udata->f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */ - H5F_addr_decode(udata->f, &p, &hdr->fs_addr); /* Address of free section header */ + H5F_DECODE_LENGTH(udata->f, image, hdr->total_man_free); /* Internal free space in managed direct blocks */ + H5F_addr_decode(udata->f, &image, &hdr->fs_addr); /* Address of free section header */ /* Heap statistics */ - H5F_DECODE_LENGTH(udata->f, p, hdr->man_size); - H5F_DECODE_LENGTH(udata->f, p, hdr->man_alloc_size); - H5F_DECODE_LENGTH(udata->f, p, hdr->man_iter_off); - H5F_DECODE_LENGTH(udata->f, p, hdr->man_nobjs); - H5F_DECODE_LENGTH(udata->f, p, hdr->huge_size); - H5F_DECODE_LENGTH(udata->f, p, hdr->huge_nobjs); - H5F_DECODE_LENGTH(udata->f, p, hdr->tiny_size); - H5F_DECODE_LENGTH(udata->f, p, hdr->tiny_nobjs); + H5F_DECODE_LENGTH(udata->f, image, hdr->man_size); + H5F_DECODE_LENGTH(udata->f, image, hdr->man_alloc_size); + H5F_DECODE_LENGTH(udata->f, image, hdr->man_iter_off); + H5F_DECODE_LENGTH(udata->f, image, hdr->man_nobjs); + H5F_DECODE_LENGTH(udata->f, image, hdr->huge_size); + H5F_DECODE_LENGTH(udata->f, image, hdr->huge_nobjs); + H5F_DECODE_LENGTH(udata->f, image, hdr->tiny_size); + H5F_DECODE_LENGTH(udata->f, image, hdr->tiny_nobjs); /* Managed objects' doubling-table info */ - if(H5HF__dtable_decode(hdr->f, &p, &(hdr->man_dtable)) < 0) + if(H5HF__dtable_decode(hdr->f, &image, &(hdr->man_dtable)) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, NULL, "unable to encode managed obj. doubling table info") /* Sanity check */ /* (allow for checksum not decoded yet) */ - HDassert((size_t)(p - (const uint8_t *)buf) == (size - H5HF_SIZEOF_CHKSUM)); + HDassert((size_t)(image - (const uint8_t *)_image) == (size - H5HF_SIZEOF_CHKSUM)); /* Check for I/O filter information to decode */ if(hdr->filter_len > 0) { - size_t filter_info_off; /* Offset in header of filter information */ size_t filter_info_size; /* Size of filter information */ H5O_pline_t *pline; /* Pipeline information from the header on disk */ - /* Compute the offset of the filter info in the header */ - filter_info_off = (size_t)(p - (const uint8_t *)buf); - /* Compute the size of the extra filter information */ filter_info_size = (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */ + (unsigned)4 /* Size of filter mask for filtered root direct block */ @@ -389,28 +497,27 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Compute the heap header's size */ hdr->heap_size = size + filter_info_size; - /* Re-size current buffer */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, hdr->heap_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read in I/O filter information */ - /* (and the checksum) */ - if(H5F_block_read(f, H5FD_MEM_FHEAP_HDR, (addr + filter_info_off), (filter_info_size + H5HF_SIZEOF_CHKSUM), dxpl_id, (buf + filter_info_off)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap header's I/O pipeline filter info") + if(size == len) + /* we were supplied with too small a buffer -- goto done + * and let H5C_load_entry() retry with a larger buffer + */ + HGOTO_DONE((void *)hdr) - /* Point at correct offset in header for the filter information */ - p = buf + filter_info_off; + else + if((size + filter_info_size) != len) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad image len") /* Decode the size of a filtered root direct block */ - H5F_DECODE_LENGTH(udata->f, p, hdr->pline_root_direct_size); + H5F_DECODE_LENGTH(udata->f, image, hdr->pline_root_direct_size); /* Decode the filter mask for a filtered root direct block */ - UINT32DECODE(p, hdr->pline_root_direct_filter_mask); + UINT32DECODE(image, hdr->pline_root_direct_filter_mask); /* Decode I/O filter information */ - if(NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID, p))) + if(NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID, image))) HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode I/O pipeline filters") - p += hdr->filter_len; + + image += hdr->filter_len; /* Copy the information into the header's I/O pipeline structure */ if(NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &(hdr->pline))) @@ -425,13 +532,13 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Compute checksum on entire header */ /* (including the filter information, if present) */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - (const uint8_t *)buf), 0); + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - (const uint8_t *)buf) == hdr->heap_size); + HDassert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -442,291 +549,324 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header") /* Set return value */ - ret_value = hdr; + ret_value = (void *)hdr; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && hdr) if(H5HF_hdr_free(hdr) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to release fractal heap header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5HF__cache_hdr_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_hdr_flush + * Function: H5HF__cache_hdr_image_len * - * Purpose: Flushes a dirty fractal heap header to disk. + * Purpose: Return the actual size of the fractal heap header on + * disk image. * - * Return: Non-negative on success/Negative on failure + * If the header contains filter information, this size will be + * larger than the value returned by H5HF__cache_hdr_get_load_size(). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_hdr_t *hdr, unsigned H5_ATTR_UNUSED * flags_ptr) +static herr_t +H5HF__cache_hdr_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for header data */ - uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5HF_hdr_t *hdr = (const H5HF_hdr_t *)_thing; /* Fractal heap info */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + HDassert(image_len); - if(hdr->cache_info.is_dirty) { - uint8_t *buf; /* Temporary raw data buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - size_t size; /* Header size on disk */ - uint8_t heap_flags; /* Status flags for heap */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - -#ifndef NDEBUG -{ - /* Verify that flush dependencies are working correctly. Do this - * by verifying that either: - * - * 1) the header has a root iblock, and that the root iblock and all - * of its children are clean, or - * - * 2) The header has a root dblock, which is clean, or - * - * 3) The heap is empty, and thus the header has neither a root - * iblock no a root dblock. In this case, the flush ordering - * constraint is met by default. - * - * Do this with a call to H5HF__cache_verify_hdr_descendants_clean(). - */ - hbool_t descendants_clean = TRUE; + *image_len = hdr->heap_size; - if(H5HF__cache_verify_hdr_descendants_clean(f, dxpl_id, hdr, &descendants_clean) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.") - HDassert(descendants_clean); -} -#endif /* NDEBUG */ + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HF__cache_hdr_image_len() */ - /* Set the shared heap header's file context for this operation */ - hdr->f = f; - - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer") - - /* Compute the size of the heap header on disk */ - size = hdr->heap_size; - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Get temporary pointer to serialized header */ - p = buf; - - /* Magic number */ - HDmemcpy(p, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Version # */ - *p++ = H5HF_HDR_VERSION; - - /* General heap information */ - UINT16ENCODE(p, hdr->id_len); /* Heap ID length */ - UINT16ENCODE(p, hdr->filter_len); /* I/O filters' encoded length */ - - /* Heap status flags */ - /* (bit 0: "huge" object IDs have wrapped) */ - /* (bit 1: checksum direct blocks) */ - heap_flags = 0; - heap_flags = (uint8_t)(heap_flags | (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0)); - heap_flags = (uint8_t)(heap_flags | (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0)); - *p++ = heap_flags; - - /* "Huge" object information */ - UINT32ENCODE(p, hdr->max_man_size); /* Max. size of "managed" objects */ - H5F_ENCODE_LENGTH(f, p, hdr->huge_next_id); /* Next ID to use for "huge" object */ - H5F_addr_encode(f, &p, hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */ - - /* "Managed" object free space information */ - H5F_ENCODE_LENGTH(f, p, hdr->total_man_free); /* Internal free space in managed direct blocks */ - H5F_addr_encode(f, &p, hdr->fs_addr); /* Address of free section header */ - - /* Heap statistics */ - H5F_ENCODE_LENGTH(f, p, hdr->man_size); - H5F_ENCODE_LENGTH(f, p, hdr->man_alloc_size); - H5F_ENCODE_LENGTH(f, p, hdr->man_iter_off); - H5F_ENCODE_LENGTH(f, p, hdr->man_nobjs); - H5F_ENCODE_LENGTH(f, p, hdr->huge_size); - H5F_ENCODE_LENGTH(f, p, hdr->huge_nobjs); - H5F_ENCODE_LENGTH(f, p, hdr->tiny_size); - H5F_ENCODE_LENGTH(f, p, hdr->tiny_nobjs); - - /* Managed objects' doubling-table info */ - if(H5HF__dtable_encode(hdr->f, &p, &(hdr->man_dtable)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info") - - /* Check for I/O filter information to encode */ - if(hdr->filter_len > 0) { - /* Encode the size of a filtered root direct block */ - H5F_ENCODE_LENGTH(f, p, hdr->pline_root_direct_size); + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_hdr_pre_serialize + * + * Purpose: As best I can tell, fractal heap header blocks are always + * allocated in real file space. Thus this routine simply verifies + * this, verifies that the len parameter contains the expected + * value, and returns an error if either of these checks fail. + * + * When compiled in debug mode, the function also verifies that all + * indirect and direct blocks that are children of the header are + * either clean, or not in the metadata cache. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, + haddr_t addr, size_t len, size_t H5_ATTR_UNUSED compressed_len, + haddr_t H5_ATTR_UNUSED *new_addr, size_t H5_ATTR_UNUSED *new_len, + size_t H5_ATTR_UNUSED *new_compressed_len, unsigned *flags) +{ + H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Encode the filter mask for a filtered root direct block */ - UINT32ENCODE(p, hdr->pline_root_direct_filter_mask); + FUNC_ENTER_STATIC - /* Encode I/O filter information */ - if(H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, p, &(hdr->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline fiters") - p += hdr->filter_len; - } /* end if */ + /* Sanity checks */ + HDassert(f); + HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + HDassert(H5F_addr_defined(addr)); + HDassert(addr == hdr->heap_addr); + HDassert(new_addr); + HDassert(new_len); + HDassert(flags); - /* Compute metadata checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); +#ifndef NDEBUG +{ + hbool_t descendants_clean = TRUE; - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); + /* Verify that flush dependencies are working correctly. Do this + * by verifying that either: + * + * 1) the header has a root iblock, and that the root iblock and all + * of its children are clean, or + * + * 2) The header has a root dblock, which is clean, or + * + * 3) The heap is empty, and thus the header has neither a root + * iblock no a root dblock. In this case, the flush ordering + * constraint is met by default. + * + * Do this with a call to H5HF__cache_verify_hdr_descendants_clean(). + */ + if(H5HF__cache_verify_hdr_descendants_clean((H5F_t *)f, dxpl_id, hdr, &descendants_clean) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.") + HDassert(descendants_clean); +} +#endif /* NDEBUG */ - /* Write the heap header. */ - HDassert((size_t)(p - buf) == size); - if(H5F_block_write(f, H5FD_MEM_FHEAP_HDR, addr, size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap header to disk") + if(H5F_IS_TMP_ADDR(f, addr)) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "addr in temporary space?!?."); - hdr->cache_info.is_dirty = FALSE; - } /* end if */ + if(len != hdr->heap_size) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "unexpected image len."); - if(destroy) - if(H5HF_cache_hdr_dest(f, hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header") + *flags = 0; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") - FUNC_LEAVE_NOAPI(ret_value) -} /* H5HF_cache_hdr_flush() */ +} /* end H5HF__cache_hdr_pre_serialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_hdr_dest + * Function: H5HF__cache_hdr_serialize * - * Purpose: Destroys a fractal heap header in memory. + * Purpose: Construct the on disk image of the header, and place it in + * the buffer pointed to by image. Return SUCCEED on success, + * and FAIL on failure. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr) +static herr_t +H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { + H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint8_t heap_flags; /* Status flags for heap */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ + HDassert(f); + HDassert(image); HDassert(hdr); - HDassert(hdr->rc == 0); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + HDassert(len == hdr->heap_size); + + /* Set the shared heap header's file context for this operation */ + hdr->f = f; + + /* Magic number */ + HDmemcpy(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; + + /* Version # */ + *image++ = H5HF_HDR_VERSION; + + /* General heap information */ + UINT16ENCODE(image, hdr->id_len); /* Heap ID length */ + UINT16ENCODE(image, hdr->filter_len); /* I/O filters' encoded length */ + + /* Heap status flags */ + /* (bit 0: "huge" object IDs have wrapped) */ + /* (bit 1: checksum direct blocks) */ + heap_flags = 0; + heap_flags = (uint8_t)(heap_flags | (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0)); + heap_flags = (uint8_t)(heap_flags | (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0)); + *image++ = heap_flags; + + /* "Huge" object information */ + UINT32ENCODE(image, hdr->max_man_size); /* Max. size of "managed" objects */ + H5F_ENCODE_LENGTH(f, image, hdr->huge_next_id); /* Next ID to use for "huge" object */ + H5F_addr_encode(f, &image, hdr->huge_bt2_addr); /* Address of "huge" object tracker B-tree */ + + /* "Managed" object free space information */ + H5F_ENCODE_LENGTH(f, image, hdr->total_man_free); /* Internal free space in managed direct blocks */ + H5F_addr_encode(f, &image, hdr->fs_addr); /* Address of free section header */ + + /* Heap statistics */ + H5F_ENCODE_LENGTH(f, image, hdr->man_size); + H5F_ENCODE_LENGTH(f, image, hdr->man_alloc_size); + H5F_ENCODE_LENGTH(f, image, hdr->man_iter_off); + H5F_ENCODE_LENGTH(f, image, hdr->man_nobjs); + H5F_ENCODE_LENGTH(f, image, hdr->huge_size); + H5F_ENCODE_LENGTH(f, image, hdr->huge_nobjs); + H5F_ENCODE_LENGTH(f, image, hdr->tiny_size); + H5F_ENCODE_LENGTH(f, image, hdr->tiny_nobjs); + + /* Managed objects' doubling-table info */ + if(H5HF__dtable_encode(hdr->f, &image, &(hdr->man_dtable)) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info") + + /* Check for I/O filter information to encode */ + if(hdr->filter_len > 0) { + /* Encode the size of a filtered root direct block */ + H5F_ENCODE_LENGTH(f, image, hdr->pline_root_direct_size); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!hdr->cache_info.free_file_space_on_destroy || H5F_addr_defined(hdr->cache_info.addr)); + /* Encode the filter mask for a filtered root direct block */ + UINT32ENCODE(image, hdr->pline_root_direct_filter_mask); - /* Check for freeing file space for heap header */ - if(hdr->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FHEAP_HDR, H5AC_dxpl_id, hdr->cache_info.addr, (hsize_t)hdr->heap_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap header") + /* Encode I/O filter information */ + if(H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, image, &(hdr->pline)) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline fiters") + image += hdr->filter_len; } /* end if */ - /* Free the shared info itself */ - if(H5HF_hdr_free(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header") + /* Compute metadata checksum */ + metadata_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); + + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + + /* sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) == len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_hdr_dest() */ +} /* end H5HF__cache_hdr_serialize() */ + +/***************************************/ +/* no H5HF__cache_hdr_notify() function */ +/***************************************/ /*------------------------------------------------------------------------- - * Function: H5HF_cache_hdr_clear + * Function: H5HF__cache_hdr_free_icr * - * Purpose: Mark a fractal heap header in memory as non-dirty. + * Purpose: Free the in core representation of the fractal heap header. * - * Return: Non-negative on success/Negative on failure + * This routine frees just the header itself, not the + * associated version 2 B-Tree, the associated Free Space Manager, + * nor the indirect/direct block tree that is rooted in the header. * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * This routine also does not free the file space that may + * be allocated to the header. + * + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy) +static herr_t +H5HF__cache_hdr_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + HDassert(hdr->rc == 0); - /* Reset the dirty flag. */ - hdr->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5HF_cache_hdr_dest(f, hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap header") + if(H5HF_hdr_free(hdr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_hdr_clear() */ +} /* end H5HF__cache_hdr_free_icr() */ + +/***********************************************************/ +/* metadata cache callback definitions for indirect blocks */ +/***********************************************************/ /*------------------------------------------------------------------------- - * Function: H5HF_cache_hdr_size + * Function: H5HF__cache_iblock_get_load_size() * - * Purpose: Compute the size in bytes of a fractal heap header - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Compute the size of the on disk image of the indirect + * block, and place this value in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_hdr_t *hdr, size_t *size_ptr) +static herr_t +H5HF__cache_iblock_get_load_size(const void *_udata, size_t *image_len) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5HF_iblock_cache_ud_t *udata = (const H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */ - /* Check arguments */ - HDassert(f); - HDassert(hdr); - HDassert(size_ptr); + FUNC_ENTER_STATIC_NOERR - /* Set size value */ - *size_ptr = hdr->heap_size; + /* Sanity checks */ + HDassert(udata); + HDassert(image_len); + + *image_len = (size_t)H5HF_MAN_INDIRECT_SIZE(udata->par_info->hdr, *udata->nrows); FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HF_cache_hdr_size() */ +} /* end H5HF__cache_iblock_get_load_size() */ /***********************************************************/ /* metadata cache callback definitions for indirect blocks */ @@ -734,53 +874,55 @@ H5HF_cache_hdr_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_hdr_t *hdr, size_t /*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_load + * Function: H5HF__cache_iblock_deserialize * - * Purpose: Loads a fractal heap indirect block from the disk. + * Purpose: Given a buffer containing the on disk image of the indirect + * block, allocate an instance of H5HF_indirect_t, load the data + * in the buffer into this new instance, and return a pointer to + * it. * - * Return: Success: Pointer to a new fractal heap indirect block + * As best I can tell, the size of the indirect block image is fully + * know before the image is loaded, so this function should succeed + * unless the image is corrupt or memory allocation fails. * + * Return: Success: Pointer to in core representation * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 27 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static H5HF_indirect_t * -H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5HF__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { H5HF_hdr_t *hdr; /* Shared fractal heap information */ - H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* user data for callback */ - H5HF_indirect_t *iblock = NULL; /* Indirect block info */ - H5WB_t *wb = NULL; /* Wrapped buffer for indirect block data */ - uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */ - uint8_t *buf; /* Temporary buffer */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */ + H5HF_indirect_t *iblock = NULL; /* Indirect block info */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ haddr_t heap_addr; /* Address of heap header in the file */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ unsigned u; /* Local index variable */ - H5HF_indirect_t *ret_value; /* Return value */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ + HDassert(image); HDassert(udata); - - /* Allocate space for the fractal heap indirect block */ - if(NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - /* Get the pointer to the shared heap header */ + HDassert(dirty); hdr = udata->par_info->hdr; + HDassert(hdr->f); /* Set the shared heap header's file context for this operation */ hdr->f = udata->f; + /* Allocate space for the fractal heap indirect block */ + if(NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + /* Share common heap information */ iblock->hdr = hdr; if(H5HF_hdr_incr(hdr) < 0) @@ -791,35 +933,23 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) iblock->nrows = *udata->nrows; iblock->nchildren = 0; - /* Wrap the local buffer for serialized indirect block */ - if(NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't wrap buffer") - /* Compute size of indirect block */ iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows); - /* Get a pointer to a buffer that's large enough for serialized indirect block */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read indirect block from disk */ - if(H5F_block_read(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap indirect block") - - /* Get temporary pointer to serialized indirect block */ - p = buf; + /* sanity check */ + HDassert(iblock->size == len); /* Magic number */ - if(HDmemcmp(p, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap indirect block signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap indirect block signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5HF_IBLOCK_VERSION) + if(*image++ != H5HF_IBLOCK_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version") /* Address of heap that owns this block */ - H5F_addr_decode(udata->f, &p, &heap_addr); + H5F_addr_decode(udata->f, &image, &heap_addr); if(H5F_addr_ne(heap_addr, hdr->heap_addr)) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block") @@ -844,7 +974,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) } /* end else */ /* Offset of heap within the heap's address space */ - UINT64DECODE_VAR(p, iblock->block_off, hdr->heap_off_size); + UINT64DECODE_VAR(image, iblock->block_off, hdr->heap_off_size); /* Allocate & decode child block entry tables */ HDassert(iblock->nrows > 0); @@ -866,7 +996,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) { /* Decode child block address */ - H5F_addr_decode(udata->f, &p, &(iblock->ents[u].addr)); + H5F_addr_decode(udata->f, &image, &(iblock->ents[u].addr)); /* Check for heap with I/O filters */ if(hdr->filter_len > 0) { @@ -876,7 +1006,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Decode extra information for direct blocks */ if(u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) { /* Size of filtered direct block */ - H5F_DECODE_LENGTH(udata->f, p, iblock->filt_ents[u].size); + H5F_DECODE_LENGTH(udata->f, image, iblock->filt_ents[u].size); /* Sanity check */ /* (either both the address & size are defined or both are @@ -886,7 +1016,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) || (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0)); /* I/O filter mask for filtered direct block */ - UINT32DECODE(p, iblock->filt_ents[u].filter_mask); + UINT32DECODE(image, iblock->filt_ents[u].filter_mask); } /* end if */ } /* end if */ @@ -901,13 +1031,13 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */ /* Compute checksum on indirect block */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - (const uint8_t *)buf), 0); + computed_chksum = H5_checksum_metadata((const uint8_t *)_image, (size_t)(image - (const uint8_t *)_image), 0); /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - (const uint8_t *)buf) == iblock->size); + HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -915,7 +1045,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Check if we have any indirect block children */ if(iblock->nrows > hdr->man_dtable.max_direct_rows) { - unsigned indir_rows; /* Number of indirect rows in this indirect block */ + unsigned indir_rows;/* Number of indirect rows in this indirect block */ /* Compute the number of indirect rows for this indirect block */ indir_rows = iblock->nrows - hdr->man_dtable.max_direct_rows; @@ -928,343 +1058,323 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) iblock->child_iblocks = NULL; /* Set return value */ - ret_value = iblock; + ret_value = (void *)iblock; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && iblock) if(H5HF_man_iblock_dest(iblock) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap indirect block") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_iblock_load() */ +} /* end H5HF__cache_iblock_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_flush + * Function: H5HF__cache_iblock_image_len * - * Purpose: Flushes a dirty fractal heap indirect block to disk. + * Purpose: Return the size of the on disk image of the iblock. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 6 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_indirect_t *iblock, unsigned H5_ATTR_UNUSED * flags_ptr) +static herr_t +H5HF__cache_iblock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for indirect block data */ - uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5HF_indirect_t *iblock = (const H5HF_indirect_t *)_thing; /* Indirect block info */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ HDassert(iblock); + HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(image_len); - if(iblock->cache_info.is_dirty) { - H5HF_hdr_t *hdr; /* Shared fractal heap information */ - uint8_t *buf; /* Temporary buffer */ - uint8_t *p; /* Pointer into raw data buffer */ -#ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - unsigned max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ - uint32_t metadata_chksum; /* Computed metadata checksum value */ - size_t u; /* Local index variable */ + *image_len = iblock->size; -#ifndef NDEBUG + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HF__cache_iblock_image_len() */ + + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_iblock_pre_serialize + * + * Purpose: The primary objective of this function is to determine if the + * indirect block is currently allocated in temporary file space, + * and if so, to move it to real file space before the entry is + * serialized. + * + * In debug compiles, this function also verifies that all children + * of this indirect block are either clean or are not in cache. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_iblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, + haddr_t addr, size_t H5_ATTR_UNUSED len, size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr, size_t H5_ATTR_UNUSED *new_len, + size_t H5_ATTR_UNUSED *new_compressed_len, unsigned *flags) { - /* Verify that flush dependencies are working correctly. Do this - * by verifying that all children of this iblock are clean. - */ - hbool_t descendants_clean = TRUE; - unsigned iblock_status; + H5HF_hdr_t *hdr; /* Shared fractal heap information */ + H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ + herr_t ret_value = SUCCEED; /* Return value */ - if(H5AC_get_entry_status(f, iblock->addr, &iblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status") + FUNC_ENTER_STATIC - /* since the current iblock is the guest of honor in a flush, we know - * that it is locked into the cache for the duration of the call. Hence - * there is no need to check to see if it is pinned or protected, or to - * protect it if it is not. - */ - if(H5HF__cache_verify_iblock_descendants_clean(f, dxpl_id, iblock, &iblock_status, &descendants_clean) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.") + /* Sanity checks */ + HDassert(f); + HDassert(iblock); + HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(iblock->cache_info.size == iblock->size); + HDassert(H5F_addr_defined(addr)); + HDassert(H5F_addr_eq(iblock->addr, addr)); + HDassert(new_addr); + HDassert(new_len); + HDassert(flags); + hdr = iblock->hdr; + HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); - HDassert(descendants_clean); -} -#endif /* NDEBUG */ +#ifndef NDEBUG +{ + hbool_t descendants_clean = TRUE; + unsigned iblock_status = 0; - /* Get the pointer to the shared heap header */ - hdr = iblock->hdr; + /* verify that flush dependencies are working correctly. Do this + * by verifying that all children of this iblock are clean. + */ + if(H5AC_get_entry_status(f, iblock->addr, &iblock_status) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status") - /* Set the shared heap header's file context for this operation */ - hdr->f = f; + /* since the current iblock is the guest of honor in a flush, we know + * that it is locked into the cache for the duration of the call. Hence + * there is no need to check to see if it is pinned or protected, or to + * protect it if it is not. + */ + if(H5HF__cache_verify_iblock_descendants_clean((H5F_t *)f, dxpl_id, iblock, &iblock_status, &descendants_clean) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.") + HDassert(descendants_clean); +} +#endif /* NDEBUG */ - /* Wrap the local buffer for serialized indirect block */ - if(NULL == (wb = H5WB_wrap(iblock_buf, sizeof(iblock_buf)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer") + /* Check to see if we must re-allocate the iblock from temporary to + * normal (AKA real) file space. + */ + if(H5F_IS_TMP_ADDR(f, addr)) { + haddr_t iblock_addr; - /* Get a pointer to a buffer that's large enough for serialized indirect block */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer") + /* Allocate 'normal' space for the new indirect block on disk */ + if(HADDR_UNDEF == (iblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") - /* Get temporary pointer to buffer for serialized indirect block */ - p = buf; + /* Sanity check */ + HDassert(!H5F_addr_eq(iblock->addr, iblock_addr)); - /* Magic number */ - HDmemcpy(p, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + /* Let the metadata cache know the block moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_IBLOCK, iblock->addr, iblock_addr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block") - /* Version # */ - *p++ = H5HF_IBLOCK_VERSION; + /* Update the internal address for the block */ + iblock->addr = iblock_addr; - /* Address of heap header for heap which owns this block */ - H5F_addr_encode(f, &p, hdr->heap_addr); + /* Check for root indirect block */ + if(NULL == iblock->parent) { + /* Update information about indirect block's location */ + hdr->man_dtable.table_addr = iblock_addr; - /* Offset of block in heap */ - UINT64ENCODE_VAR(p, iblock->block_off, hdr->heap_off_size); + /* Mark that heap header was modified */ + if(H5HF_hdr_dirty(hdr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + } /* end if */ + else { + H5HF_indirect_t *par_iblock; /* Parent indirect block */ + unsigned par_entry; /* Entry in parent indirect block */ - /* Encode indirect block-specific fields */ - for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) { - /* Encode child block address */ - H5F_addr_encode(f, &p, iblock->ents[u].addr); + /* Get parent information */ + par_iblock = iblock->parent; + par_entry = iblock->par_entry; - /* Check for heap with I/O filters */ - if(hdr->filter_len > 0) { - /* Sanity check */ - HDassert(iblock->filt_ents); + /* Update information about indirect block's location */ + par_iblock->ents[par_entry].addr = iblock_addr; - /* Encode extra information for direct blocks */ - if(u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) { - /* Sanity check */ - /* (either both the address & size are defined or both are - * not defined) - */ - HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) - || (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0)); + /* Mark that parent was modified */ + if(H5HF_iblock_dirty(par_iblock) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + } /* end if */ - /* Size of filtered direct block */ - H5F_ENCODE_LENGTH(f, p, iblock->filt_ents[u].size); + *new_addr = iblock_addr; + *flags = H5C__SERIALIZE_MOVED_FLAG; + } /* end if */ + else + *flags = 0; - /* I/O filter mask for filtered direct block */ - UINT32ENCODE(p, iblock->filt_ents[u].filter_mask); - } /* end if */ - } /* end if */ +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5HF__cache_iblock_pre_serialize() */ + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_iblock_serialize + * + * Purpose: Given a pointer to an iblock, and a pointer to a buffer of + * the appropriate size, write the contents of the iblock to the + * buffer in format appropriate for writing to disk. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) +{ + H5HF_hdr_t *hdr; /* Shared fractal heap information */ + H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - /* Count child blocks */ - if(H5F_addr_defined(iblock->ents[u].addr)) { - nchildren++; - if(u > max_child) - max_child = u; - } /* end if */ -#endif /* NDEBUG */ - } /* end for */ - - /* Compute checksum */ - metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - - /* Sanity check */ - HDassert((size_t)(p - buf) == iblock->size); -#ifndef NDEBUG - HDassert(nchildren == iblock->nchildren); - HDassert(max_child == iblock->max_child); + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ #endif /* NDEBUG */ + uint32_t metadata_chksum; /* Computed metadata checksum value */ + size_t u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Check for needing to re-allocate indirect block from 'temp.' to 'normal' file space */ - if(H5F_IS_TMP_ADDR(f, addr)) { - /* Sanity check */ - HDassert(H5F_addr_eq(iblock->addr, addr)); - - /* Allocate 'normal' space for the new indirect block on disk */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") - - /* Sanity check */ - HDassert(!H5F_addr_eq(iblock->addr, addr)); - - /* Let the metadata cache know the block moved */ - if(H5AC_move_entry(f, H5AC_FHEAP_IBLOCK, iblock->addr, addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block") - - /* Update the internal address for the block */ - iblock->addr = addr; - - /* Check for root indirect block */ - if(NULL == iblock->parent) { - /* Update information about indirect block's location */ - hdr->man_dtable.table_addr = addr; - - /* Mark that heap header was modified */ - if(H5HF_hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") - } /* end if */ - else { - H5HF_indirect_t *par_iblock; /* Parent indirect block */ - unsigned par_entry; /* Entry in parent indirect block */ + FUNC_ENTER_STATIC_NOERR - /* Get parent information */ - par_iblock = iblock->parent; - par_entry = iblock->par_entry; + /* Sanity checks */ + HDassert(f); + HDassert(image); + HDassert(iblock); + HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(iblock->cache_info.size == iblock->size); + HDassert(len == iblock->size); - /* Update information about indirect block's location */ - par_iblock->ents[par_entry].addr = addr; + /* Indirect block must be in 'normal' file space */ + HDassert(!H5F_IS_TMP_ADDR(f, iblock->addr)); + HDassert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr)); - /* Mark that parent was modified */ - if(H5HF_iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") - } /* end if */ - } /* end if */ + /* Get the pointer to the shared heap header */ + hdr = iblock->hdr; - /* Indirect block must be in 'normal' file space now */ - HDassert(!H5F_IS_TMP_ADDR(f, addr)); + /* Set the shared heap header's file context for this operation */ + hdr->f = f; - /* Write the indirect block */ - if(H5F_block_write(f, H5FD_MEM_FHEAP_IBLOCK, addr, iblock->size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap indirect block to disk") + /* Magic number */ + HDmemcpy(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Reset dirty flags */ - iblock->cache_info.is_dirty = FALSE; - } /* end if */ + /* Version # */ + *image++ = H5HF_IBLOCK_VERSION; - if(destroy) - if(H5HF_cache_iblock_dest(f, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") + /* Address of heap header for heap which owns this block */ + H5F_addr_encode(f, &image, hdr->heap_addr); -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") + /* Offset of block in heap */ + UINT64ENCODE_VAR(image, iblock->block_off, hdr->heap_off_size); - FUNC_LEAVE_NOAPI(ret_value) -} /* H5HF_cache_iblock_flush() */ + /* Encode indirect block-specific fields */ + for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) { + /* Encode child block address */ + H5F_addr_encode(f, &image, iblock->ents[u].addr); - -/*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_dest - * - * Purpose: Destroys a fractal heap indirect block in memory. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 6 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock) -{ - herr_t ret_value = SUCCEED; /* Return value */ + /* Check for heap with I/O filters */ + if(hdr->filter_len > 0) { + /* Sanity check */ + HDassert(iblock->filt_ents); - FUNC_ENTER_NOAPI_NOINIT + /* Encode extra information for direct blocks */ + if(u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) { + /* Sanity check */ + /* (either both the address & size are defined or both are + * not defined) + */ + HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) + || (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0)); - /* - * Check arguments. - */ - HDassert(iblock); - HDassert(iblock->rc == 0); - HDassert(iblock->hdr); + /* Size of filtered direct block */ + H5F_ENCODE_LENGTH(f, image, iblock->filt_ents[u].size); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!iblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(iblock->cache_info.addr)); - - /* Check for freeing file space for indirect block */ - if(iblock->cache_info.free_file_space_on_destroy) { - /* Check if the indirect block is NOT currently allocated in temp. file space */ - /* (temp. file space does not need to be freed) */ - if(!H5F_IS_TMP_ADDR(f, iblock->cache_info.addr)) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FHEAP_IBLOCK, H5AC_dxpl_id, iblock->cache_info.addr, (hsize_t)iblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block") + /* I/O filter mask for filtered direct block */ + UINT32ENCODE(image, iblock->filt_ents[u].filter_mask); + } /* end if */ } /* end if */ - } /* end if */ - /* Destroy fractal heap indirect block */ - if(H5HF_man_iblock_dest(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_iblock_dest() */ - - -/*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_clear - * - * Purpose: Mark a fractal heap indirect block in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 6 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT +#ifndef NDEBUG + /* Count child blocks */ + if(H5F_addr_defined(iblock->ents[u].addr)) { + nchildren++; + if(u > max_child) + max_child = u; + } /* end if */ +#endif /* NDEBUG */ + } /* end for */ - /* - * Check arguments. - */ - HDassert(iblock); + /* Compute checksum */ + metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); - /* Reset the dirty flag. */ - iblock->cache_info.is_dirty = FALSE; + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); - if(destroy) - if(H5HF_cache_iblock_dest(f, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") + /* Sanity checks */ + HDassert((size_t)(image - (uint8_t *)_image) == iblock->size); +#ifndef NDEBUG + HDassert(nchildren == iblock->nchildren); + HDassert(max_child == iblock->max_child); +#endif /* NDEBUG */ -done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_iblock_clear() */ +} /* end H5HF__cache_iblock_serialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_notify + * Function: H5HF__cache_iblock_notify * - * Purpose: Setup / takedown flush dependencies as indirect blocks + * Purpose: This function is used to create and destroy flush dependency + * relationships between iblocks and their parents as indirect blocks * are loaded / inserted and evicted from the metadata cache. * - * Return: Non-negative on success/Negative on failure + * In general, the parent will be another iblock, but it may be the + * header if the iblock in question is the root iblock. + * + * Return: Success: SUCCEED + * Failure: FAIL * * Programmer: John Mainzer - * 5/17/14 + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock) +static herr_t +H5HF__cache_iblock_notify(H5C_notify_action_t action, void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ HDassert(iblock); HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK); HDassert(iblock->hdr); if(action == H5AC_NOTIFY_ACTION_BEFORE_EVICT) @@ -1309,6 +1419,7 @@ H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock) switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: if(iblock->parent) { /* this is a child iblock */ /* create flush dependency with parent iblock */ if(H5AC_create_flush_dependency(iblock->parent, iblock) < 0) @@ -1321,6 +1432,10 @@ H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock) } /* end else */ break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: if(iblock->fd_parent) { /* this is a child iblock */ /* destroy flush dependency with parent iblock */ @@ -1341,38 +1456,104 @@ H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_iblock_notify() */ +} /* end H5HF__cache_iblock_notify() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_iblock_size + * Function: H5HF__cache_iblock_free_icr * - * Purpose: Compute the size in bytes of a fractal heap indirect block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Unlink the supplied instance of H5HF_indirect_t from the + * fractal heap and free its memory. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 6 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_iblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_indirect_t *iblock, size_t *size_ptr) +static herr_t +H5HF__cache_iblock_free_icr(void *thing) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + H5HF_indirect_t *iblock = (H5HF_indirect_t *)thing; /* Fractal heap indirect block to free */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Check arguments */ + FUNC_ENTER_STATIC + + /* Sanity checks */ HDassert(iblock); - HDassert(size_ptr); + HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(iblock->rc == 0); + HDassert(iblock->hdr); + + /* Destroy fractal heap indirect block */ + if(H5HF_man_iblock_dest(iblock) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5HF__cache_iblock_free_icr() */ + +/*********************************************************/ +/* metadata cache callback definitions for direct blocks */ +/*********************************************************/ + + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_dblock_get_load_size() + * + * Purpose: Determine the size of the direct block on disk image, and + * return it in *image_len. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_dblock_get_load_size(const void *_udata, size_t *image_len) +{ + const H5HF_dblock_cache_ud_t *udata = (const H5HF_dblock_cache_ud_t *)_udata; /* User data for callback */ + const H5HF_parent_t *par_info; /* Pointer to parent information */ + const H5HF_hdr_t *hdr; /* Shared fractal heap information */ + size_t size; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(udata); + HDassert(image_len); + par_info = (const H5HF_parent_t *)(&(udata->par_info)); + HDassert(par_info); + hdr = par_info->hdr; + HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + + /* Check for I/O filters on this heap */ + if(hdr->filter_len > 0) { + /* Check for root direct block */ + if(par_info->iblock == NULL) + size = hdr->pline_root_direct_size; + else + size = par_info->iblock->filt_ents[par_info->entry].size; + } /* end if */ + else + size = udata->dblock_size; - /* Set size value */ - *size_ptr = iblock->size; + *image_len = size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HF_cache_iblock_size() */ +} /* end H5HF__cache_dblock_get_load_size() */ /*********************************************************/ /* metadata cache callback definitions for direct blocks */ @@ -1380,49 +1561,55 @@ H5HF_cache_iblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_indirect_t *ibl /*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_load + * Function: H5HF__cache_dblock_deserialize * - * Purpose: Loads a fractal heap direct block from the disk. + * Purpose: Given a buffer containing the on disk image of a direct + * block, allocate an instance of H5HF_direct_t, load the data + * in the buffer into this new instance, and return a pointer to + * it. * - * Return: Success: Pointer to a new fractal heap direct block + * As best I can tell, the size of the direct block image is fully + * know before the image is loaded, so this function should succeed + * unless the image is corrupt or memory allocation fails. * + * Return: Success: Pointer to in core representation * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 27 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static H5HF_direct_t * -H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { H5HF_hdr_t *hdr; /* Shared fractal heap information */ H5HF_dblock_cache_ud_t *udata = (H5HF_dblock_cache_ud_t *)_udata; /* User data for callback */ H5HF_parent_t *par_info; /* Pointer to parent information */ - H5HF_direct_t *dblock = NULL; /* Direct block info */ - const uint8_t *p; /* Pointer into raw data buffer */ + H5HF_direct_t *dblock = NULL; /* Direct block info */ + const uint8_t *image; /* Pointer into raw data buffer */ haddr_t heap_addr; /* Address of heap header in the file */ - H5HF_direct_t *ret_value; /* Return value */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata != NULL); - HDassert(udata->f != NULL); - HDassert(udata->dblock_size > 0); + /* Sanity checks */ + HDassert(_image); + HDassert(udata); + par_info = (H5HF_parent_t *)(&(udata->par_info)); + HDassert(par_info); + hdr = par_info->hdr; + HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); + HDassert(dirty); /* Allocate space for the fractal heap direct block */ if(NULL == (dblock = H5FL_MALLOC(H5HF_direct_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t)); - /* Get the pointer to the shared heap header */ - par_info = (H5HF_parent_t *)(&(udata->par_info)); - hdr = par_info->hdr; - /* Set the shared heap header's file context for this operation */ hdr->f = udata->f; @@ -1435,6 +1622,10 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) dblock->size = udata->dblock_size; dblock->file_size = 0; + /* initialize fields used in serialization */ + dblock->write_buf = NULL; + dblock->write_size = 0; + /* Allocate block buffer */ /* XXX: Change to using free-list factories */ if(NULL == (dblock->blk = H5FL_BLK_MALLOC(direct_block, (size_t)dblock->size))) @@ -1449,28 +1640,21 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned filter_mask; /* Excluded filters for direct block */ /* Check for root direct block */ - if(par_info->iblock == NULL) { - /* Sanity check */ - HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr)); - + if(par_info->iblock == NULL) /* Set up parameters to read filtered direct block */ read_size = hdr->pline_root_direct_size; - } /* end if */ - else { - /* Sanity check */ - HDassert(H5F_addr_eq(par_info->iblock->ents[par_info->entry].addr, addr)); - + else /* Set up parameters to read filtered direct block */ read_size = par_info->iblock->filt_ents[par_info->entry].size; - } /* end else */ + HDassert(len == read_size); - /* Allocate buffer to perform I/O filtering on */ + /* Allocate buffer to perform I/O filtering on and copy image into + * it. Must do this as H5Z_pipeline() may re-sized the buffer + * provided to it. + */ if(NULL == (read_buf = H5MM_malloc(read_size))) HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for pipeline buffer") - - /* Read filtered direct block from disk */ - if(H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, read_size, dxpl_id, read_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap direct block") + HDmemcpy(read_buf, _image, len); /* Push direct block data through I/O filter pipeline */ nbytes = read_size; @@ -1488,25 +1672,25 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) H5MM_xfree(read_buf); } /* end if */ else { - /* Read direct block from disk */ - if(H5F_block_read(f, H5FD_MEM_FHEAP_DBLOCK, addr, dblock->size, dxpl_id, dblock->blk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "can't read fractal heap direct block") + /* copy image to dblock->blk */ + HDassert(dblock->size == len); + HDmemcpy(dblock->blk, _image, dblock->size); } /* end else */ /* Start decoding direct block */ - p = dblock->blk; + image = dblock->blk; /* Magic number */ - if(HDmemcmp(p, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap direct block signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(*p++ != H5HF_DBLOCK_VERSION) + if(*image++ != H5HF_DBLOCK_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version") /* Address of heap that owns this block (just for file integrity checks) */ - H5F_addr_decode(udata->f, &p, &heap_addr); + H5F_addr_decode(udata->f, &image, &heap_addr); if(H5F_addr_ne(heap_addr, hdr->heap_addr)) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block") @@ -1521,7 +1705,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) } /* end if */ /* Offset of heap within the heap's address space */ - UINT64DECODE_VAR(p, dblock->block_off, hdr->heap_off_size); + UINT64DECODE_VAR(image, dblock->block_off, hdr->heap_off_size); /* Decode checksum on direct block, if requested */ if(hdr->checksum_dblocks) { @@ -1529,11 +1713,11 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) uint32_t computed_chksum; /* Computed metadata checksum value */ /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Reset checksum field, for computing the checksum */ /* (Casting away const OK - QAK) */ - HDmemset((uint8_t *)p - H5HF_SIZEOF_CHKSUM, 0, (size_t)H5HF_SIZEOF_CHKSUM); + HDmemset((uint8_t *)image - H5HF_SIZEOF_CHKSUM, 0, (size_t)H5HF_SIZEOF_CHKSUM); /* Compute checksum on entire direct block */ computed_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0); @@ -1544,10 +1728,10 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) } /* end if */ /* Sanity check */ - HDassert((size_t)(p - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)); + HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)); /* Set return value */ - ret_value = dblock; + ret_value = (void *)dblock; done: if(!ret_value && dblock) @@ -1555,402 +1739,646 @@ done: HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap direct block") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_dblock_load() */ +} /* end H5HF__cache_dblock_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_flush + * Function: H5HF__cache_dblock_image_len * - * Purpose: Flushes a dirty fractal heap direct block to disk. + * Purpose: Report the actual size of the direct block image on disk. + * Note that this value will probably be incorrect if compression + * is enabled and the entry is dirty. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 27 2006 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HF_direct_t *dblock, unsigned H5_ATTR_UNUSED * flags_ptr) +static herr_t +H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len, hbool_t *compressed_ptr, size_t *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5HF_direct_t *dblock = (const H5HF_direct_t *)_thing; /* Direct block info */ + const H5HF_indirect_t *par_iblock; /* Parent iblock */ + const H5HF_hdr_t *hdr; /* Shared fractal heap information */ + hbool_t compressed; + size_t size; + size_t compressed_size; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Sanity checks */ HDassert(dblock); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK); + HDassert(image_len); + HDassert(compressed_ptr); + HDassert(compressed_image_len_ptr); - if(dblock->cache_info.is_dirty) { - H5HF_hdr_t *hdr; /* Shared fractal heap information */ - hbool_t at_tmp_addr = H5F_IS_TMP_ADDR(f, addr); /* Flag to indicate direct block is at temporary address */ - void *write_buf; /* Pointer to buffer to write out */ - size_t write_size; /* Size of buffer to write out */ - uint8_t *p; /* Pointer into raw data buffer */ + /* Set up convenience variables */ + hdr = dblock->hdr; + par_iblock = dblock->parent; - /* Get the pointer to the shared heap header */ - hdr = dblock->hdr; + /* Check for I/O filters on this heap */ + if(hdr->filter_len > 0) { - /* Set the shared heap header's file context for this operation */ - hdr->f = f; + /* Filters are enabled, so set compressed to TRUE, and set + * size equal to the uncompressed size of the direct block. + * If the data is available, set compressed_size to the compressed + * size of the direct block -- otherwise set it equal to the + * uncompressed size. + * + * We have three possible scenarios here. + * + * First, the block may never have been flushed. In this + * case, both dblock->file_size and the size stored in the + * parent (either the header or the parent iblock) will all + * be zero. In this case, return the uncompressed size + * stored in dblock->size as the compressed size. + * + * Second, the block may have just been serialized, in which + * case, dblock->file_size should be zero, and the correct + * on disk size should be stored in the parent (again, either + * the header or the parent iblock as case may be). + * + * Third, we may be in the process of discarding this + * dblock without writing it. In this case, dblock->file_size + * should be non-zero and have the correct size. Note that + * in this case, the direct block will have been detached, + * and thus looking up the parent will likely return incorrect + * data. + */ + size = dblock->size; + compressed = TRUE; + compressed_size = dblock->size; /* will overwrite if compressed + * size is available. + */ + + if(dblock->file_size != 0) + compressed_size = dblock->file_size; + else { + if(par_iblock) { + unsigned par_entry; /* Entry in parent indirect block */ - HDassert(dblock->blk); - p = dblock->blk; + par_entry = dblock->par_entry; + compressed_size = par_iblock->filt_ents[par_entry].size; - /* Magic number */ - HDmemcpy(p, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + } /* end if */ + else { + compressed_size = hdr->pline_root_direct_size; + } - /* Version # */ - *p++ = H5HF_DBLOCK_VERSION; + if(compressed_size == 0) + compressed_size = dblock->size; - /* Address of heap header for heap which owns this block */ - H5F_addr_encode(f, &p, hdr->heap_addr); + } /* end else */ + } /* end if */ + else { + size = dblock->size; + compressed = FALSE; + compressed_size = 0; /* a convenient, invalid value */ + } - /* Offset of block in heap */ - UINT64ENCODE_VAR(p, dblock->block_off, hdr->heap_off_size); + HDassert(size > 0); - /* Metadata checksum */ - if(hdr->checksum_dblocks) { - uint32_t metadata_chksum; /* Computed metadata checksum value */ + *image_len = size; + *compressed_ptr = compressed; + *compressed_image_len_ptr = compressed_size; - /* Clear the checksum field, to compute the checksum */ - HDmemset(p, 0, (size_t)H5HF_SIZEOF_CHKSUM); + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HF__cache_dblock_image_len() */ - /* Compute checksum on entire direct block */ - metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0); + +/*------------------------------------------------------------------------- + * Function: H5HF__cache_dblock_pre_serialize + * + * Purpose: In principle, the purpose of this function is to determine + * the size and location of the disk image of the target direct + * block. In this case, the uncompressed size of the block is + * fixed, but sined the H5C__CLASS_COMPRESSED_FLAG is set, + * we may need to compute and report the compressed size. + * + * This is a bit sticky in the case of a direct block when I/O + * filters are enabled, as the size of the compressed version + * of the on disk image is not known until the direct block has + * been run through the filters. Further, the location of the + * on disk image may change if the compressed size of the image + * changes as well. + * + * To complicate matters further, the direct block may have been + * initially allocated in temporary (AKA imaginary) file space. + * In this case, we must relocate the direct block's on disk + * image to real file space regardless of whether it has changed + * size. + * + * One simplifying factor is the direct block's "blk" field, + * which contains a pointer to a buffer which (with the exception + * of a small header) contains the on disk image in uncompressed + * form. + * + * To square this particular circle, this function does + * everything the serialize function usually does, with the + * exception of copying the image into the image buffer provided + * to the serialize function by the metadata cache. The data to + * copy is provided to the serialize function in a buffer pointed + * to by the write_buf field. + * + * If I/O filters are enabled, on exit, + * H5HF__cache_dblock_pre_serialize() sets the write_buf field to + * point to a buffer containing the filtered image of the direct + * block. The serialize function should free this block, and set + * the write_buf field to NULL after copying it into the image + * buffer provided by the metadata cache. + * + * If I/O filters are not enabled, this function prepares + * the buffer pointed to by the blk field for copying to the + * image buffer provided by the metadata cache, and sets the + * write_buf field equal to the blk field. In this case, the + * serialize function should simply set the write_buf field to + * NULL after copying the direct block image into the image + * buffer. + * + * In both of the above cases, the length of the buffer pointed + * to by write_buf is provided in the write_len field. This + * field must contain 0 on entry to this function, and should + * be set back to 0 at the end of the serialize function. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HF__cache_dblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr, + size_t H5_ATTR_UNUSED *new_len, size_t *new_compressed_len, unsigned *flags) +{ + hbool_t at_tmp_addr; /* Flag to indicate direct block is */ + /* at temporary address */ + haddr_t dblock_addr; + H5HF_hdr_t *hdr; /* Shared fractal heap information */ + H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */ + H5HF_indirect_t *par_iblock; /* Parent indirect block */ + unsigned par_entry; /* Entry in parent indirect block */ + void *write_buf; /* Pointer to buffer to write out */ + size_t write_size; /* Size of buffer to write out */ + uint8_t *image; /* Pointer into raw data buffer */ + unsigned dblock_flags = 0; + herr_t ret_value = SUCCEED; /* Return value */ - /* Metadata checksum */ - UINT32ENCODE(p, metadata_chksum); - } /* end if */ + FUNC_ENTER_STATIC - /* Sanity check */ - HDassert((size_t)(p - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)); + /* Sanity checks */ + HDassert(f); + HDassert(dblock); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK); + HDassert(dblock->write_buf == NULL); + HDassert(dblock->write_size == 0); + HDassert(dblock->cache_info.size == len); + HDassert(H5F_addr_defined(addr)); + HDassert(len == dblock->size); + HDassert(new_addr); + HDassert(new_compressed_len); + HDassert(flags); - /* Check for I/O filters on this heap */ - if(hdr->filter_len > 0) { - H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */ - size_t nbytes; /* Number of bytes used */ - unsigned filter_mask = 0; /* Filter mask for block */ + /* Set up local variables */ + hdr = dblock->hdr; + dblock_addr = addr; /* will update dblock_addr if we move the block */ - /* Allocate buffer to perform I/O filtering on */ - write_size = dblock->size; - if(NULL == (write_buf = H5MM_malloc(write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") - HDmemcpy(write_buf, dblock->blk, write_size); + /* dblock->size must match dblock->cache_info.size */ + HDassert(dblock->cache_info.size == dblock->size); - /* Push direct block data through I/O filter pipeline */ - nbytes = write_size; - if(H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &write_size, &write_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "output pipeline failed") + /* Set the shared heap header's file context for this operation */ + hdr->f = (H5F_t *)f; - /* Use the compressed number of bytes as the size to write */ - write_size = nbytes; + HDassert(hdr); + HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR); - /* Check for root direct block */ - if(dblock->parent == NULL) { - hbool_t hdr_changed = FALSE; /* Whether the header information changed */ + if(dblock->parent) { + /* this is the common case, in which the direct block is the child + * of an indirect block. Set up the convenience variables we will + * need if the address and/or compressed size of the on disk image + * of the direct block changes, and do some sanity checking in + * passing. + */ + par_iblock = dblock->parent; + par_entry = dblock->par_entry; - /* Sanity check */ - HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr)); - HDassert(hdr->pline_root_direct_size > 0); + HDassert(par_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); + } /* end if */ + else { + /* the direct block is a root direct block -- just set par_iblock + * to NULL, as the field will not be used. + */ + par_iblock = NULL; + } /* end else */ - /* Check if the filter mask changed */ - if(hdr->pline_root_direct_filter_mask != filter_mask) { - hdr->pline_root_direct_filter_mask = filter_mask; - hdr_changed = TRUE; - } /* end if */ + at_tmp_addr = H5F_IS_TMP_ADDR(f, addr); - /* Check if we need to re-size the block on disk */ - if(hdr->pline_root_direct_size != write_size || at_tmp_addr) { - /* Check if the direct block is NOT currently allocated in temp. file space */ - /* (temp. file space does not need to be freed) */ - if(!at_tmp_addr) { - /* Release direct block's current disk space */ - if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)hdr->pline_root_direct_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") - } /* end if */ + /* Begin by preping the direct block to be written to disk. Do + * this by writing the correct magic number, the dblock version, + * the address of the header, the offset of the block in the heap, + * and the checksum at the beginning of the block. + */ - /* Allocate space for the compressed direct block */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + HDassert(dblock->blk); + image = dblock->blk; - /* Let the metadata cache know, if the block moved */ - if(!H5F_addr_eq(hdr->man_dtable.table_addr, addr)) - if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") + /* Magic number */ + HDmemcpy(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Update information about compressed direct block's location & size */ - hdr->man_dtable.table_addr = addr; - hdr->pline_root_direct_size = write_size; + /* Version # */ + *image++ = H5HF_DBLOCK_VERSION; - /* Note that heap header was modified */ - hdr_changed = TRUE; - } /* end if */ + /* Address of heap header for heap which owns this block */ + H5F_addr_encode(f, &image, hdr->heap_addr); - /* Check if heap header was modified */ - if(hdr_changed) - if(H5HF_hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") - } /* end if */ - else { - hbool_t par_changed = FALSE; /* Whether the parent's information changed */ - H5HF_indirect_t *par_iblock; /* Parent indirect block */ - unsigned par_entry; /* Entry in parent indirect block */ + /* Offset of block in heap */ + UINT64ENCODE_VAR(image, dblock->block_off, hdr->heap_off_size); - /* Get parent information */ - par_iblock = dblock->parent; - par_entry = dblock->par_entry; + /* Metadata checksum */ + if(hdr->checksum_dblocks) { + uint32_t metadata_chksum; /* Computed metadata checksum value */ - /* Sanity check */ - HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); - HDassert(par_iblock->filt_ents[par_entry].size > 0); + /* Clear the checksum field, to compute the checksum */ + HDmemset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM); - /* Check if the filter mask changed */ - if(par_iblock->filt_ents[par_entry].filter_mask != filter_mask) { - par_iblock->filt_ents[par_entry].filter_mask = filter_mask; - par_changed = TRUE; - } /* end if */ + /* Compute checksum on entire direct block */ + metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0); - /* Check if we need to re-size the block on disk */ - if(par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) { - /* Check if the direct block is NOT currently allocated in temp. file space */ - /* (temp. file space does not need to be freed) */ - if(!at_tmp_addr) { - /* Release direct block's current disk space */ - if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)par_iblock->filt_ents[par_entry].size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") - } /* end if */ + /* Metadata checksum */ + UINT32ENCODE(image, metadata_chksum); + } /* end if */ - /* Allocate space for the compressed direct block */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + /* at this point, dblock->blk should point to an uncompressed image of + * the direct block. If I/O filters are not enabled, this image should + * be ready to hand off to the metadata cache. + */ - /* Let the metadata cache know, if the block moved */ - if(!H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)) - if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") + /* Sanity check */ + HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)); - /* Update information about compressed direct block's location & size */ - par_iblock->ents[par_entry].addr = addr; - par_iblock->filt_ents[par_entry].size = write_size; + /* If I/O filters are enabled on this heap, we must run the direct block + * image through the filters to obtain the image that we will hand off + * to the metadata cache. + */ - /* Note that parent was modified */ - par_changed = TRUE; - } /* end if */ + /* Check for I/O filters on this heap */ + if(hdr->filter_len > 0) { + H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */ + size_t nbytes; /* Number of bytes used */ + unsigned filter_mask = 0; /* Filter mask for block */ - /* Check if parent was modified */ - if(par_changed) - if(H5HF_iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") - } /* end else */ - } /* end if */ - else { - write_buf = dblock->blk; - write_size = dblock->size; + /* Allocate buffer to perform I/O filtering on */ + write_size = dblock->size; - /* Check for needing to re-allocate direct block from 'temp.' to 'normal' file space */ - if(at_tmp_addr) { - /* Check for root direct block */ - if(NULL == dblock->parent) { - /* Sanity check */ - HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr)); + if(NULL == (write_buf = H5MM_malloc(write_size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") + HDmemcpy(write_buf, dblock->blk, write_size); - /* Allocate 'normal' space for the direct block */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + /* Push direct block data through I/O filter pipeline */ + nbytes = write_size; + if(H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &write_size, &write_buf) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "output pipeline failed") + + /* Use the compressed number of bytes as the size to write */ + write_size = nbytes; + + /* If the size and/or location of the on disk image of the + * direct block changes, we must touch up its parent to reflect + * these changes. Do this differently depending on whether the + * direct block's parent is an indirect block or (rarely) the + * fractal heap header. In this case, the direct block is known + * as a root direct block. + */ - /* Sanity check */ - HDassert(!H5F_addr_eq(hdr->man_dtable.table_addr, addr)); + /* Check for root direct block */ + if(dblock->parent == NULL) { + hbool_t hdr_changed = FALSE; /* Whether the header info changed */ - /* Let the metadata cache know the block moved */ - if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") + /* Sanity check */ + HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr)); + HDassert(hdr->pline_root_direct_size > 0); - /* Update information about direct block's location */ - hdr->man_dtable.table_addr = addr; + /* Check if the filter mask changed */ + if(hdr->pline_root_direct_filter_mask != filter_mask) { + hdr->pline_root_direct_filter_mask = filter_mask; + hdr_changed = TRUE; + } /* end if */ + + /* verify that the cache's last record of the compressed + * size matches the heap's last record. This value will + * likely change shortly. + */ + HDassert(compressed_len == hdr->pline_root_direct_size); - /* Mark that heap header was modified */ - if(H5HF_hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + /* Check if we need to re-size the block on disk */ + if(hdr->pline_root_direct_size != write_size || at_tmp_addr) { + /* Check if the direct block is NOT currently allocated + * in temp. file space + * + * (temp. file space does not need to be freed) + */ + if(!at_tmp_addr) { + /* Release direct block's current disk space */ + if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)hdr->pline_root_direct_size) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") } /* end if */ - else { - H5HF_indirect_t *par_iblock; /* Parent indirect block */ - unsigned par_entry; /* Entry in parent indirect block */ - /* Get parent information */ - par_iblock = dblock->parent; - par_entry = dblock->par_entry; + /* Allocate space for the compressed direct block */ + if(HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + + /* Let the metadata cache know, if the block moved */ + if(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr)) + if(H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, dblock_addr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") + + /* Update information about compressed direct block's + * location & size + */ + HDassert(hdr->man_dtable.table_addr == addr); + HDassert(hdr->pline_root_direct_size == compressed_len); + hdr->man_dtable.table_addr = dblock_addr; + hdr->pline_root_direct_size = write_size; + + /* Note that heap header was modified */ + hdr_changed = TRUE; + } /* end if */ + + /* Check if heap header was modified */ + if(hdr_changed) + if(H5HF_hdr_dirty(hdr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + } /* end if */ + else { /* the direct block's parent is an indirect block */ + hbool_t par_changed = FALSE; /* Whether the parent's infochanged */ + + /* Sanity check */ + HDassert(par_iblock); + HDassert(par_iblock->filt_ents[par_entry].size > 0); - /* Sanity check */ - HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); + /* Check if the filter mask changed */ + if(par_iblock->filt_ents[par_entry].filter_mask != filter_mask) { + par_iblock->filt_ents[par_entry].filter_mask = filter_mask; + par_changed = TRUE; + } /* end if */ - /* Allocate 'normal' space for the direct block */ - if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + /* verify that the cache's last record of the compressed + * size matches the heap's last record. This value will + * likely change shortly. + */ + HDassert(compressed_len == par_iblock->filt_ents[par_entry].size); - /* Sanity check */ - HDassert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); + /* Check if we need to re-size the block on disk */ + if(par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) { + /* Check if the direct block is NOT currently allocated + * in temp. file space + * + * (temp. file space does not need to be freed) + */ + if(!at_tmp_addr) { + /* Release direct block's current disk space */ + if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, addr, (hsize_t)par_iblock->filt_ents[par_entry].size) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") + } /* end if */ - /* Let the metadata cache know the block moved */ - if(H5AC_move_entry(f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, addr) < 0) + /* Allocate space for the compressed direct block */ + if(HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") + + /* Let the metadata cache know, if the block moved */ + if(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr)) + if(H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, dblock_addr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") - /* Update information about direct block's location */ - par_iblock->ents[par_entry].addr = addr; + /* Update information about compressed direct block's + * location & size + */ + HDassert(par_iblock->ents[par_entry].addr == addr); + HDassert(par_iblock->filt_ents[par_entry].size == compressed_len); + par_iblock->ents[par_entry].addr = dblock_addr; + par_iblock->filt_ents[par_entry].size = write_size; - /* Mark that parent was modified */ - if(H5HF_iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") - } /* end else */ + /* Note that parent was modified */ + par_changed = TRUE; } /* end if */ + + /* Check if parent was modified */ + if(par_changed) + if(H5HF_iblock_dirty(par_iblock) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") } /* end else */ + } /* end if */ + else { + /* I/O filters are not enabled -- thus all we need to do is check to + * see if the direct block is in temporary (AKA imaginary) file + * space, and move it to real file space if it is. + * + * As in the I/O filters case above, we will have to touch up the + * direct blocks parent if the direct block is relocated. + * + * Recall that temporary file space need not be freed, which + * simplifies matters slightly. + */ + write_buf = dblock->blk; + write_size = dblock->size; - /* Direct block must be in 'normal' file space now */ - HDassert(!H5F_IS_TMP_ADDR(f, addr)); + /* Check to see if we must re-allocate direct block from 'temp.' + * to 'normal' file space + */ + if(at_tmp_addr) { + /* Check for root direct block */ + if(NULL == dblock->parent) { + /* Sanity check */ + HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr)); - /* Write the direct block */ - if(H5F_block_write(f, H5FD_MEM_FHEAP_DBLOCK, addr, write_size, dxpl_id, write_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFLUSH, FAIL, "unable to save fractal heap direct block to disk") + /* Allocate 'normal' space for the direct block */ + if(HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") - /* Release the write buffer, if it was allocated */ - if(write_buf != dblock->blk) - H5MM_xfree(write_buf); + /* Sanity check */ + HDassert(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr)); - dblock->cache_info.is_dirty = FALSE; - } /* end if */ + /* Let the metadata cache know the block moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, dblock_addr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") - if(destroy) - if(H5HF_cache_dblock_dest(f, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block") + /* Update information about direct block's location */ + hdr->man_dtable.table_addr = dblock_addr; -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5HF_cache_dblock_flush() */ + /* Mark that heap header was modified */ + if(H5HF_hdr_dirty(hdr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + } /* end if */ + else { /* the direct block's parent is an indirect block */ + /* Sanity check */ + HDassert(par_iblock); + HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); - -/*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_dest - * - * Purpose: Destroys a fractal heap direct block in memory. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 27 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock) -{ - herr_t ret_value = SUCCEED; /* Return value */ + /* Allocate 'normal' space for the direct block */ + if(HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, dxpl_id, (hsize_t)write_size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap direct block") - FUNC_ENTER_NOAPI_NOINIT + /* Sanity check */ + HDassert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr)); - /* - * Check arguments. - */ - HDassert(dblock); + /* Let the metadata cache know the block moved */ + if(H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_DBLOCK, par_iblock->ents[par_entry].addr, dblock_addr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move direct block") - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!dblock->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblock->cache_info.addr)); + /* Update information about direct block's location */ + par_iblock->ents[par_entry].addr = dblock_addr; - /* Check for freeing file space for direct block */ - if(dblock->cache_info.free_file_space_on_destroy) { - /* Sanity check */ - HDassert(dblock->file_size > 0); - - /* Check if the direct block is NOT currently allocated in temp. file space */ - /* (temp. file space does not need to be freed) */ - if(!H5F_IS_TMP_ADDR(f, dblock->cache_info.addr)) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, H5AC_dxpl_id, dblock->cache_info.addr, dblock->file_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") + /* Mark that parent was modified */ + if(H5HF_iblock_dirty(par_iblock) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + } /* end else */ } /* end if */ + } /* end else */ + + /* At this point, write_buf points to a buffer containing the image + * of the direct block that is ready to copy into the image buffer, + * and write_size contains the length of this buffer. + * + * Also, if image size or address has changed, the direct block's + * parent has been modified to reflect the change. + * + * Now, make note of the pointer and length of the above buffer for + * use by the serialize function. + */ + dblock->write_buf = (uint8_t *)write_buf; + dblock->write_size = write_size; + + /* finally, pass data back to the metadata cache as appropriate */ + if(!H5F_addr_eq(addr, dblock_addr)) { + dblock_flags |= H5C__SERIALIZE_MOVED_FLAG; + *new_addr = dblock_addr; } /* end if */ - /* Destroy fractal heap direct block */ - if(H5HF_man_dblock_dest(dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block") + if((hdr->filter_len > 0) && (compressed_len != write_size)) { + dblock_flags |= H5C__SERIALIZE_COMPRESSED_FLAG; + *new_compressed_len = write_size; + } /* end if */ + + *flags = dblock_flags; + + /* final sanity check */ + HDassert(dblock->write_buf); + HDassert(dblock->write_size > 0); done: + /* discard the write buf if we have an error */ + if(write_buf && (write_buf != dblock->blk) && (dblock->write_buf == NULL)) + H5MM_xfree(write_buf); + FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_dblock_dest() */ +} /* end H5HF__cache_dblock_pre_serialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_clear + * Function: H5HF__cache_dblock_serialize * - * Purpose: Mark a fractal heap direct block in memory as non-dirty. + * Purpose: In principle, this function is supposed to construct the on + * disk image of the direct block, and place that image in the + * image buffer provided by the metadata cache. * - * Return: Non-negative on success/Negative on failure + * However, since there are cases in which the pre_serialize + * function has to construct the on disk image to determine its size + * and address, this function simply copies the image prepared by + * the pre-serialize function into the supplied image buffer, and + * discards a buffer if necessary. * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 27 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy) +static herr_t +H5HF__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* - * Check arguments. - */ + /* Sanity checks */ + HDassert(f); + HDassert(image); + HDassert(len > 0); HDassert(dblock); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK); + HDassert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size)); + HDassert(dblock->write_buf); + HDassert(dblock->write_size > 0); + HDassert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size)); + HDassert(dblock->write_size == len); + + /* Copy the image from *(dblock->write_buf) to *image */ + HDmemcpy(image, dblock->write_buf, dblock->write_size); + + /* Free *(dblock->write_buf) if it was allocated by the + * pre-serialize function + */ + if(dblock->write_buf != dblock->blk) + H5MM_xfree(dblock->write_buf); - /* Reset the dirty flag. */ - dblock->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5HF_cache_dblock_dest(f, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block") + /* Reset the write_buf and write_size fields */ + dblock->write_buf = NULL; + dblock->write_size = 0; -done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_dblock_clear() */ +} /* end H5HF__cache_dblock_serialize() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_notify + * Function: H5HF__cache_dblock_notify * * Purpose: Setup / takedown flush dependencies as direct blocks * are loaded / inserted and evicted from the metadata cache. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * * Programmer: John Mainzer - * 5/17/14 + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t *dblock) +static herr_t +H5HF__cache_dblock_notify(H5C_notify_action_t action, void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Fractal heap direct block */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Sanity checks */ HDassert(dblock); HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK); HDassert(dblock->hdr); HDassert((dblock->fd_parent) || ((dblock->hdr->man_dtable.curr_root_rows == 0) && (dblock->block_off == (hsize_t)0))); switch(action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: + case H5AC_NOTIFY_ACTION_AFTER_LOAD: HDassert(dblock->parent == dblock->fd_parent); if(dblock->parent) { /* this is a leaf dblock */ /* create flush dependency with parent iblock */ @@ -1964,6 +2392,10 @@ H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t *dblock) } /* end else */ break; + case H5AC_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: HDassert((dblock->parent == dblock->fd_parent) || ((NULL == dblock->parent) && (dblock->fd_parent))); @@ -1986,39 +2418,47 @@ H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t *dblock) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HF_cache_dblock_notify() */ +} /* end H5HF__cache_dblock_notify() */ /*------------------------------------------------------------------------- - * Function: H5HF_cache_dblock_size + * Function: H5HF__cache_dblock_free_icr * - * Purpose: Compute the size in bytes of a fractal heap direct block - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Free the in core memory allocated to the supplied direct + * block. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Feb 24 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ -static herr_t -H5HF_cache_dblock_size(const H5F_t H5_ATTR_UNUSED *f, const H5HF_direct_t *dblock, size_t *size_ptr) +static herr_t +H5HF__cache_dblock_free_icr(void *_thing) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Fractal heap direct block */ + herr_t ret_value = SUCCEED; /* Return value */ - /* check arguments */ - HDassert(dblock); - HDassert(size_ptr); + FUNC_ENTER_STATIC - /* Set size value */ - *size_ptr = dblock->size; + /* Sanity checks */ + HDassert(dblock); + HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK); - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HF_cache_dblock_size() */ + /* Destroy fractal heap direct block */ + if(H5HF_man_dblock_dest(dblock) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block") +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5HF__cache_dblock_free_icr() */ /*------------------------------------------------------------------------ @@ -2144,7 +2584,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id, * in this case, since we know that the entry is in cache, * we can pass NULL udata. */ - if(NULL == (root_iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5AC_READ))) + if(NULL == (root_iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_root_iblock = TRUE; } /* end if */ @@ -2205,7 +2645,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id, * in this case, since we know that the entry is in cache, * we can pass NULL udata. */ - if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5AC_READ))) + if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_root_iblock = TRUE; HDassert(iblock == root_iblock); @@ -2595,7 +3035,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, hid_t dxpl_id, /* in this case, since we know that the */ /* entry is in cache, we can pass NULL udata */ - if(NULL == (child_iblock = (H5HF_indirect_t *) H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, child_iblock_addr, NULL, H5AC_READ))) + if(NULL == (child_iblock = (H5HF_indirect_t *) H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, child_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_child_iblock = TRUE; } /* end if */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 8620f6f..5183b67 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -323,7 +323,7 @@ H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, HDassert(fwidth >= 0); /* Load the fractal heap header */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, addr, H5AC_READ))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* Print the information about the heap's header */ @@ -459,13 +459,13 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, HDassert(block_size > 0); /* Load the fractal heap header */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* * Load the heap direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, addr, block_size, NULL, 0, H5AC_READ))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, addr, block_size, NULL, 0, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block") /* Print opening message */ @@ -716,13 +716,13 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, HDassert(nrows > 0); /* Load the fractal heap header */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC_READ))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, hdr_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* * Load the heap indirect block */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, FALSE, H5AC_READ, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, FALSE, H5AC__READ_ONLY_FLAG, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block") /* Print the information about the heap's indirect block */ @@ -825,7 +825,7 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr, HDassert(fwidth >= 0); /* Load the fractal heap header */ - if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC_READ))) + if(NULL == (hdr = H5HF_hdr_protect(f, dxpl_id, fh_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") /* Initialize the free space information for the heap */ diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 9a8da4a..5dd5b0c 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -149,6 +149,9 @@ H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo HDmemset(dblock->blk, 0, dblock->size); #endif /* H5_CLEAR_MEMORY */ + dblock->write_buf = NULL; + dblock->write_size = 0; + /* Allocate [temporary] space for the direct block on disk */ if(H5F_USE_TMP_SPACE(hdr->f)) { if(HADDR_UNDEF == (dblock_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)dblock->size))) @@ -308,9 +311,13 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock, } /* end if */ } /* end else */ - /* Indicate that the indirect block should be deleted & file space freed */ + /* Indicate that the indirect block should be deleted */ dblock->file_size = dblock_size; - cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; + cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG; + + /* If the dblock is in real file space, also tell the cache to free its file space */ + if (!H5F_IS_TMP_ADDR(hdr->f, dblock_addr)) + cache_flags |= H5AC__FREE_FILE_SPACE_FLAG; done: /* Unprotect the indirect block, with appropriate flags */ @@ -436,7 +443,7 @@ done: H5HF_direct_t * H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, size_t dblock_size, H5HF_indirect_t *par_iblock, unsigned par_entry, - H5AC_protect_t rw) + unsigned flags) { H5HF_direct_t *dblock; /* Direct block from cache */ H5HF_dblock_cache_ud_t udata; /* parent and other infor for deserializing direct block */ @@ -451,6 +458,9 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, HDassert(H5F_addr_defined(dblock_addr)); HDassert(dblock_size > 0); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up parent info */ udata.par_info.hdr = hdr; udata.par_info.iblock = par_iblock; @@ -485,7 +495,7 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, } /* end else */ /* Protect the direct block */ - if(NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, rw))) + if(NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap direct block") /* Set the return value */ @@ -512,7 +522,7 @@ done: herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, H5HF_indirect_t **ret_iblock, unsigned *ret_entry, hbool_t *ret_did_protect, - H5AC_protect_t rw) + unsigned flags) { haddr_t iblock_addr; /* Indirect block's address */ H5HF_indirect_t *iblock; /* Pointer to indirect block */ @@ -531,6 +541,9 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, HDassert(ret_iblock); HDassert(ret_did_protect); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (~H5AC__READ_ONLY_FLAG)) == 0); + /* Look up row & column for object */ if(H5HF_dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object") @@ -539,7 +552,7 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, iblock_addr = hdr->man_dtable.table_addr; /* Lock root indirect block */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, hdr->man_dtable.curr_root_rows, NULL, 0, FALSE, rw, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, hdr->man_dtable.curr_root_rows, NULL, 0, FALSE, flags, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Check for indirect block row */ @@ -569,7 +582,7 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, } /* end if */ /* Lock child indirect block */ - if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, iblock, entry, FALSE, rw, &new_did_protect))) + if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, iblock, entry, FALSE, flags, &new_did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Release the current indirect block */ diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index cf8da23..340940f 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -529,7 +529,7 @@ done: *------------------------------------------------------------------------- */ H5HF_hdr_t * -H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) +H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags) { H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ H5HF_hdr_t *hdr; /* Fractal heap header */ @@ -541,12 +541,15 @@ H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) HDassert(f); HDassert(H5F_addr_defined(addr)); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Set up userdata for protect call */ cache_udata.f = f; cache_udata.dxpl_id = dxpl_id; /* Lock the heap header into memory */ - if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, &cache_udata, rw))) + if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, &cache_udata, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") /* Set the header's address */ @@ -1109,7 +1112,7 @@ H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block") /* Lock new indirect block */ - if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, new_iblock_addr, child_nrows, iblock, next_entry, FALSE, H5AC_WRITE, &did_protect))) + if(NULL == (new_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, new_iblock_addr, child_nrows, iblock, next_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Move iterator down one level (pins indirect block) */ @@ -1303,7 +1306,7 @@ H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr) child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[row]); /* Lock child indirect block */ - if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock->ents[curr_entry].addr, child_nrows, iblock, curr_entry, FALSE, H5AC_WRITE, &did_protect))) + if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock->ents[curr_entry].addr, child_nrows, iblock, curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Set the current location of the iterator */ diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index 4473803..547aaf0 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -330,8 +330,15 @@ H5HF_iblock_decr(H5HF_indirect_t *iblock) /* Check for expunging the indirect block from the metadata cache */ if(expunge_iblock) { - /* Evict the indirect block from the metadata cache */ - if(H5AC_expunge_entry(hdr->f, H5AC_dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0) + unsigned cache_flags = H5AC__NO_FLAGS_SET; + + /* if the indirect block is in real file space, tell + * the cache to free its file space. + */ + if (!H5F_IS_TMP_ADDR(hdr->f, iblock_addr)) + cache_flags |= H5AC__FREE_FILE_SPACE_FLAG; + + if(H5AC_expunge_entry(hdr->f, H5AC_dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, cache_flags) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove indirect block from cache") } /* end if */ } /* end if */ @@ -424,7 +431,7 @@ H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si /* Move current direct block (used as root) into new indirect block */ /* Lock new indirect block */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, NULL, 0, FALSE, H5AC_WRITE, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, NULL, 0, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Check if there's already a direct block as root) */ @@ -433,7 +440,7 @@ H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si H5HF_direct_t *dblock; /* Pointer to direct block to query */ /* Lock first (root) direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, hdr->man_dtable.table_addr, hdr->man_dtable.cparam.start_block_size, NULL, 0, H5AC_WRITE))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, hdr->man_dtable.table_addr, hdr->man_dtable.cparam.start_block_size, NULL, 0, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") /* Attach direct block to new root indirect block */ @@ -879,7 +886,7 @@ H5HF_man_iblock_root_revert(H5HF_indirect_t *root_iblock, hid_t dxpl_id) dblock_size = hdr->man_dtable.cparam.start_block_size; /* Get pointer to last direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, root_iblock, 0, H5AC_WRITE))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, root_iblock, 0, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") HDassert(dblock->parent == root_iblock); HDassert(dblock->par_entry == 0); @@ -1159,7 +1166,7 @@ done: H5HF_indirect_t * H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, - hbool_t must_protect, H5AC_protect_t rw, hbool_t *did_protect) + hbool_t must_protect, unsigned flags, hbool_t *did_protect) { H5HF_parent_t par_info; /* Parent info for loading block */ H5HF_indirect_t *iblock = NULL; /* Indirect block from cache */ @@ -1176,6 +1183,9 @@ H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, HDassert(iblock_nrows > 0); HDassert(did_protect); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Check if we are allowed to use existing pinned iblock pointer */ if(!must_protect) { /* Check for this block already being pinned */ @@ -1235,7 +1245,7 @@ H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, cache_udata.nrows = &iblock_nrows; /* Protect the indirect block */ - if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, &cache_udata, rw))) + if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, &cache_udata, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap indirect block") /* Set the indirect block's address */ @@ -1579,7 +1589,7 @@ H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, HDassert(iblock_nrows > 0); /* Lock indirect block */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, par_iblock, par_entry, TRUE, H5AC_WRITE, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, par_iblock, par_entry, TRUE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") HDassert(iblock->nchildren > 0); HDassert(did_protect == TRUE); @@ -1637,8 +1647,14 @@ H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, } #endif /* NDEBUG */ - /* Indicate that the indirect block should be deleted & file space freed */ - cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; + /* Indicate that the indirect block should be deleted */ + cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG; + + /* If the indirect block is in real file space, tell + * the cache to free its file space as well. + */ + if (!H5F_IS_TMP_ADDR(hdr->f, iblock_addr)) + cache_flags |= H5AC__FREE_FILE_SPACE_FLAG; done: /* Unprotect the indirect block, with appropriate flags */ @@ -1680,7 +1696,7 @@ H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_ad HDassert(heap_size); /* Protect the indirect block */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, par_iblock, par_entry, FALSE, H5AC_READ, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, par_iblock, par_entry, FALSE, H5AC__READ_ONLY_FLAG, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block") /* Accumulate size of this indirect block */ diff --git a/src/H5HFiter.c b/src/H5HFiter.c index 137d0ee..262a9ee 100644 --- a/src/H5HFiter.c +++ b/src/H5HFiter.c @@ -217,7 +217,7 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id, } /* end else */ /* Load indirect block for this context location */ - if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, FALSE, H5AC_WRITE, &did_protect))) + if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") /* Make indirect block the context for the current location */ diff --git a/src/H5HFman.c b/src/H5HFman.c index 58dab10..5f95a91 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -161,7 +161,7 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Lock direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC_WRITE))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block") /* Insert object into block */ @@ -274,7 +274,11 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data, unsigned op_flags) { H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */ - H5AC_protect_t dblock_access; /* Access method for direct block */ + unsigned dblock_access_flags; /* Access method for direct block */ + /* must equal either + * H5AC__NO_FLAGS_SET or + * H5AC__READ_ONLY_FLAG + */ haddr_t dblock_addr; /* Direct block address */ size_t dblock_size; /* Direct block size */ unsigned dblock_cache_flags; /* Flags for unprotecting direct block */ @@ -298,11 +302,11 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, /* Check pipeline */ H5HF_MAN_WRITE_CHECK_PLINE(hdr) - dblock_access = H5AC_WRITE; + dblock_access_flags = H5AC__NO_FLAGS_SET; dblock_cache_flags = H5AC__DIRTIED_FLAG; } /* end if */ else { - dblock_access = H5AC_READ; + dblock_access_flags = H5AC__READ_ONLY_FLAG; dblock_cache_flags = H5AC__NO_FLAGS_SET; } /* end else */ @@ -332,7 +336,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, dblock_size = hdr->man_dtable.cparam.start_block_size; /* Lock direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, NULL, 0, dblock_access))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, NULL, 0, dblock_access_flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") } /* end if */ else { @@ -341,7 +345,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, unsigned entry; /* Entry of block */ /* Look up indirect block containing direct block */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC_READ) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC__READ_ONLY_FLAG) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") /* Set direct block info */ @@ -359,7 +363,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, } /* end if */ /* Lock direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, iblock, entry, dblock_access))) { + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, iblock, entry, dblock_access_flags))) { /* Unlock indirect block */ if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") @@ -578,7 +582,7 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id) } /* end if */ else { /* Look up indirect block containing direct block */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC_WRITE) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") /* Check for offset of invalid direct block */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 63c1a3e..4655d83 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -341,7 +341,7 @@ typedef struct H5HF_hdr_t { size_t rc; /* Reference count of heap's components using heap header */ haddr_t heap_addr; /* Address of heap header in the file */ size_t heap_size; /* Size of heap header in the file */ - H5AC_protect_t mode; /* Access mode for heap */ + unsigned mode; /* Access mode for heap */ H5F_t *f; /* Pointer to file for heap */ size_t file_rc; /* Reference count of files using heap header */ hbool_t pending_delete; /* Heap is pending deletion */ @@ -424,6 +424,31 @@ typedef struct H5HF_direct_t { size_t size; /* Size of direct block */ hsize_t file_size; /* Size of direct block in file (only valid when block's space is being freed) */ uint8_t *blk; /* Pointer to buffer containing block data */ + uint8_t *write_buf; /* Pointer to buffer containing the block data */ + /* in form ready to copy to the metadata */ + /* cache's image buffer. */ + /* */ + /* This field is used by */ + /* H5HF_cache_dblock_pre_serialize() to pass */ + /* the serialized image of the direct block to */ + /* H5HF_cache_dblock_serialize(). It should */ + /* NULL at all other times. */ + /* */ + /* If I/O filters are enabled, the pre- */ + /* the pre-serialize function will allocate */ + /* a buffer, copy the filtered version of the */ + /* direct block image into it, and place the */ + /* base address of the buffer in this field. */ + /* The serialize function must discard this */ + /* buffer after it copies the contents into */ + /* the image buffer provided by the metadata */ + /* cache. */ + /* */ + /* If I/O filters are not enabled, the */ + /* write_buf field is simply set equal to the */ + /* blk field by the pre-serialize function, */ + /* and back to NULL by the serialize function. */ + size_t write_size; /* size of the buffer pointed to by write_buf. */ /* Stored values */ hsize_t block_off; /* Offset of the block within the heap's address space */ @@ -597,7 +622,7 @@ H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f); H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam); H5_DLL H5HF_hdr_t *H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, - H5AC_protect_t rw); + unsigned flags); H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr); H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr); H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr); @@ -638,7 +663,7 @@ H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect, - H5AC_protect_t rw, hbool_t *did_protect); + unsigned flags, hbool_t *did_protect); H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned cache_flags, hbool_t did_protect); H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, @@ -664,10 +689,10 @@ H5_DLL herr_t H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, size_t dblock_size, H5HF_indirect_t *par_iblock, unsigned par_entry, - H5AC_protect_t rw); + unsigned flags); H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off, H5HF_indirect_t **par_iblock, - unsigned *par_entry, hbool_t *par_did_protect, H5AC_protect_t rw); + unsigned *par_entry, hbool_t *par_did_protect, unsigned flags); H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr, hsize_t dblock_size); H5_DLL herr_t H5HF_man_dblock_dest(H5HF_direct_t *dblock); diff --git a/src/H5HFsection.c b/src/H5HFsection.c index 01a7b4a..c997119 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -555,7 +555,7 @@ H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh, HDassert(sect); /* Look up indirect block containing direct blocks for range */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect, H5AC_READ) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect, H5AC__READ_ONLY_FLAG) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") /* Increment reference count on indirect block that free section is in */ @@ -776,7 +776,7 @@ H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id, hdr->man_dtable.curr_root_rows > 0) { H5HF_direct_t *dblock; /* Pointer to direct block for section */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sect->u.single.parent, sect->u.single.par_entry, H5AC_WRITE))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sect->u.single.parent, sect->u.single.par_entry, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block") HDassert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr)); @@ -1094,7 +1094,7 @@ H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void H5_ATTR_UNUSED *_udata /* (should be a root direct block) */ HDassert(dblock_addr == hdr->man_dtable.table_addr); if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, - dblock_size, (*sect)->u.single.parent, (*sect)->u.single.par_entry, H5AC_WRITE))) + dblock_size, (*sect)->u.single.parent, (*sect)->u.single.par_entry, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block") HDassert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size)); @@ -1221,7 +1221,7 @@ H5HF_sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5F H5HF_direct_t *dblock; /* Direct block for section */ /* Protect the direct block for the section */ - dblock = H5HF_man_dblock_protect(iblock->hdr, H5AC_dxpl_id, dblock_addr, dblock_size, iblock, sect->u.single.par_entry, H5AC_READ); + dblock = H5HF_man_dblock_protect(iblock->hdr, H5AC_dxpl_id, dblock_addr, dblock_size, iblock, sect->u.single.par_entry, H5AC__READ_ONLY_FLAG); HDassert(dblock); /* Sanity check settings for section */ @@ -2536,7 +2536,7 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id, /* If the child indirect block's address is defined, protect it */ if(H5F_addr_defined(child_iblock_addr)) { - if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, child_iblock_addr, child_nrows, sect->u.indirect.u.iblock, curr_entry, FALSE, H5AC_WRITE, &did_protect))) + if(NULL == (child_iblock = H5HF_man_iblock_protect(hdr, dxpl_id, child_iblock_addr, child_nrows, sect->u.indirect.u.iblock, curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") } /* end if */ else @@ -2771,7 +2771,7 @@ H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_ HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED); /* Look up indirect block containing indirect blocks for section */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, NULL, &did_protect, H5AC_READ) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, sect->sect_info.addr, &sec_iblock, NULL, &did_protect, H5AC__READ_ONLY_FLAG) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") /* Increment reference count on indirect block that free section is in */ diff --git a/src/H5HG.c b/src/H5HG.c index ac8ed8d..46b535d 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -246,7 +246,7 @@ done: *------------------------------------------------------------------------- */ H5HG_heap_t * -H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) +H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags) { H5HG_heap_t *heap; /* Global heap */ H5HG_heap_t *ret_value; /* Return value */ @@ -257,8 +257,11 @@ H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) HDassert(f); HDassert(H5F_addr_defined(addr)); + /* only H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Lock the heap into memory */ - if(NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, f, rw))) + if(NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, f, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap") /* Set the heap's address */ @@ -440,7 +443,7 @@ H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need) HDassert(H5F_addr_defined(addr)); /* Protect the heap */ - if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE))) + if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") /* Re-allocate the heap information in memory */ @@ -554,7 +557,7 @@ H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*/ } /* end if */ HDassert(H5F_addr_defined(addr)); - if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE))) + if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") /* Split the free space to make room for the new object */ @@ -618,7 +621,7 @@ H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/, HDassert(hobj); /* Load the heap */ - if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_READ))) + if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap") HDassert(hobj->idx < heap->nused); @@ -692,7 +695,7 @@ H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust) HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file") /* Load the heap */ - if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE))) + if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") if(adjust != 0) { @@ -755,7 +758,7 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj) HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file") /* Load the heap */ - if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_WRITE))) + if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") HDassert(hobj->idx < heap->nused); diff --git a/src/H5HGcache.c b/src/H5HGcache.c index aac73ed..5c6bee1 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -62,12 +62,14 @@ /********************/ /* Metadata cache callbacks */ -static H5HG_heap_t *H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - H5HG_heap_t *heap, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5HG_dest(H5F_t *f, H5HG_heap_t *heap); -static herr_t H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy); -static herr_t H5HG_size(const H5F_t *f, const H5HG_heap_t *heap, size_t *size_ptr); +static herr_t H5HG__cache_heap_get_load_size(const void *udata, size_t *image_len); +static void *H5HG__cache_heap_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HG__cache_heap_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5HG__cache_heap_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HG__cache_heap_free_icr(void *thing); /*********************/ @@ -76,13 +78,19 @@ static herr_t H5HG_size(const H5F_t *f, const H5HG_heap_t *heap, size_t *size_pt /* H5HG inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_GHEAP[1] = {{ - H5AC_GHEAP_ID, - (H5AC_load_func_t)H5HG_load, - (H5AC_flush_func_t)H5HG_flush, - (H5AC_dest_func_t)H5HG_dest, - (H5AC_clear_func_t)H5HG_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5HG_size, + H5AC_GHEAP_ID, /* Metadata client ID */ + "global heap", /* Metadata client name (for debugging) */ + H5FD_MEM_GHEAP, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5HG__cache_heap_get_load_size, /* 'get_load_size' callback */ + H5HG__cache_heap_deserialize, /* 'deserialize' callback */ + H5HG__cache_heap_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5HG__cache_heap_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5HG__cache_heap_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -98,162 +106,204 @@ const H5AC_class_t H5AC_GHEAP[1] = {{ /*------------------------------------------------------------------------- - * Function: H5HG_load + * Function: H5HG__cache_heap_get_load_size() * - * Purpose: Loads a global heap collection from disk. + * Purpose: Return the initial speculative read size to the metadata + * cache. This size will be used in the initial attempt to read + * the global heap. If this read is too small, the cache will + * try again with the correct value obtained from + * H5HG__cache_heap_image_len(). * - * Return: Success: Ptr to a global heap collection. + * Return: Success: SUCCEED + * Failure: FAIL * - * Failure: NULL + * Programmer: John Mainzer + * 7/27/14 * - * Programmer: Robb Matzke - * Friday, March 27, 1998 + *------------------------------------------------------------------------- + */ +static herr_t +H5HG__cache_heap_get_load_size(const void H5_ATTR_UNUSED *_udata, size_t *image_len) +{ + FUNC_ENTER_STATIC_NOERR + + HDassert(image_len); + + *image_len = (size_t)H5HG_MINSIZE; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HG__cache_heap_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5HG__cache_heap_deserialize + * + * Purpose: Given a buffer containing the on disk image of the global + * heap, deserialize it, load its contents into a newly allocated + * instance of H5HG_heap_t, and return a pointer to the new instance. + * + * Note that this heap client uses speculative reads. If the supplied + * buffer is too small, we simply make note of the correct size, and + * wait for the metadata cache to try again. + * + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 7/27/14 * *------------------------------------------------------------------------- */ -static H5HG_heap_t * -H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +static void * +H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5HG_heap_t *heap = NULL; - uint8_t *p; - size_t nalloc, need; - size_t max_idx = 0; /* The maximum index seen */ - H5HG_heap_t *ret_value = NULL; /* Return value */ + H5F_t *f = (H5F_t *)_udata; /* File pointer -- obtained from user data */ + H5HG_heap_t *heap = NULL; /* New global heap */ + uint8_t *image; /* Pointer to image to decode */ + void *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* check arguments */ + /* Sanity checks */ + HDassert(_image); + HDassert(len >= (size_t)H5HG_MINSIZE); HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(udata); + HDassert(dirty); - /* Read the initial 4k page */ + /* Allocate a new global heap */ if(NULL == (heap = H5FL_CALLOC(H5HG_heap_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") heap->shared = H5F_SHARED(f); - if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, (size_t)H5HG_MINSIZE))) + if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, len))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - if(H5F_block_read(f, H5FD_MEM_GHEAP, addr, (size_t)H5HG_MINSIZE, dxpl_id, heap->chunk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection") - p = heap->chunk; + + /* copy the image buffer into the newly allocate chunk */ + HDmemcpy(heap->chunk, _image, len); + + image = heap->chunk; /* Magic number */ - if(HDmemcmp(p, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad global heap collection signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad global heap collection signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(H5HG_VERSION != *p++) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong version number in global heap") + if(H5HG_VERSION != *image++) + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong version number in global heap") /* Reserved */ - p += 3; + image += 3; /* Size */ - H5F_DECODE_LENGTH(f, p, heap->size); + H5F_DECODE_LENGTH(f, image, heap->size); HDassert(heap->size >= H5HG_MINSIZE); - - /* - * If we didn't read enough in the first try, then read the rest of the - * collection now. - */ - if(heap->size > H5HG_MINSIZE) { - haddr_t next_addr = addr + (hsize_t)H5HG_MINSIZE; - - if(NULL == (heap->chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, heap->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - if(H5F_block_read(f, H5FD_MEM_GHEAP, next_addr, (heap->size - H5HG_MINSIZE), dxpl_id, heap->chunk + H5HG_MINSIZE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection") - } /* end if */ - - /* Decode each object */ - p = heap->chunk + H5HG_SIZEOF_HDR(f); - nalloc = H5HG_NOBJS(f, heap->size); - - /* Calloc the obj array because the file format spec makes no guarantee - * about the order of the objects, and unused slots must be set to zero. - */ - if(NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - heap->nalloc = nalloc; - while(p < (heap->chunk + heap->size)) { - if((p + H5HG_SIZEOF_OBJHDR(f)) > (heap->chunk + heap->size)) { - /* - * The last bit of space is too tiny for an object header, so we - * assume that it's free space. - */ - HDassert(NULL == heap->obj[0].begin); - heap->obj[0].size = (size_t)(((const uint8_t *)heap->chunk + heap->size) - p); - heap->obj[0].begin = p; - p += heap->obj[0].size; - } /* end if */ - else { - unsigned idx; - uint8_t *begin = p; - - UINT16DECODE(p, idx); - - /* Check if we need more room to store heap objects */ - if(idx >= heap->nalloc) { - size_t new_alloc; /* New allocation number */ - H5HG_obj_t *new_obj; /* New array of object descriptions */ - - /* Determine the new number of objects to index */ - new_alloc = MAX(heap->nalloc * 2, (idx + 1)); - HDassert(idx < new_alloc); - - /* Reallocate array of objects */ - if(NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - /* Clear newly allocated space */ - HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0])); - - /* Update heap information */ - heap->nalloc = new_alloc; - heap->obj = new_obj; - HDassert(heap->nalloc > heap->nused); + HDassert((len == H5HG_MINSIZE) /* first try */ || + ((len == heap->size) && (len > H5HG_MINSIZE))); /* second try */ + + if(len == heap->size) { /* proceed with the deserialize */ + size_t max_idx = 0; + size_t nalloc; + + /* Decode each object */ + image = heap->chunk + H5HG_SIZEOF_HDR(f); + nalloc = H5HG_NOBJS(f, heap->size); + + /* Calloc the obj array because the file format spec makes no guarantee + * about the order of the objects, and unused slots must be set to zero. + */ + if(NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + heap->nalloc = nalloc; + + while(image < (heap->chunk + heap->size)) { + if((image + H5HG_SIZEOF_OBJHDR(f)) > (heap->chunk + heap->size)) { + /* + * The last bit of space is too tiny for an object header, so + * we assume that it's free space. + */ + HDassert(NULL == heap->obj[0].begin); + heap->obj[0].size = (size_t)(((const uint8_t *)heap->chunk + heap->size) - image); + heap->obj[0].begin = image; + image += heap->obj[0].size; } /* end if */ - - UINT16DECODE(p, heap->obj[idx].nrefs); - p += 4; /*reserved*/ - H5F_DECODE_LENGTH(f, p, heap->obj[idx].size); - heap->obj[idx].begin = begin; - - /* - * The total storage size includes the size of the object header - * and is zero padded so the next object header is properly - * aligned. The entire obj array was calloc'ed, so no need to zero - * the space here. The last bit of space is the free space object - * whose size is never padded and already includes the object - * header. - */ - if(idx > 0) { - need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(heap->obj[idx].size); - - if(idx > max_idx) - max_idx = idx; - } /* end if */ - else - need = heap->obj[idx].size; - p = begin + need; - } /* end else */ - } /* end while */ - HDassert(p == heap->chunk + heap->size); - HDassert(H5HG_ISALIGNED(heap->obj[0].size)); - - /* Set the next index value to use */ - if(max_idx > 0) - heap->nused = max_idx + 1; + else { + size_t need; + unsigned idx; + uint8_t *begin = image; + + UINT16DECODE(image, idx); + + /* Check if we need more room to store heap objects */ + if(idx >= heap->nalloc) { + size_t new_alloc; /* New allocation number */ + H5HG_obj_t *new_obj; /* New array of object descriptions */ + + /* Determine the new number of objects to index */ + new_alloc = MAX(heap->nalloc * 2, (idx + 1)); + HDassert(idx < new_alloc); + + /* Reallocate array of objects */ + if(NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + + /* Clear newly allocated space */ + HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0])); + + /* Update heap information */ + heap->nalloc = new_alloc; + heap->obj = new_obj; + HDassert(heap->nalloc > heap->nused); + } /* end if */ + + UINT16DECODE(image, heap->obj[idx].nrefs); + image += 4; /*reserved*/ + H5F_DECODE_LENGTH(f, image, heap->obj[idx].size); + heap->obj[idx].begin = begin; + + /* + * The total storage size includes the size of the object + * header and is zero padded so the next object header is + * properly aligned. The entire obj array was calloc'ed, + * so no need to zero the space here. The last bit of space + * is the free space object whose size is never padded and + * already includes the object header. + */ + if(idx > 0) { + need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(heap->obj[idx].size); + if(idx > max_idx) + max_idx = idx; + } /* end if */ + else + need = heap->obj[idx].size; + + image = begin + need; + } /* end else */ + } /* end while */ + + HDassert(image == heap->chunk + heap->size); + HDassert(H5HG_ISALIGNED(heap->obj[0].size)); + + /* Set the next index value to use */ + if(max_idx > 0) + heap->nused = max_idx + 1; + else + heap->nused = 1; + + HDassert(max_idx < heap->nused); + + /* Add the new heap to the CWFS list for the file */ + if(H5F_cwfs_add(f, heap) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS") + } /* end if ( len == heap->size ) */ else - heap->nused = 1; - - HDassert(max_idx < heap->nused); - - /* Add the new heap to the CWFS list for the file */ - if(H5F_cwfs_add(f, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS") + /* if len is less than heap size, then the initial speculative + * read was too small. In this case we return without reporting + * failure. H5C_load_entry() will call H5HG__cache_heap_image_len() + * to get the actual read size, and then repeat the read with the + * correct size, and call this function a second time. + */ + HDassert(len < heap->size); ret_value = heap; @@ -263,154 +313,126 @@ done: HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy global heap collection") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HG_load() */ +} /* end H5HG__cache_heap_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HG_flush + * Function: H5HG__cache_heap_image_len * - * Purpose: Flushes a global heap collection from memory to disk if it's - * dirty. Optionally deletes teh heap from memory. + * Purpose: Return the on disk image size of the global heap to the + * metadata cache via the image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Robb Matzke - * Friday, March 27, 1998 + * Programmer: John Mainzer + * 7/27/14 * *------------------------------------------------------------------------- */ static herr_t -H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap, unsigned H5_ATTR_UNUSED * flags_ptr) +H5HG__cache_heap_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5HG_heap_t *heap = (const H5HG_heap_t *)_thing; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(H5F_addr_eq(addr, heap->addr)); + /* Sanity checks */ HDassert(heap); + HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(heap->cache_info.type == H5AC_GHEAP); + HDassert(heap->size >= H5HG_MINSIZE); + HDassert(image_len); - if(heap->cache_info.is_dirty) { - if(H5F_block_write(f, H5FD_MEM_GHEAP, addr, heap->size, dxpl_id, heap->chunk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write global heap collection to file") - heap->cache_info.is_dirty = FALSE; - } /* end if */ + *image_len = heap->size; - if(destroy) - if(H5HG_dest(f, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HG__cache_heap_image_len() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HG_flush() */ +/**************************************/ +/* no H5HG_cache_heap_pre_serialize() */ +/**************************************/ /*------------------------------------------------------------------------- - * Function: H5HG_dest + * Function: H5HG__cache_heap_serialize + * + * Purpose: Given an appropriately sized buffer and an instance of + * H5HG_heap_t, serialize the global heap for writing to file, + * and copy the serialized verion into the buffer. * - * Purpose: Destroys a global heap collection in memory * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * Wednesday, January 15, 2003 + * Programmer: John Mainzer + * 7/27/14 * *------------------------------------------------------------------------- */ static herr_t -H5HG_dest(H5F_t *f, H5HG_heap_t *heap) +H5HG__cache_heap_serialize(const H5F_t *f, void *image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5HG_heap_t *heap = (H5HG_heap_t *)_thing; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(heap); + HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(heap->cache_info.type == H5AC_GHEAP); + HDassert(heap->size == len); + HDassert(heap->chunk); - /* Verify that node is clean */ - HDassert(heap->cache_info.is_dirty == FALSE); + /* copy the image into the buffer */ + HDmemcpy(image, heap->chunk, len); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!heap->cache_info.free_file_space_on_destroy || H5F_addr_defined(heap->cache_info.addr)); - - /* Check for freeing file space for globalheap */ - if(heap->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_GHEAP, H5AC_dxpl_id, heap->cache_info.addr, (hsize_t)heap->size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free global heap") - } /* end if */ - - /* Destroy global heap collection */ - if(H5HG_free(heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HG__cache_heap_serialize() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5HG_dest() */ +/****************************************/ +/* no H5HG_cache_heap_notify() function */ +/****************************************/ /*------------------------------------------------------------------------- - * Function: H5HG_clear + * Function: H5HG__cache_heap_free_icr * - * Purpose: Mark a global heap in memory as non-dirty. + * Purpose: Free the in memory representation of the supplied global heap. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * Thursday, March 20, 2003 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/27/14 * *------------------------------------------------------------------------- */ static herr_t -H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy) +H5HG__cache_heap_free_icr(void *_thing) { + H5HG_heap_t *heap = (H5HG_heap_t *)_thing; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(heap); + HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(heap->cache_info.type == H5AC_GHEAP); - /* Mark heap as clean */ - heap->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5HG_dest(f, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") + /* Destroy global heap collection */ + if(H5HG_free(heap) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5HG_clear() */ - - -/*------------------------------------------------------------------------- - * Function: H5HG_size - * - * Purpose: Compute the size in bytes of the specified instance of - * H5HG_heap_t on disk, and return it in *len_ptr. On failure, - * the value of *len_ptr is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/13/04 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5HG_size(const H5F_t H5_ATTR_UNUSED *f, const H5HG_heap_t *heap, size_t *size_ptr) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Check arguments */ - HDassert(heap); - HDassert(size_ptr); - - *size_ptr = heap->size; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HG_size() */ +} /* end H5HG__cache_heap_free_icr() */ diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c index 16d8c49..c79aac8 100644 --- a/src/H5HGdbg.c +++ b/src/H5HGdbg.c @@ -103,7 +103,7 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, HDassert(indent >= 0); HDassert(fwidth >= 0); - if(NULL == (h = H5HG_protect(f, dxpl_id, addr, H5AC_READ))) + if(NULL == (h = H5HG_protect(f, dxpl_id, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap collection"); HDfprintf(stream, "%*sGlobal Heap Collection...\n", indent, ""); diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index f3546a2..9137e7b 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -143,7 +143,7 @@ struct H5HG_heap_t { /* Package Private Prototypes */ /******************************/ H5_DLL herr_t H5HG_free(H5HG_heap_t *heap); -H5_DLL H5HG_heap_t *H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw); +H5_DLL H5HG_heap_t *H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags); #endif /* _H5HGpkg_H */ diff --git a/src/H5HL.c b/src/H5HL.c index b1b5b24..eae0482 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -441,7 +441,7 @@ done: *------------------------------------------------------------------------- */ H5HL_t * -H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) +H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags) { H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ H5HL_prfx_t *prfx = NULL; /* Local heap prefix */ @@ -457,14 +457,19 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) HDassert(f); HDassert(H5F_addr_defined(addr)); + /* only the H5AC__READ_ONLY_FLAG may appear in flags */ + HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Construct the user data for protect callback */ + prfx_udata.made_attempt = FALSE; prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f); prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f); prfx_udata.prfx_addr = addr; prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f); + prfx_udata.loaded = FALSE; /* Protect the local heap prefix */ - if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, rw))) + if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to load heap prefix") /* Get the pointer to the heap */ @@ -486,7 +491,7 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) dblk_udata.loaded = FALSE; /* Protect the local heap data block */ - if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, rw))) + if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to load heap data block") /* Pin the prefix, if the data block was loaded from file */ @@ -1071,13 +1076,15 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr) HDassert(H5F_addr_defined(addr)); /* Construct the user data for protect callback */ + prfx_udata.made_attempt = FALSE; prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f); prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f); prfx_udata.prfx_addr = addr; prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f); + prfx_udata.loaded = FALSE; /* Protect the local heap prefix */ - if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_WRITE))) + if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix") /* Get the pointer to the heap */ @@ -1092,7 +1099,7 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr) dblk_udata.loaded = FALSE; /* Protect the local heap data block */ - if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, H5AC_WRITE))) + if(NULL == (dblk = (H5HL_dblk_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, &dblk_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap data block") /* Pin the prefix, if the data block was loaded from file */ @@ -1147,13 +1154,15 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size) HDassert(size); /* Construct the user data for protect callback */ + prfx_udata.made_attempt = FALSE; prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f); prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f); prfx_udata.prfx_addr = addr; prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f); + prfx_udata.loaded = FALSE; /* Protect the local heap prefix */ - if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ))) + if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix") /* Get the pointer to the heap */ @@ -1199,13 +1208,15 @@ H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size) HDassert(heap_size); /* Construct the user data for protect callback */ + prfx_udata.made_attempt = FALSE; prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f); prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f); prfx_udata.prfx_addr = addr; prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f); + prfx_udata.loaded = FALSE; /* Protect the local heap prefix */ - if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ))) + if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load heap prefix") /* Get the pointer to the heap */ diff --git a/src/H5HLcache.c b/src/H5HLcache.c index b2c764d..17ded00 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -69,18 +69,26 @@ /********************/ /* Metadata cache callbacks */ -static void *H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned *flags_ptr); -static herr_t H5HL_prefix_dest(H5F_t *f, void *thing); -static herr_t H5HL_prefix_clear(H5F_t *f, void *thing, hbool_t destroy); -static herr_t H5HL_prefix_size(const H5F_t *f, const void *thing, size_t *size_ptr); -static void *H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned *flags_ptr); -static herr_t H5HL_datablock_dest(H5F_t *f, void *thing); -static herr_t H5HL_datablock_clear(H5F_t *f, void *thing, hbool_t destroy); -static herr_t H5HL_datablock_size(const H5F_t *f, const void *thing, size_t *size_ptr); +static herr_t H5HL__cache_prefix_get_load_size(const void *udata, size_t *image_len); +static void *H5HL__cache_prefix_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HL__cache_prefix_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5HL__cache_prefix_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HL__cache_prefix_free_icr(void *thing); + +static herr_t H5HL__cache_datablock_get_load_size(const void *udata, + size_t *image_len); +static void *H5HL__cache_datablock_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5HL__cache_datablock_image_len(const void *thing, + size_t *image_len, hbool_t *compressed_ptr, + size_t *compressed_image_len_ptr); +static herr_t H5HL__cache_datablock_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5HL__cache_datablock_free_icr(void *thing); /*********************/ @@ -89,23 +97,35 @@ static herr_t H5HL_datablock_size(const H5F_t *f, const void *thing, size_t *siz /* H5HL inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_LHEAP_PRFX[1] = {{ - H5AC_LHEAP_PRFX_ID, - H5HL_prefix_load, - H5HL_prefix_flush, - H5HL_prefix_dest, - H5HL_prefix_clear, - NULL, - H5HL_prefix_size, + H5AC_LHEAP_PRFX_ID, /* Metadata client ID */ + "local heap prefix", /* Metadata client name (for debugging) */ + H5FD_MEM_LHEAP, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5HL__cache_prefix_get_load_size, /* 'get_load_size' callback */ + H5HL__cache_prefix_deserialize, /* 'deserialize' callback */ + H5HL__cache_prefix_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5HL__cache_prefix_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5HL__cache_prefix_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{ - H5AC_LHEAP_DBLK_ID, - H5HL_datablock_load, - H5HL_datablock_flush, - H5HL_datablock_dest, - H5HL_datablock_clear, - NULL, - H5HL_datablock_size, + H5AC_LHEAP_DBLK_ID, /* Metadata client ID */ + "local heap datablock", /* Metadata client name (for debugging) */ + H5FD_MEM_LHEAP, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5HL__cache_datablock_get_load_size,/* 'get_load_size' callback */ + H5HL__cache_datablock_deserialize, /* 'deserialize' callback */ + H5HL__cache_datablock_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5HL__cache_datablock_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5HL__cache_datablock_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -149,7 +169,7 @@ H5HL__fl_deserialize(H5HL_t *heap) /* Build free list */ free_block = heap->free_block; while(H5HL_FREE_NULL != free_block) { - const uint8_t *p; /* Pointer into image buffer */ + const uint8_t *image; /* Pointer into image buffer */ /* Sanity check */ if(free_block >= heap->dblk_size) @@ -163,13 +183,13 @@ H5HL__fl_deserialize(H5HL_t *heap) fl->next = NULL; /* Decode offset of next free block */ - p = heap->dblk_image + free_block; - H5F_DECODE_LENGTH_LEN(p, free_block, heap->sizeof_size); + image = heap->dblk_image + free_block; + H5F_DECODE_LENGTH_LEN(image, free_block, heap->sizeof_size); if(free_block == 0) HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "free block size is zero?") /* Decode length of this free block */ - H5F_DECODE_LENGTH_LEN(p, fl->size, heap->sizeof_size); + H5F_DECODE_LENGTH_LEN(image, fl->size, heap->sizeof_size); if((fl->offset + fl->size) > heap->dblk_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list") @@ -217,17 +237,17 @@ H5HL__fl_serialize(const H5HL_t *heap) /* Serialize the free list into the heap data's image */ for(fl = heap->freelist; fl; fl = fl->next) { - uint8_t *p; /* Pointer into raw data buffer */ + uint8_t *image; /* Pointer into raw data buffer */ HDassert(fl->offset == H5HL_ALIGN(fl->offset)); - p = heap->dblk_image + fl->offset; + image = heap->dblk_image + fl->offset; if(fl->next) - H5F_ENCODE_LENGTH_LEN(p, fl->next->offset, heap->sizeof_size) + H5F_ENCODE_LENGTH_LEN(image, fl->next->offset, heap->sizeof_size) else - H5F_ENCODE_LENGTH_LEN(p, H5HL_FREE_NULL, heap->sizeof_size) + H5F_ENCODE_LENGTH_LEN(image, H5HL_FREE_NULL, heap->sizeof_size) - H5F_ENCODE_LENGTH_LEN(p, fl->size, heap->sizeof_size) + H5F_ENCODE_LENGTH_LEN(image, fl->size, heap->sizeof_size) } /* end for */ FUNC_LEAVE_NOAPI_VOID @@ -235,69 +255,88 @@ H5HL__fl_serialize(const H5HL_t *heap) /*------------------------------------------------------------------------- - * Function: H5HL_prefix_load + * Function: H5HL__cache_prefix_get_load_size() * - * Purpose: Loads a local heap prefix from disk. + * Purpose: Return the size of the buffer the metadata cache should + * load from file and pass to the deserialize routine. * - * Return: Success: Ptr to a local heap memory data structure. - * Failure: NULL + * The version 2 metadata cache callbacks included a test to + * ensure that the read did not pass the end of file, but this + * functionality has been moved to H5C_load_entry(). Thus + * all this function does is set *image_len equal to + * H5HL_SPEC_READ_SIZE, leaving it to the metadata cache to + * reduce the size of the read if appropriate. * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 17 1997 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5HL__cache_prefix_get_load_size(const void H5_ATTR_UNUSED *_udata, size_t *image_len) +{ + FUNC_ENTER_STATIC_NOERR + + HDassert(image_len); + + *image_len = H5HL_SPEC_READ_SIZE; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HL__cache_prefix_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5HL__cache_prefix_deserialize + * + * Purpose: Given a buffer containing the on disk image of the local + * heap prefix, deserialize it, load its contents into a newly allocated + * instance of H5HL_prfx_t, and return a pointer to the new instance. + * + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static void * -H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5HL_t *heap = NULL; /* Local heap */ - H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */ + H5HL_t *heap = NULL; /* Local heap */ + H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into decoding buffer */ H5HL_cache_prfx_ud_t *udata = (H5HL_cache_prfx_ud_t *)_udata; /* User data for callback */ - uint8_t buf[H5HL_SPEC_READ_SIZE]; /* Buffer for decoding */ - size_t spec_read_size; /* Size of buffer to speculatively read in */ - const uint8_t *p; /* Pointer into decoding buffer */ - haddr_t eoa; /* Relative end of file address */ - hsize_t min; /* temp min value to avoid macro nesting */ - H5HL_prfx_t *ret_value; /* Return value */ + void *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ + HDassert(image); + HDassert(len > 0); HDassert(udata); HDassert(udata->sizeof_size > 0); HDassert(udata->sizeof_addr > 0); HDassert(udata->sizeof_prfx > 0); - HDassert(udata->sizeof_prfx <= sizeof(buf)); - - /* Make certain we don't speculatively read off the end of the file */ - if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_LHEAP))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to determine file size") - - /* Compute the size of the speculative local heap prefix buffer */ - min = MIN(eoa - addr, H5HL_SPEC_READ_SIZE); - H5_CHECKED_ASSIGN(spec_read_size, size_t, min, hsize_t); - HDassert(spec_read_size >= udata->sizeof_prfx); - - /* Attempt to speculatively read both local heap prefix and heap data */ - if(H5F_block_read(f, H5FD_MEM_LHEAP, addr, spec_read_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap prefix") - p = buf; + HDassert(H5F_addr_defined(udata->prfx_addr)); + HDassert(dirty); /* Check magic number */ - if(HDmemcmp(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad local heap signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad local heap signature") + image += H5_SIZEOF_MAGIC; /* Version */ - if(H5HL_VERSION != *p++) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong version number in local heap") + if(H5HL_VERSION != *image++) + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong version number in local heap") /* Reserved */ - p += 3; - + image += 3; + /* Allocate space in memory for the heap */ if(NULL == (heap = H5HL_new(udata->sizeof_size, udata->sizeof_addr, udata->sizeof_prfx))) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate local heap structure") @@ -311,16 +350,16 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) heap->prfx_size = udata->sizeof_prfx; /* Heap data size */ - H5F_DECODE_LENGTH_LEN(p, heap->dblk_size, udata->sizeof_size); + H5F_DECODE_LENGTH_LEN(image, heap->dblk_size, udata->sizeof_size); /* Free list head */ - H5F_DECODE_LENGTH_LEN(p, heap->free_block, udata->sizeof_size); + H5F_DECODE_LENGTH_LEN(image, heap->free_block, udata->sizeof_size); if((heap->free_block != H5HL_FREE_NULL) && (heap->free_block >= heap->dblk_size)) HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap free list") /* Heap data address */ - H5F_addr_decode_len(udata->sizeof_addr, &p, &(heap->dblk_addr)); + H5F_addr_decode_len(udata->sizeof_addr, &image, &(heap->dblk_addr)); /* Check if heap block exists */ if(heap->dblk_size) { @@ -329,35 +368,53 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Note that the heap should be a single object in the cache */ heap->single_cache_obj = TRUE; - /* Allocate space for the heap data image */ - if(NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed") + /* Check if the current buffer from the speculative read + * already has the heap data + */ + if(len >= (heap->prfx_size + heap->dblk_size)) { + /* Allocate space for the heap data image */ + if(NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size))) + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed") - /* Check if the current buffer from the speculative read already has the heap data */ - if(spec_read_size >= (heap->prfx_size + heap->dblk_size)) { - /* Set p to the start of the data block. This is necessary + /* Set image to the start of the data block. This is necessary * because there may be a gap between the used portion of the * prefix and the data block due to alignment constraints. */ - p = buf + heap->prfx_size; + image = ((const uint8_t *)_image) + heap->prfx_size; /* Copy the heap data from the speculative read buffer */ - HDmemcpy(heap->dblk_image, p, heap->dblk_size); + HDmemcpy(heap->dblk_image, image, heap->dblk_size); + + /* Build free list */ + if(H5HL__fl_deserialize(heap) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list") } /* end if */ else { - /* Read the local heap data block directly into buffer */ - if(H5F_block_read(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id, heap->dblk_image) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read heap data") - } /* end else */ - - /* Build free list */ - if(H5HL__fl_deserialize(heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list") + /* the supplied buffer is too small -- We have already made note + * of the correct size, so simply return success. H5C_load_entry() + * will notice the size discrepency, and re-try the load. + */ + + /* Make certain that this is the first try ... */ + HDassert(!udata->made_attempt); + + /* ... and mark the udata so that we know that we have used up + * our first try. + */ + udata->made_attempt = TRUE; + } /* end else */ } /* end if */ - else - /* Note that the heap should _NOT_ be a single object in the cache */ + else { + /* Note that the heap should _NOT_ be a single + * object in the cache + */ heap->single_cache_obj = FALSE; + + } /* end else */ } /* end if */ + /* Set flag to indicate prefix from loaded from file */ + udata->loaded = TRUE; + /* Set return value */ ret_value = prfx; @@ -375,273 +432,257 @@ done: } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_prefix_load() */ +} /* end H5HL__cache_prefix_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HL_prefix_flush + * Function: H5HL__cache_prefix_image_len * - * Purpose: Flushes a heap from memory to disk if it's dirty. Optionally - * deletes the heap from memory. + * Purpose: Return the on disk image size of a local heap prefix to the + * metadata cache via the image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 17 1997 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - void *thing, unsigned H5_ATTR_UNUSED *flags_ptr) +H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to flush */ - H5WB_t *wb = NULL; /* Wrapped buffer for heap data */ - uint8_t heap_buf[H5HL_SPEC_READ_SIZE]; /* Buffer for heap */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(prfx); + HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX); + HDassert(image_len); - if(prfx->cache_info.is_dirty) { - H5HL_t *heap = prfx->heap; /* Pointer to the local heap */ - uint8_t *buf; /* Pointer to heap buffer */ - size_t buf_size; /* Size of buffer for encoding & writing heap info */ - uint8_t *p; /* Pointer into raw data buffer */ - - /* Wrap the local buffer for serialized heap info */ - if(NULL == (wb = H5WB_wrap(heap_buf, sizeof(heap_buf)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't wrap buffer") - - /* Compute the size of the buffer to encode & write */ - buf_size = heap->prfx_size; - if(heap->single_cache_obj) - buf_size += heap->dblk_size; - - /* Get a pointer to a buffer that's large enough for serialized heap */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Update the free block value from the free list */ - heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL; - - /* Serialize the heap prefix */ - p = buf; - HDmemcpy(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - *p++ = H5HL_VERSION; - *p++ = 0; /*reserved*/ - *p++ = 0; /*reserved*/ - *p++ = 0; /*reserved*/ - H5F_ENCODE_LENGTH_LEN(p, heap->dblk_size, heap->sizeof_size); - H5F_ENCODE_LENGTH_LEN(p, heap->free_block, heap->sizeof_size); - H5F_addr_encode_len(heap->sizeof_addr, &p, heap->dblk_addr); - - /* Check if the local heap is a single object in cache */ - if(heap->single_cache_obj) { - if((size_t)(p - buf) < heap->prfx_size) { - size_t gap; /* Size of gap between prefix and data block */ - - /* Set p to the start of the data block. This is necessary because - * there may be a gap between the used portion of the prefix and the - * data block due to alignment constraints. */ - gap = heap->prfx_size - (size_t)(p - buf); - HDmemset(p, 0, gap); - p += gap; - } /* end if */ - - /* Serialize the free list into the heap data's image */ - H5HL__fl_serialize(heap); - - /* Copy the heap data block into the cache image */ - HDmemcpy(p, heap->dblk_image, heap->dblk_size); - } /* end if */ - - /* Write the prefix [and possibly the data block] to the file */ - if(H5F_block_write(f, H5FD_MEM_LHEAP, addr, buf_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap header and data to file") + /* Set the prefix's size */ + *image_len = prfx->heap->prfx_size; - prfx->cache_info.is_dirty = FALSE; - } /* end if */ + /* If the heap is stored as a single object, add in the + * data block size also + */ + if(prfx->heap->single_cache_obj) + *image_len += prfx->heap->dblk_size; - /* Should we destroy the memory version? */ - if(destroy) - if(H5HL_prefix_dest(f, prfx) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix") -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HL__cache_prefix_image_len() */ - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_prefix_flush() */ +/****************************************/ +/* no H5HL_cache_prefix_pre_serialize() */ +/****************************************/ /*------------------------------------------------------------------------- - * Function: H5HL_prefix_dest + * Function: H5HL__cache_prefix_serialize * - * Purpose: Destroys a heap prefix in memory. + * Purpose: Given a pointer to an instance of H5HL_prfx_t and an + * appropriately sized buffer, serialize the contents of the + * instance for writing to disk, and copy the serialized data + * into the buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: John Mainzer + * 7/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_prefix_dest(H5F_t *f, void *thing) +H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { - H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to destroy */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */ + H5HL_t *heap; /* Pointer to the local heap */ + uint8_t *image = (uint8_t *)_image; /* Pointer into image buffer */ + size_t buf_size; /* expected size of the image buffer */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ + /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(prfx); - HDassert(prfx->heap); + HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX); HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr)); + HDassert(prfx->heap); - /* Verify that entry is clean */ - HDassert(prfx->cache_info.is_dirty == FALSE); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!prfx->cache_info.free_file_space_on_destroy || H5F_addr_defined(prfx->cache_info.addr)); + /* Get the pointer to the heap */ + heap = prfx->heap; + HDassert(heap); - /* Check for freeing file space for local heap prefix */ - if(prfx->cache_info.free_file_space_on_destroy) { - hsize_t free_size; /* Size of region to free in file */ + /* Compute the buffer size */ + buf_size = heap->prfx_size; + if(heap->single_cache_obj) + buf_size += heap->dblk_size; + HDassert(len == buf_size); + + /* Update the free block value from the free list */ + heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL; + + /* Serialize the heap prefix */ + HDmemcpy(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; + *image++ = H5HL_VERSION; + *image++ = 0; /*reserved*/ + *image++ = 0; /*reserved*/ + *image++ = 0; /*reserved*/ + H5F_ENCODE_LENGTH_LEN(image, heap->dblk_size, heap->sizeof_size); + H5F_ENCODE_LENGTH_LEN(image, heap->free_block, heap->sizeof_size); + H5F_addr_encode_len(heap->sizeof_addr, &image, heap->dblk_addr); + + /* Check if the local heap is a single object in cache */ + if(heap->single_cache_obj) { + if((size_t)(image - (uint8_t *)_image) < heap->prfx_size) { + size_t gap; /* Size of gap between prefix and data block */ + + /* Set image to the start of the data block. This is necessary + * because there may be a gap between the used portion of + * the prefix and the data block due to alignment constraints. + */ + gap = heap->prfx_size - (size_t)(image - (uint8_t *)_image); + HDmemset(image, 0, gap); + image += gap; + } /* end if */ - /* Compute size to free for later */ - free_size = prfx->heap->prfx_size; - if(prfx->heap->single_cache_obj) - free_size += prfx->heap->dblk_size; + /* Serialize the free list into the heap data's image */ + H5HL__fl_serialize(heap); - /* Free the local heap prefix [and possible the data block] on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, prfx->cache_info.addr, free_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap prefix") + /* Copy the heap data block into the cache image */ + HDmemcpy(image, heap->dblk_image, heap->dblk_size); } /* end if */ - /* Destroy local heap prefix */ - if(H5HL_prfx_dest(prfx) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap prefix") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HL__cache_prefix_serialize() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_prefix_dest() */ +/******************************************/ +/* no H5HL_cache_prefix_notify() function */ +/******************************************/ /*------------------------------------------------------------------------- - * Function: H5HL_prefix_clear + * Function: H5HL__cache_prefix_free_icr * - * Purpose: Mark a local heap prefix in memory as non-dirty. + * Purpose: Free the supplied in core representation of a local heap + * prefix. * - * Return: Non-negative on success/Negative on failure + * Note that this function handles the partially initialize prefix + * from a failed speculative load attempt. See comments below for + * details. * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 20 2003 + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_prefix_clear(H5F_t H5_ATTR_UNUSED *f, void *thing, hbool_t destroy) +H5HL__cache_prefix_free_icr(void *_thing) { - H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* The local heap prefix to operate on */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* check arguments */ + /* Check arguments */ HDassert(prfx); + HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX); + HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr)); - /* Mark heap prefix as clean */ - prfx->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5HL_prefix_dest(f, prfx) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap prefix") + /* Destroy local heap prefix */ + if(H5HL_prfx_dest(prfx) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap prefix") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_prefix_clear() */ +} /* end H5HL__cache_prefix_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5HL_prefix_size + * Function: H5HL__cache_datablock_get_load_size() * - * Purpose: Compute the size in bytes of the heap prefix on disk, - * and return it in *len_ptr. On failure, the value of *len_ptr - * is undefined. + * Purpose: Tell the metadata cache how large a buffer to read from + * file when loading a datablock. In this case, we simply lookup + * the correct value in the user data, and return it in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: John Mainzer - * 5/13/04 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_prefix_size(const H5F_t H5_ATTR_UNUSED *f, const void *thing, size_t *size_ptr) +H5HL__cache_datablock_get_load_size(const void *_udata, size_t *image_len) { - const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)thing; /* Pointer to local heap prefix to query */ - - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5HL_cache_dblk_ud_t *udata = (const H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */ - /* check arguments */ - HDassert(prfx); - HDassert(prfx->heap); - HDassert(size_ptr); + FUNC_ENTER_STATIC_NOERR - /* Calculate size of prefix in cache */ - *size_ptr = prfx->heap->prfx_size; + /* Check arguments */ + HDassert(udata); + HDassert(udata->heap); + HDassert(udata->heap->dblk_size > 0); + HDassert(image_len); - /* If the heap is stored as a single object, add in the data block size also */ - if(prfx->heap->single_cache_obj) - *size_ptr += prfx->heap->dblk_size; + *image_len = udata->heap->dblk_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HL_prefix_size() */ +} /* end H5HL__cache_datablock_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5HL_datablock_load + * Function: H5HL__cache_datablock_deserialize * - * Purpose: Loads a local heap data block from disk. + * Purpose: Given a buffer containing the on disk image of a local + * heap data block, deserialize it, load its contents into a newly allocated + * instance of H5HL_dblk_t, and return a pointer to the new instance. * - * Return: Success: Ptr to a local heap data block memory data structure. - * Failure: NULL + * Return: Success: Pointer to in core representation + * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jan 5 2010 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static void * -H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5HL_dblk_t *dblk = NULL; /* Local heap data block deserialized */ - H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */ - H5HL_dblk_t *ret_value; /* Return value */ + H5HL_dblk_t *dblk = NULL; /* Local heap data block deserialized */ + H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); + HDassert(len > 0); HDassert(udata); HDassert(udata->heap); + HDassert(udata->heap->dblk_size == len); HDassert(!udata->heap->single_cache_obj); HDassert(NULL == udata->heap->dblk); + HDassert(dirty); /* Allocate space in memory for the heap data block */ if(NULL == (dblk = H5HL_dblk_new(udata->heap))) @@ -653,9 +694,8 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) if(NULL == (udata->heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, udata->heap->dblk_size))) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate data block image buffer") - /* Read local heap data block */ - if(H5F_block_read(f, H5FD_MEM_LHEAP, udata->heap->dblk_addr, udata->heap->dblk_size, dxpl_id, udata->heap->dblk_image) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap data block") + /* copy the datablock from the read buffer */ + HDmemcpy(udata->heap->dblk_image, image, len); /* Build free list */ if(H5HL__fl_deserialize(udata->heap) < 0) @@ -675,180 +715,134 @@ done: HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_datablock_load() */ +} /* end H5HL__cache_datablock_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5HL_datablock_flush + * Function: H5HL__cache_datablock_image_len * - * Purpose: Flushes a heap's data block from memory to disk if it's dirty. - * Optionally deletes the heap data block from memory. + * Purpose: Return the size of the on disk image of the datablock. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 17 1997 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - void *_thing, unsigned H5_ATTR_UNUSED * flags_ptr) +H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5HL_dblk_t *dblk = (const H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(dblk); + HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK); HDassert(dblk->heap); - HDassert(!dblk->heap->single_cache_obj); - - if(dblk->cache_info.is_dirty) { - H5HL_t *heap = dblk->heap; /* Pointer to the local heap */ - - /* Update the free block value from the free list */ - heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL; + HDassert(dblk->heap->dblk_size > 0); + HDassert(image_len); - /* Serialize the free list into the heap data's image */ - H5HL__fl_serialize(heap); - - /* Write the data block to the file */ - if(H5F_block_write(f, H5FD_MEM_LHEAP, heap->dblk_addr, heap->dblk_size, dxpl_id, heap->dblk_image) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap data block to file") - - dblk->cache_info.is_dirty = FALSE; - } /* end if */ + *image_len = dblk->heap->dblk_size; - /* Should we destroy the memory version? */ - if(destroy) - if(H5HL_datablock_dest(f, dblk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HL__cache_datablock_image_len() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_datablock_flush() */ +/*******************************************/ +/* no H5HL_cache_datablock_pre_serialize() */ +/*******************************************/ /*------------------------------------------------------------------------- - * Function: H5HL_datablock_dest + * Function: H5HL__cache_datablock_serialize * - * Purpose: Destroys a local heap data block in memory. + * Purpose: Serialize the supplied datablock, and copy the serialized + * image into the supplied image buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_datablock_dest(H5F_t *f, void *_thing) +H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len, + void *_thing) { - H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HL_t *heap; /* Pointer to the local heap */ + H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(dblk); + HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK); HDassert(dblk->heap); - HDassert(!dblk->heap->single_cache_obj); - HDassert(H5F_addr_eq(dblk->cache_info.addr, dblk->heap->dblk_addr)); + heap = dblk->heap; + HDassert(heap->dblk_size == len); + HDassert(!heap->single_cache_obj); - /* Verify that entry is clean */ - HDassert(dblk->cache_info.is_dirty == FALSE); + /* Update the free block value from the free list */ + heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL; - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!dblk->cache_info.free_file_space_on_destroy || H5F_addr_defined(dblk->cache_info.addr)); + /* Serialize the free list into the heap data's image */ + H5HL__fl_serialize(heap); - /* Check for freeing file space for local heap data block */ - if(dblk->cache_info.free_file_space_on_destroy) { - /* Free the local heap data block on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_LHEAP, H5AC_dxpl_id, dblk->cache_info.addr, (hsize_t)dblk->heap->dblk_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free local heap data block") - } /* end if */ + /* Copy the heap's data block into the cache's image */ + HDmemcpy(image, heap->dblk_image, heap->dblk_size); - /* Destroy local heap data block */ - if(H5HL_dblk_dest(dblk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap data block") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5HL__cache_datablock_serialize() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_datablock_dest() */ +/*********************************************/ +/* no H5HL_cache_datablock_notify() function */ +/*********************************************/ /*------------------------------------------------------------------------- - * Function: H5HL_datablock_clear + * Function: H5HL__cache_datablock_free_icr * - * Purpose: Mark a local heap data block in memory as non-dirty. + * Purpose: Free the in memory representation of the supplied local heap data block. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 20 2003 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 6/21/14 * *------------------------------------------------------------------------- */ static herr_t -H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy) +H5HL__cache_datablock_free_icr(void *_thing) { H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(dblk); + HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK); - /* Mark local heap data block as clean */ - dblk->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5HL_datablock_dest(f, dblk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block") + /* Destroy the data block */ + if(H5HL_dblk_dest(dblk) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5HL_datablock_clear() */ - - -/*------------------------------------------------------------------------- - * Function: H5HL_datablock_size - * - * Purpose: Compute the size in bytes of the local heap data block on disk, - * and return it in *len_ptr. On failure, the value of *len_ptr - * is undefined. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/13/04 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5HL_datablock_size(const H5F_t H5_ATTR_UNUSED *f, const void *_thing, size_t *size_ptr) -{ - const H5HL_dblk_t *dblk = (const H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* check arguments */ - HDassert(dblk); - HDassert(dblk->heap); - HDassert(size_ptr); - - /* Set size of data block in cache */ - *size_ptr = dblk->heap->dblk_size; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5HL_datablock_size() */ +} /* end H5HL__cache_datablock_free_icr() */ diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index 4ac22b8..edddd65 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -69,7 +69,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int HDassert(indent >= 0); HDassert(fwidth >= 0); - if(NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC_READ))) + if(NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap") HDfprintf(stream, "%*sLocal Heap...\n", indent, ""); diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h index 880cc05..75c9959 100644 --- a/src/H5HLpkg.h +++ b/src/H5HLpkg.h @@ -122,12 +122,16 @@ struct H5HL_prfx_t { /* Callback information for loading local heap prefix from disk */ typedef struct H5HL_cache_prfx_ud_t { /* Downwards */ + hbool_t made_attempt; /* Whether the deserialize routine */ + /* was already attempted */ size_t sizeof_size; /* Size of file sizes */ size_t sizeof_addr; /* Size of file addresses */ haddr_t prfx_addr; /* Address of prefix */ size_t sizeof_prfx; /* Size of heap prefix */ /* Upwards */ + hbool_t loaded; /* Whether prefix was loaded */ + /* from file */ } H5HL_cache_prfx_ud_t; /* Callback information for loading local heap data block from disk */ diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index 0b044b6..3035689 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -61,7 +61,7 @@ typedef struct H5HL_t H5HL_t; * Library prototypes... */ H5_DLL herr_t H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr/*out*/); -H5_DLL H5HL_t *H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw); +H5_DLL H5HL_t *H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags); H5_DLL void *H5HL_offset_into(const H5HL_t *heap, size_t offset); H5_DLL herr_t H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size); diff --git a/src/H5O.c b/src/H5O.c index 22086fa..d0ace29 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -1652,7 +1652,7 @@ done: *------------------------------------------------------------------------- */ H5O_t * -H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) +H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, unsigned prot_flags) { H5O_t *oh = NULL; /* Object header protected */ H5O_cache_ud_t udata; /* User data for protecting object header */ @@ -1666,13 +1666,16 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) HDassert(loc); HDassert(loc->file); + /* prot_flags may only contain the H5AC__READ_ONLY_FLAG */ + HDassert((prot_flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0); + /* Check for valid address */ if(!H5F_addr_defined(loc->addr)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined") /* Check for write access on the file */ file_intent = H5F_INTENT(loc->file); - if((prot == H5AC_WRITE) && (0 == (file_intent & H5F_ACC_RDWR))) + if((0 == (prot_flags & H5AC__READ_ONLY_FLAG)) && (0 == (file_intent & H5F_ACC_RDWR))) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") /* Construct the user data for protect callback */ @@ -1688,7 +1691,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) udata.common.addr = loc->addr; /* Lock the object header into the cache */ - if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, &udata, prot))) + if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, &udata, prot_flags))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Check if there are any continuation messages to process */ @@ -1725,7 +1728,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) /* (which adds to the object header) */ chk_udata.common.addr = cont_msg_info.msgs[curr_msg].addr; chk_udata.size = cont_msg_info.msgs[curr_msg].size; - if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, &chk_udata, prot))) + if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, &chk_udata, prot_flags))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk") /* Sanity check */ @@ -1769,7 +1772,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) /* (object header will have been marked dirty during protect, if we * have write access -QAK) */ - if(prot != H5AC_WRITE) + if((prot_flags & H5AC__READ_ONLY_FLAG) != 0) oh->prefix_modified = TRUE; #ifndef NDEBUG else { @@ -1787,7 +1790,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) } /* end if */ /* Check for any messages that were modified while being read in */ - if(udata.common.mesgs_modified && prot != H5AC_WRITE) + if(udata.common.mesgs_modified && (0 == (prot_flags & H5AC__READ_ONLY_FLAG))) oh->mesgs_modified = TRUE; /* Reset the field that contained chunk 0's size during speculative load */ @@ -1797,7 +1800,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) /* Take care of loose ends for modifications made while bringing in the * object header & chunks. */ - if(prot == H5AC_WRITE) { + if(0 == (prot_flags & H5AC__READ_ONLY_FLAG)) { /* Check for the object header prefix being modified somehow */ /* (usually through updating the # of object header messages) */ if(oh->prefix_modified) { @@ -1883,7 +1886,7 @@ H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id) HDassert(loc); /* Get header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header") /* Increment the reference count on the object header */ @@ -2096,7 +2099,7 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id) HDassert(loc); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Create/Update the modification time message */ @@ -2212,7 +2215,7 @@ H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr) loc.holding_file = FALSE; /* Get the object header information */ - if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_WRITE))) + if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Delete object */ @@ -2296,7 +2299,7 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id) FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, FAIL) /* Load the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Retrieve the type of the object */ @@ -2374,7 +2377,7 @@ H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id) FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, NULL) /* Load the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Test whether entry qualifies as a particular type of object */ @@ -2671,7 +2674,7 @@ H5O_get_hdr_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_hdr_info_t *hdr) HDmemset(hdr, 0, sizeof(*hdr)); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header") /* Get the information for the object header */ @@ -2795,7 +2798,7 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info, HDassert(oinfo); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Reset the object info structure */ @@ -2916,7 +2919,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, H5P_genplist_t *oc_pli HDassert(oc_plist); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Set property values, if they were used for the object */ @@ -2971,7 +2974,7 @@ H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks) HDassert(nlinks); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Retrieve the # of link messages seen when the object header was loaded */ @@ -3088,7 +3091,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc, H5O_type_ HDassert(loc); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Set the object's reference count */ @@ -3461,7 +3464,7 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id) HDassert(loc); /* Get header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Decrement the reference count on the object header */ diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 46e7ce4..52f414b 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -483,7 +483,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) HDassert(name); /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Check for attribute info stored */ @@ -632,7 +632,7 @@ H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, HGOTO_ERROR(H5E_ATTR, H5E_BADITER, NULL, "can't locate attribute") /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Find out whether it has already been opened. If it has, close the object @@ -1283,7 +1283,7 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id, HDassert(attr_op); /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -1846,7 +1846,7 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) HDassert(name); /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -2000,7 +2000,7 @@ H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id) HDassert(loc); /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Retrieve # of attributes on object */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 816e06a..db1bd1f 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -68,17 +68,25 @@ /********************/ /* Metadata cache callbacks */ -static H5O_t *H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_t *oh, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5O_dest(H5F_t *f, H5O_t *oh); -static herr_t H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy); -static herr_t H5O_size(const H5F_t *f, const H5O_t *oh, size_t *size_ptr); - -static H5O_chunk_proxy_t *H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_chunk_proxy_t *chk_proxy, unsigned H5_ATTR_UNUSED * flags_ptr); -static herr_t H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy); -static herr_t H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy); -static herr_t H5O_cache_chk_size(const H5F_t *f, const H5O_chunk_proxy_t *chk_proxy, size_t *size_ptr); +static herr_t H5O__cache_get_load_size(const void *udata, size_t *image_len); +static void *H5O__cache_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5O__cache_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5O__cache_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5O__cache_free_icr(void *thing); +static herr_t H5O__cache_clear(const H5F_t *f, void *thing, hbool_t about_to_destroy); + +static herr_t H5O__cache_chk_get_load_size(const void *udata, size_t *image_len); +static void *H5O__cache_chk_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5O__cache_chk_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, + void *thing); +static herr_t H5O__cache_chk_free_icr(void *thing); +static herr_t H5O__cache_chk_clear(const H5F_t *f, void *thing, hbool_t about_to_destroy); /* Chunk proxy routines */ static herr_t H5O__chunk_proxy_dest(H5O_chunk_proxy_t *chunk_proxy); @@ -99,24 +107,36 @@ static herr_t H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, /* H5O object header prefix inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_OHDR[1] = {{ - H5AC_OHDR_ID, - (H5AC_load_func_t)H5O_load, - (H5AC_flush_func_t)H5O_flush, - (H5AC_dest_func_t)H5O_dest, - (H5AC_clear_func_t)H5O_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5O_size, + H5AC_OHDR_ID, /* Metadata client ID */ + "object header", /* Metadata client name (for debugging) */ + H5FD_MEM_OHDR, /* File space memory type for client */ + H5AC__CLASS_SPECULATIVE_LOAD_FLAG, /* Client class behavior flags */ + H5O__cache_get_load_size, /* 'get_load_size' callback */ + H5O__cache_deserialize, /* 'deserialize' callback */ + H5O__cache_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5O__cache_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5O__cache_free_icr, /* 'free_icr' callback */ + H5O__cache_clear, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* H5O object header chunk inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_OHDR_CHK[1] = {{ - H5AC_OHDR_CHK_ID, - (H5AC_load_func_t)H5O_cache_chk_load, - (H5AC_flush_func_t)H5O_cache_chk_flush, - (H5AC_dest_func_t)H5O_cache_chk_dest, - (H5AC_clear_func_t)H5O_cache_chk_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5O_cache_chk_size, + H5AC_OHDR_CHK_ID, /* Metadata client ID */ + "object header continuation chunk", /* Metadata client name (for debugging) */ + H5FD_MEM_OHDR, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5O__cache_chk_get_load_size, /* 'get_load_size' callback */ + H5O__cache_chk_deserialize, /* 'deserialize' callback */ + H5O__cache_chk_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5O__cache_chk_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5O__cache_chk_free_icr, /* 'free_icr' callback */ + H5O__cache_chk_clear, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; /* Declare external the free list for H5O_unknown_t's */ @@ -141,55 +161,75 @@ H5FL_SEQ_DEFINE(H5O_cont_t); /*------------------------------------------------------------------------- - * Function: H5O_load + * Function: H5O__cache_get_load_size() * - * Purpose: Loads an object header from disk. + * Purpose: Tell the metadata cache how much data to read from file in + * the first speculative read for the object header. Note that we do + * not have to be concerned about reading past the end of file, as the + * cache will clamp the read to avoid this if needed. * - * Return: Success: Pointer to the new object header. + * Return: Success: SUCCEED + * Failure: FAIL * - * Failure: NULL + * Programmer: John Mainzer + * 7/28/14 * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 5 1997 + *------------------------------------------------------------------------- + */ +static herr_t +H5O__cache_get_load_size(const void H5_ATTR_UNUSED *_udata, size_t *image_len) +{ + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(image_len); + + *image_len = H5O_SPEC_READ_SIZE; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5O__cache_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5O__cache_deserialize + * + * Purpose: Attempt to deserialize the object header contained in the + * supplied buffer, load the data into an instance of H5O_t, and + * return a pointer to the new instance. + * + * Note that the object header is read with with a speculative read. + * If the initial read is too small, make note of this fact and return + * without error. H5C_load_entry() will note the size discrepency + * and retry the deserialize operation with the correct size read. + * + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ -static H5O_t * -H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5O__cache_deserialize(const void *_image, size_t len, void *_udata, + hbool_t *dirty) { - H5O_t *oh = NULL; /* Object header read in */ - H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */ - H5WB_t *wb = NULL; /* Wrapped buffer for prefix data */ - uint8_t read_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */ - const uint8_t *p; /* Pointer into buffer to decode */ - uint8_t *buf; /* Buffer to decode */ - size_t spec_read_size; /* Size of buffer to speculatively read in */ - size_t prefix_size; /* Size of object header prefix */ - size_t buf_size; /* Size of prefix+chunk #0 buffer */ - haddr_t eoa; /* Relative end of file address */ - H5O_t *ret_value; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + H5O_t *oh = NULL; /* Object header read in */ + H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into buffer to decode */ + size_t prefix_size; /* Size of object header prefix */ + size_t buf_size; /* Size of prefix+chunk #0 buffer */ + void * ret_value = NULL; /* Return value */ + + FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); + HDassert(len > 0); HDassert(udata); HDassert(udata->common.f); HDassert(udata->common.cont_msg_info); - - /* Make certain we don't speculatively read off the end of the file */ - if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_OHDR))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine file size") - - /* Compute the size of the speculative object header buffer */ - H5_CHECKED_ASSIGN(spec_read_size, size_t, MIN(eoa - addr, H5O_SPEC_READ_SIZE), hsize_t); - - /* Attempt to speculatively read both object header prefix and first chunk */ - if(H5F_block_read(f, H5FD_MEM_OHDR, addr, spec_read_size, dxpl_id, read_buf) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header") - p = read_buf; + HDassert(dirty); /* Allocate space for the object header data structure */ if(NULL == (oh = H5FL_CALLOC(H5O_t))) @@ -201,18 +241,18 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Check for presence of magic number */ /* (indicates version 2 or later) */ - if(!HDmemcmp(p, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + if(!HDmemcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* Magic number */ - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Version */ - oh->version = *p++; - if(H5O_VERSION_2 != oh->version) + oh->version = *image++; + if(H5O_VERSION_2 != oh->version) HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad object header version number") /* Flags */ - oh->flags = *p++; - if(oh->flags & ~H5O_HDR_ALL_FLAGS) + oh->flags = *image++; + if(oh->flags & ~H5O_HDR_ALL_FLAGS) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "unknown object header status flag(s)") /* Number of links to object (unless overridden by refcount message) */ @@ -222,13 +262,13 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) if(oh->flags & H5O_HDR_STORE_TIMES) { uint32_t tmp; /* Temporary value */ - UINT32DECODE(p, tmp); + UINT32DECODE(image, tmp); oh->atime = (time_t)tmp; - UINT32DECODE(p, tmp); + UINT32DECODE(image, tmp); oh->mtime = (time_t)tmp; - UINT32DECODE(p, tmp); + UINT32DECODE(image, tmp); oh->ctime = (time_t)tmp; - UINT32DECODE(p, tmp); + UINT32DECODE(image, tmp); oh->btime = (time_t)tmp; } /* end if */ else @@ -236,8 +276,9 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Attribute fields */ if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) { - UINT16DECODE(p, oh->max_compact); - UINT16DECODE(p, oh->min_dense); + UINT16DECODE(image, oh->max_compact); + UINT16DECODE(image, oh->min_dense); + if(oh->max_compact < oh->min_dense) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad object header attribute phase change values") } /* end if */ @@ -249,19 +290,19 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* First chunk size */ switch(oh->flags & H5O_HDR_CHUNK0_SIZE) { case 0: /* 1 byte size */ - oh->chunk0_size = *p++; + oh->chunk0_size = *image++; break; case 1: /* 2 byte size */ - UINT16DECODE(p, oh->chunk0_size); + UINT16DECODE(image, oh->chunk0_size); break; case 2: /* 4 byte size */ - UINT32DECODE(p, oh->chunk0_size); + UINT32DECODE(image, oh->chunk0_size); break; case 3: /* 8 byte size */ - UINT64DECODE(p, oh->chunk0_size); + UINT64DECODE(image, oh->chunk0_size); break; default: @@ -272,7 +313,7 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) } /* end if */ else { /* Version */ - oh->version = *p++; + oh->version = *image++; if(H5O_VERSION_1 != oh->version) HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad object header version number") @@ -280,13 +321,13 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) oh->flags = H5O_CRT_OHDR_FLAGS_DEF; /* Reserved */ - p++; + image++; /* Number of messages */ - UINT16DECODE(p, udata->v1_pfx_nmesgs); + UINT16DECODE(image, udata->v1_pfx_nmesgs); /* Link count */ - UINT32DECODE(p, oh->nlink); + UINT32DECODE(image, oh->nlink); /* Reset unused time fields */ oh->atime = oh->mtime = oh->ctime = oh->btime = 0; @@ -296,45 +337,36 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) oh->min_dense = 0; /* First chunk size */ - UINT32DECODE(p, oh->chunk0_size); - if((udata->v1_pfx_nmesgs > 0 && oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) || - (udata->v1_pfx_nmesgs == 0 && oh->chunk0_size > 0)) + UINT32DECODE(image, oh->chunk0_size); + + if((udata->v1_pfx_nmesgs > 0 && + oh->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) || + (udata->v1_pfx_nmesgs == 0 && oh->chunk0_size > 0)) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad object header chunk size") /* Reserved, in version 1 (for 8-byte alignment padding) */ - p += 4; + image += 4; } /* end else */ /* Determine object header prefix length */ - prefix_size = (size_t)(p - (const uint8_t *)read_buf); + prefix_size = (size_t)(image - (const uint8_t *)_image); HDassert((size_t)prefix_size == (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh))); /* Compute the size of the buffer used */ buf_size = oh->chunk0_size + (size_t)H5O_SIZEOF_HDR(oh); - /* Check if the speculative read was large enough to parse the first chunk */ - if(spec_read_size < buf_size) { - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(read_buf, sizeof(read_buf)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Copy existing raw data into new buffer */ - HDmemcpy(buf, read_buf, spec_read_size); - - /* Read rest of the raw data */ - if(H5F_block_read(f, H5FD_MEM_OHDR, (addr + spec_read_size), (buf_size - spec_read_size), dxpl_id, (buf + spec_read_size)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header data") + /* Check to see if the buffer provided is large enough to contain both + * the prefix and the first chunk. If it isn't, make note of the desired + * size, but otherwise do nothing. H5C_load_entry() will notice the + * discrepency, load the correct size buffer, and retry the deserialize. + */ + if(len >= buf_size) { + /* Parse the first chunk */ + if(H5O__chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, (const uint8_t *)_image, &(udata->common), dirty) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk") } /* end if */ else - buf = read_buf; - - /* Parse the first chunk */ - if(H5O__chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, buf, &(udata->common), &oh->cache_info.is_dirty) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk") + HDassert(!udata->made_attempt); /* Note that we've loaded the object header from the file */ udata->made_attempt = TRUE; @@ -343,202 +375,234 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) ret_value = oh; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") - /* Release the [possibly partially initialized] object header on errors */ if(!ret_value && oh) if(H5O_free(oh) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_load() */ +} /* end H5O__cache_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5O_flush + * Function: H5O__cache_image_len * - * Purpose: Flushes (and destroys) an object header. + * Purpose: Compute the size in bytes of the specified instance of + * H5O_t on disk, and return it in *image_len. On failure, + * the value of *image_len is undefined. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 5 1997 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, H5O_t *oh, unsigned H5_ATTR_UNUSED * flags_ptr) +H5O__cache_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + const H5O_t *oh = (const H5O_t *)_thing; /* Object header to query */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); HDassert(oh); + HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(oh->cache_info.type == H5AC_OHDR); + HDassert(image_len); + + /* Report the object header's prefix+first chunk length */ + if(oh->chunk0_size) + *image_len = (size_t)H5O_SIZEOF_HDR(oh) + oh->chunk0_size; + else + *image_len = oh->chunk[0].size; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5O__cache_image_len() */ - /* flush */ - if(oh->cache_info.is_dirty) { - uint8_t *p; /* Pointer to object header prefix buffer */ +/********************************/ +/* no H5O_cache_pre_serialize() */ +/********************************/ + +/*------------------------------------------------------------------------- + * Function: H5O__cache_serialize + * + * Purpose: Serialize the contents of the supplied object header, and + * load this data into the supplied buffer. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing) +{ + H5O_t *oh = (H5O_t *)_thing; /* Object header to encode */ + uint8_t *chunk_image; /* Pointer to object header prefix buffer */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Check arguments */ + HDassert(f); + HDassert(image); + HDassert(oh); + HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(oh->cache_info.type == H5AC_OHDR); + HDassert(oh->chunk[0].size == len); #ifdef H5O_DEBUG -H5O_assert(oh); + H5O_assert(oh); #endif /* H5O_DEBUG */ - /* Point to raw data 'image' for first chunk, which has room for the prefix */ - p = oh->chunk[0].image; - - /* Later versions of object header prefix have different format and - * also require that chunk 0 always be updated, since the checksum - * on the entire block of memory needs to be updated if anything is - * modified */ - if(oh->version > H5O_VERSION_1) { - uint64_t chunk0_size; /* Size of chunk 0's data */ + /* Point to raw data 'image' for first chunk, which + * has room for the prefix + */ + chunk_image = oh->chunk[0].image; - HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh)); - chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh); + /* Later versions of object header prefix have different format and + * also require that chunk 0 always be updated, since the checksum + * on the entire block of memory needs to be updated if anything is + * modified + */ + if(oh->version > H5O_VERSION_1) { + uint64_t chunk0_size; /* Size of chunk 0's data */ - /* Verify magic number */ - HDassert(!HDmemcmp(p, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC)); - p += H5_SIZEOF_MAGIC; + HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh)); + chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh); - /* Version */ - *p++ = oh->version; + /* Verify magic number */ + HDassert(!HDmemcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC)); + chunk_image += H5_SIZEOF_MAGIC; - /* Flags */ - *p++ = oh->flags; + /* Version */ + *chunk_image++ = oh->version; - /* Time fields */ - if(oh->flags & H5O_HDR_STORE_TIMES) { - UINT32ENCODE(p, oh->atime); - UINT32ENCODE(p, oh->mtime); - UINT32ENCODE(p, oh->ctime); - UINT32ENCODE(p, oh->btime); - } /* end if */ + /* Flags */ + *chunk_image++ = oh->flags; - /* Attribute fields */ - if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) { - UINT16ENCODE(p, oh->max_compact); - UINT16ENCODE(p, oh->min_dense); - } /* end if */ + /* Time fields */ + if(oh->flags & H5O_HDR_STORE_TIMES) { + UINT32ENCODE(chunk_image, oh->atime); + UINT32ENCODE(chunk_image, oh->mtime); + UINT32ENCODE(chunk_image, oh->ctime); + UINT32ENCODE(chunk_image, oh->btime); + } /* end if */ - /* First chunk size */ - switch(oh->flags & H5O_HDR_CHUNK0_SIZE) { - case 0: /* 1 byte size */ - HDassert(chunk0_size < 256); - *p++ = (uint8_t)chunk0_size; - break; - - case 1: /* 2 byte size */ - HDassert(chunk0_size < 65536); - UINT16ENCODE(p, chunk0_size); - break; - - case 2: /* 4 byte size */ - /* use <= 2**32 -1 to stay within 4 bytes integer range */ - HDassert(chunk0_size <= 4294967295UL); - UINT32ENCODE(p, chunk0_size); - break; - - case 3: /* 8 byte size */ - UINT64ENCODE(p, chunk0_size); - break; - - default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0") - } /* end switch */ + /* Attribute fields */ + if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) { + UINT16ENCODE(chunk_image, oh->max_compact); + UINT16ENCODE(chunk_image, oh->min_dense); } /* end if */ - else { - /* Version */ - *p++ = oh->version; - /* Reserved */ - *p++ = 0; + /* First chunk size */ + switch(oh->flags & H5O_HDR_CHUNK0_SIZE) { + case 0: /* 1 byte size */ + HDassert(chunk0_size < 256); + *chunk_image++ = (uint8_t)chunk0_size; + break; + + case 1: /* 2 byte size */ + HDassert(chunk0_size < 65536); + UINT16ENCODE(chunk_image, chunk0_size); + break; + + case 2: /* 4 byte size */ + /* use <= 2**32 -1 to stay within 4 bytes integer range */ + HDassert(chunk0_size <= 4294967295UL); + UINT32ENCODE(chunk_image, chunk0_size); + break; - /* Number of messages */ + case 3: /* 8 byte size */ + UINT64ENCODE(chunk_image, chunk0_size); + break; + + default: + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0") + } /* end switch */ + } /* end if */ + else { + /* Version */ + *chunk_image++ = oh->version; + + /* Reserved */ + *chunk_image++ = 0; + + /* Number of messages */ #ifdef H5O_ENABLE_BAD_MESG_COUNT - if(oh->store_bad_mesg_count) - UINT16ENCODE(p, (oh->nmesgs - 1)) - else + if(oh->store_bad_mesg_count) + UINT16ENCODE(chunk_image, (oh->nmesgs - 1)) + else #endif /* H5O_ENABLE_BAD_MESG_COUNT */ - UINT16ENCODE(p, oh->nmesgs); - - /* Link count */ - UINT32ENCODE(p, oh->nlink); + UINT16ENCODE(chunk_image, oh->nmesgs); - /* First chunk size */ - UINT32ENCODE(p, (oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh))); + /* Link count */ + UINT32ENCODE(chunk_image, oh->nlink); - /* Zero to alignment */ - HDmemset(p, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12)); - p += (size_t)(H5O_SIZEOF_HDR(oh) - 12); - } /* end else */ - HDassert((size_t)(p - oh->chunk[0].image) == (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh))); + /* First chunk size */ + UINT32ENCODE(chunk_image, (oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh))); - /* Serialize messages for this chunk */ - if(H5O__chunk_serialize(f, oh, (unsigned)0) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk") + /* Zero to alignment */ + HDmemset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12)); + chunk_image += (size_t)(H5O_SIZEOF_HDR(oh) - 12); + } /* end else */ - /* Write the chunk out */ - HDassert(H5F_addr_defined(oh->chunk[0].addr)); - if(H5F_block_write(f, H5FD_MEM_OHDR, oh->chunk[0].addr, oh->chunk[0].size, dxpl_id, oh->chunk[0].image) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header chunk to disk") + HDassert((size_t)(chunk_image - oh->chunk[0].image) == (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh))); - /* Mark object header as clean now */ - oh->cache_info.is_dirty = FALSE; - } /* end if */ + /* Serialize messages for this chunk */ + if(H5O__chunk_serialize(f, oh, (unsigned)0) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk") - /* Destroy the object header, if requested */ - if(destroy) - if(H5O_dest(f, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") + /* copy the chunk into the image -- this is potentially expensive. + * Can we rework things so that the object header and the cache + * share a buffer? + */ + HDmemcpy(image, oh->chunk[0].image, len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_flush() */ +} /* end H5O__cache_serialize() */ + +/**********************************/ +/* no H5O_cache_notify() function */ +/**********************************/ /*------------------------------------------------------------------------- - * Function: H5O_dest + * Function: H5O__cache_free_icr * - * Purpose: Destroys an object header. + * Purpose: Free the in core representation of the supplied object header. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_dest(H5F_t *f, H5O_t *oh) -{ - herr_t ret_value = SUCCEED; /* Return value */ +H5O__cache_free_icr(void *_thing) +{ + H5O_t *oh = (H5O_t *)_thing; /* Object header to destroy */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(oh); - HDassert(oh->rc == 0); - - /* Verify that node is clean */ - HDassert(!oh->cache_info.is_dirty); - - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!oh->cache_info.free_file_space_on_destroy || H5F_addr_defined(oh->cache_info.addr)); - - /* Check for releasing file space for object header */ - if(oh->chunk && oh->cache_info.free_file_space_on_destroy) { - /* Free main (first) object header "chunk" */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, oh->chunk[0].addr, (hsize_t)oh->chunk[0].size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object header") - } /* end if */ + HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(oh->cache_info.type == H5AC_OHDR); /* Destroy object header */ if(H5O_free(oh) < 0) @@ -546,170 +610,143 @@ H5O_dest(H5F_t *f, H5O_t *oh) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_dest() */ +} /* end H5O__cache_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5O_clear + * Function: H5O__cache_clear * - * Purpose: Mark a object header in memory as non-dirty. + * Purpose: Clear all dirty bits associated with this cache entry. * - * Return: Non-negative on success/Negative on failure + * This is ncessary as the object header cache client maintains + * its own dirty bits on individual messages. These dirty bits + * used to be cleared by the old V2 metadata cache flush callback, + * but now the metadata cache must clear them explicitly, as + * the serialize callback does not imply that the data has been + * written to disk. * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 20 2003 - * - * Changes: In the parallel case, there is the possibility that the - * the object header may be flushed by different processes - * over the life of the computation. Thus we must ensure - * that the chunk images are up to date before we mark the - * messages clean -- as otherwise we may overwrite valid - * data with a blank section of a chunk image. + * This callback is also necessary for the parallel case. * - * To deal with this, I have added code to call - * H5O_chunk_serialize() for all chunks before we - * mark all messages as clean if we are not destroying the - * object. Do this in the parallel case only, as the problem - * can only occur in this context. + * Return: Success: SUCCEED + * Failure: FAIL * - * JRM -- 10/12/10 + * Programmer: John Mainzer + * 9/22/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy) -{ - unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; +H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) +{ + H5O_t *oh = (H5O_t *)_thing; /* Object header to reset */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(oh); + HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(oh->cache_info.type == H5AC_OHDR); #ifdef H5_HAVE_PARALLEL - if ( ( oh->cache_info.is_dirty ) && ( ! destroy ) ) { - - size_t i; - - /* scan through all chunks associated with the object header, - * and cause them to update their images for all entries currently - * marked dirty. Must do this in the parallel case, as it is possible - * that this processor may clear this object header several times - * before flushing it -- thus causing undefined sections of the image - * to be written to disk overwriting valid data. + if((oh->nchunks > 0) && (!about_to_destroy)) { + /* Scan through chunk 0 (the chunk stored contiguously with this + * object header) and cause it to update its image of all entries + * currently marked dirty. Must do this in the parallel case, as + * it is possible that this processor may clear this object header + * several times before flushing it -- thus causing undefined + * sections of the image to be written to disk overwriting valid data. */ - - for ( i = 0; i < oh->nchunks; i++ ) { - - if(H5O__chunk_serialize(f, oh, i) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk") - } - } + if(H5O__chunk_serialize(f, oh, 0) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk") + } /* end if */ #endif /* H5_HAVE_PARALLEL */ /* Mark messages stored with the object header (i.e. messages in chunk 0) as clean */ for(u = 0; u < oh->nmesgs; u++) - oh->mesg[u].dirty = FALSE; + if(oh->mesg[u].chunkno == 0) + oh->mesg[u].dirty = FALSE; #ifndef NDEBUG /* Reset the number of messages dirtied by decoding */ oh->ndecode_dirtied = 0; #endif /* NDEBUG */ - /* Mark whole header as clean */ - oh->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5O_dest(f, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") - done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_clear() */ +} /* end H5O__cache_clear() */ /*------------------------------------------------------------------------- - * Function: H5O_size + * Function: H5O__cache_chk_get_load_size() * - * Purpose: Compute the size in bytes of the specified instance of - * H5O_t on disk, and return it in *len_ptr. On failure, - * the value of *len_ptr is undefined. + * Purpose: Tell the metadata cache how large the on disk image of the + * chunk proxy is, so it can load the image into a buffer for the + * deserialize call. In this case, we simply look up the size in + * the user data, and return it in *image_len, * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: John Mainzer - * 5/13/04 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_t *oh, size_t *size_ptr) +H5O__cache_chk_get_load_size(const void *_udata, size_t *image_len) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5O_chk_cache_ud_t *udata = (const H5O_chk_cache_ud_t *)_udata; /* User data for callback */ - /* check args */ - HDassert(oh); - HDassert(size_ptr); + FUNC_ENTER_STATIC_NOERR - /* Report the object header's prefix+first chunk length */ - if(oh->chunk0_size) - *size_ptr = (size_t)H5O_SIZEOF_HDR(oh) + oh->chunk0_size; - else - *size_ptr = oh->chunk[0].size; + /* Check arguments */ + HDassert(udata); + HDassert(udata->oh); + HDassert(image_len); + + *image_len = udata->size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5O_size() */ +} /* end H5O__cache_chk_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5O_cache_chk_load + * Function: H5O__cache_chk_deserialize * - * Purpose: Loads an object header continuation chunk from disk. + * Purpose: Attempt to deserialize the object header continuation chunk + * contained in the supplied buffer, load the data into an instance + * of H5O_chunk_proxy_t, and return a pointer to the new instance. * - * Return: Success: Pointer to the new object header chunk proxy. - * Failure: NULL + * Return: Success: Pointer to in core representation + * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 12 2008 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ -static H5O_chunk_proxy_t * -H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, + hbool_t *dirty) { - H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */ - H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */ - H5WB_t *wb = NULL; /* Wrapped buffer for prefix data */ - uint8_t chunk_buf[H5O_SPEC_READ_SIZE]; /* Buffer for speculative read */ - uint8_t *buf; /* Buffer to decode */ - H5O_chunk_proxy_t *ret_value; /* Return value */ + H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */ + H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(image); + HDassert(len > 0); HDassert(udata); HDassert(udata->oh); + HDassert(dirty); /* Allocate space for the object header data structure */ - if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed") - - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(chunk_buf, sizeof(chunk_buf)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for serialized header */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, udata->size))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read rest of the raw data */ - if(H5F_block_read(f, H5FD_MEM_OHDR, addr, udata->size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header continuation chunk") + if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed") /* Check if we are still decoding the object header */ /* (as opposed to bringing a piece of it back from the file) */ @@ -719,7 +756,7 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HDassert(udata->common.cont_msg_info); /* Parse the chunk */ - if(H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, buf, &(udata->common), &chk_proxy->cache_info.is_dirty) < 0) + if(H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, (const uint8_t *)image, &(udata->common), dirty) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize object header chunk") /* Set the fields for the chunk proxy */ @@ -737,7 +774,7 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Sanity check that the chunk representation we have in memory is * the same as the one being brought in from disk. */ - HDassert(0 == HDmemcmp(buf, chk_proxy->oh->chunk[chk_proxy->chunkno].image, chk_proxy->oh->chunk[chk_proxy->chunkno].size)); + HDassert(0 == HDmemcmp(image, chk_proxy->oh->chunk[chk_proxy->chunkno].image, chk_proxy->oh->chunk[chk_proxy->chunkno].size)); } /* end else */ /* Increment reference count of object header */ @@ -748,213 +785,195 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) ret_value = chk_proxy; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") - - /* Release the [possibly partially initialized] object header on errors */ - if(!ret_value && chk_proxy) - if(H5O__chunk_proxy_dest(chk_proxy) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header chunk proxy") - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cache_chk_load() */ +} /* end H5O__cache_chk_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5O_cache_chk_flush + * Function: H5O__cache_chk_image_len * - * Purpose: Flushes (and destroys) an object header continuation chunk. + * Purpose: Return the on disk image size of a object header chunk to the + * metadata cache via the image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 12 2008 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, - H5O_chunk_proxy_t *chk_proxy, unsigned H5_ATTR_UNUSED * flags_ptr) +H5O__cache_chk_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT + const H5O_chunk_proxy_t * chk_proxy = (const H5O_chunk_proxy_t *)_thing; /* Chunk proxy to query */ - /* flush */ - if(chk_proxy->cache_info.is_dirty) { - /* Serialize messages for this chunk */ - if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header continuation chunk") + FUNC_ENTER_STATIC_NOERR - /* Write the chunk out */ - HDassert(H5F_addr_defined(chk_proxy->oh->chunk[chk_proxy->chunkno].addr)); - HDassert(H5F_addr_eq(addr, chk_proxy->oh->chunk[chk_proxy->chunkno].addr)); - if(H5F_block_write(f, H5FD_MEM_OHDR, addr, chk_proxy->oh->chunk[chk_proxy->chunkno].size, dxpl_id, chk_proxy->oh->chunk[chk_proxy->chunkno].image) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header continuation chunk to disk") + /* Check arguments */ + HDassert(chk_proxy); + HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK); + HDassert(chk_proxy->oh); + HDassert(image_len); - /* Mark object header as clean now */ - chk_proxy->cache_info.is_dirty = FALSE; - } /* end if */ + *image_len = chk_proxy->oh->chunk[chk_proxy->chunkno].size; - /* Destroy the object header, if requested */ - if(destroy) - if(H5O_cache_chk_dest(f, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header continuation chunk data") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5O__cache_chk_image_len() */ -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cache_chk_flush() */ +/************************************/ +/* no H5O_cache_chk_pre_serialize() */ +/************************************/ /*------------------------------------------------------------------------- - * Function: H5O_cache_chk_dest + * Function: H5O__cache_chk_serialize * - * Purpose: Destroys an object header continuation chunk. + * Purpose: Given a pointer to an instance of an object header chunk and an + * appropriately sized buffer, serialize the contents of the + * instance for writing to disk, and copy the serialized data + * into the buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * July 12, 2008 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy) +H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5O_chunk_proxy_t * chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to serialize */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(chk_proxy); - HDassert(chk_proxy->chunkno > 0); - - /* Verify that node is clean */ - HDassert(chk_proxy->cache_info.is_dirty == FALSE); + HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK); + HDassert(chk_proxy->oh); + HDassert(chk_proxy->oh->chunk[chk_proxy->chunkno].size == len); - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!chk_proxy->cache_info.free_file_space_on_destroy || H5F_addr_defined(chk_proxy->cache_info.addr)); - - /* Check for releasing file space for object header */ - if(chk_proxy->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_dxpl_id, chk_proxy->oh->chunk[chk_proxy->chunkno].addr, (hsize_t)chk_proxy->oh->chunk[chk_proxy->chunkno].size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object header continuation chunk") - } /* end if */ + /* Serialize messages for this chunk */ + if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header continuation chunk") - /* Destroy object header chunk proxy */ - if(H5O__chunk_proxy_dest(chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy") + /* copy the chunk into the image -- this is potentially expensive. + * Can we rework things so that the chunk and the cache share a buffer? + */ + HDmemcpy(image, chk_proxy->oh->chunk[chk_proxy->chunkno].image, len); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cache_chk_dest() */ +} /* end H5O__cache_chk_serialize() */ + +/**************************************/ +/* no H5O_cache_chk_notify() function */ +/**************************************/ /*------------------------------------------------------------------------- - * Function: H5O_cache_chk_clear - * - * Purpose: Mark a object header continuation chunk in memory as non-dirty. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * July 12, 2008 + * Function: H5O__cache_chk_free_icr * - * Changes: In the parallel case, there is the possibility that the - * the object header chunk may be flushed by different - * processes over the life of the computation. Thus we must - * ensure that the chunk image is up to date before we mark its - * messages clean -- as otherwise we may overwrite valid - * data with a blank section of a chunk image. + * Purpose: Free the in core memory associated with the supplied object + * header continuation chunk. * - * To deal with this, I have added code to call - * H5O_chunk_serialize() for this chunk before we - * mark all messages as clean if we are not destroying the - * chunk. + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Do this in the parallel case only, as the problem - * can only occur in this context. + * Return: Success: SUCCEED + * Failure: FAIL * - * Note that at present at least, it seems that this fix - * is not necessary, as we don't seem to be able to - * generate a dirty chunk without creating a dirty object - * header. However, the object header code will be changing - * a lot in the near future, so I'll leave this fix in - * for now, unless Quincey requests otherwise. - * - * JRM -- 10/12/10 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy) +H5O__cache_chk_free_icr(void *_thing) { - unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; + H5O_chunk_proxy_t * chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk proxy to release */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(chk_proxy); + HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK); -#ifdef H5_HAVE_PARALLEL - if((chk_proxy->oh->cache_info.is_dirty) && (!destroy)) - if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk") -#endif /* H5_HAVE_PARALLEL */ - - /* Mark messages in chunk as clean */ - for(u = 0; u < chk_proxy->oh->nmesgs; u++) - if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno) - chk_proxy->oh->mesg[u].dirty = FALSE; - - /* Mark as clean */ - chk_proxy->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5O_cache_chk_dest(f, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header continuation chunk data") + /* Destroy object header chunk proxy */ + if(H5O__chunk_proxy_dest(chk_proxy) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cache_chk_clear() */ +} /* end H5O__cache_chk_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5O_cache_chk_size + * Function: H5O__cache_chk_clear * - * Purpose: Compute the size in bytes of the specified instance of - * an object header continuation chunk on disk, and return it in - * *len_ptr. On failure, the value of *len_ptr is undefined. + * Purpose: Clear all dirty bits associated with this cache entry. * - * Return: Non-negative on success/Negative on failure + * This is ncessary as the object header cache client maintains + * its own dirty bits on individual messages. These dirty bits + * used to be cleared by the old V2 metadata cache flush callback, + * but now the metadata cache must clear them explicitly, as + * the serialize callback does not imply that the data has been + * written to disk. * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * July 12, 2008 + * This callback is also necessary for the parallel case. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 9/22/14 * *------------------------------------------------------------------------- */ static herr_t -H5O_cache_chk_size(const H5F_t H5_ATTR_UNUSED *f, const H5O_chunk_proxy_t *chk_proxy, size_t *size_ptr) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR +H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) +{ + H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to reset */ + H5O_t *oh; /* Object header for chunk */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - /* check args */ + FUNC_ENTER_STATIC + + /* Check arguments */ HDassert(chk_proxy); - HDassert(size_ptr); + HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK); + oh = chk_proxy->oh; + HDassert(oh); + HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(oh->cache_info.type == H5AC_OHDR); - /* Report the object header continuation chunk's length */ - *size_ptr = chk_proxy->oh->chunk[chk_proxy->chunkno].size; +#ifdef H5_HAVE_PARALLEL + if((chk_proxy->oh->cache_info.is_dirty) && (!about_to_destroy)) + if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk") +#endif /* H5_HAVE_PARALLEL */ - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5O_cache_chk_size() */ + /* Mark messages in chunk as clean */ + for(u = 0; u < chk_proxy->oh->nmesgs; u++) + if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno) + chk_proxy->oh->mesg[u].dirty = FALSE; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O__cache_chk_clear() */ /*------------------------------------------------------------------------- @@ -1024,7 +1043,7 @@ static herr_t H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image, H5O_common_cache_ud_t *udata, hbool_t *dirty) { - const uint8_t *p; /* Pointer into buffer to decode */ + const uint8_t *chunk_image; /* Pointer into buffer to decode */ uint8_t *eom_ptr; /* Pointer to end of messages for a chunk */ size_t curmesg; /* Current message being decoded in object header */ unsigned merged_null_msgs = 0; /* Number of null messages merged together */ @@ -1073,18 +1092,18 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image HDmemcpy(oh->chunk[chunkno].image, image, oh->chunk[chunkno].size); /* Point into chunk image to decode */ - p = oh->chunk[chunkno].image; + chunk_image = oh->chunk[chunkno].image; /* Handle chunk 0 as special case */ if(chunkno == 0) /* Skip over [already decoded] prefix */ - p += (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)); + chunk_image += (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)); /* Check for magic # on chunks > 0 in later versions of the format */ else if(chunkno > 0 && oh->version > H5O_VERSION_1) { /* Magic number */ - if(HDmemcmp(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(chunk_image, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature") - p += H5_SIZEOF_MAGIC; + chunk_image += H5_SIZEOF_MAGIC; } /* end if */ /* Save # of messages already inspected */ @@ -1095,7 +1114,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image #ifndef NDEBUG nullcnt = 0; #endif /* NDEBUG */ - while(p < eom_ptr) { + while(chunk_image < eom_ptr) { size_t mesgno; /* Current message to operate on */ size_t mesg_size; /* Size of message read in */ unsigned id; /* ID (type) of current message */ @@ -1106,20 +1125,20 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image /* Version # */ if(oh->version == H5O_VERSION_1) - UINT16DECODE(p, id) + UINT16DECODE(chunk_image, id) else - id = *p++; + id = *chunk_image++; /* Check for unknown message ID getting encoded in file */ if(id == H5O_UNKNOWN_ID) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "'unknown' message ID encoded in file?!?") /* Message size */ - UINT16DECODE(p, mesg_size); + UINT16DECODE(chunk_image, mesg_size); HDassert(mesg_size == H5O_ALIGN_OH(oh, mesg_size)); /* Message flags */ - flags = *p++; + flags = *chunk_image++; if(flags & ~H5O_MSG_FLAG_BITS) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unknown flag for message") if((flags & H5O_MSG_FLAG_SHARED) && (flags & H5O_MSG_FLAG_DONTSHARE)) @@ -1131,17 +1150,17 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image /* Reserved bytes/creation index */ if(oh->version == H5O_VERSION_1) - p += 3; /*reserved*/ + chunk_image += 3; /*reserved*/ else { /* Only decode creation index if they are being tracked */ if(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) - UINT16DECODE(p, crt_idx); + UINT16DECODE(chunk_image, crt_idx); } /* end else */ /* Try to detect invalidly formatted object header message that * extends past end of chunk. */ - if(p + mesg_size > eom_ptr) + if(chunk_image + mesg_size > eom_ptr) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "corrupt object header") #ifndef NDEBUG @@ -1177,7 +1196,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image oh->mesg[mesgno].flags = flags; oh->mesg[mesgno].crt_idx = crt_idx; oh->mesg[mesgno].native = NULL; - oh->mesg[mesgno].raw = (uint8_t *)p; /* Casting away const OK - QAK */ + oh->mesg[mesgno].raw = (uint8_t *)chunk_image; /* Casting away const OK - QAK */ oh->mesg[mesgno].raw_size = mesg_size; oh->mesg[mesgno].chunkno = chunkno; @@ -1233,10 +1252,10 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image } /* end else */ /* Advance decode pointer past message */ - p += mesg_size; + chunk_image += mesg_size; /* Check for 'gap' at end of chunk */ - if((eom_ptr - p) > 0 && (eom_ptr - p) < H5O_SIZEOF_MSGHDR_OH(oh)) { + if((eom_ptr - chunk_image) > 0 && (eom_ptr - chunk_image) < H5O_SIZEOF_MSGHDR_OH(oh)) { /* Gaps can only occur in later versions of the format */ HDassert(oh->version > H5O_VERSION_1); @@ -1244,10 +1263,10 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image HDassert(nullcnt == 0); /* Set gap information for chunk */ - oh->chunk[chunkno].gap = (size_t)(eom_ptr - p); + oh->chunk[chunkno].gap = (size_t)(eom_ptr - chunk_image); /* Increment location in chunk */ - p += oh->chunk[chunkno].gap; + chunk_image += oh->chunk[chunkno].gap; } /* end if */ } /* end while */ @@ -1257,7 +1276,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image uint32_t computed_chksum; /* Checksum computed in memory */ /* Metadata checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(chunk_image, stored_chksum); /* Compute checksum on chunk */ computed_chksum = H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0); @@ -1268,7 +1287,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image } /* end if */ /* Sanity check */ - HDassert(p == oh->chunk[chunkno].image + oh->chunk[chunkno].size); + HDassert(chunk_image == oh->chunk[chunkno].image + oh->chunk[chunkno].size); /* Do some inspection/interpretation of new messages from this chunk */ /* (detect continuation messages, ref. count messages, etc.) */ @@ -1390,7 +1409,7 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno) /* Extra work, for later versions of the format */ if(oh->version > H5O_VERSION_1) { uint32_t metadata_chksum; /* Computed metadata checksum value */ - uint8_t *p; /* Pointer into object header chunk */ + uint8_t *chunk_image; /* Pointer into object header chunk */ /* Check for gap in chunk & zero it out */ if(oh->chunk[chunkno].gap) @@ -1401,8 +1420,8 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno) metadata_chksum = H5_checksum_metadata(oh->chunk[chunkno].image, (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM), 0); /* Metadata checksum */ - p = oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM); - UINT32ENCODE(p, metadata_chksum); + chunk_image = oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM); + UINT32ENCODE(chunk_image, metadata_chksum); } /* end if */ done: @@ -1443,5 +1462,5 @@ H5O__chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy) done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5O_chunk_proxy_dest() */ +} /* H5O__chunk_proxy_dest() */ diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 41d3f66..bb82ad1 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -184,7 +184,7 @@ H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) chk_udata.size = oh->chunk[idx].size; /* Get the chunk proxy */ - if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE))) + if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk") /* Sanity check */ @@ -337,7 +337,7 @@ H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) chk_udata.size = oh->chunk[idx].size; /* Get the chunk proxy */ - if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE))) + if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") /* Update index for chunk proxy in cache */ @@ -389,7 +389,7 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) chk_udata.size = oh->chunk[idx].size; /* Get the chunk proxy */ - if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC_WRITE))) + if(NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") /* Sanity check */ diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index afd8e94..66322da 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -379,7 +379,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, } /* Get source object header */ - if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC_READ))) + if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Retrieve user data for particular type of object to copy */ diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 0531a90..0388cd5 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -566,7 +566,7 @@ H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f loc.addr = addr; loc.holding_file = FALSE; - if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* debug */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index e37e9b7..a7ce31a 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -128,7 +128,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, #ifndef NDEBUG HDassert(H5F_addr_defined(mesg->heap_addr)); - if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read protect link value") s = (const char *)H5HL_offset_into(heap, 0); @@ -145,7 +145,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, if(NULL == mesg->slot) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC_READ))) + if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read protect link value") for(u = 0; u < mesg->nused; u++) { /* Name */ @@ -487,7 +487,7 @@ H5O_efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_ds HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, NULL, "can't create heap") /* Pin the heap down in memory */ - if(NULL == (heap = H5HL_protect(file_dst, dxpl_id, efl_dst->heap_addr, H5AC_WRITE))) + if(NULL == (heap = H5HL_protect(file_dst, dxpl_id, efl_dst->heap_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to protect EFL file name heap") /* Insert "empty" name first */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index d361194..c2756ea 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -476,7 +476,7 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg, HDassert(type_id < NELMTS(H5O_msg_class_g)); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header") /* Call the "real" read routine */ @@ -802,7 +802,7 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id) HDassert(type); /* Load the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Count the messages of the correct type */ @@ -884,7 +884,7 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id) HDassert(type_id < NELMTS(H5O_msg_class_g)); /* Load the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Call the "real" exists routine */ @@ -1224,7 +1224,7 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, HDassert(op); /* Protect the object header to iterate over */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Call the "real" iterate routine */ @@ -2289,7 +2289,7 @@ H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id) HDassert(type); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Locate message of correct type */ @@ -2344,7 +2344,7 @@ H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id) HDassert(type); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Locate message of correct type */ @@ -2402,7 +2402,7 @@ H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id) HDassert(type); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Locate message of correct type */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index cc262a0..92d0107 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -564,6 +564,8 @@ typedef struct H5O_btreek_t { * (Data structure in memory) */ typedef struct H5O_drvinfo_t { +/* Information for H5AC cache functions, _must_ be first field in structure */ + H5AC_info_t cache_info; char name[9]; /* Driver name */ size_t len; /* Length of encoded buffer */ uint8_t *buf; /* Buffer for encoded info */ @@ -659,7 +661,7 @@ H5_DLL herr_t H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, H5_DLL herr_t H5O_open(H5O_loc_t *loc); H5_DLL herr_t H5O_close(H5O_loc_t *loc); H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id); -H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot); +H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, unsigned prot_flags); H5_DLL H5O_t *H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id); H5_DLL herr_t H5O_unpin(H5O_t *oh); H5_DLL herr_t H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id); diff --git a/src/H5Otest.c b/src/H5Otest.c index d1627ef..e7312ee 100644 --- a/src/H5Otest.c +++ b/src/H5Otest.c @@ -108,7 +108,7 @@ H5O_is_attr_dense_test(hid_t oid) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -173,7 +173,7 @@ H5O_is_attr_empty_test(hid_t oid) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -266,7 +266,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -361,7 +361,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count) H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Check for attribute info stored */ @@ -452,7 +452,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") /* Locate "unknown" message */ @@ -511,7 +511,7 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc, hid_t dxpl_id) FUNC_ENTER_NOAPI(FAIL) /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Safety check */ @@ -571,7 +571,7 @@ H5O_get_rc(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc) HDassert(rc); /* Get the object header */ - if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") /* Save the refcount for the object header */ diff --git a/src/H5SM.c b/src/H5SM.c index abdb109..1d391f1 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -358,7 +358,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id, hid_t dxpl_id) /* Set up user data for callback */ cache_udata.f = f; - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") } /* end if */ else @@ -412,7 +412,7 @@ H5SM_get_fheap_addr(H5F_t *f, hid_t dxpl_id, unsigned type_id, haddr_t *fheap_ad cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Look up index for message type */ @@ -831,7 +831,7 @@ H5SM_convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header, hid_t dxpl_i cache_udata.header = header; /* Protect the SOHM list */ - if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC_WRITE))) + if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM list index") /* Delete the B-tree and have messages copy themselves to the @@ -939,7 +939,7 @@ H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table, /* Set up user data for callback */ cache_udata.f = f; - if(NULL == (my_table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (my_table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") } /* end if */ @@ -1071,7 +1071,7 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned defer_flags, cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_WRITE))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* "complex" sharing checks */ @@ -1277,7 +1277,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, cache_udata.header = header; /* The index is a list; get it from the cache */ - if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, defer ? H5AC_READ : H5AC_WRITE))) + if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, defer ? H5AC__READ_ONLY_FLAG : H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* See if the message is already in the index and get its location. @@ -1530,7 +1530,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg) cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_WRITE))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Find the correct index and try to delete from it */ @@ -1799,7 +1799,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, cache_udata.header = header; /* If the index is stored as a list, get it from the cache */ - if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC_WRITE))) + if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* Find the message in the list */ @@ -1970,7 +1970,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id) cache_udata.f = f; /* Read the rest of the SOHM table information from the cache */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Get index conversion limits */ @@ -2133,7 +2133,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id, tbl_cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &tbl_cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &tbl_cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Find the correct index and find the message in it */ @@ -2172,7 +2172,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id, lst_cache_udata.header = header; /* If the index is stored as a list, get it from the cache */ - if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &lst_cache_udata, H5AC_READ))) + if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &lst_cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* Find the message in the list */ @@ -2375,7 +2375,7 @@ H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header") /* Load the object header from the cache */ - if(NULL == (oh = H5O_protect(&oloc, dxpl_id, H5AC_READ))) + if(NULL == (oh = H5O_protect(&oloc, dxpl_id, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header") } /* end if */ else @@ -2530,7 +2530,7 @@ H5SM_table_debug(H5F_t *f, hid_t dxpl_id, haddr_t table_addr, cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") HDfprintf(stream, "%*sShared Message Master Table...\n", indent, ""); @@ -2616,7 +2616,7 @@ H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr, cache_udata.header = &header; /* Get the list from the cache */ - if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, &cache_udata, H5AC_READ))) + if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") HDfprintf(stream, "%*sShared Message List Index...\n", indent, ""); @@ -2693,7 +2693,7 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info) cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Get SOHM header size */ diff --git a/src/H5SMcache.c b/src/H5SMcache.c index eaeb889..d8c0824 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -47,12 +47,6 @@ /* Local Macros */ /****************/ -/* Size of stack buffer for serialized tables */ -#define H5SM_TBL_BUF_SIZE 1024 - -/* Size of stack buffer for serialized list indices */ -#define H5SM_LST_BUF_SIZE 1024 - /******************/ /* Local Typedefs */ @@ -64,16 +58,23 @@ /********************/ /* Metadata cache (H5AC) callbacks */ -static H5SM_master_table_t *H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_master_table_t *table); -static herr_t H5SM_table_dest(H5F_t *f, H5SM_master_table_t* table); -static herr_t H5SM_table_clear(H5F_t *f, H5SM_master_table_t *table, hbool_t destroy); -static herr_t H5SM_table_size(const H5F_t *f, const H5SM_master_table_t *table, size_t *size_ptr); -static H5SM_list_t *H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_list_t *list); -static herr_t H5SM_list_dest(H5F_t *f, H5SM_list_t* list); -static herr_t H5SM_list_clear(H5F_t *f, H5SM_list_t *list, hbool_t destroy); -static herr_t H5SM_list_size(const H5F_t *f, const H5SM_list_t H5_ATTR_UNUSED *list, size_t *size_ptr); +static herr_t H5SM__cache_table_get_load_size(const void *udata, size_t *image_len); +static void *H5SM__cache_table_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5SM__cache_table_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5SM__cache_table_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5SM__cache_table_free_icr(void *thing); + +static herr_t H5SM__cache_list_get_load_size(const void *udata, size_t *image_len); +static void *H5SM__cache_list_deserialize(const void *image, size_t len, + void *udata, hbool_t *dirty); +static herr_t H5SM__cache_list_image_len(const void *thing, size_t *image_len, + hbool_t *compressed_ptr, size_t *compressed_image_len_ptr); +static herr_t H5SM__cache_list_serialize(const H5F_t *f, void *image, + size_t len, void *thing); +static herr_t H5SM__cache_list_free_icr(void *thing); /*********************/ @@ -82,23 +83,35 @@ static herr_t H5SM_list_size(const H5F_t *f, const H5SM_list_t H5_ATTR_UNUSED *l /* H5SM inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_SOHM_TABLE[1] = {{ - H5AC_SOHM_TABLE_ID, - (H5AC_load_func_t)H5SM_table_load, - (H5AC_flush_func_t)H5SM_table_flush, - (H5AC_dest_func_t)H5SM_table_dest, - (H5AC_clear_func_t)H5SM_table_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5SM_table_size, + H5AC_SOHM_TABLE_ID, /* Metadata client ID */ + "shared message table", /* Metadata client name (for debugging) */ + H5FD_MEM_SOHM_TABLE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5SM__cache_table_get_load_size, /* 'get_load_size' callback */ + H5SM__cache_table_deserialize, /* 'deserialize' callback */ + H5SM__cache_table_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5SM__cache_table_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5SM__cache_table_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; const H5AC_class_t H5AC_SOHM_LIST[1] = {{ - H5AC_SOHM_LIST_ID, - (H5AC_load_func_t)H5SM_list_load, - (H5AC_flush_func_t)H5SM_list_flush, - (H5AC_dest_func_t)H5SM_list_dest, - (H5AC_clear_func_t)H5SM_list_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5SM_list_size, + H5AC_SOHM_LIST_ID, /* Metadata client ID */ + "shared message list", /* Metadata client name (for debugging) */ + H5FD_MEM_SOHM_TABLE, /* File space memory type for client */ + H5AC__CLASS_NO_FLAGS_SET, /* Client class behavior flags */ + H5SM__cache_list_get_load_size, /* 'get_load_size' callback */ + H5SM__cache_list_deserialize, /* 'deserialize' callback */ + H5SM__cache_list_image_len, /* 'image_len' callback */ + NULL, /* 'pre_serialize' callback */ + H5SM__cache_list_serialize, /* 'serialize' callback */ + NULL, /* 'notify' callback */ + H5SM__cache_list_free_icr, /* 'free_icr' callback */ + NULL, /* 'clear' callback */ + NULL, /* 'fsf_size' callback */ }}; @@ -114,32 +127,76 @@ const H5AC_class_t H5AC_SOHM_LIST[1] = {{ /*------------------------------------------------------------------------- - * Function: H5SM_table_load + * Function: H5SM__cache_table_get_load_size() + * + * Purpose: Return the size of the master table of Shared Object Header + * Message indexes on disk. As this cache client doesn't use + * speculative reads, this value should be accurate. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5SM__cache_table_get_load_size(const void *_udata, size_t *image_len) +{ + const H5SM_table_cache_ud_t *udata = (const H5SM_table_cache_ud_t *)_udata; /* User data for callback */ + + FUNC_ENTER_STATIC_NOERR + + /* Check arguments */ + HDassert(udata); + HDassert(udata->f); + HDassert(image_len); + + *image_len = H5SM_TABLE_SIZE(udata->f); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5SM__cache_table_get_load_size() */ + + +/*------------------------------------------------------------------------- + * Function: H5SM__cache_table_deserialize * - * Purpose: Loads the master table of Shared Object Header Message - * indexes. + * Purpose: Given a buffer containing the on disk representation of the + * master table of Shared Object Header Message indexes, deserialize + * the table, copy the contents into a newly allocated instance of + * H5SM_master_table_t, and return a pointer to the new instance. * - * Return: Non-negative on success/Negative on failure + * Return: Success: Pointer to in core representation + * Failure: NULL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ -static H5SM_master_table_t * -H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void H5_ATTR_UNUSED *udata) +static void * +H5SM__cache_table_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5SM_master_table_t *table = NULL; - H5WB_t *wb = NULL; /* Wrapped buffer for table data */ - uint8_t tbl_buf[H5SM_TBL_BUF_SIZE]; /* Buffer for table */ - uint8_t *buf; /* Reading buffer */ - const uint8_t *p; /* Pointer into input buffer */ - uint32_t stored_chksum; /* Stored metadata checksum value */ - uint32_t computed_chksum; /* Computed metadata checksum value */ - size_t u; /* Counter variable for index headers */ - H5SM_master_table_t *ret_value; - - FUNC_ENTER_NOAPI_NOINIT + H5F_t *f; /* File pointer -- from user data */ + H5SM_master_table_t *table = NULL; /* Shared message table that we deserializing */ + H5SM_table_cache_ud_t *udata = (H5SM_table_cache_ud_t *)_udata; /* Pointer to user data */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into input buffer */ + uint32_t stored_chksum; /* Stored metadata checksum value */ + uint32_t computed_chksum; /* Computed metadata checksum value */ + size_t u; /* Counter variable for index headers */ + void * ret_value; /* Return value */ + + FUNC_ENTER_STATIC + + /* Check arguments */ + HDassert(image); + HDassert(len > 0); + HDassert(udata); + HDassert(udata->f); + f = udata->f; + HDassert(dirty); /* Verify that we're reading version 0 of the table; this is the only * version defined so far. @@ -152,35 +209,18 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void H5_ATTR_UNUSED *udat /* Read number of indexes and version from file superblock */ table->num_indexes = H5F_SOHM_NINDEXES(f); - - HDassert(addr == H5F_SOHM_ADDR(f)); - HDassert(addr != HADDR_UNDEF); HDassert(table->num_indexes > 0); - /* Wrap the local buffer for serialized table info */ - if(NULL == (wb = H5WB_wrap(tbl_buf, sizeof(tbl_buf)))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, NULL, "can't wrap buffer") - /* Compute the size of the SOHM table header on disk. This is the "table" * itself plus each index within the table */ table->table_size = H5SM_TABLE_SIZE(f); - - /* Get a pointer to a buffer that's large enough for serialized table */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, table->table_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read header from disk */ - if(H5F_block_read(f, H5FD_MEM_SOHM_TABLE, addr, table->table_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_READERROR, NULL, "can't read SOHM table") - - /* Get temporary pointer to serialized table */ - p = buf; + HDassert(table->table_size == len); /* Check magic number */ - if(HDmemcmp(p, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature") - p += H5_SIZEOF_MAGIC; + if(HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature") + image += H5_SIZEOF_MAGIC; /* Allocate space for the index headers in memory*/ if(NULL == (table->indexes = (H5SM_index_header_t *)H5FL_ARR_MALLOC(H5SM_index_header_t, (size_t)table->num_indexes))) @@ -189,45 +229,45 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void H5_ATTR_UNUSED *udat /* Read in the index headers */ for(u = 0; u < table->num_indexes; ++u) { /* Verify correct version of index list */ - if(H5SM_LIST_VERSION != *p++) + if(H5SM_LIST_VERSION != *image++) HGOTO_ERROR(H5E_SOHM, H5E_VERSION, NULL, "bad shared message list version number") /* Type of the index (list or B-tree) */ - table->indexes[u].index_type= (H5SM_index_type_t)*p++; + table->indexes[u].index_type= (H5SM_index_type_t)*image++; /* Type of messages in the index */ - UINT16DECODE(p, table->indexes[u].mesg_types); + UINT16DECODE(image, table->indexes[u].mesg_types); /* Minimum size of message to share */ - UINT32DECODE(p, table->indexes[u].min_mesg_size); + UINT32DECODE(image, table->indexes[u].min_mesg_size); /* List cutoff; fewer than this number and index becomes a list */ - UINT16DECODE(p, table->indexes[u].list_max); + UINT16DECODE(image, table->indexes[u].list_max); /* B-tree cutoff; more than this number and index becomes a B-tree */ - UINT16DECODE(p, table->indexes[u].btree_min); + UINT16DECODE(image, table->indexes[u].btree_min); /* Number of messages shared */ - UINT16DECODE(p, table->indexes[u].num_messages); + UINT16DECODE(image, table->indexes[u].num_messages); /* Address of the actual index */ - H5F_addr_decode(f, &p, &(table->indexes[u].index_addr)); + H5F_addr_decode(f, &image, &(table->indexes[u].index_addr)); /* Address of the index's heap */ - H5F_addr_decode(f, &p, &(table->indexes[u].heap_addr)); + H5F_addr_decode(f, &image, &(table->indexes[u].heap_addr)); /* Compute the size of a list index for this SOHM index */ table->indexes[u].list_size = H5SM_LIST_SIZE(f, table->indexes[u].list_max); } /* end for */ /* Read in checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - (const uint8_t *)buf) == table->table_size); + HDassert((size_t)(image - (const uint8_t *)_image) == table->table_size); /* Compute checksum on entire header */ - computed_chksum = H5_checksum_metadata(buf, (table->table_size - H5SM_SIZEOF_CHECKSUM), 0); + computed_chksum = H5_checksum_metadata(_image, (table->table_size - H5SM_SIZEOF_CHECKSUM), 0); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -237,147 +277,169 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void H5_ATTR_UNUSED *udat ret_value = table; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && table) if(H5SM_table_free(table) < 0) HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_table_load() */ +} /* end H5SM__cache_table_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5SM_table_flush + * Function: H5SM__cache_table_image_len * - * Purpose: Flushes (and destroys) the table of Shared Object Header - * Message indexes. + * Purpose: Compute the size in bytes of the specified instance of + * H5SM_master_table_t on disk, and return it in *image_len. + * On failure, the value of *image_len is undefined. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_master_table_t *table) +H5SM__cache_table_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for table data */ - uint8_t tbl_buf[H5SM_TBL_BUF_SIZE]; /* Buffer for table */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5SM_master_table_t *table = (const H5SM_master_table_t *)_thing; /* Shared message table to query */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(table); + HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(table->cache_info.type == H5AC_SOHM_TABLE); + HDassert(image_len); - if(table->cache_info.is_dirty) { - uint8_t *buf; /* Temporary buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - uint32_t computed_chksum; /* Computed metadata checksum value */ - size_t u; /* Counter variable */ + *image_len = table->table_size; - /* Verify that we're writing version 0 of the table; this is the only - * version defined so far. - */ - HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION); + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5SM__cache_table_image_len() */ - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(tbl_buf, sizeof(tbl_buf)))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "can't wrap buffer") +/***************************************/ +/* no H5SM_cache_table_pre_serialize() */ +/***************************************/ - /* Get a pointer to a buffer that's large enough for serialized table */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, table->table_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't get actual buffer") + +/*------------------------------------------------------------------------- + * Function: H5SM__cache_table_serialize + * + * Purpose: Serialize the contents of the supplied shared message table, and + * load this data into the supplied buffer. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) +{ + H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to encode */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t computed_chksum; /* Computed metadata checksum value */ + size_t u; /* Counter variable */ - /* Get temporary pointer to buffer for serialized table */ - p = buf; + FUNC_ENTER_STATIC_NOERR - /* Encode magic number */ - HDmemcpy(p, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; + /* Check arguments */ + HDassert(f); + HDassert(image); + HDassert(table); + HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(table->cache_info.type == H5AC_SOHM_TABLE); + HDassert(table->table_size == len); - /* Encode each index header */ - for(u = 0; u < table->num_indexes; ++u) { - /* Version for this list */ - *p++ = H5SM_LIST_VERSION; + /* Verify that we're writing version 0 of the table; this is the only + * version defined so far. + */ + HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION); - /* Is message index a list or a B-tree? */ - *p++ = table->indexes[u].index_type; + /* Encode magic number */ + HDmemcpy(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; - /* Type of messages in the index */ - UINT16ENCODE(p, table->indexes[u].mesg_types); + /* Encode each index header */ + for(u = 0; u < table->num_indexes; ++u) { + /* Version for this list */ + *image++ = H5SM_LIST_VERSION; - /* Minimum size of message to share */ - UINT32ENCODE(p, table->indexes[u].min_mesg_size); + /* Is message index a list or a B-tree? */ + *image++ = table->indexes[u].index_type; - /* List cutoff; fewer than this number and index becomes a list */ - UINT16ENCODE(p, table->indexes[u].list_max); + /* Type of messages in the index */ + UINT16ENCODE(image, table->indexes[u].mesg_types); - /* B-tree cutoff; more than this number and index becomes a B-tree */ - UINT16ENCODE(p, table->indexes[u].btree_min); + /* Minimum size of message to share */ + UINT32ENCODE(image, table->indexes[u].min_mesg_size); - /* Number of messages shared */ - UINT16ENCODE(p, table->indexes[u].num_messages); + /* List cutoff; fewer than this number and index becomes a list */ + UINT16ENCODE(image, table->indexes[u].list_max); - /* Address of the actual index */ - H5F_addr_encode(f, &p, table->indexes[u].index_addr); + /* B-tree cutoff; more than this number and index becomes a B-tree */ + UINT16ENCODE(image, table->indexes[u].btree_min); - /* Address of the index's heap */ - H5F_addr_encode(f, &p, table->indexes[u].heap_addr); - } /* end for */ + /* Number of messages shared */ + UINT16ENCODE(image, table->indexes[u].num_messages); - /* Compute checksum on buffer */ - computed_chksum = H5_checksum_metadata(buf, (table->table_size - H5SM_SIZEOF_CHECKSUM), 0); - UINT32ENCODE(p, computed_chksum); + /* Address of the actual index */ + H5F_addr_encode(f, &image, table->indexes[u].index_addr); - /* Write the table to disk */ - HDassert((size_t)(p - buf) == table->table_size); - if(H5F_block_write(f, H5FD_MEM_SOHM_TABLE, addr, table->table_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to save sohm table to disk") + /* Address of the index's heap */ + H5F_addr_encode(f, &image, table->indexes[u].heap_addr); + } /* end for */ - table->cache_info.is_dirty = FALSE; - } /* end if */ + /* Compute checksum on buffer */ + computed_chksum = H5_checksum_metadata(_image, (table->table_size - H5SM_SIZEOF_CHECKSUM), 0); + UINT32ENCODE(image, computed_chksum); - if(destroy) - if(H5SM_table_dest(f, table) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "unable to destroy sohm table") + /* sanity check */ + HDassert((size_t)(image - ((uint8_t *)_image)) == table->table_size); -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5SM__cache_table_serialize() */ - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_table_flush() */ +/*****************************************/ +/* no H5SM_cache_table_notify() function */ +/*****************************************/ /*------------------------------------------------------------------------- - * Function: H5SM_table_dest + * Function: H5SM__cache_table_free_icr * - * Purpose: Frees memory used by the SOHM table. + * Purpose: Free memory used by the SOHM table. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: James Laird - * November 6, 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_table_dest(H5F_t H5_ATTR_UNUSED *f, H5SM_master_table_t* table) +H5SM__cache_table_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to release */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(table); - HDassert(table->indexes); + HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(table->cache_info.type == H5AC_SOHM_TABLE); /* Destroy Shared Object Header Message table */ if(H5SM_table_free(table) < 0) @@ -385,105 +447,80 @@ H5SM_table_dest(H5F_t H5_ATTR_UNUSED *f, H5SM_master_table_t* table) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_table_dest() */ +} /* end H5SM_cache_table_free_icr() */ /*------------------------------------------------------------------------- - * Function: H5SM_table_clear + * Function: H5SM__cache_list_get_load_size() * - * Purpose: Mark this table as no longer being dirty. + * Purpose: Return the on disk size of list of SOHM messages. In this case, + * we simply look up the size in the user data, and return that value + * in *image_len. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_table_clear(H5F_t *f, H5SM_master_table_t *table, hbool_t destroy) +H5SM__cache_list_get_load_size(const void *_udata, size_t *image_len) { - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* - * Check arguments. - */ - HDassert(table); - - /* Reset the dirty flag. */ - table->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5SM_table_dest(f, table) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "unable to delete SOHM master table") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_table_clear() */ + const H5SM_list_cache_ud_t *udata = (const H5SM_list_cache_ud_t *)_udata; /* User data for callback */ - -/*------------------------------------------------------------------------- - * Function: H5SM_table_size - * - * Purpose: Returns the size of the table encoded on disk. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: James Laird - * November 6, 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5SM_table_size(const H5F_t H5_ATTR_UNUSED *f, const H5SM_master_table_t *table, size_t *size_ptr) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Check arguments */ - HDassert(f); - HDassert(table); - HDassert(size_ptr); + HDassert(udata); + HDassert(udata->header); + HDassert(udata->header->list_size > 0); + HDassert(image_len); - /* Set size value */ - *size_ptr = table->table_size; + *image_len = udata->header->list_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5SM_table_size() */ +} /* end H5SM__cache_list_get_load_size() */ /*------------------------------------------------------------------------- - * Function: H5SM_list_load + * Function: H5SM__cache_list_deserialize * - * Purpose: Loads a list of SOHM messages. + * Purpose: Given a buffer containing the on disk image of a list of + * SOHM message, deserialize the list, load it into a newly allocated + * instance of H5SM_list_t, and return a pointer to same. * - * Return: Non-negative on success/Negative on failure + * Return: Success: Pointer to in core representation + * Failure: NULL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ -static H5SM_list_t * -H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +static void * +H5SM__cache_list_deserialize(const void *_image, size_t len, void *_udata, + hbool_t H5_ATTR_UNUSED *dirty) { - H5SM_list_t *list; /* The SOHM list being read in */ - H5SM_list_cache_ud_t *udata = (H5SM_list_cache_ud_t *)_udata; /* User data for callback */ - H5SM_bt2_ctx_t ctx; /* Message encoding context */ - H5WB_t *wb = NULL; /* Wrapped buffer for list index data */ - uint8_t lst_buf[H5SM_LST_BUF_SIZE]; /* Buffer for list index */ - uint8_t *buf; /* Reading buffer */ - uint8_t *p; /* Pointer into input buffer */ - uint32_t stored_chksum; /* Stored metadata checksum value */ - uint32_t computed_chksum; /* Computed metadata checksum value */ - size_t u; /* Counter variable for messages in list */ - H5SM_list_t *ret_value; /* Return value */ + H5SM_list_t *list = NULL; /* The SOHM list being read in */ + H5SM_list_cache_ud_t *udata = (H5SM_list_cache_ud_t *)_udata; /* User data for callback */ + H5SM_bt2_ctx_t ctx; /* Message encoding context */ + const uint8_t *image = (const uint8_t *)_image; /* Pointer into input buffer */ + uint32_t stored_chksum; /* Stored metadata checksum value */ + uint32_t computed_chksum; /* Computed metadata checksum value */ + size_t u; /* Counter variable for messages in list */ + void * ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ + HDassert(image); + HDassert(len > 0); + HDassert(udata); HDassert(udata->header); + HDassert(udata->header->list_size == len); + HDassert(dirty); /* Allocate space for the SOHM list data structure */ if(NULL == (list = H5FL_MALLOC(H5SM_list_t))) @@ -495,42 +532,28 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list") list->header = udata->header; - /* Wrap the local buffer for serialized list index info */ - if(NULL == (wb = H5WB_wrap(lst_buf, sizeof(lst_buf)))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, NULL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for serialized list index */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, udata->header->list_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "can't get actual buffer") - - /* Read list from disk */ - if(H5F_block_read(f, H5FD_MEM_SOHM_INDEX, addr, udata->header->list_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_READERROR, NULL, "can't read SOHM list") - - /* Get temporary pointer to serialized list index */ - p = buf; - /* Check magic number */ - if(HDmemcmp(p, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if(HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature") - p += H5_SIZEOF_MAGIC; + image += H5_SIZEOF_MAGIC; /* Read messages into the list array */ ctx.sizeof_addr = H5F_SIZEOF_ADDR(udata->f); for(u = 0; u < udata->header->num_messages; u++) { - if(H5SM_message_decode(p, &(list->messages[u]), &ctx) < 0) + if(H5SM_message_decode(image, &(list->messages[u]), &ctx) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "can't decode shared message") - p += H5SM_SOHM_ENTRY_SIZE(udata->f); + + image += H5SM_SOHM_ENTRY_SIZE(udata->f); } /* end for */ /* Read in checksum */ - UINT32DECODE(p, stored_chksum); + UINT32DECODE(image, stored_chksum); /* Sanity check */ - HDassert((size_t)(p - buf) <= udata->header->list_size); + HDassert((size_t)(image - (const uint8_t *)_image) <= udata->header->list_size); /* Compute checksum on entire header */ - computed_chksum = H5_checksum_metadata(buf, ((size_t)(p - buf) - H5SM_SIZEOF_CHECKSUM), 0); + computed_chksum = H5_checksum_metadata(_image, ((size_t)(image - (const uint8_t *)_image) - H5SM_SIZEOF_CHECKSUM), 0); /* Verify checksum */ if(stored_chksum != computed_chksum) @@ -544,9 +567,6 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) ret_value = list; done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && list) { if(list->messages) list->messages = H5FL_ARR_FREE(H5SM_sohm_t, list->messages); @@ -554,205 +574,158 @@ done: } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_list_load() */ +} /* end H5SM__cache_list_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5SM_list_flush + * Function: H5SM__cache_list_image_len * - * Purpose: Flush this list index. + * Purpose: Get the size of the shared message list on disk. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_list_t *list) +H5SM__cache_list_image_len(const void *_thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_image_len_ptr) { - H5WB_t *wb = NULL; /* Wrapped buffer for list index data */ - uint8_t lst_buf[H5SM_LST_BUF_SIZE]; /* Buffer for list index */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5SM_list_t *list = (const H5SM_list_t *)_thing; /* Shared message list to query */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + /* Check arguments */ HDassert(list); + HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(list->cache_info.type == H5AC_SOHM_LIST); HDassert(list->header); + HDassert(image_len); - if(list->cache_info.is_dirty) { - H5SM_bt2_ctx_t ctx; /* Message encoding context */ - uint8_t *buf; /* Temporary buffer */ - uint8_t *p; /* Pointer into raw data buffer */ - uint32_t computed_chksum; /* Computed metadata checksum value */ - size_t mesgs_written; /* Number of messages written to list */ - size_t u; /* Local index variable */ - - /* Wrap the local buffer for serialized list index info */ - if(NULL == (wb = H5WB_wrap(lst_buf, sizeof(lst_buf)))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "can't wrap buffer") - - /* Get a pointer to a buffer that's large enough for serialized list index */ - if(NULL == (buf = (uint8_t *)H5WB_actual(wb, list->header->list_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Get temporary pointer to buffer for serialized list index */ - p = buf; - - /* Encode magic number */ - HDmemcpy(p, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC); - p += H5_SIZEOF_MAGIC; - - /* Write messages from the messages array to disk */ - mesgs_written = 0; - ctx.sizeof_addr = H5F_SIZEOF_ADDR(f); - for(u = 0; u < list->header->list_max && mesgs_written < list->header->num_messages; u++) { - if(list->messages[u].location != H5SM_NO_LOC) { - if(H5SM_message_encode(p, &(list->messages[u]), &ctx) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to write shared message to disk") - - p += H5SM_SOHM_ENTRY_SIZE(f); - ++mesgs_written; - } /* end if */ - } /* end for */ - HDassert(mesgs_written == list->header->num_messages); - - /* Compute checksum on buffer */ - computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); - UINT32ENCODE(p, computed_chksum); -#ifdef H5_CLEAR_MEMORY -HDmemset(p, 0, (list->header->list_size - (size_t)(p - buf))); -#endif /* H5_CLEAR_MEMORY */ + *image_len = list->header->list_size; - /* Write the list to disk */ - HDassert((size_t)(p - buf) <= list->header->list_size); - if(H5F_block_write(f, H5FD_MEM_SOHM_INDEX, addr, list->header->list_size, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to save sohm table to disk") - - list->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(H5SM_list_dest(f, list) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "unable to destroy list") - -done: - /* Release resources */ - if(wb && H5WB_unwrap(wb) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5SM__cache_list_image_len() */ - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_list_flush() */ +/**************************************/ +/* no H5SM_cache_list_pre_serialize() */ +/**************************************/ /*------------------------------------------------------------------------- - * Function: H5SM_list_dest + * Function: H5SM__cache_list_serialize * - * Purpose: Frees all memory used by the list. + * Purpose: Serialize the contents of the supplied shared message list, and + * load this data into the supplied buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: James Laird - * November 6, 2006 + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_list_dest(H5F_t *f, H5SM_list_t* list) +H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t len, + void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5SM_list_t *list = (H5SM_list_t *)_thing ; /* Instance being serialized */ + H5SM_bt2_ctx_t ctx; /* Message encoding context */ + uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ + uint32_t computed_chksum; /* Computed metadata checksum value */ + size_t mesgs_serialized; /* Number of messages serialized */ + size_t u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC - /* Sanity check */ + /* Check arguments */ + HDassert(f); + HDassert(image); HDassert(list); + HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(list->cache_info.type == H5AC_SOHM_LIST); HDassert(list->header); - HDassert(list->messages); + HDassert(list->header->list_size == len); + + /* Encode magic number */ + HDmemcpy(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC); + image += H5_SIZEOF_MAGIC; + + /* serialize messages from the messages array */ + mesgs_serialized = 0; + ctx.sizeof_addr = H5F_SIZEOF_ADDR(f); + for(u = 0; ((u < list->header->list_max) && (mesgs_serialized < list->header->num_messages)); u++) { + if(list->messages[u].location != H5SM_NO_LOC) { + if(H5SM_message_encode(image, &(list->messages[u]), &ctx) < 0) + HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to serialize shared message") + + image += H5SM_SOHM_ENTRY_SIZE(f); + ++mesgs_serialized; + } /* end if */ + } /* end for */ - /* If we're going to free the space on disk, the address must be valid */ - HDassert(!list->cache_info.free_file_space_on_destroy || H5F_addr_defined(list->cache_info.addr)); + HDassert(mesgs_serialized == list->header->num_messages); - /* Check for freeing file space for shared message index list */ - if(list->cache_info.free_file_space_on_destroy) { - /* Release the space on disk */ - /* (XXX: Nasty usage of internal DXPL value! -QAK) */ - if(H5MF_xfree(f, H5FD_MEM_SOHM_INDEX, H5AC_dxpl_id, list->cache_info.addr, (hsize_t)list->header->list_size) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "unable to free shared message list") - } /* end if */ + /* Compute checksum on buffer */ + computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); + UINT32ENCODE(image, computed_chksum); - /* Destroy Shared Object Header Message list */ - if(H5SM_list_free(list) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list") +#ifdef H5_CLEAR_MEMORY + HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image))); +#endif /* H5_CLEAR_MEMORY */ + + /* sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5SM_list_dest() */ +} /* end H5SM__cache_list_serialize() */ + +/****************************************/ +/* no H5SM_cache_list_notify() function */ +/****************************************/ /*------------------------------------------------------------------------- - * Function: H5SM_list_clear + * Function: H5SM__cache_list_free_icr * - * Purpose: Marks a list as not dirty. + * Purpose: Free all memory used by the list. * - * Return: Non-negative on success/Negative on failure + * Note: The metadata cache sets the object's cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling a free_icr + * callback (checked in assert). * - * Programmer: James Laird - * November 6, 2006 + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 7/28/14 * *------------------------------------------------------------------------- */ static herr_t -H5SM_list_clear(H5F_t *f, H5SM_list_t *list, hbool_t destroy) +H5SM__cache_list_free_icr(void *_thing) { - herr_t ret_value = SUCCEED; /* Return value */ + H5SM_list_t *list = (H5SM_list_t *)_thing; /* Shared message list to release */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(list); + HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert(list->cache_info.type == H5AC_SOHM_LIST); - /* Reset the dirty flag. */ - list->cache_info.is_dirty = FALSE; - - if(destroy) - if(H5SM_list_dest(f, list) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "unable to destroy SOHM list") + /* Destroy Shared Object Header Message list */ + if(H5SM_list_free(list) < 0) + HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end of H5SM_list_clear() */ - - -/*------------------------------------------------------------------------- - * Function: H5SM_list_size - * - * Purpose: Gets the size of a list on disk. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: James Laird - * November 6, 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5SM_list_size(const H5F_t H5_ATTR_UNUSED *f, const H5SM_list_t *list, size_t *size_ptr) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* check arguments */ - HDassert(f); - HDassert(list); - HDassert(list->header); - HDassert(size_ptr); - - /* Set size value */ - *size_ptr = list->header->list_size; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5SM_list_size() */ +} /* end H5O_cache_list_free_icr() */ diff --git a/src/H5SMtest.c b/src/H5SMtest.c index 12ed766..c4e02bc 100644 --- a/src/H5SMtest.c +++ b/src/H5SMtest.c @@ -98,7 +98,7 @@ H5SM_get_mesg_count_test(H5F_t *f, hid_t dxpl_id, unsigned type_id, cache_udata.f = f; /* Look up the master SOHM table */ - if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ))) + if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Find the correct index for this message type */ diff --git a/test/cache.c b/test/cache.c index 85fbadb..a98a995 100644 --- a/test/cache.c +++ b/test/cache.c @@ -19,7 +19,6 @@ * This file contains tests for the cache implemented in * H5C.c */ -#include "H5private.h" /* Put this first, so H5open() isn't invoked in public macros */ #include "h5test.h" #include "H5Iprivate.h" #include "H5ACprivate.h" @@ -35,9 +34,8 @@ struct flush_cache_test_spec int entry_index; hbool_t insert_flag; unsigned int flags; - hbool_t expected_loaded; - hbool_t expected_cleared; - hbool_t expected_flushed; + hbool_t expected_deserialized; + hbool_t expected_serialized; hbool_t expected_destroyed; }; @@ -51,9 +49,8 @@ struct pe_flush_cache_test_spec int num_pins; int pin_type[MAX_PINS]; int pin_idx[MAX_PINS]; - hbool_t expected_loaded; - hbool_t expected_cleared; - hbool_t expected_flushed; + hbool_t expected_deserialized; + hbool_t expected_serialized; hbool_t expected_destroyed; }; @@ -68,9 +65,8 @@ struct fo_flush_entry_check hbool_t is_dirty; hbool_t is_protected; hbool_t is_pinned; - hbool_t expected_loaded; - hbool_t expected_cleared; - hbool_t expected_flushed; + hbool_t expected_deserialized; + hbool_t expected_serialized; hbool_t expected_destroyed; }; @@ -88,9 +84,8 @@ struct fo_flush_cache_test_spec int pin_idx[MAX_PINS]; int num_flush_ops; struct flush_op flush_ops[MAX_FLUSH_OPS]; - hbool_t expected_loaded; - hbool_t expected_cleared; - hbool_t expected_flushed; + hbool_t expected_deserialized; + hbool_t expected_serialized; hbool_t expected_destroyed; }; @@ -105,17 +100,17 @@ struct move_entry_test_spec /* private function declarations: */ -static unsigned smoke_check_1(void); -static unsigned smoke_check_2(void); -static unsigned smoke_check_3(void); -static unsigned smoke_check_4(void); -static unsigned smoke_check_5(void); -static unsigned smoke_check_6(void); -static unsigned smoke_check_7(void); -static unsigned smoke_check_8(void); -static unsigned smoke_check_9(void); -static unsigned smoke_check_10(void); -static unsigned write_permitted_check(void); +static unsigned smoke_check_1(int express_test); +static unsigned smoke_check_2(int express_test); +static unsigned smoke_check_3(int express_test); +static unsigned smoke_check_4(int express_test); +static unsigned smoke_check_5(int express_test); +static unsigned smoke_check_6(int express_test); +static unsigned smoke_check_7(int express_test); +static unsigned smoke_check_8(int express_test); +static unsigned smoke_check_9(int express_test); +static unsigned smoke_check_10(int express_test); +static unsigned write_permitted_check(int express_test); static unsigned check_insert_entry(void); static unsigned check_flush_cache(void); static void check_flush_cache__empty_cache(H5F_t * file_ptr); @@ -138,22 +133,21 @@ static void check_flush_cache__single_entry_test(H5F_t * file_ptr, hbool_t insert_flag, unsigned int flags, unsigned int flush_flags, - hbool_t expected_loaded, - hbool_t expected_cleared, - hbool_t expected_flushed, + hbool_t expected_deserialized, + hbool_t expected_serialized, hbool_t expected_destroyed); static void check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, int test_num, int entry_type, int entry_idx, + hbool_t unprot_dirty_flag, hbool_t mark_dirty, hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned, hbool_t unprotect_unpin, unsigned int flags, unsigned int flush_flags, - hbool_t expected_cleared, - hbool_t expected_flushed, + hbool_t expected_serialized, hbool_t expected_destroyed); static void check_flush_cache__flush_ops(H5F_t * file_ptr); static void check_flush_cache__flush_op_test(H5F_t * file_ptr, @@ -168,7 +162,6 @@ static void check_flush_cache__flush_op_test(H5F_t * file_ptr, int check_size, struct fo_flush_entry_check check[]); static void check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr); -static unsigned check_flush_protected_err(void); static unsigned check_get_entry_status(void); static unsigned check_expunge_entry(void); static unsigned check_multiple_read_protect(void); @@ -178,6 +171,7 @@ static void check_move_entry__run_test(H5F_t * file_ptr, int test_num, static unsigned check_pin_protected_entry(void); static unsigned check_resize_entry(void); static unsigned check_evictions_enabled(void); +static unsigned check_flush_protected_err(void); static unsigned check_destroy_pinned_err(void); static unsigned check_destroy_protected_err(void); static unsigned check_duplicate_insert_err(void); @@ -203,6 +197,15 @@ static unsigned check_flush_deps(void); static unsigned check_flush_deps_err(void); static unsigned check_flush_deps_order(void); static unsigned check_notify_cb(void); +static unsigned check_entry_deletions_during_scans(void); +static void cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr); +static void cedds__H5C_make_space_in_cache(H5F_t * file_ptr); +static void cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr); +static void cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr); +static unsigned check_stats(void); +#if H5C_COLLECT_CACHE_STATS +static void check_stats__smoke_check_1(H5F_t * file_ptr); +#endif /* H5C_COLLECT_CACHE_STATS */ /**************************************************************************/ @@ -223,32 +226,42 @@ static unsigned check_notify_cb(void); * Programmer: John Mainzer * 6/16/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_1(void) +smoke_check_1(int express_test) { hbool_t show_progress = FALSE; int dirty_unprotects = FALSE; int dirty_destroys = FALSE; hbool_t display_stats = FALSE; int32_t lag = 10; + int32_t max_index = (10 * 1024) - 1; int mile_stone = 1; H5F_t * file_ptr = NULL; TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -271,6 +284,7 @@ smoke_check_1(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -289,6 +303,7 @@ smoke_check_1(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -307,6 +322,7 @@ smoke_check_1(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -336,6 +352,7 @@ smoke_check_1(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -360,6 +377,7 @@ smoke_check_1(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -407,32 +425,42 @@ smoke_check_1(void) * Programmer: John Mainzer * 6/24/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_2(void) +smoke_check_2(int express_test) { hbool_t show_progress = FALSE; int dirty_unprotects = TRUE; int dirty_destroys = TRUE; hbool_t display_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -455,6 +483,7 @@ smoke_check_2(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -473,6 +502,7 @@ smoke_check_2(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -491,6 +521,7 @@ smoke_check_2(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -520,6 +551,7 @@ smoke_check_2(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -544,6 +576,7 @@ smoke_check_2(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -590,32 +623,42 @@ smoke_check_2(void) * Programmer: John Mainzer * 6/16/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_3(void) +smoke_check_3(int express_test) { hbool_t show_progress = FALSE; int dirty_unprotects = FALSE; int dirty_destroys = FALSE; hbool_t display_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -638,6 +681,7 @@ smoke_check_3(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -656,6 +700,7 @@ smoke_check_3(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -674,6 +719,7 @@ smoke_check_3(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -703,6 +749,7 @@ smoke_check_3(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -727,6 +774,7 @@ smoke_check_3(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -774,32 +822,42 @@ smoke_check_3(void) * Programmer: John Mainzer * 6/24/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_4(void) +smoke_check_4(int express_test) { hbool_t show_progress = FALSE; int dirty_unprotects = TRUE; int dirty_destroys = TRUE; hbool_t display_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -822,6 +880,7 @@ smoke_check_4(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -840,6 +899,7 @@ smoke_check_4(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -858,6 +918,7 @@ smoke_check_4(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -887,6 +948,7 @@ smoke_check_4(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -911,6 +973,7 @@ smoke_check_4(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -958,17 +1021,11 @@ smoke_check_4(void) * Programmer: John Mainzer * 10/14/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_5(void) +smoke_check_5(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -1029,18 +1086,25 @@ smoke_check_5(void) TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1"); - if ( skip_long_tests ) { - - SKIPPED(); - - HDfprintf(stdout, " Long tests disabled.\n"); + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; - return 0; /* <========== note return */ - } + case 1: + max_index = (1 * 1024) - 1; + break; - if ( run_full_test ) { + case 2: + max_index = (512) - 1; + break; - max_index = (10 * 1024) - 1; + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -1193,17 +1257,11 @@ smoke_check_5(void) * Programmer: John Mainzer * 10/25/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_6(void) +smoke_check_6(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -1266,15 +1324,25 @@ smoke_check_6(void) pass = TRUE; - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ - } + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; - if ( run_full_test ) { + case 1: + max_index = (1 * 1024) - 1; + break; - max_index = (10 * 1024) - 1; + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } if ( show_progress ) /* 1 */ @@ -1425,17 +1493,11 @@ smoke_check_6(void) * Programmer: John Mainzer * 12/2/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_7(void) +smoke_check_7(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -1497,15 +1559,25 @@ smoke_check_7(void) TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ - } + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; - if ( run_full_test ) { + case 1: + max_index = (1 * 1024) - 1; + break; - max_index = (10 * 1024) - 1; + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -1658,17 +1730,11 @@ smoke_check_7(void) * Programmer: John Mainzer * 10/25/04 * - * Modifications: - * - * JRM -- 1/18/05 - * Added code to skip this test if the skip_long_tests global - * is true. - * *------------------------------------------------------------------------- */ static unsigned -smoke_check_8(void) +smoke_check_8(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -1730,15 +1796,25 @@ smoke_check_8(void) TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ - } + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; - if ( run_full_test ) { + case 1: + max_index = (1 * 1024) - 1; + break; - max_index = (10 * 1024) - 1; + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -1901,7 +1977,7 @@ smoke_check_8(void) */ static unsigned -smoke_check_9(void) +smoke_check_9(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -1909,6 +1985,7 @@ smoke_check_9(void) int dirty_destroys = FALSE; hbool_t display_stats = FALSE; hbool_t display_detailed_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; @@ -1916,10 +1993,25 @@ smoke_check_9(void) TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -1960,6 +2052,7 @@ smoke_check_9(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -1995,6 +2088,7 @@ smoke_check_9(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2028,6 +2122,7 @@ smoke_check_9(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2087,6 +2182,7 @@ smoke_check_9(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2126,6 +2222,7 @@ smoke_check_9(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2200,7 +2297,7 @@ smoke_check_9(void) */ static unsigned -smoke_check_10(void) +smoke_check_10(int express_test) { herr_t result; hbool_t show_progress = FALSE; @@ -2208,6 +2305,7 @@ smoke_check_10(void) int dirty_destroys = TRUE; hbool_t display_stats = FALSE; hbool_t display_detailed_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; @@ -2215,10 +2313,25 @@ smoke_check_10(void) TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked"); - if ( skip_long_tests ) { - SKIPPED(); - HDfprintf(stdout, " Long tests disabled.\n"); - return 0; /* <========== note return */ + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; } pass = TRUE; @@ -2242,6 +2355,7 @@ smoke_check_10(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2275,6 +2389,7 @@ smoke_check_10(void) FUNC, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2308,6 +2423,7 @@ smoke_check_10(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2367,6 +2483,7 @@ smoke_check_10(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2421,6 +2538,7 @@ smoke_check_10(void) FUNC, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2489,13 +2607,18 @@ smoke_check_10(void) *------------------------------------------------------------------------- */ static unsigned -write_permitted_check(void) +write_permitted_check(int +#if !H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS +H5_ATTR_UNUSED +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ +express_test) { #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS hbool_t show_progress = FALSE; hbool_t display_stats = FALSE; + int32_t max_index = (10 * 1024) - 1; int32_t lag = 10; int mile_stone = 1; H5F_t * file_ptr = NULL; @@ -2506,6 +2629,27 @@ write_permitted_check(void) #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + switch ( express_test ) + { + case 0: + max_index = (10 * 1024) - 1; + break; + + case 1: + max_index = (1 * 1024) - 1; + break; + + case 2: + max_index = (512) - 1; + break; + + default: + SKIPPED(); + HDfprintf(stdout, " Long tests disabled.\n"); + return 0; /* <========== note return */ + break; + } + pass = TRUE; if ( show_progress ) /* 1 */ @@ -2526,6 +2670,7 @@ write_permitted_check(void) FUNC, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2546,6 +2691,7 @@ write_permitted_check(void) write_permitted = FALSE; row_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2566,6 +2712,7 @@ write_permitted_check(void) write_permitted = TRUE; row_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2595,6 +2742,7 @@ write_permitted_check(void) FUNC, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -2610,6 +2758,7 @@ write_permitted_check(void) write_permitted = FALSE; col_major_scan_backward(/* file_ptr */ file_ptr, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -3076,8 +3225,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if ( result < 0 ) { @@ -3088,8 +3236,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -3100,8 +3247,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_CLEAR_ONLY_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_CLEAR_ONLY_FLAG); if ( result < 0 ) { @@ -3113,8 +3259,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_MARKED_ENTRIES_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_MARKED_ENTRIES_FLAG); if ( result < 0 ) { @@ -3175,9 +3320,8 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 100, /* insert_flag = */ FALSE, /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -3186,9 +3330,8 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 75, /* insert_flag = */ FALSE, /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -3197,9 +3340,8 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 25, /* insert_flag = */ TRUE, /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -3207,10 +3349,9 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 50, /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -3219,9 +3360,8 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 10, /* insert_flag = */ FALSE, /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -3230,9 +3370,8 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 20, /* insert_flag = */ FALSE, /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -3241,20 +3380,18 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) /* entry_index = */ 30, /* insert_flag = */ TRUE, /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, + /* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -3272,92 +3409,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE } }; @@ -3374,92 +3503,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE } }; @@ -3476,92 +3597,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE } }; @@ -3579,92 +3692,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE - }, - { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE + }, + { + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE } }; @@ -3682,92 +3787,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE } }; @@ -3785,92 +3882,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE } }; @@ -3889,92 +3978,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE } }; @@ -3995,92 +4076,84 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE } }; @@ -4102,144 +4175,136 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct pe_flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 2, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 2, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 3, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 3, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 4, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 4, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 5, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 5, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 6, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 6, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 7, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, 30, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 7, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, 30, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ FALSE } }; @@ -4256,128 +4321,120 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct pe_flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 2, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1}, + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 2, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 3, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 3, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, - -1, -1, -1, -1 -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {10, -1, -1, -1 -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, + -1, -1, -1, -1 -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {10, -1, -1, -1 -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 2, - /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {10, 20, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 2, + /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {10, 20, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 3, - /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, - -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {10, 20, 30, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 3, + /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + MONSTER_ENTRY_TYPE, + -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {10, 20, 30, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE } }; @@ -4394,119 +4451,111 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct pe_flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE } }; @@ -4524,127 +4573,119 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct pe_flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 4, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 4, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 4, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - PICO_ENTRY_TYPE, - -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 4, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + PICO_ENTRY_TYPE, + -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, + /* expected_destroyed = */ TRUE } }; @@ -4663,123 +4704,115 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct pe_flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE - }, - { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 0, + /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, - -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ TRUE, - /* expected_flushed = */ FALSE, - /* expected_destroyed = */ TRUE + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE + }, + { + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* num_pins = */ 1, + /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, + -1, -1, -1, -1, -1, -1, -1}, + /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, + /* expected_destroyed = */ TRUE } }; @@ -4897,7 +4930,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -4915,21 +4948,18 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, base_addr = entries[spec[i].entry_type]; entry_ptr = &(base_addr[spec[i].entry_index]); - if ( ( entry_ptr->loaded != spec[i].expected_loaded ) || - ( entry_ptr->cleared != spec[i].expected_cleared ) || - ( entry_ptr->flushed != spec[i].expected_flushed ) || + if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) || + ( entry_ptr->serialized != spec[i].expected_serialized ) || ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) { #if 0 /* This is useful debugging code. Lets keep it around. */ HDfprintf(stdout, - "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->loaded), - (int)(spec[i].expected_loaded), - (int)(entry_ptr->cleared), - (int)(spec[i].expected_cleared), - (int)(entry_ptr->flushed), - (int)(spec[i].expected_flushed), + "deslzd = %d(%d), slzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)(spec[i].expected_deserialized), + (int)(entry_ptr->serialized), + (int)(spec[i].expected_serialized), (int)(entry_ptr->destroyed), (int)(spec[i].expected_destroyed)); @@ -4974,8 +5004,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, /* clean up the cache to prep for the next test */ if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -5003,10 +5032,9 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, base_addr = entries[spec[i].entry_type]; entry_ptr = &(base_addr[spec[i].entry_index]); - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; i++; } @@ -5133,8 +5161,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -5152,21 +5179,18 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, base_addr = entries[spec[i].entry_type]; entry_ptr = &(base_addr[spec[i].entry_index]); - if ( ( entry_ptr->loaded != spec[i].expected_loaded ) || - ( entry_ptr->cleared != spec[i].expected_cleared ) || - ( entry_ptr->flushed != spec[i].expected_flushed ) || + if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) || + ( entry_ptr->serialized != spec[i].expected_serialized ) || ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) { #if 0 /* This is useful debugging code. Lets keep it around. */ HDfprintf(stdout, - "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->loaded), - (int)(spec[i].expected_loaded), - (int)(entry_ptr->cleared), - (int)(spec[i].expected_cleared), - (int)(entry_ptr->flushed), - (int)(spec[i].expected_flushed), + "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)(spec[i].expected_deserialized), + (int)(entry_ptr->serialized), + (int)(spec[i].expected_serialized), (int)(entry_ptr->destroyed), (int)(spec[i].expected_destroyed)); @@ -5211,8 +5235,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, /* clean up the cache to prep for the next test */ if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -5240,10 +5263,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, base_addr = entries[spec[i].entry_type]; entry_ptr = &(base_addr[spec[i].entry_index]); - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; i++; } @@ -5330,9 +5352,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -5359,9 +5380,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -5378,9 +5398,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5440,9 +5459,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -5469,9 +5487,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -5488,9 +5505,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5528,7 +5544,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, + /* flags = */ H5C__DIRTIED_FLAG, /* resize_flag = */ TRUE, /* new_size = */ VARIABLE_ENTRY_SIZE / 4, /* num_pins = */ 0, @@ -5547,9 +5563,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -5566,9 +5581,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5608,7 +5622,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, + /* flags = */ H5C__DIRTIED_FLAG, /* resize_flag = */ TRUE, /* new_size = */ VARIABLE_ENTRY_SIZE / 4, /* num_pins = */ 0, @@ -5627,9 +5641,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -5646,9 +5659,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5669,11 +5681,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass ) /* test #5 & #6 */ { /* Single entry test verifying that the cache can handle the case in - * which the call back function moves the entry for which it has - * been called. + * which the call back function first resizes and then moves the + * entry for which it has been called. * * Run this entry twice, as the first run moves the entry to its * alternate address, and the second moves it back. + * + * 10/8/07 -- JRM + * Added a resize operation to this test to satisfy the new + * requiremnt that any resize of an entry on flush will always + * be accompanied by a resize. Note that as a result, this + * test becomes redundant with later tests. */ int test_num = 5; /* and 6 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -5681,7 +5699,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) int init_expected_index_len = 1; size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; int expected_index_len = 1; - size_t expected_index_size = VARIABLE_ENTRY_SIZE; + size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; struct fo_flush_cache_test_spec spec[1] = { { @@ -5695,11 +5713,11 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* num_pins = */ 0, /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0}, /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0}, - /* num_flush_ops = */ 1, + /* num_flush_ops = */ 2, /* flush_ops = */ /* op_code: type: idx: flag: size: order_ptr: */ - { { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL }, - { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, + { { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL }, + { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, @@ -5708,9 +5726,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -5727,9 +5744,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5759,7 +5775,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) */ if ( pass ) { - spec[0].flush_ops[0].flag = TRUE; + spec[0].flush_ops[1].flag = TRUE; test_num = 6; check_flush_cache__flush_op_test(file_ptr, @@ -5787,6 +5803,12 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) * * Run this entry twice, as the first run moves the entry to its * alternate address, and the second moves it back. + * + * 10/8/07 -- JRM + * Added a resize operation to this test to satisfy the new + * requiremnt that any resize of an entry on flush will always + * be accompanied by a resize. Note that as a result, this + * test becomes redundant with later tests. */ int test_num = 7; /* and 8 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -5794,7 +5816,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) int init_expected_index_len = 1; size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; int expected_index_len = 1; - size_t expected_index_size = VARIABLE_ENTRY_SIZE; + size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; struct fo_flush_cache_test_spec spec[1] = { { @@ -5808,11 +5830,11 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* num_pins = */ 0, /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0}, /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0}, - /* num_flush_ops = */ 1, + /* num_flush_ops = */ 2, /* flush_ops = */ /* op_code: type: idx: flag: size: order_ptr: */ - { { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL }, - { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, + { { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL }, + { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, @@ -5821,9 +5843,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -5840,9 +5861,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -5877,7 +5897,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) flush_flags = H5C__FLUSH_INVALIDATE_FLAG; expected_index_len = 0; expected_index_size = 0; - spec[0].flush_ops[0].flag = TRUE; + spec[0].flush_ops[1].flag = TRUE; spec[0].expected_destroyed = TRUE; check_flush_cache__flush_op_test(file_ptr, @@ -5917,7 +5937,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, + /* flags = */ H5C__DIRTIED_FLAG, /* resize_flag = */ TRUE, /* new_size = */ VARIABLE_ENTRY_SIZE / 2, /* num_pins = */ 0, @@ -5936,9 +5956,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -5955,9 +5974,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -6030,7 +6048,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, + /* flags = */ H5C__DIRTIED_FLAG, /* resize_flag = */ TRUE, /* new_size = */ VARIABLE_ENTRY_SIZE / 2, /* num_pins = */ 0, @@ -6049,9 +6067,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6068,9 +6085,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -6165,9 +6181,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6184,9 +6199,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6199,9 +6213,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6264,9 +6277,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -6283,9 +6295,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -6298,9 +6309,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -6362,9 +6372,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6381,9 +6390,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6396,9 +6404,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6460,9 +6467,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -6479,9 +6485,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -6494,9 +6499,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -6558,9 +6562,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6577,9 +6580,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6592,9 +6594,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6688,9 +6689,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6707,9 +6707,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6722,9 +6721,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -6830,9 +6828,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6859,9 +6856,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -6888,9 +6884,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -6917,9 +6912,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -6936,9 +6930,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ TRUE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -6951,9 +6944,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ TRUE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -6966,9 +6958,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -6981,9 +6972,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -7049,9 +7039,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7078,9 +7067,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7107,9 +7095,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7136,9 +7123,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE }, { @@ -7165,9 +7151,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7194,9 +7179,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -7213,9 +7197,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7228,9 +7211,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7243,9 +7225,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7258,9 +7239,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -7325,9 +7305,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7354,9 +7333,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7383,9 +7361,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7412,9 +7389,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ TRUE }, { @@ -7441,9 +7417,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7470,9 +7445,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -7489,9 +7463,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7504,9 +7477,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7519,9 +7491,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7534,9 +7505,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -7597,9 +7567,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7626,9 +7595,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7655,9 +7623,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -7674,9 +7641,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -7734,9 +7700,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7763,9 +7728,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -7792,9 +7756,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -7811,9 +7774,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -7941,9 +7903,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7970,9 +7931,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -7999,9 +7959,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8028,9 +7987,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8057,9 +8015,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8086,9 +8043,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8115,9 +8071,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8144,9 +8099,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8173,9 +8127,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8202,9 +8155,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -8221,9 +8173,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8236,9 +8187,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8251,9 +8201,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } @@ -8388,9 +8337,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8417,9 +8365,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8446,9 +8393,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8475,9 +8421,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8504,9 +8449,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8533,9 +8477,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8562,9 +8505,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8591,9 +8533,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8620,9 +8561,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8649,9 +8589,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -8668,9 +8607,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8683,9 +8621,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8698,9 +8635,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } @@ -8760,9 +8696,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8789,9 +8724,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8818,9 +8752,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8847,9 +8780,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE }, { @@ -8876,9 +8808,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ FALSE } }; @@ -8895,9 +8826,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -8958,9 +8888,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -8987,9 +8916,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -9016,9 +8944,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -9045,9 +8972,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE }, { @@ -9074,9 +9000,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL }, { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } }, - /* expected_loaded = */ TRUE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ TRUE, + /* expected_deserialized = */ TRUE, + /* expected_serialized = */ TRUE, /* expected_destroyed = */ TRUE } }; @@ -9093,9 +9018,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* is_dirty = */ FALSE, /* is_protected = */ FALSE, /* is_pinned = */ FALSE, - /* expected_loaded = */ FALSE, - /* expected_cleared = */ FALSE, - /* expected_flushed = */ FALSE, + /* expected_deserialized = */ FALSE, + /* expected_serialized = */ FALSE, /* expected_destroyed = */ FALSE } }; @@ -9233,12 +9157,10 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, ( check[i].is_protected != FALSE ) ) || ( ( check[i].is_pinned != TRUE ) && ( check[i].is_pinned != FALSE ) ) || - ( ( check[i].expected_loaded != TRUE ) && - ( check[i].expected_loaded != FALSE ) ) || - ( ( check[i].expected_cleared != TRUE ) && - ( check[i].expected_cleared != FALSE ) ) || - ( ( check[i].expected_flushed != TRUE ) && - ( check[i].expected_flushed != FALSE ) ) || + ( ( check[i].expected_deserialized != TRUE ) && + ( check[i].expected_deserialized != FALSE ) ) || + ( ( check[i].expected_serialized != TRUE ) && + ( check[i].expected_serialized != FALSE ) ) || ( ( check[i].expected_destroyed != TRUE ) && ( check[i].expected_destroyed != FALSE ) ) ) { @@ -9310,8 +9232,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -9330,21 +9251,18 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, base_addr = entries[spec[i].entry_type]; entry_ptr = &(base_addr[spec[i].entry_index]); - if ( ( entry_ptr->loaded != spec[i].expected_loaded ) || - ( entry_ptr->cleared != spec[i].expected_cleared ) || - ( entry_ptr->flushed != spec[i].expected_flushed ) || + if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) || + ( entry_ptr->serialized != spec[i].expected_serialized ) || ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) { #if 0 /* This is useful debugging code. Lets keep it around. */ HDfprintf(stdout, - "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->loaded), - (int)(spec[i].expected_loaded), - (int)(entry_ptr->cleared), - (int)(spec[i].expected_cleared), - (int)(entry_ptr->flushed), - (int)(spec[i].expected_flushed), + "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)(spec[i].expected_deserialized), + (int)(entry_ptr->serialized), + (int)(spec[i].expected_serialized), (int)(entry_ptr->destroyed), (int)(spec[i].expected_destroyed)); @@ -9391,9 +9309,8 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, ( entry_ptr->header.is_protected != check[i].is_protected ) || ( entry_ptr->is_pinned != check[i].is_pinned ) || ( entry_ptr->header.is_pinned != check[i].is_pinned ) || - ( entry_ptr->loaded != check[i].expected_loaded ) || - ( entry_ptr->cleared != check[i].expected_cleared ) || - ( entry_ptr->flushed != check[i].expected_flushed ) || + ( entry_ptr->deserialized != check[i].expected_deserialized ) || + ( entry_ptr->serialized != check[i].expected_serialized ) || ( entry_ptr->destroyed != check[i].expected_destroyed ) ) { #if 0 /* This is useful debugging code. Lets keep it around for a while. */ @@ -9448,20 +9365,18 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, (int)(entry_ptr->header.is_pinned), (int)(check[i].is_pinned)); } - if ( entry_ptr->loaded != check[i].expected_loaded ) { - HDfprintf(stdout, "entry_ptr->loaded (expected) = %d (%d).\n", - (int)(entry_ptr->loaded), - (int)(check[i].expected_loaded)); - } - if ( entry_ptr->cleared != check[i].expected_cleared ) { - HDfprintf(stdout, "entry_ptr->cleared (expected) = %d (%d).\n", - (int)(entry_ptr->cleared), - (int)(check[i].expected_cleared)); + if ( entry_ptr->deserialized != + check[i].expected_deserialized ) { + HDfprintf(stdout, + "entry_ptr->deserialized (expected) = %d (%d).\n", + (int)(entry_ptr->deserialized), + (int)(check[i].expected_deserialized)); } - if ( entry_ptr->flushed != check[i].expected_flushed ) { - HDfprintf(stdout, "entry_ptr->flushed (expected) = %d (%d).\n", - (int)(entry_ptr->flushed), - (int)(check[i].expected_flushed)); + if ( entry_ptr->serialized != check[i].expected_serialized ) { + HDfprintf(stdout, + "entry_ptr->serialized (expected) = %d (%d).\n", + (int)(entry_ptr->serialized), + (int)(check[i].expected_serialized)); } if ( entry_ptr->destroyed != check[i].expected_destroyed ) { HDfprintf(stdout, "entry_ptr->destroyed (expected) = %d (%d).\n", @@ -9509,8 +9424,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, /* clean up the cache to prep for the next test */ if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -9542,10 +9456,9 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, entry_ptr->size = entry_sizes[spec[i].entry_type]; - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; i++; } @@ -9558,10 +9471,9 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, entry_ptr->size = entry_sizes[check[i].entry_type]; - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; i++; } @@ -9586,6 +9498,11 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, * * Modifications: * + * Updated test for minor changes in the behaviour + * of H5C_flush_single_entry(). + * + * JRM -- 2/16/15 + * *------------------------------------------------------------------------- */ @@ -9594,74 +9511,76 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) { H5C_t * cache_ptr = file_ptr->shared->cache; int i; - int num_variable_entries = 8; + int num_variable_entries = 10; int num_monster_entries = 31; int num_large_entries = 0; herr_t result; test_entry_t * entry_ptr; test_entry_t * base_addr; - struct expected_entry_status expected[8 + 31 + 14] = + struct expected_entry_status expected[10 + 31 + 14] = { /* the expected array is used to maintain a table of the expected status of every * entry used in this test. Note that since the function that processes this * array only processes as much of it as it is told to, we don't have to * worry about maintaining the status of entries that we haven't used yet. */ - /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: order: */ - { VARIABLE_ENTRY_TYPE, 0, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 1, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 2, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 3, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 4, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 5, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 6, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { VARIABLE_ENTRY_TYPE, 7, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 0, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 1, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 2, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 3, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 4, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 5, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 6, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 7, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 8, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 9, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 10, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 11, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 12, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { LARGE_ENTRY_TYPE, 13, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par idx: dep ref.count: dep height: order: */ + { VARIABLE_ENTRY_TYPE, 0, VARIABLE_ENTRY_SIZE/4, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 1, VARIABLE_ENTRY_SIZE/4, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 2, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 3, VARIABLE_ENTRY_SIZE/4, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 4, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 5, VARIABLE_ENTRY_SIZE/4, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 6, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 7, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 8, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { VARIABLE_ENTRY_TYPE, 9, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 0, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 1, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 2, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 3, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 4, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 5, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 6, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 7, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 8, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 9, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 10, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 11, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 12, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { LARGE_ENTRY_TYPE, 13, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } }; if ( pass ) { @@ -9718,38 +9637,49 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, - (VARIABLE_ENTRY_SIZE / 2), TRUE); + (VARIABLE_ENTRY_SIZE / 4), TRUE); unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, + (VARIABLE_ENTRY_SIZE / 4), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2); unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, - (VARIABLE_ENTRY_SIZE / 2), TRUE); + (VARIABLE_ENTRY_SIZE / 4), TRUE); unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4, - (VARIABLE_ENTRY_SIZE / 2), TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__NO_FLAGS_SET); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, - (VARIABLE_ENTRY_SIZE / 2), TRUE); + (VARIABLE_ENTRY_SIZE / 4), TRUE); unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__NO_FLAGS_SET); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, + (VARIABLE_ENTRY_SIZE / 2), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__NO_FLAGS_SET); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, + (VARIABLE_ENTRY_SIZE / 2), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__DIRTIED_FLAG); + + protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8, H5C__NO_FLAGS_SET); + + protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 9); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 9, H5C__NO_FLAGS_SET); - if ( ( cache_ptr->index_len != 8 ) || - ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 2)) + + if ( ( cache_ptr->index_len != 10 ) || + ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 4)) + + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * VARIABLE_ENTRY_SIZE) ) ) { pass = FALSE; @@ -9761,33 +9691,35 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* Now set up the pinning relationships: * - * Briefly, (VET, 0) is pinned by (VET, 1), (VET, 2), and (VET, 3) - * (VET, 7) is pinned by (VET, 3), and (VET, 5) + * Briefly, (VET, 0) is pinned by (VET, 1), (VET, 3), and (VET, 5) + * (VET, 9) is pinned by (VET, 5), and (VET, 7) */ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 1, VARIABLE_ENTRY_TYPE, 0); - create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 2, - VARIABLE_ENTRY_TYPE, 0); create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3, VARIABLE_ENTRY_TYPE, 0); - create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3, - VARIABLE_ENTRY_TYPE, 7); create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 5, - VARIABLE_ENTRY_TYPE, 7); + VARIABLE_ENTRY_TYPE, 0); + create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 5, + VARIABLE_ENTRY_TYPE, 9); + create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 7, + VARIABLE_ENTRY_TYPE, 9); /* Next, set up the flush operations: * * Briefly, (VET, 1) dirties (VET, 0) * resizes (VET, 0) to 3/4 VARIABLE_ENTRY_SIZE * - * (VET, 2) dirties (VET, 0) + * (VET, 3) dirties (VET, 0) * resizes (VET, 0) to VARIABLE_ENTRY_SIZE * moves (VET, 0) to its alternate address * - * (VET, 3) dirties (VET, 0) - * resizes itself to VARIABLE_ENTRY_SIZE + * (VET, 5) dirties (VET, 0) + * resizes itself to VARIABLE_ENTRY_SIZE / 2 + * + * (VET, 7) dirties (VET, 9) * - * (VET, 7) dirties (VET, 6) + * (VET, 9) dirties (VET, 8) */ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL); @@ -9795,20 +9727,23 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) VARIABLE_ENTRY_TYPE, 0, TRUE, 3 * VARIABLE_ENTRY_SIZE / 4, NULL); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RESIZE, + add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, TRUE, VARIABLE_ENTRY_SIZE, NULL); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__MOVE, + add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL); - add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL); - add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, - VARIABLE_ENTRY_TYPE, 3, TRUE, VARIABLE_ENTRY_SIZE, NULL); + add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, + VARIABLE_ENTRY_TYPE, 5, TRUE, VARIABLE_ENTRY_SIZE / 2, NULL); add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, - VARIABLE_ENTRY_TYPE, 6, FALSE, (size_t)0, NULL); + VARIABLE_ENTRY_TYPE, 9, FALSE, (size_t)0, NULL); + + add_flush_op(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, + VARIABLE_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL); } if ( pass ) { @@ -9819,25 +9754,31 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * in * entry: cache? size: dirty? pinned? pins: flush operations: * - * (VET, 0) Y 5 KB Y Y - - + * (VET, 0) Y 2.5 KB Y Y - - * - * (VET, 1) Y 10 KB N N 0 dirty (VET, 0), + * (VET, 1) Y 2.5 KB Y N 0 dirty (VET, 0), * resize (VET, 0) to 7.5 KB * - * (VET, 2) Y 10 KB N N 0 dirty (VET, 0) + * (VET, 2) Y 10 KB N N - - + * + * + * (VET, 3) Y 2.5 KB N N 0 dirty (VET, 0) * resize (VET, 0) to 10 KB * move (VET, 0) to its alternate address * - * (VET, 3) Y 5 KB Y N 0, 7 dirty (VET, 0) - * resize (VET, 3) to 10 KB + * (VET, 4) Y 10 KB N N - - + * + * + * (VET, 5) Y 2.5 KB Y N 0, 9 dirty (VET, 0) + * resize (VET, 5) to 5 KB * - * (VET, 4) Y 5 KB Y N - - + * (VET, 6) Y 5 KB Y N - - * - * (VET, 5) Y 5 KB Y N 7 - + * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * - * (VET, 6) Y 10 KB N N - - + * (VET, 8) Y 10 KB N N - - * - * (VET, 7) Y 10 KB N Y - dirty (VET, 6) + * (VET, 9) Y 10 KB N N - dirty (VET, 8) * * Recall that in this test bed, flush operations are excuted the * first time the associated entry is flushed, and are then @@ -9858,9 +9799,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* The cache should now be exactly full */ - if ( ( cache_ptr->index_len != 40 ) || + if ( ( cache_ptr->index_len != 42 ) || ( cache_ptr->index_size != 2 * 1024 * 1024 ) || - ( cache_ptr->index_size != ((4 * VARIABLE_ENTRY_SIZE / 2) + + ( cache_ptr->index_size != ((4 * VARIABLE_ENTRY_SIZE / 4) + + (2 * VARIABLE_ENTRY_SIZE / 2) + (4 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (1 * LARGE_ENTRY_SIZE)) ) ) { @@ -9883,7 +9825,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { /* Now load a large entry. This should result in the eviction - * of (VET,1), and the increase in the size of (VET, 0) from .5 + * of (VET,2), and the increase in the size of (VET, 0) from .25 * VARIABLE_ENTRY_SIZE to .75 VARIABLE_ENTRY_SIZE. * * The following table illustrates the intended state of affairs @@ -9894,44 +9836,50 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 7.5 KB Y Y - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) Y 2.5 KB N N - - * - * (VET, 2) Y 10 KB N N 0 dirty (VET, 0) + * (VET, 2) N 10 KB N N - - + * + * (VET, 3) Y 2.5 KB Y N 0 dirty (VET, 0) * resize (VET, 0) to 10 KB * move (VET, 0) to its alternate address * - * (VET, 3) Y 5 KB Y N 0, 7 dirty (VET, 0) - * resize (VET, 3) to 10 KB + * (VET, 4) Y 10 KB N N - - * - * (VET, 4) Y 5 KB Y N - - + * (VET, 5) Y 2.5 KB Y N 0, 9 dirty (VET, 0) + * resize (VET, 5) to 5 KB * - * (VET, 5) Y 5 KB Y N 7 - + * (VET, 6) Y 5 KB Y N - - * - * (VET, 6) Y 10 KB N N - - + * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * - * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) + * (VET, 8) Y 10 KB N N - - + * + * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ - expected[0].size = 3 * VARIABLE_ENTRY_SIZE / 4; - expected[1].in_cache = FALSE; - expected[1].flushed = TRUE; - expected[1].destroyed = TRUE; + expected[0].size = 3 * VARIABLE_ENTRY_SIZE / 4; + expected[1].is_dirty = FALSE; + expected[1].serialized = TRUE; + expected[2].in_cache = FALSE; + expected[2].destroyed = TRUE; num_large_entries = 2; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG); - if ( ( cache_ptr->index_len != 40 ) || + if ( ( cache_ptr->index_len != 42 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - (VARIABLE_ENTRY_SIZE) + - (VARIABLE_ENTRY_SIZE / 4) + + (VARIABLE_ENTRY_SIZE / 2) + (LARGE_ENTRY_SIZE) ) || - ( cache_ptr->index_size != ((1 * 3 * VARIABLE_ENTRY_SIZE / 4 ) + - (3 * VARIABLE_ENTRY_SIZE / 2 ) + - (3 * VARIABLE_ENTRY_SIZE) + - (31 * MONSTER_ENTRY_SIZE) + + ( cache_ptr->index_size != ((1 * (3 * VARIABLE_ENTRY_SIZE / 4)) + + (3 * VARIABLE_ENTRY_SIZE / 4) + + (2 * VARIABLE_ENTRY_SIZE / 2) + + (3 * VARIABLE_ENTRY_SIZE) + + (31 * MONSTER_ENTRY_SIZE) + (2 * LARGE_ENTRY_SIZE)) ) ) { pass = FALSE; failure_mssg = "unexpected size/len in flush op eviction test 3."; @@ -9947,8 +9895,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { /* Now load another large entry. This should result in the eviction - * of (VET, 2), the increase in the size of (VET, 0) from .75 - * VARIABLE_ENTRY_SIZE to 1.0 VARIABLE_ENTRY_SIZE, and the moving + * of (VET, 4), the increase in the size of (VET, 0) from .75 + * VARIABLE_ENTRY_SIZE to 1.0 VARIABLE_ENTRY_SIZE, and the renaming * of (VET, 0) to its alternate address. * * The following table shows the expected states of the variable @@ -9959,40 +9907,46 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 10 KB Y Y - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) Y 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) Y 5 KB Y N 0, 7 dirty (VET, 0) - * resize (VET, 3) to 10 KB + * (VET, 3) Y 2.5 KB N N - - + * + * (VET, 4) N 10 KB N N - - + * + * (VET, 5) Y 2.5 KB Y N 0, 9 dirty (VET, 0) + * resize (VET, 5) to 5 KB * - * (VET, 4) Y 5 KB Y N - - + * (VET, 6) Y 5 KB Y N - - * - * (VET, 5) Y 5 KB Y N 7 - + * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * - * (VET, 6) Y 10 KB N N - - + * (VET, 8) Y 10 KB N N - - * - * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) + * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ expected[0].size = VARIABLE_ENTRY_SIZE; expected[0].at_main_addr = FALSE; - expected[2].in_cache = FALSE; - expected[2].flushed = TRUE; - expected[2].destroyed = TRUE; + expected[3].is_dirty = FALSE; + expected[3].serialized = TRUE; + expected[4].in_cache = FALSE; + expected[4].destroyed = TRUE; num_large_entries = 3; protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DIRTIED_FLAG); - if ( ( cache_ptr->index_len != 40 ) || + if ( ( cache_ptr->index_len != 42 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - (2 * VARIABLE_ENTRY_SIZE) + - (VARIABLE_ENTRY_SIZE / 2) + + (3 * VARIABLE_ENTRY_SIZE / 4) + (2 * LARGE_ENTRY_SIZE) ) || - ( cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 2) + + ( cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 4) + + (2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (3 * LARGE_ENTRY_SIZE)) ) ) { @@ -10010,13 +9964,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { - /* load two more large entries. This should result in (VET, 3) being - * flushed, and increasing its size from 1/2 VARIABLE_ENTRY_SIZE to + /* load two more large entries. This should result in (VET, 5) being + * flushed, and increasing its size from 1/4 VARIABLE_ENTRY_SIZE to * VARIABLE_ENTRY_SIZE. * * As a result of this size increase, the cache will have to look - * for another entry to evict. After flushing (VET, 4) and (VET, 5), - * it should evict (VET, 6), yielding the needed memory. + * for another entry to evict. After flushing (VET, 6) and (VET, 7), + * it should evict (VET, 8), yielding the needed memory and dirtying + * (VET, 9). * * The following table shows the expected states of the variable * size entries after the test. @@ -10026,33 +9981,37 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 10 KB Y Y - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) Y 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) Y 10 KB N N 0, 7 - + * (VET, 3) Y 2.5 KB N N - - + * + * (VET, 4) N 10 KB N N - - * - * (VET, 4) Y 5 KB N N - - + * (VET, 5) Y 5 KB N N 0, 9 - * - * (VET, 5) Y 5 KB N N 7 - + * (VET, 6) Y 5 KB N N - - * - * (VET, 6) N 10 KB N N - - + * (VET, 7) Y 5 KB N N 9 - * - * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) + * (VET, 8) N 10 KB N N - - + * + * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ - expected[3].size = VARIABLE_ENTRY_SIZE; - expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; - expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[5].size = VARIABLE_ENTRY_SIZE / 2; expected[5].is_dirty = FALSE; - expected[5].flushed = TRUE; - expected[6].in_cache = FALSE; - expected[6].flushed = TRUE; - expected[6].destroyed = TRUE; + expected[5].serialized = TRUE; + expected[6].is_dirty = FALSE; + expected[6].serialized = TRUE; + expected[7].is_dirty = FALSE; + expected[7].serialized = TRUE; + expected[8].in_cache = FALSE; + expected[8].destroyed = TRUE; + expected[9].is_dirty = TRUE; num_large_entries = 5; @@ -10063,13 +10022,15 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG); /* verify cache size */ - if ( ( cache_ptr->index_len != 41 ) || + if ( ( cache_ptr->index_len != 43 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - (3 * VARIABLE_ENTRY_SIZE) + - (1 * VARIABLE_ENTRY_SIZE ) + /* size increases of (VET, 0) & (VET, 3) */ + (1 * VARIABLE_ENTRY_SIZE / 4) + + (3 * VARIABLE_ENTRY_SIZE / 4) + (4 * LARGE_ENTRY_SIZE) ) || - ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) + - (3 * VARIABLE_ENTRY_SIZE) + + ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) + + (3 * VARIABLE_ENTRY_SIZE / 2) + + (2 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (5 * LARGE_ENTRY_SIZE)) ) ) { @@ -10090,7 +10051,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * cache to bring all the VARIABLE_ENTRY_TYPE entries to the * end of the LRU list. * - * Note that we don't have to worry about (VET, 0) and (VET, 7) + * Note that we don't have to worry about (VET, 0) and (VET, 9) * as they are pinned and thus not in the LRU list to begin with. */ for ( i = 0; i < 31; i++ ) @@ -10106,10 +10067,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify cache size */ - if ( ( cache_ptr->index_len != 41 ) || + if ( ( cache_ptr->index_len != 43 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - - (2 * VARIABLE_ENTRY_SIZE) + - (4 * LARGE_ENTRY_SIZE) ) ) { + (3 * VARIABLE_ENTRY_SIZE) + + (1 * VARIABLE_ENTRY_SIZE / 4) + + (3 * VARIABLE_ENTRY_SIZE / 4) + + (4 * LARGE_ENTRY_SIZE) ) || + ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) + + (3 * VARIABLE_ENTRY_SIZE / 2) + + (2 * VARIABLE_ENTRY_SIZE) + + (31 * MONSTER_ENTRY_SIZE) + + (5 * LARGE_ENTRY_SIZE)) ) ) { pass = FALSE; failure_mssg = "unexpected size/len in flush op eviction test 6."; @@ -10125,7 +10093,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { /* Now load three more large entries. This should result - * in the eviction of (VET, 3), and the unpinning of (VET, 0) + * in the evictions of (VET, 1), (VET, 3), and (VET, 5), and the + * unpinning of (VET, 0) * * The following table shows the expected states of the variable * size entries after the test. @@ -10135,26 +10104,34 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 10 KB Y N - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) N 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) N 10 KB N N - - + * (VET, 3) N 2.5 KB N N - - * - * (VET, 4) Y 5 KB N N - - + * (VET, 4) N 10 KB N N - - * - * (VET, 5) Y 5 KB N N 7 - + * (VET, 5) N 5 KB N N - - + * + * (VET, 6) Y 5 KB N N - - * - * (VET, 6) N 10 KB N N - - + * (VET, 7) Y 5 KB N N 9 - * - * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) + * (VET, 8) N 10 KB N N - - + * + * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ expected[0].is_pinned = FALSE; + expected[1].in_cache = FALSE; + expected[1].destroyed = TRUE; expected[3].in_cache = FALSE; expected[3].destroyed = TRUE; + expected[5].in_cache = FALSE; + expected[5].destroyed = TRUE; num_large_entries = 8; @@ -10167,7 +10144,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* verify cache size */ if ( ( cache_ptr->index_len != 43 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - - (3 * VARIABLE_ENTRY_SIZE) + + (4 * VARIABLE_ENTRY_SIZE) + + (1 * VARIABLE_ENTRY_SIZE / 4) + + (3 * VARIABLE_ENTRY_SIZE / 4) + (7 * LARGE_ENTRY_SIZE) ) || ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) + @@ -10187,7 +10166,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { - /* load another large entry. (VET, 4) should be evicted. + /* load another large entry. (VET, 6) should be evicted. * * The following table shows the expected states of the variable * size entries after the test. @@ -10197,25 +10176,29 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 10 KB Y N - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) N 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) N 10 KB N N - - + * (VET, 3) N 2.5 KB N N - - + * + * (VET, 4) N 10 KB N N - - * - * (VET, 4) N 5 KB N N - - + * (VET, 5) N 5 KB N N - - + * + * (VET, 6) N 5 KB N N - - * - * (VET, 5) Y 5 KB N N 7 - + * (VET, 7) Y 5 KB N N 9 - * - * (VET, 6) N 10 KB N N - - + * (VET, 8) N 10 KB N N - - * - * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) + * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ - expected[4].in_cache = FALSE; - expected[4].destroyed = TRUE; + expected[6].in_cache = FALSE; + expected[6].destroyed = TRUE; num_large_entries = 9; @@ -10251,7 +10234,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* Load another large entry. * - * (VET, 5) should be evicted, and (VET, 7) should be unpinned. + * (VET, 7) should be evicted, and (VET, 9) should be unpinned. * * The following table shows the expected states of the variable * size entries after the test. @@ -10261,26 +10244,30 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) Y 10 KB Y N - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) N 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) N 10 KB N N - - + * (VET, 3) N 2.5 KB N N - - * - * (VET, 4) N 5 KB N N - - + * (VET, 4) N 10 KB N N - - * * (VET, 5) N 5 KB N N - - * - * (VET, 6) N 10 KB N N - - + * (VET, 6) N 5 KB N N - - + * + * (VET, 7) N 5 KB N N - - * - * (VET, 7) Y 10 KB Y N - dirty (VET, 6) + * (VET, 8) N 10 KB N N - - + * + * (VET, 9) Y 10 KB Y N - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: */ - expected[5].in_cache = FALSE; - expected[5].destroyed = TRUE; - expected[7].is_pinned = FALSE; + expected[7].in_cache = FALSE; + expected[7].destroyed = TRUE; + expected[9].is_pinned = FALSE; num_large_entries = 10; @@ -10353,20 +10340,66 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { - /* load two more large entries. - * - * (VET, 0) should be flushed, but not evicted initially since it is dirty. - * - * (VET, 7) should be evicted, but (VET, 7) has an eviction operation that - * dirties (VET, 6). Since (VET, 6) is not in the cache, it will be loaded. - * Since this results in no net increase in free space, the cache will - * continue to attempt to create free space. + /* load two more large entries. Things get a bit complicated here, + * so I'll go through the operation step by step. + * + * Initially, the cache has 4 KB of empty space, so the first entry + * (LET, 10) is loaded via calls to H5C_protect() H5C_unprotect() + * without causing any evictions. + * + * However, this is not the case for the call of H5C_protect() on + * (LET, 11). + * + * Before inserting (LET, 11), H5C_protect(LET, 11) must try to + * free up at least 4 KB of space. To do this, it starts scanning + * up the LRU list to find entries to evict. + * + * (VET, 0) is at the bottom of the LRU list, and thus is the first + * entry considered. However, it is dirty, so it flushed to disk, + * moved to the top of the LRU list, and marked clean. + * + * (VET, 9) is the next entry on the bottom of the LRU list. It is + * dirty too, calls its serialize callback function to construct an + * on disk image of the entry, and moves it to the top of the LRU + * list after the serialize callback returns. + * + * However, (VET 9)'s serialize function needs to modify (VET, 8), + * which is currently not in cache. Thus it calls H5C_protect(VET, 8) + * to gain access to it. H5C_protect(VET, 8) loads (VET, 8), and + * then attempts to evict entries to make space for it. While (VET, 9) + * is still at the bottom of the LRU, it is marked flush in progress + * and this is skipped. Thus the next entries on the LRU are (MET, 0) + * thru (MET, 30) and (LET, 0) thru (LET, 10) -- all of which are dirty, + * and are therefore flushed and moved to the head of the LRU list. + * + * The next entry on the bottom of the LRU list is (VET, 0), which + * is clean, and is therefore evicted to make space for (VET, 8). + * This space is sufficient, so H5C_protect(VET, 8) inserts + * (VET, 8) into the cache's index, marks it as protected, and + * returns to the serialize function for (VET, 9). + * + * When the serialize function for (VET, 9) is done with (VET, 8), it + * calls H5C_unprotect(VET, 8), which markes (VET, 8) as dirty and + * unprotected, and places it at the head of the LRU. + * + * The serialize function for (VET, 9) then returns, and (VET, 9) is + * is written to disk, marked clean, and moved to the head of the LRU. + * + * At this point, the cache is still full (since (VET, 8) took the + * space created by the eviction of (VET, 0)). Thus + * H5C_protect(LET, 11) continues to look for space. While + * (MET, 0) was the next item on the LRU list when it called the + * serialize function for (VET, 9), the function notices that the + * LRU has been modified, and restarts its search for candidates + * for eviction at the bottom of the LRU. * - * The cache will then flush all the monster and large entries, but since they - * are all dirty, they will not be evicted. + * (MET, 0) is now at the bottom of the LRU, and is clean. Thus + * it is evicted. This makes sufficient space for (LET, 11), so + * H5C_protect(LET, 11) inserts it into the cache, marks it as + * protected, and returns. * - * Finally, it will reach (VET, 0) again, and evict it on the second pass. - * This finally makes the necessary space. + * H5C_unprotect(LET, 11) marks (LET, 11) as unprotected, and then + * returns as well. * * The following table shows the expected states of the variable * size entries after the test. @@ -10376,44 +10409,54 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) N 10 KB N N - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) N 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) N 10 KB N N - - + * (VET, 3) N 2.5 KB N N - - * - * (VET, 4) N 5 KB N N - - + * (VET, 4) N 10 KB N N - - * * (VET, 5) N 5 KB N N - - * - * (VET, 6) Y 10 KB Y N - - + * (VET, 6) N 5 KB N N - - * - * (VET, 7) N 10 KB N N - - + * (VET, 7) N 5 KB N N - - * - * Start by updating the expected table for the expected changes in entry status: + * (VET, 8) Y 10 KB Y N - - * - * Note that we reset the loaded, cleared, flushed, and destroyed fields of - * (VET,6) so we can track what is happening. + * (VET, 9) Y 10 KB N N - - + * + * Start by updating the expected table for the expected changes in + * entry status: + * + * Note that we reset the loaded, flushed, and destroyed + * fields of (VET,8) so we can track what is happening. */ base_addr = entries[VARIABLE_ENTRY_TYPE]; - entry_ptr = &(base_addr[6]); - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr = &(base_addr[8]); + entry_ptr->deserialized = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->destroyed = FALSE; expected[0].in_cache = FALSE; expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].destroyed = TRUE; - expected[6].in_cache = TRUE; - expected[6].is_dirty = TRUE; - expected[6].loaded = TRUE; - expected[6].flushed = FALSE; - expected[6].destroyed = FALSE; - expected[7].in_cache = FALSE; - expected[7].flushed = TRUE; - expected[7].destroyed = TRUE; + expected[8].in_cache = TRUE; + expected[8].is_dirty = TRUE; + expected[8].deserialized = TRUE; + expected[8].serialized = FALSE; + expected[8].destroyed = FALSE; + expected[9].in_cache = TRUE; + expected[9].is_dirty = FALSE; + expected[9].serialized = TRUE; + expected[9].destroyed = FALSE; + + expected[10].in_cache = FALSE; + expected[10].is_dirty = FALSE; + expected[10].serialized = TRUE; + expected[10].destroyed = TRUE; num_large_entries = 12; @@ -10424,8 +10467,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) i < num_variable_entries + num_monster_entries + num_large_entries - 1; i++ ) { - expected[i].is_dirty = FALSE; - expected[i].flushed = TRUE; + expected[i].is_dirty = FALSE; + expected[i].serialized = TRUE; } for ( i = 10; i < 12; i++ ) @@ -10437,10 +10480,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* verify cache size */ if ( ( cache_ptr->index_len != 44 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - - (5 * VARIABLE_ENTRY_SIZE) + - (11 * LARGE_ENTRY_SIZE) ) || - ( cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE) + - (31 * MONSTER_ENTRY_SIZE) + + (2 * VARIABLE_ENTRY_SIZE) - + (10 * LARGE_ENTRY_SIZE) ) || + ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) + + (30 * MONSTER_ENTRY_SIZE) + (12 * LARGE_ENTRY_SIZE)) ) ) { pass = FALSE; @@ -10456,10 +10499,33 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { + /* protect and unprotect VET 8 to move it to the top of the LRU */ + protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8, H5C__NO_FLAGS_SET); + + /* Again, touch all the non VARIABLE_ENTRY_TYPE entries in the - * cache to bring the last remaining VARIABLE_ENTRY_TYPE entry to the - * end of the LRU list. + * cache to evict VET 9 and move VET 8 to the bottom of the LRU. + * + * Must do this twice to get the desired result. */ + + + /* skip MET 0 in first pass so that we evict VET 9 when we + * reload MET 0 + */ + for ( i = 1; i < num_monster_entries; i++ ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); + } + + for ( i = 0; i < num_large_entries; i++ ) + { + protect_entry(file_ptr, LARGE_ENTRY_TYPE, i); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); + } + for ( i = 0; i < num_monster_entries; i++ ) { protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); @@ -10480,6 +10546,22 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) expected[i].is_dirty = TRUE; } + /* update MET 0 to set its in cache flag, and reset the its destroyed flag */ + expected[10].in_cache = TRUE; + + /* pass through non variable entries will flush VET 8, and evict VET 9. + * Update accordingly. + */ + expected[8].in_cache = TRUE; + expected[8].is_dirty = TRUE; + expected[8].serialized = FALSE; + expected[8].destroyed = FALSE; + expected[9].in_cache = FALSE; + expected[9].is_dirty = FALSE; + expected[9].serialized = TRUE; + expected[9].destroyed = TRUE; + + /* verify cache size */ if ( ( cache_ptr->index_len != 44 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - @@ -10493,6 +10575,12 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) failure_mssg = "unexpected size/len in flush op eviction test 12."; } + /* modifications to the H5C_flush_single_entry() function have + * changed the behavior of the cache slightly, causing + * this test to fail. Comment out for now -- come back and + * fix if all goes well. + */ + /* verify entry status */ verify_entry_status(cache_ptr, 10, @@ -10504,10 +10592,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* Load two more large entries. * - * Since (VET, 6) is dirty, at first this will just cause (VET, 6) to be flushed. + * Since (VET, 8) is dirty, at first this will just cause (VET, 8) + * to be flushed. * - * But all other entries in the cache are dirty, so the cache will flush them all, - * and then evict (VET, 6) on the second pass. + * But all other entries in the cache are dirty, so the cache will + * flush them all, and then evict (VET, 8) on the second pass. * * The following table shows the expected states of the variable * size entries after the test. @@ -10517,27 +10606,32 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) N 10 KB N N - - * - * (VET, 1) N 10 KB N N - - + * (VET, 1) N 2.5 KB N N - - * * (VET, 2) N 10 KB N N - - * - * (VET, 3) N 10 KB N N - - + * (VET, 3) N 2.5 KB N N - - * - * (VET, 4) N 5 KB N N - - + * (VET, 4) N 10 KB N N - - * * (VET, 5) N 5 KB N N - - * - * (VET, 6) N 10 KB N N - - + * (VET, 6) N 5 KB N N - - * - * (VET, 7) N 10 KB N N - - + * (VET, 7) N 5 KB N N - - * - * Start by updating the expected table for the expected changes in entry status: + * (VET, 8) N 10 KB N N - - + * + * (VET, 9) N 10 KB N N - - + * + * Start by updating the expected table for the expected changes in + * entry status: */ - expected[6].in_cache = FALSE; - expected[6].is_dirty = FALSE; - expected[6].flushed = TRUE; - expected[6].destroyed = TRUE; + expected[8].in_cache = FALSE; + expected[8].is_dirty = FALSE; + expected[8].serialized = TRUE; + expected[8].destroyed = TRUE; num_large_entries = 14; @@ -10548,8 +10642,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) i < num_variable_entries + num_monster_entries + num_large_entries - 1; i++ ) { - expected[i].is_dirty = FALSE; - expected[i].flushed = TRUE; + expected[i].is_dirty = FALSE; + expected[i].serialized = TRUE; } for ( i = 12; i < 14; i++ ) @@ -10570,6 +10664,12 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) failure_mssg = "unexpected size/len in flush op eviction test 13."; } + /* modifications to the H5C_flush_single_entry() function have + * changed the behavior of the cache slightly, causing + * this test to fail. Comment out for now -- come back and + * fix if all goes well. + */ + /* verify entry status */ verify_entry_status(cache_ptr, 11, @@ -10585,8 +10685,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -10616,23 +10715,24 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( ( cache_ptr->insertions[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->pinned_insertions[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->clears[VARIABLE_ENTRY_TYPE] != 0 ) || - ( cache_ptr->flushes[VARIABLE_ENTRY_TYPE] != 14 ) || - ( cache_ptr->evictions[VARIABLE_ENTRY_TYPE] != 9 ) || + ( cache_ptr->flushes[VARIABLE_ENTRY_TYPE] != 8 ) || + ( cache_ptr->evictions[VARIABLE_ENTRY_TYPE] != 11 ) || + ( cache_ptr->take_ownerships[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->moves[VARIABLE_ENTRY_TYPE] != 1 ) || ( cache_ptr->entry_flush_moves[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->cache_flush_moves[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->pins[VARIABLE_ENTRY_TYPE] != 2 ) || ( cache_ptr->unpins[VARIABLE_ENTRY_TYPE] != 2 ) || - ( cache_ptr->dirty_pins[VARIABLE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[VARIABLE_ENTRY_TYPE] != 2 ) || ( cache_ptr->pinned_flushes[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->pinned_clears[VARIABLE_ENTRY_TYPE] != 0 ) || ( cache_ptr->size_increases[VARIABLE_ENTRY_TYPE] != 3 ) || - ( cache_ptr->size_decreases[VARIABLE_ENTRY_TYPE] != 4 ) || + ( cache_ptr->size_decreases[VARIABLE_ENTRY_TYPE] != 6 ) || ( cache_ptr->entry_flush_size_changes[VARIABLE_ENTRY_TYPE] != 1 ) || ( cache_ptr->cache_flush_size_changes[VARIABLE_ENTRY_TYPE] != 0 ) ) { pass = FALSE; - failure_mssg = "Unexpected variable size entry stats."; + failure_mssg = "Unexpected variable size entry stats in check_flush_cache__flush_op_eviction_test()."; } } @@ -10641,8 +10741,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( ( cache_ptr->insertions[LARGE_ENTRY_TYPE] != 0 ) || ( cache_ptr->pinned_insertions[LARGE_ENTRY_TYPE] != 0 ) || ( cache_ptr->clears[LARGE_ENTRY_TYPE] != 0 ) || - ( cache_ptr->flushes[LARGE_ENTRY_TYPE] != 38 ) || + ( cache_ptr->flushes[LARGE_ENTRY_TYPE] != 25 ) || ( cache_ptr->evictions[LARGE_ENTRY_TYPE] != 14 ) || + ( cache_ptr->take_ownerships[LARGE_ENTRY_TYPE] != 0 ) || ( cache_ptr->moves[LARGE_ENTRY_TYPE] != 0 ) || ( cache_ptr->entry_flush_moves[LARGE_ENTRY_TYPE] != 0 ) || ( cache_ptr->cache_flush_moves[LARGE_ENTRY_TYPE] != 0 ) || @@ -10657,7 +10758,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) ( cache_ptr->cache_flush_size_changes[LARGE_ENTRY_TYPE] != 0 ) ) { pass = FALSE; - failure_mssg = "Unexpected monster entry stats."; + failure_mssg = "Unexpected large entry stats in check_flush_cache__flush_op_eviction_test()."; } } @@ -10666,8 +10767,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) || ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || - ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 93 ) || - ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 31 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 62 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || @@ -10682,7 +10784,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { pass = FALSE; - failure_mssg = "Unexpected monster entry stats."; + failure_mssg = "Unexpected monster entry stats in check_flush_cache__flush_op_eviction_test()."; } } #endif /* H5C_COLLECT_CACHE_STATS */ @@ -10741,17 +10843,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 1, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 1, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10759,17 +10860,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 2, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 2, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -10777,17 +10877,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 3, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 3, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10795,17 +10894,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 4, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 4, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10813,17 +10911,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 5, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 5, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -10831,17 +10928,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 6, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 6, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -10849,17 +10945,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 7, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 7, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10867,17 +10962,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 8, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 8, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10885,18 +10979,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 9, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 9, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -10904,18 +10997,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 10, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 10, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -10923,18 +11015,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 11, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 11, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10942,18 +11033,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 12, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 12, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -10961,18 +11051,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 13, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 13, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -10980,18 +11069,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 14, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 14, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -10999,19 +11087,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 15, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 15, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11019,19 +11106,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 16, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 16, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11039,17 +11125,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 17, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 17, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11057,17 +11142,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 18, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 18, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11075,17 +11159,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 19, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 19, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11093,17 +11176,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 20, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 20, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11111,17 +11193,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 21, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 21, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11129,17 +11210,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 22, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 22, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11147,17 +11227,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 23, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 23, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11165,17 +11244,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 24, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 24, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11183,18 +11261,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 25, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 25, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11202,18 +11279,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 26, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 26, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11221,18 +11297,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 27, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 27, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11240,18 +11315,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 28, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 28, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11259,18 +11333,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 29, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 29, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11278,18 +11351,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 30, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 30, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11297,19 +11369,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 31, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 31, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11317,19 +11388,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 32, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ FALSE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + /* file_ptr */ file_ptr, + /* test_num */ 32, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ FALSE, + /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ TRUE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* expected_deserialized */ TRUE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11337,17 +11407,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 33, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 33, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11355,17 +11424,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 34, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 34, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11373,17 +11441,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 35, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 35, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11391,17 +11458,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 36, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 36, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11409,17 +11475,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 37, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 37, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11427,17 +11492,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 38, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 38, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11445,17 +11509,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 39, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 39, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11463,17 +11526,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 40, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 40, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11481,18 +11543,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 41, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 41, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11500,18 +11561,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 42, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 42, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11519,18 +11579,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 43, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 43, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11538,18 +11597,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 44, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 44, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11557,18 +11615,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 45, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 45, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11576,18 +11633,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 46, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 46, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11595,19 +11651,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 47, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 47, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11615,19 +11670,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 48, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 48, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__NO_FLAGS_SET, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11635,17 +11689,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 49, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 49, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11653,17 +11706,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 50, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 50, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__NO_FLAGS_SET, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11671,17 +11723,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 51, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 51, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11689,17 +11740,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 52, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 52, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11707,17 +11757,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 53, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 53, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11725,17 +11774,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 54, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 54, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11743,17 +11791,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 55, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 55, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11761,17 +11808,16 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 56, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 56, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ FALSE ); } @@ -11779,18 +11825,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 57, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 57, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11798,18 +11843,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 58, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 58, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11817,18 +11861,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 59, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 59, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11836,18 +11879,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 60, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ FALSE + /* file_ptr */ file_ptr, + /* test_num */ 60, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ FALSE ); } @@ -11855,18 +11897,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 61, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 61, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11874,18 +11915,17 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 62, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | - H5C__FLUSH_INVALIDATE_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ FALSE, - /* expected_flushed */ TRUE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 62, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | + H5C__FLUSH_INVALIDATE_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ TRUE, + /* expected_destroyed */ TRUE ); } @@ -11893,19 +11933,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 63, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 63, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11913,19 +11952,18 @@ check_flush_cache__single_entry(H5F_t * file_ptr) check_flush_cache__single_entry_test ( - /* file_ptr */ file_ptr, - /* test_num */ 64, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ TRUE, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | - H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_loaded */ FALSE, - /* expected_cleared */ TRUE, - /* expected_flushed */ FALSE, - /* expected_destroyed */ TRUE + /* file_ptr */ file_ptr, + /* test_num */ 64, + /* entry_type */ PICO_ENTRY_TYPE, + /* entry_idx */ 0, + /* insert_flag */ TRUE, + /* flags */ H5C__SET_FLUSH_MARKER_FLAG, + /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | + H5C__FLUSH_CLEAR_ONLY_FLAG | + H5C__FLUSH_MARKED_ENTRIES_FLAG, + /* expected_deserialized */ FALSE, + /* expected_serialized */ FALSE, + /* expected_destroyed */ TRUE ); } @@ -11953,14 +11991,13 @@ check_flush_cache__single_entry(H5F_t * file_ptr) * This yields a total of 256 tests. * * The tests and their expected results are given in the spec table - * below. The values assigned to the expected_cleared, expected_flushed, + * below. The values assigned to the expected_serialized, * and expected_destroyed fields are somewhat arcane, so the following * overview may be useful. * * In addition to simply checking to see if the test case runs, * we also check to see if the desired operations take place on the - * cache entry. Thus expected_cleared is set to TRUE if we expect - * the entry to be flushed, expected_flushed is set to TRUE if we + * cache entry. Thus expected_serialized is set to TRUE if we * we expect the entry to be flushed, and expected_destroyed is set * to TRUE if we expect the entry to be destroyed. * @@ -11998,277 +12035,277 @@ check_flush_cache__single_entry(H5F_t * file_ptr) int test_num; int entry_type; int entry_idx; + hbool_t dirty_flag; hbool_t mark_dirty; hbool_t pop_mark_dirty_prot; hbool_t pop_mark_dirty_pinned; hbool_t unprotect_unpin; unsigned int flags; unsigned int flush_flags; - hbool_t expected_cleared; - hbool_t expected_flushed; + hbool_t expected_serialized; hbool_t expected_destroyed; } spec[256] = - /* pop pop - * ent mark mark - * test entry -ry mark dirty dirty unprot flush expect expect expect - * num type idx dirty prot pinned unpin flags flags clear flush destroy + /* pop pop + * ent unprot mark mark + * test entry -ry dirty mark dirty dirty unprot flush expect expect + * num type idx flag dirty prot pinned unpin flags flags srlzd destroy */ - { { 1, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, FALSE, FALSE }, - { 2, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, FALSE, FALSE }, - { 3, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 4, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 5, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 6, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 7, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 8, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 9, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 10, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 11, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 12, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 13, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 14, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 15, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 16, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 17, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 18, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 19, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 20, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 21, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 22, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 23, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 24, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 25, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 26, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 27, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 28, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 29, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 30, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 31, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 32, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 33, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, FALSE, FALSE }, - { 34, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, FALSE, FALSE }, - { 35, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 36, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 37, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 38, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 39, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 40, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 41, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 42, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 43, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 44, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 45, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 46, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 47, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 48, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 49, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 50, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 51, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 52, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 53, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 54, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 55, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 56, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 57, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 58, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 59, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 60, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 61, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 62, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 63, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 64, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, TRUE, FALSE }, - { 65, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 66, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 67, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 68, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 69, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 70, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 71, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 72, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 73, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 74, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 75, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 76, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 77, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 78, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 79, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 80, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 81, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 82, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 83, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 84, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 85, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 86, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 87, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 88, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 89, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 90, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 91, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 92, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 93, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 94, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 95, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 96, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 97, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 98, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 99, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 100, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 101, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 102, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 103, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 104, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 105, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 106, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 107, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 108, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE, FALSE }, - { 109, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 110, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 111, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 112, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 113, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 114, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 115, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 116, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 117, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 118, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 119, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 120, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 121, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 122, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 123, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 124, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 125, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 126, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 127, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 128, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, TRUE, FALSE }, - { 129, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 130, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 131, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 132, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 133, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 134, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 135, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 136, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 137, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 138, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 139, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 140, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 141, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 142, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 143, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 144, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 145, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 146, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 147, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 148, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 149, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 150, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 151, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 152, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 153, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 154, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 155, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 156, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 157, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 158, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 159, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 160, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 161, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 162, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 163, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 164, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 165, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 166, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 167, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 168, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 169, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 170, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 171, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 172, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 173, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 174, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 175, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 176, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 177, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 178, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 179, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 180, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 181, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 182, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 183, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 184, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 185, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 186, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 187, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 188, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 189, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 190, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 191, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 192, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 193, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 194, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 195, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 196, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 197, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 198, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 199, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 200, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 201, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 202, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 203, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 204, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 205, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 206, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 207, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 208, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 209, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 210, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 211, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 212, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 213, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 214, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 215, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 216, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 217, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 218, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 219, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 220, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 221, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 222, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 223, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 224, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 225, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 226, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 227, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 228, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 229, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 230, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 231, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 232, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 233, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 234, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 235, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 236, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE, FALSE }, - { 237, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 238, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 239, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 240, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 241, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 242, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 243, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 244, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 245, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 246, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 247, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 248, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 249, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 250, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 251, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 252, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 253, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 254, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 255, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE }, - { 256, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, TRUE, FALSE, FALSE } }; + { { 1, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, FALSE }, + { 2, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, FALSE, FALSE }, + { 3, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 4, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 5, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 6, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 7, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 8, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 9, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 10, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 11, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 12, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 13, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 14, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 15, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 16, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 17, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 18, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 19, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 20, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 21, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 22, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 23, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 24, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 25, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 26, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 27, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 28, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 29, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 30, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 31, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 32, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 33, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, FALSE }, + { 34, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, FALSE, FALSE }, + { 35, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 36, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 37, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 38, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 39, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 40, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 41, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 42, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 43, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 44, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 45, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 46, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 47, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 48, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 49, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 50, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 51, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 52, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 53, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 54, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 55, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 56, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 57, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 58, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 59, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 60, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 61, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 62, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 63, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 64, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__NO_FLAGS_SET, TRUE, FALSE }, + { 65, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 66, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 67, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 68, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 69, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 70, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 71, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 72, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 73, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 74, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 75, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 76, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 77, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 78, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 79, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 80, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 81, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 82, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 83, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 84, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 85, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 86, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 87, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 88, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 89, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 90, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 91, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 92, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 93, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 94, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 95, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 96, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 97, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 98, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 99, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 100, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 101, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 102, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 103, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 104, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 105, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 106, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 107, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 108, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE }, + { 109, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 110, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 111, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 112, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 113, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 114, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 115, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 116, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 117, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 118, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 119, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 120, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 121, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 122, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 123, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 124, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 125, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 126, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 127, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 128, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE }, + { 129, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 130, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 131, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 132, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 133, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 134, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 135, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 136, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 137, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 138, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 139, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 140, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 141, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 142, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 143, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 144, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 145, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 146, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 147, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 148, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 149, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 150, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 151, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 152, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 153, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 154, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 155, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 156, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 157, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 158, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 159, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 160, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 161, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 162, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 163, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 164, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 165, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 166, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 167, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 168, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 169, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 170, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 171, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 172, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 173, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 174, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 175, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 176, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 177, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 178, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 179, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 180, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 181, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 182, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 183, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 184, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 185, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 186, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 187, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 188, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 189, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 190, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 191, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 192, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 193, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 194, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 195, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 196, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 197, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 198, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 199, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 200, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 201, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 202, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 203, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 204, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 205, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 206, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 207, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 208, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 209, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 210, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 211, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 212, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 213, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 214, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 215, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 216, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 217, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 218, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 219, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 220, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 221, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 222, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 223, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 224, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 225, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 226, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 227, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 228, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 229, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 230, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 231, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 232, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 233, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 234, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 235, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 236, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 237, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 238, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 239, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 240, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 241, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 242, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 243, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 244, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 245, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 246, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 247, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 248, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 249, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 250, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 251, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 252, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 253, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 254, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 255, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE }, + { 256, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE } }; i = 0; while ( ( pass ) && ( i < 256 ) ) @@ -12279,14 +12316,14 @@ check_flush_cache__single_entry(H5F_t * file_ptr) /* test_num */ spec[i].test_num, /* entry_type */ spec[i].entry_type, /* entry_idx */ spec[i].entry_idx, + /* dirty_flag */ spec[i].dirty_flag, /* mark_dirty */ spec[i].mark_dirty, /* pop_mark_dirty_prot */ spec[i].pop_mark_dirty_prot, /* pop_mark_dirty_pinned */ spec[i].pop_mark_dirty_pinned, /* unprotect_unpin */ spec[i].unprotect_unpin, /* flags */ spec[i].flags, /* flush_flags */ spec[i].flush_flags, - /* expected_cleared */ spec[i].expected_cleared, - /* expected_flushed */ spec[i].expected_flushed, + /* expected_serialized */ spec[i].expected_serialized, /* expected_destroyed */ spec[i].expected_destroyed ); i++; @@ -12321,9 +12358,8 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, hbool_t insert_flag, unsigned int flags, unsigned int flush_flags, - hbool_t expected_loaded, - hbool_t expected_cleared, - hbool_t expected_flushed, + hbool_t expected_deserialized, + hbool_t expected_serialized, hbool_t expected_destroyed) { H5C_t * cache_ptr = file_ptr->shared->cache; @@ -12378,7 +12414,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -12388,21 +12424,17 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, flush_flags, test_num); failure_mssg = msg; } - else if ( ( entry_ptr->loaded != expected_loaded ) || - ( entry_ptr->cleared != expected_cleared ) || - ( entry_ptr->flushed != expected_flushed ) || + else if ( ( entry_ptr->deserialized != expected_deserialized ) || + ( entry_ptr->serialized != expected_serialized ) || ( entry_ptr->destroyed != expected_destroyed ) ) { - #if 0 /* This is useful debugging code -- lets keep it for a while */ HDfprintf(stdout, - "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->loaded), - (int)expected_loaded, - (int)(entry_ptr->cleared), - (int)expected_cleared, - (int)(entry_ptr->flushed), - (int)expected_flushed, + "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)expected_deserialized, + (int)(entry_ptr->serialized), + (int)expected_serialized, (int)(entry_ptr->destroyed), (int)expected_destroyed); #endif @@ -12441,8 +12473,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, /* clean up the cache to prep for the next test */ if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -12463,10 +12494,9 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, } else { - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; } } @@ -12503,19 +12533,19 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, int test_num, int entry_type, int entry_idx, + hbool_t unprot_dirty_flag, hbool_t mark_dirty, hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned, hbool_t unprotect_unpin, unsigned int flags, unsigned int flush_flags, - hbool_t expected_cleared, - hbool_t expected_flushed, + hbool_t expected_serialized, hbool_t expected_destroyed) { H5C_t * cache_ptr = file_ptr->shared->cache; static char msg[128]; - hbool_t expected_loaded = TRUE; + hbool_t expected_deserialized = TRUE; herr_t result; test_entry_t * base_addr; test_entry_t * entry_ptr = NULL; @@ -12559,7 +12589,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, mark_entry_dirty(entry_type, entry_idx); } - unprotect_entry(file_ptr, entry_type, entry_idx, (flags | H5C__PIN_ENTRY_FLAG)); + unprotect_entry(file_ptr, entry_type, entry_idx, + (unprot_dirty_flag ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) | + (flags | H5C__PIN_ENTRY_FLAG)); if ( mark_dirty ) { @@ -12574,8 +12606,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -12585,19 +12616,16 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, flush_flags, test_num); failure_mssg = msg; } - else if ( ( entry_ptr->loaded != expected_loaded ) || - ( entry_ptr->cleared != expected_cleared ) || - ( entry_ptr->flushed != expected_flushed ) || + else if ( ( entry_ptr->deserialized != expected_deserialized ) || + ( entry_ptr->serialized != expected_serialized ) || ( entry_ptr->destroyed != expected_destroyed ) ) { #if 0 /* this is useful debugging code -- keep it around */ HDfprintf(stdout, - "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->loaded), - (int)expected_loaded, - (int)(entry_ptr->cleared), - (int)expected_cleared, - (int)(entry_ptr->flushed), - (int)expected_flushed, + "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)expected_deserialized, + (int)(entry_ptr->serialized), + (int)expected_serialized, (int)(entry_ptr->destroyed), (int)expected_destroyed); #endif @@ -12641,7 +12669,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, protect_entry(file_ptr, entry_type, entry_idx); unprotect_entry(file_ptr, entry_type, entry_idx, - (flags & H5C__DIRTIED_FLAG) | H5C__UNPIN_ENTRY_FLAG); + (unprot_dirty_flag ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) | + H5C__UNPIN_ENTRY_FLAG); } else { @@ -12652,8 +12681,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, if ( pass ) { - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__FLUSH_INVALIDATE_FLAG); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -12674,10 +12702,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, } else { - entry_ptr->loaded = FALSE; - entry_ptr->cleared = FALSE; - entry_ptr->flushed = FALSE; - entry_ptr->destroyed = FALSE; + entry_ptr->deserialized = FALSE; + entry_ptr->serialized = FALSE; + entry_ptr->destroyed = FALSE; } } @@ -12982,9 +13009,8 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 1."); failure_mssg = msg; - } else if ( ( entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -13024,10 +13050,9 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 2."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || - ( entry_ptr->destroyed ) ) { + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || + ( entry_ptr->destroyed ) ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry history 2."); @@ -13037,7 +13062,7 @@ check_expunge_entry(void) } /* Expunge the entry and then verify that it is no longer in the cache. - * Also verify that the entry was loaded, cleared, and destroyed, but + * Also verify that the entry was loaded and destroyed, but * not flushed. */ if ( pass ) { @@ -13068,10 +13093,9 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 3."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( ! entry_ptr->cleared ) || - ( entry_ptr->flushed ) || - ( ! entry_ptr->destroyed ) ) { + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || + ( ! entry_ptr->destroyed ) ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry history 3."); @@ -13110,9 +13134,8 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 4."); failure_mssg = msg; - } else if ( ( entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -13153,9 +13176,8 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 5."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -13166,7 +13188,7 @@ check_expunge_entry(void) } /* Expunge the entry and then verify that it is no longer in the cache. - * Also verify that the entry was loaded, cleared and destroyed, but not + * Also verify that the entry was loaded and destroyed, but not * flushed. */ if ( pass ) { @@ -13198,9 +13220,8 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 6."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( ! entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -13795,8 +13816,23 @@ check_move_entry__run_test(H5F_t * file_ptr, test_entry_t * entry_ptr = NULL; H5C_cache_entry_t * test_ptr = NULL; - assert( cache_ptr ); - assert( spec_ptr ); + if ( cache_ptr == NULL ) { + + pass = FALSE; + HDsnprintf(msg, (size_t)128, + "cache_ptr NULL on entry to move test #%d.", + test_num); + failure_mssg = msg; + + } else if ( spec_ptr == NULL ) { + + pass = FALSE; + HDsnprintf(msg, (size_t)128, + "spec_ptr NULL on entry to move test #%d.", + test_num); + failure_mssg = msg; + + } if ( pass ) { @@ -14147,9 +14183,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 1."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14171,9 +14206,9 @@ check_resize_entry(void) } else { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14228,9 +14263,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 2."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14258,9 +14292,9 @@ check_resize_entry(void) } else { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14315,9 +14349,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 3."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14384,9 +14417,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 4."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14445,9 +14477,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 5."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14485,9 +14516,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 6."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( ! entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -14600,9 +14630,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 7."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14624,9 +14653,9 @@ check_resize_entry(void) } else { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14683,9 +14712,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 8."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14713,9 +14741,9 @@ check_resize_entry(void) } else { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14770,9 +14798,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 9."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14841,9 +14868,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 10."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14902,9 +14928,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 11."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( entry_ptr->destroyed ) ) { pass = FALSE; @@ -14942,9 +14967,8 @@ check_resize_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected status 12."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( ! entry_ptr->cleared ) || - ( entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15239,9 +15263,8 @@ check_evictions_enabled(void) HDsnprintf(msg, (size_t)128, "Unexpected status 1."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( ! entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15306,9 +15329,8 @@ check_evictions_enabled(void) HDsnprintf(msg, (size_t)128, "Unexpected status 2."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( ! entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15526,9 +15548,8 @@ check_evictions_enabled(void) HDsnprintf(msg, (size_t)128, "Unexpected status 3."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( ! entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15562,9 +15583,8 @@ check_evictions_enabled(void) HDsnprintf(msg, (size_t)128, "Unexpected status 4."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( ! entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15697,9 +15717,8 @@ check_evictions_enabled(void) HDsnprintf(msg, (size_t)128, "Unexpected status 5."); failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( ! entry_ptr->flushed ) || + } else if ( ( ! entry_ptr->deserialized ) || + ( entry_ptr->serialized ) || ( ! entry_ptr->destroyed ) ) { pass = FALSE; @@ -15791,8 +15810,7 @@ check_flush_protected_err(void) protect_entry(file_ptr, 0, 0); - if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__NO_FLAGS_SET) >= 0 ) { + if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET) >= 0 ) { pass = FALSE; failure_mssg = "flush succeeded on cache with protected entry.\n"; @@ -15801,8 +15819,7 @@ check_flush_protected_err(void) unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG); - if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - H5C__NO_FLAGS_SET) < 0 ) { + if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET) < 0 ) { pass = FALSE; failure_mssg = "flush failed after unprotect.\n"; @@ -15871,7 +15888,7 @@ check_destroy_pinned_err(void) protect_entry(file_ptr, 0, 0); unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG); - if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) { + if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) { pass = FALSE; failure_mssg = "destroy succeeded on cache with pinned entry.\n"; @@ -15880,7 +15897,7 @@ check_destroy_pinned_err(void) unpin_entry(0, 0); - if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) { + if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0 ) { pass = FALSE; failure_mssg = "destroy failed after unpin.\n"; @@ -15957,7 +15974,7 @@ check_destroy_protected_err(void) protect_entry(file_ptr, 0, 0); - if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) { + if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) { pass = FALSE; failure_mssg = "destroy succeeded on cache with protected entry.\n"; @@ -15966,7 +15983,7 @@ check_destroy_protected_err(void) unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG); - if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) { + if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0 ) { pass = FALSE; failure_mssg = "destroy failed after unprotect.\n"; @@ -16050,8 +16067,9 @@ check_duplicate_insert_err(void) base_addr = entries[0]; entry_ptr = &(base_addr[0]); - result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET); + result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__NO_FLAGS_SET); if ( result >= 0 ) { @@ -16227,9 +16245,9 @@ check_double_pin_err(void) if ( pass ) { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__PIN_ENTRY_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__PIN_ENTRY_FLAG); if ( result > 0 ) { @@ -16312,9 +16330,9 @@ check_double_unpin_err(void) if ( pass ) { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__UNPIN_ENTRY_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG); if ( result > 0 ) { @@ -16513,8 +16531,9 @@ check_double_protect_err(void) if ( pass ) { - cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET); + cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + &entry_ptr->addr, H5C__NO_FLAGS_SET); if ( cache_entry_ptr != NULL ) { @@ -16592,9 +16611,9 @@ check_double_unprotect_err(void) if ( pass ) { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__NO_FLAGS_SET); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__NO_FLAGS_SET); if ( result > 0 ) { @@ -16757,7 +16776,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, + result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET); if ( result > 0 ) { @@ -16775,7 +16794,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, + result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET); if ( result > 0 ) { @@ -16793,7 +16812,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, + result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET); if ( result < 0 ) { @@ -16969,9 +16988,9 @@ check_unprotect_ro_dirty_err(void) if ( pass ) { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result >= 0 ) { @@ -17013,9 +17032,9 @@ check_unprotect_ro_dirty_err(void) if ( pass ) { - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__DIRTIED_FLAG); + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result > 0 ) { @@ -17099,8 +17118,9 @@ check_protect_ro_rw_err(void) if ( pass ) { - thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET); + thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->addr, + &entry_ptr->addr, H5C__NO_FLAGS_SET); if ( thing_ptr != NULL ) { @@ -20402,10 +20422,6 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - if ( pass ) { - - takedown_cache(file_ptr, FALSE, FALSE); - } /* now test the flash cache size increment code. At least at present, * there should be no interaction between the regular auto-resize @@ -20420,18 +20436,18 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* allocate a cache, enable the flash cache size increase code, and - * then force the flash size increase code through all its operational - * modes. Verify that all performs as expected. + /* Place the cache in a known state via a flush-destroy on the cache + * to clear out all entries, and then a reset on all the entries. + * Then configure the cache for the flash cache size increase tests, + * and force the flash size increase code through all its operational + * modes. Verify that all perform as expected. */ if ( pass ) { - reset_entries(); + flush_cache(file_ptr, TRUE, FALSE, FALSE); - file_ptr = setup_cache((size_t)(2 * 1024), - (size_t)(1 * 1024)); - cache_ptr = file_ptr->shared->cache; + reset_entries(); } if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); @@ -27913,10 +27929,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) int32_t entry_idx = 0; int32_t i; - /* Expected loaded status of entries depends on how they get into - * the cache. Insertions = not loaded, protect/unprotect = loaded. + /* Expected deserialized status of entries depends on how they get into + * the cache. Insertions = not deserialized, protect/unprotect = deserialized. */ - hbool_t loaded = (hbool_t)!(fill_via_insertion); + hbool_t deserialized = (hbool_t)!(fill_via_insertion); /* Set up the expected array. This is used to maintain a table of the * expected status of every entry used in this test. @@ -27924,157 +27940,157 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) struct expected_entry_status expected[150] = { /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: order: */ - { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type: par idx: dep ref.count: dep height: order: */ + { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } }; pass = TRUE; @@ -28167,7 +28183,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) */ expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; - expected[entry_idx].loaded = (unsigned char)loaded; + expected[entry_idx].deserialized = (unsigned char)deserialized; verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ entry_idx, /* int tag */ @@ -28231,13 +28247,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) */ /* entry w/ index 0 has now been flushed and is now clean. */ - expected[0].flushed = TRUE; expected[0].is_dirty = FALSE; + expected[0].serialized = TRUE; /* entry w/ index 26 is now in the cache and dirty. */ expected[26].in_cache = TRUE; expected[26].is_dirty = TRUE; - expected[26].loaded = (unsigned char)loaded; + expected[26].deserialized = (unsigned char)deserialized; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28285,13 +28301,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) */ /* entry w/ index 1 has now been flushed and is now clean. */ - expected[1].flushed = TRUE; expected[1].is_dirty = FALSE; + expected[1].serialized = TRUE; /* entry w/ index 27 is now in the cache and dirty. */ expected[27].in_cache = TRUE; expected[27].is_dirty = TRUE; - expected[27].loaded = (unsigned char)loaded; + expected[27].deserialized = (unsigned char)deserialized; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28331,12 +28347,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) * entry currently getting inserted is now in the cache and * dirty. */ - expected[entry_idx - 26].flushed = TRUE; expected[entry_idx - 26].is_dirty = FALSE; + expected[entry_idx - 26].serialized = TRUE; expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; - expected[entry_idx].loaded = (unsigned char)loaded; + expected[entry_idx].deserialized = (unsigned char)deserialized; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28411,15 +28427,15 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) expected[0].destroyed = TRUE; /* entries w/ indices 24,25 have now been flushed and are clean. */ - expected[24].flushed = TRUE; expected[24].is_dirty = FALSE; - expected[25].flushed = TRUE; + expected[24].serialized = TRUE; expected[25].is_dirty = FALSE; + expected[25].serialized = TRUE; /* entry w/ index 50 is now in the cache and dirty */ expected[50].in_cache = TRUE; expected[50].is_dirty = TRUE; - expected[50].loaded = (unsigned char)loaded; + expected[50].deserialized = (unsigned char)deserialized; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28464,7 +28480,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) /* This past inserted entry is now in the cache and dirty */ expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; - expected[entry_idx].loaded = (unsigned char)loaded; + expected[entry_idx].deserialized = (unsigned char)deserialized; /* The entry inserted 50 insertions ago has been evicted */ expected[entry_idx - 50].in_cache = FALSE; @@ -28476,8 +28492,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) * 25 insertions ago. */ if (entry_idx < 75) { - expected[entry_idx - 25].flushed = TRUE; expected[entry_idx - 25].is_dirty = FALSE; + expected[entry_idx - 25].serialized = TRUE; } /* If the newly inserted entry is among the last * 25 insertions in this loop, then the insertion will @@ -28488,8 +28504,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) * flush-then-evict, it switches to evict-then-flush. */ else { - expected[entry_idx - 26].flushed = TRUE; expected[entry_idx - 26].is_dirty = FALSE; + expected[entry_idx - 26].serialized = TRUE; } /* Verify this expected status */ @@ -28551,8 +28567,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) /* entries w/ indices 74-99 have been flushed. */ for (i = 74; i < 100; i++) { - expected[i].flushed = TRUE; expected[i].is_dirty = FALSE; + expected[i].serialized = TRUE; } verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ 0, /* int tag */ @@ -28595,7 +28611,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) /* This past inserted entry is now in the cache and dirty */ expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; - expected[entry_idx].loaded = (unsigned char)loaded; + expected[entry_idx].deserialized = (unsigned char)deserialized; /* The entry with ID minus 50 will have been evicted */ expected[entry_idx - 50].in_cache = FALSE; @@ -28645,13 +28661,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) expected[76].destroyed = TRUE; /* entry w/ index 100 has now been flushed and is now clean. */ - expected[100].flushed = TRUE; expected[100].is_dirty = FALSE; + expected[100].serialized = TRUE; /* entry w/ index 26 is now in the cache and dirty. */ expected[126].in_cache = TRUE; expected[126].is_dirty = TRUE; - expected[126].loaded = (unsigned char)loaded; + expected[126].deserialized = (unsigned char)deserialized; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28689,15 +28705,15 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) /* This past inserted entry is now in the cache and dirty */ expected[entry_idx].in_cache = TRUE; expected[entry_idx].is_dirty = TRUE; - expected[entry_idx].loaded = (unsigned char)loaded; + expected[entry_idx].deserialized = (unsigned char)deserialized; /* The entry with ID minus 50 will have been evicted */ expected[entry_idx - 50].in_cache = FALSE; expected[entry_idx - 50].destroyed = TRUE; /* The entry with ID minus 26 will now be clean */ - expected[entry_idx - 26].flushed = TRUE; expected[entry_idx - 26].is_dirty = FALSE; + expected[entry_idx - 26].serialized = TRUE; /* verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -28712,7 +28728,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion) HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); - if ( pass ) { + if ( cache_ptr ) { /* We're done with testing. We can take down the cache. */ takedown_cache(file_ptr, FALSE, FALSE); @@ -28754,12 +28770,12 @@ check_flush_deps(void) struct expected_entry_status expected[5] = { /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: order: */ - { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type: par idx: dep ref.count: dep height: order: */ + { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } }; TESTING("flush dependencies"); @@ -30793,12 +30809,12 @@ check_flush_deps_order(void) struct expected_entry_status expected[5] = { /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: order: */ - { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type: par idx: dep ref.count: dep height: order: */ + { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } }; unsigned flush_order; /* Index for tracking flush order */ @@ -30881,25 +30897,25 @@ check_flush_deps_order(void) /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 1; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; /* Verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -30979,27 +30995,27 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 1, FALSE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 1; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 0; /* Verify the status */ @@ -31090,31 +31106,31 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 2, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 1; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 2; expected[2].is_protected = FALSE; @@ -31211,32 +31227,32 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 2, FALSE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 2; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 0; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 1; /* Verify the status */ @@ -31388,37 +31404,37 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 3, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 1; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 2; expected[2].is_protected = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 3; expected[3].is_protected = FALSE; @@ -31613,39 +31629,39 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 3, FALSE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 3; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 2; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 1; expected[2].is_protected = FALSE; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 0; /* Verify the status */ @@ -31784,41 +31800,41 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 4, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; - expected[4].flushed = FALSE; + expected[4].serialized = FALSE; expected[4].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 1; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 2; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 3; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; expected[4].flush_order = 4; expected[4].is_protected = FALSE; @@ -31920,42 +31936,42 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 4, FALSE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; - expected[4].flushed = FALSE; + expected[4].serialized = FALSE; expected[4].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 4; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 0; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 1; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 2; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; expected[4].flush_order = 3; /* Verify the status */ @@ -32118,42 +32134,42 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 4, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; - expected[4].flushed = FALSE; + expected[4].serialized = FALSE; expected[4].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 2; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 3; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 0; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; expected[4].flush_order = 1; expected[4].is_protected = FALSE; @@ -32369,44 +32385,44 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 4, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; - expected[4].flushed = FALSE; + expected[4].serialized = FALSE; expected[4].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 3; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 4; expected[2].is_protected = FALSE; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 1; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; expected[4].flush_order = 2; expected[4].is_protected = FALSE; @@ -32636,44 +32652,44 @@ check_flush_deps_order(void) dirty_entry(file_ptr, entry_type, 4, TRUE); if ( !pass ) CACHE_ERROR("dirty_entry failed") - /* Reset 'flushed' flag & 'flush_order' value in expected array */ - expected[0].flushed = FALSE; + /* Reset 'serialized' flag & 'flush_order' value in expected array */ + expected[0].serialized = FALSE; expected[0].flush_order = -1; - expected[1].flushed = FALSE; + expected[1].serialized = FALSE; expected[1].flush_order = -1; - expected[2].flushed = FALSE; + expected[2].serialized = FALSE; expected[2].flush_order = -1; - expected[3].flushed = FALSE; + expected[3].serialized = FALSE; expected[3].flush_order = -1; - expected[4].flushed = FALSE; + expected[4].serialized = FALSE; expected[4].flush_order = -1; /* Reset index for tracking flush order */ flush_order = 0; - result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices") /* Change expected values, and verify the status of the entries * after destroy flush dependency */ expected[0].is_dirty = FALSE; - expected[0].flushed = TRUE; + expected[0].serialized = TRUE; expected[0].flush_order = 0; expected[0].is_protected = FALSE; expected[1].is_dirty = FALSE; - expected[1].flushed = TRUE; + expected[1].serialized = TRUE; expected[1].flush_order = 2; expected[1].is_protected = FALSE; expected[2].is_dirty = FALSE; - expected[2].flushed = TRUE; + expected[2].serialized = TRUE; expected[2].flush_order = 4; expected[2].is_protected = FALSE; expected[3].is_dirty = FALSE; - expected[3].flushed = TRUE; + expected[3].serialized = TRUE; expected[3].flush_order = 1; expected[4].is_dirty = FALSE; - expected[4].flushed = TRUE; + expected[4].serialized = TRUE; expected[4].flush_order = 3; expected[4].is_protected = FALSE; @@ -32802,13 +32818,13 @@ check_notify_cb(void) unsigned u; /* Local index variable */ struct expected_entry_status expected[5] = { - /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: order: */ - { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, - { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type: par idx: dep ref.count: dep height: order: */ + { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } }; TESTING("'notify' callback"); @@ -32859,11 +32875,11 @@ check_notify_cb(void) if ( !pass ) CACHE_ERROR("expunge_entry failed") /* Change expected values, and verify the status of the entries - * after each insertion + * after each expunge */ expected[u].in_cache = FALSE; - expected[u].is_dirty = FALSE; - expected[u].cleared = TRUE; + expected[u].is_dirty = TRUE; + expected[u].serialized = FALSE; expected[u].destroyed = TRUE; /* Verify the status */ @@ -32892,7 +32908,7 @@ check_notify_cb(void) expected[u].in_cache = TRUE; expected[u].is_dirty = FALSE; expected[u].is_protected = TRUE; - expected[u].loaded = TRUE; + expected[u].deserialized = TRUE; /* Verify the status */ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */ @@ -32942,11 +32958,11 @@ check_notify_cb(void) if ( !pass ) CACHE_ERROR("expunge_entry failed") /* Change expected values, and verify the status of the entries - * after each insertion + * after each expunge */ expected[u].in_cache = FALSE; - expected[u].is_dirty = FALSE; - expected[u].cleared = TRUE; + expected[u].is_dirty = TRUE; + expected[u].serialized = FALSE; expected[u].destroyed = TRUE; /* Verify the status */ @@ -32979,16 +32995,2076 @@ done: /*------------------------------------------------------------------------- - * Function: main + * Function: check_entry_deletions_during_scans() * - * Purpose: Run tests on the cache code contained in H5C.c + * Purpose: With the addition of the H5C__TAKE_OWNERSHIP_FLAG, it is + * possible for an entry to be removed from the cache as a + * side effect of flushing an entry. * - * Return: Success: + * For the most part, this doesn't cause problems. However, + * during the scans of lists, it is possible that the entry + * removed will be the next entry in the scan -- which if not + * detected, will typeically cause the cache to attempt to flush + * an entry that is no longer in the cache, and which may have + * been deleted. * - * Failure: + * This function contans tests for correct handling on this + * situation. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void * * Programmer: John Mainzer - * 6/24/04 + * 4/3/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +static unsigned +check_entry_deletions_during_scans(void) +{ + H5F_t * file_ptr = NULL; + + TESTING("entry deletion during list scan detection and adaption"); + + pass = TRUE; + + /* allocate a cache, and flush it under various circumstances. + * To the extent possible, verify that the desired actions took + * place. + */ + + if ( pass ) { + + reset_entries(); + + file_ptr = setup_cache((size_t)(2 * 1024 * 1024), + (size_t)(1 * 1024 * 1024)); + } + + /* run the tests. This set of tests is somewhat eclectic, as + * we are trying to test all locations where the deletion of + * an entry from the cache as a side effect of the fluch of + * a different entry could cause problems. + */ + + if ( pass ) { + + cedds__expunge_dirty_entry_in_flush_test(file_ptr); + } + + if ( pass ) { + + cedds__H5C_make_space_in_cache(file_ptr); + } + + if ( pass ) { + + cedds__H5C__autoadjust__ageout__evict_aged_out_entries(file_ptr); + } + + if ( pass ) { + + cedds__H5C_flush_invalidate_cache__bucket_scan(file_ptr); + } + + + if ( pass ) { + + takedown_cache(file_ptr, FALSE, FALSE); + } + + if ( pass ) { PASSED(); } else { H5_FAILED(); } + + if ( ! pass ) { + + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", + FUNC, failure_mssg); + } + + return (unsigned)!pass; + +} /* check_entry_deletions_during_scans() */ + + +/*------------------------------------------------------------------------- + * Function: cedds__expunge_dirty_entry_in_flush_test() + * + * Purpose: Verify that H5C_flush_cache() can handle the removal of + * a dirty entry from the cache during its scan of the + * skip list. + * + * Do this by setting up a full cache, with the last entry + * on the LRU being both dirty and having a flush operation + * that deletes the second to last entry on the LRU. Then + * flush the cache, triggering the flush of the last + * item, and thereby the deletion of the second to last item. + * + * H5C_flush_cache() should handle this deletion gracefully. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 4/4/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +static void +cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr) +{ + H5C_t * cache_ptr = file_ptr->shared->cache; + int i; + herr_t result; + struct expected_entry_status expected[36] = + { + /* the expected array is used to maintain a table of the expected status of every + * entry used in this test. Note that since the function that processes this + * array only processes as much of it as it is told to, we don't have to + * worry about maintaining the status of entries that we haven't used yet. + */ + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par idx: dep ref.count: dep height: order: */ + { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + }; + + if ( pass ) { + + if ( cache_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "cache_ptr NULL on entry to cedds expunge dirty entry in flush test."; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "cache not empty on entry to cedds expunge dirty entry in flush test."; + } + else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) || + ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { + + pass = FALSE; + failure_mssg = + "unexpected cache config at start of cedds expunge dirty entry in flush test."; + + } else { + + /* set min clean size to zero for this test as it simplifies + * computing the expected cache size after each operation. + */ + + cache_ptr->min_clean_size = 0; + } + } + + if ( pass ) { + + /* The basic idea of this test is to setup the cache such + * that: + * + * 1) the cache contains several dirty entries. + * + * 2) the first entry on the slist is dirty, and has a flush + * operation that will remove the second entry on the + * slist. + * + * Then load flush the cache. Cache should handle the + * removal of the next entry in the slist scan gracefully. + */ + + /* reset the stats before we start. If stats are enabled, we will + * check to see if they are as expected at the end. + */ + H5C_stats__reset(cache_ptr); + + + /* Load four huge entries into the cache. Recall that huge entries + * are one fourth the size of monster entries (16 KB vs. 64 KB). + */ + for ( i = 0; i < 4; i++ ) { + + protect_entry(file_ptr, HUGE_ENTRY_TYPE, i); + unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); + } + + if ( ( cache_ptr->index_len != 4 ) || + ( cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE) ) ) { + + pass = FALSE; + + failure_mssg = "unexpected size/len in cedds expunge dirty entry in flush test (1)"; + } + } + + if ( pass ) { + + /* Next, set up the flush operation: + * + * (HET, 0) expunges (HET, 1) + * + */ + add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, + HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL); + + } + + if ( pass ) { + + /* to summarize, at present the following entries + * are in cache with the following characteristics: + * + * in + * entry: cache? size: dirty? pinned? pins: flush operations: + * + * (HET, 0) Y 16 KB Y N - expunge (HET 1) + * + * (HET, 1) Y 16 KB Y N - - + * + * (HET, 2) Y 16 KB Y N - - + * + * (HET, 3) Y 16 KB Y N - - + * + * Recall that in this test bed, flush operations are excuted the + * first time the associated entry is flushed, and are then + * deleted. + */ + + /* verify the expected status of all entries we have loaded to date: */ + verify_entry_status(cache_ptr, 0, 4, expected); + } + + /* flush the cache to run the test. In the process, clean up after test. */ + + if ( pass ) { + + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + + if ( result < 0 ) { + + pass = FALSE; + failure_mssg = "Cache flush invalidate failed in cedds expunge dirty entry in flush test"; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache len/size after cedds expunge dirty entry in flush test"; + + } + } + +#if H5C_COLLECT_CACHE_STATS + /* If we are collecting stats, check to see if we get the expected + * values. + */ + if ( pass ) { + + if ( ( cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[HUGE_ENTRY_TYPE] != 1 ) || + ( cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3 ) || + ( cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4 ) || + ( cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected huge size entry stats in cedds__expunge_dirty_entry_in_flush_test()."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->slist_scan_restarts != 1 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test()."; + } + } +#endif /* H5C_COLLECT_CACHE_STATS */ + + if ( pass ) { + + reset_entries(); + } + + if ( pass ) { + + /* reset cache min clean size to its expected value */ + cache_ptr->min_clean_size = (1 * 1024 * 1024); + } + + return; + +} /* cedds__expunge_dirty_entry_in_flush_test() */ + + +/*------------------------------------------------------------------------- + * Function: cedds__H5C_make_space_in_cache() + * + * Purpose: Verify that H5C_make_space_in_cache() can handle the + * removal from the cache of the next item in its reverse scan + * of the LRU list. + * + * Do this by setting up a full cache, with the last entry + * on the LRU being both dirty and having a flush operation + * that deleted the second to last entry on the LRU. Then + * load an additional entry, triggering the flush of the last + * item, and thereby the deletion of the second to last item. + * + * H5C_make_space_in_cache() should detect this deletion, and + * restart its scan of the LRU from the tail, instead of + * examining the now deleted next item up on the LRU. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 4/4/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +static void +cedds__H5C_make_space_in_cache(H5F_t * file_ptr) +{ + H5C_t * cache_ptr = file_ptr->shared->cache; + int i; + const int num_huge_entries = 4; + const int num_monster_entries = 32; + herr_t result; + struct expected_entry_status expected[36] = + { + /* the expected array is used to maintain a table of the expected status of every + * entry used in this test. Note that since the function that processes this + * array only processes as much of it as it is told to, we don't have to + * worry about maintaining the status of entries that we haven't used yet. + */ + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par idx: dep ref.count: dep height: order: */ + { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + }; + + if ( pass ) { + + if ( cache_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "cache_ptr NULL on entry to cedds for H5C_make_space_in_cache() test."; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "cache not empty at start of flush ops eviction test."; + } + else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) || + ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { + + pass = FALSE; + failure_mssg = + "unexpected cache config at start of cedds H5C__make_space_in_cache() test."; + + } else { + + /* set min clean size to zero for this test as it simplifies + * computing the expected cache size after each operation. + */ + + cache_ptr->min_clean_size = 0; + } + } + + if ( pass ) { + + /* The basic idea of this test is to setup the cache such + * that: + * + * 1) the cache is full + * + * 2) the last entry on the LRU is dirty, and has a flush + * operation that will remove the second to last entry + * on the LRU from the cache. + * + * Then load another entry into the cache. See if + * H5C__make_space_in_cache() detects the removal of + * the next item in the scan, and restarts the scan + * from the bottom of the LRU. Note that the newly + * loaded entry must be large enough to require that + * the scan continue after the entry is expunged. + */ + + /* reset the stats before we start. If stats are enabled, we will + * check to see if they are as expected at the end. + */ + H5C_stats__reset(cache_ptr); + + + /* Load four huge entries into the cache. Recall that huge entries + * are one fourth the size of monster entries (16 KB vs. 64 KB). + */ + for ( i = 0; i < 4; i++ ) { + + protect_entry(file_ptr, HUGE_ENTRY_TYPE, i); + unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); + } + + if ( ( cache_ptr->index_len != 4 ) || + ( cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE) ) ) { + + pass = FALSE; + + failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (1)"; + } + } + + if ( pass ) { + + /* Next, set up the flush operation: + * + * (HET, 0) expunges (HET, 1) + * + */ + add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, + HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL); + + } + + if ( pass ) { + + /* to summarize, at present the following entries + * are in cache with the following characteristics: + * + * in + * entry: cache? size: dirty? pinned? pins: flush operations: + * + * (HET, 0) Y 16 KB Y N - expunge (HET 1) + * + * (HET, 1) Y 16 KB N N - - + * + * (HET, 2) Y 16 KB N N - - + * + * (HET, 3) Y 16 KB N N - - + * + * Recall that in this test bed, flush operations are excuted the + * first time the associated entry is flushed, and are then + * deleted. + */ + + /* Now fill up the cache with other, unrelated entries. Recall + * that the cache size is 2 MB and 31 * 64 KB + 4 * 16 KP == 2 MB. + */ + for ( i = 0; i < 31; i++ ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); + } + + /* The cache should now be exactly full */ + if ( ( cache_ptr->index_len != 35 ) || + ( cache_ptr->index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->index_size != ((4 * HUGE_ENTRY_SIZE) + + (31 * MONSTER_ENTRY_SIZE)) ) ) { + + pass = FALSE; + failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (2)"; + + } else { + + /* verify the expected status of all entries we have loaded to date: */ + verify_entry_status(cache_ptr, 0, 35, expected); + } + } + + if ( pass ) { + + /* now load another monster entry. This should cause + * H5C__make_space_in_cache() to be called. (HET 0) is dirty, and is at + * the bottom of the LRU. * Thus it will be flushed, and moved to the + * head of the LRU. However, during the flush, (HET 1) should be expunged + * from the cache. Since (MET 1) is the next item in + * H5C__make_space_in_cache(), must detect its removal from the cache, + * and refrain from trying to flush it. + * + * Since all entries in the cache are dirty, all entries will be flushed, + * and HET 0, 2, and 3 will be evicted to make room for the new + * monster entry (MET, 31). + * + * Verify this. If H5C_make_space_in_cache() chokes, failure will + * be detected in protect_entry(). Thus end the "if ( pass )" clause + * there so the error message will not be overwritten. + */ + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31); + } + + if ( pass ) { + + /* if the protect succeeded, unprotect and verify that all is at + * it should be. + */ + + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__DIRTIED_FLAG); + + /* The cache should now be exactly full */ + if ( ( cache_ptr->index_len != 32 ) || + ( cache_ptr->index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE) ) ) { + + pass = FALSE; + failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (3)"; + + } else { + + /* modify the expected table to match the new situation, and + * then call verify_entry_status(). + */ + for ( i = 0; i < num_huge_entries; i++ ) + { + expected[i].in_cache = FALSE; + expected[i].is_dirty = FALSE; + expected[i].serialized = TRUE; + expected[i].destroyed = TRUE; + } + + /* (HET, 1) was expunged, so touch its entry up accordingly */ + expected[1].is_dirty = TRUE; + expected[1].serialized = FALSE; + + for ( i = num_huge_entries; i < num_huge_entries + num_monster_entries - 1; i++ ) + { + expected[i].is_dirty = FALSE; + expected[i].serialized = TRUE; + } + + /* verify the expected status of all entries: */ + verify_entry_status(cache_ptr, 0, 36, expected); + } + } + + /* flush the cache and end the test. */ + + if ( pass ) { + + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + + if ( result < 0 ) { + + pass = FALSE; + failure_mssg = "Cache flush invalidate failed after flush op eviction test"; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test"; + + } + } + +#if H5C_COLLECT_CACHE_STATS + /* If we are collecting stats, check to see if we get the expected + * values. + */ + + if ( pass ) { + + if ( ( cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[HUGE_ENTRY_TYPE] != 1 ) || + ( cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3 ) || + ( cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4 ) || + ( cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected large entry stats in cedds__H5C_make_space_in_cache()."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry stats in cedds__H5C_make_space_in_cache()."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 1 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "unexpected scan restart stats in cedds__H5C_make_space_in_cache()."; + } + } +#endif /* H5C_COLLECT_CACHE_STATS */ + + if ( pass ) { + + reset_entries(); + } + + if ( pass ) { + + /* reset cache min clean size to its expected value */ + cache_ptr->min_clean_size = (1 * 1024 * 1024); + } + + return; + +} /* cedds__H5C_make_space_in_cache() */ + + +/*------------------------------------------------------------------------- + * Function: cedds__H5C__autoadjust__ageout__evict_aged_out_entries() + * + * Purpose: Verify that H5C__autoadjust__ageout__evict_aged_out_entries() + * can handle the removal from the cache of the next item in + * its reverse scan of the LRU list. + * + * Do this by setting up a full cache, with the last entry + * on the LRU being both dirty and having a flush operation + * that deletes the second to last entry on the LRU. Then + * access the first item in the LRU repeatedly until the + * item, and thereby the deletion of the second to last item. + * + * H5C_make_space_in_cache() should detect this deletion, and + * restart its scan of the LRU from the tail, instead of + * examining the now deleted next item up on the LRU. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 4/4/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +static void +cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr) +{ + H5C_t * cache_ptr = file_ptr->shared->cache; + int i; + herr_t result; + struct expected_entry_status expected[36] = + { + /* the expected array is used to maintain a table of the expected status of every + * entry used in this test. Note that since the function that processes this + * array only processes as much of it as it is told to, we don't have to + * worry about maintaining the status of entries that we haven't used yet. + */ + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par idx: dep ref.count: dep height: order: */ + { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 } + }; + H5C_auto_size_ctl_t saved_auto_size_ctl; + H5C_auto_size_ctl_t test_auto_size_ctl = + { + /* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn, + + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (2 * 1024 * 1024), + + /* double min_clean_fraction = */ 0.5f, + + /* size_t max_size = */ (8 * 1024 * 1024), + /* size_t min_size = */ (1 * 1024 * 1024), + + /* int64_t epoch_length = */ 1000, + + + /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + + /* double lower_hr_threshold = */ 0.75f, + + /* double increment = */ 2.0f, + + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024), + + /* enum H5C_cache_flash_incr_mode */ + /* flash_incr_mode = */ H5C_flash_incr__off, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, + + + /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, + + /* double upper_hr_threshold = */ 0.995f, + + /* double decrement = */ 0.5f, + + /* hbool_t apply_max_decrement = */ FALSE, + /* size_t max_decrement = */ (1 * 1024 * 1024), + + /* int32_t epochs_before_eviction = */ 1, + + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05f + }; + + if ( pass ) { + + if ( cache_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "cache_ptr NULL on entry to cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test."; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test."; + } + else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) || + ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { + + pass = FALSE; + failure_mssg = + "unexpected cache config at start of cedds H5C__autoadjust__ageout__evict_aged_out_entries() test."; + + } else { + + /* set min clean size to zero for this test as it simplifies + * computing the expected cache size after each operation. + */ + + cache_ptr->min_clean_size = 0; + } + } + + /* save the initial resize configuration so we can restore it later */ + if ( pass ) { + + saved_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER; + + result = H5C_get_cache_auto_resize_config(cache_ptr, + &saved_auto_size_ctl); + + if ( result != SUCCEED ) { + + pass = FALSE; + failure_mssg = "H5C_get_cache_auto_resize_config failed."; + + } + } + + /* set the resize configuration we will be using in the test */ + if ( pass ) { + + result = H5C_set_cache_auto_resize_config(cache_ptr, &test_auto_size_ctl); + + if ( result != SUCCEED ) { + + pass = FALSE; + failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n"; + } + } + + if ( pass ) { + + /* The basic idea of this test is to setup the cache such + * that: + * + * 1) the cache is full + * + * 2) the last entry on the LRU is dirty, and has a flush + * operation that will remove the second to last entry + * on the LRU from the cache. + * + * Then access the first item in the LRU until the epoch + * and H5C__autoadjust__ageout__evict_aged_out_entries() + * is invoked. Verify that the function deals with the + * deletion of the next item in its scan cleanly. + */ + + /* reset the stats before we start. If stats are enabled, we will + * check to see if they are as expected at the end. + */ + H5C_stats__reset(cache_ptr); + + + /* load the first entry -- mark it dirty */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG); + + /* Then load the rest of the entries to fill the cache: + * + * Recall that the cache size is 2 MB and 32 * 64 KB == 2 MB. + */ + for ( i = 1; i < 32; i++ ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET); + } + } + + if ( pass ) { + + /* Next, set up the flush operation: + * + * (MET, 0) expunges (MET, 1) + * + */ + add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, + MONSTER_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL); + + } + + if ( pass ) { + + /* to summarize, at present the following entries + * are in cache with the following characteristics: + * + * in + * entry: cache? size: dirty? pinned? pins: flush operations: + * + * (MET, 0) Y 64 KB Y N - expunge (MET 1) + * + * (MET, 1-31) Y 64 KB N N - - + * + * Recall that in this test bed, flush operations are excuted the + * first time the associated entry is flushed, and are then + * deleted. + */ + + /* The cache should now be exactly full */ + if ( ( cache_ptr->index_len != 32 ) || + ( cache_ptr->index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE) ) ) { + + pass = FALSE; + failure_mssg = "unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (1)"; + + } else { + + /* verify the expected status of all entries we have loaded to date: */ + verify_entry_status(cache_ptr, 0, 32, expected); + } + } + + /* protect and unprotect (MET, 31) repeatedly until the end of the first epoch */ + while ( ( pass ) && ( cache_ptr->cache_accesses > 0 ) ) { + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__NO_FLAGS_SET); + } + + /* at this point, an epoch marker entry should have been inserted into the LRU */ + + if ( pass ) { + + /* protect and unprotect (MET, 31) again to get cache_accesses > 0 */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__NO_FLAGS_SET); + } + + /* protect and unprotect (MET, 31) repeatedly until the end of the second epoch */ + while ( ( pass ) && ( cache_ptr->cache_accesses > 0 ) ) { + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__NO_FLAGS_SET); + } + + /* at this point, only (MET, 0) and (MET, 31) should remain in the cache, + * all other entries having been evicted by the ageout adaptive cache + * resizing algorithm. (Since (MET, 0) was dirty, it was flushed and + * moved to the head of the LRU by the ageout algorithm.) + */ + + if ( pass ) { + + if ( ( cache_ptr->index_len != 2 ) || + ( cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE ) ) { + + pass = FALSE; + failure_mssg = "unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (2)"; + + } else { + + /* update the expected table to reflect the expected values at + * this point, and then verify. + */ + + expected[0].is_dirty = FALSE; + expected[0].serialized = TRUE; + + for ( i = 1; i < 31; i++ ) + { + expected[i].in_cache = FALSE; + expected[i].is_dirty = FALSE; + expected[i].destroyed = TRUE; + } + + verify_entry_status(cache_ptr, 0, 32, expected); + } + } + + /* restore the initial resize configuration */ + if ( pass ) { + + saved_auto_size_ctl.set_initial_size = TRUE; + saved_auto_size_ctl.initial_size = 2 * 1024 * 1024; + + result = H5C_set_cache_auto_resize_config(cache_ptr, &saved_auto_size_ctl); + + if ( result != SUCCEED ) { + + pass = FALSE; + failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n"; + } + } + + /* flush the cache and end the test. */ + + if ( pass ) { + + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + + if ( result < 0 ) { + + pass = FALSE; + failure_mssg = "Cache flush invalidate failed after flush op eviction test"; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test"; + + } + } + +#if H5C_COLLECT_CACHE_STATS + /* If we are collecting stats, check to see if we get the expected + * values. + */ + + if ( pass ) { + + if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries()."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 1 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "unexpected scan restart stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries()."; + } + } +#endif /* H5C_COLLECT_CACHE_STATS */ + + if ( pass ) { + + reset_entries(); + } + + if ( pass ) { + + /* reset cache min clean size to its expected value */ + cache_ptr->min_clean_size = (1 * 1024 * 1024); + } + + return; + +} /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */ + + +/*------------------------------------------------------------------------- + * Function: cedds__H5C_flush_invalidate_cache__bucket_scan() + * + * Purpose: Verify that H5C_flush_invalidate_cache() can handle + * the removal from the cache of the next item in + * its scans of hash buckets. + * + * !!!!!!!!!! WARNING !!!!!!!!!! + * + * This test may fail to function correctly if the hash + * table size or hash function is altered. + * + * To setup the test, this function depends on the fact that + * H5C_flush_invalidate_cache() does alternating scans of the + * slist and the index. If this changes, the test will likely + * also cease to function correctly. + * + * The test relies on a known hash function and hash table + * size to select a set of test entries that will all hash + * to the same hash bucket -- call it the test hash bucket. + * It also relies on known behavior of the cache to place + * the entries in the test bucket in a known order. + * + * To avoid pre-mature flushes of the entries in the + * test hash bucket, all entries are initially clean, + * with the exception of the first entry which is dirty. + * It avoids premature flushing by being the parent in + * a flush dependency. The first entry in the test bucket + * also has a flush op which expunges the second entry -- + * setting up the failure. + * + * An additional dirty entry is added (which must hash + * to a different bucket, and must have a higher address + * than at least the first entry in the test hash bucket. + * This entry is the child in a flush dependency with the + * first entry in the above hash bucket, and contains + * a flush op to destroy this flush dependency. + * + * Since the first entry in the test hash bucket has a lower + * address that the other dirty entry, the scan of the + * slist encounters it first, and passes over it because + * it has a flush dependency height of 1. + * + * The scan then encounters the second dirty entry and flushes + * it -- causing it to destroy the flush dependency and thus + * reducing the flush dependency height of the first entry in + * the test hash bucket to zero. + * + * After completing a scan of the slist, + * H5C_flush_invalidate_cache() then scans the index, + * flushing all entries of flush dependency height zero. + * + * This sets up the potential error when the first entry + * in the test hash bucket is flushed -- expunging the + * second entry as a side effect. If + * H5C_flush_invalidate_cache() fails to detect this, + * it will attempt to continue its scan of the bucket with + * an entry that has been deleted from the cache. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 4/9/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +static void +cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr) +{ + H5C_t * cache_ptr = file_ptr->shared->cache; + int i; + int expected_hash_bucket = 0; + herr_t result; + haddr_t entry_addr; + test_entry_t * entry_ptr; + test_entry_t * base_addr = NULL; + struct H5C_cache_entry_t * scan_ptr; + struct expected_entry_status expected[5] = + { + /* the expected array is used to maintain a table of the expected status of every + * entry used in this test. Note that since the function that processes this + * array only processes as much of it as it is told to, we don't have to + * worry about maintaining the status of entries that we haven't used yet. + */ + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type: par idx: dep ref.count: dep height: order: */ + { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, -1, -1, {1,0,0,0,0,0}, 1, -1 }, + { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, -1, -1, {0,0,0,0,0,0}, 0, -1 }, + { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, MONSTER_ENTRY_TYPE, 0, {0,0,0,0,0,0}, 0, -1 } + }; + + if ( pass ) { + + if ( cache_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "cache_ptr NULL on entry to cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test."; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test."; + } + else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) || + ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { + + pass = FALSE; + failure_mssg = + "unexpected cache config at start of cedds H5C__autoadjust__ageout__evict_aged_out_entries() test."; + + } else { + + /* set min clean size to zero for this test as it simplifies + * computing the expected cache size after each operation. + */ + + cache_ptr->min_clean_size = 0; + } + } + + + if ( pass ) { + + /* reset the stats before we start. If stats are enabled, we will + * check to see if they are as expected at the end. + */ + + H5C_stats__reset(cache_ptr); + + + /* load one dirty and three clean entries that should hash to the + * same hash bucket. + */ + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG); + + for ( i = 8; i <= 24; i += 8 ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET); + } + } + + if ( pass ) { + + /* verify that the above entries hash to the same bucket */ + base_addr = entries[MONSTER_ENTRY_TYPE]; + entry_ptr = &(base_addr[0]); + entry_addr = entry_ptr->header.addr; + + HDassert(entry_addr == entry_ptr->addr); + + expected_hash_bucket = H5C__HASH_FCN(entry_addr); + + for ( i = 8; i <= 24; i += 8 ) { + + entry_ptr = &(base_addr[i]); + entry_addr = entry_ptr->header.addr; + + if ( expected_hash_bucket != H5C__HASH_FCN(entry_addr) ) { + + pass = FALSE; + failure_mssg = "Test entries don't map to same bucket -- hash table size or hash fcn change?"; + } + } + } + + if ( pass ) { + + /* setup the expunge flush operation: + * + * (MET, 0) expunges (MET, 8) + * + */ + add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, + MONSTER_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL); + } + + if ( pass ) { + + /* load the entry that will have a flush dependencey with (MET, 0), + * thus preventing it from being flushed on the first pass through + * the skip list. + */ + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__DIRTIED_FLAG); + } + + if ( pass ) { + + /* verify that the dirty entry doesn't map to the same + * hash bucket as the clean entries. + */ + + entry_ptr = &(base_addr[31]); + entry_addr = entry_ptr->header.addr; + + if ( expected_hash_bucket == H5C__HASH_FCN(entry_addr) ) { + + pass = FALSE; + failure_mssg = "Dirty entry maps to same hash bucket as clean entries?!?!"; + } + } + + if ( pass ) { + + /* Next, create the flush dependency requiring (MET, 31) to + * be flushed prior to (MET, 0). + */ + + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0); + create_flush_dependency(MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_TYPE, 31); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG); + + } + + if ( pass ) { + + /* Then, setup the flush operation to take down the flush + * dependency when (MET, 31) is flushed. + * + * (MET, 31) destroys flush dependency with (MET, 8) + * + */ + add_flush_op(MONSTER_ENTRY_TYPE, 31, FLUSH_OP__DEST_FLUSH_DEP, + MONSTER_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL); + + } + + if ( pass ) { + + /* verify the expected status of all entries we have loaded to date: */ + verify_entry_status(cache_ptr, 0, 5, expected); + } + + if ( pass ) { + + /* now do some protect / unprotect cycles to force the + * entries into the desired order in the hash bucket. + * Recall that entries are moved to the head of the + * hash bucket list on lookup. + */ + + for ( i = 24; i >= 0; i -= 8 ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET); + } + } + + if ( pass ) { + + /* scan the hash bucket to verify that the expected entries appear + * in the expected order. + */ + scan_ptr = cache_ptr->index[expected_hash_bucket]; + + i = 0; + + while ( ( pass ) && ( i <= 24 ) ) + { + entry_ptr = &(base_addr[i]); + + if ( scan_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "premature end of hash bucket list?!?!"; + + } else if ( ( scan_ptr == NULL ) || + ( scan_ptr != &(entry_ptr->header) ) ) { + + pass = FALSE; + failure_mssg = "bad test hash bucket setup?!?!"; + } + + if ( pass ) { + + scan_ptr = scan_ptr->ht_next; + i += 8; + } + } + } + + + /* test setup complete -- flush the cache to run and end the test. */ + + if ( pass ) { + + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + + if ( result < 0 ) { + + pass = FALSE; + failure_mssg = "Cache flush invalidate failed after flush op eviction test"; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test"; + + } + } + +#if H5C_COLLECT_CACHE_STATS + /* If we are collecting stats, check to see if we get the expected + * values. + */ + + if ( pass ) { + + if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 2 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 5 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry stats in cedds__H5C_flush_invalidate_cache__bucket_scan()."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 1 ) ) { + + pass = FALSE; + failure_mssg = "unexpected scan restart stats in cedds__H5C_flush_invalidate_cache__bucket_scan()."; + } + } +#endif /* H5C_COLLECT_CACHE_STATS */ + + if ( pass ) { + + reset_entries(); + } + + if ( pass ) { + + /* reset cache min clean size to its expected value */ + cache_ptr->min_clean_size = (1 * 1024 * 1024); + } + + return; + +} /* cedds__H5C_flush_invalidate_cache__bucket_scan() */ + + +/*------------------------------------------------------------------------- + * Function: check_stats() + * + * Purpose: If stats are enabled, conduct tests to verify correct + * functioning of the cache statistics collection code. + * + * Skip the test if stats are not enabled. + * + * At present this test is a shell -- fill it out at time + * permits. + * + * Return: void + * + * Programmer: John Mainzer + * 4/12/15 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +static unsigned +check_stats(void) +{ + +#if H5C_COLLECT_CACHE_STATS + + H5F_t * file_ptr = NULL; + +#endif /* H5C_COLLECT_CACHE_STATS */ + + TESTING("metadata cache statistics collection"); + +#if H5C_COLLECT_CACHE_STATS + + pass = TRUE; + + reset_entries(); + + file_ptr = setup_cache((size_t)(2 * 1024 * 1024), + (size_t)(1 * 1024 * 1024)); + + if ( pass ) { + + check_stats__smoke_check_1(file_ptr); + } + + + + if ( pass ) { + + takedown_cache(file_ptr, FALSE, FALSE); + } + + if ( pass ) { PASSED(); } else { H5_FAILED(); } + + if ( ! pass ) { + + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", + FUNC, failure_mssg); + } + +#else /* H5C_COLLECT_CACHE_STATS */ + + SKIPPED(); + + HDfprintf(stdout, " Statistics collection disabled.\n"); + +#endif /* H5C_COLLECT_CACHE_STATS */ + + return (unsigned)!pass; + +} /* check_stats() */ + + +/*------------------------------------------------------------------------- + * Function: check_stats__smoke_check_1() + * + * Purpose: Test to see if the statistics collection code is working + * more or less as expected. Do this by performing a number + * of operations in the cache, and checking to verify that + * they result in the expected statistics. + * + * Note that this function is not intended to be a full test + * of the statistics collection facility -- only a cursory + * check that will serve as a place holder until more complete + * tests are implemented. + * + * Do nothing if pass is FALSE on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 4/22/15 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ +#if H5C_COLLECT_CACHE_STATS +static void +check_stats__smoke_check_1(H5F_t * file_ptr) +{ + H5C_t * cache_ptr = file_ptr->shared->cache; + int i; + herr_t result; + + if ( pass ) { + + if ( cache_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "cache_ptr NULL on entry to check_stats__smoke_check_1()."; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "cache not empty on entry to check_stats__smoke_check_1()."; + } + else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) || + ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) { + + pass = FALSE; + failure_mssg = + "unexpected cache config at start of check_stats__smoke_check_1()."; + + } else { + + /* set min clean size to zero for this test as it simplifies + * computing the expected cache size after each operation. + */ + + cache_ptr->min_clean_size = 0; + } + } + + if ( pass ) { + + /* first fill the cache with monster entryies via insertion */ + + for ( i = 0; i < 32; i++ ) + + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET); + } + + if ( pass ) { + + if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(1)."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->total_ht_insertions != 32 ) || + ( cache_ptr->total_ht_deletions != 0 ) || + ( cache_ptr->successful_ht_searches != 0 ) || + ( cache_ptr->total_successful_ht_search_depth != 0 ) || + ( cache_ptr->failed_ht_searches != 32 ) || + ( cache_ptr->total_failed_ht_search_depth != 48 ) || + ( cache_ptr->max_index_len != 32 ) || + ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_clean_index_size != 0 ) || + ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_slist_len != 32 ) || + ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_pl_len != 0 ) || + ( cache_ptr->max_pl_size != 0 ) || + ( cache_ptr->max_pel_len != 0 ) || + ( cache_ptr->max_pel_size != 0 ) || + ( cache_ptr->calls_to_msic != 0 ) || + ( cache_ptr->total_entries_skipped_in_msic != 0 ) || + ( cache_ptr->total_entries_scanned_in_msic != 0 ) || + ( cache_ptr->max_entries_skipped_in_msic != 0 ) || + ( cache_ptr->max_entries_scanned_in_msic != 0 ) || + ( cache_ptr->entries_scanned_to_make_space != 0 ) || + ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1)."; + } + } + +#if H5C_COLLECT_CACHE_ENTRY_STATS + if ( pass ) { + + /* Note that most entry level stats are only updated on entry eviction */ + + if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000 ) || /* initial value */ + ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) || + ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1)."; + } + } +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ + + if ( pass ) { + + /* protect and unprotect each entry once. Note + * that all entries are already dirty, as they + * entered the cache via insertion + */ + + for ( i = 0; i < 32; i++ ) + { + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET); + } + } + + if ( pass ) { + + if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(2)."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->total_ht_insertions != 32 ) || + ( cache_ptr->total_ht_deletions != 0 ) || + ( cache_ptr->successful_ht_searches != 32 ) || + ( cache_ptr->total_successful_ht_search_depth != 96 ) || + ( cache_ptr->failed_ht_searches != 32 ) || + ( cache_ptr->total_failed_ht_search_depth != 48 ) || + ( cache_ptr->max_index_len != 32 ) || + ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_clean_index_size != 0 ) || + ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_slist_len != 32 ) || + ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_pl_len != 1 ) || + ( cache_ptr->max_pl_size != 64 * 1024 ) || + ( cache_ptr->max_pel_len != 0 ) || + ( cache_ptr->max_pel_size != 0 ) || + ( cache_ptr->calls_to_msic != 0 ) || + ( cache_ptr->total_entries_skipped_in_msic != 0 ) || + ( cache_ptr->total_entries_scanned_in_msic != 0 ) || + ( cache_ptr->max_entries_skipped_in_msic != 0 ) || + ( cache_ptr->max_entries_scanned_in_msic != 0 ) || + ( cache_ptr->entries_scanned_to_make_space != 0 ) || + ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2)."; + } + } + +#if H5C_COLLECT_CACHE_ENTRY_STATS + if ( pass ) { + + /* Note that most entry level stats are only updated on entry eviction */ + + if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000 ) || /* initial value */ + ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) || + ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2)."; + } + } +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ + + if ( pass ) { + + /* protect and unprotect an entry that is not currently + * in the cache. Since the cache is full and all entries + * are dirty, this will force a flush of each entry, and + * the eviction of (MET, 0). + */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 32); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 32, H5C__DIRTIED_FLAG); + } + + if ( pass ) { + + if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 33 ) || + ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(3)."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->total_ht_insertions != 33 ) || + ( cache_ptr->total_ht_deletions != 1 ) || + ( cache_ptr->successful_ht_searches != 65 ) || + ( cache_ptr->total_successful_ht_search_depth != 195 ) || + ( cache_ptr->failed_ht_searches != 33 ) || + ( cache_ptr->total_failed_ht_search_depth != 52 ) || + ( cache_ptr->max_index_len != 32 ) || + ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_clean_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_slist_len != 32 ) || + ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_pl_len != 1 ) || + ( cache_ptr->max_pl_size != 64 * 1024 ) || + ( cache_ptr->max_pel_len != 0 ) || + ( cache_ptr->max_pel_size != 0 ) || + ( cache_ptr->calls_to_msic != 1 ) || + ( cache_ptr->total_entries_skipped_in_msic != 0 ) || + ( cache_ptr->total_entries_scanned_in_msic != 33 ) || + ( cache_ptr->max_entries_skipped_in_msic != 0 ) || + ( cache_ptr->max_entries_scanned_in_msic != 33 ) || + ( cache_ptr->entries_scanned_to_make_space != 33 ) || + ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3)."; + } + } + +#if H5C_COLLECT_CACHE_ENTRY_STATS + if ( pass ) { + + /* Note that most entry level stats are only updated on entry eviction */ + + if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) || + ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(3)."; + } + } +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ + + if ( pass ) { + + /* protect and unprotect dirty (MET, 1), and then flush destroy + * the cache. + */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG); + } + + /* flush the cache to end the test and collect all entry stats */ + + if ( pass ) { + + result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + + if ( result < 0 ) { + + pass = FALSE; + failure_mssg = "Cache flush invalidate failed in check_stats__smoke_check_1()"; + } + else if ( ( cache_ptr->index_len != 0 ) || + ( cache_ptr->index_size != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache len/size after check_stats__smoke_check_1()"; + + } + } + + if ( pass ) { + + if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 33 ) || + ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 34 ) || + ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) || + ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 34 ) || + ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 33 ) || + ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(4)."; + } + } + + if ( pass ) { + + if ( ( cache_ptr->total_ht_insertions != 33 ) || + ( cache_ptr->total_ht_deletions != 33 ) || + ( cache_ptr->successful_ht_searches != 98 ) || + ( cache_ptr->total_successful_ht_search_depth != 198 ) || + ( cache_ptr->failed_ht_searches != 33 ) || + ( cache_ptr->total_failed_ht_search_depth != 52 ) || + ( cache_ptr->max_index_len != 32 ) || + ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_clean_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_slist_len != 32 ) || + ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) || + ( cache_ptr->max_pl_len != 1 ) || + ( cache_ptr->max_pl_size != 64 * 1024 ) || + ( cache_ptr->max_pel_len != 0 ) || + ( cache_ptr->max_pel_size != 0 ) || + ( cache_ptr->calls_to_msic != 1 ) || + ( cache_ptr->total_entries_skipped_in_msic != 0 ) || + ( cache_ptr->total_entries_scanned_in_msic != 33 ) || + ( cache_ptr->max_entries_skipped_in_msic != 0 ) || + ( cache_ptr->max_entries_scanned_in_msic != 33 ) || + ( cache_ptr->entries_scanned_to_make_space != 33 ) || + ( cache_ptr->slist_scan_restarts != 0 ) || + ( cache_ptr->LRU_scan_restarts != 0 ) || + ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4)."; + } + } + +#if H5C_COLLECT_CACHE_ENTRY_STATS + if ( pass ) { + + /* Note that most entry level stats are only updated on entry eviction */ + + if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 2 ) || + ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1 ) || + ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) || + ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 2 ) || + ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) || + ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) { + + pass = FALSE; + failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(4)."; + } + } +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ + + if ( pass ) { + + reset_entries(); + } + + if ( pass ) { + + /* reset cache min clean size to its expected value */ + cache_ptr->min_clean_size = (1 * 1024 * 1024); + } + + return; + +} /* check_stats__smoke_check_1() */ + +#endif /* H5C_COLLECT_CACHE_STATS */ + + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Run tests on the cache code contained in H5C.c + * + * Return: Success: + * + * Failure: + * + * Programmer: John Mainzer + * 6/24/04 * * Modifications: * @@ -32999,29 +35075,30 @@ int main(void) { unsigned nerrs = 0; + int express_test; H5open(); - skip_long_tests = FALSE; - -#ifdef NDEBUG - run_full_test = TRUE; -#else /* NDEBUG */ - run_full_test = FALSE; -#endif /* NDEBUG */ - - nerrs += smoke_check_1(); - nerrs += smoke_check_2(); - nerrs += smoke_check_3(); - nerrs += smoke_check_4(); - nerrs += smoke_check_5(); - nerrs += smoke_check_6(); - nerrs += smoke_check_7(); - nerrs += smoke_check_8(); - nerrs += smoke_check_9(); - nerrs += smoke_check_10(); - - nerrs += write_permitted_check(); + express_test = GetTestExpress(); + + printf("=========================================\n"); + printf("Internal cache tests\n"); + printf(" express_test = %d\n", express_test); + printf("=========================================\n"); + + nerrs += smoke_check_1(express_test); + nerrs += smoke_check_2(express_test); + nerrs += smoke_check_3(express_test); + nerrs += smoke_check_4(express_test); + nerrs += smoke_check_5(express_test); + nerrs += smoke_check_6(express_test); + nerrs += smoke_check_7(express_test); + nerrs += smoke_check_8(express_test); + nerrs += smoke_check_9(express_test); + nerrs += smoke_check_10(express_test); + + nerrs += write_permitted_check(express_test); + nerrs += check_insert_entry(); nerrs += check_flush_cache(); nerrs += check_get_entry_status(); @@ -33058,6 +35135,8 @@ main(void) nerrs += check_flush_deps_err(); nerrs += check_flush_deps_order(); nerrs += check_notify_cb(); + nerrs += check_entry_deletions_during_scans(); + nerrs += check_stats(); return(nerrs > 0); } /* main() */ diff --git a/test/cache_api.c b/test/cache_api.c index 6953d17..1697884 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -25,6 +25,9 @@ #include "H5ACprivate.h" #include "cache_common.h" +/* extern declarations */ + +extern const char *FILENAME[]; /* global variable declarations: */ diff --git a/test/cache_common.c b/test/cache_common.c index 60ab827..8ccd7e3 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -23,6 +23,7 @@ #include "H5Cprivate.h" #include "H5Iprivate.h" #include "H5MFprivate.h" +#include "H5MMprivate.h" #include "cache_common.h" @@ -57,8 +58,6 @@ haddr_t saved_actual_base_addr = HADDR_UNDEF; /* Store the address of the hbool_t write_permitted = TRUE; hbool_t pass = TRUE; /* set to false on error */ -hbool_t skip_long_tests = TRUE; -hbool_t run_full_test = TRUE; hbool_t try_core_file_driver = FALSE; hbool_t core_file_driver_failed = FALSE; const char *failure_mssg = NULL; @@ -77,79 +76,156 @@ static test_entry_t notify_entries[NUM_NOTIFY_ENTRIES], orig_notify_entries[NUM_ hbool_t orig_entry_arrays_init = FALSE; -static herr_t pico_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t nano_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t micro_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t tiny_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t small_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t medium_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t large_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t huge_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t monster_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t variable_clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t notify_clear(H5F_t * f, void * thing, hbool_t dest); - -static herr_t pico_dest(H5F_t * f, void * thing); -static herr_t nano_dest(H5F_t * f, void * thing); -static herr_t micro_dest(H5F_t * f, void * thing); -static herr_t tiny_dest(H5F_t * f, void * thing); -static herr_t small_dest(H5F_t * f, void * thing); -static herr_t medium_dest(H5F_t * f, void * thing); -static herr_t large_dest(H5F_t * f, void * thing); -static herr_t huge_dest(H5F_t * f, void * thing); -static herr_t monster_dest(H5F_t * f, void * thing); -static herr_t variable_dest(H5F_t * f, void * thing); -static herr_t notify_dest(H5F_t * f, void * thing); - -static herr_t pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t variable_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); -static herr_t notify_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned * flags_ptr); - -static void * pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static void * notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); - -static herr_t pico_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t nano_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t micro_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t tiny_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t small_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t medium_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t large_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t huge_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t monster_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t variable_size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t notify_size(H5F_t * f, void * thing, size_t * size_ptr); +static herr_t pico_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t nano_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t micro_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t tiny_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t small_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t medium_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t large_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t huge_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t monster_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t variable_get_load_size(const void *udata_ptr, size_t *image_len_ptr); +static herr_t notify_get_load_size(const void *udata_ptr, size_t *image_len_ptr); + +static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *nano_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *micro_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *tiny_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *small_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *medium_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *large_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *huge_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *monster_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *variable_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); +static void *notify_deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr); + +static herr_t pico_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t nano_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t micro_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t tiny_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t small_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t medium_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t large_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t huge_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t monster_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t variable_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); +static herr_t notify_image_len(void *thing, size_t *image_len_ptr, + hbool_t *compressed_ptr, size_t * compressed_len_ptr); + +static herr_t pico_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t nano_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t micro_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t tiny_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t small_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t medium_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t large_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t huge_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t monster_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t variable_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); +static herr_t notify_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, size_t compressed_len, haddr_t *new_addr_ptr, + size_t *new_len_ptr, size_t *new_compressed_len_ptr, unsigned *flags_ptr); + +static herr_t pico_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t nano_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t micro_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t tiny_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t small_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t medium_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t large_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t huge_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t monster_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t variable_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); +static herr_t notify_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); + +static herr_t pico_free_icr(void *thing); +static herr_t nano_free_icr(void *thing); +static herr_t micro_free_icr(void *thing); +static herr_t tiny_free_icr(void *thing); +static herr_t small_free_icr(void *thing); +static herr_t medium_free_icr(void *thing); +static herr_t large_free_icr(void *thing); +static herr_t huge_free_icr(void *thing); +static herr_t monster_free_icr(void *thing); +static herr_t variable_free_icr(void *thing); +static herr_t notify_free_icr(void *thing); + static herr_t notify_notify(H5C_notify_action_t action, void *thing); +/* Generic callback routines */ +static herr_t get_load_size(const void *udata_ptr, size_t *image_len_ptr, + int32_t entry_type); +static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr, + hbool_t *dirty_ptr, int32_t entry_type); +static herr_t image_len(void *thing, size_t *image_len_ptr, int32_t entry_type); +static herr_t pre_serialize(const H5F_t *f, hid_t dxpl_id, void *thing, + haddr_t addr, size_t len, haddr_t *new_addr_ptr, size_t *new_len_ptr, + unsigned *flags_ptr); +static herr_t serialize(const H5F_t *f, void *image_ptr, size_t len, + void *thing); +static herr_t notify(H5C_notify_action_t action, void *thing, int32_t + entry_type); +static herr_t free_icr(test_entry_t *entry, int32_t entry_type); + +/* Local routines */ +static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, + struct flush_op *op_ptr, unsigned *flags_ptr); + + test_entry_t *entries[NUMBER_OF_ENTRY_TYPES] = { pico_entries, @@ -262,118 +338,171 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = { { PICO_ENTRY_TYPE, - (H5C_load_func_t)pico_load, - (H5C_flush_func_t)pico_flush, - (H5C_dest_func_t)pico_dest, - (H5C_clear_func_t)pico_clear, + "pico_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)pico_get_load_size, + (H5C_deserialize_func_t)pico_deserialize, + (H5C_image_len_func_t)pico_image_len, + (H5AC_pre_serialize_func_t)pico_pre_serialize, + (H5C_serialize_func_t)pico_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)pico_size + (H5C_free_icr_func_t)pico_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { NANO_ENTRY_TYPE, - (H5C_load_func_t)nano_load, - (H5C_flush_func_t)nano_flush, - (H5C_dest_func_t)nano_dest, - (H5C_clear_func_t)nano_clear, + "nano_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)nano_get_load_size, + (H5C_deserialize_func_t)nano_deserialize, + (H5C_image_len_func_t)nano_image_len, + (H5AC_pre_serialize_func_t)nano_pre_serialize, + (H5C_serialize_func_t)nano_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)nano_size + (H5C_free_icr_func_t)nano_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { MICRO_ENTRY_TYPE, - (H5C_load_func_t)micro_load, - (H5C_flush_func_t)micro_flush, - (H5C_dest_func_t)micro_dest, - (H5C_clear_func_t)micro_clear, + "micro_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)micro_get_load_size, + (H5C_deserialize_func_t)micro_deserialize, + (H5C_image_len_func_t)micro_image_len, + (H5AC_pre_serialize_func_t)micro_pre_serialize, + (H5C_serialize_func_t)micro_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)micro_size + (H5C_free_icr_func_t)micro_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { TINY_ENTRY_TYPE, - (H5C_load_func_t)tiny_load, - (H5C_flush_func_t)tiny_flush, - (H5C_dest_func_t)tiny_dest, - (H5C_clear_func_t)tiny_clear, + "tiny_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)tiny_get_load_size, + (H5C_deserialize_func_t)tiny_deserialize, + (H5C_image_len_func_t)tiny_image_len, + (H5AC_pre_serialize_func_t)tiny_pre_serialize, + (H5C_serialize_func_t)tiny_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)tiny_size + (H5C_free_icr_func_t)tiny_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { SMALL_ENTRY_TYPE, - (H5C_load_func_t)small_load, - (H5C_flush_func_t)small_flush, - (H5C_dest_func_t)small_dest, - (H5C_clear_func_t)small_clear, + "small_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)small_get_load_size, + (H5C_deserialize_func_t)small_deserialize, + (H5C_image_len_func_t)small_image_len, + (H5AC_pre_serialize_func_t)small_pre_serialize, + (H5C_serialize_func_t)small_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)small_size + (H5C_free_icr_func_t)small_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { MEDIUM_ENTRY_TYPE, - (H5C_load_func_t)medium_load, - (H5C_flush_func_t)medium_flush, - (H5C_dest_func_t)medium_dest, - (H5C_clear_func_t)medium_clear, + "medium_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)medium_get_load_size, + (H5C_deserialize_func_t)medium_deserialize, + (H5C_image_len_func_t)medium_image_len, + (H5AC_pre_serialize_func_t)medium_pre_serialize, + (H5C_serialize_func_t)medium_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)medium_size + (H5C_free_icr_func_t)medium_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { LARGE_ENTRY_TYPE, - (H5C_load_func_t)large_load, - (H5C_flush_func_t)large_flush, - (H5C_dest_func_t)large_dest, - (H5C_clear_func_t)large_clear, + "large_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)large_get_load_size, + (H5C_deserialize_func_t)large_deserialize, + (H5C_image_len_func_t)large_image_len, + (H5AC_pre_serialize_func_t)large_pre_serialize, + (H5C_serialize_func_t)large_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)large_size + (H5C_free_icr_func_t)large_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { HUGE_ENTRY_TYPE, - (H5C_load_func_t)huge_load, - (H5C_flush_func_t)huge_flush, - (H5C_dest_func_t)huge_dest, - (H5C_clear_func_t)huge_clear, + "huge_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)huge_get_load_size, + (H5C_deserialize_func_t)huge_deserialize, + (H5C_image_len_func_t)huge_image_len, + (H5AC_pre_serialize_func_t)huge_pre_serialize, + (H5C_serialize_func_t)huge_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)huge_size + (H5C_free_icr_func_t)huge_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { MONSTER_ENTRY_TYPE, - (H5C_load_func_t)monster_load, - (H5C_flush_func_t)monster_flush, - (H5C_dest_func_t)monster_dest, - (H5C_clear_func_t)monster_clear, + "monster_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)monster_get_load_size, + (H5C_deserialize_func_t)monster_deserialize, + (H5C_image_len_func_t)monster_image_len, + (H5AC_pre_serialize_func_t)monster_pre_serialize, + (H5C_serialize_func_t)monster_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)monster_size + (H5C_free_icr_func_t)monster_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { VARIABLE_ENTRY_TYPE, - (H5C_load_func_t)variable_load, - (H5C_flush_func_t)variable_flush, - (H5C_dest_func_t)variable_dest, - (H5C_clear_func_t)variable_clear, + "variable_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_SPECULATIVE_LOAD_FLAG, + (H5C_get_load_size_func_t)variable_get_load_size, + (H5C_deserialize_func_t)variable_deserialize, + (H5C_image_len_func_t)variable_image_len, + (H5AC_pre_serialize_func_t)variable_pre_serialize, + (H5C_serialize_func_t)variable_serialize, (H5C_notify_func_t)NULL, - (H5C_size_func_t)variable_size + (H5C_free_icr_func_t)variable_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, }, { NOTIFY_ENTRY_TYPE, - (H5C_load_func_t)notify_load, - (H5C_flush_func_t)notify_flush, - (H5C_dest_func_t)notify_dest, - (H5C_clear_func_t)notify_clear, + "notify_entry", + H5FD_MEM_DEFAULT, + H5C__CLASS_NO_FLAGS_SET, + (H5C_get_load_size_func_t)notify_get_load_size, + (H5C_deserialize_func_t)notify_deserialize, + (H5C_image_len_func_t)notify_image_len, + (H5AC_pre_serialize_func_t)notify_pre_serialize, + (H5C_serialize_func_t)notify_serialize, (H5C_notify_func_t)notify_notify, - (H5C_size_func_t)notify_size + (H5C_free_icr_func_t)notify_free_icr, + (H5C_clear_func_t)NULL, + (H5C_get_fsf_size_t)NULL, } }; -static herr_t clear(H5F_t * f, void * thing, hbool_t dest); -static herr_t destroy(H5F_t * f, void * thing); -static herr_t flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned H5_ATTR_UNUSED * flags_ptr); -static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t size(H5F_t * f, void * thing, size_t * size_ptr); -static herr_t notify(H5C_notify_action_t action, void *thing); -static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, - struct flush_op *op_ptr, unsigned *flags_ptr); - - - - /* address translation functions: */ @@ -478,7 +607,7 @@ addr_to_type_and_index(haddr_t addr, static herr_t check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr) { - HDassert(write_permitted_ptr); + HDassert( write_permitted_ptr ); *write_permitted_ptr = write_permitted; @@ -487,721 +616,834 @@ check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_pt /*------------------------------------------------------------------------- - * Function: clear & friends + * Function: get_load_size & friends * - * Purpose: clear the entry. The helper functions verify that the - * correct version of clear is being called, and then call - * clear proper. + * Purpose: Query the image size for loading an entry. The helper + * functions funnel into get_load_size proper. * * Return: SUCCEED * - * Programmer: John Mainzer - * 6/10/04 + * Programmer: Quincey Koziol + * 5/18/10 * *------------------------------------------------------------------------- */ - -herr_t -clear(H5F_t * f, - void * thing, - hbool_t dest) +static herr_t +get_load_size(const void *udata, size_t *image_length, int32_t entry_type) { - test_entry_t * entry_ptr; - test_entry_t * base_addr; - - HDassert( thing ); - - entry_ptr = (test_entry_t *)thing; - base_addr = entries[entry_ptr->type]; - - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->header.addr == entry_ptr->addr ); - HDassert( entry_ptr->header.size == entry_ptr->size ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); - - entry_ptr->header.is_dirty = FALSE; - entry_ptr->is_dirty = FALSE; + test_entry_t *entry; + test_entry_t *base_addr; + haddr_t addr = *(const haddr_t *)udata; + int32_t type; + int32_t idx; - entry_ptr->cleared = TRUE; + addr_to_type_and_index(addr, &type, &idx); - if ( dest ) { + base_addr = entries[type]; + entry = &(base_addr[idx]); - destroy(f, thing); + HDassert(entry->type >= 0); + HDassert(entry->type == type); + HDassert(entry->type == entry_type); + HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); + HDassert(entry->index == idx); + HDassert(entry->index >= 0); + HDassert(entry->index <= max_indices[type]); + HDassert(entry == entry->self); + HDassert(entry->addr == addr); - } + *image_length = entry->size; return(SUCCEED); +} /* get_load_size() */ -} /* clear() */ - -herr_t -pico_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +pico_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, PICO_ENTRY_TYPE); } -herr_t -nano_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +nano_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, NANO_ENTRY_TYPE); } -herr_t -micro_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +micro_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, MICRO_ENTRY_TYPE); } -herr_t -tiny_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +tiny_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, TINY_ENTRY_TYPE); } -herr_t -small_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +small_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, SMALL_ENTRY_TYPE); } -herr_t -medium_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +medium_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, MEDIUM_ENTRY_TYPE); } -herr_t -large_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +large_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, LARGE_ENTRY_TYPE); } -herr_t -huge_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +huge_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, HUGE_ENTRY_TYPE); } -herr_t -monster_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +monster_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, MONSTER_ENTRY_TYPE); } -herr_t -variable_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +variable_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, VARIABLE_ENTRY_TYPE); } -herr_t -notify_clear(H5F_t * f, void * thing, hbool_t dest) +static herr_t +notify_get_load_size(const void *udata, size_t *image_length) { - HDassert ( ((test_entry_t *)thing)->type == NOTIFY_ENTRY_TYPE ); - return(clear(f, thing, dest)); + return get_load_size(udata, image_length, NOTIFY_ENTRY_TYPE); } - /*------------------------------------------------------------------------- - * Function: dest & friends + * Function: deserialize & friends * - * Purpose: Destroy the entry. The helper functions verify that the - * correct version of dest is being called, and then call - * dest proper. + * Purpose: deserialize the entry. The helper functions verify that the + * correct version of deserialize is being called, and then call + * deserialize proper. * - * Return: SUCCEED + * Return: void * (pointer to the in core representation of the entry) * * Programmer: John Mainzer - * 6/10/04 + * 9/20/07 * *------------------------------------------------------------------------- */ - -herr_t -destroy(H5F_t H5_ATTR_UNUSED * f, - void * thing) +static void * +deserialize(const void *image, size_t len, void *udata, hbool_t *dirty, + int32_t entry_type) { - int i; - test_entry_t * entry_ptr; - test_entry_t * base_addr; - test_entry_t * pinned_entry_ptr; - test_entry_t * pinned_base_addr; - - HDassert( thing ); - - entry_ptr = (test_entry_t *)thing; - base_addr = entries[entry_ptr->type]; - - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->cache_ptr != NULL ); - HDassert( entry_ptr->cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( ( entry_ptr->header.destroy_in_progress ) || - ( entry_ptr->header.addr == entry_ptr->addr ) ); - HDassert( entry_ptr->header.size == entry_ptr->size ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); - - HDassert( !(entry_ptr->is_dirty) ); - HDassert( !(entry_ptr->header.is_dirty) ); - - if ( entry_ptr->num_pins > 0 ) { - - for ( i = 0; i < entry_ptr->num_pins; i++ ) - { - pinned_base_addr = entries[entry_ptr->pin_type[i]]; - pinned_entry_ptr = &(pinned_base_addr[entry_ptr->pin_idx[i]]); - - HDassert( 0 <= pinned_entry_ptr->type ); - HDassert( pinned_entry_ptr->type < NUMBER_OF_ENTRY_TYPES ); - HDassert( pinned_entry_ptr->type == entry_ptr->pin_type[i] ); - HDassert( pinned_entry_ptr->index >= 0 ); - HDassert( pinned_entry_ptr->index <= - max_indices[pinned_entry_ptr->type] ); - HDassert( pinned_entry_ptr->index == entry_ptr->pin_idx[i] ); - HDassert( pinned_entry_ptr == pinned_entry_ptr->self ); - HDassert( pinned_entry_ptr->header.is_pinned ); - HDassert( pinned_entry_ptr->is_pinned ); - HDassert( pinned_entry_ptr->pinning_ref_count > 0 ); - - pinned_entry_ptr->pinning_ref_count--; - - if ( pinned_entry_ptr->pinning_ref_count <= 0 ) { - - unpin_entry(pinned_entry_ptr->type, - pinned_entry_ptr->index); - } + test_entry_t *entry; + test_entry_t *base_addr; + haddr_t addr = *(haddr_t *)udata; + int32_t type; + int32_t idx; - entry_ptr->pin_type[i] = -1; - entry_ptr->pin_idx[i] = -1; - } - entry_ptr->num_pins = 0; - } + addr_to_type_and_index(addr, &type, &idx); - entry_ptr->destroyed = TRUE; - entry_ptr->cache_ptr = NULL; + base_addr = entries[type]; + entry = &(base_addr[idx]); + + HDassert(entry->type >= 0); + HDassert(entry->type == type); + HDassert(entry->type == entry_type); + HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); + HDassert(entry->index == idx); + HDassert(entry->index >= 0); + HDassert(entry->index <= max_indices[type]); + HDassert(entry == entry->self); + HDassert(entry->addr == addr); + HDassert(entry->size == len); + HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type])); + HDassert(dirty != NULL); + + /* for now *dirty will always be FALSE */ + *dirty = FALSE; + + /* verify that the image contains the expected data. */ + HDassert(image != NULL); + if((entry->at_main_addr && entry->written_to_main_addr) || + (!entry->at_main_addr && entry->written_to_alt_addr)) { + if((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || + (type == NOTIFY_ENTRY_TYPE)) { + if((*((const char *)image)) != (char)(idx & 0xFF)) { + HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", + type, idx, (long)addr); + HDfprintf(stdout, "*image = 0x%x\n", + (int)(*((const char *)image))); + HDfprintf(stdout, "expected *image = 0x%x\n", + (int)(idx & 0xFF)); + } /* end if */ + HDassert((*((const char *)image)) == (char)(idx & 0xFF)); + } /* end if */ + else { + if((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) { + HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", + type, idx, (long)addr); + HDfprintf(stdout, "*image = 0x%x 0x%x 0x%x\n", + (int)(*((const char *)image)), + (int)(*(((const char *)image) + 1)), + (int)(*(((const char *)image) + 2))); + HDfprintf(stdout, "expected *image = 0x%x\n", + (int)(idx & 0xFF), + (int)((idx & 0xFF00) >> 8)); + } /* end if */ + HDassert((*((const char *)image)) == (char)(type & 0xFF)); + HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8)); + HDassert((*(((const char *)image) + 2)) == (char)(idx & 0xFF)); + } /* end else */ + } /* end if */ - return(SUCCEED); + entry->deserialized = TRUE; + entry->header.is_dirty = FALSE; + entry->is_dirty = FALSE; + (entry->deserializes)++; -} /* dest() */ + return((void *)entry); +} /* deserialize() */ -herr_t -pico_dest(H5F_t * f, void * thing) +void * +pico_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, PICO_ENTRY_TYPE); } -herr_t -nano_dest(H5F_t * f, void * thing) +void * +nano_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, NANO_ENTRY_TYPE); } -herr_t -micro_dest(H5F_t * f, void * thing) +void * +micro_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, MICRO_ENTRY_TYPE); } -herr_t -tiny_dest(H5F_t * f, void * thing) +void * +tiny_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, TINY_ENTRY_TYPE); } -herr_t -small_dest(H5F_t * f, void * thing) +void * +small_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, SMALL_ENTRY_TYPE); } -herr_t -medium_dest(H5F_t * f, void * thing) +void * +medium_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, MEDIUM_ENTRY_TYPE); } -herr_t -large_dest(H5F_t * f, void * thing) +void * +large_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, LARGE_ENTRY_TYPE); } -herr_t -huge_dest(H5F_t * f, void * thing) +void * +huge_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, HUGE_ENTRY_TYPE); } -herr_t -monster_dest(H5F_t * f, void * thing) +void * +monster_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, MONSTER_ENTRY_TYPE); } -herr_t -variable_dest(H5F_t * f, void * thing) +void * +variable_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, VARIABLE_ENTRY_TYPE); } -herr_t -notify_dest(H5F_t * f, void * thing) +void * +notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) { - HDassert ( ((test_entry_t *)thing)->type == NOTIFY_ENTRY_TYPE ); - return(destroy(f, thing)); + return deserialize(image, len, udata, dirty, NOTIFY_ENTRY_TYPE); } /*------------------------------------------------------------------------- - * Function: flush & friends + * Function: image_len & friends * - * Purpose: flush the entry and mark it as clean. The helper functions - * verify that the correct version of flush is being called, - * and then call flush proper. + * Purpose: Return the real (and possibly reduced) length of the image. + * The helper functions verify that the correct version of + * deserialize is being called, and then call deserialize + * proper. * * Return: SUCCEED * * Programmer: John Mainzer - * 6/10/04 + * 9/19/07 * *------------------------------------------------------------------------- */ herr_t -flush(H5F_t *f, - hid_t H5_ATTR_UNUSED dxpl_id, - hbool_t dest, - haddr_t -#ifdef NDEBUG - H5_ATTR_UNUSED -#endif /* NDEBUG */ - addr, - void *thing, - unsigned * flags_ptr) +image_len(void *thing, size_t *image_length, int32_t entry_type) { - int i; - test_entry_t * entry_ptr; - test_entry_t * base_addr; - - HDassert( thing ); - - entry_ptr = (test_entry_t *)thing; - base_addr = entries[entry_ptr->type]; - - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->header.addr == entry_ptr->addr ); - HDassert( entry_ptr->addr == addr ); - HDassert( entry_ptr->header.size == entry_ptr->size ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); - HDassert( entry_ptr->header.is_dirty == entry_ptr->is_dirty ); - HDassert( entry_ptr->cache_ptr != NULL ); - HDassert( entry_ptr->cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( entry_ptr->num_flush_ops >= 0 ); - HDassert( entry_ptr->num_flush_ops < MAX_FLUSH_OPS ); - - if ( entry_ptr->num_flush_ops > 0 ) { - - for ( i = 0; i < entry_ptr->num_flush_ops; i++ ) - { - execute_flush_op(f, - entry_ptr, - &((entry_ptr->flush_ops)[i]), - flags_ptr); - } - entry_ptr->num_flush_ops = 0; - entry_ptr->flush_op_self_resize_in_progress = FALSE; - } + test_entry_t *entry; + test_entry_t *base_addr; + int32_t type; + int32_t idx; - entry_ptr->flushed = TRUE; + HDassert(thing); + HDassert(image_length); - if ( ( ! write_permitted ) && ( entry_ptr->is_dirty ) ) { + entry = (test_entry_t *)thing; - pass = FALSE; - failure_mssg = "called flush when write_permitted is FALSE."; - } + HDassert(entry->self == entry); - if ( entry_ptr->is_dirty ) { + type = entry->type; + idx = entry->index; - (entry_ptr->writes)++; - entry_ptr->is_dirty = FALSE; - entry_ptr->header.is_dirty = FALSE; - } + HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + HDassert(type == entry_type); + HDassert((idx >= 0) && (idx <= max_indices[type])); - if ( dest ) { + base_addr = entries[type]; + HDassert(entry == &(base_addr[idx])); - destroy(f, thing); + if(type != VARIABLE_ENTRY_TYPE) + HDassert(entry->size == entry_sizes[type]); + else { + HDassert(entry->size <= entry_sizes[type]); + HDassert(entry->size > 0); + } /* end else */ - } + *image_length = entry->size; return(SUCCEED); -} /* flush() */ +} /* image_len() */ herr_t -pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +pico_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, PICO_ENTRY_TYPE); } herr_t -nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +nano_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, NANO_ENTRY_TYPE); } herr_t -micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +micro_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, MICRO_ENTRY_TYPE); } herr_t -tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +tiny_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, TINY_ENTRY_TYPE); } herr_t -small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +small_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, SMALL_ENTRY_TYPE); } herr_t -medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +medium_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, MEDIUM_ENTRY_TYPE); } herr_t -large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +large_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, LARGE_ENTRY_TYPE); } herr_t -huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +huge_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, HUGE_ENTRY_TYPE); } herr_t -monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +monster_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, MONSTER_ENTRY_TYPE); } herr_t -variable_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +variable_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, VARIABLE_ENTRY_TYPE); } herr_t -notify_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing, unsigned * flags_ptr) +notify_image_len(void *thing, size_t *image_length, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { - HDassert ( ((test_entry_t *)thing)->type == NOTIFY_ENTRY_TYPE ); - return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); + return image_len(thing, image_length, NOTIFY_ENTRY_TYPE); } /*------------------------------------------------------------------------- - * Function: load & friends + * Function: pre_serialize & friends * - * Purpose: "load" the requested entry and mark it as clean. The - * helper functions verify that the correct version of load - * is being called, and then call load proper. + * Purpose: Pre_serialize the supplied entry. For now this consistes of + * executing any flush operations and loading the appropriate + * values into *new_addr_ptr, *new_len_ptr, and *flags_ptr. * - * Return: SUCCEED + * The helper functions verify that the correct version of + * serialize is being called, and then call serialize + * proper. + * + * Return: SUCCEED if successful, FAIL otherwise. * * Programmer: John Mainzer - * 6/10/04 + * 8/07/14 * *------------------------------------------------------------------------- */ - -void * -load(H5F_t H5_ATTR_UNUSED *f, - hid_t H5_ATTR_UNUSED dxpl_id, - haddr_t addr, - void H5_ATTR_UNUSED *udata) +herr_t +pre_serialize(const H5F_t *f, + hid_t H5_ATTR_UNUSED dxpl_id, + void *thing, + haddr_t addr, + size_t len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + unsigned *flags_ptr) { + test_entry_t *entry; + test_entry_t *base_addr; int32_t type; int32_t idx; - test_entry_t * entry_ptr; - test_entry_t * base_addr; + int32_t i; - addr_to_type_and_index(addr, &type, &idx); + HDassert(f); + HDassert(thing); + HDassert(flags_ptr); + + *flags_ptr = H5C__SERIALIZE_NO_FLAGS_SET; + + HDassert(new_addr_ptr); + HDassert(new_len_ptr); + + entry = (test_entry_t *)thing; + + HDassert(entry->self == entry); + HDassert(entry->addr == addr); + HDassert(entry->size == len); + + /* shouldn't serialize the entry unless it is dirty */ + HDassert(entry->is_dirty); + + type = entry->type; + idx = entry->index; + + HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + HDassert((idx >= 0) && (idx <= max_indices[type])); base_addr = entries[type]; - entry_ptr = &(base_addr[idx]); - HDassert( entry_ptr->type == type ); - HDassert( entry_ptr->type >= 0 ); - HDassert( entry_ptr->type < NUMBER_OF_ENTRY_TYPES ); - HDassert( entry_ptr->index == idx ); - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[type] ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->addr == addr ); -#if 1 /* JRM */ - if ( ! ( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes[type] ) ) ) { - - HDfprintf(stdout, "entry type/index/size = %d/%d/%ld\n", - (int)(entry_ptr->type), - (int)(entry_ptr->index), - (long)(entry_ptr->size)); - } -#endif /* JRM */ - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes[type] ) ); + HDassert(entry == &(base_addr[idx])); + HDassert(entry->num_flush_ops >= 0); + HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); - entry_ptr->loaded = TRUE; + if(entry->num_flush_ops > 0) { + for(i = 0; i < entry->num_flush_ops; i++ ) { + HDassert(entry->file_ptr); - entry_ptr->header.is_dirty = FALSE; - entry_ptr->is_dirty = FALSE; + execute_flush_op(entry->file_ptr, entry, + &((entry->flush_ops)[i]), flags_ptr); + } /* end for */ + entry->num_flush_ops = 0; + entry->flush_op_self_resize_in_progress = FALSE; - (entry_ptr->reads)++; + /* This looks wrong, but it isn't -- *flags_ptr will be modified + * by execute_flush_op() only if the target is this entry -- + * and the flags set will accumulate over the set of calls in + * the for loop. + */ + if(pass && (((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0)) { - return(entry_ptr); + /* set *new_len_ptr to the new length. */ -} /* load() */ + HDassert(entry->type == VARIABLE_ENTRY_TYPE); + HDassert(entry->size > 0); + HDassert(entry->size <= VARIABLE_ENTRY_SIZE); -void * -pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) + *new_len_ptr = entry->size; + } /* end if */ + + if(((*flags_ptr) & H5C__SERIALIZE_MOVED_FLAG) != 0) { + + HDassert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0); + + /* place the new address in *new_addr */ + *new_addr_ptr = entry->addr; + } /* end if */ + } /* end if */ + + return(SUCCEED); + +} /* pre_serialize() */ + +herr_t +pico_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +nano_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +micro_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +tiny_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +small_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +medium_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +large_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +huge_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +monster_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +variable_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } -void * -notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) +herr_t +notify_pre_serialize(const H5F_t *f, + hid_t dxpl_id, + void *thing, + haddr_t addr, + size_t len, + size_t H5_ATTR_UNUSED compressed_len, + haddr_t *new_addr_ptr, + size_t *new_len_ptr, + size_t H5_ATTR_UNUSED *new_compressed_len_ptr, + unsigned *flags_ptr) { - return(load(f, dxpl_id, addr, udata)); + return pre_serialize(f, dxpl_id, thing, addr, len, + new_addr_ptr, new_len_ptr, flags_ptr); } + /*------------------------------------------------------------------------- - * Function: size & friends + * Function: serialize & friends * - * Purpose: Get the size of the specified entry. The helper functions - * verify that the correct version of size is being called, - * and then call size proper. + * Purpose: Serialize the supplied entry. For now this consistes of + * loading the type and index of the entry into the first + * three bytes of the image (if it is long enough -- if not + * just load the low order byte of the index into the first + * byte of the image). * - * Return: SUCCEED + * The helper functions verify that the correct version of + * serialize is being called, and then call serialize + * proper. + * + * Return: SUCCEED if successful, FAIL otherwise. * * Programmer: John Mainzer - * 6/10/04 + * 9/19/07 * *------------------------------------------------------------------------- */ herr_t -size(H5F_t H5_ATTR_UNUSED * f, - void * thing, - size_t * size_ptr) +serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - test_entry_t * entry_ptr; - test_entry_t * base_addr; + test_entry_t *entry; + test_entry_t *base_addr; + int32_t type; + int32_t idx; - HDassert( size_ptr ); - HDassert( thing ); + HDassert(image_ptr); + HDassert(thing); - entry_ptr = (test_entry_t *)thing; - base_addr = entries[entry_ptr->type]; + entry = (test_entry_t *)thing; - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->header.addr == entry_ptr->addr ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || \ - ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); + HDassert(entry->self == entry); + HDassert(entry->size == len); + + /* shouldn't serialize the entry unless it is dirty */ + HDassert(entry->is_dirty); + + type = entry->type; + idx = entry->index; + + HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + HDassert((idx >= 0) && (idx <= max_indices[type])); - *size_ptr = entry_ptr->size; + base_addr = entries[type]; + + HDassert(entry == &(base_addr[idx])); + HDassert(entry->num_flush_ops >= 0); + HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); + + /* null out the image to avoid spurious failures */ + HDmemset(image_ptr, 0, len); + + if((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || + (type == NOTIFY_ENTRY_TYPE )) { + HDassert(entry->size >= PICO_ENTRY_SIZE); + *((char *)image_ptr) = (char)((entry->index) & 0xFF); + } /* end if */ + else { + HDassert(entry->size >= NANO_ENTRY_SIZE); + *((char *)image_ptr) = (char)((entry->type) & 0xFF); + *(((char *)image_ptr) + 1) = (char)(((entry->index) & 0xFF00) >> 8); + *(((char *)image_ptr) + 2) = (char)((entry->index) & 0xFF); + } /* end else */ + + /* We no longer do the actual write through an callback -- this is + * as close to that callback as we will get. Hence mark the entry + * clean here. If all goes well, it will be flushed shortly. + */ + entry->is_dirty = FALSE; + + /* since the entry is about to be written to disk, we can mark it + * as initialized. + */ + if(entry->at_main_addr) + entry->written_to_main_addr = TRUE; + else + entry->written_to_alt_addr = TRUE; + + /* do book keeping */ + (entry->serializes)++; + entry->serialized = TRUE; return(SUCCEED); -} /* size() */ +} /* serialize() */ herr_t -pico_size(H5F_t * f, void * thing, size_t * size_ptr) +pico_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -nano_size(H5F_t * f, void * thing, size_t * size_ptr) +nano_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -micro_size(H5F_t * f, void * thing, size_t * size_ptr) +micro_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -tiny_size(H5F_t * f, void * thing, size_t * size_ptr) +tiny_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -small_size(H5F_t * f, void * thing, size_t * size_ptr) +small_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -medium_size(H5F_t * f, void * thing, size_t * size_ptr) +medium_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, + void *thing) { - HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -large_size(H5F_t * f, void * thing, size_t * size_ptr) +large_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -huge_size(H5F_t * f, void * thing, size_t * size_ptr) +huge_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -monster_size(H5F_t * f, void * thing, size_t * size_ptr) +monster_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, + void *thing) { - HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -variable_size(H5F_t * f, void * thing, size_t * size_ptr) +variable_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, + void *thing) { - HDassert ( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } herr_t -notify_size(H5F_t * f, void * thing, size_t * size_ptr) +notify_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, + void *thing) { - HDassert ( ((test_entry_t *)thing)->type == NOTIFY_ENTRY_TYPE ); - return(size(f, thing, size_ptr)); + return serialize(f, image_ptr, len, thing); } @@ -1220,32 +1462,39 @@ notify_size(H5F_t * f, void * thing, size_t * size_ptr) *------------------------------------------------------------------------- */ static herr_t -notify(H5C_notify_action_t action, void *thing) +notify(H5C_notify_action_t action, void *thing, int32_t entry_type) { - test_entry_t * entry_ptr; + test_entry_t *entry; test_entry_t *base_addr; HDassert(thing); - entry_ptr = (test_entry_t *)thing; - base_addr = entries[entry_ptr->type]; + entry = (test_entry_t *)thing; + base_addr = entries[entry->type]; - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->header.addr == entry_ptr->addr ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || \ - ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); + HDassert(entry->index >= 0); + HDassert(entry->index <= max_indices[entry->type]); + HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); + HDassert(entry->type == entry_type); + HDassert(entry == &(base_addr[entry->index])); + HDassert(entry == entry->self); + HDassert(entry->header.addr == entry->addr); + HDassert((entry->type == VARIABLE_ENTRY_TYPE) || \ + (entry->size == entry_sizes[entry->type])); /* Increment count for appropriate action */ switch(action) { - case H5C_NOTIFY_ACTION_AFTER_INSERT: /* Entry has been added to the cache */ - entry_ptr->notify_after_insert_count++; + case H5C_NOTIFY_ACTION_AFTER_INSERT: /* Entry has been added */ + case H5C_NOTIFY_ACTION_AFTER_LOAD: /* to the cache. */ + entry->notify_after_insert_count++; break; + case H5C_NOTIFY_ACTION_AFTER_FLUSH: + /* do nothing */ + break; + case H5C_NOTIFY_ACTION_BEFORE_EVICT: /* Entry is about to be evicted from cache */ - entry_ptr->notify_before_evict_count++; + entry->notify_before_evict_count++; break; default: @@ -1258,11 +1507,160 @@ notify(H5C_notify_action_t action, void *thing) herr_t notify_notify(H5C_notify_action_t action, void *thing) { - HDassert ( ((test_entry_t *)thing)->type == NOTIFY_ENTRY_TYPE ); - return(notify(action, thing)); + return(notify(action, thing, NOTIFY_ENTRY_TYPE)); +} + + +/*------------------------------------------------------------------------- + * Function: free_icr & friends + * + * Purpose: Nominally, this callback is supposed to free the + * in core representation of the entry. + * + * In the context of this test bed, we use it to do + * do all the processing we used to do on a destroy. + * In particular, we use it to release all the pins + * that this entry may have on other entries. + * + * The helper functions verify that the correct version of + * serialize is being called, and then call free_icr + * proper. + * + * Return: SUCCEED + * + * Programmer: John Mainzer + * 9/19/07 + * + *------------------------------------------------------------------------- + */ +herr_t +free_icr(test_entry_t *entry, int32_t entry_type) +{ + test_entry_t *base_addr; + + HDassert(entry); + + base_addr = entries[entry->type]; + + HDassert(entry->type == entry_type); + HDassert(entry->index >= 0); + HDassert(entry->index <= max_indices[entry->type]); + HDassert(entry == &(base_addr[entry->index])); + HDassert(entry == entry->self); + HDassert(entry->cache_ptr != NULL); + HDassert(entry->cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert((entry->header.destroy_in_progress) || + (entry->header.addr == entry->addr)); + HDassert(entry->header.size == entry->size); + HDassert((entry->type == VARIABLE_ENTRY_TYPE) || + (entry->size == entry_sizes[entry->type])); + + if(entry->num_pins > 0) { + int i; + + for(i = 0; i < entry->num_pins; i++) { + test_entry_t *pinned_entry; + test_entry_t *pinned_base_addr; + + pinned_base_addr = entries[entry->pin_type[i]]; + pinned_entry = &(pinned_base_addr[entry->pin_idx[i]]); + + HDassert(0 <= pinned_entry->type); + HDassert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES); + HDassert(pinned_entry->type == entry->pin_type[i]); + HDassert(pinned_entry->index >= 0); + HDassert(pinned_entry->index <= max_indices[pinned_entry->type]); + HDassert(pinned_entry->index == entry->pin_idx[i]); + HDassert(pinned_entry == pinned_entry->self); + HDassert(pinned_entry->header.is_pinned); + HDassert(pinned_entry->is_pinned); + HDassert(pinned_entry->pinning_ref_count > 0); + + pinned_entry->pinning_ref_count--; + + if(pinned_entry->pinning_ref_count <= 0) { + HDassert(pinned_entry->file_ptr); + + unpin_entry(pinned_entry->type, pinned_entry->index); + } /* end if */ + + entry->pin_type[i] = -1; + entry->pin_idx[i] = -1; + } /* end if */ + entry->num_pins = 0; + } /* end if */ + + entry->destroyed = TRUE; + entry->cache_ptr = NULL; + + return(SUCCEED); +} /* free_icr() */ + +herr_t +pico_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, PICO_ENTRY_TYPE); +} + +herr_t +nano_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, NANO_ENTRY_TYPE); +} + +herr_t +micro_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, MICRO_ENTRY_TYPE); +} + +herr_t +tiny_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, TINY_ENTRY_TYPE); +} + +herr_t +small_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, SMALL_ENTRY_TYPE); +} + +herr_t +medium_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, MEDIUM_ENTRY_TYPE); } +herr_t +large_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, LARGE_ENTRY_TYPE); +} +herr_t +huge_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, HUGE_ENTRY_TYPE); +} + +herr_t +monster_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, MONSTER_ENTRY_TYPE); +} + +herr_t +variable_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, VARIABLE_ENTRY_TYPE); +} + +herr_t +notify_free_icr(void *thing) +{ + return free_icr((test_entry_t *)thing, NOTIFY_ENTRY_TYPE); +} /**************************************************************************/ @@ -1565,17 +1963,10 @@ execute_flush_op(H5F_t * file_ptr, HDassert( op_ptr->size <= VARIABLE_ENTRY_SIZE ); entry_ptr->size = op_ptr->size; - (*flags_ptr) |= H5C_CALLBACK__SIZE_CHANGED_FLAG; - entry_ptr->flush_op_self_resize_in_progress = TRUE; - /* if the entry is in the process of being destroyed, - * set the header size to match the entry size so as - * to avoid a spurious failure in the destroy callback. - */ - if ( entry_ptr->header.destroy_in_progress ) { + (*flags_ptr) |= H5C__SERIALIZE_RESIZED_FLAG; - entry_ptr->header.size = entry_ptr->size; - } + entry_ptr->flush_op_self_resize_in_progress = TRUE; } else { @@ -1587,7 +1978,29 @@ execute_flush_op(H5F_t * file_ptr, break; case FLUSH_OP__MOVE: - move_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag); + if((entry_ptr->type == op_ptr->type) && + (entry_ptr->index == op_ptr->idx)) { + + /* the flush operation is acting on the entry to + * which it is attached. Handle this here: + */ + + HDassert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0); + (*flags_ptr) |= H5C__SERIALIZE_MOVED_FLAG; + + if(op_ptr->flag) { + HDassert(entry_ptr->addr == entry_ptr->alt_addr); + entry_ptr->addr = entry_ptr->main_addr; + entry_ptr->at_main_addr = TRUE; + } /* end if */ + else { + HDassert(entry_ptr->addr == entry_ptr->main_addr); + entry_ptr->addr = entry_ptr->alt_addr; + entry_ptr->at_main_addr = FALSE; + } /* end else */ + } /* end if */ + else + move_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag); break; case FLUSH_OP__ORDER: @@ -1596,6 +2009,33 @@ execute_flush_op(H5F_t * file_ptr, (*op_ptr->order_ptr)++; break; + case FLUSH_OP__EXPUNGE: + /* the expunge flush op exists to allow us to simulate the + * case in which an entry is removed from the cashe as the + * the result of the flush of a second entry. At present, + * this can only happen via the take ownership flag, but + * we will make this test feature more general to as to make + * tests easier to write. + * + * When this operation is executed, the target entry is + * removed from the cache without being flushed if dirty + * via the expunge_entry() test function (which calls + * H5C_expunge_entry()). Note that this flush operation + * must always be executed on an entry other than the + * entry being flushed. + */ + HDassert( ( entry_ptr->type != op_ptr->type ) || + ( entry_ptr->index != op_ptr->idx ) ); + expunge_entry(file_ptr, op_ptr->type, op_ptr->idx); + break; + + case FLUSH_OP__DEST_FLUSH_DEP: + HDassert( ( entry_ptr->type != op_ptr->type ) || + ( entry_ptr->index != op_ptr->idx ) ); + destroy_flush_dependency(op_ptr->type, op_ptr->idx, + entry_ptr->type, entry_ptr->index); + break; + default: pass = FALSE; failure_mssg = "Undefined flush op code."; @@ -1721,6 +2161,8 @@ reset_entries(void) base_addr[j].self = &(base_addr[j]); base_addr[j].cache_ptr = NULL; + base_addr[j].written_to_main_addr = FALSE; + base_addr[j].written_to_alt_addr = FALSE; base_addr[j].addr = addr; base_addr[j].at_main_addr = TRUE; base_addr[j].main_addr = addr; @@ -1728,8 +2170,8 @@ reset_entries(void) base_addr[j].size = entry_size; base_addr[j].type = i; base_addr[j].index = j; - base_addr[j].reads = 0; - base_addr[j].writes = 0; + base_addr[j].serializes = 0; + base_addr[j].deserializes = 0; base_addr[j].is_dirty = FALSE; base_addr[j].is_protected = FALSE; base_addr[j].is_read_only = FALSE; @@ -1755,10 +2197,10 @@ reset_entries(void) } base_addr[j].flush_op_self_resize_in_progress = FALSE; - base_addr[j].loaded = FALSE; - base_addr[j].cleared = FALSE; - base_addr[j].flushed = FALSE; + base_addr[j].deserialized = FALSE; + base_addr[j].serialized = FALSE; base_addr[j].destroyed = FALSE; + base_addr[j].expunged = FALSE; base_addr[j].flush_dep_par_type = -1; base_addr[j].flush_dep_par_idx = -1; @@ -1987,15 +2429,24 @@ verify_entry_status(H5C_t * cache_ptr, unsigned u; /* Local index variable */ if ( ( ! expected[i].in_cache ) && - ( ( expected[i].is_dirty ) || - ( expected[i].is_protected ) || - ( expected[i].is_pinned ) ) ) { + ( ( expected[i].is_protected ) || ( expected[i].is_pinned ) ) ) { pass = FALSE; sprintf(msg, "%d: Contradictory data in expected[%d].\n", tag, i); failure_mssg = msg; } + if ( ( ! expected[i].in_cache ) && + ( expected[i].is_dirty ) && + ( ! entry_ptr->expunged ) ) { + + pass = FALSE; + sprintf(msg, + "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", + tag, i); + failure_mssg = msg; + } + if ( pass ) { in_cache = entry_in_cache(cache_ptr, expected[i].entry_type, @@ -2161,23 +2612,20 @@ verify_entry_status(H5C_t * cache_ptr, if ( pass ) { - if ( ( entry_ptr->loaded != expected[i].loaded ) || - ( entry_ptr->cleared != expected[i].cleared ) || - ( entry_ptr->flushed != expected[i].flushed ) || + if ( ( entry_ptr->deserialized != expected[i].deserialized ) || + ( entry_ptr->serialized != expected[i].serialized ) || ( entry_ptr->destroyed != expected[i].destroyed ) ) { pass = FALSE; sprintf(msg, - "%d entry (%d,%d) loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", + "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n", tag, (int)expected[i].entry_type, (int)expected[i].entry_index, - (int)(entry_ptr->loaded), - (int)(expected[i].loaded), - (int)(entry_ptr->cleared), - (int)(expected[i].cleared), - (int)(entry_ptr->flushed), - (int)(expected[i].flushed), + (int)(entry_ptr->deserialized), + (int)(expected[i].deserialized), + (int)(entry_ptr->serialized), + (int)(expected[i].serialized), (int)(entry_ptr->destroyed), (int)(expected[i].destroyed)); failure_mssg = msg; @@ -2372,20 +2820,37 @@ verify_unprotected(void) } /* verify_unprotected() */ -/*------------------------------------------------------------------------- - * Function: setup_cache() +/***************************************************************************** * - * Purpose: Allocate a cache of the desired size and configure it for - * use in the test bed. Return a pointer to the new cache - * structure. + * Function: setup_cache() * - * Return: Pointer to new cache, or NULL on failure. + * Purpose: Open an HDF file. This will allocate an instance and + * initialize an associated instance of H5C_t. However, + * we want to test an instance of H5C_t, so allocate and + * initialize one with the file ID returned by the call to + * H5Fcreate(). Return a pointer to this instance of H5C_t. * - * Programmer: John Mainzer - * 6/11/04 + * Observe that we open a HDF file because the cache now + * writes directly to file, and we need the file I/O facilities + * associated with the file. * - *------------------------------------------------------------------------- - */ + * To avoid tripping on error check code, must allocate enough + * space in the file to hold all the test entries and their + * alternates. This is a little sticky, as the addresses of + * all the test entries are determined at compile time. + * + * Deal with this by choosing BASE_ADDR large enough that + * the base address of the allocate space will be less than + * or equal to BASE_ADDR, and then requesting an extra BASE_ADDR + * bytes, so we don't have to wory about exceeding the allocation. + * + * Return: Success: Ptr to H5C_t + * + * Failure: NULL + * + * Programmer: JRM -- 9/13/07 + * + *****************************************************************************/ H5F_t * setup_cache(size_t max_cache_size, @@ -2650,8 +3115,11 @@ setup_cache(size_t max_cache_size, /*------------------------------------------------------------------------- * Function: takedown_cache() * - * Purpose: Flush the specified cache and disable it. If requested, - * dump stats first. If pass is FALSE, do nothing. + * Purpose: Flush the specified cache and destroy it. If requested, + * dump stats first. Then close and delete the associate + * file. + * + * If pass is FALSE, do nothing. * * Return: void * @@ -2678,7 +3146,7 @@ takedown_cache(H5F_t * file_ptr, flush_cache(file_ptr, TRUE, FALSE, FALSE); - H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT); + H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT); if ( saved_cache != NULL ) { @@ -2753,6 +3221,11 @@ takedown_cache(H5F_t * file_ptr, * Programmer: John Mainzer * 7/6/06 * + * Changes: Added code to set entry_ptr->expunged to TRUE if + * H5C_expunge_entry() returns without error. + * + * JRM -- 8/21/14 + * *------------------------------------------------------------------------- */ @@ -2787,7 +3260,7 @@ expunge_entry(H5F_t * file_ptr, HDassert( ! ( entry_ptr->header.is_pinned ) ); HDassert( ! ( entry_ptr->is_pinned ) ); - result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, + result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[type]), entry_ptr->addr, H5C__NO_FLAGS_SET); if ( result < 0 ) { @@ -2795,6 +3268,9 @@ expunge_entry(H5F_t * file_ptr, pass = FALSE; failure_mssg = "error in H5C_expunge_entry()."; + } else { + + entry_ptr->expunged = TRUE; } } @@ -2837,11 +3313,11 @@ flush_cache(H5F_t * file_ptr, if(destroy_entries) result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + H5C__FLUSH_INVALIDATE_FLAG); else result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET); + H5C__NO_FLAGS_SET); if(dump_stats) H5C_stats(cache_ptr, "test cache", dump_detailed_stats); @@ -2921,8 +3397,8 @@ insert_entry(H5F_t * file_ptr, entry_ptr->is_dirty = TRUE; - result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags); + result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags); if ( ( result < 0 ) || ( entry_ptr->header.is_protected ) || @@ -2951,6 +3427,7 @@ insert_entry(H5F_t * file_ptr, } HDassert(entry_ptr->cache_ptr == NULL); + entry_ptr->file_ptr = file_ptr; entry_ptr->cache_ptr = cache_ptr; if(insert_pinned) @@ -3174,8 +3651,8 @@ protect_entry(H5F_t * file_ptr, HDassert( entry_ptr == entry_ptr->self ); HDassert( !(entry_ptr->is_protected) ); - cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[type]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET); + cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[type]), entry_ptr->addr, &entry_ptr->addr, H5C__NO_FLAGS_SET); if ( ( cache_entry_ptr != (void *)entry_ptr ) || ( !(entry_ptr->header.is_protected) ) || @@ -3214,6 +3691,7 @@ protect_entry(H5F_t * file_ptr, ( entry_ptr->cache_ptr == cache_ptr ) ); entry_ptr->cache_ptr = cache_ptr; + entry_ptr->file_ptr = file_ptr; entry_ptr->is_protected = TRUE; } @@ -3270,8 +3748,8 @@ protect_entry_ro(H5F_t * file_ptr, ( ( entry_ptr->is_read_only ) && ( entry_ptr->ro_ref_count > 0 ) ) ); - cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, - &(types[type]), entry_ptr->addr, NULL, H5C__READ_ONLY_FLAG); + cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types[type]), entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG); if ( ( cache_entry_ptr != (void *)entry_ptr ) || ( !(entry_ptr->header.is_protected) ) || @@ -3290,6 +3768,7 @@ protect_entry_ro(H5F_t * file_ptr, ( entry_ptr->cache_ptr == cache_ptr ) ); entry_ptr->cache_ptr = cache_ptr; + entry_ptr->file_ptr = file_ptr; entry_ptr->is_protected = TRUE; entry_ptr->is_read_only = TRUE; entry_ptr->ro_ref_count++; @@ -3479,7 +3958,7 @@ unprotect_entry(H5F_t * file_ptr, if(flags & H5C__DIRTIED_FLAG) entry_ptr->is_dirty = TRUE; - result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, + result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags); if ( ( result < 0 ) || @@ -3563,6 +4042,7 @@ unprotect_entry(H5F_t * file_ptr, void row_major_scan_forward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -3579,6 +4059,7 @@ row_major_scan_forward(H5F_t * file_ptr, H5C_t * cache_ptr = NULL; int32_t type = 0; int32_t idx; + int32_t local_max_index; if ( verbose ) HDfprintf(stdout, "%s(): entering.\n", FUNC); @@ -3601,208 +4082,283 @@ row_major_scan_forward(H5F_t * file_ptr, { idx = -lag; - while ( ( pass ) && ( idx <= (max_indices[type] + lag) ) ) + local_max_index = MIN(max_index, max_indices[type]); + + while ( ( pass ) && ( idx <= (local_max_index + lag) ) ) { + int32_t tmp_idx; + if ( verbose ) { HDfprintf(stdout, "%d:%d: ", type, idx); } - if ( ( pass ) && ( do_inserts ) && ( (idx + lag) >= 0 ) && - ( (idx + lag) <= max_indices[type] ) && - ( ((idx + lag) % 2) == 0 ) && - ( ! entry_in_cache(cache_ptr, type, (idx + lag)) ) ) { + tmp_idx = idx + lag; + if ( ( pass ) && ( do_inserts ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( (tmp_idx % 2) == 0 ) && + ( ! entry_in_cache(cache_ptr, type, tmp_idx) ) ) { if ( verbose ) - HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag)); + HDfprintf(stdout, "1(i, %d, %d) ", type, tmp_idx); - insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET); - } + insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); + } - if ( ( pass ) && ( (idx + lag - 1) >= 0 ) && - ( (idx + lag - 1) <= max_indices[type] ) && - ( ( (idx + lag - 1) % 3 ) == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1)); + HDfprintf(stdout, "2(p, %d, %d) ", type, tmp_idx); + + protect_entry(file_ptr, type, tmp_idx); - protect_entry(file_ptr, type, (idx + lag - 1)); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 2) >= 0 ) && - ( (idx + lag - 2) <= max_indices[type] ) && - ( ( (idx + lag - 2) % 3 ) == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2)); + HDfprintf(stdout, "3(u, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, idx+lag-2, H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } + /* (don't decrement tmp_idx) */ + if ( ( pass ) && ( do_moves ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { - if ( ( pass ) && ( do_moves ) && ( (idx + lag - 2) >= 0 ) && - ( (idx + lag - 2) <= max_indices[type] ) && - ( ( (idx + lag - 2) % 3 ) == 0 ) ) { + if ( verbose ) + HDfprintf(stdout, "4(r, %d, %d, %d) ", + type, tmp_idx, (int)move_to_main_addr); - move_entry(cache_ptr, type, (idx + lag - 2), - move_to_main_addr); - } + move_entry(cache_ptr, type, tmp_idx, move_to_main_addr); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); + } - if ( ( pass ) && ( (idx + lag - 3) >= 0 ) && - ( (idx + lag - 3) <= max_indices[type] ) && - ( ( (idx + lag - 3) % 5 ) == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 5 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 3)); + HDfprintf(stdout, "5(p, %d, %d) ", type, tmp_idx); + + protect_entry(file_ptr, type, tmp_idx); - protect_entry(file_ptr, type, (idx + lag - 3)); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 5) >= 0 ) && - ( (idx + lag - 5) <= max_indices[type] ) && - ( ( (idx + lag - 5) % 5 ) == 0 ) ) { + tmp_idx -= 2; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 5 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 5)); + HDfprintf(stdout, "6(u, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - unprotect_entry(file_ptr, type, idx+lag-5, H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } if ( do_mult_ro_protects ) { - if ( ( pass ) && ( (idx + lag - 5) >= 0 ) && - ( (idx + lag - 5) < max_indices[type] ) && - ( (idx + lag - 5) % 9 == 0 ) ) { + /* (don't decrement tmp_idx) */ + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx + lag - 5)); + HDfprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx + lag - 5)); + protect_entry_ro(file_ptr, type, tmp_idx); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 6) >= 0 ) && - ( (idx + lag - 6) < max_indices[type] ) && - ( (idx + lag - 6) % 11 == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx + lag - 6)); + HDfprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx); + + protect_entry_ro(file_ptr, type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx + lag - 6)); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 7) >= 0 ) && - ( (idx + lag - 7) < max_indices[type] ) && - ( (idx + lag - 7) % 13 == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx + lag - 7)); + HDfprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx); + + protect_entry_ro(file_ptr, type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx + lag - 7)); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 7) >= 0 ) && - ( (idx + lag - 7) < max_indices[type] ) && - ( (idx + lag - 7) % 9 == 0 ) ) { + /* (don't decrement tmp_idx) */ + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx + lag - 7)); + HDfprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, (idx + lag - 7), H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 8) >= 0 ) && - ( (idx + lag - 8) < max_indices[type] ) && - ( (idx + lag - 8) % 11 == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx + lag - 8)); + HDfprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - unprotect_entry(file_ptr, type, (idx + lag - 8), H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx + lag - 9) >= 0 ) && - ( (idx + lag - 9) < max_indices[type] ) && - ( (idx + lag - 9) % 13 == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx + lag - 9)); + HDfprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - unprotect_entry(file_ptr, type, (idx + lag - 9), H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } } /* if ( do_mult_ro_protects ) */ - if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) { + if ( ( pass ) && ( idx >= 0 ) && ( idx <= local_max_index ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, idx); + HDfprintf(stdout, "13(p, %d, %d) ", type, idx); protect_entry(file_ptr, type, idx); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx - lag + 2) >= 0 ) && - ( (idx - lag + 2) <= max_indices[type] ) && - ( ( (idx - lag + 2) % 7 ) == 0 ) ) { + tmp_idx = idx - lag + 2; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 7 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2)); + HDfprintf(stdout, "14(u, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - unprotect_entry(file_ptr, type, idx-lag+2, H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } - if ( ( pass ) && ( (idx - lag + 1) >= 0 ) && - ( (idx - lag + 1) <= max_indices[type] ) && - ( ( (idx - lag + 1) % 7 ) == 0 ) ) { + tmp_idx--; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 7 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1)); + HDfprintf(stdout, "15(p, %d, %d) ", type, tmp_idx); - protect_entry(file_ptr, type, (idx - lag + 1)); + protect_entry(file_ptr, type, tmp_idx); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } if ( do_destroys ) { - if ( ( pass ) && ( (idx - lag) >= 0 ) && - ( ( idx - lag) <= max_indices[type] ) ) { + tmp_idx = idx - lag; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) ) { - switch ( (idx - lag) %4 ) { + switch ( tmp_idx %4 ) { case 0: /* we just did an insert */ - unprotect_entry(file_ptr, type, idx - lag, H5C__NO_FLAGS_SET); + + if ( verbose ) + HDfprintf(stdout, "16(u, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); break; case 1: - if ( (entries[type])[idx-lag].is_dirty ) { + if ( (entries[type])[tmp_idx].is_dirty ) { + + if ( verbose ) + HDfprintf(stdout, "17(u, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - unprotect_entry(file_ptr, type, idx - lag, H5C__NO_FLAGS_SET); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } else { - unprotect_entry(file_ptr, type, idx - lag, + if ( verbose ) + HDfprintf(stdout, "18(u, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } break; - case 2: /* we just did an insrt */ - unprotect_entry(file_ptr, type, idx - lag, H5C__DELETED_FLAG); + case 2: /* we just did an insert */ + + if ( verbose ) + HDfprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); break; case 3: - if ( (entries[type])[idx-lag].is_dirty ) { + if ( (entries[type])[tmp_idx].is_dirty ) { + + if ( verbose ) + HDfprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG); - unprotect_entry(file_ptr, type, idx - lag, H5C__DELETED_FLAG); + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } else { - unprotect_entry(file_ptr, type, idx - lag, + if ( verbose ) + HDfprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx); + + unprotect_entry(file_ptr, type, tmp_idx, (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) | H5C__DELETED_FLAG); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } break; @@ -3814,14 +4370,17 @@ row_major_scan_forward(H5F_t * file_ptr, } else { - if ( ( pass ) && ( (idx - lag) >= 0 ) && - ( ( idx - lag) <= max_indices[type] ) ) { + tmp_idx = idx - lag; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag)); + HDfprintf(stdout, "22(u, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, idx - lag, + unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)); + + HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size); } } @@ -3965,6 +4524,7 @@ hl_row_major_scan_forward(H5F_t * file_ptr, void row_major_scan_backward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -3981,6 +4541,7 @@ row_major_scan_backward(H5F_t * file_ptr, H5C_t * cache_ptr = NULL; int32_t type = NUMBER_OF_ENTRY_TYPES - 1; int32_t idx; + int32_t local_max_index; if ( verbose ) HDfprintf(stdout, "%s(): Entering.\n", FUNC); @@ -4000,142 +4561,152 @@ row_major_scan_backward(H5F_t * file_ptr, while ( ( pass ) && ( type >= 0 ) ) { - idx = max_indices[type] + lag; + local_max_index = MIN(max_index, max_indices[type]); + + idx = local_max_index + lag; while ( ( pass ) && ( idx >= -lag ) ) { - if ( ( pass ) && ( do_inserts ) && ( (idx - lag) >= 0 ) && - ( (idx - lag) <= max_indices[type] ) && - ( ((idx - lag) % 2) == 1 ) && - ( ! entry_in_cache(cache_ptr, type, (idx - lag)) ) ) { + int32_t tmp_idx; + + tmp_idx = idx - lag; + if ( ( pass ) && ( do_inserts ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( (tmp_idx % 2) == 1 ) && + ( ! entry_in_cache(cache_ptr, type, tmp_idx) ) ) { if ( verbose ) - HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag)); + HDfprintf(stdout, "(i, %d, %d) ", type, tmp_idx); - insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET); + insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } - - if ( ( pass ) && ( (idx - lag + 1) >= 0 ) && - ( (idx - lag + 1) <= max_indices[type] ) && - ( ( (idx - lag + 1) % 3 ) == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1)); + HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx); - protect_entry(file_ptr, type, (idx - lag + 1)); + protect_entry(file_ptr, type, tmp_idx); } - if ( ( pass ) && ( (idx - lag + 2) >= 0 ) && - ( (idx - lag + 2) <= max_indices[type] ) && - ( ( (idx - lag + 2) % 3 ) == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2)); + HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, idx-lag+2, H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } + /* (don't increment tmp_idx) */ + if ( ( pass ) && ( do_moves ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 3 ) == 0 ) ) { - if ( ( pass ) && ( do_moves ) && ( (idx - lag + 2) >= 0 ) && - ( (idx - lag + 2) <= max_indices[type] ) && - ( ( (idx - lag + 2) % 3 ) == 0 ) ) { + if ( verbose ) + HDfprintf(stdout, "(r, %d, %d, %d) ", + type, tmp_idx, (int)move_to_main_addr); - move_entry(cache_ptr, type, (idx - lag + 2), - move_to_main_addr); + move_entry(cache_ptr, type, tmp_idx, move_to_main_addr); } - - if ( ( pass ) && ( (idx - lag + 3) >= 0 ) && - ( (idx - lag + 3) <= max_indices[type] ) && - ( ( (idx - lag + 3) % 5 ) == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 5 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 3)); + HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx); protect_entry(file_ptr, type, (idx - lag + 3)); } - if ( ( pass ) && ( (idx - lag + 5) >= 0 ) && - ( (idx - lag + 5) <= max_indices[type] ) && - ( ( (idx - lag + 5) % 5 ) == 0 ) ) { + tmp_idx += 2; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 5 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 5)); + HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, idx-lag+5, H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } + /* (don't increment tmp_idx) */ if ( do_mult_ro_protects ) { - if ( ( pass ) && ( (idx - lag + 5) >= 0 ) && - ( (idx - lag + 5) < max_indices[type] ) && - ( (idx - lag + 5) % 9 == 0 ) ) { + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx - lag + 5)); + HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx - lag + 5)); + protect_entry_ro(file_ptr, type, tmp_idx); } - if ( ( pass ) && ( (idx - lag + 6) >= 0 ) && - ( (idx - lag + 6) < max_indices[type] ) && - ( (idx - lag + 6) % 11 == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx - lag + 6)); + HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx - lag + 6)); + protect_entry_ro(file_ptr, type, tmp_idx); } - if ( ( pass ) && ( (idx - lag + 7) >= 0 ) && - ( (idx - lag + 7) < max_indices[type] ) && - ( (idx - lag + 7) % 13 == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, - (idx - lag + 7)); + HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx); - protect_entry_ro(file_ptr, type, (idx - lag + 7)); + protect_entry_ro(file_ptr, type, tmp_idx); } - if ( ( pass ) && ( (idx - lag + 7) >= 0 ) && - ( (idx - lag + 7) < max_indices[type] ) && - ( (idx - lag + 7) % 9 == 0 ) ) { + /* (don't increment tmp_idx) */ + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx - lag + 7)); + HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, (idx - lag + 7), H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } - if ( ( pass ) && ( (idx - lag + 8) >= 0 ) && - ( (idx - lag + 8) < max_indices[type] ) && - ( (idx - lag + 8) % 11 == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx - lag + 8)); + HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, (idx - lag + 8), H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } - if ( ( pass ) && ( (idx - lag + 9) >= 0 ) && - ( (idx - lag + 9) < max_indices[type] ) && - ( (idx - lag + 9) % 13 == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx < local_max_index ) && + ( tmp_idx % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, - (idx - lag + 9)); + HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, (idx - lag + 9), H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } } /* if ( do_mult_ro_protects ) */ - if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) { + if ( ( pass ) && ( idx >= 0 ) && ( idx <= local_max_index ) ) { if ( verbose ) HDfprintf(stdout, "(p, %d, %d) ", type, idx); @@ -4143,32 +4714,33 @@ row_major_scan_backward(H5F_t * file_ptr, protect_entry(file_ptr, type, idx); } - - if ( ( pass ) && ( (idx + lag - 2) >= 0 ) && - ( (idx + lag - 2) <= max_indices[type] ) && - ( ( (idx + lag - 2) % 7 ) == 0 ) ) { + tmp_idx = idx + lag - 2; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 7 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2)); + HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx); - unprotect_entry(file_ptr, type, idx+lag-2, H5C__NO_FLAGS_SET); + unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); } - if ( ( pass ) && ( (idx + lag - 1) >= 0 ) && - ( (idx + lag - 1) <= max_indices[type] ) && - ( ( (idx + lag - 1) % 7 ) == 0 ) ) { + tmp_idx++; + if ( ( pass ) && ( tmp_idx >= 0 ) && + ( tmp_idx <= local_max_index ) && + ( ( tmp_idx % 7 ) == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1)); + HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx); - protect_entry(file_ptr, type, (idx + lag - 1)); + protect_entry(file_ptr, type, tmp_idx); } if ( do_destroys ) { if ( ( pass ) && ( (idx + lag) >= 0 ) && - ( ( idx + lag) <= max_indices[type] ) ) { + ( ( idx + lag) <= local_max_index ) ) { switch ( (idx + lag) % 4 ) { @@ -4211,7 +4783,7 @@ row_major_scan_backward(H5F_t * file_ptr, } else { if ( ( pass ) && ( (idx + lag) >= 0 ) && - ( ( idx + lag) <= max_indices[type] ) ) { + ( ( idx + lag) <= local_max_index ) ) { if ( verbose ) HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag)); @@ -4361,6 +4933,7 @@ hl_row_major_scan_backward(H5F_t * file_ptr, void col_major_scan_forward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -4372,14 +4945,19 @@ col_major_scan_forward(H5F_t * file_ptr, H5C_t * cache_ptr = NULL; int32_t type = 0; int32_t idx; + int32_t local_max_index[NUMBER_OF_ENTRY_TYPES]; if ( verbose ) HDfprintf(stdout, "%s: entering.\n", FUNC); if ( pass ) { + int i; cache_ptr = file_ptr->shared->cache; + for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) + local_max_index[i] = MIN(max_index, max_indices[i]); + HDassert( lag > 5 ); if ( reset_stats ) { @@ -4397,7 +4975,7 @@ col_major_scan_forward(H5F_t * file_ptr, while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) ) { if ( ( pass ) && ( do_inserts ) && ( (idx + lag) >= 0 ) && - ( (idx + lag) <= max_indices[type] ) && + ( (idx + lag) <= local_max_index[type] ) && ( ((idx + lag) % 3) == 0 ) && ( ! entry_in_cache(cache_ptr, type, (idx + lag)) ) ) { @@ -4407,7 +4985,9 @@ col_major_scan_forward(H5F_t * file_ptr, insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET); } - if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) { + if ( ( pass ) && + ( idx >= 0 ) && + ( idx <= local_max_index[type] ) ) { if ( verbose ) HDfprintf(stdout, "(p, %d, %d) ", type, idx); @@ -4416,7 +4996,7 @@ col_major_scan_forward(H5F_t * file_ptr, } if ( ( pass ) && ( (idx - lag) >= 0 ) && - ( (idx - lag) <= max_indices[type] ) ) { + ( (idx - lag) <= local_max_index[type] ) ) { if ( verbose ) HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag)); @@ -4529,7 +5109,7 @@ hl_col_major_scan_forward(H5F_t * file_ptr, } if ( ( pass ) && ( i >= 0 ) && - ( i <= max_indices[type] ) ) { + ( i <= local_max_index ) ) { if ( verbose ) HDfprintf(stdout, "(u, %d, %d) ", type, i); @@ -4577,6 +5157,7 @@ hl_col_major_scan_forward(H5F_t * file_ptr, void col_major_scan_backward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -4589,16 +5170,21 @@ col_major_scan_backward(H5F_t * file_ptr, int mile_stone = 1; int32_t type; int32_t idx; + int32_t local_max_index[NUMBER_OF_ENTRY_TYPES]; if ( verbose ) HDfprintf(stdout, "%s: entering.\n", FUNC); if ( pass ) { + int i; cache_ptr = file_ptr->shared->cache; HDassert( cache_ptr != NULL ); + for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) + local_max_index[i] = MIN(max_index, max_indices[i]); + HDassert( lag > 5 ); if ( reset_stats ) { @@ -4607,7 +5193,7 @@ col_major_scan_backward(H5F_t * file_ptr, } } - idx = MAX_ENTRIES + lag; + idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag; if ( verbose ) /* 1 */ HDfprintf(stdout, "%s: point %d.\n", FUNC, mile_stone++); @@ -4620,7 +5206,7 @@ col_major_scan_backward(H5F_t * file_ptr, while ( ( pass ) && ( type >= 0 ) ) { if ( ( pass ) && ( do_inserts) && ( (idx - lag) >= 0 ) && - ( (idx - lag) <= max_indices[type] ) && + ( (idx - lag) <= local_max_index[type] ) && ( ((idx - lag) % 3) == 0 ) && ( ! entry_in_cache(cache_ptr, type, (idx - lag)) ) ) { @@ -4630,7 +5216,9 @@ col_major_scan_backward(H5F_t * file_ptr, insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET); } - if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) { + if ( ( pass ) && + ( idx >= 0 ) && + ( idx <= local_max_index[type] ) ) { if ( verbose ) HDfprintf(stdout, "(p, %d, %d) ", type, idx); @@ -4639,7 +5227,7 @@ col_major_scan_backward(H5F_t * file_ptr, } if ( ( pass ) && ( (idx + lag) >= 0 ) && - ( (idx + lag) <= max_indices[type] ) ) { + ( (idx + lag) <= local_max_index[type] ) ) { if ( verbose ) HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag)); @@ -5445,3 +6033,73 @@ validate_mdc_config(hid_t file_id, } /* validate_mdc_config() */ + +#if 0 /* debugging functions -- normally commented out */ +/*------------------------------------------------------------------------- + * Function: dump_LRU + * + * Purpose: Display a summarize list of the contents of the LRU + * from head to tail. + * + * Return: void + * + * Programmer: John Mainzer + * 2/16/15 + * + *------------------------------------------------------------------------- + */ +void +dump_LRU(H5F_t * file_ptr) +{ + const char * hdr_0 = + " Entry Entry Entry Entry Entry \n"; + const char * hdr_1 = + " Num: Dirty: Size: Addr: Type: \n"; + const char * hdr_2 = + "==============================================================\n"; + int i = 0; + H5C_cache_entry_t * entry_ptr = NULL; + H5C_t *cache_ptr = file_ptr->shared->cache; + + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + + entry_ptr = cache_ptr->LRU_head_ptr; + + HDfprintf(stdout, + "\n\nIndex len/size/clean size/dirty size = %d/%lld/%lld/%lld\n", + cache_ptr->index_len, (long long)(cache_ptr->index_size), + (long long)(cache_ptr->clean_index_size), + (long long)(cache_ptr->dirty_index_size)); + HDfprintf(stdout, "\nLRU len/size = %d/%lld.\n\n", + cache_ptr->LRU_list_len, (long long)(cache_ptr->LRU_list_size)); + + if ( entry_ptr != NULL ) + { + HDfprintf(stdout, "%s%s%s", hdr_0, hdr_1, hdr_2); + } + + while ( entry_ptr != NULL ) + { + HDfprintf(stdout, + " %3d %d %10lld 0x%010llx %s(%d)\n", + i, + (int)(entry_ptr->is_dirty), + (long long)(entry_ptr->size), + (long long)(entry_ptr->addr), + entry_ptr->type->name, + entry_ptr->type->id); + i++; + entry_ptr = entry_ptr->next; + } + + if ( cache_ptr->LRU_list_len > 0 ) + { + HDfprintf(stdout, "%s\n", hdr_2); + } + + return; + +} /* dump_LRU() */ + +#endif /* debugging functions -- normally commented out */ diff --git a/test/cache_common.h b/test/cache_common.h index 48b95d8..737c53f 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -138,12 +138,14 @@ * directly pinned by a single entry. */ -#define FLUSH_OP__NO_OP 0 -#define FLUSH_OP__DIRTY 1 -#define FLUSH_OP__RESIZE 2 -#define FLUSH_OP__MOVE 3 -#define FLUSH_OP__ORDER 4 -#define FLUSH_OP__MAX_OP 4 +#define FLUSH_OP__NO_OP 0 +#define FLUSH_OP__DIRTY 1 +#define FLUSH_OP__RESIZE 2 +#define FLUSH_OP__MOVE 3 +#define FLUSH_OP__ORDER 4 +#define FLUSH_OP__EXPUNGE 5 +#define FLUSH_OP__DEST_FLUSH_DEP 6 +#define FLUSH_OP__MAX_OP 6 #define MAX_FLUSH_OPS 10 /* Maximum number of flush operations * that can be associated with a @@ -214,10 +216,32 @@ typedef struct test_entry_t struct test_entry_t * self; /* pointer to this entry -- used for * sanity checking. */ + H5F_t * file_ptr; /* pointer to the file in which the + * entry resides, or NULL if the entry + * is not in a file. + */ H5C_t * cache_ptr; /* pointer to the cache in which * the entry resides, or NULL if the * entry is not in cache. */ + hbool_t written_to_main_addr; + /* Flag indicating whether an image + * of the entry has been written to + * its main address. Since we no + * longer have a flush callback, we + * set this field to true whenever the + * entry is serialized while at its + * main address. + */ + hbool_t written_to_alt_addr; + /* Flag indicating whether an image + * of the entry has been written to + * its alternate address. Since we no + * longer have a flush callback, we + * set this field to true whenever the + * entry is serialized while at its + * alternate address. + */ haddr_t addr; /* where the cache thinks this entry * is located */ @@ -239,11 +263,11 @@ typedef struct test_entry_t */ int32_t index; /* index in its entry array */ - int32_t reads; /* number of times this entry has - * been loaded. + int32_t serializes; /* number of times this entry has + * been serialized. */ - int32_t writes; /* number of times this entry has - * been written + int32_t deserializes; /* number of times this entry has + * been deserialized */ hbool_t is_dirty; /* entry has been modified since * last write @@ -302,16 +326,16 @@ typedef struct test_entry_t * checking code that would otherwise * cause a false test failure. */ - hbool_t loaded; /* entry has been loaded since the - * last time it was reset. + hbool_t deserialized; /* entry has been deserialized since + * the last time it was reset. */ - hbool_t cleared; /* entry has been cleared since the + hbool_t serialized; /* entry has been serialized since the * last time it was reset. */ - hbool_t flushed; /* entry has been flushed since the + hbool_t destroyed; /* entry has been destroyed since the * last time it was reset. */ - hbool_t destroyed; /* entry has been destroyed since the + hbool_t expunged; /* entry has been expunged since the * last time it was reset. */ int flush_dep_par_type; /* Entry type of flush dependency parent */ @@ -471,9 +495,6 @@ if ( ( (cache_ptr) == NULL ) || \ (i).flash_threshold = (e).flash_threshold; \ (i).decr_mode = (e).decr_mode; \ (i).upper_hr_threshold = (e).upper_hr_threshold; \ - (i).flash_incr_mode = (e).flash_incr_mode; \ - (i).flash_multiple = (e).flash_multiple; \ - (i).flash_threshold = (e).flash_threshold; \ (i).decrement = (e).decrement; \ (i).apply_max_decrement = (e).apply_max_decrement; \ (i).max_decrement = (e).max_decrement; \ @@ -490,15 +511,14 @@ struct expected_entry_status int entry_type; int entry_index; size_t size; - unsigned char in_cache; - unsigned char at_main_addr; - unsigned char is_dirty; - unsigned char is_protected; - unsigned char is_pinned; - unsigned char loaded; - unsigned char cleared; - unsigned char flushed; - unsigned char destroyed; + hbool_t in_cache; + hbool_t at_main_addr; + hbool_t is_dirty; + hbool_t is_protected; + hbool_t is_pinned; + hbool_t deserialized; + hbool_t serialized; + hbool_t destroyed; int flush_dep_par_type; /* Entry type of flush dependency parent */ int flush_dep_par_idx; /* Index of flush dependency parent */ uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS]; @@ -514,12 +534,9 @@ struct expected_entry_status /* global variable externs: */ -extern const char *FILENAME[3]; - +extern haddr_t saved_actual_base_addr; extern hbool_t write_permitted; extern hbool_t pass; /* set to false on error */ -extern hbool_t skip_long_tests; -extern hbool_t run_full_test; extern const char *failure_mssg; extern test_entry_t * entries[NUMBER_OF_ENTRY_TYPES]; @@ -609,6 +626,7 @@ void resize_entry(H5F_t * file_ptr, H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size); void row_major_scan_forward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -631,6 +649,7 @@ void hl_row_major_scan_forward(H5F_t * file_ptr, hbool_t do_inserts); void row_major_scan_backward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -653,6 +672,7 @@ void hl_row_major_scan_backward(H5F_t * file_ptr, hbool_t do_inserts); void col_major_scan_forward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -671,6 +691,7 @@ void hl_col_major_scan_forward(H5F_t * file_ptr, int dirty_unprotects); void col_major_scan_backward(H5F_t * file_ptr, + int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats, @@ -747,5 +768,10 @@ void validate_mdc_config(hid_t file_id, hbool_t compare_init, int test_num); +/** Debugging functions -- normally commented out ***/ +#if 0 +void dump_LRU(H5F_t * file_ptr); +#endif + #endif /* _CACHE_COMMON_H */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 9209f6d..84c9b34 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -457,7 +457,7 @@ static int evict_entries(hid_t fid) /* Evict all we can from the cache to examine full tag creation tree */ /* This function will likely return failure since the root group * is still protected. Thus, don't check its return value. */ - H5C_flush_cache(f, H5P_DEFAULT, H5P_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); + H5C_flush_cache(f, H5P_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG); return 0; @@ -3866,13 +3866,13 @@ check_invalid_tag_application(void) /* Call H5HL_protect to protect the local heap created above. */ /* This should fail as no tag is set up during the protect call */ - if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC_WRITE)) != NULL ) TEST_ERROR; + if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR; /* Again, set up a valid tag in the DXPL */ if ( H5AC_tag(H5AC_ind_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR; /* Call H5HL_protect again to protect the local heap. This should succeed. */ - if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC_WRITE)) == NULL ) TEST_ERROR; + if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR; /* Now unprotect the heap, as we're done with the test. */ if ( H5HL_unprotect(lheap) < 0 ) TEST_ERROR; diff --git a/test/earray.c b/test/earray.c index 8a355c8..feaa15e 100644 --- a/test/earray.c +++ b/test/earray.c @@ -160,11 +160,26 @@ typedef struct earray_test_t { /* Local prototypes */ /* Metadata cache (H5AC) callbacks */ -static earray_test_t *earray_cache_test_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *udata, void *udata2); -static herr_t earray_cache_test_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, earray_test_t *test, unsigned * flags_ptr); -static herr_t earray_cache_test_clear(H5F_t *f, earray_test_t *test, hbool_t destroy); -static herr_t earray_cache_test_size(const H5F_t *f, const earray_test_t *test, size_t *size_ptr); -static herr_t earray_cache_test_dest(H5F_t *f, earray_test_t *test); + +static herr_t earray_cache_test_get_load_size(const void *udata_ptr, + size_t *image_len_ptr); + +static void *earray_cache_test_deserialize(const void *image_ptr, + size_t len, + void *udata_ptr, + hbool_t *dirty_ptr); + +static herr_t earray_cache_test_image_len(const void *thing, + size_t *image_len_ptr, + hbool_t *compressed_ptr, + size_t * compressed_len_ptr); + +static herr_t earray_cache_test_serialize(const H5F_t *f, + void *image_ptr, + size_t len, + void *thing); + +static herr_t earray_cache_test_free_icr(void *thing); /* Local variables */ @@ -181,13 +196,19 @@ h5_stat_size_t empty_size_g; /* H5EA test object inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_EARRAY_TEST[1] = {{ - H5AC_TEST_ID, - (H5AC_load_func_t)earray_cache_test_load, - (H5AC_flush_func_t)earray_cache_test_flush, - (H5AC_dest_func_t)earray_cache_test_dest, - (H5AC_clear_func_t)earray_cache_test_clear, - (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)earray_cache_test_size, + /* id */ H5AC_TEST_ID, + /* name */ "earray test", + /* mem_type */ H5FD_MEM_DEFAULT, + /* flags */ H5AC__CLASS_NO_IO_FLAG, + /* get_load_size */ (H5AC_get_load_size_func_t)earray_cache_test_get_load_size, + /* deserialize */ (H5AC_deserialize_func_t)earray_cache_test_deserialize, + /* image_len */ (H5AC_image_len_func_t)earray_cache_test_image_len, + /* pre_serialize */ (H5AC_pre_serialize_func_t)NULL, + /* serialize */ (H5AC_serialize_func_t)earray_cache_test_serialize, + /* notify */ (H5AC_notify_func_t)NULL, + /* free_icr */ (H5AC_free_icr_func_t)earray_cache_test_free_icr, + /* clear */ NULL, + /* fsf_size */ NULL, }}; @@ -610,196 +631,244 @@ error: /*------------------------------------------------------------------------- - * Function: earray_cache_test_load + * Function: earray_cache_test_get_load_size() * - * Purpose: Loads an extensible array test object from the disk. + * Purpose: place holder function -- should never be called * - * Return: Success: Pointer to a new extensible array test object - * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * May 26 2009 + * A generic discussion of metadata cache callbacks of this type + * may be found in H5Cprivate.h: + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 8/2/14 * *------------------------------------------------------------------------- */ -static earray_test_t * -earray_cache_test_load(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr, const void H5_ATTR_UNUSED *udata1, void H5_ATTR_UNUSED *udata2) +static herr_t +earray_cache_test_get_load_size(const void *udata_ptr, size_t *image_len_ptr) { - /* Check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); + HDassert(udata_ptr); + HDassert(image_len_ptr); /* Should never be called */ HDassert(0 && "Can't be called!"); - return(NULL); -} /* end earray_cache_test_load() */ + *image_len_ptr = 0; + + return(SUCCEED); + +} /* end earray_cache_test_get_load_size() */ /*------------------------------------------------------------------------- - * Function: earray_cache_test_flush + * Function: earray_cache_test_deserialize * - * Purpose: Flushes a dirty extensible array test object to disk. + * Purpose: place holder function -- should never be called. * - * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * May 26 2009 + * A generic discussion of metadata cache callbacks of this type + * may be found in H5Cprivate.h: + * + * Return: Success: Pointer to in core representation + * Failure: NULL + * + * Programmer: John Mainzer + * 8/2/14 * *------------------------------------------------------------------------- */ -static herr_t -earray_cache_test_flush(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, earray_test_t *test, unsigned H5_ATTR_UNUSED * flags_ptr) +static void * +earray_cache_test_deserialize(const void *image_ptr, + size_t len, + void *udata_ptr, + hbool_t *dirty_ptr) { - /* check arguments */ - HDassert(f); - HDassert(H5F_addr_defined(addr)); - HDassert(test); - - if(test->cache_info.is_dirty) { - /* Check for out of order flush */ - if(test->fd_info->base_obj) - TEST_ERROR - - /* Check which index this entry corresponds to */ - if((uint64_t)0 == test->idx) { - /* Check for out of order flush */ - if(test->fd_info->idx0_obj || test->fd_info->idx0_elem) - TEST_ERROR + HDassert(image_ptr); + HDassert(len > 0 ); + HDassert(udata_ptr); + HDassert(dirty_ptr); - /* Set flag for object flush */ - test->fd_info->idx0_obj = TRUE; - } /* end if */ - else if((uint64_t)1 == test->idx) { - /* Check for out of order flush */ - if(test->fd_info->idx1_obj || test->fd_info->idx1_elem) - TEST_ERROR - /* Set flag for object flush */ - test->fd_info->idx1_obj = TRUE; - } /* end if */ - else if((uint64_t)10000 == test->idx) { - /* Check for out of order flush */ - if(test->fd_info->idx10000_obj || test->fd_info->idx10000_elem) - TEST_ERROR - - /* Set flag for object flush */ - test->fd_info->idx10000_obj = TRUE; - } /* end if */ - else if((uint64_t)-1 == test->idx) { - /* Set flag for object flush */ - test->fd_info->base_obj = TRUE; - } /* end if */ - - /* Mark the entry as clean */ - test->cache_info.is_dirty = FALSE; - } /* end if */ - - if(destroy) - if(earray_cache_test_dest(f, test) < 0) - TEST_ERROR + /* Should never be called */ + HDassert(0 && "Can't be called!"); - return(SUCCEED); + return(NULL); -error: - return(FAIL); -} /* earray_cache_test_flush() */ +} /* end earray_cache_test_deserialize() */ /*------------------------------------------------------------------------- - * Function: earray_cache_test_dest + * Function: earray_cache_test_image_len * - * Purpose: Destroys an extensible array test object in memory. + * Purpose: test code place holder function -- just set *image_len_ptr to + * one. * - * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * May 26 2009 + * A generic discussion of metadata cache callbacks of this type + * may be found in H5Cprivate.h: + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 8/2/14 * *------------------------------------------------------------------------- */ -herr_t -earray_cache_test_dest(H5F_t H5_ATTR_UNUSED *f, earray_test_t *test) +static herr_t +earray_cache_test_image_len(const void *thing, size_t *image_len_ptr, + hbool_t H5_ATTR_UNUSED * compressed_ptr, size_t H5_ATTR_UNUSED * compressed_len_ptr) { - /* - * Check arguments. - */ - HDassert(test); - /* Free the shared info itself */ - HDfree(test); + HDassert(thing); + HDassert(image_len_ptr); + + /* Set size value */ + /* (hard-code to 1) */ + *image_len_ptr = 1; return(SUCCEED); -} /* end earray_cache_test_dest() */ + +} /* end earray_cache_test_image_len() */ + + +/********************************/ +/* no H5O_cache_pre_serialize() */ +/********************************/ /*------------------------------------------------------------------------- - * Function: earray_cache_test_clear + * Function: earray_cache_test_serialize * - * Purpose: Mark an extensible array test object in memory as non-dirty. + * Purpose: Validate the contents of the instance of earray_test_t. * - * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * May 26 2009 + * A generic discussion of metadata cache callbacks of this type + * may be found in H5Cprivate.h: + * + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 8/2/14 * *------------------------------------------------------------------------- */ static herr_t -earray_cache_test_clear(H5F_t *f, earray_test_t *test, hbool_t destroy) +earray_cache_test_serialize(const H5F_t *f, + void *image_ptr, + H5_ATTR_UNUSED size_t len, + void *thing) { - /* - * Check arguments. - */ + earray_test_t *test = NULL; + + HDassert(f); + HDassert(image_ptr); + HDassert(thing); + + test = (earray_test_t *)thing; + HDassert(test); + HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert((const H5AC_class_t *)(test->cache_info.type) == + &(H5AC_EARRAY_TEST[0])); - /* Reset the dirty flag. */ - test->cache_info.is_dirty = FALSE; + /* Check for out of order flush */ + if(test->fd_info->base_obj) + TEST_ERROR - if(destroy) - if(earray_cache_test_dest(f, test) < 0) + /* Check which index this entry corresponds to */ + if((uint64_t)0 == test->idx) { + /* Check for out of order flush */ + if(test->fd_info->idx0_obj || test->fd_info->idx0_elem) TEST_ERROR + /* Set flag for object flush */ + test->fd_info->idx0_obj = TRUE; + } /* end if */ + else if((uint64_t)1 == test->idx) { + /* Check for out of order flush */ + if(test->fd_info->idx1_obj || test->fd_info->idx1_elem) + TEST_ERROR + + /* Set flag for object flush */ + test->fd_info->idx1_obj = TRUE; + } /* end if */ + else if((uint64_t)10000 == test->idx) { + /* Check for out of order flush */ + if(test->fd_info->idx10000_obj || test->fd_info->idx10000_elem) + TEST_ERROR + + /* Set flag for object flush */ + test->fd_info->idx10000_obj = TRUE; + } /* end if */ + else if((uint64_t)-1 == test->idx) { + /* Set flag for object flush */ + test->fd_info->base_obj = TRUE; + } /* end if */ + return(SUCCEED); error: + return(FAIL); -} /* end earray_cache_test_clear() */ + +} /* end earray_cache_test_serialize() */ + + +/******************************************/ +/* no earray_cache_test_notify() function */ +/******************************************/ /*------------------------------------------------------------------------- - * Function: earray_cache_test_size + * Function: earray_cache_test_free_icr * - * Purpose: Compute the size in bytes of an extensible array test object - * on disk, and return it in *size_ptr. On failure, - * the value of *size_ptr is undefined. + * Purpose: Destroy an extensible array test object in memory. * - * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * May 26 2009 + * A generic discussion of metadata cache callbacks of this type + * may be found in H5Cprivate.h: + * + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: John Mainzer + * 8/2/14 * *------------------------------------------------------------------------- */ static herr_t -earray_cache_test_size(const H5F_t H5_ATTR_UNUSED *f, const earray_test_t H5_ATTR_UNUSED *test, size_t *size_ptr) +earray_cache_test_free_icr(void *thing) { - /* check arguments */ - HDassert(f); + earray_test_t *test = NULL; + + HDassert(thing); + + test = (earray_test_t *)thing; + HDassert(test); - HDassert(size_ptr); - /* Set size value */ - /* (hard-code to 1) */ - *size_ptr = 1; + /* the metadata cache sets cache_info.magic to + * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling the + * free_icr routine. Hence the following assert: + */ + + HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); + HDassert((const H5AC_class_t *)(test->cache_info.type) == + &(H5AC_EARRAY_TEST[0])); + + /* Free the shared info itself */ + HDfree(test); return(SUCCEED); -} /* earray_cache_test_size() */ + +} /* end earray_cache_test_free_icr() */ /*------------------------------------------------------------------------- @@ -1541,7 +1610,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR TEST_ERROR /* Protect the base entry */ - if(NULL == (base_entry = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, NULL, H5AC_WRITE))) + if(NULL == (base_entry = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, NULL, H5AC__NO_FLAGS_SET))) TEST_ERROR /* Unprotect & unpin the base entry */ @@ -1553,7 +1622,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR TEST_ERROR /* Protect the test entry */ - if(NULL == (entry1 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, NULL, H5AC_WRITE))) + if(NULL == (entry1 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, NULL, H5AC__NO_FLAGS_SET))) TEST_ERROR /* Unprotect & unpin the test entry */ @@ -1565,7 +1634,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR TEST_ERROR /* Protect the test entry */ - if(NULL == (entry2 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, NULL, H5AC_WRITE))) + if(NULL == (entry2 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, NULL, H5AC__NO_FLAGS_SET))) TEST_ERROR /* Unprotect & unpin the test entry */ @@ -1577,7 +1646,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR TEST_ERROR /* Protect the test entry */ - if(NULL == (entry3 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, NULL, H5AC_WRITE))) + if(NULL == (entry3 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, NULL, H5AC__NO_FLAGS_SET))) TEST_ERROR /* Unprotect & unpin the test entry */ diff --git a/test/lheap.c b/test/lheap.c index 51ae25b..bdb6360 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -94,7 +94,7 @@ main(void) H5Eprint2(H5E_DEFAULT, stdout); goto error; } - if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_WRITE))) { + if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__NO_FLAGS_SET))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; @@ -144,7 +144,7 @@ main(void) if(j > 4) buf[j] = '\0'; - if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) { + if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__READ_ONLY_FLAG))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; diff --git a/test/ohdr.c b/test/ohdr.c index 0ed3d97..1ba2b10 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -210,7 +210,7 @@ test_ohdr_cache(char *filename, hid_t fapl) FAIL_STACK_ERROR /* Protect local heap (which actually pins it in the cache) */ - if(NULL == (lheap = H5HL_protect(f, my_dxpl, lheap_addr, H5AC_READ))) + if(NULL == (lheap = H5HL_protect(f, my_dxpl, lheap_addr, H5AC__READ_ONLY_FLAG))) FAIL_STACK_ERROR /* Create an object header */ @@ -230,7 +230,7 @@ test_ohdr_cache(char *filename, hid_t fapl) FAIL_STACK_ERROR /* Protect local heap (which actually pins it in the cache) */ - if(NULL == (lheap2 = H5HL_protect(f, my_dxpl, lheap_addr2, H5AC_READ))) + if(NULL == (lheap2 = H5HL_protect(f, my_dxpl, lheap_addr2, H5AC__READ_ONLY_FLAG))) FAIL_STACK_ERROR /* Unprotect local heap (which actually unpins it from the cache) */ @@ -247,7 +247,7 @@ test_ohdr_cache(char *filename, hid_t fapl) FAIL_STACK_ERROR /* Protect local heap (which actually pins it in the cache) */ - if(NULL == (lheap3 = H5HL_protect(f, my_dxpl, lheap_addr3, H5AC_READ))) + if(NULL == (lheap3 = H5HL_protect(f, my_dxpl, lheap_addr3, H5AC__READ_ONLY_FLAG))) FAIL_STACK_ERROR /* Unprotect local heap (which actually unpins it from the cache) */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index b6c7870..18140ad 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -29,9 +29,10 @@ #include "H5Cpkg.h" #include "H5Fpkg.h" #include "H5Iprivate.h" +#include "H5MFprivate.h" -#define BASE_ADDR (haddr_t)512 +#define BASE_ADDR (haddr_t)1024 int nerrors = 0; @@ -46,6 +47,14 @@ const char *FILENAME[NFILENAME]={"CacheTestDummy", NULL}; #endif /* !PATH_MAX */ char filenames[NFILENAME][PATH_MAX]; hid_t fapl; /* file access property list */ +haddr_t max_addr = 0; /* used to store the end of + * the address space used by + * the data array (see below). + */ +hbool_t callbacks_verbose = FALSE; /* flag used to control whether + * the callback functions are in + * verbose mode. + */ int world_mpi_size = -1; @@ -129,11 +138,11 @@ int total_writes = 0; * processes, and thus cannot be marked as dirty unless they * happen to overlap some collective operation. * - * cleared: Boolean flag that is set to true whenever the entry is - * dirty, and is cleared via a call to clear_datum(). + * cleared: Boolean flag that is set to true whenever the entry is + * dirty, and is cleared via a call to datum_clear(). * - * flushed: Boolean flag that is set to true whenever the entry is - * dirty, and is flushed via a call to flush_datum(). + * flushed: Boolean flag that is set to true whenever the entry is + * dirty, and is flushed by the metadata cache. * * reads: Integer field used to maintain a count of the number of * times this entry has been read from the server since @@ -146,6 +155,12 @@ int total_writes = 0; * index: Index of this instance of datum in the data_index[] array * discussed below. * + * aux_ptr: Pointer to the instance of H5AC_aux_t associated with the + * instance of the metadata cache within which this entry + * resides. This field was added to allow us to pass this + * value to the notify callback from the serialize callback. + * It should be NULL when not in use. + * *****************************************************************************/ struct datum @@ -165,6 +180,7 @@ struct datum int reads; int writes; int index; + struct H5AC_aux_t * aux_ptr; }; /***************************************************************************** @@ -373,28 +389,65 @@ static hbool_t serve_rw_count_reset_request(struct mssg_t * mssg_ptr); /* call back functions & related data structures */ -static herr_t clear_datum(H5F_t * f, void * thing, hbool_t dest); -static herr_t destroy_datum(H5F_t H5_ATTR_UNUSED * f, void * thing); -static herr_t flush_datum(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t dest, haddr_t addr, - void *thing); -static void * load_datum(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, - void H5_ATTR_UNUSED *udata); -static herr_t size_datum(H5F_t H5_ATTR_UNUSED * f, void * thing, size_t * size_ptr); +static herr_t datum_get_load_size(const void * udata_ptr, + size_t *image_len_ptr); + +static void * datum_deserialize(const void * image_ptr, + size_t len, + void * udata_ptr, + hbool_t * dirty_ptr); + +static herr_t datum_image_len(void *thing, + size_t *image_len_ptr, + hbool_t *compressed_ptr, + size_t *compressed_len_ptr); + +static herr_t datum_serialize(const H5F_t *f, + void *image_ptr, + size_t len, + void *thing_ptr); + +static herr_t datum_notify(H5C_notify_action_t action, void *thing); + +static herr_t datum_free_icr(void * thing); + +static herr_t datum_clear(H5F_t * f, void * thing, hbool_t about_to_destroy); #define DATUM_ENTRY_TYPE H5AC_TEST_ID #define NUMBER_OF_ENTRY_TYPES 1 + +/* Note the use of the H5AC__CLASS_SKIP_READS and H5AC__CLASS_SKIP_WRITES + * flags. As a result of these flags, the metadata cache does no file I/O + * on metadata of the datum type. + * + * Instead, this test uses a server process to keep track of who has + * written and read what, and to verify that there are no messages from + * the past / future. + * + * In the callbacks for the version 2 cache, this activity was hidden in + * the load and flush callbacks. However, now we handle this function in + * notify callbacks for the after load and after flush events. + * + * JRM -- 1/13/15 + */ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = { { - DATUM_ENTRY_TYPE, - (H5C_load_func_t)load_datum, - (H5C_flush_func_t)flush_datum, - (H5C_dest_func_t)destroy_datum, - (H5C_clear_func_t)clear_datum, - (H5C_notify_func_t)NULL, - (H5C_size_func_t)size_datum + /* id */ DATUM_ENTRY_TYPE, + /* name */ "datum", + /* mem_type */ H5FD_MEM_DEFAULT, + /* flags */ H5AC__CLASS_SKIP_READS | H5AC__CLASS_SKIP_WRITES, + /* get_load_size */ (H5AC_get_load_size_func_t)datum_get_load_size, + /* deserialize */ (H5AC_deserialize_func_t)datum_deserialize, + /* image_len */ (H5AC_image_len_func_t)datum_image_len, + /* pre_serialize */ (H5AC_pre_serialize_func_t)NULL, + /* serialize */ (H5AC_serialize_func_t)datum_serialize, + /* notify */ (H5AC_notify_func_t)datum_notify, + /* free_icr */ (H5AC_free_icr_func_t)datum_free_icr, + /* clear */ (H5AC_clear_func_t)datum_clear, + /* fsf_size */ (H5AC_get_fsf_size_t)NULL, } }; @@ -787,6 +840,7 @@ init_data(void) data[i].reads = 0; data[i].writes = 0; data[i].index = i; + data[i].aux_ptr = NULL; data_index[i] = i; @@ -796,6 +850,9 @@ init_data(void) j = (j + 1) % num_addr_offsets; } + /* save the end of the address space used by the data array */ + max_addr = addr; + return; } /* init_data() */ @@ -2264,92 +2321,140 @@ serve_rw_count_reset_request(struct mssg_t * mssg_ptr) /*------------------------------------------------------------------------- - * Function: clear_datum + * Function: datum_get_load_size * - * Purpose: Mark the datum as clean and destroy it if requested. - * Do not write it to the server, or increment the version. + * Purpose: Query the image size for an entry before deserializing it * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: John Mainzer - * 12/29/05 + * Programmer: Quincey Koziol + * 5/18/10 * *------------------------------------------------------------------------- */ static herr_t -clear_datum(H5F_t * f, - void * thing, - hbool_t dest) +datum_get_load_size(const void * udata_ptr, + size_t *image_len_ptr) { + haddr_t addr = *(haddr_t *)udata_ptr; int idx; struct datum * entry_ptr; - HDassert( thing ); + HDassert( udata_ptr ); + HDassert( image_len_ptr ); - entry_ptr = (struct datum *)thing; - - idx = addr_to_datum_index(entry_ptr->base_addr); + idx = addr_to_datum_index(addr); HDassert( idx >= 0 ); HDassert( idx < NUM_DATA_ENTRIES ); HDassert( idx < virt_num_data_entries ); - HDassert( &(data[idx]) == entry_ptr ); - HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); - HDassert( ( entry_ptr->header.size == entry_ptr->len ) || - ( entry_ptr->header.size == entry_ptr->local_len ) ); + entry_ptr = &(data[idx]); - HDassert( entry_ptr->header.is_dirty == entry_ptr->dirty ); + HDassert( addr == entry_ptr->base_addr ); + HDassert( ! entry_ptr->global_pinned ); + HDassert( ! entry_ptr->local_pinned ); - if ( entry_ptr->header.is_dirty ) { + if ( callbacks_verbose ) { - entry_ptr->cleared = TRUE; + HDfprintf(stdout, + "%d: get_load_size() idx = %d, addr = %ld, len = %d.\n", + world_mpi_rank, idx, (long)addr, (int)entry_ptr->local_len); + fflush(stdout); } - entry_ptr->header.is_dirty = FALSE; - entry_ptr->dirty = FALSE; + /* Set image length size */ + *image_len_ptr = entry_ptr->local_len; - if ( dest ) { + return(SUCCEED); +} /* get_load_size() */ - destroy_datum(f, thing); + +/*------------------------------------------------------------------------- + * Function: datum_deserialize + * + * Purpose: deserialize the entry. + * + * Return: void * (pointer to the in core representation of the entry) + * + * Programmer: John Mainzer + * 9/20/07 + * + *------------------------------------------------------------------------- + */ +static void * +datum_deserialize(const void * image_ptr, + H5_ATTR_UNUSED size_t len, + void * udata_ptr, + hbool_t * dirty_ptr) +{ + haddr_t addr = *(haddr_t *)udata_ptr; + hbool_t success = TRUE; + int idx; + struct datum * entry_ptr = NULL; + + HDassert( image_ptr != NULL ); + idx = addr_to_datum_index(addr); + + HDassert( idx >= 0 ); + HDassert( idx < NUM_DATA_ENTRIES ); + HDassert( idx < virt_num_data_entries ); + + entry_ptr = &(data[idx]); + + HDassert( addr == entry_ptr->base_addr ); + HDassert( ! entry_ptr->global_pinned ); + HDassert( ! entry_ptr->local_pinned ); + + HDassert( dirty_ptr ); + + if ( callbacks_verbose ) { + + HDfprintf(stdout, + "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", + world_mpi_rank, idx, (long)addr, (int)len, + (int)(entry_ptr->header.is_dirty)); + fflush(stdout); } - datum_clears++; + *dirty_ptr = FALSE; - if ( entry_ptr->header.is_pinned ) { + if ( ! success ) { + + entry_ptr = NULL; - datum_pinned_clears++; - HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned ); } - return(SUCCEED); + return(entry_ptr); -} /* clear_datum() */ +} /* deserialize() */ /*------------------------------------------------------------------------- - * Function: destroy_datum() + * Function: datum_image_len * - * Purpose: Destroy the entry. At present, this means do nothing other - * than verify that the entry is clean. In particular, do not - * write it to the server process. + * Purpose: Return the real (and possibly reduced) length of the image. + * The helper functions verify that the correct version of + * deserialize is being called, and then call deserialize + * proper. * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: John Mainzer - * 12/29/05 + * Programmer: John Mainzer + * 9/19/07 * *------------------------------------------------------------------------- */ static herr_t -destroy_datum(H5F_t H5_ATTR_UNUSED * f, - void * thing) +datum_image_len(void *thing, size_t *image_len, + hbool_t H5_ATTR_UNUSED *compressed_ptr, size_t H5_ATTR_UNUSED *compressed_len_ptr) { int idx; struct datum * entry_ptr; HDassert( thing ); + HDassert( image_len ); entry_ptr = (struct datum *)thing; @@ -2359,55 +2464,53 @@ destroy_datum(H5F_t H5_ATTR_UNUSED * f, HDassert( idx < NUM_DATA_ENTRIES ); HDassert( idx < virt_num_data_entries ); HDassert( &(data[idx]) == entry_ptr ); + HDassert( entry_ptr->local_len > 0 ); + HDassert( entry_ptr->local_len <= entry_ptr->len ); - HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); - HDassert( ( entry_ptr->header.size == entry_ptr->len ) || - ( entry_ptr->header.size == entry_ptr->local_len ) ); + if(callbacks_verbose) { + HDfprintf(stdout, + "%d: image_len() idx = %d, addr = %ld, len = %d.\n", + world_mpi_rank, idx, (long)(entry_ptr->base_addr), + (int)(entry_ptr->local_len)); + fflush(stdout); + } - HDassert( !(entry_ptr->dirty) ); - HDassert( !(entry_ptr->header.is_dirty) ); - HDassert( !(entry_ptr->global_pinned) ); - HDassert( !(entry_ptr->local_pinned) ); - HDassert( !(entry_ptr->header.is_pinned) ); + HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); - datum_destroys++; + *image_len = entry_ptr->local_len; return(SUCCEED); - -} /* destroy_datum() */ +} /* datum_image_len() */ /*------------------------------------------------------------------------- - * Function: flush_datum + * Function: datum_serialize * - * Purpose: Flush the entry to the server process and mark it as clean. - * Then destroy the entry if requested. + * Purpose: Serialize the supplied entry. * - * Return: SUCCEED if successful, and FAIL otherwise. + * Return: SUCCEED if successful, FAIL otherwise. * - * Programmer: John Mainzer - * 12/29/05 + * Programmer: John Mainzer + * 10/30/07 * *------------------------------------------------------------------------- */ static herr_t -flush_datum(H5F_t *f, - hid_t H5_ATTR_UNUSED dxpl_id, - hbool_t dest, - haddr_t H5_ATTR_UNUSED addr, - void *thing) +datum_serialize(const H5F_t *f, + void *image_ptr, + size_t len, + void *thing_ptr) { - hbool_t was_dirty = FALSE; herr_t ret_value = SUCCEED; int idx; struct datum * entry_ptr; - struct mssg_t mssg; H5C_t * cache_ptr; struct H5AC_aux_t * aux_ptr; - HDassert( thing ); + HDassert( thing_ptr ); + HDassert( image_ptr ); - entry_ptr = (struct datum *)thing; + entry_ptr = (struct datum *)thing_ptr; HDassert( f ); HDassert( f->shared ); @@ -2420,7 +2523,11 @@ flush_datum(H5F_t *f, aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); + HDassert( aux_ptr ); HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ); + HDassert( entry_ptr->aux_ptr == NULL ); + + entry_ptr->aux_ptr = aux_ptr; idx = addr_to_datum_index(entry_ptr->base_addr); @@ -2429,96 +2536,19 @@ flush_datum(H5F_t *f, HDassert( idx < virt_num_data_entries ); HDassert( &(data[idx]) == entry_ptr ); - HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); - HDassert( ( entry_ptr->header.size == entry_ptr->len ) || - ( entry_ptr->header.size == entry_ptr->local_len ) ); - - HDassert( entry_ptr->header.is_dirty == entry_ptr->dirty ); - - if ( ( file_mpi_rank != 0 ) && - ( entry_ptr->dirty ) && - ( aux_ptr->metadata_write_strategy == - H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY ) ) { + if ( callbacks_verbose ) { - ret_value = FAIL; HDfprintf(stdout, - "%d:%s: Flushed dirty entry from non-zero file process.", - world_mpi_rank, FUNC); + "%d: serialize() idx = %d, addr = %ld, len = %d.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr, (int)len); + fflush(stdout); } - if ( ret_value == SUCCEED ) { - - if ( entry_ptr->header.is_dirty ) { - - was_dirty = TRUE; /* so we will receive the ack if requested */ - - /* compose the message */ - mssg.req = WRITE_REQ_CODE; - mssg.src = world_mpi_rank; - mssg.dest = world_server_mpi_rank; - mssg.mssg_num = -1; /* set by send function */ - mssg.base_addr = entry_ptr->base_addr; - mssg.len = entry_ptr->len; - mssg.ver = entry_ptr->ver; - mssg.count = 0; - mssg.magic = MSSG_MAGIC; - - if ( ! send_mssg(&mssg, FALSE) ) { - - nerrors++; - ret_value = FAIL; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", - world_mpi_rank, FUNC); - } - } - else - { - entry_ptr->header.is_dirty = FALSE; - entry_ptr->dirty = FALSE; - entry_ptr->flushed = TRUE; - } - } - } - -#if DO_WRITE_REQ_ACK - - if ( ( ret_value == SUCCEED ) && ( was_dirty ) ) { - - if ( ! recv_mssg(&mssg, WRITE_REQ_ACK_CODE) ) { - - nerrors++; - ret_value = FAIL; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", - world_mpi_rank, FUNC); - } - } else if ( ( mssg.req != WRITE_REQ_ACK_CODE ) || - ( mssg.src != world_server_mpi_rank ) || - ( mssg.dest != world_mpi_rank ) || - ( mssg.base_addr != entry_ptr->base_addr ) || - ( mssg.len != entry_ptr->len ) || - ( mssg.ver != entry_ptr->ver ) || - ( mssg.magic != MSSG_MAGIC ) ) { - - nerrors++; - ret_value = FAIL; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", - world_mpi_rank, FUNC); - } - } - } - -#endif /* DO_WRITE_REQ_ACK */ - - if ( ret_value == SUCCEED ) { - - if ( dest ) { + HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); + HDassert( ( entry_ptr->header.size == entry_ptr->len ) || + ( entry_ptr->header.size == entry_ptr->local_len ) ); - ret_value = destroy_datum(f, thing); - } - } + HDassert( entry_ptr->header.is_dirty == entry_ptr->dirty ); datum_flushes++; @@ -2530,97 +2560,130 @@ flush_datum(H5F_t *f, return(ret_value); -} /* flush_datum() */ +} /* datum_serialize() */ + /*------------------------------------------------------------------------- - * Function: load_datum + * Function: datum_notify * - * Purpose: Read the requested entry from the server and mark it as - * clean. + * Purpose: Do the communication with the server we used to do in the + * flush and load callbacks in the version 2 cache. * - * Return: SUCCEED if successful, FAIL otherwise. + * Return: SUCCEED * - * Programmer: John Mainzer - * 12/29/05 - * - * Modifications: + * Programmer: John Mainzer + * 1/12/15 * *------------------------------------------------------------------------- */ - -static void * -load_datum(H5F_t H5_ATTR_UNUSED *f, - hid_t H5_ATTR_UNUSED dxpl_id, - haddr_t addr, - void H5_ATTR_UNUSED *udata) +static herr_t +datum_notify(H5C_notify_action_t action, void *thing) { - hbool_t success = TRUE; - int idx; - struct datum * entry_ptr = NULL; + hbool_t was_dirty = FALSE; + herr_t ret_value = SUCCEED; + struct datum * entry_ptr; + struct H5AC_aux_t * aux_ptr; struct mssg_t mssg; + int idx; - idx = addr_to_datum_index(addr); + HDassert( thing ); + + entry_ptr = (struct datum *)thing; + + idx = addr_to_datum_index(entry_ptr->base_addr); HDassert( idx >= 0 ); HDassert( idx < NUM_DATA_ENTRIES ); HDassert( idx < virt_num_data_entries ); + HDassert( &(data[idx]) == entry_ptr ); - entry_ptr = &(data[idx]); + if ( callbacks_verbose ) { - HDassert( addr == entry_ptr->base_addr ); - HDassert( ! entry_ptr->global_pinned ); - HDassert( ! entry_ptr->local_pinned ); + HDfprintf(stdout, + "%d: notify() action = %d, idx = %d, addr = %ld.\n", + world_mpi_rank, (int) action, idx, + (long)entry_ptr->header.addr); + fflush(stdout); + } - /* compose the read message */ - mssg.req = READ_REQ_CODE; - mssg.src = world_mpi_rank; - mssg.dest = world_server_mpi_rank; - mssg.mssg_num = -1; /* set by send function */ - mssg.base_addr = entry_ptr->base_addr; - mssg.len = entry_ptr->len; - mssg.ver = 0; /* bogus -- should be corrected by server */ - mssg.count = 0; /* not used */ - mssg.magic = MSSG_MAGIC; + HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); + HDassert( ( entry_ptr->header.size == entry_ptr->len ) || + ( entry_ptr->header.size == entry_ptr->local_len ) ); - if ( ! send_mssg(&mssg, FALSE) ) { + switch ( action ) + { + case H5AC_NOTIFY_ACTION_AFTER_INSERT: + if ( callbacks_verbose ) { - nerrors++; - success = FALSE; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", - world_mpi_rank, FUNC); - } - } + HDfprintf(stdout, + "%d: notify() action = insert, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); + fflush(stdout); + } + /* do nothing */ + break; - if ( success ) { + case H5AC_NOTIFY_ACTION_AFTER_LOAD: + if ( callbacks_verbose ) { + + HDfprintf(stdout, + "%d: notify() action = load, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); + fflush(stdout); + } - if ( ! recv_mssg(&mssg, READ_REQ_REPLY_CODE) ) { + /* compose the read message */ + mssg.req = READ_REQ_CODE; + mssg.src = world_mpi_rank; + mssg.dest = world_server_mpi_rank; + mssg.mssg_num = -1; /* set by send function */ + mssg.base_addr = entry_ptr->base_addr; + mssg.len = entry_ptr->len; + mssg.ver = 0; /* bogus -- should be corrected by server */ + mssg.count = 0; /* not used */ + mssg.magic = MSSG_MAGIC; - nerrors++; - success = FALSE; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", - world_mpi_rank, FUNC); + if ( ! send_mssg(&mssg, FALSE) ) { + + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", + world_mpi_rank, FUNC); + } } - } - } - if ( success ) { + if ( ret_value == SUCCEED ) { - if ( ( mssg.req != READ_REQ_REPLY_CODE ) || - ( mssg.src != world_server_mpi_rank ) || - ( mssg.dest != world_mpi_rank ) || - ( mssg.base_addr != entry_ptr->base_addr ) || - ( mssg.len != entry_ptr->len ) || - ( mssg.ver < entry_ptr->ver ) || - ( mssg.magic != MSSG_MAGIC ) ) { + if ( ! recv_mssg(&mssg, READ_REQ_REPLY_CODE) ) { - nerrors++; - success = FALSE; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", - world_mpi_rank, FUNC); + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", + world_mpi_rank, FUNC); + } + } } + + if ( ret_value == SUCCEED ) { + + if ( ( mssg.req != READ_REQ_REPLY_CODE ) || + ( mssg.src != world_server_mpi_rank ) || + ( mssg.dest != world_mpi_rank ) || + ( mssg.base_addr != entry_ptr->base_addr ) || + ( mssg.len != entry_ptr->len ) || + ( mssg.ver < entry_ptr->ver ) || + ( mssg.magic != MSSG_MAGIC ) ) { + + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, + "%d:%s: Bad data in read req reply.\n", + world_mpi_rank, FUNC); + } + #if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { @@ -2683,58 +2746,223 @@ load_datum(H5F_t H5_ATTR_UNUSED *f, } else { - entry_ptr->ver = mssg.ver; - entry_ptr->header.is_dirty = FALSE; - entry_ptr->dirty = FALSE; - } + entry_ptr->ver = mssg.ver; + entry_ptr->dirty = FALSE; + datum_loads++; + } + } + break; + + case H5C_NOTIFY_ACTION_AFTER_FLUSH: + if ( callbacks_verbose ) { + + HDfprintf(stdout, + "%d: notify() action = flush, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); + fflush(stdout); + } + + HDassert( entry_ptr->aux_ptr ); + HDassert( entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ); + aux_ptr = entry_ptr->aux_ptr; + entry_ptr->aux_ptr = NULL; + + HDassert(entry_ptr->header.is_dirty); /* JRM */ + + if ( ( file_mpi_rank != 0 ) && + ( entry_ptr->dirty ) && + ( aux_ptr->metadata_write_strategy == + H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY ) ) { + + ret_value = FAIL; + HDfprintf(stdout, + "%d:%s: Flushed dirty entry from non-zero file process.", + world_mpi_rank, FUNC); + } + + if ( ret_value == SUCCEED ) { + + if ( entry_ptr->header.is_dirty ) { + + was_dirty = TRUE; /* so we will receive the ack + * if requested + */ + + /* compose the message */ + mssg.req = WRITE_REQ_CODE; + mssg.src = world_mpi_rank; + mssg.dest = world_server_mpi_rank; + mssg.mssg_num = -1; /* set by send function */ + mssg.base_addr = entry_ptr->base_addr; + mssg.len = entry_ptr->len; + mssg.ver = entry_ptr->ver; + mssg.count = 0; + mssg.magic = MSSG_MAGIC; + + if ( ! send_mssg(&mssg, FALSE) ) { + + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", + world_mpi_rank, FUNC); + } + } + else + { + entry_ptr->dirty = FALSE; + entry_ptr->flushed = TRUE; + } + } + } + +#if DO_WRITE_REQ_ACK + + if ( ( ret_value == SUCCEED ) && ( was_dirty ) ) { + + if ( ! recv_mssg(&mssg, WRITE_REQ_ACK_CODE) ) { + + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", + world_mpi_rank, FUNC); + } + } else if ( ( mssg.req != WRITE_REQ_ACK_CODE ) || + ( mssg.src != world_server_mpi_rank ) || + ( mssg.dest != world_mpi_rank ) || + ( mssg.base_addr != entry_ptr->base_addr ) || + ( mssg.len != entry_ptr->len ) || + ( mssg.ver != entry_ptr->ver ) || + ( mssg.magic != MSSG_MAGIC ) ) { + + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, + "%d:%s: Bad data in write req ack.\n", + world_mpi_rank, FUNC); + } + } + } + +#endif /* DO_WRITE_REQ_ACK */ + + datum_flushes++; + + if ( entry_ptr->header.is_pinned ) { + + datum_pinned_flushes++; + HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + } + break; + + case H5AC_NOTIFY_ACTION_BEFORE_EVICT: + if ( callbacks_verbose ) { + + HDfprintf(stdout, + "%d: notify() action = evict, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); + fflush(stdout); + } + + /* do nothing */ + break; + + default: + nerrors++; + ret_value = FAIL; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: Unknown notify action.\n", + world_mpi_rank, FUNC); + } + break; } - if ( ! success ) { + return(ret_value); - entry_ptr = NULL; +} /* datum_notify() */ + + +/*------------------------------------------------------------------------- + * Function: datum_free_icr + * + * Purpose: Nominally, this callback is supposed to free the + * in core representation of the entry. + * + * In the context of this test bed, we use it to do + * do all the processing we used to do on a destroy. + * + * Return: SUCCEED + * + * Programmer: John Mainzer + * 9/19/07 + * + *------------------------------------------------------------------------- + */ +static herr_t +datum_free_icr(void * thing) +{ + int idx; + struct datum * entry_ptr; + + HDassert( thing ); + + entry_ptr = (struct datum *)thing; + + idx = addr_to_datum_index(entry_ptr->base_addr); + HDassert( idx >= 0 ); + HDassert( idx < NUM_DATA_ENTRIES ); + HDassert( idx < virt_num_data_entries ); + HDassert( &(data[idx]) == entry_ptr ); + + if ( callbacks_verbose ) { + + HDfprintf(stdout, + "%d: free_icr() idx = %d, dirty = %d.\n", + world_mpi_rank, idx, (int)(entry_ptr->dirty)); + fflush(stdout); } - datum_loads++; + HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); + HDassert( ( entry_ptr->header.size == entry_ptr->len ) || + ( entry_ptr->header.size == entry_ptr->local_len ) ); - return(entry_ptr); + HDassert( !(entry_ptr->header.is_dirty) ); + HDassert( !(entry_ptr->global_pinned) ); + HDassert( !(entry_ptr->local_pinned) ); + HDassert( !(entry_ptr->header.is_pinned) ); + + datum_destroys++; -} /* load_datum() */ + return(SUCCEED); +} /* datum_free_icr() */ + /*------------------------------------------------------------------------- - * Function: size_datum + * Function: datum_clear * - * Purpose: Get the size of the specified entry. Just look at the - * local copy, as size can't change. + * Purpose: Mark the datum as clean. + * + * Do not write it to the server, or increment the version. * * Return: SUCCEED * * Programmer: John Mainzer - * 6/10/04 - * - * Modifications: - * - * JRM -- 7/11/06 - * Modified function to return the local_len field instead - * of the len field. These two fields usually contain the - * same value, but if the size of an entry is changed, we - * store the altered size in local_len without changing - * len. Note that local_len must be positive, and may - * not exceed len. + * 12/29/05 * *------------------------------------------------------------------------- */ - static herr_t -size_datum(H5F_t H5_ATTR_UNUSED * f, - void * thing, - size_t * size_ptr) +datum_clear(H5F_t H5_ATTR_UNUSED * f, + void * thing, + hbool_t H5_ATTR_UNUSED about_to_destroy) { int idx; struct datum * entry_ptr; HDassert( thing ); - HDassert( size_ptr ); entry_ptr = (struct datum *)thing; @@ -2744,16 +2972,28 @@ size_datum(H5F_t H5_ATTR_UNUSED * f, HDassert( idx < NUM_DATA_ENTRIES ); HDassert( idx < virt_num_data_entries ); HDassert( &(data[idx]) == entry_ptr ); - HDassert( entry_ptr->local_len > 0 ); - HDassert( entry_ptr->local_len <= entry_ptr->len ); HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); + HDassert( ( entry_ptr->header.size == entry_ptr->len ) || + ( entry_ptr->header.size == entry_ptr->local_len ) ); - *size_ptr = entry_ptr->local_len; + HDassert( ( entry_ptr->dirty ) || + ( entry_ptr->header.is_dirty == entry_ptr->dirty ) ); + + entry_ptr->cleared = TRUE; + entry_ptr->dirty = FALSE; + + datum_clears++; + + if ( entry_ptr->header.is_pinned ) { + + datum_pinned_clears++; + HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned ); + } return(SUCCEED); -} /* size_datum() */ +} /* datum_clear() */ /*****************************************************************************/ @@ -2792,6 +3032,8 @@ expunge_entry(H5F_t * file_ptr, HDassert( !(entry_ptr->global_pinned) ); HDassert( !(entry_ptr->local_pinned) ); + entry_ptr->dirty = FALSE; + if ( nerrors == 0 ) { result = H5AC_expunge_entry(file_ptr, (hid_t)-1, &(types[0]), @@ -3280,8 +3522,10 @@ lock_entry(H5F_t * file_ptr, HDassert( ! (entry_ptr->locked) ); cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, - H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->base_addr, - NULL, H5AC_WRITE); + H5P_DATASET_XFER_DEFAULT, + &(types[0]), entry_ptr->base_addr, + &entry_ptr->base_addr, + H5AC__NO_FLAGS_SET); if ( ( cache_entry_ptr != (void *)(&(entry_ptr->header)) ) || ( entry_ptr->header.type != &(types[0]) ) || @@ -3801,6 +4045,7 @@ setup_cache_for_test(hid_t * fid_ptr, H5AC_cache_config_t test_config; H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; + haddr_t actual_base_addr; HDassert ( fid_ptr != NULL ); HDassert ( file_ptr_ptr != NULL ); @@ -3950,6 +4195,54 @@ setup_cache_for_test(hid_t * fid_ptr, } } + /* allocate space for test entries -- do this before we set the + * sync point done callback as it will dirty the superblock, requiring + * another flush. If the sync point done callback is set, this will + * cause a spurious failure. + */ + if ( success ) { /* allocate space for test entries */ + + actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, + (hsize_t)(max_addr + BASE_ADDR)); + + if ( actual_base_addr == HADDR_UNDEF ) { + + success = FALSE; + nerrors++; + + if ( verbose ) { + HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", + world_mpi_rank, FUNC); + } + + } else if ( actual_base_addr > BASE_ADDR ) { + + /* If this happens, must increase BASE_ADDR so that the + * actual_base_addr is <= BASE_ADDR. This should only happen + * if the size of the superblock is increase. + */ + success = FALSE; + nerrors++; + + if ( verbose ) { + HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", + world_mpi_rank, FUNC); + } + } + } + + + /* flush the file again -- space allocation dirtied superblock */ + if ( success ) { + + if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { + nerrors++; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", + world_mpi_rank, FUNC); + } + } + } #if DO_SYNC_AFTER_WRITE @@ -4138,7 +4431,7 @@ setup_rand(void) { hbool_t use_predefined_seeds = FALSE; int num_predefined_seeds = 3; - unsigned predefined_seeds[3] = {33402, 33505, 33422}; + unsigned predefined_seeds[3] = {18669, 89925, 12577}; unsigned seed; struct timeval tv; @@ -6472,27 +6765,27 @@ trace_file_check(int metadata_write_strategy) { "### HDF5 metadata cache trace file version 1 ###\n", "H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0 0\n", - "H5AC_insert_entry 0x200 25 0x0 2 0\n", - "H5AC_insert_entry 0x202 25 0x0 2 0\n", - "H5AC_insert_entry 0x204 25 0x0 4 0\n", - "H5AC_insert_entry 0x208 25 0x0 6 0\n", - "H5AC_protect 0x200 25 H5AC_WRITE 2 1\n", - "H5AC_mark_entry_dirty 0x200 0\n", - "H5AC_unprotect 0x200 25 0 0 0\n", - "H5AC_protect 0x202 25 H5AC_WRITE 2 1\n", - "H5AC_pin_protected_entry 0x202 0\n", - "H5AC_unprotect 0x202 25 0 0 0\n", - "H5AC_unpin_entry 0x202 0\n", - "H5AC_expunge_entry 0x202 25 0\n", - "H5AC_protect 0x204 25 H5AC_WRITE 4 1\n", - "H5AC_pin_protected_entry 0x204 0\n", - "H5AC_unprotect 0x204 25 0 0 0\n", - "H5AC_mark_entry_dirty 0x204 0 0 0\n", - "H5AC_resize_entry 0x204 2 0\n", - "H5AC_resize_entry 0x204 4 0\n", - "H5AC_unpin_entry 0x204 0\n", - "H5AC_move_entry 0x200 0x8c65 25 0\n", - "H5AC_move_entry 0x8c65 0x200 25 0\n", + "H5AC_insert_entry 0x400 27 0x0 2 0\n", + "H5AC_insert_entry 0x402 27 0x0 2 0\n", + "H5AC_insert_entry 0x404 27 0x0 4 0\n", + "H5AC_insert_entry 0x408 27 0x0 6 0\n", + "H5AC_protect 0x400 27 0x0 2 1\n", + "H5AC_mark_entry_dirty 0x400 0\n", + "H5AC_unprotect 0x400 27 0x0 0\n", + "H5AC_protect 0x402 27 0x0 2 1\n", + "H5AC_pin_protected_entry 0x402 0\n", + "H5AC_unprotect 0x402 27 0x0 0\n", + "H5AC_unpin_entry 0x402 0\n", + "H5AC_expunge_entry 0x402 27 0\n", + "H5AC_protect 0x404 27 0x0 4 1\n", + "H5AC_pin_protected_entry 0x404 0\n", + "H5AC_unprotect 0x404 27 0x0 0\n", + "H5AC_mark_entry_dirty 0x404 0\n", + "H5AC_resize_entry 0x404 2 0\n", + "H5AC_resize_entry 0x404 4 0\n", + "H5AC_unpin_entry 0x404 0\n", + "H5AC_move_entry 0x400 0x8e65 27 0\n", + "H5AC_move_entry 0x8e65 0x400 27 0\n", "H5AC_flush 0\n", NULL }; @@ -6500,27 +6793,27 @@ trace_file_check(int metadata_write_strategy) { "### HDF5 metadata cache trace file version 1 ###\n", "H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 1 0\n", - "H5AC_insert_entry 0x200 25 0x0 2 0\n", - "H5AC_insert_entry 0x202 25 0x0 2 0\n", - "H5AC_insert_entry 0x204 25 0x0 4 0\n", - "H5AC_insert_entry 0x208 25 0x0 6 0\n", - "H5AC_protect 0x200 25 H5AC_WRITE 2 1\n", - "H5AC_mark_entry_dirty 0x200 0\n", - "H5AC_unprotect 0x200 25 0 0 0\n", - "H5AC_protect 0x202 25 H5AC_WRITE 2 1\n", - "H5AC_pin_protected_entry 0x202 0\n", - "H5AC_unprotect 0x202 25 0 0 0\n", - "H5AC_unpin_entry 0x202 0\n", - "H5AC_expunge_entry 0x202 25 0\n", - "H5AC_protect 0x204 25 H5AC_WRITE 4 1\n", - "H5AC_pin_protected_entry 0x204 0\n", - "H5AC_unprotect 0x204 25 0 0 0\n", - "H5AC_mark_entry_dirty 0x204 0 0 0\n", - "H5AC_resize_pinned_entry 0x204 2 0\n", - "H5AC_resize_pinned_entry 0x204 4 0\n", - "H5AC_unpin_entry 0x204 0\n", - "H5AC_move_entry 0x200 0x8c65 25 0\n", - "H5AC_move_entry 0x8c65 0x200 25 0\n", + "H5AC_insert_entry 0x400 27 0x0 2 0\n", + "H5AC_insert_entry 0x402 27 0x0 2 0\n", + "H5AC_insert_entry 0x404 27 0x0 4 0\n", + "H5AC_insert_entry 0x408 27 0x0 6 0\n", + "H5AC_protect 0x400 27 0x0 2 1\n", + "H5AC_mark_entry_dirty 0x400 0\n", + "H5AC_unprotect 0x400 27 0x0 0\n", + "H5AC_protect 0x402 27 0x0 2 1\n", + "H5AC_pin_protected_entry 0x402 0\n", + "H5AC_unprotect 0x402 27 0x0 0\n", + "H5AC_unpin_entry 0x402 0\n", + "H5AC_expunge_entry 0x402 27 0\n", + "H5AC_protect 0x404 27 0x0 4 1\n", + "H5AC_pin_protected_entry 0x404 0\n", + "H5AC_unprotect 0x404 27 0x0 0\n", + "H5AC_mark_entry_dirty 0x404 0\n", + "H5AC_resize_entry 0x404 2 0\n", + "H5AC_resize_entry 0x404 4 0\n", + "H5AC_unpin_entry 0x404 0\n", + "H5AC_move_entry 0x400 0x8e65 27 0\n", + "H5AC_move_entry 0x8e65 0x400 27 0\n", "H5AC_flush 0\n", NULL }; -- cgit v0.12 From cf7c5123cbd23a4c1d13dccd02fc2c632210d939 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 Jun 2015 08:52:35 -0500 Subject: [svn-r27238] Add function prototype for local function --- tools/lib/h5tools_str.c | 59 +++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 2603984..b945847 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -48,6 +48,7 @@ static char *h5tools_escape(char *s, size_t size); static hbool_t h5tools_str_is_zero(const void *_mem, size_t size); static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch); +void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx); /*------------------------------------------------------------------------- * Function: h5tools_str_close @@ -144,16 +145,16 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap); HDva_end(ap); - /* Note: HDvsnprintf() behaves differently on Windows as Unix, when - * buffer is smaller than source string. On Unix, this function - * returns length of the source string and copy string upto the - * buffer size with NULL at the end of the buffer. However on - * Windows with the same condition, this function returns -1 and + /* Note: HDvsnprintf() behaves differently on Windows as Unix, when + * buffer is smaller than source string. On Unix, this function + * returns length of the source string and copy string upto the + * buffer size with NULL at the end of the buffer. However on + * Windows with the same condition, this function returns -1 and * doesn't add NULL at the end of the buffer. * Because of this different return results, the strlen of the new string * is used to handle when HDvsnprintf() returns -1 on Windows due * to lack of buffer size, so try one more time after realloc more - * buffer size before return NULL. + * buffer size before return NULL. */ if (nchars < 0) { /* failure, such as bad format */ @@ -277,7 +278,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) if (HDstrchr(fmt, '%')) { size_t n = sizeof(_temp); if (str->len - start + 1 > n) { - n = str->len - start + 1; + n = str->len - start + 1; temp = (char*)HDmalloc(n); HDassert(temp); } @@ -665,12 +666,12 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, * * PVN, 28 March 2006 * added H5T_NATIVE_LDOUBLE case - * + * * Raymond Lu, 2011-09-01 * CLANG compiler complained about the line (about 800): * tempint = (tempint >> packed_data_offset) & packed_data_mask; - * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is - * 32-bit or more. For every kind of native integers, I changed the code + * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is + * 32-bit or more. For every kind of native integers, I changed the code * to make it zero if PACKED_DATA_OFFSET is greater than or equal to the * size of integer. *------------------------------------------------------------------------- @@ -1371,37 +1372,37 @@ h5tools_str_is_zero(const void *_mem, size_t size) * * Purpose: replace all occurrences of substring. * - * Return: char * + * Return: char * * * Programmer: Peter Cao * March 8, 2012 * * Notes: - * Applications need to call free() to free the memoery allocated for - * the return string + * Applications need to call free() to free the memoery allocated for + * the return string * *------------------------------------------------------------------------- */ char * h5tools_str_replace ( const char *string, const char *substr, const char *replacement ) { - char *tok = NULL; - char *newstr = NULL; - char *oldstr = NULL; - char *head = NULL; - - if ( substr == NULL || replacement == NULL ) - return HDstrdup (string); - - newstr = HDstrdup (string); - head = newstr; - while ( (tok = HDstrstr ( head, substr ))){ - oldstr = newstr; - newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); + char *tok = NULL; + char *newstr = NULL; + char *oldstr = NULL; + char *head = NULL; + + if ( substr == NULL || replacement == NULL ) + return HDstrdup (string); + + newstr = HDstrdup (string); + head = newstr; + while ( (tok = HDstrstr ( head, substr ))){ + oldstr = newstr; + newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); if ( newstr == NULL ){ - HDfree (oldstr); - return NULL; + HDfree (oldstr); + return NULL; } HDmemcpy ( newstr, oldstr, tok - oldstr ); HDmemcpy ( newstr + (tok - oldstr), replacement, HDstrlen ( replacement ) ); @@ -1411,6 +1412,6 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac head = newstr + (tok - oldstr) + HDstrlen( replacement ); HDfree (oldstr); } - + return newstr; } -- cgit v0.12 From c614e178e32188bde97f1cf692bb2c15d97135df Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Thu, 18 Jun 2015 15:36:19 -0500 Subject: [svn-r27243] fix problem with encoding/decoding external fapl for lapls. --- src/H5Plapl.c | 50 ++++++++++++++++++++++++------------- test/gen_plist.c | 16 ++++++------ test/testfiles/plist_files/dxpl_be | Bin 229 -> 229 bytes test/testfiles/plist_files/dxpl_le | Bin 229 -> 229 bytes test/testfiles/plist_files/fapl_be | Bin 1462 -> 1462 bytes test/testfiles/plist_files/fapl_le | Bin 1462 -> 1462 bytes test/testfiles/plist_files/lapl_be | Bin 1562 -> 1565 bytes test/testfiles/plist_files/lapl_le | Bin 1562 -> 1565 bytes 8 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 87b96b6..e3b3c4f 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -237,7 +237,7 @@ H5P_lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) uint8_t **pp = (uint8_t **)_pp; H5P_genplist_t *fapl_plist; /* Pointer to property list */ hbool_t non_default_fapl = FALSE; /* Whether the FAPL is non-default */ - size_t enc_size = 0; /* FAPL's encoded size */ + size_t fapl_size = 0; /* FAPL's encoded size */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -257,13 +257,30 @@ H5P_lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* Encode the property list, if non-default */ /* (if *pp == NULL, will only compute the size) */ if(non_default_fapl) { - if(H5P__encode(fapl_plist, TRUE, *pp, &enc_size) < 0) + if(H5P__encode(fapl_plist, TRUE, NULL, &fapl_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") - if(*pp) - *pp += enc_size; + + if(*pp) { + uint64_t enc_value; + unsigned enc_size; + + /* encode the length of the plist */ + enc_value = (uint64_t)fapl_size; + enc_size = H5VM_limit_enc_size(enc_value); + HDassert(enc_size < 256); + *(*pp)++ = (uint8_t)enc_size; + UINT64ENCODE_VAR(*pp, enc_value, enc_size); + + /* encode the plist */ + if(H5P__encode(fapl_plist, TRUE, *pp, &fapl_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") + + *pp += fapl_size; + } + fapl_size += (1 + H5VM_limit_enc_size((uint64_t)fapl_size)); } /* end if */ - *size += (1 + enc_size); /* Non-default flag, plus encoded property list size */ + *size += (1 + fapl_size); /* Non-default flag, plus encoded property list size */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -304,22 +321,21 @@ H5P_lacc_elink_fapl_dec(const void **_pp, void *_value) non_default_fapl = (hbool_t)*(*pp)++; if(non_default_fapl) { - H5P_genplist_t *fapl_plist; /* Pointer to property list */ - size_t enc_size = 0; /* Encoded size of property list */ + size_t fapl_size = 0; /* Encoded size of property list */ + unsigned enc_size; + uint64_t enc_value; + + /* Decode the plist length */ + enc_size = *(*pp)++; + HDassert(enc_size < 256); + UINT64DECODE_VAR(*pp, enc_value, enc_size); + fapl_size = (size_t)enc_value; /* Decode the property list */ if((*elink_fapl = H5P__decode(*pp)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode property") - /* Get the property list object */ - if(NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list") - - /* Compute the encoded size of the property list */ - if(H5P__encode(fapl_plist, TRUE, NULL, &enc_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't compute encoded property list size") - - *pp += enc_size; + *pp += fapl_size; } /* end if */ else *elink_fapl = H5P_DEFAULT; @@ -578,7 +594,7 @@ H5P_lacc_elink_pref_dec(const void **_pp, void *_value) /* Decode the value */ UINT64DECODE_VAR(*pp, enc_value, enc_size); - len = enc_value; + len = (size_t)enc_value; if(0 != len) { /* Make a copy of the user's prefix string */ diff --git a/test/gen_plist.c b/test/gen_plist.c index e77af73..cd3748b 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -63,26 +63,26 @@ main(void) 1 /*TRUE*/, 0 /*FALSE*/, ( 2 * 2048 * 1024), - 0.3f, + 0.3, (64 * 1024 * 1024), (4 * 1024 * 1024), 60000, H5C_incr__threshold, - 0.8f, - 3.0f, + 0.8, + 3.0, 1 /*TRUE*/, (8 * 1024 * 1024), H5C_flash_incr__add_space, - 2.0f, - 0.25f, + 2.0, + 0.25, H5C_decr__age_out_with_threshold, - 0.997f, - 0.8f, + 0.997, + 0.8, 1 /*TRUE*/, (3 * 1024 * 1024), 3, 0 /*FALSE*/, - 0.2f, + 0.2, (256 * 2048), H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY}; diff --git a/test/testfiles/plist_files/dxpl_be b/test/testfiles/plist_files/dxpl_be index 5ff2ea0..b5194c8 100644 Binary files a/test/testfiles/plist_files/dxpl_be and b/test/testfiles/plist_files/dxpl_be differ diff --git a/test/testfiles/plist_files/dxpl_le b/test/testfiles/plist_files/dxpl_le index 5ff2ea0..b5194c8 100644 Binary files a/test/testfiles/plist_files/dxpl_le and b/test/testfiles/plist_files/dxpl_le differ diff --git a/test/testfiles/plist_files/fapl_be b/test/testfiles/plist_files/fapl_be index 0b050d0..65e2070 100644 Binary files a/test/testfiles/plist_files/fapl_be and b/test/testfiles/plist_files/fapl_be differ diff --git a/test/testfiles/plist_files/fapl_le b/test/testfiles/plist_files/fapl_le index 0b050d0..65e2070 100644 Binary files a/test/testfiles/plist_files/fapl_le and b/test/testfiles/plist_files/fapl_le differ diff --git a/test/testfiles/plist_files/lapl_be b/test/testfiles/plist_files/lapl_be index e58bfb4..385cfc5 100644 Binary files a/test/testfiles/plist_files/lapl_be and b/test/testfiles/plist_files/lapl_be differ diff --git a/test/testfiles/plist_files/lapl_le b/test/testfiles/plist_files/lapl_le index e58bfb4..385cfc5 100644 Binary files a/test/testfiles/plist_files/lapl_le and b/test/testfiles/plist_files/lapl_le differ -- cgit v0.12 From 48e1bbb0f87c6712189f82a7c5d8835a87d21ee2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 19 Jun 2015 10:57:38 -0500 Subject: [svn-r27252] Fix whitespace --- tools/lib/h5tools_str.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index b945847..470620f 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1386,23 +1386,23 @@ h5tools_str_is_zero(const void *_mem, size_t size) char * h5tools_str_replace ( const char *string, const char *substr, const char *replacement ) { - char *tok = NULL; - char *newstr = NULL; - char *oldstr = NULL; - char *head = NULL; - - if ( substr == NULL || replacement == NULL ) - return HDstrdup (string); - - newstr = HDstrdup (string); - head = newstr; - while ( (tok = HDstrstr ( head, substr ))){ - oldstr = newstr; - newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); + char *tok = NULL; + char *newstr = NULL; + char *oldstr = NULL; + char *head = NULL; + + if ( substr == NULL || replacement == NULL ) + return HDstrdup (string); + + newstr = HDstrdup (string); + head = newstr; + while ( (tok = HDstrstr ( head, substr ))){ + oldstr = newstr; + newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); if ( newstr == NULL ){ - HDfree (oldstr); - return NULL; + HDfree (oldstr); + return NULL; } HDmemcpy ( newstr, oldstr, tok - oldstr ); HDmemcpy ( newstr + (tok - oldstr), replacement, HDstrlen ( replacement ) ); -- cgit v0.12 From 53930f66710aefd221e03ab4306bc6ea76b0089c Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 21 Jun 2015 19:16:13 -0500 Subject: [svn-r27262] Snapshot version 1.9 release 222 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/cpp_doc_config | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.txt b/README.txt index 4e8aacc..1783899 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.222 currently under development +HDF5 version 1.9.223 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 9df8eff..a4a7a74 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -670,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 # This is our main target diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index a4aa9af..4ba3d22 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.222 currently under development +PROJECT_NUMBER = HDF5 version 1.9.223 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/lt_vers.am b/config/lt_vers.am index f9e6f77..7a4cd7a 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 7352402..63f40ad 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.222. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.223. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.222' -PACKAGE_STRING='HDF5 1.9.222' +PACKAGE_VERSION='1.9.223' +PACKAGE_STRING='HDF5 1.9.223' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.222 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.223 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1542,7 +1542,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.222:";; + short | recursive ) echo "Configuration of HDF5 1.9.223:";; esac cat <<\_ACEOF @@ -1731,7 +1731,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.222 +HDF5 configure 1.9.223 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2668,7 +2668,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.222, which was +It was created by HDF5 $as_me 1.9.223, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3539,7 +3539,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.222' + VERSION='1.9.223' cat >>confdefs.h <<_ACEOF @@ -28577,7 +28577,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.222 +HDF5 config.lt 1.9.223 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -30693,7 +30693,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.222, which was +This file was extended by HDF5 $as_me 1.9.223, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30759,7 +30759,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.222 +HDF5 config.status 1.9.223 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f9776dc..5ed40c4 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.222], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.223], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 2c36b8c..b169c66 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 6b6bc67..8099607 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -662,7 +662,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 8820964..c053566 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -680,7 +680,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 314b11d..99ec64a 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -661,7 +661,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 18b800e..8c17df9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.222 currently under development +HDF5 version 1.9.223 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index e625367..6cec869 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 222 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 223 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.222" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.223" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index f546f2f..d795677 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -723,7 +723,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 212 +LT_VERS_REVISION = 213 LT_VERS_AGE = 0 # Our main target, the HDF5 library -- cgit v0.12 From 86d194642402119b955887419692b704865984c1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 Jun 2015 13:49:46 -0500 Subject: [svn-r27267] Combine float checks and int checks to eliminate possible conflicts --- tools/h5ls/h5ls.c | 412 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 213 insertions(+), 199 deletions(-) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 28f7b8a..fe128fa 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -155,6 +155,8 @@ static struct dispatch_t { } static void print_type(h5tools_str_t *buffer, hid_t type, int ind); +static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind); +static hbool_t print_float_type(h5tools_str_t *buffer, hid_t type, int ind); static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter); @@ -294,7 +296,7 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces) if (escape_spaces) { if (buffer) h5tools_str_append(buffer, "\\ "); nprint += 2; - } + } else { if (buffer) h5tools_str_append(buffer, " "); nprint++; @@ -304,7 +306,7 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces) if (isprint((int)*s)) { if (buffer) h5tools_str_append(buffer, "%c", *s); nprint++; - } + } else { if (buffer) h5tools_str_append(buffer, "\\%03o", *((const unsigned char*)s)); nprint += 4; @@ -385,102 +387,106 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, *------------------------------------------------------------------------- */ static hbool_t -print_native_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) +print_native_type(h5tools_str_t *buffer, hid_t type, int ind) { - if (H5Tequal(type, H5T_NATIVE_SCHAR)==TRUE) { - h5tools_str_append(buffer, "native signed char"); - } else if (H5Tequal(type, H5T_NATIVE_UCHAR)==TRUE) { - h5tools_str_append(buffer, "native unsigned char"); - } else if (H5Tequal(type, H5T_NATIVE_INT)==TRUE) { - h5tools_str_append(buffer, "native int"); - } else if (H5Tequal(type, H5T_NATIVE_UINT)==TRUE) { - h5tools_str_append(buffer, "native unsigned int"); - } else if (H5Tequal(type, H5T_NATIVE_SHORT)==TRUE) { - h5tools_str_append(buffer, "native short"); - } else if (H5Tequal(type, H5T_NATIVE_USHORT)==TRUE) { - h5tools_str_append(buffer, "native unsigned short"); - } else if (H5Tequal(type, H5T_NATIVE_LONG)==TRUE) { - h5tools_str_append(buffer, "native long"); - } else if (H5Tequal(type, H5T_NATIVE_ULONG)==TRUE) { - h5tools_str_append(buffer, "native unsigned long"); - } else if (H5Tequal(type, H5T_NATIVE_LLONG)==TRUE) { - h5tools_str_append(buffer, "native long long"); - } else if (H5Tequal(type, H5T_NATIVE_ULLONG)==TRUE) { - h5tools_str_append(buffer, "native unsigned long long"); - } else if (H5Tequal(type, H5T_NATIVE_FLOAT)==TRUE) { - h5tools_str_append(buffer, "native float"); - } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)==TRUE) { - h5tools_str_append(buffer, "native double"); + if(!simple_output_g) { + if (H5Tequal(type, H5T_NATIVE_SCHAR)==TRUE) { + h5tools_str_append(buffer, "native signed char"); + } else if (H5Tequal(type, H5T_NATIVE_UCHAR)==TRUE) { + h5tools_str_append(buffer, "native unsigned char"); + } else if (H5Tequal(type, H5T_NATIVE_INT)==TRUE) { + h5tools_str_append(buffer, "native int"); + } else if (H5Tequal(type, H5T_NATIVE_UINT)==TRUE) { + h5tools_str_append(buffer, "native unsigned int"); + } else if (H5Tequal(type, H5T_NATIVE_SHORT)==TRUE) { + h5tools_str_append(buffer, "native short"); + } else if (H5Tequal(type, H5T_NATIVE_USHORT)==TRUE) { + h5tools_str_append(buffer, "native unsigned short"); + } else if (H5Tequal(type, H5T_NATIVE_LONG)==TRUE) { + h5tools_str_append(buffer, "native long"); + } else if (H5Tequal(type, H5T_NATIVE_ULONG)==TRUE) { + h5tools_str_append(buffer, "native unsigned long"); + } else if (H5Tequal(type, H5T_NATIVE_LLONG)==TRUE) { + h5tools_str_append(buffer, "native long long"); + } else if (H5Tequal(type, H5T_NATIVE_ULLONG)==TRUE) { + h5tools_str_append(buffer, "native unsigned long long"); + } else if (H5Tequal(type, H5T_NATIVE_FLOAT)==TRUE) { + h5tools_str_append(buffer, "native float"); + } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)==TRUE) { + h5tools_str_append(buffer, "native double"); #if H5_SIZEOF_LONG_DOUBLE !=0 - } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)==TRUE) { - h5tools_str_append(buffer, "native long double"); + } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)==TRUE) { + h5tools_str_append(buffer, "native long double"); #endif - } else if (H5Tequal(type, H5T_NATIVE_INT8)==TRUE) { - h5tools_str_append(buffer, "native int8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT8)==TRUE) { - h5tools_str_append(buffer, "native uint8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT16)==TRUE) { - h5tools_str_append(buffer, "native int16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT16)==TRUE) { - h5tools_str_append(buffer, "native uint16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT32)==TRUE) { - h5tools_str_append(buffer, "native int32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT32)==TRUE) { - h5tools_str_append(buffer, "native uint32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT64)==TRUE) { - h5tools_str_append(buffer, "native int64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT64)==TRUE) { - h5tools_str_append(buffer, "native uint64_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8)==TRUE) { - h5tools_str_append(buffer, "native int_least8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8)==TRUE) { - h5tools_str_append(buffer, "native uint_least8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16)==TRUE) { - h5tools_str_append(buffer, "native int_least16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16)==TRUE) { - h5tools_str_append(buffer, "native uint_least16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32)==TRUE) { - h5tools_str_append(buffer, "native int_least32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32)==TRUE) { - h5tools_str_append(buffer, "native uint_least32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64)==TRUE) { - h5tools_str_append(buffer, "native int_least64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64)==TRUE) { - h5tools_str_append(buffer, "native uint_least64_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST8)==TRUE) { - h5tools_str_append(buffer, "native int_fast8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8)==TRUE) { - h5tools_str_append(buffer, "native uint_fast8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST16)==TRUE) { - h5tools_str_append(buffer, "native int_fast16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16)==TRUE) { - h5tools_str_append(buffer, "native uint_fast16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST32)==TRUE) { - h5tools_str_append(buffer, "native int_fast32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32)==TRUE) { - h5tools_str_append(buffer, "native uint_fast32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST64)==TRUE) { - h5tools_str_append(buffer, "native int_fast64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64)==TRUE) { - h5tools_str_append(buffer, "native uint_fast64_t"); - } else if (H5Tequal(type, H5T_NATIVE_B8)==TRUE) { - h5tools_str_append(buffer, "native 8-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B16)==TRUE) { - h5tools_str_append(buffer, "native 16-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B32)==TRUE) { - h5tools_str_append(buffer, "native 32-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B64)==TRUE) { - h5tools_str_append(buffer, "native 64-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_HSIZE)==TRUE) { - h5tools_str_append(buffer, "native hsize_t"); - } else if (H5Tequal(type, H5T_NATIVE_HSSIZE)==TRUE) { - h5tools_str_append(buffer, "native hssize_t"); - } else if (H5Tequal(type, H5T_NATIVE_HERR)==TRUE) { - h5tools_str_append(buffer, "native herr_t"); - } else if (H5Tequal(type, H5T_NATIVE_HBOOL)==TRUE) { - h5tools_str_append(buffer, "native hbool_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT8)==TRUE) { + h5tools_str_append(buffer, "native int8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT8)==TRUE) { + h5tools_str_append(buffer, "native uint8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT16)==TRUE) { + h5tools_str_append(buffer, "native int16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT16)==TRUE) { + h5tools_str_append(buffer, "native uint16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT32)==TRUE) { + h5tools_str_append(buffer, "native int32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT32)==TRUE) { + h5tools_str_append(buffer, "native uint32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT64)==TRUE) { + h5tools_str_append(buffer, "native int64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT64)==TRUE) { + h5tools_str_append(buffer, "native uint64_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8)==TRUE) { + h5tools_str_append(buffer, "native int_least8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8)==TRUE) { + h5tools_str_append(buffer, "native uint_least8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16)==TRUE) { + h5tools_str_append(buffer, "native int_least16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16)==TRUE) { + h5tools_str_append(buffer, "native uint_least16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32)==TRUE) { + h5tools_str_append(buffer, "native int_least32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32)==TRUE) { + h5tools_str_append(buffer, "native uint_least32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64)==TRUE) { + h5tools_str_append(buffer, "native int_least64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64)==TRUE) { + h5tools_str_append(buffer, "native uint_least64_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST8)==TRUE) { + h5tools_str_append(buffer, "native int_fast8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8)==TRUE) { + h5tools_str_append(buffer, "native uint_fast8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST16)==TRUE) { + h5tools_str_append(buffer, "native int_fast16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16)==TRUE) { + h5tools_str_append(buffer, "native uint_fast16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST32)==TRUE) { + h5tools_str_append(buffer, "native int_fast32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32)==TRUE) { + h5tools_str_append(buffer, "native uint_fast32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST64)==TRUE) { + h5tools_str_append(buffer, "native int_fast64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64)==TRUE) { + h5tools_str_append(buffer, "native uint_fast64_t"); + } else if (H5Tequal(type, H5T_NATIVE_B8)==TRUE) { + h5tools_str_append(buffer, "native 8-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B16)==TRUE) { + h5tools_str_append(buffer, "native 16-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B32)==TRUE) { + h5tools_str_append(buffer, "native 32-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B64)==TRUE) { + h5tools_str_append(buffer, "native 64-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_HSIZE)==TRUE) { + h5tools_str_append(buffer, "native hsize_t"); + } else if (H5Tequal(type, H5T_NATIVE_HSSIZE)==TRUE) { + h5tools_str_append(buffer, "native hssize_t"); + } else if (H5Tequal(type, H5T_NATIVE_HERR)==TRUE) { + h5tools_str_append(buffer, "native herr_t"); + } else if (H5Tequal(type, H5T_NATIVE_HBOOL)==TRUE) { + h5tools_str_append(buffer, "native hbool_t"); + } else { + return print_int_type(buffer, type, ind); + } } else { - return FALSE; + return print_int_type(buffer, type, ind); } return TRUE; } @@ -503,22 +509,22 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) *------------------------------------------------------------------------- */ static hbool_t -print_ieee_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) +print_ieee_type(h5tools_str_t *buffer, hid_t type, int ind) { if (H5Tequal(type, H5T_IEEE_F32BE)==TRUE) { h5tools_str_append(buffer, "IEEE 32-bit big-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F32LE)==TRUE) { h5tools_str_append(buffer, "IEEE 32-bit little-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F64BE)==TRUE) { h5tools_str_append(buffer, "IEEE 64-bit big-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F64LE)==TRUE) { h5tools_str_append(buffer, "IEEE 64-bit little-endian float"); - } + } else { - return FALSE; + return print_float_type(buffer, type, ind); } return TRUE; } @@ -650,17 +656,17 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind) order = H5Tget_order(type); if (H5T_ORDER_LE==order) { order_s = " little-endian"; - } + } else if (H5T_ORDER_BE==order) { order_s = " big-endian"; - } + } else if (H5T_ORDER_VAX==order) { order_s = " mixed-endian"; - } + } else { order_s = " unknown-byte-order"; } - } + } else { order_s = ""; } @@ -669,14 +675,14 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind) if ((sign=H5Tget_sign(type))>=0) { if (H5T_SGN_NONE==sign) { sign_s = " unsigned"; - } + } else if (H5T_SGN_2==sign) { sign_s = ""; - } + } else { sign_s = " unknown-sign"; } - } + } else { sign_s = " unknown-sign"; } @@ -727,17 +733,17 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind) order = H5Tget_order(type); if (H5T_ORDER_LE==order) { order_s = " little-endian"; - } + } else if (H5T_ORDER_BE==order) { order_s = " big-endian"; - } + } else if (H5T_ORDER_VAX==order) { order_s = " mixed-endian"; - } + } else { order_s = " unknown-byte-order"; } - } + } else { order_s = ""; } @@ -949,13 +955,13 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "0x"); for(j = 0; j < dst_size; j++) h5tools_str_append(buffer, "%02x", value[i*dst_size+j]); - } + } else if(H5T_SGN_NONE == H5Tget_sign(native)) { /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ copy = value + i * dst_size; h5tools_str_append(buffer, HSIZE_T_FORMAT, *((unsigned long long*)((void*)copy))); - } + } else { /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ @@ -1074,7 +1080,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) if (H5Tis_variable_str(type)) { h5tools_str_append(buffer, "variable-length"); - } + } else { h5tools_str_append(buffer, "%lu-byte", (unsigned long)H5Tget_size(type)); } @@ -1108,10 +1114,10 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) if (H5Tequal(type, H5T_STD_REF_OBJ)==TRUE) { h5tools_str_append(buffer, "object reference"); - } + } else if (H5Tequal(type, H5T_STD_REF_DSETREG)==TRUE) { h5tools_str_append(buffer, "dataset region reference"); - } + } else { h5tools_str_append(buffer, "%lu-byte unknown reference", (unsigned long)H5Tget_size(type)); @@ -1220,7 +1226,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "]"); HDfree(dims); - } + } else h5tools_str_append(buffer, " [SCALAR]\n", rawoutstream); @@ -1324,10 +1330,8 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind) } /* end if */ /* Print the type */ - if((!simple_output_g && print_native_type(buffer, type, ind)) || + if(print_native_type(buffer, type, ind) || print_ieee_type(buffer, type, ind) || - print_int_type(buffer, type, ind) || - print_float_type(buffer, type, ind) || print_cmpd_type(buffer, type, ind) || print_enum_type(buffer, type, ind) || print_string_type(buffer, type, ind) || @@ -1371,7 +1375,7 @@ dump_dataset_values(hid_t dset) h5tools_context_t ctx; /* print context */ h5tool_format_t outputformat; h5tool_format_t *info = &ls_dataformat; - + hid_t f_type = H5Dget_type(dset); size_t size = H5Tget_size(f_type); @@ -1402,7 +1406,7 @@ dump_dataset_values(hid_t dset) outputformat.elmt_suf1 = " "; outputformat.str_locale = ESCAPE_HTML; - } + } else { if (no_line_wrap_g) { outputformat.line_per_line = 1; @@ -1422,7 +1426,7 @@ dump_dataset_values(hid_t dset) outputformat.cmpd_pre = NULL; outputformat.cmpd_suf = NULL; outputformat.cmpd_sep = NULL; - + outputformat.vlen_sep = NULL; outputformat.vlen_pre = NULL; outputformat.vlen_suf = NULL; @@ -1439,7 +1443,7 @@ dump_dataset_values(hid_t dset) /* Print all data in hexadecimal format if the `-x' or `--hexdump' * command line switch was given. */ outputformat.raw = TRUE; - } + } else if (string_g && 1==size && H5T_INTEGER==H5Tget_class(f_type)) { /* Print 1-byte integer data as an ASCI character string instead of * integers if the `-s' or `--string' command-line option was given. */ @@ -1469,7 +1473,7 @@ dump_dataset_values(hid_t dset) H5Tclose(f_type); h5tools_str_close(&buffer); - + PRINTVALSTREAM(rawoutstream, "\n"); } @@ -1517,7 +1521,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Attribute: "); - + print_string(&buffer, attr_name, TRUE); if((attr = H5Aopen(obj, attr_name, H5P_DEFAULT))) { @@ -1576,7 +1580,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain outputformat.line_cont = " "; outputformat.str_repeat = 8; - } + } else { h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Data:\n"); @@ -1607,7 +1611,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain outputformat.cmpd_pre = NULL; outputformat.cmpd_suf = NULL; outputformat.cmpd_sep = NULL; - + outputformat.vlen_sep = NULL; outputformat.vlen_pre = NULL; outputformat.vlen_suf = NULL; @@ -1651,7 +1655,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain H5Sclose(space); H5Tclose(type); H5Aclose(attr); - } + } h5tools_str_close(&buffer); PRINTVALSTREAM(rawoutstream, "\n"); @@ -1708,7 +1712,7 @@ dataset_list1(hid_t dset) h5tools_str_append(&buffer, "%s"HSIZE_T_FORMAT, i?", ":"", cur_size[i]); if (max_size[i]==H5S_UNLIMITED) { h5tools_str_append(&buffer, "/%s", "Inf"); - } + } else if (max_size[i]!=cur_size[i] || verbose_g>0) { h5tools_str_append(&buffer, "/"HSIZE_T_FORMAT, max_size[i]); } @@ -1755,6 +1759,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ char f_name[256]; /* filter/file name */ + char dset_name[256]; /* filter/file name */ char s[64]; /* temporary string buffer */ off_t f_offset; /* offset in external file */ hsize_t f_size; /* bytes used in external file */ @@ -1764,6 +1769,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) double utilization; /* percent utilization of storage */ H5T_class_t tclass; /* datatype class identifier */ int i; + H5D_layout_t stl; hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ @@ -1779,20 +1785,71 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) space = H5Dget_space(dset); type = H5Dget_type(dset); - /* Print information about chunked storage */ - if (H5D_CHUNKED==H5Pget_layout(dcpl)) { - hsize_t chsize[64]; /* chunk size in elements */ - - ndims = H5Pget_chunk(dcpl, (int)NELMTS(chsize), chsize/*out*/); - h5tools_str_append(&buffer, " %-10s {", "Chunks:"); - total = H5Tget_size(type); - for (i=0; i 0) { + for(i = 0, max_len = 0; i < nf; i++) { + if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) + continue; + n = print_string(NULL, f_name, TRUE); + max_len = MAX(max_len, n); + } /* end for */ + h5tools_str_append(&buffer, " %-10s %d external file%s\n", + "Extern:", nf, 1==nf?"":"s"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", + "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s ", + "----", "----------", "----------", "----------"); + for (i=0; i 0) { - for(i = 0, max_len = 0; i < nf; i++) { - if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) - continue; - n = print_string(NULL, f_name, TRUE); - max_len = MAX(max_len, n); - } /* end for */ - h5tools_str_append(&buffer, " %-10s %d external file%s\n", - "Extern:", nf, 1==nf?"":"s"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", - "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s ", - "----", "----------", "----------", "----------"); - for (i=0; i 0) { for(i = 0; i < nf; i++) { @@ -2185,7 +2199,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_str_append(&buffer, " "); /* Check if we have already seen this softlink */ - if(symlink_is_visited(iter->symlink_list, linfo->type, NULL, buf)) + if(symlink_is_visited(iter->symlink_list, linfo->type, NULL, buf)) { h5tools_str_append(&buffer, "{Already Visited}\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2194,7 +2208,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); /* Add this link to the list of seen softlinks */ - if(symlink_visit_add(iter->symlink_list, linfo->type, NULL, buf) < 0) + if(symlink_visit_add(iter->symlink_list, linfo->type, NULL, buf) < 0) goto done; /* Adjust user data to specify that we are operating on the @@ -2206,7 +2220,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) if(!recursive_g) grp_literal_g = TRUE; /* Recurse through the soft link */ - if(visit_obj(iter->fid, name, iter) < 0) + if(visit_obj(iter->fid, name, iter) < 0) { grp_literal_g = orig_grp_literal; goto done; @@ -2239,7 +2253,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) else if (no_dangling_link_g && ret == 0) iter->symlink_list->dangle_link = TRUE; - if(H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0) + if(H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0) goto done; h5tools_str_append(&buffer, "External Link {"); @@ -2260,7 +2274,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_str_append(&buffer, " "); /* Check if we have already seen this elink */ - if(symlink_is_visited(iter->symlink_list, linfo->type, filename, path)) + if(symlink_is_visited(iter->symlink_list, linfo->type, filename, path)) { h5tools_str_append(&buffer, "{Already Visited}\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2269,7 +2283,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); /* Add this link to the list of seen elinks */ - if(symlink_visit_add(iter->symlink_list, linfo->type, filename, path) < 0) + if(symlink_visit_add(iter->symlink_list, linfo->type, filename, path) < 0) { goto done; } @@ -2319,7 +2333,7 @@ done: * * Purpose: Begins iteration on an object * - * Return: + * Return: * Success: 0 * Failure: -1 * @@ -2478,7 +2492,7 @@ get_width(void) * * Purpose: check if command line arguments are valid * - * Return: + * Return: * Success: TRUE (1) * Failure: FALSE (0) * @@ -2486,19 +2500,19 @@ get_width(void) * Jonathan Kim (06/15/2010) * *-------------------------------------------------------------------------*/ -static hbool_t +static hbool_t is_valid_args(void) { hbool_t ret = TRUE; - if(recursive_g && grp_literal_g) + if(recursive_g && grp_literal_g) { HDfprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n"); ret = FALSE; goto out; } - if(no_dangling_link_g && !follow_symlink_g) + if(no_dangling_link_g && !follow_symlink_g) { HDfprintf(rawerrorstream, "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n"); ret = FALSE; @@ -2876,7 +2890,7 @@ main(int argc, const char *argv[]) if(x) HDfree(oname); - for(u=0; u < symlink_list.nused; u++) + for(u=0; u < symlink_list.nused; u++) { if (symlink_list.objs[u].type == H5L_TYPE_EXTERNAL) HDfree(symlink_list.objs[u].file); @@ -2884,7 +2898,7 @@ main(int argc, const char *argv[]) HDfree(symlink_list.objs[u].path); } HDfree(symlink_list.objs); - + /* if no-dangling-links option specified and dangling link found */ if (no_dangling_link_g && iter.symlink_list->dangle_link) err_exit = 1; -- cgit v0.12 From a07297e90dc701d64b19b05a368aba765995d772 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Tue, 23 Jun 2015 08:54:01 -0500 Subject: [svn-r27271] fix a few warnings in t_mpi.c --- testpar/t_mpi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 7bd2f58..873b952 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -281,7 +281,7 @@ test_mpio_gb_file(char *filename) printf("Skipped GB file range test " "because MPI_Offset cannot support it\n"); }else{ - buf = HDmalloc(MB); + buf = (char *)HDmalloc(MB); VRFY((buf!=NULL), "malloc succeed"); /* open a new file. Remove it first in case it exists. */ @@ -678,10 +678,9 @@ static int test_mpio_derived_dtype(char *filename) { int mpi_err_strlen; int mpi_err; int i; - int nerrors = 0; /* number of errors */ MPI_Datatype etype,filetype; MPI_Datatype adv_filetype,bas_filetype[2]; - MPI_Datatype etypenew, filetypenew; + MPI_Datatype filetypenew; MPI_Offset disp; MPI_Status Status; MPI_Aint adv_disp[2]; @@ -1100,7 +1099,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0){ - printf("Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("Failed to turn off atexit processing. Continue.\n"); }; H5open(); if (parse_options(argc, argv) != 0){ -- cgit v0.12 From e030fe2751803461fedc8fe223da57986fa2c36a Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 24 Jun 2015 13:53:43 -0500 Subject: [svn-r27278] Merge of 27270 from trunk. Fixes HDFFV-9119 and HDFFV-9421. Changes that allow the autotools to correctly deal with inline functions. - Inline markup schemes are now checked with AC_COMPILE_IFELSE tests instead of AC_C_INLINE. - The inline designator is now H5_INLINE instead of H5_inline. This is now set in H5private.h instead of H5pubconf.h. Tested on: h5committest --- configure | 86 ++++++++++++++++++++++++++++--------------------------- configure.ac | 32 ++++++++++++++------- src/H5Oshared.h | 16 +++++------ src/H5VMprivate.h | 24 ++++++++-------- src/H5config.h.in | 15 ++++++---- src/H5private.h | 21 ++++++++++---- 6 files changed, 110 insertions(+), 84 deletions(-) diff --git a/configure b/configure index 63f40ad..0540906 100755 --- a/configure +++ b/configure @@ -26241,48 +26241,60 @@ $as_echo "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands __inline__" >&5 +$as_echo_n "checking if the compiler understands __inline__... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +static __inline__ void f(void){return;}; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw + +$as_echo "#define HAVE___INLINE__ 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands __inline" >&5 +$as_echo_n "checking if the compiler understands __inline... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +static __inline void f(void){return;}; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE___INLINE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands inline" >&5 +$as_echo_n "checking if the compiler understands inline... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +static inline void f(void){return;}; _ACEOF - ;; -esac +if ac_fn_c_try_compile "$LINENO"; then : +$as_echo "#define HAVE_INLINE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ extension" >&5 $as_echo_n "checking for __attribute__ extension... " >&6; } @@ -33134,16 +33146,6 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi -## We don't want inline defined for C++ compilers -## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since -## 'H5_inline' isn't a C++ keyword. -cat >> src/H5config.h <, specifically gfortran or m. ## This sed script corrects "-l " first and then "-l " with no library name. diff --git a/configure.ac b/configure.ac index 5ed40c4..18628b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1691,7 +1691,27 @@ AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid]) ## Check compiler characteristics ## AC_C_CONST -AC_C_INLINE + +AC_MSG_CHECKING([if the compiler understands __inline__]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static __inline__ void f(void){return;};]])], + [AC_DEFINE([HAVE___INLINE__], [1], [Define if the compiler understands __inline__]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([if the compiler understands __inline]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static __inline void f(void){return;};]])], + [AC_DEFINE([HAVE___INLINE], [1], [Define if the compiler understands __inline]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([if the compiler understands inline]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static inline void f(void){return;};]])], + [AC_DEFINE([HAVE_INLINE], [1], [Define if the compiler understands inline]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], @@ -2904,16 +2924,6 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi -## We don't want inline defined for C++ compilers -## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since -## 'H5_inline' isn't a C++ keyword. -cat >> src/H5config.h <, specifically gfortran or m. ## This sed script corrects "-l " first and then "-l " with no library name. diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 3ec5709..2ac2a98 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -47,7 +47,7 @@ * *------------------------------------------------------------------------- */ -static H5_inline void * +static H5_INLINE void * H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, const uint8_t *p) { @@ -107,7 +107,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline herr_t +static H5_INLINE herr_t H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg) { const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ @@ -162,7 +162,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline size_t +static H5_INLINE size_t H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg) { const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ @@ -215,7 +215,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline herr_t +static H5_INLINE herr_t H5O_SHARED_DELETE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) { H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ @@ -267,7 +267,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline herr_t +static H5_INLINE herr_t H5O_SHARED_LINK(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) { H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */ @@ -318,7 +318,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline void * +static H5_INLINE void * H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id) @@ -382,7 +382,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline herr_t +static H5_INLINE herr_t H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src, H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info) @@ -453,7 +453,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline herr_t +static H5_INLINE herr_t H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth) { diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index 33f2b28..bf4e3ca 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -125,7 +125,7 @@ H5_DLL ssize_t H5VM_memcpyvv(void *_dst, * *------------------------------------------------------------------------- */ -static H5_inline hsize_t H5_ATTR_UNUSED +static H5_INLINE hsize_t H5_ATTR_UNUSED H5VM_vector_reduce_product(unsigned n, const hsize_t *v) { hsize_t ret_value = 1; @@ -157,7 +157,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline htri_t H5_ATTR_UNUSED +static H5_INLINE htri_t H5_ATTR_UNUSED H5VM_vector_zerop_u(int n, const hsize_t *v) { htri_t ret_value=TRUE; /* Return value */ @@ -192,7 +192,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline htri_t H5_ATTR_UNUSED +static H5_INLINE htri_t H5_ATTR_UNUSED H5VM_vector_zerop_s(int n, const hssize_t *v) { htri_t ret_value=TRUE; /* Return value */ @@ -229,7 +229,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline int H5_ATTR_UNUSED +static H5_INLINE int H5_ATTR_UNUSED H5VM_vector_cmp_u (unsigned n, const hsize_t *v1, const hsize_t *v2) { int ret_value=0; /* Return value */ @@ -271,7 +271,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline int H5_ATTR_UNUSED +static H5_INLINE int H5_ATTR_UNUSED H5VM_vector_cmp_s (unsigned n, const hssize_t *v1, const hssize_t *v2) { int ret_value=0; /* Return value */ @@ -308,7 +308,7 @@ done: * *------------------------------------------------------------------------- */ -static H5_inline void H5_ATTR_UNUSED +static H5_INLINE void H5_ATTR_UNUSED H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2) { while (n--) *v1++ += *v2++; @@ -355,7 +355,7 @@ static const unsigned char LogTable256[] = * *------------------------------------------------------------------------- */ -static H5_inline unsigned H5_ATTR_UNUSED +static H5_INLINE unsigned H5_ATTR_UNUSED H5VM_log2_gen(uint64_t n) { unsigned r; /* r will be log2(n) */ @@ -403,7 +403,7 @@ static const unsigned MultiplyDeBruijnBitPosition[32] = * *------------------------------------------------------------------------- */ -static H5_inline unsigned H5_ATTR_UNUSED +static H5_INLINE unsigned H5_ATTR_UNUSED H5VM_log2_of2(uint32_t n) { #ifndef NDEBUG @@ -424,7 +424,7 @@ H5VM_log2_of2(uint32_t n) * *------------------------------------------------------------------------- */ -static H5_inline hsize_t H5_ATTR_UNUSED +static H5_INLINE hsize_t H5_ATTR_UNUSED H5VM_power2up(hsize_t n) { hsize_t ret_value = 1; /* Return value */ @@ -449,7 +449,7 @@ H5VM_power2up(hsize_t n) * *------------------------------------------------------------------------- */ -static H5_inline unsigned H5_ATTR_UNUSED +static H5_INLINE unsigned H5_ATTR_UNUSED H5VM_limit_enc_size(uint64_t limit) { return (H5VM_log2_gen(limit) / 8) + 1; @@ -478,7 +478,7 @@ static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, * *------------------------------------------------------------------------- */ -static H5_inline hbool_t H5_ATTR_UNUSED +static H5_INLINE hbool_t H5_ATTR_UNUSED H5VM_bit_get(const unsigned char *buf, size_t offset) { /* Test the appropriate bit in the buffer */ @@ -505,7 +505,7 @@ H5VM_bit_get(const unsigned char *buf, size_t offset) * *------------------------------------------------------------------------- */ -static H5_inline void H5_ATTR_UNUSED +static H5_INLINE void H5_ATTR_UNUSED H5VM_bit_set(unsigned char *buf, size_t offset, hbool_t val) { /* Set/reset the appropriate bit in the buffer */ diff --git a/src/H5config.h.in b/src/H5config.h.in index c089cd3..ac781fc 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -133,6 +133,9 @@ /* Define to 1 if you have the `get_fpc_csr' function. */ #undef HAVE_GET_FPC_CSR +/* Define if the compiler understands inline */ +#undef HAVE_INLINE + /* Define if library will contain instrumentation to detect correct optimization operation */ #undef HAVE_INSTRUMENTED_LIBRARY @@ -356,6 +359,12 @@ /* Define to 1 if you have the `_scrsize' function. */ #undef HAVE__SCRSIZE +/* Define if the compiler understands __inline */ +#undef HAVE___INLINE + +/* Define if the compiler understands __inline__ */ +#undef HAVE___INLINE__ + /* Define if HDF5's high-level library headers should be included in hdf5.h */ #undef INCLUDE_HL @@ -569,12 +578,6 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - /* Define to `long int' if does not define. */ #undef off_t diff --git a/src/H5private.h b/src/H5private.h index f7a4171..9efd145 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -183,11 +183,22 @@ #endif /*H5_HAVE_WIN32_API*/ -/* H5_inline */ -#ifndef H5_inline -#define H5_inline -#endif /* H5_inline */ - +/* Various ways that inline functions can be declared */ +#if defined(H5_HAVE___INLINE__) + /* GNU (alternative form) */ + #define H5_INLINE __inline__ +#elif defined(H5_HAVE___INLINE) + /* Visual Studio */ + #define H5_INLINE __inline +#elif defined(H5_HAVE_INLINE) + /* GNU, C++ + * Use "inline" as a last resort on the off-chance that there will + * be C++ problems. + */ + #define H5_INLINE inline +#else + #define H5_INLINE +#endif /* inline choices */ #ifndef F_OK # define F_OK 00 -- cgit v0.12 From 5dac57c5c4524e5410960cc835610eb40a401830 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 24 Jun 2015 16:45:32 -0500 Subject: [svn-r27280] Add temporary file to create tarballs for buildbot (and possibly all) daily testing. When the behavior is acceptable, the changes should be merged into the regular release script as a --revision option. --- MANIFEST | 1 + bin/bbrelease | 394 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 395 insertions(+) create mode 100755 bin/bbrelease diff --git a/MANIFEST b/MANIFEST index 1cac0e1..e85662f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -42,6 +42,7 @@ ./configure.ac ./bin/COPYING +./bin/bbrelease _DO_NOT_DISTRIBUTE_ ./bin/buildhdf5 ./bin/checkapi _DO_NOT_DISTRIBUTE_ ./bin/checkposix _DO_NOT_DISTRIBUTE_ diff --git a/bin/bbrelease b/bin/bbrelease new file mode 100755 index 0000000..c94d7f2 --- /dev/null +++ b/bin/bbrelease @@ -0,0 +1,394 @@ +#!/bin/sh +# +# 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. +# + +# Make a release of hdf5. +# +# Programmer: Robb Matzke +# Creation date: on or before 1998-01-29. +# +# Modifications +# Robb Matzke, 1999-07-16 +# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like +# `sed s+/CVS++' to `sed 's/\/CVS//' +# +# Albert Cheng, 1999-10-26 +# Moved the MANIFEST checking to a separate command file so that +# it can be invoked individually. +# +# Albert Cheng, 2004-08-14 +# Added the --private option. +# +# James Laird, 2005-09-07 +# Added the md5 method. + +# Function definitions +# +# Print Usage page +USAGE() +{ +cat << EOF +Usage: $0 -d [--docver BRANCHNAME] [-h] [--nocheck] [--private] ... + -d DIR The name of the directory where the releas(es) should be + placed. + --docver BRANCHNAME This is added for 1.8 and beyond to get the correct + version of documentation files from the hdf5docs + repository. BRANCHNAME for v1.8 should be hdf5_1_8. + -h print the help page. + --nocheck Ignore errors in MANIFEST file. + --private Make a private release with today's date in version information. + --revision Make a private release with the code revision number in version information. + +This must be run at the top level of the source directory. +The other command-line options are the names of the programs to use +for compressing the resulting tar archive (if none are given then +"tar" is assumed): + + tar -- use tar and don't do any compressing. + gzip -- use gzip with "-9" and append ".gz" to the output name. + bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name. + zip -- convert all text files to DOS style and form a zip file for Windows use. + doc -- produce the latest doc tree in addition to the archive. + +An md5 checksum is produced for each archive created and stored in the md5 file. + +Examples: + + $ bin/release -d /tmp + /tmp/hdf5-1.8.13-RELEASE.txt + /tmp/hdf5-1.8.13.md5 + /tmp/hdf5-1.8.13.tar + + $ bin/release -d /tmp gzip + /tmp/hdf5-1.8.13-RELEASE.txt + /tmp/hdf5-1.8.13.md5 + /tmp/hdf5-1.8.13.tar.gz + + $ bin/release -d /tmp tar gzip zip + /tmp/hdf5-1.8.13-RELEASE.txt + /tmp/hdf5-1.8.13.md5 + /tmp/hdf5-1.8.13.tar + /tmp/hdf5-1.8.13.tar.gz + /tmp/hdf5-1.8.13.tar.zip + +EOF + +} + +# Function name: tar2zip +# Convert the release tarball to a Windows zipball. +# +# Programmer: Albert Cheng +# Creation date: 2014-04-23 +# +# Modifications +# +# Steps: +# 1. untar the tarball in a temporay directory; +# Note: do this in a temporary directory to avoid changing +# the original source directory which maybe around. +# 2. convert all its text files to DOS (LF-CR) style; +# 3. form a zip file which is usable by Windows users. +# +# Parameters: +# $1 version +# $2 release tarball +# $3 output zipball file name +# +# Returns 0 if successful; 1 otherwise +# +tar2zip() +{ + if [ $# -ne 3 ]; then + echo "usage: tar2zip " + return 1 + fi + ztmpdir=/tmp/tmpdir$$ + mkdir -p $ztmpdir + version=$1 + tarfile=$2 + zipfile=$3 + + # step 1: untar tarball in ztmpdir + (cd $ztmpdir; tar xf -) < $tarfile + # sanity check + if [ ! -d $ztmpdir/$version ]; then + echo "untar did not create $ztmpdir/$version source dir" + # cleanup + rm -rf $ztmpdir + return 1 + fi + # step 2: convert text files + # There maybe a simpler way to do this. + # options used in unix2dos: + # -k Keep the date stamp + # -q quiet mode + # grep redirect output to /dev/null because -q or -s are not portable. + find $ztmpdir/$version | \ + while read inf; do \ + if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \ + unix2dos -q -k $inf; \ + fi\ + done + # step 3: make zipball + # -9 maximum compression + # -y Store symbolic links as such in the zip archive + # -r recursive + # -q quiet + (cd $ztmpdir; zip -9 -y -r -q $version.zip $version) + mv $ztmpdir/$version.zip $zipfile + + # cleanup + rm -rf $ztmpdir +} + +# This command must be run at the top level of the hdf5 source directory. +# Verify this requirement. +if [ ! \( -f configure -a -f bin/release \) ]; then + echo "$0 must be run at the top level of the hdf5 source directory" + exit 1 +fi + +# Defaults +DEST=releases +VERS=`perl bin/h5vers` +VERS_OLD= +test "$VERS" || exit 1 +verbose=yes +check=yes +release_date=`date +%F` +today=`date +%Y%m%d` +pmode='no' +revmode='no' +tmpdir="../#release_tmp.$$" # tmp work directory +DOC_URL=http://svn.hdfgroup.uiuc.edu/hdf5doc/trunk +CPPLUS_RM_NAME=cpplus_RM + +# Restore previous Version information +RESTORE_VERSION() +{ + if [ X-${VERS_OLD} != X- ]; then + echo restoring version information back to $VERS_OLD + rm -f config/lt_vers.am + cp $tmpdir/lt_vers.am config/lt_vers.am + bin/h5vers -s $VERS_OLD + VERS_OLD= + fi +} + + +# Command-line arguments +while [ -n "$1" ]; do + arg=$1 + shift + case "$arg" in + -d) + DEST=$1 + shift + ;; + --nocheck) + check=no + ;; + -h) + USAGE + exit 0 + ;; + --private) + pmode=yes + ;; + --revision) + revmode=yes + ;; + --docver) + DOCVERSION=$1 + shift + ;; + -*) + echo "Unknown switch: $arg" 1>&2 + USAGE + exit 1 + ;; + *) + methods="$methods $arg" + ;; + esac +done + +# Default method is tar +if [ "X$methods" = "X" ]; then + methods="tar" +fi + +# Create the temporay work directory. +if mkdir $tmpdir; then + echo "temporary work directory for release. "\ + "Can be deleted after release completes." > $tmpdir/README +else + echo "Failed to mkdir tmpdir($tmpdir)" + exit 1 +fi + +# setup restoration in case of abort. +trap RESTORE_VERSION 0 + +if [ X$pmode = Xyes ]; then + VERS_OLD=$VERS + # Copy old version of config/lt_vers.am, since it's hard to + # "undo" changes to it. + cp config/lt_vers.am $tmpdir + # Set version information to m.n.r-of$today. + # (h5vers does not correctly handle just m.n.r-$today.) + VERS=`echo $VERS | sed -e s/-.*//`-of$today + echo Private release of $VERS + bin/h5vers -s $VERS +fi + +if [ X$revmode = Xyes ]; then + VERS_OLD=$VERS + # Copy old version of config/lt_vers.am, since it's hard to + # "undo" changes to it. + cp config/lt_vers.am $tmpdir + branch=`svn info | grep URL: | awk -F/ '{print $NF}'` + revision=`svn info | grep "Last Changed Rev:" | awk '{print $4}'` + # Set version information to m.n.r-r$revision. + # (h5vers does not correctly handle just m.n.r-$today.) + VERS=`echo $VERS | sed -e s/-.*//`-r$revision + echo Private release of $VERS + bin/h5vers -s $VERS + HDF5_VERS=hdf5-$branch-r$revision + HDF5_IN_VERS=hdf5src +else + # Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos + HDF5_VERS=hdf5-$VERS +fi + + +test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2 +if [ ! -d $DEST ]; then + echo " Destination directory $DEST does not exist" 1>&2 + exit 1 +fi + +# Check the validity of the MANIFEST file. +bin/chkmanifest || fail=yes +if [ "X$fail" = "Xyes" ]; then + if [ $check = yes ]; then + exit 1 + else + echo "Continuing anyway..." + fi +fi + +# Create a manifest that contains only files for distribution. +MANIFEST=$tmpdir/H5_MANIFEST +grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST + +# Prepare the source tree for a release. +#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1 +ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1 +# Save a backup copy of Makefile if exists. +test -f Makefile && mv Makefile $tmpdir/Makefile.x +cp -p Makefile.dist Makefile + +# Update README.txt and release_docs/RELEASE.txt with release information in +# line 1. +for f in README.txt release_docs/RELEASE.txt; do + echo "HDF5 version $VERS released on $release_date" >$f.x + sed -e 1d $f >>$f.x + mv $f.x $f + # Make sure new files are of the right access mode + chmod 644 $f +done + +# trunk is different than branches. +if [ "${DOCVERSION}" ]; then + DOC_URL=http://svn.hdfgroup.uiuc.edu/hdf5doc/branches/${DOCVERSION} +fi + +# Create the tar file +test "$verbose" && echo " Running tar..." 1>&2 +( \ + cd $tmpdir; \ + tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \ + `sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \ +) +# `sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \ + +# Compress +MD5file=$HDF5_VERS.md5 +cp /dev/null $DEST/$MD5file +for comp in $methods; do + case $comp in + tar) + cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar + (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file) + ;; + gzip) + test "$verbose" && echo " Running gzip..." 1>&2 + gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz + (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file) + ;; + bzip2) + test "$verbose" && echo " Running bzip2..." 1>&2 + bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2 + (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file) + ;; + zip) + test "$verbose" && echo " Creating zip ball..." 1>&2 +# tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 + tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 + (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file) + ;; + doc) + if [ "${DOCVERSION}" = "" ]; then + DOCVERSION=trunk + fi + test "$verbose" && echo " Creating docs..." 1>&2 + # Check out docs from svn repo + (cd $tmpdir; svn co $DOC_URL > /dev/null) || exit 1 + # Create doxygen C++ RM + (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1 + # Replace version of C++ RM with just-created version + rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME + mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME + # Compress the docs and move them to the release area + mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs + (cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs) + mv $tmpdir/${HDF5_VERS}_docs.tar $DEST + ;; + *) + echo "***Error*** Unknown method $comp" + exit 1 + ;; + esac +done + +# Copy the RELEASE.txt to the release area. +cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt + +# Remove distributed Makefile and restore previous Makefile if existed. +rm -f Makefile +test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile + +# Restore OLD version information, then no need for trap. +if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then + RESTORE_VERSION + trap 0 +fi + +# Remove temporary things +rm -rf $tmpdir + +exit 0 -- cgit v0.12 From df8bd7ccd6cd8d50280a3a7d862064c6340e2169 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 25 Jun 2015 11:39:19 -0500 Subject: [svn-r27283] Change generic directory in tarballs to hdfsrc. Remove some commented lines. --- bin/bbrelease | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/bbrelease b/bin/bbrelease index c94d7f2..fea498a 100755 --- a/bin/bbrelease +++ b/bin/bbrelease @@ -268,13 +268,15 @@ if [ X$revmode = Xyes ]; then echo Private release of $VERS bin/h5vers -s $VERS HDF5_VERS=hdf5-$branch-r$revision - HDF5_IN_VERS=hdf5src + # use a generic directory name for revision releases + HDF5_IN_VERS=hdfsrc else # Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos HDF5_VERS=hdf5-$VERS + # directory name matches tar file name for non-revision releases + HDF5_IN_VERS=$HDF5_VERS fi - test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2 if [ ! -d $DEST ]; then echo " Destination directory $DEST does not exist" 1>&2 @@ -324,7 +326,6 @@ test "$verbose" && echo " Running tar..." 1>&2 tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \ `sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \ ) -# `sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \ # Compress MD5file=$HDF5_VERS.md5 @@ -347,7 +348,6 @@ for comp in $methods; do ;; zip) test "$verbose" && echo " Creating zip ball..." 1>&2 -# tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2 (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file) ;; -- cgit v0.12 From 44718454cacbad4a39e06e8935406e17be046ea0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 25 Jun 2015 15:06:16 -0500 Subject: [svn-r27285] added search replace for space to comma --- configure | 4 ++-- configure.ac | 5 +++-- m4/aclocal_fc.m4 | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure b/configure index cc68365..471901e 100755 --- a/configure +++ b/configure @@ -7891,8 +7891,8 @@ $as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 8ea73eb..e7215af 100644 --- a/configure.ac +++ b/configure.ac @@ -596,8 +596,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl count the number of real kinds H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" + dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 'tr |{}|//|' | $PERL -e 's/ /,/g`)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index a9d18ba..0bb66a1 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -584,6 +584,8 @@ rm -f pac_Cconftest.out ]) AC_RUN_IFELSE([],[ if test -s pac_Cconftest.out ; then +dnl LDBL_DIG="`perl -ne '$. == 1 && print && exit'`" +dnl FLT128_DIG="`perl -ne '$. == 2 && print && exit'`" LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" else -- cgit v0.12 From 58a95d0d4a593157bb7e77f71347ee50783a11a0 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 27 Jun 2015 00:51:04 -0500 Subject: [svn-r27292] Description: Bring 'fail if unknown always' object header message flag from the avoid_truncate branch, strengthen error checking for unknown messages, and try to catch object header code configurations at compile time (instead of runtime). Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel (h5committest forthcoming) --- src/H5O.c | 9 ++++++--- src/H5Ocache.c | 9 +++++---- src/H5Oprivate.h | 10 +++++----- test/gen_bogus.c | 14 +++++++++++--- test/ohdr.c | 42 +++++++++++++++++++++++++++++++++++------- test/tbogus.h5 | Bin 1944 -> 2216 bytes 6 files changed, 62 insertions(+), 22 deletions(-) diff --git a/src/H5O.c b/src/H5O.c index d0ace29..6b9852b 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -44,6 +44,9 @@ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5MFprivate.h" /* File memory management */ +#ifdef H5O_ENABLE_BOGUS +#include "H5MMprivate.h" /* Memory management */ +#endif /* H5O_ENABLE_BOGUS */ #include "H5Opkg.h" /* Object headers */ #include "H5SMprivate.h" /* Shared object header messages */ @@ -196,10 +199,10 @@ H5O_init_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR /* H5O interface sanity checks */ - HDassert(H5O_MSG_TYPES == NELMTS(H5O_msg_class_g)); - HDassert(sizeof(H5O_fheap_id_t) == H5O_FHEAP_ID_LEN); + HDcompile_assert(H5O_MSG_TYPES == NELMTS(H5O_msg_class_g)); + HDcompile_assert(sizeof(H5O_fheap_id_t) == H5O_FHEAP_ID_LEN); - HDassert(H5O_UNKNOWN_ID < H5O_MSG_TYPES); + HDcompile_assert(H5O_UNKNOWN_ID < H5O_MSG_TYPES); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_init_interface() */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index db1bd1f..203d0fc 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1130,7 +1130,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image id = *chunk_image++; /* Check for unknown message ID getting encoded in file */ - if(id == H5O_UNKNOWN_ID) + if(id >= H5O_UNKNOWN_ID) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "'unknown' message ID encoded in file?!?") /* Message size */ @@ -1218,9 +1218,10 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image /* Set message to "unknown" class */ oh->mesg[mesgno].type = H5O_msg_class_g[H5O_UNKNOWN_ID]; - /* Check for "fail if unknown" message flag */ - if((udata->file_intent & H5F_ACC_RDWR) && - (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE)) + /* Check for "fail if unknown" message flags */ + if(((udata->file_intent & H5F_ACC_RDWR) && + (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE)) + || (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS)) HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "unknown message with 'fail if unknown' flag found") /* Check for "mark if unknown" message flag, etc. */ else if((flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) && diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 92d0107..dbe74f7 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -75,7 +75,8 @@ typedef struct H5O_t H5O_t; #define H5O_MSG_FLAG_MARK_IF_UNKNOWN 0x10u #define H5O_MSG_FLAG_WAS_UNKNOWN 0x20u #define H5O_MSG_FLAG_SHAREABLE 0x40u -#define H5O_MSG_FLAG_BITS (H5O_MSG_FLAG_CONSTANT|H5O_MSG_FLAG_SHARED|H5O_MSG_FLAG_DONTSHARE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE|H5O_MSG_FLAG_MARK_IF_UNKNOWN|H5O_MSG_FLAG_WAS_UNKNOWN|H5O_MSG_FLAG_SHAREABLE) +#define H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS 0x80u +#define H5O_MSG_FLAG_BITS (H5O_MSG_FLAG_CONSTANT|H5O_MSG_FLAG_SHARED|H5O_MSG_FLAG_DONTSHARE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE|H5O_MSG_FLAG_MARK_IF_UNKNOWN|H5O_MSG_FLAG_WAS_UNKNOWN|H5O_MSG_FLAG_SHAREABLE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) /* Flags for updating messages */ #define H5O_UPDATE_TIME 0x01u @@ -84,6 +85,9 @@ typedef struct H5O_t H5O_t; /* Hash value constants */ #define H5O_HASH_SIZE 32 +/* Enable reading/writing "bogus" messages */ +/* #define H5O_ENABLE_BOGUS */ + /* ========= Object Creation properties ============ */ #define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ #define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ @@ -196,7 +200,6 @@ typedef struct H5O_copy_t { #define H5O_UNKNOWN_ID 0x0018 /* Placeholder message ID for unknown message. */ /* (this should never exist in a file) */ - /* Shared object message types. * Shared objects can be committed, in which case the shared message contains * the location of the object header that holds the message, or shared in the @@ -439,9 +442,6 @@ typedef struct H5O_layout_t { H5O_storage_t storage; /* Information for storing dataset elements */ } H5O_layout_t; -/* Enable reading/writing "bogus" messages */ -/* #define H5O_ENABLE_BOGUS */ - #ifdef H5O_ENABLE_BOGUS /* * "Bogus" Message. diff --git a/test/gen_bogus.c b/test/gen_bogus.c index df1e81f..e9ce686 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -61,7 +61,7 @@ int main(void) if((did = H5Dcreate2(fid, "/Dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; if(H5Dclose(did) < 0) goto error; - /* Set "fail if unknown" message flag for bogus message */ + /* Set "fail if unknown and open for write" message flag for bogus message */ bogus_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE; if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error; @@ -69,12 +69,20 @@ int main(void) if((did = H5Dcreate2(fid, "/Dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; if(H5Dclose(did) < 0) goto error; + /* Set "fail if unknown always" message flag for bogus message */ + bogus_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS; + if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error; + + /* Create third dataset, with "fail if unknown always" message flag */ + if((did = H5Dcreate2(fid, "/Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; + if(H5Dclose(did) < 0) goto error; + /* Set "mark if unknown" message flag for bogus message */ bogus_flags = H5O_MSG_FLAG_MARK_IF_UNKNOWN; if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error; - /* Create second dataset, with "mark if unknown" message flag */ - if((did = H5Dcreate2(fid, "/Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; + /* Create fourth dataset, with "mark if unknown" message flag */ + if((did = H5Dcreate2(fid, "/Dataset4", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; if(H5Dclose(did) < 0) goto error; /* Close dataset creation property list */ diff --git a/test/ohdr.c b/test/ohdr.c index 1ba2b10..45f2238 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -665,7 +665,9 @@ main(void) PASSED(); - /* Test reading datasets with undefined object header messages */ + /* Test reading datasets with undefined object header messages + * and the various "fail/mark if unknown" object header message flags + */ HDputs("Accessing objects with unknown header messages:"); { hid_t file2; /* File ID for 'bogus' object file */ @@ -687,7 +689,7 @@ main(void) PASSED(); - TESTING("object with unknown header message & 'fail if unknown and open for write' flag set"); + TESTING("object in r/o file with unknown header message & 'fail if unknown and open for write' flag set"); /* Open the dataset with the unknown header message, and "fail if unknown and open for write" flag */ if((dset = H5Dopen2(file2, "/Dataset2", H5P_DEFAULT)) < 0) @@ -697,10 +699,23 @@ main(void) PASSED(); + TESTING("object in r/o file with unknown header message & 'fail if unknown always' flag set"); + + /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */ + H5E_BEGIN_TRY { + dset = H5Dopen2(file2, "/Dataset3", H5P_DEFAULT); + } H5E_END_TRY; + if(dset >= 0) { + H5Dclose(dset); + TEST_ERROR + } /* end if */ + + PASSED(); + TESTING("object with unknown header message & 'mark if unknown' flag set"); /* Copy object with "mark if unknown" flag on message into file that can be modified */ - if(H5Ocopy(file2, "/Dataset3", file, "/Dataset3", H5P_DEFAULT, H5P_DEFAULT) < 0) + if(H5Ocopy(file2, "/Dataset4", file, "/Dataset4", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Close the file we created (to flush changes to file) */ @@ -712,7 +727,7 @@ main(void) TEST_ERROR /* Open the dataset with the "mark if unknown" message */ - if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0) + if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0) TEST_ERROR /* Check that the "unknown" message was _NOT_ marked */ @@ -732,7 +747,7 @@ main(void) TEST_ERROR /* Open the dataset with the "mark if unknown" message */ - if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0) + if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0) TEST_ERROR /* Create data space */ @@ -764,7 +779,7 @@ main(void) TEST_ERROR /* Re-open the dataset with the "mark if unknown" message */ - if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0) + if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0) TEST_ERROR /* Check that the "unknown" message was marked */ @@ -785,7 +800,7 @@ main(void) if((file2 = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR - TESTING("object with unknown header message & 'fail if unknown and open for write' flag set"); + TESTING("object in r/w file with unknown header message & 'fail if unknown and open for write' flag set"); /* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write" flag */ H5E_BEGIN_TRY { @@ -796,6 +811,19 @@ main(void) TEST_ERROR } /* end if */ + PASSED(); + + TESTING("object in r/w file with unknown header message & 'fail if unknown always' flag set"); + + /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */ + H5E_BEGIN_TRY { + dset = H5Dopen2(file2, "/Dataset3", H5P_DEFAULT); + } H5E_END_TRY; + if(dset >= 0) { + H5Dclose(dset); + TEST_ERROR + } /* end if */ + /* Close the file with the bogus objects */ if(H5Fclose(file2) < 0) TEST_ERROR diff --git a/test/tbogus.h5 b/test/tbogus.h5 index 906921c..875fbd8 100644 Binary files a/test/tbogus.h5 and b/test/tbogus.h5 differ -- cgit v0.12 From 8e94745298c2ceacf80b21f0d16e887217527916 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 27 Jun 2015 11:45:21 -0500 Subject: [svn-r27293] Description: Split parallel metadata cache code into separate source code modules. Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel (too minor for h5committest) --- MANIFEST | 2 + src/H5AC.c | 2338 +---------------------------------------------------- src/H5ACmpio.c | 2295 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/H5ACpkg.h | 25 +- src/H5C.c | 1304 ++---------------------------- src/H5Cmpio.c | 1260 +++++++++++++++++++++++++++++ src/H5Cpkg.h | 4 +- src/H5Cprivate.h | 4 +- src/Makefile.am | 6 +- src/Makefile.in | 10 +- test/cache.c | 6 +- testpar/t_cache.c | 6 +- 12 files changed, 3707 insertions(+), 3553 deletions(-) create mode 100644 src/H5ACmpio.c create mode 100644 src/H5Cmpio.c diff --git a/MANIFEST b/MANIFEST index e85662f..f8e7c75 100644 --- a/MANIFEST +++ b/MANIFEST @@ -567,6 +567,7 @@ ./src/H5Aprivate.h ./src/H5Apublic.h ./src/H5AC.c +./src/H5ACmpio.c ./src/H5ACpkg.h ./src/H5ACprivate.h ./src/H5ACpublic.h @@ -587,6 +588,7 @@ ./src/H5B2stat.c ./src/H5B2test.c ./src/H5C.c +./src/H5Cmpio.c ./src/H5Cpkg.h ./src/H5Cprivate.h ./src/H5Cpublic.h diff --git a/src/H5AC.c b/src/H5AC.c index c6b0b47..e6218d1 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -44,13 +44,10 @@ #include "H5private.h" /* Generic Functions */ #include "H5ACpkg.h" /* Metadata cache */ #include "H5Cpkg.h" /* Cache */ -#include "H5Dprivate.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ @@ -63,38 +60,6 @@ /* Local Typedefs */ /******************/ -#ifdef H5_HAVE_PARALLEL -/**************************************************************************** - * - * structure H5AC_slist_entry_t - * - * The dirty entry list maintained via the d_slist_ptr field of H5AC_aux_t - * and the cleaned entry list maintained via the c_slist_ptr field of - * H5AC_aux_t are just lists of the file offsets of the dirty/cleaned - * entries. Unfortunately, the slist code makes us define a dynamically - * allocated structure to store these offsets in. This structure serves - * that purpose. Its fields are as follows: - * - * addr: file offset of a metadata entry. Entries are added to this - * list (if they aren't there already) when they are marked - * dirty in an unprotect, inserted, or moved. They are - * removed when they appear in a clean entries broadcast. - * - ****************************************************************************/ -typedef struct H5AC_slist_entry_t -{ - haddr_t addr; -} H5AC_slist_entry_t; - -/* User data for address list building callbacks */ -typedef struct H5AC_addr_list_ud_t -{ - H5AC_aux_t * aux_ptr; /* 'Auxiliary' parallel cache info */ - haddr_t * addr_buf_ptr; /* Array to store addresses */ - int i; /* Counter for position in array */ -} H5AC_addr_list_ud_t; -#endif /* H5_HAVE_PARALLEL */ - /********************/ /* Local Prototypes */ @@ -105,39 +70,6 @@ static herr_t H5AC__check_if_write_permitted(const H5F_t *f, static herr_t H5AC__ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr, H5C_auto_size_ctl_t *int_conf_ptr); -#ifdef H5_HAVE_PARALLEL -static herr_t H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, - int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); -static herr_t H5AC__broadcast_clean_list(H5AC_t *cache_ptr); -static herr_t H5AC__construct_candidate_list(H5AC_t *cache_ptr, - H5AC_aux_t *aux_ptr, int sync_point_op); -static herr_t H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, - int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); -static herr_t H5AC__flush_entries(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr); -static herr_t H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr); -static herr_t H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, - hbool_t was_dirty, unsigned flags); -static herr_t H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr); -static herr_t H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, - haddr_t new_addr); -static herr_t H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, - hid_t dxpl_id); -static herr_t H5AC__receive_haddr_list(MPI_Comm mpi_comm, int *num_entries_ptr, - haddr_t **haddr_buf_ptr_ptr); -static herr_t H5AC__receive_candidate_list(const H5AC_t *cache_ptr, - int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); -static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, - haddr_t *candidates_list_ptr); -static herr_t H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id); -static herr_t H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op); -#endif /* H5_HAVE_PARALLEL */ - /*********************/ /* Package Variables */ @@ -164,14 +96,6 @@ hid_t H5AC_ind_dxpl_id = (-1); /* Local Variables */ /*******************/ -#ifdef H5_HAVE_PARALLEL -/* Declare a free list to manage the H5AC_aux_t struct */ -H5FL_DEFINE_STATIC(H5AC_aux_t); - -/* Declare a free list to manage the H5AC_slist_entry_t struct */ -H5FL_DEFINE_STATIC(H5AC_slist_entry_t); -#endif /* H5_HAVE_PARALLEL */ - static const char *H5AC_entry_type_names[H5AC_NTYPES] = { "B-tree nodes", @@ -1490,78 +1414,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_unprotect() */ - -/*------------------------------------------------------------------------- - * Function: HA5C_set_sync_point_done_callback - * - * Purpose: Set the value of the sync_point_done callback. This - * callback is used by the parallel test code to verify - * that the expected writes and only the expected writes - * take place during a sync point. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/9/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5AC_set_sync_point_done_callback(H5C_t * cache_ptr, - void (* sync_point_done)(int num_writes, haddr_t * written_entries_tbl)) -{ - H5AC_aux_t * aux_ptr; - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Sanity checks */ - HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - - aux_ptr->sync_point_done = sync_point_done; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC_set_sync_point_done_callback() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: HA5C_set_write_done_callback - * - * Purpose: Set the value of the write_done callback. This callback - * is used to improve performance of the parallel test bed - * for the cache. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 5/11/06 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5AC_set_write_done_callback(H5C_t * cache_ptr, void (* write_done)(void)) -{ - H5AC_aux_t * aux_ptr; - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Sanity checks */ - HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert( aux_ptr != NULL ); - HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ); - - aux_ptr->write_done = write_done; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC_set_write_done_callback() */ -#endif /* H5_HAVE_PARALLEL */ - #ifndef NDEBUG /* debugging functions */ /*------------------------------------------------------------------------- @@ -2119,64 +1971,6 @@ done: } /* H5AC_open_trace_file() */ -/*------------------------------------------------------------------------- - * Function: H5AC_add_candidate() - * - * Purpose: Add the supplied metadata entry address to the candidate - * list. Verify that each entry added does not appear in - * the list prior to its insertion. - * - * This function is intended for used in constructing list - * of entried to be flushed during sync points. It shouldn't - * be called anywhere else. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 3/17/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr) -{ - H5AC_aux_t * aux_ptr; - H5AC_slist_entry_t * slist_entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert(aux_ptr->candidate_slist_ptr != NULL); - - /* Construct an entry for the supplied address, and insert - * it into the candidate slist. - */ - if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate candidate slist entry") - slist_entry_ptr->addr = addr; - - if(H5SL_insert(aux_ptr->candidate_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist") - -done: - /* Clean up on error */ - if(ret_value < 0) - if(slist_entry_ptr) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC_add_candidate() */ -#endif /* H5_HAVE_PARALLEL */ - - /*************************************************************************/ /*************************** Debugging Functions: ************************/ /*************************************************************************/ @@ -2288,236 +2082,6 @@ done: /**************************** Private Functions: *************************/ /*************************************************************************/ -/*------------------------------------------------------------------------- - * - * Function: H5AC__broadcast_candidate_list() - * - * Purpose: Broadcast the contents of the process 0 candidate entry - * slist. In passing, also remove all entries from said - * list. As the application of this will be handled by - * the same functions on all processes, construct and - * return a copy of the list in the same format as that - * received by the other processes. Note that if this - * copy is returned in *haddr_buf_ptr_ptr, the caller - * must free it. - * - * This function must only be called by the process with - * MPI_rank 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 7/1/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr, - haddr_t **haddr_buf_ptr_ptr) -{ - H5AC_aux_t * aux_ptr = NULL; - haddr_t * haddr_buf_ptr = NULL; - int mpi_result; - int num_entries; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank == 0); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert(aux_ptr->candidate_slist_ptr != NULL); - HDassert(num_entries_ptr != NULL); - HDassert(*num_entries_ptr == 0); - HDassert(haddr_buf_ptr_ptr != NULL); - HDassert(*haddr_buf_ptr_ptr == NULL); - - /* First broadcast the number of entries in the list so that the - * receivers can set up buffers to receive them. If there aren't - * any, we are done. - */ - num_entries = (int)H5SL_count(aux_ptr->candidate_slist_ptr); - if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - - if(num_entries > 0) { - size_t buf_size = 0; - int chk_num_entries = 0; - - /* convert the candidate list into the format we - * are used to receiving from process 0, and also load it - * into a buffer for transmission. - */ - if(H5AC__copy_candidate_list_to_buffer(cache_ptr, &chk_num_entries, &haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.") - HDassert(chk_num_entries == num_entries); - HDassert(haddr_buf_ptr != NULL); - - /* Now broadcast the list of candidate entries */ - buf_size = sizeof(haddr_t) * (size_t)num_entries; - if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)haddr_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - } /* end if */ - - /* Pass the number of entries and the buffer pointer - * back to the caller. Do this so that we can use the same code - * to apply the candidate list to all the processes. - */ - *num_entries_ptr = num_entries; - *haddr_buf_ptr_ptr = haddr_buf_ptr; - -done: - if(ret_value < 0) - if(haddr_buf_ptr) - haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__broadcast_candidate_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__broadcast_clean_list_cb() - * - * Purpose: Skip list callback for building array of addresses for - * broadcasting the clean list. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: Quincey Koziol, 6/12/15 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__broadcast_clean_list_cb(void *_item, void H5_ATTR_UNUSED *_key, - void *_udata) -{ - H5AC_slist_entry_t * slist_entry_ptr = (H5AC_slist_entry_t *)_item; /* Address of item */ - H5AC_addr_list_ud_t * udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */ - haddr_t addr; - - FUNC_ENTER_STATIC_NOERR - - /* Sanity checks */ - HDassert(slist_entry_ptr); - HDassert(udata); - - /* Store the entry's address in the buffer */ - addr = slist_entry_ptr->addr; - udata->addr_buf_ptr[udata->i] = addr; - udata->i++; - - /* now release the entry */ - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - /* and also remove the matching entry from the dirtied list - * if it exists. - */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(udata->aux_ptr->d_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC__broadcast_clean_list_cb() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__broadcast_clean_list() - * - * Purpose: Broadcast the contents of the process 0 cleaned entry - * slist. In passing, also remove all entries from said - * list, and also remove any matching entries from the dirtied - * slist. - * - * This function must only be called by the process with - * MPI_rank 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 7/1/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__broadcast_clean_list(H5AC_t * cache_ptr) -{ - haddr_t * addr_buf_ptr = NULL; - H5AC_aux_t * aux_ptr; - int mpi_result; - int num_entries = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr; - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank == 0); - HDassert(aux_ptr->c_slist_ptr != NULL); - - /* First broadcast the number of entries in the list so that the - * receives can set up a buffer to receive them. If there aren't - * any, we are done. - */ - num_entries = (int)H5SL_count(aux_ptr->c_slist_ptr); - if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - - if(num_entries > 0) { - H5AC_addr_list_ud_t udata; - size_t buf_size; - - /* allocate a buffer to store the list of entry base addresses in */ - buf_size = sizeof(haddr_t) * (size_t)num_entries; - if(NULL == (addr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for addr buffer") - - /* Set up user data for callback */ - udata.aux_ptr = aux_ptr; - udata.addr_buf_ptr = addr_buf_ptr; - udata.i = 0; - - /* Free all the clean list entries, building the address list in the callback */ - /* (Callback also removes the matching entries from the dirtied list) */ - if(H5SL_free(aux_ptr->c_slist_ptr, H5AC__broadcast_clean_list_cb, &udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for clean entries") - - /* Now broadcast the list of cleaned entries */ - if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)addr_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - } /* end if */ - - /* if it is defined, call the sync point done callback. Note - * that this callback is defined purely for testing purposes, - * and should be undefined under normal operating circumstances. - */ - if(aux_ptr->sync_point_done) - (aux_ptr->sync_point_done)(num_entries, addr_buf_ptr); - -done: - if(addr_buf_ptr) - addr_buf_ptr = (haddr_t *)H5MM_xfree((void *)addr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__broadcast_clean_list() */ -#endif /* H5_HAVE_PARALLEL */ - /*------------------------------------------------------------------------- * @@ -2575,1891 +2139,71 @@ H5_ATTR_UNUSED /*------------------------------------------------------------------------- - * Function: H5AC__construct_candidate_list() + * Function: H5AC__ext_config_2_int_config() * - * Purpose: In the parallel case when the metadata_write_strategy is - * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, process 0 uses - * this function to construct the list of cache entries to - * be flushed. This list is then propagated to the other - * caches, and then flushed in a distributed fashion. + * Purpose: Utility function to translate an instance of + * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t. + * + * Places translation in *int_conf_ptr and returns SUCCEED + * if successful. Returns FAIL on failure. * - * The sync_point_op parameter is used to determine the extent - * of the flush. + * Does only minimal sanity checking. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer - * 3/17/10 + * 1/26/06 * *------------------------------------------------------------------------- */ -#ifdef H5_HAVE_PARALLEL static herr_t -H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, - int sync_point_op) +H5AC__ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr, + H5C_auto_size_ctl_t *int_conf_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0)); - HDassert(aux_ptr->d_slist_ptr != NULL); - HDassert(aux_ptr->c_slist_ptr != NULL); - HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0); - HDassert(aux_ptr->candidate_slist_ptr != NULL); - HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0); - HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) || (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE)); - - switch(sync_point_op) { - case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: - if(H5C_construct_candidate_list__min_clean((H5C_t *)cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed.") - break; - - case H5AC_SYNC_POINT_OP__FLUSH_CACHE: - if(H5C_construct_candidate_list__clean_cache((H5C_t *)cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__clean_cache() failed.") - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation.") - break; - } /* end switch */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__construct_candidate_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__copy_candidate_list_to_buffer_cb - * - * Purpose: Skip list callback for building array of addresses for - * broadcasting the candidate list. - * - * Return: Return SUCCEED on success, and FAIL on failure. - * - * Programmer: Quincey Koziol, 6/12/15 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__copy_candidate_list_to_buffer_cb(void *_item, void H5_ATTR_UNUSED *_key, - void *_udata) -{ - H5AC_slist_entry_t * slist_entry_ptr = (H5AC_slist_entry_t *)_item; /* Address of item */ - H5AC_addr_list_ud_t * udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */ - - FUNC_ENTER_STATIC_NOERR + if((ext_conf_ptr == NULL) || (ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) || + (int_conf_ptr == NULL)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad ext_conf_ptr or inf_conf_ptr on entry.") - /* Sanity checks */ - HDassert(slist_entry_ptr); - HDassert(udata); + int_conf_ptr->version = H5C__CURR_AUTO_SIZE_CTL_VER; + if(ext_conf_ptr->rpt_fcn_enabled) + int_conf_ptr->rpt_fcn = H5C_def_auto_resize_rpt_fcn; + else + int_conf_ptr->rpt_fcn = NULL; - /* Store the entry's address in the buffer */ - udata->addr_buf_ptr[udata->i] = slist_entry_ptr->addr; - udata->i++; + int_conf_ptr->set_initial_size = ext_conf_ptr->set_initial_size; + int_conf_ptr->initial_size = ext_conf_ptr->initial_size; + int_conf_ptr->min_clean_fraction = ext_conf_ptr->min_clean_fraction; + int_conf_ptr->max_size = ext_conf_ptr->max_size; + int_conf_ptr->min_size = ext_conf_ptr->min_size; + int_conf_ptr->epoch_length = (int64_t)(ext_conf_ptr->epoch_length); - /* now release the entry */ - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + int_conf_ptr->incr_mode = ext_conf_ptr->incr_mode; + int_conf_ptr->lower_hr_threshold = ext_conf_ptr->lower_hr_threshold; + int_conf_ptr->increment = ext_conf_ptr->increment; + int_conf_ptr->apply_max_increment = ext_conf_ptr->apply_max_increment; + int_conf_ptr->max_increment = ext_conf_ptr->max_increment; + int_conf_ptr->flash_incr_mode = ext_conf_ptr->flash_incr_mode; + int_conf_ptr->flash_multiple = ext_conf_ptr->flash_multiple; + int_conf_ptr->flash_threshold = ext_conf_ptr->flash_threshold; - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC__copy_candidate_list_to_buffer_cb() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__copy_candidate_list_to_buffer - * - * Purpose: Allocate buffer(s) and copy the contents of the candidate - * entry slist into it (them). In passing, remove all - * entries from the candidate slist. Note that the - * candidate slist must not be empty. - * - * If MPI_Offset_buf_ptr_ptr is not NULL, allocate a buffer - * of MPI_Offset, copy the contents of the candidate - * entry list into it with the appropriate conversions, - * and return the base address of the buffer in - * *MPI_Offset_buf_ptr. Note that this is the buffer - * used by process 0 to transmit the list of entries to - * be flushed to all other processes (in this file group). - * - * Similarly, allocate a buffer of haddr_t, load the contents - * of the candidate list into this buffer, and return its - * base address in *haddr_buf_ptr_ptr. Note that this - * latter buffer is constructed unconditionally. - * - * In passing, also remove all entries from the candidate - * entry slist. - * - * Return: Return SUCCEED on success, and FAIL on failure. - * - * Programmer: John Mainzer, 4/19/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, int *num_entries_ptr, - haddr_t **haddr_buf_ptr_ptr) -{ - H5AC_aux_t * aux_ptr = NULL; - H5AC_addr_list_ud_t udata; - haddr_t * haddr_buf_ptr = NULL; - size_t buf_size; - int num_entries = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert(aux_ptr->candidate_slist_ptr != NULL); - HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0); - HDassert(num_entries_ptr != NULL); - HDassert(*num_entries_ptr == 0); - HDassert(haddr_buf_ptr_ptr != NULL); - HDassert(*haddr_buf_ptr_ptr == NULL); - - num_entries = (int)H5SL_count(aux_ptr->candidate_slist_ptr); - - /* allocate a buffer(s) to store the list of candidate entry - * base addresses in - */ - buf_size = sizeof(haddr_t) * (size_t)num_entries; - if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer") - - /* Set up user data for callback */ - udata.aux_ptr = aux_ptr; - udata.addr_buf_ptr = haddr_buf_ptr; - udata.i = 0; - - /* Free all the candidate list entries, building the address list in the callback */ - if(H5SL_free(aux_ptr->candidate_slist_ptr, H5AC__copy_candidate_list_to_buffer_cb, &udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for candidate entries") - - /* Pass the number of entries and the buffer pointer - * back to the caller. - */ - *num_entries_ptr = num_entries; - *haddr_buf_ptr_ptr = haddr_buf_ptr; - -done: - if(ret_value < 0) - if(haddr_buf_ptr) - haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__copy_candidate_list_to_buffer() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__ext_config_2_int_config() - * - * Purpose: Utility function to translate an instance of - * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t. - * - * Places translation in *int_conf_ptr and returns SUCCEED - * if successful. Returns FAIL on failure. - * - * Does only minimal sanity checking. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 1/26/06 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5AC__ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr, - H5C_auto_size_ctl_t *int_conf_ptr) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - if((ext_conf_ptr == NULL) || (ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) || - (int_conf_ptr == NULL)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad ext_conf_ptr or inf_conf_ptr on entry.") - - int_conf_ptr->version = H5C__CURR_AUTO_SIZE_CTL_VER; - if(ext_conf_ptr->rpt_fcn_enabled) - int_conf_ptr->rpt_fcn = H5C_def_auto_resize_rpt_fcn; - else - int_conf_ptr->rpt_fcn = NULL; - - int_conf_ptr->set_initial_size = ext_conf_ptr->set_initial_size; - int_conf_ptr->initial_size = ext_conf_ptr->initial_size; - int_conf_ptr->min_clean_fraction = ext_conf_ptr->min_clean_fraction; - int_conf_ptr->max_size = ext_conf_ptr->max_size; - int_conf_ptr->min_size = ext_conf_ptr->min_size; - int_conf_ptr->epoch_length = (int64_t)(ext_conf_ptr->epoch_length); - - int_conf_ptr->incr_mode = ext_conf_ptr->incr_mode; - int_conf_ptr->lower_hr_threshold = ext_conf_ptr->lower_hr_threshold; - int_conf_ptr->increment = ext_conf_ptr->increment; - int_conf_ptr->apply_max_increment = ext_conf_ptr->apply_max_increment; - int_conf_ptr->max_increment = ext_conf_ptr->max_increment; - int_conf_ptr->flash_incr_mode = ext_conf_ptr->flash_incr_mode; - int_conf_ptr->flash_multiple = ext_conf_ptr->flash_multiple; - int_conf_ptr->flash_threshold = ext_conf_ptr->flash_threshold; - - int_conf_ptr->decr_mode = ext_conf_ptr->decr_mode; - int_conf_ptr->upper_hr_threshold = ext_conf_ptr->upper_hr_threshold; - int_conf_ptr->decrement = ext_conf_ptr->decrement; - int_conf_ptr->apply_max_decrement = ext_conf_ptr->apply_max_decrement; - int_conf_ptr->max_decrement = ext_conf_ptr->max_decrement; - int_conf_ptr->epochs_before_eviction = (int32_t)(ext_conf_ptr->epochs_before_eviction); - int_conf_ptr->apply_empty_reserve = ext_conf_ptr->apply_empty_reserve; - int_conf_ptr->empty_reserve = ext_conf_ptr->empty_reserve; + int_conf_ptr->decr_mode = ext_conf_ptr->decr_mode; + int_conf_ptr->upper_hr_threshold = ext_conf_ptr->upper_hr_threshold; + int_conf_ptr->decrement = ext_conf_ptr->decrement; + int_conf_ptr->apply_max_decrement = ext_conf_ptr->apply_max_decrement; + int_conf_ptr->max_decrement = ext_conf_ptr->max_decrement; + int_conf_ptr->epochs_before_eviction = (int32_t)(ext_conf_ptr->epochs_before_eviction); + int_conf_ptr->apply_empty_reserve = ext_conf_ptr->apply_empty_reserve; + int_conf_ptr->empty_reserve = ext_conf_ptr->empty_reserve; done: FUNC_LEAVE_NOAPI(ret_value) } /* H5AC__ext_config_2_int_config() */ -/*------------------------------------------------------------------------- - * - * Function: H5AC__log_deleted_entry() - * - * Purpose: Log an entry which has been deleted. - * - * Only called for mpi_rank 0. We must make sure that the entry - * doesn't appear in the cleaned or dirty entry lists. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 6/29/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - H5AC_slist_entry_t * slist_entry_ptr = NULL; - haddr_t addr; - - FUNC_ENTER_STATIC_NOERR - - /* Sanity checks */ - HDassert(entry_ptr); - addr = entry_ptr->addr; - cache_ptr = entry_ptr->cache_ptr; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank == 0); - HDassert(aux_ptr->d_slist_ptr != NULL); - HDassert(aux_ptr->c_slist_ptr != NULL); - - /* if the entry appears in the dirtied entry slist, remove it. */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - /* if the entry appears in the cleaned entry slist, remove it. */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC__log_deleted_entry() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__log_dirtied_entry() - * - * Purpose: Update the dirty_bytes count for a newly dirtied entry. - * - * If mpi_rank isn't 0, this simply means adding the size - * of the entries to the dirty_bytes count. - * - * If mpi_rank is 0, we must first check to see if the entry - * appears in the dirty entries slist. If it is, do nothing. - * If it isn't, add the size to th dirty_bytes count, add the - * entry to the dirty entries slist, and remove it from the - * cleaned list (if it is present there). - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 6/29/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(entry_ptr); - HDassert(entry_ptr->is_dirty == FALSE); - cache_ptr = entry_ptr->cache_ptr; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - - if(aux_ptr->mpi_rank == 0) { - H5AC_slist_entry_t *slist_entry_ptr; - haddr_t addr = entry_ptr->addr; - - /* Sanity checks */ - HDassert(aux_ptr->d_slist_ptr != NULL); - HDassert(aux_ptr->c_slist_ptr != NULL); - - if(NULL == H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) { - /* insert the address of the entry in the dirty entry list, and - * add its size to the dirty_bytes count. - */ - if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") - slist_entry_ptr->addr = addr; - - if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") - - aux_ptr->dirty_bytes += entry_ptr->size; -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->unprotect_dirty_bytes += entry_ptr->size; - aux_ptr->unprotect_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end if */ - - /* the entry is dirty. If it exists on the cleaned entries list, - * remove it. - */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - } /* end if */ - else { - aux_ptr->dirty_bytes += entry_ptr->size; -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->unprotect_dirty_bytes += entry_size; - aux_ptr->unprotect_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__log_dirtied_entry() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__log_flushed_entry() - * - * Purpose: Update the clean entry slist for the flush of an entry -- - * specifically, if the entry has been cleared, remove it - * from both the cleaned and dirtied lists if it is present. - * Otherwise, if the entry was dirty, insert the indicated - * entry address in the clean slist if it isn't there already. - * - * This function is only used in PHDF5, and should only - * be called for the process with mpi rank 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 6/29/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, - unsigned flags) -{ - hbool_t cleared; - H5AC_aux_t * aux_ptr; - H5AC_slist_entry_t * slist_entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity check */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank == 0); - HDassert(aux_ptr->c_slist_ptr != NULL); - - /* Set local flags */ - cleared = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0); - - if(cleared) { - /* If the entry has been cleared, must remove it from both the - * cleaned list and the dirtied list. - */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - } /* end if */ - else if(was_dirty) { - if(NULL == H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) { - /* insert the address of the entry in the clean entry list. */ - if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate clean slist entry .") - slist_entry_ptr->addr = addr; - - if(H5SL_insert(aux_ptr->c_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into clean entry slist.") - } /* end if */ - } /* end else-if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__log_flushed_entry() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__log_inserted_entry() - * - * Purpose: Update the dirty_bytes count for a newly inserted entry. - * - * If mpi_rank isnt 0, this simply means adding the size - * of the entry to the dirty_bytes count. - * - * If mpi_rank is 0, we must also add the entry to the - * dirty entries slist. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 6/30/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(entry_ptr); - cache_ptr = entry_ptr->cache_ptr; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - - if(aux_ptr->mpi_rank == 0) { - H5AC_slist_entry_t *slist_entry_ptr; - - HDassert(aux_ptr->d_slist_ptr != NULL); - HDassert(aux_ptr->c_slist_ptr != NULL); - - /* Entry to insert should not be in dirty list currently */ - if(NULL != H5SL_search(aux_ptr->d_slist_ptr, (const void *)(&entry_ptr->addr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry already in dirty slist.") - - /* insert the address of the entry in the dirty entry list, and - * add its size to the dirty_bytes count. - */ - if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") - slist_entry_ptr->addr = entry_ptr->addr; - if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") - - /* Entry to insert should not be in clean list either */ - if(NULL != H5SL_search(aux_ptr->c_slist_ptr, (const void *)(&entry_ptr->addr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry in clean slist.") - } /* end if */ - - aux_ptr->dirty_bytes += entry_ptr->size; - -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->insert_dirty_bytes += size; - aux_ptr->insert_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__log_inserted_entry() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__log_moved_entry() - * - * Purpose: Update the dirty_bytes count for a moved entry. - * - * WARNING - * - * At present, the way that the move call is used ensures - * that the moved entry is present in all caches by - * moving in a collective operation and immediately after - * unprotecting the target entry. - * - * This function uses this invariant, and will cause arcane - * failures if it is not met. If maintaining this invariant - * becomes impossible, we will have to rework this function - * extensively, and likely include a bit of IPC for - * synchronization. A better option might be to subsume - * move in the unprotect operation. - * - * Given that the target entry is in all caches, the function - * proceeds as follows: - * - * For processes with mpi rank other 0, it simply checks to - * see if the entry was dirty prior to the move, and adds - * the entries size to the dirty bytes count. - * - * In the process with mpi rank 0, the function first checks - * to see if the entry was dirty prior to the move. If it - * was, and if the entry doesn't appear in the dirtied list - * under its old address, it adds the entry's size to the - * dirty bytes count. - * - * The rank 0 process then removes any references to the - * entry under its old address from the cleands and dirtied - * lists, and inserts an entry in the dirtied list under the - * new address. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 6/30/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - hbool_t entry_in_cache; - hbool_t entry_dirty; - size_t entry_size; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f); - HDassert(f->shared); - cache_ptr = (H5AC_t *)f->shared->cache; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - - /* get entry status, size, etc here */ - if(H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache, - &entry_dirty, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.") - if(!entry_in_cache) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache.") - - if(aux_ptr->mpi_rank == 0) { - H5AC_slist_entry_t * slist_entry_ptr; - - HDassert(aux_ptr->d_slist_ptr != NULL); - HDassert(aux_ptr->c_slist_ptr != NULL); - - /* if the entry appears in the cleaned entry slist, under its old - * address, remove it. - */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&old_addr)))) - slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); - - /* if the entry appears in the dirtied entry slist under its old - * address, remove it, but don't free it. Set addr to new_addr. - */ - if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&old_addr)))) - slist_entry_ptr->addr = new_addr; - else { - /* otherwise, allocate a new entry that is ready - * for insertion, and increment dirty_bytes. - * - * Note that the fact that the entry wasn't in the dirtied - * list under its old address implies that it must have - * been clean to start with. - */ - HDassert(!entry_dirty); - if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") - slist_entry_ptr->addr = new_addr; - - aux_ptr->dirty_bytes += entry_size; - -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->move_dirty_bytes += entry_size; - aux_ptr->move_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else */ - - /* insert / reinsert the entry in the dirty slist */ - if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") - } /* end if */ - else if(!entry_dirty) { - aux_ptr->dirty_bytes += entry_size; - -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->move_dirty_bytes += entry_size; - aux_ptr->move_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else-if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__log_moved_entry() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__propagate_and_apply_candidate_list - * - * Purpose: Prior to the addition of support for multiple metadata - * write strategies, in PHDF5, only the metadata cache with - * mpi rank 0 was allowed to write to file. All other - * metadata caches on processes with rank greater than 0 - * were required to retain dirty entries until they were - * notified that the entry was clean. - * - * This constraint is relaxed with the distributed - * metadata write strategy, in which a list of candidate - * metadata cache entries is constructed by the process 0 - * cache and then distributed to the caches of all the other - * processes. Once the listed is distributed, many (if not - * all) processes writing writing a unique subset of the - * entries, and marking the remainder clean. The subsets - * are chosen so that each entry in the list of candidates - * is written by exactly one cache, and all entries are - * marked as being clean in all caches. - * - * While the list of candidate cache entries is prepared - * elsewhere, this function is the main routine for distributing - * and applying the list. It must be run simultaniously on - * all processes that have the relevant file open. To ensure - * proper synchronization, there is a barrier at the beginning - * of this function. - * - * At present, this function is called under one of two - * circumstances: - * - * 1) Dirty byte creation exceeds some user specified value. - * - * While metadata reads may occur independently, all - * operations writing metadata must be collective. Thus - * all metadata caches see the same sequence of operations, - * and therefore the same dirty data creation. - * - * This fact is used to synchronize the caches for purposes - * of propagating the list of candidate entries, by simply - * calling this function from all caches whenever some user - * specified threshold on dirty data is exceeded. (the - * process 0 cache creates the candidate list just before - * calling this function). - * - * 2) Under direct user control -- this operation must be - * collective. - * - * The operations to be managed by this function are as - * follows: - * - * All processes: - * - * 1) Participate in an opening barrier. - * - * For the process with mpi rank 0: - * - * 1) Load the contents of the candidate list - * (candidate_slist_ptr) into a buffer, and broadcast that - * buffer to all the other caches. Clear the candidate - * list in passing. - * - * If there is a positive number of candidates, proceed with - * the following: - * - * 2) Apply the candidate entry list. - * - * 3) Particpate in a closing barrier. - * - * 4) Remove from the dirty list (d_slist_ptr) and from the - * flushed and still clean entries list (c_slist_ptr), - * all addresses that appeared in the candidate list, as - * these entries are now clean. - * - * - * For all processes with mpi rank greater than 0: - * - * 1) Receive the candidate entry list broadcast - * - * If there is a positive number of candidates, proceed with - * the following: - * - * 2) Apply the candidate entry list. - * - * 3) Particpate in a closing barrier. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * 3/17/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - haddr_t * candidates_list_ptr = NULL; - int mpi_result; - int num_candidates = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - - /* to prevent "messages from the future" we must synchronize all - * processes before we write any entries. - */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - if(aux_ptr->mpi_rank == 0) { - if(H5AC__broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist.") - - HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0); - } /* end if */ - else { - if(H5AC__receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive candidate broadcast.") - } /* end else */ - - if(num_candidates > 0) { - herr_t result; - - /* all processes apply the candidate list. - * H5C_apply_candidate_list() handles the details of - * distributing the writes across the processes. - */ - - /* Enable writes during this operation */ - aux_ptr->write_permitted = TRUE; - - /* Apply the candidate list */ - result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_candidates, - candidates_list_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); - - /* Disable writes again */ - aux_ptr->write_permitted = FALSE; - - /* Check for error on the write operation */ - if(result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") - - /* this code exists primarily for the test bed -- it allows us to - * enforce posix semantics on the server that pretends to be a - * file system in our parallel tests. - */ - if(aux_ptr->write_done) - (aux_ptr->write_done)(); - - /* to prevent "messages from the past" we must synchronize all - * processes again before we go on. - */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - /* if this is process zero, tidy up the dirtied, - * and flushed and still clean lists. - */ - if(aux_ptr->mpi_rank == 0) - if(H5AC__tidy_cache_0_lists(cache_ptr, num_candidates, candidates_list_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") - } /* end if */ - - /* if it is defined, call the sync point done callback. Note - * that this callback is defined purely for testing purposes, - * and should be undefined under normal operating circumstances. - */ - if(aux_ptr->sync_point_done) - (aux_ptr->sync_point_done)(num_candidates, candidates_list_ptr); - -done: - if(candidates_list_ptr) - candidates_list_ptr = (haddr_t *)H5MM_xfree((void *)candidates_list_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__propagate_and_apply_candidate_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__propagate_flushed_and_still_clean_entries_list - * - * Purpose: In PHDF5, if the process 0 only metadata write strategy - * is selected, only the metadata cache with mpi rank 0 is - * allowed to write to file. All other metadata caches on - * processes with rank greater than 0 must retain dirty - * entries until they are notified that the entry is now - * clean. - * - * This function is the main routine for handling this - * notification proceedure. It must be called - * simultaniously on all processes that have the relevant - * file open. To this end, it is called only during a - * sync point, with a barrier prior to the call. - * - * Note that any metadata entry writes by process 0 will - * occur after the barrier and just before this call. - * - * Typicaly, calls to this function will be triggered in - * one of two ways: - * - * 1) Dirty byte creation exceeds some user specified value. - * - * While metadata reads may occur independently, all - * operations writing metadata must be collective. Thus - * all metadata caches see the same sequence of operations, - * and therefore the same dirty data creation. - * - * This fact is used to synchronize the caches for purposes - * of propagating the list of flushed and still clean - * entries, by simply calling this function from all - * caches whenever some user specified threshold on dirty - * data is exceeded. - * - * 2) Under direct user control -- this operation must be - * collective. - * - * The operations to be managed by this function are as - * follows: - * - * For the process with mpi rank 0: - * - * 1) Load the contents of the flushed and still clean entries - * list (c_slist_ptr) into a buffer, and broadcast that - * buffer to all the other caches. - * - * 2) Clear the flushed and still clean entries list - * (c_slist_ptr). - * - * - * For all processes with mpi rank greater than 0: - * - * 1) Receive the flushed and still clean entries list broadcast - * - * 2) Mark the specified entries as clean. - * - * - * For all processes: - * - * 1) Reset the dirtied bytes count to 0. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * July 5, 2005 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); - - if(aux_ptr->mpi_rank == 0) { - if(H5AC__broadcast_clean_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist.") - HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0); - } /* end if */ - else { - if(H5AC__receive_and_apply_clean_list(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.") - } /* end else */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__propagate_flushed_and_still_clean_entries_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC_receive_haddr_list() - * - * Purpose: Receive the list of entry addresses from process 0, - * and return it in a buffer pointed to by *haddr_buf_ptr_ptr. - * Note that the caller must free this buffer if it is - * returned. - * - * This function must only be called by the process with - * MPI_rank greater than 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: Quincey Koziol, 6/11/2015 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__receive_haddr_list(MPI_Comm mpi_comm, int *num_entries_ptr, - haddr_t **haddr_buf_ptr_ptr) -{ - haddr_t * haddr_buf_ptr = NULL; - int mpi_result; - int num_entries; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(num_entries_ptr != NULL); - HDassert(*num_entries_ptr == 0); - HDassert(haddr_buf_ptr_ptr != NULL); - HDassert(*haddr_buf_ptr_ptr == NULL); - - /* First receive the number of entries in the list so that we - * can set up a buffer to receive them. If there aren't - * any, we are done. - */ - if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - - if(num_entries > 0) { - size_t buf_size; - - /* allocate buffers to store the list of entry base addresses in */ - buf_size = sizeof(haddr_t) * (size_t)num_entries; - if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer") - - /* Now receive the list of candidate entries */ - if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)haddr_buf_ptr, (int)buf_size, MPI_BYTE, 0, mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) - } /* end if */ - - /* finally, pass the number of entries and the buffer pointer - * back to the caller. - */ - *num_entries_ptr = num_entries; - *haddr_buf_ptr_ptr = haddr_buf_ptr; - -done: - if(ret_value < 0) - if(haddr_buf_ptr) - haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC_receive_haddr_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__receive_and_apply_clean_list() - * - * Purpose: Receive the list of cleaned entries from process 0, - * and mark the specified entries as clean. - * - * This function must only be called by the process with - * MPI_rank greater than 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 7/4/05 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - haddr_t * haddr_buf_ptr = NULL; - int num_entries = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity check */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank != 0); - - /* Retrieve the clean list from process 0 */ - if(H5AC__receive_haddr_list(aux_ptr->mpi_comm, &num_entries, &haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") - - if(num_entries > 0) - /* mark the indicated entries as clean */ - if(H5C_mark_entries_as_clean(f, dxpl_id, (int32_t)num_entries, haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.") - - /* if it is defined, call the sync point done callback. Note - * that this callback is defined purely for testing purposes, - * and should be undefined under normal operating circumstances. - */ - if(aux_ptr->sync_point_done) - (aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr); - -done: - if(haddr_buf_ptr) - haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__receive_and_apply_clean_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * - * Function: H5AC__receive_candidate_list() - * - * Purpose: Receive the list of candidate entries from process 0, - * and return it in a buffer pointed to by *haddr_buf_ptr_ptr. - * Note that the caller must free this buffer if it is - * returned. - * - * This function must only be called by the process with - * MPI_rank greater than 0. - * - * Return SUCCEED on success, and FAIL on failure. - * - * Return: Non-negative on success/Negative on failure. - * - * Programmer: John Mainzer, 3/17/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__receive_candidate_list(const H5AC_t *cache_ptr, int *num_entries_ptr, - haddr_t **haddr_buf_ptr_ptr) -{ - H5AC_aux_t * aux_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->mpi_rank != 0); - HDassert(aux_ptr-> metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert(num_entries_ptr != NULL); - HDassert(*num_entries_ptr == 0); - HDassert(haddr_buf_ptr_ptr != NULL); - HDassert(*haddr_buf_ptr_ptr == NULL); - - /* Retrieve the candidate list from process 0 */ - if(H5AC__receive_haddr_list(aux_ptr->mpi_comm, num_entries_ptr, haddr_buf_ptr_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__receive_candidate_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__rsp__dist_md_write__flush - * - * Purpose: Routine for handling the details of running a sync point - * that is triggered by a flush -- which in turn must have been - * triggered by either a flush API call or a file close -- - * when the distributed metadata write strategy is selected. - * - * Upon entry, each process generates it own candidate list, - * being a sorted list of all dirty metadata entries currently - * in the metadata cache. Note that this list must be idendical - * across all processes, as all processes see the same stream - * of dirty metadata coming in, and use the same lists of - * candidate entries at each sync point. (At first glance, this - * argument sounds circular, but think of it in the sense of - * a recursive proof). - * - * If this this list is empty, we are done, and the function - * returns - * - * Otherwise, after the sorted list dirty metadata entries is - * constructed, each process uses the same algorithm to assign - * each entry on the candidate list to exactly one process for - * flushing. - * - * At this point, all processes participate in a barrier to - * avoid messages from the past/future bugs. - * - * Each process then flushes the entries assigned to it, and - * marks all other entries on the candidate list as clean. - * - * Finally, all processes participate in a second barrier to - * avoid messages from the past/future bugs. - * - * At the end of this process, process 0 and only process 0 - * must tidy up its lists of dirtied and cleaned entries. - * These lists are not used in the distributed metadata write - * strategy, but they must be maintained should we shift - * to a strategy that uses them. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * April 28, 2010 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - haddr_t * haddr_buf_ptr = NULL; - int mpi_result; - int num_entries = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - - /* first construct the candidate list -- initially, this will be in the - * form of a skip list. We will convert it later. - */ - if(H5C_construct_candidate_list__clean_cache(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.") - - if(H5SL_count(aux_ptr->candidate_slist_ptr) > 0) { - herr_t result; - - /* convert the candidate list into the format we - * are used to receiving from process 0. - */ - if(H5AC__copy_candidate_list_to_buffer(cache_ptr, &num_entries, &haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.") - - /* initial sync point barrier */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - /* Enable writes during this operation */ - aux_ptr->write_permitted = TRUE; - - /* Apply the candidate list */ - result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_entries, - haddr_buf_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); - - /* Disable writes again */ - aux_ptr->write_permitted = FALSE; - - /* Check for error on the write operation */ - if(result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") - - /* this code exists primarily for the test bed -- it allows us to - * enforce posix semantics on the server that pretends to be a - * file system in our parallel tests. - */ - if(aux_ptr->write_done) - (aux_ptr->write_done)(); - - /* final sync point barrier */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - /* if this is process zero, tidy up the dirtied, - * and flushed and still clean lists. - */ - if(aux_ptr->mpi_rank == 0) - if(H5AC__tidy_cache_0_lists(cache_ptr, num_entries, haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") - } /* end if */ - - /* if it is defined, call the sync point done callback. Note - * that this callback is defined purely for testing purposes, - * and should be undefined under normal operating circumstances. - */ - if(aux_ptr->sync_point_done) - (aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr); - -done: - if(haddr_buf_ptr) - haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__rsp__dist_md_write__flush() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__rsp__dist_md_write__flush_to_min_clean - * - * Purpose: Routine for handling the details of running a sync point - * triggered by the accumulation of dirty metadata (as - * opposed to a flush call to the API) when the distributed - * metadata write strategy is selected. - * - * After invocation and initial sanity checking this function - * first checks to see if evictions are enabled -- if they - * are not, the function does nothing and returns. - * - * Otherwise, process zero constructs a list of entries to - * be flushed in order to bring the process zero cache back - * within its min clean requirement. Note that this list - * (the candidate list) may be empty. - * - * Then, all processes participate in a barrier. - * - * After the barrier, process 0 broadcasts the number of - * entries in the candidate list prepared above, and all - * other processes receive this number. - * - * If this number is zero, we are done, and the function - * returns without further action. - * - * Otherwise, process 0 broadcasts the sorted list of - * candidate entries, and all other processes receive it. - * - * Then, each process uses the same algorithm to assign - * each entry on the candidate list to exactly one process - * for flushing. - * - * Each process then flushes the entries assigned to it, and - * marks all other entries on the candidate list as clean. - * - * Finally, all processes participate in a second barrier to - * avoid messages from the past/future bugs. - * - * At the end of this process, process 0 and only process 0 - * must tidy up its lists of dirtied and cleaned entries. - * These lists are not used in the distributed metadata write - * strategy, but they must be maintained should we shift - * to a strategy that uses them. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * April 28, 2010 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - hbool_t evictions_enabled; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - - /* Query if evictions are allowed */ - if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") - - if(evictions_enabled) { - /* construct candidate list -- process 0 only */ - if(aux_ptr->mpi_rank == 0) - if(H5AC__construct_candidate_list(cache_ptr, aux_ptr, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.") - - /* propagate and apply candidate list -- all processes */ - if(H5AC__propagate_and_apply_candidate_list(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list.") - } /* evictions enabled */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__rsp__dist_md_write__flush_to_min_clean() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__rsp__p0_only__flush - * - * Purpose: Routine for handling the details of running a sync point - * that is triggered a flush -- which in turn must have been - * triggered by either a flush API call or a file close -- - * when the process 0 only metadata write strategy is selected. - * - * First, all processes participate in a barrier. - * - * Then process zero flushes all dirty entries, and broadcasts - * they number of clean entries (if any) to all the other - * caches. - * - * If this number is zero, we are done. - * - * Otherwise, process 0 broadcasts the list of cleaned - * entries, and all other processes which are part of this - * file group receive it, and mark the listed entries as - * clean in their caches. - * - * Since all processes have the same set of dirty - * entries at the beginning of the sync point, and all - * entries that will be written are written before - * process zero broadcasts the number of cleaned entries, - * there is no need for a closing barrier. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * April 28, 2010 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - int mpi_result; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); - - /* to prevent "messages from the future" we must - * synchronize all processes before we start the flush. - * Hence the following barrier. - */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - /* Flush data to disk, from rank 0 process */ - if(aux_ptr->mpi_rank == 0) { - herr_t result; - - /* Enable writes during this operation */ - aux_ptr->write_permitted = TRUE; - - /* Flush the cache */ - result = H5C_flush_cache(f, dxpl_id, H5AC__NO_FLAGS_SET); - - /* Disable writes again */ - aux_ptr->write_permitted = FALSE; - - /* Check for error on the write operation */ - if(result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.") - - /* this code exists primarily for the test bed -- it allows us to - * enforce posix semantics on the server that pretends to be a - * file system in our parallel tests. - */ - if(aux_ptr->write_done) - (aux_ptr->write_done)(); - } /* end if */ - - /* Propagate cleaned entries to other ranks. */ - if(H5AC__propagate_flushed_and_still_clean_entries_list(f, H5AC_dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__rsp__p0_only__flush() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__rsp__p0_only__flush_to_min_clean - * - * Purpose: Routine for handling the details of running a sync point - * triggered by the accumulation of dirty metadata (as - * opposed to a flush call to the API) when the process 0 - * only metadata write strategy is selected. - * - * After invocation and initial sanity checking this function - * first checks to see if evictions are enabled -- if they - * are not, the function does nothing and returns. - * - * Otherwise, all processes participate in a barrier. - * - * After the barrier, if this is process 0, the function - * causes the cache to flush sufficient entries to get the - * cache back within its minimum clean fraction, and broadcast - * the number of entries which have been flushed since - * the last sync point, and are still clean. - * - * If this number is zero, we are done. - * - * Otherwise, process 0 broadcasts the list of cleaned - * entries, and all other processes which are part of this - * file group receive it, and mark the listed entries as - * clean in their caches. - * - * Since all processes have the same set of dirty - * entries at the beginning of the sync point, and all - * entries that will be written are written before - * process zero broadcasts the number of cleaned entries, - * there is no need for a closing barrier. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * April 28, 2010 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - hbool_t evictions_enabled; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); - - /* Query if evictions are allowed */ - if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") - - /* Flush if evictions are allowed -- following call - * will cause process 0 to flush to min clean size, - * and then propagate the newly clean entries to the - * other processes. - * - * Otherwise, do nothing. - */ - if(evictions_enabled) { - int mpi_result; - - /* to prevent "messages from the future" we must synchronize all - * processes before we start the flush. This synchronization may - * already be done -- hence the do_barrier parameter. - */ - if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) - - if(0 == aux_ptr->mpi_rank) { - herr_t result; - - /* here, process 0 flushes as many entries as necessary to - * comply with the currently specified min clean size. - * Note that it is quite possible that no entries will be - * flushed. - */ - - /* Enable writes during this operation */ - aux_ptr->write_permitted = TRUE; - - /* Flush the cache */ - result = H5C_flush_to_min_clean(f, dxpl_id); - - /* Disable writes again */ - aux_ptr->write_permitted = FALSE; - - /* Check for error on the write operation */ - if(result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_to_min_clean() failed.") - - /* this call exists primarily for the test code -- it is used - * to enforce POSIX semantics on the process used to simulate - * reads and writes in t_cache.c. - */ - if(aux_ptr->write_done) - (aux_ptr->write_done)(); - } /* end if */ - - if(H5AC__propagate_flushed_and_still_clean_entries_list(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__rsp__p0_only__flush_to_min_clean() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__run_sync_point - * - * Purpose: Top level routine for managing a sync point between all - * meta data caches in the parallel case. Since all caches - * see the same sequence of dirty metadata, we simply count - * bytes of dirty metadata, and run a sync point whenever the - * number of dirty bytes of metadata seen since the last - * sync point exceeds a threshold that is common across all - * processes. We also run sync points in response to - * HDF5 API calls triggering either a flush or a file close. - * - * In earlier versions of PHDF5, only the metadata cache with - * mpi rank 0 was allowed to write to file. All other - * metadata caches on processes with rank greater than 0 were - * required to retain dirty entries until they were notified - * that the entry is was clean. - * - * This function was created to make it easier for us to - * experiment with other options, as it is a single point - * for the execution of sync points. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * March 11, 2010 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op) -{ - H5AC_t * cache_ptr; - H5AC_aux_t * aux_ptr; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f != NULL); - cache_ptr = f->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) || - (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)); - -#if H5AC_DEBUG_DIRTY_BYTES_CREATION -HDfprintf(stdout, "%d:H5AC_propagate...:%u: (u/uu/i/iu/r/ru) = %zu/%u/%zu/%u/%zu/%u\n", - aux_ptr->mpi_rank, - aux_ptr->dirty_bytes_propagations, - aux_ptr->unprotect_dirty_bytes, - aux_ptr->unprotect_dirty_bytes_updates, - aux_ptr->insert_dirty_bytes, - aux_ptr->insert_dirty_bytes_updates, - aux_ptr->rename_dirty_bytes, - aux_ptr->rename_dirty_bytes_updates); -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - - switch(aux_ptr->metadata_write_strategy) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: - switch(sync_point_op) { - case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: - if(H5AC__rsp__p0_only__flush_to_min_clean(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush_to_min_clean() failed.") - break; - - case H5AC_SYNC_POINT_OP__FLUSH_CACHE: - if(H5AC__rsp__p0_only__flush(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush() failed.") - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op"); - break; - } /* end switch */ - break; - - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: - switch(sync_point_op) { - case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: - if(H5AC__rsp__dist_md_write__flush_to_min_clean(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush_to_min_clean() failed.") - break; - - case H5AC_SYNC_POINT_OP__FLUSH_CACHE: - if(H5AC__rsp__dist_md_write__flush(f, dxpl_id) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush() failed.") - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op"); - break; - } /* end switch */ - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown metadata write strategy.") - break; - } /* end switch */ - - /* reset the dirty bytes count */ - aux_ptr->dirty_bytes = 0; - -#if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->dirty_bytes_propagations += 1; - aux_ptr->unprotect_dirty_bytes = 0; - aux_ptr->unprotect_dirty_bytes_updates = 0; - aux_ptr->insert_dirty_bytes = 0; - aux_ptr->insert_dirty_bytes_updates = 0; - aux_ptr->rename_dirty_bytes = 0; - aux_ptr->rename_dirty_bytes_updates = 0; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__run_sync_point() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__tidy_cache_0_lists() - * - * Purpose: In the distributed metadata write strategy, not all dirty - * entries are written by process 0 -- thus we must tidy - * up the dirtied, and flushed and still clean lists - * maintained by process zero after each sync point. - * - * This procedure exists to tend to this issue. - * - * At this point, all entries that process 0 cleared should - * have been removed from both the dirty and flushed and - * still clean lists, and entries that process 0 has flushed - * should have been removed from the dirtied list and added - * to the flushed and still clean list. - * - * However, since the distributed metadata write strategy - * doesn't make use of these lists, the objective is simply - * to maintain these lists in consistent state that allows - * them to be used should the metadata write strategy change - * to one that uses these lists. - * - * Thus for our purposes, all we need to do is remove from - * the dirtied and flushed and still clean lists all - * references to entries that appear in the candidate list. - * - * Return: Success: non-negative - * - * Failure: negative - * - * Programmer: John Mainzer - * 4/20/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, - haddr_t *candidates_list_ptr) -{ - H5AC_aux_t * aux_ptr; - int i; - - FUNC_ENTER_STATIC_NOERR - - /* Sanity checks */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert(aux_ptr != NULL); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); - HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); - HDassert(aux_ptr->mpi_rank == 0); - HDassert(num_candidates > 0); - HDassert(candidates_list_ptr != NULL); - - /* clean up dirtied and flushed and still clean lists by removing - * all entries on the candidate list. Cleared entries should - * have been removed from both the dirty and cleaned lists at - * this point, flushed entries should have been added to the - * cleaned list. However, for this metadata write strategy, - * we just want to remove all references to the candidate entries. - */ - for(i = 0; i < num_candidates; i++) { - H5AC_slist_entry_t * d_slist_entry_ptr; - H5AC_slist_entry_t * c_slist_entry_ptr; - haddr_t addr; - - addr = candidates_list_ptr[i]; - - /* addr may be either on the dirtied list, or on the flushed - * and still clean list. Remove it. - */ - if(NULL != (d_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)&addr))) - d_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, d_slist_entry_ptr); - if(NULL != (c_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)&addr))) - c_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, c_slist_entry_ptr); - } /* end for */ - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5AC__tidy_cache_0_lists() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5AC__flush_entries - * - * Purpose: Flush the metadata cache associated with the specified file, - * only writing from rank 0, but propagating the cleaned entries - * to all ranks. - * - * Return: Non-negative on success/Negative on failure if there was a - * request to flush all items and something was protected. - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Aug 22 2009 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -static herr_t -H5AC__flush_entries(H5F_t *f, hid_t dxpl_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Sanity checks */ - HDassert(f); - HDassert(f->shared->cache); - - /* Check if we have >1 ranks */ - if(f->shared->cache->aux_ptr) - if(H5AC__run_sync_point(f, dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC__flush_entries() */ -#endif /* H5_HAVE_PARALLEL */ - - /*------------------------------------------------------------------------------ * Function: H5AC_ignore_tags() * diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c new file mode 100644 index 0000000..64c27ab --- /dev/null +++ b/src/H5ACmpio.c @@ -0,0 +1,2295 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*------------------------------------------------------------------------- + * + * Created: H5ACmpio.c + * Jun 20 2015 + * Quincey Koziol + * + * Purpose: Functions in this file implement support for parallel + * I/O cache functionality + * + *------------------------------------------------------------------------- + */ + +/****************/ +/* Module Setup */ +/****************/ + +#define H5AC_PACKAGE /*suppress error about including H5ACpkg */ +#define H5C_PACKAGE /*suppress error about including H5Cpkg */ +#define H5F_PACKAGE /*suppress error about including H5Fpkg */ + +/* Interface initialization */ +#define H5_INTERFACE_INIT_FUNC H5AC__init_mpio_interface + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5ACpkg.h" /* Metadata cache */ +#include "H5Cpkg.h" /* Cache */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5MMprivate.h" /* Memory management */ + +#ifdef H5_HAVE_PARALLEL + +/****************/ +/* Local Macros */ +/****************/ + + +/******************/ +/* Local Typedefs */ +/******************/ + +/**************************************************************************** + * + * structure H5AC_slist_entry_t + * + * The dirty entry list maintained via the d_slist_ptr field of H5AC_aux_t + * and the cleaned entry list maintained via the c_slist_ptr field of + * H5AC_aux_t are just lists of the file offsets of the dirty/cleaned + * entries. Unfortunately, the slist code makes us define a dynamically + * allocated structure to store these offsets in. This structure serves + * that purpose. Its fields are as follows: + * + * addr: file offset of a metadata entry. Entries are added to this + * list (if they aren't there already) when they are marked + * dirty in an unprotect, inserted, or moved. They are + * removed when they appear in a clean entries broadcast. + * + ****************************************************************************/ +typedef struct H5AC_slist_entry_t +{ + haddr_t addr; +} H5AC_slist_entry_t; + +/* User data for address list building callbacks */ +typedef struct H5AC_addr_list_ud_t +{ + H5AC_aux_t * aux_ptr; /* 'Auxiliary' parallel cache info */ + haddr_t * addr_buf_ptr; /* Array to store addresses */ + int i; /* Counter for position in array */ +} H5AC_addr_list_ud_t; + + +/********************/ +/* Local Prototypes */ +/********************/ + +static herr_t H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, + int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); +static herr_t H5AC__broadcast_clean_list(H5AC_t *cache_ptr); +static herr_t H5AC__construct_candidate_list(H5AC_t *cache_ptr, + H5AC_aux_t *aux_ptr, int sync_point_op); +static herr_t H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, + int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); +static herr_t H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id); +static herr_t H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, + hid_t dxpl_id); +static herr_t H5AC__receive_haddr_list(MPI_Comm mpi_comm, int *num_entries_ptr, + haddr_t **haddr_buf_ptr_ptr); +static herr_t H5AC__receive_candidate_list(const H5AC_t *cache_ptr, + int *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr); +static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id); +static herr_t H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, + haddr_t *candidates_list_ptr); +static herr_t H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id); +static herr_t H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id); +static herr_t H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id); +static herr_t H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id); + + +/*********************/ +/* Package Variables */ +/*********************/ + +/* Declare a free list to manage the H5AC_aux_t struct */ +H5FL_DEFINE(H5AC_aux_t); + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + +/* Declare a free list to manage the H5AC_slist_entry_t struct */ +H5FL_DEFINE_STATIC(H5AC_slist_entry_t); + + +/*------------------------------------------------------------------------- + * Function: H5AC__init_mpio_interface + * + * Purpose: Initialize interface-specific information + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * 6/20/15 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__init_mpio_interface(void) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Funnel all work to H5AC_init() */ + if(H5AC_init() < 0) + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "interface initialization failed") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__init_mpio_interface() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__set_sync_point_done_callback + * + * Purpose: Set the value of the sync_point_done callback. This + * callback is used by the parallel test code to verify + * that the expected writes and only the expected writes + * take place during a sync point. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 5/9/10 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__set_sync_point_done_callback(H5C_t * cache_ptr, + void (* sync_point_done)(int num_writes, haddr_t * written_entries_tbl)) +{ + H5AC_aux_t * aux_ptr; + + FUNC_ENTER_PACKAGE_NOERR + + /* Sanity checks */ + HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + + aux_ptr->sync_point_done = sync_point_done; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__set_sync_point_done_callback() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__set_write_done_callback + * + * Purpose: Set the value of the write_done callback. This callback + * is used to improve performance of the parallel test bed + * for the cache. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 5/11/06 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__set_write_done_callback(H5C_t * cache_ptr, void (* write_done)(void)) +{ + H5AC_aux_t * aux_ptr; + + FUNC_ENTER_PACKAGE_NOERR + + /* Sanity checks */ + HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert( aux_ptr != NULL ); + HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ); + + aux_ptr->write_done = write_done; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__set_write_done_callback() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC_add_candidate() + * + * Purpose: Add the supplied metadata entry address to the candidate + * list. Verify that each entry added does not appear in + * the list prior to its insertion. + * + * This function is intended for used in constructing list + * of entried to be flushed during sync points. It shouldn't + * be called anywhere else. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 3/17/10 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr) +{ + H5AC_aux_t * aux_ptr; + H5AC_slist_entry_t * slist_entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert(aux_ptr->candidate_slist_ptr != NULL); + + /* Construct an entry for the supplied address, and insert + * it into the candidate slist. + */ + if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate candidate slist entry") + slist_entry_ptr->addr = addr; + + if(H5SL_insert(aux_ptr->candidate_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist") + +done: + /* Clean up on error */ + if(ret_value < 0) + if(slist_entry_ptr) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC_add_candidate() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__broadcast_candidate_list() + * + * Purpose: Broadcast the contents of the process 0 candidate entry + * slist. In passing, also remove all entries from said + * list. As the application of this will be handled by + * the same functions on all processes, construct and + * return a copy of the list in the same format as that + * received by the other processes. Note that if this + * copy is returned in *haddr_buf_ptr_ptr, the caller + * must free it. + * + * This function must only be called by the process with + * MPI_rank 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 7/1/05 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr, + haddr_t **haddr_buf_ptr_ptr) +{ + H5AC_aux_t * aux_ptr = NULL; + haddr_t * haddr_buf_ptr = NULL; + int mpi_result; + int num_entries; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank == 0); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert(aux_ptr->candidate_slist_ptr != NULL); + HDassert(num_entries_ptr != NULL); + HDassert(*num_entries_ptr == 0); + HDassert(haddr_buf_ptr_ptr != NULL); + HDassert(*haddr_buf_ptr_ptr == NULL); + + /* First broadcast the number of entries in the list so that the + * receivers can set up buffers to receive them. If there aren't + * any, we are done. + */ + num_entries = (int)H5SL_count(aux_ptr->candidate_slist_ptr); + if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + + if(num_entries > 0) { + size_t buf_size = 0; + int chk_num_entries = 0; + + /* convert the candidate list into the format we + * are used to receiving from process 0, and also load it + * into a buffer for transmission. + */ + if(H5AC__copy_candidate_list_to_buffer(cache_ptr, &chk_num_entries, &haddr_buf_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.") + HDassert(chk_num_entries == num_entries); + HDassert(haddr_buf_ptr != NULL); + + /* Now broadcast the list of candidate entries */ + buf_size = sizeof(haddr_t) * (size_t)num_entries; + if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)haddr_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + } /* end if */ + + /* Pass the number of entries and the buffer pointer + * back to the caller. Do this so that we can use the same code + * to apply the candidate list to all the processes. + */ + *num_entries_ptr = num_entries; + *haddr_buf_ptr_ptr = haddr_buf_ptr; + +done: + if(ret_value < 0) + if(haddr_buf_ptr) + haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__broadcast_candidate_list() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__broadcast_clean_list_cb() + * + * Purpose: Skip list callback for building array of addresses for + * broadcasting the clean list. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: Quincey Koziol, 6/12/15 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__broadcast_clean_list_cb(void *_item, void H5_ATTR_UNUSED *_key, + void *_udata) +{ + H5AC_slist_entry_t * slist_entry_ptr = (H5AC_slist_entry_t *)_item; /* Address of item */ + H5AC_addr_list_ud_t * udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */ + haddr_t addr; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(slist_entry_ptr); + HDassert(udata); + + /* Store the entry's address in the buffer */ + addr = slist_entry_ptr->addr; + udata->addr_buf_ptr[udata->i] = addr; + udata->i++; + + /* now release the entry */ + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + /* and also remove the matching entry from the dirtied list + * if it exists. + */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(udata->aux_ptr->d_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__broadcast_clean_list_cb() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__broadcast_clean_list() + * + * Purpose: Broadcast the contents of the process 0 cleaned entry + * slist. In passing, also remove all entries from said + * list, and also remove any matching entries from the dirtied + * slist. + * + * This function must only be called by the process with + * MPI_rank 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 7/1/05 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__broadcast_clean_list(H5AC_t * cache_ptr) +{ + haddr_t * addr_buf_ptr = NULL; + H5AC_aux_t * aux_ptr; + int mpi_result; + int num_entries = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr; + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank == 0); + HDassert(aux_ptr->c_slist_ptr != NULL); + + /* First broadcast the number of entries in the list so that the + * receives can set up a buffer to receive them. If there aren't + * any, we are done. + */ + num_entries = (int)H5SL_count(aux_ptr->c_slist_ptr); + if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + + if(num_entries > 0) { + H5AC_addr_list_ud_t udata; + size_t buf_size; + + /* allocate a buffer to store the list of entry base addresses in */ + buf_size = sizeof(haddr_t) * (size_t)num_entries; + if(NULL == (addr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for addr buffer") + + /* Set up user data for callback */ + udata.aux_ptr = aux_ptr; + udata.addr_buf_ptr = addr_buf_ptr; + udata.i = 0; + + /* Free all the clean list entries, building the address list in the callback */ + /* (Callback also removes the matching entries from the dirtied list) */ + if(H5SL_free(aux_ptr->c_slist_ptr, H5AC__broadcast_clean_list_cb, &udata) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for clean entries") + + /* Now broadcast the list of cleaned entries */ + if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)addr_buf_ptr, (int)buf_size, MPI_BYTE, 0, aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + } /* end if */ + + /* if it is defined, call the sync point done callback. Note + * that this callback is defined purely for testing purposes, + * and should be undefined under normal operating circumstances. + */ + if(aux_ptr->sync_point_done) + (aux_ptr->sync_point_done)(num_entries, addr_buf_ptr); + +done: + if(addr_buf_ptr) + addr_buf_ptr = (haddr_t *)H5MM_xfree((void *)addr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__broadcast_clean_list() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__construct_candidate_list() + * + * Purpose: In the parallel case when the metadata_write_strategy is + * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, process 0 uses + * this function to construct the list of cache entries to + * be flushed. This list is then propagated to the other + * caches, and then flushed in a distributed fashion. + * + * The sync_point_op parameter is used to determine the extent + * of the flush. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 3/17/10 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, + int sync_point_op) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0)); + HDassert(aux_ptr->d_slist_ptr != NULL); + HDassert(aux_ptr->c_slist_ptr != NULL); + HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0); + HDassert(aux_ptr->candidate_slist_ptr != NULL); + HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0); + HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) || (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE)); + + switch(sync_point_op) { + case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: + if(H5C_construct_candidate_list__min_clean((H5C_t *)cache_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed.") + break; + + case H5AC_SYNC_POINT_OP__FLUSH_CACHE: + if(H5C_construct_candidate_list__clean_cache((H5C_t *)cache_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__clean_cache() failed.") + break; + + default: + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation.") + break; + } /* end switch */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__construct_candidate_list() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__copy_candidate_list_to_buffer_cb + * + * Purpose: Skip list callback for building array of addresses for + * broadcasting the candidate list. + * + * Return: Return SUCCEED on success, and FAIL on failure. + * + * Programmer: Quincey Koziol, 6/12/15 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__copy_candidate_list_to_buffer_cb(void *_item, void H5_ATTR_UNUSED *_key, + void *_udata) +{ + H5AC_slist_entry_t * slist_entry_ptr = (H5AC_slist_entry_t *)_item; /* Address of item */ + H5AC_addr_list_ud_t * udata = (H5AC_addr_list_ud_t *)_udata; /* Context for callback */ + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(slist_entry_ptr); + HDassert(udata); + + /* Store the entry's address in the buffer */ + udata->addr_buf_ptr[udata->i] = slist_entry_ptr->addr; + udata->i++; + + /* now release the entry */ + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__copy_candidate_list_to_buffer_cb() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__copy_candidate_list_to_buffer + * + * Purpose: Allocate buffer(s) and copy the contents of the candidate + * entry slist into it (them). In passing, remove all + * entries from the candidate slist. Note that the + * candidate slist must not be empty. + * + * If MPI_Offset_buf_ptr_ptr is not NULL, allocate a buffer + * of MPI_Offset, copy the contents of the candidate + * entry list into it with the appropriate conversions, + * and return the base address of the buffer in + * *MPI_Offset_buf_ptr. Note that this is the buffer + * used by process 0 to transmit the list of entries to + * be flushed to all other processes (in this file group). + * + * Similarly, allocate a buffer of haddr_t, load the contents + * of the candidate list into this buffer, and return its + * base address in *haddr_buf_ptr_ptr. Note that this + * latter buffer is constructed unconditionally. + * + * In passing, also remove all entries from the candidate + * entry slist. + * + * Return: Return SUCCEED on success, and FAIL on failure. + * + * Programmer: John Mainzer, 4/19/10 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, int *num_entries_ptr, + haddr_t **haddr_buf_ptr_ptr) +{ + H5AC_aux_t * aux_ptr = NULL; + H5AC_addr_list_ud_t udata; + haddr_t * haddr_buf_ptr = NULL; + size_t buf_size; + int num_entries = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert(aux_ptr->candidate_slist_ptr != NULL); + HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0); + HDassert(num_entries_ptr != NULL); + HDassert(*num_entries_ptr == 0); + HDassert(haddr_buf_ptr_ptr != NULL); + HDassert(*haddr_buf_ptr_ptr == NULL); + + num_entries = (int)H5SL_count(aux_ptr->candidate_slist_ptr); + + /* allocate a buffer(s) to store the list of candidate entry + * base addresses in + */ + buf_size = sizeof(haddr_t) * (size_t)num_entries; + if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer") + + /* Set up user data for callback */ + udata.aux_ptr = aux_ptr; + udata.addr_buf_ptr = haddr_buf_ptr; + udata.i = 0; + + /* Free all the candidate list entries, building the address list in the callback */ + if(H5SL_free(aux_ptr->candidate_slist_ptr, H5AC__copy_candidate_list_to_buffer_cb, &udata) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for candidate entries") + + /* Pass the number of entries and the buffer pointer + * back to the caller. + */ + *num_entries_ptr = num_entries; + *haddr_buf_ptr_ptr = haddr_buf_ptr; + +done: + if(ret_value < 0) + if(haddr_buf_ptr) + haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__copy_candidate_list_to_buffer() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__log_deleted_entry() + * + * Purpose: Log an entry which has been deleted. + * + * Only called for mpi_rank 0. We must make sure that the entry + * doesn't appear in the cleaned or dirty entry lists. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 6/29/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + H5AC_slist_entry_t * slist_entry_ptr = NULL; + haddr_t addr; + + FUNC_ENTER_PACKAGE_NOERR + + /* Sanity checks */ + HDassert(entry_ptr); + addr = entry_ptr->addr; + cache_ptr = entry_ptr->cache_ptr; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank == 0); + HDassert(aux_ptr->d_slist_ptr != NULL); + HDassert(aux_ptr->c_slist_ptr != NULL); + + /* if the entry appears in the dirtied entry slist, remove it. */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + /* if the entry appears in the cleaned entry slist, remove it. */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__log_deleted_entry() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__log_dirtied_entry() + * + * Purpose: Update the dirty_bytes count for a newly dirtied entry. + * + * If mpi_rank isn't 0, this simply means adding the size + * of the entries to the dirty_bytes count. + * + * If mpi_rank is 0, we must first check to see if the entry + * appears in the dirty entries slist. If it is, do nothing. + * If it isn't, add the size to th dirty_bytes count, add the + * entry to the dirty entries slist, and remove it from the + * cleaned list (if it is present there). + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 6/29/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + HDassert(entry_ptr); + HDassert(entry_ptr->is_dirty == FALSE); + cache_ptr = entry_ptr->cache_ptr; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + + if(aux_ptr->mpi_rank == 0) { + H5AC_slist_entry_t *slist_entry_ptr; + haddr_t addr = entry_ptr->addr; + + /* Sanity checks */ + HDassert(aux_ptr->d_slist_ptr != NULL); + HDassert(aux_ptr->c_slist_ptr != NULL); + + if(NULL == H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) { + /* insert the address of the entry in the dirty entry list, and + * add its size to the dirty_bytes count. + */ + if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") + slist_entry_ptr->addr = addr; + + if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + + aux_ptr->dirty_bytes += entry_ptr->size; +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->unprotect_dirty_bytes += entry_ptr->size; + aux_ptr->unprotect_dirty_bytes_updates += 1; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + } /* end if */ + + /* the entry is dirty. If it exists on the cleaned entries list, + * remove it. + */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + } /* end if */ + else { + aux_ptr->dirty_bytes += entry_ptr->size; +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->unprotect_dirty_bytes += entry_size; + aux_ptr->unprotect_dirty_bytes_updates += 1; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__log_dirtied_entry() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__log_flushed_entry() + * + * Purpose: Update the clean entry slist for the flush of an entry -- + * specifically, if the entry has been cleared, remove it + * from both the cleaned and dirtied lists if it is present. + * Otherwise, if the entry was dirty, insert the indicated + * entry address in the clean slist if it isn't there already. + * + * This function is only used in PHDF5, and should only + * be called for the process with mpi rank 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 6/29/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, + unsigned flags) +{ + hbool_t cleared; + H5AC_aux_t * aux_ptr; + H5AC_slist_entry_t * slist_entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity check */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank == 0); + HDassert(aux_ptr->c_slist_ptr != NULL); + + /* Set local flags */ + cleared = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0); + + if(cleared) { + /* If the entry has been cleared, must remove it from both the + * cleaned list and the dirtied list. + */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + } /* end if */ + else if(was_dirty) { + if(NULL == H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) { + /* insert the address of the entry in the clean entry list. */ + if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate clean slist entry .") + slist_entry_ptr->addr = addr; + + if(H5SL_insert(aux_ptr->c_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into clean entry slist.") + } /* end if */ + } /* end else-if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__log_flushed_entry() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__log_inserted_entry() + * + * Purpose: Update the dirty_bytes count for a newly inserted entry. + * + * If mpi_rank isnt 0, this simply means adding the size + * of the entry to the dirty_bytes count. + * + * If mpi_rank is 0, we must also add the entry to the + * dirty entries slist. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 6/30/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + HDassert(entry_ptr); + cache_ptr = entry_ptr->cache_ptr; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + + if(aux_ptr->mpi_rank == 0) { + H5AC_slist_entry_t *slist_entry_ptr; + + HDassert(aux_ptr->d_slist_ptr != NULL); + HDassert(aux_ptr->c_slist_ptr != NULL); + + /* Entry to insert should not be in dirty list currently */ + if(NULL != H5SL_search(aux_ptr->d_slist_ptr, (const void *)(&entry_ptr->addr))) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry already in dirty slist.") + + /* insert the address of the entry in the dirty entry list, and + * add its size to the dirty_bytes count. + */ + if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") + slist_entry_ptr->addr = entry_ptr->addr; + if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + + /* Entry to insert should not be in clean list either */ + if(NULL != H5SL_search(aux_ptr->c_slist_ptr, (const void *)(&entry_ptr->addr))) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry in clean slist.") + } /* end if */ + + aux_ptr->dirty_bytes += entry_ptr->size; + +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->insert_dirty_bytes += size; + aux_ptr->insert_dirty_bytes_updates += 1; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__log_inserted_entry() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__log_moved_entry() + * + * Purpose: Update the dirty_bytes count for a moved entry. + * + * WARNING + * + * At present, the way that the move call is used ensures + * that the moved entry is present in all caches by + * moving in a collective operation and immediately after + * unprotecting the target entry. + * + * This function uses this invariant, and will cause arcane + * failures if it is not met. If maintaining this invariant + * becomes impossible, we will have to rework this function + * extensively, and likely include a bit of IPC for + * synchronization. A better option might be to subsume + * move in the unprotect operation. + * + * Given that the target entry is in all caches, the function + * proceeds as follows: + * + * For processes with mpi rank other 0, it simply checks to + * see if the entry was dirty prior to the move, and adds + * the entries size to the dirty bytes count. + * + * In the process with mpi rank 0, the function first checks + * to see if the entry was dirty prior to the move. If it + * was, and if the entry doesn't appear in the dirtied list + * under its old address, it adds the entry's size to the + * dirty bytes count. + * + * The rank 0 process then removes any references to the + * entry under its old address from the cleands and dirtied + * lists, and inserts an entry in the dirtied list under the + * new address. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 6/30/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + hbool_t entry_in_cache; + hbool_t entry_dirty; + size_t entry_size; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + HDassert(f); + HDassert(f->shared); + cache_ptr = (H5AC_t *)f->shared->cache; + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + + /* get entry status, size, etc here */ + if(H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache, + &entry_dirty, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.") + if(!entry_in_cache) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache.") + + if(aux_ptr->mpi_rank == 0) { + H5AC_slist_entry_t * slist_entry_ptr; + + HDassert(aux_ptr->d_slist_ptr != NULL); + HDassert(aux_ptr->c_slist_ptr != NULL); + + /* if the entry appears in the cleaned entry slist, under its old + * address, remove it. + */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)(&old_addr)))) + slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, slist_entry_ptr); + + /* if the entry appears in the dirtied entry slist under its old + * address, remove it, but don't free it. Set addr to new_addr. + */ + if(NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&old_addr)))) + slist_entry_ptr->addr = new_addr; + else { + /* otherwise, allocate a new entry that is ready + * for insertion, and increment dirty_bytes. + * + * Note that the fact that the entry wasn't in the dirtied + * list under its old address implies that it must have + * been clean to start with. + */ + HDassert(!entry_dirty); + if(NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") + slist_entry_ptr->addr = new_addr; + + aux_ptr->dirty_bytes += entry_size; + +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->move_dirty_bytes += entry_size; + aux_ptr->move_dirty_bytes_updates += 1; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + } /* end else */ + + /* insert / reinsert the entry in the dirty slist */ + if(H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + } /* end if */ + else if(!entry_dirty) { + aux_ptr->dirty_bytes += entry_size; + +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->move_dirty_bytes += entry_size; + aux_ptr->move_dirty_bytes_updates += 1; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + } /* end else-if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__log_moved_entry() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__propagate_and_apply_candidate_list + * + * Purpose: Prior to the addition of support for multiple metadata + * write strategies, in PHDF5, only the metadata cache with + * mpi rank 0 was allowed to write to file. All other + * metadata caches on processes with rank greater than 0 + * were required to retain dirty entries until they were + * notified that the entry was clean. + * + * This constraint is relaxed with the distributed + * metadata write strategy, in which a list of candidate + * metadata cache entries is constructed by the process 0 + * cache and then distributed to the caches of all the other + * processes. Once the listed is distributed, many (if not + * all) processes writing writing a unique subset of the + * entries, and marking the remainder clean. The subsets + * are chosen so that each entry in the list of candidates + * is written by exactly one cache, and all entries are + * marked as being clean in all caches. + * + * While the list of candidate cache entries is prepared + * elsewhere, this function is the main routine for distributing + * and applying the list. It must be run simultaniously on + * all processes that have the relevant file open. To ensure + * proper synchronization, there is a barrier at the beginning + * of this function. + * + * At present, this function is called under one of two + * circumstances: + * + * 1) Dirty byte creation exceeds some user specified value. + * + * While metadata reads may occur independently, all + * operations writing metadata must be collective. Thus + * all metadata caches see the same sequence of operations, + * and therefore the same dirty data creation. + * + * This fact is used to synchronize the caches for purposes + * of propagating the list of candidate entries, by simply + * calling this function from all caches whenever some user + * specified threshold on dirty data is exceeded. (the + * process 0 cache creates the candidate list just before + * calling this function). + * + * 2) Under direct user control -- this operation must be + * collective. + * + * The operations to be managed by this function are as + * follows: + * + * All processes: + * + * 1) Participate in an opening barrier. + * + * For the process with mpi rank 0: + * + * 1) Load the contents of the candidate list + * (candidate_slist_ptr) into a buffer, and broadcast that + * buffer to all the other caches. Clear the candidate + * list in passing. + * + * If there is a positive number of candidates, proceed with + * the following: + * + * 2) Apply the candidate entry list. + * + * 3) Particpate in a closing barrier. + * + * 4) Remove from the dirty list (d_slist_ptr) and from the + * flushed and still clean entries list (c_slist_ptr), + * all addresses that appeared in the candidate list, as + * these entries are now clean. + * + * + * For all processes with mpi rank greater than 0: + * + * 1) Receive the candidate entry list broadcast + * + * If there is a positive number of candidates, proceed with + * the following: + * + * 2) Apply the candidate entry list. + * + * 3) Particpate in a closing barrier. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * 3/17/10 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + haddr_t * candidates_list_ptr = NULL; + int mpi_result; + int num_candidates = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + + /* to prevent "messages from the future" we must synchronize all + * processes before we write any entries. + */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + if(aux_ptr->mpi_rank == 0) { + if(H5AC__broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist.") + + HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0); + } /* end if */ + else { + if(H5AC__receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive candidate broadcast.") + } /* end else */ + + if(num_candidates > 0) { + herr_t result; + + /* all processes apply the candidate list. + * H5C_apply_candidate_list() handles the details of + * distributing the writes across the processes. + */ + + /* Enable writes during this operation */ + aux_ptr->write_permitted = TRUE; + + /* Apply the candidate list */ + result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_candidates, + candidates_list_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); + + /* Disable writes again */ + aux_ptr->write_permitted = FALSE; + + /* Check for error on the write operation */ + if(result < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") + + /* this code exists primarily for the test bed -- it allows us to + * enforce posix semantics on the server that pretends to be a + * file system in our parallel tests. + */ + if(aux_ptr->write_done) + (aux_ptr->write_done)(); + + /* to prevent "messages from the past" we must synchronize all + * processes again before we go on. + */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + /* if this is process zero, tidy up the dirtied, + * and flushed and still clean lists. + */ + if(aux_ptr->mpi_rank == 0) + if(H5AC__tidy_cache_0_lists(cache_ptr, num_candidates, candidates_list_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") + } /* end if */ + + /* if it is defined, call the sync point done callback. Note + * that this callback is defined purely for testing purposes, + * and should be undefined under normal operating circumstances. + */ + if(aux_ptr->sync_point_done) + (aux_ptr->sync_point_done)(num_candidates, candidates_list_ptr); + +done: + if(candidates_list_ptr) + candidates_list_ptr = (haddr_t *)H5MM_xfree((void *)candidates_list_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__propagate_and_apply_candidate_list() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__propagate_flushed_and_still_clean_entries_list + * + * Purpose: In PHDF5, if the process 0 only metadata write strategy + * is selected, only the metadata cache with mpi rank 0 is + * allowed to write to file. All other metadata caches on + * processes with rank greater than 0 must retain dirty + * entries until they are notified that the entry is now + * clean. + * + * This function is the main routine for handling this + * notification proceedure. It must be called + * simultaniously on all processes that have the relevant + * file open. To this end, it is called only during a + * sync point, with a barrier prior to the call. + * + * Note that any metadata entry writes by process 0 will + * occur after the barrier and just before this call. + * + * Typicaly, calls to this function will be triggered in + * one of two ways: + * + * 1) Dirty byte creation exceeds some user specified value. + * + * While metadata reads may occur independently, all + * operations writing metadata must be collective. Thus + * all metadata caches see the same sequence of operations, + * and therefore the same dirty data creation. + * + * This fact is used to synchronize the caches for purposes + * of propagating the list of flushed and still clean + * entries, by simply calling this function from all + * caches whenever some user specified threshold on dirty + * data is exceeded. + * + * 2) Under direct user control -- this operation must be + * collective. + * + * The operations to be managed by this function are as + * follows: + * + * For the process with mpi rank 0: + * + * 1) Load the contents of the flushed and still clean entries + * list (c_slist_ptr) into a buffer, and broadcast that + * buffer to all the other caches. + * + * 2) Clear the flushed and still clean entries list + * (c_slist_ptr). + * + * + * For all processes with mpi rank greater than 0: + * + * 1) Receive the flushed and still clean entries list broadcast + * + * 2) Mark the specified entries as clean. + * + * + * For all processes: + * + * 1) Reset the dirtied bytes count to 0. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * July 5, 2005 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); + + if(aux_ptr->mpi_rank == 0) { + if(H5AC__broadcast_clean_list(cache_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist.") + HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0); + } /* end if */ + else { + if(H5AC__receive_and_apply_clean_list(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.") + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__propagate_flushed_and_still_clean_entries_list() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC_receive_haddr_list() + * + * Purpose: Receive the list of entry addresses from process 0, + * and return it in a buffer pointed to by *haddr_buf_ptr_ptr. + * Note that the caller must free this buffer if it is + * returned. + * + * This function must only be called by the process with + * MPI_rank greater than 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: Quincey Koziol, 6/11/2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__receive_haddr_list(MPI_Comm mpi_comm, int *num_entries_ptr, + haddr_t **haddr_buf_ptr_ptr) +{ + haddr_t * haddr_buf_ptr = NULL; + int mpi_result; + int num_entries; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(num_entries_ptr != NULL); + HDassert(*num_entries_ptr == 0); + HDassert(haddr_buf_ptr_ptr != NULL); + HDassert(*haddr_buf_ptr_ptr == NULL); + + /* First receive the number of entries in the list so that we + * can set up a buffer to receive them. If there aren't + * any, we are done. + */ + if(MPI_SUCCESS != (mpi_result = MPI_Bcast(&num_entries, 1, MPI_INT, 0, mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + + if(num_entries > 0) { + size_t buf_size; + + /* allocate buffers to store the list of entry base addresses in */ + buf_size = sizeof(haddr_t) * (size_t)num_entries; + if(NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer") + + /* Now receive the list of candidate entries */ + if(MPI_SUCCESS != (mpi_result = MPI_Bcast((void *)haddr_buf_ptr, (int)buf_size, MPI_BYTE, 0, mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result) + } /* end if */ + + /* finally, pass the number of entries and the buffer pointer + * back to the caller. + */ + *num_entries_ptr = num_entries; + *haddr_buf_ptr_ptr = haddr_buf_ptr; + +done: + if(ret_value < 0) + if(haddr_buf_ptr) + haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC_receive_haddr_list() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__receive_and_apply_clean_list() + * + * Purpose: Receive the list of cleaned entries from process 0, + * and mark the specified entries as clean. + * + * This function must only be called by the process with + * MPI_rank greater than 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 7/4/05 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + haddr_t * haddr_buf_ptr = NULL; + int num_entries = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank != 0); + + /* Retrieve the clean list from process 0 */ + if(H5AC__receive_haddr_list(aux_ptr->mpi_comm, &num_entries, &haddr_buf_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") + + if(num_entries > 0) + /* mark the indicated entries as clean */ + if(H5C_mark_entries_as_clean(f, dxpl_id, (int32_t)num_entries, haddr_buf_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.") + + /* if it is defined, call the sync point done callback. Note + * that this callback is defined purely for testing purposes, + * and should be undefined under normal operating circumstances. + */ + if(aux_ptr->sync_point_done) + (aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr); + +done: + if(haddr_buf_ptr) + haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__receive_and_apply_clean_list() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5AC__receive_candidate_list() + * + * Purpose: Receive the list of candidate entries from process 0, + * and return it in a buffer pointed to by *haddr_buf_ptr_ptr. + * Note that the caller must free this buffer if it is + * returned. + * + * This function must only be called by the process with + * MPI_rank greater than 0. + * + * Return SUCCEED on success, and FAIL on failure. + * + * Return: Non-negative on success/Negative on failure. + * + * Programmer: John Mainzer, 3/17/10 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__receive_candidate_list(const H5AC_t *cache_ptr, int *num_entries_ptr, + haddr_t **haddr_buf_ptr_ptr) +{ + H5AC_aux_t * aux_ptr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->mpi_rank != 0); + HDassert(aux_ptr-> metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert(num_entries_ptr != NULL); + HDassert(*num_entries_ptr == 0); + HDassert(haddr_buf_ptr_ptr != NULL); + HDassert(*haddr_buf_ptr_ptr == NULL); + + /* Retrieve the candidate list from process 0 */ + if(H5AC__receive_haddr_list(aux_ptr->mpi_comm, num_entries_ptr, haddr_buf_ptr_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__receive_candidate_list() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__rsp__dist_md_write__flush + * + * Purpose: Routine for handling the details of running a sync point + * that is triggered by a flush -- which in turn must have been + * triggered by either a flush API call or a file close -- + * when the distributed metadata write strategy is selected. + * + * Upon entry, each process generates it own candidate list, + * being a sorted list of all dirty metadata entries currently + * in the metadata cache. Note that this list must be idendical + * across all processes, as all processes see the same stream + * of dirty metadata coming in, and use the same lists of + * candidate entries at each sync point. (At first glance, this + * argument sounds circular, but think of it in the sense of + * a recursive proof). + * + * If this this list is empty, we are done, and the function + * returns + * + * Otherwise, after the sorted list dirty metadata entries is + * constructed, each process uses the same algorithm to assign + * each entry on the candidate list to exactly one process for + * flushing. + * + * At this point, all processes participate in a barrier to + * avoid messages from the past/future bugs. + * + * Each process then flushes the entries assigned to it, and + * marks all other entries on the candidate list as clean. + * + * Finally, all processes participate in a second barrier to + * avoid messages from the past/future bugs. + * + * At the end of this process, process 0 and only process 0 + * must tidy up its lists of dirtied and cleaned entries. + * These lists are not used in the distributed metadata write + * strategy, but they must be maintained should we shift + * to a strategy that uses them. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * April 28, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + haddr_t * haddr_buf_ptr = NULL; + int mpi_result; + int num_entries = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + + /* first construct the candidate list -- initially, this will be in the + * form of a skip list. We will convert it later. + */ + if(H5C_construct_candidate_list__clean_cache(cache_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.") + + if(H5SL_count(aux_ptr->candidate_slist_ptr) > 0) { + herr_t result; + + /* convert the candidate list into the format we + * are used to receiving from process 0. + */ + if(H5AC__copy_candidate_list_to_buffer(cache_ptr, &num_entries, &haddr_buf_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.") + + /* initial sync point barrier */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + /* Enable writes during this operation */ + aux_ptr->write_permitted = TRUE; + + /* Apply the candidate list */ + result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_entries, + haddr_buf_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size); + + /* Disable writes again */ + aux_ptr->write_permitted = FALSE; + + /* Check for error on the write operation */ + if(result < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") + + /* this code exists primarily for the test bed -- it allows us to + * enforce posix semantics on the server that pretends to be a + * file system in our parallel tests. + */ + if(aux_ptr->write_done) + (aux_ptr->write_done)(); + + /* final sync point barrier */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + /* if this is process zero, tidy up the dirtied, + * and flushed and still clean lists. + */ + if(aux_ptr->mpi_rank == 0) + if(H5AC__tidy_cache_0_lists(cache_ptr, num_entries, haddr_buf_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") + } /* end if */ + + /* if it is defined, call the sync point done callback. Note + * that this callback is defined purely for testing purposes, + * and should be undefined under normal operating circumstances. + */ + if(aux_ptr->sync_point_done) + (aux_ptr->sync_point_done)(num_entries, haddr_buf_ptr); + +done: + if(haddr_buf_ptr) + haddr_buf_ptr = (haddr_t *)H5MM_xfree((void *)haddr_buf_ptr); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__rsp__dist_md_write__flush() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__rsp__dist_md_write__flush_to_min_clean + * + * Purpose: Routine for handling the details of running a sync point + * triggered by the accumulation of dirty metadata (as + * opposed to a flush call to the API) when the distributed + * metadata write strategy is selected. + * + * After invocation and initial sanity checking this function + * first checks to see if evictions are enabled -- if they + * are not, the function does nothing and returns. + * + * Otherwise, process zero constructs a list of entries to + * be flushed in order to bring the process zero cache back + * within its min clean requirement. Note that this list + * (the candidate list) may be empty. + * + * Then, all processes participate in a barrier. + * + * After the barrier, process 0 broadcasts the number of + * entries in the candidate list prepared above, and all + * other processes receive this number. + * + * If this number is zero, we are done, and the function + * returns without further action. + * + * Otherwise, process 0 broadcasts the sorted list of + * candidate entries, and all other processes receive it. + * + * Then, each process uses the same algorithm to assign + * each entry on the candidate list to exactly one process + * for flushing. + * + * Each process then flushes the entries assigned to it, and + * marks all other entries on the candidate list as clean. + * + * Finally, all processes participate in a second barrier to + * avoid messages from the past/future bugs. + * + * At the end of this process, process 0 and only process 0 + * must tidy up its lists of dirtied and cleaned entries. + * These lists are not used in the distributed metadata write + * strategy, but they must be maintained should we shift + * to a strategy that uses them. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * April 28, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + hbool_t evictions_enabled; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + + /* Query if evictions are allowed */ + if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + + if(evictions_enabled) { + /* construct candidate list -- process 0 only */ + if(aux_ptr->mpi_rank == 0) + if(H5AC__construct_candidate_list(cache_ptr, aux_ptr, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.") + + /* propagate and apply candidate list -- all processes */ + if(H5AC__propagate_and_apply_candidate_list(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list.") + } /* evictions enabled */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__rsp__dist_md_write__flush_to_min_clean() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__rsp__p0_only__flush + * + * Purpose: Routine for handling the details of running a sync point + * that is triggered a flush -- which in turn must have been + * triggered by either a flush API call or a file close -- + * when the process 0 only metadata write strategy is selected. + * + * First, all processes participate in a barrier. + * + * Then process zero flushes all dirty entries, and broadcasts + * they number of clean entries (if any) to all the other + * caches. + * + * If this number is zero, we are done. + * + * Otherwise, process 0 broadcasts the list of cleaned + * entries, and all other processes which are part of this + * file group receive it, and mark the listed entries as + * clean in their caches. + * + * Since all processes have the same set of dirty + * entries at the beginning of the sync point, and all + * entries that will be written are written before + * process zero broadcasts the number of cleaned entries, + * there is no need for a closing barrier. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * April 28, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + int mpi_result; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); + + /* to prevent "messages from the future" we must + * synchronize all processes before we start the flush. + * Hence the following barrier. + */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + /* Flush data to disk, from rank 0 process */ + if(aux_ptr->mpi_rank == 0) { + herr_t result; + + /* Enable writes during this operation */ + aux_ptr->write_permitted = TRUE; + + /* Flush the cache */ + result = H5C_flush_cache(f, dxpl_id, H5AC__NO_FLAGS_SET); + + /* Disable writes again */ + aux_ptr->write_permitted = FALSE; + + /* Check for error on the write operation */ + if(result < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.") + + /* this code exists primarily for the test bed -- it allows us to + * enforce posix semantics on the server that pretends to be a + * file system in our parallel tests. + */ + if(aux_ptr->write_done) + (aux_ptr->write_done)(); + } /* end if */ + + /* Propagate cleaned entries to other ranks. */ + if(H5AC__propagate_flushed_and_still_clean_entries_list(f, H5AC_dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__rsp__p0_only__flush() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__rsp__p0_only__flush_to_min_clean + * + * Purpose: Routine for handling the details of running a sync point + * triggered by the accumulation of dirty metadata (as + * opposed to a flush call to the API) when the process 0 + * only metadata write strategy is selected. + * + * After invocation and initial sanity checking this function + * first checks to see if evictions are enabled -- if they + * are not, the function does nothing and returns. + * + * Otherwise, all processes participate in a barrier. + * + * After the barrier, if this is process 0, the function + * causes the cache to flush sufficient entries to get the + * cache back within its minimum clean fraction, and broadcast + * the number of entries which have been flushed since + * the last sync point, and are still clean. + * + * If this number is zero, we are done. + * + * Otherwise, process 0 broadcasts the list of cleaned + * entries, and all other processes which are part of this + * file group receive it, and mark the listed entries as + * clean in their caches. + * + * Since all processes have the same set of dirty + * entries at the beginning of the sync point, and all + * entries that will be written are written before + * process zero broadcasts the number of cleaned entries, + * there is no need for a closing barrier. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * April 28, 2010 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + hbool_t evictions_enabled; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); + + /* Query if evictions are allowed */ + if(H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + + /* Flush if evictions are allowed -- following call + * will cause process 0 to flush to min clean size, + * and then propagate the newly clean entries to the + * other processes. + * + * Otherwise, do nothing. + */ + if(evictions_enabled) { + int mpi_result; + + /* to prevent "messages from the future" we must synchronize all + * processes before we start the flush. This synchronization may + * already be done -- hence the do_barrier parameter. + */ + if(MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) + HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_result) + + if(0 == aux_ptr->mpi_rank) { + herr_t result; + + /* here, process 0 flushes as many entries as necessary to + * comply with the currently specified min clean size. + * Note that it is quite possible that no entries will be + * flushed. + */ + + /* Enable writes during this operation */ + aux_ptr->write_permitted = TRUE; + + /* Flush the cache */ + result = H5C_flush_to_min_clean(f, dxpl_id); + + /* Disable writes again */ + aux_ptr->write_permitted = FALSE; + + /* Check for error on the write operation */ + if(result < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_flush_to_min_clean() failed.") + + /* this call exists primarily for the test code -- it is used + * to enforce POSIX semantics on the process used to simulate + * reads and writes in t_cache.c. + */ + if(aux_ptr->write_done) + (aux_ptr->write_done)(); + } /* end if */ + + if(H5AC__propagate_flushed_and_still_clean_entries_list(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__rsp__p0_only__flush_to_min_clean() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__run_sync_point + * + * Purpose: Top level routine for managing a sync point between all + * meta data caches in the parallel case. Since all caches + * see the same sequence of dirty metadata, we simply count + * bytes of dirty metadata, and run a sync point whenever the + * number of dirty bytes of metadata seen since the last + * sync point exceeds a threshold that is common across all + * processes. We also run sync points in response to + * HDF5 API calls triggering either a flush or a file close. + * + * In earlier versions of PHDF5, only the metadata cache with + * mpi rank 0 was allowed to write to file. All other + * metadata caches on processes with rank greater than 0 were + * required to retain dirty entries until they were notified + * that the entry is was clean. + * + * This function was created to make it easier for us to + * experiment with other options, as it is a single point + * for the execution of sync points. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * March 11, 2010 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op) +{ + H5AC_t * cache_ptr; + H5AC_aux_t * aux_ptr; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + HDassert(f != NULL); + cache_ptr = f->shared->cache; + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) || + (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)); + +#if H5AC_DEBUG_DIRTY_BYTES_CREATION +HDfprintf(stdout, "%d:H5AC_propagate...:%u: (u/uu/i/iu/r/ru) = %zu/%u/%zu/%u/%zu/%u\n", + aux_ptr->mpi_rank, + aux_ptr->dirty_bytes_propagations, + aux_ptr->unprotect_dirty_bytes, + aux_ptr->unprotect_dirty_bytes_updates, + aux_ptr->insert_dirty_bytes, + aux_ptr->insert_dirty_bytes_updates, + aux_ptr->rename_dirty_bytes, + aux_ptr->rename_dirty_bytes_updates); +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + + switch(aux_ptr->metadata_write_strategy) { + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + switch(sync_point_op) { + case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: + if(H5AC__rsp__p0_only__flush_to_min_clean(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush_to_min_clean() failed.") + break; + + case H5AC_SYNC_POINT_OP__FLUSH_CACHE: + if(H5AC__rsp__p0_only__flush(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush() failed.") + break; + + default: + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op"); + break; + } /* end switch */ + break; + + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + switch(sync_point_op) { + case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: + if(H5AC__rsp__dist_md_write__flush_to_min_clean(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush_to_min_clean() failed.") + break; + + case H5AC_SYNC_POINT_OP__FLUSH_CACHE: + if(H5AC__rsp__dist_md_write__flush(f, dxpl_id) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush() failed.") + break; + + default: + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown flush op"); + break; + } /* end switch */ + break; + + default: + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown metadata write strategy.") + break; + } /* end switch */ + + /* reset the dirty bytes count */ + aux_ptr->dirty_bytes = 0; + +#if H5AC_DEBUG_DIRTY_BYTES_CREATION + aux_ptr->dirty_bytes_propagations += 1; + aux_ptr->unprotect_dirty_bytes = 0; + aux_ptr->unprotect_dirty_bytes_updates = 0; + aux_ptr->insert_dirty_bytes = 0; + aux_ptr->insert_dirty_bytes_updates = 0; + aux_ptr->rename_dirty_bytes = 0; + aux_ptr->rename_dirty_bytes_updates = 0; +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__run_sync_point() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__tidy_cache_0_lists() + * + * Purpose: In the distributed metadata write strategy, not all dirty + * entries are written by process 0 -- thus we must tidy + * up the dirtied, and flushed and still clean lists + * maintained by process zero after each sync point. + * + * This procedure exists to tend to this issue. + * + * At this point, all entries that process 0 cleared should + * have been removed from both the dirty and flushed and + * still clean lists, and entries that process 0 has flushed + * should have been removed from the dirtied list and added + * to the flushed and still clean list. + * + * However, since the distributed metadata write strategy + * doesn't make use of these lists, the objective is simply + * to maintain these lists in consistent state that allows + * them to be used should the metadata write strategy change + * to one that uses these lists. + * + * Thus for our purposes, all we need to do is remove from + * the dirtied and flushed and still clean lists all + * references to entries that appear in the candidate list. + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: John Mainzer + * 4/20/10 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, + haddr_t *candidates_list_ptr) +{ + H5AC_aux_t * aux_ptr; + int i; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(cache_ptr != NULL); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); + HDassert(aux_ptr->mpi_rank == 0); + HDassert(num_candidates > 0); + HDassert(candidates_list_ptr != NULL); + + /* clean up dirtied and flushed and still clean lists by removing + * all entries on the candidate list. Cleared entries should + * have been removed from both the dirty and cleaned lists at + * this point, flushed entries should have been added to the + * cleaned list. However, for this metadata write strategy, + * we just want to remove all references to the candidate entries. + */ + for(i = 0; i < num_candidates; i++) { + H5AC_slist_entry_t * d_slist_entry_ptr; + H5AC_slist_entry_t * c_slist_entry_ptr; + haddr_t addr; + + addr = candidates_list_ptr[i]; + + /* addr may be either on the dirtied list, or on the flushed + * and still clean list. Remove it. + */ + if(NULL != (d_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)&addr))) + d_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, d_slist_entry_ptr); + if(NULL != (c_slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->c_slist_ptr, (void *)&addr))) + c_slist_entry_ptr = H5FL_FREE(H5AC_slist_entry_t, c_slist_entry_ptr); + } /* end for */ + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5AC__tidy_cache_0_lists() */ + + +/*------------------------------------------------------------------------- + * Function: H5AC__flush_entries + * + * Purpose: Flush the metadata cache associated with the specified file, + * only writing from rank 0, but propagating the cleaned entries + * to all ranks. + * + * Return: Non-negative on success/Negative on failure if there was a + * request to flush all items and something was protected. + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Aug 22 2009 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC__flush_entries(H5F_t *f, hid_t dxpl_id) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + HDassert(f); + HDassert(f->shared->cache); + + /* Check if we have >1 ranks */ + if(f->shared->cache->aux_ptr) + if(H5AC__run_sync_point(f, dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC__flush_entries() */ +#endif /* H5_HAVE_PARALLEL */ + diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index 28965d2..74bf079 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -41,8 +41,20 @@ /* Get needed headers */ #include "H5Cprivate.h" /* Cache */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5SLprivate.h" /* Skip lists */ +/*****************************/ +/* Package Private Variables */ +/*****************************/ + +/* Declare extern the free list to manage the H5AC_aux_t struct */ +H5FL_EXTERN(H5AC_aux_t); + + +/**************************/ +/* Package Private Macros */ +/**************************/ #define H5AC_DEBUG_DIRTY_BYTES_CREATION 0 @@ -393,9 +405,18 @@ typedef struct H5AC_aux_t } H5AC_aux_t; /* struct H5AC_aux_t */ /* Package scoped functions */ -H5_DLL herr_t H5AC_set_sync_point_done_callback(H5C_t *cache_ptr, +H5_DLL herr_t H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr); +H5_DLL herr_t H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr); +H5_DLL herr_t H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, + hbool_t was_dirty, unsigned flags); +H5_DLL herr_t H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr); +H5_DLL herr_t H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, + haddr_t new_addr); +H5_DLL herr_t H5AC__flush_entries(H5F_t *f, hid_t dxpl_id); +H5_DLL herr_t H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op); +H5_DLL herr_t H5AC__set_sync_point_done_callback(H5C_t *cache_ptr, void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl)); -H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr, +H5_DLL herr_t H5AC__set_write_done_callback(H5C_t * cache_ptr, void (* write_done)(void)); #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5C.c b/src/H5C.c index fc4e8a5..5c96593 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -41,7 +41,7 @@ * * Code Changes: * - * - Remove extra functionality in H5C_flush_single_entry()? + * - Remove extra functionality in H5C__flush_single_entry()? * * - Change protect/unprotect to lock/unlock. * @@ -70,16 +70,22 @@ * **************************************************************************/ +/****************/ +/* Module Setup */ +/****************/ + #define H5C_PACKAGE /*suppress error about including H5Cpkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ +/***********/ +/* Headers */ +/***********/ #include "H5private.h" /* Generic Functions */ #ifdef H5_HAVE_PARALLEL #include "H5ACprivate.h" /* Metadata cache */ #endif /* H5_HAVE_PARALLEL */ #include "H5Cpkg.h" /* Cache */ -#include "H5Dprivate.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ @@ -91,9 +97,9 @@ #include "H5SLprivate.h" /* Skip lists */ -/* - * Private macros. - */ +/****************/ +/* Local Macros */ +/****************/ #if H5C_DO_MEMORY_SANITY_CHECKS #define H5C_IMAGE_EXTRA_SPACE 8 #define H5C_IMAGE_SANITY_VALUE "DeadBeef" @@ -101,17 +107,14 @@ #define H5C_IMAGE_EXTRA_SPACE 0 #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ -/* - * Private file-scope variables. - */ - -/* Declare a free list to manage the H5C_t struct */ -H5FL_DEFINE_STATIC(H5C_t); +/******************/ +/* Local Typedefs */ +/******************/ -/* - * Private file-scope function declarations: - */ +/********************/ +/* Local Prototypes */ +/********************/ static herr_t H5C__auto_adjust_cache_size(H5F_t * f, hid_t dxpl_id, @@ -140,13 +143,6 @@ static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr, size_t old_entry_size, size_t new_entry_size); -static herr_t H5C_flush_single_entry(const H5F_t * f, - hid_t dxpl_id, - haddr_t addr, - unsigned flags, - hbool_t del_entry_from_slist_on_destroy, - int64_t *entry_size_change_ptr); - static herr_t H5C_flush_invalidate_cache(const H5F_t * f, hid_t dxpl_id, unsigned flags); @@ -198,6 +194,24 @@ herr_t H5C_dump_cache(H5C_t * cache_ptr, const char * cache_name); herr_t H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn); #endif /* debugging routines */ +/*********************/ +/* Package Variables */ +/*********************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + +/* Declare a free list to manage the H5C_t struct */ +H5FL_DEFINE_STATIC(H5C_t); + + /**************************************************************************** * @@ -386,882 +400,6 @@ H5C__epoch_marker_fsf_size(const void H5_ATTR_UNUSED * thing, size_t H5_ATTR_UNU /*------------------------------------------------------------------------- - * Function: H5C_apply_candidate_list - * - * Purpose: Apply the supplied candidate list. - * - * We used to do this by simply having each process write - * every mpi_size-th entry in the candidate list, starting - * at index mpi_rank, and mark all the others clean. - * - * However, this can cause unnecessary contention in a file - * system by increasing the number of processes writing to - * adjacent locations in the HDF5 file. - * - * To attempt to minimize this, we now arange matters such - * that each process writes n adjacent entries in the - * candidate list, and marks all others clean. We must do - * this in such a fashion as to guarantee that each entry - * on the candidate list is written by exactly one process, - * and marked clean by all others. - * - * To do this, first construct a table mapping mpi_rank - * to the index of the first entry in the candidate list to - * be written by the process of that mpi_rank, and then use - * the table to control which entries are written and which - * are marked as clean as a function of the mpi_rank. - * - * Note that the table must be identical on all processes, as - * all see the same candidate list, mpi_size, and mpi_rank -- - * the inputs used to construct the table. - * - * We construct the table as follows. Let: - * - * n = num_candidates / mpi_size; - * - * m = num_candidates % mpi_size; - * - * Now allocate an array of integers of length mpi_size + 1, - * and call this array candidate_assignment_table. - * - * Conceptually, if the number of candidates is a multiple - * of the mpi_size, we simply pass through the candidate list - * and assign n entries to each process to flush, with the - * index of the first entry to flush in the location in - * the candidate_assignment_table indicated by the mpi_rank - * of the process. - * - * In the more common case in which the candidate list isn't - * isn't a multiple of the mpi_size, we pretend it is, and - * give num_candidates % mpi_size processes one extra entry - * each to make things work out. - * - * Once the table is constructed, we determine the first and - * last entry this process is to flush as follows: - * - * first_entry_to_flush = candidate_assignment_table[mpi_rank] - * - * last_entry_to_flush = - * candidate_assignment_table[mpi_rank + 1] - 1; - * - * With these values determined, we simply scan through the - * candidate list, marking all entries in the range - * [first_entry_to_flush, last_entry_to_flush] for flush, - * and all others to be cleaned. - * - * Finally, we scan the LRU from tail to head, flushing - * or marking clean the candidate entries as indicated. - * If necessary, we scan the pinned list as well. - * - * Note that this function will fail if any protected or - * clean entries appear on the candidate list. - * - * This function is used in managing sync points, and - * shouldn't be used elsewhere. - * - * Return: Success: SUCCEED - * - * Failure: FAIL - * - * Programmer: John Mainzer - * 3/17/10 - * - * Changes: Ported code to detect next entry status changes as the - * the result of a flush from the serial code in the scan of - * the LRU. Also added code to detect and adapt to the - * removal from the cache of the next entry in the scan of - * the LRU. - * - * Note that at present, all of these changes should not - * be required as the operations on entries as they are - * flushed that can cause these condiditions are not premitted - * in the parallel case. However, Quincey indicates that - * this may change, and thus has requested the modification. - * - * Note the assert(FALSE) in the if statement whose body - * restarts the scan of the LRU. As the body of the if - * statement should be unreachable, it should never be - * triggered until the constraints on the parallel case - * are relaxed. Please remove the assertion at that time. - * - * Also added warning on the Pinned Entry List scan, as it - * is potentially subject to the same issue. As there is - * no cognate of this scan in the serial code, I don't have - * a fix to port to it. - * - * JRM -- 4/10/19 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -#define H5C_APPLY_CANDIDATE_LIST__DEBUG 0 -herr_t -H5C_apply_candidate_list(H5F_t * f, - hid_t dxpl_id, - H5C_t * cache_ptr, - int num_candidates, - haddr_t * candidates_list_ptr, - int mpi_rank, - int mpi_size) -{ - hbool_t restart_scan; - hbool_t prev_is_dirty; - int i; - int m; - int n; - int first_entry_to_flush; - int last_entry_to_flush; - int entries_to_clear = 0; - int entries_to_flush = 0; - int entries_to_flush_or_clear_last = 0; - int entries_to_flush_collectively = 0; - int entries_cleared = 0; - int entries_flushed = 0; - int entries_delayed = 0; - int entries_flushed_or_cleared_last = 0; - int entries_flushed_collectively = 0; - int entries_examined = 0; - int initial_list_len; - int * candidate_assignment_table = NULL; - haddr_t addr; - H5C_cache_entry_t * clear_ptr = NULL; - H5C_cache_entry_t * next_ptr = NULL; - H5C_cache_entry_t * entry_ptr = NULL; - H5C_cache_entry_t * flush_ptr = NULL; - H5C_cache_entry_t * delayed_ptr = NULL; -#if H5C_DO_SANITY_CHECKS - haddr_t last_addr; -#endif /* H5C_DO_SANITY_CHECKS */ -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - char tbl_buf[1024]; -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - HDassert( cache_ptr != NULL ); - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( num_candidates > 0 ); - HDassert( num_candidates <= cache_ptr->slist_len ); - HDassert( candidates_list_ptr != NULL ); - HDassert( 0 <= mpi_rank ); - HDassert( mpi_rank < mpi_size ); - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", - FUNC, mpi_rank); - for ( i = 0; i < 1024; i++ ) tbl_buf[i] = '\0'; - sprintf(&(tbl_buf[0]), "candidate list = "); - for ( i = 0; i < num_candidates; i++ ) - { - sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", - (long long)(*(candidates_list_ptr + i))); - } - sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); - HDfprintf(stdout, "%s", tbl_buf); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - n = num_candidates / mpi_size; - m = num_candidates % mpi_size; - HDassert(n >= 0); - - if(NULL == (candidate_assignment_table = (int *)H5MM_malloc(sizeof(int) * (size_t)(mpi_size + 1)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for candidate assignment table") - - candidate_assignment_table[0] = 0; - candidate_assignment_table[mpi_size] = num_candidates; - - if(m == 0) { /* mpi_size is an even divisor of num_candidates */ - HDassert(n > 0); - for(i = 1; i < mpi_size; i++) - candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n; - } /* end if */ - else { - for(i = 1; i <= m; i++) - candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n + 1; - - if(num_candidates < mpi_size) { - for(i = m + 1; i < mpi_size; i++) - candidate_assignment_table[i] = num_candidates; - } /* end if */ - else { - for(i = m + 1; i < mpi_size; i++) - candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n; - } /* end else */ - } /* end else */ - HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates); - -#if H5C_DO_SANITY_CHECKS - /* verify that the candidate assignment table has the expected form */ - for ( i = 1; i < mpi_size - 1; i++ ) - { - int a, b; - - a = candidate_assignment_table[i] - candidate_assignment_table[i - 1]; - b = candidate_assignment_table[i + 1] - candidate_assignment_table[i]; - - HDassert( n + 1 >= a ); - HDassert( a >= b ); - HDassert( b >= n ); - } -#endif /* H5C_DO_SANITY_CHECKS */ - - first_entry_to_flush = candidate_assignment_table[mpi_rank]; - last_entry_to_flush = candidate_assignment_table[mpi_rank + 1] - 1; - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - for ( i = 0; i < 1024; i++ ) - tbl_buf[i] = '\0'; - sprintf(&(tbl_buf[0]), "candidate assignment table = "); - for(i = 0; i <= mpi_size; i++) - sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]); - sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); - HDfprintf(stdout, "%s", tbl_buf); - - HDfprintf(stdout, "%s:%d: flush entries [%d, %d].\n", - FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush); - - HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - for(i = 0; i < num_candidates; i++) { - addr = candidates_list_ptr[i]; - HDassert( H5F_addr_defined(addr) ); - -#if H5C_DO_SANITY_CHECKS - if ( i > 0 ) { - if ( last_addr == addr ) { - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list.\n") - } else if ( last_addr > addr ) { - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "candidate list not sorted.\n") - } - } - - last_addr = addr; -#endif /* H5C_DO_SANITY_CHECKS */ - - H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) - if(entry_ptr == NULL) { - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed candidate entry not in cache?!?!?.") - } else if(!entry_ptr->is_dirty) { - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?.") - } else if ( entry_ptr->is_protected ) { - /* For now at least, we can't deal with protected entries. - * If we encounter one, scream and die. If it becomes an - * issue, we should be able to work around this. - */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?.") - } else { - /* determine whether the entry is to be cleared or flushed, - * and mark it accordingly. We will scan the protected and - * pinned list shortly, and clear or flush according to these - * markings. - */ - if((i >= first_entry_to_flush) && (i <= last_entry_to_flush)) { - entries_to_flush++; - entry_ptr->flush_immediately = TRUE; - } /* end if */ - else { - entries_to_clear++; - entry_ptr->clear_on_unprotect = TRUE; - } /* end else */ - } /* end else */ - } /* end for */ - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %d/%d/%d.\n", - FUNC, mpi_rank, (int)num_candidates, (int)entries_to_clear, - (int)entries_to_flush); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - - /* We have now marked all the entries on the candidate list for - * either flush or clear -- now scan the LRU and the pinned list - * for these entries and do the deed. - * - * Note that we are doing things in this round about manner so as - * to preserve the order of the LRU list to the best of our ability. - * If we don't do this, my experiments indicate that we will have a - * noticably poorer hit ratio as a result. - */ - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: scanning LRU list. len = %d.\n", FUNC, mpi_rank, - (int)(cache_ptr->LRU_list_len)); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - /* ===================================================================== * - * Now scan the LRU and PEL lists, flushing or clearing entries as - * needed. - * - * The flush_me_last and flush_me_collectively flags may dictate how or - * when some entries can be flushed, and should be addressed here. - * However, in their initial implementation, these flags only apply to the - * superblock, so there's only a relatively small change to this function - * to account for this one case where they come into play. If these flags - * are ever expanded upon, this function and the following flushing steps - * should be reworked to account for additional cases. - * ===================================================================== */ - - HDassert(entries_to_flush >= 0); - - restart_scan = FALSE; - entries_examined = 0; - initial_list_len = cache_ptr->LRU_list_len; - entry_ptr = cache_ptr->LRU_tail_ptr; - - /* Examine each entry in the LRU list */ - while ( ( entry_ptr != NULL ) - && - ( entries_examined <= (entries_to_flush + 1) * initial_list_len ) - && - ( (entries_cleared + entries_flushed) < num_candidates ) ) { - - if ( entry_ptr->prev != NULL ) - prev_is_dirty = entry_ptr->prev->is_dirty; - - /* If this process needs to clear this entry. */ - if(entry_ptr->clear_on_unprotect) { - - HDassert(entry_ptr->is_dirty); - - next_ptr = entry_ptr->next; - entry_ptr->clear_on_unprotect = FALSE; - clear_ptr = entry_ptr; - entry_ptr = entry_ptr->prev; - entries_cleared++; - -#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) - HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, - (long long)clear_ptr->addr); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - /* No need to check for the next entry in the scan being - * removed from the cache, as this call to H5C_flush_single_entry() - * will not call either the pre_serialize or serialize callbacks. - */ - - if(H5C_flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } /* end if */ - - /* Else, if this process needs to flush this entry. */ - else if (entry_ptr->flush_immediately) { - - HDassert(entry_ptr->is_dirty); - - next_ptr = entry_ptr->next; - entry_ptr->flush_immediately = FALSE; - flush_ptr = entry_ptr; - entry_ptr = entry_ptr->prev; - entries_flushed++; - -#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) - HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, - (long long)flush_ptr->addr); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - /* reset entries_removed_counter and - * last_entry_removed_ptr prior to the call to - * H5C_flush_single_entry() so that we can spot - * unexpected removals of entries from the cache, - * and set the restart_scan flag if proceeding - * would be likely to cause us to scan an entry - * that is no longer in the cache. - * - * Note that as of this writing (April 2015) this - * case cannot occur in the parallel case. However - * Quincey is making noises about changing this, hence - * the insertion of this test. - * - * Note also that there is no test code to verify - * that this code actually works (although similar code - * in the serial version exists and is tested). - * - * Implementing a test will likely require implementing - * flush op like facilities in the parallel tests. At - * a guess this will not be terribly painful, but it - * will take a bit of time. - */ - cache_ptr->entries_removed_counter = 0; - cache_ptr->last_entry_removed_ptr = NULL; - - if(H5C_flush_single_entry(f, - dxpl_id, - flush_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.") - - if ( ( cache_ptr->entries_removed_counter > 1 ) || - ( cache_ptr->last_entry_removed_ptr == entry_ptr ) ) - - restart_scan = TRUE; - - } /* end else-if */ - - /* Otherwise, no action to be taken on this entry. Grab the next. */ - else { - entry_ptr = entry_ptr->prev; - - if ( entry_ptr != NULL ) - next_ptr = entry_ptr->next; - - } /* end else */ - - if ( ( entry_ptr != NULL ) - && - ( ( restart_scan ) - || - ( entry_ptr->is_dirty != prev_is_dirty ) - || - ( entry_ptr->next != next_ptr ) - || - ( entry_ptr->is_protected ) - || - ( entry_ptr->is_pinned ) - ) - ) { - - /* something has happened to the LRU -- start over - * from the tail. - * - * Recall that this code should be un-reachable at present, - * as all the operations by entries on flush that could cause - * it to be reachable are disallowed in the parallel case at - * present. Hence the following assertion which should be - * removed if the above changes. - */ - - HDassert( ! restart_scan ); - HDassert( entry_ptr->is_dirty == prev_is_dirty ); - HDassert( entry_ptr->next == next_ptr ); - HDassert( ! entry_ptr->is_protected ); - HDassert( ! entry_ptr->is_pinned ); - - HDassert(FALSE); /* see comment above */ - - restart_scan = FALSE; - entry_ptr = cache_ptr->LRU_tail_ptr; -/* - H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) -*/ - } - - entries_examined++; - } /* end while */ - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %d/%d/%d.\n", - FUNC, mpi_rank, entries_examined, - entries_cleared, entries_flushed); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - /* It is also possible that some of the cleared entries are on the - * pinned list. Must scan that also. - * - * WARNING: - * - * As we now allow unpinning, and removal of other entries as a side - * effect of flushing an entry, it is possible that the next entry - * in a PEL scan could either be no longer pinned, or no longer in - * the cache by the time we get to it. - * - * At present, this is not possible in this case, as we disallow such - * operations in the parallel version of the library. However, Quincey - * has been making noises about relaxing this. If and when he does, - * we have a potential problem here. - * - * The same issue exists in the serial cache, and there are tests - * to detect this problem when it occurs, and adjust to it. As seen - * above in the LRU scan, I have ported such tests to the parallel - * code where a close cognate exists in the serial code. - * - * I haven't done so here, as there are no PEL scans where the problem - * can occur in the serial code. Needless to say, this will have to - * be repaired if the constraints on pre_serialize and serialize - * callbacks are relaxed in the parallel version of the metadata cache. - * - * JRM -- 4/1/15 - */ - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: scanning pinned entry list. len = %d\n", - FUNC, mpi_rank, (int)(cache_ptr->pel_len)); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - entry_ptr = cache_ptr->pel_head_ptr; - while((entry_ptr != NULL) && - ((entries_cleared + entries_flushed + entries_delayed) - < num_candidates)) { - - /* If entry is marked for flush or for clear */ - if((entry_ptr->clear_on_unprotect||entry_ptr->flush_immediately)) { - - /* If this entry needs to be flushed last */ - if (entry_ptr->flush_me_last) { - - /* At this time, only the superblock supports being - flushed last. Conveniently, it also happens to be the only - entry that supports being flushed collectively, as well. Also - conveniently, it's always pinned, so we only need to check - for it while scanning the PEL here. Finally, it's never - included in a candidate list that excludes other dirty - entries in a cache, so we can handle this relatively simple - case here. - - For now, this function asserts this and saves the entry - to flush it after scanning the rest of the PEL list. - - If there are ever more entries that either need to be - flushed last and/or flushed collectively, this whole routine - will need to be reworked to handle all additional cases. As - it is the simple case of a single pinned entry needing - flushed last and collectively is just a minor addition to - this routine, but signficantly buffing up the usage of - flush_me_last or flush_me_collectively will require a more - intense rework of this function and potentially the function - of candidate lists as a whole. */ - - HDassert(entry_ptr->flush_me_collectively); - entries_to_flush_or_clear_last++; - entries_to_flush_collectively++; - HDassert(entries_to_flush_or_clear_last == 1); - HDassert(entries_to_flush_collectively == 1); - - /* Delay the entry. It will be flushed later. */ - delayed_ptr = entry_ptr; - entries_delayed++; - HDassert(entries_delayed == 1); - - } /* end if */ - - /* Else, this process needs to clear this entry. */ - else if (entry_ptr->clear_on_unprotect) { - HDassert(!entry_ptr->flush_immediately); - entry_ptr->clear_on_unprotect = FALSE; - clear_ptr = entry_ptr; - entry_ptr = entry_ptr->next; - entries_cleared++; - -#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) - HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, - (long long)clear_ptr->addr); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - if(H5C_flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } /* end else-if */ - - /* Else, if this process needs to independently flush this entry. */ - else if (entry_ptr->flush_immediately) { - entry_ptr->flush_immediately = FALSE; - flush_ptr = entry_ptr; - entry_ptr = entry_ptr->next; - entries_flushed++; - -#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) - HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, - (long long)flush_ptr->addr); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - if(H5C_flush_single_entry(f, - dxpl_id, - flush_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } /* end else-if */ - } /* end if */ - - /* Otherwise, this entry is not marked for flush or clear. Grab the next. */ - else { - entry_ptr = entry_ptr->next; - } /* end else */ - - } /* end while */ - -#if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, - "%s:%d: pel entries examined/cleared/flushed = %d/%d/%d.\n", - FUNC, mpi_rank, entries_examined, - entries_cleared, entries_flushed); - HDfprintf(stdout, "%s:%d: done.\n", FUNC, mpi_rank); - - HDfsync(stdout); -#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - - /* ====================================================================== * - * Now, handle all delayed entries. * - * * - * This can *only* be the superblock at this time, so it's relatively * - * easy to deal with. We're collectively flushing the entry saved from * - * above. This will need to be handled differently if there are ever more * - * than one entry needing this special treatment.) * - * ====================================================================== */ - - if (delayed_ptr) { - - if (delayed_ptr->clear_on_unprotect) { - entry_ptr->clear_on_unprotect = FALSE; - entries_cleared++; - } else if (delayed_ptr->flush_immediately) { - entry_ptr->flush_immediately = FALSE; - entries_flushed++; - } /* end if */ - - if(H5C_flush_single_entry(f, - dxpl_id, - delayed_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "Can't flush entry collectively.") - - entries_flushed_collectively++; - entries_flushed_or_cleared_last++; - } /* end if */ - - /* ====================================================================== * - * Finished flushing everything. * - * ====================================================================== */ - - HDassert((entries_flushed == entries_to_flush)); - HDassert((entries_cleared == entries_to_clear)); - HDassert((entries_flushed_or_cleared_last == entries_to_flush_or_clear_last)); - HDassert((entries_flushed_collectively == entries_to_flush_collectively)); - - if((entries_flushed != entries_to_flush) || - (entries_cleared != entries_to_clear) || - (entries_flushed_or_cleared_last != entries_to_flush_or_clear_last) || - (entries_flushed_collectively != entries_to_flush_collectively)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry count mismatch.") - -done: - if(candidate_assignment_table != NULL) - candidate_assignment_table = (int *)H5MM_xfree((void *)candidate_assignment_table); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_apply_candidate_list() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5C_construct_candidate_list__clean_cache - * - * Purpose: Construct the list of entries that should be flushed to - * clean all entries in the cache. - * - * This function is used in managing sync points, and - * shouldn't be used elsewhere. - * - * Return: Success: SUCCEED - * - * Failure: FAIL - * - * Programmer: John Mainzer - * 3/17/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr) -{ - size_t space_needed; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - HDassert( cache_ptr != NULL ); - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - - /* As a sanity check, set space needed to the size of the skip list. - * This should be the sum total of the sizes of all the dirty entries - * in the metadata cache. - */ - space_needed = cache_ptr->slist_size; - - /* Recall that while we shouldn't have any protected entries at this - * point, it is possible that some dirty entries may reside on the - * pinned list at this point. - */ - HDassert( cache_ptr->slist_size <= - (cache_ptr->dLRU_list_size + cache_ptr->pel_size) ); - HDassert( cache_ptr->slist_len <= - (cache_ptr->dLRU_list_len + cache_ptr->pel_len) ); - - if(space_needed > 0) { /* we have work to do */ - H5C_cache_entry_t *entry_ptr; - int nominated_entries_count = 0; - size_t nominated_entries_size = 0; - haddr_t nominated_addr; - - HDassert( cache_ptr->slist_len > 0 ); - - /* Scan the dirty LRU list from tail forward and nominate sufficient - * entries to free up the necessary space. - */ - entry_ptr = cache_ptr->dLRU_tail_ptr; - while((nominated_entries_size < space_needed) && - (nominated_entries_count < cache_ptr->slist_len) && - (entry_ptr != NULL)) { - HDassert( ! (entry_ptr->is_protected) ); - HDassert( ! (entry_ptr->is_read_only) ); - HDassert( entry_ptr->ro_ref_count == 0 ); - HDassert( entry_ptr->is_dirty ); - HDassert( entry_ptr->in_slist ); - - nominated_addr = entry_ptr->addr; - if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(1).") - - nominated_entries_size += entry_ptr->size; - nominated_entries_count++; - entry_ptr = entry_ptr->aux_prev; - } /* end while */ - HDassert( entry_ptr == NULL ); - - /* it is possible that there are some dirty entries on the - * protected entry list as well -- scan it too if necessary - */ - entry_ptr = cache_ptr->pel_head_ptr; - while((nominated_entries_size < space_needed) && - (nominated_entries_count < cache_ptr->slist_len) && - (entry_ptr != NULL)) { - if(entry_ptr->is_dirty) { - HDassert( ! (entry_ptr->is_protected) ); - HDassert( ! (entry_ptr->is_read_only) ); - HDassert( entry_ptr->ro_ref_count == 0 ); - HDassert( entry_ptr->is_dirty ); - HDassert( entry_ptr->in_slist ); - - nominated_addr = entry_ptr->addr; - if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(2).") - - nominated_entries_size += entry_ptr->size; - nominated_entries_count++; - } /* end if */ - - entry_ptr = entry_ptr->next; - } /* end while */ - - HDassert( nominated_entries_count == cache_ptr->slist_len ); - HDassert( nominated_entries_size == space_needed ); - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_construct_candidate_list__clean_cache() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5C_construct_candidate_list__min_clean - * - * Purpose: Construct the list of entries that should be flushed to - * get the cache back within its min clean constraints. - * - * This function is used in managing sync points, and - * shouldn't be used elsewhere. - * - * Return: Success: SUCCEED - * - * Failure: FAIL - * - * Programmer: John Mainzer - * 3/17/10 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr) -{ - size_t space_needed = 0; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - HDassert( cache_ptr != NULL ); - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - - /* compute the number of bytes (if any) that must be flushed to get the - * cache back within its min clean constraints. - */ - if(cache_ptr->max_cache_size > cache_ptr->index_size) { - if(((cache_ptr->max_cache_size - cache_ptr->index_size) + - cache_ptr->cLRU_list_size) >= cache_ptr->min_clean_size) - space_needed = 0; - else - space_needed = cache_ptr->min_clean_size - - ((cache_ptr->max_cache_size - cache_ptr->index_size) + - cache_ptr->cLRU_list_size); - } /* end if */ - else { - if(cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size) - space_needed = 0; - else - space_needed = cache_ptr->min_clean_size - - cache_ptr->cLRU_list_size; - } /* end else */ - - if(space_needed > 0) { /* we have work to do */ - H5C_cache_entry_t *entry_ptr; - int nominated_entries_count = 0; - size_t nominated_entries_size = 0; - - HDassert( cache_ptr->slist_len > 0 ); - - /* Scan the dirty LRU list from tail forward and nominate sufficient - * entries to free up the necessary space. - */ - entry_ptr = cache_ptr->dLRU_tail_ptr; - while((nominated_entries_size < space_needed) && - (nominated_entries_count < cache_ptr->slist_len) && - (entry_ptr != NULL) && - (!entry_ptr->flush_me_last)) { - haddr_t nominated_addr; - - HDassert( ! (entry_ptr->is_protected) ); - HDassert( ! (entry_ptr->is_read_only) ); - HDassert( entry_ptr->ro_ref_count == 0 ); - HDassert( entry_ptr->is_dirty ); - HDassert( entry_ptr->in_slist ); - - nominated_addr = entry_ptr->addr; - if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed.") - - nominated_entries_size += entry_ptr->size; - nominated_entries_count++; - entry_ptr = entry_ptr->aux_prev; - } /* end while */ - HDassert( nominated_entries_count <= cache_ptr->slist_len ); - HDassert( nominated_entries_size >= space_needed ); - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_construct_candidate_list__min_clean() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- * Function: H5C_create * * Purpose: Allocate, initialize, and return the address of a new @@ -1818,7 +956,7 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, if(entry_ptr->is_pinned) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is pinned.") - /* If we get this far, call H5C_flush_single_entry() with the + /* If we get this far, call H5C__flush_single_entry() with the * H5C__FLUSH_INVALIDATE_FLAG and the H5C__FLUSH_CLEAR_ONLY_FLAG. * This will clear the entry, and then delete it from the cache. */ @@ -1831,8 +969,8 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, entry_size = entry_ptr->size; #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - if(H5C_flush_single_entry(f, dxpl_id, entry_ptr->addr, flush_flags, TRUE, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_flush_single_entry() failed.") + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, flush_flags, TRUE, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C__flush_single_entry() failed.") #if H5C_DO_SANITY_CHECKS if ( entry_was_dirty ) @@ -1982,7 +1120,7 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) /* set the cache_ptr->slist_change_in_pre_serialize and * cache_ptr->slist_change_in_serialize to false. * - * These flags are set to TRUE by H5C_flush_single_entry if the + * These flags are set to TRUE by H5C__flush_single_entry if the * slist is modified by a pre_serialize or serialize call respectively. * H5C_flush_cache uses these flags to detect any modifications * to the slist that might corrupt the scan of the slist -- and @@ -2156,7 +1294,7 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) flushed_entries_size += (int64_t)entry_ptr->size; entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C_flush_single_entry(f, + status = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, flags, @@ -2216,7 +1354,7 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) flushed_entries_size += (int64_t)entry_ptr->size; entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C_flush_single_entry(f, + status = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, flags, @@ -3198,318 +2336,6 @@ done: /*------------------------------------------------------------------------- - * - * Function: H5C_mark_entries_as_clean - * - * Purpose: When the H5C code is used to implement the metadata caches - * in PHDF5, only the cache with MPI_rank 0 is allowed to - * actually write entries to disk -- all other caches must - * retain dirty entries until they are advised that the - * entries are clean. - * - * This function exists to allow the H5C code to receive these - * notifications. - * - * The function receives a list of entry base addresses - * which must refer to dirty entries in the cache. If any - * of the entries are either clean or don't exist, the - * function flags an error. - * - * The function scans the list of entries and flushes all - * those that are currently unprotected with the - * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently - * protected are flagged for clearing when they are - * unprotected. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 7/5/05 - * - * Changes: Tidied up code, removeing some old commented out - * code that had been left in pending success of the - * new version. - * - * Note that unlike H5C_apply_candidate_list(), - * H5C_mark_entries_as_clean() makes all its calls to - * H6C_flush_single_entry() with the - * H5C__FLUSH_CLEAR_ONLY_FLAG set. As a result, - * the pre_serialize() and serialize calls are not made. - * - * This then implies that (assuming such actions were - * permitted in the parallel case) no loads, dirties, - * resizes, or removals of other entries can occur as - * a side effect of the flush. Hence, there is no need - * for the checks for entry removal / status change - * that I ported to H5C_apply_candidate_list(). - * - * However, if (in addition to allowing such operations - * in the parallel case), we allow such operations outside - * of the pre_serialize / serialize routines, this may - * cease to be the case -- requiring a review of this - * function. - * - *------------------------------------------------------------------------- - */ -#ifdef H5_HAVE_PARALLEL -herr_t -H5C_mark_entries_as_clean(H5F_t * f, - hid_t dxpl_id, - int32_t ce_array_len, - haddr_t * ce_array_ptr) -{ - H5C_t * cache_ptr; - int entries_cleared; - int entries_examined; - int i; - int initial_list_len; - haddr_t addr; -#if H5C_DO_SANITY_CHECKS - int pinned_entries_marked = 0; - int protected_entries_marked = 0; - int other_entries_marked = 0; - haddr_t last_addr; -#endif /* H5C_DO_SANITY_CHECKS */ - H5C_cache_entry_t * clear_ptr = NULL; - H5C_cache_entry_t * entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - HDassert( f ); - HDassert( f->shared ); - cache_ptr = f->shared->cache; - HDassert( cache_ptr ); - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - - HDassert( ce_array_len > 0 ); - HDassert( ce_array_ptr != NULL ); - -#if H5C_DO_EXTREME_SANITY_CHECKS - if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "an extreme sanity check failed on entry.\n"); - } -#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - - for ( i = 0; i < ce_array_len; i++ ) - { - addr = ce_array_ptr[i]; - -#if H5C_DO_SANITY_CHECKS - if ( i == 0 ) { - - last_addr = addr; - - } else { - - if ( last_addr == addr ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Duplicate entry in cleaned list.\n"); - - } else if ( last_addr > addr ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "cleaned list not sorted.\n"); - } - } - -#if H5C_DO_EXTREME_SANITY_CHECKS - if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "an extreme sanity check failed in for loop.\n"); - } -#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ -#endif /* H5C_DO_SANITY_CHECKS */ - - HDassert( H5F_addr_defined(addr) ); - - H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) - - if ( entry_ptr == NULL ) { -#if H5C_DO_SANITY_CHECKS - HDfprintf(stdout, - "H5C_mark_entries_as_clean: entry[%d] = %ld not in cache.\n", - (int)i, - (long)addr); -#endif /* H5C_DO_SANITY_CHECKS */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Listed entry not in cache?!?!?.") - - } else if ( ! entry_ptr->is_dirty ) { - -#if H5C_DO_SANITY_CHECKS - HDfprintf(stdout, - "H5C_mark_entries_as_clean: entry %ld is not dirty!?!\n", - (long)addr); -#endif /* H5C_DO_SANITY_CHECKS */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Listed entry not dirty?!?!?.") - - } else { - - /* Mark the entry to be cleared on unprotect. We will - * scan the LRU list shortly, and clear all those entries - * not currently protected. - */ - entry_ptr->clear_on_unprotect = TRUE; -#if H5C_DO_SANITY_CHECKS - if ( entry_ptr->is_protected ) { - - protected_entries_marked++; - - } else if ( entry_ptr->is_pinned ) { - - pinned_entries_marked++; - - } else { - - other_entries_marked++; - } -#endif /* H5C_DO_SANITY_CHECKS */ - } - } - - /* Scan through the LRU list from back to front, and flush the - * entries whose clear_on_unprotect flags are set. Observe that - * any protected entries will not be on the LRU, and therefore - * will not be flushed at this time. - * - * Note that unlike H5C_apply_candidate_list(), - * H5C_mark_entries_as_clean() makes all its calls to - * H6C_flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG - * set. As a result, the pre_serialize() and serialize calls are - * not made. - * - * This then implies that (assuming such actions were - * permitted in the parallel case) no loads, dirties, - * resizes, or removals of other entries can occur as - * a side effect of the flush. Hence, there is no need - * for the checks for entry removal / status change - * that I ported to H5C_apply_candidate_list(). - * - * However, if (in addition to allowing such operations - * in the parallel case), we allow such operations outside - * of the pre_serialize / serialize routines, this may - * cease to be the case -- requiring a review of this - * point. - * JRM -- 4/7/15 - */ - - entries_cleared = 0; - entries_examined = 0; - initial_list_len = cache_ptr->LRU_list_len; - entry_ptr = cache_ptr->LRU_tail_ptr; - - while ( ( entry_ptr != NULL ) && - ( entries_examined <= initial_list_len ) && - ( entries_cleared < ce_array_len ) ) - { - if ( entry_ptr->clear_on_unprotect ) { - - entry_ptr->clear_on_unprotect = FALSE; - clear_ptr = entry_ptr; - entry_ptr = entry_ptr->prev; - entries_cleared++; - - if ( H5C_flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } - } else { - - entry_ptr = entry_ptr->prev; - } - entries_examined++; - } - -#if H5C_DO_SANITY_CHECKS - HDassert( entries_cleared == other_entries_marked ); -#endif /* H5C_DO_SANITY_CHECKS */ - - /* It is also possible that some of the cleared entries are on the - * pinned list. Must scan that also. - */ - - entry_ptr = cache_ptr->pel_head_ptr; - - while ( entry_ptr != NULL ) - { - if ( entry_ptr->clear_on_unprotect ) { - - entry_ptr->clear_on_unprotect = FALSE; - clear_ptr = entry_ptr; - entry_ptr = entry_ptr->next; - entries_cleared++; - - if ( H5C_flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } - } else { - - entry_ptr = entry_ptr->next; - } - } - -#if H5C_DO_SANITY_CHECKS - HDassert( entries_cleared == pinned_entries_marked + other_entries_marked ); - HDassert( entries_cleared + protected_entries_marked == ce_array_len ); -#endif /* H5C_DO_SANITY_CHECKS */ - - HDassert( ( entries_cleared == ce_array_len ) || - ( (ce_array_len - entries_cleared) <= cache_ptr->pl_len ) ); - -#if H5C_DO_SANITY_CHECKS - i = 0; - entry_ptr = cache_ptr->pl_head_ptr; - while ( entry_ptr != NULL ) - { - if ( entry_ptr->clear_on_unprotect ) { - - i++; - } - entry_ptr = entry_ptr->next; - } - HDassert( (entries_cleared + i) == ce_array_len ); -#endif /* H5C_DO_SANITY_CHECKS */ - -done: - -#if H5C_DO_EXTREME_SANITY_CHECKS - if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || - ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "an extreme sanity check failed on exit.\n"); - } -#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - - FUNC_LEAVE_NOAPI(ret_value) - -} /* H5C_mark_entries_as_clean() */ -#endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- * Function: H5C_mark_entry_dirty * * Purpose: Mark a pinned or protected entry as dirty. The target entry @@ -5891,7 +4717,7 @@ done: * writes (secondary_dxpl_id). Since an uprotect cannot * occasion a write at present, all this is moot for now. * However, things change, and in any case, - * H5C_flush_single_entry() needs primary_dxpl_id and + * H5C__flush_single_entry() needs primary_dxpl_id and * secondary_dxpl_id in its parameter list. * * The function can't cause a read either, so the dxpl_id @@ -6133,7 +4959,7 @@ H5C_unprotect(H5F_t * f, if(take_ownership) flush_flags |= H5C__TAKE_OWNERSHIP_FLAG; - if ( H5C_flush_single_entry(f, + if ( H5C__flush_single_entry(f, dxpl_id, addr, flush_flags, @@ -6174,7 +5000,7 @@ H5C_unprotect(H5F_t * f, "hash table contains multiple entries for addr?!?.") } - if ( H5C_flush_single_entry(f, + if ( H5C__flush_single_entry(f, dxpl_id, addr, H5C__FLUSH_CLEAR_ONLY_FLAG, @@ -7504,7 +6330,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, /* reset entries_removed_counter and * last_entry_removed_ptr prior to the call to - * H5C_flush_single_entry() so that we can spot + * H5C__flush_single_entry() so that we can spot * unexpected removals of entries from the cache, * and set the restart_scan flag if proceeding * would be likely to cause us to scan an entry @@ -7513,7 +6339,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, cache_ptr->entries_removed_counter = 0; cache_ptr->last_entry_removed_ptr = NULL; - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, @@ -7529,7 +6355,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, bytes_evicted += entry_ptr->size; - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, @@ -7620,7 +6446,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, if ( ! (entry_ptr->is_dirty) ) { - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, @@ -8126,7 +6952,7 @@ done: * was largely removed from the cache data structures before * the flush proper. However, re-entrant calls to the cache * in the parallel case required a re-factoring of the - * H5C_flush_single_entry() function to keep entries fully + * H5C__flush_single_entry() function to keep entries fully * in the cache until after the pre-serialize and serialize * calls. * JRM -- 12/25/14 @@ -8239,7 +7065,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, */ #if H5C_DO_SANITY_CHECKS - /* Depending on circumstances, H5C_flush_single_entry() will + /* Depending on circumstances, H5C__flush_single_entry() will * remove dirty entries from the slist as it flushes them. * Thus for sanity checks we must make note of the initial * slist length and size before we do any flushes. @@ -8272,7 +7098,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, /* set the cache_ptr->slist_change_in_pre_serialize and * cache_ptr->slist_change_in_serialize to false. * - * These flags are set to TRUE by H5C_flush_single_entry if the + * These flags are set to TRUE by H5C__flush_single_entry if the * slist is modified by a pre_serialize or serialize call * respectively. * @@ -8381,7 +7207,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, /* Test to see if we are can flush the entry now. * If we can, go ahead and flush, but don't tell - * H5C_flush_single_entry() to destroy the entry + * H5C__flush_single_entry() to destroy the entry * as pinned entries can't be evicted. */ if(entry_ptr->flush_dep_height == curr_flush_dep_height ) { @@ -8399,7 +7225,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C_flush_single_entry(f, + status = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, @@ -8461,7 +7287,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C_flush_single_entry(f, + status = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), @@ -8603,7 +7429,7 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_was_dirty = entry_ptr->is_dirty; - status = H5C_flush_single_entry(f, + status = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), @@ -8755,7 +7581,7 @@ done: /*------------------------------------------------------------------------- * - * Function: H5C_flush_single_entry + * Function: H5C__flush_single_entry * * Purpose: Flush or clear (and evict if requested) the cache entry * with the specified address and type. If the type is NULL, @@ -8814,8 +7640,8 @@ done: * *------------------------------------------------------------------------- */ -static herr_t -H5C_flush_single_entry(const H5F_t * f, +herr_t +H5C__flush_single_entry(const H5F_t * f, hid_t dxpl_id, haddr_t addr, unsigned flags, @@ -8838,7 +7664,7 @@ H5C_flush_single_entry(const H5F_t * f, H5C_cache_entry_t * entry_ptr = NULL; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE HDassert( f ); HDassert( cache_ptr ); @@ -9620,7 +8446,7 @@ done: ( ( entry_ptr ) && ( ! entry_ptr->is_dirty ) ) ); FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_flush_single_entry() */ +} /* H5C__flush_single_entry() */ /*------------------------------------------------------------------------- @@ -10099,7 +8925,7 @@ done: * attempts to load another entry. * * This error was exposed by a re-factor of the - * H5C_flush_single_entry() routine. However, it was + * H5C__flush_single_entry() routine. However, it was * a potential bug from the moment that entries were * allowed to load other entries on flush. * @@ -10221,7 +9047,7 @@ H5C_make_space_in_cache(H5F_t * f, /* reset entries_removed_counter and * last_entry_removed_ptr prior to the call to - * H5C_flush_single_entry() so that we can spot + * H5C__flush_single_entry() so that we can spot * unexpected removals of entries from the cache, * and set the restart_scan flag if proceeding * would be likely to cause us to scan an entry @@ -10230,7 +9056,7 @@ H5C_make_space_in_cache(H5F_t * f, cache_ptr->entries_removed_counter = 0; cache_ptr->last_entry_removed_ptr = NULL; - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__NO_FLAGS_SET, @@ -10249,7 +9075,7 @@ H5C_make_space_in_cache(H5F_t * f, cache_ptr->entries_scanned_to_make_space++; #endif /* H5C_COLLECT_CACHE_STATS */ - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, @@ -10404,7 +9230,7 @@ H5C_make_space_in_cache(H5F_t * f, prev_ptr = entry_ptr->aux_prev; - result = H5C_flush_single_entry(f, + result = H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, H5C__FLUSH_INVALIDATE_FLAG, diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c new file mode 100644 index 0000000..3abaf8b --- /dev/null +++ b/src/H5Cmpio.c @@ -0,0 +1,1260 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*------------------------------------------------------------------------- + * + * Created: H5Cmpio.c + * June 20 2015 + * Quincey Koziol + * + * Purpose: Functions in this file implement support for parallel I/O for + * generic cache code. + * + *------------------------------------------------------------------------- + */ + +/****************/ +/* Module Setup */ +/****************/ + +#define H5C_PACKAGE /*suppress error about including H5Cpkg */ +#define H5F_PACKAGE /*suppress error about including H5Fpkg */ + + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Cpkg.h" /* Cache */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ + + +#ifdef H5_HAVE_PARALLEL + +/****************/ +/* Local Macros */ +/****************/ +#define H5C_APPLY_CANDIDATE_LIST__DEBUG 0 + + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Local Prototypes */ +/********************/ + + +/*********************/ +/* Package Variables */ +/*********************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + + + +/*------------------------------------------------------------------------- + * Function: H5C_apply_candidate_list + * + * Purpose: Apply the supplied candidate list. + * + * We used to do this by simply having each process write + * every mpi_size-th entry in the candidate list, starting + * at index mpi_rank, and mark all the others clean. + * + * However, this can cause unnecessary contention in a file + * system by increasing the number of processes writing to + * adjacent locations in the HDF5 file. + * + * To attempt to minimize this, we now arange matters such + * that each process writes n adjacent entries in the + * candidate list, and marks all others clean. We must do + * this in such a fashion as to guarantee that each entry + * on the candidate list is written by exactly one process, + * and marked clean by all others. + * + * To do this, first construct a table mapping mpi_rank + * to the index of the first entry in the candidate list to + * be written by the process of that mpi_rank, and then use + * the table to control which entries are written and which + * are marked as clean as a function of the mpi_rank. + * + * Note that the table must be identical on all processes, as + * all see the same candidate list, mpi_size, and mpi_rank -- + * the inputs used to construct the table. + * + * We construct the table as follows. Let: + * + * n = num_candidates / mpi_size; + * + * m = num_candidates % mpi_size; + * + * Now allocate an array of integers of length mpi_size + 1, + * and call this array candidate_assignment_table. + * + * Conceptually, if the number of candidates is a multiple + * of the mpi_size, we simply pass through the candidate list + * and assign n entries to each process to flush, with the + * index of the first entry to flush in the location in + * the candidate_assignment_table indicated by the mpi_rank + * of the process. + * + * In the more common case in which the candidate list isn't + * isn't a multiple of the mpi_size, we pretend it is, and + * give num_candidates % mpi_size processes one extra entry + * each to make things work out. + * + * Once the table is constructed, we determine the first and + * last entry this process is to flush as follows: + * + * first_entry_to_flush = candidate_assignment_table[mpi_rank] + * + * last_entry_to_flush = + * candidate_assignment_table[mpi_rank + 1] - 1; + * + * With these values determined, we simply scan through the + * candidate list, marking all entries in the range + * [first_entry_to_flush, last_entry_to_flush] for flush, + * and all others to be cleaned. + * + * Finally, we scan the LRU from tail to head, flushing + * or marking clean the candidate entries as indicated. + * If necessary, we scan the pinned list as well. + * + * Note that this function will fail if any protected or + * clean entries appear on the candidate list. + * + * This function is used in managing sync points, and + * shouldn't be used elsewhere. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: John Mainzer + * 3/17/10 + * + * Changes: Ported code to detect next entry status changes as the + * the result of a flush from the serial code in the scan of + * the LRU. Also added code to detect and adapt to the + * removal from the cache of the next entry in the scan of + * the LRU. + * + * Note that at present, all of these changes should not + * be required as the operations on entries as they are + * flushed that can cause these condiditions are not premitted + * in the parallel case. However, Quincey indicates that + * this may change, and thus has requested the modification. + * + * Note the assert(FALSE) in the if statement whose body + * restarts the scan of the LRU. As the body of the if + * statement should be unreachable, it should never be + * triggered until the constraints on the parallel case + * are relaxed. Please remove the assertion at that time. + * + * Also added warning on the Pinned Entry List scan, as it + * is potentially subject to the same issue. As there is + * no cognate of this scan in the serial code, I don't have + * a fix to port to it. + * + * JRM -- 4/10/19 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_apply_candidate_list(H5F_t * f, + hid_t dxpl_id, + H5C_t * cache_ptr, + int num_candidates, + haddr_t * candidates_list_ptr, + int mpi_rank, + int mpi_size) +{ + hbool_t restart_scan; + hbool_t prev_is_dirty; + int i; + int m; + int n; + int first_entry_to_flush; + int last_entry_to_flush; + int entries_to_clear = 0; + int entries_to_flush = 0; + int entries_to_flush_or_clear_last = 0; + int entries_to_flush_collectively = 0; + int entries_cleared = 0; + int entries_flushed = 0; + int entries_delayed = 0; + int entries_flushed_or_cleared_last = 0; + int entries_flushed_collectively = 0; + int entries_examined = 0; + int initial_list_len; + int * candidate_assignment_table = NULL; + haddr_t addr; + H5C_cache_entry_t * clear_ptr = NULL; + H5C_cache_entry_t * next_ptr = NULL; + H5C_cache_entry_t * entry_ptr = NULL; + H5C_cache_entry_t * flush_ptr = NULL; + H5C_cache_entry_t * delayed_ptr = NULL; +#if H5C_DO_SANITY_CHECKS + haddr_t last_addr; +#endif /* H5C_DO_SANITY_CHECKS */ +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + char tbl_buf[1024]; +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + HDassert( cache_ptr != NULL ); + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + HDassert( num_candidates > 0 ); + HDassert( num_candidates <= cache_ptr->slist_len ); + HDassert( candidates_list_ptr != NULL ); + HDassert( 0 <= mpi_rank ); + HDassert( mpi_rank < mpi_size ); + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", + FUNC, mpi_rank); + for ( i = 0; i < 1024; i++ ) tbl_buf[i] = '\0'; + sprintf(&(tbl_buf[0]), "candidate list = "); + for ( i = 0; i < num_candidates; i++ ) + { + sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", + (long long)(*(candidates_list_ptr + i))); + } + sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); + HDfprintf(stdout, "%s", tbl_buf); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + n = num_candidates / mpi_size; + m = num_candidates % mpi_size; + HDassert(n >= 0); + + if(NULL == (candidate_assignment_table = (int *)H5MM_malloc(sizeof(int) * (size_t)(mpi_size + 1)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for candidate assignment table") + + candidate_assignment_table[0] = 0; + candidate_assignment_table[mpi_size] = num_candidates; + + if(m == 0) { /* mpi_size is an even divisor of num_candidates */ + HDassert(n > 0); + for(i = 1; i < mpi_size; i++) + candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n; + } /* end if */ + else { + for(i = 1; i <= m; i++) + candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n + 1; + + if(num_candidates < mpi_size) { + for(i = m + 1; i < mpi_size; i++) + candidate_assignment_table[i] = num_candidates; + } /* end if */ + else { + for(i = m + 1; i < mpi_size; i++) + candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n; + } /* end else */ + } /* end else */ + HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates); + +#if H5C_DO_SANITY_CHECKS + /* verify that the candidate assignment table has the expected form */ + for ( i = 1; i < mpi_size - 1; i++ ) + { + int a, b; + + a = candidate_assignment_table[i] - candidate_assignment_table[i - 1]; + b = candidate_assignment_table[i + 1] - candidate_assignment_table[i]; + + HDassert( n + 1 >= a ); + HDassert( a >= b ); + HDassert( b >= n ); + } +#endif /* H5C_DO_SANITY_CHECKS */ + + first_entry_to_flush = candidate_assignment_table[mpi_rank]; + last_entry_to_flush = candidate_assignment_table[mpi_rank + 1] - 1; + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + for ( i = 0; i < 1024; i++ ) + tbl_buf[i] = '\0'; + sprintf(&(tbl_buf[0]), "candidate assignment table = "); + for(i = 0; i <= mpi_size; i++) + sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]); + sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); + HDfprintf(stdout, "%s", tbl_buf); + + HDfprintf(stdout, "%s:%d: flush entries [%d, %d].\n", + FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush); + + HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + for(i = 0; i < num_candidates; i++) { + addr = candidates_list_ptr[i]; + HDassert( H5F_addr_defined(addr) ); + +#if H5C_DO_SANITY_CHECKS + if ( i > 0 ) { + if ( last_addr == addr ) { + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list.\n") + } else if ( last_addr > addr ) { + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "candidate list not sorted.\n") + } + } + + last_addr = addr; +#endif /* H5C_DO_SANITY_CHECKS */ + + H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) + if(entry_ptr == NULL) { + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed candidate entry not in cache?!?!?.") + } else if(!entry_ptr->is_dirty) { + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?.") + } else if ( entry_ptr->is_protected ) { + /* For now at least, we can't deal with protected entries. + * If we encounter one, scream and die. If it becomes an + * issue, we should be able to work around this. + */ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?.") + } else { + /* determine whether the entry is to be cleared or flushed, + * and mark it accordingly. We will scan the protected and + * pinned list shortly, and clear or flush according to these + * markings. + */ + if((i >= first_entry_to_flush) && (i <= last_entry_to_flush)) { + entries_to_flush++; + entry_ptr->flush_immediately = TRUE; + } /* end if */ + else { + entries_to_clear++; + entry_ptr->clear_on_unprotect = TRUE; + } /* end else */ + } /* end else */ + } /* end for */ + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %d/%d/%d.\n", + FUNC, mpi_rank, (int)num_candidates, (int)entries_to_clear, + (int)entries_to_flush); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + + /* We have now marked all the entries on the candidate list for + * either flush or clear -- now scan the LRU and the pinned list + * for these entries and do the deed. + * + * Note that we are doing things in this round about manner so as + * to preserve the order of the LRU list to the best of our ability. + * If we don't do this, my experiments indicate that we will have a + * noticably poorer hit ratio as a result. + */ + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, "%s:%d: scanning LRU list. len = %d.\n", FUNC, mpi_rank, + (int)(cache_ptr->LRU_list_len)); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + /* ===================================================================== * + * Now scan the LRU and PEL lists, flushing or clearing entries as + * needed. + * + * The flush_me_last and flush_me_collectively flags may dictate how or + * when some entries can be flushed, and should be addressed here. + * However, in their initial implementation, these flags only apply to the + * superblock, so there's only a relatively small change to this function + * to account for this one case where they come into play. If these flags + * are ever expanded upon, this function and the following flushing steps + * should be reworked to account for additional cases. + * ===================================================================== */ + + HDassert(entries_to_flush >= 0); + + restart_scan = FALSE; + entries_examined = 0; + initial_list_len = cache_ptr->LRU_list_len; + entry_ptr = cache_ptr->LRU_tail_ptr; + + /* Examine each entry in the LRU list */ + while ( ( entry_ptr != NULL ) + && + ( entries_examined <= (entries_to_flush + 1) * initial_list_len ) + && + ( (entries_cleared + entries_flushed) < num_candidates ) ) { + + if ( entry_ptr->prev != NULL ) + prev_is_dirty = entry_ptr->prev->is_dirty; + + /* If this process needs to clear this entry. */ + if(entry_ptr->clear_on_unprotect) { + + HDassert(entry_ptr->is_dirty); + + next_ptr = entry_ptr->next; + entry_ptr->clear_on_unprotect = FALSE; + clear_ptr = entry_ptr; + entry_ptr = entry_ptr->prev; + entries_cleared++; + +#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) + HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, + (long long)clear_ptr->addr); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + /* No need to check for the next entry in the scan being + * removed from the cache, as this call to H5C__flush_single_entry() + * will not call either the pre_serialize or serialize callbacks. + */ + + if(H5C__flush_single_entry(f, + dxpl_id, + clear_ptr->addr, + H5C__FLUSH_CLEAR_ONLY_FLAG, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + } /* end if */ + + /* Else, if this process needs to flush this entry. */ + else if (entry_ptr->flush_immediately) { + + HDassert(entry_ptr->is_dirty); + + next_ptr = entry_ptr->next; + entry_ptr->flush_immediately = FALSE; + flush_ptr = entry_ptr; + entry_ptr = entry_ptr->prev; + entries_flushed++; + +#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) + HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, + (long long)flush_ptr->addr); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + /* reset entries_removed_counter and + * last_entry_removed_ptr prior to the call to + * H5C__flush_single_entry() so that we can spot + * unexpected removals of entries from the cache, + * and set the restart_scan flag if proceeding + * would be likely to cause us to scan an entry + * that is no longer in the cache. + * + * Note that as of this writing (April 2015) this + * case cannot occur in the parallel case. However + * Quincey is making noises about changing this, hence + * the insertion of this test. + * + * Note also that there is no test code to verify + * that this code actually works (although similar code + * in the serial version exists and is tested). + * + * Implementing a test will likely require implementing + * flush op like facilities in the parallel tests. At + * a guess this will not be terribly painful, but it + * will take a bit of time. + */ + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; + + if(H5C__flush_single_entry(f, + dxpl_id, + flush_ptr->addr, + H5C__NO_FLAGS_SET, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.") + + if ( ( cache_ptr->entries_removed_counter > 1 ) || + ( cache_ptr->last_entry_removed_ptr == entry_ptr ) ) + + restart_scan = TRUE; + + } /* end else-if */ + + /* Otherwise, no action to be taken on this entry. Grab the next. */ + else { + entry_ptr = entry_ptr->prev; + + if ( entry_ptr != NULL ) + next_ptr = entry_ptr->next; + + } /* end else */ + + if ( ( entry_ptr != NULL ) + && + ( ( restart_scan ) + || + ( entry_ptr->is_dirty != prev_is_dirty ) + || + ( entry_ptr->next != next_ptr ) + || + ( entry_ptr->is_protected ) + || + ( entry_ptr->is_pinned ) + ) + ) { + + /* something has happened to the LRU -- start over + * from the tail. + * + * Recall that this code should be un-reachable at present, + * as all the operations by entries on flush that could cause + * it to be reachable are disallowed in the parallel case at + * present. Hence the following assertion which should be + * removed if the above changes. + */ + + HDassert( ! restart_scan ); + HDassert( entry_ptr->is_dirty == prev_is_dirty ); + HDassert( entry_ptr->next == next_ptr ); + HDassert( ! entry_ptr->is_protected ); + HDassert( ! entry_ptr->is_pinned ); + + HDassert(FALSE); /* see comment above */ + + restart_scan = FALSE; + entry_ptr = cache_ptr->LRU_tail_ptr; +/* + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) +*/ + } + + entries_examined++; + } /* end while */ + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %d/%d/%d.\n", + FUNC, mpi_rank, entries_examined, + entries_cleared, entries_flushed); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + /* It is also possible that some of the cleared entries are on the + * pinned list. Must scan that also. + * + * WARNING: + * + * As we now allow unpinning, and removal of other entries as a side + * effect of flushing an entry, it is possible that the next entry + * in a PEL scan could either be no longer pinned, or no longer in + * the cache by the time we get to it. + * + * At present, this is not possible in this case, as we disallow such + * operations in the parallel version of the library. However, Quincey + * has been making noises about relaxing this. If and when he does, + * we have a potential problem here. + * + * The same issue exists in the serial cache, and there are tests + * to detect this problem when it occurs, and adjust to it. As seen + * above in the LRU scan, I have ported such tests to the parallel + * code where a close cognate exists in the serial code. + * + * I haven't done so here, as there are no PEL scans where the problem + * can occur in the serial code. Needless to say, this will have to + * be repaired if the constraints on pre_serialize and serialize + * callbacks are relaxed in the parallel version of the metadata cache. + * + * JRM -- 4/1/15 + */ + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, "%s:%d: scanning pinned entry list. len = %d\n", + FUNC, mpi_rank, (int)(cache_ptr->pel_len)); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + entry_ptr = cache_ptr->pel_head_ptr; + while((entry_ptr != NULL) && + ((entries_cleared + entries_flushed + entries_delayed) + < num_candidates)) { + + /* If entry is marked for flush or for clear */ + if((entry_ptr->clear_on_unprotect||entry_ptr->flush_immediately)) { + + /* If this entry needs to be flushed last */ + if (entry_ptr->flush_me_last) { + + /* At this time, only the superblock supports being + flushed last. Conveniently, it also happens to be the only + entry that supports being flushed collectively, as well. Also + conveniently, it's always pinned, so we only need to check + for it while scanning the PEL here. Finally, it's never + included in a candidate list that excludes other dirty + entries in a cache, so we can handle this relatively simple + case here. + + For now, this function asserts this and saves the entry + to flush it after scanning the rest of the PEL list. + + If there are ever more entries that either need to be + flushed last and/or flushed collectively, this whole routine + will need to be reworked to handle all additional cases. As + it is the simple case of a single pinned entry needing + flushed last and collectively is just a minor addition to + this routine, but signficantly buffing up the usage of + flush_me_last or flush_me_collectively will require a more + intense rework of this function and potentially the function + of candidate lists as a whole. */ + + HDassert(entry_ptr->flush_me_collectively); + entries_to_flush_or_clear_last++; + entries_to_flush_collectively++; + HDassert(entries_to_flush_or_clear_last == 1); + HDassert(entries_to_flush_collectively == 1); + + /* Delay the entry. It will be flushed later. */ + delayed_ptr = entry_ptr; + entries_delayed++; + HDassert(entries_delayed == 1); + + } /* end if */ + + /* Else, this process needs to clear this entry. */ + else if (entry_ptr->clear_on_unprotect) { + HDassert(!entry_ptr->flush_immediately); + entry_ptr->clear_on_unprotect = FALSE; + clear_ptr = entry_ptr; + entry_ptr = entry_ptr->next; + entries_cleared++; + +#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) + HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank, + (long long)clear_ptr->addr); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + if(H5C__flush_single_entry(f, + dxpl_id, + clear_ptr->addr, + H5C__FLUSH_CLEAR_ONLY_FLAG, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + } /* end else-if */ + + /* Else, if this process needs to independently flush this entry. */ + else if (entry_ptr->flush_immediately) { + entry_ptr->flush_immediately = FALSE; + flush_ptr = entry_ptr; + entry_ptr = entry_ptr->next; + entries_flushed++; + +#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 ) + HDfprintf(stdout, "%s:%d: flushing 0x%llx.\n", FUNC, mpi_rank, + (long long)flush_ptr->addr); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + if(H5C__flush_single_entry(f, + dxpl_id, + flush_ptr->addr, + H5C__NO_FLAGS_SET, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + } /* end else-if */ + } /* end if */ + + /* Otherwise, this entry is not marked for flush or clear. Grab the next. */ + else { + entry_ptr = entry_ptr->next; + } /* end else */ + + } /* end while */ + +#if H5C_APPLY_CANDIDATE_LIST__DEBUG + HDfprintf(stdout, + "%s:%d: pel entries examined/cleared/flushed = %d/%d/%d.\n", + FUNC, mpi_rank, entries_examined, + entries_cleared, entries_flushed); + HDfprintf(stdout, "%s:%d: done.\n", FUNC, mpi_rank); + + HDfsync(stdout); +#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ + + /* ====================================================================== * + * Now, handle all delayed entries. * + * * + * This can *only* be the superblock at this time, so it's relatively * + * easy to deal with. We're collectively flushing the entry saved from * + * above. This will need to be handled differently if there are ever more * + * than one entry needing this special treatment.) * + * ====================================================================== */ + + if (delayed_ptr) { + + if (delayed_ptr->clear_on_unprotect) { + entry_ptr->clear_on_unprotect = FALSE; + entries_cleared++; + } else if (delayed_ptr->flush_immediately) { + entry_ptr->flush_immediately = FALSE; + entries_flushed++; + } /* end if */ + + if(H5C__flush_single_entry(f, + dxpl_id, + delayed_ptr->addr, + H5C__NO_FLAGS_SET, + TRUE, + NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, + "Can't flush entry collectively.") + + entries_flushed_collectively++; + entries_flushed_or_cleared_last++; + } /* end if */ + + /* ====================================================================== * + * Finished flushing everything. * + * ====================================================================== */ + + HDassert((entries_flushed == entries_to_flush)); + HDassert((entries_cleared == entries_to_clear)); + HDassert((entries_flushed_or_cleared_last == entries_to_flush_or_clear_last)); + HDassert((entries_flushed_collectively == entries_to_flush_collectively)); + + if((entries_flushed != entries_to_flush) || + (entries_cleared != entries_to_clear) || + (entries_flushed_or_cleared_last != entries_to_flush_or_clear_last) || + (entries_flushed_collectively != entries_to_flush_collectively)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry count mismatch.") + +done: + if(candidate_assignment_table != NULL) + candidate_assignment_table = (int *)H5MM_xfree((void *)candidate_assignment_table); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_apply_candidate_list() */ + + +/*------------------------------------------------------------------------- + * Function: H5C_construct_candidate_list__clean_cache + * + * Purpose: Construct the list of entries that should be flushed to + * clean all entries in the cache. + * + * This function is used in managing sync points, and + * shouldn't be used elsewhere. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: John Mainzer + * 3/17/10 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr) +{ + size_t space_needed; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + HDassert( cache_ptr != NULL ); + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + + /* As a sanity check, set space needed to the size of the skip list. + * This should be the sum total of the sizes of all the dirty entries + * in the metadata cache. + */ + space_needed = cache_ptr->slist_size; + + /* Recall that while we shouldn't have any protected entries at this + * point, it is possible that some dirty entries may reside on the + * pinned list at this point. + */ + HDassert( cache_ptr->slist_size <= + (cache_ptr->dLRU_list_size + cache_ptr->pel_size) ); + HDassert( cache_ptr->slist_len <= + (cache_ptr->dLRU_list_len + cache_ptr->pel_len) ); + + if(space_needed > 0) { /* we have work to do */ + H5C_cache_entry_t *entry_ptr; + int nominated_entries_count = 0; + size_t nominated_entries_size = 0; + haddr_t nominated_addr; + + HDassert( cache_ptr->slist_len > 0 ); + + /* Scan the dirty LRU list from tail forward and nominate sufficient + * entries to free up the necessary space. + */ + entry_ptr = cache_ptr->dLRU_tail_ptr; + while((nominated_entries_size < space_needed) && + (nominated_entries_count < cache_ptr->slist_len) && + (entry_ptr != NULL)) { + HDassert( ! (entry_ptr->is_protected) ); + HDassert( ! (entry_ptr->is_read_only) ); + HDassert( entry_ptr->ro_ref_count == 0 ); + HDassert( entry_ptr->is_dirty ); + HDassert( entry_ptr->in_slist ); + + nominated_addr = entry_ptr->addr; + if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(1).") + + nominated_entries_size += entry_ptr->size; + nominated_entries_count++; + entry_ptr = entry_ptr->aux_prev; + } /* end while */ + HDassert( entry_ptr == NULL ); + + /* it is possible that there are some dirty entries on the + * protected entry list as well -- scan it too if necessary + */ + entry_ptr = cache_ptr->pel_head_ptr; + while((nominated_entries_size < space_needed) && + (nominated_entries_count < cache_ptr->slist_len) && + (entry_ptr != NULL)) { + if(entry_ptr->is_dirty) { + HDassert( ! (entry_ptr->is_protected) ); + HDassert( ! (entry_ptr->is_read_only) ); + HDassert( entry_ptr->ro_ref_count == 0 ); + HDassert( entry_ptr->is_dirty ); + HDassert( entry_ptr->in_slist ); + + nominated_addr = entry_ptr->addr; + if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed(2).") + + nominated_entries_size += entry_ptr->size; + nominated_entries_count++; + } /* end if */ + + entry_ptr = entry_ptr->next; + } /* end while */ + + HDassert( nominated_entries_count == cache_ptr->slist_len ); + HDassert( nominated_entries_size == space_needed ); + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_construct_candidate_list__clean_cache() */ + + +/*------------------------------------------------------------------------- + * Function: H5C_construct_candidate_list__min_clean + * + * Purpose: Construct the list of entries that should be flushed to + * get the cache back within its min clean constraints. + * + * This function is used in managing sync points, and + * shouldn't be used elsewhere. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: John Mainzer + * 3/17/10 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr) +{ + size_t space_needed = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + HDassert( cache_ptr != NULL ); + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + + /* compute the number of bytes (if any) that must be flushed to get the + * cache back within its min clean constraints. + */ + if(cache_ptr->max_cache_size > cache_ptr->index_size) { + if(((cache_ptr->max_cache_size - cache_ptr->index_size) + + cache_ptr->cLRU_list_size) >= cache_ptr->min_clean_size) + space_needed = 0; + else + space_needed = cache_ptr->min_clean_size - + ((cache_ptr->max_cache_size - cache_ptr->index_size) + + cache_ptr->cLRU_list_size); + } /* end if */ + else { + if(cache_ptr->min_clean_size <= cache_ptr->cLRU_list_size) + space_needed = 0; + else + space_needed = cache_ptr->min_clean_size - + cache_ptr->cLRU_list_size; + } /* end else */ + + if(space_needed > 0) { /* we have work to do */ + H5C_cache_entry_t *entry_ptr; + int nominated_entries_count = 0; + size_t nominated_entries_size = 0; + + HDassert( cache_ptr->slist_len > 0 ); + + /* Scan the dirty LRU list from tail forward and nominate sufficient + * entries to free up the necessary space. + */ + entry_ptr = cache_ptr->dLRU_tail_ptr; + while((nominated_entries_size < space_needed) && + (nominated_entries_count < cache_ptr->slist_len) && + (entry_ptr != NULL) && + (!entry_ptr->flush_me_last)) { + haddr_t nominated_addr; + + HDassert( ! (entry_ptr->is_protected) ); + HDassert( ! (entry_ptr->is_read_only) ); + HDassert( entry_ptr->ro_ref_count == 0 ); + HDassert( entry_ptr->is_dirty ); + HDassert( entry_ptr->in_slist ); + + nominated_addr = entry_ptr->addr; + if(H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed.") + + nominated_entries_size += entry_ptr->size; + nominated_entries_count++; + entry_ptr = entry_ptr->aux_prev; + } /* end while */ + HDassert( nominated_entries_count <= cache_ptr->slist_len ); + HDassert( nominated_entries_size >= space_needed ); + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_construct_candidate_list__min_clean() */ + + +/*------------------------------------------------------------------------- + * + * Function: H5C_mark_entries_as_clean + * + * Purpose: When the H5C code is used to implement the metadata caches + * in PHDF5, only the cache with MPI_rank 0 is allowed to + * actually write entries to disk -- all other caches must + * retain dirty entries until they are advised that the + * entries are clean. + * + * This function exists to allow the H5C code to receive these + * notifications. + * + * The function receives a list of entry base addresses + * which must refer to dirty entries in the cache. If any + * of the entries are either clean or don't exist, the + * function flags an error. + * + * The function scans the list of entries and flushes all + * those that are currently unprotected with the + * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently + * protected are flagged for clearing when they are + * unprotected. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 7/5/05 + * + * Changes: Tidied up code, removeing some old commented out + * code that had been left in pending success of the + * new version. + * + * Note that unlike H5C_apply_candidate_list(), + * H5C_mark_entries_as_clean() makes all its calls to + * H6C_flush_single_entry() with the + * H5C__FLUSH_CLEAR_ONLY_FLAG set. As a result, + * the pre_serialize() and serialize calls are not made. + * + * This then implies that (assuming such actions were + * permitted in the parallel case) no loads, dirties, + * resizes, or removals of other entries can occur as + * a side effect of the flush. Hence, there is no need + * for the checks for entry removal / status change + * that I ported to H5C_apply_candidate_list(). + * + * However, if (in addition to allowing such operations + * in the parallel case), we allow such operations outside + * of the pre_serialize / serialize routines, this may + * cease to be the case -- requiring a review of this + * function. + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_mark_entries_as_clean(H5F_t * f, + hid_t dxpl_id, + int32_t ce_array_len, + haddr_t * ce_array_ptr) +{ + H5C_t * cache_ptr; + int entries_cleared; + int entries_examined; + int i; + int initial_list_len; + haddr_t addr; +#if H5C_DO_SANITY_CHECKS + int pinned_entries_marked = 0; + int protected_entries_marked = 0; + int other_entries_marked = 0; + haddr_t last_addr; +#endif /* H5C_DO_SANITY_CHECKS */ + H5C_cache_entry_t * clear_ptr = NULL; + H5C_cache_entry_t * entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + HDassert( f ); + HDassert( f->shared ); + cache_ptr = f->shared->cache; + HDassert( cache_ptr ); + HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); + + HDassert( ce_array_len > 0 ); + HDassert( ce_array_ptr != NULL ); + +#if H5C_DO_EXTREME_SANITY_CHECKS + if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "an extreme sanity check failed on entry.\n"); + } +#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ + + for ( i = 0; i < ce_array_len; i++ ) + { + addr = ce_array_ptr[i]; + +#if H5C_DO_SANITY_CHECKS + if ( i == 0 ) { + + last_addr = addr; + + } else { + + if ( last_addr == addr ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Duplicate entry in cleaned list.\n"); + + } else if ( last_addr > addr ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "cleaned list not sorted.\n"); + } + } + +#if H5C_DO_EXTREME_SANITY_CHECKS + if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "an extreme sanity check failed in for loop.\n"); + } +#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ + + HDassert( H5F_addr_defined(addr) ); + + H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) + + if ( entry_ptr == NULL ) { +#if H5C_DO_SANITY_CHECKS + HDfprintf(stdout, + "H5C_mark_entries_as_clean: entry[%d] = %ld not in cache.\n", + (int)i, + (long)addr); +#endif /* H5C_DO_SANITY_CHECKS */ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Listed entry not in cache?!?!?.") + + } else if ( ! entry_ptr->is_dirty ) { + +#if H5C_DO_SANITY_CHECKS + HDfprintf(stdout, + "H5C_mark_entries_as_clean: entry %ld is not dirty!?!\n", + (long)addr); +#endif /* H5C_DO_SANITY_CHECKS */ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Listed entry not dirty?!?!?.") + + } else { + + /* Mark the entry to be cleared on unprotect. We will + * scan the LRU list shortly, and clear all those entries + * not currently protected. + */ + entry_ptr->clear_on_unprotect = TRUE; +#if H5C_DO_SANITY_CHECKS + if ( entry_ptr->is_protected ) { + + protected_entries_marked++; + + } else if ( entry_ptr->is_pinned ) { + + pinned_entries_marked++; + + } else { + + other_entries_marked++; + } +#endif /* H5C_DO_SANITY_CHECKS */ + } + } + + /* Scan through the LRU list from back to front, and flush the + * entries whose clear_on_unprotect flags are set. Observe that + * any protected entries will not be on the LRU, and therefore + * will not be flushed at this time. + * + * Note that unlike H5C_apply_candidate_list(), + * H5C_mark_entries_as_clean() makes all its calls to + * H6C_flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG + * set. As a result, the pre_serialize() and serialize calls are + * not made. + * + * This then implies that (assuming such actions were + * permitted in the parallel case) no loads, dirties, + * resizes, or removals of other entries can occur as + * a side effect of the flush. Hence, there is no need + * for the checks for entry removal / status change + * that I ported to H5C_apply_candidate_list(). + * + * However, if (in addition to allowing such operations + * in the parallel case), we allow such operations outside + * of the pre_serialize / serialize routines, this may + * cease to be the case -- requiring a review of this + * point. + * JRM -- 4/7/15 + */ + + entries_cleared = 0; + entries_examined = 0; + initial_list_len = cache_ptr->LRU_list_len; + entry_ptr = cache_ptr->LRU_tail_ptr; + + while ( ( entry_ptr != NULL ) && + ( entries_examined <= initial_list_len ) && + ( entries_cleared < ce_array_len ) ) + { + if ( entry_ptr->clear_on_unprotect ) { + + entry_ptr->clear_on_unprotect = FALSE; + clear_ptr = entry_ptr; + entry_ptr = entry_ptr->prev; + entries_cleared++; + + if ( H5C__flush_single_entry(f, + dxpl_id, + clear_ptr->addr, + H5C__FLUSH_CLEAR_ONLY_FLAG, + TRUE, + NULL) < 0 ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + } + } else { + + entry_ptr = entry_ptr->prev; + } + entries_examined++; + } + +#if H5C_DO_SANITY_CHECKS + HDassert( entries_cleared == other_entries_marked ); +#endif /* H5C_DO_SANITY_CHECKS */ + + /* It is also possible that some of the cleared entries are on the + * pinned list. Must scan that also. + */ + + entry_ptr = cache_ptr->pel_head_ptr; + + while ( entry_ptr != NULL ) + { + if ( entry_ptr->clear_on_unprotect ) { + + entry_ptr->clear_on_unprotect = FALSE; + clear_ptr = entry_ptr; + entry_ptr = entry_ptr->next; + entries_cleared++; + + if ( H5C__flush_single_entry(f, + dxpl_id, + clear_ptr->addr, + H5C__FLUSH_CLEAR_ONLY_FLAG, + TRUE, + NULL) < 0 ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + } + } else { + + entry_ptr = entry_ptr->next; + } + } + +#if H5C_DO_SANITY_CHECKS + HDassert( entries_cleared == pinned_entries_marked + other_entries_marked ); + HDassert( entries_cleared + protected_entries_marked == ce_array_len ); +#endif /* H5C_DO_SANITY_CHECKS */ + + HDassert( ( entries_cleared == ce_array_len ) || + ( (ce_array_len - entries_cleared) <= cache_ptr->pl_len ) ); + +#if H5C_DO_SANITY_CHECKS + i = 0; + entry_ptr = cache_ptr->pl_head_ptr; + while ( entry_ptr != NULL ) + { + if ( entry_ptr->clear_on_unprotect ) { + + i++; + } + entry_ptr = entry_ptr->next; + } + HDassert( (entries_cleared + i) == ce_array_len ); +#endif /* H5C_DO_SANITY_CHECKS */ + +done: + +#if H5C_DO_EXTREME_SANITY_CHECKS + if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) || + ( H5C_validate_lru_list(cache_ptr) < 0 ) ) { + + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "an extreme sanity check failed on exit.\n"); + } +#endif /* H5C_DO_EXTREME_SANITY_CHECKS */ + + FUNC_LEAVE_NOAPI(ret_value) + +} /* H5C_mark_entries_as_clean() */ +#endif /* H5_HAVE_PARALLEL */ + diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 988dfff..6d75222 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -3769,7 +3769,9 @@ struct H5C_t { /******************************/ /* Package Private Prototypes */ /******************************/ - +H5_DLL herr_t H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, + haddr_t addr, unsigned flags, hbool_t del_entry_from_slist_on_destroy, + int64_t *entry_size_change_ptr); #endif /* _H5Cpkg_H */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index a9ffb70..2dc611d 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1883,8 +1883,6 @@ H5_DLL FILE *H5C_get_trace_file_ptr(const H5C_t *cache_ptr); H5_DLL FILE *H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr); H5_DLL herr_t H5C_insert_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, haddr_t addr, void *thing, unsigned int flags); -H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t dxpl_id, int32_t ce_array_len, - haddr_t *ce_array_ptr); H5_DLL herr_t H5C_mark_entry_dirty(void *thing); H5_DLL herr_t H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, haddr_t new_addr); @@ -1918,6 +1916,8 @@ H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, hid_t dxpl_id, int mpi_rank, int mpi_size); H5_DLL herr_t H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr); H5_DLL herr_t H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr); +H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t dxpl_id, int32_t ce_array_len, + haddr_t *ce_array_ptr); #endif /* H5_HAVE_PARALLEL */ #ifndef NDEBUG /* debugging functions */ diff --git a/src/Makefile.am b/src/Makefile.am index 2df095e..b6c4dad 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,9 +42,11 @@ DISTCLEANFILES=H5pubconf.h # library sources libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5B.c H5Bcache.c H5Bdbg.c \ + H5AC.c H5ACmpio.c \ + H5B.c H5Bcache.c H5Bdbg.c \ H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \ - H5C.c H5CS.c \ + H5C.c H5Cmpio.c \ + H5CS.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ diff --git a/src/Makefile.in b/src/Makefile.in index d795677..5ea0a3e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -150,9 +150,9 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_la_LIBADD = am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ - H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5B.lo H5Bcache.lo \ + H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5ACmpio.lo H5B.lo H5Bcache.lo \ H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo \ - H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5CS.lo H5D.lo \ + H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5Cmpio.lo H5CS.lo H5D.lo \ H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ H5Dlayout.lo H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo \ @@ -740,9 +740,9 @@ DISTCLEANFILES = H5pubconf.h # library sources libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5B.c H5Bcache.c H5Bdbg.c \ + H5AC.c H5ACmpio.c H5B.c H5Bcache.c H5Bdbg.c \ H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \ - H5C.c H5CS.c \ + H5C.c H5Cmpio.c H5CS.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ @@ -963,6 +963,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5A.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5AC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5ACmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Abtree2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Adense.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Adeprec.Plo@am__quote@ @@ -979,6 +980,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bcache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bdbg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5C.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5CS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5D.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dbtree.Plo@am__quote@ diff --git a/test/cache.c b/test/cache.c index a98a995..8e8f36a 100644 --- a/test/cache.c +++ b/test/cache.c @@ -9499,7 +9499,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, * Modifications: * * Updated test for minor changes in the behaviour - * of H5C_flush_single_entry(). + * of H5C__flush_single_entry(). * * JRM -- 2/16/15 * @@ -10575,7 +10575,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) failure_mssg = "unexpected size/len in flush op eviction test 12."; } - /* modifications to the H5C_flush_single_entry() function have + /* modifications to the H5C__flush_single_entry() function have * changed the behavior of the cache slightly, causing * this test to fail. Comment out for now -- come back and * fix if all goes well. @@ -10664,7 +10664,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) failure_mssg = "unexpected size/len in flush op eviction test 13."; } - /* modifications to the H5C_flush_single_entry() function have + /* modifications to the H5C__flush_single_entry() function have * changed the behavior of the cache slightly, causing * this test to fail. Comment out for now -- come back and * fix if all goes well. diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 18140ad..0988206 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -4248,7 +4248,7 @@ setup_cache_for_test(hid_t * fid_ptr, if ( success ) { - if ( H5AC_set_write_done_callback(cache_ptr, do_sync) != SUCCEED ) { + if ( H5AC__set_write_done_callback(cache_ptr, do_sync) != SUCCEED ) { nerrors++; if ( verbose ) { @@ -4263,12 +4263,12 @@ setup_cache_for_test(hid_t * fid_ptr, if ( success ) { - if ( H5AC_set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) { + if ( H5AC__set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) { nerrors++; if ( verbose ) { HDfprintf(stdout, - "%d:%s: H5AC_set_sync_point_done_callback failed.\n", + "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, FUNC); } } -- cgit v0.12 From 89115b11b0ed2f51c6d80305301a60c7cba8c916 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 29 Jun 2015 10:19:34 -0500 Subject: [svn-r27294] Description: Clean up parameters to H5C__flush_single_entry: accept cache entry instead of address, and make new flag for deleting entry from skiplist on destroy instead of a separate parameter to the routine. Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial & parallel --- src/H5C.c | 958 ++++++++++++++++----------------------------------- src/H5Cmpio.c | 58 +--- src/H5Cpkg.h | 3 +- src/H5Cprivate.h | 2 + src/H5Fsuper_cache.c | 2 +- test/cache.c | 8 +- 6 files changed, 320 insertions(+), 711 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 5c96593..e29da86 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -968,9 +968,12 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, entry_was_dirty = entry_ptr->is_dirty; entry_size = entry_ptr->size; #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ + + /* Delete the entry from the skip list on destroy */ + flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG; - if(H5C__flush_single_entry(f, dxpl_id, entry_ptr->addr, flush_flags, TRUE, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C__flush_single_entry() failed.") + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, flush_flags, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't flush entry") #if H5C_DO_SANITY_CHECKS if ( entry_was_dirty ) @@ -1040,7 +1043,6 @@ herr_t H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) { H5C_t * cache_ptr = f->shared->cache; - herr_t status; herr_t ret_value = SUCCEED; hbool_t destroy; hbool_t flushed_entries_last_pass; @@ -1097,17 +1099,8 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) cache_ptr->flush_in_progress = TRUE; if ( destroy ) { - - status = H5C_flush_invalidate_cache(f, dxpl_id, flags); - - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, we are toast so - * just scream and die. - */ - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "flush invalidate failed.") - } + if(H5C_flush_invalidate_cache(f, dxpl_id, flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed.") } else { /* When we are only flushing marked entries, the slist will usually * still contain entries when we have flushed everything we should. @@ -1294,20 +1287,8 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) flushed_entries_size += (int64_t)entry_ptr->size; entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - flags, - FALSE, - entry_size_change_ptr); - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, - * we are toast so just scream and die. - */ - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "dirty pinned entry flush failed.") - } /* end if */ + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, flags, entry_size_change_ptr) < 0 ) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty pinned entry flush failed.") #if H5C_DO_SANITY_CHECKS /* it is possible that the entry size changed @@ -1354,20 +1335,8 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) flushed_entries_size += (int64_t)entry_ptr->size; entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - flags, - FALSE, - entry_size_change_ptr); - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, - * we are toast so just scream and die. - */ - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "Can't flush entry.") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, flags, entry_size_change_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry.") #if H5C_DO_SANITY_CHECKS /* it is possible that the entry size changed @@ -4711,18 +4680,6 @@ done: * argument must be the value returned by that call to * H5C_protect(). * - * The primary_dxpl_id and secondary_dxpl_id parameters - * specify the dxpl_ids used on the first write occasioned - * by the unprotect (primary_dxpl_id), and on all subsequent - * writes (secondary_dxpl_id). Since an uprotect cannot - * occasion a write at present, all this is moot for now. - * However, things change, and in any case, - * H5C__flush_single_entry() needs primary_dxpl_id and - * secondary_dxpl_id in its parameter list. - * - * The function can't cause a read either, so the dxpl_id - * parameters are moot in this case as well. - * * Return: Non-negative on success/Negative on failure * * If the deleted flag is TRUE, simply remove the target entry @@ -4937,19 +4894,11 @@ H5C_unprotect(H5F_t * f, HDassert ( ! (entry_ptr->is_pinned ) ); /* verify that the target entry is in the cache. */ - H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL) - - if ( test_entry_ptr == NULL ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "entry not in hash table?!?.") - } - else if ( test_entry_ptr != entry_ptr ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "hash table contains multiple entries for addr?!?.") - } + if(test_entry_ptr == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?.") + else if(test_entry_ptr != entry_ptr) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "hash table contains multiple entries for addr?!?.") /* Set the 'free file space' flag for the flush, if needed */ if(free_file_space) @@ -4959,15 +4908,11 @@ H5C_unprotect(H5F_t * f, if(take_ownership) flush_flags |= H5C__TAKE_OWNERSHIP_FLAG; - if ( H5C__flush_single_entry(f, - dxpl_id, - addr, - flush_flags, - TRUE, - NULL) < 0 ) { + /* Delete the entry from the skip list on destroy */ + flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG; - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush.") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, flush_flags, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush entry") #if H5C_DO_SANITY_CHECKS if ( ( take_ownership ) && ( ! was_clean ) ) @@ -4986,29 +4931,14 @@ H5C_unprotect(H5F_t * f, else if ( clear_entry ) { /* verify that the target entry is in the cache. */ - H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL) + if(test_entry_ptr == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?.") + else if(test_entry_ptr != entry_ptr) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "hash table contains multiple entries for addr?!?.") - if ( test_entry_ptr == NULL ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "entry not in hash table?!?.") - } - else if ( test_entry_ptr != entry_ptr ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ - "hash table contains multiple entries for addr?!?.") - } - - if ( H5C__flush_single_entry(f, - dxpl_id, - addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear.") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry") } #endif /* H5_HAVE_PARALLEL */ } @@ -6273,7 +6203,6 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; - herr_t result; size_t eviction_size_limit; size_t bytes_evicted = 0; hbool_t prev_is_dirty = FALSE; @@ -6339,12 +6268,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, cache_ptr->entries_removed_counter = 0; cache_ptr->last_entry_removed_ptr = NULL; - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__NO_FLAGS_SET, - FALSE, - NULL); + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__NO_FLAGS_SET, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") if ( ( cache_ptr->entries_removed_counter > 1 ) || ( cache_ptr->last_entry_removed_ptr == prev_ptr ) ) @@ -6355,18 +6280,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, bytes_evicted += entry_ptr->size; - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__FLUSH_INVALIDATE_FLAG, - TRUE, - NULL); - } - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry") + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0 ) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") } if ( prev_ptr != NULL ) { @@ -6446,18 +6361,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, if ( ! (entry_ptr->is_dirty) ) { - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__FLUSH_INVALIDATE_FLAG, - TRUE, - NULL); - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush clean entry") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry") } /* just skip the entry if it is dirty, as we can't do * anything with it now since we can't write. @@ -6965,7 +6870,6 @@ H5C_flush_invalidate_cache(const H5F_t * f, unsigned flags) { H5C_t * cache_ptr = f->shared->cache; - herr_t status; hbool_t restart_slist_scan; int32_t protected_entries = 0; int32_t i; @@ -7001,16 +6905,9 @@ H5C_flush_invalidate_cache(const H5F_t * f, cooked_flags = flags & H5C__FLUSH_CLEAR_ONLY_FLAG; /* remove ageout markers if present */ - if ( cache_ptr->epoch_markers_active > 0 ) { - - status = H5C__autoadjust__ageout__remove_all_markers(cache_ptr); - - if ( status != SUCCEED ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "error removing all epoch markers.") - } - } + if(cache_ptr->epoch_markers_active > 0) + if(H5C__autoadjust__ageout__remove_all_markers(cache_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers.") /* The flush proceedure here is a bit strange. * @@ -7225,21 +7122,8 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__NO_FLAGS_SET, - FALSE, - entry_size_change_ptr); - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, we - * are toast so just scream and die. - */ - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "dirty pinned entry flush failed.") - } /* end if */ + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__NO_FLAGS_SET, entry_size_change_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty pinned entry flush failed.") #if H5C_DO_SANITY_CHECKS /* entry size may have changed during the flush. @@ -7287,21 +7171,8 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_size_change = 0; #endif /* H5C_DO_SANITY_CHECKS */ - status = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), - TRUE, - entry_size_change_ptr); - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, we - * are toast so just scream and die. - */ - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "dirty entry flush destroy failed.") - } /* end if */ + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG), entry_size_change_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry flush destroy failed.") #if H5C_DO_SANITY_CHECKS /* entry size may have changed during the flush. @@ -7429,22 +7300,8 @@ H5C_flush_invalidate_cache(const H5F_t * f, entry_was_dirty = entry_ptr->is_dirty; - status = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG), - TRUE, - NULL); - - if ( status < 0 ) { - - /* This shouldn't happen -- if it does, - * we are toast so just scream and die. - */ - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "Entry flush destroy failed.") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG), NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Entry flush destroy failed.") if ( entry_was_dirty ) { @@ -7641,35 +7498,31 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C__flush_single_entry(const H5F_t * f, - hid_t dxpl_id, - haddr_t addr, - unsigned flags, - hbool_t del_entry_from_slist_on_destroy, - int64_t * entry_size_change_ptr) +H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_ptr, + unsigned flags, int64_t *entry_size_change_ptr) { - H5C_t * cache_ptr = f->shared->cache; + H5C_t * cache_ptr; /* Cache for file */ hbool_t destroy; /* external flag */ hbool_t clear_only; /* external flag */ hbool_t free_file_space; /* external flag */ hbool_t take_ownership; /* external flag */ + hbool_t del_from_slist_on_destroy; /* external flag */ hbool_t write_entry; /* internal flag */ hbool_t destroy_entry; /* internal flag */ hbool_t was_dirty; - herr_t status; haddr_t new_addr = HADDR_UNDEF; haddr_t old_addr = HADDR_UNDEF; size_t new_len = 0; size_t new_compressed_len = 0; - H5C_cache_entry_t * entry_ptr = NULL; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE - HDassert( f ); - HDassert( cache_ptr ); - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( H5F_addr_defined(addr) ); + HDassert(f); + cache_ptr = f->shared->cache; + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(entry_ptr); /* If defined, initialize *entry_size_change_ptr to 0 */ if(entry_size_change_ptr != NULL) @@ -7680,6 +7533,7 @@ H5C__flush_single_entry(const H5F_t * f, clear_only = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0); free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0); take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0); + del_from_slist_on_destroy = ((flags & H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) != 0); /* Set the flag for destroying the entry, based on the 'take ownership' * and 'destroy' flags @@ -7689,109 +7543,81 @@ H5C__flush_single_entry(const H5F_t * f, else destroy_entry = destroy; - /* attempt to find the target entry in the hash table */ - H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL) - /* we will write the entry to disk if it exists, is dirty, and if the * clear only flag is not set. */ - if ( ( entry_ptr != NULL ) && ( entry_ptr->is_dirty ) && ( ! clear_only ) ) + if(entry_ptr->is_dirty && !clear_only) write_entry = TRUE; else write_entry = FALSE; /* run initial sanity checks */ #if H5C_DO_SANITY_CHECKS - if ( entry_ptr != NULL ) { + HDassert( ! ( destroy && entry_ptr->is_pinned ) ); - HDassert( ! ( ( destroy ) && ( entry_ptr->is_pinned ) ) ); - - if ( entry_ptr->in_slist ) { - - HDassert(entry_ptr->is_dirty); - - if ( ( ( entry_ptr->flush_marker ) && ( ! entry_ptr->is_dirty ) ) || - ( entry_ptr->addr != addr ) ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "entry in slist failed sanity checks.") - } - } else { - - HDassert(!entry_ptr->is_dirty); - HDassert(!entry_ptr->flush_marker); - HDassert(entry_ptr->addr == addr); + if(entry_ptr->in_slist) { + HDassert(entry_ptr->is_dirty); - if ( ( entry_ptr->is_dirty ) || - ( entry_ptr->flush_marker ) || - ( entry_ptr->addr != addr ) ) { + if((entry_ptr->flush_marker) && (!entry_ptr->is_dirty)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks.") + } else { + HDassert(!entry_ptr->is_dirty); + HDassert(!entry_ptr->flush_marker); - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "entry failed sanity checks.") - } - } + if((entry_ptr->is_dirty) || (entry_ptr->flush_marker)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks.") } #endif /* H5C_DO_SANITY_CHECKS */ - if ( ( entry_ptr != NULL ) && ( entry_ptr->is_protected ) ) - { + if(entry_ptr->is_protected) { HDassert(!entry_ptr->is_protected); /* Attempt to flush a protected entry -- scream and die. */ - HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, \ - "Attempt to flush a protected entry.") - } + HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry.") + } /* end if */ - /* if the entry exists, set entry_ptr->flush_in_progress = TRUE - * and set entry_ptr->flush_marker = FALSE + /* set entry_ptr->flush_in_progress = TRUE and set + * entry_ptr->flush_marker = FALSE * * in the parallel case, do some sanity checking in passing. */ - if ( entry_ptr != NULL ) - { - /* we have work to do */ - HDassert(entry_ptr->type); - - was_dirty = entry_ptr->is_dirty; /* needed later for logging */ + HDassert(entry_ptr->type); - /* We will set flush_in_progress back to FALSE at the end if the - * entry still exists at that point. - */ - entry_ptr->flush_in_progress = TRUE; + was_dirty = entry_ptr->is_dirty; /* needed later for logging */ - entry_ptr->flush_marker = FALSE; + /* We will set flush_in_progress back to FALSE at the end if the + * entry still exists at that point. + */ + entry_ptr->flush_in_progress = TRUE; + entry_ptr->flush_marker = FALSE; #ifdef H5_HAVE_PARALLEL #ifndef NDEBUG - /* If MPI based VFD is used, do special parallel I/O sanity checks. - * Note that we only do these sanity checks when the clear_only flag - * is not set, and the entry to be flushed is dirty. Don't bother - * otherwise as no file I/O can result. - */ - if(!clear_only && entry_ptr->is_dirty && - H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { - H5P_genplist_t *dxpl; /* Dataset transfer property list */ - unsigned coll_meta; /* Collective metadata write flag */ + /* If MPI based VFD is used, do special parallel I/O sanity checks. + * Note that we only do these sanity checks when the clear_only flag + * is not set, and the entry to be flushed is dirty. Don't bother + * otherwise as no file I/O can result. + */ + if(!clear_only && entry_ptr->is_dirty && H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { + H5P_genplist_t *dxpl; /* Dataset transfer property list */ + unsigned coll_meta; /* Collective metadata write flag */ - /* Get the dataset transfer property list */ - if(NULL == (dxpl = H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list") + /* Get the dataset transfer property list */ + if(NULL == (dxpl = H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list") - /* Get the collective metadata write property */ - if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode") + /* Get the collective metadata write property */ + if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode") - /* Sanity check collective metadata write flag */ - HDassert(coll_meta); - } /* end if */ + /* Sanity check collective metadata write flag */ + HDassert(coll_meta); + } /* end if */ #endif /* NDEBUG */ #endif /* H5_HAVE_PARALLEL */ - } - - if ( ( entry_ptr != NULL ) && ( write_entry ) ) - { - /* serialize the entry if necessary, and then write it to disk. */ + /* serialize the entry if necessary, and then write it to disk. */ + if(write_entry) { unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET; /* The entry is dirty, and we are doing either a flush, @@ -7807,47 +7633,31 @@ H5C__flush_single_entry(const H5F_t * f, * are about to delete the entry from the cache (i.e. on a * flush destroy). */ - HDassert(entry_ptr->is_dirty); #if H5C_DO_SANITY_CHECKS - if ( ( cache_ptr->check_write_permitted == NULL ) && - ( !(cache_ptr->write_permitted) ) ) - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Write when writes are always forbidden!?!?!") + if(cache_ptr->check_write_permitted && !(cache_ptr->write_permitted)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Write when writes are always forbidden!?!?!") #endif /* H5C_DO_SANITY_CHECKS */ - if ( NULL == entry_ptr->image_ptr ) - { + if(NULL == entry_ptr->image_ptr) { size_t image_size; - if ( entry_ptr->compressed ) + if(entry_ptr->compressed) image_size = entry_ptr->compressed_size; else image_size = entry_ptr->size; - HDassert(image_size > 0); - entry_ptr->image_ptr = - H5MM_malloc(image_size + H5C_IMAGE_EXTRA_SPACE); - if ( NULL == entry_ptr->image_ptr) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ - "memory allocation failed for on disk image buffer") - } + if(NULL == (entry_ptr->image_ptr = H5MM_malloc(image_size + H5C_IMAGE_EXTRA_SPACE))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer") #if H5C_DO_MEMORY_SANITY_CHECKS - - HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, - H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); - + HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ - } /* end if */ - if ( ! (entry_ptr->image_up_to_date) ) - { + if(!(entry_ptr->image_up_to_date)) { /* reset cache_ptr->slist_changed so we can detect slist * modifications in the pre_serialize call. */ @@ -7866,28 +7676,21 @@ H5C__flush_single_entry(const H5F_t * f, &new_addr, &new_len, &new_compressed_len, &serialize_flags) < 0 ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to pre-serialize entry") - } + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to pre-serialize entry") /* set cache_ptr->slist_change_in_pre_serialize if the * slist was modified. */ - if ( cache_ptr->slist_changed ) + if(cache_ptr->slist_changed) cache_ptr->slist_change_in_pre_serialize = TRUE; /* Check for any flags set in the pre-serialize callback */ - if ( serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET ) - { + if(serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) { /* Check for unexpected flags from serialize callback */ - if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | - H5C__SERIALIZE_MOVED_FLAG | - H5C__SERIALIZE_COMPRESSED_FLAG)) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unknown serialize flag(s)") - } + if(serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | + H5C__SERIALIZE_MOVED_FLAG | + H5C__SERIALIZE_COMPRESSED_FLAG)) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unknown serialize flag(s)") #ifdef H5_HAVE_PARALLEL /* In the parallel case, resizes and moves in * the serialize operation can cause problems. @@ -7915,10 +7718,8 @@ H5C__flush_single_entry(const H5F_t * f, * If that ceases to be the case, further * tests will be necessary. */ - if ( cache_ptr->aux_ptr != NULL ) - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "resize/move in serialize occured in parallel case.") + if(cache_ptr->aux_ptr != NULL) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "resize/move in serialize occured in parallel case.") #endif /* H5_HAVE_PARALLEL */ /* Resize the buffer if required */ @@ -7929,44 +7730,28 @@ H5C__flush_single_entry(const H5F_t * f, { size_t new_image_size; - if ( entry_ptr->compressed ) + if(entry_ptr->compressed) new_image_size = new_compressed_len; else new_image_size = new_len; - HDassert(new_image_size > 0); /* Release the current image */ - if ( entry_ptr->image_ptr ) - { + if(entry_ptr->image_ptr) entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); - } /* Allocate a new image buffer */ - entry_ptr->image_ptr = - H5MM_malloc(new_image_size + H5C_IMAGE_EXTRA_SPACE); - - if ( NULL == entry_ptr->image_ptr ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ - "memory allocation failed for on disk image buffer") - } - + if(NULL == (entry_ptr->image_ptr = H5MM_malloc(new_image_size + H5C_IMAGE_EXTRA_SPACE))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer") #if H5C_DO_MEMORY_SANITY_CHECKS - - HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + new_image_size, - H5C_IMAGE_SANITY_VALUE, - H5C_IMAGE_EXTRA_SPACE); - + HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + new_image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ - } /* end if */ /* If required, update the entry and the cache data structures * for a resize. */ - if ( serialize_flags & H5C__SERIALIZE_RESIZED_FLAG ) { - + if(serialize_flags & H5C__SERIALIZE_RESIZED_FLAG) { H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, \ entry_ptr, new_len) @@ -8005,8 +7790,7 @@ H5C__flush_single_entry(const H5F_t * f, /* If required, udate the entry and the cache data structures * for a move */ - if(serialize_flags & H5C__SERIALIZE_MOVED_FLAG) - { + if(serialize_flags & H5C__SERIALIZE_MOVED_FLAG) { #if H5C_DO_SANITY_CHECKS int64_t saved_slist_len_increase; int64_t saved_slist_size_increase; @@ -8014,8 +7798,7 @@ H5C__flush_single_entry(const H5F_t * f, H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) - if ( entry_ptr->addr == old_addr ) - { + if(entry_ptr->addr == old_addr) { /* we must update cache data structures for the * change in address. */ @@ -8049,12 +7832,10 @@ H5C__flush_single_entry(const H5F_t * f, #endif /* H5C_DO_SANITY_CHECKS */ } else /* move is alread done for us -- just do sanity checks */ - { HDassert(entry_ptr->addr == new_addr); - } } /* end if */ - if ( serialize_flags & H5C__SERIALIZE_COMPRESSED_FLAG ) { + if(serialize_flags & H5C__SERIALIZE_COMPRESSED_FLAG) { /* just save the new compressed entry size in * entry_ptr->compressed_size. We don't need to * do more, as compressed size is only used for I/O. @@ -8068,7 +7849,7 @@ H5C__flush_single_entry(const H5F_t * f, { size_t image_len; - if ( entry_ptr->compressed ) + if(entry_ptr->compressed) image_len = entry_ptr->compressed_size; else image_len = entry_ptr->size; @@ -8079,27 +7860,19 @@ H5C__flush_single_entry(const H5F_t * f, cache_ptr->slist_changed = FALSE; - if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, - image_len, - (void *)entry_ptr) < 0 ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to serialize entry") - } + if(entry_ptr->type->serialize(f, entry_ptr->image_ptr, + image_len, (void *)entry_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry") /* set cache_ptr->slist_change_in_serialize if the * slist was modified. */ - if ( cache_ptr->slist_changed ) + if(cache_ptr->slist_changed) cache_ptr->slist_change_in_pre_serialize = TRUE; #if H5C_DO_MEMORY_SANITY_CHECKS - - HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + - image_len, - H5C_IMAGE_SANITY_VALUE, - H5C_IMAGE_EXTRA_SPACE)); - + HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + image_len, + H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE)); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ entry_ptr->image_up_to_date = TRUE; @@ -8122,34 +7895,23 @@ H5C__flush_single_entry(const H5F_t * f, */ size_t image_size; - if ( entry_ptr->compressed ) + if(entry_ptr->compressed) image_size = entry_ptr->compressed_size; else image_size = entry_ptr->size; - if ( ( H5F_block_write(f, entry_ptr->type->mem_type, - entry_ptr->addr, - image_size, dxpl_id, - entry_ptr->image_ptr) < 0 ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "Can't write image to file.") - } + if(H5F_block_write(f, entry_ptr->type->mem_type, entry_ptr->addr, + image_size, dxpl_id, entry_ptr->image_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't write image to file.") } /* if the entry has a notify callback, notify it that we have * just flushed the entry. */ - - if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, - entry_ptr) < 0 ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ - "can't notify client of entry flush") - } - } /* if ( ( entry_ptr != NULL ) && ( write_entry ) ) */ - + if(entry_ptr->type->notify && + (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, entry_ptr) < 0 ) + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client of entry flush") + } /* if ( write_entry ) */ /* At this point, all pre-serialize and serialize calls have been * made if it was appropriate to make them. Similarly, the entry @@ -8159,291 +7921,210 @@ H5C__flush_single_entry(const H5F_t * f, * flush. */ - if ( entry_ptr != NULL ) - { - /* start by updating the statistics */ - - if ( clear_only ) { - - /* only log a clear if the entry was dirty */ - if ( was_dirty ) { + /* start by updating the statistics */ + if(clear_only) { + /* only log a clear if the entry was dirty */ + if(was_dirty) + H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) + } else if(write_entry) { + HDassert(was_dirty); - H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) - } - } else if ( write_entry ) { - - HDassert( was_dirty ); - - /* only log a flush if we actually wrote to disk */ - H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) - - } + /* only log a flush if we actually wrote to disk */ + H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) + } - if ( destroy ) - { - if ( take_ownership ) - { - HDassert(!destroy_entry); - } - else - { - HDassert(destroy_entry); - } + if(destroy) { + if(take_ownership) + HDassert(!destroy_entry); + else + HDassert(destroy_entry); - H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, \ - take_ownership) - } + H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) + } - /* If the entry's type has a 'notify' callback and the entry is about - * to be removed from the cache, send a 'before eviction' notice while - * the entry is still fully integrated in the cache. + /* If the entry's type has a 'notify' callback and the entry is about + * to be removed from the cache, send a 'before eviction' notice while + * the entry is still fully integrated in the cache. + */ + if(destroy) + if(entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict") + + /* Update the cache internal data structures. */ + if(destroy) { + /* Update the cache internal data structures as appropriate + * for a destroy. Specifically: + * + * 1) Delete it from the index + * + * 2) Delete it from the skip list if requested. + * + * 3) Update the replacement policy for eviction + * + * Finally, if the destroy_entry flag is set, discard the + * entry. */ - if ( destroy ) { - - if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, - entry_ptr) < 0 ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ - "can't notify client about entry to evict") - } - } /* end if */ + H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) - /* Update the cache internal data structures. */ - if ( destroy ) - { - /* Update the cache internal data structures as appropriate - * for a destroy. Specifically: - * - * 1) Delete it from the index - * - * 2) Delete it from the skip list if requested. - * - * 3) Update the replacement policy for eviction - * - * Finally, if the destroy_entry flag is set, discard the - * entry. - */ - - H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) - - if ( ( entry_ptr->in_slist ) && - ( del_entry_from_slist_on_destroy ) ) { - - H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) - } - - H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) - } - else - { - HDassert(clear_only || write_entry); - HDassert(entry_ptr->is_dirty); - HDassert(entry_ptr->in_slist); - - /* We are either doing a flush or a clear. - * - * A clear and a flush are the same from the point of - * view of the replacement policy and the slist. - * Hence no differentiation between them. - * - * JRM -- 7/7/07 - */ - - H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL) - + if(entry_ptr->in_slist && del_from_slist_on_destroy) H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) + H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) + } + else { + HDassert(clear_only || write_entry); + HDassert(entry_ptr->is_dirty); + HDassert(entry_ptr->in_slist); - /* mark the entry as clean and update the index for - * entry clean. Also, call the clear callback - * if defined. - */ - - entry_ptr->is_dirty = FALSE; + /* We are either doing a flush or a clear. + * + * A clear and a flush are the same from the point of + * view of the replacement policy and the slist. + * Hence no differentiation between them. + * + * JRM -- 7/7/07 + */ - H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr); + H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL) - if ( ( entry_ptr->type->clear != NULL ) && - ( (entry_ptr->type->clear)(f, (void *)entry_ptr, FALSE) ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to clear entry") - } - } + H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) - /* reset the flush_in progress flag */ + /* mark the entry as clean and update the index for + * entry clean. Also, call the clear callback + * if defined. + */ + entry_ptr->is_dirty = FALSE; - entry_ptr->flush_in_progress = FALSE; + H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr); - } /* end if */ + if(entry_ptr->type->clear && (entry_ptr->type->clear)(f, (void *)entry_ptr, FALSE) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear entry") + } + /* reset the flush_in progress flag */ + entry_ptr->flush_in_progress = FALSE; /* Internal cache data structures should now be up to date, and * consistant with the status of the entry. * * Now discard the entry if appropriate. */ - if ( entry_ptr != NULL ) - { - if ( destroy ) - { - /* start by freeing the buffer for the on disk image */ - if(entry_ptr->image_ptr != NULL) - entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); - - /* Check whether we should free the space in the file that - * the entry occupies - */ - if ( free_file_space ) - { + if(destroy) { + /* start by freeing the buffer for the on disk image */ + if(entry_ptr->image_ptr != NULL) + entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr); - size_t fsf_size; + /* Check whether we should free the space in the file that + * the entry occupies + */ + if(free_file_space) { + size_t fsf_size; - /* Sanity checks */ - HDassert(H5F_addr_defined(entry_ptr->addr)); - HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr)); + /* Sanity checks */ + HDassert(H5F_addr_defined(entry_ptr->addr)); + HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr)); #ifndef NDEBUG { - hbool_t curr_compressed = FALSE; - size_t curr_len; - size_t curr_compressed_len = 0; - - /* Get the actual image size for the thing again */ - entry_ptr->type->image_len((void *)entry_ptr, &curr_len, &curr_compressed, &curr_compressed_len); - HDassert(curr_len == entry_ptr->size); - HDassert(curr_compressed == entry_ptr->compressed); - HDassert(curr_compressed_len == entry_ptr->compressed_size); + hbool_t curr_compressed = FALSE; + size_t curr_len; + size_t curr_compressed_len = 0; + + /* Get the actual image size for the thing again */ + entry_ptr->type->image_len((void *)entry_ptr, &curr_len, &curr_compressed, &curr_compressed_len); + HDassert(curr_len == entry_ptr->size); + HDassert(curr_compressed == entry_ptr->compressed); + HDassert(curr_compressed_len == entry_ptr->compressed_size); } #endif /* NDEBUG */ - /* if the file space free size callback is defined, use - * it to get the size of the block of file space to free. - * Otherwise use entry_ptr->compressed_size if - * entry_ptr->compressed == TRUE, and entry_ptr->size - * if entry_ptr->compressed == FALSE. - */ - if ( entry_ptr->type->fsf_size ) - { - if ( (entry_ptr->type->fsf_size)((void *)entry_ptr, - &fsf_size) < 0 ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \ - "unable to get file space free size") - } - } - else if ( entry_ptr->compressed ) /* use compressed size */ - { - fsf_size = entry_ptr->compressed_size; - } - else /* no file space free size callback -- use entry size */ - { - fsf_size = entry_ptr->size; - } - - /* Release the space on disk */ - if ( H5MF_xfree(f, entry_ptr->type->mem_type, dxpl_id, - entry_ptr->addr, (hsize_t)fsf_size) < 0) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \ - "unable to free file space for cache entry") - } - } /* end if ( free_file_space ) */ - - - /* Reset the pointer to the cache the entry is within. -QAK */ - entry_ptr->cache_ptr = NULL; - - /* increment entries_removed_counter and set - * last_entry_removed_ptr. As we are likely abuut to - * free the entry, recall that last_entry_removed_ptr - * must NEVER be dereferenced. - * - * Recall that these fields are maintained to allow functions - * that perform scans of lists of entries to detect the - * unexpected removal of entries (via expunge, eviction, - * or take ownership at present), so that they can re-start - * their scans if necessary. + /* if the file space free size callback is defined, use + * it to get the size of the block of file space to free. + * Otherwise use entry_ptr->compressed_size if + * entry_ptr->compressed == TRUE, and entry_ptr->size + * if entry_ptr->compressed == FALSE. */ - cache_ptr->last_entry_removed_ptr++; - cache_ptr->last_entry_removed_ptr = entry_ptr; - - /* Check for actually destroying the entry in memory */ - /* (As opposed to taking ownership of it) */ - if ( destroy_entry ) - { - /* if the entry is dirty and it has a clear callback, - * call this callback now. Since this callback exists, - * it follows tht the client maintains its own dirty bits, - * which must be cleared before the entry is freed to avoid - * sanity check failures. Also clear the dirty flag for - * the same reason. - */ - - if ( entry_ptr->is_dirty ) { - - entry_ptr->is_dirty = FALSE; - - if ( ( entry_ptr->type->clear != NULL ) && - ( (entry_ptr->type->clear)(f, (void *)entry_ptr, TRUE) ) ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to clear entry") - } - } - - /* we are about to discard the in core representation -- - * set the magic field to bad magic so we can detect a - * freed entry if we see one. - */ - entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; - - - /* verify that the image has been freed */ - HDassert( entry_ptr->image_ptr == NULL ); - - if ( entry_ptr->type->free_icr((void *)entry_ptr) < 0 ) - { - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "free_icr callback failed.") - } - } - else - { - HDassert(take_ownership); + if(entry_ptr->type->fsf_size) { + if((entry_ptr->type->fsf_size)((void *)entry_ptr, &fsf_size) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to get file space free size") + } /* end if */ + else if(entry_ptr->compressed) /* use compressed size */ + fsf_size = entry_ptr->compressed_size; + else /* no file space free size callback -- use entry size */ + fsf_size = entry_ptr->size; + + /* Release the space on disk */ + if(H5MF_xfree(f, entry_ptr->type->mem_type, dxpl_id, entry_ptr->addr, (hsize_t)fsf_size) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to free file space for cache entry") + } /* end if ( free_file_space ) */ + + /* Reset the pointer to the cache the entry is within. -QAK */ + entry_ptr->cache_ptr = NULL; + + /* increment entries_removed_counter and set + * last_entry_removed_ptr. As we are likely abuut to + * free the entry, recall that last_entry_removed_ptr + * must NEVER be dereferenced. + * + * Recall that these fields are maintained to allow functions + * that perform scans of lists of entries to detect the + * unexpected removal of entries (via expunge, eviction, + * or take ownership at present), so that they can re-start + * their scans if necessary. + */ + cache_ptr->last_entry_removed_ptr++; + cache_ptr->last_entry_removed_ptr = entry_ptr; + + /* Check for actually destroying the entry in memory */ + /* (As opposed to taking ownership of it) */ + if(destroy_entry) { + /* if the entry is dirty and it has a clear callback, + * call this callback now. Since this callback exists, + * it follows tht the client maintains its own dirty bits, + * which must be cleared before the entry is freed to avoid + * sanity check failures. Also clear the dirty flag for + * the same reason. + */ + if(entry_ptr->is_dirty) { + entry_ptr->is_dirty = FALSE; - /* client is taking ownership of the entry. - * set bad magic here too so the cache will choke - * unless the entry is re-inserted properly - */ - entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; + if(entry_ptr->type->clear && (entry_ptr->type->clear)(f, (void *)entry_ptr, TRUE) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear entry") } - } /* if ( destroy ) */ - } - if ( entry_ptr != NULL ) - { - if ( cache_ptr->log_flush ) { + /* we are about to discard the in core representation -- + * set the magic field to bad magic so we can detect a + * freed entry if we see one. + */ + entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; - status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, flags); + /* verify that the image has been freed */ + HDassert(entry_ptr->image_ptr == NULL); - if ( status < 0 ) { + if(entry_ptr->type->free_icr((void *)entry_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "free_icr callback failed.") + } + else { + HDassert(take_ownership); - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "log_flush callback failed.") - } + /* client is taking ownership of the entry. + * set bad magic here too so the cache will choke + * unless the entry is re-inserted properly + */ + entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC; } - } + } /* if (destroy) */ -done: + if(cache_ptr->log_flush) + if((cache_ptr->log_flush)(cache_ptr, entry_ptr->addr, was_dirty, flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed.") +done: HDassert( ( ret_value != SUCCEED ) || ( destroy_entry ) || - ( ( entry_ptr ) && ( ! entry_ptr->flush_in_progress ) ) ); + ( ! entry_ptr->flush_in_progress ) ); HDassert( ( ret_value != SUCCEED ) || ( destroy_entry ) || - ( take_ownership ) || - ( ( entry_ptr ) && ( ! entry_ptr->is_dirty ) ) ); + ( take_ownership ) || ( ! entry_ptr->is_dirty ) ); FUNC_LEAVE_NOAPI(ret_value) } /* H5C__flush_single_entry() */ @@ -8959,7 +8640,6 @@ H5C_make_space_in_cache(H5F_t * f, hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; - herr_t result; #if H5C_COLLECT_CACHE_STATS int32_t clean_entries_skipped = 0; int32_t total_entries_scanned = 0; @@ -9056,12 +8736,8 @@ H5C_make_space_in_cache(H5F_t * f, cache_ptr->entries_removed_counter = 0; cache_ptr->last_entry_removed_ptr = NULL; - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__NO_FLAGS_SET, - FALSE, - NULL); + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__NO_FLAGS_SET, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") if ( ( cache_ptr->entries_removed_counter > 1 ) || ( cache_ptr->last_entry_removed_ptr == prev_ptr ) ) @@ -9075,25 +8751,15 @@ H5C_make_space_in_cache(H5F_t * f, cache_ptr->entries_scanned_to_make_space++; #endif /* H5C_COLLECT_CACHE_STATS */ - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__FLUSH_INVALIDATE_FLAG, - TRUE, - NULL); + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") } else { - - /* We have enough space so don't flush clean entry. - * Set result to SUCCEED to avoid triggering the error - * code below. - */ + /* We have enough space so don't flush clean entry. */ #if H5C_COLLECT_CACHE_STATS clean_entries_skipped++; #endif /* H5C_COLLECT_CACHE_STATS */ didnt_flush_entry = TRUE; - result = SUCCEED; - } #if H5C_COLLECT_CACHE_STATS @@ -9103,17 +8769,9 @@ H5C_make_space_in_cache(H5F_t * f, } else { /* Skip epoch markers and entries that are in the process - * of being flushed. Set result to SUCCEED to avoid - * triggering the error code below. + * of being flushed. */ didnt_flush_entry = TRUE; - result = SUCCEED; - } - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry") } if ( prev_ptr != NULL ) { @@ -9230,18 +8888,8 @@ H5C_make_space_in_cache(H5F_t * f, prev_ptr = entry_ptr->aux_prev; - result = H5C__flush_single_entry(f, - dxpl_id, - entry_ptr->addr, - H5C__FLUSH_INVALIDATE_FLAG, - TRUE, - NULL); - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry") - } + if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") /* we are scanning the clean LRU, so the serialize function * will not be called on any entry -- thus there is no diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 3abaf8b..ec34285 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -433,12 +433,7 @@ H5C_apply_candidate_list(H5F_t * f, * will not call either the pre_serialize or serialize callbacks. */ - if(H5C__flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0) + if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end if */ @@ -483,12 +478,7 @@ H5C_apply_candidate_list(H5F_t * f, cache_ptr->entries_removed_counter = 0; cache_ptr->last_entry_removed_ptr = NULL; - if(H5C__flush_single_entry(f, - dxpl_id, - flush_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) + if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.") if ( ( cache_ptr->entries_removed_counter > 1 ) || @@ -647,13 +637,8 @@ H5C_apply_candidate_list(H5F_t * f, (long long)clear_ptr->addr); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - if(H5C__flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") + if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end else-if */ /* Else, if this process needs to independently flush this entry. */ @@ -668,12 +653,7 @@ H5C_apply_candidate_list(H5F_t * f, (long long)flush_ptr->addr); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - if(H5C__flush_single_entry(f, - dxpl_id, - flush_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) + if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") } /* end else-if */ } /* end if */ @@ -714,14 +694,8 @@ H5C_apply_candidate_list(H5F_t * f, entries_flushed++; } /* end if */ - if(H5C__flush_single_entry(f, - dxpl_id, - delayed_ptr->addr, - H5C__NO_FLAGS_SET, - TRUE, - NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "Can't flush entry collectively.") + if(H5C__flush_single_entry(f, dxpl_id, delayed_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry collectively.") entries_flushed_collectively++; entries_flushed_or_cleared_last++; @@ -1169,15 +1143,8 @@ H5C_mark_entries_as_clean(H5F_t * f, entry_ptr = entry_ptr->prev; entries_cleared++; - if ( H5C__flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0 ) { - + if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } } else { entry_ptr = entry_ptr->prev; @@ -1204,15 +1171,8 @@ H5C_mark_entries_as_clean(H5F_t * f, entry_ptr = entry_ptr->next; entries_cleared++; - if ( H5C__flush_single_entry(f, - dxpl_id, - clear_ptr->addr, - H5C__FLUSH_CLEAR_ONLY_FLAG, - TRUE, - NULL) < 0 ) { - + if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.") - } } else { entry_ptr = entry_ptr->next; diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 6d75222..0dad4bb 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -3770,8 +3770,7 @@ struct H5C_t { /* Package Private Prototypes */ /******************************/ H5_DLL herr_t H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, - haddr_t addr, unsigned flags, hbool_t del_entry_from_slist_on_destroy, - int64_t *entry_size_change_ptr); + H5C_cache_entry_t *entry_ptr, unsigned flags, int64_t *entry_size_change_ptr); #endif /* _H5Cpkg_H */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 2dc611d..57cbc2d 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -236,6 +236,7 @@ * H5C__FLUSH_CLEAR_ONLY_FLAG * H5C__FLUSH_MARKED_ENTRIES_FLAG * H5C__TAKE_OWNERSHIP_FLAG + * H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG */ #define H5C__NO_FLAGS_SET 0x0000 #define H5C__SET_FLUSH_MARKER_FLAG 0x0001 @@ -252,6 +253,7 @@ #define H5C__TAKE_OWNERSHIP_FLAG 0x1000 #define H5C__FLUSH_LAST_FLAG 0x2000 #define H5C__FLUSH_COLLECTIVELY_FLAG 0x4000 +#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x8000 /****************************/ diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index cf14770..8cc8299 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -470,7 +470,7 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len, hbool_t * *image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock); /* Set *compressed_ptr to FALSE unconditionally */ - *compressed_ptr; + *compressed_ptr = FALSE; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5F__cache_superblock_image_len() */ diff --git a/test/cache.c b/test/cache.c index 8e8f36a..26f7250 100644 --- a/test/cache.c +++ b/test/cache.c @@ -34878,8 +34878,8 @@ check_stats__smoke_check_1(H5F_t * file_ptr) if ( ( cache_ptr->total_ht_insertions != 33 ) || ( cache_ptr->total_ht_deletions != 1 ) || - ( cache_ptr->successful_ht_searches != 65 ) || - ( cache_ptr->total_successful_ht_search_depth != 195 ) || + ( cache_ptr->successful_ht_searches != 32 ) || + ( cache_ptr->total_successful_ht_search_depth != 96 ) || ( cache_ptr->failed_ht_searches != 33 ) || ( cache_ptr->total_failed_ht_search_depth != 52 ) || ( cache_ptr->max_index_len != 32 ) || @@ -34989,8 +34989,8 @@ check_stats__smoke_check_1(H5F_t * file_ptr) if ( ( cache_ptr->total_ht_insertions != 33 ) || ( cache_ptr->total_ht_deletions != 33 ) || - ( cache_ptr->successful_ht_searches != 98 ) || - ( cache_ptr->total_successful_ht_search_depth != 198 ) || + ( cache_ptr->successful_ht_searches != 33 ) || + ( cache_ptr->total_successful_ht_search_depth != 99 ) || ( cache_ptr->failed_ht_searches != 33 ) || ( cache_ptr->total_failed_ht_search_depth != 52 ) || ( cache_ptr->max_index_len != 32 ) || -- cgit v0.12 From ad37464819604c9a7fab98ceff91a21e053eda27 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 29 Jun 2015 15:22:30 -0500 Subject: [svn-r27296] Description: Correct error with braces around macro (in production builds), also clean up a few warnings. Tested on: MacOSX/64 10.10.3 (amazon) w/serial, parallel & production Linux/32 2.6 (jam) w/serial & parallel --- src/H5AC.c | 2 +- src/H5C.c | 23 +++++++++++------------ src/H5Cpkg.h | 6 +++--- src/H5Cprivate.h | 4 ++-- test/cache.c | 27 +++++++++------------------ test/cache_common.c | 2 +- testpar/t_cache.c | 2 +- 7 files changed, 28 insertions(+), 38 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index e6218d1..ff0ef51 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -1395,7 +1395,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, } /* end if */ #endif /* H5_HAVE_PARALLEL */ - if(H5C_unprotect(f, dxpl_id, type, addr, thing, flags) < 0) + if(H5C_unprotect(f, dxpl_id, addr, thing, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed.") #ifdef H5_HAVE_PARALLEL diff --git a/src/H5C.c b/src/H5C.c index e29da86..a60e519 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -171,8 +171,7 @@ static herr_t H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag); static herr_t H5C_flush_marked_entries(H5F_t * f, - hid_t dxpl_id, - H5C_t * cache_ptr); + hid_t dxpl_id); #if H5C_DO_TAGGING_SANITY_CHECKS static herr_t H5C_verify_tag(int id, haddr_t tag); @@ -2881,8 +2880,6 @@ H5C_protect(H5F_t * f, size_t empty_space; void * thing; H5C_cache_entry_t * entry_ptr; - haddr_t tag = HADDR_UNDEF; - H5P_genplist_t *dxpl; /* dataset transfer property list */ void * ret_value; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -2924,6 +2921,10 @@ H5C_protect(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type") #if H5C_DO_TAGGING_SANITY_CHECKS +{ + H5P_genplist_t *dxpl; /* dataset transfer property list */ + haddr_t tag = HADDR_UNDEF; + /* The entry is already in the cache, but make sure that the tag value being passed in via dxpl is still legal. This will ensure that had the entry NOT been in the cache, tagging was still set up correctly @@ -2946,6 +2947,7 @@ H5C_protect(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "tag verification failed"); } /* end if */ +} #endif hit = TRUE; @@ -4696,7 +4698,6 @@ done: herr_t H5C_unprotect(H5F_t * f, hid_t dxpl_id, - const H5C_class_t * type, haddr_t addr, void * thing, unsigned int flags) @@ -4734,7 +4735,6 @@ H5C_unprotect(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( type ); HDassert( H5F_addr_defined(addr) ); HDassert( thing ); HDassert( ! ( pin_entry && unpin_entry ) ); @@ -4745,7 +4745,6 @@ H5C_unprotect(H5F_t * f, entry_ptr = (H5C_cache_entry_t *)thing; HDassert( entry_ptr->addr == addr ); - HDassert( entry_ptr->type == type ); /* also set the dirtied variable if the dirtied field is set in * the entry. @@ -7924,8 +7923,9 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_ /* start by updating the statistics */ if(clear_only) { /* only log a clear if the entry was dirty */ - if(was_dirty) + if(was_dirty) { H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) + } /* end if */ } else if(write_entry) { HDassert(was_dirty); @@ -9687,7 +9687,7 @@ H5C_flush_tagged_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr, haddr_t ta HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries") /* Flush all marked entries */ - if(H5C_flush_marked_entries(f, dxpl_id, cache_ptr) < 0) + if(H5C_flush_marked_entries(f, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries") done: @@ -9760,7 +9760,7 @@ H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag) *------------------------------------------------------------------------- */ static herr_t -H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr) +H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id) { herr_t ret_value = SUCCEED; @@ -9768,8 +9768,7 @@ H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr) /* Assertions */ HDassert(0); /* This function is not yet used. We shouldn't be in here yet. */ - HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(f != NULL); /* Flush all marked entries */ if(H5C_flush_cache(f, dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 0dad4bb..814387b 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -595,7 +595,7 @@ if ( ( (entry_ptr) == NULL ) || \ #define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ { \ (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->is_pinned ) \ + if((entry_ptr)->is_pinned) \ (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ ((entry_ptr)->clears)++; \ } @@ -709,9 +709,9 @@ if ( ( (entry_ptr) == NULL ) || \ #define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ { \ - if ( (entry_ptr)->is_pinned ) \ - (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ (((cache_ptr)->clears)[(entry_ptr)->type->id])++; \ + if((entry_ptr)->is_pinned) \ + (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \ } #define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 57cbc2d..5b152c8 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1905,8 +1905,8 @@ H5_DLL void H5C_stats__reset(H5C_t *cache_ptr); H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name); H5_DLL herr_t H5C_unpin_entry(void *thing); H5_DLL herr_t H5C_destroy_flush_dependency(void *parent_thing, void *child_thing); -H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, - haddr_t addr, void *thing, unsigned int flags); +H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *thing, + unsigned int flags); H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests); H5_DLL herr_t H5C_ignore_tags(H5C_t *cache_ptr); diff --git a/test/cache.c b/test/cache.c index 26f7250..38adbda 100644 --- a/test/cache.c +++ b/test/cache.c @@ -14207,8 +14207,7 @@ check_resize_entry(void) } else { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14293,8 +14292,7 @@ check_resize_entry(void) } else { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14654,8 +14652,7 @@ check_resize_entry(void) } else { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -14742,8 +14739,7 @@ check_resize_entry(void) } else { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result < 0 ) { @@ -16246,8 +16242,7 @@ check_double_pin_err(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, - (void *)entry_ptr, H5C__PIN_ENTRY_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__PIN_ENTRY_FLAG); if ( result > 0 ) { @@ -16331,8 +16326,7 @@ check_double_unpin_err(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, - (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG); if ( result > 0 ) { @@ -16612,8 +16606,7 @@ check_double_unprotect_err(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, - (void *)entry_ptr, H5C__NO_FLAGS_SET); + entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET); if ( result > 0 ) { @@ -16989,8 +16982,7 @@ check_unprotect_ro_dirty_err(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result >= 0 ) { @@ -17033,8 +17025,7 @@ check_unprotect_ro_dirty_err(void) if ( pass ) { result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[0]), entry_ptr->addr, - (void *)entry_ptr, H5C__DIRTIED_FLAG); + entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG); if ( result > 0 ) { diff --git a/test/cache_common.c b/test/cache_common.c index 8ccd7e3..f3da908 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -3959,7 +3959,7 @@ unprotect_entry(H5F_t * file_ptr, entry_ptr->is_dirty = TRUE; result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags); + entry_ptr->addr, (void *)entry_ptr, flags); if ( ( result < 0 ) || ( ( entry_ptr->header.is_protected ) && diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 0988206..bb1ccc6 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -4996,7 +4996,7 @@ unlock_entry(H5F_t * file_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: error in H5C_unprotect().\n", + HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, FUNC); } } else { -- cgit v0.12 From 4b51823ed4754175529b642cd0aa4d022dc01632 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 29 Jun 2015 16:54:25 -0500 Subject: [svn-r27297] changed from using sed to perl --- configure | 126 +++++++++++++++++++++++++++++++++---------------------- m4/aclocal_fc.m4 | 88 ++++++++++++++++++++------------------ 2 files changed, 122 insertions(+), 92 deletions(-) diff --git a/configure b/configure index 471901e..3a64492 100755 --- a/configure +++ b/configure @@ -7257,31 +7257,31 @@ else cat > conftest.$ac_ext <<_ACEOF - PROGRAM main + PROGRAM main IMPLICIT NONE INTEGER :: ik, k, lastkind, max_decimal_prec INTEGER :: num_rkinds, num_ikinds num_ikinds = 0 lastkind=SELECTED_INT_KIND(1) OPEN(8, FILE='pac_fconftest.out', form='formatted') - WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + ! Find integer KINDs DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN num_ikinds = num_ikinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1) THEN num_ikinds = num_ikinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'B ' + WRITE(8,'()') ENDIF - WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs + ! Find real KINDs num_rkinds = 0 lastkind=SELECTED_REAL_KIND(1) max_decimal_prec = 1 @@ -7291,21 +7291,20 @@ else num_rkinds = num_rkinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1)THEN num_rkinds = num_rkinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'D' + WRITE(8,'()') ENDIF - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' - - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b' - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d' + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds END @@ -7316,21 +7315,27 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - tmp="`cat pac_fconftest.out`" - pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" - pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" - PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" cat >>confdefs.h <<_ACEOF #define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION _ACEOF - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF cat >>confdefs.h <<_ACEOF @@ -7339,6 +7344,11 @@ _ACEOF cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF #define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND _ACEOF @@ -7353,6 +7363,7 @@ $as_echo_n "checking for Fortran REAL KINDs... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 $as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 $as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else @@ -7421,13 +7432,14 @@ else if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" - else + PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" + + else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi @@ -7466,31 +7478,31 @@ else cat > conftest.$ac_ext <<_ACEOF - PROGRAM main + PROGRAM main IMPLICIT NONE INTEGER :: ik, k, lastkind, max_decimal_prec INTEGER :: num_rkinds, num_ikinds num_ikinds = 0 lastkind=SELECTED_INT_KIND(1) OPEN(8, FILE='pac_fconftest.out', form='formatted') - WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + ! Find integer KINDs DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN num_ikinds = num_ikinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1) THEN num_ikinds = num_ikinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'B ' + WRITE(8,'()') ENDIF - WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs + ! Find real KINDs num_rkinds = 0 lastkind=SELECTED_REAL_KIND(1) max_decimal_prec = 1 @@ -7500,21 +7512,20 @@ else num_rkinds = num_rkinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1)THEN num_rkinds = num_rkinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'D' + WRITE(8,'()') ENDIF - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' - - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b' - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d' + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds END @@ -7525,21 +7536,27 @@ if ac_fn_fc_try_run "$LINENO"; then : if test -s pac_fconftest.out ; then - tmp="`cat pac_fconftest.out`" - pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" - pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" - PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" cat >>confdefs.h <<_ACEOF #define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION _ACEOF - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF cat >>confdefs.h <<_ACEOF @@ -7548,6 +7565,11 @@ _ACEOF cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF #define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND _ACEOF @@ -7562,6 +7584,7 @@ $as_echo_n "checking for Fortran REAL KINDs... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 $as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 $as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else @@ -7601,7 +7624,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu pack_int_sizeof="" rm -f pac_fconftest.out -for kind in $pac_validIntKinds; do + +for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do cat > conftest.$ac_ext <<_ACEOF @@ -7663,7 +7687,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu pack_real_sizeof="" rm -f pac_fconftest.out -for kind in $pac_validRealKinds; do +for kind in `echo $pac_validRealKinds| sed -e 's/,/ /g'`; do cat > conftest.$ac_ext <<_ACEOF diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 0bb66a1..09a87e2 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -324,31 +324,31 @@ AC_LANG_PUSH([Fortran]) rm -f pac_fconftest.out AC_RUN_IFELSE([ AC_LANG_SOURCE([ - PROGRAM main + PROGRAM main IMPLICIT NONE INTEGER :: ik, k, lastkind, max_decimal_prec INTEGER :: num_rkinds, num_ikinds num_ikinds = 0 lastkind=SELECTED_INT_KIND(1) OPEN(8, FILE='pac_fconftest.out', form='formatted') - WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs + ! Find integer KINDs DO ik=2,36 k = SELECTED_INT_KIND(ik) IF (k .NE. lastkind) THEN num_ikinds = num_ikinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1) THEN num_ikinds = num_ikinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B ' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'B ' + WRITE(8,'()') ENDIF - WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs + ! Find real KINDs num_rkinds = 0 lastkind=SELECTED_REAL_KIND(1) max_decimal_prec = 1 @@ -358,52 +358,49 @@ AC_RUN_IFELSE([ num_rkinds = num_rkinds + 1 WRITE(8,'(I0)',ADVANCE='NO') lastkind lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' ' + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' max_decimal_prec = ik ENDIF IF (k .LE. 0) EXIT ENDDO IF (lastkind.NE.-1)THEN num_rkinds = num_rkinds + 1 - WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D' + WRITE(8,'(I0)') lastkind ELSE - WRITE(8,'(A)',ADVANCE='NO') 'D' + WRITE(8,'()') ENDIF - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F' - - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b' - WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d' + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds END ]) ],[ if test -s pac_fconftest.out ; then - dnl The output from the above program will be something like - dnl A1 4 8 16B C4 8 10D E30F a#b c#d where: - dnl - valid integer kinds are the numbers between A and B - dnl - number of valid integer kinds are the numbers between a and b - dnl - valid real kinds are the numbers between A and B - dnl - number of valid real kinds are the numbers between c and d - dnl - max decimal precision for reals is the number between E and F - - tmp="`cat pac_fconftest.out`" - pac_validIntKinds="`echo $tmp | sed -e 's/.*A\(.*\)B.*/\1/'`" - pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`" - PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`" + dnl The output from the above program will be: + dnl -- LINE 1 -- valid integer kinds (comma seperated list) + dnl -- LINE 2 -- valid real kinds (comma seperated list) + dnl -- LINE 3 -- max decimal precision for reals + dnl -- LINE 4 -- number of valid integer kinds + dnl -- LINE 5 -- number of valid real kinds + + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - dnl H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo $tmp | sed -e 's/.*c\(.*\)d.*/\1/'`" - dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds | sed -e 's/ /,/g'`/)" - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - dnl AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) - dnl AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs]) AC_MSG_CHECKING([for Fortran INTEGER KINDs]) @@ -411,6 +408,7 @@ AC_RUN_IFELSE([ AC_MSG_CHECKING([for Fortran REAL KINDs]) AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) + AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) else AC_MSG_RESULT([Error]) @@ -435,7 +433,8 @@ AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) AC_LANG_PUSH([Fortran]) pack_int_sizeof="" rm -f pac_fconftest.out -for kind in $pac_validIntKinds; do + +for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ PROGRAM main @@ -473,7 +472,7 @@ AC_MSG_CHECKING([sizeof of available REAL KINDs]) AC_LANG_PUSH([Fortran]) pack_real_sizeof="" rm -f pac_fconftest.out -for kind in $pac_validRealKinds; do +for kind in `echo $pac_validRealKinds| sed -e 's/,/ /g'`; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ PROGRAM main @@ -532,12 +531,19 @@ rm -f pac_fconftest.out ]) AC_RUN_IFELSE([],[ if test -s pac_fconftest.out ; then - PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" + + dnl PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" + dnl PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" + dnl PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" + dnl PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" + dnl PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" + dnl PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" else AC_MSG_WARN([No output from test program!]) fi -- cgit v0.12 From 1a5c36ce7ec09d48c4be4337c12e480809ec0700 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 29 Jun 2015 17:17:24 -0500 Subject: [svn-r27298] Description: Separate H5AC layer from using package-scoped pieces of the H5C layer, moving from including H5Cpkg.h to H5Cprivate.h. Tested on: MacOSX/64 10.10.3 (amazon) w/serial, parallel & production Linux/32 2.6.x (jam) w/serial & parallel --- src/H5AC.c | 88 ++++++++++++++++++++++++++++-------------------- src/H5ACmpio.c | 75 +++++++++++++++-------------------------- src/H5C.c | 28 ++++++++++++++++ src/H5Cpkg.h | 2 -- src/H5Cprivate.h | 100 +++++++++++++++++++++++++++++-------------------------- 5 files changed, 159 insertions(+), 134 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index ff0ef51..a94a727 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -32,7 +32,6 @@ /****************/ #define H5AC_PACKAGE /*suppress error about including H5ACpkg */ -#define H5C_PACKAGE /*suppress error about including H5Cpkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ /* Interface initialization */ @@ -43,7 +42,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5ACpkg.h" /* Metadata cache */ -#include "H5Cpkg.h" /* Cache */ +#include "H5Cprivate.h" /* Cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ @@ -488,7 +487,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id) #endif /* H5AC__TRACE_FILE_ENABLED */ #ifdef H5_HAVE_PARALLEL - aux_ptr = (struct H5AC_aux_t *)(f->shared->cache->aux_ptr); + aux_ptr = H5C_get_aux_ptr(f->shared->cache); if(aux_ptr) /* Sanity check */ HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); @@ -776,7 +775,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add { H5AC_aux_t *aux_ptr; - if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) { + if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache))) { /* Log the new entry */ if(H5AC__log_inserted_entry((H5AC_info_t *)thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC__log_inserted_entry() failed") @@ -840,12 +839,11 @@ H5AC_mark_entry_dirty(void *thing) { H5AC_info_t *entry_ptr = (H5AC_info_t *)thing; H5C_t *cache_ptr = entry_ptr->cache_ptr; + H5AC_aux_t *aux_ptr; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - + aux_ptr = H5C_get_aux_ptr(cache_ptr); if((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) && - (entry_ptr->is_pinned) && (NULL != cache_ptr->aux_ptr)) + (entry_ptr->is_pinned) && (NULL != aux_ptr)) if(H5AC__log_dirtied_entry(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry") } @@ -912,7 +910,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne #ifdef H5_HAVE_PARALLEL /* Log moving the entry */ - if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) + if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache))) if(H5AC__log_moved_entry(f, old_addr, new_addr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry") #endif /* H5_HAVE_PARALLEL */ @@ -1172,11 +1170,10 @@ H5AC_resize_entry(void *thing, size_t new_size) { H5AC_info_t * entry_ptr = (H5AC_info_t *)thing; H5C_t *cache_ptr = entry_ptr->cache_ptr; + H5AC_aux_t *aux_ptr; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - - if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) + aux_ptr = H5C_get_aux_ptr(cache_ptr); + if((!entry_ptr->is_dirty) && (NULL != aux_ptr)) if(H5AC__log_dirtied_entry(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry") } @@ -1384,7 +1381,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, } /* end if */ #ifdef H5_HAVE_PARALLEL - if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) { + if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache))) { if(dirtied && ((H5AC_info_t *)thing)->is_dirty == FALSE) if(H5AC__log_dirtied_entry((H5AC_info_t *)thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry") @@ -1502,14 +1499,18 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, FUNC_ENTER_NOAPI(FAIL) /* Check args */ - if((cache_ptr == NULL) || + if((cache_ptr == NULL) || (config_ptr == NULL) || + (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or config_ptr on entry.") #ifdef H5_HAVE_PARALLEL - ((cache_ptr->aux_ptr != NULL) && - (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC)) - || +{ + H5AC_aux_t *aux_ptr; + + aux_ptr = H5C_get_aux_ptr(cache_ptr); + if((aux_ptr != NULL) && (aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad aux_ptr on entry.") +} #endif /* H5_HAVE_PARALLEL */ - (config_ptr == NULL) || (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or config_ptr on entry.") /* Retrieve the configuration */ if(H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr, &internal_config) < 0) @@ -1549,9 +1550,12 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, config_ptr->apply_empty_reserve = internal_config.apply_empty_reserve; config_ptr->empty_reserve = internal_config.empty_reserve; #ifdef H5_HAVE_PARALLEL - if(cache_ptr->aux_ptr != NULL) { - config_ptr->dirty_bytes_threshold = ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold; - config_ptr->metadata_write_strategy = ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy; +{ + H5AC_aux_t *aux_ptr; + + if(NULL != (aux_ptr = H5C_get_aux_ptr(cache_ptr))) { + config_ptr->dirty_bytes_threshold = aux_ptr->dirty_bytes_threshold; + config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy; } /* end if */ else { #endif /* H5_HAVE_PARALLEL */ @@ -1559,6 +1563,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; #ifdef H5_HAVE_PARALLEL } /* end else */ +} #endif /* H5_HAVE_PARALLEL */ done: @@ -1684,13 +1689,17 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config trace_config = *config_ptr; #endif /* H5AC__TRACE_FILE_ENABLED */ - if((cache_ptr == NULL) + if(cache_ptr == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry.") #ifdef H5_HAVE_PARALLEL - || ((cache_ptr->aux_ptr != NULL) && - (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC)) +{ + H5AC_aux_t *aux_ptr; + + aux_ptr = H5C_get_aux_ptr(cache_ptr); + if((aux_ptr != NULL) && (aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad aux_ptr on entry.") +} #endif /* H5_HAVE_PARALLEL */ - ) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry.") /* Validate external configuration */ if(H5AC_validate_config(config_ptr) != SUCCEED) @@ -1725,12 +1734,16 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed.") #ifdef H5_HAVE_PARALLEL +{ + H5AC_aux_t *aux_ptr; + /* Set parallel configuration values */ /* (Which are only held in the H5AC layer -QAK) */ - if(cache_ptr->aux_ptr != NULL) { - ((H5AC_aux_t *)(cache_ptr->aux_ptr))->dirty_bytes_threshold = config_ptr->dirty_bytes_threshold; - ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy = config_ptr->metadata_write_strategy; + if(NULL != (aux_ptr = H5C_get_aux_ptr(cache_ptr))) { + aux_ptr->dirty_bytes_threshold = config_ptr->dirty_bytes_threshold; + aux_ptr->metadata_write_strategy = config_ptr->metadata_write_strategy; } /* end if */ +} #endif /* H5_HAVE_PARALLEL */ done: @@ -1921,9 +1934,6 @@ H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name) { char file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 2]; FILE * file_ptr = NULL; -#ifdef H5_HAVE_PARALLEL - H5AC_aux_t * aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1941,8 +1951,11 @@ H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name) HGOTO_ERROR(H5E_CACHE, H5E_FILEOPEN, FAIL, "trace file already open.") #ifdef H5_HAVE_PARALLEL - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - if(cache_ptr->aux_ptr == NULL) +{ + H5AC_aux_t * aux_ptr; + + aux_ptr = H5C_get_aux_ptr(cache_ptr); + if(aux_ptr == NULL) sprintf(file_name, "%s", trace_file_name); else { if(aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC) @@ -1953,6 +1966,7 @@ H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name) if(HDstrlen(file_name) > H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cooked trace file name too long.") +} #else /* H5_HAVE_PARALLEL */ HDsnprintf(file_name, (size_t)(H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1), "%s", trace_file_name); @@ -2121,7 +2135,7 @@ H5_ATTR_UNUSED HDassert(f != NULL); HDassert(f->shared != NULL); HDassert(f->shared->cache != NULL); - aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); + aux_ptr = H5C_get_aux_ptr(f->shared->cache); if(aux_ptr != NULL) { HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 64c27ab..6c2b924 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -30,7 +30,6 @@ /****************/ #define H5AC_PACKAGE /*suppress error about including H5ACpkg */ -#define H5C_PACKAGE /*suppress error about including H5Cpkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ /* Interface initialization */ @@ -41,7 +40,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5ACpkg.h" /* Metadata cache */ -#include "H5Cpkg.h" /* Cache */ +#include "H5Cprivate.h" /* Cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ #include "H5MMprivate.h" /* Memory management */ @@ -188,8 +187,8 @@ H5AC__set_sync_point_done_callback(H5C_t * cache_ptr, FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + HDassert(cache_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); @@ -221,10 +220,10 @@ H5AC__set_write_done_callback(H5C_t * cache_ptr, void (* write_done)(void)) FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC)); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); - HDassert( aux_ptr != NULL ); - HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ); + HDassert(cache_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); + HDassert(aux_ptr != NULL); + HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); aux_ptr->write_done = write_done; @@ -261,8 +260,7 @@ H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr) /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -326,8 +324,7 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr, /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank == 0); @@ -459,8 +456,7 @@ H5AC__broadcast_clean_list(H5AC_t * cache_ptr) /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr; + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank == 0); @@ -542,7 +538,6 @@ H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -658,8 +653,7 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, int *num_entries_pt /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -735,8 +729,7 @@ H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr) addr = entry_ptr->addr; cache_ptr = entry_ptr->cache_ptr; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank == 0); @@ -792,8 +785,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) HDassert(entry_ptr->is_dirty == FALSE); cache_ptr = entry_ptr->cache_ptr; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); @@ -876,8 +868,7 @@ H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, /* Sanity check */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank == 0); @@ -945,8 +936,7 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr) HDassert(entry_ptr); cache_ptr = entry_ptr->cache_ptr; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); @@ -1049,8 +1039,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) HDassert(f->shared); cache_ptr = (H5AC_t *)f->shared->cache; HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); @@ -1228,8 +1217,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -1393,8 +1381,7 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); @@ -1519,8 +1506,7 @@ H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank != 0); @@ -1580,8 +1566,7 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, int *num_entries_ptr, /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->mpi_rank != 0); @@ -1665,8 +1650,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -1806,8 +1790,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -1882,8 +1865,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); @@ -1985,8 +1967,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); @@ -2095,8 +2076,7 @@ H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op) HDassert(f != NULL); cache_ptr = f->shared->cache; HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) || @@ -2220,8 +2200,7 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates, /* Sanity checks */ HDassert(cache_ptr != NULL); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - aux_ptr = (H5AC_aux_t *)(cache_ptr->aux_ptr); + aux_ptr = H5C_get_aux_ptr(cache_ptr); HDassert(aux_ptr != NULL); HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -2284,7 +2263,7 @@ H5AC__flush_entries(H5F_t *f, hid_t dxpl_id) HDassert(f->shared->cache); /* Check if we have >1 ranks */ - if(f->shared->cache->aux_ptr) + if(H5C_get_aux_ptr(f->shared->cache)) if(H5AC__run_sync_point(f, dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.") diff --git a/src/H5C.c b/src/H5C.c index a60e519..c478173 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -1924,6 +1924,34 @@ done: /*------------------------------------------------------------------------- + * Function: H5C_get_aux_ptr + * + * Purpose: Get the aux_ptr field from the cache. + * + * This field will either be NULL (when accessing a file serially) + * or contains a pointer to the auxiliary info for parallel I/O. + * + * Return: NULL/non-NULL (can't fail) + * + * Programmer: Quincey Koziol + * 6/29/15 + * + *------------------------------------------------------------------------- + */ +void * +H5C_get_aux_ptr(const H5C_t *cache_ptr) +{ + FUNC_ENTER_NOAPI_NOERR + + /* Check arguments */ + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + + FUNC_LEAVE_NOAPI(cache_ptr->aux_ptr) +} /* H5C_get_aux_ptr() */ + + +/*------------------------------------------------------------------------- * Function: H5C_get_trace_file_ptr * * Purpose: Get the trace_file_ptr field from the cache. diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 814387b..7d9d0f9 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -60,8 +60,6 @@ /* Cache configuration settings */ #define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ #define H5C__H5C_T_MAGIC 0x005CAC0E -#define H5C__MAX_NUM_TYPE_IDS 28 -#define H5C__PREFIX_LEN 32 /**************************************************************************** * diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 5b152c8..3cd74c1 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -40,30 +40,9 @@ /* Library Private Macros */ /**************************/ -#ifndef NDEBUG -#define H5C_DO_SANITY_CHECKS 1 -#define H5C_DO_SLIST_SANITY_CHECKS 0 -#define H5C_DO_TAGGING_SANITY_CHECKS 1 -#define H5C_DO_EXTREME_SANITY_CHECKS 0 -#else /* NDEBUG */ -/* With rare execptions, the following defines should be set - * to 0 if NDEBUG is defined - */ -#define H5C_DO_SANITY_CHECKS 0 -#define H5C_DO_SLIST_SANITY_CHECKS 0 -#define H5C_DO_TAGGING_SANITY_CHECKS 0 -#define H5C_DO_EXTREME_SANITY_CHECKS 0 -#endif /* NDEBUG */ - -/* Note: The memory sanity checks aren't going to work until I/O filters are - * changed to call a particular alloc/free routine for their buffers, - * because the H5AC__SERIALIZE_RESIZED_FLAG set by the fractal heap - * direct block serialize callback calls H5Z_pipeline(). When the I/O - * filters are changed, then we should implement "cache image alloc/free" - * routines that the fractal heap direct block (and global heap) serialize - * calls can use when resizing (and re-allocating) their image in the - * cache. -QAK */ -#define H5C_DO_MEMORY_SANITY_CHECKS 0 +/* Cache configuration settings */ +#define H5C__MAX_NUM_TYPE_IDS 28 +#define H5C__PREFIX_LEN 32 /* This sanity checking constant was picked out of the air. Increase * or decrease it if appropriate. Its purposes is to detect corrupt @@ -73,29 +52,6 @@ */ #define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) -/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics - * on cache activity. In general, this #define should be set to 1 in - * debug mode, and 0 in production mode.. - */ - -#ifndef NDEBUG -#define H5C_COLLECT_CACHE_STATS 1 -#else /* NDEBUG */ -#define H5C_COLLECT_CACHE_STATS 0 -#endif /* NDEBUG */ - -/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics - * in individual cache entries. - * - * H5C_COLLECT_CACHE_ENTRY_STATS should only be defined to true if - * H5C_COLLECT_CACHE_STATS is also defined to true. - */ -#if H5C_COLLECT_CACHE_STATS -#define H5C_COLLECT_CACHE_ENTRY_STATS 1 -#else -#define H5C_COLLECT_CACHE_ENTRY_STATS 0 -#endif /* H5C_COLLECT_CACHE_STATS */ - #ifdef H5_HAVE_PARALLEL /* we must maintain the clean and dirty LRU lists when we are compiled * with parallel support. @@ -255,6 +211,55 @@ #define H5C__FLUSH_COLLECTIVELY_FLAG 0x4000 #define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x8000 +/* Debugging/sanity checking/statistics settings */ +#ifndef NDEBUG +#define H5C_DO_SANITY_CHECKS 1 +#define H5C_DO_SLIST_SANITY_CHECKS 0 +#define H5C_DO_TAGGING_SANITY_CHECKS 1 +#define H5C_DO_EXTREME_SANITY_CHECKS 0 +#else /* NDEBUG */ +/* With rare execptions, the following defines should be set + * to 0 if NDEBUG is defined + */ +#define H5C_DO_SANITY_CHECKS 0 +#define H5C_DO_SLIST_SANITY_CHECKS 0 +#define H5C_DO_TAGGING_SANITY_CHECKS 0 +#define H5C_DO_EXTREME_SANITY_CHECKS 0 +#endif /* NDEBUG */ + +/* Note: The memory sanity checks aren't going to work until I/O filters are + * changed to call a particular alloc/free routine for their buffers, + * because the H5AC__SERIALIZE_RESIZED_FLAG set by the fractal heap + * direct block serialize callback calls H5Z_pipeline(). When the I/O + * filters are changed, then we should implement "cache image alloc/free" + * routines that the fractal heap direct block (and global heap) serialize + * calls can use when resizing (and re-allocating) their image in the + * cache. -QAK */ +#define H5C_DO_MEMORY_SANITY_CHECKS 0 + +/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics + * on cache activity. In general, this #define should be set to 1 in + * debug mode, and 0 in production mode.. + */ + +#ifndef NDEBUG +#define H5C_COLLECT_CACHE_STATS 1 +#else /* NDEBUG */ +#define H5C_COLLECT_CACHE_STATS 0 +#endif /* NDEBUG */ + +/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics + * in individual cache entries. + * + * H5C_COLLECT_CACHE_ENTRY_STATS should only be defined to true if + * H5C_COLLECT_CACHE_STATS is also defined to true. + */ +#if H5C_COLLECT_CACHE_STATS +#define H5C_COLLECT_CACHE_ENTRY_STATS 1 +#else +#define H5C_COLLECT_CACHE_ENTRY_STATS 0 +#endif /* H5C_COLLECT_CACHE_STATS */ + /****************************/ /* Library Private Typedefs */ @@ -1881,6 +1886,7 @@ H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr, hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr, hbool_t *is_flush_dep_parent_ptr, hbool_t *is_flush_dep_child_ptr); H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr); +H5_DLL void * H5C_get_aux_ptr(const H5C_t *cache_ptr); H5_DLL FILE *H5C_get_trace_file_ptr(const H5C_t *cache_ptr); H5_DLL FILE *H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr); H5_DLL herr_t H5C_insert_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, -- cgit v0.12 From 5b2117ebc774a8a75bb77ca5c072b08f1f4f89c6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 30 Jun 2015 10:07:43 -0500 Subject: [svn-r27299] Changed from using sed to perl. --- configure | 28 +++++++++++++--------------- configure.ac | 6 +++--- m4/aclocal_fc.m4 | 21 ++++++++++----------- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 3a64492..4e7017d 100755 --- a/configure +++ b/configure @@ -5734,9 +5734,9 @@ else if ac_fn_c_try_run "$LINENO"; then : if test -s pac_Cconftest.out ; then - LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" - FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" - else + LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" + FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" + else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi @@ -7327,10 +7327,10 @@ _ACEOF PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" cat >>confdefs.h <<_ACEOF @@ -7363,7 +7363,6 @@ $as_echo_n "checking for Fortran REAL KINDs... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 $as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 $as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else @@ -7548,10 +7547,10 @@ _ACEOF PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" cat >>confdefs.h <<_ACEOF @@ -7584,7 +7583,6 @@ $as_echo_n "checking for Fortran REAL KINDs... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 $as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 $as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } else @@ -7625,7 +7623,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu pack_int_sizeof="" rm -f pac_fconftest.out -for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do +for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do cat > conftest.$ac_ext <<_ACEOF @@ -7667,7 +7665,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 $as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } ac_ext=${ac_fc_srcext-f} @@ -7687,7 +7685,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu pack_real_sizeof="" rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds| sed -e 's/,/ /g'`; do +for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do cat > conftest.$ac_ext <<_ACEOF @@ -7729,7 +7727,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" +PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 $as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } ac_ext=${ac_fc_srcext-f} @@ -7915,8 +7913,8 @@ $as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index e7215af..ff35b24 100644 --- a/configure.ac +++ b/configure.ac @@ -564,7 +564,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE if test "X$FORTRAN_C_LONG_DOUBLE_IS_UNIQUE" = "Xyes"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) else FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" @@ -596,9 +596,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl count the number of real kinds H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 'tr |{}|//|' | $PERL -e 's/ /,/g`)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 09a87e2..f937b64 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -393,10 +393,10 @@ AC_RUN_IFELSE([ PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) @@ -408,7 +408,6 @@ AC_RUN_IFELSE([ AC_MSG_CHECKING([for Fortran REAL KINDs]) AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) - AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) else AC_MSG_RESULT([Error]) @@ -434,7 +433,7 @@ AC_LANG_PUSH([Fortran]) pack_int_sizeof="" rm -f pac_fconftest.out -for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do +for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ PROGRAM main @@ -461,7 +460,7 @@ for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do pack_int_sizeof="$2" ]) done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) AC_LANG_POP([Fortran]) ]) @@ -472,7 +471,7 @@ AC_MSG_CHECKING([sizeof of available REAL KINDs]) AC_LANG_PUSH([Fortran]) pack_real_sizeof="" rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds| sed -e 's/,/ /g'`; do +for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do AC_LANG_CONFTEST([ AC_LANG_SOURCE([ PROGRAM main @@ -499,7 +498,7 @@ for kind in `echo $pac_validRealKinds| sed -e 's/,/ /g'`; do pack_real_sizeof="$2" ]) done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" +PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) AC_LANG_POP([Fortran]) ]) @@ -590,10 +589,10 @@ rm -f pac_Cconftest.out ]) AC_RUN_IFELSE([],[ if test -s pac_Cconftest.out ; then -dnl LDBL_DIG="`perl -ne '$. == 1 && print && exit'`" -dnl FLT128_DIG="`perl -ne '$. == 2 && print && exit'`" - LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" - FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" + LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" + FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" + dnl LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" + dnl FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" else AC_MSG_WARN([No output from test program!]) fi -- cgit v0.12 From 0f9d534bc212cdf27b9a1446fb7068328706975e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 30 Jun 2015 14:20:35 -0500 Subject: [svn-r27301] fixed configure error with pgi compiler by checking if __float128 is 0 --- configure | 14 ++++++++------ configure.ac | 12 +++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 4e7017d..0cac5b3 100755 --- a/configure +++ b/configure @@ -7895,17 +7895,19 @@ _ACEOF max_real_fortran_sizeof="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + if test "$ac_cv_sizeof___float128" != 0;then + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&5 + " >&5 $as_echo "$as_me: WARNING: Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&2;} - PAC_FC_ALL_REAL_KINDS="`echo \"$PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + " >&2;} + PAC_FC_ALL_REAL_KINDS="`echo \"$PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5 $as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } diff --git a/configure.ac b/configure.ac index ff35b24..22eb693 100644 --- a/configure.ac +++ b/configure.ac @@ -583,13 +583,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then - AC_MSG_WARN([ + if test "$ac_cv_sizeof___float128" != 0;then + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + AC_MSG_WARN([ Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - ]) - PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + ]) + PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | $PERL -pe 's/,\d+}/}/g;'`" + fi fi AC_MSG_CHECKING([for Fortran interoperable KINDS with C]) AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) -- cgit v0.12 From 513d039f08b6768431b209dcf47cd306331580ac Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 14:51:57 -0500 Subject: [svn-r27308] switch public cdash URL --- CTestConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 7bbce4f..2104cbd 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -12,7 +12,7 @@ if (CDASH_LOCAL) set (CTEST_DROP_SITE "72.36.68.252") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") else (CDASH_LOCAL) - set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu") + set (CTEST_DROP_SITE "cdash.hdfgroup.org") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk") endif (CDASH_LOCAL) set (CTEST_DROP_SITE_CDASH TRUE) -- cgit v0.12 From 980db9e85b902bcd0e183e00c5ebe02ec365dc22 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 16:18:15 -0500 Subject: [svn-r27313] switch internal cdash URL --- CTestConfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 7bbce4f..7497b08 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -9,10 +9,10 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") set (CTEST_DROP_METHOD "http") if (CDASH_LOCAL) - set (CTEST_DROP_SITE "72.36.68.252") + set (CTEST_DROP_SITE "10.10.10.82") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") else (CDASH_LOCAL) - set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu") + set (CTEST_DROP_SITE "cdash.hdfgroup.org") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk") endif (CDASH_LOCAL) set (CTEST_DROP_SITE_CDASH TRUE) -- cgit v0.12 From e2bbdddff758e14a27a3f6a7d47f2bfc8041c687 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 16:19:01 -0500 Subject: [svn-r27316] switch internal cdash URL --- CTestConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 2104cbd..7497b08 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -9,7 +9,7 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") set (CTEST_DROP_METHOD "http") if (CDASH_LOCAL) - set (CTEST_DROP_SITE "72.36.68.252") + set (CTEST_DROP_SITE "10.10.10.82") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") else (CDASH_LOCAL) set (CTEST_DROP_SITE "cdash.hdfgroup.org") -- cgit v0.12 From 9804fed58f4f30843d406861a2daf67944c244de Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 1 Jul 2015 17:08:11 -0500 Subject: [svn-r27320] Fix uninitialized memory write valgrind errors in trunk. Did this by modifying metadata cache clients to clear unused memory in the buffer after serializing. Tested: ummon; jam, koala, ostrich (h5committest) --- src/H5B2cache.c | 12 +++++++++++- src/H5Bcache.c | 8 +++++++- src/H5EAcache.c | 10 +++++----- src/H5FAcache.c | 6 +++--- src/H5Fsuper_cache.c | 4 ++-- src/H5Gcache.c | 4 +++- src/H5HLcache.c | 12 ++++++++++++ src/H5SMcache.c | 6 +++--- 8 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 64e304c..9e43ff8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -393,7 +393,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5B2__cache_hdr_serialize() */ @@ -698,6 +698,11 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le /* Sanity check */ HDassert((size_t)(image - (uint8_t *)_image) <= len); +#ifdef H5_CLEAR_MEMORY + /* Clear rest of internal node */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5B2__cache_int_serialize() */ @@ -970,6 +975,11 @@ H5B2__cache_leaf_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED l /* Sanity check */ HDassert((size_t)(image - (uint8_t *)_image) <= len); +#ifdef H5_CLEAR_MEMORY + /* Clear rest of leaf node */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5B2__cache_leaf_serialize() */ diff --git a/src/H5Bcache.c b/src/H5Bcache.c index dfa4dab..d071712 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -338,10 +338,16 @@ H5B__serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, /* Encode the final key */ if(shared->type->encode(shared, image, native) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + image += shared->sizeof_rkey; } /* end if */ /* Sanity check */ - HDassert((size_t)((const uint8_t *)image - (const uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) <= len); + +#ifdef H5_CLEAR_MEMORY + /* Clear rest of node */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 0d83fb3..8a05282 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -488,7 +488,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); END_FUNC(STATIC) /* end H5EA__cache_hdr_serialize() */ @@ -785,7 +785,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); CATCH @@ -1141,7 +1141,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */ @@ -1494,7 +1494,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); CATCH @@ -1816,7 +1816,7 @@ H5EA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); CATCH diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 298eb56..b95da40 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -407,7 +407,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); END_FUNC(STATIC) /* end H5FA__cache_hdr_serialize() */ @@ -704,7 +704,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); CATCH @@ -976,7 +976,7 @@ H5FA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); CATCH diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 8cc8299..ac1f840 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -716,7 +716,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU } /* end else */ /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); done: FUNC_LEAVE_NOAPI(ret_value) @@ -976,7 +976,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t len, image += 8 + drvinfo->len; /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Gcache.c b/src/H5Gcache.c index 8dfecb1..f765b41 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -316,8 +316,10 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, if(H5G__ent_encode_vec(f, &image, sym->entry, sym->nsyms) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize") +#ifdef H5_CLEAR_MEMORY /* Clear rest of symbol table node */ - HDmemset(image, 0, sym->node_size - (size_t)(image - (uint8_t *)_image)); + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HLcache.c b/src/H5HLcache.c index 17ded00..2054e34 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -560,7 +560,19 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len, /* Copy the heap data block into the cache image */ HDmemcpy(image, heap->dblk_image, heap->dblk_size); + + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len); } /* end if */ + else { + /* Sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= len); + +#ifdef H5_CLEAR_MEMORY + /* Clear rest of local heap */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ + } /* end else */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5HL__cache_prefix_serialize() */ diff --git a/src/H5SMcache.c b/src/H5SMcache.c index d8c0824..293088c 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -675,13 +675,13 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t len, computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0); UINT32ENCODE(image, computed_chksum); + /* sanity check */ + HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size); + #ifdef H5_CLEAR_MEMORY HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image))); #endif /* H5_CLEAR_MEMORY */ - /* sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size); - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5SM__cache_list_serialize() */ -- cgit v0.12 From 2a567e8155a883a1d79a7879e953449ed7505945 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 2 Jul 2015 14:04:25 -0500 Subject: [svn-r27326] Working version of cmake on linux. --- CMakeLists.txt | 2 ++ MANIFEST | 1 + config/cmake/ConfigureChecks.cmake | 12 ++++--- config/cmake/H5pubconf.h.in | 12 +++++++ configure | 21 +++++-------- configure.ac | 8 ++--- fortran/src/H5config_f.inc.cmake | 64 ++++++++++++++++++++++++++++---------- fortran/test/CMakeLists.txt | 4 +-- hl/fortran/test/CMakeLists.txt | 8 ++--- m4/aclocal_fc.m4 | 10 +++--- 10 files changed, 91 insertions(+), 51 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33b4bca..e638ba1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -638,6 +638,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif (BUILD_SHARED_LIBS AND APPLE) option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) + include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) @@ -686,6 +687,7 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++" # Check if Fortran's default real is double precision. If it is and HL is # being built then configure should fail due to bug HDFFV-889. #----------------------------------------------------------------------------- + if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB ) if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE) message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ") diff --git a/MANIFEST b/MANIFEST index 2f79088..a775ed9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2374,6 +2374,7 @@ ./config/cmake/hdf5-config-version.cmake.in ./config/cmake/HDFCompilerFlags.cmake ./config/cmake/HDF5Macros.cmake +./config/cmake/HDF5UseFortran.cmake ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 4edec03..d021758 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -146,6 +146,10 @@ if (NOT WINDOWS) endif (HDF5_ENABLE_DIRECT_VFD) endif (NOT WINDOWS) +#----------------------------------------------------------------------------- +# Check if C has __float128 extension +#----------------------------------------------------------------------------- +CHECK_TYPE_SIZE("__float128" H5_HAVE_FLOAT128) #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities @@ -197,11 +201,6 @@ MACRO (H5MiscConversionTest VAR TEST msg) ENDMACRO (H5MiscConversionTest) #----------------------------------------------------------------------------- -# Check if C has __float128 extension -#----------------------------------------------------------------------------- -CHECK_TYPE_SIZE("__float128" _FLOAT128) - -#----------------------------------------------------------------------------- # Check various conversion capabilities #----------------------------------------------------------------------------- @@ -243,3 +242,6 @@ set (FC ${CMAKE_Fortran_COMPILER}) foreach (LINK_LIB ${LINK_LIBS}) set (LIBS "${LIBS} -l${LINK_LIB}") endforeach (LINK_LIB ${LINK_LIBS}) + + + diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index fcbdbd5..f7dcce2 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -63,6 +63,18 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #define @H5_FC_FUNC_@ +/* Define Fortran Maximum Real Decimal Precision */ +#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ + +/* Determine the maximum decimal precision in C MSB NOT USED??*/ +#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ + +/* Define if we have Fortran C_LONG_DOUBLE */ +#cmakedefine H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ + +/* Determine if __float128 is available */ +#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ + /* Define to 1 if you have the `alarm' function. */ #cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ diff --git a/configure b/configure index 0cac5b3..c48c985 100755 --- a/configure +++ b/configure @@ -5602,7 +5602,7 @@ _ACEOF -## Check for __FLOAT128 extension +## Check for non-standard extenstion __FLOAT128 extension # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -5718,7 +5718,7 @@ main () FILE * pFile; pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n %d\n", C_LDBL_DIG, C_FLT128_DIG); + fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); ; return 0; @@ -6405,7 +6405,6 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" cat > conftest.$ac_ext <<_ACEOF program main @@ -6436,8 +6435,6 @@ rm -f core conftest.err conftest.$ac_objext \ if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" fi ## -------------------------------------------------------------------- @@ -7305,8 +7302,7 @@ else WRITE(8,'(I0)') max_decimal_prec WRITE(8,'(I0)') num_ikinds WRITE(8,'(I0)') num_rkinds - - END + END _ACEOF @@ -7525,8 +7521,7 @@ else WRITE(8,'(I0)') max_decimal_prec WRITE(8,'(I0)') num_ikinds WRITE(8,'(I0)') num_rkinds - - END + END _ACEOF @@ -7833,7 +7828,7 @@ $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="no" + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE" >&5 $as_echo_n "checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE... " >&6; } @@ -7866,14 +7861,14 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="yes" + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "X$FORTRAN_C_LONG_DOUBLE_IS_UNIQUE" = "Xyes"; then + if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" $as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h @@ -7895,7 +7890,7 @@ _ACEOF max_real_fortran_sizeof="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" - if test "$ac_cv_sizeof___float128" != 0;then + if test "$ac_cv_sizeof___float128" != 0;then if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size diff --git a/configure.ac b/configure.ac index 22eb693..fcceafb 100644 --- a/configure.ac +++ b/configure.ac @@ -360,7 +360,7 @@ esac AC_CHECK_SIZEOF([long double], [8]) -## Check for __FLOAT128 extension +## Check for non-standard extenstion __FLOAT128 extension AC_CHECK_SIZEOF([__float128]) AC_CHECK_SIZEOF([_Quad]) HAVE_FLOAT128=0 @@ -457,8 +457,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran]) - else - HAVE_FORTRAN_2003="yes" fi ## -------------------------------------------------------------------- @@ -563,7 +561,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE - if test "X$FORTRAN_C_LONG_DOUBLE_IS_UNIQUE" = "Xyes"; then + if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) else @@ -583,6 +581,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" + dnl remove the invalid kind from the list if test "$ac_cv_sizeof___float128" != 0;then if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then AC_MSG_WARN([ @@ -606,7 +605,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) - dnl remove the invalid kind from the list dnl AC_MSG_WARN([...$PAC_FC_ALL_REAL_KINDS_SIZEOF...$PAC_FC_ALL_REAL_KINDS...]) dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}" dnl tmp3="`echo $PAC_FC_ALL_REAL_KINDS | perl -pe 's/,[0-9]*\}$/\}/g'`" diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index 9fbc987..f751c20 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -29,29 +29,61 @@ #endif ! Define if the intrinsic C_LONG_DOUBLE exists -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ -#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 -#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE -#endif +! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ + +! Define if the intrinsic module ISO_FORTRAN_ENV exists +#define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@ + +! Define the size of C's long double +#define H5_SIZEOF_LONG_DOUBLE @SIZEOF_LONG_DOUBLE@ + +! Define the maximum decimal precision for reals +#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ + +! If C has quad precision +#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ + +! Define if INTEGER*16 is available +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ + +! Maximum decimal precision for C +#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ + +! number of valid REAL KINDs +#define H5_H5CONFIG_F_NUM_RKIND @H5CONFIG_F_NUM_RKIND@ + +! valid REAL KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_RKIND @H5CONFIG_F_RKIND@ + +! valid REAL KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_RKIND_SIZEOF @H5CONFIG_F_RKIND_SIZEOF@ + +! number of valid INTEGER KINDs +#define H5_H5CONFIG_F_NUM_IKIND @H5CONFIG_F_NUM_IKIND@ + +! valid INTEGER KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ ! should this be ${HDF_PREFIX} instead of H5 MSB -#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ +!#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ -#if H5_SIZEOF_LONG_DOUBLE==0 -#undef H5_SIZEOF_LONG_DOUBLE -#endif +!#if H5_SIZEOF_LONG_DOUBLE==0 +!#undef H5_SIZEOF_LONG_DOUBLE +!#endif ! Define if the C intrinsic __FLOAT128 exists -#define H5_HAVE_FLOAT128 @HAVE_FLOAT128@ +!#define H5_HAVE_FLOAT128 @HAVE_FLOAT128@ -#if H5_HAVE_FLOAT128==0 -#undef H5_HAVE_FLOAT128 -#endif +!#if H5_HAVE_FLOAT128==0 +!#undef H5_HAVE_FLOAT128 +!#endif ! Define if INTEGER*16 is available -#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ +!#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16==0 -#undef H5_HAVE_Fortran_INTEGER_SIZEOF_16 -#endif +!#if H5_HAVE_Fortran_INTEGER_SIZEOF_16==0 +!#undef H5_HAVE_Fortran_INTEGER_SIZEOF_16 +!#endif diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index d71fefd..9b82765 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -23,8 +23,8 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -set_source_files_properties (tf.F90 PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90) +set_source_files_properties (tf.F90 tf_gen.F90 PROPERTIES LANGUAGE Fortran) +add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90 tf_gen.F90) set (SHARED_LINK_FLAGS " ") if (WIN32) diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 55fb987..d90b524 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #-- Adding test for hl_f90_tstds -add_executable (hl_f90_tstds tstds.f90) +add_executable (hl_f90_tstds tstds.F90) TARGET_NAMING (hl_f90_tstds ${LIB_TYPE}) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds ${LIB_TYPE} " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -16,7 +16,7 @@ set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) #-- Adding test for hl_f90_tstlite -add_executable (hl_f90_tstlite tstlite.f90) +add_executable (hl_f90_tstlite tstlite.F90) TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE}) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite ${LIB_TYPE} " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -25,7 +25,7 @@ set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) #-- Adding test for hl_f90_tstimage -add_executable (hl_f90_tstimage tstimage.f90) +add_executable (hl_f90_tstimage tstimage.F90) TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE}) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage ${LIB_TYPE} " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -34,7 +34,7 @@ set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) #-- Adding test for hl_f90_tsttable -add_executable (hl_f90_tsttable tsttable.f90) +add_executable (hl_f90_tsttable tsttable.F90) TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE}) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable ${LIB_TYPE} " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index f937b64..bd724b1 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -144,7 +144,7 @@ dnl Check if C_LONG_DOUBLE is different from C_DOUBLE if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="no" + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -171,7 +171,7 @@ AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ CALL h5t(d) END PROGRAM main ])], [AC_MSG_RESULT([yes]) - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="yes"], + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"], [AC_MSG_RESULT([no])]) ]) fi @@ -184,7 +184,6 @@ AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ dnl -------------------------------------------------------------------- dnl Default for FORTRAN 2003 compliant compilers dnl - HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ @@ -372,8 +371,7 @@ AC_RUN_IFELSE([ WRITE(8,'(I0)') max_decimal_prec WRITE(8,'(I0)') num_ikinds WRITE(8,'(I0)') num_rkinds - - END + END ]) ],[ if test -s pac_fconftest.out ; then @@ -584,7 +582,7 @@ rm -f pac_Cconftest.out ],[[ FILE * pFile; pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n %d\n", C_LDBL_DIG, C_FLT128_DIG); + fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); ]]) ]) AC_RUN_IFELSE([],[ -- cgit v0.12 From 549cc2e1c38383d6f89d75397e937352b9a07ede Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 2 Jul 2015 14:14:10 -0500 Subject: [svn-r27328] updated reconfigure --- src/Makefile.in | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index 4459f6f..fd6c3d8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -150,28 +150,29 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_la_LIBADD = am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ - H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5ACmpio.lo H5B.lo H5Bcache.lo \ - H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo \ - H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5Cmpio.lo H5CS.lo H5D.lo \ - H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ - H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ - H5Dlayout.lo H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo \ - H5Dtest.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo H5EAcache.lo \ - H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo H5EAhdr.lo \ - H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo H5EAtest.lo \ - H5F.lo H5Fint.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fdeprec.lo \ - H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo \ - H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \ - H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ - H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo \ - H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \ - H5FDmpi.lo H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo \ - H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo \ - H5FSsection.lo H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo \ - H5Gcache.lo H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo \ - H5Gint.lo H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo \ - H5Goh.lo H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo \ - H5HF.lo H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ + H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5ACmpio.lo H5B.lo \ + H5Bcache.lo H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo \ + H5B2hdr.lo H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo \ + H5Cmpio.lo H5CS.lo H5D.lo H5Dbtree.lo H5Dchunk.lo \ + H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo H5Ddeprec.lo H5Defl.lo \ + H5Dfill.lo H5Dint.lo H5Dio.lo H5Dlayout.lo H5Dmpio.lo H5Doh.lo \ + H5Dscatgath.lo H5Dselect.lo H5Dtest.lo H5E.lo H5Edeprec.lo \ + H5Eint.lo H5EA.lo H5EAcache.lo H5EAdbg.lo H5EAdblkpage.lo \ + H5EAdblock.lo H5EAhdr.lo H5EAiblock.lo H5EAint.lo \ + H5EAsblock.lo H5EAstat.lo H5EAtest.lo H5F.lo H5Fint.lo \ + H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fdeprec.lo H5Fefc.lo \ + H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo H5Fquery.lo \ + H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo H5Ftest.lo H5FA.lo \ + H5FAcache.lo H5FAdbg.lo H5FAdblock.lo H5FAdblkpage.lo \ + H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo H5FDcore.lo \ + H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ + H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo H5FDstdio.lo \ + H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ + H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ + H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ + H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ + H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo \ + H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \ H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \ @@ -758,9 +759,11 @@ DISTCLEANFILES = H5pubconf.h # library sources libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5ACmpio.c H5B.c H5Bcache.c H5Bdbg.c \ + H5AC.c H5ACmpio.c \ + H5B.c H5Bcache.c H5Bdbg.c \ H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \ - H5C.c H5Cmpio.c H5CS.c \ + H5C.c H5Cmpio.c \ + H5CS.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ @@ -998,8 +1001,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bcache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bdbg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5C.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5CS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5D.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dbtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dchunk.Plo@am__quote@ -- cgit v0.12 From 4e25ab6ebd02587e3e77eb682e47a99f7aeb5493 Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Thu, 2 Jul 2015 17:13:09 -0500 Subject: [svn-r27332] Fix src/CMakeLists.txt after Quincey's metadata cache changes --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e5f7e2f..aec06b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,7 @@ IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" ) set (H5AC_SRCS ${HDF5_SRC_DIR}/H5AC.c + ${HDF5_SRC_DIR}/H5ACmpio.c ) set (H5AC_HDRS @@ -82,6 +83,7 @@ IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SRCS}" ) set (H5C_SRCS ${HDF5_SRC_DIR}/H5C.c + ${HDF5_SRC_DIR}/H5Cmpio.c ) set (H5C_HDRS ${HDF5_SRC_DIR}/H5Cpkg.h -- cgit v0.12 From 3f866f18eca2351950f4d68b4b4ec26210809af8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 2 Jul 2015 17:14:45 -0500 Subject: [svn-r27333] added comments --- configure | 2 +- configure.ac | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ac706a0..ef31d87 100755 --- a/configure +++ b/configure @@ -7910,7 +7910,7 @@ $as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" diff --git a/configure.ac b/configure.ac index f11da5a..9a8efe9 100644 --- a/configure.ac +++ b/configure.ac @@ -597,6 +597,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl count the number of real kinds H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" + dnl MSB still need to replace spaces with commas?? H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 'tr |{}|//|' | $PERL -e 's/ /,/g`)" H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" -- cgit v0.12 From b3b02d5112f7f7616199b26c7245b7ce01d1582c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 5 Jul 2015 09:11:13 -0500 Subject: [svn-r27337] cmake configure test for Fortran --- config/cmake/HDF5UseFortran.cmake | 461 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 461 insertions(+) create mode 100644 config/cmake/HDF5UseFortran.cmake diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake new file mode 100644 index 0000000..156e3bb --- /dev/null +++ b/config/cmake/HDF5UseFortran.cmake @@ -0,0 +1,461 @@ + +# +# This file provides functions for HDF5 specific Fortran support. +# +#------------------------------------------------------------------------------- +ENABLE_LANGUAGE (Fortran) + +# The provided CMake Fortran macros don't provide a general compile/run function +# so this one is used. +#----------------------------------------------------------------------------- +MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) +# MSB CHECK WHY THIS CHECK? +# if (NOT DEFINED ${RUN_RESULT_VAR}) + message (STATUS "Detecting Fortran ${FUNCTION}") + if (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif (CMAKE_REQUIRED_LIBRARIES) + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 + "${CODE}" + ) + TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + RUN_OUTPUT_VARIABLE OUTPUT + ) + + set(${RETURN} ${OUTPUT}) + + #message ( "Test result1 ${RETURN} ") + #message ( "Test result3 ${RESULT} ") + #message ( "Test result2 ${CMAKE_MATCH_0} ") + #message ( "Test result4 ${CMAKE_MATCH_1} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${COMPILE_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${RUN_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${RUN_RESULT_VAR}) + set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") + message (STATUS "Testing Fortran ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else (${RUN_RESULT_VAR}) + message (STATUS "Testing Fortran ${FUNCTION} - Fail") + set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif (${RUN_RESULT_VAR}) +# endif (NOT DEFINED ${RUN_RESULT_VAR}) +ENDMACRO (FORTRAN_RUN) + +#----------------------------------------------------------------------------- +# Check to see C_LONG_DOUBLE is available +CHECK_FORTRAN_FEATURE(c_long_double + " + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + " + FORTRAN_HAVE_C_LONG_DOUBLE +) +set(H5_FORTRAN_HAVE_C_LONG_DOUBLE ${FORTRAN_HAVE_C_LONG_DOUBLE}) + +# Check to see C_LONG_DOUBLE is different from C_DOUBLE + +CHECK_FORTRAN_FEATURE(c_long_double + " + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + " + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE +) + +## Set the sizeof function for use later in the fortran tests +if(FORTRAN_HAVE_STORAGE_SIZE) + set(FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") + set(FC_SIZEOF_B "STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") + set(FC_SIZEOF_C "STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") +elseif(FORTRAN_HAVE_C_SIZEOF) + set(FC_SIZEOF_A "SIZEOF(a)") + set(FC_SIZEOF_B "SIZEOF(b)") + set(FC_SIZEOF_C "SIZEOF(c)") +else(FORTRAN_HAVE_STORAGE_SIZE) + message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE") +endif(FORTRAN_HAVE_STORAGE_SIZE) + +#----------------------------------------------------------------------------- +# Determine the available KINDs for REALs and INTEGERs +#----------------------------------------------------------------------------- + +FORTRAN_RUN("REAL and INTEGER KINDs" + " + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 + lastkind=SELECTED_INT_KIND(1) + ! Find integer KINDs + DO ik=2,36 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 + WRITE(*,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 + WRITE(*,'(I0)') lastkind + ELSE + WRITE(*,'()') + ENDIF + ! Find real KINDs + num_rkinds = 0 + lastkind=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + DO ik=2,36 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 + WRITE(*,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' + max_decimal_prec = ik + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 + WRITE(*,'(I0)') lastkind + ELSE + WRITE(*,'()') + ENDIF + WRITE(*,'(I0)') max_decimal_prec + WRITE(*,'(I0)') num_ikinds + WRITE(*,'(I0)') num_rkinds + END + " + XX + YY + PROG_OUTPUT +) +# dnl The output from the above program will be: +# dnl -- LINE 1 -- valid integer kinds (comma seperated list) +# dnl -- LINE 2 -- valid real kinds (comma seperated list) +# dnl -- LINE 3 -- max decimal precision for reals +# dnl -- LINE 4 -- number of valid integer kinds +# dnl -- LINE 5 -- number of valid real kinds + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 pac_validIntKinds) +list(GET PROG_OUTPUT 1 pac_validRealKinds) +list(GET PROG_OUTPUT 2 H5_PAC_FC_MAX_REAL_PRECISION) + +set(PAC_FC_ALL_INTEGER_KINDS "\{${pac_validIntKinds}\}") +set(PAC_FC_ALL_REAL_KINDS "\{${pac_validRealKinds}\}") + +list(GET PROG_OUTPUT 3 NUM_IKIND) +list(GET PROG_OUTPUT 4 NUM_RKIND) + +set(H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") +set(H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") + +message ( " ........REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message ( " ........INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") + +#----------------------------------------------------------------------------- +# Determine the available KINDs for REALs and INTEGERs +#----------------------------------------------------------------------------- +# ********** +# INTEGERS +# ********** +string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}") + +foreach( KIND ${VAR_KIND} ) + set(PROG_SRC + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=${KIND}) a + WRITE(*,'(I0)') ${FC_SIZEOF_A} + END + " + ) + FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC} + XX + YY + PROG_OUTPUT1 + ) + string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") + set(pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},") +endforeach(KIND) +string(STRIP ${pack_int_sizeof} pack_int_sizeof) + +#Remove trailing comma +string(REGEX REPLACE ",$" "" pack_int_sizeof "${pack_int_sizeof}") +#Remove spaces +string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") + +set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") + +# ********** +# REALS +# ********** +string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}") + +#find the maximum kind of the real +list(LENGTH VAR_KIND LEN_VAR_KIND) +MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") +list(GET VAR_KIND ${_LEN} max_real_fortran_kind) + +foreach( KIND ${VAR_KIND} ) + set(PROG_SRC + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=${KIND}) a + WRITE(*,'(I0)') ${FC_SIZEOF_A} + END + " + ) + FORTRAN_RUN("REAL KIND SIZEOF" ${PROG_SRC} + XX + YY + PROG_OUTPUT1 + ) + string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") + set(pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},") +endforeach(KIND) +string(STRIP ${pack_real_sizeof} pack_real_sizeof) + +#Remove trailing comma +string(REGEX REPLACE ",$" "" pack_real_sizeof "${pack_real_sizeof}") +#Remove spaces +string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") + +set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") + +#find the maximum kind of the real +list(LENGTH VAR_KIND LEN_VAR_KIND) +MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") +list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof) + +set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}") +#----------------------------------------------------------------------------- +# Find sizeof of native kinds +#----------------------------------------------------------------------------- +FORTRAN_RUN("SIZEOF NATIVE KINDs" + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + WRITE(*,*) ${FC_SIZEOF_A} + WRITE(*,*) kind(a) + WRITE(*,*) ${FC_SIZEOF_B} + WRITE(*,*) kind(b) + WRITE(*,*) ${FC_SIZEOF_C} + WRITE(*,*) kind(c) + END + " + XX + YY + PROG_OUTPUT +) +# dnl The output from the above program will be: +# dnl -- LINE 1 -- sizeof INTEGER +# dnl -- LINE 2 -- kind of INTEGER +# dnl -- LINE 3 -- sizeof REAL +# dnl -- LINE 4 -- kind of REAL +# dnl -- LINE 5 -- sizeof DOUBLE PRECISION +# dnl -- LINE 6 -- kind of DOUBLE PRECISION + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) +list(GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND) +list(GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF) +list(GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND) +list(GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) +list(GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) + +set(FORTRAN_SIZEOF_LONG_DOUBLE ${HDF_PREFIX}_SIZEOF_LONG_DOUBLE) + +# remove the invalid kind from the list +if(NOT(${SIZEOF___FLOAT128} EQUAL 0)) + if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) + message(WARNING " + Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!") + string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS}) + string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) + MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1") + endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) +endif(NOT(${SIZEOF___FLOAT128} EQUAL 0)) + +set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") + +string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS}) +string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) +set(H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)") + +string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) +string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) +set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") + +ENABLE_LANGUAGE (C) + +#----------------------------------------------------------------------------- +# The provided CMake C macros don't provide a general compile/run function +# so this one is used. +#----------------------------------------------------------------------------- +MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) +# MSB CHECK WHY THIS CHECK? +# if (NOT DEFINED ${RUN_RESULT_VAR}) + message (STATUS "Detecting C ${FUNCTION}") + if (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif (CMAKE_REQUIRED_LIBRARIES) + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + ${CODE} + ) + TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + RUN_OUTPUT_VARIABLE OUTPUT + ) + + set(${RETURN} ${OUTPUT}) + + #message ( "Test result1 ${RETURN} ") + #message ( "Test result3 ${RESULT} ") + #message ( "Test result2 ${CMAKE_MATCH_0} ") + #message ( "Test result4 ${CMAKE_MATCH_1} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${COMPILE_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${RUN_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${RUN_RESULT_VAR}) + set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}") + message (STATUS "Testing C ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the C ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else (${RUN_RESULT_VAR}) + message (STATUS "Testing C ${FUNCTION} - Fail") + set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the C ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif (${RUN_RESULT_VAR}) +# endif (NOT DEFINED ${RUN_RESULT_VAR}) +ENDMACRO (C_RUN) + +set(PROG_SRC + " +#include +#include +#define CHECK_FLOAT128 ${SIZEOF___FLOAT128} +#if CHECK_FLOAT128!=0 +# if ${HAVE_QUADMATH}!=0 +#include +# endif +# ifdef FLT128_DIG +#define C_FLT128_DIG FLT128_DIG +# else +#define C_FLT128_DIG 0 +# endif +#else +#define C_FLT128_DIG 0 +#endif +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define C_LDBL_DIG DECIMAL_DIG +#else +#define C_LDBL_DIG LDBL_DIG +#endif + void main() { + printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\; + } + " + ) + +C_RUN("maximum decimal precision for C" ${PROG_SRC} + XX + YY + PROG_OUTPUT +) + +# dnl The output from the above program will be: +# dnl -- LINE 1 -- long double decimal precision +# dnl -- LINE 2 -- __float128 decimal precision + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 LDBL_DIG) +list(GET PROG_OUTPUT 1 FLT128_DIG) + +if(SIZEOF___FLOAT128 EQUAL 0) + set(H5_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) +else (SIZEOF___FLOAT128 EQUAL 0) + set(H5_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) +endif(SIZEOF___FLOAT128 EQUAL 0) + + +# Setting definition if there is a 16 byte fortran integer +string(FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos) +if(${pos} EQUAL -1) + set(HAVE_Fortran_INTEGER_SIZEOF_16 0) +else (${pos} EQUAL -1) + set(HAVE_Fortran_INTEGER_SIZEOF_16 1) +endif (${pos} EQUAL -1) -- cgit v0.12 From f37ae9d9f98e60647c5e2c9caac43807916682ad Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 5 Jul 2015 19:12:35 -0500 Subject: [svn-r27339] Snapshot version 1.9 release 223 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/cpp_doc_config | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++---------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 55 ++++++++++++++++++++++++---------------------- 13 files changed, 52 insertions(+), 49 deletions(-) diff --git a/README.txt b/README.txt index 1783899..eeb01dd 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.223 currently under development +HDF5 version 1.9.224 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index a4a7a74..54f8328 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -670,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 # This is our main target diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 4ba3d22..dee3df9 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.223 currently under development +PROJECT_NUMBER = HDF5 version 1.9.224 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/lt_vers.am b/config/lt_vers.am index 7a4cd7a..7ffbbfb 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 0540906..a8fe363 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.223. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.224. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.223' -PACKAGE_STRING='HDF5 1.9.223' +PACKAGE_VERSION='1.9.224' +PACKAGE_STRING='HDF5 1.9.224' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.223 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.224 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1542,7 +1542,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.223:";; + short | recursive ) echo "Configuration of HDF5 1.9.224:";; esac cat <<\_ACEOF @@ -1731,7 +1731,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.223 +HDF5 configure 1.9.224 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2668,7 +2668,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.223, which was +It was created by HDF5 $as_me 1.9.224, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3539,7 +3539,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.223' + VERSION='1.9.224' cat >>confdefs.h <<_ACEOF @@ -28589,7 +28589,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.223 +HDF5 config.lt 1.9.224 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -30705,7 +30705,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.223, which was +This file was extended by HDF5 $as_me 1.9.224, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30771,7 +30771,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.223 +HDF5 config.status 1.9.224 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 18628b4..f35103a 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.223], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.224], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index b169c66..0d82d01 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 8099607..1c89b41 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -662,7 +662,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index c053566..cd58f7c 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -680,7 +680,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 99ec64a..dd34e7f 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -661,7 +661,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 8c17df9..4d27c8c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.223 currently under development +HDF5 version 1.9.224 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 6cec869..4a3b4d2 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 223 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 224 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.223" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.224" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 5ea0a3e..9a4589e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -150,28 +150,29 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_la_LIBADD = am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ - H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5ACmpio.lo H5B.lo H5Bcache.lo \ - H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo \ - H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5Cmpio.lo H5CS.lo H5D.lo \ - H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ - H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ - H5Dlayout.lo H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo \ - H5Dtest.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo H5EAcache.lo \ - H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo H5EAhdr.lo \ - H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo H5EAtest.lo \ - H5F.lo H5Fint.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fdeprec.lo \ - H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo \ - H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \ - H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ - H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo \ - H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \ - H5FDmpi.lo H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo \ - H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo \ - H5FSsection.lo H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo \ - H5Gcache.lo H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo \ - H5Gint.lo H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo \ - H5Goh.lo H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo \ - H5HF.lo H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ + H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5ACmpio.lo H5B.lo \ + H5Bcache.lo H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo \ + H5B2hdr.lo H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo \ + H5Cmpio.lo H5CS.lo H5D.lo H5Dbtree.lo H5Dchunk.lo \ + H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo H5Ddeprec.lo H5Defl.lo \ + H5Dfill.lo H5Dint.lo H5Dio.lo H5Dlayout.lo H5Dmpio.lo H5Doh.lo \ + H5Dscatgath.lo H5Dselect.lo H5Dtest.lo H5E.lo H5Edeprec.lo \ + H5Eint.lo H5EA.lo H5EAcache.lo H5EAdbg.lo H5EAdblkpage.lo \ + H5EAdblock.lo H5EAhdr.lo H5EAiblock.lo H5EAint.lo \ + H5EAsblock.lo H5EAstat.lo H5EAtest.lo H5F.lo H5Fint.lo \ + H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fdeprec.lo H5Fefc.lo \ + H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo H5Fquery.lo \ + H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo H5Ftest.lo H5FA.lo \ + H5FAcache.lo H5FAdbg.lo H5FAdblock.lo H5FAdblkpage.lo \ + H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo H5FDcore.lo \ + H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ + H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo H5FDstdio.lo \ + H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ + H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ + H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ + H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ + H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo \ + H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \ H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \ @@ -723,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 213 +LT_VERS_REVISION = 214 LT_VERS_AGE = 0 # Our main target, the HDF5 library @@ -740,9 +741,11 @@ DISTCLEANFILES = H5pubconf.h # library sources libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5ACmpio.c H5B.c H5Bcache.c H5Bdbg.c \ + H5AC.c H5ACmpio.c \ + H5B.c H5Bcache.c H5Bdbg.c \ H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \ - H5C.c H5Cmpio.c H5CS.c \ + H5C.c H5Cmpio.c \ + H5CS.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ @@ -980,8 +983,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bcache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bdbg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5C.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5CS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5D.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dbtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dchunk.Plo@am__quote@ -- cgit v0.12 From 7a72d82cdad8d8d83cbb457c5625dac65c8cd72a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 8 Jul 2015 08:22:07 -0500 Subject: [svn-r27346] remove reference to file removed from cmake_ext_mod --- MANIFEST | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index f8e7c75..e758f2c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2413,7 +2413,6 @@ ./config/cmake_ext_mod/CheckTypeSize.cmake ./config/cmake_ext_mod/ConfigureChecks.cmake -./config/cmake_ext_mod/CPack.Info.plist.in ./config/cmake_ext_mod/CTestCustom.cmake ./config/cmake_ext_mod/FindMPI.cmake ./config/cmake_ext_mod/FindSZIP.cmake -- cgit v0.12 From f4dbade23383ac849046b96685eeb99a2ecbf6bc Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 8 Jul 2015 15:02:56 -0500 Subject: [svn-r27350] updated missing cmake defines --- config/cmake/ConfigureChecks.cmake | 7 +++- config/cmake/HDF5UseFortran.cmake | 78 +++++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 31 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index d021758..1203878 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -149,7 +149,12 @@ endif (NOT WINDOWS) #----------------------------------------------------------------------------- # Check if C has __float128 extension #----------------------------------------------------------------------------- -CHECK_TYPE_SIZE("__float128" H5_HAVE_FLOAT128) +CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) +if(${HAVE_SIZEOF___FLOAT128}) + SET(H5_HAVE_FLOAT128 1) +else (${HAVE_SIZEOF___FLOAT128}) + SET(H5_HAVE_FLOAT128 0) +endif(${HAVE_SIZEOF___FLOAT128}) #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 156e3bb..39a4813 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -8,7 +8,7 @@ ENABLE_LANGUAGE (Fortran) # The provided CMake Fortran macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- -MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) +MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) # MSB CHECK WHY THIS CHECK? # if (NOT DEFINED ${RUN_RESULT_VAR}) message (STATUS "Detecting Fortran ${FUNCTION}") @@ -22,13 +22,15 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 "${CODE}" ) - TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} + TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" RUN_OUTPUT_VARIABLE OUTPUT ) + + set(${RETURN} ${OUTPUT}) #message ( "Test result1 ${RETURN} ") @@ -36,25 +38,25 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) #message ( "Test result2 ${CMAKE_MATCH_0} ") #message ( "Test result4 ${CMAKE_MATCH_1} ") #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result ${COMPILE_RESULT_VAR} ") + #message ( "Test result2 ${COMPILE_RESULT_VAR} ") #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result ${RUN_RESULT_VAR} ") + #message ( "Test result1 ${RUN_RESULT_VAR} ") #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - if (${RUN_RESULT_VAR}) - set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message (STATUS "Testing Fortran ${FUNCTION} - OK") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + if (${COMPILE_RESULT_VAR}) + if (${RUN_RESULT_VAR} MATCHES 0) + message (STATUS "Testing Fortran ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n" - ) - else (${RUN_RESULT_VAR}) - message (STATUS "Testing Fortran ${FUNCTION} - Fail") - set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + ) + else () + message (STATUS "Testing Fortran ${FUNCTION} - Fail") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" "${OUTPUT}\n\n") - endif (${RUN_RESULT_VAR}) + endif () + endif () # endif (NOT DEFINED ${RUN_RESULT_VAR}) ENDMACRO (FORTRAN_RUN) @@ -69,7 +71,11 @@ CHECK_FORTRAN_FEATURE(c_long_double " FORTRAN_HAVE_C_LONG_DOUBLE ) -set(H5_FORTRAN_HAVE_C_LONG_DOUBLE ${FORTRAN_HAVE_C_LONG_DOUBLE}) +if (${FORTRAN_HAVE_C_LONG_DOUBLE}) + set(FORTRAN_HAVE_C_LONG_DOUBLE 1) +else () + set(FORTRAN_HAVE_C_LONG_DOUBLE 0) +endif() # Check to see C_LONG_DOUBLE is different from C_DOUBLE @@ -100,6 +106,11 @@ CHECK_FORTRAN_FEATURE(c_long_double " FORTRAN_C_LONG_DOUBLE_IS_UNIQUE ) +if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) + set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) +else () + set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) +endif() ## Set the sizeof function for use later in the fortran tests if(FORTRAN_HAVE_STORAGE_SIZE) @@ -229,6 +240,7 @@ foreach( KIND ${VAR_KIND} ) endforeach(KIND) string(STRIP ${pack_int_sizeof} pack_int_sizeof) + #Remove trailing comma string(REGEX REPLACE ",$" "" pack_int_sizeof "${pack_int_sizeof}") #Remove spaces @@ -236,6 +248,7 @@ string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") +message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") # ********** # REALS # ********** @@ -274,6 +287,8 @@ string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") +message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") + #find the maximum kind of the real list(LENGTH VAR_KIND LEN_VAR_KIND) MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") @@ -321,7 +336,8 @@ list(GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND) list(GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) list(GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) -set(FORTRAN_SIZEOF_LONG_DOUBLE ${HDF_PREFIX}_SIZEOF_LONG_DOUBLE) +set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) +#set(H5_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) # remove the invalid kind from the list if(NOT(${SIZEOF___FLOAT128} EQUAL 0)) @@ -384,20 +400,22 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) #message ( "Test result ${RUN_RESULT_VAR} ") #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - if (${RUN_RESULT_VAR}) - set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}") - message (STATUS "Testing C ${FUNCTION} - OK") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n" - ) - else (${RUN_RESULT_VAR}) - message (STATUS "Testing C ${FUNCTION} - Fail") - set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") - endif (${RUN_RESULT_VAR}) + if (${COMPILE_RESULT_VAR}) + if (${RUN_RESULT_VAR} MATCHES 0) + set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}") + message (STATUS "Testing C ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the C ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else () + message (STATUS "Testing C ${FUNCTION} - Fail") + set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the C ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif () + endif() # endif (NOT DEFINED ${RUN_RESULT_VAR}) ENDMACRO (C_RUN) -- cgit v0.12 From 93eaaed7221b440aaf1c844d61783d14a6804130 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 8 Jul 2015 15:03:36 -0500 Subject: [svn-r27351] updated missing preprocessor defines --- fortran/src/H5_ff.F90 | 2 +- fortran/src/H5config_f.inc.cmake | 36 ++++++++++++------------------------ 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 3ef6331..3d954af 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -394,7 +394,7 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE #endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 -#ifdef H5_HAVE_FLOAT128 +#if H5_HAVE_FLOAT128 = 1 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 #endif diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index f751c20..2f987c3 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -29,7 +29,11 @@ #endif ! Define if the intrinsic C_LONG_DOUBLE exists -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ + +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 +#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#endif ! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE #define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ @@ -37,8 +41,13 @@ ! Define if the intrinsic module ISO_FORTRAN_ENV exists #define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@ -! Define the size of C's long double -#define H5_SIZEOF_LONG_DOUBLE @SIZEOF_LONG_DOUBLE@ + +! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + +#if H5_SIZEOF_LONG_DOUBLE==0 +#undef H5_SIZEOF_LONG_DOUBLE +#endif ! Define the maximum decimal precision for reals #define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ @@ -66,24 +75,3 @@ ! valid INTEGER KINDs (need to have a matching C counter-part) #define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ - -! should this be ${HDF_PREFIX} instead of H5 MSB -!#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ - -!#if H5_SIZEOF_LONG_DOUBLE==0 -!#undef H5_SIZEOF_LONG_DOUBLE -!#endif - -! Define if the C intrinsic __FLOAT128 exists -!#define H5_HAVE_FLOAT128 @HAVE_FLOAT128@ - -!#if H5_HAVE_FLOAT128==0 -!#undef H5_HAVE_FLOAT128 -!#endif - -! Define if INTEGER*16 is available -!#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ - -!#if H5_HAVE_Fortran_INTEGER_SIZEOF_16==0 -!#undef H5_HAVE_Fortran_INTEGER_SIZEOF_16 -!#endif -- cgit v0.12 From 5ed3e8a4a773d59b9d8c731551bf7ede05de0fd2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 8 Jul 2015 16:10:13 -0500 Subject: [svn-r27354] fixed #if spec --- fortran/src/H5_ff.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 3d954af..3d5f812 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -394,7 +394,7 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE #endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 -#if H5_HAVE_FLOAT128 = 1 +#if H5_HAVE_FLOAT128 == 1 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 #endif -- cgit v0.12 From b0afa2ab6157cf9519ce3fffccd40770157de214 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 8 Jul 2015 17:09:50 -0500 Subject: [svn-r27355] added generation of HL Fortran Interfaces for REALs --- MANIFEST | 1 + hl/fortran/src/H5HL_buildiface.F90 | 681 ++++++++ hl/fortran/src/H5LTff.F90 | 2670 +++--------------------------- hl/fortran/src/H5TBff.F90 | 499 +----- hl/fortran/src/Makefile.am | 28 +- hl/fortran/src/Makefile.in | 58 +- hl/fortran/src/hdf5_hl_fortrandll.def.in | 219 +-- hl/fortran/test/tstlite.F90 | 13 +- 8 files changed, 1032 insertions(+), 3137 deletions(-) create mode 100644 hl/fortran/src/H5HL_buildiface.F90 diff --git a/MANIFEST b/MANIFEST index 673025e..a21cf9a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2334,6 +2334,7 @@ ./hl/fortran/src/H5IMcc.h ./hl/fortran/src/H5IMfc.c ./hl/fortran/src/H5IMff.F90 +./hl/fortran/src/H5HL_buildiface.F90 ./hl/fortran/src/H5LTf90proto.h ./hl/fortran/src/H5LTfc.c ./hl/fortran/src/H5LTff.F90 diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 new file mode 100644 index 0000000..1f5e278 --- /dev/null +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -0,0 +1,681 @@ +!****p* Program/H5test_kind +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM test_kind + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + +! Generate Fortran H5LT* interfaces having multiple KIND interfaces. +! +! Developer's notes: +! +! Only interfaces with arrays of rank 7 and less are provided. Even-though the F2008 +! standard extended the maximum rank to 15, it was decided that they should use the +! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility +! with the Fortran 90/95 APIs codes which could never handle rank 8-15 array sizes. + + OPEN(11,FILE='H5LTff_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5_KINDff.F90',& +'!',& +'! NAME',& +'! H5_KIND',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5make_HLinterfaces.F90 to handle all the',& +'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& +'! are H5LT APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5make_HLinterfaces.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE H5LT" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE h5fortran_types' + WRITE(11,'(A)') ' USE H5LT_CONST' + WRITE(11,'(A)') ' IMPLICIT NONE' +!*************** +! H5LT INTERFACES +!*************** +! +! H5LTmake_dataset_f +! + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltmake_dataset_float_f + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_float_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltmake_dataset_double_f + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_double_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_float_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_float_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_double_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_double_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +!********************** +! H5LT APIs +!********************** +! +! h5ltmake_dataset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,type_id,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,type_id,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltmake_dataset_float_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_float_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltmake_dataset_double_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_double_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + + WRITE(11,'(A)') 'END MODULE H5LT' ! change this to be generic MSB + + CLOSE(11) + + + OPEN(11,FILE='H5TBff_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5TBff_gen.F90',& +'!',& +'! NAME',& +'! H5_KIND',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5make_HLinterfaces.F90 to handle all the',& +'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& +'! are H5LT APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5make_HLinterfaces.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE H5TB" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE h5fortran_types' + WRITE(11,'(A)') ' USE H5TB_CONST' + WRITE(11,'(A)') ' IMPLICIT NONE' + +!*************** +! H5TB INTERFACES +!*************** + +! h5tbwrite_field_name_f + WRITE(11,'(A)') " INTERFACE h5tbwrite_field_name_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k =2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbread_field_name_f + WRITE(11,'(A)') " INTERFACE h5tbread_field_name_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbwrite_field_index_f + WRITE(11,'(A)') " INTERFACE h5tbwrite_field_index_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbread_field_index_f + WRITE(11,'(A)') " INTERFACE h5tbread_field_index_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbinsert_field_f + WRITE(11,'(A)') " INTERFACE h5tbinsert_field_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbinsert_field_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + + !********************** + ! H5TB APIs + !********************** + + ! h5tbwrite_field_name_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbread_field_name_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbwrite_field_index_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') & + ' errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbread_field_index_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') & + ' errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbinsert_field_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,field_type,field_index,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: field_type' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(in), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' INTEGER :: errcode' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,field_type,field_index,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + WRITE(11,'(A)') 'END MODULE H5TB' ! change this to be generic MSB + + CLOSE(11) + +END PROGRAM test_kind + + + diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 092cdd9..ffc7ab5 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -32,7 +32,7 @@ #include -MODULE h5lt +MODULE H5LT_CONST USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 @@ -45,29 +45,6 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_f_int5 MODULE PROCEDURE h5ltmake_dataset_f_int6 MODULE PROCEDURE h5ltmake_dataset_f_int7 - MODULE PROCEDURE h5ltmake_dataset_f_c_float1 - MODULE PROCEDURE h5ltmake_dataset_f_c_float2 - MODULE PROCEDURE h5ltmake_dataset_f_c_float3 - MODULE PROCEDURE h5ltmake_dataset_f_c_float4 - MODULE PROCEDURE h5ltmake_dataset_f_c_float5 - MODULE PROCEDURE h5ltmake_dataset_f_c_float6 - MODULE PROCEDURE h5ltmake_dataset_f_c_float7 - MODULE PROCEDURE h5ltmake_dataset_f_c_double1 - MODULE PROCEDURE h5ltmake_dataset_f_c_double2 - MODULE PROCEDURE h5ltmake_dataset_f_c_double3 - MODULE PROCEDURE h5ltmake_dataset_f_c_double4 - MODULE PROCEDURE h5ltmake_dataset_f_c_double5 - MODULE PROCEDURE h5ltmake_dataset_f_c_double6 - MODULE PROCEDURE h5ltmake_dataset_f_c_double7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double1 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double2 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double3 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double4 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double5 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double6 - MODULE PROCEDURE h5ltmake_dataset_f_c_long_double7 -#endif MODULE PROCEDURE h5ltmake_dataset_f_ptr END INTERFACE @@ -79,29 +56,6 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_f_int5 MODULE PROCEDURE h5ltread_dataset_f_int6 MODULE PROCEDURE h5ltread_dataset_f_int7 - MODULE PROCEDURE h5ltread_dataset_f_c_float1 - MODULE PROCEDURE h5ltread_dataset_f_c_float2 - MODULE PROCEDURE h5ltread_dataset_f_c_float3 - MODULE PROCEDURE h5ltread_dataset_f_c_float4 - MODULE PROCEDURE h5ltread_dataset_f_c_float5 - MODULE PROCEDURE h5ltread_dataset_f_c_float6 - MODULE PROCEDURE h5ltread_dataset_f_c_float7 - MODULE PROCEDURE h5ltread_dataset_f_c_double1 - MODULE PROCEDURE h5ltread_dataset_f_c_double2 - MODULE PROCEDURE h5ltread_dataset_f_c_double3 - MODULE PROCEDURE h5ltread_dataset_f_c_double4 - MODULE PROCEDURE h5ltread_dataset_f_c_double5 - MODULE PROCEDURE h5ltread_dataset_f_c_double6 - MODULE PROCEDURE h5ltread_dataset_f_c_double7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double1 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double2 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double3 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double4 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double5 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double6 - MODULE PROCEDURE h5ltread_dataset_f_c_long_double7 -#endif MODULE PROCEDURE h5ltread_dataset_f_ptr END INTERFACE @@ -115,58 +69,6 @@ MODULE h5lt MODULE PROCEDURE h5ltmake_dataset_int_f_7 END INTERFACE - INTERFACE h5ltmake_dataset_float_f - MODULE PROCEDURE h5ltmake_dataset_c_float_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_7 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 -#endif - END INTERFACE - - INTERFACE h5ltmake_dataset_double_f - MODULE PROCEDURE h5ltmake_dataset_c_float_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_float_f_7 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_double_f_7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_c_long_double_f_7 -#endif - END INTERFACE - INTERFACE h5ltread_dataset_int_f MODULE PROCEDURE h5ltread_dataset_int_f_1 MODULE PROCEDURE h5ltread_dataset_int_f_2 @@ -177,58 +79,6 @@ MODULE h5lt MODULE PROCEDURE h5ltread_dataset_int_f_7 END INTERFACE - INTERFACE h5ltread_dataset_float_f - MODULE PROCEDURE h5ltread_dataset_c_float_f_1 - MODULE PROCEDURE h5ltread_dataset_c_float_f_2 - MODULE PROCEDURE h5ltread_dataset_c_float_f_3 - MODULE PROCEDURE h5ltread_dataset_c_float_f_4 - MODULE PROCEDURE h5ltread_dataset_c_float_f_5 - MODULE PROCEDURE h5ltread_dataset_c_float_f_6 - MODULE PROCEDURE h5ltread_dataset_c_float_f_7 - MODULE PROCEDURE h5ltread_dataset_c_double_f_1 - MODULE PROCEDURE h5ltread_dataset_c_double_f_2 - MODULE PROCEDURE h5ltread_dataset_c_double_f_3 - MODULE PROCEDURE h5ltread_dataset_c_double_f_4 - MODULE PROCEDURE h5ltread_dataset_c_double_f_5 - MODULE PROCEDURE h5ltread_dataset_c_double_f_6 - MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_4 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 -#endif - END INTERFACE - - INTERFACE h5ltread_dataset_double_f - MODULE PROCEDURE h5ltread_dataset_c_float_f_1 - MODULE PROCEDURE h5ltread_dataset_c_float_f_2 - MODULE PROCEDURE h5ltread_dataset_c_float_f_3 - MODULE PROCEDURE h5ltread_dataset_c_float_f_4 - MODULE PROCEDURE h5ltread_dataset_c_float_f_5 - MODULE PROCEDURE h5ltread_dataset_c_float_f_6 - MODULE PROCEDURE h5ltread_dataset_c_float_f_7 - MODULE PROCEDURE h5ltread_dataset_c_double_f_1 - MODULE PROCEDURE h5ltread_dataset_c_double_f_2 - MODULE PROCEDURE h5ltread_dataset_c_double_f_3 - MODULE PROCEDURE h5ltread_dataset_c_double_f_4 - MODULE PROCEDURE h5ltread_dataset_c_double_f_5 - MODULE PROCEDURE h5ltread_dataset_c_double_f_6 - MODULE PROCEDURE h5ltread_dataset_c_double_f_7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_1 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_2 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_3 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_4 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_5 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_6 - MODULE PROCEDURE h5ltread_dataset_c_long_double_f_7 -#endif - END INTERFACE - INTERFACE INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & BIND(C,NAME='h5ltmake_dataset_c') @@ -527,16 +377,53 @@ CONTAINS END SUBROUTINE h5ltmake_dataset_f_int7 + !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_c_float(1-7) + ! Function(s): h5ltread_dataset_f_ptr ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: Apr 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& + dset_name,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + TYPE(C_PTR) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) + + END SUBROUTINE h5ltread_dataset_f_ptr + + !------------------------------------------------------------------------- + ! Function(s): h5ltread_dataset_f_int(1-7) + ! + ! Purpose: Read a dataset of a type TYPE_ID ! ! Return: Success: 0, Failure: -1 ! ! Programmer: pvn@ncsa.uiuc.edu ! - ! Date: September 1, 2004 + ! Date: September 22, 2004 ! ! Comments: ! @@ -544,184 +431,209 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float1(loc_id,& + SUBROUTINE h5ltread_dataset_f_int1(loc_id,& dset_name,& - rank,& - dims,& type_id,& buf,& + dims,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float1 + END SUBROUTINE h5ltread_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_float2(loc_id,& + SUBROUTINE h5ltread_dataset_f_int2(loc_id,& dset_name,& - rank,& - dims,& type_id,& buf,& + dims,& errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float2 + END SUBROUTINE h5ltread_dataset_f_int2 - SUBROUTINE h5ltmake_dataset_f_c_float3(loc_id,& + SUBROUTINE h5ltread_dataset_f_int3(loc_id,& dset_name,& - rank,& - dims,& type_id,& buf,& + dims,& errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float3 + END SUBROUTINE h5ltread_dataset_f_int3 - SUBROUTINE h5ltmake_dataset_f_c_float4(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) + SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & + dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float4 + END SUBROUTINE h5ltread_dataset_f_int4 - SUBROUTINE h5ltmake_dataset_f_c_float5(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) + SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & + dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float5 + END SUBROUTINE h5ltread_dataset_f_int5 - SUBROUTINE h5ltmake_dataset_f_c_float6(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & + dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_float6 + END SUBROUTINE h5ltread_dataset_f_int6 - SUBROUTINE h5ltmake_dataset_f_c_float7(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) + SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & + dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int7 - END SUBROUTINE h5ltmake_dataset_f_c_float7 !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_c_double(1-7) + ! Function: h5ltmake_dataset_int_f_1 ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type ! ! Return: Success: 0, Failure: -1 ! ! Programmer: pvn@ncsa.uiuc.edu ! - ! Date: September 1, 2004 + ! Date: September 22, 2004 ! ! Comments: ! @@ -729,11 +641,10 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_c_double1(loc_id,& + SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& dset_name,& rank,& dims,& - type_id,& buf,& errcode ) @@ -742,24 +653,22 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr - + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double1 + END SUBROUTINE h5ltmake_dataset_int_f_1 - SUBROUTINE h5ltmake_dataset_f_c_double2(loc_id,& + SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& dset_name,& rank,& dims,& - type_id,& buf,& errcode ) @@ -768,25 +677,23 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double2 + END SUBROUTINE h5ltmake_dataset_int_f_2 - SUBROUTINE h5ltmake_dataset_f_c_double3(loc_id,& + SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& dset_name,& rank,& dims,& - type_id,& buf,& errcode ) @@ -795,2105 +702,107 @@ CONTAINS CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1)) + namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double3 + END SUBROUTINE h5ltmake_dataset_int_f_3 - SUBROUTINE h5ltmake_dataset_f_c_double4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) + SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)), TARGET :: buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1)) + namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double4 + END SUBROUTINE h5ltmake_dataset_int_f_4 - SUBROUTINE h5ltmake_dataset_f_c_double5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) + SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1)) + namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double5 + END SUBROUTINE h5ltmake_dataset_int_f_5 + + SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + buf, errcode ) - SUBROUTINE h5ltmake_dataset_f_c_double6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1)) + namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double6 + END SUBROUTINE h5ltmake_dataset_int_f_6 - SUBROUTINE h5ltmake_dataset_f_c_double7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) + SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + buf, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER, INTENT(in) :: rank ! rank INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltmake_dataset_f_c_double7 + END SUBROUTINE h5ltmake_dataset_int_f_7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_c_long_double(1-7) + ! Function(s): h5ltread_dataset_int_f_(1-7) ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_c_long_double1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double1 - - SUBROUTINE h5ltmake_dataset_f_c_long_double2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double2 - - SUBROUTINE h5ltmake_dataset_f_c_long_double3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double3 - - SUBROUTINE h5ltmake_dataset_f_c_long_double4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double4 - - SUBROUTINE h5ltmake_dataset_f_c_long_double5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double5 - SUBROUTINE h5ltmake_dataset_f_c_long_double6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double6 - - SUBROUTINE h5ltmake_dataset_f_c_long_double7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_c_long_double7 - -#endif - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_ptr - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: Apr 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& - dset_name,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - TYPE(C_PTR) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) - - END SUBROUTINE h5ltread_dataset_f_ptr - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_int(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int2 - - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int3 - - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int4 - - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int6 - - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_c_float(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_c_float1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float1 - - SUBROUTINE h5ltread_dataset_f_c_float2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float2 - - SUBROUTINE h5ltread_dataset_f_c_float3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float3 - - SUBROUTINE h5ltread_dataset_f_c_float4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float4 - - SUBROUTINE h5ltread_dataset_f_c_float5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_c_float6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_c_float6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float6 - - SUBROUTINE h5ltread_dataset_f_c_float7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_float7 - - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_c_double(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_c_double1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_DOUBLE), INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double1 - - SUBROUTINE h5ltread_dataset_f_c_double2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double2 - - SUBROUTINE h5ltread_dataset_f_c_double3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double3 - - SUBROUTINE h5ltread_dataset_f_c_double4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double4 - - SUBROUTINE h5ltread_dataset_f_c_double5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double5 - - SUBROUTINE h5ltread_dataset_f_c_double6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double6 - - SUBROUTINE h5ltread_dataset_f_c_double7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_double7 -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_c_long_double(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_c_long_double1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double1 - - SUBROUTINE h5ltread_dataset_f_c_long_double2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double2 - - SUBROUTINE h5ltread_dataset_f_c_long_double3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double3 - - SUBROUTINE h5ltread_dataset_f_c_long_double4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double4 - - SUBROUTINE h5ltread_dataset_f_c_long_double5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double5 - - SUBROUTINE h5ltread_dataset_f_c_long_double6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double6 - - SUBROUTINE h5ltread_dataset_f_c_long_double7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_c_long_double7 -#endif - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_1 - - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_2 - - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_3 - - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_4 - - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_5 - - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_6 - - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_7 - - !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_c_float_f_(1-7) - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_REAL type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_c_float_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_1 - - SUBROUTINE h5ltmake_dataset_c_float_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_2 - - SUBROUTINE h5ltmake_dataset_c_float_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_3 - - SUBROUTINE h5ltmake_dataset_c_float_f_4 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_4 - - SUBROUTINE h5ltmake_dataset_c_float_f_5 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_5 - - SUBROUTINE h5ltmake_dataset_c_float_f_6 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_6 - - SUBROUTINE h5ltmake_dataset_c_float_f_7 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_float_f_7 - - !------------------------------------------------------------------------- - ! Function9s): h5ltmake_dataset_c_double_f_(1-7) - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_c_double_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_1 - - SUBROUTINE h5ltmake_dataset_c_double_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_2 - - SUBROUTINE h5ltmake_dataset_c_double_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_3 - - SUBROUTINE h5ltmake_dataset_c_double_f_4 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_4 - - SUBROUTINE h5ltmake_dataset_c_double_f_5 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_5 - - SUBROUTINE h5ltmake_dataset_c_double_f_6 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_6 - - SUBROUTINE h5ltmake_dataset_c_double_f_7 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_double_f_7 - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_c_long_double_f_(1-7) - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_c_long_double_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_1 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_2 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_3 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_4 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_4 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_5 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_5 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_6 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_6 - - SUBROUTINE h5ltmake_dataset_c_long_double_f_7 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltmake_dataset_c_long_double_f_7 -#endif - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_int_f_(1-7) - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_1 - - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_2 - - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_3 - - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_4 - - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_5 - - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_6 - - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_7 - - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_c_float_f_(1-7) - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_c_float_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_1 - - SUBROUTINE h5ltread_dataset_c_float_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_2 - - SUBROUTINE h5ltread_dataset_c_float_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_3 - - SUBROUTINE h5ltread_dataset_c_float_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_4 - - SUBROUTINE h5ltread_dataset_c_float_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_5 - - SUBROUTINE h5ltread_dataset_c_float_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_6 - - SUBROUTINE h5ltread_dataset_c_float_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_FLOAT), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_float_f_7 - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_c_double_f_(1-7) - ! - ! Purpose: Read a dataset + ! Purpose: Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -2907,30 +816,30 @@ CONTAINS ! !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_c_double_f_1(loc_id,& + SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& dset_name,& buf,& dims,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_double_f_1 + END SUBROUTINE h5ltread_dataset_int_f_1 - SUBROUTINE h5ltread_dataset_c_double_f_2(loc_id,& + SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& dset_name,& buf,& dims,& @@ -2942,18 +851,18 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_double_f_2 + END SUBROUTINE h5ltread_dataset_int_f_2 - SUBROUTINE h5ltread_dataset_c_double_f_3(loc_id,& + SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& dset_name,& buf,& dims,& @@ -2965,18 +874,18 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_double_f_3 + END SUBROUTINE h5ltread_dataset_int_f_3 - SUBROUTINE h5ltread_dataset_c_double_f_4(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -2984,18 +893,18 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_double_f_4 + END SUBROUTINE h5ltread_dataset_int_f_4 - SUBROUTINE h5ltread_dataset_c_double_f_5(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3003,18 +912,18 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_double_f_5 + END SUBROUTINE h5ltread_dataset_int_f_5 - SUBROUTINE h5ltread_dataset_c_double_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3022,162 +931,18 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_double_f_6 - - SUBROUTINE h5ltread_dataset_c_double_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_double_f_7 - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - !------------------------------------------------------------------------- - ! Function9s): h5ltread_dataset_c_long_double_f_(1-7) - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_c_long_double_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_1 - - SUBROUTINE h5ltread_dataset_c_long_double_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_2 - - SUBROUTINE h5ltread_dataset_c_long_double_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_3 - - SUBROUTINE h5ltread_dataset_c_long_double_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_4 - - SUBROUTINE h5ltread_dataset_c_long_double_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - END SUBROUTINE h5ltread_dataset_c_long_double_f_5 + END SUBROUTINE h5ltread_dataset_int_f_6 - SUBROUTINE h5ltread_dataset_c_long_double_f_6(loc_id, dset_name, buf, dims, errcode ) + SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier @@ -3185,36 +950,17 @@ CONTAINS INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) - - END SUBROUTINE h5ltread_dataset_c_long_double_f_6 - - SUBROUTINE h5ltread_dataset_c_long_double_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL(KIND=C_LONG_DOUBLE), INTENT(inout), & + INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_7 - END SUBROUTINE h5ltread_dataset_c_long_double_f_7 -#endif !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_string_f @@ -4157,7 +1903,7 @@ CONTAINS END SUBROUTINE h5ltpath_valid_f -END MODULE H5LT +END MODULE H5LT_CONST diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 50eab2d..448d607 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -32,7 +32,7 @@ ! #include "H5config_f.inc" -MODULE h5tb +MODULE h5tb_CONST USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types @@ -40,51 +40,26 @@ MODULE h5tb INTERFACE h5tbwrite_field_name_f MODULE PROCEDURE h5tbwrite_field_name_f_int - MODULE PROCEDURE h5tbwrite_field_name_f_c_float - MODULE PROCEDURE h5tbwrite_field_name_f_c_double -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5tbwrite_field_name_f_c_long_double -#endif MODULE PROCEDURE h5tbwrite_field_name_f_string END INTERFACE INTERFACE h5tbread_field_name_f MODULE PROCEDURE h5tbread_field_name_f_int - MODULE PROCEDURE h5tbread_field_name_f_c_float - MODULE PROCEDURE h5tbread_field_name_f_c_double -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5tbread_field_name_f_c_long_double -#endif MODULE PROCEDURE h5tbread_field_name_f_string END INTERFACE INTERFACE h5tbwrite_field_index_f MODULE PROCEDURE h5tbwrite_field_index_f_int - MODULE PROCEDURE h5tbwrite_field_index_f_c_float - MODULE PROCEDURE h5tbwrite_field_index_f_c_double -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5tbwrite_field_index_f_c_long_double -#endif MODULE PROCEDURE h5tbwrite_field_index_f_string END INTERFACE INTERFACE h5tbread_field_index_f MODULE PROCEDURE h5tbread_field_index_f_int - MODULE PROCEDURE h5tbread_field_index_f_c_float - MODULE PROCEDURE h5tbread_field_index_f_c_double -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5tbread_field_index_f_c_long_double -#endif MODULE PROCEDURE h5tbread_field_index_f_string END INTERFACE INTERFACE h5tbinsert_field_f MODULE PROCEDURE h5tbinsert_field_f_int - MODULE PROCEDURE h5tbinsert_field_f_c_float - MODULE PROCEDURE h5tbinsert_field_f_c_double -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - MODULE PROCEDURE h5tbinsert_field_f_c_long_double -#endif MODULE PROCEDURE h5tbinsert_field_f_string END INTERFACE @@ -348,105 +323,6 @@ CONTAINS END SUBROUTINE h5tbwrite_field_name_f_int - SUBROUTINE h5tbwrite_field_name_f_c_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_name_f_c_float - - SUBROUTINE h5tbwrite_field_name_f_c_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_name_f_c_double - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - SUBROUTINE h5tbwrite_field_name_f_c_long_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_name_f_c_long_double -#endif SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& dset_name,& @@ -530,104 +406,6 @@ CONTAINS END SUBROUTINE h5tbread_field_name_f_int - SUBROUTINE h5tbread_field_name_f_c_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_name_f_c_float - - SUBROUTINE h5tbread_field_name_f_c_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_name_f_c_double - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - SUBROUTINE h5tbread_field_name_f_c_long_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_name_f_c_long_double -#endif - SUBROUTINE h5tbread_field_name_f_string(loc_id,& dset_name,& field_name,& @@ -706,98 +484,6 @@ CONTAINS END SUBROUTINE h5tbwrite_field_index_f_int - SUBROUTINE h5tbwrite_field_index_f_c_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_index_f_c_float - - SUBROUTINE h5tbwrite_field_index_f_c_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_index_f_c_double - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - SUBROUTINE h5tbwrite_field_index_f_c_long_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_index_f_c_long_double -#endif - SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& dset_name,& field_index,& @@ -872,96 +558,6 @@ CONTAINS END SUBROUTINE h5tbread_field_index_f_int - SUBROUTINE h5tbread_field_index_f_c_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_index_f_c_float - - SUBROUTINE h5tbread_field_index_f_c_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_index_f_c_double - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - SUBROUTINE h5tbread_field_index_f_c_long_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_index_f_c_long_double -#endif - SUBROUTINE h5tbread_field_index_f_string(loc_id,& dset_name,& field_index,& @@ -1035,95 +631,6 @@ CONTAINS END SUBROUTINE h5tbinsert_field_f_int - SUBROUTINE h5tbinsert_field_f_c_float(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) - - END SUBROUTINE h5tbinsert_field_f_c_float - - SUBROUTINE h5tbinsert_field_f_c_double(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) - - END SUBROUTINE h5tbinsert_field_f_c_double - -#if FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - SUBROUTINE h5tbinsert_field_f_c_long_double(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL(KIND=C_LONG_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) - - END SUBROUTINE h5tbinsert_field_f_c_long_double -#endif - SUBROUTINE h5tbinsert_field_f_string(loc_id,& dset_name,& field_name,& @@ -1202,8 +709,6 @@ CONTAINS END SUBROUTINE h5tbdelete_field_f - - !------------------------------------------------------------------------- ! Function: h5tbget_table_info_f ! @@ -1334,7 +839,7 @@ CONTAINS END SUBROUTINE h5tbget_field_info_f -END MODULE H5TB +END MODULE H5TB_CONST diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 0668230..bbb6c6b 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -46,8 +46,10 @@ endif #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 +libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 H5LTff_gen.F90 H5TBff_gen.F90 + +#H5LTff_gen.F90 H5TBff_gen.F90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) @@ -60,7 +62,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ fi install-data-local: @@ -75,6 +77,23 @@ uninstall-local: fi; \ fi +# These are the helper programs we need to build. +noinst_PROGRAMS = H5HL_buildiface + +# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. + +H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) + +H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +# H5HL_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. + +H5HL_buildiface_SOURCES = H5HL_buildiface.F90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the @@ -83,5 +102,6 @@ H5DSff.lo: $(srcdir)/H5DSff.F90 H5LTff.lo: $(srcdir)/H5LTff.F90 H5IMff.lo: $(srcdir)/H5IMff.F90 H5TBff.lo: $(srcdir)/H5TBff.F90 - +H5LTff_gen.lo: H5LTff_gen.F90 +H5TBff_gen.lo: H5LTff_gen.F90 H5TBff_gen.F90 include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 7328e76..11d53ff 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -31,6 +31,7 @@ # # HDF5 High-Level Fortran Makefile(.in) + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -105,6 +106,7 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static +noinst_PROGRAMS = H5HL_buildiface$(EXEEXT) TESTS = subdir = hl/fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -148,7 +150,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5hl_fortran_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5F) am_libhdf5hl_fortran_la_OBJECTS = H5DSfc.lo H5LTfc.lo H5IMfc.lo \ - H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo + H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo \ + H5LTff_gen.lo H5TBff_gen.lo libhdf5hl_fortran_la_OBJECTS = $(am_libhdf5hl_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -158,6 +161,10 @@ libhdf5hl_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5hl_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ +PROGRAMS = $(noinst_PROGRAMS) +am_H5HL_buildiface_OBJECTS = H5HL_buildiface.$(OBJEXT) +H5HL_buildiface_OBJECTS = $(am_H5HL_buildiface_OBJECTS) +H5HL_buildiface_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -210,8 +217,9 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libhdf5hl_fortran_la_SOURCES) -DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) +SOURCES = $(libhdf5hl_fortran_la_SOURCES) $(H5HL_buildiface_SOURCES) +DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) \ + $(H5HL_buildiface_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -717,13 +725,21 @@ libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVI #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 +libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 H5LTff_gen.F90 H5TBff_gen.F90 + +#H5LTff_gen.F90 H5TBff_gen.F90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F) +#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +# H5HL_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. +H5HL_buildiface_SOURCES = H5HL_buildiface.F90 + # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -817,6 +833,19 @@ clean-libLTLIBRARIES: libhdf5hl_fortran.la: $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_DEPENDENCIES) $(EXTRA_libhdf5hl_fortran_la_DEPENDENCIES) $(AM_V_FCLD)$(libhdf5hl_fortran_la_LINK) -rpath $(libdir) $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_LIBADD) $(LIBS) +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +H5HL_buildiface$(EXEEXT): $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_DEPENDENCIES) $(EXTRA_H5HL_buildiface_DEPENDENCIES) + @rm -f H5HL_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1095,7 +1124,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1136,7 +1165,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ - mostlyclean-am + clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1209,8 +1238,8 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-local cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-local distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ @@ -1258,7 +1287,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ fi install-data-local: @@ -1273,6 +1302,13 @@ uninstall-local: fi; \ fi +# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. + +H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) + +H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the @@ -1281,6 +1317,8 @@ H5DSff.lo: $(srcdir)/H5DSff.F90 H5LTff.lo: $(srcdir)/H5LTff.F90 H5IMff.lo: $(srcdir)/H5IMff.F90 H5TBff.lo: $(srcdir)/H5TBff.F90 +H5LTff_gen.lo: H5LTff_gen.F90 +H5TBff_gen.lo: H5LTff_gen.F90 H5TBff_gen.F90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in index d294ad7..eb07316 100644 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -23,163 +23,64 @@ H5IM_mp_H5IMGET_PALETTE_INFO_F H5IM_mp_H5IMGET_PALETTE_F H5IM_mp_H5IMIS_PALETTE_F ; H5LT -H5LT_mp_H5LTMAKE_DATASET_F_PTR -H5LT_mp_H5LTMAKE_DATASET_F_INT1 -H5LT_mp_H5LTMAKE_DATASET_F_INT2 -H5LT_mp_H5LTMAKE_DATASET_F_INT3 -H5LT_mp_H5LTMAKE_DATASET_F_INT4 -H5LT_mp_H5LTMAKE_DATASET_F_INT5 -H5LT_mp_H5LTMAKE_DATASET_F_INT6 -H5LT_mp_H5LTMAKE_DATASET_F_INT7 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT1 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT2 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT3 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT4 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT5 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT6 -H5LT_mp_H5LTMAKE_DATASET_F_C_FLOAT7 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE1 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE2 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE3 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE4 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE5 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE6 -H5LT_mp_H5LTMAKE_DATASET_F_C_DOUBLE7 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE1 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE2 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE3 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE4 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE5 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE6 -H5LT_mp_H5LTMAKE_DATASET_F_C_LONG_DOUBLE7 -H5LT_mp_H5LTREAD_DATASET_F_PTR -H5LT_mp_H5LTREAD_DATASET_F_INT1 -H5LT_mp_H5LTREAD_DATASET_F_INT2 -H5LT_mp_H5LTREAD_DATASET_F_INT3 -H5LT_mp_H5LTREAD_DATASET_F_INT4 -H5LT_mp_H5LTREAD_DATASET_F_INT5 -H5LT_mp_H5LTREAD_DATASET_F_INT6 -H5LT_mp_H5LTREAD_DATASET_F_INT7 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT1 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT2 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT3 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT4 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT5 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT6 -H5LT_mp_H5LTREAD_DATASET_F_C_FLOAT7 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE1 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE2 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE3 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE4 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE5 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE6 -H5LT_mp_H5LTREAD_DATASET_F_C_DOUBLE7 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE1 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE2 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE3 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE4 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE5 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE6 -H5LT_mp_H5LTREAD_DATASET_F_C_LONG_DOUBLE7 -H5LT_mp_H5LTMAKE_DATASET_INT_F_1 -H5LT_mp_H5LTMAKE_DATASET_INT_F_2 -H5LT_mp_H5LTMAKE_DATASET_INT_F_3 -H5LT_mp_H5LTMAKE_DATASET_INT_F_4 -H5LT_mp_H5LTMAKE_DATASET_INT_F_5 -H5LT_mp_H5LTMAKE_DATASET_INT_F_6 -H5LT_mp_H5LTMAKE_DATASET_INT_F_7 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_1 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_2 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_3 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_4 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_6 -H5LT_mp_H5LTMAKE_DATASET_C_FLOAT_F_7 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_1 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_2 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_3 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_4 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_DOUBLE_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_1 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_2 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_3 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_4 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 -H5LT_mp_H5LTMAKE_DATASET_C_LONG_DOUBLE_F_5 -H5LT_mp_H5LTREAD_DATASET_INT_F_1 -H5LT_mp_H5LTREAD_DATASET_INT_F_2 -H5LT_mp_H5LTREAD_DATASET_INT_F_3 -H5LT_mp_H5LTREAD_DATASET_INT_F_4 -H5LT_mp_H5LTREAD_DATASET_INT_F_5 -H5LT_mp_H5LTREAD_DATASET_INT_F_6 -H5LT_mp_H5LTREAD_DATASET_INT_F_7 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_1 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_2 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_3 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_4 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_5 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_6 -H5LT_mp_H5LTREAD_DATASET_C_FLOAT_F_7 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_1 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_2 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_3 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_4 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_5 -H5LT_mp_H5LTREAD_DATASET_C_DOUBLE_F_6 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_7 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_1 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_2 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_3 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_4 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_5 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_6 -H5LT_mp_H5LTREAD_DATASET_C_LONG_DOUBLE_F_7 -H5LT_mp_H5LTMAKE_DATASET_STRING_F -H5LT_mp_H5LTREAD_DATASET_STRING_F -H5LT_mp_H5LTSET_ATTRIBUTE_INT_F -H5LT_mp_H5LTSET_ATTRIBUTE_FLOAT_F -H5LT_mp_H5LTSET_ATTRIBUTE_DOUBLE_F -H5LT_mp_H5LTSET_ATTRIBUTE_STRING_F -H5LT_mp_H5LTGET_ATTRIBUTE_INT_F -H5LT_mp_H5LTGET_ATTRIBUTE_FLOAT_F -H5LT_mp_H5LTGET_ATTRIBUTE_DOUBLE_F -H5LT_mp_H5LTGET_ATTRIBUTE_STRING_F -H5LT_mp_H5LTGET_DATASET_NDIMS_F -H5LT_mp_H5LTFIND_DATASET_F -H5LT_mp_H5LTGET_DATASET_INFO_F -H5LT_mp_H5LTGET_ATTRIBUTE_NDIMS_F -H5LT_mp_H5LTGET_ATTRIBUTE_INFO_F -H5LT_mp_H5LTPATH_VALID_F +H5LT_CONST_mp_H5LTMAKE_DATASET_F_PTR +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT1 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT2 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT3 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT4 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT5 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT6 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT7 +H5LT_CONST_mp_H5LTREAD_DATASET_F_PTR +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT1 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT2 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT3 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT4 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT5 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT6 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT7 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_1 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_2 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_3 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_4 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_5 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_6 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_7 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_1 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_2 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_3 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_4 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_5 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_6 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_7 +H5LT_CONST_mp_H5LTMAKE_DATASET_STRING_F +H5LT_CONST_mp_H5LTREAD_DATASET_STRING_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_INT_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_FLOAT_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_DOUBLE_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_STRING_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INT_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_FLOAT_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_DOUBLE_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_STRING_F +H5LT_CONST_mp_H5LTGET_DATASET_NDIMS_F +H5LT_CONST_mp_H5LTFIND_DATASET_F +H5LT_CONST_mp_H5LTGET_DATASET_INFO_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_NDIMS_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INFO_F +H5LT_CONST_mp_H5LTPATH_VALID_F ; H5TB -H5TB_mp_H5TBMAKE_TABLE_F -H5TB_mp_H5TBWRITE_FIELD_NAME_F_INT -H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_FLOAT -H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_DOUBLE -H5TB_mp_H5TBWRITE_FIELD_NAME_F_C_LONG_DOUBLE -H5TB_mp_H5TBWRITE_FIELD_NAME_F_STRING -H5TB_mp_H5TBREAD_FIELD_NAME_F_INT -H5TB_mp_H5TBREAD_FIELD_NAME_F_C_FLOAT -H5TB_mp_H5TBREAD_FIELD_NAME_F_C_DOUBLE -H5TB_mp_H5TBREAD_FIELD_NAME_F_C_LONG_DOUBLE -H5TB_mp_H5TBREAD_FIELD_NAME_F_STRING -H5TB_mp_H5TBWRITE_FIELD_INDEX_F_INT -H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_FLOAT -H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_DOUBLE -H5TB_mp_H5TBWRITE_FIELD_INDEX_F_C_LONG_DOUBLE -H5TB_mp_H5TBWRITE_FIELD_INDEX_F_STRING -H5TB_mp_H5TBREAD_FIELD_INDEX_F_INT -H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_FLOAT -H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_DOUBLE -H5TB_mp_H5TBREAD_FIELD_INDEX_F_C_LONG_DOUBLE -H5TB_mp_H5TBREAD_FIELD_INDEX_F_STRING -H5TB_mp_H5TBINSERT_FIELD_F_INT -H5TB_mp_H5TBINSERT_FIELD_F_C_FLOAT -H5TB_mp_H5TBINSERT_FIELD_F_C_DOUBLE -H5TB_mp_H5TBINSERT_FIELD_F_C_LONG_DOUBLE -H5TB_mp_H5TBINSERT_FIELD_F_STRING -H5TB_mp_H5TBDELETE_FIELD_F -H5TB_mp_H5TBGET_TABLE_INFO_F -H5TB_mp_H5TBGET_FIELD_INFO_F +H5TB_CONST_mp_H5TBMAKE_TABLE_F +H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_INT +H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_STRING +H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_INT +H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_STRING +H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_INT +H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_STRING +H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_INT +H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_STRING +H5TB_CONST_mp_H5TBINSERT_FIELD_F_INT +H5TB_CONST_mp_H5TBINSERT_FIELD_F_STRING +H5TB_CONST_mp_H5TBDELETE_FIELD_F +H5TB_CONST_mp_H5TBGET_TABLE_INFO_F +H5TB_CONST_mp_H5TBGET_FIELD_INFO_F diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 index 4c1ca14..0eb005b 100644 --- a/hl/fortran/test/tstlite.F90 +++ b/hl/fortran/test/tstlite.F90 @@ -1539,20 +1539,23 @@ SUBROUTINE test_attributes() ! double !------------------------------------------------------------------------- - CALL test_begin(' Set/Get attributes double ') - #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf4(1)) #endif + + IF(SizeOf_buf_type.LT.16)THEN ! MSB can't handle 16 byte reals + + CALL test_begin(' Set/Get attributes double ') + ! ! write attribute. ! f_ptr = C_LOC(buf4(1)) CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) - !CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,f_ptr,"Real", SizeOf_buf_type, size, errcode) +! CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4, size, errcode) ! ! read attribute. @@ -1567,8 +1570,6 @@ SUBROUTINE test_attributes() f_ptr = C_LOC(bufr4(1)) CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) -! CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) - ! ! compare read and write buffers. ! @@ -1582,6 +1583,8 @@ SUBROUTINE test_attributes() CALL passed() + ENDIF + !------------------------------------------------------------------------- ! string !------------------------------------------------------------------------- -- cgit v0.12 From fc42b3efaa724c0caa6ff84bf5d8136a6aae22bb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 09:36:50 -0500 Subject: [svn-r27358] Fixed test to handle DOUBLE PRECISION that was promoted using compiler options. --- hl/fortran/test/tsttable.F90 | 135 ++++++++++++++++++++++++++++++++----------- 1 file changed, 102 insertions(+), 33 deletions(-) diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 index f679982..f57f933 100644 --- a/hl/fortran/test/tsttable.F90 +++ b/hl/fortran/test/tsttable.F90 @@ -16,6 +16,7 @@ ! ! This file contains the FORTRAN90 tests for H5LT ! +#include PROGRAM table_test @@ -70,7 +71,24 @@ SUBROUTINE test_table1() INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype INTEGER :: maxlen = 0 ! max chararter length of a field name - + INTEGER :: Cs_sizeof_double = H5_SIZEOF_DOUBLE ! C's sizeof double + INTEGER :: SIZEOF_X + LOGICAL :: Exclude_double + + ! Find size of DOUBLE PRECISION +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SIZEOF_X = storage_size(bufd(1))/storage_size(c_char_'a') +#else + SIZEOF_X = SIZEOF(bufd(1)) +#endif + + ! If Fortran DOUBLE PRECISION and C DOUBLE sizeof don't match then disable + ! creating a DOUBLE RECISION field, and instead create a REAL field. This + ! is to handle when DOUBLE PRECISION is promoted via a compiler option. + Exclude_double = .FALSE. + IF(Cs_sizeof_double.NE.SIZEOF_X)THEN + Exclude_double = .TRUE. + ENDIF ! ! Initialize the data arrays. @@ -110,7 +128,11 @@ SUBROUTINE test_table1() CALL h5tset_size_f(type_id_c, type_size, errcode) CALL h5tget_size_f(type_id_c, type_sizec, errcode) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) + IF(exclude_double)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL, type_sized, errcode) + ELSE + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) + ENDIF CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) type_size = type_sizec + type_sizei + type_sized + type_sizer @@ -119,7 +141,11 @@ SUBROUTINE test_table1() ! field_types(1) = type_id_c field_types(2) = H5T_NATIVE_INTEGER - field_types(3) = H5T_NATIVE_DOUBLE + IF(exclude_double)THEN + field_types(3) = H5T_NATIVE_REAL + ELSE + field_types(3) = H5T_NATIVE_DOUBLE + ENDIF field_types(4) = H5T_NATIVE_REAL ! @@ -167,9 +193,13 @@ SUBROUTINE test_table1() CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& bufi,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufd,errcode) + IF(exclude_double)THEN + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufr,errcode) + ELSE + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufd,errcode) + ENDIF CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& bufr,errcode) @@ -213,7 +243,6 @@ SUBROUTINE test_table1() CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& bufir,errcode) - ! ! compare read and write buffers. ! @@ -225,19 +254,39 @@ SUBROUTINE test_table1() ENDIF END DO - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufdr,errcode) + IF(exclude_double)THEN + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufrr,errcode) ! ! compare read and write buffers. ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + ELSE + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + ENDIF + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& bufrr,errcode) @@ -253,9 +302,9 @@ SUBROUTINE test_table1() ENDIF END DO - CALL passed() + !------------------------------------------------------------------------- ! write field !------------------------------------------------------------------------- @@ -268,8 +317,13 @@ SUBROUTINE test_table1() CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& bufi,errcode) - CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufd,errcode) + IF(exclude_double)THEN + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufr,errcode) + ELSE + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufd,errcode) + ENDIF CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& bufr,errcode) @@ -307,20 +361,35 @@ SUBROUTINE test_table1() STOP ENDIF END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO + IF(exclude_double)THEN + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + ELSE + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + ENDIF CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& bufrr,errcode) -- cgit v0.12 From b67a6727cf0c848f92463a15ac76a2fbdfc6555a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 10:01:11 -0500 Subject: [svn-r27359] Fixed Cmake to handle autogenerated Fortran HL APIs --- fortran/src/H5config_f.inc.cmake | 7 +++++++ fortran/src/H5config_f.inc.in | 3 +++ hl/fortran/src/CMakeLists.txt | 42 ++++++++++++++++++++++++++++++++++++++++ hl/fortran/test/tsttable.F90 | 4 ++-- 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index 2f987c3..cc36889 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -43,6 +43,13 @@ ! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ + +#if H5_SIZEOF_DOUBLE==0 +#undef H5_SIZEOF_DOUBLE +#endif + +! should this be ${HDF_PREFIX} instead of H5 MSB #define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ #if H5_SIZEOF_LONG_DOUBLE==0 diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index b0de405..64c3a0c 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -25,6 +25,9 @@ #undef HAVE_ISO_FORTRAN_ENV ! Define the size of C's long double +#undef SIZEOF_DOUBLE + +! Define the size of C's long double #undef SIZEOF_LONG_DOUBLE ! Define the maximum decimal precision for reals diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 4f266a4..85bc9b4 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -12,6 +12,40 @@ if (WIN32) endif (WIN32) #----------------------------------------------------------------------------- +# Generate the H5LT and H5TB REAL APIs +#----------------------------------------------------------------------------- + +add_executable (H5HL_buildiface + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 + ) + +if (WIN32 AND MSVC) + if (BUILD_SHARED_LIBS) + set_target_properties (H5HL_buildiface + PROPERTIES + COMPILE_FLAGS "/MT" + ) + endif (BUILD_SHARED_LIBS) + set_target_properties (H5HL_buildiface + PROPERTIES + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) +endif (WIN32 AND MSVC) +set_target_properties (H5HL_buildiface PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) + +set (CMD $) +add_custom_command ( + OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + COMMAND ${CMD} + WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} + DEPENDS H5HL_buildiface +) + +#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES ( @@ -54,6 +88,14 @@ set (HDF5_HL_F90_F_SRCS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 ) +set (HDF5_HL_F90_F_SRCS + ${HDF5_HL_F90_F_SRCS} + + # generated files + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 +) + set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 index f57f933..74029a5 100644 --- a/hl/fortran/test/tsttable.F90 +++ b/hl/fortran/test/tsttable.F90 @@ -82,9 +82,9 @@ SUBROUTINE test_table1() SIZEOF_X = SIZEOF(bufd(1)) #endif - ! If Fortran DOUBLE PRECISION and C DOUBLE sizeof don't match then disable + ! If Fortran DOUBLE PRECISION and C DOUBLE sizeofs don't match then disable ! creating a DOUBLE RECISION field, and instead create a REAL field. This - ! is to handle when DOUBLE PRECISION is promoted via a compiler option. + ! is needed to handle when DOUBLE PRECISION is promoted via a compiler flag. Exclude_double = .FALSE. IF(Cs_sizeof_double.NE.SIZEOF_X)THEN Exclude_double = .TRUE. -- cgit v0.12 From 3653d2ad0138f1a5ab58752917bc9bf08cc920ee Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 10:21:11 -0500 Subject: [svn-r27360] moved H5test_kind.F90 H5_buildiface.F90 --- MANIFEST | 2 +- fortran/src/CMakeLists.txt | 14 +- fortran/src/H5_buildiface.F90 | 927 ++++++++++++++++++++++++++++++++++++++++++ fortran/src/H5test_kind.F90 | 927 ------------------------------------------ fortran/src/Makefile.am | 16 +- fortran/src/Makefile.in | 36 +- 6 files changed, 961 insertions(+), 961 deletions(-) create mode 100644 fortran/src/H5_buildiface.F90 delete mode 100644 fortran/src/H5test_kind.F90 diff --git a/MANIFEST b/MANIFEST index e9e6d84..4ee8883 100644 --- a/MANIFEST +++ b/MANIFEST @@ -304,7 +304,7 @@ ./fortran/src/H5f90i.h ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h -./fortran/src/H5test_kind.F90 +./fortran/src/H5_buildiface.F90 ./fortran/src/H5match_types.c ./fortran/src/HDF5.F90 ./fortran/src/H5config_f.inc.in diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 5317346..51a5eb4 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -42,35 +42,35 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_B # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- -add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 +add_executable (H5_buildiface + ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90 ) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind + set_target_properties (H5_buildiface PROPERTIES COMPILE_FLAGS "/MT" ) endif (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind + set_target_properties (H5_buildiface PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) endif (WIN32 AND MSVC) -set_target_properties (H5test_FortranHavekind PROPERTIES +set_target_properties (H5_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) -set (CMD $) +set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 COMMAND ${CMD} ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5test_FortranHavekind + DEPENDS H5_buildiface ) #----------------------------------------------------------------------------- #add_executable (H5fortran_detect diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 new file mode 100644 index 0000000..f73f915 --- /dev/null +++ b/fortran/src/H5_buildiface.F90 @@ -0,0 +1,927 @@ +!****p* Program/H5test_kind +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM test_kind + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + + GOTO 10 + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind.f90',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, num_ikinds + j = ikind(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, num_rkinds + j = rkind(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" +#else + WRITE(*,*)" a_size = SIZEOF(a)" +#endif + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind" + WRITE(*,*) "USE H5test_kind_mod" + WRITE(*,*) "CHARACTER(LEN=2) :: jchr2" + WRITE(*,*) "WRITE(*,*) "" /*generated header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, num_ikinds + j = ikind(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, num_rkinds + j = rkind(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + +# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_longdble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +# else + sizeof_var = SIZEOF(c_longdble) +# endif + + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_LONG_DOUBLE + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" +#else + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND -1"' + WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF -1"' +#endif + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_dble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + sizeof_var = SIZEOF(c_dble) +#endif + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_DOUBLE + WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + sizeof_var = STORAGE_SIZE(c_flt, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + sizeof_var = SIZEOF(c_flt) +#endif + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_FLOAT + WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var + WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_SIZEOF "'//"//ADJUSTL(jchr2)" + + WRITE(*,*) "END PROGRAM H5test_kind" + +10 CONTINUE + +! (c) Generate Fortran H5* interfaces having multiple KIND interfaces. +! +! Developer's notes: +! +! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 +! standard extended the maximum rank to 15, it was decided that they should use the +! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility +! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. + + OPEN(11,FILE='H5_KINDff.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5_KINDff.F90',& +'!',& +'! NAME',& +'! H5_KIND',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5test_kind.F90 to handle all the',& +'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& +'! are H5A, H5D and H5P APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE H5_KIND" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE H5GLOBAL' + + WRITE(11,'(A)') ' USE H5A' + WRITE(11,'(A)') ' USE H5D' + WRITE(11,'(A)') ' USE H5P' + WRITE(11,'(A)') ' IMPLICIT NONE' +!*************** +! H5A INTERFACES +!*************** +! +! H5Awrite_f +! + WRITE(11,'(A)') " INTERFACE h5awrite_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Aread_f + WRITE(11,'(A)') " INTERFACE h5aread_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" +!*************** +! H5D INTERFACES +!*************** +! +! H5Dwrite_f + WRITE(11,'(A)') " INTERFACE h5dwrite_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Dread_f + WRITE(11,'(A)') " INTERFACE h5dread_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +!*************** +! H5P INTERFACES +!*************** +! +! H5Pset_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pset_f + WRITE(11,'(A)') " INTERFACE h5pset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_f + WRITE(11,'(A)') " INTERFACE h5pget_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pregister_f + WRITE(11,'(A)') " INTERFACE h5pregister_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pinsert_f + WRITE(11,'(A)') " INTERFACE h5pinsert_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +!********************** +! H5A APIs +!********************** +! +! H5Awrite_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO +! +! H5Aread_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +!********************** +! H5D APIs +!********************** +! +! h5dread_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + + ENDDO + ENDDO +! +! h5dwrite_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +!********************** +! H5P APIs +!********************** +! +! H5Pset_fill_value_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_fill_value_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + + WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pregister_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& + &//'(class, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: class' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pregister_c(class, name, name_len, size, f_ptr)' + WRITE(11,'(A)') 'END SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pinsert_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& + &//'(plist, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: plist' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(c_ptr) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = c_loc(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + + WRITE(11,'(A)') 'END MODULE H5_KIND' + + CLOSE(11) + +! (b) Generate Fortran Check routines for the tests KIND interfaces. + OPEN(11,FILE='../test/tf_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/TH5_MISC_gen.F90',& +'!',& +'! NAME',& +'! TH5_MISC_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5test_kind.F90 to handle checking ',& +'! in the tests all the detected KINDs.',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE TH5_MISC_gen" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE H5GLOBAL' + +! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs + + WRITE(11,'(A)') ' INTERFACE verify' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " MODULE PROCEDURE verify_character" + WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') ' INTERFACE check_real_eq' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +! *************************** +! VALIDATE INTEGERS +! *************************** + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE REALS +! *************************** + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) + + +! *********************************** +! TEST IF TWO REAL NUMBERS ARE EQUAL +! *********************************** + + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' + WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' + WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE CHARACTER STRINGS +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER*(*) :: string' + WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_character' + +! *************************** +! VALIDATE LOGICAL +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' LOGICAL :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + + WRITE(11,'(A)') ' END SUBROUTINE verify_logical' + + + + WRITE(11,'(A)') "END MODULE TH5_MISC_gen" + + CLOSE(11) + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 deleted file mode 100644 index f73f915..0000000 --- a/fortran/src/H5test_kind.F90 +++ /dev/null @@ -1,927 +0,0 @@ -!****p* Program/H5test_kind -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of -! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard -! compliant and should always be chosen over SIZEOF. -! -! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or -! "FORTRAN_HAVE_SIZEOF". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -#include - -PROGRAM test_kind - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - -! These values are valid REAL KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_RKIND - H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_IKIND - H5_H5CONFIG_F_IKIND - - INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var - CHARACTER(LEN=2) :: chr2 -! subroutine rank of array being passed in - CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) -! rank definitions - CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & - ' ', & - ', DIMENSION(dims(1)) ', & - ', DIMENSION(dims(1),dims(2)) ', & - ', DIMENSION(dims(1),dims(2),dims(3)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & - /) -! pointer to the buffer - CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & - /) - - GOTO 10 - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind.f90',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, num_ikinds - j = ikind(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, num_rkinds - j = rkind(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind" - WRITE(*,*) "USE H5test_kind_mod" - WRITE(*,*) "CHARACTER(LEN=2) :: jchr2" - WRITE(*,*) "WRITE(*,*) "" /*generated header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, num_ikinds - j = ikind(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, num_rkinds - j = rkind(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - -# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_longdble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -# else - sizeof_var = SIZEOF(c_longdble) -# endif - - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_LONG_DOUBLE - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" -#else - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND -1"' - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF -1"' -#endif - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_dble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - sizeof_var = SIZEOF(c_dble) -#endif - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_DOUBLE - WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_flt, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - sizeof_var = SIZEOF(c_flt) -#endif - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_FLOAT - WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_SIZEOF "'//"//ADJUSTL(jchr2)" - - WRITE(*,*) "END PROGRAM H5test_kind" - -10 CONTINUE - -! (c) Generate Fortran H5* interfaces having multiple KIND interfaces. -! -! Developer's notes: -! -! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 -! standard extended the maximum rank to 15, it was decided that they should use the -! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility -! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. - - OPEN(11,FILE='H5_KINDff.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5_KINDff.F90',& -'!',& -'! NAME',& -'! H5_KIND',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5test_kind.F90 to handle all the',& -'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& -'! are H5A, H5D and H5P APIs',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE H5_KIND" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE H5GLOBAL' - - WRITE(11,'(A)') ' USE H5A' - WRITE(11,'(A)') ' USE H5D' - WRITE(11,'(A)') ' USE H5P' - WRITE(11,'(A)') ' IMPLICIT NONE' -!*************** -! H5A INTERFACES -!*************** -! -! H5Awrite_f -! - WRITE(11,'(A)') " INTERFACE h5awrite_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Aread_f - WRITE(11,'(A)') " INTERFACE h5aread_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5aread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" -!*************** -! H5D INTERFACES -!*************** -! -! H5Dwrite_f - WRITE(11,'(A)') " INTERFACE h5dwrite_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Dread_f - WRITE(11,'(A)') " INTERFACE h5dread_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -!*************** -! H5P INTERFACES -!*************** -! -! H5Pset_fill_value_f - WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pget_fill_value_f - WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pset_f - WRITE(11,'(A)') " INTERFACE h5pset_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pget_f - WRITE(11,'(A)') " INTERFACE h5pget_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pregister_f - WRITE(11,'(A)') " INTERFACE h5pregister_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pinsert_f - WRITE(11,'(A)') " INTERFACE h5pinsert_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -!********************** -! H5A APIs -!********************** -! -! H5Awrite_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO -! -! H5Aread_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -!********************** -! H5D APIs -!********************** -! -! h5dread_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - - ENDDO - ENDDO -! -! h5dwrite_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -!********************** -! H5P APIs -!********************** -! -! H5Pset_fill_value_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, type_id, fillvalue, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' - WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' - WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pget_fill_value_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, type_id, fillvalue, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: fillvalue' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' - WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pset_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, name, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' - - WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pget_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, name, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pregister_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pregister_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& - &//'(class, name, size, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: class' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pregister_c(class, name, name_len, size, f_ptr)' - WRITE(11,'(A)') 'END SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pinsert_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& - &//'(plist, name, size, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: plist' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(c_ptr) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = c_loc(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - - WRITE(11,'(A)') 'END MODULE H5_KIND' - - CLOSE(11) - -! (b) Generate Fortran Check routines for the tests KIND interfaces. - OPEN(11,FILE='../test/tf_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/TH5_MISC_gen.F90',& -'!',& -'! NAME',& -'! TH5_MISC_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5test_kind.F90 to handle checking ',& -'! in the tests all the detected KINDs.',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE TH5_MISC_gen" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE H5GLOBAL' - -! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs - - WRITE(11,'(A)') ' INTERFACE verify' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " MODULE PROCEDURE verify_character" - WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') ' INTERFACE check_real_eq' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -! *************************** -! VALIDATE INTEGERS -! *************************** - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE REALS -! *************************** - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) - - -! *********************************** -! TEST IF TWO REAL NUMBERS ARE EQUAL -! *********************************** - - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' - WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' - WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE CHARACTER STRINGS -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER*(*) :: string' - WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_character' - -! *************************** -! VALIDATE LOGICAL -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' LOGICAL :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - - WRITE(11,'(A)') ' END SUBROUTINE verify_logical' - - - - WRITE(11,'(A)') "END MODULE TH5_MISC_gen" - - CLOSE(11) - -END PROGRAM test_kind - - - diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index d2e06f8..5f6c8e8 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -106,14 +106,14 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5test_kind is compiled and run to produce H5fortran_detect.F90. +# H5_buildiface is compiled and run to produce H5KIND***. # H5fortran_detect is compiled and run to produce H5fort_type_defines.h. # H5match_types.c then includes this file and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h # and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5test_kind +noinst_PROGRAMS = H5match_types H5_buildiface # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create @@ -137,16 +137,16 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # files. #H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.F90 generates all the APIs that have a KIND type associated +# H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. -H5_KINDff.F90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) +H5_KINDff.F90: H5_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_buildiface$(EXEEXT) -# H5test_kind.F90 is included in the distribution, and Automake knows +# H5_buildiface.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5test_kind_SOURCES = H5test_kind.F90 +H5_buildiface_SOURCES = H5_buildiface.F90 # Mark this directory as part of the Fortran API FORTRAN_API=yes @@ -158,7 +158,7 @@ FORTRAN_API=yes H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo #H5fortran_types.lo: H5fortran_types.F90 #H5fortran_detect.lo: H5fortran_detect.F90 -H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 052e4a0..30867e2 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -108,7 +108,7 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5match_types$(EXEEXT) H5test_kind$(EXEEXT) +noinst_PROGRAMS = H5match_types$(EXEEXT) H5_buildiface$(EXEEXT) TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -166,12 +166,12 @@ libhdf5_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) +am_H5_buildiface_OBJECTS = H5_buildiface.$(OBJEXT) +H5_buildiface_OBJECTS = $(am_H5_buildiface_OBJECTS) +H5_buildiface_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) -am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) -H5test_kind_OBJECTS = $(am_H5test_kind_OBJECTS) -H5test_kind_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -231,10 +231,10 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ - $(H5test_kind_SOURCES) -DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ - $(H5test_kind_SOURCES) +SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ + H5match_types.c +DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ + H5match_types.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -768,9 +768,9 @@ MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h # H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# H5test_kind.F90 is included in the distribution, and Automake knows +# H5_buildiface.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5test_kind_SOURCES = H5test_kind.F90 +H5_buildiface_SOURCES = H5_buildiface.F90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -893,14 +893,14 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +H5_buildiface$(EXEEXT): $(H5_buildiface_OBJECTS) $(H5_buildiface_DEPENDENCIES) $(EXTRA_H5_buildiface_DEPENDENCIES) + @rm -f H5_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5_buildiface_OBJECTS) $(H5_buildiface_LDADD) $(LIBS) + H5match_types$(EXEEXT): $(H5match_types_OBJECTS) $(H5match_types_DEPENDENCIES) $(EXTRA_H5match_types_DEPENDENCIES) @rm -f H5match_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(H5match_types_OBJECTS) $(H5match_types_LDADD) $(LIBS) -H5test_kind$(EXEEXT): $(H5test_kind_OBJECTS) $(H5test_kind_DEPENDENCIES) $(EXTRA_H5test_kind_DEPENDENCIES) - @rm -f H5test_kind$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5test_kind_OBJECTS) $(H5test_kind_LDADD) $(LIBS) - mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1407,11 +1407,11 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # files. #H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.F90 generates all the APIs that have a KIND type associated +# H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. -H5_KINDff.F90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) +H5_KINDff.F90: H5_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when @@ -1420,7 +1420,7 @@ H5_KINDff.F90: H5test_kind$(EXEEXT) H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo #H5fortran_types.lo: H5fortran_types.F90 #H5fortran_detect.lo: H5fortran_detect.F90 -H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo -- cgit v0.12 From 8bbe712961a9b88d5fda838ec745f40217c28c8c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 9 Jul 2015 11:56:16 -0500 Subject: [svn-r27364] Add Mac Framework support --- CMakeInstallation.cmake | 131 +++++++++++++++++------------------- CMakeLists.txt | 20 ++++++ MANIFEST | 1 + c++/src/CMakeLists.txt | 5 +- config/cmake/CPack.Info.plist.in | 26 +++++++ config/cmake/HDF5Macros.cmake | 12 ++++ config/cmake/HDFCompilerFlags.cmake | 4 +- config/cmake/cacheinit.cmake | 2 + fortran/src/CMakeLists.txt | 13 ++-- hl/c++/src/CMakeLists.txt | 5 +- hl/fortran/src/CMakeLists.txt | 11 +-- hl/src/CMakeLists.txt | 5 +- hl/tools/CMakeLists.txt | 7 +- src/CMakeLists.txt | 3 +- tools/h5copy/CMakeLists.txt | 7 +- tools/h5diff/CMakeLists.txt | 14 ++-- tools/h5dump/CMakeLists.txt | 7 +- tools/h5import/CMakeLists.txt | 5 +- tools/h5jam/CMakeLists.txt | 7 +- tools/h5ls/CMakeLists.txt | 5 +- tools/h5repack/CMakeLists.txt | 9 +-- tools/h5stat/CMakeLists.txt | 7 +- tools/lib/CMakeLists.txt | 7 +- tools/misc/CMakeLists.txt | 5 +- 24 files changed, 173 insertions(+), 145 deletions(-) create mode 100644 config/cmake/CPack.Info.plist.in diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 74bf85f..c5db4ea 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -79,7 +79,7 @@ configure_package_config_file ( #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) configure_file ( - ${HDF_RESOURCES_DIR}/FindHDF5.cmake.in + ${HDF_RESOURCES_DIR}/FindHDF5.cmake.in ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY ) install ( @@ -134,7 +134,7 @@ else (H5_WORDS_BIGENDIAN) set (BYTESEX little-endian) endif (H5_WORDS_BIGENDIAN) configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in + ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY ) install ( @@ -167,7 +167,7 @@ install ( option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) if (HDF5_PACK_EXAMPLES) configure_file ( - ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in + ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY ) install ( @@ -182,7 +182,7 @@ if (HDF5_PACK_EXAMPLES) install ( DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples-0.1.1-Source DESTINATION ${HDF5_INSTALL_DATA_DIR} - USE_SOURCE_PERMISSIONS + USE_SOURCE_PERMISSIONS COMPONENT hdfdocuments ) install ( @@ -298,13 +298,13 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp") - set (CPACK_GENERATOR "TGZ") + set (CPACK_GENERATOR "TGZ") if (WIN32) - set (CPACK_GENERATOR "ZIP") + set (CPACK_GENERATOR "ZIP") - if (NSIS_EXECUTABLE) - list (APPEND CPACK_GENERATOR "NSIS") - endif (NSIS_EXECUTABLE) + if (NSIS_EXECUTABLE) + list (APPEND CPACK_GENERATOR "NSIS") + endif (NSIS_EXECUTABLE) # Installers for 32- vs. 64-bit CMake: # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) @@ -327,10 +327,10 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") set (CPACK_NSIS_MODIFY_PATH ON) - - if (WIX_EXECUTABLE) - list (APPEND CPACK_GENERATOR "WIX") - endif (WIX_EXECUTABLE) + + if (WIX_EXECUTABLE) + list (APPEND CPACK_GENERATOR "WIX") + endif (WIX_EXECUTABLE) #WiX variables set (CPACK_WIX_UNINSTALL "1") # .. variable:: CPACK_WIX_LICENSE_RTF @@ -375,30 +375,24 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml") endif (BUILD_SHARED_LIBS) elseif (APPLE) - list (APPEND CPACK_GENERATOR "DragNDrop") + list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns") - option (HDF5_PACK_MACOSX_BUNDLE "Package the HDF5 Library in a Bundle" OFF) - if (HDF5_PACK_MACOSX_BUNDLE) - list (APPEND CPACK_GENERATOR "Bundle") + option (HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF) + if (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS) set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns") set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") - set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities") - set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2015 by The HDF Group. All rights reserved.") set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") - set (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") - set (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}") - set (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") #----------------------------------------------------------------------------- # Configure the Info.plist file for the install bundle #----------------------------------------------------------------------------- configure_file ( - ${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in + ${HDF_RESOURCES_DIR}/CPack.Info.plist.in ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY ) configure_file ( @@ -411,19 +405,18 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ) install ( FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo - ${HDF5_BINARY_DIR}/CMakeFiles/version.plist DESTINATION .. ) - endif (HDF5_PACK_MACOSX_BUNDLE) + endif (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS) else (WIN32) - list (APPEND CPACK_GENERATOR "STGZ") + list (APPEND CPACK_GENERATOR "STGZ") set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") -# list (APPEND CPACK_GENERATOR "RPM") +# list (APPEND CPACK_GENERATOR "RPM") set (CPACK_RPM_PACKAGE_RELEASE "1") set (CPACK_RPM_COMPONENT_INSTALL ON) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) @@ -431,7 +424,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") - set (CPACK_RPM_PACKAGE_DESCRIPTION + set (CPACK_RPM_PACKAGE_DESCRIPTION "The HDF5 technology suite includes: * A versatile data model that can represent very complex data objects and a wide variety of metadata. @@ -447,14 +440,14 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) The HDF5 data model, file format, API, library, and tools are open and distributed without charge. " ) - + #----------------------------------------------------------------------------- # Configure the spec file for the install RPM #----------------------------------------------------------------------------- # configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE) # set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") endif (WIN32) - + # By default, do not warn when built on machines using only VS Express: if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) @@ -462,7 +455,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut include (InstallRequiredSystemLibraries) set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") - + if (HDF5_PACKAGE_EXTLIBS) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) @@ -485,7 +478,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut endif (SZIP_FOUND AND SZIP_USE_EXTERNAL) endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") endif (HDF5_PACKAGE_EXTLIBS) - + include (CPack) cpack_add_install_type(Full DISPLAY_NAME "Everything") @@ -511,121 +504,121 @@ The HDF5 data model, file format, API, library, and tools are open and distribut #--------------------------------------------------------------------------- # Now list the cpack commands #--------------------------------------------------------------------------- - CPACK_ADD_COMPONENT (libraries + cpack_add_component (libraries DISPLAY_NAME "HDF5 Libraries" GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (headers - DISPLAY_NAME "HDF5 Headers" + cpack_add_component (headers + DISPLAY_NAME "HDF5 Headers" DEPENDS libraries GROUP Development INSTALL_TYPES Full Developer ) - CPACK_ADD_COMPONENT (hdfdocuments + cpack_add_component (hdfdocuments DISPLAY_NAME "HDF5 Documents" GROUP Documents INSTALL_TYPES Full Developer ) - CPACK_ADD_COMPONENT (configinstall - DISPLAY_NAME "HDF5 CMake files" + cpack_add_component (configinstall + DISPLAY_NAME "HDF5 CMake files" DEPENDS libraries GROUP Development INSTALL_TYPES Full Developer User ) - + if (HDF5_BUILD_FORTRAN) - CPACK_ADD_COMPONENT (fortlibraries - DISPLAY_NAME "HDF5 Fortran Libraries" + cpack_add_component (fortlibraries + DISPLAY_NAME "HDF5 Fortran Libraries" DEPENDS libraries GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (fortheaders - DISPLAY_NAME "HDF5 Fortran Headers" + cpack_add_component (fortheaders + DISPLAY_NAME "HDF5 Fortran Headers" DEPENDS fortlibraries GROUP Development INSTALL_TYPES Full Developer ) endif (HDF5_BUILD_FORTRAN) - + if (HDF5_BUILD_CPP_LIB) - CPACK_ADD_COMPONENT (cpplibraries - DISPLAY_NAME "HDF5 C++ Libraries" + cpack_add_component (cpplibraries + DISPLAY_NAME "HDF5 C++ Libraries" DEPENDS libraries GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (cppheaders - DISPLAY_NAME "HDF5 C++ Headers" + cpack_add_component (cppheaders + DISPLAY_NAME "HDF5 C++ Headers" DEPENDS cpplibraries GROUP Development INSTALL_TYPES Full Developer ) endif (HDF5_BUILD_CPP_LIB) - + if (HDF5_BUILD_TOOLS) - CPACK_ADD_COMPONENT (toolsapplications - DISPLAY_NAME "HDF5 Tools Applications" + cpack_add_component (toolsapplications + DISPLAY_NAME "HDF5 Tools Applications" DEPENDS toolslibraries GROUP Applications INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (toolslibraries - DISPLAY_NAME "HDF5 Tools Libraries" + cpack_add_component (toolslibraries + DISPLAY_NAME "HDF5 Tools Libraries" DEPENDS libraries GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (toolsheaders - DISPLAY_NAME "HDF5 Tools Headers" + cpack_add_component (toolsheaders + DISPLAY_NAME "HDF5 Tools Headers" DEPENDS toolslibraries GROUP Development INSTALL_TYPES Full Developer ) endif (HDF5_BUILD_TOOLS) - + if (HDF5_BUILD_HL_LIB) - CPACK_ADD_COMPONENT (hllibraries - DISPLAY_NAME "HDF5 HL Libraries" + cpack_add_component (hllibraries + DISPLAY_NAME "HDF5 HL Libraries" DEPENDS libraries GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (hlheaders - DISPLAY_NAME "HDF5 HL Headers" + cpack_add_component (hlheaders + DISPLAY_NAME "HDF5 HL Headers" DEPENDS hllibraries GROUP Development INSTALL_TYPES Full Developer ) - CPACK_ADD_COMPONENT (hltoolsapplications - DISPLAY_NAME "HDF5 HL Tools Applications" + cpack_add_component (hltoolsapplications + DISPLAY_NAME "HDF5 HL Tools Applications" DEPENDS hllibraries GROUP Applications INSTALL_TYPES Full Developer User ) if (HDF5_BUILD_CPP_LIB) - CPACK_ADD_COMPONENT (hlcpplibraries - DISPLAY_NAME "HDF5 HL C++ Libraries" + cpack_add_component (hlcpplibraries + DISPLAY_NAME "HDF5 HL C++ Libraries" DEPENDS hllibraries GROUP Runtime INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (hlcppheaders - DISPLAY_NAME "HDF5 HL C++ Headers" + cpack_add_component (hlcppheaders + DISPLAY_NAME "HDF5 HL C++ Headers" DEPENDS hlcpplibraries GROUP Development INSTALL_TYPES Full Developer ) endif (HDF5_BUILD_CPP_LIB) if (HDF5_BUILD_FORTRAN) - CPACK_ADD_COMPONENT (hlfortlibraries - DISPLAY_NAME "HDF5 HL Fortran Libraries" + cpack_add_component (hlfortlibraries + DISPLAY_NAME "HDF5 HL Fortran Libraries" DEPENDS fortlibraries GROUP Runtime INSTALL_TYPES Full Developer User ) endif (HDF5_BUILD_FORTRAN) endif (HDF5_BUILD_HL_LIB) - + endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33b4bca..52a883e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,6 +170,9 @@ if (NOT HDF5_INSTALL_BIN_DIR) set (HDF5_INSTALL_BIN_DIR bin) endif (NOT HDF5_INSTALL_BIN_DIR) if (NOT HDF5_INSTALL_LIB_DIR) + if (APPLE) + set (HDF5_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) + endif (APPLE) set (HDF5_INSTALL_LIB_DIR lib) endif (NOT HDF5_INSTALL_LIB_DIR) if (NOT HDF5_INSTALL_INCLUDE_DIR) @@ -177,6 +180,15 @@ if (NOT HDF5_INSTALL_INCLUDE_DIR) endif (NOT HDF5_INSTALL_INCLUDE_DIR) if (NOT HDF5_INSTALL_DATA_DIR) if (NOT WIN32) + if (APPLE) + option (HDF5_BUILD_FRAMEWORKS "Create a Mac OSX Framework" OFF) + if (HDF5_BUILD_FRAMEWORKS) + set (HDF5_INSTALL_EXTRA_DIR ../SharedSupport) + else (HDF5_BUILD_FRAMEWORKS) + set (HDF5_INSTALL_EXTRA_DIR share) + endif (HDF5_BUILD_FRAMEWORKS) + set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) + endif (APPLE) set (HDF5_INSTALL_DATA_DIR share) set (HDF5_INSTALL_CMAKE_DIR share/cmake) else (NOT WIN32) @@ -288,6 +300,14 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake) set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) #----------------------------------------------------------------------------- +# Mac OS X Options +#----------------------------------------------------------------------------- +option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" TRUE) +if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) + set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries") +endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) + +#----------------------------------------------------------------------------- # Option to Build Shared/Static libs, default is static #----------------------------------------------------------------------------- option (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) diff --git a/MANIFEST b/MANIFEST index e758f2c..2d64bcd 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2395,6 +2395,7 @@ ./config/cmake/cacheinit.cmake ./config/cmake/ConversionTests.c ./config/cmake/ConfigureChecks.cmake +./config/cmake/CPack.Info.plist.in ./config/cmake/CTestCustom.cmake ./config/cmake/FindHDF5.cmake.in ./config/cmake/H5cxx_config.h.in diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 2f3a0c4..44b912c 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -94,7 +94,7 @@ set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES ) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -112,7 +112,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_CPP_LIB_TARGET} @@ -121,5 +121,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT cpplibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in new file mode 100644 index 0000000..08d371b --- /dev/null +++ b/config/cmake/CPack.Info.plist.in @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + @CPACK_PACKAGE_FILE_NAME@ + CFBundleIconFile + @CPACK_BUNDLE_ICON@ + CFBundleIdentifier + org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@ + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + @CPACK_PACKAGE_VERSIO@ + CFBundleShortVersionString + @CPACK_SHORT_VERSION_STRING@ + CSResourcesFileMapped + + + diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index ee9ed84..976b910 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -26,6 +26,18 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype) BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME} ) endif (HDF5_BUILD_WITH_INSTALL_NAME) + if (HDF5_BUILD_FRAMEWORKS) + if (${libtype} MATCHES "SHARED") + # adapt target to build frameworks instead of dylibs + set_target_properties(${libtarget} PROPERTIES + XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" + FRAMEWORK TRUE + FRAMEWORK_VERSION ${HDF5_PACKAGE_VERSION_MAJOR} + MACOSX_FRAMEWORK_IDENTIFIER org.hdfgroup.${libtarget} + MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${HDF5_PACKAGE_VERSION_MAJOR} + MACOSX_FRAMEWORK_BUNDLE_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) + endif (${libtype} MATCHES "SHARED") + endif (HDF5_BUILD_FRAMEWORKS) endif (APPLE) endmacro (H5_SET_LIB_OPTIONS) diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 56d17bf..c637c73 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -5,7 +5,7 @@ if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftrapv -fno-common") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") endif () else (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") @@ -18,7 +18,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99") if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrapv -fno-common") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common") endif () else (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99") diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 87d4fcc..f869949 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -8,6 +8,8 @@ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE) set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE) +set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) + set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c015072..0469aac 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -268,15 +268,15 @@ set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES # Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( - FILES - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h + FILES + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 - DESTINATION + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT + COMPONENT fortheaders ) @@ -343,5 +343,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT fortlibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT fortlibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 640cb2d..b511260 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -25,7 +25,7 @@ set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES ) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -43,7 +43,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_HL_CPP_LIB_TARGET} @@ -52,5 +52,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlcpplibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hlcpplibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6e6e44a..e5ffb78 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -50,8 +50,8 @@ add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") if (BUILD_SHARED_LIBS) if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS + set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_HL_DLL ) if (MSVC) @@ -60,8 +60,8 @@ if (BUILD_SHARED_LIBS) endif (WIN32) endif (BUILD_SHARED_LIBS) if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS + set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS ) endif (WIN32) @@ -110,7 +110,7 @@ if (HDF5_EXPORTED_TARGETS) INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_HL_F90_C_LIB_TARGET} @@ -120,5 +120,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlfortlibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hlfortlibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 3c24e40..47029d7 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -44,7 +44,7 @@ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -62,7 +62,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_HL_LIB_TARGET} @@ -71,5 +71,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hllibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT hllibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index f58a513..c9017f3 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -46,7 +46,7 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) - + # add_test (NAME hl_h52gifgentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) @@ -60,8 +60,5 @@ install ( TARGETS gif2h5 h52gif - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - hltoolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aec06b3..11b37a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -898,7 +898,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_LIB_TARGET} @@ -907,5 +907,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT libraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 7291197..c18b1f9 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -42,12 +42,9 @@ endif (BUILD_TESTING) #----------------------------------------------------------------------------- #INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications) - + install ( TARGETS h5copy - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 39095a5..0a5c813 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -41,12 +41,12 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5diffgentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## @@ -64,10 +64,7 @@ endif (BUILD_TESTING) install ( TARGETS h5diff - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) if (H5_HAVE_PARALLEL) @@ -77,9 +74,6 @@ if (H5_HAVE_PARALLEL) install ( TARGETS ph5diff - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) endif (H5_HAVE_PARALLEL) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 7658c04..9d5db3f 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -31,7 +31,7 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5dumpgentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) @@ -57,8 +57,5 @@ endif (BUILD_TESTING) install ( TARGETS h5dump - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index bf1515e..ada3b07 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -47,8 +47,5 @@ endif (BUILD_TESTING) install ( TARGETS h5import - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index 4498132..ceb2eb9 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -50,7 +50,7 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5jamgentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) @@ -73,8 +73,5 @@ endif (BUILD_TESTING) install ( TARGETS h5jam h5unjam - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 984b36b..116f735 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -40,8 +40,5 @@ endif (BUILD_TESTING) install ( TARGETS h5ls - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 42d9f3d..3b31078 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -73,14 +73,14 @@ if (BUILD_TESTING) TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" ) endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## @@ -98,8 +98,5 @@ endif (BUILD_TESTING) install ( TARGETS h5repack - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 5230693..66c8c7e 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -27,7 +27,7 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5stat_gentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) @@ -49,8 +49,5 @@ endif (BUILD_TESTING) install ( TARGETS h5stat - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index dbd72cd..a103f3d 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -48,7 +48,7 @@ H5_SET_LIB_OPTIONS ( HDF5_TOOLS_LIB_NAME_DEBUG ) #set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG) -set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES +set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) @@ -60,7 +60,7 @@ set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES ############################################################################## #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -78,7 +78,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${HDF5_TOOLS_LIB_TARGET} @@ -87,5 +87,6 @@ if (HDF5_EXPORTED_TARGETS) LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolslibraries + FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT toolslibraries ) endif (HDF5_EXPORTED_TARGETS) diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index e0f94d0..0bab2e6 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -80,8 +80,5 @@ endif (BUILD_TESTING) install ( TARGETS h5debug h5repart h5mkgrp - RUNTIME DESTINATION - ${HDF5_INSTALL_BIN_DIR} - COMPONENT - toolsapplications + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) -- cgit v0.12 From 0a8317aab70973ee810330025b5a36969e462d92 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 13:07:38 -0500 Subject: [svn-r27365] added build dependencies for hl fortran builds --- hl/fortran/src/Makefile.am | 6 +++--- hl/fortran/src/Makefile.in | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index bbb6c6b..5da8cfa 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -47,7 +47,7 @@ endif # List sources to include in the HDF5 HL Fortran library. libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 H5LTff_gen.F90 H5TBff_gen.F90 + H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 #H5LTff_gen.F90 H5TBff_gen.F90 @@ -102,6 +102,6 @@ H5DSff.lo: $(srcdir)/H5DSff.F90 H5LTff.lo: $(srcdir)/H5LTff.F90 H5IMff.lo: $(srcdir)/H5IMff.F90 H5TBff.lo: $(srcdir)/H5TBff.F90 -H5LTff_gen.lo: H5LTff_gen.F90 -H5TBff_gen.lo: H5LTff_gen.F90 H5TBff_gen.F90 +H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 +H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index ada7374..a08ef80 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -150,7 +150,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5hl_fortran_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5F) am_libhdf5hl_fortran_la_OBJECTS = H5DSfc.lo H5LTfc.lo H5IMfc.lo \ - H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo \ + H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5TBff.lo H5IMff.lo \ H5LTff_gen.lo H5TBff_gen.lo libhdf5hl_fortran_la_OBJECTS = $(am_libhdf5hl_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -726,7 +726,7 @@ libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVI # List sources to include in the HDF5 HL Fortran library. libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5IMff.F90 H5TBff.F90 H5LTff_gen.F90 H5TBff_gen.F90 + H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 #H5LTff_gen.F90 H5TBff_gen.F90 @@ -1317,8 +1317,8 @@ H5DSff.lo: $(srcdir)/H5DSff.F90 H5LTff.lo: $(srcdir)/H5LTff.F90 H5IMff.lo: $(srcdir)/H5IMff.F90 H5TBff.lo: $(srcdir)/H5TBff.F90 -H5LTff_gen.lo: H5LTff_gen.F90 -H5TBff_gen.lo: H5LTff_gen.F90 H5TBff_gen.F90 +H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 +H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -- cgit v0.12 From f71a46a99ca6ab3e5115972b5479f21911c68b50 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 14:54:43 -0500 Subject: [svn-r27366] misc. clean-up --- fortran/src/H5_buildiface.F90 | 220 +++--------------------------------------- 1 file changed, 11 insertions(+), 209 deletions(-) diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index f73f915..4f7f965 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -1,10 +1,10 @@ -!****p* Program/H5test_kind +!****p* Program/H5_buildiface ! ! NAME -! Executable: H5test_kind +! Executable: H5_buildiface ! ! FILE -! fortran/src/H5test_kind.f90 +! fortran/src/H5_buildiface.f90 ! ! PURPOSE ! This stand alone program is used at build time to generate the program @@ -93,208 +93,9 @@ PROGRAM test_kind ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & /) - GOTO 10 - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind.f90',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, num_ikinds - j = ikind(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, num_rkinds - j = rkind(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" -#else - WRITE(*,*)" a_size = SIZEOF(a)" -#endif - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind" - WRITE(*,*) "USE H5test_kind_mod" - WRITE(*,*) "CHARACTER(LEN=2) :: jchr2" - WRITE(*,*) "WRITE(*,*) "" /*generated header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, num_ikinds - j = ikind(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, num_rkinds - j = rkind(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - -# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_longdble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -# else - sizeof_var = SIZEOF(c_longdble) -# endif - - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_LONG_DOUBLE - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" -#else - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_KIND -1"' - WRITE(*,'(A)')' WRITE(*,*) "#define C_LONG_DOUBLE_SIZEOF -1"' -#endif - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_dble, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - sizeof_var = SIZEOF(c_dble) -#endif - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_DOUBLE - WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_DOUBLE_SIZEOF "'//"//ADJUSTL(jchr2)" - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - sizeof_var = STORAGE_SIZE(c_flt, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - sizeof_var = SIZEOF(c_flt) -#endif - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", C_FLOAT - WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", sizeof_var - WRITE(*,'(A)')' WRITE(*,*) "#define C_FLOAT_SIZEOF "'//"//ADJUSTL(jchr2)" - - WRITE(*,*) "END PROGRAM H5test_kind" - -10 CONTINUE - -! (c) Generate Fortran H5* interfaces having multiple KIND interfaces. +! (a) Generate Fortran H5* interfaces having multiple KIND interfaces. ! -! Developer's notes: +! DEVELOPER'S NOTES: ! ! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 ! standard extended the maximum rank to 15, it was decided that they should use the @@ -309,7 +110,7 @@ WRITE(*,'(40(A,/))') & '! H5_KIND',& '! ',& '! PURPOSE',& -'! This module is generated at build by H5test_kind.F90 to handle all the',& +'! This module is generated at build by H5_buildiface.F90 to handle all the',& '! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& '! are H5A, H5D and H5P APIs',& '!',& @@ -329,7 +130,7 @@ WRITE(*,'(40(A,/))') & '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& -'! H5test_kind.F90',& +'! H5_buildiface.F90',& '!',& '!*****' @@ -749,6 +550,7 @@ WRITE(*,'(40(A,/))') & CLOSE(11) ! (b) Generate Fortran Check routines for the tests KIND interfaces. + OPEN(11,FILE='../test/tf_gen.F90') WRITE(11,'(40(A,/))') & '!****h* ROBODoc/TH5_MISC_gen.F90',& @@ -757,7 +559,7 @@ WRITE(*,'(40(A,/))') & '! TH5_MISC_gen',& '! ',& '! PURPOSE',& -'! This module is generated at build by H5test_kind.F90 to handle checking ',& +'! This module is generated at build by H5_buildiface.F90 to handle checking ',& '! in the tests all the detected KINDs.',& '!',& '! COPYRIGHT',& @@ -776,7 +578,7 @@ WRITE(*,'(40(A,/))') & '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& -'! H5test_kind.F90',& +'! H5_buildiface.F90',& '!',& '!*****' @@ -903,7 +705,7 @@ WRITE(*,'(40(A,/))') & WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' WRITE(11,'(A)') '!DEC$endif' -! Subroutine API +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' WRITE(11,'(A)') ' LOGICAL :: value, correct_value' -- cgit v0.12 From b7dc32b0a0685fcd441a46a817b46621b194333d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Jul 2015 16:56:59 -0500 Subject: [svn-r27368] misc. code clean-up --- fortran/src/CMakeLists.txt | 35 +++-------------------------------- fortran/src/H5_buildiface.F90 | 10 +++++----- fortran/src/HDF5.F90 | 2 +- fortran/src/Makefile.am | 8 ++++---- fortran/src/Makefile.in | 14 +++++++------- 5 files changed, 20 insertions(+), 49 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 51a5eb4..b0737d5 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -38,7 +38,6 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_B #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities # H5test_kind.F90 used to generate various KIND interfaces -# H5fortran_detect.F90 used to generate H5fort_type_defines.h # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -65,39 +64,11 @@ set_target_properties (H5_buildiface PROPERTIES set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 - ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 + OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5_buildiface ) -#----------------------------------------------------------------------------- -#add_executable (H5fortran_detect -# ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 -#) -#if (WIN32 AND MSVC) -# if (BUILD_SHARED_LIBS) -# set_target_properties (H5fortran_detect -# PROPERTIES -# COMPILE_FLAGS "/MT" -# ) -# endif (BUILD_SHARED_LIBS) -# set_target_properties (H5fortran_detect -# PROPERTIES -# LINK_FLAGS "/SUBSYSTEM:CONSOLE" -# ) -#endif (WIN32 AND MSVC) -#set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) -# -#set (CMD $) -#add_custom_command ( -# OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h -# COMMAND ${CMD} -# ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h -# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} -# DEPENDS H5fortran_detect -#) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- @@ -183,7 +154,7 @@ set (f90_F_SRCS ${f90_F_SRCS} # generated file - ${HDF5_F90_BINARY_DIR}/H5_KINDff.F90 + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 @@ -265,7 +236,7 @@ set (mod_files ${MOD_BUILD_DIR}/h5s.mod ${MOD_BUILD_DIR}/h5t.mod ${MOD_BUILD_DIR}/h5z.mod - ${MOD_BUILD_DIR}/h5_kind.mod + ${MOD_BUILD_DIR}/h5_gen.mod ) install ( FILES diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index 4f7f965..7de9760 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -102,12 +102,12 @@ PROGRAM test_kind ! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility ! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. - OPEN(11,FILE='H5_KINDff.F90') + OPEN(11,FILE='H5_gen.F90') WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5_KINDff.F90',& +'!****h* ROBODoc/H5_gen.F90',& '!',& '! NAME',& -'! H5_KIND',& +'! H5_gen',& '! ',& '! PURPOSE',& '! This module is generated at build by H5_buildiface.F90 to handle all the',& @@ -134,7 +134,7 @@ PROGRAM test_kind '!',& '!*****' - WRITE(11,'(a)') "MODULE H5_KIND" + WRITE(11,'(a)') "MODULE H5_GEN" WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' WRITE(11,'(A)') ' USE H5GLOBAL' @@ -545,7 +545,7 @@ PROGRAM test_kind WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) ENDDO - WRITE(11,'(A)') 'END MODULE H5_KIND' + WRITE(11,'(A)') 'END MODULE H5_gen' CLOSE(11) diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index 8d0513a..64f5be6 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -41,6 +41,6 @@ MODULE HDF5 USE H5P USE H5R USE H5Z - USE H5_KIND + USE H5_gen USE H5LIB END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 5f6c8e8..3333ae6 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -46,7 +46,7 @@ endif libhdf5_fortran_la_SOURCES=H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 H5_KINDff.f90 \ + H5Tff.F90 H5Zff.F90 H5_gen.f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -140,7 +140,7 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. -H5_KINDff.F90: H5_buildiface$(EXEEXT) +H5_gen.F90: H5_buildiface$(EXEEXT) $(RUNSERIAL) ./H5_buildiface$(EXEEXT) # H5_buildiface.F90 is included in the distribution, and Automake knows @@ -173,12 +173,12 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo +H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_KINDff.lo + H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 30867e2..f11fa98 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -153,9 +153,9 @@ libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_KINDff.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 HDF5.lo + H5_gen.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 HDF5.lo 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@) @@ -741,7 +741,7 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI libhdf5_fortran_la_SOURCES = H5f90global.F90 \ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 H5_KINDff.f90 \ + H5Tff.F90 H5Zff.F90 H5_gen.f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 @@ -1410,7 +1410,7 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. -H5_KINDff.F90: H5_buildiface$(EXEEXT) +H5_gen.F90: H5_buildiface$(EXEEXT) $(RUNSERIAL) ./H5_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of @@ -1435,13 +1435,13 @@ 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_KINDff.lo: H5_KINDff.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo +H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_KINDff.lo + H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -- cgit v0.12 From 12b86abf18d831a2eeb337146187e220a50fafb2 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 12 Jul 2015 19:12:22 -0500 Subject: [svn-r27372] Snapshot version 1.9 release 224 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/cpp_doc_config | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.txt b/README.txt index eeb01dd..d960d93 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.224 currently under development +HDF5 version 1.9.225 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 54f8328..8034813 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -670,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 # This is our main target diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index dee3df9..b7510a7 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.224 currently under development +PROJECT_NUMBER = HDF5 version 1.9.225 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/lt_vers.am b/config/lt_vers.am index 7ffbbfb..d1e63da 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index a8fe363..1c355a1 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.224. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.225. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.224' -PACKAGE_STRING='HDF5 1.9.224' +PACKAGE_VERSION='1.9.225' +PACKAGE_STRING='HDF5 1.9.225' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.224 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.225 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1542,7 +1542,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.224:";; + short | recursive ) echo "Configuration of HDF5 1.9.225:";; esac cat <<\_ACEOF @@ -1731,7 +1731,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.224 +HDF5 configure 1.9.225 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2668,7 +2668,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.224, which was +It was created by HDF5 $as_me 1.9.225, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3539,7 +3539,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.224' + VERSION='1.9.225' cat >>confdefs.h <<_ACEOF @@ -28589,7 +28589,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.224 +HDF5 config.lt 1.9.225 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -30705,7 +30705,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.224, which was +This file was extended by HDF5 $as_me 1.9.225, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30771,7 +30771,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.224 +HDF5 config.status 1.9.225 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f35103a..8edc91b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.224], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.225], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 0d82d01..8a738f9 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 1c89b41..4d91c52 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -662,7 +662,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index cd58f7c..e272dae 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -680,7 +680,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index dd34e7f..16f02d1 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -661,7 +661,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4d27c8c..d767b2a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.224 currently under development +HDF5 version 1.9.225 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 4a3b4d2..40fa37c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 224 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 225 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.224" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.225" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 9a4589e..d997336 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 214 +LT_VERS_REVISION = 215 LT_VERS_AGE = 0 # Our main target, the HDF5 library -- cgit v0.12 From 717609a6749de1a88861859003454d8320a37ab2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 13 Jul 2015 13:54:09 -0500 Subject: [svn-r27373] moved building generated test APIs to a sperated build program (was in fortran/src/H5_buildiface.F90) --- MANIFEST | 1 + fortran/test/H5_test_buildiface.F90 | 272 ++++++++++++++++++++++++++++++++++++ 2 files changed, 273 insertions(+) create mode 100644 fortran/test/H5_test_buildiface.F90 diff --git a/MANIFEST b/MANIFEST index 4ee8883..0aa94e8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -324,6 +324,7 @@ ./fortran/test/fortranlib_test.f90 ./fortran/test/fortranlib_test_1_8.f90 ./fortran/test/fortranlib_test_F03.f90 +./fortran/test/H5_test_buildiface.F90 ./fortran/test/t.c ./fortran/test/t.h ./fortran/test/tf.F90 diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 new file mode 100644 index 0000000..fe5e716 --- /dev/null +++ b/fortran/test/H5_test_buildiface.F90 @@ -0,0 +1,272 @@ +!****p* Program/H5_buildiface +! +! NAME +! Executable: H5_buildiface +! +! FILE +! fortran/src/H5_buildiface.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM H5_test_buildiface + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + + + +! Generate Fortran Check routines for the tests KIND interfaces. + + OPEN(11,FILE='tf_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/TH5_MISC_gen.F90',& +'!',& +'! NAME',& +'! TH5_MISC_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5_test_buildiface.F90 to handle checking ',& +'! in the tests all the detected KINDs.',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5_test_buildiface.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE TH5_MISC_gen" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + +! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs + + WRITE(11,'(A)') ' INTERFACE verify' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " MODULE PROCEDURE verify_character" + WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') ' INTERFACE check_real_eq' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +! *************************** +! VALIDATE INTEGERS +! *************************** + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE REALS +! *************************** + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) + + +! *********************************** +! TEST IF TWO REAL NUMBERS ARE EQUAL +! *********************************** + + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' + WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' + WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE CHARACTER STRINGS +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER*(*) :: string' + WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_character' + +! *************************** +! VALIDATE LOGICAL +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' LOGICAL :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + + WRITE(11,'(A)') ' END SUBROUTINE verify_logical' + + WRITE(11,'(A)') "END MODULE TH5_MISC_gen" + + CLOSE(11) + +END PROGRAM H5_test_buildiface + + + -- cgit v0.12 From c90d6ad2869a9787e5068ca2a9f72f51d5b30438 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 13 Jul 2015 13:55:03 -0500 Subject: [svn-r27374] misc cleanup --- fortran/src/H5Pff.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index bdffcd7..203661f 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -7095,7 +7095,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_file_image_f +! ********************************************************************* ! Fortran interfaces for H5P functions needed by parallel MPI programs. +! ********************************************************************* + #ifdef H5_HAVE_PARALLEL !****s* H5P/h5pset_fapl_mpio_f ! -- cgit v0.12 From 838755cf71e270e2123b540bae3a89f6bbffbc2b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 13 Jul 2015 14:37:28 -0500 Subject: [svn-r27375] Moved generating Fortran 'test' code from the fortran src directory to the fortran 'test' directory. Updated autotools and cmake. --- fortran/src/H5_buildiface.F90 | 174 ------------------------------------------ fortran/test/CMakeLists.txt | 38 ++++++++- fortran/test/Makefile.am | 21 ++++- fortran/test/Makefile.in | 71 ++++++++++++----- hl/fortran/src/Makefile.am | 2 - hl/fortran/src/Makefile.in | 2 - 6 files changed, 109 insertions(+), 199 deletions(-) diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index 7de9760..e058849 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -549,180 +549,6 @@ PROGRAM test_kind CLOSE(11) -! (b) Generate Fortran Check routines for the tests KIND interfaces. - - OPEN(11,FILE='../test/tf_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/TH5_MISC_gen.F90',& -'!',& -'! NAME',& -'! TH5_MISC_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5_buildiface.F90 to handle checking ',& -'! in the tests all the detected KINDs.',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5_buildiface.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE TH5_MISC_gen" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE H5GLOBAL' - -! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs - - WRITE(11,'(A)') ' INTERFACE verify' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " MODULE PROCEDURE verify_character" - WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') ' INTERFACE check_real_eq' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -! *************************** -! VALIDATE INTEGERS -! *************************** - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE REALS -! *************************** - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) - - -! *********************************** -! TEST IF TWO REAL NUMBERS ARE EQUAL -! *********************************** - - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' - WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' - WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE CHARACTER STRINGS -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER*(*) :: string' - WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_character' - -! *************************** -! VALIDATE LOGICAL -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' LOGICAL :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - - WRITE(11,'(A)') ' END SUBROUTINE verify_logical' - - - - WRITE(11,'(A)') "END MODULE TH5_MISC_gen" - - CLOSE(11) - END PROGRAM test_kind diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 9b82765..32b3a09 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -23,8 +23,8 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -set_source_files_properties (tf.F90 tf_gen.F90 PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90 tf_gen.F90) +set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran) +add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) set (SHARED_LINK_FLAGS " ") if (WIN32) @@ -51,6 +51,40 @@ set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES ) #----------------------------------------------------------------------------- +# Setup the Fortran auto-detection utilities +# H5_test_buildiface.F90 used to generate various KIND test interfaces +#----------------------------------------------------------------------------- + +add_executable (H5_test_buildiface + ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90 + ) + +if (WIN32 AND MSVC) + if (BUILD_SHARED_LIBS) + set_target_properties (H5_test_buildiface + PROPERTIES + COMPILE_FLAGS "/MT" + ) + endif (BUILD_SHARED_LIBS) + set_target_properties (H5_test_buildiface + PROPERTIES + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) +endif (WIN32 AND MSVC) +set_target_properties (H5_test_buildiface PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) + +set (CMD $) +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + COMMAND ${CMD} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5_test_buildiface +) + +#----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 9c5b4f0..608b1e9 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -76,13 +76,32 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) tf_gen.F90; \ fi # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) FORTRAN_API=yes +# helper program we need to build. +noinst_PROGRAMS = H5_test_buildiface + +# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated +# with them. + +tf_gen.F90: H5_test_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) + +# H5_test_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. + +H5_test_buildiface_SOURCES = H5_test_buildiface.F90 + +# The build of the H5_test_buildiface does depend on any libraries, so set it +# to nothing. + +H5_test_buildiface_LDADD = + # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index cadba68..4e9bbd6 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -14,6 +14,7 @@ @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -88,6 +89,7 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static check_PROGRAMS = $(am__EXEEXT_1) +noinst_PROGRAMS = H5_test_buildiface$(EXEEXT) TESTS = $(am__EXEEXT_1) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -111,6 +113,10 @@ am__v_lt_1 = am__EXEEXT_1 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) \ fortranlib_test_F03$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_H5_test_buildiface_OBJECTS = H5_test_buildiface.$(OBJEXT) +H5_test_buildiface_OBJECTS = $(am_H5_test_buildiface_OBJECTS) +H5_test_buildiface_DEPENDENCIES = am_fflush1_OBJECTS = fflush1.$(OBJEXT) fflush1_OBJECTS = $(am_fflush1_OBJECTS) fflush1_LDADD = $(LDADD) @@ -212,10 +218,12 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ +SOURCES = $(libh5test_fortran_la_SOURCES) \ + $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) -DIST_SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ +DIST_SOURCES = $(libh5test_fortran_la_SOURCES) \ + $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) am__can_run_installinfo = \ @@ -766,6 +774,14 @@ MOSTLYCLEANFILES = *.tmp # from tests in conclude.am) FORTRAN_API = yes +# H5_test_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. +H5_test_buildiface_SOURCES = H5_test_buildiface.F90 + +# The build of the H5_test_buildiface does depend on any libraries, so set it +# to nothing. +H5_test_buildiface_LDADD = + # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -844,6 +860,19 @@ clean-checkPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +H5_test_buildiface$(EXEEXT): $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_DEPENDENCIES) $(EXTRA_H5_test_buildiface_DEPENDENCIES) + @rm -f H5_test_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_LDADD) $(LIBS) + fflush1$(EXEEXT): $(fflush1_OBJECTS) $(fflush1_DEPENDENCIES) $(EXTRA_fflush1_DEPENDENCIES) @rm -f fflush1$(EXEEXT) $(AM_V_FCLD)$(FCLINK) $(fflush1_OBJECTS) $(fflush1_LDADD) $(LIBS) @@ -1273,7 +1302,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: install: install-am install-exec: install-exec-am @@ -1312,7 +1341,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1385,19 +1414,19 @@ uninstall-am: .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - clean-local clean-noinstLTLIBRARIES cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic maintainer-clean-local mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am + clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-local \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-local mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am # @@ -1438,9 +1467,15 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) tf_gen.F90; \ fi +# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated +# with them. + +tf_gen.F90: H5_test_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) + # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 5da8cfa..6457f81 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -49,8 +49,6 @@ endif libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 -#H5LTff_gen.F90 H5TBff_gen.F90 - # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index a08ef80..9653c9f 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -729,8 +729,6 @@ libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 -#H5LTff_gen.F90 H5TBff_gen.F90 - # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F) -- cgit v0.12 From f50c602b01c0c40ce0bf3725f230b87e6826f967 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 09:14:05 -0500 Subject: [svn-r27376] set default value of SIZEOF___FLOAT128 --- config/cmake/ConfigureChecks.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 1203878..df3a7bd 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -149,11 +149,13 @@ endif (NOT WINDOWS) #----------------------------------------------------------------------------- # Check if C has __float128 extension #----------------------------------------------------------------------------- + CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) if(${HAVE_SIZEOF___FLOAT128}) SET(H5_HAVE_FLOAT128 1) else (${HAVE_SIZEOF___FLOAT128}) SET(H5_HAVE_FLOAT128 0) + SET(SIZEOF___FLOAT128 0) endif(${HAVE_SIZEOF___FLOAT128}) #----------------------------------------------------------------------------- -- cgit v0.12 From 50c000fb49a34be4b5e600be9c4fc7bdea298860 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 10:31:15 -0500 Subject: [svn-r27377] Cleaned-up comment formatting: sed -e 's/^ \*[ ]*\([A-Z]\)\([a-z]\)/ * \1\2/g' H5Zf.c | sed -e 's/^ \*[ ]*\([a-z]\)/ * \1/g' | sed -e 's/^ \*[ ]*\([0-9]\)/ * \1/g' --- fortran/src/H5Af.c | 436 ++++++------ fortran/src/H5Df.c | 280 ++++---- fortran/src/H5Ef.c | 16 +- fortran/src/H5Ff.c | 208 +++--- fortran/src/H5Gf.c | 340 ++++----- fortran/src/H5If.c | 90 +-- fortran/src/H5Lf.c | 294 ++++---- fortran/src/H5Of.c | 60 +- fortran/src/H5Pf.c | 1810 ++++++++++++++++++++++++------------------------ fortran/src/H5Rf.c | 74 +- fortran/src/H5Sf.c | 488 ++++++------- fortran/src/H5Tf.c | 560 +++++++-------- fortran/src/H5Zf.c | 14 +- fortran/src/H5_f.c | 126 ++-- fortran/src/H5f90kit.c | 32 +- 15 files changed, 2414 insertions(+), 2414 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index d0ed250f..0fa84a3 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -1,6 +1,6 @@ /****h* H5Af/H5Af * PURPOSE - * This file contains C stubs for H5A Fortran APIs + * This file contains C stubs for H5A Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,23 +26,23 @@ /****if* H5Af/h5acreate_c * NAME - * h5acreate_c + * h5acreate_c * PURPOSE - * Call H5Acreate2 to create an attribute + * Call H5Acreate2 to create an attribute * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * type_id - datatype identifier - * space_id - dataspace identifier - * crt_pr - identifier of creation property list + * obj_id - object identifier + * name - name of the attribute + * namelen - name length + * type_id - datatype identifier + * space_id - dataspace identifier + * crt_pr - identifier of creation property list * OUTPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -75,18 +75,18 @@ done: /****if* H5Af/h5adelete_c * NAME - * h5adelete_c + * h5adelete_c * PURPOSE - * Call H5Adelete to delete an attribute + * Call H5Adelete to delete an attribute * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length + * obj_id - object identifier + * name - name of the attribute + * namelen - name length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -120,19 +120,19 @@ done: /****if* H5Af/h5aopen_idx_c * NAME - * h5aopen_idx_c + * h5aopen_idx_c * PURPOSE - * Call H5Aopen_by_idx to open an attribute + * Call H5Aopen_by_idx to open an attribute * INPUTS - * obj_id - object identifier - * idx - attribute index ( zero based) + * obj_id - object identifier + * idx - attribute index ( zero based) * OUTPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -156,18 +156,18 @@ done: /****if* H5Af/h5aget_space_c * NAME - * h5aget_space_c + * h5aget_space_c * PURPOSE - * Call H5Aget_space to get attribute's dataspace + * Call H5Aget_space to get attribute's dataspace * INPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * OUTPUTS - * space_id - dataspace identifier + * space_id - dataspace identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -190,18 +190,18 @@ done: /****if* H5Af/h5aget_type_c * NAME - * h5aget_type_c + * h5aget_type_c * PURPOSE - * Call H5Aget_space to get attribute's datatype + * Call H5Aget_space to get attribute's datatype * INPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * OUTPUTS - * type_id - datatype identifier + * type_id - datatype identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -224,18 +224,18 @@ done: /****if* H5Af/h5aget_num_attrs_c * NAME - * h5aget_num_attrs_c + * h5aget_num_attrs_c * PURPOSE - * Call H5Oget_info to determine number of - * attributes of an object + * Call H5Oget_info to determine number of + * attributes of an object * INPUTS - * obj_id - object identifier - * attr_num - number of attributes + * obj_id - object identifier + * attr_num - number of attributes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -262,19 +262,19 @@ done: /****if* H5Af/h5aget_name_c * NAME - * h5aget_name_c + * h5aget_name_c * PURPOSE - * Call H5Aget_name to get attribute's name + * Call H5Aget_name to get attribute's name * INPUTS - * attr_id - attribute identifier - * bufsize - size of the buffer + * attr_id - attribute identifier + * bufsize - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE @@ -313,18 +313,18 @@ done: /****if* H5Af/h5aget_storage_size_c * NAME - * h5aget_storage_size_c + * h5aget_storage_size_c * PURPOSE - * Call H5Aget_storage_size + * Call H5Aget_storage_size * INPUTS - * attr_id - identifier of an attribute + * attr_id - identifier of an attribute * OUTPUTS - * size - attributes storage requirements + * size - attributes storage requirements * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -345,18 +345,18 @@ done: /****if* H5Af/h5aget_create_plist_c * NAME - * h5aget_create_plist_c + * h5aget_create_plist_c * PURPOSE - * Call H5Aget_create_plist + * Call H5Aget_create_plist * INPUTS - * attr_id - identifier of an attribute + * attr_id - identifier of an attribute * OUTPUTS - * creation_prop_id - Identifier for the attribute’s creation property + * creation_prop_id - Identifier for the attribute’s creation property * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -377,26 +377,26 @@ done: /****if* H5Af/h5arename_by_name_c * NAME - * h5arename_by_name_c + * h5arename_by_name_c * PURPOSE - * Calls H5Arename_by_name + * Calls H5Arename_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object, relative to location, - * whose attribute is to be renamed - * obj_name_len - Object name length - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length - * lapl_id - Link access property list identifier + * loc_id - Object identifier + * obj_name - Name of object, relative to location, + * whose attribute is to be renamed + * obj_name_len - Object name length + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length + * lapl_id - Link access property list identifier * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -438,21 +438,21 @@ done: /****if* H5Af/h5aopen_c * NAME - * h5aopen_c + * h5aopen_c * PURPOSE - * Call H5Aopen to open an attribute + * Call H5Aopen to open an attribute * INPUTS - * obj_id - Identifer for object to which attribute is attached + * obj_id - Identifer for object to which attribute is attached * attr_name - Attribute access property list - * attr_namelen - size of attr_name - * aapl_id - Link access property list + * attr_namelen - size of attr_name + * aapl_id - Link access property list * OUTPUTS - * attr_id - dataset identifier + * attr_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -483,24 +483,24 @@ done: } /****if* H5Af/h5adelete_by_name_c * NAME - * h5adelete_by_name_c + * h5adelete_by_name_c * PURPOSE - * Call h5adelete_by_name to remove an attribute from a specified location + * Call h5adelete_by_name to remove an attribute from a specified location * INPUTS - * loc_id - identifer for object to which attribute is attached - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - identifer for object to which attribute is attached + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -536,24 +536,24 @@ done: } /****if* H5Af/h5adelete_by_idx_c * NAME - * h5adelete_by_idx_c + * h5adelete_by_idx_c * PURPOSE - * Call h5adelete_by_idx + * Call h5adelete_by_idx * INPUTS - * loc_id - Location or object identifier; may be dataset or group - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - Location or object identifier; may be dataset or group + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -586,44 +586,44 @@ done: } /****if* H5Af/h5aget_name_by_idx_c * NAME - * h5aget_name_by_idx_c + * h5aget_name_by_idx_c * PURPOSE - * Call h5aget_name_by_idx + * Call h5aget_name_by_idx * INPUTS * * - * loc_id - Identifer for object to which attribute is attached - * obj_name - Name of object, relative to location, - * from which attribute is to be removed *TEST* check NULL - * idx_type - Type of index; Possible values are: + * loc_id - Identifer for object to which attribute is attached + * obj_name - Name of object, relative to location, + * from which attribute is to be removed *TEST* check NULL + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * attr_id - Attribute identifier - * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value + * n - Attribute’s position in index + * attr_id - Attribute identifier + * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value * - * lapl_id - Link access property list - * hdferr - Error code: - * Returns attribute name size, -1 if fail + * lapl_id - Link access property list + * hdferr - Error code: + * Returns attribute name size, -1 if fail * * OUTPUTS - * name - Attribute name + * name - Attribute name * * RETURNS - * Size of buffer on success, -1 on failure + * Size of buffer on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -677,36 +677,36 @@ done: /****if* H5Af/h5aopen_by_idx_c * NAME - * h5aopen_by_idx_c + * h5aopen_by_idx_c * PURPOSE - * Call H5Aopen_by_idx + * Call H5Aopen_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * aapl_id - Attribute access property list - * lapl_id - Link access property list + * n - Attribute’s position in index + * aapl_id - Attribute access property list + * lapl_id - Link access property list * OUTPUTS - * attr_id - attribute identifer + * attr_id - attribute identifer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -740,23 +740,23 @@ done: /****if* H5Af/h5aget_info_c * NAME - * h5aget_info_c + * h5aget_info_c * PURPOSE - * Call H5Aget_info + * Call H5Aget_info * INPUTS - * loc_id - Object identifier + * loc_id - Object identifier * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -792,40 +792,40 @@ done: /****if* H5Af/h5aget_info_by_idx_c * NAME - * h5aget_info_by_idx_c + * h5aget_info_by_idx_c * PURPOSE - * Call H5Aget_info_by_idx + * Call H5Aget_info_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * lapl_id - Link access property list + * n - Attribute’s position in index + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -871,28 +871,28 @@ done: /****if* H5Af/h5aget_info_by_name_c * NAME - * h5aget_info_by_name_c + * h5aget_info_by_name_c * PURPOSE - * Call H5Aget_info_by_name + * Call H5Aget_info_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -942,32 +942,32 @@ done: /****if* H5Af/h5acreate_by_name_c * NAME - * h5acreate_by_name_c + * h5acreate_by_name_c * PURPOSE - * Call h5acreate_by_name + * Call h5acreate_by_name * INPUTS * - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * type_id - Attribute datatype identifier - * space_id - Attribute dataspace identifier - * acpl_id - Attribute creation property list identifier (Currently not used.) - * aapl_id - Attribute access property list identifier (Currently not used.) - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * type_id - Attribute datatype identifier + * space_id - Attribute dataspace identifier + * acpl_id - Attribute creation property list identifier (Currently not used.) + * aapl_id - Attribute access property list identifier (Currently not used.) + * lapl_id - Link access property list * * OUTPUTS * - * attr - an attribute identifier + * attr - an attribute identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * N/A * SOURCE @@ -1008,21 +1008,21 @@ done: /****if* H5Af/h5aexists_c * NAME - * h5aexists_c + * h5aexists_c * PURPOSE * CAll h5aexists * INPUTS * - * obj_id - Object identifier - * attr_name - Attribute name + * obj_id - Object identifier + * attr_name - Attribute name * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE @@ -1054,23 +1054,23 @@ done: /****if* H5Af/h5aexists_by_name_c * NAME - * h5aexists_by_name_c + * h5aexists_by_name_c * PURPOSE * CAll H5Aexists_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * lapl_id - Link access property list identifier + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE @@ -1108,24 +1108,24 @@ done: /****if* H5Af/h5aopen_by_name_c * NAME - * h5aopen_by_name_c + * h5aopen_by_name_c * PURPOSE - * Call H5Aopen_by_name + * Call H5Aopen_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) - * lapl_id - Link access property list identifier + * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE @@ -1163,22 +1163,22 @@ h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd a /****if* H5Af/h5arename_c * NAME - * h5arename_c + * h5arename_c * PURPOSE - * Calls H5Arename + * Calls H5Arename * INPUTS - * loc_id - Object identifier - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length + * loc_id - Object identifier + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 050d7e0..57b4d4d 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -1,6 +1,6 @@ /****h* H5Df/H5Df * PURPOSE - * This file contains C stubs for H5D Fortran APIs + * This file contains C stubs for H5D Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -84,19 +84,19 @@ DONE: * PURPOSE * Call H5Dopen2 to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * dapl_id - Dataset access property list + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * dapl_id - Dataset access property list * OUTPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY - * Added 1.8 parameter: dapl_id + * Added 1.8 parameter: dapl_id * SOURCE */ int_f @@ -204,21 +204,21 @@ h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i * PURPOSE * Call H5Dread to read a dataset of dataset region references * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer to store references to the objects. - * n - number of references to be stored. + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer to store references to the objects. + * n - number of references to be stored. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, May 15, 2002 + * Wednesday, May 15, 2002 * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. * SOURCE */ int_f @@ -274,12 +274,12 @@ h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id * PURPOSE * Call H5Dclose to close a dataset * INPUTS - * dset_id - identifier of the dataset to be closed + * dset_id - identifier of the dataset to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE @@ -302,14 +302,14 @@ h5dclose_c ( hid_t_f *dset_id ) * PURPOSE * Call H5Dget_space to obtain dataspace of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * space_id - identifier of the dataset's dataspace + * space_id - identifier of the dataset's dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE @@ -337,14 +337,14 @@ h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) * PURPOSE * Call H5Dget_type to obtain datatype of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * type_id - identifier of the dataset's datatype + * type_id - identifier of the dataset's datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE @@ -373,16 +373,16 @@ h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) * h5dget_create_plist_c * PURPOSE * Call H5Dget_create_plist to obtain creation property list - * of a dataset + * of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * plist_id - identifier of he dataset creation property list + * plist_id - identifier of he dataset creation property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE @@ -413,18 +413,18 @@ h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) * PURPOSE * Call H5Dset_extent to extend dataset with unlimited dimensions * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * dims - array with the dimension sizes + * dims - array with the dimension sizes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * * HISTORY - * Changed name from the now obsolete h5dextend - * to h5dset_extent in order to match new fortran interface. + * Changed name from the now obsolete h5dextend + * to h5dset_extent in order to match new fortran interface. * -MSB- March 14, 2008 * SOURCE */ @@ -465,16 +465,16 @@ h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) * h5dget_storage_size_c * PURPOSE * Call H5Dget_storage_size to return the amount of storage - * required for a dataset + * required for a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * size - the amount of storage required for a dataset + * size - the amount of storage required for a dataset * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE @@ -502,16 +502,16 @@ h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) * PURPOSE * Get the maximum size of the VL dataset element * INPUTS - * dset_id - identifier of the dataset - * type_id - datatype identifier - * space_id - dataspace identifier + * dset_id - identifier of the dataset + * type_id - datatype identifier + * space_id - dataspace identifier * OUTPUTS - * len - maximum length of the VL dataset element + * len - maximum length of the VL dataset element * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE @@ -560,21 +560,21 @@ DONE: * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE @@ -633,22 +633,22 @@ DONE: * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 24, 2002 + * Wednesday, October 24, 2002 * HISTORY * * SOURCE @@ -705,20 +705,20 @@ DONE: * PURPOSE * Write variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 28, 2002 + * Monday, October 28, 2002 * HISTORY * * SOURCE @@ -792,20 +792,20 @@ DONE: * PURPOSE * Read variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * Output: buf - data buffer - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * Output: buf - data buffer + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, November 1, 2002 + * Friday, November 1, 2002 * HISTORY * * SOURCE @@ -875,21 +875,21 @@ h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE @@ -948,22 +948,22 @@ DONE: * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE @@ -1065,14 +1065,14 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b * PURPOSE * Call H5Dget_space_status to request dataspace allocation status * INPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE @@ -1108,17 +1108,17 @@ h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) * loc_id - Identifier of the file or group within which to create the dataset. * type_id - Identifier of the datatype to use when creating the dataset. * space_id - Identifier of the dataspace to use when creating the dataset. - * dcpl_id - Dataset creation property list identifier. - * dapl_id - Dataset access property list identifier. + * dcpl_id - Dataset creation property list identifier. + * dapl_id - Dataset access property list identifier. * OUTPUTS * - * dset_id - dataset identifier + * dset_id - dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * SOURCE */ int_f @@ -1207,8 +1207,8 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, * file_space_id - file dataspace identifier * xfer - file transfer property * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer * len - array element lenghts @@ -1288,16 +1288,16 @@ h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) * PURPOSE * Call H5Dvlen_reclaim * INPUTS - * type_id - Identifier of the datatype. - * space_id - Identifier of the dataspace. - * plist_id - Identifier of the property list used to create the buffer. - * buf - Pointer to the buffer to be reclaimed. + * type_id - Identifier of the datatype. + * space_id - Identifier of the dataspace. + * plist_id - Identifier of the property list used to create the buffer. + * buf - Pointer to the buffer to be reclaimed. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January 15, 2011 + * January 15, 2011 * * SOURCE */ diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 4cba955..bba0157 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -1,6 +1,6 @@ /****h* H5Ef/H5Ef * PURPOSE - * This file contains C stubs for H5E Fortran APIs + * This file contains C stubs for H5E Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -274,19 +274,19 @@ done: /****if* H5Ef/h5eset_auto2_c * NAME - * h5eset_auto2_c + * h5eset_auto2_c * PURPOSE - * Calls H5Eset_auto2 + * Calls H5Eset_auto2 * INPUTS - * estack_id - Error stack identifier. - * func - Function to be called upon an error condition. - * client_data - Data passed to the error function. + * estack_id - Error stack identifier. + * func - Function to be called upon an error condition. + * client_data - Data passed to the error function. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * July 22, 2009 + * July 22, 2009 * SOURCE */ /* int_f */ diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 1de2164..c1cdb91 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -1,6 +1,6 @@ /****h* H5Ff/H5Ff * PURPOSE - * This file contains C stubs for H5F Fortran APIs + * This file contains C stubs for H5F Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,22 +26,22 @@ /****if* H5Ff/h5fcreate_c * NAME - * h5fcreate_c + * h5fcreate_c * PURPOSE - * Call H5Fcreate to create the file + * Call H5Fcreate to create the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * crt_pr - identifier of creation property list - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * crt_pr - identifier of creation property list + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * SOURCE */ int_f @@ -95,19 +95,19 @@ h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hi /****if* H5Ff/h5fflush_c * NAME - * h5fflush_c + * h5fflush_c * PURPOSE - * Call H5Fflush to flush the object + * Call H5Fflush to flush the object * INPUTS - * object_id - identifier of either a file, a dataset, - * a group, an attribute or a named data type - * scope - integer to specify the flushing action, either + * object_id - identifier of either a file, a dataset, + * a group, an attribute or a named data type + * scope - integer to specify the flushing action, either * H5F_SCOPE_GLOBAL or H5F_SCOPE_LOCAL * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 5, 1999 + * Friday, November 5, 1999 * SOURCE */ int_f @@ -136,20 +136,20 @@ h5fflush_c (hid_t_f *object_id, int_f *scope) /****if* H5Ff/h5fmount_c * NAME - * h5fmount_c + * h5fmount_c * PURPOSE - * Call H5Fmount to mount the file + * Call H5Fmount to mount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length - * file_id - file identifier for the file to be mounted - * acc_prp - identifier of access property list + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length + * file_id - file identifier for the file to be mounted + * acc_prp - identifier of access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * HISTORY */ int_f @@ -194,18 +194,18 @@ h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hi /****if* H5Ff/h5funmount_c * NAME - * h5funmount_c + * h5funmount_c * PURPOSE - * Call H5Funmount to unmount the file + * Call H5Funmount to unmount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * SOURCE */ int_f @@ -242,21 +242,21 @@ h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /****if* H5Ff/h5fopen_c * NAME - * h5fopen_c + * h5fopen_c * PURPOSE - * Call H5Fopen to open the file + * Call H5Fopen to open the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * SOURCE */ int_f @@ -305,18 +305,18 @@ h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid /****if* H5Ff/h5freopen_c * NAME - * h5freopen_c + * h5freopen_c * PURPOSE - * Call H5Freopen to open the file + * Call H5Freopen to open the file * INPUTS - * file_id1 - file identifier + * file_id1 - file identifier * OUTPUTS - * file_id2 - file identifier + * file_id2 - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f @@ -338,18 +338,18 @@ h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /****if* H5Ff/h5fget_create_plist_c * NAME - * h5fget_create_plist_c + * h5fget_create_plist_c * PURPOSE - * Call H5Fget_create_plist to get the file creation property list + * Call H5Fget_create_plist to get the file creation property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * prop_id - creation property list identifier + * prop_id - creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal, Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f @@ -371,18 +371,18 @@ h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /****if* H5Ff/h5fget_access_plist_c * NAME - * h5fget_access_plist_c + * h5fget_access_plist_c * PURPOSE - * Call H5Fget_access_plist to get the file access property list + * Call H5Fget_access_plist to get the file access property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * access_id - access property list identifier + * access_id - access property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * * SOURCE @@ -406,20 +406,20 @@ h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /****if* H5Ff/h5fis_hdf5_c * NAME - * h5fis_hdf5_c + * h5fis_hdf5_c * PURPOSE - * Call H5Fis_hdf5 to determone if the file is an HDF5 file + * Call H5Fis_hdf5 to determone if the file is an HDF5 file * INPUTS - * name - name of the file - * namelen - name length + * name - name of the file + * namelen - name length * OUTPUTS - * flag - 0 if file is not HDF5 file , positive if a file - * is an HDF5 file, and negative on failure. + * flag - 0 if file is not HDF5 file , positive if a file + * is an HDF5 file, and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * HISTORY * * SOURCE @@ -452,16 +452,16 @@ h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) } /****if* H5Ff/h5fclose_c * NAME - * h5fclose_c + * h5fclose_c * PURPOSE - * Call H5Fclose to close the file + * Call H5Fclose to close the file * INPUTS - * file_id - identifier of the file to be closed + * file_id - identifier of the file to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * HISTORY * * SOURCE @@ -480,22 +480,22 @@ h5fclose_c ( hid_t_f *file_id ) } /****if* H5Ff/h5fget_obj_count_c * NAME - * h5fget_obj_count_c + * h5fget_obj_count_c * PURPOSE - * Call H5Fget_obj_count to get number of open objects within a file + * Call H5Fget_obj_count to get number of open objects within a file * INPUTS - * file_id - identifier of the file to be closed - * obj_type - type of the object + * file_id - identifier of the file to be closed + * obj_type - type of the object * RETURNS - * obj_count - number of objects - * 0 on success, -1 on failure + * obj_count - number of objects + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * - * Changed type of obj_count to size_t_f - * Thursday, September 25, 2008 + * Changed type of obj_count to size_t_f + * Thursday, September 25, 2008 * SOURCE */ @@ -525,7 +525,7 @@ h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * obj_type - type of the object * RETURNS * obj_ids - iarray of open objects identifiers - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Monday, September 30, 2002 @@ -569,17 +569,17 @@ h5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, /****if* H5Ff/h5fget_freespace_c * NAME - * h5fget_freespace_c + * h5fget_freespace_c * PURPOSE - * Call H5Fget_freespace to get amount of free space within a file + * Call H5Fget_freespace to get amount of free space within a file * INPUTS - * file_id - identifier of the file to query + * file_id - identifier of the file to query * RETURNS - * free_space - amount of free space in file - * 0 on success, -1 on failure + * free_space - amount of free space in file + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, October 7, 2003 + * Tuesday, October 7, 2003 * SOURCE */ @@ -599,20 +599,20 @@ h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /****if* H5Ff/h5fget_name_c * NAME - * h5fget_name_c + * h5fget_name_c * PURPOSE - * Call H5Fget_name to get file's name + * Call H5Fget_name to get file's name * INPUTS - * obj_id - object identifier - * buflen -size of the buffer + * obj_id - object identifier + * buflen -size of the buffer * OUTPUTS - * buf - buffer to hold the name - * size - size of the file's name + * buf - buffer to hold the name + * size - size of the file's name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, July 6, 2004 + * Tuesday, July 6, 2004 * SOURCE */ int_f @@ -648,18 +648,18 @@ done: /****if* H5Ff/h5fget_filesize_c * NAME - * h5fget_filesize_c + * h5fget_filesize_c * PURPOSE - * Call H5Fget_filesize to get file size + * Call H5Fget_filesize to get file size * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * size - size of the file + * size - size of the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, July 7, 2004 + * Wednesday, July 7, 2004 * SOURCE */ int_f diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 1a6b41b..6d85b9a 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -1,6 +1,6 @@ /****h* H5Gf/H5Gf * PURPOSE - * This file contains C stubs for H5G Fortran APIs + * This file contains C stubs for H5G Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,24 +26,24 @@ /****if* H5Gf/h5gcreate_c * NAME - * h5gcreate_c + * h5gcreate_c * PURPOSE - * Call H5Gcreate to create a group + * Call H5Gcreate to create a group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * size_hint - length of names in the group + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * size_hint - length of names in the group * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * HISTORY * - * Changed to call H5Gcreate2 because H5Gcreate flip-flops and + * Changed to call H5Gcreate2 because H5Gcreate flip-flops and * H5Gcreate1 can be compiled out of the library * QAK - 2007/08/23 * SOURCE @@ -98,21 +98,21 @@ DONE: /****if* H5Gf/h5gopen_c * NAME - * h5gopen_c + * h5gopen_c * PURPOSE - * Call H5Gopen to open a dataset + * Call H5Gopen to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * gapl_id - Group access property list identifier + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * gapl_id - Group access property list identifier * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * * SOURCE */ @@ -148,24 +148,24 @@ DONE: /****if* H5Gf/h5gget_obj_info_idx_c * NAME - * h5gget_obj_info_idx_c + * h5gget_obj_info_idx_c * PURPOSE - * Call H5Gget_obj_info to return name and the type of group - * member + * Call H5Gget_obj_info to return name and the type of group + * member * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * idx - index of the group member + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * idx - index of the group member * OUTPUTS - * obj_name - buffer to store member's name - * obj_namelen - length of the buffer - * obj_type - type of the object + * obj_name - buffer to store member's name + * obj_namelen - length of the buffer + * obj_type - type of the object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f @@ -207,7 +207,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, goto DONE; /* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't - * work on non-hard links - QAK + * work on non-hard links - QAK */ *obj_type = oinfo.type; @@ -231,20 +231,20 @@ DONE: /****if* H5Gf/h5gn_members_c * NAME - * h5gn_members_c + * h5gn_members_c * PURPOSE - * Call H5Gget_info_by_name to find number of objects in the group + * Call H5Gget_info_by_name to find number of objects in the group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length + * loc_id - file or group identifier + * name - name of the group + * namelen - name length * OUTPUTS - * nmemebers - number of members + * nmemebers - number of members * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f @@ -276,16 +276,16 @@ DONE: /****if* H5Gf/h5gclose_c * NAME - * h5gclose_c + * h5gclose_c * PURPOSE - * Call H5Gclose to close the group + * Call H5Gclose to close the group * INPUTS - * grp_id - identifier of the group to be closed + * grp_id - identifier of the group to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ @@ -303,19 +303,19 @@ h5gclose_c(hid_t_f *grp_id) /****if* H5Gf/h5glink_c * NAME - * h5glink_c + * h5glink_c * PURPOSE - * Call H5Glink to link the specified type + * Call H5Glink to link the specified type * INPUTS - * loc_id - identifier of file or group - * link_type - link type - * current_name - name of the existing object for hard link, - * anything for the soft link - * current_namelen - current name lenghth - * new_name - new name for the object - * new_namelen - new_name lenghth + * loc_id - identifier of file or group + * link_type - link type + * current_name - name of the existing object for hard link, + * anything for the soft link + * current_namelen - current name lenghth + * new_name - new name for the object + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -385,25 +385,25 @@ DONE: /****if* H5Gf/h5glink2_c * NAME - * h5glink2_c + * h5glink2_c * PURPOSE - * Call H5Glink2 to link the specified type + * Call H5Glink2 to link the specified type * INPUTS - * cur_loc_id - identifier of file or group - * cur_name - name of the existing object for hard link releative - * to cur_loc_id location, - * anything for the soft link - * current_namelen - current name lenghth - * link_type - link type - * new_loc_id - location identifier - * new_name - new name for the object releative to the new_loc_id - * location - * new_namelen - new_name lenghth + * cur_loc_id - identifier of file or group + * cur_name - name of the existing object for hard link releative + * to cur_loc_id location, + * anything for the soft link + * current_namelen - current name lenghth + * link_type - link type + * new_loc_id - location identifier + * new_name - new name for the object releative to the new_loc_id + * location + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, September 25, 2002 + * Wednesday, September 25, 2002 * HISTORY * * SOURCE @@ -470,14 +470,14 @@ DONE: /****if* H5Gf/h5gunlink_c * NAME - * h5gunlink_c + * h5gunlink_c * PURPOSE - * Call H5Gunlink to remove the specified name + * Call H5Gunlink to remove the specified name * INPUTS - * loc_id - identifier of file or group - * name - name of the object to unlink + * loc_id - identifier of file or group + * name - name of the object to unlink * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -512,17 +512,17 @@ DONE: /****if* H5Gf/h5gmove_c * NAME - * h5gmove_c + * h5gmove_c * PURPOSE - * Call H5Gmove to rename an object within an HDF5 file + * Call H5Gmove to rename an object within an HDF5 file * INPUTS - * loc_id - identifier of file or group - * src_name - name of the original object - * src_namelen - original name lenghth - * dst_name - new name for the object - * dst_namelen - new name lenghth + * loc_id - identifier of file or group + * src_name - name of the original object + * src_namelen - original name lenghth + * dst_name - new name for the object + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -562,18 +562,18 @@ DONE: /****if* H5Gf/h5gmove2_c * NAME - * h5gmove2_c + * h5gmove2_c * PURPOSE - * Call H5Gmove2 to rename an object within an HDF5 file + * Call H5Gmove2 to rename an object within an HDF5 file * INPUTS - * src_loc_id - identifier of file or group - * src_name - name of the original object relative to src_loc_id - * src_namelen - original name lenghth - * dst_loc_id - new location identifier - * dst_name - new name for the object relative to dst_loc_id - * dst_namelen - new name lenghth + * src_loc_id - identifier of file or group + * src_name - name of the original object relative to src_loc_id + * src_namelen - original name lenghth + * dst_loc_id - new location identifier + * dst_name - new name for the object relative to dst_loc_id + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, September 25, 2002 @@ -614,18 +614,18 @@ DONE: /****if* H5Gf/h5gget_linkval_c * NAME - * h5gget_linkval_c + * h5gget_linkval_c * PURPOSE - * Call H5Gget_linkval to return the name of object + * Call H5Gget_linkval to return the name of object * INPUTS - * loc_id - identifier of file or group - * name - name of the object that symbolic link points to - * namelen - the name lenghth - * size - lenghth of retrurned value + * loc_id - identifier of file or group + * name - name of the object that symbolic link points to + * namelen - the name lenghth + * size - lenghth of retrurned value * OUTPUTS - * value - name to be returned + * value - name to be returned * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -678,22 +678,22 @@ DONE: /****if* H5Gf/h5gset_comment_c * NAME - * h5gset_comment_c + * h5gset_comment_c * PURPOSE - * Call H5Oset_comment_by_name to set comments for the specified object + * Call H5Oset_comment_by_name to set comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * comment - the new comment - * commentlen - new comment lenghth + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * comment - the new comment + * commentlen - new comment lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * HISTORY - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f @@ -729,20 +729,20 @@ DONE: /****if* H5Gf/h5gget_comment_c * NAME - * h5gget_comment_c + * h5gget_comment_c * PURPOSE - * Call H5Oget_comment_by_name to retrieve comments for the specified object + * Call H5Oget_comment_by_name to retrieve comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * bufsize - at most bufsize characters - * comment - the new comment + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * bufsize - at most bufsize characters + * comment - the new comment * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * SOURCE */ int_f @@ -791,19 +791,19 @@ DONE: /****if* H5Gf/h5gcreate_anon_c * NAME - * h5gcreate_anon_c + * h5gcreate_anon_c * PURPOSE - * Call H5Gcreate_anon + * Call H5Gcreate_anon * INPUTS * - * loc_id - Location identifier - * gcpl_id - Group creation property list identifier - * gapl_id - Group access property list identifier + * loc_id - Location identifier + * gcpl_id - Group creation property list identifier + * gapl_id - Group access property list identifier * * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 @@ -825,17 +825,17 @@ done: /****if* H5Gf/h5gget_create_plist_c * NAME - * h5gget_create_plist_c + * h5gget_create_plist_c * PURPOSE - * Call H5Gget_create_plist + * Call H5Gget_create_plist * INPUTS * - * grp_id - group identifier + * grp_id - group identifier * * OUTPUTS - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 @@ -857,32 +857,32 @@ done: /****if* H5Gf/h5gget_info_c * NAME - * h5gget_info_c + * h5gget_info_c * PURPOSE - * Call H5Gget_info + * Call H5Gget_info * INPUTS - * group_id - Group identifier + * group_id - Group identifier * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 15, 2008 + * February 15, 2008 * HISTORY * * - Added 'mounted' paramater * M. Scot Breitenfeld - * July 16, 2008 + * July 16, 2008 * SOURCE */ int_f @@ -914,39 +914,39 @@ done: /****if* H5Gf/h5gget_info_by_idx_c * NAME - * h5gget_info_by_idx_c + * h5gget_info_by_idx_c * PURPOSE - * Call H5Gget_info_by_idx + * Call H5Gget_info_by_idx * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * index_type - Index type - * order - Order of the count in the index - * n - Position in the index of the group for which information is retrieved - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * index_type - Index type + * order - Order of the count in the index + * n - Position in the index of the group for which information is retrieved + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * - Added 'mounted' paramater * M. Scot Breitenfeld - * July 16, 2008 + * July 16, 2008 * SOURCE */ int_f @@ -987,36 +987,36 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, /****if* H5Gf/h5gget_info_by_name_c * NAME - * h5gget_info_by_name_c + * h5gget_info_by_name_c * PURPOSE - * Call H5Gget_info_by_name + * Call H5Gget_info_by_name * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * - Added 'mounted' paramater * M. Scot Breitenfeld - * July 16, 2008 + * July 16, 2008 * SOURCE */ int_f diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index da8b482..fdab0b6 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -1,6 +1,6 @@ /****h* H5If/H5If * PURPOSE - * This file contains C stubs for H5I Fortran APIs + * This file contains C stubs for H5I Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,15 +25,15 @@ /****if* H5If/h5iget_type_c * NAME - * h5iget_type_c + * h5iget_type_c * PURPOSE - * Call H5Iget_type to get the type of an object + * Call H5Iget_type to get the type of an object * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * type - object type + * type - object type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su * Thursday, March 24, 2000 @@ -61,24 +61,24 @@ h5iget_type_c (hid_t_f *obj_id, int_f *type) } /****if* H5If/h5iget_name_c * NAME - * h5iget_name_c + * h5iget_name_c * PURPOSE - * Call H5Iget_name to get object's name + * Call H5Iget_name to get object's name * INPUTS - * obj_id - object identifier - * buf_size - size of the buffer + * obj_id - object identifier + * buf_size - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * length of the name on success, -1 on failure + * length of the name on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * - * Changed the size of c_buf_size to c_buf_size + 1, which - * fixes the problem of truncating the string by 1 if the - * exact size of the string (buf_size) is passed in. + * Changed the size of c_buf_size to c_buf_size + 1, which + * fixes the problem of truncating the string by 1 if the + * exact size of the string (buf_size) is passed in. * M. Scot Breitenfeld, April 21, 2008 * SOURCE */ @@ -120,15 +120,15 @@ DONE: /****if* H5If/h5iinc_ref_c * NAME - * h5iinc_ref_c + * h5iinc_ref_c * PURPOSE - * Call H5Iinc_ref to increment object's reference count + * Call H5Iinc_ref to increment object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 @@ -156,18 +156,18 @@ done: /****if* H5If/h5idec_ref_c * NAME - * h5idec_ref_c + * h5idec_ref_c * PURPOSE - * Call H5Idec_ref to decrement object's reference count + * Call H5Idec_ref to decrement object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, December 9, 2003 + * Tuesday, December 9, 2003 * SOURCE */ int_f @@ -192,15 +192,15 @@ done: /****if* H5If/h5iget_ref_c * NAME - * h5iget_ref_c + * h5iget_ref_c * PURPOSE - * Call H5Iget_ref to retrieve object's reference count + * Call H5Iget_ref to retrieve object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 @@ -229,15 +229,15 @@ done: /****if* H5If/h5iget_file_id_c * NAME - * h5iget_file_id_c + * h5iget_file_id_c * PURPOSE - * Call H5Iget_file_id to obtain file identifier from object identifier + * Call H5Iget_file_id to obtain file identifier from object identifier * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Tuesday, August 24, 2004 @@ -266,14 +266,14 @@ done: } /*---------------------------------------------------------------------------- - * Name: h5iis_valid_c - * Purpose: Calls H5Iis_valid - * Inputs: obj_id - object identifier - * Outputs: 0 = false, 1 = true - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, August 24, 2004 - * Modifications: + * Name: h5iis_valid_c + * Purpose: Calls H5Iis_valid + * Inputs: obj_id - object identifier + * Outputs: 0 = false, 1 = true + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Tuesday, August 24, 2004 + * Modifications: *---------------------------------------------------------------------------*/ int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index f4ad1d4..0d3aac2 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -1,6 +1,6 @@ /****h* H5Lf/H5Lf * PURPOSE - * This file contains C stubs for H5L Fortran APIs + * This file contains C stubs for H5L Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,27 +26,27 @@ /****if* H5Lf/h5lcopy_c * NAME - * h5lcopy_c + * h5lcopy_c * PURPOSE - * Call H5Lcopy + * Call H5Lcopy * INPUTS * - * src_loc_id - Location identifier of the source link - * src_name - Name of the link to be copied - * src_namelen - length of the name - * dest_loc_id - Location identifier specifying the destination of the copy - * dest_name - Name to be assigned to the NEW copy - * dest_namelen - Length of the name - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lcpl_id - Link creation property list identifier - * lapl_id - Link access property list identifier + * src_loc_id - Location identifier of the source link + * src_name - Name of the link to be copied + * src_namelen - length of the name + * dest_loc_id - Location identifier specifying the destination of the copy + * dest_name - Name to be assigned to the NEW copy + * dest_namelen - Length of the name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lcpl_id - Link creation property list identifier + * lapl_id - Link access property list identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -88,21 +88,21 @@ done: /****if* H5Lf/h5lcreate_external_c * NAME - * h5lcreate_external_c + * h5lcreate_external_c * PURPOSE - * Call H5Lcreate_external_c + * Call H5Lcreate_external_c * INPUTS * - * file_name - Name of the file containing the target object. Neither the file nor the target object is - * required to exist. May be the file the link is being created in. - * obj_name - Path within the target file to the target object. + * file_name - Name of the file containing the target object. Neither the file nor the target object is + * required to exist. May be the file the link is being created in. + * obj_name - Path within the target file to the target object. * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 29, 2008 @@ -150,22 +150,22 @@ done: /****if* H5Lf/h5ldelete_c * NAME - * h5ldelete_c + * h5ldelete_c * PURPOSE - * Call H5Ldelete + * Call H5Ldelete * INPUTS * * - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lapl_id - Link access property list identifier - * namelen - length of name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lapl_id - Link access property list identifier + * namelen - length of name * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * SOURCE */ @@ -197,23 +197,23 @@ done: /****if* H5Lf/h5lcreate_soft_c * NAME - * h5lcreate_soft_c + * h5lcreate_soft_c * PURPOSE - * Call H5Lcreate_soft + * Call H5Lcreate_soft * INPUTS * * - * target_path - Path to the target object, which is not required to exist. - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * target_path - Path to the target object, which is not required to exist. + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * SOURCE */ @@ -253,22 +253,22 @@ h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, /****if* H5Lf/h5lcreate_hard_c * NAME - * h5lcreate_hard_c + * h5lcreate_hard_c * PURPOSE - * Call H5Lcreate_hard + * Call H5Lcreate_hard * INPUTS * - * obj_loc_id - The file or group identifier for the target object. - * obj_name - Name of the target object, which must already exist. - * obj_namelen - Name length - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * link_namelen- Name length - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * obj_loc_id - The file or group identifier for the target object. + * obj_name - Name of the target object, which must already exist. + * obj_namelen - Name length + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * link_namelen- Name length + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 27, 2008 @@ -310,35 +310,35 @@ h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, /****if* H5Lf/h5ldelete_by_idx_c * NAME - * h5ldelete_by_idx_c + * h5ldelete_by_idx_c * PURPOSE - * Calls h5ldelete_by_idx + * Calls h5ldelete_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * group_namelen - Name length - * index_field - Type of index; Possible values are: + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * group_namelen - Name length + * index_field - Type of index; Possible values are: * H5_INDEX_UNKNOWN_F = -1 - Unknown index type * H5_INDEX_NAME_F - Index on names * H5_INDEX_CRT_ORDER_F - Index on creation order * H5_INDEX_N_F - Number of indices defined - * order - Order within field or index; Possible values are: + * order - Order within field or index; Possible values are: * H5_ITER_UNKNOWN_F - Unknown order * H5_ITER_INC_F - Increasing order * H5_ITER_DEC_F - Decreasing order * H5_ITER_NATIVE_F - No particular order, whatever is fastest * H5_ITER_N_F - Number of iteration orders - * n - Link for which to retrieve information - * lapl_id - Link access property list + * n - Link for which to retrieve information + * lapl_id - Link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * N/A * SOURCE @@ -376,22 +376,22 @@ done: /****if* H5Lf/h5lexists_c * NAME - * h5lexists_c + * h5lexists_c * PURPOSE - * Calls H5Lexists + * Calls H5Lexists * INPUTS * - * loc_id - Identifier of the file or group to query. - * name - Link name to check - * lapl_id - Link access property list identifier. + * loc_id - Identifier of the file or group to query. + * name - Link name to check + * lapl_id - Link access property list identifier. * OUTPUTS * - * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * * SOURCE @@ -423,34 +423,34 @@ done: /****if* H5Lf/h5lget_info_c * NAME - * h5lget_info_c + * h5lget_info_c * PURPOSE - * Call H5Lget_info + * Call H5Lget_info * INPUTS * * link_loc_id - File or group identifier. - * link_name - Name of the link for which information is being sought - * link_namelen - Name length - * lapl_id - Link access property list + * link_name - Name of the link for which information is being sought + * link_namelen - Name length + * lapl_id - Link access property list * OUTPUTS * * - * cset - indicates the character set used for link’s name. - * corder - specifies the link’s creation order position. - * corder_valid - indicates whether the value in corder is valid. - * link_type - specifies the link class: + * cset - indicates the character set used for link’s name. + * corder - specifies the link’s creation order position. + * corder_valid - indicates whether the value in corder is valid. + * link_type - specifies the link class: * H5L_LINK_HARD_F - Hard link * H5L_LINK_SOFT_F - Soft link * H5L_LINK_EXTERNAL_F - External link * H5L_LINK_ERROR_F - Error - * address - If the link is a hard link, address specifies the file address that the link points to - * val_size - If the link is a symbolic link, val_size will be the length of the link value + * address - If the link is a hard link, address specifies the file address that the link points to + * val_size - If the link is a symbolic link, val_size will be the length of the link value * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -496,30 +496,30 @@ done: /****if* H5Lf/h5lget_info_by_idx_c * NAME - * h5lget_info_by_idx_c + * h5lget_info_by_idx_c * PURPOSE - * Call H5Lget_info_by_idx + * Call H5Lget_info_by_idx * INPUTS * * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - *group_namelen - Name length + * group_name - Name of subject group + * group_namelen - Name length * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * lapl_id - Link access property list + * order - Order within field or index + * n - Link for which to retrieve information + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE @@ -570,7 +570,7 @@ done: * NAME * H5Lis_registered_c * PURPOSE - * Call H5Lis_registered + * Call H5Lis_registered * INPUTS * * link_cls_id - User-defined link class identifier @@ -578,11 +578,11 @@ done: * NONE * * RETURNS - * Returns a positive value if the link class has been registered - * and zero if it is unregistered. Otherwise returns a negative value + * Returns a positive value if the link class has been registered + * and zero if it is unregistered. Otherwise returns a negative value * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * N/A * SOURCE @@ -621,25 +621,25 @@ h5lis_registered_c(int_f *link_cls_id) /****if* H5Lf/h5lmove_c * NAME - * h5lmove_c + * h5lmove_c * PURPOSE - * Call H5Lmove + * Call H5Lmove * INPUTS * - * src_loc_id - Original file or group identifier. - * src_name - Original link name. - * src_namelen - name length - * dest_loc_id - Destination file or group identifier. - * dest_name - NEW link name. - * dest_namelen - name length + * src_loc_id - Original file or group identifier. + * src_name - Original link name. + * src_namelen - name length + * dest_loc_id - Destination file or group identifier. + * dest_name - NEW link name. + * dest_namelen - name length * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * SOURCE */ int_f @@ -682,17 +682,17 @@ done: * Call H5Lget_name_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * size - Maximum number of characters of link value to be returned. - * lapl_id - Link access property list + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * index_field - Index or field which determines the order + * order - Order within field or index + * n - Link for which to retrieve information + * size - Maximum number of characters of link value to be returned. + * lapl_id - Link access property list * OUTPUTS * - * name - Buffer in which link value is returned - * size - The size of the link name on success + * name - Buffer in which link value is returned + * size - The size of the link name on success * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -916,25 +916,25 @@ done: /****if* H5Lf/h5lget_val_c * NAME - * h5lget_val_c + * h5lget_val_c * PURPOSE - * Call H5Lget_val + * Call H5Lget_val * INPUTS * - * link_loc_id - File or group identifier. - * link_name - Link whose value is to be returned. - * link_name_len - length of link_name - * size - Maximum number of characters of link value to be returned. - * lapl_id - List access property list identifier + * link_loc_id - File or group identifier. + * link_name - Link whose value is to be returned. + * link_name_len - length of link_name + * size - Maximum number of characters of link value to be returned. + * lapl_id - List access property list identifier * OUTPUTS * - * linkval_buff - The buffer to hold the returned link value. + * linkval_buff - The buffer to hold the returned link value. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 11, 2008 + * April 11, 2008 * SOURCE */ int_f @@ -971,16 +971,16 @@ done: * Calls H5Literate * INPUTS * - * group_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * group_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -1018,19 +1018,19 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, * Call H5Literate_by_name * INPUTS * - * loc_id - Identifier specifying subject group - * name - Name of subject group - * namelen - Name length - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link - * lapl_id - List access property list identifier + * loc_id - Identifier specifying subject group + * name - Name of subject group + * namelen - Name length + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link + * lapl_id - List access property list identifier * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 7000ba2..4801f7d 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -1,6 +1,6 @@ /****h* H5Of/H5Of * PURPOSE - * This file contains C stubs for H5O Fortran APIs + * This file contains C stubs for H5O Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -109,12 +109,12 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * PURPOSE * Calls H5Olink * INPUTS - * object_id - Object to be linked. - * new_loc_id - File or group identifier specifying location at which object is to be linked. - * name - Name of link to be created, relative to new_loc_id. - * namelen - Length of buffer for link to be created. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * object_id - Object to be linked. + * new_loc_id - File or group identifier specifying location at which object is to be linked. + * name - Name of link to be created, relative to new_loc_id. + * namelen - Length of buffer for link to be created. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -194,16 +194,16 @@ h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_ } /****if* H5Of/h5oclose_c * NAME - * h5oclose_c + * h5oclose_c * PURPOSE - * Call H5Oclose + * Call H5Oclose * INPUTS - * object_id - Object identifier + * object_id - Object identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * December 17, 2008 + * December 17, 2008 * SOURCE */ int_f @@ -225,15 +225,15 @@ h5oclose_c ( hid_t_f *object_id ) * PURPOSE * Calls H5Ovisit * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -266,13 +266,13 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, * Calls H5open_by_addr * INPUTS * loc_id - File or group identifier - * addr - Object’s address in the file + * addr - Object’s address in the file * * OUTPUTS * obj_id - Dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * September 14, 2009 @@ -499,15 +499,15 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, * PURPOSE * Calls H5Ovisit_by_name * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -697,7 +697,7 @@ h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * INPUTS * object_id - Identifier of the target object. * name - Name of the object whose comment is to be set or reset, - * specified as a path relative to loc_id. + * specified as a path relative to loc_id. * namelen - Length of the name. * comment - The new comment. * commentlen - Length of the comment. @@ -755,7 +755,7 @@ h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fc * n - Object to open. * lapl_id - Link access property list. * OUTPUTS - * obj_id - An object identifier for the opened object. + * obj_id - An object identifier for the opened object. * RETURNS * 0 on success, -1 on failure * AUTHOR diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 55f783b..59c6859 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1,6 +1,6 @@ /****h* H5Pf/H5Pf * PURPOSE - * This file contains C stubs for H5P Fortran APIs + * This file contains C stubs for H5P Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -43,15 +43,15 @@ /****if* H5Pf/h5pcreate_c * NAME - * h5pcreate_c + * h5pcreate_c * PURPOSE - * Call H5Pcreate to create a property list + * Call H5Pcreate to create a property list * INPUTS - * cls - property list class identifier + * cls - property list class identifier * OUTPUTS - * prp_id - identifier of the created property list + * prp_id - identifier of the created property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, October 9, 2002 @@ -78,16 +78,16 @@ done: /****if* H5Pf/h5pclose_c * NAME - * h5pclose_c + * h5pclose_c * PURPOSE - * Call H5Pclose to close property lis + * Call H5Pclose to close property lis * INPUTS - * prp_id - identifier of the property list to be closed + * prp_id - identifier of the property list to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ @@ -107,18 +107,18 @@ h5pclose_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pcopy_c * NAME - * h5pcopy_c + * h5pcopy_c * PURPOSE - * Call H5Pcopy to copy property list + * Call H5Pcopy to copy property list * INPUTS - * prp_id - identifier of the property list to be copied + * prp_id - identifier of the property list to be copied * OUTPUTS - * new_prp_id - identifier of the new property list + * new_prp_id - identifier of the new property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ @@ -141,19 +141,19 @@ done: /****if* H5Pf/h5pequal_c * NAME - * h5pequal_c + * h5pequal_c * PURPOSE - * Call H5Pequal to check if two property lists are equal + * Call H5Pequal to check if two property lists are equal * INPUTS - * plist1_id - property list identifier - * plist2_id - property list identifier + * plist1_id - property list identifier + * plist2_id - property list identifier * OUTPUTS - * c_flag - flag to indicate that lists are eqaul + * c_flag - flag to indicate that lists are eqaul * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * * SOURCE */ @@ -210,15 +210,15 @@ done: /****if* H5Pf/h5pset_preserve_c * NAME - * h5pset_preserve_c + * h5pset_preserve_c * PURPOSE - * Call H5Pset_preserve to set transfer property for compound - * datatype + * Call H5Pset_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier - * flag - TRUE/FALSE flag + * prp_id - property list identifier + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -244,16 +244,16 @@ h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pget_preserve_c * NAME - * h5pget_preserve_c + * h5pget_preserve_c * PURPOSE - * Call H5Pget_preserve to set transfer property for compound - * datatype + * Call H5Pget_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -277,17 +277,17 @@ h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pset_deflate_c * NAME - * h5pset_deflate_c + * h5pset_deflate_c * PURPOSE - * Call H5Pset_deflate to set deflate level + * Call H5Pset_deflate to set deflate level * INPUTS - * prp_id - property list identifier - * level - level of deflation + * prp_id - property list identifier + * level - level of deflation * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * SOURCE */ @@ -311,17 +311,17 @@ h5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /****if* H5Pf/h5pset_chunk_c * NAME - * h5pset_chunk_c + * h5pset_chunk_c * PURPOSE - * Call H5Pset_chunk to set the sizes of chunks for a chunked - * layout dataset + * Call H5Pset_chunk to set the sizes of chunks for a chunked + * layout dataset * INPUTS - * prp_id - property list identifier - * rank - number of dimensions of each chunk - * dims - array of the size of each chunk + * prp_id - property list identifier + * rank - number of dimensions of each chunk + * dims - array of the size of each chunk * RETURNS - * 0 on success, -1 on failure - * Saturday, August 14, 1999 + * 0 on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE @@ -355,17 +355,17 @@ DONE: /****if* H5Pf/h5pget_chunk_c * NAME - * h5pget_chunk_c + * h5pget_chunk_c * PURPOSE - * Call H5Pget_chunk to get the sizes of chunks for a chunked - * layout dataset for at list max_rank number of dimensions + * Call H5Pget_chunk to get the sizes of chunks for a chunked + * layout dataset for at list max_rank number of dimensions * INPUTS - * prp_id - property list identifier - * max rank - maximum number of dimensions to return - * dims - array of the size of each chunk + * prp_id - property list identifier + * max rank - maximum number of dimensions to return + * dims - array of the size of each chunk * RETURNS - * number of chunk's dimnesion on success, -1 on failure - * Saturday, August 14, 1999 + * number of chunk's dimnesion on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE @@ -470,24 +470,24 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) /****if* H5Pf/h5pget_version_c * NAME - * h5pget_version_c + * h5pget_version_c * PURPOSE - * Call H5Pget_version to get the version information - * of various objects for a file creation property list + * Call H5Pget_version to get the version information + * of various objects for a file creation property list * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * boot - array to put boot block version number - * freelist - array to put global freelist version number - * stab - array to put symbol table version number - * shhdr - array to put shared object header version number + * boot - array to put boot block version number + * freelist - array to put global freelist version number + * stab - array to put symbol table version number + * shhdr - array to put shared object header version number * 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 - * Removed extra length parameters EP 7/6/00 + * Removed extra length parameters EP 7/6/00 * SOURCE */ int_f @@ -528,18 +528,18 @@ h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, /****if* H5Pf/h5pget_userblock_c * NAME - * h5pget_userblock_c + * h5pget_userblock_c * PURPOSE - * Call H5Pget_userblock to get the size of a user block in - * a file creation property list + * Call H5Pget_userblock to get the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * Outputs size - Size of the user-block in bytes + * prp_id - property list identifier + * Outputs size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f @@ -566,18 +566,18 @@ h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pset_userblock_c * NAME - * h5pset_userblock_c + * h5pset_userblock_c * PURPOSE - * Call H5Pset_userblock to set the size of a user block in - * a file creation property list + * Call H5Pset_userblock to set the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * size - Size of the user-block in bytes + * prp_id - property list identifier + * size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f @@ -603,21 +603,21 @@ h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pget_sizes_c * NAME - * h5pget_sizes_c + * h5pget_sizes_c * PURPOSE - * Call H5Pget_sizes to get the size of the offsets - * and lengths used in an HDF5 file + * Call H5Pget_sizes to get the size of the offsets + * and lengths used in an HDF5 file * INPUTS - * prp_id - property list identifier - * Outputs sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * Outputs sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 - * Deleted extra length parameters. EP 6/7/00 + * Deleted extra length parameters. EP 6/7/00 * SOURCE */ int_f @@ -646,18 +646,18 @@ h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /****if* H5Pf/h5pset_sizes_c * NAME - * h5pset_sizes_c + * h5pset_sizes_c * PURPOSE - * Call H5Pset_sizes to set the size of the offsets + * Call H5Pset_sizes to set the size of the offsets * INPUTS - * prp_id - property list identifier - * sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 * * SOURCE @@ -686,19 +686,19 @@ h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /****if* H5Pf/h5pset_sym_k_c * NAME - * h5pset_sym_k_c + * h5pset_sym_k_c * PURPOSE - * Call H5Pset_sym_k to set the size of parameters used - * to control the symbol table node + * Call H5Pset_sym_k to set the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank - * lk - Symbol table node size + * prp_id - property list identifier + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * SOURCE */ int_f @@ -726,20 +726,20 @@ h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pget_sym_k_c * NAME - * h5pget_sym_k_c + * h5pget_sym_k_c * PURPOSE - * Call H5Pget_sym_k to get the size of parameters used - * to control the symbol table node + * Call H5Pget_sym_k to get the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank - * lk - Symbol table node size + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -768,18 +768,18 @@ h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pset_istore_k_c * NAME - * h5pset_istore_k_c + * h5pset_istore_k_c * PURPOSE - * Call H5Pset_istore_k to set the size of the parameter - * used to control the B-trees for indexing chunked datasets + * Call H5Pset_istore_k to set the size of the parameter + * used to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank + * prp_id - property list identifier + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -807,19 +807,19 @@ h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_istore_k_c * NAME - * h5pget_istore_k_c + * h5pget_istore_k_c * PURPOSE - * Call H5Pget_istore_k to get the size of parameters used - * to control the B-trees for indexing chunked datasets + * Call H5Pget_istore_k to get the size of parameters used + * to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -846,18 +846,18 @@ h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_driver_c * NAME - * h5pget_driver_c + * h5pget_driver_c * PURPOSE - * Call H5Pget_driver to get low-level file driver identifier + * Call H5Pget_driver to get low-level file driver identifier * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * driver - low-level file driver identifier + * driver - low-level file driver identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -884,17 +884,17 @@ DONE: /****if* H5Pf/h5pset_fapl_stdio_c * NAME - * h5pset_fapl_stdio_c + * h5pset_fapl_stdio_c * PURPOSE - * Call H5Pset_stdio to set the low level file driver to - * use the functions declared in the stdio.h + * Call H5Pset_stdio to set the low level file driver to + * use the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 7, 2001 + * March 7, 2001 * HISTORY * * SOURCE @@ -918,20 +918,20 @@ h5pset_fapl_stdio_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_stdio_c * NAME - * h5pget_fapl_stdio_c + * h5pget_fapl_stdio_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the stdio.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * io - value indicates whether the file driver uses - * the functions declared in the stdio.h + * io - value indicates whether the file driver uses + * the functions declared in the stdio.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -958,17 +958,17 @@ h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /****if* H5Pf/h5pset_fapl_sec2_c * NAME - * h5pset_fapl_sec2_c + * h5pset_fapl_sec2_c * PURPOSE - * Call H5Pset_fapl_sec2 to set the low level file driver to - * use the functions declared in the unistd.h + * Call H5Pset_fapl_sec2 to set the low level file driver to + * use the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -993,20 +993,20 @@ h5pset_fapl_sec2_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_sec2_c * NAME - * h5pget_fapl_sec2_c + * h5pget_fapl_sec2_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the unistd.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * sec2 - value indicates whether the file driver uses - * the functions declared in the unistd.h + * sec2 - value indicates whether the file driver uses + * the functions declared in the unistd.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1032,19 +1032,19 @@ h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /****if* H5Pf/h5pset_alignment_c * NAME - * h5pset_alignment_c + * h5pset_alignment_c * PURPOSE - * Call H5Pset_alignment to set alignment properties of - * a file access property list + * Call H5Pset_alignment to set alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1071,19 +1071,19 @@ h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /****if* H5Pf/h5pget_alignment_c * NAME - * h5pget_alignment_c + * h5pget_alignment_c * PURPOSE - * Call H5Pget_alignment to get alignment properties of - * a file access property list + * Call H5Pget_alignment to get alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1111,20 +1111,20 @@ h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /****if* H5Pf/h5pset_fapl_core_c * NAME - * h5pset_fapl_core_c + * h5pset_fapl_core_c * PURPOSE - * Call H5Pset_fapl_core to set the low-level file driver - * to use malloc() and free() + * Call H5Pset_fapl_core to set the low-level file driver + * to use malloc() and free() * INPUTS - * prp_id - property list identifier - * increment - File block size in bytes - * flag - Boolean flag indicating whether to write the - * file contents to disk when the file is closed. + * prp_id - property list identifier + * increment - File block size in bytes + * flag - Boolean flag indicating whether to write the + * file contents to disk when the file is closed. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1153,18 +1153,18 @@ h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pget_fapl_core_c * NAME - * h5pget_fapl_core_c + * h5pget_fapl_core_c * PURPOSE - * Call H5Pget_fapl_core to determine whether the file access - * property list is set to the core drive + * Call H5Pget_fapl_core to determine whether the file access + * property list is set to the core drive * INPUTS - * prp_id - property list identifier - * Outputs increment - File block size in bytes + * prp_id - property list identifier + * Outputs increment - File block size in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1193,20 +1193,20 @@ h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pset_fapl_family_c * NAME - * h5pset_fapl_family_c + * h5pset_fapl_family_c * PURPOSE - * Call H5Pset_fapl_family to set the file access properties list - * to the family driver + * Call H5Pset_fapl_family to set the file access properties list + * to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1234,20 +1234,20 @@ h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist /****if* H5Pf/h5pget_fapl_family_c * NAME - * h5pget_fapl_family_c + * h5pget_fapl_family_c * PURPOSE - * Call H5Pget_fapl_family to determine whether the file access - * property list is set to the family driver + * Call H5Pget_fapl_family to determine whether the file access + * property list is set to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1276,25 +1276,25 @@ h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) /****if* H5Pf/h5pset_cache_c * NAME - * h5pset_cache_c + * h5pset_cache_c * PURPOSE - * Call H5Pset_cache to set he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pset_cache to set he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * prp_id - property list identifier + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 - * instead of double + * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 + * instead of double * SOURCE */ int_f @@ -1325,27 +1325,27 @@ h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_ /****if* H5Pf/h5pget_cache_c * NAME - * h5pget_cache_c + * h5pget_cache_c * PURPOSE - * Call H5Pget_cache to get he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pget_cache to get he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nelmts - Number of elements in the raw data chunk - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nelmts - Number of elements in the raw data chunk + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed type of the rdcc_w0 parameter to be real_f instead of double - * Changed type of the rdcc_nelmts parameter to be int_f. + * Changed type of the rdcc_w0 parameter to be real_f instead of double + * Changed type of the rdcc_nelmts parameter to be int_f. * EIP October 10, 2003 * SOURCE */ @@ -1377,23 +1377,23 @@ h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t /****if* H5Pf/h5pset_fapl_split_c * NAME - * h5pset_fapl_split_c + * h5pset_fapl_split_c * PURPOSE - * Call H5Pset_fapl_split to set he low-level driver to split meta data - * from raw data + * Call H5Pset_fapl_split to set he low-level driver to split meta data + * from raw data * INPUTS - * prp_id - property list identifier - * meta_len - Length of meta_ext - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_len - Length of raw _ext - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * prp_id - property list identifier + * meta_len - Length of meta_ext + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_len - Length of raw _ext + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE @@ -1438,26 +1438,26 @@ DONE: #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_split_c * NAME - * h5pget_fapl_split_c + * h5pget_fapl_split_c * PURPOSE - * Call H5Pget_fapl_split to determine whether the file access - * property list is set to the split driver + * Call H5Pget_fapl_split to determine whether the file access + * property list is set to the split driver * INPUTS - * prp_id - property list identifier - * meta_ext_size - Number of characters of the meta file extension - * to be copied to the meta_ext buffer - * raw_ext_size - Number of characters of the raw file extension - * to be copied to the raw_ext buffer + * prp_id - property list identifier + * meta_ext_size - Number of characters of the meta file extension + * to be copied to the meta_ext buffer + * raw_ext_size - Number of characters of the raw file extension + * to be copied to the raw_ext buffer *OUTPUT - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9 , 2001 + * March 9 , 2001 * HISTORY * * SOURCE @@ -1501,19 +1501,19 @@ h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hi /****if* H5Pf/h5pset_gc_references_c * NAME - * h5pset_gc_references_c + * h5pset_gc_references_c * PURPOSE - * Call H5Pset_gc_references to set garbage - * collecting references flag + * Call H5Pset_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1541,19 +1541,19 @@ h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pget_gc_references_c * NAME - * h5pget_gc_references_c + * h5pget_gc_references_c * PURPOSE - * Call H5Pget_gc_references to set garbage - * collecting references flag + * Call H5Pget_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * Outputs gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * Outputs gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1579,18 +1579,18 @@ h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pset_layout_c * NAME - * h5pset_layout_c + * h5pset_layout_c * PURPOSE - * Call H5Pset_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pset_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier - * layout - Type of storage layout for raw data. + * prp_id - property list identifier + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1617,19 +1617,19 @@ h5pset_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pget_layout_c * NAME - * h5pget_layout_c + * h5pget_layout_c * PURPOSE - * Call H5Pget_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pget_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * layout - Type of storage layout for raw data. + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1654,21 +1654,21 @@ h5pget_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pset_filter_c * NAME - * h5pset_filter_c + * h5pset_filter_c * PURPOSE - * Call H5Pset_filter to add a filter to the filter pipeline. + * Call H5Pset_filter to add a filter to the filter pipeline. * INPUTS - * prp_id - property list identifier - * filter - Filter to be added to the pipeline. - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be added to the pipeline. + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * 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 * * SOURCE @@ -1742,26 +1742,26 @@ h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) } /*---------------------------------------------------------------------------- - * Name: h5pget_filter_c - * Purpose: Call H5Pget_filter2 to get information about a filter - * in a pipeline - * Inputs: prp_id - property list identifier - * filter_number - Sequence number within the filter - * pipeline of the filter for which - * information is sought. - * namelen - Anticipated number of characters in name. - *Outputs: flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter - * filter_id - filter identification number - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su - * Friday, February 25, 2000 - * Modifications: - * Since cd_nelmts has IN/OUT attributes, fixed the input and - * returned value of cd_nelmnts to satisfy this specification. + * Name: h5pget_filter_c + * Purpose: Call H5Pget_filter2 to get information about a filter + * in a pipeline + * Inputs: prp_id - property list identifier + * filter_number - Sequence number within the filter + * pipeline of the filter for which + * information is sought. + * namelen - Anticipated number of characters in name. + * Outputs: flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter + * filter_id - filter identification number + * Returns: 0 on success, -1 on failure + * Programmer: Xiangyang Su + * Friday, February 25, 2000 + * Modifications: + * Since cd_nelmts has IN/OUT attributes, fixed the input and + * returned value of cd_nelmnts to satisfy this specification. * MSB January 27, 2009 *---------------------------------------------------------------------------*/ int_f @@ -1819,7 +1819,7 @@ DONE: * 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. + * 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 @@ -1865,19 +1865,19 @@ DONE: /****if* H5Pf/h5pget_external_count_c * NAME - * h5pget_external_count_c + * h5pget_external_count_c * PURPOSE - * Call H5Pget_external_count to get the number of external - * files for the specified dataset. + * Call H5Pget_external_count to get the number of external + * files for the specified dataset. * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * count - number of external files + * count - number of external files * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE @@ -1906,14 +1906,14 @@ h5pget_external_count_c (hid_t_f *prp_id, int_f* count) * PURPOSE * 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. + * prp_id - property list identifier + * name_size - length of name + * idx - External file index. * 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. - * bytes - Number of bytes reserved in the file for the data. + * 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. + * bytes - Number of bytes reserved in the file for the data. * RETURNS * on success, -1 on failure * AUTHOR @@ -1969,23 +1969,23 @@ DONE: /****if* H5Pf/h5pset_btree_ratios_c * NAME - * h5pset_btree_ratios_c + * h5pset_btree_ratios_c * PURPOSE - * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a - * dataset transfer property list. + * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a + * dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f @@ -2014,23 +2014,23 @@ h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig /****if* H5Pf/h5pget_btree_ratios_c * NAME - * h5pget_btree_ratios_c + * h5pget_btree_ratios_c * PURPOSE - * Call H5Pget_btree_ratios to Gets B-tree split ratios - * for a dataset transfer property list. + * Call H5Pget_btree_ratios to Gets B-tree split ratios + * for a dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f @@ -2056,23 +2056,23 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig } /****if* H5Pf/h5pget_fclose_degree_c * NAME - * h5pget_fclose_degree_c + * h5pget_fclose_degree_c * PURPOSE - * Call H5Pget_fclose_degree to determine file close behavior + * Call H5Pget_fclose_degree to determine file close behavior * INPUTS - * fapl_id - file access identifier + * fapl_id - file access identifier * OUTPUTS * - * degree - possible values are: + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE @@ -2096,21 +2096,21 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_fclose_degree_c * NAME - * h5pset_fclose_degree_c + * h5pset_fclose_degree_c * PURPOSE - * Call H5Pset_fclose_degree to set file close behavior + * Call H5Pset_fclose_degree to set file close behavior * INPUTS - * fapl_id - file access identifier - * degree - possible values are: + * fapl_id - file access identifier + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE @@ -2134,19 +2134,19 @@ h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_buffer_c * NAME - * h5pset_buffer_c + * h5pset_buffer_c * PURPOSE - * Call H5Pset_buffer to set size of conversion buffer + * Call H5Pset_buffer to set size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier - * size - size of the buffer + * prp_id - t`dataset trasfer property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE @@ -2168,18 +2168,18 @@ h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /****if* H5Pf/h5pget_buffer_c * NAME - * h5pget_buffer_c + * h5pget_buffer_c * PURPOSE - * Call H5Pget_buffer to get size of conversion buffer + * Call H5Pget_buffer to get size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier + * prp_id - t`dataset trasfer property list identifier * OUTPUTS - * size - size of conversion buffer + * size - size of conversion buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE @@ -2202,18 +2202,18 @@ h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pfill_value_defined_c * NAME - * h5pfill_value_defined_c + * h5pfill_value_defined_c * PURPOSE - * Call H5Pfill_value_defined to check if fill value is defined + * Call H5Pfill_value_defined to check if fill value is defined * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value status flag + * flag - fill value status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE @@ -2235,19 +2235,19 @@ h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_alloc_time_c * NAME - * h5pget_alloc_time_c + * h5pget_alloc_time_c * PURPOSE - * Call H5Pget_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pget_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - allocation time flag + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE @@ -2269,18 +2269,18 @@ h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_alloc_time_c * NAME - * h5pset_alloc_time_c + * h5pset_alloc_time_c * PURPOSE - * Call H5Pset_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pset_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - allocation time flag + * prp_id - dataset creation property list identifier + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE @@ -2302,19 +2302,19 @@ h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fill_time_c * NAME - * h5pget_fill_time_c + * h5pget_fill_time_c * PURPOSE - * Call H5Pget_fill_time to get fill value writing - * time for dataset during creation + * Call H5Pget_fill_time to get fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value writing time flag + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE @@ -2336,18 +2336,18 @@ h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_fill_time_c * NAME - * h5pset_fill_time_c + * h5pset_fill_time_c * PURPOSE - * Call H5Pset_fill_time to set fill value writing - * time for dataset during creation + * Call H5Pset_fill_time to set fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - fill value writing time flag + * prp_id - dataset creation property list identifier + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE @@ -2369,19 +2369,19 @@ h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_meta_block_size_c * NAME - * h5pset_meta_block_size_c + * h5pset_meta_block_size_c * PURPOSE - * Call H5Pset_meta_block_size to set size of metadata block + * Call H5Pset_meta_block_size to set size of metadata block * INPUTS - * prp_id - file access property list identifier - * size - size of the metadata block + * prp_id - file access property list identifier + * size - size of the metadata block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2402,19 +2402,19 @@ h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_meta_block_size_c * NAME - * h5pget_meta_block_size_c + * h5pget_meta_block_size_c * PURPOSE - * Call H5Pget_meta_block_size to get size of metadata block + * Call H5Pget_meta_block_size to get size of metadata block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the metadata block + * size - size of the metadata block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2435,19 +2435,19 @@ h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_sieve_buf_size_c * NAME - * h5pset_sieve_buf_size_c + * h5pset_sieve_buf_size_c * PURPOSE - * Call H5Pset_sieve_buf_size to set size of datasieve buffer + * Call H5Pset_sieve_buf_size to set size of datasieve buffer * INPUTS - * prp_id - file access property list identifier - * size - size of the buffer + * prp_id - file access property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2468,19 +2468,19 @@ h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_sieve_buf_size_c * NAME - * h5pget_sieve_buf_size_c + * h5pget_sieve_buf_size_c * PURPOSE - * Call H5Pget_sieve_buf_size to get size of datasieve buffer + * Call H5Pget_sieve_buf_size to get size of datasieve buffer * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the buffer + * size - size of the buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2501,19 +2501,19 @@ h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pset_small_data_block_size_c * NAME - * h5pset_small_data_block_size_c + * h5pset_small_data_block_size_c * PURPOSE - * Call H5Pset_small_data_block_size to set size of raw small data block + * Call H5Pset_small_data_block_size to set size of raw small data block * INPUTS - * prp_id - file access property list identifier - * size - size of the block + * prp_id - file access property list identifier + * size - size of the block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2534,19 +2534,19 @@ h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_small_data_block_size_c * NAME - * h5pget_small_data_block_size_c + * h5pget_small_data_block_size_c * PURPOSE - * Call H5Pget_small_data_block_size to get size of raw small data block + * Call H5Pget_small_data_block_size to get size of raw small data block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the block + * size - size of the block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2567,19 +2567,19 @@ h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_hyper_vector_size_c * NAME - * h5pset_hyper_vector_size_c + * h5pset_hyper_vector_size_c * PURPOSE - * Call H5Pset_hyper_vector_size to set size of the hyper vector + * Call H5Pset_hyper_vector_size to set size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier - * size - size of the vector + * prp_id - dataset transfer property list identifier + * size - size of the vector * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2600,19 +2600,19 @@ h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_hyper_vector_size_c * NAME - * h5pget_hyper_vector_size_c + * h5pget_hyper_vector_size_c * PURPOSE - * Call H5Pget_hyper_vector_size to get size of the hyper vector + * Call H5Pget_hyper_vector_size to get size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier + * prp_id - dataset transfer property list identifier * OUTPUTS * - * size - size of the vector + * size - size of the vector * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -2800,19 +2800,19 @@ DONE: /****if* H5Pf/h5pexist_c * NAME - * h5pexist_c + * h5pexist_c * PURPOSE - * Call H5Pexist to querie whether a property name exists - * in a property list or class + * Call H5Pexist to querie whether a property name exists + * in a property list or class * INPUTS - * plist - property list or property class identifier - * name - name of the new property - * name_len - length of the "name" buffer + * plist - property list or property class identifier + * name - name of the new property + * name_len - length of the "name" buffer * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -2842,18 +2842,18 @@ DONE: } /****if* H5Pf/h5pisa_class_c * NAME - * h5pisa_class_c + * h5pisa_class_c * PURPOSE - * Call H5Pisa_class to querie whether a property is a - * member of a class + * Call H5Pisa_class to querie whether a property is a + * member of a class * INPUTS - * plist - property list identifier - * cls - property class identifier + * plist - property list identifier + * cls - property class identifier * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -2879,20 +2879,20 @@ h5pisa_class_c(hid_t_f *plist, hid_t_f *cls) } /****if* H5Pf/h5pget_size_c * NAME - * h5pget_size_c + * h5pget_size_c * PURPOSE - * Call H5Pget_size to querie the size of the property + * Call H5Pget_size to querie the size of the property * INPUTS - * plist - property list to query - * name - name of the property - * name_len - length of the "name" buffer + * plist - property list to query + * name - name of the property + * name_len - length of the "name" buffer * OUTPUTS - * size - size of the property in bytes + * size - size of the property in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -2923,18 +2923,18 @@ DONE: } /****if* H5Pf/h5pget_nprops_c * NAME - * h5pget_nprops_c + * h5pget_nprops_c * PURPOSE - * Call H5Pget_nporps to get number of the properties in the list + * Call H5Pget_nporps to get number of the properties in the list * INPUTS - * plist - property list to query + * plist - property list to query * OUTPUTS - * nprops - number of properties in the list + * nprops - number of properties in the list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -2960,19 +2960,19 @@ h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) } /****if* H5Pf/h5pget_class_parent_c * NAME - * h5pget_class_parent_c + * h5pget_class_parent_c * PURPOSE - * Call H5Pget_class_parent to get the parent class of - * a genereic property class + * Call H5Pget_class_parent to get the parent class of + * a genereic property class * INPUTS - * prp_id - property list to query + * prp_id - property list to query * OUTPUTS - * parent_id - parent classs identifier + * parent_id - parent classs identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -2999,20 +2999,20 @@ h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) } /****if* H5Pf/h5pcopy_prop_c * NAME - * h5pcopy_prop_c + * h5pcopy_prop_c * PURPOSE - * Call H5Pcopy_prop to copy a property from one list or - * class to another + * Call H5Pcopy_prop to copy a property from one list or + * class to another * INPUTS - * dst_id - identifier of destination property list - * src_id - identifier of source property list - * name - name of the property - * name_len - length of the "name" buffer + * dst_id - identifier of destination property list + * src_id - identifier of source property list + * name - name of the property + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -3042,18 +3042,18 @@ DONE: } /****if* H5Pf/h5premove_c * NAME - * h5premove_c + * h5premove_c * PURPOSE - * Call H5Premove to remove a property from a list + * Call H5Premove to remove a property from a list * INPUTS - * plid - identifier of property list - * name - name of the property to remove - * name_len - length of the "name" buffer + * plid - identifier of property list + * name - name of the property to remove + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE @@ -3082,15 +3082,15 @@ DONE: } /****if* H5Pf/h5punregister_c * NAME - * h5punregister_c + * h5punregister_c * PURPOSE - * Call H5Punregister to remove a property from a property class + * Call H5Punregister to remove a property from a property class * INPUTS - * cls - identifier of property class - * name - name of the property to unregister - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - name of the property to unregister + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3122,13 +3122,13 @@ DONE: } /****if* H5Pf/h5pclose_class_c * NAME - * h5pclose_class_c + * h5pclose_class_c * PURPOSE - * Call H5Pclose_class to close property class + * Call H5Pclose_class to close property class * INPUTS - * class - identifier of property class to close + * class - identifier of property class to close * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3154,15 +3154,15 @@ h5pclose_class_c(hid_t_f *cls) /****if* H5Pf/h5pget_class_name_c * NAME - * h5pget_class_name_c + * h5pget_class_name_c * PURPOSE - * Call H5Pget_class_name to get property class name + * Call H5Pget_class_name to get property class name * INPUTS - * cls - identifier of property class - * name - buffer to retrieve name in - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - buffer to retrieve name in + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3243,7 +3243,7 @@ DONE: * plist - property list class identifier * name - name of the new property * name_len - length of the "name" buffer - * Output: + * Output: * value - property value * RETURNS * 0 on success, -1 on failure @@ -3277,17 +3277,17 @@ DONE: /****if* H5Pf/h5pset_shuffle_c * NAME - * h5pset_shuffle_c + * h5pset_shuffle_c * PURPOSE - * Call H5Pset_shuffle + * Call H5Pset_shuffle * INPUTS - * prp_id - property list identifier - * type_size - size of the datatype in bytes + * prp_id - property list identifier + * type_size - size of the datatype in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE @@ -3308,16 +3308,16 @@ h5pset_shuffle_c ( hid_t_f *prp_id ) } /****if* H5Pf/h5pset_fletcher32_c * NAME - * h5pset_fletcher32_c + * h5pset_fletcher32_c * PURPOSE - * Call H5Pset_fletcher32 to enable EDC + * Call H5Pset_fletcher32 to enable EDC * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE @@ -3339,17 +3339,17 @@ h5pset_fletcher32_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pset_edc_check_c * NAME - * h5pset_edc_check_c + * h5pset_edc_check_c * PURPOSE - * Call H5Pset_edc_check to enable EDC + * Call H5Pset_edc_check to enable EDC * INPUTS - * prp_id - dataset transfer property list identifier - * flag - EDC flag + * prp_id - dataset transfer property list identifier + * flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE @@ -3373,17 +3373,17 @@ h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /****if* H5Pf/h5pget_edc_check_c * NAME - * h5pget_edc_check_c + * h5pget_edc_check_c * PURPOSE - * Call H5Pget_edc_check to query EDC + * Call H5Pget_edc_check to query EDC * INPUTS - * prp_id - dataset transfer property list identifier - * Outouts: flag - EDC flag + * prp_id - dataset transfer property list identifier + * Outouts: flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE @@ -3405,17 +3405,17 @@ h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) } /****if* H5Pf/h5pset_family_offset_c * NAME - * h5pset_family_offset_c + * h5pset_family_offset_c * PURPOSE - * Call H5Pset_family_offset to set and offset for family driver + * Call H5Pset_family_offset to set and offset for family driver * INPUTS - * prp_id - property list identifier - * offset - offset in bytes + * prp_id - property list identifier + * offset - offset in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, 19 March 2003 + * Wednesday, 19 March 2003 * HISTORY * * SOURCE @@ -3439,22 +3439,22 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /****if* H5Pf/h5pset_fapl_multi_c * NAME - * h5pset_fapl_multi_c + * h5pset_fapl_multi_c * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * mem_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * lenmax - lenght of the name a sdeclared in Fortran - * flag - flag allowing partila access when one of the files is missing + * prp_id - file_creation property list identifier + * mem_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * lenmax - lenght of the name a sdeclared in Fortran + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE @@ -3480,13 +3480,13 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc c_lenmax = (int)*lenmax; relax = (hbool_t)*flag; /* - * Check that we got correct values from Fortran for memb_addr array + * Check that we got correct values from Fortran for memb_addr array */ for (i=0; i < H5FD_MEM_NTYPES; i++) { if(memb_addr[i] >= 1.0f) return ret_value; } /* - * Take care of names array + * Take care of names array */ tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES)); @@ -3500,7 +3500,7 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc tmp_p = tmp_p + c_lenmax; } /* - * Take care of othe arguments + * Take care of othe arguments */ tmp_max_addr = (long double)(HADDR_MAX); c_prp_id = (hid_t)*prp_id; @@ -3511,7 +3511,7 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr)); } /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax); @@ -3527,16 +3527,16 @@ DONE: /****if* H5Pf/h5pset_fapl_multi_sc * NAME - * h5pset_fapl_multi_sc + * h5pset_fapl_multi_sc * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier + * prp_id - file_creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 31 2003 + * March 31 2003 * HISTORY * * SOURCE @@ -3554,7 +3554,7 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) relax = (hbool_t)*flag; c_prp_id = (hid_t)*prp_id; /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax); @@ -3564,23 +3564,23 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fapl_multi_c * NAME - * h5pget_fapl_multi_c + * h5pget_fapl_multi_c * PURPOSE - * Call H5Pget_fapl_multi to set multi file dirver + * Call H5Pget_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * lenmax - lenght of the name a sdeclared in Fortran + * prp_id - file_creation property list identifier + * lenmax - lenght of the name a sdeclared in Fortran * OUTPUTS - * memb_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * flag - flag allowing partila access when one of the files is missing + * memb_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE @@ -3606,14 +3606,14 @@ h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc c_prp_id = (hid_t)*prp_id; /* - * Call H5Pget_fapl_multi function + * Call H5Pget_fapl_multi function */ status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax); if ( status < 0 ) return ret_value; /* - * Take care of names array + * Take care of names array */ tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1); tmp_p = tmp; @@ -3628,7 +3628,7 @@ h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /* - * Take care of other arguments + * Take care of other arguments */ for (i=0; i < H5FD_MEM_NTYPES; i++) { @@ -3648,18 +3648,18 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /****if* H5Pf/h5pset_szip_c * NAME - * h5pset_szip_c + * h5pset_szip_c * PURPOSE - * Call H5Pset_szip to set szip compression + * Call H5Pset_szip to set szip compression * INPUTS - * prp_id - dataset creation property list identifier - * options_mask - * pixels_per_block -szip compression parameters + * prp_id - dataset creation property list identifier + * options_mask + * pixels_per_block -szip compression parameters * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 8 2003 + * April 8 2003 * HISTORY * * SOURCE @@ -3679,7 +3679,7 @@ h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) c_options_mask = (unsigned)*options_mask; c_pixels_per_block = (unsigned)*pixels_per_block; /* - * Call H5Pset_szip function + * Call H5Pset_szip function */ status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block); @@ -3689,18 +3689,18 @@ h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) } /****if* H5Pf/h5pall_filters_avail_c * NAME - * h5pall_filters_avail_c + * h5pall_filters_avail_c * PURPOSE - * Call H5Pall_filters_avail + * Call H5Pall_filters_avail * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * status - logical flag + * status - logical flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE @@ -3717,7 +3717,7 @@ h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) c_prp_id = (hid_t)*prp_id; /* - * Call H5Pall_filters_avail function + * Call H5Pall_filters_avail function */ c_status = H5Pall_filters_avail(c_prp_id); @@ -3730,25 +3730,25 @@ h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /****if* H5Pf/h5pget_filter_by_id_c * NAME - * h5pget_filter_by_id_c + * h5pget_filter_by_id_c * PURPOSE - * Call H5Pget_filter_by_id2 to get information about a filter - * in a pipeline + * Call H5Pget_filter_by_id2 to get information about a filter + * in a pipeline * INPUTS - * prp_id - property list identifier - * filter_id - filter id - * namelen - Anticipated number of characters in name. + * prp_id - property list identifier + * filter_id - filter id + * namelen - Anticipated number of characters in name. *OUTPUT - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena POurmal - * April 10, 2003 + * April 10, 2003 * HISTORY * * SOURCE @@ -3797,21 +3797,21 @@ DONE: /****if* H5Pf/h5pmodify_filter_c * NAME - * h5pmodify_filter_c + * h5pmodify_filter_c * PURPOSE - * Call H5Pmodify_filter to modify a filter + * Call H5Pmodify_filter to modify a filter * INPUTS - * prp_id - property list identifier - * filter - Filter to be modified - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be modified + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE @@ -3849,17 +3849,17 @@ DONE: /****if* H5Pf/h5premove_filter_c * NAME - * h5premove_filter_c + * h5premove_filter_c * PURPOSE - * Call H5Premove_filter to delete one or more filters + * Call H5Premove_filter to delete one or more filters * INPUTS - * prp_id - property list identifier - * filter - Filter to be deleted + * prp_id - property list identifier + * filter - Filter to be deleted * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * January 27 2004 + * January 27 2004 * HISTORY * * SOURCE @@ -3887,19 +3887,19 @@ DONE: /****if* H5Pf/h5pget_attr_phase_change_c * NAME - * h5pget_attr_phase_change_c + * h5pget_attr_phase_change_c * PURPOSE - * Calls H5Pget_attr_phase_change + * Calls H5Pget_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -3928,18 +3928,18 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pset_attr_creation_order_c * NAME - * h5pset_attr_creation_order_c + * h5pset_attr_creation_order_c * PURPOSE - * Calls H5Ppset_attr_creation_order + * Calls H5Ppset_attr_creation_order * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -3965,23 +3965,23 @@ h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pset_shared_mesg_nindexes_c * NAME - * h5pset_shared_mesg_nindexes_c + * h5pset_shared_mesg_nindexes_c * PURPOSE - * Calls h5pset_shared_mesg_nindexes + * Calls h5pset_shared_mesg_nindexes * * INPUTS * - * plist_id - file creation property list - * nindexes - Number of shared object header message indexes - * available in files created WITH this property list + * plist_id - file creation property list + * nindexes - Number of shared object header message indexes + * available in files created WITH this property list * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -4008,24 +4008,24 @@ h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /****if* H5Pf/h5pset_shared_mesg_index_c * NAME - * h5pset_shared_mesg_index_c + * h5pset_shared_mesg_index_c * PURPOSE - * Calls H5Pset_shared_mesg_index + * Calls H5Pset_shared_mesg_index * * INPUTS * - * fcpl_id - File creation property list identifier. - * index_num - Index being configured. - * mesg_type_flags - Types of messages that should be stored in this index. - * min_mesg_size - Minimum message size. + * fcpl_id - File creation property list identifier. + * index_num - Index being configured. + * mesg_type_flags - Types of messages that should be stored in this index. + * min_mesg_size - Minimum message size. * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE @@ -4048,22 +4048,22 @@ h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_ /****if* H5Pf/h5pget_attr_creation_order_c * NAME - * h5pget_attr_creation_order_c + * h5pget_attr_creation_order_c * PURPOSE - * Calls H5Pget_attr_creation_order + * Calls H5Pget_attr_creation_order * * INPUTS * - * ocpl_id - Object (group or dataset) creation property list identifier + * ocpl_id - Object (group or dataset) creation property list identifier * OUTPUTS * - * crt_order_flags - Flags specifying whether to track and index attribute creation order + * crt_order_flags - Flags specifying whether to track and index attribute creation order * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE @@ -4090,23 +4090,23 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) } /****if* H5Pf/h5pset_libver_bounds_c * NAME - * h5pset_libver_bounds_c + * h5pset_libver_bounds_c * PURPOSE - * Calls H5Pset_libver_bounds + * Calls H5Pset_libver_bounds * * INPUTS * - * fapl_id - File access property list identifier - * low - The earliest version of the library that will be used for writing objects. - * high - The latest version of the library that will be used for writing objects. + * fapl_id - File access property list identifier + * low - The earliest version of the library that will be used for writing objects. + * high - The latest version of the library that will be used for writing objects. * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE @@ -4130,20 +4130,20 @@ h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /****if* H5Pf/h5pset_link_creation_order_c * NAME - * h5pset_link_creation_order_c + * h5pset_link_creation_order_c * PURPOSE - * Calls H5Pset_link_creation_order + * Calls H5Pset_link_creation_order * * INPUTS - * gcpl_id - Group creation property list identifier - * crt_order_flags - Creation order flag(s) + * gcpl_id - Group creation property list identifier + * crt_order_flags - Creation order flag(s) * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE @@ -4166,19 +4166,19 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pget_link_phase_change_c * NAME - * h5pget_link_phase_change_c + * h5pget_link_phase_change_c * PURPOSE - * Calls H5Pget_link_phase_change + * Calls H5Pget_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * gcpl_id - Group creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * HISTORY * * SOURCE @@ -4206,20 +4206,20 @@ h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pget_obj_track_times_c * NAME - * h5pget_obj_track_times_c + * h5pget_obj_track_times_c * PURPOSE - * Call H5Pget_obj_track_times + * Call H5Pget_obj_track_times * * INPUTS - * plist_id - property list id + * plist_id - property list id * OUTPUTS * - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE @@ -4248,18 +4248,18 @@ h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_obj_track_times_c * NAME - * h5pset_obj_track_times_c + * h5pset_obj_track_times_c * PURPOSE - * Call H5Pset_obj_track_times + * Call H5Pset_obj_track_times * * INPUTS - * plist_id - property list id - * flag - TRUE/FALSE flag + * plist_id - property list id + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE @@ -4288,21 +4288,21 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_create_inter_group_c * NAME - * h5pset_create_inter_group_c + * h5pset_create_inter_group_c * PURPOSE - * Calls H5Pset_create_intermediate_group + * Calls H5Pset_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - crt_intermed_group specifying whether - * to create intermediate groups upon the - * creation of an object + * crt_intermed_group - crt_intermed_group specifying whether + * to create intermediate groups upon the + * creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE @@ -4327,22 +4327,22 @@ h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /****if* H5Pf/h5pget_link_creation_order_c * NAME - * h5pget_link_creation_order_c + * h5pget_link_creation_order_c * PURPOSE - * Calls H5Pget_link_creation_order + * Calls H5Pget_link_creation_order * * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * OUTPUTS * - * crt_order_flags - Creation order flag(s) + * crt_order_flags - Creation order flag(s) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE @@ -4370,24 +4370,24 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /****if* H5Pf/h5pset_char_encoding_c * NAME - * h5pset_char_encoding_c + * h5pset_char_encoding_c * PURPOSE * Calls H5Pset_char_encoding * * INPUTS * - * plist_id - Property list identifier - * encoding - String encoding character set: + * plist_id - Property list identifier + * encoding - String encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * OUTPUTS * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE @@ -4412,24 +4412,24 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pget_char_encoding_c * NAME - * h5pget_char_encoding_c + * h5pget_char_encoding_c * PURPOSE * Calls H5Pget_char_encoding * * INPUTS * - * plist_id - Property list identifier + * plist_id - Property list identifier * OUTPUTS * - * encoding - Encoding character set: + * encoding - Encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE @@ -4455,24 +4455,24 @@ h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pset_copy_object_c * NAME - * h5pset_copy_object_c + * h5pset_copy_object_c * PURPOSE * Calls H5Pset_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier - * copy_options - Copy option(s) to be set + * ocp_plist_id - Object copy property list identifier + * copy_options - Copy option(s) to be set * * OUTPUTS * * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE @@ -4495,23 +4495,23 @@ h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_copy_object_c * NAME - * h5pget_copy_object_c + * h5pget_copy_object_c * PURPOSE * Calls H5Pget_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier + * ocp_plist_id - Object copy property list identifier * * OUTPUTS * - * copy_options - Copy option(s) to be get + * copy_options - Copy option(s) to be get * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE @@ -4537,25 +4537,25 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_data_transform_c * NAME - * h5pget_data_transform_c + * h5pget_data_transform_c * PURPOSE - * Calls H5Pget_data_transform + * Calls H5Pget_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression_len - buffer size transorm expression * - * Output: - * expression - buffer to hold transform expression + * Output: + * expression - buffer to hold transform expression * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE @@ -4599,25 +4599,25 @@ done: /****if* H5Pf/h5pset_data_transform_c * NAME - * h5pset_data_transform_c + * h5pset_data_transform_c * PURPOSE - * Calls H5Pset_data_transform + * Calls H5Pset_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression - buffer to hold transform expression - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression - buffer to hold transform expression + * expression_len - buffer size transorm expression * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE @@ -4650,23 +4650,23 @@ done: /****if* H5Pf/h5pget_local_heap_size_hint_c * NAME - * h5pget_local_heap_size_hint_c + * h5pget_local_heap_size_hint_c * PURPOSE - * Calls H5Pget_local_heap_size_hint + * Calls H5Pget_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * size_hint - Hint for size of local heap + * Output: + * size_hint - Hint for size of local heap * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4691,24 +4691,24 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pget_est_link_info_c * NAME - * h5pget_est_link_info_c + * h5pget_est_link_info_c * PURPOSE - * Calls H5Pget_est_link_info + * Calls H5Pget_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * Output: + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4736,24 +4736,24 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name /****if* H5Pf/h5pset_local_heap_size_hint_c * NAME - * h5pset_local_heap_size_hint_c + * h5pset_local_heap_size_hint_c * PURPOSE - * Calls H5Pset_local_heap_size_hint + * Calls H5Pset_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier - * size_hint - Hint for size of local heap + * gcpl_id - Group creation property list identifier + * size_hint - Hint for size of local heap * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4776,24 +4776,24 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pset_est_link_info_c * NAME - * h5pset_est_link_info_c + * h5pset_est_link_info_c * PURPOSE - * Calls H5Pset_est_link_info + * Calls H5Pset_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * gcpl_id - Group creation property list identifier + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * - * Output: + * Output: * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4816,20 +4816,20 @@ h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name /****if* H5Pf/h5pset_link_phase_change_c * NAME - * h5pset_link_phase_change_c + * h5pset_link_phase_change_c * PURPOSE - * Calls H5Pset_link_phase_change + * Calls H5Pset_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage - * Outputs + * gcpl_id - Group creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage + * Outputs * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4859,11 +4859,11 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens * * INPUTS * - * fapl_id - File access property list identifier - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size - * Outputs + * fapl_id - File access property list identifier + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size + * Outputs * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -4895,23 +4895,23 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a /****if* H5Pf/h5pget_fapl_direct_c * NAME - * h5pget_fapl_direct_c + * h5pget_fapl_direct_c * PURPOSE - * Calls H5Pget_fapl_direct + * Calls H5Pget_fapl_direct * * INPUTS * - * fapl_id - File access property list identifier + * fapl_id - File access property list identifier * OUTPUTS * - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4944,21 +4944,21 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a /****if* H5Pf/h5pset_attr_phase_change_c * NAME - * h5pset_attr_phase_change_c + * h5pset_attr_phase_change_c * PURPOSE - * Calls H5Pset_attr_phase_change + * Calls H5Pset_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -4981,19 +4981,19 @@ h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pset_nbit_c * NAME - * h5pset_nbit_c + * h5pset_nbit_c * PURPOSE - * Calls H5Pset_nbit + * Calls H5Pset_nbit * * INPUTS - * plist_id - Dataset creation property list identifier + * plist_id - Dataset creation property list identifier * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE @@ -5084,23 +5084,23 @@ h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_nlinks * NAME - * h5pget_nlinks + * h5pget_nlinks * PURPOSE - * Calls H5Pget_nlinks + * Calls H5Pget_nlinks * * INPUTS * - * lapl_id - File access property list identifier + * lapl_id - File access property list identifier * * OUTPUTS * - * nlinks - Maximum number of links to traverse + * nlinks - Maximum number of links to traverse * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 24, 2008 + * March 24, 2008 * HISTORY * * SOURCE @@ -5125,20 +5125,20 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_create_inter_group_c * NAME - * h5pget_create_inter_group_c + * h5pget_create_inter_group_c * PURPOSE - * Calls H5Pget_create_intermediate_group + * Calls H5Pget_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - Specifying whether to create intermediate groups upon - * the creation of an object + * crt_intermed_group - Specifying whether to create intermediate groups upon + * the creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE @@ -5164,18 +5164,18 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) } /*---------------------------------------------------------------------------- - * Name: h5pset_chunk_cache_c - * Purpose: Calls H5Pset_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pset_chunk_cache_c + * Purpose: Calls H5Pset_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f @@ -5194,19 +5194,19 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby } /*---------------------------------------------------------------------------- - * Name: h5pget_chunk_cache_c - * Purpose: Calls H5Pget_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * Outputs: - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pget_chunk_cache_c + * Purpose: Calls H5Pget_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * Outputs: + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f @@ -5231,18 +5231,18 @@ h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby } /*---------------------------------------------------------------------------- - * Name: h5pset_file_image_c - * Purpose: Calls H5Pset_file_image + * Name: h5pset_file_image_c + * Purpose: Calls H5Pset_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5260,19 +5260,19 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len) } /*---------------------------------------------------------------------------- - * Name: h5pget_file_image_c - * Purpose: Calls H5Pget_file_image + * Name: h5pget_file_image_c + * Purpose: Calls H5Pget_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier - * Outputs: + * Outputs: * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5303,19 +5303,19 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) #ifdef H5_HAVE_PARALLEL /****if* H5Pf/h5pset_fapl_mpio_c * NAME - * h5pset_fapl_mpio_c + * h5pset_fapl_mpio_c * PURPOSE - * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user - * supplied communicator and info object + * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user + * supplied communicator and info object * INPUTS - * prp_id - property list identifier - * comm - MPI communicator - * info - MPI info object + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, October 26, 2000 + * Thursday, October 26, 2000 * HISTORY * * SOURCE @@ -5343,18 +5343,18 @@ h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) } /****if* H5Pf/h5pget_fapl_mpio_c * NAME - * h5pget_fapl_mpio_c + * h5pget_fapl_mpio_c * PURPOSE - * Call H5Pget_fapl_mpio to retrieve communicator and info object + * Call H5Pget_fapl_mpio to retrieve communicator and info object * INPUTS - * prp_id - property list identifier - * comm - buffer to return MPI communicator - * info - buffer to return MPI info object + * prp_id - property list identifier + * comm - buffer to return MPI communicator + * info - buffer to return MPI info object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, October 26, 2000 + * Thursday, October 26, 2000 * HISTORY * * SOURCE @@ -5382,18 +5382,18 @@ h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) } /****if* H5Pf/h5pset_dxpl_mpio_c * NAME - * h5pset_dxpl_mpio_c + * h5pset_dxpl_mpio_c * PURPOSE - * Call H5Pset_dxpl_mpio to set transfer mode of the dataset - * trasfer property list + * Call H5Pset_dxpl_mpio to set transfer mode of the dataset + * trasfer property list * INPUTS - * prp_id - property list identifier - * data_xfer_mode - transfer mode + * prp_id - property list identifier + * data_xfer_mode - transfer mode * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, October 26, 2000 + * Thursday, October 26, 2000 * HISTORY * * SOURCE @@ -5433,18 +5433,18 @@ h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) /****if* H5Pf/h5pget_dxpl_mpio_c * NAME - * h5pget_dxpl_mpio_c + * h5pget_dxpl_mpio_c * PURPOSE - * Call H5Pget_dxpl_mpio to get transfer mode of the dataset - * trasfer property list + * Call H5Pget_dxpl_mpio to get transfer mode of the dataset + * trasfer property list * INPUTS - * prp_id - property list identifier - * data_xfer_mode - buffer to retrieve transfer mode + * prp_id - property list identifier + * data_xfer_mode - buffer to retrieve transfer mode * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, June 15, 2000 + * Thursday, June 15, 2000 * HISTORY * * SOURCE diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index b196c71..378dded 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -1,6 +1,6 @@ /****h* H5Rf/H5Rf * PURPOSE - * This file contains C stubs for H5R Fortran APIs + * This file contains C stubs for H5R Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,19 +26,19 @@ /****if* H5Rf/h5rcreate_region_c * NAME - * h5rcreate_region_c + * h5rcreate_region_c * PURPOSE - * Call H5Rcreate to create a reference to dataset region - * region + * Call H5Rcreate to create a reference to dataset region + * region * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * space_id - dataset space identifier + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * space_id - dataset space identifier * OUTPUTS - * ref - reference to the dataset region + * ref - reference to the dataset region * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -125,7 +125,7 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r * Call H5Rdereference * INPUTS * obj_id - Valid identifier for the file containing the - * referenced object or any object in that file. + * referenced object or any object in that file. * ref_typ - The reference type of ref. * ref - Object reference * OUTPUTS @@ -162,8 +162,8 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -205,8 +205,8 @@ done: * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -241,17 +241,17 @@ done: /****if* H5Rf/h5rget_object_type_obj_c * NAME - * h5rget_object_type_obj_c + * h5rget_object_type_obj_c * PURPOSE - * Call H5Rget_object_type to retrieve the type of the object reference points - * to + * Call H5Rget_object_type to retrieve the type of the object reference points + * to * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS - * obj_type - type of dereferenced object + * obj_type - type of dereferenced object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -287,13 +287,13 @@ done: * Call H5Rget_name * INPUTS * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref_type - Type of reference. - * ref - An object or dataset region reference. + * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. + * ref_type - Type of reference. + * ref - An object or dataset region reference. * * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. + * name - A name associated with the referenced object or dataset region. + * size - The size of the name buffer. * * RETURNS * 0 on success, -1 on failure @@ -341,24 +341,24 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_ /****if* H5Rf/h5rget_obj_type_c * NAME - * h5rget_obj_type_c + * h5rget_obj_type_c * PURPOSE - * Call H5Rget_obj_type + * Call H5Rget_obj_type * INPUTS - * loc_id - Identifier for the dataset containing the reference or - * for the group that dataset is in. - * ref_type - Type of reference to query. - * ref - Reference to query. + * loc_id - Identifier for the dataset containing the reference or + * for the group that dataset is in. + * ref_type - Type of reference to query. + * ref - Reference to query. * * OUTPUTS - * obj_type - Type of referenced object. These are defined in H5Opublic.h, - * enum H5O_type_t + * obj_type - Type of referenced object. These are defined in H5Opublic.h, + * enum H5O_type_t * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * December 17, 2008 + * December 17, 2008 * * SOURCE */ diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 53dd6ab..a12adfa 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -1,6 +1,6 @@ /****h* H5Sf/H5Sf * PURPOSE - * This file contains C stubs for H5S Fortran APIs + * This file contains C stubs for H5S Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,20 +26,20 @@ /****if* H5Sf/h5screate_simple_c * NAME - * h5screate_simple_c + * h5screate_simple_c * PURPOSE - * Call H5Screate_simple to create a dataspace + * Call H5Screate_simple to create a dataspace * INPUTS - * rank - number of dimensions of dataspace - * dims - array of the size of each dimension + * rank - number of dimensions of dataspace + * dims - array of the size of each dimension maxdims - an array of the maximum size of each dimension * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE @@ -75,16 +75,16 @@ done: /****if* H5Sf/h5sclose_c * NAME - * h5sclose_c + * h5sclose_c * PURPOSE - * Call H5Sclose to close the dataspace + * Call H5Sclose to close the dataspace * INPUTS - * space_id - identifier of the dataspace to be closed + * space_id - identifier of the dataspace to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE @@ -104,18 +104,18 @@ h5sclose_c ( hid_t_f *space_id ) /****if* H5Sf/h5screate_c * NAME - * h5screate_c + * h5screate_c * PURPOSE - * Call H5Screate to create a dataspace + * Call H5Screate to create a dataspace * INPUTS - * classtype - type of the dataspace class + * classtype - type of the dataspace class * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE @@ -138,18 +138,18 @@ h5screate_c ( int_f *classtype, hid_t_f *space_id ) /****if* H5Sf/h5scopy_c * NAME - * h5scopy_c + * h5scopy_c * PURPOSE - * Call H5Scopy to copy dataspace + * Call H5Scopy to copy dataspace * INPUTS - * space_id - identifier of the dataspace to be copied + * space_id - identifier of the dataspace to be copied * OUTPUTS - * new_space_id - identifier of the new datspace + * new_space_id - identifier of the new datspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE @@ -173,21 +173,21 @@ h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /****if* H5Sf/h5sget_select_hyper_nblocks_c * NAME - * h5sget_select_hyper_nblocks_c + * h5sget_select_hyper_nblocks_c * PURPOSE - * Call H5SH5Sget_select_hyper_nblocks to - * get the the number of hyperslab blocks in - * the current dataspace selection if successful + * Call H5SH5Sget_select_hyper_nblocks to + * get the the number of hyperslab blocks in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 12, 1999 + * Friday, November 12, 1999 * HISTORY * * SOURCE @@ -211,21 +211,21 @@ h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /****if* H5Sf/h5sget_select_elem_npoints_c * NAME - * h5sget_select_elem_npoints_c + * h5sget_select_elem_npoints_c * PURPOSE - * Call H5Sget_select_elem_npoints to - * get the the number of element points in - * the current dataspace selection if successful + * Call H5Sget_select_elem_npoints to + * get the the number of element points in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_points - number of element points in - * the current dataspace selection + * num_points - number of element points in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * * SOURCE @@ -249,30 +249,30 @@ h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /****if* H5Sf/h5sget_select_hyper_blocklist_c * NAME - * h5sget_select_hyper_blocklist_c + * h5sget_select_hyper_blocklist_c * PURPOSE - * Call H5Sget_select_hyper_blocklist to - * get a list of the hyperslab blocks currently selected - * Starting with the startblock-th block in the - * list of blocks, num_blocks blocks are put into the user's - * buffer. If the user's buffer fills up before numblocks - * blocks are inserted, the buffer - * will contain only as many blocks as fit. + * Call H5Sget_select_hyper_blocklist to + * get a list of the hyperslab blocks currently selected + * Starting with the startblock-th block in the + * list of blocks, num_blocks blocks are put into the user's + * buffer. If the user's buffer fills up before numblocks + * blocks are inserted, the buffer + * will contain only as many blocks as fit. * INPUTS - * space_id - identifier of the dataspace - * startblock - Hyperslab block to start with - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * space_id - identifier of the dataspace + * startblock - Hyperslab block to start with + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * OUTPUTS - * buf - List of hyperslab blocks selected + * buf - List of hyperslab blocks selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * - * Transpose dimension arrays because of C-FORTRAN storage order + * Transpose dimension arrays because of C-FORTRAN storage order * M. Scot Breitenfeld * SOURCE */ @@ -327,25 +327,25 @@ h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, /****if* H5Sf/h5sget_select_bounds_c * NAME - * h5sget_select_bounds_c + * h5sget_select_bounds_c * PURPOSE - * Call H5Sget_select_bounds to retrieve the coordinates - * of the bounding box containing the current selection - * and places them into user-supplied buffers + * Call H5Sget_select_bounds to retrieve the coordinates + * of the bounding box containing the current selection + * and places them into user-supplied buffers * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * start - Starting coordinates of the bounding box - * end - Ending coordinates of the bounding box, - * i.e., the coordinates of the diagonally opposite corne + * start - Starting coordinates of the bounding box + * end - Ending coordinates of the bounding box, + * i.e., the coordinates of the diagonally opposite corne * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY - * swapped array bounds to account for C and Fortran reversed - * matrix notation. + * swapped array bounds to account for C and Fortran reversed + * matrix notation. * M. Scot Breitenfeld * SOURCE */ @@ -379,27 +379,27 @@ done: /****if* H5Sf/h5sget_select_elem_pointlist_c * NAME - * h5sget_select_elem_pointlist_c + * h5sget_select_elem_pointlist_c * PURPOSE - * Call H5Sget_select_elem_pointlist - * get a list of element points in the - * current dataspace selectin. - * Starting with the startpoint-th point in the - * list of points, numpoints points are put into the user's - * buffer. If the user's buffer fills up before numpoints - * points are inserted, the buffer - * will contain only as many points as fit. + * Call H5Sget_select_elem_pointlist + * get a list of element points in the + * current dataspace selectin. + * Starting with the startpoint-th point in the + * list of points, numpoints points are put into the user's + * buffer. If the user's buffer fills up before numpoints + * points are inserted, the buffer + * will contain only as many points as fit. * INPUTS - * space_id - identifier of the dataspace - * startpoint - Element point to start with - * numpoints - Number of element points to get + * space_id - identifier of the dataspace + * startpoint - Element point to start with + * numpoints - Number of element points to get * OUTPUTS - * buf - List of element points selected + * buf - List of element points selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY * * SOURCE @@ -451,16 +451,16 @@ h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, /****if* H5Sf/h5sselect_all_c * NAME - * h5sselect_all_c + * h5sselect_all_c * PURPOSE - * Call H5Sselect_all to select entire dataspace + * Call H5Sselect_all to select entire dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE @@ -480,16 +480,16 @@ h5sselect_all_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_none_c * NAME - * h5sselect_none_c + * h5sselect_none_c * PURPOSE - * Call H5Sselect_none to reset the selection region + * Call H5Sselect_none to reset the selection region * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE @@ -509,20 +509,20 @@ h5sselect_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_valid_c * NAME - * h5sselect_valid_c + * h5sselect_valid_c * PURPOSE - * Call H5Sselect_valid to verify that selection - * is within dataspace extent. + * Call H5Sselect_valid to verify that selection + * is within dataspace extent. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not valid selection, 1 if is valid selection, - * and negative on failure. + * flag - 0 if not valid selection, 1 if is valid selection, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE @@ -545,19 +545,19 @@ h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sget_simple_extent_npoints_c * NAME - * h5sget_simple_extent_npoints_c + * h5sget_simple_extent_npoints_c * PURPOSE - * Call H5Sget_simple_extent_npoints to determine the number - * of elements in a dataspace + * Call H5Sget_simple_extent_npoints to determine the number + * of elements in a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace + * npoints - number of points in a dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -580,19 +580,19 @@ h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /****if* H5Sf/h5sget_select_npoints_c * NAME - * h5sget_select_npoints_c + * h5sget_select_npoints_c * PURPOSE - * Call H5Sget_select_npoints to determine the number - * of elements in a dataspace selection + * Call H5Sget_select_npoints to determine the number + * of elements in a dataspace selection * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace selection + * npoints - number of points in a dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -615,19 +615,19 @@ h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /****if* H5Sf/h5sget_simple_extent_ndims_c * NAME - * h5sget_simple_extent_ndims_c + * h5sget_simple_extent_ndims_c * PURPOSE - * Call H5Sget_simple_extent_ndims to determine the number - * dimensions + * Call H5Sget_simple_extent_ndims to determine the number + * dimensions * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * rank - number of dataspace dimensions + * rank - number of dataspace dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -650,20 +650,20 @@ h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /****if* H5Sf/h5sget_simple_extent_type_c * NAME - * h5sget_simple_extent_type_c + * h5sget_simple_extent_type_c * PURPOSE - * Call H5Sget_simple_extent_type to determine the class type - * of a dataspace + * Call H5Sget_simple_extent_type to determine the class type + * of a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * classtype - class type; possible values are: + * classtype - class type; possible values are: * H5S_SCALAR_F (0), H5S_SIMPLE_F (1), H5S_NULL_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -691,18 +691,18 @@ h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /****if* H5Sf/h5soffset_simple_c * NAME - * h5soffset_simple_c + * h5soffset_simple_c * PURPOSE - * Call H5Soffset_simple to set the offset of a simple - * dataspace + * Call H5Soffset_simple to set the offset of a simple + * dataspace * INPUTS - * space_id - identifier of the dataspace - * offset - offset array + * space_id - identifier of the dataspace + * offset - offset array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -738,20 +738,20 @@ done: /****if* H5Sf/h5sset_extent_simple_c * NAME - * h5sset_extent_simple_c + * h5sset_extent_simple_c * PURPOSE - * Call H5Sset_extent_simple to set or reset size of - * existing dataspace + * Call H5Sset_extent_simple to set or reset size of + * existing dataspace * INPUTS - * space_id - identifier of the dataspace - * rank - dataspace rank - * current_size - array with the new dimension sizes - * maximum_size - aray with maximum sizes of dimensions + * space_id - identifier of the dataspace + * rank - dataspace rank + * current_size - array with the new dimension sizes + * maximum_size - aray with maximum sizes of dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -784,20 +784,20 @@ done: /****if* H5Sf/h5sget_simple_extent_dims_c * NAME - * h5sget_simple_extent_dims_c + * h5sget_simple_extent_dims_c * PURPOSE - * Call H5Sget_simple_extent_dims to retrieve sizes of an - * existing dataspace + * Call H5Sget_simple_extent_dims to retrieve sizes of an + * existing dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * dims - array with the dimension sizes - * maxdims - aray with maximum sizes of dimensions + * dims - array with the dimension sizes + * maxdims - aray with maximum sizes of dimensions * RETURNS - * number of dataspace dimensions (rank) on success, -1 on failure + * number of dataspace dimensions (rank) on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -838,20 +838,20 @@ done: /****if* H5Sf/h5sis_simple_c * NAME - * h5sis_simple_c + * h5sis_simple_c * PURPOSE - * Call H5Sis_simple to detrmine if the dataspace - * is simple. + * Call H5Sis_simple to detrmine if the dataspace + * is simple. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not simple, 1 if is simple, - * and negative on failure. + * flag - 0 if not simple, 1 if is simple, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -875,17 +875,17 @@ h5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sextent_copy_c * NAME - * h5sextent_copy_c + * h5sextent_copy_c * PURPOSE - * Call H5Sextent_copy to copy an extent of dataspace + * Call H5Sextent_copy to copy an extent of dataspace * INPUTS - * dest_space_id - identifier of the destination dataspace - * source_space_id - identifier of the source dataspace + * dest_space_id - identifier of the destination dataspace + * source_space_id - identifier of the source dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -908,16 +908,16 @@ h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /****if* H5Sf/h5sset_extent_none_c * NAME - * h5sset_extent_none_c + * h5sset_extent_none_c * PURPOSE - * Call H5Sset_extent_none to remove extent from a dataspace + * Call H5Sset_extent_none to remove extent from a dataspace * INPUTS - * space_id - dataspace identifier + * space_id - dataspace identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -939,23 +939,23 @@ h5sset_extent_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_hyperslab_c * NAME - * h5sselect_hyperslab_c + * h5sselect_hyperslab_c * PURPOSE - * Call H5Sselect_hyperslab to select a hyperslab + * Call H5Sselect_hyperslab to select a hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) and H5S_SELECT_OR_F (1) - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -1000,23 +1000,23 @@ done: #ifdef NEW_HYPERSLAB_API /****if* H5Sf/h5scombine_hyperslab_c * NAME - * h5scombine_hyperslab_c + * h5scombine_hyperslab_c * PURPOSE - * Call H5Scombine_hyperslab + * Call H5Scombine_hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * OUTPUTS - * hyper_id - identifier for the new dataspace + * hyper_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -1082,20 +1082,20 @@ DONE: } /****if* H5Sf/h5scombine_select_c * NAME - * h5scombine_select_c + * h5scombine_select_c * PURPOSE - * Call H5Scombine_ select + * Call H5Scombine_ select * INPUTS - * space1_id - identifier of the first dataspace - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * OUTPUTS - * ds_id - identifier for the new dataspace + * ds_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -1123,18 +1123,18 @@ h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_ } /****if* H5Sf/h5sselect_select_c * NAME - * h5sselect_select_c + * h5sselect_select_c * PURPOSE - * Call H5Sselect_ select + * Call H5Sselect_ select * INPUTS - * space1_id - identifier of the first dataspace to modify - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace to modify + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -1160,18 +1160,18 @@ h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) #endif /*NEW_HYPERSLAB_API*/ /****if* H5Sf/h5sget_select_type_c * NAME - * h5sget_select_type_c + * h5sget_select_type_c * PURPOSE - * Call H5Sget_select_type + * Call H5Sget_select_type * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * type - type of selection + * type - type of selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE @@ -1195,21 +1195,21 @@ h5sget_select_type_c ( hid_t_f *space_id , int_f *type) /****if* H5Sf/h5sselect_elements_c * NAME - * h5sselect_elements_c + * h5sselect_elements_c * PURPOSE - * Call H5Sselect_elements to select elements of a dataspace + * Call H5Sselect_elements to select elements of a dataspace * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) - * nelements - number of elements in the selection - * coord - arrays with the elements coordinates + * nelements - number of elements in the selection + * coord - arrays with the elements coordinates * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE @@ -1251,21 +1251,21 @@ h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsiz /****if* H5Sf/h5sdecode_c * NAME - * h5sdecode_c + * h5sdecode_c * PURPOSE - * Call H5Sdecode + * Call H5Sdecode * INPUTS * * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE @@ -1297,19 +1297,19 @@ h5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /****if* H5Sf/h5sencode_c * NAME - * h5sencode_c + * h5sencode_c * PURPOSE - * Call H5Sencode + * Call H5Sencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE @@ -1366,21 +1366,21 @@ h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /****if* H5Sf/h5sextent_equal_c * NAME - * h5sextent_equal_c + * h5sextent_equal_c * PURPOSE - * Call H5Sextent_equal + * Call H5Sextent_equal * INPUTS * * space1_id - First dataspace identifier. - * space2_id - Second dataspace identifier. + * space2_id - Second dataspace identifier. * OUTPUTS * - * equal - TRUE if equal, FALSE if unequal. + * equal - TRUE if equal, FALSE if unequal. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 7103ca2..8481cbc 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -1,6 +1,6 @@ /****h* H5Tf/H5Tf * PURPOSE - * This file contains C stubs for H5T Fortran APIs + * This file contains C stubs for H5T Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -30,17 +30,17 @@ * PURPOSE * Call H5Topen2 to open a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * tapl_id - datatype access property list identifier + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * tapl_id - datatype access property list identifier * OUTPUTS - * type_id - dataset identifier + * type_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -82,18 +82,18 @@ done: * PURPOSE * Call H5Tcommit2 to commit a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * type_id - dataset identifier - * lcpl_id - Link creation property list - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * type_id - dataset identifier + * lcpl_id - Link creation property list + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * - Added passing optional parameters for version 1.8 @@ -130,12 +130,12 @@ done: * PURPOSE * Call H5Tclose to close the datatype * INPUTS - * type_id - identifier of the datatype to be closed + * type_id - identifier of the datatype to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -160,14 +160,14 @@ h5tclose_c ( hid_t_f *type_id ) * PURPOSE * Call H5Tcopy to copy a datatype * INPUTS - * type_id - identifier of the datatype to be copied + * type_id - identifier of the datatype to be copied * OUTPUTS - * new_type_id - identifier of the new datatype + * new_type_id - identifier of the new datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -194,15 +194,15 @@ h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) * PURPOSE * Call H5Tequal to copy a datatype * INPUTS - * type1_id - datatype identifier - * type2_id - datatype identifier + * type1_id - datatype identifier + * type2_id - datatype identifier * OUTPUTS - * c_flag - flag; indicates if two datatypes are equal or not. + * c_flag - flag; indicates if two datatypes are equal or not. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, February 22, 2000 + * Tuesday, February 22, 2000 * HISTORY * * SOURCE @@ -293,17 +293,17 @@ h5tget_class_c ( hid_t_f *type_id , int_f *classtype) * PURPOSE * Call H5Tget_order to determine byte order * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * order; possible values are: + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -337,16 +337,16 @@ h5tget_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tset_order to set byte order * INPUTS - * type_id - identifier of the dataspace - * order; possible values are: + * type_id - identifier of the dataspace + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -378,14 +378,14 @@ h5tset_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -413,14 +413,14 @@ h5tget_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE @@ -449,14 +449,14 @@ h5tset_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_precision to get precision of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * precision - number of significant bits + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE @@ -484,13 +484,13 @@ h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) * PURPOSE * Call H5Tset_precision to set precision of the datatype * INPUTS - * type_id - identifier of the dataspace - * precision - number of significant bits + * type_id - identifier of the dataspace + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE @@ -518,16 +518,16 @@ h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) * h5tget_offset_c * PURPOSE * Call H5Tget_offset to get bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * offset - bit offset of the first significant bit + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE @@ -555,15 +555,15 @@ h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tset_offset_c * PURPOSE * Call H5Tset_offset to set bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace - * offset - bit offset of the first significant bit + * type_id - identifier of the dataspace + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE @@ -591,18 +591,18 @@ h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tget_pad_c * PURPOSE * Call H5Tget_pad to get the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -631,20 +631,20 @@ h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) * NAME * h5tset_pad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_pad to set the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * type_id - identifier of the dataspace + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -674,14 +674,14 @@ h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) * PURPOSE * Call H5Tget_sign to get sign type for an integer type * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * sign - sign type for an integer type + * sign - sign type for an integer type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -709,13 +709,13 @@ h5tget_sign_c ( hid_t_f *type_id , int_f *sign) * PURPOSE * Call H5Tset_sign to set sign type for an integer type * INPUTS - * type_id - identifier of the dataspace - * sign - sign type for an integer typ + * type_id - identifier of the dataspace + * sign - sign type for an integer typ * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -744,19 +744,19 @@ h5tset_sign_c ( hid_t_f *type_id , int_f* sign) * h5tget_fields_c * PURPOSE * Call H5Tget_fields to get floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, January 27, 2000 + * Thursday, January 27, 2000 * HISTORY * * SOURCE @@ -788,18 +788,18 @@ h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* e * h5tset_fields_c * PURPOSE * Call H5Tset_fields to set floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * type_id - identifier of the dataspace + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -832,16 +832,16 @@ h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* es * h5tget_ebias_c * PURPOSE * Call H5Tget_ebias to get exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * ebias - exponent bias of a floating-point type of the datatype + * ebias - exponent bias of a floating-point type of the datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE @@ -869,15 +869,15 @@ h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tset_ebias_c * PURPOSE * Call H5Tset_ebias to set exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * ebias - exponent bias of a floating-point type of the datatyp + * type_id - identifier of the dataspace + * ebias - exponent bias of a floating-point type of the datatyp * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE @@ -906,16 +906,16 @@ h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tget_norm_c * PURPOSE * Call H5Tget_norm to get mantissa normalization - * of a floating-point datatype + * of a floating-point datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * norm - mantissa normalization of a floating-point type + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE @@ -943,15 +943,15 @@ h5tget_norm_c ( hid_t_f *type_id , int_f *norm) * h5tset_norm_c * PURPOSE * Call H5Tset_norm to set mantissa normalization of - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * norm - mantissa normalization of a floating-point type + * type_id - identifier of the dataspace + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE @@ -980,18 +980,18 @@ h5tset_norm_c ( hid_t_f *type_id , int_f *norm) * h5tget_inpad_c * PURPOSE * Call H5Tget_inpad to get the padding type for - * unused bits in floating-point datatypes + * unused bits in floating-point datatypes * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * padtype - padding type for - * unused bits in floating-point datatype + * padtype - padding type for + * unused bits in floating-point datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1018,20 +1018,20 @@ h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) * NAME * h5tset_inpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_inpad to set the padding type - * unused bits in floating-point datatype + * unused bits in floating-point datatype * * INPUTS - * type_id - identifier of the dataspace - * padtype - padding type for unused bits - * in floating-point datatypes + * type_id - identifier of the dataspace + * padtype - padding type for unused bits + * in floating-point datatypes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1060,17 +1060,17 @@ h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) * h5tget_cset_c * PURPOSE * Call H5Tget_cset to get character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * cset - character set type of a string datatype + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1097,19 +1097,19 @@ h5tget_cset_c ( hid_t_f *type_id , int_f * cset) * NAME * h5tset_cset_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_cset to set character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace - * cset - character set type of a string datatype + * type_id - identifier of the dataspace + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1138,16 +1138,16 @@ h5tset_cset_c ( hid_t_f *type_id, int_f * cset) * h5tget_strpad_c * PURPOSE * Call H5Tget_strpad to get string padding method - * for a string datatype + * for a string datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * strpad - string padding method for a string datatype + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1173,19 +1173,19 @@ h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) * NAME * h5tset_strpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_strpad to set string padding method - * for a string datatype + * for a string datatype * * INPUTS - * type_id - identifier of the dataspace - * strpad - string padding method for a string datatype + * type_id - identifier of the dataspace + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1214,16 +1214,16 @@ h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) * h5tget_nmembers_c * PURPOSE * Call H5Tget_nmembers to get number of fields - * in a compound datatype + * in a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * num_members - number of fields in a compound datatype + * num_members - number of fields in a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1249,19 +1249,19 @@ h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) * h5tget_member_name_c * PURPOSE * Call H5Tget_member_name to get name - * of a compound datatype + * of a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * member_name - name of a field of a compound datatype + * member_name - name of a field of a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY - * Elena Pourmal - * Added namelen parameter to return length of the name to Fortran user + * Elena Pourmal + * Added namelen parameter to return length of the name to Fortran user * SOURCE */ @@ -1290,15 +1290,15 @@ h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *na * h5tget_member_index_c * PURPOSE * Call H5Tget_member_index to get an index of - * the specified datatype filed or member. + * the specified datatype filed or member. * INPUTS - * type_id - datatype identifier - * name - name of the datatype within file or group - * namelen - name length + * type_id - datatype identifier + * name - name of the datatype within file or group + * namelen - name length * OUTPUTS - * index - 0-based index + * index - 0-based index * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, September 26, 2002 @@ -1341,19 +1341,19 @@ DONE: * h5tget_member_offset_c * PURPOSE * Call H5Tget_member_offset to get byte offset of the - * beginning of a field within a compound datatype with - * respect to the beginning of the compound data type datum + * beginning of a field within a compound datatype with + * respect to the beginning of the compound data type datum * INPUTS - * type_id - identifier of the dataspace - * member_no - Number of the field whose offset is requested + * type_id - identifier of the dataspace + * member_no - Number of the field whose offset is requested * OUTPUTS - * offset - byte offset of the the beginning of the field of - * a compound datatype + * offset - byte offset of the the beginning of the field of + * a compound datatype * RETURNS - * always 0 + * always 0 * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1377,16 +1377,16 @@ h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) * h5tget_array_dims_c * PURPOSE * Call H5Tget_array_dims2 to get - * dimensions of array datatype + * dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * dims - dimensions(sizes of dimensions) of the array + * dims - dimensions(sizes of dimensions) of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE @@ -1420,16 +1420,16 @@ DONE: * h5tget_array_ndims_c * PURPOSE * Call H5Tget_array_ndims to get number - * of dimensions of array datatype + * of dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * ndims - number of dimensions of the array + * ndims - number of dimensions of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE @@ -1457,16 +1457,16 @@ h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) * h5tget_super_c * PURPOSE * Call H5Tget_super to get base datatype from which - * datatype was derived + * datatype was derived * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * base_type_id - base datatype identifier + * base_type_id - base datatype identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE @@ -1495,14 +1495,14 @@ h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) * h5tget_member_type_c * PURPOSE * Call H5Tget_member_type to get the identifier of a copy of - * the datatype of the field + * the datatype of the field * INPUTS - * type_id - identifier of the datatype - * field_idx - Field index (0-based) of the field type to retrieve + * type_id - identifier of the datatype + * field_idx - Field index (0-based) of the field type to retrieve * OUTPUTS - * datatype - identifier of a copy of the datatype of the field + * datatype - identifier of a copy of the datatype of the field * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Thursday, February 3, 2000 @@ -1531,10 +1531,10 @@ h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) * PURPOSE * Call H5Tcreate to create a datatype * INPUTS - * cls - class type - * size - size of the class memeber + * cls - class type + * size - size of the class memeber * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -1643,12 +1643,12 @@ h5tpack_c(hid_t_f * type_id) * PURPOSE * Call H5Tarray_create2 to create array datatype * INPUTS - * base_id - identifier of array base datatype - * rank - array's rank - * dims - Size of new member array - * type_id - identifier of the array datatype + * base_id - identifier of array base datatype + * rank - array's rank + * dims - Size of new member array + * type_id - identifier of the array datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, November 16, 2000 @@ -1692,7 +1692,7 @@ DONE: * parent_id - Datatype identifier for the base datatype * OUTPUTS * new_type_id - datatype identifier for the new - * enumeration datatype + * enumeration datatype * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -1767,17 +1767,17 @@ h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tenum_nameof_c * PURPOSE * Call H5Tenum_nameof to find the symbol name that corresponds to - * the specified value of the enumeration datatype type + * the specified value of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * namelen - length of the name - * value - value of the enumeration datatype - * Output: name - Name of the enumeration datatype + * type_id - identifier of the datatype + * namelen - length of the name + * value - value of the enumeration datatype + * Output: name - Name of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1811,17 +1811,17 @@ h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) * h5tenum_valueof_c * PURPOSE * Call H5Tenum_valueof to find the value of that corresponds to - * the specified name of the enumeration datatype type + * the specified name of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * name - Name of the enumeration datatype - * namelen - length of name - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * name - Name of the enumeration datatype + * namelen - length of name + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1851,16 +1851,16 @@ h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tget_member_value_c * PURPOSE * Call H5Tget_member_value to get the value of an - * enumeration datatype member + * enumeration datatype member * INPUTS - * type_id - identifier of the datatype - * member_no - Number of the enumeration datatype member. - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * member_no - Number of the enumeration datatype member. + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1886,19 +1886,19 @@ h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) * NAME * h5tset_tag_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_tag to set an opaque datatype tag * INPUTS - * type_id - identifier of the dataspace - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * namelen - length of tag + * type_id - identifier of the dataspace + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * namelen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE @@ -1929,11 +1929,11 @@ h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * INPUTS * type_id - identifier of the datatype * OUTPUTS - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * taglen - length of tag + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * taglen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Wednesday, January 26, 2000 @@ -1965,14 +1965,14 @@ h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) * PURPOSE * Call H5Tvlen_create to create VL dtatype * INPUTS - * type_id - identifier of the base datatype + * type_id - identifier of the base datatype * OUTPUTS - * vltype_id - identifier of the VL datatype + * vltype_id - identifier of the VL datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE @@ -1997,17 +1997,17 @@ h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) * h5tis_variable_str_c * PURPOSE * Call H5Tis_variable_str to detrmine if the datatype - * is a variable string. + * is a variable string. * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not VL str, 1 if is not - * and negative on failure. + * flag - 0 if not VL str, 1 if is not + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12 , 2003 + * Wednesday, March 12 , 2003 * HISTORY * * SOURCE @@ -2034,13 +2034,13 @@ h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) * Call H5Tget_member_class to detrmine ithe class of the compound * datatype member * INPUTS - * type_id - identifier of the dataspace - * member_no - member's index + * type_id - identifier of the dataspace + * member_no - member's index * OUTPUTS - * class - member's class - * and negative on failure. + * class - member's class + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, April 6, 2005 @@ -2073,12 +2073,12 @@ h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * PURPOSE * Call H5Tcommit_anon * INPUTS - * loc_id - file or group identifier - * dtype_id - dataset identifier - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * dtype_id - dataset identifier + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 25, 2008 @@ -2108,10 +2108,10 @@ h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * h5tcommitted_c * PURPOSE * Call H5Tcommitted - * dtype_id - dataset identifier + * dtype_id - dataset identifier * RETURNS - * a positive value, for TRUE, if the datatype has been committed, - * or 0 (zero), for FALSE, if the datatype has not been committed. + * a positive value, for TRUE, if the datatype has been committed, + * or 0 (zero), for FALSE, if the datatype has not been committed. * Otherwise returns a negative value. * AUTHOR * M. Scot Breitenfeld @@ -2144,10 +2144,10 @@ h5tcommitted_c(hid_t_f *dtype_id) * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2187,11 +2187,11 @@ h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) * Call H5Tencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2256,11 +2256,11 @@ h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) * PURPOSE * Call H5Tget_create_plist * INPUTS - * dtype_id - Datatype identifier + * dtype_id - Datatype identifier * OUTPUTS - * dtpl_id - Datatype property list identifier + * dtpl_id - Datatype property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2289,12 +2289,12 @@ h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) * Call H5Tcompiler_conv * INPUTS * - * src_id - Identifier for the source datatype. - * dst_id - Identifier for the destination datatype. + * src_id - Identifier for the source datatype. + * dst_id - Identifier for the destination datatype. * OUTPUTS - * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion + * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M.Scot Breitenfeld * April 9, 2008 @@ -2323,12 +2323,12 @@ h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) * Call H5Tget_native_type * INPUTS * - * dtype_id - Datatype identifier for the dataset datatype. - * direction - Direction of search. + * dtype_id - Datatype identifier for the dataset datatype. + * direction - Direction of search. * OUTPUTS - * native_dtype_id - The native datatype identifier for the specified dataset datatype + * native_dtype_id - The native datatype identifier for the specified dataset datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * June 18, 2008 diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index 887ec17..a8cf1c2 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -1,6 +1,6 @@ /****h* H5Zf/H5Zf * PURPOSE - * This file contains C stubs for H5Z Fortran APIs + * This file contains C stubs for H5Z Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,16 +25,16 @@ /****if* H5Zf/h5zunregister_c * NAME - * h5zunregister_c + * h5zunregister_c * PURPOSE - * Call H5Zunregister to unregister filter + * Call H5Zunregister to unregister filter * INPUTS - * filter identifier + * filter identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE @@ -92,7 +92,7 @@ h5zfilter_avail_c ( int_f *filter , int_f *flag ) /****if* H5Zf/h5zget_filter_info_c * NAME - * h5zget_filter_info_c + * h5zget_filter_info_c * PURPOSE * Call H5Zget_filter_info to find if filter has its encoder * and/or its decoder available diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index fa96ebe..90edfa7 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -1,6 +1,6 @@ /****ih* H5_f/H5_f * PURPOSE - * This file contains C stubs for H5 Fortran APIs + * This file contains C stubs for H5 Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -30,16 +30,16 @@ * Initialize predefined datatypes in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the + * type, its element and length must be the + * same as the types array defined in the * H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the + * type, its element and length must be the + * same as the floatingtypes array defined in the * H5f90global.F90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the + * type, its element and length must be the + * same as the integertypes array defined in the * H5f90global.F90 * RETURNS * 0 on success, -1 on failure @@ -341,31 +341,31 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes * Closes predefined datatype in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the + * type, its element and length must be the + * same as the types array defined in the * H5f90global.F90 * lentypes - length of the types array, which must be the - * same as the length of types array defined - * in the H5f90global.F90 + * same as the length of types array defined + * in the H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the + * type, its element and length must be the + * same as the floatingtypes array defined in the * H5f90global.F90 * floatinglen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.F90 + * same as the length of floatingtypes array defined + * in the H5f90global.F90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the + * type, its element and length must be the + * same as the integertypes array defined in the * H5f90global.F90 * integerlen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.F90 + * same as the length of floatingtypes array defined + * in the H5f90global.F90 * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, August 3, 1999 + * Elena Pourmal + * Tuesday, August 3, 1999 * SOURCE */ int_f @@ -593,11 +593,11 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[6] = (int_f)H5O_COPY_ALL; /* All object copying flags (for internal checking) */ /* Flags for shared message indexes. - * Pass these flags in using the mesg_type_flags parameter in + * Pass these flags in using the mesg_type_flags parameter in * H5P_set_shared_mesg_index. * (Developers: These flags correspond to object header message type IDs, - * but we need to assign each kind of message to a different bit so that - * one index can hold multiple types.) + * but we need to assign each kind of message to a different bit so that + * one index can hold multiple types.) */ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */ @@ -616,7 +616,7 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS; /* Maximum shared message values. Number of indexes is 8 to allow room to add - * new types of messages. + * new types of messages. */ h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES; h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE; @@ -796,14 +796,14 @@ h5init1_flags_c(int_f *h5lib_flags) /****if* H5_f/h5open_c * NAME - * h5open_c + * h5open_c * PURPOSE - * Calls H5open call to initialize C HDF5 library + * Calls H5open call to initialize C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 + * Elena Pourmal + * Friday, November 17, 2000 * * SOURCE */ @@ -819,13 +819,13 @@ h5open_c(void) } /****if* H5_f/h5close_c * NAME - * h5close_c + * h5close_c * PURPOSE - * Calls H5close call to close C HDF5 library + * Calls H5close call to close C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f @@ -841,23 +841,23 @@ h5close_c(void) /****if* H5_f/h5get_libversion_c * NAME - * h5get_libversion_c + * h5get_libversion_c * PURPOSE - * Calls H5get_libversion function + * Calls H5get_libversion function * to retrieve library version info. * INPUTS * - * None + * None * OUTPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE * */ @@ -880,23 +880,23 @@ h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5check_version_c * NAME - * h5check_version_c + * h5check_version_c * PURPOSE - * Calls H5check_version function + * Calls H5check_version function * to verify library version info. * INPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * OUTPUTS * - * None + * None * RETURNS - * 0 on success, aborts on failure + * 0 on success, aborts on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f @@ -918,14 +918,14 @@ h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5garbage_collect_c * NAME - * h5garbage_collect_c + * h5garbage_collect_c * PURPOSE - * Calls H5garbage_collect to collect on all free-lists of all types + * Calls H5garbage_collect to collect on all free-lists of all types * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f @@ -941,14 +941,14 @@ h5garbage_collect_c(void) /****if* H5_f/h5dont_atexit_c * NAME - * h5dont_atexit_c + * h5dont_atexit_c * PURPOSE - * Calls H5dont_atexit not to install atexit cleanup routine + * Calls H5dont_atexit not to install atexit cleanup routine * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index 0bc721f..c6c874f 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -1,6 +1,6 @@ /****h* H5f90kit/H5f90kit * PURPOSE - * Routines from HDF4 to deal with C-FORTRAN issues: + * Routines from HDF4 to deal with C-FORTRAN issues: * * HD5f2cstring -- convert a Fortran string to a C string * HD5packFstring -- convert a C string into a Fortran string @@ -31,16 +31,16 @@ /****if* H5f90kit/HDf2cstring * NAME * HD5f2cstring -- convert a Fortran string to a C string - * char * HDf2cstring(fdesc, len) + * char * HDf2cstring(fdesc, len) * INPUTS * _fcd fdesc; IN: Fortran string descriptor - * int len; IN: length of Fortran string + * int len; IN: length of Fortran string * RETURNS - * Pointer to the C string if success, else NULL + * Pointer to the C string if success, else NULL * PURPOSE - * Chop off trailing blanks off of a Fortran string and - * move it into a newly allocated C string. It is up - * to the user to free this string. + * Chop off trailing blanks off of a Fortran string and + * move it into a newly allocated C string. It is up + * to the user to free this string. * SOURCE */ char * @@ -72,21 +72,21 @@ HD5f2cstring(_fcd fdesc, size_t len) /****if* H5f90kit/HD5packFstring * NAME * HD5packFstring -- convert a C string into a Fortran string - * int HD5packFstring(src, dest, len) + * int HD5packFstring(src, dest, len) * INPUTS - * char * src; IN: source string - * int len; IN: length of string + * char * src; IN: source string + * int len; IN: length of string * OUTPUTS - * char * dest; OUT: destination + * char * dest; OUT: destination * RETURNS * SUCCEED / FAIL * PURPOSE - * given a NULL terminated C string 'src' convert it to - * a space padded Fortran string 'dest' of length 'len' + * given a NULL terminated C string 'src' convert it to + * a space padded Fortran string 'dest' of length 'len' * - * This is very similar to HDc2fstr except that function does - * it in place and this one copies. We should probably only - * support one of these. + * This is very similar to HDc2fstr except that function does + * it in place and this one copies. We should probably only + * support one of these. * SOURCE */ void -- cgit v0.12 From 63344168522b6200f70e0f6dfd70dfa1aa1e1f8f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 11:02:08 -0500 Subject: [svn-r27379] formatting clean-up --- fortran/src/H5Gf.c | 21 ++++++++++----------- fortran/src/H5Rf.c | 2 +- fortran/src/H5Sf.c | 4 ++-- fortran/src/H5Tf.c | 3 --- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 6d85b9a..b9c44bb 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -42,10 +42,9 @@ * Elena Pourmal * Wednesday, August 5, 1999 * HISTORY - * * Changed to call H5Gcreate2 because H5Gcreate flip-flops and - * H5Gcreate1 can be compiled out of the library - * QAK - 2007/08/23 + * H5Gcreate1 can be compiled out of the library + * QAK - 2007/08/23 * SOURCE */ int_f @@ -880,8 +879,8 @@ done: * February 15, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld + * - Added 'mounted' paramater + * M. Scot Breitenfeld * July 16, 2008 * SOURCE */ @@ -944,9 +943,9 @@ done: * February 18, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' parameter + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f @@ -1014,9 +1013,9 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * February 18, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 378dded..9cd9950 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -357,7 +357,7 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_ * RETURNS * 0 on success, -1 on failure * AUTHOR - * M. Scot Breitenfeld + * M. Scot Breitenfeld * December 17, 2008 * * SOURCE diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index a12adfa..67427a7 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -273,7 +273,7 @@ h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) * HISTORY * * Transpose dimension arrays because of C-FORTRAN storage order - * M. Scot Breitenfeld + * M. Scot Breitenfeld * SOURCE */ @@ -346,7 +346,7 @@ h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, * HISTORY * swapped array bounds to account for C and Fortran reversed * matrix notation. - * M. Scot Breitenfeld + * M. Scot Breitenfeld * SOURCE */ diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 8481cbc..b6389258 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -23,7 +23,6 @@ #include "H5f90.h" - /****if* H5Tf/h5topen_c * NAME * h5topen_c @@ -75,7 +74,6 @@ done: return ret_value; } - /****if* H5Tf/h5tcommit_c * NAME * h5tcommit_c @@ -153,7 +151,6 @@ h5tclose_c ( hid_t_f *type_id ) return ret_value; } - /****if* H5Tf/h5tcopy_c * NAME * h5tcopy_c -- cgit v0.12 From 1e147f4442b3d3b94cbe393379de0afef347dc31 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 11:14:16 -0500 Subject: [svn-r27381] comments added --- fortran/src/H5_buildiface.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index e058849..c5592ca 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -7,15 +7,15 @@ ! fortran/src/H5_buildiface.f90 ! ! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! This stand alone program is used at build time to generate the module +! H5_gen (H5_gen.F90). It cycles through all the available KIND parameters for ! integers and reals. The appropriate program and subroutines are then generated ! depending on which of the KIND values are found. ! ! NOTES ! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF ! depending on availablity.It generates code that makes use of -! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! STORAGE_SIZE/SIZEOF in H5_gen.F90. STORAGE_SIZE is standard ! compliant and should always be chosen over SIZEOF. ! ! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE @@ -98,9 +98,9 @@ PROGRAM test_kind ! DEVELOPER'S NOTES: ! ! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 -! standard extended the maximum rank to 15, it was decided that they should use the +! standard extended the maximum rank to 15, it was decided that user's should use the ! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility -! with the Fortran 90/95 APIs codes which could never handle rank 15 array sizes. +! with the Fortran 90/95 APIs codes which could never handle ranks greater than 7. OPEN(11,FILE='H5_gen.F90') WRITE(11,'(40(A,/))') & @@ -134,7 +134,7 @@ PROGRAM test_kind '!',& '!*****' - WRITE(11,'(a)') "MODULE H5_GEN" + WRITE(11,'(A)') "MODULE H5_GEN" WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' WRITE(11,'(A)') ' USE H5GLOBAL' -- cgit v0.12 From 6ed616cd99501d513e272761e1541d28418b4ff3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 11:35:27 -0500 Subject: [svn-r27382] Documenation changes --- fortran/src/H5Dff.F90 | 8 +++++++- fortran/src/H5Eff.F90 | 8 +++++++- fortran/src/H5Fff.F90 | 8 +++++++- fortran/src/H5Gff.F90 | 8 +++++++- fortran/src/H5Iff.F90 | 8 +++++++- fortran/src/H5Lff.F90 | 8 +++++++- fortran/src/H5Off.F90 | 8 +++++++- fortran/src/H5Pff.F90 | 9 ++++++++- fortran/src/H5Rff.F90 | 9 ++++++++- fortran/src/H5Sff.F90 | 11 +++++++++-- fortran/src/H5Zff.F90 | 11 +++++++++-- fortran/src/H5_ff.F90 | 8 +++++++- 12 files changed, 90 insertions(+), 14 deletions(-) diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 188dd65..bd7ba79 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -72,7 +72,13 @@ ! or ! CHARACTER, TARGET :: chr ! -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5D 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. diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index 47c43ce..a2efe61 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -26,7 +26,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! 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' in the fortran/src directory. ! This is needed for Windows based operating systems. diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index 206f71b..c69ad82 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -26,7 +26,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! 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. diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index 1ca05b8..2e002b5 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -26,7 +26,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5G 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. diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index 4699404..c91a8aa 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -26,7 +26,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5I 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. diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 6ad311d..bc91072 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -23,7 +23,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5L 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. diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index 41ec394..da940df 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -27,7 +27,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5O 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. diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 203661f..97f907b 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -23,7 +23,14 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5P 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. diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index f9b6b68..a90bd9a 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -26,7 +26,14 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5R 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. diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index c95d4be..aeb3314 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -26,7 +26,14 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5S 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. @@ -63,7 +70,7 @@ CONTAINS ! HISTORY ! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows - ! port). March 6, 2001 +! port). March 6, 2001 ! SOURCE SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index 1dd8bcd..0259959 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -22,8 +22,14 @@ ! access to either file, you may request a copy from help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! -! NOTES -! *** IMPORTANT *** +! NOTES! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5Z 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. @@ -124,6 +130,7 @@ CONTAINS IF (flag .EQ. 0) status = .FALSE. END SUBROUTINE h5zfilter_avail_f + !****s* H5Z/h5zget_filter_info_f ! ! NAME diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 3d5f812..39e23a7 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -23,7 +23,13 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new 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. -- cgit v0.12 From a3de9abcbff051f5f4195a701b559b5e62bbf42b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 11:39:16 -0500 Subject: [svn-r27383] removed unused functions --- fortran/src/H5Dff.F90 | 258 -------------------------------------------------- 1 file changed, 258 deletions(-) diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index bd7ba79..17b124e 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -1308,7 +1308,6 @@ CONTAINS END SUBROUTINE h5dwrite_reference_dsetreg - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING @@ -1853,263 +1852,6 @@ CONTAINS END SUBROUTINE h5dwrite_char_7 - - SUBROUTINE h5dwrite_c_float_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_scalar - - - SUBROUTINE h5dwrite_c_float_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_1 - - SUBROUTINE h5dwrite_c_float_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_2 - - SUBROUTINE h5dwrite_c_float_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_3 - - SUBROUTINE h5dwrite_c_float_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_4 - - SUBROUTINE h5dwrite_c_float_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_5 - - SUBROUTINE h5dwrite_c_float_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_6 - - SUBROUTINE h5dwrite_c_float_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL(KIND=C_FLOAT), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_c_float_7 - ! ! NAME ! h5dread_f -- cgit v0.12 From 0e102fb1cdc194f2ef56a328f7fc026241bffe39 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 12:07:27 -0500 Subject: [svn-r27384] H5Dwrite and H5Awrite for INTEGERs are now generated code --- fortran/src/H5Aff.F90 | 8 ---- fortran/src/H5Dff.F90 | 8 ---- fortran/src/H5_buildiface.F90 | 95 ++++++++++++++++++++++++++++++++++---- fortran/src/hdf5_fortrandll.def.in | 16 ------- 4 files changed, 87 insertions(+), 40 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index a2b84c4..8e9eadf 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -73,14 +73,6 @@ MODULE H5A USE H5GLOBAL INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 MODULE PROCEDURE h5awrite_char_scalar MODULE PROCEDURE h5awrite_char_1 MODULE PROCEDURE h5awrite_char_2 diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 17b124e..75ac2d6 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -111,14 +111,6 @@ MODULE H5D INTERFACE h5dwrite_f MODULE PROCEDURE h5dwrite_reference_obj MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 MODULE PROCEDURE h5dwrite_char_scalar MODULE PROCEDURE h5dwrite_char_1 MODULE PROCEDURE h5dwrite_char_2 diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index c5592ca..e837143 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -154,7 +154,14 @@ PROGRAM test_kind j = rkind(i) WRITE(chr2,'(I2)') j DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO WRITE(11,'(A)') " END INTERFACE" @@ -179,7 +186,14 @@ PROGRAM test_kind j = rkind(i) WRITE(chr2,'(I2)') j DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO WRITE(11,'(A)') " END INTERFACE" @@ -267,11 +281,11 @@ PROGRAM test_kind ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' ! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))& + WRITE(11,'(A)') ' SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' @@ -283,7 +297,33 @@ PROGRAM test_kind WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5awrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO ! @@ -365,10 +405,10 @@ PROGRAM test_kind DO j = 1, 8 ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' ! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))& + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' @@ -394,7 +434,46 @@ PROGRAM test_kind WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index ab24438..7e35ebf 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -9,14 +9,6 @@ H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE H5LIB_mp_H5OFFSETOF ; H5A -H5A_mp_H5AWRITE_INTEGER_SCALAR -H5A_mp_H5AWRITE_INTEGER_1 -H5A_mp_H5AWRITE_INTEGER_2 -H5A_mp_H5AWRITE_INTEGER_3 -H5A_mp_H5AWRITE_INTEGER_4 -H5A_mp_H5AWRITE_INTEGER_5 -H5A_mp_H5AWRITE_INTEGER_6 -H5A_mp_H5AWRITE_INTEGER_7 H5A_mp_H5AWRITE_CHAR_SCALAR H5A_mp_H5AWRITE_CHAR_1 H5A_mp_H5AWRITE_CHAR_2 @@ -72,14 +64,6 @@ H5D_mp_H5DOPEN_F H5D_mp_H5DCLOSE_F H5D_mp_H5DWRITE_REFERENCE_OBJ H5D_mp_H5DWRITE_REFERENCE_DSETREG -H5D_mp_H5DWRITE_INTEGER_SCALAR -H5D_mp_H5DWRITE_INTEGER_1 -H5D_mp_H5DWRITE_INTEGER_2 -H5D_mp_H5DWRITE_INTEGER_3 -H5D_mp_H5DWRITE_INTEGER_4 -H5D_mp_H5DWRITE_INTEGER_5 -H5D_mp_H5DWRITE_INTEGER_6 -H5D_mp_H5DWRITE_INTEGER_7 H5D_mp_H5DWRITE_CHAR_SCALAR H5D_mp_H5DWRITE_CHAR_1 H5D_mp_H5DWRITE_CHAR_2 -- cgit v0.12 From f76d1ca08bf48cc0dfb95fc8d940e5a3c8df56f9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 13:39:10 -0500 Subject: [svn-r27385] H5Dwrite,H5Dread,H5Awrite,H5Dread for INTEGERs and Characters are now generated code --- fortran/src/H5Aff.F90 | 622 ------------------- fortran/src/H5Dff.F90 | 1197 +++--------------------------------- fortran/src/H5_buildiface.F90 | 410 +++++++++++- fortran/src/hdf5_fortrandll.def.in | 44 -- 4 files changed, 470 insertions(+), 1803 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 8e9eadf..6f925b7 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -74,35 +74,13 @@ MODULE H5A INTERFACE h5awrite_f MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 ! This is the preferred way to call h5awrite ! by passing an address MODULE PROCEDURE h5awrite_ptr END INTERFACE INTERFACE h5aread_f - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 ! This is the preferred way to call h5aread ! by passing an address MODULE PROCEDURE h5aread_ptr @@ -949,195 +927,6 @@ CONTAINS END SUBROUTINE H5Arename_by_name_f -!****s* H5A (F03)/H5Awrite_f_F90 -! -! NAME -! H5Awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_scalar - - SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_1 - - - SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_2 - - SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_3 - - - SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_4 - - - SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_5 - - - SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_6 - - - SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_7 - ! !****s* H5A/H5Aopen_f ! @@ -2037,122 +1826,6 @@ CONTAINS END SUBROUTINE H5Awrite_char_scalar_fix - SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_1 - - SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_2 - - SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_3 - - SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_4 - - SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_5 - - - SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_6 - - SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_7 !****s* H5A (F03)/H5Awrite_f_F03 ! @@ -2203,185 +1876,6 @@ CONTAINS END SUBROUTINE H5Awrite_ptr -!****s* H5A (F03)/H5Aread_f_F90 -! -! NAME -! H5Aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_scalar - - SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_1 - - - SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_2 - - - SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_3 - - - SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_4 - - - SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_5 - - - SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_6 - - - SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_7 - SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier @@ -2411,122 +1905,6 @@ CONTAINS END SUBROUTINE H5Aread_char_scalar_fix - SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_1 - - SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_2 - - SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_3 - - SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_4 - - SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_5 - - - SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_6 - - - SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_7 - - !****s* H5A (F03)/H5Aread_f_F03 ! ! NAME diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 75ac2d6..afdb5ba 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -112,13 +112,6 @@ MODULE H5D MODULE PROCEDURE h5dwrite_reference_obj MODULE PROCEDURE h5dwrite_reference_dsetreg MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 ! This is the preferred way to call h5dwrite ! by passing an address MODULE PROCEDURE h5dwrite_ptr @@ -127,22 +120,7 @@ MODULE H5D INTERFACE h5dread_f MODULE PROCEDURE h5dread_reference_obj MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 ! This is the preferred way to call h5dread ! by passing an address MODULE PROCEDURE h5dread_ptr @@ -1235,7 +1213,6 @@ CONTAINS hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_reference_obj SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & @@ -1300,112 +1277,34 @@ CONTAINS END SUBROUTINE h5dwrite_reference_dsetreg - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_integer_2 + END SUBROUTINE h5dwrite_char_scalar - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier @@ -1421,61 +1320,30 @@ CONTAINS IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) + f_ptr = C_LOC(buf(1:1)) hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_integer_4 + END SUBROUTINE h5dwrite_char_scalar_fix - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default TYPE(C_PTR) :: f_ptr @@ -1486,64 +1354,54 @@ CONTAINS IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) + f_ptr = C_LOC(buf(1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & file_space_id_default, xfer_prp_default, f_ptr) - END SUBROUTINE h5dwrite_integer_5 + END SUBROUTINE h5dread_reference_obj - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_6 - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) & + BIND(C,NAME='h5dread_ref_reg_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F @@ -1552,48 +1410,35 @@ CONTAINS IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_7 + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) - END SUBROUTINE h5dwrite_char_scalar + END SUBROUTINE h5dread_reference_dsetreg - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr xfer_prp_default = H5P_DEFAULT_F mem_space_id_default = H5S_ALL_F @@ -1603,935 +1448,33 @@ CONTAINS IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) - END SUBROUTINE h5dwrite_char_scalar_fix + END SUBROUTINE h5dread_char_scalar - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer INTEGER, INTENT(OUT) :: hdferr ! Error code INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default TYPE(C_PTR) :: f_ptr - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) + f_ptr = C_LOC(buf(1:1)) - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_7 - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) & - BIND(C,NAME='h5dread_ref_reg_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) END SUBROUTINE h5dread_char_scalar_fix - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_7 - !****s* H5D (F03)/h5dwrite_f_F03 ! ! NAME diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index e837143..e2aa28b 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -90,7 +90,17 @@ PROGRAM test_kind ' f_ptr = C_LOC(buf(1,1,1,1)) ', & ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + CHARACTER(LEN=42), DIMENSION(1:8), PARAMETER :: fchr_ptr_line=(/ & + ' f_ptr = C_LOC(buf(1:1)) ', & + ' f_ptr = C_LOC(buf(1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1))' & /) ! (a) Generate Fortran H5* interfaces having multiple KIND interfaces. @@ -164,6 +174,9 @@ PROGRAM test_kind WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ckind_rank"//chr_rank(k) + ENDDO WRITE(11,'(A)') " END INTERFACE" ! H5Aread_f @@ -172,9 +185,19 @@ PROGRAM test_kind j = rkind(i) WRITE(chr2,'(I2)') j DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5aread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ckind_rank"//chr_rank(k) + ENDDO WRITE(11,'(A)') " END INTERFACE" !*************** ! H5D INTERFACES @@ -195,6 +218,9 @@ PROGRAM test_kind DO k = 1, 8 WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ckind_rank"//chr_rank(k) END DO WRITE(11,'(A)') " END INTERFACE" @@ -204,9 +230,19 @@ PROGRAM test_kind j = rkind(i) WRITE(chr2,'(I2)') j DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ckind_rank"//chr_rank(k) + ENDDO WRITE(11,'(A)') " END INTERFACE" !*************** @@ -274,6 +310,57 @@ PROGRAM test_kind !********************** ! ! H5Awrite_f + +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + DO i = 1, num_rkinds k = rkind(i) WRITE(chr2,'(I2)') k @@ -317,7 +404,7 @@ PROGRAM test_kind WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' @@ -326,18 +413,89 @@ PROGRAM test_kind WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO + DO j = 2, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*) , INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ckind_rank'//chr_rank(j) + ENDDO + ! ! H5Aread_f + +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** DO i = 1, num_rkinds k = rkind(i) WRITE(chr2,'(I2)') k DO j = 1, 8 ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' ! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))& + WRITE(11,'(A)') ' SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' @@ -349,25 +507,114 @@ PROGRAM test_kind WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5aread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') ' END SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_ckind_rank'//chr_rank(j) + ENDDO !********************** ! H5D APIs !********************** ! ! h5dread_f + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! DO i = 1, num_rkinds k = rkind(i) WRITE(chr2,'(I2)') k DO j = 1, 8 ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' ! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))& + WRITE(11,'(A)') ' SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))& &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' @@ -393,12 +640,122 @@ PROGRAM test_kind WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dread_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') ' END SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + + ENDDO + ENDDO + + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_ckind_rank'//chr_rank(j) + ENDDO ! ! h5dwrite_f + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** DO i = 1, num_rkinds k = rkind(i) WRITE(chr2,'(I2)') k @@ -475,6 +832,39 @@ PROGRAM test_kind WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO + ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j) ENDDO !********************** diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 7e35ebf..7b218ca 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -10,29 +10,7 @@ H5LIB_mp_H5KIND_TO_TYPE H5LIB_mp_H5OFFSETOF ; H5A H5A_mp_H5AWRITE_CHAR_SCALAR -H5A_mp_H5AWRITE_CHAR_1 -H5A_mp_H5AWRITE_CHAR_2 -H5A_mp_H5AWRITE_CHAR_3 -H5A_mp_H5AWRITE_CHAR_4 -H5A_mp_H5AWRITE_CHAR_5 -H5A_mp_H5AWRITE_CHAR_6 -H5A_mp_H5AWRITE_CHAR_7 -H5A_mp_H5AREAD_INTEGER_SCALAR -H5A_mp_H5AREAD_INTEGER_1 -H5A_mp_H5AREAD_INTEGER_2 -H5A_mp_H5AREAD_INTEGER_3 -H5A_mp_H5AREAD_INTEGER_4 -H5A_mp_H5AREAD_INTEGER_5 -H5A_mp_H5AREAD_INTEGER_6 -H5A_mp_H5AREAD_INTEGER_7 H5A_mp_H5AREAD_CHAR_SCALAR -H5A_mp_H5AREAD_CHAR_1 -H5A_mp_H5AREAD_CHAR_2 -H5A_mp_H5AREAD_CHAR_3 -H5A_mp_H5AREAD_CHAR_4 -H5A_mp_H5AREAD_CHAR_5 -H5A_mp_H5AREAD_CHAR_6 -H5A_mp_H5AREAD_CHAR_7 H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F @@ -65,31 +43,9 @@ H5D_mp_H5DCLOSE_F H5D_mp_H5DWRITE_REFERENCE_OBJ H5D_mp_H5DWRITE_REFERENCE_DSETREG H5D_mp_H5DWRITE_CHAR_SCALAR -H5D_mp_H5DWRITE_CHAR_1 -H5D_mp_H5DWRITE_CHAR_2 -H5D_mp_H5DWRITE_CHAR_3 -H5D_mp_H5DWRITE_CHAR_4 -H5D_mp_H5DWRITE_CHAR_5 -H5D_mp_H5DWRITE_CHAR_6 -H5D_mp_H5DWRITE_CHAR_7 H5D_mp_H5DREAD_REFERENCE_OBJ H5D_mp_H5DREAD_REFERENCE_DSETREG -H5D_mp_H5DREAD_INTEGER_SCALAR -H5D_mp_H5DREAD_INTEGER_1 -H5D_mp_H5DREAD_INTEGER_2 -H5D_mp_H5DREAD_INTEGER_3 -H5D_mp_H5DREAD_INTEGER_4 -H5D_mp_H5DREAD_INTEGER_5 -H5D_mp_H5DREAD_INTEGER_6 -H5D_mp_H5DREAD_INTEGER_7 H5D_mp_H5DREAD_CHAR_SCALAR -H5D_mp_H5DREAD_CHAR_1 -H5D_mp_H5DREAD_CHAR_2 -H5D_mp_H5DREAD_CHAR_3 -H5D_mp_H5DREAD_CHAR_4 -H5D_mp_H5DREAD_CHAR_5 -H5D_mp_H5DREAD_CHAR_6 -H5D_mp_H5DREAD_CHAR_7 H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F -- cgit v0.12 From e076946256d7b2af5e9410ca8465126f7ce8ccf4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 13:46:09 -0500 Subject: [svn-r27386] misc clean-up --- fortran/src/H5_buildiface.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index e2aa28b..83d5009 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -121,8 +121,8 @@ PROGRAM test_kind '! ',& '! PURPOSE',& '! This module is generated at build by H5_buildiface.F90 to handle all the',& -'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& -'! are H5A, H5D and H5P APIs',& +'! detected KINDs for APIs being passed INTEGERs, REALs and CHARACTERs. Currently ',& +'! these are H5A, H5D and H5P APIs',& '!',& '! COPYRIGHT',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -- cgit v0.12 From 72484f3a56e5445418ebec177c665d4a606fcb24 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 15:29:32 -0500 Subject: [svn-r27387] added definitions for H5LTset_attribute_*_c --- hl/fortran/src/H5LTf90proto.h | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 02409d9..9de97e0 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -111,12 +111,42 @@ h5ltget_attribute_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f h5ltget_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - _fcd buf, - size_t_f *buf_size); + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + _fcd buf, + size_t_f *buf_size); + +HDF5_HL_F90CSTUBDLL +int_f +h5ltset_attribute_float_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +h5ltset_attribute_double_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +h5ltset_attribute_string_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *buflen, + void *buf); HDF5_HL_F90CSTUBDLL int_f -- cgit v0.12 From 03ad911d3df0d611877e07a1d0d6d52758c26bbb Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Jul 2015 16:26:27 -0500 Subject: [svn-r27388] Removed robodoc documenation. --- MANIFEST | 83 - fortran/doc/DevelGuide/masterindex.html | 589 --- fortran/doc/DevelGuide/robo_functions.html | 39 - fortran/doc/DevelGuide/robo_modules.html | 117 - fortran/doc/DevelGuide/robo_programs.html | 39 - fortran/doc/DevelGuide/robo_sourcefiles.html | 309 -- fortran/doc/DevelGuide/robo_subroutines.html | 421 -- fortran/doc/DevelGuide/robodoc.css | 302 -- fortran/doc/DevelGuide/src/H5Af_c.html | 41 - fortran/doc/DevelGuide/src/H5Aff_F03_f90.html | 130 - fortran/doc/DevelGuide/src/H5Aff_F90_f90.html | 56 - fortran/doc/DevelGuide/src/H5Aff_f90.html | 1102 ----- fortran/doc/DevelGuide/src/H5Df_c.html | 41 - fortran/doc/DevelGuide/src/H5Dff_F03_f90.html | 138 - fortran/doc/DevelGuide/src/H5Dff_F90_f90.html | 116 - fortran/doc/DevelGuide/src/H5Dff_f90.html | 506 --- fortran/doc/DevelGuide/src/H5Ef_c.html | 41 - fortran/doc/DevelGuide/src/H5Eff_f90.html | 197 - fortran/doc/DevelGuide/src/H5FDmpiof_c.html | 41 - fortran/doc/DevelGuide/src/H5FDmpioff_f90.html | 253 -- fortran/doc/DevelGuide/src/H5Ff_c.html | 41 - fortran/doc/DevelGuide/src/H5Fff_f90.html | 653 --- fortran/doc/DevelGuide/src/H5Gf_c.html | 41 - fortran/doc/DevelGuide/src/H5Gff_f90.html | 840 ---- fortran/doc/DevelGuide/src/H5If_c.html | 41 - fortran/doc/DevelGuide/src/H5Iff_f90.html | 304 -- fortran/doc/DevelGuide/src/H5Lf_c.html | 41 - fortran/doc/DevelGuide/src/H5Lff_F03_f90.html | 181 - fortran/doc/DevelGuide/src/H5Lff_F90_f90.html | 50 - fortran/doc/DevelGuide/src/H5Lff_f90.html | 637 --- fortran/doc/DevelGuide/src/H5Of_c.html | 41 - fortran/doc/DevelGuide/src/H5Off_f90.html | 198 - fortran/doc/DevelGuide/src/H5Pf_c.html | 41 - fortran/doc/DevelGuide/src/H5Pff_F03_f90.html | 832 ---- fortran/doc/DevelGuide/src/H5Pff_F90_f90.html | 715 --- fortran/doc/DevelGuide/src/H5Pff_f90.html | 4752 -------------------- fortran/doc/DevelGuide/src/H5Rf_c.html | 41 - fortran/doc/DevelGuide/src/H5Rff_F03_f90.html | 492 -- fortran/doc/DevelGuide/src/H5Rff_F90_f90.html | 305 -- fortran/doc/DevelGuide/src/H5Rff_f90.html | 148 - fortran/doc/DevelGuide/src/H5Sf_c.html | 41 - fortran/doc/DevelGuide/src/H5Sff_f90.html | 1165 ----- fortran/doc/DevelGuide/src/H5Tf_c.html | 41 - fortran/doc/DevelGuide/src/H5Tff_f90.html | 2378 ---------- fortran/doc/DevelGuide/src/H5Zf_c.html | 41 - fortran/doc/DevelGuide/src/H5Zff_f90.html | 173 - .../src/H5_DBLE_InterfaceExclude_f90.html | 53 - .../src/H5_DBLE_InterfaceInclude_f90.html | 54 - fortran/doc/DevelGuide/src/H5_f_c.html | 41 - fortran/doc/DevelGuide/src/H5_ff_F03_f90.html | 83 - fortran/doc/DevelGuide/src/H5_ff_F90_f90.html | 48 - fortran/doc/DevelGuide/src/H5_ff_f90.html | 269 -- fortran/doc/DevelGuide/src/H5f90global_f90.html | 61 - fortran/doc/DevelGuide/src/H5f90kit_c.html | 44 - fortran/doc/DevelGuide/src/H5match_types_c.html | 49 - .../doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html | 61 - fortran/doc/DevelGuide/src/H5test_kind_f90.html | 62 - fortran/doc/DevelGuide/src/HDF5_f90.html | 47 - fortran/doc/DevelGuide/src/HDF5mpio_f90.html | 45 - fortran/doc/DevelGuide/test/fflush1_f90.html | 47 - fortran/doc/DevelGuide/test/fflush2_f90.html | 47 - .../DevelGuide/test/fortranlib_test_1_8_f90.html | 44 - .../DevelGuide/test/fortranlib_test_F03_f90.html | 45 - .../doc/DevelGuide/test/fortranlib_test_f90.html | 44 - fortran/doc/DevelGuide/test/tF2003_f90.html | 53 - fortran/doc/DevelGuide/test/tH5A_1_8_f90.html | 51 - fortran/doc/DevelGuide/test/tH5A_f90.html | 47 - fortran/doc/DevelGuide/test/tH5D_f90.html | 52 - fortran/doc/DevelGuide/test/tH5E_f90.html | 51 - fortran/doc/DevelGuide/test/tH5F_f90.html | 47 - fortran/doc/DevelGuide/test/tH5G_1_8_f90.html | 49 - fortran/doc/DevelGuide/test/tH5G_f90.html | 47 - fortran/doc/DevelGuide/test/tH5I_f90.html | 47 - fortran/doc/DevelGuide/test/tH5O_f90.html | 47 - fortran/doc/DevelGuide/test/tH5P_f90.html | 47 - fortran/doc/DevelGuide/test/tH5R_f90.html | 51 - fortran/doc/DevelGuide/test/tH5S_f90.html | 54 - fortran/doc/DevelGuide/test/tH5Sselect_f90.html | 56 - fortran/doc/DevelGuide/test/tH5T_f90.html | 47 - fortran/doc/DevelGuide/test/tH5VL_f90.html | 47 - fortran/doc/DevelGuide/test/tH5Z_f90.html | 47 - fortran/doc/DevelGuide/test/t_c.html | 44 - fortran/doc/DevelGuide/test/tf_f90.html | 48 - fortran/doc/DevelGuide/toc_index.html | 552 --- 84 files changed, 21422 deletions(-) delete mode 100644 fortran/doc/DevelGuide/masterindex.html delete mode 100644 fortran/doc/DevelGuide/robo_functions.html delete mode 100644 fortran/doc/DevelGuide/robo_modules.html delete mode 100644 fortran/doc/DevelGuide/robo_programs.html delete mode 100644 fortran/doc/DevelGuide/robo_sourcefiles.html delete mode 100644 fortran/doc/DevelGuide/robo_subroutines.html delete mode 100644 fortran/doc/DevelGuide/robodoc.css delete mode 100644 fortran/doc/DevelGuide/src/H5Af_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Df_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Ef_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Eff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5FDmpiof_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5FDmpioff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Ff_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Fff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Gf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Gff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5If_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Iff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Of_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Off_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Sf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Sff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Tf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Tff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Zf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Zff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_f_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5f90global_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5f90kit_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5match_types_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5test_kind_f90.html delete mode 100644 fortran/doc/DevelGuide/src/HDF5_f90.html delete mode 100644 fortran/doc/DevelGuide/src/HDF5mpio_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fflush1_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fflush2_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tF2003_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5A_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5A_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5D_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5E_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5F_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5G_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5G_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5I_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5O_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5P_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5R_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5S_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5Sselect_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5T_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5VL_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5Z_f90.html delete mode 100644 fortran/doc/DevelGuide/test/t_c.html delete mode 100644 fortran/doc/DevelGuide/test/tf_f90.html delete mode 100644 fortran/doc/DevelGuide/toc_index.html diff --git a/MANIFEST b/MANIFEST index 0bd9aef..58a9137 100644 --- a/MANIFEST +++ b/MANIFEST @@ -162,89 +162,6 @@ ./fortran/Makefile.in ./fortran/robodoc.rc -./fortran/doc/DevelGuide/toc_index.html -./fortran/doc/DevelGuide/masterindex.html -./fortran/doc/DevelGuide/robo_subroutines.html -./fortran/doc/DevelGuide/robo_sourcefiles.html -./fortran/doc/DevelGuide/robo_functions.html -./fortran/doc/DevelGuide/robo_modules.html -./fortran/doc/DevelGuide/robo_programs.html -./fortran/doc/DevelGuide/robodoc.css -./fortran/doc/DevelGuide/test/fortranlib_test_f90.html -./fortran/doc/DevelGuide/test/tH5A_f90.html -./fortran/doc/DevelGuide/test/tH5VL_f90.html -./fortran/doc/DevelGuide/test/tH5D_f90.html -./fortran/doc/DevelGuide/test/tH5E_f90.html -./fortran/doc/DevelGuide/test/tH5F_f90.html -./fortran/doc/DevelGuide/test/tH5G_f90.html -./fortran/doc/DevelGuide/test/fflush1_f90.html -./fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html -./fortran/doc/DevelGuide/test/tH5A_1_8_f90.html -./fortran/doc/DevelGuide/test/tf_f90.html -./fortran/doc/DevelGuide/test/fflush2_f90.html -./fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html -./fortran/doc/DevelGuide/test/tH5I_f90.html -./fortran/doc/DevelGuide/test/tH5G_1_8_f90.html -./fortran/doc/DevelGuide/test/tF2003_f90.html -./fortran/doc/DevelGuide/test/tH5O_f90.html -./fortran/doc/DevelGuide/test/tH5P_f90.html -./fortran/doc/DevelGuide/test/tH5R_f90.html -./fortran/doc/DevelGuide/test/tH5S_f90.html -./fortran/doc/DevelGuide/test/tH5Sselect_f90.html -./fortran/doc/DevelGuide/test/tH5T_f90.html -./fortran/doc/DevelGuide/test/t_c.html -./fortran/doc/DevelGuide/test/tH5Z_f90.html -./fortran/doc/DevelGuide/src/H5Fff_f90.html -./fortran/doc/DevelGuide/src/H5Zf_c.html -./fortran/doc/DevelGuide/src/H5Pff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Aff_F03_f90.html -./fortran/doc/DevelGuide/src/H5match_types_c.html -./fortran/doc/DevelGuide/src/H5Rff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Lff_f90.html -./fortran/doc/DevelGuide/src/H5FDmpiof_c.html -./fortran/doc/DevelGuide/src/H5_f_c.html -./fortran/doc/DevelGuide/src/H5Pff_f90.html -./fortran/doc/DevelGuide/src/H5Rff_f90.html -./fortran/doc/DevelGuide/src/H5Tff_f90.html -./fortran/doc/DevelGuide/src/H5test_kind_f90.html -./fortran/doc/DevelGuide/src/H5Aff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Zff_f90.html -./fortran/doc/DevelGuide/src/HDF5_f90.html -./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html -./fortran/doc/DevelGuide/src/H5f90kit_c.html -./fortran/doc/DevelGuide/src/H5Aff_f90.html -./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html -./fortran/doc/DevelGuide/src/H5Eff_f90.html -./fortran/doc/DevelGuide/src/H5_ff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Gff_f90.html -./fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html -./fortran/doc/DevelGuide/src/H5Iff_f90.html -./fortran/doc/DevelGuide/src/H5Dff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Af_c.html -./fortran/doc/DevelGuide/src/H5Off_f90.html -./fortran/doc/DevelGuide/src/H5Df_c.html -./fortran/doc/DevelGuide/src/H5Sff_f90.html -./fortran/doc/DevelGuide/src/H5Ef_c.html -./fortran/doc/DevelGuide/src/HDF5mpio_f90.html -./fortran/doc/DevelGuide/src/H5Lff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Ff_c.html -./fortran/doc/DevelGuide/src/H5f90global_f90.html -./fortran/doc/DevelGuide/src/H5Gf_c.html -./fortran/doc/DevelGuide/src/H5If_c.html -./fortran/doc/DevelGuide/src/H5Pff_F03_f90.html -./fortran/doc/DevelGuide/src/H5_ff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Rff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Lf_c.html -./fortran/doc/DevelGuide/src/H5Of_c.html -./fortran/doc/DevelGuide/src/H5Dff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Pf_c.html -./fortran/doc/DevelGuide/src/H5FDmpioff_f90.html -./fortran/doc/DevelGuide/src/H5_ff_f90.html -./fortran/doc/DevelGuide/src/H5Rf_c.html -./fortran/doc/DevelGuide/src/H5Sf_c.html -./fortran/doc/DevelGuide/src/H5Tf_c.html -./fortran/doc/DevelGuide/src/H5Dff_f90.html -./fortran/doc/DevelGuide/src/H5Lff_F90_f90.html ./fortran/examples/Makefile.am ./fortran/examples/Makefile.in diff --git a/fortran/doc/DevelGuide/masterindex.html b/fortran/doc/DevelGuide/masterindex.html deleted file mode 100644 index 9765ea0..0000000 --- a/fortran/doc/DevelGuide/masterindex.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - - -Index - - - - -
-
- -
-

Index

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

- h5pget_double - h5pget_hyper_vector_size_f - h5pset_family_offset_f - h5pset_fapl_family_f - h5pset_meta_block_size_f -

F

fflush1.f90 -fflush2.f90 -fortran/test/fflush1.f90 -fortran/test/fflush2.f90 -fortran/test/fortranlib_test.f90 -fortran/test/fortranlib_test_1_8.f90 -fortran/test/fortranlib_test_F03.f90 -fortran/test/tc.c -fortran/test/tf.f90 -fortran/test/tH5A.f90 -fortran/test/tH5A_1_8.f90 -fortran/test/tH5D.f90 -fortran/test/tH5E.f90 -fortran/test/tH5E_F03.f90 -fortran/test/tH5F.f90 -fortran/test/tH5G.f90 -fortran/test/tH5G_1_8.f90 -fortran/test/tH5I.f90 -fortran/test/tH5L_F03.f90 -fortran/test/tH5O.f90 -fortran/test/tH5P.f90 -fortran/test/tH5P_F03.f90 -fortran/test/tH5R.f90 -fortran/test/tH5S.f90 -fortran/test/tH5Sselect.f90 -fortran/test/tH5T.f90 -fortran/test/tH5T_F03.f90 -fortran/test/tH5VL.f90 -fortran/test/tH5Z.f90 -fortranlib_test.f90 -fortranlib_test_1_8.f90 -fortranlib_test_F03.f90 -

H

H5_DBLE_InterfaceExclude.f90 -H5_DBLE_InterfaceInclude.f90 -H5_ff.f90 -H5_ff_F03.f90 -H5_ff_F90.f90 -H5A -H5A (F03) -H5A (F90) -h5aclose_f -h5acreate_by_name_f -h5acreate_f -h5adelete_by_idx_f -h5adelete_by_name_f -h5adelete_f -H5Aexists_by_name_f -H5Aexists_f -H5Af -H5Af.c -H5Aff.f90 -H5Aff_F03.f90 -H5Aff_F90.f90 -h5aget_create_plist_f -h5aget_info_by_idx_f -h5aget_info_by_name_f -h5aget_info_f -h5aget_name_by_idx_f -h5aget_name_f -h5aget_num_attrs_f -h5aget_space_f -h5aget_storage_size_f -h5aget_type_f -h5aopen_by_idx_f -H5Aopen_by_name_f -h5aopen_f -h5aopen_idx_f -h5aopen_name_f -h5aread_f -h5arename_by_name_f -h5arename_f -h5check_version_f -h5close_f -H5D -H5D (F03) -H5D (F90) -h5dclose_f -h5dcreate_anon_f -h5dcreate_f -H5Df -H5Df.c -H5Dff.f90 -H5Dff_F03.f90 -H5Dff_F90.f90 -h5dget_access_plist_f -h5dget_create_plist_f -h5dget_space_f -h5dget_space_status_f -h5dget_storage_size_f -h5dget_type_f -h5dont_atexit_f -h5dopen_f -h5dread_f -h5dset_extent -h5dvlen_get_max_len_f -h5dvlen_reclaim -H5E -H5E (F03) -H5E (F90) -h5eclear_f -H5Ef -H5Ef.c -H5Eff.f90 -H5Eff_F03.f90 -H5Eff_F90.f90 -h5eget_auto_f -h5eget_major_f -h5eget_minor_f -h5eprint_f -h5eset_auto2_f -h5eset_auto_f -H5F -H5f90global.f90 -H5f90kit -H5f90kit.c -h5fclose_f -h5fcreate_f -H5FDMPIO -H5FDmpiof -H5FDmpiof.c -H5FDmpioff.f90 -H5Ff -H5Ff.c -H5Fff.f90 -h5fflush_f -h5fget_access_plist_f -h5fget_create_plist_f -h5fget_filesize_f -h5fget_freespace_f -h5fget_name_f -h5fget_obj_count_f -h5fget_obj_ids_f -h5fis_hdf5_f -h5fmount_f -h5fopen_f -h5freopen_f -h5funmount_f -H5G -h5garbage_collect_f -h5gclose_f -H5Gcreate_anon_f -h5gcreate_f -h5get_libversion_f -H5Gf -H5Gf.c -H5Gff.f90 -h5gget_comment_f -H5Gget_create_plist_f -h5gget_info_by_idx_f -h5gget_info_by_name_f -h5gget_info_f -h5gget_linkval_f -h5gget_obj_info_idx_f -h5glink2_f -h5glink_f -H5GLOBAL -h5gmove2_f -h5gmove_f -h5gn_members_f -h5gopen_f -h5gset_comment_f -h5gunlink_f -H5I -h5idec_ref_f -H5If -H5If.c -H5Iff.f90 -h5iget_file_id_f -h5iget_name_f -h5iget_ref_f -h5iget_type_f -h5iinc_ref_f -h5iis_valid_f -h5kind_to_type -H5L -H5L (F03) -H5L (F90) -h5lcopy_f -H5Lcreate_external_f -H5Lcreate_hard_f -H5Lcreate_soft_f -h5ldelete_by_idx_f -h5ldelete_f -H5Lexists_f -H5Lf -H5Lf.c -H5Lff.f90 -H5Lff_F03.f90 -H5Lff_F90.f90 -h5lget_info_by_idx_f -h5lget_info_f -h5lget_name_by_idx_f -H5LIB -H5LIB_PROVISIONAL -H5LIB_PROVISIONAL (F90) -h5lis_registered_f -h5literate_by_name_f -h5literate_f -h5lmove_f -H5match_types -H5match_types.c -H5O -H5O (F03) -H5O (F90) -h5oclose_f -H5Of -H5Of.c -H5Off.f90 -H5Off_F03.f90 -H5Off_F90.f90 -h5offsetof -h5olink_f -h5oopen_f -h5open_by_addr_f -h5open_f -h5ovisit_f -H5P (_F90) -H5P (F03) -H5P (F90) -h5pall_filters_avail_f -h5pclose_class_f -h5pclose_f -h5pcopy_f -h5pcopy_prop_f -h5pcreate_class_f -h5pcreate_class_f -h5pcreate_f -h5pequal_f -h5pexist_f -H5Pf -H5Pf.c -H5Pff.f90 -H5Pff_F03.f90 -H5Pff_F90.f90 -h5pfill_value_defined_f -h5pget_alignment_f -h5pget_alloc_time_f -H5Pget_attr_creation_order_f -H5Pget_attr_phase_change_f -h5pget_btree_ratios_f -h5pget_buffer_f -h5pget_cache_f -h5pget_char -h5pget_char -H5Pget_char_encoding_f -H5Pget_chunk_cache_f -h5pget_chunk_f -h5pget_class_f -h5pget_class_name_f -h5pget_class_parent_f -h5pget_copy_object_f -H5Pget_create_inter_group_f -h5pget_data_transform_f -h5pget_double -h5pget_driver_f -h5pget_dxpl_mpio_f -h5pget_edc_check_f -H5Pget_est_link_info_f -h5pget_external_count_f -h5pget_external_f -h5pget_fapl_core_f -h5pget_fapl_direct_f -h5pget_fapl_family_f -h5pget_fapl_mpio_f -h5pget_fapl_mpiposix_f -h5pget_fapl_multi_f -h5pget_fclose_degree_f -h5pget_fill_time_f -h5pget_filter_by_id_f -h5pget_filter_f -h5pget_gc_references_f -h5pget_integer -h5pget_integer -h5pget_istore_k_f -h5pget_layout_f -H5Pget_link_creation_order_f -H5Pget_link_phase_change_f -H5Pget_local_heap_size_hint_f -h5pget_meta_block_size_f -h5pget_nfilters_f -h5pget_nlinks_f -h5pget_npros_f -H5Pget_obj_track_times_f -h5pget_preserve_f -h5pget_real -h5pget_real -h5pget_sec2_f -h5pget_sieve_buf_size_f -h5pget_size_f -h5pget_sizes_f -h5pget_small_data_block_size_f -h5pget_split_f -h5pget_stdio_f -h5pget_sym_k_f -h5pget_userblock_f -h5pget_version_f -h5pinsert_char -h5pinsert_char -h5pinsert_double -h5pinsert_double -h5pinsert_integer -h5pinsert_integer -h5pinsert_ptr -h5pinsert_real -h5pinsert_real -h5pisa_class_f -h5pmodify_filter_f -h5pregister_char -h5pregister_char -h5pregister_double -h5pregister_double -h5pregister_integer -h5pregister_integer -h5pregister_ptr -h5pregister_real -h5pregister_real -h5premove_f -h5premove_filter_f -h5pset(get)fill_value_f -h5pset(get)fill_value_f -h5pset_alignment_f -h5pset_alloc_time_f -H5Pset_attr_creation_order_f -H5Pset_attr_phase_change_f -h5pset_btree_ratios_f -h5pset_buffer_f -h5pset_cache_f -h5pset_char -h5pset_char -H5Pset_char_encoding_f -H5Pset_chunk_cache_f -h5pset_chunk_f -h5pset_copy_object_f -H5Pset_create_inter_group_f -h5pset_data_transform_f -h5pset_deflate_f -h5pset_double -h5pset_double -h5pset_dxpl_mpio_f -h5pset_edc_check_f -h5pset_est_link_info_f -h5pset_external_f -h5pset_fapl_core_f -h5pset_fapl_direct_f -h5pset_fapl_mpio_f -h5pset_fapl_mpiposix_f -h5pset_fapl_multi_l -h5pset_fapl_multi_s -h5pset_fapl_sec2_f -h5pset_fapl_split_f -h5pset_fapl_stdio_f -h5pset_fclose_degree_f -h5pset_fill_time_f -h5pset_filter_f -h5pset_fletcher32_f -h5pset_gc_references_f -h5pset_hyper_vector_size_f -h5pset_integer -h5pset_integer -h5pset_istore_k_f -h5pset_layout_f -H5Pset_libver_bounds_f -H5Pset_link_creation_order_f -h5pset_link_phase_change_f -H5Pset_local_heap_size_hint_f -H5Pset_nbit_f -h5pset_nlinks_f -H5Pset_obj_track_times_f -h5pset_preserve_f -h5pset_real -h5pset_real -h5pset_scaleoffset_f -H5Pset_shared_mesg_index_f -H5Pset_shared_mesg_nindexes_f -h5pset_shuffle_f -h5pset_sieve_buf_size_f -h5pset_sizes_f -h5pset_small_data_block_size_f -h5pset_sym_k_f -h5pset_szip_f -h5pset_userblock_f -h5punregister_f -H5R -H5R (F03) -H5R (F90) -h5rcreate_object_f -h5rcreate_object_f -h5rcreate_ptr_f -h5rcreate_region_f -h5rcreate_region_f -h5rdereference_object_f -h5rdereference_object_f -h5rdereference_ptr_f -h5rdereference_region_f -h5rdereference_region_f -H5Rf -H5Rf.c -H5Rff.f90 -H5Rff_F03.f90 -H5Rff_F90.f90 -h5rget_name_object_f -h5rget_name_object_f -h5rget_name_ptr_f -h5rget_name_region_f -h5rget_name_region_f -h5rget_obj_type_f -h5rget_object_type_obj_f -h5rget_region_region_f -H5S -h5sclose_f -h5scopy_f -h5screate_f -h5screate_simple_f -H5Sdecode_f -H5Sencode_f -h5sextent_copy_f -h5sextent_equal_f -H5Sf -H5Sf.c -H5Sff.f90 -h5sget_select_bounds_f -h5sget_select_elem_npoints_f -h5sget_select_elem_pointlist_f -h5sget_select_hyper_blocklist_f -h5sget_select_hyper_nblocks_f -h5sget_select_npoints_f -h5sget_select_type_f -h5sget_simple_extent_dims_f -h5sget_simple_extent_ndims_f -h5sget_simple_extent_npoints_f -h5sget_simple_extent_type_f -h5sis_simple_f -h5soffset_simple_f -h5sselect_all_f -h5sselect_elements_f -h5sselect_hyperslab_f -h5sselect_none_f -h5sselect_valid_f -h5sset_extent_none_f -h5sset_extent_simple_f -H5T -H5T (F03) -H5T (F90) -h5tarray_create_f -h5tclose_f -h5tcommit_anon_f -h5tcommit_f -h5tcommitted_f -h5tcompiler_conv_f -H5Tconvert_f -h5tcopy_f -h5tcreate_f -H5Tdecode_f -h5tenaum_insert_f -H5Tencode_f -h5tenum_create_f -h5tenum_nameof_f -h5tenum_valuof_f -h5tequal_f -H5test_kind -H5test_kind.f90 -H5test_kind_SIZEOF -H5test_kind_SIZEOF.f90 -H5Tf -H5Tf.c -H5Tff.f90 -H5Tff_F03.f90 -H5Tff_F90.f90 -h5tget_array_dims_f -h5tget_array_ndims_f -h5tget_class_f -h5tget_create_plist_f -h5tget_cset_f -h5tget_ebias_f -h5tget_fields_f -h5tget_inpad_f -h5tget_member_class_f -h5tget_member_index_f -h5tget_member_name_f -h5tget_member_offset_f -h5tget_member_type_f -h5tget_member_value_f -h5tget_native_type_f -h5tget_nmembers_f -h5tget_norm_f -h5tget_offset_f -h5tget_order_f -h5tget_pad_f -h5tget_precision_f -h5tget_sign_f -h5tget_size_f -h5tget_strpad_f -h5tget_super_f -h5tget_tag_f -h5tinsert_f -h5tis_variable_str_f -h5topen_f -h5tpack_f -h5tset_cset_f -h5tset_ebias_f -h5tset_fields_f -h5tset_inpad_f -h5tset_norm_f -h5tset_offset_f -h5tset_order_f -h5tset_pad_f -h5tset_precision_f -h5tset_sign_f -h5tset_size_f -h5tset_strpad_f -h5tset_tag_f -h5tvlen_create_f -H5Z -H5Zf -H5Zf.c -H5Zff.f90 -h5zfilter_avail_f -h5zget_filter_info_f -h5zunregister_f -HDF5 -HDF5 (mpio) -HDF5.f90 -HDF5mpio.f90 -

S

src/H5_DBLE_InterfaceExclude.f90 -src/H5_DBLE_InterfaceInclude.f90 -

T

t.c -tf.f90 -tH5A.f90 -tH5A_1_8.f90 -tH5D.f90 -tH5E.f90 -tH5E_F03.f90 -tH5F.f90 -tH5G.f90 -tH5G_1_8.f90 -tH5I.f90 -tH5L_F03.f90 -tH5O.f90 -tH5P.f90 -tH5P_F03.f90 -tH5R.f90 -tH5S.f90 -tH5Sselect.f90 -tH5T.f90 -tH5T_F03.f90 -tH5VL.f90 -tH5Z.f90 -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_functions.html b/fortran/doc/DevelGuide/robo_functions.html deleted file mode 100644 index e4f253a..0000000 --- a/fortran/doc/DevelGuide/robo_functions.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -Functions - - - - -
-
- -
-

Functions

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-

H

h5kind_to_type -h5offsetof -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_modules.html b/fortran/doc/DevelGuide/robo_modules.html deleted file mode 100644 index 8e57f38..0000000 --- a/fortran/doc/DevelGuide/robo_modules.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -Modules - - - - -
-
- - - - - diff --git a/fortran/doc/DevelGuide/robo_programs.html b/fortran/doc/DevelGuide/robo_programs.html deleted file mode 100644 index 8c35230..0000000 --- a/fortran/doc/DevelGuide/robo_programs.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -Programs - - - - -
-
- -
-

Programs

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-

H

H5test_kind -H5test_kind_SIZEOF -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_sourcefiles.html b/fortran/doc/DevelGuide/robo_sourcefiles.html deleted file mode 100644 index 63a8637..0000000 --- a/fortran/doc/DevelGuide/robo_sourcefiles.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - -Sourcefiles - - - - -
-
- - - - - diff --git a/fortran/doc/DevelGuide/robo_subroutines.html b/fortran/doc/DevelGuide/robo_subroutines.html deleted file mode 100644 index 0846c77..0000000 --- a/fortran/doc/DevelGuide/robo_subroutines.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - -Subroutines - - - - -
-
- -
-

Subroutines

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

- h5pget_double - h5pget_hyper_vector_size_f - h5pset_family_offset_f - h5pset_fapl_family_f - h5pset_meta_block_size_f -

H

h5aclose_f -h5acreate_by_name_f -h5acreate_f -h5adelete_by_idx_f -h5adelete_by_name_f -h5adelete_f -H5Aexists_by_name_f -H5Aexists_f -h5aget_create_plist_f -h5aget_info_by_idx_f -h5aget_info_by_name_f -h5aget_info_f -h5aget_name_by_idx_f -h5aget_name_f -h5aget_num_attrs_f -h5aget_space_f -h5aget_storage_size_f -h5aget_type_f -h5aopen_by_idx_f -H5Aopen_by_name_f -h5aopen_f -h5aopen_idx_f -h5aopen_name_f -h5aread_f -h5arename_by_name_f -h5arename_f -h5check_version_f -h5close_f -h5dclose_f -h5dcreate_anon_f -h5dcreate_f -h5dget_access_plist_f -h5dget_create_plist_f -h5dget_space_f -h5dget_space_status_f -h5dget_storage_size_f -h5dget_type_f -h5dont_atexit_f -h5dopen_f -h5dread_f -h5dset_extent -h5dvlen_get_max_len_f -h5dvlen_reclaim -h5eclear_f -h5eget_auto_f -h5eget_major_f -h5eget_minor_f -h5eprint_f -h5eset_auto2_f -h5eset_auto_f -h5fclose_f -h5fcreate_f -h5fflush_f -h5fget_access_plist_f -h5fget_create_plist_f -h5fget_filesize_f -h5fget_freespace_f -h5fget_name_f -h5fget_obj_count_f -h5fget_obj_ids_f -h5fis_hdf5_f -h5fmount_f -h5fopen_f -h5freopen_f -h5funmount_f -h5garbage_collect_f -h5gclose_f -H5Gcreate_anon_f -h5gcreate_f -h5get_libversion_f -h5gget_comment_f -H5Gget_create_plist_f -h5gget_info_by_idx_f -h5gget_info_by_name_f -h5gget_info_f -h5gget_linkval_f -h5gget_obj_info_idx_f -h5glink2_f -h5glink_f -h5gmove2_f -h5gmove_f -h5gn_members_f -h5gopen_f -h5gset_comment_f -h5gunlink_f -h5idec_ref_f -h5iget_file_id_f -h5iget_name_f -h5iget_ref_f -h5iget_type_f -h5iinc_ref_f -h5iis_valid_f -h5lcopy_f -H5Lcreate_external_f -H5Lcreate_hard_f -H5Lcreate_soft_f -h5ldelete_by_idx_f -h5ldelete_f -H5Lexists_f -h5lget_info_by_idx_f -h5lget_info_f -h5lget_name_by_idx_f -h5lis_registered_f -h5literate_by_name_f -h5literate_f -h5lmove_f -h5oclose_f -h5olink_f -h5oopen_f -h5open_by_addr_f -h5open_f -h5ovisit_f -h5pall_filters_avail_f -h5pclose_class_f -h5pclose_f -h5pcopy_f -h5pcopy_prop_f -h5pcreate_class_f -h5pcreate_class_f -h5pcreate_f -h5pequal_f -h5pexist_f -h5pfill_value_defined_f -h5pget_alignment_f -h5pget_alloc_time_f -H5Pget_attr_creation_order_f -H5Pget_attr_phase_change_f -h5pget_btree_ratios_f -h5pget_buffer_f -h5pget_cache_f -h5pget_char -h5pget_char -H5Pget_char_encoding_f -H5Pget_chunk_cache_f -h5pget_chunk_f -h5pget_class_f -h5pget_class_name_f -h5pget_class_parent_f -h5pget_copy_object_f -H5Pget_create_inter_group_f -h5pget_data_transform_f -h5pget_double -h5pget_driver_f -h5pget_dxpl_mpio_f -h5pget_edc_check_f -H5Pget_est_link_info_f -h5pget_external_count_f -h5pget_external_f -h5pget_fapl_core_f -h5pget_fapl_direct_f -h5pget_fapl_family_f -h5pget_fapl_mpio_f -h5pget_fapl_mpiposix_f -h5pget_fapl_multi_f -h5pget_fclose_degree_f -h5pget_fill_time_f -h5pget_filter_by_id_f -h5pget_filter_f -h5pget_gc_references_f -h5pget_integer -h5pget_integer -h5pget_istore_k_f -h5pget_layout_f -H5Pget_link_creation_order_f -H5Pget_link_phase_change_f -H5Pget_local_heap_size_hint_f -h5pget_meta_block_size_f -h5pget_nfilters_f -h5pget_nlinks_f -h5pget_npros_f -H5Pget_obj_track_times_f -h5pget_preserve_f -h5pget_real -h5pget_real -h5pget_sec2_f -h5pget_sieve_buf_size_f -h5pget_size_f -h5pget_sizes_f -h5pget_small_data_block_size_f -h5pget_split_f -h5pget_stdio_f -h5pget_sym_k_f -h5pget_userblock_f -h5pget_version_f -h5pinsert_char -h5pinsert_char -h5pinsert_double -h5pinsert_double -h5pinsert_integer -h5pinsert_integer -h5pinsert_ptr -h5pinsert_real -h5pinsert_real -h5pisa_class_f -h5pmodify_filter_f -h5pregister_char -h5pregister_char -h5pregister_double -h5pregister_double -h5pregister_integer -h5pregister_integer -h5pregister_ptr -h5pregister_real -h5pregister_real -h5premove_f -h5premove_filter_f -h5pset(get)fill_value_f -h5pset(get)fill_value_f -h5pset_alignment_f -h5pset_alloc_time_f -H5Pset_attr_creation_order_f -H5Pset_attr_phase_change_f -h5pset_btree_ratios_f -h5pset_buffer_f -h5pset_cache_f -h5pset_char -h5pset_char -H5Pset_char_encoding_f -H5Pset_chunk_cache_f -h5pset_chunk_f -h5pset_copy_object_f -H5Pset_create_inter_group_f -h5pset_data_transform_f -h5pset_deflate_f -h5pset_double -h5pset_double -h5pset_dxpl_mpio_f -h5pset_edc_check_f -h5pset_est_link_info_f -h5pset_external_f -h5pset_fapl_core_f -h5pset_fapl_direct_f -h5pset_fapl_mpio_f -h5pset_fapl_mpiposix_f -h5pset_fapl_multi_l -h5pset_fapl_multi_s -h5pset_fapl_sec2_f -h5pset_fapl_split_f -h5pset_fapl_stdio_f -h5pset_fclose_degree_f -h5pset_fill_time_f -h5pset_filter_f -h5pset_fletcher32_f -h5pset_gc_references_f -h5pset_hyper_vector_size_f -h5pset_integer -h5pset_integer -h5pset_istore_k_f -h5pset_layout_f -H5Pset_libver_bounds_f -H5Pset_link_creation_order_f -h5pset_link_phase_change_f -H5Pset_local_heap_size_hint_f -H5Pset_nbit_f -h5pset_nlinks_f -H5Pset_obj_track_times_f -h5pset_preserve_f -h5pset_real -h5pset_real -h5pset_scaleoffset_f -H5Pset_shared_mesg_index_f -H5Pset_shared_mesg_nindexes_f -h5pset_shuffle_f -h5pset_sieve_buf_size_f -h5pset_sizes_f -h5pset_small_data_block_size_f -h5pset_sym_k_f -h5pset_szip_f -h5pset_userblock_f -h5punregister_f -h5rcreate_object_f -h5rcreate_object_f -h5rcreate_ptr_f -h5rcreate_region_f -h5rcreate_region_f -h5rdereference_object_f -h5rdereference_object_f -h5rdereference_ptr_f -h5rdereference_region_f -h5rdereference_region_f -h5rget_name_object_f -h5rget_name_object_f -h5rget_name_ptr_f -h5rget_name_region_f -h5rget_name_region_f -h5rget_obj_type_f -h5rget_object_type_obj_f -h5rget_region_region_f -h5sclose_f -h5scopy_f -h5screate_f -h5screate_simple_f -H5Sdecode_f -H5Sencode_f -h5sextent_copy_f -h5sextent_equal_f -h5sget_select_bounds_f -h5sget_select_elem_npoints_f -h5sget_select_elem_pointlist_f -h5sget_select_hyper_blocklist_f -h5sget_select_hyper_nblocks_f -h5sget_select_npoints_f -h5sget_select_type_f -h5sget_simple_extent_dims_f -h5sget_simple_extent_ndims_f -h5sget_simple_extent_npoints_f -h5sget_simple_extent_type_f -h5sis_simple_f -h5soffset_simple_f -h5sselect_all_f -h5sselect_elements_f -h5sselect_hyperslab_f -h5sselect_none_f -h5sselect_valid_f -h5sset_extent_none_f -h5sset_extent_simple_f -h5tarray_create_f -h5tclose_f -h5tcommit_anon_f -h5tcommit_f -h5tcommitted_f -h5tcompiler_conv_f -H5Tconvert_f -h5tcopy_f -h5tcreate_f -H5Tdecode_f -h5tenaum_insert_f -H5Tencode_f -h5tenum_create_f -h5tenum_nameof_f -h5tenum_valuof_f -h5tequal_f -h5tget_array_dims_f -h5tget_array_ndims_f -h5tget_class_f -h5tget_create_plist_f -h5tget_cset_f -h5tget_ebias_f -h5tget_fields_f -h5tget_inpad_f -h5tget_member_class_f -h5tget_member_index_f -h5tget_member_name_f -h5tget_member_offset_f -h5tget_member_type_f -h5tget_member_value_f -h5tget_native_type_f -h5tget_nmembers_f -h5tget_norm_f -h5tget_offset_f -h5tget_order_f -h5tget_pad_f -h5tget_precision_f -h5tget_sign_f -h5tget_size_f -h5tget_strpad_f -h5tget_super_f -h5tget_tag_f -h5tinsert_f -h5tis_variable_str_f -h5topen_f -h5tpack_f -h5tset_cset_f -h5tset_ebias_f -h5tset_fields_f -h5tset_inpad_f -h5tset_norm_f -h5tset_offset_f -h5tset_order_f -h5tset_pad_f -h5tset_precision_f -h5tset_sign_f -h5tset_size_f -h5tset_strpad_f -h5tset_tag_f -h5tvlen_create_f -h5zfilter_avail_f -h5zget_filter_info_f -h5zunregister_f -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robodoc.css b/fortran/doc/DevelGuide/robodoc.css deleted file mode 100644 index 207a172..0000000 --- a/fortran/doc/DevelGuide/robodoc.css +++ /dev/null @@ -1,302 +0,0 @@ -/****h* ROBODoc/ROBODoc Cascading Style Sheet - * FUNCTION - * This is the default cascading style sheet for documentation - * generated with ROBODoc. - * You can edit this file to your own liking and then use - * it with the option - * --css - * - * This style-sheet defines the following layout - * +----------------------------------------+ - * | logo | - * +----------------------------------------+ - * | extra | - * +----------------------------------------+ - * | | navi- | - * | | gation | - * | content | | - * | | | - * +----------------------------------------+ - * | footer | - * +----------------------------------------+ - * - * This style-sheet is based on a style-sheet that was automatically - * generated with the Strange Banana stylesheet generator. - * See http://www.strangebanana.com/generator.aspx - * - ****** - * $Id: html_generator.c,v 1.94 2008/06/17 11:49:27 gumpu Exp $ - */ - -body -{ - background-color: rgb(255,255,255); - color: rgb(98,84,55); - font-family: Arial, serif; - border-color: rgb(226,199,143); -} - -pre -{ - font-family: monospace; - margin: 15px; - padding: 5px; - white-space: pre; - color: #000; -} - -pre.source -{ - background-color: #ffe; - border: dashed #aa9 1px; -} - -p -{ - margin:15px; -} - -p.item_name -{ - font-weight: bolder; - margin:5px; - font-size: 120%; -} - -#content -{ - font-size: 100%; - color: rgb(0,0,0); - background-color: rgb(255,255,255); - border-left-width: 0px; - border-right-width: 0px; - border-top-width: 0px; - border-bottom-width: 0px; - border-left-style: none; - border-right-style: none; - border-top-style: none; - border-bottom-style: none; - padding: 40px 31px 14px 17px; - border-color: rgb(0,0,0); - text-align: justify; -} - -#navigation -{ - background-color: rgb(98,84,55); - color: rgb(230,221,202); - font-family: "Times New Roman", serif; - font-style: normal; - border-color: rgb(0,0,0); -} - -a.menuitem -{ - font-size: 120%; - background-color: rgb(0,0,0); - color: rgb(195,165,100); - font-variant: normal; - text-transform: none; - font-weight: normal; - padding: 1px 8px 3px 1px; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; - border-color: rgb(159,126,57); - text-align: right; -} - -#logo, #logo a -{ - font-size: 130%; - background-color: rgb(198,178,135); - color: rgb(98,84,55); - font-family: Georgia, serif; - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: bold; - padding: 20px 18px 20px 18px; - border-color: rgb(255,255,255); - text-align: right; -} - -#extra, #extra a -{ - font-size: 128%; - background-color: rgb(0,0,0); - color: rgb(230,221,202); - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: normal; - border-left-width: 0px; - border-right-width: 0px; - border-top-width: 0px; - border-bottom-width: 0px; - border-left-style: none; - border-right-style: none; - border-top-style: none; - border-bottom-style: none; - padding: 12px 12px 12px 12px; - border-color: rgb(195,165,100); - text-align: center; -} - -#content a -{ - color: rgb(159,126,57); - text-decoration: none; -} - -#content a:hover, #content a:active -{ - color: rgb(255,255,255); - background-color: rgb(159,126,57); -} - -a.indexitem -{ - display: block; -} - -h1, h2, h3, h4, h5, h6 -{ - background-color: rgb(221,221,221); - font-family: Arial, serif; - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: normal; -} - -h1 -{ - font-size: 151%; -} - -h2 -{ - font-size: 142%; -} - -h3 -{ - font-size: 133%; -} - -h4 -{ - font-size: 124%; -} - -h5 -{ - font-size: 115%; -} - -h6 -{ - font-size: 106%; -} - -#navigation a -{ - text-decoration: none; -} - -.menuitem:hover -{ - background-color: rgb(195,165,100); - color: rgb(0,0,0); -} - -#extra a -{ - text-decoration: none; -} - -#logo a -{ - text-decoration: none; -} - -#extra a:hover -{ -} - -/* layout */ -#navigation -{ - width: 22%; - position: relative; - top: 0; - right: 0; - float: right; - text-align: center; - margin-left: 10px; -} - -.menuitem {width: auto;} -#content {width: auto;} -.menuitem {display: block;} - - -div#footer -{ - background-color: rgb(198,178,135); - color: rgb(98,84,55); - clear: left; - width: 100%; - font-size: 71%; -} - -div#footer a -{ - background-color: rgb(198,178,135); - color: rgb(98,84,55); -} - -div#footer p -{ - margin:0; - padding:5px 10px -} - -span.keyword -{ - color: #00F; -} - -span.comment -{ - color: #080; -} - -span.quote -{ - color: #F00; -} - -span.squote -{ - color: #F0F; -} - -span.sign -{ - color: #008B8B; -} - -span.line_number -{ - color: #808080; -} - -@media print -{ - #navigation {display: none;} - #content {padding: 0px;} - #content a {text-decoration: underline;} -} diff --git a/fortran/doc/DevelGuide/src/H5Af_c.html b/fortran/doc/DevelGuide/src/H5Af_c.html deleted file mode 100644 index 7fcecc1..0000000 --- a/fortran/doc/DevelGuide/src/H5Af_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Af.c - - - - - -
-
- -

H5Af

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5A Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html deleted file mode 100644 index 9e503f4..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - -./src/H5Aff_F03.f90 - - - - - -
-
- -

H5A (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5A_PROVISIONAL
-
-

FILE

-
  src/fortran/src/H5Aff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions.
-  It contains the same functions as H5Aff_F90.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled.
-
-

NOTES

-
  (A) C_LOC and character strings according to the Fortran 2003 standard:
-
-  15.1.2.5 C_LOC(X)
-
-  Argument. X shall either
-
-  (1) have interoperable type and type parameters and be
-    (a) a variable that has the TARGET attribute and is interoperable,
-    (b) an allocated allocatable variable that has the TARGET attribute
-        and is not an array of zero size, or
-    (c) an associated scalar pointer, or
-  (2) be a nonpolymorphic scalar, have no length type parameters, and be
-    (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
-    (b) an allocated allocatable variable that has the TARGET attribute, or
-    (c) an associated pointer.
-
-  - When X is a character, for interoperability the standard is:
-
-  15.2.1 Interoperability of intrinsic types
-
-  ...if the type is character, interoperability also requires that the length type parameter
-  be omitted or be specified by an initialization expression whose value is one.
-
-  THEREFORE compilers that have not extended the standard  require
-
-  CHARACTER(LEN=1), TARGET :: chr
-  or
-  CHARACTER, TARGET :: chr
-
-  (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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5aread_f

- -

[ Top ] [ H5A (F03) ] [ Subroutines ]

-

NAME

-
  h5aread_f
-
-

PURPOSE

-
  Reads an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-  memtype_id    - attribute memory type identifier
-  dims          - 1D array of size 7, stores sizes of the
-                - buf array dimensions.
-
-

OUTPUTS

-
  buf           - buffer to read attribute data in
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-  dims parameter was added to make code portable;
-  Aprile 4, 2001
-
-  Changed buf intent to INOUT to be consistant
-  with how the C functions handles it. The pg
-  compiler will return 0 if a buf value is not set.
-  February, 2008
-
-

NOTES

-
  This function is overloaded to write INTEGER,
-  REAL, DOUBLE PRECISION and CHARACTER buffers
-  up to 7 dimensions.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html deleted file mode 100644 index aa01b49..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -./src/H5Aff_F90.f90 - - - - - -
-
- -

H5A (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5A_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Aff_F90.f90
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5A functions. It contains
-  the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Aff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_f90.html b/fortran/doc/DevelGuide/src/H5Aff_f90.html deleted file mode 100644 index 268c1db..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_f90.html +++ /dev/null @@ -1,1102 +0,0 @@ - - - - - - - -./src/H5Aff.f90 - - - - - -
-
- -

H5A

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5A
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5A functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5aclose_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aclose_f
-
-

PURPOSE

-
  Closes the specified attribute.
-
-

INPUTS

-
  attr_id  - attribute identifier
-
-

OUTPUTS

-
  hdferr   - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aclose_f(attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5acreate_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5acreate_by_name_f
-
-

PURPOSE

-
  Creates an attribute attached to a specified object
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name, relative to loc_id, of object that attribute is to be attached to
-  attr_name     - Attribute name
-  type_id       - Attribute datatype identifier
-  space_id      - Attribute dataspace identifier
-
-

OUTPUTS

-
  attr          - an attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  acpl_id       - Attribute creation property list identifier (Currently not used.)
-  aapl_id       - Attribute access property list identifier (Currently not used.)
-  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, &
-       acpl_id, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T),   INTENT(IN)  :: loc_id
-    CHARACTER(LEN=*), INTENT(IN)  :: obj_name
-    CHARACTER(LEN=*), INTENT(IN)  :: attr_name
-    INTEGER(HID_T),   INTENT(IN)  :: type_id
-    INTEGER(HID_T),   INTENT(IN)  :: space_id
-    INTEGER(HID_T),   INTENT(OUT) :: attr
-    INTEGER,          INTENT(OUT) :: hdferr
-
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: acpl_id
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: aapl_id
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: lapl_id
-
- -
- -

h5acreate_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5acreate_f
-
-

PURPOSE

-
  Creates a dataset as an attribute of a group, dataset, or named datatype
-
-

INPUTS

-
  loc_id        - identifier of an object (group, dataset,
-                  or named datatype) attribute is attached to
-  name          - attribute name
-  type_id       - attribute datatype identifier
-  space_id      - attribute dataspace identifier
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  acpl_id       - Attribute creation property list identifier
-  appl_id       - Attribute access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, &
-                                 hdferr, acpl_id, aapl_id )
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Attribute name
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Attribute datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier
-    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5adelete_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_by_idx_f
-
-

PURPOSE

-
  Deletes an attribute from an object according to index order
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name of object, relative to location, from which attribute is to be removed
-  idx_type      - Type of index; Possible values are:
-                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                   H5_INDEX_NAME_F          - Index on names
-                   H5_INDEX_CRT_ORDER_F     - Index on creation order
-                   H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order in which to iterate over index; Possible values are:
-                   H5_ITER_UNKNOWN_F    - Unknown order
-                   H5_ITER_INC_F        - Increasing order
-                   H5_ITER_DEC_F        - Decreasing order
-                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
-                   H5_ITER_N_F          - Number of iteration orders
-
-  n             - Offset within index
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-                                              !    H5_ITER_N_F      - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Offset within index
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5adelete_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_by_name_f
-
-

PURPOSE

-
  Removes an attribute from a specified location
-
-

INPUTS

-
  loc_id        - Identifer for object to which attribute is attached
-  obj_name      - Name of attribute to open
-  attr_name     - Attribute access property list
-  lapl_id       - Link access property list
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
-                                              ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5adelete_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_f
-
-

PURPOSE

-
  Deletes an attribute of an object (group, dataset or
-  named datatype)
-
-

INPUTS

-
  obj_id        - object identifier
-  name          - attribute name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5adelete_f(obj_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Attribute name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Aexists_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aexists_by_name_f
-
-

PURPOSE

-
  Determines whether an attribute with a given name exists on an object
-
-

INPUTS

-
  loc_id        - Location identifier
-  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_exists   - attribute exists status
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
-                                             ! absolute from the fileâs root group, or '.'
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Aexists_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aexists_f
-
-

PURPOSE

-
  Determines whether an attribute with a given name exists on an object
-
-

INPUTS

-
  obj_id        - Object identifier
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_exists   - attribute exists status
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    LOGICAL, INTENT(OUT) :: attr_exists  ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_create_plist_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_create_plist_f
-
-

PURPOSE

-
  Gets an attribute creation property list identifier
-
-

INPUTS

-
  attr_id          - Identifier of the attribute
-
-

OUTPUTS

-
  creation_prop_id - Identifier for the attribute’s creation property
-  hdferr           - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Identifier of the attribute
-    INTEGER(HID_T), INTENT(OUT) :: creation_prop_id   ! Identifier for the attributeâs creation property
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_info_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute index position
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
- OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, &
-       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-
-    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Attributeâs position in index
-
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5aget_info_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_by_name_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute name
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  attr_name     - Attribute name
-
- OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, &
-       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size   ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5aget_info_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute identifier
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  NOTE: In C it is defined as a structure: H5A_info_t
-
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_name_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_name_by_idx_f
-
-

PURPOSE

-
  Gets an attribute name, by attribute index position.
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index; Possible values are:
-                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                   H5_INDEX_NAME_F          - Index on names
-                   H5_INDEX_CRT_ORDER_F     - Index on creation order
-                   H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order in which to iterate over index; Possible values are:
-                   H5_ITER_UNKNOWN_F    - Unknown order
-                   H5_ITER_INC_F        - Increasing order
-                   H5_ITER_DEC_F        - Decreasing order
-                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
-                   H5_ITER_N_F          - Number of iteration orders
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
-

OUTPUTS

-
  name          - Attribute name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  size          - Size, in bytes, of attribute name
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, &
-       n, name, hdferr, size, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed *TEST* check NULL
-    INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are:
-                                    !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                    !    H5_INDEX_NAME_F       - Index on names
-                                    !    H5_INDEX_CRT_ORDER_F  - Index on creation order
-                                    !    H5_INDEX_N_F         - Number of indices defined
-
-    INTEGER, INTENT(IN) :: order    ! Order in which to iterate over index; Possible values are:
-                                    !    H5_ITER_UNKNOWN_F   - Unknown order
-                                    !    H5_ITER_INC_F      - Increasing order
-                                    !    H5_ITER_DEC_F       - Decreasing order
-                                    !    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
-                                    !    H5_ITER_N_F        - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n !  Attributeâs position in index
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
-                                      ! Returns attribute name size,
-                                      ! -1 if fail
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size  ! Indicates the size, in the number of characters, 
-                                                    ! of the attribute
-
- -
- -

h5aget_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_name_f
-
-

PURPOSE

-
  Gets an attribute name.
-
-

INPUTS

-
  attr_id       - attribute identifier
-  size          - size of a buffer to read name in
-
-

OUTPUTS

-
  buf           - buffer to read name in
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size
-    CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name
-    INTEGER, INTENT(OUT) :: hdferr ! Error code:
-                                   ! name length is successful, -1 if fail
-
- -
- -

h5aget_num_attrs_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_num_attrs_f
-
-

PURPOSE

-
  Determines the number of attributes attached to an object.
-
-

INPUTS

-
  obj_id        - object (group, dataset, or named datatype)
-  identifier
-
-

OUTPUTS

-
  attr_num      - number of attributes attached to the object
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    INTEGER, INTENT(OUT) :: attr_num      ! Number of attributes of the object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5aget_space_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_space_f
-
-

PURPOSE

-
  Gets a copy of the dataspace for an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  space_id      - attribite dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id   ! Attribute identifier
-    INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5aget_storage_size_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_storage_size_f
-
-

PURPOSE

-
  Returns the amount of storage required for an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  size          - attribute storage size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Attribute storage requirement
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5aget_type_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_type_f
-
-

PURPOSE

-
  Gets an attribute datatype.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  type_id       - attribute datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5aopen_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_by_idx_f
-
-

PURPOSE

-
  Opens an existing attribute that is attached to an object specified by location and name
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list
-  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-
-    INTEGER(HSIZE_T), INTENT(IN) :: n       ! Attributeâs position in index
-
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code:
-                                            ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id  ! Attribute access property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

H5Aopen_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aopen_by_name_f
-
-

PURPOSE

-
  Opens an attribute for an object by object name and attribute name.
-
-

INPUTS

-
  loc_id        - Location from which to find object to which attribute is attached
-  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
-  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
-                                             ! absolute from the fileâs root group, or '.'
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list
-                                                    ! (Currently unused; should be passed in as H5P_DEFAULT_F)
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

h5aopen_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_f
-
-

PURPOSE

-
  Opens an attribute for an object specified by object
-  identifier and attribute name
-
-

INPUTS

-
  obj_id        - Identifer for object to which attribute is attached
-  attr_name     - Name of attribute to open
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id    ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              !   Success:  0
-                                              !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id     ! Attribute access property list
-
- -
- -

h5aopen_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_idx_f
-
-

PURPOSE

-
  Opens the attribute specified by its index.
-
-

INPUTS

-
  obj_id        - identifier of a group, dataset, or named
-                  datatype an attribute to be attached to
-  index         - index of the attribute to open (zero-based)
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
-    INTEGER, INTENT(IN) :: index            ! Attribute index
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5aopen_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_name_f
-
-

PURPOSE

-
  Opens an attribute specified by name.
-
-

INPUTS

-
  obj_id        - identifier of a group, dataset, or named
-                  datatype atttribute to be attached to
-  name          - attribute name
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5arename_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5arename_by_name_f
-
-

PURPOSE

-
  Renames an attribute
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name of object, relative to location,
-                  whose attribute is to be renamed
-  old_attr_name - Prior attribute name
-  new_attr_name - New attribute name
-  lapl_id       - Link access property list identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, &
-        hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  whose attribute is to be renamed
-    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
-    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

h5arename_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5arename_f
-
-

PURPOSE

-
  Renames an attribute
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  old_attr_name - Prior attribute name
-  new_attr_name - New attribute name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

HISTORY

-
  N/A
-
-

SOURCE

-
  SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
-    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Df_c.html b/fortran/doc/DevelGuide/src/H5Df_c.html deleted file mode 100644 index 1e163f2..0000000 --- a/fortran/doc/DevelGuide/src/H5Df_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Df.c - - - - - -
-
- -

H5Df

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5D Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html deleted file mode 100644 index 0bb4173..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - -./src/H5Dff_F03.f90 - - - - - -
-
- -

H5D (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5D_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions.
-  It contains the same functions as H5Dff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Dff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

NOTES

-
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
-  we only provide an interface for arrays up to and including rank 7.
-
-  (2) Unfortunately we are using a generic interface and one of the factors
-  used in determining the proper routine to select is that of the array
-  rank being passed. Therefore, we can not create just one subroutine for
-  each array type (integer, real, etc...) and use a
-  rank 1 array of assumed size to handle multiple ranks, i.e.
-  (i.e. integer, dimension(*) :: ... )
-  (i.e. real   , dimension(*) :: ... ) etc...
-
-  (3) Could not place the USE ISO_C_BINDING in the module header because it may
-  conflict with the USE ISO_C_BINDING included in the user's program. Moved
-  the statement instead to each subroutine.
-
-
-  (4) C_LOC and character strings according to the Fortran 2003 standard:
-
-  15.1.2.5 C_LOC(X)
-
-  Argument. X shall either
-
-  (A) have interoperable type and type parameters and be
-  (a) a variable that has the TARGET attribute and is interoperable,
-  (b) an allocated allocatable variable that has the TARGET attribute
-  and is not an array of zero size, or
-  (c) an associated scalar pointer, or
-  (B) be a nonpolymorphic scalar, have no length type parameters, and be
-  (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
-  (b) an allocated allocatable variable that has the TARGET attribute, or
-  (c) an associated pointer.
-
-        - When X is a character, for interoperability the standard is:
-
-  15.2.1 Interoperability of intrinsic types
-
-  ...if the type is character, interoperability also requires that the length type parameter
-  be omitted or be specified by an initialization expression whose value is one.
-
-  THEREFORE compilers that have not extended the standard require the
-  argument in C_LOC to be of the variant:
-
-  CHARACTER(LEN=1), TARGET :: chr
-  or
-  CHARACTER, TARGET :: chr
-  (B)
-                         *** 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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dvlen_reclaim

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dvlen_reclaim
-
-

PURPOSE

-
  Reclaims VL datatype memory buffers. 
-
-

INPUTS

-
  type_id  - Identifier of the datatype. 
-  space_id - Identifier of the dataspace. 
-  plist_id - Identifier of the property list used to create the buffer. 
-       buf - Pointer to the buffer to be reclaimed. 
-
-

OUTPUTS

-
  hdferr   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
 M. Scot Breitenfeld
- January 11, 2011
-
-

SOURCE

-
  SUBROUTINE H5Dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr)
-
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-
-    INTEGER(HID_T), INTENT(IN) :: type_id   ! Identifier of the datatype. 
-    INTEGER(HID_T), INTENT(IN) :: space_id  ! Identifier of the dataspace. 
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Identifier of the property list used to create the buffer. 
-    TYPE(C_PTR), INTENT(INOUT) :: buf       ! Pointer to the buffer to be reclaimed. 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html deleted file mode 100644 index afebdd8..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -./src/H5Dff_F90.f90 - - - - - -
-
- -

H5D (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5D_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5D functions. It contains
-  the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Dff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

NOTES

-
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
-  we only provide an interface for arrays up to and including rank 7.
-
-  (2) Unfortunately we are using a generic interface and one of the factors
-  used in determining the proper routine to select is that of the array
-  rank being passed, therefore we can not create just one subroutine for
-  each array type (integer, real, etc...) of various ranks and then use a
-  rank 1 array of assumed size in the just one subroutine,
-  (i.e. integer, dimension(*) :: ... )
-  (i.e. real   , dimension(*) :: ... ) etc...
-
-  (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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dread_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dread_f
-
-

PURPOSE

-
  Reads raw data from the specified dataset into buf,
-  converting from file datatype and dataspace to memory
-  datatype and dataspace.
-
-

INPUTS

-
  dset_id       - dataset identifier
-  mem_type_id   - memory type identifier
-  dims          - 1-dim array of size 7; dims(k) has the size
-                  of k-th dimension of the buf array
-
-

OUTPUTS

-
  buf     - buffer to read data in
-  hdferr: - error code
-             Success:  0
-             Failure: -1
-
-

OPTIONAL PARAMETERS

-
  mem_space_id  - memory dataspace identifier
-  file_space_id - file dataspace identifier
-  xfer_prp      - trasfer property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-  dims parameter was added to make code portable;
-  n parameter was replaced with dims parameter in
-  the h5dwrite_reference_obj and h5dwrite_reference_dsetreg
-  functions.  April 2, 2001
-
-

NOTES

-
  This function is overloaded to read INTEGER,
-  REAL, DOUBLE PRECISION and CHARACTER buffers
-  up to 7 dimensions, and one dimensional buffers
-  of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_f90.html b/fortran/doc/DevelGuide/src/H5Dff_f90.html deleted file mode 100644 index 5444a93..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_f90.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - - - - -./src/H5Dff.f90 - - - - - -
-
- -

H5D

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5D
-
-

FILE

-
  fortran/src/H5Dff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5D functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dclose_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dclose_f
-
-

PURPOSE

-
  Closes a dataset.
-
-

INPUTS

-
  dset_id       - dataset identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dclose_f(dset_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5dcreate_anon_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dcreate_anon_f
-
-

PURPOSE

-
  Creates a dataset in a file without linking it into the file structure
-
-

INPUTS

-
  loc_id        - Identifier of the file or group within which to create the dataset.
-  type_id       - Identifier of the datatype to use when creating the dataset.
-  space_id      - Identifier of the dataspace to use when creating the dataset.
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  dcpl_id       - Dataset creation property list identifier.
-  dapl_id       - Dataset access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 11, 2008
-
-

SOURCE

-
  SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier.
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier.
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier.
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id  ! Dataset creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id  ! Dataset access property list identifier.
-
- -
- -

h5dcreate_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dcreate_f
-
-

PURPOSE

-
  Creates a dataset at the specified location
-
-

INPUTS

-
  loc_id        - file or group identifier
-  name          - dataset name
-  type_id       - dataset datatype identifier
-  space_id      - dataset dataspace identifier
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - Dataset creation property list
-  lcpl_id       - Link creation property list
-  dapl_id       - Dataset access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  - Explicit Fortran interfaces were added for
-    called C functions (it is needed for Windows
-    port).  February 28, 2001
-
-  - Added version's 1.8 new optional parameters
-    February, 2008
-
-

SOURCE

-
  SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
-       hdferr, dcpl_id, lcpl_id, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5dget_access_plist_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_access_plist_f
-
-

PURPOSE

-
  Returns a copy of the dataset creation property list.
-
-

INPUTS

-
  dset_id       - Dataset identifier
-
-

OUTPUTS

-
  plist_id      - Dataset access property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

SOURCE

-
SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr)
-  IMPLICIT NONE
-  INTEGER(HID_T), INTENT(IN)  :: dset_id
-  INTEGER(HID_T), INTENT(OUT) :: plist_id 
-  INTEGER       , INTENT(OUT) :: hdferr  
-
- -
- -

h5dget_create_plist_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_create_plist_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the dataset creation
-  property list for a dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  plist_id      - creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id   ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: plist_id    ! Dataset creation
-                                               ! property list identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5dget_space_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_space_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the dataspace for a
-  dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  dataspace_id  - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: dataspace_id   ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dget_space_status_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_space_status_f
-
-

PURPOSE

-
  Returns the status of data space allocation.
-
-

INPUTS

-
  dset_id       - dataset identifier
-
-

OUTPUTS

-
  flag          - status; may have one of the following values:
-                   H5D_SPACE_STS_ERROR_F
-                   H5D_SPACE_STS_NOT_ALLOCATED_F
-                   H5D_SPACE_STS_PART_ALLOCATED_F
-                   H5D_SPACE_STS_ALLOCATED_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataspace identifier
-    INTEGER, INTENT(IN)        :: flag     ! Memory buffer to fill in
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-
- -
- -

h5dget_storage_size_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_storage_size_f
-
-

PURPOSE

-
  Returns the amount of storage requires by a dataset
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  size          - datastorage size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  October 15, 2002
-
-

SOURCE

-
  SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier
-    INTEGER(HSIZE_T),  INTENT(OUT)  :: size  ! Amount of storage
-                                             ! allocated for dataset
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5dget_type_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_type_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the datatype for a
-  dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  datatype_id   - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-

SOURCE

-
  SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: datatype_id    ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dopen_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dopen_f
-
-

PURPOSE

-
  Opens an existing dataset.
-
-

INPUTS

-
  loc_id        - file or group identifier
-  name          - dataset name
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  dapl_id       - Dataset access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  -Explicit Fortran interfaces were added for
-   called C functions (it is needed for Windows
-   port).  February 28, 2001
-
-  -Added 1.8 (optional) parameter dapl_id
-   February, 2008, M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list
-
- -
- -

h5dset_extent

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dset_extent (instead of obsolete name: h5dextend_f)
-
-

PURPOSE

-
  Extends a dataset with unlimited dimension.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-  size          - array containing the new magnitude of
-                  each dimension
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-  Changed name from the now obsolete h5dextend_f
-  to h5dset_extent_f. Provided interface to old name
-  for backward compatability. -MSB- March 14, 2008
-
-

SOURCE

-
  SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN)  :: size
-    ! Array containing
-    ! dimensions' sizes
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dvlen_get_max_len_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dvlen_get_max_len_f
-
-

PURPOSE

-
  Returns maximum length of the VL array elements
-
-

INPUTS

-
  dataset_id    - dataset identifier
-  type_id       - datatype identifier
-  space_id      - dataspace identifier
-
-

OUTPUTS

-
  size          - buffer size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 15, 2002
-
-

SOURCE

-
  SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id         ! Datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id        ! Dataspace identifier
-    INTEGER(SIZE_T),  INTENT(OUT)  :: len         ! Maximum length of the element
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Ef_c.html b/fortran/doc/DevelGuide/src/H5Ef_c.html deleted file mode 100644 index 79b7914..0000000 --- a/fortran/doc/DevelGuide/src/H5Ef_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Ef.c - - - - - -
-
- -

H5Ef

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5E Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Eff_f90.html b/fortran/doc/DevelGuide/src/H5Eff_f90.html deleted file mode 100644 index 7eb95e6..0000000 --- a/fortran/doc/DevelGuide/src/H5Eff_f90.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - -./src/H5Eff.f90 - - - - - -
-
- -

H5E

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5E
-
-

FILE

-
  fortran/src/H5Eff.f90
-
-

PURPOSE

-
  This Module contains Fortran interfaces for H5E functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5eclear_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eclear_f
-
-

PURPOSE

-
  Clears the error stack for the current thread.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  estack_id     - Error Stack id
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-  Added optional error stack identifier in order to bring
-  the function in line with the h5eclear2 routine.
-  MSB, July 9, 2009
-
-

SOURCE

-
  SUBROUTINE h5eclear_f(hdferr, estack_id)
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id
-
- -
- -

h5eget_major_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eget_major_f
-
-

PURPOSE

-
  Returns a character string describing an error specified
-  by a major error number.
-
-

INPUTS

-
  error_no      - major error number
-
-

OUTPUTS

-
  name          - character string describing the error
-  namelen       - number of characters in the name buffer
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr)
-    INTEGER, INTENT(IN) :: error_no        ! Major error number
-    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Character string describing
-                                           ! the error.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters
-                                           ! in name.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5eget_minor_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eget_minor_f
-
-

PURPOSE

-
  Returns a character string describing an error specified
-  by a minor error number.
-
-

INPUTS

-
  error_no      - minor error number
-
-

OUTPUTS

-
  name          - character string describing the error
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eget_minor_f(error_no, name, hdferr)
-    INTEGER, INTENT(IN) :: error_no       ! Major error number
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
-                                          ! the error
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5eprint_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eprint_f
-
-

PURPOSE

-
  Prints the error stack in a default manner.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  name          - name of the file that contains print output
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eprint_f(hdferr, name)
-    CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5FDmpiof_c.html b/fortran/doc/DevelGuide/src/H5FDmpiof_c.html deleted file mode 100644 index 74143d2..0000000 --- a/fortran/doc/DevelGuide/src/H5FDmpiof_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5FDmpiof.c - - - - - -
-
- -

H5FDmpiof

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for Parallel Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html b/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html deleted file mode 100644 index 473b5db..0000000 --- a/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - -./src/H5FDmpioff.f90 - - - - - -
-
- -

H5FDMPIO

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5FDMPIO
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5P functions needed by
-  parallel MPI programs.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_dxpl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_dxpl_mpio_f
-
-

PURPOSE

-
  Returns the data transfer mode.
-
-

INPUTS

-
  prp_id        - data transfer property list identifier
-
-

OUTPUTS

-
  data_xfer_mode- transfer mode; possible values are:
-                     H5FD_MPIO_INDEPENDENT_F
-                     H5FD_MPIO_COLLECTIVE_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are:
-                                           ! H5FD_MPIO_INDEPENDENT_F
-                                           ! H5FD_MPIO_COLLECTIVE_F
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pget_fapl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_mpio_f
-
-

PURPOSE

-
  Returns MPI communicator information.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  comm          - MPI-2 communicator
-  info          - MPI-2 info object
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(OUT) :: comm ! buffer to return communicator
-    INTEGER, INTENT(OUT) :: info ! buffer to return info object
-                                 ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5pget_fapl_mpiposix_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_mpiposix_f
-
-

PURPOSE

-
  Returns MPI communicator information.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  comm          - MPI-2 communicator
-  use_gpfs      - flag to use GPFS hints
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  May 6, 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(OUT) :: comm         ! Buffer to return communicator
-    LOGICAL, INTENT(OUT) :: use_gpfs
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pset_dxpl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_dxpl_mpio_f
-
-

PURPOSE

-
  Sets data transfer mode.
-
-

INPUTS

-
  prp_id         - data transfer property list identifier
-  data_xfer_mode - transfer mode; possible values are:
-                     H5FD_MPIO_INDEPENDENT_F
-                     H5FD_MPIO_COLLECTIVE_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are:
-                                          ! H5FD_MPIO_INDEPENDENT_F
-                                          ! H5FD_MPIO_COLLECTIVE_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_fapl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_mpio_f
-
-

PURPOSE

-
  Stores MPI IO communicator information to the file
-  access property list.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-  comm          - MPI-2 communicator
-  info          - MPI-2 info object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5pset_fapl_mpiposix_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_mpiposix_f
-
-

PURPOSE

-
  Stores MPI IO communicator information to the file
-  access property list.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-  comm          - MPI-2 communicator
-  use_gpfs      - logical flag to use the GPFS hints
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  May 6, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    LOGICAL, INTENT(IN) :: use_gpfs
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Ff_c.html b/fortran/doc/DevelGuide/src/H5Ff_c.html deleted file mode 100644 index c91a62d..0000000 --- a/fortran/doc/DevelGuide/src/H5Ff_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Ff.c - - - - - -
-
- -

H5Ff

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5F Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Fff_f90.html b/fortran/doc/DevelGuide/src/H5Fff_f90.html deleted file mode 100644 index b0164c9..0000000 --- a/fortran/doc/DevelGuide/src/H5Fff_f90.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - - - - -./src/H5Fff.f90 - - - - - -
-
- -

H5F

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5F
-
-

FILE

-
  H5Fff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5F functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5fclose_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fclose_f
-
-

PURPOSE

-
  Closes HDF5 file.
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fclose_f(file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fcreate_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fcreate_f
-
-

PURPOSE

-
  Creates HDF5 files.
-
-

INPUTS

-
  name          - name of the file to create
-  access_flags  - File access flags. Allowable values are:
-                   H5F_ACC_TRUNC_F
-                   H5F_ACC_EXCL_F
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - file creation property list identifier
-  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, &
-       creation_prp, access_prp)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    INTEGER, INTENT(IN) :: access_flags    ! File access flags
-    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp
-                                           ! File creation propertly
-                                           ! list identifier
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5fflush_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fflush_f
-
-

PURPOSE

-
  Flushes all buffers associated WITH a file to disk
-
-

INPUTS

-
  object_id     - identifier of object used to identify the file.
-  scope         - specifies the scope of the flushing action.
-                  Possible values are:
-                    H5F_SCOPE_GLOBAL_F
-                    H5F_SCOPE_LOCAL_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - file creation property list identifier
-  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fflush_f(object_id, scope, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object
-                                            !associate with a file,
-                                            !including the file itself,
-                                            !a dataset, a group, an
-                                            !attribute, or a named
-                                            !data type
-
-    INTEGER, INTENT(IN) :: scope            !scope of the flushing
-                                            !action, possible values
-                                            !are: H5F_SCOPE_GLOBAL_F
-                                            ! which flushes the entire
-                                            !virtual file,
-                                            !and H5F_SCOPE_LOCAL_F
-                                            !which flushes only the
-                                            !specified file.
-
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5fget_access_plist_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_access_plist_f
-
-

PURPOSE

-
  Returns a file access property list identifier.
-
-

INPUTS

-
  file_id       - identifier of a file to creation property list of
-
-

OUTPUTS

-
  access_id     - access property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: access_id   ! File access property
-                                               ! list identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5fget_create_plist_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_create_plist_f
-
-

PURPOSE

-
  Returns a file creation property list identifier.
-
-

INPUTS

-
  file_id       - identifier of a file to creation property list of
-
-

OUTPUTS

-
  prop_id       - creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id    ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: prop_id   ! File creation property
-                                             ! list identifier
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5fget_filesize_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_filesize_f
-
-

PURPOSE

-
  Retrieves the file size of the HDF5 file.
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  size          - file size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  July 7, 2004
-
-

SOURCE

-
  SUBROUTINE h5fget_filesize_f(file_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id  ! file identifier
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Size of the file
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
-                                           !     -1 if fail
-
- -
- -

h5fget_freespace_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_freespace_f
-
-

PURPOSE

-
  Get amount of free space within a file
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  free_space    - amount of free space in file
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Quincey Koziol
-  October 7, 2003
-
-

SOURCE

-
  SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER(HSSIZE_T), INTENT(OUT) :: free_space
-                                          ! amount of free space in file
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fget_name_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_name_f
-
-

PURPOSE

-
  Gets the name of the file from the object identifier
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  buf           - buffer to store the read name
-  size          - actual size of the name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  July 6, 2004
-
-

SOURCE

-
  SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Object identifier
-    CHARACTER(LEN=*), INTENT(INOUT) :: buf
-                                           ! Buffer to hold file name
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Size of the file name
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
-                                           !     -1 if fail
-
- -
- -

h5fget_obj_count_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_obj_count_f
-
-

PURPOSE

-
  Gets number of the objects open within a file
-
-

INPUTS

-
  file_id       - file identifier
-  obj_type      - type of the object; possible values are:
-                    H5F_OBJ_FILE_F
-                    H5F_OBJ_DATASET_F
-                    H5F_OBJ_GROUP_F
-                    H5F_OBJ_DATATYPE_F
-                    H5F_OBJ_ALL_F
-
-

OUTPUTS

-
  obj_count     - number of open objects
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002
-
-

HISTORY

-
  Changed the type of obj_count to INTEGER(SIZE_T)
-  September 25, 2008 EIP
-
-

SOURCE

-
  SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER, INTENT(IN)  :: obj_type      ! Object type
-    INTEGER(SIZE_T), INTENT(OUT) :: obj_count
-                                          ! Number of open objects
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fget_obj_ids_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_obj_ids_f
-
-

PURPOSE

-
  Get list of open objects identifiers within a file
-
-

INPUTS

-
  file_id       - file identifier
-  obj_type      - type of the object; possible values are:
-                    H5F_OBJ_FILE_F
-                    H5F_OBJ_DATASET_F
-                    H5F_OBJ_GROUP_F
-                    H5F_OBJ_DATATYPE_F
-                    H5F_OBJ_ALL_F
-
-

OUTPUTS

-
  obj_ids       - array of open object identifiers
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  num_objs      - number of open objects
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002
-
-

HISTORY

-
  Added optional parameter num_objs for number of open objects
-  of the specified type and changed type of max_obj to
-  INTEGER(SIZE_T)
-  September 25, 2008 EIP
-
-

SOURCE

-
  SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER, INTENT(IN)  :: obj_type           ! Object type
-    INTEGER(SIZE_T), INTENT(IN)  :: max_objs   ! Maximum # of objects to retrieve
-    INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids
-                                               ! Array of open objects iidentifiers
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects
-
- -
- -

h5fis_hdf5_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fis_hdf5_f
-
-

PURPOSE

-
  Determines whether a file is in the HDF5 format.
-
-

INPUTS

-
  name          - name of the file to check
-
-

OUTPUTS

-
  status        - indicates if file is and HDF5 file
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fis_hdf5_f(name, status, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    LOGICAL, INTENT(OUT) :: status         ! Indicates if file
-                                           ! is an HDF5 file
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5fmount_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fmount_f
-
-

PURPOSE

-
  Mounts a file.
-
-

INPUTS

-
  loc_id        - the identifier for of file or group in
-                  which name is defined
-  name          - the name of the group onto which the file
-                  specified by child_id is to be mounted.
-  child_id      - the identifier of the file to be mounted.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  access_prp    - the identifier of the property list to be used
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
-                                           ! in which dsetname is defined
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the
-                                           ! file to be mounted
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5fopen_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fopen_f
-
-

PURPOSE

-
  Opens HDF5 file.
-
-

INPUTS

-
  name          - name of the file to acecss
-  access_flags  - File access flags. Allowable values are:
-                   H5F_ACC_RDWR_F
-                   H5F_ACC_RDONLY_F
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    INTEGER, INTENT(IN) :: access_flags    ! File access flags
-    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5freopen_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5freopen_f
-
-

PURPOSE

-
  Reopens HDF5 file.
-
-

INPUTS

-
  file_id       - identifier of a file for which an
-                  additional identifier is required
-
-

OUTPUTS

-
  ret_file_id   - new file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5funmount_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5funmount_f
-
-

PURPOSE

-
  Unmounts a file.
-
-

INPUTS

-
  loc_id        - the identifier for of file or group in
-                  which name is defined
-  name          - the name of the mount point
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5funmount_f(loc_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
-                                           ! at which the specified file
-                                           ! is to be unmounted
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the mount point
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Gf_c.html b/fortran/doc/DevelGuide/src/H5Gf_c.html deleted file mode 100644 index a71f0e8..0000000 --- a/fortran/doc/DevelGuide/src/H5Gf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Gf.c - - - - - -
-
- -

H5Gf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5G Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Gff_f90.html b/fortran/doc/DevelGuide/src/H5Gff_f90.html deleted file mode 100644 index 74ec2f4..0000000 --- a/fortran/doc/DevelGuide/src/H5Gff_f90.html +++ /dev/null @@ -1,840 +0,0 @@ - - - - - - - -./src/H5Gff.f90 - - - - - -
-
- -

H5G

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5G
-
-

FILE

-
  fortran/src/H5Gff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5G functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5gclose_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gclose_f
-
-

PURPOSE

-
  Closes the specified group.
-
-

INPUTS

-
  grp_id        - group identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gclose_f(grp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Gcreate_anon_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  H5Gcreate_anon_f
-
-

PURPOSE

-
  Creates a new empty group without linking it into the file structure.
-
-

INPUTS

-
  loc_id        - Location identifier
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  gcpl_id       - Group creation property list identifier
-  gapl_id       - Group access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

SOURCE

-
  SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
-
- -
- -

h5gcreate_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gcreate_f
-
-

PURPOSE

-
  Creates a new group.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - group name at the specified location
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  size_hint     - a parameter indicating the number of bytes to
-                  reserve for the names that will appear in the group
-  lcpl_id       - Property list for link creation
-  gcpl_id       - Property list for group creation
-  gapl_id       - Property list for group access
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-  Added additional optional paramaters in 1.8
-  MSB - February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint
-                                           ! Parameter indicating
-                                           ! the number of bytes
-                                           ! to reserve for the
-                                           ! names that will appear
-                                           ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F
-                                           ! if using any of the optional
-                                           ! parameters lcpl_id, gcpl_id, and/or gapl_id when not
-                                           ! using keywords in specifying the optional parameters
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id  ! Property list for link creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
-
- -
- -

h5gget_comment_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_comment_f
-
-

PURPOSE

-
  Retrieves comment for specified object.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object at specified location
-  size          - size of the buffer required to hold comment
-
-

OUTPUTS

-
  buffer        - buffer to hold object's comment
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
-    CHARACTER(LEN=size), INTENT(OUT) :: buffer
-                                           ! Buffer to hold a comment
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

H5Gget_create_plist_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  H5Gget_create_plist_f
-
-

PURPOSE

-
  Gets a group creation property list identifier.
-
-

INPUTS

-
  grp_id        - group identifier
-
-

OUTPUTS

-
  gcpl_id       - Group creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: grp_id  ! Group identifier
-    INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gget_info_by_idx_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves information about a group, according to the group’s position within an index.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  group_name    - Name of group containing group for which information is to be retrieved
-  index_type    - Index type
-  order         - Order of the count in the index
-  n             - Position in the index of the group for which information is retrieved
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  mounted       - Whether group has a file mounted on it
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

HISTORY

-
  Added 'mounted' paramater
-  M. Scot Breitenfeld
-  July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, &
-       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
-    INTEGER, INTENT(IN) :: index_type ! Index type
-    INTEGER, INTENT(IN) :: order      ! Order of the count in the index
-    INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved
-
-    INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group:
-                                         !   H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                         !   H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                         !   H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks      ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder  ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
-
- -
- -

h5gget_info_by_name_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_by_name_f
-
-

PURPOSE

-
  Retrieves information about a group.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  group_name    - Name of group containing group for which information is to be retrieved
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  mounted       - Whether group has a file mounted on it
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

HISTORY

-
  Added 'mounted' paramater
-  M. Scot Breitenfeld
-  July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, &
-       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
-
-    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
-                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          !   0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
-
- -
- -

h5gget_info_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_f
-
-

PURPOSE

-
  Retrieves information about a group
-
-

INPUTS

-
  group_id      - Group identifier
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  mounted       - Whether group has a file mounted on it
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

HISTORY

-
  - Added 'mounted' paramater
-    M. Scot Breitenfeld
-    July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier
-
-    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
-                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted  ! Whether group has a file mounted on it
-
- -
- -

h5gget_linkval_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_linkval_f
-
-

PURPOSE

-
  Returns the name of the object that the symbolic link
-  points to.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - symbolic link to the object whose name
-                  is to be returned.
-  size          - maximum number of characters to be returned
-
-

OUTPUTS

-
  buffer        - a buffer to hold the name of the object
-  being sought
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
-    CHARACTER(LEN=size), INTENT(OUT) :: buffer
-                                           ! Buffer to hold a name of
-                                           ! the object symbolic link
-                                           ! points to
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gget_obj_info_idx_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_obj_info_idx_f
-
-

PURPOSE

-
  Returns name and type of the group member identified by
-  its index.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group at the specified location
-  idx           - object index (zero-based)
-
-

OUTPUTS

-
  obj_name      - object name
-  obj_type      - object type
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, &
-       obj_name, obj_type, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER, INTENT(IN) :: idx             ! Index of member object
-    CHARACTER(LEN=*), INTENT(OUT) :: obj_name   ! Name of the object
-    INTEGER, INTENT(OUT) :: obj_type       ! Object type
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5glink2_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5glink2_f
-
-

PURPOSE

-
  Creates a link of the specified type from new_name
-  to current_name. current_name and new_name are interpreted
-  releative to current and new location identifiers.
-
-

INPUTS

-
  cur_loc_id    - location identifier
-  cur_name      - name of the existing object if link is a
-                  hard link. Can be anything for the soft link.
-  link_type     - link type; possible values are:
-                    H5G_LINK_HARD_F (0)
-                    H5G_LINK_SOFT_F (1)
-  new_loc_id    - new location identifier
-  new_name      - new name for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 25, 2002
-
-

SOURCE

-
  SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, &
-       new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: cur_name
-                                             ! Current name of an object
-    INTEGER, INTENT(IN) :: link_type         ! link type
-                                                 ! Possible values are:
-                                                 ! H5G_LINK_HARD_F (0) or
-                                                 ! H5G_LINK_SOFT_F (1)
-
-    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5glink_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5glink_f
-
-

PURPOSE

-
  Creates a link of the specified type from new_name
-  to current_name.
-
-

INPUTS

-
  loc_id        - location identifier
-  link_type     - link type; possible values are:
-                    H5G_LINK_HARD_F (0)
-                    H5G_LINK_SOFT_F (1)
-  current_name  - name of the existing object if link is a
-                  hard link. Can be anything for the soft link
-  new_name      - new name for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5glink_f(loc_id, link_type, current_name, &
-       new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    INTEGER, INTENT(IN) :: link_type       ! link type
-                                                   ! Possible values are:
-                                                   ! H5G_LINK_HARD_F (0) or
-                                                   ! H5G_LINK_SOFT_F (1)
-
-    CHARACTER(LEN=*), INTENT(IN) :: current_name
-                                                   ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gmove2_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gmove2_f
-
-

PURPOSE

-
  Renames an object within an HDF5 file.
-
-

INPUTS

-
  src_loc_id    - original location identifier
-  src_name      - object's name at specified original location
-  dst_loc_id    - original location identifier
-  dst_name      - object's new name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 25, 2002
-
-

SOURCE

-
  SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)   :: src_loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: src_name    ! Original name of an object
-    INTEGER(HID_T), INTENT(IN)   :: dst_loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: dst_name    ! New name of an object
-    INTEGER, INTENT(OUT)         :: hdferr      ! Error code
-
- -
- -

h5gmove_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gmove_f
-
-

PURPOSE

-
  Renames an object within an HDF5 file.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - object's name at specified location
-  new_name      - object's new name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5gn_members_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gn_members_f
-
-

PURPOSE

-
  Returns the number of group members.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group at the specified location
-
-

OUTPUTS

-
  nmembers      - number of group members
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-            INTEGER, INTENT(OUT) :: nmembers       ! Number of members in the
-                                                   ! group
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gopen_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gopen_f
-
-

PURPOSE

-
  Opens an existing group.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group to open
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  gapl_id       - Group access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-  Added 1.8 (optional) parameter gapl_id
-  February, 2008 M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Group access property list identifier
-
- -
- -

h5gset_comment_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gset_comment_f
-
-

PURPOSE

-
  Sets comment for specified object.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object
-  comment       - comment to set for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gunlink_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gunlink_f
-
-

PURPOSE

-
  Removes the specified name from the group graph and
-  decrements the link count for the object to which name
-  points
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object to unlink
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gunlink_f(loc_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5If_c.html b/fortran/doc/DevelGuide/src/H5If_c.html deleted file mode 100644 index 8dccce7..0000000 --- a/fortran/doc/DevelGuide/src/H5If_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5If.c - - - - - -
-
- -

H5If

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5I Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Iff_f90.html b/fortran/doc/DevelGuide/src/H5Iff_f90.html deleted file mode 100644 index 5987581..0000000 --- a/fortran/doc/DevelGuide/src/H5Iff_f90.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - -./src/H5Iff.f90 - - - - - -
-
- -

H5I

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5I
-
-

FILE

-
  fortran/src/H5Iff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5I functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5idec_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5idec_ref_f
-
-

PURPOSE

-
  Decrements the reference count of an ID
-
-

INPUTS

-
  obj_id        - Object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:       - Error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iget_file_id_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_file_id_f
-
-

PURPOSE

-
  Obtains file identifier from the object identifier
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr:       - error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 23, 2004
-
-

SOURCE

-
  SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: obj_id   ! Object identifier
-    INTEGER(HID_T), INTENT(OUT) :: file_id  ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5iget_name_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_name_f
-
-

PURPOSE

-
  Gets a name of an object specified by its idetifier.
-
-

INPUTS

-
  obj_id    - attribute identifier
-  buf_size  - size of a buffer to read name in
-
-

OUTPUTS

-
  buf       - buffer to read name in, name will be truncated if
-              buffer is not big enough
-  name_size - name size
-  hdferr:   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    INTEGER(SIZE_T), INTENT(IN) :: buf_size   ! Buffer size
-    CHARACTER(LEN=*), INTENT(OUT) :: buf      ! Buffer to hold object name
-    INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
-                                              !   0 if successful,
-                                              !   -1 if fail
-
- -
- -

h5iget_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_ref_f
-
-

PURPOSE

-
  Retrieves the reference count of an ID
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:         - error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iget_type_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_type_f
-
-

PURPOSE

-
  Retrieves the type of an object.
-
-

INPUTS

-
  obj_id   - object identifier
-
-

OUTPUTS

-
  type     - type of the object, possible values:
-              H5I_FILE_F
-              H5I_GROUP_F
-              H5I_DATATYPE_F
-              H5I_DATASPACE_F
-              H5I_DATASET_F
-              H5I_ATTR_F
-              H5I_BADID_F
-  hdferr:  - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    INTEGER, INTENT(OUT) :: TYPE ! type of an object.
-                                 ! possible values are:
-                                 !   H5I_FILE_F
-                                 !   H5I_GROUP_F
-                                 !   H5I_DATATYPE_F
-                                 !   H5I_DATASPACE_F
-                                 !   H5I_DATASET_F
-                                 !   H5I_ATTR_F
-                                 !   H5I_BADID_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5iinc_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iinc_ref_f
-
-

PURPOSE

-
  Increments the reference count of an ID
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:              - error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iis_valid_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_file_id_f
-
-

PURPOSE

-
  Check if an ID is valid without producing an error message
-
-

INPUTS

-
  id           - identifier 
-
-

OUTPUTS

-
  valid        - status of id as a valid identifier
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

SOURCE

-
  SUBROUTINE h5iis_valid_f(id, valid, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: id ! Identifier 
-    LOGICAL, INTENT(OUT) :: valid     ! Status of id as a valid identifier
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lf_c.html b/fortran/doc/DevelGuide/src/H5Lf_c.html deleted file mode 100644 index 9adb759..0000000 --- a/fortran/doc/DevelGuide/src/H5Lf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Lf.c - - - - - -
-
- -

H5Lf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5L Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html deleted file mode 100644 index 6b9640b..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - -./src/H5Lff_F03.f90 - - - - - -
-
- -

H5L (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5L_PROVISIONAL
-
-

FILE

-
  src/fortran/src/H5Lff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions.
-  It contains the same functions as H5Lff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Lff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5literate_by_name_f

- -

[ Top ] [ H5L (F03) ] [ Subroutines ]

-

NAME

-
  h5literate_by_name_f
-
-

PURPOSE

-
  Iterates through links in a group.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_type    - Type of index which determines the order
-  order         - Order within index
-  idx           - Iteration position at which to start
-  op            - Callback function passing data regarding the link to the calling application
-  op_data       - User-defined pointer to data required by the application for its processing of the link
-
-

OUTPUTS

-
  idx      - Position at which an interrupted iteration may be restarted
-  hdferr   - Error code:
-               Success:  0
-               Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lapl_id  - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, idx, op, op_data, return_value, hdferr, lapl_id)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Identifier specifying subject group
-    CHARACTER(LEN=*) :: group_name          ! Name of subject group
-    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
-                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
-                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
-    INTEGER, INTENT(IN) :: order            ! Order within index:
-                                                ! H5_ITER_INC_F - Increasing order
-                                                ! H5_ITER_DEC_F - Decreasing order
-                                                ! H5_ITER_NATIVE_F - Fastest available order
-    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
-                                            ! OUT: Position at which an interrupted iteration may be restarted
-
-    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
-    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
-
-    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
-                                         !            returns non-zero, or zero if all members were
-                                         !            processed with no operator returning non-zero.
-
-                                         ! Failure:   Negative if something goes wrong within the
-                                         !            library, or the negative value returned by one
-                                         !            of the operators.
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5literate_f

- -

[ Top ] [ H5L (F03) ] [ Subroutines ]

-

NAME

-
  h5literate_f
-
-

PURPOSE

-
  Iterates through links in a group.
-
-

INPUTS

-
  group_id      - Identifier specifying subject group
-  index_type    - Type of index which determines the order
-  order         - Order within index
-  idx           - Iteration position at which to start
-  op            - Callback function passing data regarding the link to the calling application
-  op_data       - User-defined pointer to data required by the application for its processing of the link
-
-

OUTPUTS

-
  idx           - Position at which an interrupted iteration may be restarted
-  hdferr        - Error code:
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  July 8, 2008
-
-

SOURCE

-
  SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: group_id  ! Identifier specifying subject group
-    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
-                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
-                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
-    INTEGER, INTENT(IN) :: order            ! Order within index:
-                                                ! H5_ITER_INC_F - Increasing order
-                                                ! H5_ITER_DEC_F - Decreasing order
-                                                ! H5_ITER_NATIVE_F - Fastest available order
-    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
-                                            ! OUT: Position at which an interrupted iteration may be restarted
-
-    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
-    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
-
-    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
-                                         !            returns non-zero, or zero if all members were
-                                         !            processed with no operator returning non-zero.
-
-                                         ! Failure:   Negative if something goes wrong within the
-                                         !            library, or the negative value returned by one
-                                         !            of the operators.
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html deleted file mode 100644 index 6d1a9bb..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -./src/H5Lff_F90.f90 - - - - - -
-
- -

H5L (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5L_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5L functions. It contains
-  the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Lff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
- NOTE
-  Currently contains no functions.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_f90.html b/fortran/doc/DevelGuide/src/H5Lff_f90.html deleted file mode 100644 index 1a209f2..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_f90.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - - -./src/H5Lff.f90 - - - - - -
-
- -

H5L

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5L
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5L functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5lcopy_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lcopy_f
-
-

PURPOSE

-
  Copies a link from one location to another.
-
-

INPUTS

-
  src_loc_id    - Location identifier of the source link
-  src_name      - Name of the link to be copied
-  dest_loc_id   - Location identifier specifying the destination of the copy
-  dest_name     - Name to be assigned to the NEW copy
-  loc_id        - Identifier of the file or group containing the object
-  name          - Name of the link to delete
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier
-  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, &
-       lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Location identifier of the source link
-    CHARACTER(LEN=*), INTENT(IN) :: src_name   ! Name of the link to be copied
-    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy
-    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Lcreate_external_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_external_f
-
-

PURPOSE

-
  Creates a soft link to an object in a different file.
-
-

INPUTS

-
  file_name     - Name of the file containing the target object. Neither the file nor the target object is
-  required to exist. May be the file the link is being created in.
-  obj_name      - Path within the target file to the target object.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither
-                                              ! the file nor the target object is required to exist.
-                                              ! May be the file the link is being created in.
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
-
- -
- -

H5Lcreate_hard_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_hard_f
-
-

PURPOSE

-
  Creates a hard link to an object.
-
-

INPUTS

-
  obj_loc_id    - The file or group identifier for the target object.
-  obj_name      - Name of the target object, which must already exist.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_loc_id  ! The file or group identifier for the target object.
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lcpl_id         ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lapl_id         ! Link access property list identifier.
-
- -
- -

H5Lcreate_soft_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_soft_f
-
-

PURPOSE

-
  Creates a soft link to an object.
-
-

INPUTS

-
  target_path   - Path to the target object, which is not required to exist.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 20, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: target_path   ! Path to the target object, which is not required to exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id     ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name     ! The name of the new link.
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code:
-                                                  !   0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
-
- -
- -

h5ldelete_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5ldelete_by_idx_f
-
-

PURPOSE

-
  Removes the nth link in a group.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Type of index; Possible values are:
-                    H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                    H5_INDEX_NAME_F          - Index on names
-                    H5_INDEX_CRT_ORDER_F     - Index on creation order
-                    H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order within field or index; Possible values are:
-                    H5_ITER_UNKNOWN_F   - Unknown order
-                    H5_ITER_INC_F       - Increasing order
-                    H5_ITER_DEC_F       - Decreasing order
-                    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
-                    H5_ITER_N_F         - Number of iteration orders
-
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location,
-                                               !  from which attribute is to be removed
-    INTEGER, INTENT(IN) :: index_field         ! Type of index; Possible values are:
-                                               !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                               !    H5_INDEX_NAME_F      - Index on names
-                                               !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                               !    H5_INDEX_N_F              - Number of indices defined
-    INTEGER, INTENT(IN) :: order               ! Order in which to iterate over index; Possible values are:
-                                               !    H5_ITER_UNKNOWN_F  - Unknown order
-                                               !    H5_ITER_INC_F      - Increasing order
-                                               !    H5_ITER_DEC_F      - Decreasing order
-                                               !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-                                               !    H5_ITER_N_F     - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n      ! Offset within index
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id     ! Link access property list
-
- -
- -

h5ldelete_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5ldelete_f
-
-

PURPOSE

-
  Removes a link from a group.
-
-

INPUTS

-
  loc_id        - Identifier of the file or group containing the object
-  name          - Name of the link to delete
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group containing the object
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of the link to delete
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Lexists_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lexists_f
-
-

PURPOSE

-
  Check if a link with a particular name exists in a group.
-
-

INPUTS

-
  loc_id        - Identifier of the file or group to query.
-  name          - Link name to check
-
-

OUTPUTS

-
  link_exists   - link exists status (.TRUE.,.FALSE.)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group to query.
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Link name to check.
-    LOGICAL, INTENT(OUT) :: link_exists   ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id
-                                          ! Link access property list identifier.
-
- -
- -

h5lget_info_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves metadata for a link in a group, according to the order within a field or index.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Index or field which determines the order
-  order         - Order within field or index
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
            NOTE: In C these are defined as a structure: H5L_info_t
-  corder_valid  - Indicates whether the creation order data is valid for this attribute
-  corder        - Is a positive integer containing the creation order of the attribute
-  cset          - Indicates the character set used for the attribute’s name 
- address        - If the link is a hard link, address specifies the file address that the link points to
- val_size       - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                  the length of the name of the pointed-to object with a null terminator.
- hdferr         - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

HISTORY

-
   Changed the link_type names to match those in C (bug 1720) from,
-   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
-   to
-   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
-   MSB January 8, 2010.  
-
-

SOURCE

-
  SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
-       link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group  
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
-    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
-                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                        !    H5_INDEX_NAME_F      - Index on names
-                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                        !    H5_INDEX_N_F             - Number of indices defined
-    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
-                                        !    H5_ITER_UNKNOWN_F  - Unknown order
-                                        !    H5_ITER_INC_F      - Increasing order
-                                        !    H5_ITER_DEC_F      - Decreasing order
-                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
-    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
-                                      !  H5L_TYPE_HARD_F      - Hard link
-                                      !  H5L_TYPE_SOFT_F      - Soft link
-                                      !  H5L_TYPE_EXTERNAL_F  - External link
-                                      !  H5L_TYPE_ERROR _F    - Error
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute 
-    INTEGER, INTENT(OUT) :: corder         ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset           ! Indicates the character set used for the attributeâs name
-    INTEGER(HADDR_T), INTENT(OUT) :: address  ! If the link is a hard link, address specifies the file address that the link points to
-    INTEGER(SIZE_T), INTENT(OUT) :: val_size  ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                                              ! the length of the name of the pointed-to object with a null terminator. 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5lget_info_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_info_f
-
-

PURPOSE

-
  Returns information about a link.
-
-

INPUTS

-
  link_loc_id   - File or group identifier.
-  link_name     - Name of the link for which information is being sought
-
-

OUTPUTS

-
            NOTE: In C these are contained in the structure H5L_info_t
-
-  cset          - indicates the character set used for link’s name.
-  corder        - specifies the link’s creation order position.
-  corder_valid  - indicates whether the value in corder is valid.
-  link_type     - specifies the link class:
-                    H5L_TYPE_HARD_F     - Hard link
-                    H5L_TYPE_SOFT_F     - Soft link
-                    H5L_TYPE_EXTERNAL_F - External link
-                    H5L_TYPE_ERROR_ F   - Error
-  address       - If the link is a hard link, address specifies the file address that the link points to
-  val_size      - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                  the length of the name of the pointed-to object with a null terminator. 
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

HISTORY

-
   Changed the link_type names to match those in C (bug 1720) from,
-   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
-   to
-   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
-   MSB January 8, 2010.
-
-

SOURCE

-
  SUBROUTINE h5lget_info_f(link_loc_id, link_name, &
-       cset, corder, f_corder_valid, link_type, address, val_size, &
-       hdferr, lapl_id)
-    IMPLICIT NONE
-
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought
-
-! OUTPUTS  NOTE: In C these are contained in the structure H5L_info_t
-    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the linkâs name.
-    INTEGER, INTENT(OUT) :: corder ! Specifies the linkâs creation order position.
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid.
-    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
-                                      !  H5L_TYPE_HARD_F      - Hard link
-                                      !  H5L_TYPE_SOFT_F      - Soft link
-                                      !  H5L_TYPE_EXTERNAL_F  - External link
-                                      !  H5L_TYPE_ERROR _F    - Error
-    INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
-    INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                                             ! the length of the name of the pointed-to object with a null terminator. 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5lget_name_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_name_by_idx_f
-
-

PURPOSE

-
  Retrieves name of the nth link in a group, according to the order within a specified field or index.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Index or field which determines the order
-  order         - Order within field or index
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
  name          - Buffer in which link value is returned
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - List access property list identifier.
-  size          - Maximum number of characters of link value to be returned.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 10, 2008
-
-

SOURCE

-
  SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, &
-        name, hdferr, size, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
-    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
-                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                        !    H5_INDEX_NAME_F      - Index on names
-                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                        !    H5_INDEX_N_F             - Number of indices defined
-    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
-                                        !    H5_ITER_UNKNOWN_F  - Unknown order
-                                        !    H5_ITER_INC_F      - Increasing order
-                                        !    H5_ITER_DEC_F      - Decreasing order
-                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5lis_registered_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lis_registered_f
-
-

PURPOSE

-
  Determines whether a class of user-defined links is registered.
-
-

INPUTS

-
  link_cls_id   - User-defined link class identifier
-
-

OUTPUTS

-
  registered    - .TRUE.  - if the link class has been registered
-                  .FALSE. - if it is unregistered
-  hdferr        - Error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: link_cls_id  ! User-defined link class identifier
-    LOGICAL, INTENT(OUT) :: registered  ! .TRUE. - if the link class has been registered and
-                                        ! .FALSE. - if it is unregistered
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-
- -
- -

h5lmove_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lmove_f
-
-

PURPOSE

-
  Renames a link within an HDF5 file.
-
-

INPUTS

-
  src_loc_id    - Original file or group identifier.
-  src_name      - Original link name.
-  dest_loc_id   - Destination file or group identifier.
-  dest_name     - NEW link name.
-
-

OUTPUTS

-
  hdferr        - Error code:
-                   0 on success and -1 on failure
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier to be associated WITH the NEW link.
-  lapl_id       - Link access property list identifier to be associated WITH the NEW link.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Original file or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: src_name  ! Original link name.
-    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
-                                              ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
-                                                    ! to be associated WITH the NEW link.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-                                                    ! to be associated WITH the NEW link.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Of_c.html b/fortran/doc/DevelGuide/src/H5Of_c.html deleted file mode 100644 index e4a97e9..0000000 --- a/fortran/doc/DevelGuide/src/H5Of_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Of.c - - - - - -
-
- -

H5Of

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5O Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Off_f90.html b/fortran/doc/DevelGuide/src/H5Off_f90.html deleted file mode 100644 index 790810e..0000000 --- a/fortran/doc/DevelGuide/src/H5Off_f90.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -./src/H5Off.f90 - - - - - -
-
- -

H5O

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5O
-
-

FILE

-
  fortran/src/H5Off.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5O functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5oclose_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oclose_f
-
-

PURPOSE

-
  Closes an object in an HDF5 file.
-
-

INPUTS

-
  object_id     - Object identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  December 17, 2008
-
-

SOURCE

-
  SUBROUTINE h5oclose_f(object_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: object_id
-    INTEGER,        INTENT(OUT) :: hdferr
-
- -
- -

h5olink_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5olink_f
-
-

PURPOSE

-
  Creates a hard link to an object in an HDF5 file.
-
-

INPUTS

-
  object_id     - Object to be linked.
-  new_loc_id    - File or group identifier specifying location at which object is to be linked.
-  new_link_name - Name of link to be created, relative to new_loc_id.
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: object_id  ! Object to be linked
-    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier specifying
-                                             ! location at which object is to be linked.
-    CHARACTER(LEN=*), INTENT(IN) :: new_link_name ! Name of link to be created, relative to new_loc_id.
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          !   Success:  0
-                                          !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link creation property list identifier.
-
- -
- -

h5oopen_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oopen_f
-
-

PURPOSE

-
  Opens an object in an HDF5 file by location identifier and path name.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  name          - Path to the object, relative to loc_id.
-
-

OUTPUTS

-
  obj_id        - Object identifier for the opened object
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Access property list identifier for the link pointing to the object
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Path to the object, relative to loc_id
-    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          !   Success:  0
-                                          !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Attribute access property list
-
- -
- -

h5open_by_addr_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oopen_by_addr_f 
-
-

PURPOSE

-
  Opens an object using its address within an HDF5 file. 
-
-

INPUTS

-
    loc_id - File or group identifier
-    addr   - Object’s address in the file
- OUTPUTS: 
-    obj_id - Object identifier for the opened object
-    hdferr - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  September 14, 2009
-
-

SOURCE

-
  SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    INTEGER(HADDR_T), INTENT(IN) :: addr  ! Objectâs address in the file
-    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pf_c.html b/fortran/doc/DevelGuide/src/H5Pf_c.html deleted file mode 100644 index 6b8079a..0000000 --- a/fortran/doc/DevelGuide/src/H5Pf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Pf.c - - - - - -
-
- -

H5Pf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5P Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html deleted file mode 100644 index 51882ba..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html +++ /dev/null @@ -1,832 +0,0 @@ - - - - - - - -./src/H5Pff_F03.f90 - - - - - -
-
- -

H5P (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions.
-  It contains the same functions as H5Pff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Pff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_double
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pcreate_class_f

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pcreate_class_f
-
-

PURPOSE

-
  Create a new property list class
-
-

INPUTS

-
  parent        - Property list identifier of the parent class
-                  Possible values include:
-                   H5P_ROOT_F
-                   H5P_FILE_CREATE_F
-                   H5P_FILE_ACCESS_F
-                   H5P_DATASET_CREATE_F
-                   H5P_DATASET_XFER_F
-                   H5P_FILE_MOUNT_F
-  name          - name of the class we are creating
-
-

OUTPUTS

-
  class         - porperty list class identifier
-  hdferr:       - error code
-
-  Success: 0
-  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  H5P_cls_create_func_t (create) - Callback routine called when a property list is created
-  create_data                    - User pointer to any class creation information needed
-  H5P_cls_copy_func_t   (copy)   - Callback routine called when a property list is copied
-  copy_data                      - User pointer to any class copy information needed
-  H5P_cls_close_func_t  (close)  - Callback routine called when a property list is being closed
-  close_data                     - User pointer to any class close information needed
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

HISTORY

-
  Added callback arguments
-  M. Scot Breitenfeld, July 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
-    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-    TYPE(C_PTR), OPTIONAL :: create_data, copy_data, close_data
-    TYPE(C_FUNPTR), OPTIONAL :: create, copy, close
-
- -
- -

h5pget_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_char
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
-    CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pget_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_integer
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    INTEGER,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pget_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_real
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
-    REAL,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pinsert_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_char
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pinsert_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_double
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    DOUBLE PRECISION, INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_integer
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pinsert_ptr

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_ptr
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size  ! Size of property value
-    TYPE(c_ptr),   INTENT(IN) :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pinsert_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_real
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    REAL,   INTENT(IN), TARGET :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_char
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_double
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class  ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size  ! size of the property value
-    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pregister_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_integer
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class    ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pregister_ptr

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_ptr
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    TYPE(C_PTR), INTENT(IN) :: value      ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_real
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
-    REAL,   INTENT(IN), TARGET :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset(get)fill_value_f

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset(get)fill_value_f
-
-

PURPOSE

-
  Sets(gets) fill value for a dataset creation property list
-
-

INPUTS

-
  prp_id        - dataset creation property list identifier
-  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-
-

OUTPUTS

-
  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-  Added the recommended way of passing fillvalue
-  and that is by passing the C address, all other
-  ways are obsolete and should be avoided. June, 2008 MSB
-
-

NOTES

-
  h5pset(get)fill_value_f function is overloaded to support
-  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
-                                          ! of fillvalue datatype
-                                          ! (in memory)
-    INTEGER, INTENT(IN), TARGET :: fillvalue   ! Fillvalue
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5pset_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_char
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_double
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr                  ! Error code
-
- -
- -

h5pset_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_integer
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pset_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_real
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
-    REAL,   INTENT(IN), TARGET :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html deleted file mode 100644 index 5f8d579..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - -./src/H5Pff_F90.f90 - - - - - -
-
- -

H5P (_F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5P functions. It contains
-  the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Pff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pcreate_class_f

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pcreate_class_f
-
-

PURPOSE

-
  Create a new property list class
-
-

INPUTS

-
  parent        - Property list identifier of the parent class
-                  Possible values include:
-                    H5P_ROOT_F
-                    H5P_FILE_CREATE_F
-                    H5P_FILE_ACCESS_F
-                    H5P_DATASET_CREATE_F
-                    H5P_DATASET_XFER_F
-                    H5P_FILE_MOUNT_F
-  name          - name of the class we are creating
-
-

OUTPUTS

-
  class         - property list class identifier
-  hdferr        - error code
-                   Success: 0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class
-                                          ! identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
-    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pget_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_char
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pget_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_double
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pget_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_integer
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    INTEGER,   INTENT(OUT) :: value       ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pget_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_real
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    REAL,   INTENT(OUT) :: value          ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_char
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pinsert_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_double
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    DOUBLE PRECISION, INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_integer
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    INTEGER,   INTENT(IN) :: value        ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_real
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    REAL,   INTENT(IN) :: value           ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_char
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_double
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! Size of the property value
-    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_integer
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    INTEGER,   INTENT(IN) :: value        ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_real
-
- PURPOSE       Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
-    REAL,   INTENT(IN) :: value           ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset(get)fill_value_f

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset(get)fill_value_f
-
-

PURPOSE

-
  Sets(gets) fill value for a dataset creation property list
-
-

INPUTS

-
  prp_id        - dataset creation property list identifier
-  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-
-

OUTPUTS

-
  type_id      - datatype identifier for fill value
-  fillvalue    - fill value
-  hdferr       - error code
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-

NOTES

-
  h5pset(get)fill_value_f function is overloaded to support
-  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
-                                          ! of fillvalue datatype
-                                          ! (in memory)
-    INTEGER, INTENT(IN) :: fillvalue      ! Fillvalue
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_char
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_double
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_integer
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    INTEGER, INTENT(IN) :: value          ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_real
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    REAL, INTENT(IN) :: value             ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_f90.html b/fortran/doc/DevelGuide/src/H5Pff_f90.html deleted file mode 100644 index 0e9ff5c..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_f90.html +++ /dev/null @@ -1,4752 +0,0 @@ - - - - - - - -./src/H5Pff.f90 - - - - - -
-
- -

H5P (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5P functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_hyper_vector_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_hyper_vector_size_f 
-
-

PURPOSE

-
  Get the number of "I/O" vectors (vector size)
-
-

INPUTS

-
  plist_id     - dataset transfer property list identifier
-
-

OUTPUTS

-
  size         - vector size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Vector size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_family_offset_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_family_offset_f 
-
-

PURPOSE

-
  Sets offset for family file driver.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  offset       - file offset
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  19 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_family_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_family_f 
-
-

PURPOSE

-
  Sets the file access property list to use the family driver. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  memb_size    - size in bytes of each file member 
-  memb_plist   - identifier of the file access property 
-                 list to be used for each family member
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes,
-                                              ! of each family member
-    INTEGER(HID_T), INTENT(IN) :: memb_plist  ! Identifier of the file 
-                                              ! access property list for 
-                                              ! each member of the family
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_meta_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_meta_block_size_f 
-
-

PURPOSE

-
  Sets the minimum size of metadata block allocations 
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - metatdata block size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size    ! Block size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pall_filters_avail_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pall_filters_avail_f 
-
-

PURPOSE

-
  Checks if all filters set in the dataset creation
-  property list are available
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-
-

OUTPUTS

-
  flag         - .TRUE. if all filters are available
-                 .FALSE. otherwise
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
-                                         !  list identifier 
-    LOGICAL, INTENT(OUT) :: flag         ! .TRUE. if all filters are available
-                                         ! .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pclose_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pclose_class_f 
-
-

PURPOSE

-
  Closes an existing property list class.
-
-

INPUTS

-
  class        - Property list class identifier
-
-

OUTPUTS

-
  hdferr       - error code         
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pclose_class_f(class, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-                                        ! 0 on success and -1 on failure
-
- -
- -

h5pclose_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pclose_f 
-
-

PURPOSE

-
  Terminates access to a property list. 
-
-

INPUTS

-
  prp_id - identifier of the property list to 
-           terminate access to. 
-
-

OUTPUTS

-
  hdferr - error code          
-           Success:  0
-           Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pclose_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pcopy_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pcopy_f 
-
-

PURPOSE

-
  Copies an existing property list to create a new 
-  property list
-
-

INPUTS

-
  prp_id       - property list identifier
-
-

OUTPUTS

-
  new_prp_id   - new property list identifier
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-

SOURCE

-
  SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pcopy_prop_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pcopy_prop_f 
-
-

PURPOSE

-
  Copies a property from one list or class to another.
-
-

INPUTS

-
  dst_id               - Identifier of the destination property list
-  src_id               - Identifier of the source property list 
-  name                 - name of the property to copy
-
-

OUTPUTS

-
  hdferr:              - error code
-                          Success: 0 
-                          Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dst_id  ! Destination property list 
-                                          ! identifier 
-    INTEGER(HID_T), INTENT(IN) :: src_id  ! Source property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Property name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pcreate_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pcreate_f 
-
-

PURPOSE

-
       Creates a new property as an instance of a property 
-       list class.
-
-

INPUTS

-
  class  - type of the property class to be created.
-           Possible values are:
-             H5P_FILE_CREATE_F
-             H5P_FILE_ACCESS_F
-             H5P_DATASET_CREATE_F
-             H5P_DATASET_XFER_F
-             H5P_FILE_MOUNT_F
-
-

OUTPUTS

-
  prp_id - property list identifier
-  hdferr - error code          
-            Success:  0
-            Failure: -1 
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pcreate_f(class, prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! The type of the property list 
-                                          ! to be created. Possible values are: 
-                                          !  H5P_FILE_CREATE_F
-                                          !  H5P_FILE_ACCESS_F
-                                          !  H5P_DATASET_CREATE_F
-                                          !  H5P_DATASET_XFER_F
-                                          !  H5P_FILE_MOUNT_F
-    INTEGER(HID_T), INTENT(OUT) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pequal_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pequal_f 
-
-

PURPOSE

-
  Checks if two property lists are eqaul
-
-

INPUTS

-
  plist1_id    - property list identifier
-  plist2_id    - property list identifier
-
-

OUTPUTS

-
  flag         - flag, possible values
-                   .TRUE. or .FALSE.
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1, flag is set to .FALSE.   
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002   
-
-

SOURCE

-
  SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier 
-    INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier 
-    LOGICAL, INTENT(OUT)       :: flag      ! Flag
-    INTEGER, INTENT(OUT)       :: hdferr    ! Error code
-                                            !  0 on success and -1 on failure
-
- -
- -

h5pexist_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pexist_f 
-
-

PURPOSE

-
  Queries whether a property name exists in a property list or class. 
-
-

INPUTS

-
  prp_id       - property list identifier to query
-  name         - name of property to check for
-
-

OUTPUTS

-
  flag         - logical flag
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    LOGICAL, INTENT(OUT) :: flag          ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pfill_value_defined_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pfill_value_defined_f
-
-

PURPOSE

-
  Check if fill value is defined.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  flag         - fill value status flag
-                 Possible values are:
-                   H5D_FILL_VALUE_ERROR_F
-                   H5D_FILL_VALUE_UNDEFINED_F
-                   H5D_FILL_VALUE_DEFAULT_F
-                   H5D_FILL_VALUE_USER_DEFINED_F
-  hdferr       - error code            
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002
-
-

SOURCE

-
  SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag            ! Fill value status flag
-                                            !  H5D_FILL_VALUE_ERROR_F
-                                            !  H5D_FILL_VALUE_UNDEFINED_F
-                                            !  H5D_FILL_VALUE_DEFAULT_F
-                                            !  H5D_FILL_VALUE_USER_DEFINED_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_alignment_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_alignment_f 
-
-

PURPOSE

-
  Retrieves the current settings for alignment 
-  properties from a file access property list. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  threshold    - threshold value       
-  alignment    - alignment value
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_alignment_f(prp_id, threshold,  alignment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value
-    INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pget_alloc_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_alloc_time_f
-
-

PURPOSE

-
  Get space allocation time for dataset during creation.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  flag         - allocation time flag:
-                   H5D_ALLOC_TIME_ERROR_F
-                   H5D_ALLOC_TIME_DEFAULT_F
-                   H5D_ALLOC_TIME_EARLY_F
-                   H5D_ALLOC_TIME_LATE_F
-                   H5D_ALLOC_TIME_INCR_F
-  hdferr:      - error code            
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag   ! Allocation time flag:
-                                   !  H5D_ALLOC_TIME_ERROR_F
-                                   !  H5D_ALLOC_TIME_DEFAULT_F
-                                   !  H5D_ALLOC_TIME_EARLY_F
-                                   !  H5D_ALLOC_TIME_LATE_F
-                                   !  H5D_ALLOC_TIME_INCR_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

H5Pget_attr_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_attr_creation_order_f
-
-

PURPOSE

-
  Retrieves tracking and indexing settings for attribute creation order
-
-

INPUTS

-
  ocpl_id         - Object (group or dataset) creation property list identifier
-
-

OUTPUTS

-
  crt_order_flags - Flags specifying whether to track and index attribute creation order
-  hdferr          - Error code         
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (group or dataset) creation property list identifier 
-    INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order 
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

H5Pget_attr_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_attr_phase_change_f 
-
-

PURPOSE

-
  Retrieves attribute storage phase change thresholds 
-
-

INPUTS

-
  ocpl_id         - Object (dataset or group) creation property list identifier
-
-

OUTPUTS

-
  max_compact     - Maximum number of attributes to be stored in compact storage
-                    (Default: 8)
-  min_dense       - Minimum number of attributes to be stored in dense storage
-                    (Default: 6)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
-                                          ! (Default: 8)
-    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
-                                          ! (Default: 6)
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_btree_ratios_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_btree_ratios_f
-
-

PURPOSE

-
  Gets B-tree split ratios for a dataset transfer property list
-
-

INPUTS

-
  prp_id       - the dataset transfer property list 
-                 identifier 
-
-

OUTPUTS

-
  left         - the B-tree split ratio for left-most nodes 
-  middle       - the B-tree split ratio for all other nodes
-  right        - the B-tree split ratio for right-most nodes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    REAL, INTENT(OUT) :: left   ! The B-tree split ratio for left-most nodes.
-    REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes 
-    REAL, INTENT(OUT) :: right  ! The B-tree split ratio for right-most 
-                                !  nodes and lone nodes.
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pget_buffer_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_buffer_f 
-
-

PURPOSE

-
  Gets size for conversion buffer
-
-

INPUTS

-
  plist_id     - data transfer property list identifier
-
-

OUTPUTS

-
  size         - buffer size 
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 2, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Buffer size in bytes; 
-                                           !  buffer is allocated and freed by 
-                                           !  the library.
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_cache_f 
-
-

PURPOSE

-
  Queries the meta data cache and raw data chunk cache 
-  parameters.  
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  mdc_nelmts   - number of elements (objects) in the meta 
-                 data cache 
-  rdcc_nelmts  - number of elements (objects) in the raw 
-                 data chunk cache 
-  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
-  rdcc_w0      - preemption policy (0 or 1)
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-  Bug fix: type of the rdcc_nelmts parameter should be INTEGER
-  instead of INTEGER(SIZE_T) October 10, 2003 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: mdc_nelmts   ! Number of elements (objects)
-                                         !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts  ! Number of elements (objects)
-                                                 !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes  ! Total size of the raw data 
-                                                 !  chunk cache, in bytes 
-    REAL, INTENT(OUT) :: rdcc_w0                 ! Preemption policy
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

H5Pget_char_encoding_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_char_encoding_f
-
-

PURPOSE

-
  Retrieves the character encoding used to create a string
-
-

INPUTS

-
  plist_id - Property list identifier
-
-

OUTPUTS

-
  encoding - Valid values for encoding are:
-               H5T_CSET_ASCII_F -> US ASCII
-               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
-  hdferr   - Error code                
-               Success:  0
-               Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE  h5pget_char_encoding_f(plist_id, encoding, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
-
-    INTEGER, INTENT(OUT) :: encoding       ! Valid values for encoding are:
-                                           !  H5T_CSET_ASCII_F -> US ASCII
-                                           !  H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

H5Pget_chunk_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_chunk_cache_f
-
-

PURPOSE

-
  Retrieves the maximum possible number of elements in the meta
-  data cache and the maximum possible number of elements and
-  bytes and the RDCC_W0 value in the raw data chunk cache.  Any
-  (or all) arguments may be null pointers in which case the
-  corresponding datum is not returned.  If these properties have
-  not been set on this property list, the default values for a
-  file access property list are returned.
-
-

INPUTS

-
  dapl_id            - Dataset access property list identifier.
-
-

OUTPUTS

-
  rdcc_nslots        - Number of chunk slots in the raw data chunk cache hash table. 
-  rdcc_nbytes        - Total size of the raw data chunk cache, in bytes. 
-  rdcc_w0            - Preemption policy. 
-  hdferr             - Error code              
-                        Success:  0
-                        Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dapl_id       ! Dataset access property list identifier.
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table.
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. 
-    REAL, INTENT(OUT) :: rdcc_w0                ! Preemption policy.
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code:
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_chunk_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_chunk_f 
-
-

PURPOSE

-
  Retrieves the size of chunks for the raw data of a 
-  chunked layout dataset
-
-

INPUTS

-
  prp_id       - property list identifier
-  ndims        - size of dims array
-
-

OUTPUTS

-
  dims         - array with dimension sizes for each chunk
-  hdferr       - error code            
-                  Success:  number of chunk dimensions
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions to
-                                         ! to return
-    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims    
-                                         ! Array containing sizes of
-                                         ! chunk dimensions
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         !  number of chunk dimensions on success,
-                                         !  -1 on failure
-
- -
- -

h5pget_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_f 
-
-

PURPOSE

-
  Returns the property list class for a property list.
-
-

INPUTS

-
  prp_id       - property list identifier
-
-

OUTPUTS

-
  classtype    - property list class
-                 Possible values are:
-                  H5P_ROOT_F
-                  H5P_FILE_CREATE_F
-                  H5P_FILE_ACCESS_F
-                  H5PE_DATASET_CREATE_F
-                  H5P_DATASET_XFER_F
-                  H5P_FILE_MOUNT_F
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1 
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: classtype    ! The type of the property list 
-                                         ! to be created. Possible values are: 
-                                         !  H5P_ROOT_F
-                                         !  H5P_FILE_CREATE_F
-                                         !  H5P_FILE_ACCESS_F
-                                         !  H5PE_DATASET_CREATE_F 
-                                         !  H5P_DATASET_XFER_F
-                                         !  H5P_FILE_MOUNT_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_class_name_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_name_f 
-
-

PURPOSE

-
  Queries the name of a class.
-
-

INPUTS

-
  prp_id       - property list identifier to query
-
-

OUTPUTS

-
  name         - name of a class
-  size         - Actual length of the class name
-                   NOTE: If provided buffer "name" is smaller,
-                   than name will be truncated to fit into
-                   provided user buffer
-  hdferr:      - error code
-                  Success: 0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

HISTORY

-
 Returned the size of name as an argument      
-
-

SOURCE

-
  SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name
-    INTEGER, INTENT(OUT) :: size          ! Actual length of the class name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_class_parent_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_parent_f 
-
-

PURPOSE

-
  Retrieves the parent class of a genric property class. 
-
-

INPUTS

-
  prp_id       - property list identifier to query
-
-

OUTPUTS

-
  parent_id    - identifier of the parent class
-  hdferr:      - error code          
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list 
-                                             ! identifier 
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pget_copy_object_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_copy_object_f 
-
-

PURPOSE

-
  Retrieves the properties to be used when an object is copied.
-
-

INPUTS

-
  ocp_plist_id - Object copy property list identifier
-
-

OUTPUTS

-
  copy_options - Copy option(s) to be get
-  hdferr       - Error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
-    INTEGER, INTENT(OUT) :: copy_options       ! Valid copy options returned are:
-                                               !   H5O_COPY_SHALLOW_HIERARCHY_F
-                                               !   H5O_COPY_EXPAND_SOFT_LINK_F 
-                                               !   H5O_COPY_EXPAND_EXT_LINK_F
-                                               !   H5O_COPY_EXPAND_REFERENCE_F
-                                               !   H5O_COPY_WITHOUT_ATTR_FLAG_F
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

H5Pget_create_inter_group_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_create_inter_group_f
-
-

PURPOSE

-
  Determines whether property is set to enable creating missing intermediate groups.
-
-

INPUTS

-
  lcpl_id            - Link creation property list identifier
-  crt_intermed_group - Specifying whether to create intermediate groups upon 
-                       the creation of an object
-
-

OUTPUTS

-
  hdferr             - Error code              
-                        Success:  0
-                        Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 4, 2008
-
-

HISTORY

-
 The long subroutine name (>31) on older f90 compilers causes problems
-          so the name was shortened
-
-

SOURCE

-
  SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
-    INTEGER, INTENT(IN) :: crt_intermed_group  ! Flag specifying whether to create intermediate groups
-                                               ! upon creation of an object
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pget_data_transform_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_data_transform_f 
-
-

PURPOSE

-
  Retrieves a data transform expression.
-
-

INPUTS

-
  plist_id   - Identifier of the property list or class
-
-

OUTPUTS

-
  expression - buffer to hold transform expression
-  hdferr     - Error code
-                 Success:  Actual lenght of the expression
-                           If provided buffer "expression" is 
-                           smaller, than expression will be 
-                           truncated to fit into
-                           provided user buffer
-                 Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 19, 2008
-
-

HISTORY

-
 Should hdferr return just 0 or 1 and add another arguement for the size?
-
-

SOURCE

-
SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id         ! Identifier of the property list or class
-    CHARACTER(LEN=*), INTENT(OUT) :: expression    ! Buffer to hold transform expression
-    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression
-    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
-                                                   !  0 on success and -1 on failure
-
- -
- -

h5pget_driver_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_driver_f 
-
-

PURPOSE

-
  Returns low-lever driver identifier. 
-
-

INPUTS

-
  prp_id  - file access or data transfer property 
-            list identifier. 
-
-

OUTPUTS

-
  driver  - low-level driver identifier
-  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_edc_check_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_edc_check_f 
-
-

PURPOSE

-
  Queries error detecting  
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier 
-    INTEGER, INTENT(OUT) :: flag         ! Checksum filter flag
-                                         ! May have one of the following values:
-                                         !  H5Z_ERROR_EDC_F
-                                         !  H5Z_DISABLE_EDC_F
-                                         !  H5Z_ENABLE_EDC_F
-                                         !  H5Z_NO_EDC_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pget_est_link_info_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_est_link_info_f 
-
-

PURPOSE

-
  Queries data required to estimate required local heap or object header size.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier
-
-

OUTPUTS

-
  est_num_entries - Estimated number of links to be inserted into group
-  est_name_len    - Estimated average length of link names
-  hdferr          - Error code
-                     Success:  0
-                     Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier  
-    INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group
-    INTEGER, INTENT(OUT) :: est_name_len    ! Estimated average length of link names
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_external_count_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_external_count_f 
-
-

PURPOSE

-
  Returns the number of external files for a dataset. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  count        - number of external files for the 
-                 specified dataset
-  hdferr       - error code            
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: count        ! Number of external files for the 
-                                         ! Specified dataset
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_external_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_external_f 
-
-

PURPOSE

-
  Returns information about an external file. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  idx          - external file index 
-  name_size    - maximum size of name array
-  name         - name of the external file     
-  name         - name of external file
-  offset       - offset in bytes from the beginning of the 
-                 file to the location in the file
-                 where the data starts
-  bytes        - size of the external file data
-  hdferr       - error code            
-                  Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    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 
-                                             !  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 
-                                             !  file for the data
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_core_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_fapl_core_f 
-
-

PURPOSE

-
  Queries core file driver properties. 
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  increment     - size, in bytes, of memory increments 
-  backing_store - boolean flag indicating whether to write 
-                  the file contents to disk when the file is closed. 
-  hdferr        - error code           
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes.
-    LOGICAL, INTENT(OUT) :: backing_store   ! Flag to indicate that
-                                            ! entire file contents are flushed to a file 
-                                            ! with the same name as this core file.
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_direct_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_direct_f
-
-

PURPOSE

-
  Gets up use of the direct I/O driver.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-
-

OUTPUTS

-
  alignment    - Required memory alignment boundary
-  block_size   - File system block size
-  cbuf_size    - Copy buffer size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
-    IMPLICIT NONE  
-    INTEGER(HID_T), INTENT(IN) :: fapl_id       ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: alignment   ! Required memory alignment boundary!
-    INTEGER(SIZE_T), INTENT(OUT) :: block_size  ! File system block size
-    INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size   ! Copy buffer size
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_family_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_family_f 
-
-

PURPOSE

-
  Returns file access property list information.       
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  memb_size    - size in bytes of each file member 
-  memb_plist   - identifier of the file access property 
-                 list to be used for each family member
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes,
-                                               ! of each family member
-    INTEGER(HID_T), INTENT(OUT) :: memb_plist  ! Identifier of the file 
-                                               ! access property list for 
-                                               ! each member of the family
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_multi_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_multi_f 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  mem_map      - mapping array
-  memb_fapl    - property list for each memory usage type
-  memb_name    - names of member file
-  relax        - flag 
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  maxlen_out   - maximum length for memb_name array element 
-
-

AUTHOR

-
  Elena Pourmal
-  24 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map
-    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl
-    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name
-    !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
-    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
-    INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out 
-    LOGICAL, INTENT(OUT) :: relax
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_fclose_degree_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fclose_degree_f 
-
-

PURPOSE

-
  Returns the degree for the file close behavior.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-
-

OUTPUTS

-
  degree       - Possible values are:
-                  H5F_CLOSE_DEFAULT_F
-                  H5F_CLOSE_WEAK_F
-                  H5F_CLOSE_SEMI_F
-                  H5F_CLOSE_STRONG_F
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002   
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
-    INTEGER, INTENT(OUT) :: degree        ! Possible values are: 
-                                          !  H5F_CLOSE_DEFAULT_F
-                                          !  H5F_CLOSE_WEAK_F
-                                          !  H5F_CLOSE_SEMI_F
-                                          !  H5F_CLOSE_STRONG_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_fill_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_fill_time_f
-
-

PURPOSE

-
  Get fill value writing time for dataset
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  flag         - fill time flag:
-                  H5D_FILL_TIME_ERROR_F
-                  H5D_FILL_TIME_ALLOC_F
-                  H5D_FILL_TIME_NEVER_F
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag   ! Fill time flag:
-                                   !  H5D_FILL_TIME_ERROR_F
-                                   !  H5D_FILL_TIME_ALLOC_F
-                                   !  H5D_FILL_TIME_NEVER_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pget_filter_by_id_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_filter_by_id_f 
-
-

PURPOSE

-
  Returns information about a filter in a pipeline
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-
-

OUTPUTS

-
  filter_id    - filter identifier
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-  namelen      - number of characters in the name buffer
-  name         - buffer to retrieve filter name
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter_id       ! Filter identifier
-    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts     ! Number of elements in cd_values.
-    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: flags          ! Bit vector specifying certain general
-                                           ! properties of the filter.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name.
-    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Name of the filter
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_filter_f 
-
-

PURPOSE

-
  Returns information about a filter in a pipeline
-
-

INPUTS

-
  prp_id        - data creation or transfer property list 
-                  identifier
-  filter_number - sequence number within the filter
-                  pipeline of the filter for which 
-                  information is sought
-
-

OUTPUTS

-
  filter_id    - filter identification number
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-  namelen      - number of characters in the name buffer
-  name         - buffer to retrieve filter name
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter
-                                         !  pipeline of the filter for which 
-                                         !  information is sought
-    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values  ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: flags        ! Bit vector specifying certain general
-                                         !  properties of the filter.
-    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts  ! Number of elements in cd_values.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen       ! Anticipated number of characters in name.
-    CHARACTER(LEN=*), INTENT(OUT) :: name        ! Name of the filter
-    INTEGER, INTENT(OUT) :: filter_id            ! Filter identification number  
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pget_gc_references_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_gc_references_f 
-
-

PURPOSE

-
  Returns garbage collecting references setting.       
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  gc_reference - flag for stting garbage collection on 
-                 and off (1 or 0)
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting
-                                         !  references for the file
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_istore_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_istore_k_f 
-
-

PURPOSE

-
  Queries the 1/2 rank of an indexed storage B-tree. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  ik           - 1/2 rank of chunked storage B-tree
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: ik           ! 1/2 rank of chunked storage B-tree
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_layout_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_layout_f 
-
-

PURPOSE

-
  Returns the layout of the raw data for a dataset. 
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-
-

OUTPUTS

-
  layout       - type of storage layout for raw data
-                 possible values are:
-                  H5D_COMPACT_F
-                  H5D_CONTIGUOUS_F
-                  H5D_CHUNKED_F
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: layout       ! Type of storage layout for raw data
-                                         ! possible values are:
-                                         !  H5D_COMPACT_F(0)
-                                         !  H5D_CONTIGUOUS_F(1)
-                                         !  H5D_CHUNKED_F(2)
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pget_link_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_link_creation_order_f
-
-

PURPOSE

-
  Queries whether link creation order is tracked and/or indexed in a group.
-
-

INPUTS

-
  gcpl_id - Group creation property list identifier
-
-

OUTPUTS

-
  crt_order_flags - Creation order flag(s)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier
-    INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s)
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pget_link_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_link_phase_change_f
-
-

PURPOSE

-
  Queries the settings for conversion between compact and dense groups.
-
-

INPUTS

-
  gcpl_id      - Group creation property list identifier
-
-

OUTPUTS

-
  max_compact  - Maximum number of attributes to be stored in compact storage
-  min_dense    - Minimum number of attributes to be stored in dense storage
-  hdferr       - Error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 20, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
-    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
-    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pget_local_heap_size_hint_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_local_heap_size_hint_f 
-
-

PURPOSE

-
  Queries the local heap size hint for original-style groups.
-
-

INPUTS

-
  gcpl_id   - Group creation property list identifier
-
-

OUTPUTS

-
  size_hint - Hint for size of local heap
-  hdferr    - Error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id     ! Group creation property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pget_meta_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_meta_block_size_f 
-
-

PURPOSE

-
  Gets the minimum size of metadata block allocations 
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - metatdata block size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Block size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_nfilters_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_nfilters_f 
-
-

PURPOSE

-
  Returns the number of filters in the pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-
-

OUTPUTS

-
  nfilters     - number of filters in the pipeline
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: nfilters     ! The number of filters in the pipeline
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_nlinks_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_nlinks_f 
-
-

PURPOSE

-
  Gets maximum number of soft or user-defined link traversals.
-
-

INPUTS

-
  lapl_id - File access property list identifier
-  nlinks  - Maximum number of links to traverse
-
-

OUTPUTS

-
  hdferr  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lapl_id  ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_npros_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_npros_f 
-
-

PURPOSE

-
  Queries number of properties in property list or class
-
-

INPUTS

-
  prp_id       - iproperty list identifier to query
-
-

OUTPUTS

-
  nprops       - number of properties in property object
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: nprops  ! Number of properties
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pget_obj_track_times_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_obj_track_times_f 
-
-

PURPOSE

-
  Returns whether times are tracked for an object.
-
-

INPUTS

-
  plist_id     - property list id
-  flag         - object timestamp setting
-                 .TRUE.,.FALSE.
-
-

OUTPUTS

-
  hdferr       - error code            
-                 Success:  0
-                 Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property 
-                                           ! list identifier 
-    LOGICAL, INTENT(OUT) :: flag   ! Object timestamp setting
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pget_preserve_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_preserve_f 
-
-

PURPOSE

-
  Checks status of the dataset transfer property list.
-
-

INPUTS

-
  prp_id  - property list identifier
-
-

OUTPUTS

-
  flag    - status flag
-  hdferr  - error code         
-       Success:  0
-       Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
- 
-  Datatype of the flag parameter is changed from 
-  INTEGER to LOGICAL 
-  June 4, 2003 
-
-

SOURCE

-
  SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    LOGICAL, INTENT(OUT) ::  flag        ! TRUE/FALSE flag. Shows status of the dataset's
-                                         ! transfer property for partial writing/reading
-                                         ! compound datatype
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_sec2_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_sec2_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
- SOURCE!          SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) 
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-            INTEGER, INTENT(OUT) :: sec2   ! value indicates whether the file
-            INTEGER, INTENT(OUT) :: hdferr  ! Error code
- 0 on success and -1 on failure
-
- -
- -

h5pget_sieve_buf_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sieve_buf_size_f 
-
-

PURPOSE

-
  Gets the maximum size of the data sieve buffer
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - sieve buffer size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Buffer size in bytes 
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_size_f 
-
-

PURPOSE

-
  Queries the size of a property value in bytes.
-
-

INPUTS

-
  prp_id       - property list identifier to query
-  name         - name of property to query
-
-

OUTPUTS

-
  size         - size of property in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to query
-    INTEGER(SIZE_T), INTENT(OUT) :: size  ! Size in bytes
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_sizes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sizes_f 
-
-

PURPOSE

-
  Retrieves the size of the offsets and lengths used 
-  in an HDF5 file
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  sizeof_addr  - size of an object offset in bytes 
-  sizeof_size  - size of an object length in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object
-                                                ! offset in bytes 
-    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object
-                                                ! length in bytes 
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_small_data_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_small_data_block_size_f 
-
-

PURPOSE

-
  Gets the minimum size of "small" raw data block
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - small raw data block size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Small raw data block size
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_split_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_split_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
!          SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,&
-!                                     raw_ext, raw_plist, hdferr)
-!            IMPLICIT NONE
-!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-!            INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta
-                                                         ! file extension to be copied to the
-                                                         ! meta_ext buffer
-
-!            CHARACTER(LEN=*), INTENT(OUT) :: meta_ext  !Name of the extension for
-                                                      !the metafile filename
-!            INTEGER(HID_T), INTENT(OUT) :: meta_plist  ! Identifier of the meta file
-                                                      ! access property list
-!            INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw
-                                                         ! file extension to be copied to the
-                                                         ! raw_ext buffer
-!            CHARACTER(LEN=*), INTENT(OUT) :: raw_ext  !Name extension for the raw file filename
-!            INTEGER(HID_T), INTENT(OUT) :: raw_plist  !Identifier of the raw file
-                                                     !access property list
-!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pget_stdio_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_stdio_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
!          SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr)
-!
-!            IMPLICIT NONE
-!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-!            INTEGER, INTENT(OUT) :: io   ! value indicates that the file
-                                         !access property list is set to
-                                         !the stdio driver
-!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pget_sym_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sym_k_f 
-
-

PURPOSE

-
  Retrieves the size of the symbol table B-tree 1/2 rank
-  and the symbol table leaf node 1/2 size. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  ik           - symbol table tree 1/2 rank
-  lk           - symbol table node 1/2 size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: ik           ! Symbol table tree rank
-    INTEGER, INTENT(OUT) :: lk           ! Symbol table node size
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_userblock_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_userblock_f 
-
-

PURPOSE

-
  Gets user block size.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  block_size   - size of the user block in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id         ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) ::  block_size ! Size of the 
-                                                 ! user-block in bytes 
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pget_version_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_version_f 
-
-

PURPOSE

-
  Retrieves the version information of various objects 
-  for a file creation property list
-
-

INPUTS

-
  prp_id       - file createion property list identifier
-
-

OUTPUTS

-
  boot         - super block version number
-  freelist     - global freelist version number
-  stab         - symbol table version number
-  shhdr        - shared object header version number
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_version_f(prp_id, boot, freelist, &
-       stab, shhdr, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
-    INTEGER, DIMENSION(:), INTENT(OUT) :: boot  ! Array to put boot
-                                                ! block version number
-    INTEGER, DIMENSION(:), INTENT(OUT) :: freelist  ! Array to put global
-                                                    ! Freelist version number
-
-    INTEGER, DIMENSION(:), INTENT(OUT) :: stab  ! Array to put symbol
-                                                ! table version number
-    INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared
-                                                ! object header version number
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pisa_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pisa_class_f 
-
-

PURPOSE

-
  Determines whether a property list is a member of a class. 
-
-

INPUTS

-
  plist        - property list identifier 
-  pclass       - identifier of the property class
-
-

OUTPUTS

-
  flag         - .TRUE. if a member, .FALSE. otherwise
-  hdferr:      - error code           
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist     ! Property list identifier 
-    INTEGER(HID_T), INTENT(IN) :: pclass    ! Class identifier
-    LOGICAL, INTENT(OUT) :: flag            ! logical flag
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pmodify_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pmodify_filter_f 
-
-

PURPOSE

-
  Adds a filter to the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be modified
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter        ! Filter to be modified
-    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
-                                         !  properties of the filter
-    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values
-    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5premove_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5premove_f 
-
-

PURPOSE

-
  Removes a property from a property list. 
-
-

INPUTS

-
  plid         - Property list identofoer
-  name         - name of the property to remove
-
-

OUTPUTS

-
  hdferr:      - error code
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5premove_f(plid, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plid   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         !  0 on success and -1 on failure
-
- -
- -

h5premove_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5premove_filter_f 
-
-

PURPOSE

-
  Delete one or more filters from the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be removed
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Quincey Koziol
-  January 27 2004
-
-

SOURCE

-
  SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list
-                                         ! identifier
-    INTEGER, INTENT(IN) :: filter        ! Filter to be removed
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_alignment_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_alignment_f 
-
-

PURPOSE

-
  Sets alignment properties of a file access property list. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  threshold    - threshold value       
-  alignment    - alignment value
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_alignment_f(prp_id, threshold,  alignment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value
-    INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_alloc_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_alloc_time_f
-
-

PURPOSE

-
  Set space allocation time for dataset during creation.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-  flag         - allocation time flag:
-                   H5D_ALLOC_TIME_ERROR_F
-                   H5D_ALLOC_TIME_DEFAULT_F
-                   H5D_ALLOC_TIME_EARLY_F
-                   H5D_ALLOC_TIME_LATE_F
-                   H5D_ALLOC_TIME_INCR_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: flag             ! Allocation time flag:
-                                            !  H5D_ALLOC_TIME_ERROR_F
-                                            !  H5D_ALLOC_TIME_DEFAULT_F
-                                            !  H5D_ALLOC_TIME_EARLY_F
-                                            !  H5D_ALLOC_TIME_LATE_F
-                                            !  H5D_ALLOC_TIME_INCR_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pset_attr_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_attr_creation_order_f 
-
-

PURPOSE

-
  Sets tracking and indexing of attribute creation order
-
-

INPUTS

-
  ocpl_id         - Object creation property list identifier
-  crt_order_flags - Flags specifying whether to track and index attribute creation order
-
-

OUTPUTS

-
  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(IN) :: crt_order_flags  ! Flags specifying whether to track and index attribute creation order
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pset_attr_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_attr_phase_change_f 
-
-

PURPOSE

-
  Sets attribute storage phase change thresholds.
-
-

INPUTS

-
  ocpl_id - Object (dataset or group) creation property list identifier
-
-

OUTPUTS

-
  max_compact     - Maximum number of attributes to be stored in compact storage
-                    (Default: 8)
-  min_dense       - Minimum number of attributes to be stored in dense storage
-                    (Default: 6)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
-                                          !(Default: 8)
-    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
-                                          ! (Default: 6)
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_btree_ratios_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_btree_ratios_f 
-
-

PURPOSE

-
  Sets B-tree split ratios for a dataset transfer 
-  property list. 
-
-

INPUTS

-
  prp_id       - the dataset transfer property list 
-                 identifier 
-  left         - the B-tree split ratio for left-most nodes 
-  middle       - the B-tree split ratio for all other nodes
-  right        - the B-tree split ratio for right-most nodes
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    REAL, INTENT(IN) :: left   ! The B-tree split ratio for left-most nodes.
-    REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes 
-    REAL, INTENT(IN) :: right  ! The B-tree split ratio for right-most 
-                               !  nodes and lone nodes. 
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pset_buffer_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_buffer_f 
-
-

PURPOSE

-
  Sets sixe for conversion buffer
-
-

INPUTS

-
  plist_id     - data transfer property list identifier
-  size         - buffer size 
-
-

OUTPUTS

-
  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 2, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Buffer size in bytes; 
-                                           ! buffer is allocated and freed by 
-                                           ! the library.
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_cache_f 
-
-

PURPOSE

-
  Sets the meta data cache and raw data chunk 
-  cache parameters
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  mdc_nelmts   - number of elements (objects) in the meta 
-                 data cache 
-  rdcc_nelmts  - number of elements (objects) in the raw 
-                 data chunk cache 
-  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
-  rdcc_w0      - preemption policy (0 or 1)
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: mdc_nelmts    ! Number of elements (objects)
-                                         !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects)
-                                               !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data 
-                                               !  chunk cache, in bytes 
-    REAL, INTENT(IN) :: rdcc_w0                ! Preemption policy
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               !  0 on success and -1 on failure
-
- -
- -

H5Pset_char_encoding_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_char_encoding_f
-
-

PURPOSE

-
  Sets the character encoding used to encode a string.
-
-

INPUTS

-
  plist_id - Property list identifier
-  encoding - Valid values for encoding are:
-               H5T_CSET_ASCII_F -> US ASCII
-               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
-
-

OUTPUTS

-
  hdferr   - Error code                
-               Success:  0
-               Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
-    INTEGER, INTENT(IN) :: encoding        ! String encoding character set:
-                                           !   H5T_CSET_ASCII_F -> US ASCII
-                                           !   H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_chunk_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_chunk_cache_f
-
-

PURPOSE

-
  Set the number of objects in the meta data cache and the
-  maximum number of chunks and bytes in the raw data chunk cache.
-  Once set, these values will override the values in the file access
-  property list.  Each of these values can be individually unset
-  (or not set at all) by passing the macros:
-    H5D_CHUNK_CACHE_NSLOTS_DFLT_F,
-    H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or
-    H5D_CHUNK_CACHE_W0_DFLT_F
-    as appropriate.
-
-  The RDCC_W0 value should be between 0 and 1 inclusive and
-  indicates how much chunks that have been fully read or fully
-  written are favored for preemption.  A value of zero means
-  fully read or written chunks are treated no differently than
-  other chunks (the preemption is strictly LRU) while a value
-  of one means fully read chunks are always preempted before
-  other chunks.
-
-

INPUTS

-
  dapl_id          - Dataset access property list identifier.
-  rdcc_nslots      - The number of chunk slots in the raw data chunk cache for this dataset.
-  rdcc_nbytes      - The total size of the raw data chunk cache for this dataset.
-  rdcc_w0          - The chunk preemption policy for this dataset.
-
-

OUTPUTS

-
  hdferr           - Error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dapl_id      ! Dataset access property list identifier.
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data 
-                                               ! chunk cache for this dataset.
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache 
-                                               ! for this dataset.
-    REAL, INTENT(IN) :: rdcc_w0                ! The chunk preemption policy for this dataset.
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_chunk_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_chunk_f 
-
-

PURPOSE

-
  Sets the size of the chunks used to store 
-  a chunked layout dataset. 
-
-

INPUTS

-
  prp_id  - datatset creation property list identifier
-  ndims   - number of dimensions for each chunk
-  dims    - array with dimension sizes for each chunk
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
   Explicit Fortran interfaces were added for 
-   called C functions (it is needed for Windows
-   port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions
-    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims    
-                                         ! Array containing sizes of
-                                         ! chunk dimensions
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_copy_object_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_copy_object_f 
-
-

PURPOSE

-
  Sets properties to be used when an object is copied.
-
-

INPUTS

-
  ocp_plist_id - Object copy property list identifier
-  copy_options - Copy option(s) to be set
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
-    INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are:
-                                        !   H5O_COPY_SHALLOW_HIERARCHY_F
-                                        !   H5O_COPY_EXPAND_SOFT_LINK_F
-                                        !   H5O_COPY_EXPAND_EXT_LINK_F
-                                        !   H5O_COPY_EXPAND_REFERENCE_F
-                                        !   H5O_COPY_WITHOUT_ATTR_FLAG_F
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-                                        ! 0 on success and -1 on failure
-
- -
- -

H5Pset_create_inter_group_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_create_inter_group_f
-
-

PURPOSE

-
  Specifies in property list whether to create missing intermediate groups.
-
-

INPUTS

-
  lcpl_id            - Link creation property list identifier
-  crt_intermed_group - crt_intermed_group specifying whether 
-                       to create intermediate groups upon the creation 
-                       of an object
-
-

OUTPUTS

-
  hdferr             - Error code              
-                         Success:  0
-                         Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-
-

HISTORY

-
 The long subroutine name (>31) on older f90 compilers causes problems
-          so had to shorten the name
-
-

SOURCE

-
  SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
-    INTEGER, INTENT(IN) :: crt_intermed_group  ! specifying whether to create intermediate groups
-                                               ! upon the creation of an object
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pset_data_transform_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_data_transform_f 
-
-

PURPOSE

-
  Sets a data transform expression.
-
-

INPUTS

-
  plist_id   - Identifier of the property list or class 
-  expression - Buffer to hold transform expression
-
-

OUTPUTS

-
  hdferr     - error code
-                 Success:  0
-                 Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 19, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id     ! Identifier of the property list or class
-    CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_deflate_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_deflate_f 
-
-

PURPOSE

-
   Sets compression method and compression level. 
-
-

INPUTS

-
   prp_id  - property list identifier
-   level   - compression level
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
       Elena Pourmal
-               August 12, 1999
-
-

HISTORY

-
       Explicit Fortran interfaces were added for 
-                       called C functions (it is needed for Windows
-                       port).  March 14, 2001
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: level         ! Compression level 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_edc_check_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_edc_check_f 
-
-

PURPOSE

-
  Enables/disables error detecting  
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-  flag         - EDC flag; possible values:
-                   H5Z_DISABLE_EDC_F
-                   H5Z_ENABLE_EDC_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: flag          ! Checksum filter flag
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_est_link_info_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_est_link_info_f 
-
-

PURPOSE

-
  Sets estimated number of links and length of link names in a group.
-
-

INPUTS

-
 gcpl_id         - Group creation property list identifier  
- est_num_entries - Estimated number of links to be inserted into group
- est_name_len    - Estimated average length of link names
-
-

OUTPUTS

-
  hdferr         - Error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! Group creation property list identifier  
-    INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group
-    INTEGER, INTENT(IN) :: est_name_len    ! Estimated average length of link names
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_external_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_external_f 
-
-

PURPOSE

-
  Adds an external file to the list of external files. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-  name         - name of external file
-  offset       - offset in bytes from the beginning of the 
-                 file to the location in the file
-                 where the data starts
-  bytes        - size of the external file data. 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  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 
-                                          !  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 
-                                          !  file for the data
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_core_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_core_f 
-
-

PURPOSE

-
  Modifies the file access property list to use the 
-  H5FD_CORE driver. 
-
-

INPUTS

-
  prp_id           - file access property list identifier
-  increment        - size, in bytes, of memory increments 
-  backing_store    - boolean flag indicating whether to write 
-                     the file contents to disk when the file is closed. 
-
-

OUTPUTS

-
  hdferr           - error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes.
-    LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that
-                                         ! entire file contents are flushed to a file 
-                                         ! with the same name as this core file.
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_direct_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_direct_f
-
-

PURPOSE

-
  Sets up use of the direct I/O driver.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-  alignment    - Required memory alignment boundary
-  block_size   - File system block size
-  cbuf_size    - Copy buffer size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
-    IMPLICIT NONE  
-    INTEGER(HID_T), INTENT(IN) :: fapl_id     ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: alignment  ! Required memory alignment boundary!
-    INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size
-    INTEGER(SIZE_T), INTENT(IN) :: cbuf_size  ! Copy buffer size
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_multi_l

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_multi_l 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  mem_map      - mapping array
-  memb_fapl    - property list for each memory usage type
-  memb_name    - names of member file
-  relax        - flag 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  20 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map ! Mapping array
-    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl ! Property list for each memory usage type
-    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name ! Names of member file
-    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr 
-    LOGICAL, INTENT(IN) :: relax     ! Flag
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_multi_s

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_multi_s 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  relax        - flag 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  31 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    LOGICAL, INTENT(IN) :: relax
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_sec2_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_sec2_f 
-
-

PURPOSE

-
  Sets the sec2 driver. 
-
-

INPUTS

-
  prp_id  - file access property list identifier
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_split_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_split_f 
-
-

PURPOSE

-
  Emulates the old split file driver. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  meta_ext     - name of the extension for the metafile 
-                 filename
-  meta_plist   - identifier of the meta file access property 
-                 list
-  raw_ext      - name extension for the raw file filename
-  raw_plist    - identifier of the raw file access property list
-
-

OUTPUTS

-
  hdferr       - error code            
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for
-                                             !  the metafile filename
-    INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file
-                                             !  access property list
-    CHARACTER(LEN=*), INTENT(IN) :: raw_ext  ! Name extension for the raw file filename
-    INTEGER(HID_T), INTENT(IN) :: raw_plist  ! Identifier of the raw file 
-                                             !  access property list
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_stdio_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_stdio_f 
-
-

PURPOSE

-
  Sets the standard I/O driver. 
-
-

INPUTS

-
  prp_id  - file access property list identifier
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fclose_degree_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fclose_degree_f 
-
-

PURPOSE

-
  Sets the degree for the file close behavior.
-
-

INPUTS

-
  fapl_id      - file access property list identifier
-  degree       - Possible values are:
-                   H5F_CLOSE_DEFAULT_F
-                   H5F_CLOSE_WEAK_F
-                   H5F_CLOSE_SEMI_F
-                   H5F_CLOSE_STRONG_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002   
-
-

SOURCE

-
  SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
-    INTEGER, INTENT(IN) :: degree         ! Possible values are: 
-                                          !  H5F_CLOSE_DEFAULT_F
-                                          !  H5F_CLOSE_WEAK_F
-                                          !  H5F_CLOSE_SEMI_F
-                                          !  H5F_CLOSE_STRONG_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_fill_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fill_time_f
-
-

PURPOSE

-
  Set fill value writing time for dataset
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-  flag         - fill time flag:
-                   H5D_FILL_TIME_ERROR_F
-                   H5D_FILL_TIME_ALLOC_F
-                   H5D_FILL_TIME_NEVER_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: flag             ! Fill time flag:
-                                            !  H5D_FILL_TIME_ERROR_F
-                                            !  H5D_FILL_TIME_ALLOC_F
-                                            !  H5D_FILL_TIME_NEVER_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pset_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_filter_f 
-
-

PURPOSE

-
  Adds a filter to the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be added to the pipeline 
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  February, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter        ! Filter to be added to the pipeline.
-    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
-                                       !  properties of the filter.
-    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values.
-    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pset_fletcher32_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fletcher32_f 
-
-

PURPOSE

-
  Sets Fletcher32 checksum of EDC for a dataset creation 
-  property list.
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_gc_references_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_gc_references_f 
-
-

PURPOSE

-
  Sets garbage collecting references flag. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  gc_reference - flag for stting garbage collection on 
-                 and off (1 or 0)
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: gc_reference  ! The flag for garbage collecting
-                                         !  references for the file
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_hyper_vector_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_hyper_vector_size_f 
-
-

PURPOSE

-
  Set the number of "I/O" vectors (vector size)
-
-

INPUTS

-
  plist_id     - dataset transfer property list identifier
-  size         - vector size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Vector size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_istore_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_istore_k_f 
-
-

PURPOSE

-
  Sets the size of the parameter used to control the 
-  B-trees for indexing chunked datasets
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  ik           - 1/2 rank of chunked storage B-tree
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ik            ! 1/2 rank of chunked storage B-tree
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_layout_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_layout_f 
-
-

PURPOSE

-
  Sets the type of storage used store the raw data 
-  for a dataset. 
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-  layout       - type of storage layout for raw data
-                 possible values are:
-                   H5D_COMPACT_F
-                   H5D_CONTIGUOUS_F
-                   H5D_CHUNKED_F
-
-

OUTPUTS

-
  hdferr      - error code             
-                 Success:  0
-                 Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: layout        ! Type of storage layout for raw data
-                                         ! possible values are:
-                                         !   H5D_COMPACT_F
-                                         !   H5D_CONTIGUOUS_F
-                                         !   H5D_CHUNKED_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pset_libver_bounds_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
             H5Pset_libver_bounds_f
-
-

PURPOSE

-
    Sets bounds on library versions, and indirectly format versions, to be used when creating objects.
-
-

INPUTS

-
  fapl_id - File access property list identifier
-  low     - The earliest version of the library that will be used for writing objects.
-  high    - The latest version of the library that will be used for writing objects.
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
-    INTEGER, INTENT(IN) :: low   ! The earliest version of the library that will be used for writing objects.
-                                 ! Currently, low must be one of two pre-defined values:
-                                 !            HDF_LIBVER_EARLIEST_F
-                                 !            HDF_LIBVER_LATEST_F
-    INTEGER, INTENT(IN) :: high  ! The latest version of the library that will be used for writing objects.
-                                 ! Currently, low must set to the pre-defined value:
-                                 !            HDF_LIBVER_LATEST_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

H5Pset_link_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_link_creation_order_f 
-
-

PURPOSE

-
    Sets creation order tracking and indexing for links in a group.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier
-  crt_order_flags - Creation order flag(s)
-
-

OUTPUTS

-
  hdferr           - Error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! File access property list identifier
-    INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s)
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_link_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_link_phase_change_f
-
-

PURPOSE

-
  Sets the parameters for conversion between compact and dense groups.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier  
-  max_compact     - Maximum number of attributes to be stored in compact storage
-  min_dense       - Minimum number of attributes to be stored in dense storage
-
-

OUTPUTS

-
  hdferr          - error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
-    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
-    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pset_local_heap_size_hint_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_local_heap_size_hint_f 
-
-

PURPOSE

-
  Sets the local heap size hint for original-style groups.
-
-

INPUTS

-
  gcpl_id   - Group creation property list identifier
-  size_hint - Hint for size of local heap
-
-

OUTPUTS

-
  hdferr    - Error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id    ! Group creation property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

H5Pset_nbit_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_nbit_f 
-
-

PURPOSE

-
  Sets up the use of the N-Bit filter.
-
-

INPUTS

-
  plist_id - Dataset creation property list identifier.
-
-

OUTPUTS

-
  hdferr   - Error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_nbit_f(plist_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_nlinks_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_nlinks_f 
-
-

PURPOSE

-
  Sets maximum number of soft or user-defined link traversals.
-
-

INPUTS

-
  lapl_id - File access property list identifier
-   nlinks - Maximum number of links to traverse
-
-

OUTPUTS

-
  hdferr  - Error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 24, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code   
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pset_obj_track_times_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_obj_track_times_f 
-
-

PURPOSE

-
  Set whether the birth, access, modification & change times for
-  an object are stored.
-
-  Birth time is the time the object was created.  Access time is
-  the last time that metadata or raw data was read from this
-  object.  Modification time is the last time the data for
-  this object was changed (either writing raw data to a dataset
-  or inserting/modifying/deleting a link in a group).  Change
-  time is the last time the metadata for this object was written
-  (adding/modifying/deleting an attribute on an object, extending
-  the size of a dataset, etc).
-
-   If these times are not tracked, they will be reported as
-   12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX
-   epoch) when queried.
-
-

INPUTS

-
  plist_id     - property list id
-  flag         - object timestamp setting
-                 .TRUE.,.FALSE.
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-       
-
-

SOURCE

-
  SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property
-                                           ! list identifier
-    LOGICAL, INTENT(IN) :: flag    ! Object timestamp setting
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pset_preserve_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_preserve_f 
-
-

PURPOSE

-
  Sets the dataset transfer property list status to 
-  TRUE or FALSE for initializing compound datatype
-  members during write/read operations.
-
-

INPUTS

-
  prp_id       - property list identifier
-  flag         - status flag
-
-

OUTPUTS

-
  hdferr       - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-                       
-  Datatype of the flag parameter is changed from 
-  INTEGER to LOGICAL June 4, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    LOGICAL, INTENT(IN) ::  flag         ! TRUE/FALSE flag to set the dataset
-                                         ! transfer property for partila writing/reading
-                                         ! compound datatype
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_scaleoffset_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_scaleoffset_f 
-
-

PURPOSE

-
  Sets up the use of the Scale-Offset filter.
-
-

INPUTS

-
  plist_id     - Dataset creation property list identifier.
-  scale_type   - Flag indicating compression method.
-  scale_factor - Parameter related to scale.
-
-

OUTPUTS

-
  hdferr        - Error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: scale_type      ! Flag indicating compression method.
-    INTEGER, INTENT(IN) :: scale_factor    ! Parameter related to scale.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_shared_mesg_index_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_shared_mesg_index_f
-
-

PURPOSE

-
  Configures the specified shared object header message index
-
-

INPUTS

-
  fcpl_id         - File creation property list identifier.
-  index_num       - Index being configured.
-  mesg_type_flags - Types of messages that should be stored in this index.
-  min_mesg_size   - Minimum message size.
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fcpl_id  ! file creation property list
-    INTEGER, INTENT(IN) :: index_num       ! Index being configured.
-    INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index.
-    INTEGER, INTENT(IN) :: min_mesg_size   ! Minimum message size.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_shared_mesg_nindexes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_shared_mesg_nindexes_f 
-
-

PURPOSE

-
  Sets number of shared object header message indexes 
-
-

INPUTS

-
  plist_id - file creation property list
-  nindexes - Number of shared object header message indexes to be available in files created with this property list
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list
-    INTEGER, INTENT(IN) :: nindexes  ! Number of shared object header message indexes 
-                                     !  available in files created WITH this property list
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_shuffle_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_shuffle_f 
-
-

PURPOSE

-
  Sets shuffling filter
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_shuffle_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_sieve_buf_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sieve_buf_size_f 
-
-

PURPOSE

-
  Sets the maximum size of the data sieve buffer
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - sieve buffer size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_sizes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sizes_f 
-
-

PURPOSE

-
  Sets the byte size of the offsets and lengths used 
-  to address objects in an HDF5 file.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  sizeof_addr  - size of an object offset in bytes 
-  sizeof_size  - size of an object length in bytes
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object 
-                                               !  offset in bytes 
-    INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object 
-                                               !  length in bytes 
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_small_data_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_small_data_block_size_f 
-
-

PURPOSE

-
  Sets the minimum size of "small" raw data block
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - small raw data block size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Small raw data block size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_sym_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sym_k_f 
-
-

PURPOSE

-
  Sets the size of parameters used to control the 
-
-

INPUTS

-
  prp_id  - file creation property list identifier
-  ik      - symbol table tree rank
-  lk      - symbol table node size
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ik            ! Symbol table tree rank 
-    INTEGER, INTENT(IN) :: lk            ! Symbol table node size 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_szip_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_szip_f 
-
-

PURPOSE

-
  Sets up use of szip compression
-
-

INPUTS

-
  prp_id           - dataset creation property list identifier
-  options_mask     - A bit-mask conveying the desired SZIP options.
-                     Current valid values in Fortran are:
-                        H5_SZIP_EC_OM_F
-                        H5_SZIP_NN_OM_F
-  pixels_per_block - szip parameters
-
-

OUTPUTS

-
  hdferr           - error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) 
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
-                                         ! list identifier 
-    INTEGER, INTENT(IN) :: options_mask  ! A bit-mask conveying the desired
-                                         ! SZIP options
-                                         ! Current valid values in Fortran are:
-                                         !    H5_SZIP_EC_OM_F
-                                         !    H5_SZIP_NN_OM_F
-    INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements 
-                                            ! in each data block
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_userblock_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_userblock_f 
-
-

PURPOSE

-
   Sets user block size
-
-

INPUTS

-
   prp_id - file creation property list to modify
-   size   - size of the user-block in bytes
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5punregister_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5punregister_f 
-
-

PURPOSE

-
  Removes a property from a property list class. 
-
-

INPUTS

-
  class        - Property list class identifier
-  name         - name of the property to remove
-
-

OUTPUTS

-
  hdferr:      - error code
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5punregister_f(class, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class  ! property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rf_c.html b/fortran/doc/DevelGuide/src/H5Rf_c.html deleted file mode 100644 index bba197e..0000000 --- a/fortran/doc/DevelGuide/src/H5Rf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Rf.c - - - - - -
-
- -

H5Rf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5R Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html deleted file mode 100644 index 3202540..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html +++ /dev/null @@ -1,492 +0,0 @@ - - - - - - - -./src/H5Rff_F03.f90 - - - - - -
-
- -

H5R (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Rff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions.
-  It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rcreate_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_object_f
-
-

PURPOSE

-
  Creates reference to the object
-
-

INPUTS

-
  loc_id    - location identifier
-  name      - name of the object at the specified location
-
-

OUTPUTS

-
  ref       - reference to the specified object
-  hdferr:   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
-                                           ! by loc_id identifier
-    TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref   ! Object reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rcreate_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_ptr_f
-
-

PURPOSE

-
  Creates a reference.
-
-

INPUTS

-
  loc_id     - location identifier
-  name       - name of the dataset at the specified location
-  ref_type   - type of reference:
-                H5R_OBJECT
-                H5T_STD_REF_DSETREG
-
-

OUTPUTS

-
  ref        - reference created by the function call.
-  hdferr     - error code
-                  Success:  0
-                  Failure: -1
- OPTIONAL
-  space_id   - dataspace identifier that describes selected region
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 20, 2008
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f
-  subroutine where the output is a pointer.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of the dataset at location specified
-                                             ! by loc_id identifier
-    INTEGER, INTENT(IN) :: ref_type          ! type of reference
-    TYPE(C_PTR), INTENT(INOUT) :: ref        ! Reference created by the function call
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-    INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier
-
- -
- -

h5rcreate_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_region_f
-
-

PURPOSE

-
  Creates reference to the dataset region
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the dataset at the specified location
-  space_id      - dataspace identifier that describes selected region
-
-

OUTPUTS

-
  ref           - reference to the dataset region
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
-                                           ! by loc_id identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(INOUT), TARGET :: ref ! Dataset region reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rdereference_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_object_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced
-
-

INPUTS

-
  dset_id  - identifier of the dataset containing
-             reference
-  ref      - reference to open
-
-

OUTPUTS

-
  obj_id   - object_identifier
-  hdferr:  - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id          ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id     ! Object identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5rdereference_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_ptr_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced.
-
-

INPUTS

-
  obj_id     - valid identifier for the file containing the
-               referenced object or any object in that file.
-  ref_type   - the reference type of ref.
-  ref        - Reference to open.
-
-

OUTPUTS

-
  ref_obj_id - identifier of referenced object
-  hdferr     - error code
-                Success:  0
-                Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 20, 2008
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f
-  subroutine using pointers.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Valid identifier for the file containing the
-                                          !  referenced object or any object in that file.
-    INTEGER, INTENT(IN) :: ref_type       ! The reference type of ref.
-    TYPE(C_PTR), INTENT(IN) :: ref        ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
-                                          ! Identifier of referenced object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5rdereference_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_region_f
-
-

PURPOSE

-
  Opens the dataset region
-
-

INPUTS

-
  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
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref   ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id  ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rget_name_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_object_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size     - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
- SOURCES
- or for the group that dataset is in.
- returning 0 (zero) if no name is associated
- with the identifier
-
- -
- -

h5rget_name_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_ptr_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
   size   - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

SOURCE

-
  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
-
- -
- -

h5rget_name_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_region_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size    - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

SOURCE

-
  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
-
- -
- -

h5rget_obj_type_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_obj_type_f
-
-

PURPOSE

-
  Retrieves the type of object that an object reference points to.
-
-

INPUTS

-
  loc_id   - Identifier for the dataset containing the reference or
-             for the group that dataset is in.
-  ref_type - Type of reference to query.
-  ref      - Reference to query.
-
-

OUTPUTS

-
  obj_type - Type of referenced object. 
-               H5G_UNKNOWN_F (-1)
-               H5G_LINK_F      0
-               H5G_GROUP_F     1
-               H5G_DATASET_F   2
-               H5G_TYPE_F      3
-              
-  hdferr   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Decemeber 17, 2008
-
-

SOURCE

-
  SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id
-    INTEGER, INTENT(IN) :: ref_type
-    TYPE(C_PTR), INTENT(IN) :: ref
-    INTEGER, INTENT(OUT) :: obj_type
-    INTEGER, INTENT(OUT) :: hdferr
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html deleted file mode 100644 index 7d20d0c..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - -./src/H5Rff_F90.f90 - - - - - -
-
- -

H5R (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Rff_F90.f90
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5R functions. It contains
-  the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Rff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rcreate_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rcreate_object_f
-
-

PURPOSE

-
  Creates reference to the object
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object at the specified location
-
-

OUTPUTS

-
  ref           - reference to the specified object
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
-                                           ! by loc_id identifier
-    TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rcreate_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rcreate_region_f
-
-

PURPOSE

-
  Creates reference to the dataset region
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the dataset at the specified location
-  space_id      - dataspace identifier that describes selected region
-
-

OUTPUTS

-
  ref           - reference to the dataset region
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
-                                           ! by loc_id identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rdereference_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rdereference_object_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced
-
-

INPUTS

-
  dset_id  - identifier of the dataset containing reference
-  ref      - reference to open
-
-

OUTPUTS

-
  obj_id   - object_identifier
-  hdferr   - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Object identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rdereference_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rdereference_region_f
-
-

PURPOSE

-
  Opens the dataset region
-
-

INPUTS

-
  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
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rget_name_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rget_name_object_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size    - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
- SOURCES
- or for the group that dataset is in.
- returning 0 (zero) if no name is associated with the identifier
-
- -
- -

h5rget_name_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rget_name_region_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size          - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

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
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_f90.html b/fortran/doc/DevelGuide/src/H5Rff_f90.html deleted file mode 100644 index 2b60b08..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_f90.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - -./src/H5Rff.f90 - - - - - -
-
- -

H5R

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R
-
-

FILE

-
  fortran/src/H5Rff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5R functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rget_object_type_obj_f

- -

[ Top ] [ H5R ] [ Subroutines ]

-

NAME

-
  h5rget_object_type_obj_f
-
-

PURPOSE

-
  Retrieves the type of object that an object reference points to.
-
-

INPUTS

-
  dset_id       - identifier of the dataset containing
-                  reference to the objects
-  ref           - reference to open
-
-

OUTPUTS

-
  obj_type      - object_type, possible values:
-                    H5G_UNKNOWN_F     (-1)
-                    H5G_GROUP_F        0
-                    H5G_DATASET_F      1
-                    H5G_TYPE_F         2
-                    H5G_LINK_F         3
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rget_object_type_f
-  subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
-    INTEGER, INTENT(OUT) :: obj_type     ! Object type
-                                         !  H5G_UNKNOWN_F     (-1)
-                                         !  H5G_GROUP_F        0
-                                         !  H5G_DATASET_F      1
-                                         !  H5G_TYPE_F         2
-                                         !  H5G_LINK_F         3
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5rget_region_region_f

- -

[ Top ] [ H5R ] [ Subroutines ]

-

NAME

-
  h5rget_region_region_f
-
-

PURPOSE

-
  Retrieves a dataspace with the specified region selected
-
-

INPUTS

-
  dset_id       - identifier of the dataset containing
-                  reference to the regions
-  ref           - reference to open
-
-

OUTPUTS

-
  space_id      - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rget_region_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference
-    INTEGER(HID_T), INTENT(OUT) :: space_id    ! Space identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Sf_c.html b/fortran/doc/DevelGuide/src/H5Sf_c.html deleted file mode 100644 index ebdedf7..0000000 --- a/fortran/doc/DevelGuide/src/H5Sf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Sf.c - - - - - -
-
- -

H5Sf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5S Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Sff_f90.html b/fortran/doc/DevelGuide/src/H5Sff_f90.html deleted file mode 100644 index c26b191..0000000 --- a/fortran/doc/DevelGuide/src/H5Sff_f90.html +++ /dev/null @@ -1,1165 +0,0 @@ - - - - - - - -./src/H5Sff.f90 - - - - - -
-
- -

H5S

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5S
-
-

FILE

-
  fortran/src/H5Sff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5S functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5sclose_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sclose_f
-
-

PURPOSE

-
  Releases and terminates access to a dataspace.
-
-

INPUTS

-
  space_id    - identifier of dataspace to release
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sclose_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5scopy_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5scopy_f
-
-

PURPOSE

-
  Creates an exact copy of a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  new_space_id  - identifier of dataspace's copy
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HID_T), INTENT(OUT) :: new_space_id
-                                             ! Identifier of dataspace's copy
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5screate_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5screate_f
-
-

PURPOSE

-
  Creates a new dataspace of a specified type.
-
-

INPUTS

-
  classtype   - the type of the dataspace to be created
-
-

OUTPUTS

-
  space_id    - dataspace identifier
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5screate_f(classtype, space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: classtype     ! The type of the dataspace
-                                                 ! to be created.
-                                                 ! Possible values are:
-                                                 !  H5S_SCALAR_F (0)
-                                                 !  H5S_SIMPLE_F(1)
-                                                 !  H5S_NULL_F(2)
-            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5screate_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5screate_simple_f
-
-

PURPOSE

-
  Creates a new simple data space and opens it for access      .
-
-

INPUTS

-
  rank        - number of dimensions
-  dims        - an array of the size of each dimension
-
-

OUTPUTS

-
  space_id    - dataspace identifier
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  maxdims     - an array of the maximum size of each dimension
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims)
-
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: rank             ! Number of dataspace dimensions
-            INTEGER(HSIZE_T), INTENT(IN) :: dims(rank)
-                                                    ! Array with the dimension
-                                                    ! sizes
-            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-            INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank)
-                                                    ! Array with the maximum
-                                                    ! dimension sizes
-
- -
- -

H5Sdecode_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  H5Sdecode_f
-
-

PURPOSE

-
  Decode a binary object description of data space and return a new object handle.
-
-

INPUTS

-
  buf   -  Buffer for the data space object to be decoded.
-  obj_id        - Object ID
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 26, 2008
-
-

SOURCE

-
  SUBROUTINE h5sdecode_f(buf, obj_id, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
-    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

H5Sencode_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  H5Sencode_f
-
-

PURPOSE

-
  Encode a data space object description into a binary buffer.
-
-

INPUTS

-
  obj_id        - Identifier of the object to be encoded.
-  buf   - Buffer for the object to be encoded into.
-  nalloc        - The size of the allocated buffer.
-
-

OUTPUTS

-
  nalloc        - The size of the buffer needed.
-  hdferr      - Returns 0 if successful and -1 if fails.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 26, 2008
-
-

SOURCE

-
  SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
-    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
-    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5sextent_copy_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sextent_copy_f
-
-

PURPOSE

-
  Copies the extent of a dataspace.
-
-

INPUTS

-
  dest_space_id         - the identifier for the dataspace to which
-  the extent is copied
-  source_space_id       - the identifier for the dataspace from
-  which the extent is copied
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: dest_space_id  ! Identifier of destination
-                                                         ! dataspace
-            INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source
-                                                          ! dataspace
-            INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5sextent_equal_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sextent_equal_f
-
-

PURPOSE

-
  Determines whether two dataspace extents are equal.
-
-

INPUTS

-
  space1_id     - First dataspace identifier.
-  space2_id     - Second dataspace identifier.
-
-

OUTPUTS

-
  Equal         - .TRUE. if equal, .FALSE. if unequal.
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 2, 2008
-
-

SOURCE

-
  SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier.
-    INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier.
-    LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal.
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5sget_select_bounds_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_bounds_f
-
-

PURPOSE

-
  Gets the bounding box containing the current selection.
-
-

INPUTS

-
  space_id    - dataspace identifier
-
-

OUTPUTS

-
  start       - starting coordinates of bounding box
-  end         - ending coordinates of bounding box
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
  SUBROUTINE  h5sget_select_bounds_f(space_id, start, END, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start
-                                           ! Starting coordinates of the bounding box.
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END
-                                           !Ending coordinates of the bounding box,
-                                           !i.e., the coordinates of the diagonally
-                                           !opposite corner
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sget_select_elem_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_elem_npoints_f
-
-

PURPOSE

-
  Gets the number of element points in the current selection
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  num_points    - number of element points in the current
-                  dataspace selection
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: num_points
-                                             !number of element points
-                                             !in the current dataspace
-                                             !selection
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_elem_pointlist_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_elem_pointlist_f
-
-

PURPOSE

-
  Gets the list of element points currently selected.
-
-

INPUTS

-
  space_id    - dataspace identifier
-  startpoint  - element point to start with
-  num_points  - number of elemnt points to get
-
-

OUTPUTS

-
  buf         - buffer with element points selected
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, &
-                                                    num_points, buf, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(IN) :: startpoint
-                                             !Element point to start with.
-            INTEGER(HSIZE_T), INTENT(IN) :: num_points
-                                             !Number of element points to get
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
-                                             !List of element points selected
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_hyper_blocklist_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_hyper_blocklist_f
-
-

PURPOSE

-
  Gets the list of hyperslab blocks currently selected.
-
-

INPUTS

-
  space_id    - dataspace identifier
-  startblock  - hyperslab block to start with
-  num_blocks  - number of blocks to get
-
-

OUTPUTS

-
  buf         - buffer to hold block list
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, &
-                                                    num_blocks, buf, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(IN) :: startblock
-                                             !Hyperslab block to start with.
-            INTEGER(HSIZE_T), INTENT(IN) :: num_blocks
-                                             !number of hyperslab blocks
-                                             !to get in the current dataspace
-                                             !selection
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
-                                             !List of hyperslab blocks selected
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_hyper_nblocks_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_hyper_nblocks_f
-
-

PURPOSE

-
  Get number of hyperslab blocks.
-
-

INPUTS

-
  space_id    - dataspace identifier
-
-

OUTPUTS

-
  num_blocks  - number of hyperslab blocks in the current
-                hyperslab selection
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks
-                                             !number of hyperslab blocks
-                                             !in the current dataspace
-                                             !selection
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_npoints_f
-
-

PURPOSE

-
  Determines the number of elements in a dataspace selection.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  npoints       - number of points in the dataspace selection
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in the
-                                                       ! selection
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_select_type_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_type_f
-
-

PURPOSE

-
  Retrieve the type of selection
-
-

INPUTS

-
  space_id      - dataspace iidentifier with selection
-
-

OUTPUTS

-
  type          - flag, valid values are:
-                    H5S_SEL_ERROR_F
-                    H5S_SEL_NONE_F
-                    H5S_SEL_POINTS_F
-                    H5S_SEL_HYPERSLABS_F
-                    H5S_SEL_ALL_F
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002
-
-

SOURCE

-
          SUBROUTINE h5sget_select_type_f(space_id, type, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to
-            INTEGER, INTENT(OUT) :: type        ! Selection type
-                                                !  H5S_SEL_ERROR_F
-                                                !  H5S_SEL_NONE_F
-                                                !  H5S_SEL_POINTS_F
-                                                !  H5S_SEL_HYPERSLABS_F
-                                                !  H5S_SEL_ALL_F
-            INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5sget_simple_extent_dims_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_dims_f
-
-

PURPOSE

-
  Retrieves dataspace dimension size and maximum size.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  dims          - array to store size of each dimension
-  maxdims       - array to store maximum size of each
-  dimension
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims
-                                                   ! Array to store dimension sizes
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims
-                                                   ! Array to store max dimension
-                                                   ! sizes
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code: -1 on failure,
-                                                   ! number of dimensions on
-                                                   ! on success
-
- -
- -

h5sget_simple_extent_ndims_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_ndims_f
-
-

PURPOSE

-
  Determines the dimensionality of a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  rank          - number of dataspace dimensions
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: rank               ! Number of dimensions
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_simple_extent_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_npoints_f
-
-

PURPOSE

-
  Determines the number of elements in a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  npoints       - number of elements in the dataspace
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in
-                                                       ! dataspace
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_simple_extent_type_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_type_f
-
-

PURPOSE

-
  Determine the current class of a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  classtype     - class type, possible values are:
-  H5S_NO_CLASS_F (-1)
-  H5S_SCALAR_F (0)
-  H5S_SIMPLE_F (1)
-  H5S_NULL_F   (2)
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: classtype      ! Class type , possible values
-                                                   ! are:
-                                                   !  H5S_NO_CLASS_F (-1)
-                                                   !  H5S_SCALAR_F (0)
-                                                   !  H5S_SIMPLE_F (1)
-                                                   !  H5S_NULL_F   (2)
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sis_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sis_simple_f
-
-

PURPOSE

-
  Determines whether a dataspace is a simple dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  status        - flag to indicate if dataspace
-  is simple or not
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sis_simple_f(space_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if dataspace
-                                                ! is simple or not ( TRUE or
-                                                ! FALSE)
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5soffset_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5soffset_simple_f
-
-

PURPOSE

-
  Sets the offset of a simple dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-  offset        - the offset at which to position the
-  selection
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) ::  offset
-                                                   ! The offset at which to position
-                                                   ! the selection
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sselect_all_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_all_f
-
-

PURPOSE

-
  Selects the entire dataspace.
-
-

INPUTS

-
  space_id    - Identifier for the dataspace in which
-                selection being made
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_all_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sselect_elements_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_elements_f
-
-

PURPOSE

-
  Selects elements to be included in the selection for
-  a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-  operator      - flag, valid values are:
-                   H5S_SELECT_SET_F 
-                   H5S_SELECT_APPEND_F 
-                   H5S_SELECT_PREPEND_F
-  rank          - number of dataspace dimensions
-  num_elements  - number of elements to be selected
-  coord         - 2D (rank x num_elements) array with the
-                  elements coordinates ( 1-based); in C the
-                  array is stored in 2D as (num_element x rank)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, &
-       num_elements, coord, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T),   INTENT(IN)                                :: space_id
-    INTEGER,          INTENT(IN)                                :: OPERATOR
-    INTEGER,          INTENT(IN)                                :: rank
-    INTEGER(SIZE_T),  INTENT(IN)                                :: num_elements
-    INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord
-    INTEGER,          INTENT(OUT)                               :: hdferr 
-
- -
- -

h5sselect_hyperslab_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_hyperslab_f
-
-

PURPOSE

-
  Selects a hyperslab region to add to the current selected
-  region
-
-

INPUTS

-
  space_id      - dataspace identifier
-  operator      - flag, valid values are:
-  H5S_SELECT_SET_F (0)
-  H5S_SELECT_OR_F (1)
-  start         - array with hyperslab offsets
-  count         - number of blocks included in the
-  hyperslab
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  stride        - array with hyperslab strides
-  block         - array with hyperslab block sizes
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, &
-                                           hdferr, stride, block)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(IN) :: operator     ! Flag, valid values are:
-                                                ! H5S_SELECT_SET_F (0)
-                                                ! H5S_SELECT_OR_F (1)
-                                                !
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start
-                                          ! Starting coordinates of the hyperslab
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count
-                                          ! Number of blocks to select
-                                          ! from dataspace
-            INTEGER, INTENT(OUT) :: hdferr     ! Error code
-            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride
-                                          ! Array of how many elements to move
-                                          ! in each direction
-            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block
-                                          ! Sizes of element block
-
- -
- -

h5sselect_none_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_none_f
-
-

PURPOSE

-
  Resets the selection region to include no elements.
-
-

INPUTS

-
  space_id    - the identifier for the dataspace in which
-                the selection is being reset.
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_none_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sselect_valid_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_valid_f
-
-

PURPOSE

-
  Verifies that the selection is within the extent of
-  the dataspace.
-
-

INPUTS

-
  space_id      - identifier for the dataspace for which
-  selection is verified
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_valid_f(space_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            LOGICAL, INTENT(OUT) :: status          ! TRUE if the selection is
-                                                    ! contained within the extent,
-                                                    ! FALSE otherwise.
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sset_extent_none_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sset_extent_none_f
-
-

PURPOSE

-
  Removes the extent from a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sset_extent_none_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sset_extent_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sset_extent_simple_f
-
-

PURPOSE

-
  Sets or resets the size of an existing dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-  rank          - dataspace number of dimensions
-  current_size          - array with the new sizes of dimensions
-  maximum_size          - array with the new maximum sizes of
-  dimensions
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, &
-                                            maximum_size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(IN) :: rank            ! Dataspace rank
-            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size
-                                                   ! Array with the new sizes
-                                                   ! of dimensions
-            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size
-                                                   ! Array with the new maximum
-                                                   ! sizes of dimensions
-                                                   ! sizes
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Tf_c.html b/fortran/doc/DevelGuide/src/H5Tf_c.html deleted file mode 100644 index b36c2a5..0000000 --- a/fortran/doc/DevelGuide/src/H5Tf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Tf.c - - - - - -
-
- -

H5Tf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5T Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Tff_f90.html b/fortran/doc/DevelGuide/src/H5Tff_f90.html deleted file mode 100644 index 3b7dfe8..0000000 --- a/fortran/doc/DevelGuide/src/H5Tff_f90.html +++ /dev/null @@ -1,2378 +0,0 @@ - - - - - - - -./src/H5Tff.f90 - - - - - -
-
- -

H5T

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5T
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5T functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5tarray_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tarray_create_f
-
-

PURPOSE

-
  Creates an array datatype object.
-
-

INPUTS

-
  base_id       - datatype identifier for the array
-                  base datatype
-  rank          - rank of the array
-  dims          - array dimension sizes
-
-

OUTPUTS

-
  type_id       - array datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype
-            INTEGER, INTENT(IN) ::  rank ! Rank of the array
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension
-            INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tclose_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tclose_f
-
-

PURPOSE

-
  Releases a datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tclose_f(type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tcommit_anon_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommit_anon_f
-
-

PURPOSE

-
  Commits a transient datatype to a file,
-  creating a new named datatype,
-  but does not link it into the file structure.
-
-

INPUTS

-
  loc_id        - A file or group identifier specifying the file
-                  in which the new named datatype is to be created.
-  dtype_id      - A datatype identifier.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  tcpl_id       - A datatype creation property list identifier.
-                  (H5P_DEFAULT_F for the default property list.)
-  tapl_id       - A datatype access property list identifier.
-                  should always be passed as the value H5P_DEFAULT_F.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 25, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! A file or group identifier specifying
-                                          ! the file in which the new named datatype
-                                          ! is to be created.
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property
-                                                    ! list identifier.
-                                                    ! (H5P_DEFAULT_F for the default property list.)
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier.
-                                                    ! should always be passed as the value H5P_DEFAULT_F.
-
- -
- -

h5tcommit_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommit_f
-
-

PURPOSE

-
  Commits a transient datatype to a file, creating a
-  new named datatype.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the datatype to be stored
-                  at the specified location
-  type_id       - identifier of a datatype to be stored
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list
-  tcpl_id       - Datatype creation property list
-  tapl_id       - Datatype access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
        - Explicit Fortran interfaces were added for
-          called C functions (it is needed for Windows
-          port).  March 7, 2001
-
-        - Added optional parameters introduced in version 1.8
-          M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, &
-       lcpl_id, tcpl_id, tapl_id  )
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name
-                                  ! Datatype name within file or group
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list
-
- -
- -

h5tcommitted_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommitted_f
-
-

PURPOSE

-
  Determines whether a datatype is a named type or a transient type.
-
-

INPUTS

-
  dtype_id      - A datatype identifier.
-
-

OUTPUTS

-
  committed     - .TRUE., if the datatype has been committed
-                  .FALSE., if the datatype has not been committed.
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 25, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! A datatype identifier
-    LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed
-                                      !.FALSE., if the datatype has not been committed.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
-!  Success:  0
-!  Failure: -1
-
- -
- -

h5tcompiler_conv_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcompiler_conv_f
-
-

PURPOSE

-
  Check whether the library’s default conversion is hard conversion.R
-
-

INPUTS

-
  src_id        - Identifier for the source datatype.
-  dst_id        - Identifier for the destination datatype.
-
-

OUTPUTS

-
  flag          - TRUE for compiler conversion, FALSE for library conversion
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype.
-    INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype.
-    LOGICAL, INTENT(OUT) :: flag  ! .TRUE. for compiler conversion, .FALSE. for library conversion
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code:
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5tcopy_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcopy_f
-
-

PURPOSE

-
  Creates a copy of exisiting datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  new_type_id   - identifier of datatype's copy
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: new_type_id
-                                 ! Identifier of datatype's copy
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tcreate_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcreate_f
-
-

PURPOSE

-
  Creates a new dataype
-
-

INPUTS

-
  class         - datatype class, possible values are:
-                    H5T_COMPOUND_F
-                    H5T_ENUM_F
-                    H5T_OPAQUE_F
-  size          - datattype size
-
-

OUTPUTS

-
  type_id       - datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tcreate_f(class, size, type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: class ! Datatype class can be one of
-                                         ! H5T_COMPOUND_F
-                                         ! H5T_ENUM_F
-                                         ! H5T_OPAQUE_F
-            INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the datatype
-            INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Tdecode_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  H5Tdecode_f
-
-

PURPOSE

-
  Decode a binary object description of data type and return a new object handle.
-
-

INPUTS

-
  buf           -  Buffer for the data space object to be decoded.
-  obj_id        - Object ID
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tdecode_f(buf, obj_id, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
-    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5tenaum_insert_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenaum_insert_f
-
-

PURPOSE

-
  Inserts a new enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_insert_f(type_id,  name, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of  the new member
-            INTEGER, INTENT(IN) :: value !value of the new member
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Tencode_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  H5Tencode_f
-
-

PURPOSE

-
  Encode a data type object description into a binary buffer.
-
-

INPUTS

-
  obj_id        - Identifier of the object to be encoded.
-  buf           - Buffer for the object to be encoded into.
-  nalloc        - The size of the allocated buffer.
-
-

OUTPUTS

-
  nalloc        - The size of the buffer needed.
-  hdferr        - Returns 0 if successful and -1 if fails.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
-    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
-    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5tenum_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_create_f
-
-

PURPOSE

-
  Creates a new enumeration datatype.
-
-

INPUTS

-
  parent_id     - datatype identifier for base datatype
-
-

OUTPUTS

-
  new_type_id   - datatype identifier for the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: parent_id  ! Datatype identifier for
-                                                     ! the  base datatype
-            INTEGER(HID_T), INTENT(OUT) :: new_type_id
-                                                     !datatype identifier for the
-                                                     ! new enumeration datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tenum_nameof_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_nameof_f
-
-

PURPOSE

-
  Returns the symbol name corresponding to a specified
-  member of an enumeration datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  value         - value of the enumeration datatype
-  namelen       - name buffer size
-
-

OUTPUTS

-
  name          - buffer to hold symbol name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
- NOTE
-   According to the standard: Because an INTENT(OUT) variable is considered undefined 
-   on entry to the procedure, any default initialization specified for its type will 
-   be applied. So we need to blank out the "name" to be portable and eliminate any 
-   characters the "name' may contain upon entry, depending on compiler implementation.
-
-

SOURCE

-
  SUBROUTINE h5tenum_nameof_f(type_id,  value, namelen, name, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(OUT) :: name  !Name of the  enumeration datatype.
-            INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name
-            INTEGER, INTENT(IN) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tenum_valuof_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_valuof_f
-
-

PURPOSE

-
  Returns the value corresponding to a specified
-  member of an enumeration datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  name          - symbol name
-
-

OUTPUTS

-
  value         - value of the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_valueof_f(type_id,  name, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tequal_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tequal_f
-
-

PURPOSE

-
  Determines whether two datatype identifiers refer
-  to the same datatype.
-
-

INPUTS

-
  type1_id      - datatype identifier
-  type2_id      - datatype identifier
-
-

OUTPUTS

-
  flag          - TRUE/FALSE flag to indicate
-                  if two datatypes are equal
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier
-            INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier
-            LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two
-                                         ! datatypes are equal
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_array_dims_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_array_dims_f
-
-

PURPOSE

-
  Returns sizes of array dimensions.
-
-

INPUTS

-
  type_id       - array datatype identifier
-
-

OUTPUTS

-
  dims          - buffer to store array datatype dimensions
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
-            INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) ::  dims !buffer to store array datatype
-                                                                ! dimensions
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_array_ndims_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_array_ndims_f
-
-

PURPOSE

-
  Returns the rank of an array datatype.
-
-

INPUTS

-
  type_id       - array datatype identifier
-
-

OUTPUTS

-
  ndims         - number of array dimensions
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
-            INTEGER, INTENT(OUT) ::  ndims ! number of array dimensions
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_class_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_class_f
-
-

PURPOSE

-
  Returns the datatype class identifier.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  class         - class, possible values are:
-                   H5T_NO_CLASS_F (-1)
-                   H5T_INTEGER_F  (0)
-                   H5T_FLOAT_F (1)
-                   H5T_TIME_F  (2)
-                   H5T_STRING_F (3)
-                   H5T_BITFIELD_F (4)
-                   H5T_OPAQUE_F (5)
-                   H5T_COMPOUND_F (6)
-                   H5T_REFERENCE_F (7)
-                   H5T_ENUM_F (8)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_class_f(type_id, class, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: class
-                           ! Datatype class, possible values are:
-                                          ! H5T_NO_CLASS_F (-1)
-                                          ! H5T_INTEGER_F  (0)
-                                          ! H5T_FLOAT_F (1)
-                                          ! H5T_TIME_F  (2)
-                                          ! H5T_STRING_F (3)
-                                          ! H5T_BITFIELD_F (4)
-                                          ! H5T_OPAQUE_F (5)
-                                          ! H5T_COMPOUND_F (6)
-                                          ! H5T_REFERENCE_F (7)
-                                          ! H5T_ENUM_F (8)
-          INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_create_plist_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_create_plist_f
-
-

PURPOSE

-
  Returns a copy of a datatype creation property list.
-
-

INPUTS

-
  dtype_id      - Datatype identifier
-
-

OUTPUTS

-
  dtpl_id       - Datatype property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER(HID_T), INTENT(OUT) :: dtpl_id  ! Datatype property list identifier.
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5tget_cset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_cset_f
-
-

PURPOSE

-
  Retrieves the character set type of a string datatype.
-
-

INPUTS

-
  type_id  - Datatype identifier
-
-

OUTPUTS

-
  cset     - Character set type of a string datatype
-              Possible values are:
-              H5T_CSET_ASCII_F = 0
-              H5T_CSET_UTF8_F
-  hdferr   - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_cset_f(type_id, cset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: cset   ! character set type of a string datatype
-                                           !  Possible values are:
-                                           !  H5T_CSET_ASCII_F = 0
-                                           !  H5T_CSET_UTF8_F
-            INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5tget_ebias_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_ebias_f
-
-

PURPOSE

-
  Retrieves the exponent bias of a floating-point type.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  ebias         - datatype exponent bias
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_fields_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_fields_f
-
-

PURPOSE

-
  Retrieves floating point datatype bit field information.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  spos          - sign bit-position
-  epos          - exponent bit-position
-  esize         - size of exponent in bits
-  mpos          - mantissa position
-  msize         - size of mantissa in bits
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: spos   ! sign bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: epos   ! exponent bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: esize  ! size of exponent in bits
-            INTEGER(SIZE_T), INTENT(OUT) :: mpos   ! mantissa bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: msize  ! size of mantissa in bits
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_inpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_inpad_f
-
-

PURPOSE

-
  Retrieves the internal padding type for unused bits
-  in floating-point datatypes.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  padtype       - padding type for unused bits
-                  Possible values of padding type are:
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits
-                                            ! in floating-point datatypes.
-                                            ! Possible values of padding type are:
-                                            ! H5T__PAD_ZERO_F = 0
-                                            ! H5T__PAD_ONE_F = 1
-                                            ! H5T__PAD_BACKGROUND_F = 2
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_class_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_class_f
-
-

PURPOSE

-
  Returns datatype class of compound datatype member.
-
-

INPUTS

-
  type_id       - datartpe identifier
-  member_no     - index of compound datatype member
-
-

OUTPUTS

-
  class         - class type for compound dadtype member
-                  Valid classes:
-                    H5T_NO_CLASS_F (error)
-                    H5T_INTEGER_F
-                    H5T_FLOAT_F
-                    H5T_TIME_F
-                    H5T_STRING_F
-                    H5T_BITFIELD_F
-                    H5T_OPAQUE_F
-                    H5T_COMPOUND_F
-                    H5T_REFERENCE_F
-                    H5T_ENUM_F
-                    H5T_VLEN_F
-                    H5T_ARRAY_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  April 6, 2005
-
-

SOURCE

-
  SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            INTEGER, INTENT(IN)       :: member_no  ! Member number
-            INTEGER, INTENT(OUT)     :: class      ! Member class
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5tget_member_index_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_index_f
-
-

PURPOSE

-
  Retrieves the index of a compound or enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-  name          - name of the field or member whose index to
-  to be retrieved from the datatype.
-
-

OUTPUTS

-
  index         - 0-based index of the filed or member (0 to N-1)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002
-
-

SOURCE

-
  SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name   ! Field or member name
-            INTEGER, INTENT(OUT) :: index          ! Field or member index
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5tget_member_name_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_name_f
-
-

PURPOSE

-
  Retrieves the name of a field of a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  index         - filed index (0-based)
-
-

OUTPUTS

-
  member_name   - buffer to hold member's name
-  namelen       - name length
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_name_f(type_id, index, member_name,  namelen, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve
-            CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of
-                                                         !a compound datatype
-            INTEGER, INTENT(OUT) :: namelen ! Length of the name
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_offset_f
-
-

PURPOSE

-
  Retrieves the offset of a field of a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  member_no     - number of the field
-
-

OUTPUTS

-
  offset        - byte offset of the requested field
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: member_no !Number of the field
-                                                       !whose offset is requested
-            INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_type_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_type_f
-
-

PURPOSE

-
  Returns the datatype of the specified member.
-
-

INPUTS

-
  type_id       - compound datatype identifier
-  field_idx     - field index (0-based)
-
-

OUTPUTS

-
  datatype      - idnetifier of the member's datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_type_f(type_id,  field_idx, datatype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve
-            INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of
-                                                    !the datatype of the field
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_value_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_value_f
-
-

PURPOSE

-
  Returns the value of an enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-  member_no     - number of the enumeration datatype member
-
-

OUTPUTS

-
  value         - value of the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_value_f(type_id,  member_no, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member
-            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_native_type_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_native_type_f
-
-

PURPOSE

-
  Returns the native datatype of a specified datatype.
-
-

INPUTS

-
  dtype_id      - Datatype identifier for the dataset datatype.
-  
-  direction     - Direction of search:
-                  H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent */
-                  H5T_DIR_ASCEND      = 1,    /*in inscendent order             */
-                  H5T_DIR_DESCEND     = 2     /*in descendent order             */
-  * NOTE: In C it is defined as a structure: H5T_direction_t
-
-

OUTPUTS

-
  native_dtype_id - The native datatype identifier for the specified dataset datatype
-  hdferr          - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER, INTENT(IN) :: direction  ! Direction of search:
-                                      ! H5T_DIR_ASCEND_F      = 1  in inscendent order
-                                      ! H5T_DIR_DESCEND_F     = 2  in descendent order
-    INTEGER(HID_T), INTENT(OUT) :: native_dtype_id  ! The native datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
-                                      ! 0 on success and -1 on failure
-
- -
- -

h5tget_nmembers_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_nmembers_f
-
-

PURPOSE

-
  Retrieves the number of fields in a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  num_members   - number of members
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_norm_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_norm_f
-
-

PURPOSE

-
  Retrieves mantissa normalization of a floating-point
-  datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  norm          - normalization types, valid values are:
-                    H5T_NORM_IMPLIED_F(0)
-                    H5T_NORM_MSBSET_F(1)
-                    H5T_NORM_NONE_F(2)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_norm_f(type_id, norm, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype
-                                         !Valid normalization types are:
-                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
-                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
-                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
-                                         !Mantissa is not normalize
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_offset_f
-
-

PURPOSE

-
  Retrieves the bit offset of the first significant bit.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  offset        - offset value
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_offset_f(type_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the
-                                           ! first significant bit
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_order_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_order_f
-
-

PURPOSE

-
  Returns the byte order of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  order         - byte order for the datatype, possible
-                  values are:
-                    H5T_ORDER_LE_F
-                    H5T_ORDER_BE_F
-                    H5T_ORDER_VAX_F (not implemented yet)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_order_f(type_id, order, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-    INTEGER, INTENT(OUT) :: order
-                                    ! Datatype byte order, possible values are:
-                                    ! H5T_ORDER_LE_F
-                                    ! H5T_ORDER_BE_F
-                                    ! H5T_ORDER_VAX_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5tget_pad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_pad_f
-
-

PURPOSE

-
  Retrieves the padding type of the least and
-  most          -significant bit padding.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  lsbpad        - least-significant bit padding type
-  msbpad        - most-significant bit padding type
-                  Possible values of padding type are:
-                    H5T_PAD_ERROR_F      = -1
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-                    H5T_PAD_NPAD_F      = 3
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: lsbpad ! padding type of the
-                                           ! least significant bit
-            INTEGER, INTENT(OUT) :: msbpad ! padding type of the
-                                           ! most significant bit
-                                           ! Possible values of padding type are:
-                                           ! H5T__PAD_ZERO_F = 0
-                                           ! H5T__PAD_ONE_F = 1
-                                           ! H5T__PAD_BACKGROUND_F = 2
-                                           ! H5T_PAD_ERROR_F      = -1
-                                           ! H5T_PAD_NPAD_F      = 3
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_precision_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_precision_f
-
-

PURPOSE

-
  Returns the precision of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  precision     - precision of the datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_precision_f(type_id, precision, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_sign_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_sign_f
-
-

PURPOSE

-
  Retrieves the sign type for an integer type.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  sign          - sign type
-                  Possible values are:
-                    - Unsigned integer type 
-                        H5T_SGN_NONE_F = 0
-                    - Two's complement signed integer type
-                        H5T_SGN_2_F = 1
-                    - error value: H5T_SGN_ERROR_F=-1
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_sign_f(type_id, sign, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: sign ! sign type for an integer type
-                                         !possible values are:
-                                         !Unsigned integer type H5T_SGN_NONE_F = 0
-                                         !Two's complement signed integer type
-                                         !H5T_SGN_2_F = 1
-                                         !or error value: H5T_SGN_ERROR_F=-1
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_size_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_size_f
-
-

PURPOSE

-
  Returns the size of a datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  size          - datatype size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_size_f(type_id, size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_strpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_strpad_f
-
-

PURPOSE

-
  Retrieves the storage mechanism for a string datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  strpad        - storage method for a string datatype
-                  Possible values are:
-                    H5T_STR_NULLTERM_F,
-                    H5T_STR_NULLPAD_F,
-                    H5T_STR_SPACEPAD_F
-                    H5T_STR_ERROR_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: strpad
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_super_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_super_f
-
-

PURPOSE

-
  Returns the base datatype from which a datatype is derived.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  base_type_id          - identifier of the base type
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype
-                                           ! from which datatype (type_id) was derived
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_tag_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_tag_f
-
-

PURPOSE

-
  Gets the tag associated with an opaque datatype.
-
-

INPUTS

-
  type_id       - identifier for opaque datatype
-
-

OUTPUTS

-
  tag           - unique ASCII string associated with opaque
-                  datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(OUT) :: tag  ! Unique ASCII string with which
-                                                  !  the opaque datatype is to be tagged
-            INTEGER, INTENT(OUT) :: taglen        ! Length of tag
-            INTEGER(SIZE_T)      :: tag_size      ! Declared character length of tab 
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tinsert_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tinsert_f
-
-

PURPOSE

-
  Adds a new member to a compound datatype.
-
-

INPUTS

-
  type_id       - compound dattype identifier
-  name          - name of the field to insert
-  offset        - start of the member in an instance of
-                  the compound datatype
-  field_id      - datatype identifier of the field to insert
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tinsert_f(type_id,  name, offset, field_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert
-            INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of
-                                                   !the compound datatype
-            INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tis_variable_str_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tis_variable_str_f
-
-

PURPOSE

-
  Determines whether a dattype is a variable string.
-
-

INPUTS

-
  type_id       - datartpe identifier
-
-

OUTPUTS

-
  status        - flag to indicate if datatype
-                  is a variable string
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if datatype
-                                                ! is a variable string or not ( TRUE or
-                                                ! FALSE)
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5topen_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5topen_f
-
-

PURPOSE

-
  Opens named datatype.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - a datatype name
-
-

OUTPUTS

-
  type_id       - datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  tapl_id       - datatype access property list identifier.
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-  Added optional parameter 'tapl_id' for compatability
-  with H5Topen2. April 9, 2009.
-
-

SOURCE

-
  SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group
-    INTEGER(HID_T), INTENT(OUT) :: type_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier
-
- -
- -

h5tpack_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tpack_f
-
-

PURPOSE

-
  Recursively removes padding from within a compound datatype.
-
-

INPUTS

-
  type_id       - compound datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tpack_f(type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_cset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_cset_f
-
-

PURPOSE

-
  Sets character set to be used.
-
-

INPUTS

-
  type_id       - datatype identifier
-  cset          - character set type of a string datatype
-                    Possible values are:
-                     H5T_CSET_ASCII_F = 0
-                     H5T_CSET_UTF8_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_cset_f(type_id, cset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: cset !character set type of a string datatype
-                                           ! Possible values of padding type are:
-                                           ! H5T_CSET_ASCII_F = 0
-                                           ! H5T_CSET_UTF8_F
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_ebias_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_ebias_f
-
-

PURPOSE

-
  Sets the exponent bias of a floating-point type.
-
-

INPUTS

-
  type_id       - datatype identifier
-  ebias         - datatype exponent bias
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_fields_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_fields_f
-
-

PURPOSE

-
  Sets locations and sizes of floating point bit fields.
-
-

INPUTS

-
  type_id       - datatype identifier
-  spos          - sign bit-position
-  epos          - exponent bit-position
-  esize         - size of exponent in bits
-  mpos          - mantissa position
-  msize         - size of mantissa in bits
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: spos   ! sign bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: epos   ! exponent bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: esize  ! size of exponent in bits
-            INTEGER(SIZE_T), INTENT(IN) :: mpos   ! mantissa bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: msize  ! size of mantissa in bits
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_inpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_inpad_f
-
-

PURPOSE

-
  Fills unused internal floating point bits.
-
-

INPUTS

-
  type_id       - datatype identifier
-  padtype       - padding type for unused bits
-                  Possible values of padding type are:
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: padtype ! padding type for unused bits
-                                           ! in floating-point datatypes.
-                                           ! Possible values of padding type are:
-                                           ! H5T__PAD_ZERO_F = 0
-                                           ! H5T__PAD_ONE_F = 1
-                                           ! H5T__PAD_BACKGROUND_F = 2
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_norm_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_norm_f
-
-

PURPOSE

-
  Sets the mantissa normalization of a floating-point datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  norm          - normalization types, valid values are:
-                    H5T_NORM_IMPLIED_F(0)
-                    H5T_NORM_MSBSET_F(1)
-                    H5T_NORM_NONE_F(2)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_norm_f(type_id, norm, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype
-                                         !Valid normalization types are:
-                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
-                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
-                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
-                                         !Mantissa is not normalize
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_offset_f
-
-

PURPOSE

-
  Sets the bit offset of the first significant bit.
-
-

INPUTS

-
  type_id       - datatype identifier
-  offset        - offset value
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_offset_f(type_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the
-                                           ! first significant bit
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_order_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_order_f
-
-

PURPOSE

-
  Sets the byte ordering of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  order         - datatype byte order Possible values are:
-                    H5T_ORDER_LE_F
-                    H5T_ORDER_BE_F
-                    H5T_ORDER_VAX_F (not implemented yet)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_order_f(type_id, order, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-    INTEGER, INTENT(IN) :: order   ! Datatype byte order, possible values
-                                   ! are:
-                                   ! H5T_ORDER_LE_F
-                                   ! H5T_ORDER_BE_F
-                                   ! H5T_ORDER_VAX_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5tset_pad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_pad_f
-
-

PURPOSE

-
  Sets the least and most-significant bits padding types.
-
-

INPUTS

-
  type_id       - datatype identifier
-  lsbpad        - least-significant bit padding type
-  msbpad        - most-significant bit padding type
-                  Possible values of padding type are:
-                    H5T_PAD_ERROR_F      = -1
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-                    H5T_PAD_NPAD_F      = 3
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: lsbpad ! padding type of the
-                                           ! least significant bit
-            INTEGER, INTENT(IN) :: msbpad ! padding type of the
-                                           ! most significant bit
-                                           ! Possible values of padding type are:
-                                           ! H5T_PAD_ZERO_F = 0
-                                           ! H5T_PAD_ONE_F = 1
-                                           ! H5T_PAD_BACKGROUND_F = 2
-                                           ! H5T_PAD_ERROR_F      = -1
-                                           ! H5T_PAD_NPAD_F      = 3
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_precision_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_precision_f
-
-

PURPOSE

-
  Sets the precision of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  precision     - datatype precision
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_precision_f(type_id, precision, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_sign_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_sign_f
-
-

PURPOSE

-
  Sets the sign proprety for an integer type.
-
-

INPUTS

-
  type_id       - datatype identifier
-  sign          - sign type
-                  Possible values are:
-                    - Unsigned integer type 
-                        H5T_SGN_NONE_F = 0
-                    - Two's complement signed integer type
-                        H5T_SGN_2_F = 1
-                    - error value: H5T_SGN_ERROR_F=-1
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_sign_f(type_id, sign, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: sign !sign type for an integer type
-                                         !possible values are:
-                                         !Unsigned integer type H5T_SGN_NONE_F = 0
-                                         !Two's complement signed integer type
-                                         !H5T_SGN_2_F = 1
-                                         !or error value: H5T_SGN_ERROR_F=-1
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_size_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_size_f
-
-

PURPOSE

-
  Sets the total size for an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  size          - size of the datatype
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_size_f(type_id, size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_strpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_strpad_f
-
-

PURPOSE

-
  Defines the storage mechanism for character strings.
-
-

INPUTS

-
  type_id       - datatype identifier
-  strpad        - storage method for a string datatype
-                  Possible values are:
-                    H5T_STR_NULLTERM_F,
-                    H5T_STR_NULLPAD_F,
-                    H5T_STR_SPACEPAD_F
-                    H5T_STR_ERROR_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_tag_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_tag_f
-
-

PURPOSE

-
  Tags an opaque datatype.
-
-

INPUTS

-
  type_id       - identifier for opaque datatype
-  tag           - unique ASCII string with which the opaque
-                  datatype is to be tagged.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_tag_f(type_id, tag, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which
-                                                !the opaque datatype is to be tagged
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tvlen_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tvlen_create_f
-
-

PURPOSE

-
  Creates a new variable-length datatype.
-
-

INPUTS

-
  type_id       - identifier iof base datatype
-
-

OUTPUTS

-
  vltype_id     - identifier for VL datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  Wednesday, October 23, 2002
-
-

NOTES

-
  Only basic Fortran base datatypes are supported
-
-

SOURCE

-
  SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN)  :: type_id    ! Datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: vltype_id  ! VL datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr            ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Zf_c.html b/fortran/doc/DevelGuide/src/H5Zf_c.html deleted file mode 100644 index 2973548..0000000 --- a/fortran/doc/DevelGuide/src/H5Zf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Zf.c - - - - - -
-
- -

H5Zf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5Z Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Zff_f90.html b/fortran/doc/DevelGuide/src/H5Zff_f90.html deleted file mode 100644 index 8ccd0ae..0000000 --- a/fortran/doc/DevelGuide/src/H5Zff_f90.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - -./src/H5Zff.f90 - - - - - -
-
- -

H5Z

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5Z
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5Z functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5zfilter_avail_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zfilter_avail_f
-
-

PURPOSE

-
  Queries if filter is available
-
-

INPUTS

-
  filter        - filter
-
-

OUTPUTS

-
  status        - status; .TRUE. if filter is available,
-                  .FALSE. otherwise
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5zfilter_avail_f(filter, status, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
-                                        !   H5Z_FILTER_DEFLATE_F
-                                        !   H5Z_FILTER_SZIP_F
-                                        !   H5Z_FILTER_NBIT_F
-                                        !   H5Z_FILTER_SCALEOFFSET_F
-                                        !   H5Z_FILTER_SHUFFLE_F
-                                        !   H5Z_FILTER_FLETCHER32_F
-    LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if filter
-                                        ! is availble  not ( TRUE or
-                                        ! FALSE)
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5zget_filter_info_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zget_filter_info_f
-
-

PURPOSE

-
  Queries if filter has its encoder and/or decoder
-  available
-
-

INPUTS

-
  filter        - filter
-
-

OUTPUTS

-
  config_flags  - Bit vector possibly containing the
-                  following values:
-                     H5Z_FILTER_ENCODE_ENABLED_F
-                     H5Z_FILTER_DECODE_ENABLED_F
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Nat Furrer and James Laird
-  June 16, 2004
-
-

SOURCE

-
  SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
-                                        !   H5Z_FILTER_DEFLATE_F
-                                        !   H5Z_FILTER_SZIP_F
-                                        !   H5Z_FILTER_NBIT_F
-                                        !   H5Z_FILTER_SCALEOFFSET_F
-                                        !   H5Z_FILTER_SHUFFLE_F
-                                        !   H5Z_FILTER_FLETCHER32_F
-    INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter
-                                        ! has its encoder and/or decoder
-                                        ! available
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5zunregister_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zunregister_f
-
-

PURPOSE

-
  Unregisters specified filetr
-
-

INPUTS

-
  filter - filter; may have one of the following values:
-            H5Z_FILTER_DEFLATE_F
-            H5Z_FILTER_SZIP_F
-            H5Z_FILTER_NBIT_F
-            H5Z_FILTER_SCALEOFFSET_F
-            H5Z_FILTER_SHUFFLE_F
-            H5Z_FILTER_FLETCHER32_F
-
-

OUTPUTS

-
  hdferr - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5zunregister_f(filter, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html deleted file mode 100644 index 4e51e7f..0000000 --- a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -./src/H5_DBLE_InterfaceExclude.f90 - - - - - -
-
- -

src/H5_DBLE_InterfaceExclude.f90

- -

[ Top ] [ Modules ]

-

NAME

-
   H5_DBLE_INTERFACE
-
-

FUNCTION

-
   This module is used for when the default REAL is of type DOUBLE PRECISION.
-   We do not include the double precision interfaces if the defaut REAL is
-   DOUBLE PRECISION since this would lead to a non-unique conflict with the
-   generic interfaces declared as REAL and those declared as DOUBLE PRECISION.
-
-

NOTES

-
   Empty module.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html deleted file mode 100644 index 5a71d52..0000000 --- a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -./src/H5_DBLE_InterfaceInclude.f90 - - - - - -
-
- -

src/H5_DBLE_InterfaceInclude.f90

- -

[ Top ] [ Modules ]

-

NAME

-
   H5_DBLE_INTERFACE
-
-

FUNCTION

-
   This module is used for when the default REAL is not of the type DOUBLE PRECISION.
-   We only do not include the double precision interfaces if the defaut REAL is
-   DOUBLE PRECISION since this would lead to a non-unique conflict with the
-   generic interfaces declared as REAL. Otherwise it is okay to include the interfaces.
-
-

NOTES

-
   This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines
-   from the HDF function catagory H5A, H5D and H5P.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_f_c.html b/fortran/doc/DevelGuide/src/H5_f_c.html deleted file mode 100644 index 2bdbce1..0000000 --- a/fortran/doc/DevelGuide/src/H5_f_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5_f.c - - - - - -
-
- -

fortran/src/H5_f.c

- -

[ Top ] [ Modules ]

-

FUNCTION

-
   This file contains C stubs for H5 Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html deleted file mode 100644 index 17f07c1..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -./src/H5_ff_F03.f90 - - - - - -
-
- -

H5LIB_PROVISIONAL

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB_PROVISIONAL
-
-

PURPOSE

-
  This file contains helper functions for Fortran 2003 features and is
-  only compiled when Fortran 2003 features are enabled, otherwise
-  the file H5_ff_F90.f90 is compiled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5offsetof

- -

[ Top ] [ H5LIB_PROVISIONAL ] [ Functions ]

-

NAME

-
  h5offsetof
-
-

PURPOSE

-
  Computes the offset in memory
-
-

INPUTS

-
  start - starting pointer address
-  end   - ending pointer address
-
-

OUTPUTS

-
  offset - offset
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 25, 2008
-
-

SOURCE

-
  FUNCTION h5offsetof(start,end) RESULT(offset)
-    USE, INTRINSIC :: ISO_C_BINDING
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER(SIZE_T) :: offset
-    TYPE(C_PTR), VALUE, INTENT(IN) :: start, end
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html deleted file mode 100644 index c310ef2..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -./src/H5_ff_F90.f90 - - - - - -
-
- -

H5LIB_PROVISIONAL (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB_PROVISIONAL
-
-

FILE

-
  fortran/src/H5_ff_F90.f90
-
-

PURPOSE

-
  This file is a dummy module for when Fortran 2003 features are not enabled.
-  It is compiled in place of H5_ff_F03.f90 and is empty.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_f90.html b/fortran/doc/DevelGuide/src/H5_ff_f90.html deleted file mode 100644 index 021c7c5..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_f90.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - -./src/H5_ff.f90 - - - - - -
-
- -

H5LIB

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB
-
-

PURPOSE

-
  This module provides fortran specific helper functions for the HDF library
-
-

USES

-
  H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003
-                      only features. If Fortran 2003 functions are enabled then
-                      H5_ff_F03.f90 is compiled, else H5_ff_F90.f90,
-                      which is just a place holder blank module, is compiled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5check_version_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5check_version_f
-
-

PURPOSE

-
  Verifies that library versions are consistent.
-
-

INPUTS

-
  majnum               - major version of the library
-  minum                - minor version of the library
-  relnum               - release version of the library
-
-

OUTPUTS

-
  error                - error code
-                          Success:  0
-                          Failure:  application aborts
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: majnum, minnum, relnum
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5close_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5close_f
-
-

PURPOSE

-
  Closes the HDF5 library and Fortran90 interface.
-
-

OUTPUTS

-
  error - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5close_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5dont_atexit_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5dont_atexit_f
-
-

PURPOSE

-
  Instructs library not to install atexit cleanup routine.
-
-

OUTPUTS

-
  error  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5dont_atexit_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5garbage_collect_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5garbage_collect_f
-
-

PURPOSE

-
  Garbage collects on all free-lists of all types.
-
-

OUTPUTS

-
  error  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5garbage_collect_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5get_libversion_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5get_libversion_f
-
-

PURPOSE

-
  Returns the HDF5 LIbrary release number
-
-

OUTPUTS

-
  majnum               - major version of the library
-  minum                - minor version of the library
-  relnum               - release version of the library
-  error                - error code
-                           Success:  0
-                           Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error
-
- -
- -

h5kind_to_type

- -

[ Top ] [ H5LIB ] [ Functions ]

-

NAME

-
  h5kind_to_type
-
-

PURPOSE

-
  Converts the KIND to the correct HDF type
-
-

INPUTS

-
  kind    - Fortran KIND parameter
-  flag    - whether KIND is of type INTEGER or REAL:
-              H5_INTEGER_KIND - integer
-              H5_REAL_KIND    - real
-
-

OUTPUTS

-
  h5_type - returns the type
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 25, 2008
-
-

SOURCE

-
  INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: kind
-    INTEGER, INTENT(IN) :: flag
-
- -
- -

h5open_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5open_f
-
-

PURPOSE

-
  Initializes the HDF5 library and Fortran90 interface.
-
-

OUTPUTS

-
  error - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5open_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5f90global_f90.html b/fortran/doc/DevelGuide/src/H5f90global_f90.html deleted file mode 100644 index 587b6d0..0000000 --- a/fortran/doc/DevelGuide/src/H5f90global_f90.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - -./src/H5f90global.f90 - - - - - -
-
- -

H5GLOBAL

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5GLOBAL
-
-

FILE

-
  src/fortran/H5f90global.f90
-
-

PURPOSE

-
  This module is used to pass C stubs for H5 Fortran APIs. The C stubs are
-  packed into arrays in H5_f.c and these arrays are then passed to Fortran.
-  This module then uses EQUIVALENCE to assign elements of the arrays to
-  Fortran equivalent C stubs.
-
-

NOTES

-
  The size of the C arrays in H5_f.c has to match the values of the variables
-  declared as PARAMETER, hence if the size of an array in H5_f.c is changed
-  then the PARAMETER of that corresponding array in Fortran must also be changed.
-
-

USES

-
  H5FORTRAN_TYPES       - This module is generated at run time. See
-
-

AUTHOR

-
  Elena Pourmal
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5f90kit_c.html b/fortran/doc/DevelGuide/src/H5f90kit_c.html deleted file mode 100644 index 1329a87..0000000 --- a/fortran/doc/DevelGuide/src/H5f90kit_c.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./src/H5f90kit.c - - - - - -
-
- -

H5f90kit

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   Routines from HDF4 to deal with C-FORTRAN issues:
-
-   HD5f2cstring   -- convert a Fortran string to a C string
-   HD5packFstring -- convert a C string into a Fortran string
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5match_types_c.html b/fortran/doc/DevelGuide/src/H5match_types_c.html deleted file mode 100644 index 083319a..0000000 --- a/fortran/doc/DevelGuide/src/H5match_types_c.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -./src/H5match_types.c - - - - - -
-
- -

H5match_types

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5match_types
-
-

FILE

-
  fortran/src/H5match_types.c
-
-

PURPOSE

-
  C Program to match C types to Fortran types.
-  Creates the files H5f90i_gen.h for the C code and
-  H5fortran_types.f90 for the Fortran code.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html deleted file mode 100644 index 3494db0..0000000 --- a/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - -./src/H5test_kind_SIZEOF.f90 - - - - - -
-
- -

H5test_kind_SIZEOF

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5test_kind
-
-

FILE

-
  fortran/src/H5test_kind_SIZEOF.f90
-
-

PURPOSE

-
  This stand alone program is used at build time to generate the program
-  H5fortran_detect.f90. It cycles through all the available KIND parameters for
-  integers and reals. The appropriate program and subroutines are then generated
-  depending on which of the KIND values are found.
-
-

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.
-
-  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
-  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5test_kind_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_f90.html deleted file mode 100644 index c08e488..0000000 --- a/fortran/doc/DevelGuide/src/H5test_kind_f90.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - -./src/H5test_kind.f90 - - - - - -
-
- -

H5test_kind

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5test_kind
-
-

FILE

-
  fortran/src/H5test_kind.f90
-
-

PURPOSE

-
  This stand alone program is used at build time to generate the program
-  H5fortran_detect.f90. It cycles through all the available KIND parameters for
-  integers and reals. The appropriate program and subroutines are then generated
-  depending on which of the KIND values are found.
-
-

NOTES

-
  This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only
-  used when the Fortran intrinsic function SIZEOF is not available. It generates
-  code that does not make use of SIZEOF in H5fortran_detect.f90 which is less
-  portable in comparison to using SIZEOF.
-
-  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
-  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
-
-

AUTHOR

-
  Elena Pourma
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/HDF5_f90.html b/fortran/doc/DevelGuide/src/HDF5_f90.html deleted file mode 100644 index 1490c7c..0000000 --- a/fortran/doc/DevelGuide/src/HDF5_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./src/HDF5.f90 - - - - - -
-
- -

HDF5

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE HDF5
-
-

FILE

-
  src/fortran/src/HDF5.f90
-
-

PURPOSE

-
  This is the main module used for linking to the Fortran HDF library.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/HDF5mpio_f90.html b/fortran/doc/DevelGuide/src/HDF5mpio_f90.html deleted file mode 100644 index 9ef5f32..0000000 --- a/fortran/doc/DevelGuide/src/HDF5mpio_f90.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -./src/HDF5mpio.f90 - - - - - -
-
- -

HDF5 (mpio)

- -

[ Top ] [ Modules ]

-

NAME

-
  HDF5
-
-

PURPOSE

-
  This is the main module used for linking to the Fortran parallel HDF library.
-  This file replaces HDF5.f90 when compiling the parallel library.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fflush1_f90.html b/fortran/doc/DevelGuide/test/fflush1_f90.html deleted file mode 100644 index eaab841..0000000 --- a/fortran/doc/DevelGuide/test/fflush1_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/fflush1.f90 - - - - - -
-
- -

fortran/test/fflush1.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  FFLUSH1EXAMPLE
-
-

FUNCTION

-
  This is the first half of a two-part test that makes sure
-  that a file can be read after an application crashes as long
-  as the file was flushed first.  We simulate by exit the 
-  the program using stop statement
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fflush2_f90.html b/fortran/doc/DevelGuide/test/fflush2_f90.html deleted file mode 100644 index 23b7797..0000000 --- a/fortran/doc/DevelGuide/test/fflush2_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/fflush2.f90 - - - - - -
-
- -

fortran/test/fflush2.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fflush2.f90
-
-

FUNCTION

-
  This is the second half of a two-part test that makes sure
-  that a file can be read after an application crashes as long
-  as the file was flushed first.  This half tries to read the
-  file created by the first half.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html deleted file mode 100644 index 3ce387d..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/fortranlib_test_1_8.f90 - - - - - -
-
- -

fortran/test/fortranlib_test_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's introduced in 1.8 release.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html deleted file mode 100644 index 1a0c7be..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -./test/fortranlib_test_F03.f90 - - - - - -
-
- -

fortran/test/fortranlib_test_F03.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test_F03.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's requiring Fortran 2003
-  compliance.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_f90.html deleted file mode 100644 index 29fb2f1..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_f90.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/fortranlib_test.f90 - - - - - -
-
- -

fortran/test/fortranlib_test.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's functionality.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tF2003_f90.html b/fortran/doc/DevelGuide/test/tF2003_f90.html deleted file mode 100644 index 8101411..0000000 --- a/fortran/doc/DevelGuide/test/tF2003_f90.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -./test/tF2003.f90 - - - - - -
-
- -

fortran/test/tF2003.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tF2003.f90
-
-

FUNCTION

-
  Test FORTRAN HDF5 APIs which are dependent on the FORTRAN 2003
-  features. Tests H5L, H5P, H5T APIs. 
-
-

USES

-
  liter_cb_mod, test_genprop_cls_cb1_mod
-
-

CONTAINS SUBROUTINES

-
  test_iter_group, test_create, test_genprop_class_callback,
-  test_array_compound_atomic, test_array_compound_array,
-  test_array_bkg 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html deleted file mode 100644 index c217d99..0000000 --- a/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5A_1_8.f90 - - - - - -
-
- -

fortran/test/tH5A_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5A_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5A APIs introduced in 1.8.
-
-

CONTAINS SUBROUTINES

-
  attribute_test_1_8, test_attr_corder_create_compact, test_attr_null_space,
-  test_attr_create_by_name, test_attr_info_by_idx, attr_info_by_idx_check,
-  test_attr_shared_rename, test_attr_delete_by_idx, test_attr_shared_delete,
-  test_attr_dense_open, test_attr_dense_verify, test_attr_corder_create_basic,
-  test_attr_basic_write, test_attr_many, attr_open_check, 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5A_f90.html b/fortran/doc/DevelGuide/test/tH5A_f90.html deleted file mode 100644 index 87c5a45..0000000 --- a/fortran/doc/DevelGuide/test/tH5A_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5A.f90 - - - - - -
-
- -

fortran/test/tH5A.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5A.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5A APIs.
-
-

CONTAINS SUBROUTINES

-
  attribute_test 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5D_f90.html b/fortran/doc/DevelGuide/test/tH5D_f90.html deleted file mode 100644 index c840425..0000000 --- a/fortran/doc/DevelGuide/test/tH5D_f90.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -./test/tH5D.f90 - - - - - -
-
- -

fortran/test/tH5D.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5D.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5D APIs.
-
-

NOTES

-
  Tests the H5D APIs functionalities of:
-   h5dcreate_f, h5dopen_f, h5dclose_f, h5dget_space_f, h5dget_type_f,
-   h5dread_f, and h5dwrite_f
-
-

CONTAINS SUBROUTINES

-
  datasettest, extenddsettest
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5E_f90.html b/fortran/doc/DevelGuide/test/tH5E_f90.html deleted file mode 100644 index 6a1ef56..0000000 --- a/fortran/doc/DevelGuide/test/tH5E_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5E.f90 - - - - - -
-
- -

fortran/test/tH5E.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5E.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5E APIs.
-
-

NOTES

-
  Tests the H5D APIs functionalities of:
-   h5eprint_f
-
-

CONTAINS SUBROUTINES

-
  error_report_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5F_f90.html b/fortran/doc/DevelGuide/test/tH5F_f90.html deleted file mode 100644 index d1aff59..0000000 --- a/fortran/doc/DevelGuide/test/tH5F_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5F.f90 - - - - - -
-
- -

fortran/test/tH5F.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5F.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5F APIs.
-
-

CONTAINS SUBROUTINES

-
  mountingtest, reopentest, plisttest, file_close, file_space
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html deleted file mode 100644 index 81fdd3c..0000000 --- a/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -./test/tH5G_1_8.f90 - - - - - -
-
- -

fortran/test/tH5G_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5G_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5G APIs introduced in 1.8.
-
-

CONTAINS SUBROUTINES

-
  group_test, group_info, timestamps, mklinks, test_move_preserves, lifecycle
-  cklinks, delete_by_idx, link_info_by_idx_check, test_lcpl, objcopy, 
-  lapl_nlinks
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5G_f90.html b/fortran/doc/DevelGuide/test/tH5G_f90.html deleted file mode 100644 index 6c60a3c..0000000 --- a/fortran/doc/DevelGuide/test/tH5G_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5G.f90 - - - - - -
-
- -

fortran/test/tH5G.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5G.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5G APIs.
-
-

CONTAINS SUBROUTINES

-
  group_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5I_f90.html b/fortran/doc/DevelGuide/test/tH5I_f90.html deleted file mode 100644 index 52e21fc..0000000 --- a/fortran/doc/DevelGuide/test/tH5I_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5I.f90 - - - - - -
-
- -

fortran/test/tH5I.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5I.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5I APIs.
-
-

CONTAINS SUBROUTINES

-
  identifier_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5O_f90.html b/fortran/doc/DevelGuide/test/tH5O_f90.html deleted file mode 100644 index a128da5..0000000 --- a/fortran/doc/DevelGuide/test/tH5O_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5O.f90 - - - - - -
-
- -

fortran/test/tH5O.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5O.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5O APIs.
-
-

CONTAINS SUBROUTINES

-
  test_h5o, test_h5o_link, test_h5o_plist
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5P_f90.html b/fortran/doc/DevelGuide/test/tH5P_f90.html deleted file mode 100644 index edc0787..0000000 --- a/fortran/doc/DevelGuide/test/tH5P_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5P.f90 - - - - - -
-
- -

fortran/test/tH5P.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5P.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5P APIs.
-
-

CONTAINS SUBROUTINES

-
  external_test, multi_file_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5R_f90.html b/fortran/doc/DevelGuide/test/tH5R_f90.html deleted file mode 100644 index fd44062..0000000 --- a/fortran/doc/DevelGuide/test/tH5R_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5R.f90 - - - - - -
-
- -

fortran/test/tH5R.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5R.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5R, Reference Interface, APIs.
-
-

NOTES

-
  Tests h5rcreate_f, h5rdereference_f, h5rget_name_f 
-  and H5Rget_object_type functions
-
-

CONTAINS SUBROUTINES

-
  refobjtest, refregtest
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5S_f90.html b/fortran/doc/DevelGuide/test/tH5S_f90.html deleted file mode 100644 index 5879d28..0000000 --- a/fortran/doc/DevelGuide/test/tH5S_f90.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -./test/tH5S.f90 - - - - - -
-
- -

fortran/test/tH5S.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5S.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5S, Dataspace Interface, APIs.
-
-

NOTES

-
  Tests the following functionalities:
-   h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f,
-   h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f
-   h5sget_simple_extent_npoints_f, h5sget_simple_extent_type_f,
-   h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f
-
-

CONTAINS SUBROUTINES

-
  dataspace_basic_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5Sselect_f90.html b/fortran/doc/DevelGuide/test/tH5Sselect_f90.html deleted file mode 100644 index e8eaa73..0000000 --- a/fortran/doc/DevelGuide/test/tH5Sselect_f90.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -./test/tH5Sselect.f90 - - - - - -
-
- -

fortran/test/tH5Sselect.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5Sselect.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5S, Selection-related Dataspace Interface, APIs.
-
-

NOTES

-
  Tests the following functionalities:
-    h5sget_select_npoints_f, h5sselect_elements_f, h5sselect_all_f,
-    h5sselect_none_f, h5sselect_valid_f, h5sselect_hyperslab_f,
-    h5sget_select_bounds_f, h5sget_select_elem_pointlist_f,
-    h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f,
-    h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f   
-
-

CONTAINS SUBROUTINES

-
  test_select_hyperslab, test_select_element, test_basic_select,
-  test_select_point, test_select_combine, test_select_bounds
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5T_f90.html b/fortran/doc/DevelGuide/test/tH5T_f90.html deleted file mode 100644 index 35006b3..0000000 --- a/fortran/doc/DevelGuide/test/tH5T_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5T.f90 - - - - - -
-
- -

fortran/test/tH5T.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5T.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5T APIs.
-
-

CONTAINS SUBROUTINES

-
  compoundtest, basic_data_type_test, enumtest, test_derived_flt
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5VL_f90.html b/fortran/doc/DevelGuide/test/tH5VL_f90.html deleted file mode 100644 index a34a01d..0000000 --- a/fortran/doc/DevelGuide/test/tH5VL_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5VL.f90 - - - - - -
-
- -

fortran/test/tH5VL.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5VL.f90
-
-

FUNCTION

-
  Basic testing of Fortran Variable_length datatypes APIs.
-
-

CONTAINS SUBROUTINES

-
  vl_test_integer, vl_test_real, vl_test_string 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5Z_f90.html b/fortran/doc/DevelGuide/test/tH5Z_f90.html deleted file mode 100644 index 94325b9..0000000 --- a/fortran/doc/DevelGuide/test/tH5Z_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5Z.f90 - - - - - -
-
- -

fortran/test/tH5Z.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5Z.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5Z szip APIs.
-
-

CONTAINS SUBROUTINES

-
  filters_test, szip_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/t_c.html b/fortran/doc/DevelGuide/test/t_c.html deleted file mode 100644 index c9512a7..0000000 --- a/fortran/doc/DevelGuide/test/t_c.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/t.c - - - - - -
-
- -

fortran/test/tc.c

- -

[ Top ] [ Modules ]

-

NAME

-
   tc.c
-
-

FUNCTION

-
   This file contains C routines needed for the test programs.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tf_f90.html b/fortran/doc/DevelGuide/test/tf_f90.html deleted file mode 100644 index e3c51f4..0000000 --- a/fortran/doc/DevelGuide/test/tf_f90.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -./test/tf.f90 - - - - - -
-
- -

fortran/test/tf.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tf.f90
-
-

FUNCTION

-
  Contains subroutines which are needed in all the hdf5 fortran tests
-
-

CONTAINS SUBROUTINES

-
  write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f,
-  h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f
-
- -
- - - diff --git a/fortran/doc/DevelGuide/toc_index.html b/fortran/doc/DevelGuide/toc_index.html deleted file mode 100644 index 94a2792..0000000 --- a/fortran/doc/DevelGuide/toc_index.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - -Table of Contents - - - - -
-
- -
-

TABLE OF CONTENTS

- -
- - - -- cgit v0.12 From ea73fae0fb87eddd3a4712131dbbbedbfd00ab3e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 09:42:01 -0500 Subject: [svn-r27389] Added generated files to install --- fortran/src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index f333f3b..21684b9 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -206,6 +206,7 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT -- cgit v0.12 From b1800ed76717cb80d5de44a9ce1acb8b1f1baca1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 15 Jul 2015 10:10:43 -0500 Subject: [svn-r27390] Add fortran source depends command --- fortran/src/CMakeLists.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 21684b9..21cf457 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -37,7 +37,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_B #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate various KIND interfaces +# H5test_kind.F90 used to generate various KIND interfaces # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -128,7 +128,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (f90_F_SRCS +set (f90_F_BASE_SRCS # generated files ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 @@ -151,16 +151,27 @@ set (f90_F_SRCS ) set (f90_F_SRCS - ${f90_F_SRCS} - + ${f90_F_BASE_SRCS} + # generated file ${HDF5_F90_BINARY_DIR}/H5_gen.F90 - + # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties( + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + PROPERTIES OBJECT_DEPENDS + ${f90_F_BASE_SRCS} +) +set_source_files_properties( + ${HDF5_F90_BINARY_DIR}/HDF5.F90 + PROPERTIES OBJECT_DEPENDS + ${f90_F_BASE_SRCS} + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 +) #----------------------------------------------------------------------------- # Add Main fortran library @@ -206,7 +217,6 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT -- cgit v0.12 From 4667abe8a52a0147cd29b9991d196725dec3afc3 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 10:57:40 -0500 Subject: [svn-r27391] Added build dependencies to generated files --- fortran/src/CMakeLists.txt | 10 +++------- hl/fortran/src/CMakeLists.txt | 11 +++++++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 21cf457..82554bb 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -161,16 +161,12 @@ set (f90_F_SRCS ) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) -set_source_files_properties( - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 - PROPERTIES OBJECT_DEPENDS - ${f90_F_BASE_SRCS} +set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 + PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS}" ) set_source_files_properties( ${HDF5_F90_BINARY_DIR}/HDF5.F90 - PROPERTIES OBJECT_DEPENDS - ${f90_F_BASE_SRCS} - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS} ${HDF5_F90_BINARY_DIR}/H5_gen.F90" ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 5082090..0cccac5 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -82,14 +82,14 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (HDF5_HL_F90_F_SRCS +set (HDF5_HL_F90_F_BASE_SRCS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 ) set (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_F_SRCS} + ${HDF5_HL_F90_F_BASE_SRCS} # generated files ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 @@ -98,6 +98,13 @@ set (HDF5_HL_F90_F_SRCS set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties( + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + PROPERTIES OBJECT_DEPENDS "${HDF5_HL_F90_F_BASE_SRCS}" +) + + add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") if (BUILD_SHARED_LIBS) -- cgit v0.12 From f63785a1abd8cfaf23ad1ed76da7619d3e1e0b83 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 12:09:06 -0500 Subject: [svn-r27392] removed unused C functions --- fortran/src/H5Pf.c | 30 ---------- fortran/src/H5f90proto.h | 2 - fortran/src/H5match_types.c | 132 ++------------------------------------------ 3 files changed, 6 insertions(+), 158 deletions(-) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 59c6859..9735f48 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -2631,36 +2631,6 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) *size = (size_t_f)c_size; return ret_value; } -/****if* H5Pf/h5pcreate_class_c - * NAME - * h5pcreate_class_c - * PURPOSE - * Call H5Pcreate_class to create a new property class - * INPUTS - * parent - property list class identifier - * name - name of the new class - * name_len - lenght of the "name" buffer - * OUTPUTS - * cls - new class identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * - * HISTORY - * SOURCE -*/ -int_f -h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls) -/******/ -{ - int ret_value = -1; - - ret_value = h5pcreate_class_c(parent, name, name_len, cls, NULL, NULL, NULL, NULL, NULL, NULL); - return ret_value; -} - /****if* H5Pf/h5pcreate_class_c * NAME diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 710b44f..10acc22 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -120,7 +120,6 @@ H5_FCDLL int_f h5sget_simple_extent_type_c( hid_t_f *space_id , int_f *classtype H5_FCDLL int_f h5soffset_simple_c( hid_t_f *space_id , hssize_t_f *offset); H5_FCDLL int_f h5sset_extent_simple_c( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); H5_FCDLL int_f h5sis_simple_c( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f h5sextent_class_c( hid_t_f *space_id , int_f *classtype); H5_FCDLL int_f h5sget_simple_extent_dims_c( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); H5_FCDLL int_f h5sextent_copy_c( hid_t_f *dest_space_id , hid_t_f *source_space_id); H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id ); @@ -464,7 +463,6 @@ H5_FCDLL int_f h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); H5_FCDLL int_f h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); H5_FCDLL int_f h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); H5_FCDLL int_f h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f h5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); H5_FCDLL int_f h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); H5_FCDLL int_f h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 360f224..37509a0 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -244,18 +244,6 @@ int main(void) } # endif #endif -/* else { */ - /* /\* Did not find the real type, use the next smallest *\/ */ -/* sprintf(chrA, "%d", RealKinds[i]); */ -/* if(sizeof(float) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ -/* writeTypedef("float", "float", RealKinds[i]); */ -/* strcpy(Real_C_TYPES[i], chrA); */ -/* } else if(sizeof(double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ -/* writeTypedef("float", "double", RealKinds[i]); */ -/* strcpy(Real_C_TYPES[i], chrA); */ -/* } else if(sizeof(long double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */ -/* writeTypedef("float", "long double", RealKinds[i]); */ -/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ else { printf("\n **** HDF5 WARNING ****\n"); printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]); @@ -263,8 +251,6 @@ int main(void) RealKinds_SizeOf[i] = -1; RealKinds[i] = -1; -/* writeTypedef("float", "long double", RealKinds[i]); */ -/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */ } } @@ -328,8 +314,6 @@ int main(void) /* int */ writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_SIZEOF, H5_FORTRAN_NATIVE_INTEGER_KIND); - - /* int_1, int_2, int_4, int_8 */ @@ -409,62 +393,11 @@ int main(void) FoundRealSize[i] = (int)RealKinds[i]; FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i]; sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]); - /* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */ sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); } } -/* for(i=0;i 0) /\* Found the real type *\/ */ -/* { */ -/* sprintf(chrA, "Fortran_REAL_%d", Real_C_TYPES[i]); */ -/* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */ -/* writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); */ -/* } */ -/* else /\* Did not find the real type *\/ */ -/* { */ -/* flag = 0; /\* flag indicating if found the next highest *\/ */ -/* for(j=i+1;j<3;j++) /\* search for next highest *\/ */ -/* { */ -/* if( FoundRealSize[j] > 0) /\* Found the next highest *\/ */ -/* { */ -/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ -/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ -/* if(FoundRealSize[j]>4) { */ -/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ -/* flag = 1; */ -/* } */ -/* /\* else { *\/ */ -/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ -/* /\* } *\/ */ -/* flag = 1; */ -/* break; */ -/* } */ -/* } */ -/* if(flag == 0) /\* No higher one found, so find next lowest *\/ */ -/* { */ -/* for(j=1;j>-1;j--) /\* Search for next lowest *\/ */ -/* { */ -/* if( FoundRealSize[j] > 0) /\* Found the next lowest *\/ */ -/* { */ -/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ -/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ -/* if(FoundRealSize[j]>4) */ -/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ -/* /\* else { *\/ */ -/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ -/* /\* } *\/ */ -/* flag = 1; */ -/* break; */ -/* } */ -/* } */ -/* } */ -/* if(flag == 0) /\* No higher or lower one found, indicating an error *\/ */ -/* return -1; */ -/* } */ -/* } */ - /* hid_t */ for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) { @@ -491,9 +424,11 @@ int main(void) writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float)) writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); - else + else { /* Error: couldn't find a size for real_f */ + printf("Error: couldn't find a size for real_f \n"); return -1; + } } /* double_f */ @@ -514,66 +449,11 @@ int main(void) } #endif else { -/* /\* No exact match, choose the next highest *\/ */ -/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(long double)) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); */ -/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(double)) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(double), "C_DOUBLE"); */ -/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(float)) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(float), "C_FLOAT"); */ -/* else */ - /* Error: couldn't find a size for double_f */ -/* printf("Error: couldn't find a size for double_f \n"); */ -/* return -1; */ + /* Error: couldn't find a size for double_f */ + printf("Error: couldn't find a size for double_f \n"); + return -1; } - - -/* /\* double_f *\/ */ -/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_LONG_DOUBLE_SIZEOF) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_LONG_DOUBLE"); */ -/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_DOUBLE_SIZEOF) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_DOUBLE"); */ -/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_FLOAT_SIZEOF) */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_FLOAT"); */ -/* else */ -/* /\* Error: couldn't find a size for double_f *\/ */ -/* return -1; */ - -/* writeToFiles("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, H5_FORTRAN_NATIVE_DOUBLE_KIND); */ - -/* #elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND */ -/* writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); */ -/* #else */ -/* /\* Error: couldn't find a size for real_f *\/ */ -/* return -1; */ -/* #endif */ - -/* /\* real_f *\/ */ -/* if(sizeof(float) == C_LONG_DOUBLE_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_LONG_DOUBLE"); */ -/* } else if(sizeof(float) == C_DOUBLE_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_DOUBLE"); */ -/* } else if(sizeof(float) == C_FLOAT_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_REAL", "real_f", (int)sizeof(float), "C_FLOAT"); */ -/* } else { */ -/* /\* Error: couldn't find a size for real_f *\/ */ -/* return -1; */ -/* } */ - -/* /\* double_f *\/ */ -/* if(sizeof(double) == C_LONG_DOUBLE_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_LONG_DOUBLE"); */ -/* } else if(sizeof(double) == C_DOUBLE_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_DOUBLE"); */ -/* } else if(sizeof(double) == C_FLOAT_SIZEOF) { */ -/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", (int)sizeof(double), "C_FLOAT"); */ -/* } else { */ -/* /\* Error: couldn't find a size for double_f *\/ */ -/* return -1; */ -/* } */ - - /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03' * in order to be interoperable with C's structure, the C buffer size * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4) -- cgit v0.12 From 8617384653e7cd1bc75a2668a3c9196705715d77 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 13:56:28 -0500 Subject: [svn-r27393] removed unused C functions --- fortran/src/H5Af.c | 168 --------------------------------- fortran/src/H5Ef.c | 41 +------- fortran/src/H5f90proto.h | 13 ++- hl/fortran/src/H5LTf90proto.h | 30 ------ hl/fortran/src/H5LTfc.c | 213 ------------------------------------------ 5 files changed, 8 insertions(+), 457 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 0fa84a3..8f012cf 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -117,111 +117,6 @@ done: return ret_value; } - -/****if* H5Af/h5aopen_idx_c - * NAME - * h5aopen_idx_c - * PURPOSE - * Call H5Aopen_by_idx to open an attribute - * INPUTS - * obj_id - object identifier - * idx - attribute index ( zero based) - * OUTPUTS - * attr_id - attribute identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) -/******/ -{ - int_f ret_value = 0; /* Return value */ - - /* - * Call H5Aopen_by_idx function. - */ - if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - - -/****if* H5Af/h5aget_space_c - * NAME - * h5aget_space_c - * PURPOSE - * Call H5Aget_space to get attribute's dataspace - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * space_id - dataspace identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aget_space function. - */ - if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5aget_type_c - * NAME - * h5aget_type_c - * PURPOSE - * Call H5Aget_space to get attribute's datatype - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * type_id - datatype identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aget_type function. - */ - if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - /****if* H5Af/h5aget_num_attrs_c * NAME * h5aget_num_attrs_c @@ -311,69 +206,6 @@ done: return ret_value; } -/****if* H5Af/h5aget_storage_size_c - * NAME - * h5aget_storage_size_c - * PURPOSE - * Call H5Aget_storage_size - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * size - attributes storage requirements - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -h5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*size = (hsize_t_f)H5Aget_storage_size((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5aget_create_plist_c - * NAME - * h5aget_create_plist_c - * PURPOSE - * Call H5Aget_create_plist - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * creation_prop_id - Identifier for the attribute’s creation property - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -h5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*creation_prop_id = (hid_t_f)H5Aget_create_plist((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} /****if* H5Af/h5arename_by_name_c * NAME diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index bba0157..4b1d4c9 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -235,51 +235,14 @@ done: return ret_value; } -/****if* H5Ef/h5eset_auto_c - * NAME - * h5eset_auto_c - * PURPOSE - * Call H5Eset_auto to turn automatic error printing on or off. - * INPUTS - * printflag - flag to turn automatic error printing on or off. - * OUTPUTS - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 - * HISTORY - * Major bug fix: Function never disabled printing. - * SOURCE -*/ -int_f -h5eset_auto_c(int_f* printflag) -/******/ -{ - herr_t status = -1; - int_f ret_value = 0; - - if(*printflag == 1) - status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr); - else if(*printflag == 0) - status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - if(status < 0) - HGOTO_DONE(FAIL) - -done: - return ret_value; -} - - /****if* H5Ef/h5eset_auto2_c * NAME * h5eset_auto2_c * PURPOSE * Calls H5Eset_auto2 * INPUTS - * estack_id - Error stack identifier. - * func - Function to be called upon an error condition. + * estack_id - Error stack identifier. + * func - Function to be called upon an error condition. * client_data - Data passed to the error function. * * RETURNS diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 10acc22..b26e985 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -197,16 +197,11 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f * Functions from H5Af.c */ -H5_FCDLL int_f h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f h5aopen_idx_c(hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); -H5_FCDLL int_f h5aget_space_c(hid_t_f *attr_id, hid_t_f *space_id); -H5_FCDLL int_f h5aget_type_c(hid_t_f *attr_id, hid_t_f *type_id); H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num); H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); -H5_FCDLL int_f h5aget_storage_size_c( hid_t_f *attr_id, hsize_t_f *size ); H5_FCDLL int_f h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, @@ -220,7 +215,6 @@ H5_FCDLL int_f h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_ H5_FCDLL int_f h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id); -H5_FCDLL int_f h5aget_create_plist_c( hid_t_f *attr_id, hid_t_f *creation_prop_id ); H5_FCDLL int_f h5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, @@ -373,9 +367,13 @@ H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f* ik); H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f* ik); H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f*driver); H5_FCDLL int_f h5pset_fapl_stdio_c(hid_t_f *prp_id); +#ifdef NO_SUCH_F90_FUNCTION H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f* io); +#endif H5_FCDLL int_f h5pset_fapl_sec2_c(hid_t_f *prp_id); +#ifdef NO_SUCH_F90_FUNCTION H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f* sec2); +#endif H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); @@ -384,7 +382,9 @@ H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +#ifdef NO_SUCH_F90_FUNCTION H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); +#endif H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); @@ -517,7 +517,6 @@ H5_FCDLL int_f h5eprint_c1(_fcd name, int_f* namelen); H5_FCDLL int_f h5eprint_c2(void); H5_FCDLL int_f h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); H5_FCDLL int_f h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f h5eset_auto_c(int_f* printflag); H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data); /* diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 9de97e0..20d043e 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -120,36 +120,6 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 3122b60..c955590 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -367,219 +367,6 @@ done: } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_float_c -* -* Purpose: Call H5LTset_attribute_float -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * Call H5LTset_attribute_float function. - */ - c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - - ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname,(float *)buf,c_size); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - - -/*------------------------------------------------------------------------- -* Function: H5LTset_attribute_double_c -* -* Purpose: Call H5LTset_attribute_double -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; - - /* - * Convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * Call H5LTset_attribute_double function. - */ - c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - - ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf,c_size); - - if (ret < 0) - goto done; - - ret_value = 0; - - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - -/*------------------------------------------------------------------------- -* Function: H5LTset_attribute_string_c -* -* Purpose: Call H5LTset_attribute_string -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - char *c_buf = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - c_buf = (char *)HD5f2cstring((_fcd)buf, (size_t)*buflen); - if (c_buf == NULL) - goto done; - - - /* - * call H5LTset_attribute_string function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); - - if (ret < 0) - goto done; - - ret_value = 0; - - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - if(c_buf!=NULL) - HDfree(c_buf); - - return ret_value; -} - -/*------------------------------------------------------------------------- * Function: H5LTget_attribute_c * * Purpose: Call H5LTget_attribute_int -- cgit v0.12 From df50addca1c0483e2ad56573b4d40245d37ed757 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 14:57:47 -0500 Subject: [svn-r27394] added properties generated --- fortran/src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 82554bb..6c636b3 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -125,6 +125,8 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set_source_files_properties (H5_gen.F90 PROPERTIES GENERATED TRUE) + #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -- cgit v0.12 From 08244fb237c774129fe6b17e9021a8447fe8797b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 15 Jul 2015 15:04:31 -0500 Subject: [svn-r27395] cleaned-up code --- fortran/src/H5Aff.F90 | 107 ++++---------------------------------------------- 1 file changed, 7 insertions(+), 100 deletions(-) diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 6f925b7..132bf41 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -57,7 +57,13 @@ ! CHARACTER, TARGET :: chr ! ! (B) -! *** IMPORTANT *** +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! ! If you add a new H5A 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. @@ -437,39 +443,6 @@ CONTAINS hdferr = h5aget_name_c(attr_id, size, buf) END SUBROUTINE h5aget_name_f -!!$ -!!$ SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: attr_id -!!$ INTEGER(SIZE_T), INTENT(IN) :: size -!!$ CHARACTER(LEN=*), INTENT(INOUT) :: buf -!!$ INTEGER, INTENT(OUT) :: hdferr -!!$!***** -!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf -!!$ INTEGER(SIZE_T) :: size_out -!!$ -!!$ INTERFACE -!!$ INTEGER(SIZE_T) FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') -!!$ IMPORT :: C_CHAR -!!$ IMPORT :: HID_T, SIZE_T -!!$ INTEGER(HID_T), INTENT(IN), VALUE :: attr_id -!!$ INTEGER(SIZE_T), INTENT(IN), VALUE :: size -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf -!!$ END FUNCTION H5Aget_name -!!$ END INTERFACE -!!$ -!!$ ! add 1 for the null char -!!$ size_out = H5Aget_name(attr_id, size + 1_SIZE_T, c_buf) -!!$ -!!$ hdferr = 0 -!!$ IF(size_out.LT.0)THEN -!!$ hdferr = -1 -!!$ ELSE -!!$ CALL H5_Fortran_string_c2f(c_buf, buf) -!!$ ENDIF -!!$ -!!$ END SUBROUTINE H5Aget_name_f - ! !****s* H5A/H5Aget_name_by_idx_f ! @@ -572,72 +545,6 @@ CONTAINS END SUBROUTINE h5aget_name_by_idx_f -!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & -!!$ n, name, hdferr, size, lapl_id) -!!$ USE ISO_C_BINDING -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached -!!$ CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, -!!$ ! from which attribute is to be removed *TEST* check NULL -!!$ INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order -!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ ! H5_ITER_N_F - Number of iteration orders -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! Returns attribute name size, -!!$ ! -1 if fail -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, -!!$ ! of the attribute -!!$!***** -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER(SIZE_T) :: obj_namelen -!!$ INTEGER(SIZE_T) :: size_default, c_size -!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & -!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') -!!$ USE ISO_C_BINDING -!!$ USE H5GLOBAL -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name -!!$ INTEGER(C_INT), INTENT(IN) :: idx_type -!!$ INTEGER(C_INT), INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name -!!$ INTEGER(SIZE_T) :: size_default -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION H5Aget_name_by_idx -!!$ END INTERFACE -!!$ -!!$ obj_namelen = LEN(obj_name) -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ size_default = LEN(name) -!!$ -!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & -!!$ n, c_name, size_default, lapl_id_default) -!!$ -!!$ IF(c_size.LT.0) THEN -!!$ hdferr = -1 -!!$ ELSE -!!$ CALL C2F_string(c_name, name) -!!$ IF(PRESENT(size)) size = c_size -!!$ ENDIF -!!$ -!!$ END SUBROUTINE H5Aget_name_by_idx_f ! !****s* H5A/H5Aget_num_attrs_f ! -- cgit v0.12 From 53b3d666e5069ff65db1f739b7f0eb3634032b58 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Jul 2015 08:59:21 -0500 Subject: [svn-r27399] code clean-up --- fortran/src/H5_buildiface.F90 | 6 +++--- fortran/src/H5_f.c | 4 +--- fortran/src/Makefile.am | 20 +++----------------- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index 83d5009..9a42cbf 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -48,14 +48,14 @@ #include -PROGRAM test_kind +PROGRAM H5_buildiface USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE ! These values are valid REAL KINDs (with corresponding C float) found during configure H5_H5CONFIG_F_NUM_RKIND H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C float) found during configure +! These values are valid INTEGER KINDs (with corresponding C integer) found during configure H5_H5CONFIG_F_NUM_IKIND H5_H5CONFIG_F_IKIND @@ -1018,7 +1018,7 @@ PROGRAM test_kind CLOSE(11) -END PROGRAM test_kind +END PROGRAM H5_buildiface diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 90edfa7..e527dce 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -284,8 +284,6 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ( H5Tset_precision (types[17], 128) < 0) return ret_value; #endif - -/* #ifdef -MSB- */ /* * FIND H5T_NATIVE_FLOAT_128 */ @@ -758,7 +756,7 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* - * H5 Generic flags introduced in version 1.8 -MSB- + * H5 Generic flags introduced in version 1.8 */ /* H5_index_t enum struct */ diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 3333ae6..734f46e 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -106,9 +106,8 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5_buildiface is compiled and run to produce H5KIND***. -# H5fortran_detect is compiled and run to produce H5fort_type_defines.h. -# H5match_types.c then includes this file and can be compiled into +# H5_buildiface is compiled and run to produce H5_gen.F90. +# H5match_types.c then includes H5fort_type_defines.h and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h # and H5fortran_types.F90, which are included in the Fortran library. @@ -126,17 +125,6 @@ BUILT_SOURCES = H5f90i_gen.h H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5fort_type_defines.h is created by running H5fortran_detect. -# Obviously, H5fortran_detect needs to be built first. -#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) -# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h - -#H5match_types.$(OBJEXT): H5fort_type_defines.h - -# Automake knows how to build fortran programs if we tell it the source -# files. -#H5fortran_detect_SOURCES = H5fortran_detect.F90 - # H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. @@ -156,9 +144,7 @@ FORTRAN_API=yes # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -#H5fortran_types.lo: H5fortran_types.F90 -#H5fortran_detect.lo: H5fortran_detect.F90 -H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo -- cgit v0.12 From 93161fa55cfc157a8fecd4d19a2d5a746832cbfa Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Jul 2015 09:11:47 -0500 Subject: [svn-r27400] code clean-up --- hl/fortran/src/H5HL_buildiface.F90 | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 index 1f5e278..dbbe471 100644 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -1,14 +1,14 @@ -!****p* Program/H5test_kind +!****p* Program/H5HL_buildiface ! ! NAME -! Executable: H5test_kind +! Executable: H5HL_buildiface ! ! FILE -! fortran/src/H5test_kind.f90 +! fortran/src/H5HL_buildiface.f90 ! ! PURPOSE ! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! H5HL_gen.f90. It cycles through all the available KIND parameters for ! integers and reals. The appropriate program and subroutines are then generated ! depending on which of the KIND values are found. ! @@ -48,7 +48,7 @@ #include -PROGRAM test_kind +PROGRAM H5HL_buildiface USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -104,15 +104,15 @@ PROGRAM test_kind OPEN(11,FILE='H5LTff_gen.F90') WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5_KINDff.F90',& +'!****h* ROBODoc/H5LTff_gen.F90',& '!',& '! NAME',& -'! H5_KIND',& +'! H5LTff_gen',& '! ',& '! PURPOSE',& -'! This module is generated at build by H5make_HLinterfaces.F90 to handle all the',& -'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& -'! are H5LT APIs',& +'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& +'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& +'! are H5LT and H5TB APIs',& '!',& '! COPYRIGHT',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& @@ -130,7 +130,7 @@ PROGRAM test_kind '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& -'! H5make_HLinterfaces.F90',& +'! H5HL_buildiface.F90',& '!',& '!*****' @@ -406,18 +406,20 @@ PROGRAM test_kind CLOSE(11) +! Generate Fortran H5TB* interfaces having multiple KIND interfaces. + OPEN(11,FILE='H5TBff_gen.F90') WRITE(11,'(40(A,/))') & '!****h* ROBODoc/H5TBff_gen.F90',& '!',& '! NAME',& -'! H5_KIND',& +'! H5TBff_gen',& '! ',& '! PURPOSE',& -'! This module is generated at build by H5make_HLinterfaces.F90 to handle all the',& -'! detected REAL KINDs for APIs being passed REAL KINDs. Currently these ',& -'! are H5LT APIs',& +'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& +'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& +'! are H5LT and H5TB APIs',& '!',& '! COPYRIGHT',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& @@ -435,7 +437,7 @@ PROGRAM test_kind '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& -'! H5make_HLinterfaces.F90',& +'! H5HL_buildiface.F90',& '!',& '!*****' @@ -671,11 +673,11 @@ PROGRAM test_kind WRITE(11,'(A)') ' END SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO - WRITE(11,'(A)') 'END MODULE H5TB' ! change this to be generic MSB + WRITE(11,'(A)') 'END MODULE H5TB' CLOSE(11) -END PROGRAM test_kind +END PROGRAM H5HL_buildiface -- cgit v0.12 From bf8fea70bddf54092c213acf66f40222bdc1c743 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 16 Jul 2015 09:34:53 -0500 Subject: [svn-r27401] code cleanup --- configure | 47 +++++++++++++++++++-------------------- configure.ac | 59 +++++++------------------------------------------ fortran/src/Makefile.in | 15 +------------ m4/aclocal_fc.m4 | 21 ++++-------------- 4 files changed, 36 insertions(+), 106 deletions(-) diff --git a/configure b/configure index c7d7779..2c3d632 100755 --- a/configure +++ b/configure @@ -1567,7 +1567,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran 90/95 interface [default=no] + --enable-fortran Compile the Fortran interface [default=no] --enable-cxx Compile the C++ interface [default=no] --enable-hl Enable the high level library [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -5736,7 +5736,7 @@ else if test -s pac_Cconftest.out ; then LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" - else + else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi @@ -5753,15 +5753,14 @@ fi -## __float128 seems to work intel compilers, but it should be _Quad type instead +## __float128 seems to work with intel compilers, but it should be _Quad type instead if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then -## Check if __float128 and c_long_double are the same size and precision $as_echo "#define HAVE_FLOAT128 1" >>confdefs.h - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG - else + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG +else PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi @@ -7239,7 +7238,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - + ## Check KIND and size of native integer ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7247,9 +7246,12 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu rm -f pac_fconftest.out -if test "$cross_compiling" = yes; then : - +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat > conftest.$ac_ext <<_ACEOF @@ -7381,6 +7383,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -7433,8 +7436,7 @@ else PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" - - else + else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 $as_echo "$as_me: WARNING: No output from test program!" >&2;} fi @@ -7459,6 +7461,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Find all available KINDs ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7466,9 +7469,12 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu rm -f pac_fconftest.out -if test "$cross_compiling" = yes; then : - +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat > conftest.$ac_ext <<_ACEOF @@ -7600,12 +7606,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Find all sizeofs for available KINDs { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 @@ -7766,13 +7774,6 @@ $as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h fi - ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then - ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) - ##fi - - ##PAC_FC_AVAIL_INTEGER_MODELS - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h @@ -7910,8 +7911,8 @@ $as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } $as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" cat >>confdefs.h <<_ACEOF @@ -7929,8 +7930,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF - - ## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' diff --git a/configure.ac b/configure.ac index ced8f0a..e989147 100644 --- a/configure.ac +++ b/configure.ac @@ -368,26 +368,11 @@ HAVE_QUADMATH=0 AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) PAC_LDBL_DIG -## __float128 seems to work intel compilers, but it should be _Quad type instead +## __float128 seems to work with intel compilers, but it should be _Quad type instead if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then -## Check if __float128 and c_long_double are the same size and precision - dnl if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double"; then - dnl if test "$LDBL_DIG" = "$FLT128_DIG"; then - dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) - dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG - dnl else - dnl if test "$FLT128_DIG" > "$LDBL_DIG";then - dnl choose the larger precision - AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG - dnl else - dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available]) - dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG - dnl fi - dnl AC_MSG_CHECKING([for quadmath.h]) - dnl AC_MSG_RESULT([$HAVE_QUADMATH]) - dnl fi + AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG else PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi @@ -400,7 +385,7 @@ AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--enable-fortran], - [Compile the Fortran 90/95 interface [default=no]])], + [Compile the Fortran interface [default=no]])], [HDF_FORTRAN=$enableval]) if test "X$HDF_FORTRAN" = "Xyes"; then @@ -492,10 +477,12 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" PAC_PROG_FC_ISO_FORTRAN_ENV - + ## Check KIND and size of native integer PAC_FC_NATIVE_INTEGER - + + ## Find all available KINDs PAC_FC_AVAIL_KINDS + ## Find all sizeofs for available KINDs PAC_FC_SIZEOF_INT_KINDS PAC_FC_SIZEOF_REAL_KINDS @@ -529,13 +516,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) fi - ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then - ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) - ##fi - - ##PAC_FC_AVAIL_INTEGER_MODELS - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) fi @@ -574,9 +554,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl get the largest sizeof for REAL kinds - dnl max_real_fortran_sizeof="`echo $pack_real_sizeof | sed -e 's/, *$//g' | sed -e [0-9]*$`" - dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/, }//g' | sed -e [0-9]*$`" - dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/\(, \}\)//g' | sed -e 's/.* //g'`" max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" @@ -597,33 +574,13 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl count the number of real kinds H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - dnl MSB still need to replace spaces with commas?? H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" - dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | $PERL -pe 'tr |{}|//|' | $PERL -e 's/ /,/g`)" H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) - dnl AC_MSG_WARN([...$PAC_FC_ALL_REAL_KINDS_SIZEOF...$PAC_FC_ALL_REAL_KINDS...]) - dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}" - dnl tmp3="`echo $PAC_FC_ALL_REAL_KINDS | perl -pe 's/,[0-9]*\}$/\}/g'`" - dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`" - dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`" - dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`" - dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF" - dnl echo "$tmp3" - dnl tmp2=`echo $tmp3 | sed -e 's/[0-9]//'` - dnl AC_MSG_WARN([here $tmp2....]) - - dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}" - dnl echo "$PAC_FC_ALL_REAL_KINDS" - dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`" - dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`" - dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`" - dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF" - ## Change back to the C language AC_LANG_POP(Fortran) else diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 768d466..d17f8c0 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -1396,17 +1396,6 @@ install-exec-local: H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5fort_type_defines.h is created by running H5fortran_detect. -# Obviously, H5fortran_detect needs to be built first. -#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) -# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h - -#H5match_types.$(OBJEXT): H5fort_type_defines.h - -# Automake knows how to build fortran programs if we tell it the source -# files. -#H5fortran_detect_SOURCES = H5fortran_detect.F90 - # H5_buildiface.F90 generates all the APIs that have a KIND type associated # with them. @@ -1418,9 +1407,7 @@ H5_gen.F90: H5_buildiface$(EXEEXT) # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -#H5fortran_types.lo: H5fortran_types.F90 -#H5fortran_detect.lo: H5fortran_detect.F90 -H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index bd724b1..b0da27c 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -321,6 +321,7 @@ dnl AC_DEFUN([PAC_FC_AVAIL_KINDS],[ AC_LANG_PUSH([Fortran]) rm -f pac_fconftest.out + AC_RUN_IFELSE([ AC_LANG_SOURCE([ PROGRAM main @@ -415,13 +416,8 @@ AC_RUN_IFELSE([ ],[ AC_MSG_RESULT([Error]) AC_MSG_WARN([Failed to run program to determine available KINDs]) -],[ - dnl Even when cross_compiling=yes, - dnl pac_validKinds needs to be set for PAC_FC_INTEGER_MODEL_MAP() - dnl pac_validKinds="`echo \"$2\" | tr ',' ':'`" - dnl AC_MSG_RESULT([$2]) - dnl ifelse([$1],[],[PAC_FC_ALL_INTEGER_MODELS=$2],[$1=$2]) -]) +],[]) + AC_LANG_POP([Fortran]) ]) AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ @@ -534,13 +530,6 @@ rm -f pac_fconftest.out PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" - - dnl PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" - dnl PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" - dnl PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" - dnl PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" - dnl PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" - dnl PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" else AC_MSG_WARN([No output from test program!]) fi @@ -588,9 +577,7 @@ rm -f pac_Cconftest.out AC_RUN_IFELSE([],[ if test -s pac_Cconftest.out ; then LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" - FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" - dnl LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" - dnl FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" + FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" else AC_MSG_WARN([No output from test program!]) fi -- cgit v0.12 From a41f88bc3e53e445e616d8df11f5cf7f7f7a8a47 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Jul 2015 16:12:31 -0500 Subject: [svn-r27404] Implemented new function to compare reals with adjustible precision tolerance. --- fortran/test/H5_test_buildiface.F90 | 40 ++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 index fe5e716..9588bf0 100644 --- a/fortran/test/H5_test_buildiface.F90 +++ b/fortran/test/H5_test_buildiface.F90 @@ -211,13 +211,47 @@ PROGRAM H5_test_buildiface ! TEST IF TWO REAL NUMBERS ARE EQUAL ! *********************************** +! [1] The test performed is +! +! ABS( x - y ) < ( ULP * SPACING( MAX(ABS(x),ABS(y)) ) ) +! +! The numbers are considered equal if true +! +! The intrinsic function SPACING(x) returns the absolute spacing of numbers +! near the value of x, +! +! { EXPONENT(x)-DIGITS(x) +! { 2.0 for x /= 0 +! SPACING(x) = { +! { +! { TINY(x) for x == 0 +! +! The ULP optional argument scales the comparison: +! +! Unit of data precision. The acronym stands for "unit in +! the last place," the smallest possible increment or decrement +! that can be made using a machine's floating point arithmetic. +! A 0.5 ulp maximum error is the best you could hope for, since +! this corresponds to always rounding to the nearest representable +! floating-point number. Value must be positive - if a negative +! value is supplied, the absolute value is used. +! If not specified, the default value is 1. +! +! James Van Buskirk and James Giles suggested this method for floating +! point comparisons in the comp.lang.fortran newsgroup. +! +! Reference: [1] Paul van Delst, paul.vandelst@ssec.wisc.edu + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) WRITE(11,'(A)') '!DEC$endif' - WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b)' + WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b,ulp)' WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), PARAMETER :: eps = 1.e-8' - WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS(a-b) .LT. eps' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: Rel' + WRITE(11,'(A)') ' INTEGER, OPTIONAL, INTENT( IN ) :: ulp' + WRITE(11,'(A)') ' IF ( PRESENT( ulp ) ) Rel = REAL( ABS(ulp), '//TRIM(ADJUSTL(chr2))//')' + WRITE(11,'(A)') ' Rel = 1.0_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS( a - b ) < ( Rel * SPACING( MAX(ABS(a),ABS(b)) ) )' WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) ENDDO -- cgit v0.12 From 2edc6a97db51a030de24f37d0a4ca60724c0f8a2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Jul 2015 16:15:23 -0500 Subject: [svn-r27405] added implicit none --- fortran/test/H5_test_buildiface.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 index 9588bf0..30687df 100644 --- a/fortran/test/H5_test_buildiface.F90 +++ b/fortran/test/H5_test_buildiface.F90 @@ -55,7 +55,7 @@ PROGRAM H5_test_buildiface ! These values are valid REAL KINDs (with corresponding C float) found during configure H5_H5CONFIG_F_NUM_RKIND H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C float) found during configure +! These values are valid INTEGER KINDs (with corresponding C integer) found during configure H5_H5CONFIG_F_NUM_IKIND H5_H5CONFIG_F_IKIND @@ -93,8 +93,6 @@ PROGRAM H5_test_buildiface ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & /) - - ! Generate Fortran Check routines for the tests KIND interfaces. OPEN(11,FILE='tf_gen.F90') @@ -246,6 +244,7 @@ PROGRAM H5_test_buildiface WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) WRITE(11,'(A)') '!DEC$endif' WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b,ulp)' + WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: Rel' WRITE(11,'(A)') ' INTEGER, OPTIONAL, INTENT( IN ) :: ulp' @@ -286,6 +285,7 @@ PROGRAM H5_test_buildiface WRITE(11,'(A)') '!DEC$endif' ! Subroutine API WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' WRITE(11,'(A)') ' LOGICAL :: value, correct_value' WRITE(11,'(A)') ' INTEGER :: total_error' -- cgit v0.12 From a539386a873882148aed2a7601d661d2a57c6374 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 17 Jul 2015 16:54:07 -0500 Subject: [svn-r27406] gave full path to H5_gen.F90 --- fortran/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 6c636b3..c7b63c2 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -125,7 +125,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) -set_source_files_properties (H5_gen.F90 PROPERTIES GENERATED TRUE) +set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE) #----------------------------------------------------------------------------- # Fortran Modules -- cgit v0.12 From 94a6e02b3dfde5a226b124177c33526080d6bb86 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 18 Jul 2015 00:40:06 -0500 Subject: [svn-r27407] Updated the H5_ATTR_* macros. - Updated the preprocessor logic that defines the H5_ATTR_* macros. The Solaris Studio compiler understands __attribute__ but not the specific attributes that we use. The H5_ATTR_* macros are now defined as blank with that compiler which significantly cleans up the warnings, making debugging easier. - Replaced a few lingering __attribute__ macros with H5_ATTR_* markup. Tested on: h5committest Solaris w/ Solaris Studio (emu) --- src/H5Eprivate.h | 2 +- src/H5api_adpt.h | 5 ++++- test/h5test.h | 2 +- tools/perform/chunk.c | 4 ++-- tools/perform/overhead.c | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 2065b08..ba17ada 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -186,7 +186,7 @@ H5_DLL herr_t H5E_init(void); H5_DLL herr_t H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *desc); H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func, - unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)__attribute__((format (printf, 8, 9))); + unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)H5_ATTR_FORMAT(printf, 8, 9); H5_DLL herr_t H5E_clear_stack(H5E_t *estack); H5_DLL herr_t H5E_dump_api_stack(hbool_t is_api); diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 52167d0..74066f7 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -24,13 +24,16 @@ /* * Does the compiler support the __attribute__(()) syntax? It's no * big deal if we don't. + * + * Note that Solaris Studio supports attribute, but does not support the + * attributes we use. */ #ifdef __cplusplus # define H5_ATTR_FORMAT(X,Y,Z) /*void*/ # define H5_ATTR_UNUSED /*void*/ # define H5_ATTR_NORETURN /*void*/ #else /* __cplusplus */ -#ifdef H5_HAVE_ATTRIBUTE +#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) # define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) # define H5_ATTR_UNUSED __attribute__((unused)) # define H5_ATTR_NORETURN __attribute__((noreturn)) diff --git a/test/h5test.h b/test/h5test.h index fa0c11b..5b203c6 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -158,7 +158,7 @@ H5TEST_DLL void ParseTestVerbosity(char *argv); H5TEST_DLL int GetTestNumErrs(void); H5TEST_DLL void IncTestNumErrs(void); H5TEST_DLL const void *GetTestParameters(void); -H5TEST_DLL int TestErrPrintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); +H5TEST_DLL int TestErrPrintf(const char *format, ...) H5_ATTR_FORMAT(printf, 1, 2); H5TEST_DLL void SetTest(const char *testname, int action); H5TEST_DLL void TestAlarmOn(void); H5TEST_DLL void TestAlarmOff(void); diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c index 625809a..74bcc46 100644 --- a/tools/perform/chunk.c +++ b/tools/perform/chunk.c @@ -33,8 +33,8 @@ # include #endif - -#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus +/* Solaris Studio defines attribute, but for the attributes we need */ +#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus || defined(__SUNPRO_C) # undef __attribute__ # define __attribute__(X) /*void*/ # define H5_ATTR_UNUSED /*void*/ diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c index 0e9166c..0288ffa 100644 --- a/tools/perform/overhead.c +++ b/tools/perform/overhead.c @@ -46,7 +46,8 @@ # include #endif -#ifndef H5_HAVE_ATTRIBUTE +/* Solaris Studio defines attribute, but for the attributes we need */ +#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus || defined(__SUNPRO_C) # undef __attribute__ # define __attribute__(X) /*void*/ # define H5_ATTR_UNUSED /*void*/ -- cgit v0.12 From 74e4cd4d2146b61b9d0179e5e1dc8c9048be2e19 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 19 Jul 2015 19:11:50 -0500 Subject: [svn-r27412] Snapshot version 1.9 release 225 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/cpp_doc_config | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.txt b/README.txt index d960d93..068b1e0 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.225 currently under development +HDF5 version 1.9.226 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 8034813..b837527 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -670,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 # This is our main target diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index b7510a7..c0d8357 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.225 currently under development +PROJECT_NUMBER = HDF5 version 1.9.226 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/lt_vers.am b/config/lt_vers.am index d1e63da..7b5a8f1 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 1c355a1..00dbf24 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.225. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.226. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.225' -PACKAGE_STRING='HDF5 1.9.225' +PACKAGE_VERSION='1.9.226' +PACKAGE_STRING='HDF5 1.9.226' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.225 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.226 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1542,7 +1542,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.225:";; + short | recursive ) echo "Configuration of HDF5 1.9.226:";; esac cat <<\_ACEOF @@ -1731,7 +1731,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.225 +HDF5 configure 1.9.226 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2668,7 +2668,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.225, which was +It was created by HDF5 $as_me 1.9.226, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3539,7 +3539,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.225' + VERSION='1.9.226' cat >>confdefs.h <<_ACEOF @@ -28589,7 +28589,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.225 +HDF5 config.lt 1.9.226 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -30705,7 +30705,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.225, which was +This file was extended by HDF5 $as_me 1.9.226, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30771,7 +30771,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.225 +HDF5 config.status 1.9.226 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 8edc91b..5dd93b4 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.225], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.226], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 8a738f9..161e331 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 4d91c52..ceda49c 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -662,7 +662,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index e272dae..5370198 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -680,7 +680,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 16f02d1..4862b6b 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -661,7 +661,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d767b2a..6494479 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.225 currently under development +HDF5 version 1.9.226 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 40fa37c..3abc038 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 225 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 226 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.225" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.226" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index d997336..d2f94a5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 215 +LT_VERS_REVISION = 216 LT_VERS_AGE = 0 # Our main target, the HDF5 library -- cgit v0.12 From f550bc0cea1da09002118fe8dc4455b18fc26717 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 20 Jul 2015 17:21:36 -0500 Subject: [svn-r27415] Fix potential error with H5I_clear_type which could occur when a callback closed a different ID in the same type. Added a new skiplist routine, H5SL_try_free_safe, which iterates over items, freeing some of them, and which intercepts and defers attempts to remove from the list outside of the main iteration. Changed H5I_clear_type to use this function. Tested: jam, koala, ostrich (h5committest); ummon --- src/H5I.c | 138 ++++++++----- src/H5SL.c | 606 +++++++++++++++++++++++++++++++++++++++--------------- src/H5SLprivate.h | 6 + test/tid.c | 199 ++++++++++++++++++ test/tskiplist.c | 203 ++++++++++++++++++ 5 files changed, 935 insertions(+), 217 deletions(-) diff --git a/src/H5I.c b/src/H5I.c index a2348f8..605fc9b 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -99,6 +99,13 @@ typedef struct { hbool_t app_ref; /* Whether this is an appl. ref. call */ } H5I_iterate_ud_t; +/* User data for H5I__clear_type_cb */ +typedef struct { + H5I_id_type_t *type_ptr; /* Pointer to the type being cleard */ + hbool_t force; /* Whether to always remove the id */ + hbool_t app_ref; /* Whether this is an appl. ref. call */ +} H5I_clear_type_ud_t; + /*-------------------- Locally scoped variables -----------------------------*/ /* Array of pointers to atomic types */ @@ -122,6 +129,7 @@ H5FL_DEFINE_STATIC(H5I_id_type_t); H5FL_DEFINE_STATIC(H5I_class_t); /*--------------------- Local function prototypes ---------------------------*/ +static htri_t H5I__clear_type_cb(void *_id, void *key, void *udata); static int H5I__destroy_type(H5I_type_t type); static void *H5I__remove_verify(hid_t id, H5I_type_t id_type); static void *H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id); @@ -528,80 +536,98 @@ done: herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) { - H5I_id_type_t *type_ptr; /* ptr to the atomic type */ - H5SL_node_t *curr_node; /* Current skip list node ptr */ - H5SL_node_t *next_node; /* Next skip list node ptr */ - int ret_value = SUCCEED; /* Return value */ + H5I_clear_type_ud_t udata; /* udata struct for callback */ + int ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) if(type <= H5I_BADID || type >= H5I_next_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") - type_ptr = H5I_id_type_list_g[type]; - if(type_ptr == NULL || type_ptr->init_count <= 0) - HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") + udata.type_ptr = H5I_id_type_list_g[type]; + if(udata.type_ptr == NULL || udata.type_ptr->init_count <= 0) + HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") - /* - * Call free method for all objects in type regardless of their reference - * counts. Ignore the return value from from the free method and remove - * object from type regardless if FORCE is non-zero. - */ - for(curr_node = H5SL_first(type_ptr->ids); curr_node; curr_node = next_node) { - H5I_id_info_t *cur; /* Current ID being worked with */ - hbool_t delete_node; /* Flag to indicate node should be removed from linked list */ + /* Finish constructing udata */ + udata.force = force; + udata.app_ref = app_ref; - /* Get ID for this node */ - if(NULL == (cur = (H5I_id_info_t *)H5SL_item(curr_node))) - HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID info for node") + /* Attempt to free all ids in the type */ + if(H5SL_try_free_safe(udata.type_ptr->ids, H5I__clear_type_cb, &udata) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't free ids in type") - /* - * Do nothing to the object if the reference count is larger than - * one and forcing is off. - */ - if(!force && (cur->count - (!app_ref * cur->app_count)) > 1) - delete_node = FALSE; - else { - /* Check for a 'free' function and call it, if it exists */ - /* (Casting away const OK -QAK) */ - if(type_ptr->cls->free_func && (type_ptr->cls->free_func)((void *)cur->obj_ptr) < 0) { - if(force) { +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5I_clear_type() */ + + +/*------------------------------------------------------------------------- + * Function: H5I__clear_type_cb + * + * Purpose: Attempts to free the specified ID , calling the free + * function for the object. + * + * Return: Success: Non-negative + * Failure: negative + * + * Programmer: Neil Fortner + * Friday, July 10, 2015 + * + *------------------------------------------------------------------------- + */ +static htri_t +H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata) +{ + H5I_id_info_t *id = (H5I_id_info_t *)_id; /* Current ID being worked with */ + H5I_clear_type_ud_t *udata = (H5I_clear_type_ud_t *)_udata; /* udata struct */ + htri_t ret_value = FALSE; /* Return value */ + + FUNC_ENTER_STATIC_NOERR + + HDassert(id); + HDassert(udata); + HDassert(udata->type_ptr); + + /* + * Do nothing to the object if the reference count is larger than + * one and forcing is off. + */ + if(udata->force || (id->count - (!udata->app_ref * id->app_count)) <= 1) { + /* Check for a 'free' function and call it, if it exists */ + /* (Casting away const OK -QAK) */ + if(udata->type_ptr->cls->free_func && (udata->type_ptr->cls->free_func)((void *)id->obj_ptr) < 0) { + if(udata->force) { #ifdef H5I_DEBUG - if(H5DEBUG(I)) { - fprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx " - "failure ignored\n", (int)type, - (unsigned long)(cur->obj_ptr)); - } /* end if */ + if(H5DEBUG(I)) { + fprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx " + "failure ignored\n", + (int)udata->type_ptr->cls->type_id, + (unsigned long)(id->obj_ptr)); + } /* end if */ #endif /*H5I_DEBUG*/ - /* Indicate node should be removed from list */ - delete_node = TRUE; - } /* end if */ - else { - /* Indicate node should _NOT_ be remove from list */ - delete_node = FALSE; - } /* end else */ - } /* end if */ - else { /* Indicate node should be removed from list */ - delete_node = TRUE; - } /* end else */ + ret_value = TRUE; + } /* end if */ + } /* end if */ + else { + /* Indicate node should be removed from list */ + ret_value = TRUE; } /* end else */ - /* Get the next node in the list */ - next_node = H5SL_next(curr_node); + /* Remove ID if requested */ + if(ret_value) { + /* Free ID info */ + id = H5FL_FREE(H5I_id_info_t, id); - /* Check if we should delete this node or not */ - if(delete_node) { - /* Remove the node from the type */ - if(NULL == H5I__remove_common(type_ptr, cur->id)) - HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't remove ID node") + /* Decrement the number of IDs in the type */ + udata->type_ptr->id_count--; } /* end if */ - } /* end for */ + } /* end if */ + -done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5I_clear_type() */ +} /* end H5I__clear_type_cb() */ /*------------------------------------------------------------------------- diff --git a/src/H5SL.c b/src/H5SL.c index 2e72819..d766066 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -74,11 +74,26 @@ /* Define the code template for searches for the "OP" in the H5SL_LOCATE macro */ #define H5SL_LOCATE_SEARCH_FOUND(SLIST, X, I) \ - HGOTO_DONE(X->item); +{ \ + HDassert(!X->removed); \ + HGOTO_DONE(X->item); \ +} /* end block */ + +/* Define the code template for deferred removals for the "OP" in the + * H5SL_LOCATE macro */ +#define H5SL_LOCATE_SEARCH_DEFER_REMOVE_FOUND(SLIST, X, I) \ +{ \ + HDassert(!X->removed); \ + X->removed = TRUE; \ + HGOTO_DONE(X->item); \ +} /* end block */ /* Define the code template for finds for the "OP" in the H5SL_LOCATE macro */ #define H5SL_LOCATE_FIND_FOUND(SLIST, X, I) \ - HGOTO_DONE(X); +{ \ + HDassert(!X->removed); \ + HGOTO_DONE(X); \ +} /* end block */ /* Define a code template for comparing scalar keys for the "CMP" in the H5SL_LOCATE macro */ @@ -133,8 +148,8 @@ #define H5SL_LOCATE_GENERIC_HASHINIT(KEY, HASHVAL) -/* Macro used to find node for operation */ -#define H5SL_LOCATE(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ +/* Macro used to find node for operation, if all keys are valid */ +#define H5SL_LOCATE_OPT(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ { \ int _i; /* Local index variable */ \ unsigned _count; /* Num nodes searched at this height */ \ @@ -150,15 +165,53 @@ } /* end for */ \ X = X->forward[0]; \ if(X != NULL && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, X, KEY, HASHVAL) ) { \ - /* What to do when a node is found */ \ + /* What to do when a node is found */ \ H5_GLUE3(H5SL_LOCATE_,OP,_FOUND)(SLIST, X, _i) \ } /* end if */ \ } +/* Macro used to find node for operation, if there may be "removed" nodes in the + * list (whose keys cannot be read) */ +#define H5SL_LOCATE_SAFE(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ +{ \ + int _i; /* Local index variable */ \ + H5SL_node_t *_low = X; \ + H5SL_node_t *_high = NULL; \ + \ + H5_GLUE3(H5SL_LOCATE_,CMP,_HASHINIT)(KEY, HASHVAL) \ + for(_i = (int)SLIST->curr_level; _i >= 0; _i--) { \ + X = _low->forward[_i]; \ + while(X != _high) { \ + if(!X->removed) { \ + if(H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X, KEY, HASHVAL)) \ + _low = X; \ + else \ + break; \ + } /* end if */ \ + X = X->forward[_i]; \ + } /* end while */ \ + _high = X; \ + if(X != NULL && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, X, KEY, HASHVAL) ) { \ + /* What to do when a node is found */ \ + H5_GLUE3(H5SL_LOCATE_,OP,_FOUND)(SLIST, X, _i) \ + break; \ + } /* end if */ \ + } /* end for */ \ +} + +/* Macro used to find node for operation */ +#define H5SL_LOCATE(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ +{ \ + if((SLIST)->safe_iterating) \ + H5SL_LOCATE_SAFE(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ + else \ + H5SL_LOCATE_OPT(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ +} + /* Macro used to grow a node by 1. Does not update pointers. LVL is the current * level of X. Does not update LVL but does update X->lvl. */ -#define H5SL_GROW(X, LVL) \ +#define H5SL_GROW(X, LVL, ERR) \ { \ /* Check if we need to increase allocation of forward pointers */ \ if(LVL + 1 >= 1u << X->log_nalloc) { \ @@ -176,8 +229,10 @@ HDassert(H5SL_fac_nused_g == H5SL_fac_nalloc_g); \ /* Double the size of the array of factory pointers */ \ H5SL_fac_nalloc_g *= 2; \ - H5SL_fac_g = (H5FL_fac_head_t **)H5MM_realloc((void *)H5SL_fac_g, \ - H5SL_fac_nalloc_g * sizeof(H5FL_fac_head_t *)); \ + if(NULL == (H5SL_fac_g = (H5FL_fac_head_t **)H5MM_realloc( \ + (void *)H5SL_fac_g, H5SL_fac_nalloc_g \ + * sizeof(H5FL_fac_head_t *)))) \ + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed") \ } /* end if */ \ \ /* Create the new factory */ \ @@ -187,7 +242,7 @@ \ /* Allocate space for new forward pointers */ \ if(NULL == (_tmp = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[X->log_nalloc]))) \ - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") \ + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed") \ HDmemcpy((void *)_tmp, (const void *)X->forward, (LVL + 1) * sizeof(H5SL_node_t *)); \ X->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[X->log_nalloc-1], (void *)X->forward); \ X->forward = _tmp; \ @@ -222,16 +277,16 @@ /* Macro used to grow the level of a node by 1, with appropriate changes to the * head node if necessary. PREV is the previous node of the height that X is to * grow to. */ -#define H5SL_PROMOTE(SLIST, X, PREV) \ +#define H5SL_PROMOTE(SLIST, X, PREV, ERR) \ { \ size_t _lvl = X->level; \ \ - H5SL_GROW(X, _lvl); \ + H5SL_GROW(X, _lvl, ERR); \ \ if(_lvl == (size_t) SLIST->curr_level) { \ HDassert(PREV == SLIST->header); \ /* Grow the head */ \ - H5SL_GROW(PREV, _lvl); \ + H5SL_GROW(PREV, _lvl, ERR) \ SLIST->curr_level++; \ X->forward[_lvl+1] = NULL; \ } else { \ @@ -298,7 +353,7 @@ /* Promote the middle node if necessary */ \ if(_count == 3) { \ HDassert(X == _last->forward[_i]->forward[_i]); \ - H5SL_PROMOTE(SLIST, X, _last) \ + H5SL_PROMOTE(SLIST, X, _last, NULL) \ } \ \ /* Prepare to drop down */ \ @@ -314,161 +369,167 @@ /* Macro used to remove node */ #define H5SL_REMOVE(CMP, SLIST, X, TYPE, KEY, HASHVAL) \ { \ - H5SL_node_t *_last = X; /* Lowest node in the current gap */ \ - H5SL_node_t *_llast = X; /* Lowest node in the previous gap */ \ - H5SL_node_t *_next = NULL; /* Highest node in the currect gap */ \ - H5SL_node_t *_drop = NULL; /* Low node of the gap to drop into */ \ - H5SL_node_t *_ldrop = NULL; /* Low node of gap before the one to drop into */ \ - H5SL_node_t *_head = SLIST->header; /* Head of the skip list */ \ - int _count; /* Number of nodes in the current gap */ \ - int _i = (int)SLIST->curr_level; \ + /* Check for deferred removal */ \ + if(SLIST->safe_iterating) \ + H5SL_LOCATE(SEARCH_DEFER_REMOVE, CMP, SLIST, X, TYPE, KEY, HASHVAL) \ + else { \ + H5SL_node_t *_last = X; /* Lowest node in the current gap */ \ + H5SL_node_t *_llast = X; /* Lowest node in the previous gap */ \ + H5SL_node_t *_next = NULL; /* Highest node in the currect gap */ \ + H5SL_node_t *_drop = NULL; /* Low node of the gap to drop into */ \ + H5SL_node_t *_ldrop = NULL; /* Low node of gap before the one to drop into */ \ + H5SL_node_t *_head = SLIST->header; /* Head of the skip list */ \ + int _count; /* Number of nodes in the current gap */ \ + int _i = (int)SLIST->curr_level; \ \ - if(_i < 0) \ - HGOTO_DONE(NULL); \ + if(_i < 0) \ + HGOTO_DONE(NULL); \ \ - H5_GLUE3(H5SL_LOCATE_,CMP,_HASHINIT)(KEY, HASHVAL) \ + H5_GLUE3(H5SL_LOCATE_,CMP,_HASHINIT)(KEY, HASHVAL) \ \ - /* Find the gap to drop in to at the highest level */ \ - while(X && (!X->key || H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X, KEY, HASHVAL))) { \ - _llast = _last; \ - _last = X; \ - X = X->forward[_i]; \ - } \ - _next = X; \ + /* Find the gap to drop in to at the highest level */ \ + while(X && (!X->key || H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X, KEY, HASHVAL))) { \ + _llast = _last; \ + _last = X; \ + X = X->forward[_i]; \ + } \ + _next = X; \ \ - /* Main loop */ \ - for(_i--; _i >= 0; _i--) { \ - /* Search for the node to drop into, also count the number of nodes */ \ - /* of height _i in this gap and keep track of of the node before */ \ - /* the one to drop into (_ldrop will become _llast, _drop will */ \ - /* become _last). */ \ - X = _ldrop = _last; \ - _drop = NULL; \ - for(_count = 0; ; _count++) { \ - /* Terminate if this is the last node in the gap */ \ - if(X->forward[_i] == _next) { \ - if(!_drop) \ - _drop = X; \ - break; \ - } /* end if */ \ + /* Main loop */ \ + for(_i--; _i >= 0; _i--) { \ + /* Search for the node to drop into, also count the number of */ \ + /* nodes of height _i in this gap and keep track of of the node */ \ + /* before the one to drop into (_ldrop will become _llast, */ \ + /* _drop will become _last). */ \ + X = _ldrop = _last; \ + _drop = NULL; \ + for(_count = 0; ; _count++) { \ + /* Terminate if this is the last node in the gap */ \ + if(X->forward[_i] == _next) { \ + if(!_drop) \ + _drop = X; \ + break; \ + } /* end if */ \ \ - /* If we have already found the node to drop into and there is */ \ - /* more than one node in this gap, we can stop searching */ \ - if(_drop) { \ - HDassert(_count >= 1); \ - _count = 2; \ - break; \ - } else { /* !_drop */ \ - /* Check if this node is the start of the next gap */ \ - if (!H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X->forward[_i], KEY, HASHVAL)) { \ - _drop = X; \ - /* Again check if we can stop searching */ \ - if(_count) { \ - _count = 2; \ - break; \ + /* If we have already found the node to drop into and there */ \ + /* is more than one node in this gap, we can stop searching */ \ + if(_drop) { \ + HDassert(_count >= 1); \ + _count = 2; \ + break; \ + } else { /* !_drop */ \ + /* Check if this node is the start of the next gap */ \ + if (!H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X->forward[_i], KEY, HASHVAL)) { \ + _drop = X; \ + /* Again check if we can stop searching */ \ + if(_count) { \ + _count = 2; \ + break; \ + } /* end if */ \ } /* end if */ \ - } /* end if */ \ - else \ - _ldrop = X; \ - } /* end else */ \ + else \ + _ldrop = X; \ + } /* end else */ \ \ - /* No need to check the last node in the gap if there are 3, as */ \ - /* there cannot be a fourth */ \ - if(_count == 2) { \ - if(!_drop) \ - _drop = X->forward[_i]; \ - break; \ - } /* end if */ \ - X = X->forward[_i]; \ - } /* end for */ \ - HDassert(_count >= 1 && _count <= 3); \ - HDassert(!_drop->forward[_i] || \ - !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \ + /* No need to check the last node in the gap if there are */ \ + /* 3, as there cannot be a fourth */ \ + if(_count == 2) { \ + if(!_drop) \ + _drop = X->forward[_i]; \ + break; \ + } /* end if */ \ + X = X->forward[_i]; \ + } /* end for */ \ + HDassert(_count >= 1 && _count <= 3); \ + HDassert(!_drop->forward[_i] || \ + !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \ \ - /* Check if we need to adjust node heights */ \ - if(_count == 1) { \ - /* Check if we are in the first gap */ \ - if(_llast == _last) { \ - /* We are in the first gap, count the number of nodes of */ \ - /* height _i in the next gap. We need only check one node */ \ - /* to see if we should promote the first node in the next */ \ - /* gap */ \ - _llast = _next->forward[_i+1]; \ + /* Check if we need to adjust node heights */ \ + if(_count == 1) { \ + /* Check if we are in the first gap */ \ + if(_llast == _last) { \ + /* We are in the first gap, count the number of nodes */ \ + /* of height _i in the next gap. We need only check */ \ + /* onenode to see if we should promote the first node */ \ + /* in the next gap */ \ + _llast = _next->forward[_i+1]; \ \ - /* Demote the separator node */ \ - H5SL_DEMOTE(_next, _last) \ + /* Demote the separator node */ \ + H5SL_DEMOTE(_next, _last) \ \ - /* If there are 2 or more nodes, promote the first */ \ - if(_next->forward[_i]->forward[_i] != _llast) { \ - X = _next->forward[_i]; \ - H5SL_PROMOTE(SLIST, X, _last) \ - } else if(!_head->forward[_i+1]) { \ - /* shrink the header */ \ - HDassert(_i == SLIST->curr_level - 1); \ - HDassert((size_t) SLIST->curr_level == _head->level); \ + /* If there are 2 or more nodes, promote the first */ \ + if(_next->forward[_i]->forward[_i] != _llast) { \ + X = _next->forward[_i]; \ + H5SL_PROMOTE(SLIST, X, _last, NULL) \ + } else if(!_head->forward[_i+1]) { \ + /* shrink the header */ \ + HDassert(_i == SLIST->curr_level - 1); \ + HDassert((size_t) SLIST->curr_level == _head->level); \ \ - H5SL_SHRINK(_head, (size_t) (_i+1)) \ - SLIST->curr_level--; \ - } /* end else */ \ - } else { \ - /* We are not in the first gap, count the number of nodes */ \ - /* of height _i in the previous gap. Note we "look ahead" */ \ - /* in this loop so X has the value of the last node in the */ \ - /* previous gap. */ \ - X = _llast->forward[_i]; \ - for(_count = 1; _count < 3 && X->forward[_i] != _last; _count++) \ - X = X->forward[_i]; \ - HDassert(X->forward[_i] == _last); \ + H5SL_SHRINK(_head, (size_t) (_i+1)) \ + SLIST->curr_level--; \ + } /* end else */ \ + } else { \ + /* We are not in the first gap, count the number of */ \ + /* nodes of height _i in the previous gap. Note we */ \ + /* "look ahead" in this loop so X has the value of the */ \ + /* last node in the previous gap. */ \ + X = _llast->forward[_i]; \ + for(_count = 1; _count < 3 && X->forward[_i] != _last; _count++) \ + X = X->forward[_i]; \ + HDassert(X->forward[_i] == _last); \ \ - /* Demote the separator node */ \ - H5SL_DEMOTE(_last, _llast) \ + /* Demote the separator node */ \ + H5SL_DEMOTE(_last, _llast) \ \ - /* If there are 2 or more nodes, promote the last */ \ - if(_count >= 2) \ - H5SL_PROMOTE(SLIST, X, _llast) \ - else if(!_head->forward[_i+1]) { \ - /* shrink the header */ \ - HDassert(_i == SLIST->curr_level - 1); \ - HDassert((size_t) SLIST->curr_level == _head->level); \ + /* If there are 2 or more nodes, promote the last */ \ + if(_count >= 2) \ + H5SL_PROMOTE(SLIST, X, _llast, NULL) \ + else if(!_head->forward[_i+1]) { \ + /* shrink the header */ \ + HDassert(_i == SLIST->curr_level - 1); \ + HDassert((size_t) SLIST->curr_level == _head->level); \ \ - H5SL_SHRINK(_head, (size_t) (_i+1)) \ - SLIST->curr_level--; \ + H5SL_SHRINK(_head, (size_t) (_i+1)) \ + SLIST->curr_level--; \ + } /* end else */ \ } /* end else */ \ - } /* end else */ \ - } /* end if */ \ + } /* end if */ \ \ - /* Prepare to drop down */ \ - _llast = _ldrop; \ - _last = _drop; \ - _next = _drop->forward[_i]; \ - } /* end for */ \ + /* Prepare to drop down */ \ + _llast = _ldrop; \ + _last = _drop; \ + _next = _drop->forward[_i]; \ + } /* end for */ \ \ - /* Check if we've found the node */ \ - if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, _next, KEY, HASHVAL)) { \ - void *tmp = _next->item; \ - X = _next; \ + /* Check if we've found the node */ \ + if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, _next, KEY, HASHVAL)) { \ + void *tmp = _next->item; \ + X = _next; \ \ - /* If the node has a height > 0, swap it with its (lower) neighbor */ \ - if(X->level) { \ - X = X->backward; \ - _next->key = X->key; \ - _next->item = X->item; \ - _next->hashval = X->hashval; \ - } /* end if */ \ - HDassert(!X->level); \ + /* If the node has a height > 0, swap it with its (lower) */ \ + /* neighbor */ \ + if(X->level) { \ + X = X->backward; \ + _next->key = X->key; \ + _next->item = X->item; \ + _next->hashval = X->hashval; \ + } /* end if */ \ + HDassert(!X->level); \ \ - /* Remove the node */ \ - X->backward->forward[0] = X->forward[0]; \ - if(SLIST->last == X) \ - SLIST->last = X->backward; \ - else \ - X->forward[0]->backward = X->backward; \ - SLIST->nobjs--; \ - X->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[0], X->forward); \ - X = H5FL_FREE(H5SL_node_t, X); \ + /* Remove the node */ \ + X->backward->forward[0] = X->forward[0]; \ + if(SLIST->last == X) \ + SLIST->last = X->backward; \ + else \ + X->forward[0]->backward = X->backward; \ + SLIST->nobjs--; \ + X->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[0], X->forward); \ + X = H5FL_FREE(H5SL_node_t, X); \ \ - HGOTO_DONE(tmp); \ - } /* end if */ \ + HGOTO_DONE(tmp); \ + } /* end if */ \ + } /* end else */ \ } @@ -490,6 +551,7 @@ struct H5SL_node_t { size_t level; /* The level of this node */ size_t log_nalloc; /* log2(Number of slots allocated in forward) */ uint32_t hashval; /* Hash value for key (only for strings, currently) */ + hbool_t removed; /* Whether the node is "removed" (actual removal deferred) */ struct H5SL_node_t **forward; /* Array of forward pointers from this node */ struct H5SL_node_t *backward; /* Backward pointer from this node */ }; @@ -505,6 +567,7 @@ struct H5SL_t { size_t nobjs; /* Number of active objects in skip list */ H5SL_node_t *header; /* Header for nodes in skip list */ H5SL_node_t *last; /* Pointer to last node in skip list */ + hbool_t safe_iterating; /* Whether a routine is "safely" iterating over the list and removals should be deferred */ }; /* Static functions */ @@ -599,6 +662,7 @@ H5SL_new_node(void *item, const void *key, uint32_t hashval) ret_value->item = item; ret_value->level = 0; ret_value->hashval = hashval; + ret_value->removed = FALSE; if(NULL == (ret_value->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) { ret_value = H5FL_FREE(H5SL_node_t, ret_value); HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") @@ -712,7 +776,7 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key) if(x->forward[0]) x->forward[0]->backward = x; else { - HDassert(slist->last); + HDassert(slist->last == prev); slist->last = x; } @@ -766,14 +830,14 @@ H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* (Pre-condition) */ /* Free skip list nodes */ - node=slist->header->forward[0]; - while(node!=NULL) { - next_node=node->forward[0]; + node = slist->header->forward[0]; + while(node) { + next_node = node->forward[0]; /* Call callback, if one is given */ - if(op!=NULL) + if(op) /* Casting away const OK -QAK */ - (void)(op)(node->item,(void *)node->key,op_data); + (void)(op)(node->item, (void *)node->key, op_data); node->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[node->log_nalloc], node->forward); node = H5FL_FREE(H5SL_node_t, node); @@ -782,18 +846,18 @@ H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Reset the header pointers */ slist->header->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[slist->header->log_nalloc], slist->header->forward); - if(NULL == (slist->header->forward = (H5SL_node_t **) H5FL_FAC_MALLOC(H5SL_fac_g[0]))) + if(NULL == (slist->header->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, FAIL, "memory allocation failed") slist->header->forward[0] = NULL; slist->header->log_nalloc = 0; slist->header->level = 0; /* Reset the last pointer */ - slist->last=slist->header; + slist->last = slist->header; /* Reset the dynamic internal fields */ - slist->curr_level=-1; - slist->nobjs=0; + slist->curr_level = -1; + slist->nobjs = 0; done: FUNC_LEAVE_NOAPI(ret_value) @@ -893,6 +957,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp) /* Set the dynamic internal fields */ new_slist->curr_level = -1; new_slist->nobjs = 0; + new_slist->safe_iterating = FALSE; /* Allocate the header node */ if(NULL == (header = H5SL_new_node(NULL, NULL, (uint32_t)ULONG_MAX))) @@ -948,6 +1013,9 @@ H5SL_count(H5SL_t *slist) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -987,6 +1055,9 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key) HDassert(slist); HDassert(key); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1034,6 +1105,9 @@ H5SL_add(H5SL_t *slist, void *item, const void *key) HDassert(slist); HDassert(key); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1166,6 +1240,9 @@ H5SL_remove_first(H5SL_t *slist) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1211,7 +1288,7 @@ H5SL_remove_first(H5SL_t *slist) HDassert(tmp->forward[i]->forward[i]->forward[i] == next || tmp->forward[i]->forward[i]->forward[i]->forward[i] == next); tmp = tmp->forward[i]; - H5SL_PROMOTE(slist, tmp, head); + H5SL_PROMOTE(slist, tmp, head, NULL); /* In this case, since there is a node of height = i+1 here * now (tmp), we know the skip list must be valid and can * break */ @@ -1358,6 +1435,9 @@ H5SL_less(H5SL_t *slist, const void *key) HDassert(slist); HDassert(key); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1464,6 +1544,9 @@ H5SL_greater(H5SL_t *slist, const void *key) HDassert(slist); HDassert(key); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1848,6 +1931,9 @@ H5SL_first(H5SL_t *slist) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1882,6 +1968,9 @@ H5SL_next(H5SL_node_t *slist_node) /* Check args */ HDassert(slist_node); + /* Not currently supported */ + HDassert(!slist_node->removed); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1916,6 +2005,9 @@ H5SL_prev(H5SL_node_t *slist_node) /* Check args */ HDassert(slist_node); + /* Not currently supported */ + HDassert(!slist_node->removed); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1951,6 +2043,9 @@ H5SL_last(H5SL_t *slist) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -1985,6 +2080,9 @@ H5SL_item(H5SL_node_t *slist_node) /* Check args */ HDassert(slist_node); + /* Not currently supported */ + HDassert(!slist_node->removed); + /* Check internal consistency */ /* (Pre-condition) */ @@ -2048,8 +2146,9 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Call the iterator callback */ /* Casting away const OK -QAK */ - if((ret_value = (op)(node->item, (void *)node->key, op_data)) != 0) - break; + if(!node->removed) + if((ret_value = (op)(node->item, (void *)node->key, op_data)) != 0) + break; /* Advance to next node */ node = next; @@ -2087,6 +2186,9 @@ H5SL_release(H5SL_t *slist) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -2133,6 +2235,9 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Check args */ HDassert(slist); + /* Not currently supported */ + HDassert(!slist->safe_iterating); + /* Check internal consistency */ /* (Pre-condition) */ @@ -2145,6 +2250,185 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data) /*-------------------------------------------------------------------------- NAME + H5SL_try_free_safe + PURPOSE + Makes the supplied callback on all nodes in the skip list, freeing each + node that the callback returns TRUE for. + USAGE + herr_t PURPOSE(slist,op,opdata) + H5SL_t *slist; IN/OUT: Pointer to skip list to release nodes + H5SL_try_free_op_t op; IN: Callback function to try to free item & key + void *op_data; IN/OUT: Pointer to application data for callback + + RETURNS + Returns non-negative on success, negative on failure. + DESCRIPTION + Makes the supplied callback on all nodes in the skip list, freeing each + node that the callback returns TRUE for. The iteration is performed in + a safe manner, such that the callback can call H5SL_remove(), + H5SL_search(), H5SL_find(), and H5SL_iterate() on nodes in this + skiplist, except H5SL_remove() may not be call on *this* node. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + This function is written to be most efficient when most nodes are + removed from the skiplist, as it rebuilds the nodes afterwards. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5SL_try_free_safe(H5SL_t *slist, H5SL_try_free_op_t op, void *op_data) +{ + H5SL_node_t *node, *next_node, *last_node; /* Pointers to skip list nodes */ + htri_t op_ret; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* Check args */ + HDassert(slist); + HDassert(op); + + /* Not currently supported */ + HDassert(!slist->safe_iterating); + + /* Check internal consistency */ + /* (Pre-condition) */ + + /* Mark skip list as safe iterating, so nodes aren't freed out from under + * us */ + slist->safe_iterating = TRUE; + + /* Iterate over skip list nodes, making the callback for each and marking + * them as removed if requested by the callback */ + node = slist->header->forward[0]; + while(node) { + /* Check if the node was already removed */ + if(!node->removed) { + /* Call callback */ + /* Casting away const OK -NAF */ + if((op_ret = (op)(node->item , (void *)node->key, op_data)) < 0) + HGOTO_ERROR(H5E_SLIST, H5E_CALLBACK, FAIL, "callback operation failed") + + /* Check if op indicated that the node should be removed */ + if(op_ret) + /* Mark the node as removed */ + node->removed = TRUE; + } /* end if */ + + /* Advance node */ + node = node->forward[0]; + } /* end while */ + + /* Reset safe_iterating */ + slist->safe_iterating = FALSE; + + /* Iterate over nodes, freeing ones marked as removed */ + node = slist->header->forward[0]; + last_node = slist->header; + while(node) { + /* Save next node */ + next_node = node->forward[0]; + + /* Check if the node was marked as removed */ + if(node->removed) { + /* Remove the node */ + node->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[node->log_nalloc], node->forward); + node = H5FL_FREE(H5SL_node_t, node); + slist->nobjs--; + } /* end if */ + else { + /* Update backwards and forwards[0] pointers, and set the level to + * 0. Since the list is flattened we must rebuild the skiplist + * afterwards. */ + /* Set level to 0. Note there is no need to preserve + * node->forward[0] since it was cached above and will always be + * updated later. */ + if(node->level > 0) { + node->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[node->log_nalloc], (void *)node->forward); + if(NULL == (node->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + node->log_nalloc = 0; + node->level = 0; + } /* end if */ + + /* Update pointers */ + last_node->forward[0] = node; + node->backward = last_node; + last_node = node; + } /* end else */ + + /* Advance node */ + node = next_node; + } /* end while */ + + /* Final pointer update */ + last_node->forward[0] = NULL; + slist->last = last_node; + + /* Demote skip list to level 0 */ + if(slist->curr_level > 0) { + HDassert(slist->header->level == (size_t)slist->curr_level); + + node = slist->header->forward[0]; + slist->header->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[slist->header->log_nalloc], (void *)slist->header->forward); + if(NULL == (slist->header->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + slist->header->forward[0] = node; + slist->header->log_nalloc = 0; + slist->header->level = 0; + } /* end if */ + + /* Check if there are any nodes left */ + if(slist->nobjs > 0) { + int i; + + HDassert(slist->header->forward[0]); + + /* Set skiplist level to 0 */ + slist->curr_level = 0; + + /* Rebuild the forward arrays */ + for(i = 0; slist->curr_level >= i; i++) { + HDassert(slist->curr_level == i); + + /* Promote every third node this level until we run out of nodes */ + node = last_node = slist->header; + while(1) { + /* Check second node in gap, if not present, no need to promote + * further this level. */ + HDassert(node->forward[i]); + node = node->forward[i]->forward[i]; + if(!node) + break; + + /* Check third and fourth node in gap, if either is not present, + * no need to promote further this level. */ + node = node->forward[i]; + if(!node || !node->forward[i]) + break; + + /* Promote the third node in the gap */ + H5SL_PROMOTE(slist, node, last_node, FAIL) + last_node = node; + } /* end while */ + } /* end for */ + } /* end if */ + else { + HDassert(!slist->header->forward[0]); + HDassert(slist->last == slist->header); + HDassert(slist->nobjs == 0); + + /* Reset the skiplist level */ + slist->curr_level = -1; + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5SL_try_free_safe() */ + + +/*-------------------------------------------------------------------------- + NAME H5SL_destroy PURPOSE Close a skip list, deallocating it and freeing all its nodes. diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h index ce2f091..856099b 100644 --- a/src/H5SLprivate.h +++ b/src/H5SLprivate.h @@ -63,6 +63,10 @@ typedef int (*H5SL_cmp_t)(const void *key1, const void *key2); typedef herr_t (*H5SL_operator_t)(void *item, void *key, void *operator_data/*in,out*/); +/* Typedef for H5SL_try_free_safe operation callback */ +typedef htri_t (*H5SL_try_free_op_t)(void *item, void *key, + void *operator_data/*in,out*/); + /********************/ /* Private routines */ /********************/ @@ -86,6 +90,8 @@ H5_DLL void *H5SL_item(H5SL_node_t *slist_node); H5_DLL herr_t H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data); H5_DLL herr_t H5SL_release(H5SL_t *slist); H5_DLL herr_t H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data); +H5_DLL herr_t H5SL_try_free_safe(H5SL_t *slist, H5SL_try_free_op_t op, + void *op_data); H5_DLL herr_t H5SL_close(H5SL_t *slist); H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data); H5_DLL int H5SL_term_interface(void); diff --git a/test/tid.c b/test/tid.c index 85d26c9..68cebf3 100644 --- a/test/tid.c +++ b/test/tid.c @@ -533,12 +533,211 @@ out: return -1; } + /* Test removing ids in callback for H5Iclear_type */ + +/* There was a rare bug where, if an id free callback being called by + * H5I_clear_type() removed another id in that type, a segfault could occur. + * This test tests for that error (and freeing ids "out of order" within + * H5Iclear_type() in general). */ +/* Macro definitions */ +#define TEST_RCT_MAX_NOBJS 25 +#define TEST_RCT_MIN_NOBJS 5 +#define TEST_RCT_NITER 50 + +/* Structure to hold the list of objects */ +typedef struct { + struct test_rct_obj_t *list; /* List of objects */ + long nobjs; /* Number of objects in list */ + long nobjs_rem; /* Number of objects in list that have not been freed */ +} test_rct_list_t; + +/* Structure for an object */ +typedef struct test_rct_obj_t { + hid_t id; /* ID for this object */ + int nfrees; /* Number of times this object has been freed */ + hbool_t freeing; /* Whether we are currently freeing this object directly (through H5Idec_ref()) */ + test_rct_list_t *obj_list; /* List of all objects */ +} test_rct_obj_t; + +/* Free callback */ +static herr_t test_rct_free(void *_obj) { + test_rct_obj_t *obj = (test_rct_obj_t *)_obj; + long rem_idx, i; + herr_t ret; /* return value */ + + /* Mark this object as freed */ + obj->nfrees++; + obj->obj_list->nobjs_rem--; + + /* Check freeing and nobjs_rem */ + if(!obj->freeing && (obj->obj_list->nobjs_rem > 0)) { + /* Remove a random object from the list */ + rem_idx = HDrandom() % obj->obj_list->nobjs_rem; + + /* Scan the list, finding the rem_idx'th object that has not been + * freed */ + for(i = 0; i < obj->obj_list->nobjs; i++) + if(obj->obj_list->list[i].nfrees == 0) { + if(rem_idx == 0) + break; + else + rem_idx--; + } /* end if */ + if(i == obj->obj_list->nobjs) { + ERROR("invalid obj_list"); + goto out; + } /* end if */ + else { + /* Remove the object. Mark as "freeing" so its own callback does + * not free another object. */ + obj->obj_list->list[i].freeing = TRUE; + ret = H5Idec_ref(obj->obj_list->list[i].id); + CHECK(ret, FAIL, "H5Idec_ref"); + if(ret == FAIL) + goto out; + obj->obj_list->list[i].freeing = FALSE; + } /* end else */ + } /* end if */ + + /* Verify nobjs_rem is non-negative */ + if(obj->obj_list->nobjs_rem < 0) { + ERROR("invalid nobjs_rem"); + goto out; + } /* end if */ + + return 0; + +out: + return -1; +} /* end test_rct_free() */ + +/* Test function */ +static int test_remove_clear_type(void) +{ + H5I_type_t obj_type; + test_rct_list_t obj_list; + test_rct_obj_t list[TEST_RCT_MAX_NOBJS]; + long i, j; + long nobjs_found; + hsize_t nmembers; + herr_t ret; /* return value */ + + /* Register type */ + obj_type = H5Iregister_type((size_t)8, 0, test_rct_free); + CHECK(obj_type, H5I_BADID, "H5Iregister_type"); + if(obj_type == H5I_BADID) + goto out; + + /* Init obj_list.list */ + obj_list.list = list; + + for(i = 0; i < TEST_RCT_NITER; i++) { + /* Build object list */ + obj_list.nobjs = obj_list.nobjs_rem = TEST_RCT_MIN_NOBJS + (HDrandom() % (long)(TEST_RCT_MAX_NOBJS - TEST_RCT_MIN_NOBJS + 1)); + for(j = 0; j < obj_list.nobjs; j++) { + list[j].nfrees = 0; + list[j].freeing = FALSE; + list[j].obj_list = &obj_list; + list[j].id = H5Iregister(obj_type, &list[j]); + CHECK(list[j].id, FAIL, "H5Iregister"); + if(list[j].id == FAIL) + goto out; + if(HDrandom() % 2) { + ret = H5Iinc_ref(list[j].id); + CHECK(ret, FAIL, "H5Iinc_ref"); + if(ret == FAIL) + goto out; + } /* end if */ + } /* end for */ + + /* Clear the type */ + ret = H5Iclear_type(obj_type, FALSE); + CHECK(ret, FAIL, "H5Iclear_type"); + if(ret == FAIL) + goto out; + + /* Verify list */ + nobjs_found = 0; + for(j = 0; j < obj_list.nobjs; j++) { + if(list[j].nfrees == 0) + nobjs_found++; + else { + VERIFY(list[j].nfrees, (long)1, "list[j].nfrees"); + if(list[j].nfrees != (long)1) + goto out; + } /* end else */ + VERIFY(list[j].freeing, FALSE, "list[j].freeing"); + if(list[j].freeing != FALSE) + goto out; + } /* end for */ + + /* Verify number of objects */ + VERIFY(obj_list.nobjs_rem, nobjs_found, "obj_list.nobjs_rem"); + if(obj_list.nobjs_rem != nobjs_found) + goto out; + ret = H5Inmembers(obj_type, &nmembers); + CHECK(ret, FAIL, "H5Inmembers"); + if(ret == FAIL) + goto out; + VERIFY(nmembers, (size_t)nobjs_found, "H5Inmembers"); + if(nmembers != (size_t)nobjs_found) + goto out; + + /* Clear the type with force set to TRUE */ + ret = H5Iclear_type(obj_type, TRUE); + CHECK(ret, FAIL, "H5Iclear_type"); + if(ret == FAIL) + goto out; + + /* Verify list */ + for(j = 0; j < obj_list.nobjs; j++) { + VERIFY(list[j].nfrees, (long)1, "list[j].nfrees"); + if(list[j].nfrees != (long)1) + goto out; + VERIFY(list[j].freeing, FALSE, "list[j].freeing"); + if(list[j].freeing != FALSE) + goto out; + } /* end for */ + + /* Verify number of objects is 0 */ + VERIFY(obj_list.nobjs_rem, (long)0, "obj_list.nobjs_rem"); + if(obj_list.nobjs_rem != (long)0) + goto out; + ret = H5Inmembers(obj_type, &nmembers); + CHECK(ret, FAIL, "H5Inmembers"); + if(ret == FAIL) + goto out; + VERIFY(nmembers, (size_t)0, "H5Inmembers"); + if(nmembers != (size_t)0) + goto out; + } /* end for */ + + /* Destroy type */ + ret = H5Idestroy_type(obj_type); + CHECK(ret, FAIL, "H5Idestroy_type"); + if(ret == FAIL) + goto out; + + return 0; + +out: + /* Cleanup. For simplicity, just destroy the types and ignore errors. */ + H5E_BEGIN_TRY + H5Idestroy_type(obj_type); + H5E_END_TRY + return -1; +} /* end test_remove_clear_type() */ + void test_ids(void) { + /* Set the random # seed */ + HDsrandom((unsigned)HDtime(NULL)); + if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n"); if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n"); if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n"); if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n"); if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n"); + if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n"); } diff --git a/test/tskiplist.c b/test/tskiplist.c index 07e63fd..62c5f8e 100644 --- a/test/tskiplist.c +++ b/test/tskiplist.c @@ -1171,6 +1171,208 @@ test_skiplist_free(void) /**************************************************************** ** +** test_skiplist_try_free_safe(): Test H5SL (skip list) code. +** Tests 'try_free_safe' operation in skip lists. +** +****************************************************************/ +/* Macro definitions */ +#define TEST_TFS_MAX_NOBJS 100 +#define TEST_TFS_MIN_NOBJS 5 +#define TEST_TFS_NITER 50 + +/* Structure to hold the list of objects */ +typedef struct { + H5SL_t *slist; /* Skiplist holding the objects */ + struct test_tfs_obj_t *list; /* Linear list of objects */ + int nobjs; /* Number of objects in list */ + int nobjs_rem; /* Number of objects in list that have not been freed */ +} test_tfs_list_t; + +/* Structure for an object */ +typedef struct test_tfs_obj_t { + int idx; /* Index (key) for this object */ + int nfrees; /* Number of times this object has been freed */ +} test_tfs_obj_t; + +/* op_data struct for H5SL_iterate() */ +typedef struct test_tfs_it_ud_t { + test_tfs_list_t *obj_list; /* List of objects */ + int last_idx; /* Index of last object visited in iteration */ + int ncalls; /* Number of times this callback was called */ +} test_tfs_it_ud_t; + +/* iterate callback */ +static herr_t test_tfs_iter(void *_obj, void *key, void *_udata) { + test_tfs_obj_t *obj = (test_tfs_obj_t *)_obj; + test_tfs_it_ud_t *udata = (test_tfs_it_ud_t *)_udata; + + /* Check consistency */ + VERIFY((void *)&obj->idx, key, "obj->idx"); + VERIFY(obj, &udata->obj_list->list[obj->idx], "obj_list->list[obj->idx]"); + + /* Increment number of calls */ + udata->ncalls++; + + /* Verify we were given the correct object */ + do { + udata->last_idx++; + } while(udata->obj_list->list[udata->last_idx].nfrees != 0); + VERIFY(udata->last_idx, obj->idx, "H5SL_iterate"); + + return 0; +} /* end test_tfs_iter() */ + +/* try_free_safe callback */ +static htri_t test_tfs_free(void *_obj, void *key, void *_obj_list) { + test_tfs_obj_t *obj = (test_tfs_obj_t *)_obj; + test_tfs_list_t *obj_list = (test_tfs_list_t *)_obj_list; + test_tfs_it_ud_t iter_ud; + int nrems, rem_idx, i, j; + test_tfs_obj_t *obj_ret; + herr_t ret; /* return value */ + htri_t ret_value; + + /* Check consistency */ + VERIFY((void *)&obj->idx, key, "obj->idx"); + VERIFY(obj, &obj_list->list[obj->idx], "obj_list->list[obj->idx]"); + + /* Mark this object as freed (to make sure it isn't recursively freed, that + * is not something we support, we will undo this if we decide later not to + * free the object) */ + obj->nfrees++; + obj_list->nobjs_rem--; + + /* Decide how many objects to remove */ + nrems = (int)(HDrandom() % (long)3); + + /* Remove objects */ + for(i = 0; i < nrems; i++) + /* Check nobjs_rem */ + if(obj_list->nobjs_rem > 0) { + /* Remove a random object from the list */ + rem_idx = (int)(HDrandom() % (long)obj_list->nobjs_rem); + + /* Scan the list, finding the rem_idx'th object that has not been + * freed */ + for(j = 0; j < obj_list->nobjs; j++) + if(obj_list->list[j].nfrees == 0) { + if(rem_idx == 0) + break; + else + rem_idx--; + } /* end if */ + if(j == obj_list->nobjs) + ERROR("invalid obj_list"); + else { + /* Remove the object */ + obj_ret = (test_tfs_obj_t *)H5SL_remove(obj_list->slist, &j); + CHECK(obj_ret, NULL, "H5SL_remove"); + obj_ret->nfrees++; + obj_list->nobjs_rem--; + } /* end else */ + } /* end if */ + + /* Mark this object as not freed so we know to expect it in the iterate call + */ + obj->nfrees--; + obj_list->nobjs_rem++; + + /* Iterate over skip list (maybe) */ + if(HDrandom() % (long)5) { + iter_ud.obj_list = obj_list; + iter_ud.last_idx = -1; + iter_ud.ncalls = 0; + ret = H5SL_iterate(obj_list->slist, test_tfs_iter, &iter_ud); + CHECK(ret, FAIL, "H5SL_iterate"); + VERIFY(iter_ud.ncalls, obj_list->nobjs_rem, "H5SL_iterate"); + } /* end if */ + + /* Verify nobjs_rem is non-negative */ + if(obj_list->nobjs_rem < 0) + ERROR("invalid nobjs_rem"); + + /* Decide whether this object should be freed */ + if(HDrandom() % (long)2) { + /* Free the object */ + ret_value = TRUE; + obj->nfrees++; + obj_list->nobjs_rem--; + } /* end if */ + else + /* Do not free the object */ + ret_value = FALSE; + + return ret_value; +} /* end test_tfs_free() */ + +/* Test function */ +static void +test_skiplist_try_free_safe(void) +{ + test_tfs_list_t obj_list; + test_tfs_obj_t list[TEST_TFS_MAX_NOBJS]; + int i, j; + int nobjs_found; + hsize_t count; + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(7, ("Testing Skip List 'Try Free Safe' Operation\n")); + + /* Create a skip list */ + obj_list.slist = H5SL_create(H5SL_TYPE_INT, NULL); + CHECK(obj_list.slist, NULL, "H5SL_create"); + + /* Init obj_list.list */ + obj_list.list = list; + for(j = 0; j < TEST_TFS_MAX_NOBJS; j++) + list[j].idx = j; + + for(i = 0; i < TEST_TFS_NITER; i++) { + /* Build object list */ + obj_list.nobjs = obj_list.nobjs_rem = (int)(TEST_TFS_MIN_NOBJS + (HDrandom() % (long)(TEST_TFS_MAX_NOBJS - TEST_TFS_MIN_NOBJS + 1))); + for(j = 0; j < obj_list.nobjs; j++) { + list[j].nfrees = 0; + ret = H5SL_insert(obj_list.slist, &list[j], &list[j].idx); + CHECK(ret, FAIL, "H5SL_insert"); + } /* end for */ + + /* Call H5S_try_free_safe() - free most of the items in the skip list in + * a safe manner */ + ret = H5SL_try_free_safe(obj_list.slist, test_tfs_free, &obj_list); + CHECK(ret, FAIL, "H5SL_try_free_safe"); + + /* Verify list */ + nobjs_found = 0; + for(j = 0; j < obj_list.nobjs; j++) + if(list[j].nfrees == 0) + nobjs_found++; + else + VERIFY(list[j].nfrees, (long)1, "list[j].nfrees"); + + /* Verify number of objects */ + VERIFY(obj_list.nobjs_rem, nobjs_found, "obj_list.nobjs_rem"); + count = H5SL_count(obj_list.slist); + VERIFY(count, (size_t)nobjs_found, "H5SL_count"); + + /* Release the skip list, forcibly freeing all nodes (will not make + * callbacks) */ + ret = H5SL_release(obj_list.slist); + CHECK(ret, FAIL, "H5SL_release"); + + /* Verify number of objects is 0 */ + count = H5SL_count(obj_list.slist); + VERIFY(count, (size_t)0, "H5SL_count"); + } /* end for */ + + /* Close the skip list */ + ret = H5SL_close(obj_list.slist); + CHECK(ret, FAIL, "H5SL_close"); + +} /* end test_skiplist_try_free_safe() */ + +/**************************************************************** +** ** test_skiplist_less(): Test H5SL (skip list) code. ** Tests 'less' operation in skip lists. ** @@ -1577,6 +1779,7 @@ test_skiplist(void) test_skiplist_add(); /* Test 'add' operation */ test_skiplist_destroy(); /* Test 'destroy' operation */ test_skiplist_free(); /* Test 'free' operation */ + test_skiplist_try_free_safe(); /* Test 'try_free_safe' operation */ test_skiplist_less(); /* Test 'less' operation */ test_skiplist_greater(); /* Test 'greater' operation */ test_skiplist_below(); /* Test 'below' operation */ -- cgit v0.12 From 940da78df9c9c2de1d307da75e7777c2e478f841 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Jul 2015 10:11:53 -0500 Subject: [svn-r27417] comment code cleanup --- config/cmake/H5pubconf.h.in | 2 +- fortran/src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index f7dcce2..f0d3031 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -66,7 +66,7 @@ /* Define Fortran Maximum Real Decimal Precision */ #cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ -/* Determine the maximum decimal precision in C MSB NOT USED??*/ +/* Define C Maximum Real Decimal Precision */ #cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ /* Define if we have Fortran C_LONG_DOUBLE */ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c7b63c2..773f6ec 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -37,7 +37,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_B #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate various KIND interfaces +# H5_buildiface.F90 used to generate various KIND interfaces # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- -- cgit v0.12 From 0040ee0c994efcbf192552fee2412821a917e178 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Jul 2015 10:19:07 -0500 Subject: [svn-r27418] format clean-up --- fortran/test/tH5D.f90 | 951 ++++++++++++++++++++++++-------------------------- 1 file changed, 462 insertions(+), 489 deletions(-) diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90 index 6d136b5..b5febb3 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.f90 @@ -36,504 +36,477 @@ ! MODULE TH5D -CONTAINS - SUBROUTINE datasettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - - IMPLICIT NONE - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name - CHARACTER(LEN=80) :: fix_filename - CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: null_dset ! Null dataset identifier - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - INTEGER(HID_T) :: null_dspace ! Null dataspace identifier - INTEGER(HID_T) :: dtype_id ! Datatype identifier - - - 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 :: i, j !general purpose integers - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim - INTEGER :: null_dset_data = 1 ! null data - INTEGER :: flag ! Space allocation status - - ! - ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f", error, total_error) - - - ! - ! Create the dataspace. - ! - CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) - ! - ! Create null dataspace. - ! - CALL h5screate_f(H5S_NULL_F, null_dspace, 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) - ! - ! Create the null dataset. - ! - CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, & - null_dset, 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) - ! - ! Write null dataset. Nothing can be written. - ! - null_data_dim(1) = 1 - CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) - CALL h5dclose_f(null_dset, 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) - CALL h5sclose_f(null_dspace, error) - CALL check("h5sclose_f", error, total_error) - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_error) - - ! - ! Open the existing file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN - ! - ! Open the existing dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) - CALL h5dopen_f(file_id, null_dsetname, null_dset, error) - CALL check("h5dopen_f", error, total_error) - - ! Test whether space has been allocated for a dataset - CALL h5dget_space_status_f(dset_id, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) - - CALL h5dget_space_status_f(null_dset, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) - ! - ! Read the null dataset. Nothing should be read. - ! - CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" - END IF - end do - end do - - ! - ! Check if no change to null_dset_data - ! - IF (null_dset_data .NE. 1) THEN - write(*, *) "null dataset test error occured" +CONTAINS + SUBROUTINE datasettest(cleanup, total_error) + + IMPLICIT NONE + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name + CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name + CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: null_dset ! Null dataset identifier + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + INTEGER(HID_T) :: null_dspace ! Null dataspace identifier + INTEGER(HID_T) :: dtype_id ! Datatype identifier + + 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 :: i, j !general purpose integers + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim + INTEGER :: null_dset_data = 1 ! null data + INTEGER :: flag ! Space allocation status + + ! + ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f", error, total_error) + ! + ! Create the dataspace. + ! + CALL h5screate_simple_f(rank, dims, dspace_id, error) + CALL check("h5screate_simple_f", error, total_error) + ! + ! Create null dataspace. + ! + CALL h5screate_f(H5S_NULL_F, null_dspace, 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) + ! + ! Create the null dataset. + ! + CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, null_dset, 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) + ! + ! Write null dataset. Nothing can be written. + ! + null_data_dim(1) = 1 + CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) + CALL h5dclose_f(null_dset, 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) + CALL h5sclose_f(null_dspace, error) + CALL check("h5sclose_f", error, total_error) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f", error, total_error) + ! + ! Open the existing file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) + CALL check("h5fopen_f", error, total_error) + ! + ! Open the existing dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f", error, total_error) + CALL h5dopen_f(file_id, null_dsetname, null_dset, error) + CALL check("h5dopen_f", error, total_error) + + ! Test whether space has been allocated for a dataset + CALL h5dget_space_status_f(dset_id, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) + + CALL h5dget_space_status_f(null_dset, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) + ! + ! Read the null dataset. Nothing should be read. + ! + CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" END IF - - ! - ! End access to the dataset and release resources used by it. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) - CALL h5dclose_f(null_dset, 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) - if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL check("h5_cleanup_f", error, total_error) - - RETURN - END SUBROUTINE datasettest - + END DO + END DO + ! + ! Check if no change to null_dset_data + ! + IF (null_dset_data .NE. 1) THEN + WRITE(*, *) "null dataset test error occured" + END IF + ! + ! End access to the dataset and release resources used by it. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f", error, total_error) + CALL h5dclose_f(null_dset, 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) + IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) + + RETURN + END SUBROUTINE datasettest + ! !the following subroutine tests h5dextend_f functionality ! - SUBROUTINE extenddsettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - ! - !the dataset is stored in file "extf.h5" - ! - CHARACTER(LEN=4), PARAMETER :: filename = "extf" - CHARACTER(LEN=80) :: fix_filename - - ! - !dataset name is "ExtendibleArray" - ! - CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" - - ! - !dataset rank is 2 - ! - 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 creatation property identifier - - ! - !dataset dimensions at creation time - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) - - ! - !data dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) - - ! - !Maximum dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: maxdims - - ! - !data arrays for reading and writing - ! - INTEGER, DIMENSION(10,3) :: data_in, data_out - - ! - !Size of data in the file - ! - INTEGER(HSIZE_T), DIMENSION(2) :: size - - ! - !general purpose integer - ! - INTEGER :: i, j - INTEGER(HSIZE_T) :: ih, jh - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !Variables used in reading data back - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr - INTEGER :: rankr - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - - ! - !data initialization - ! - do i = 1, 10 - do j = 1, 3 - data_in(i,j) = 2 - end do - end do - - ! - !Initialize FORTRAN predifined datatypes - ! + SUBROUTINE extenddsettest(cleanup, total_error) + + IMPLICIT NONE + + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + ! + !the dataset is stored in file "extf.h5" + ! + CHARACTER(LEN=4), PARAMETER :: filename = "extf" + CHARACTER(LEN=80) :: fix_filename + + ! + !dataset name is "ExtendibleArray" + ! + CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" + + ! + !dataset rank is 2 + ! + 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 creatation property identifier + + ! + !dataset dimensions at creation time + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) + + ! + !data dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) + + ! + !Maximum dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: maxdims + + ! + !data arrays for reading and writing + ! + INTEGER, DIMENSION(10,3) :: data_in, data_out + + ! + !Size of data in the file + ! + INTEGER(HSIZE_T), DIMENSION(2) :: size + + ! + !general purpose integer + ! + INTEGER :: i, j + INTEGER(HSIZE_T) :: ih, jh + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !Variables used in reading data back + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr + INTEGER :: rankr + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + + ! + !data initialization + ! + DO i = 1, 10 + DO j = 1, 3 + data_in(i,j) = 2 + END DO + END DO + + ! + !Initialize FORTRAN predifined datatypes + ! ! CALL h5init_types_f(error) ! CALL check("h5init_types_f",error,total_error) - ! - !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error,total_error) - - - ! - !Create the data space with unlimited dimensions. - ! - maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) - - CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Modify dataset creation properties, i.e. enable chunking - ! - CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) - CALL check("h5pcreat_f",error,total_error) - - CALL h5pset_chunk_f(crp_list, RANK, dims1, error) - CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) - - ! - !Extend the dataset. This call assures that dataset is 3 x 3. - ! - size(1) = 3 - size(2) = 3 - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - - ! - !Extend the dataset. Dataset becomes 10 x 3. - ! - size(1) = 10; - size(2) = 3; - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - ! - !Write the data of size 10X3 to the extended dataset. - ! - data_dims(1) = 10 - data_dims(2) = 3 - CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) - CALL check("h5dwrite_f",error,total_error) - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !read the data back - ! - !Open the file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("hfopen_f",error,total_error) - - ! - !Open the dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's dataspace handle. - ! - CALL h5dget_space_f(dset_id, dataspace, error) - CALL check("h5dget_space_f",error,total_error) - - ! - !Get dataspace's rank. - ! - CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) - CALL check("h5sget_simple_extent_ndims_f",error,total_error) - IF (rankr .NE. RANK) then - write(*,*) "dataset rank error occured" - stop - END IF - - ! - !Get dataspace's dimensinons. - ! - CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) - CALL check("h5sget_simple_extent_dims_f",error,total_error) - IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN - write(*,*) "dataset dimensions error occured" - stop + ! + !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error,total_error) + + ! + !Create the data space with unlimited dimensions. + ! + maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) + + CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Modify dataset creation properties, i.e. enable chunking + ! + CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) + CALL check("h5pcreat_f",error,total_error) + + CALL h5pset_chunk_f(crp_list, RANK, dims1, error) + CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) + + ! + !Extend the dataset. This call assures that dataset is 3 x 3. + ! + SIZE(1) = 3 + SIZE(2) = 3 + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + + ! + !Extend the dataset. Dataset becomes 10 x 3. + ! + SIZE(1) = 10; + SIZE(2) = 3; + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + ! + !Write the data of size 10X3 to the extended dataset. + ! + data_dims(1) = 10 + data_dims(2) = 3 + CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) + CALL check("h5dwrite_f",error,total_error) + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !read the data back + ! + !Open the file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("hfopen_f",error,total_error) + + ! + !Open the dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's dataspace handle. + ! + CALL h5dget_space_f(dset_id, dataspace, error) + CALL check("h5dget_space_f",error,total_error) + + ! + !Get dataspace's rank. + ! + CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) + CALL check("h5sget_simple_extent_ndims_f",error,total_error) + IF (rankr .NE. RANK) THEN + WRITE(*,*) "dataset rank error occured" + STOP + END IF + + ! + !Get dataspace's dimensinons. + ! + CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) + CALL check("h5sget_simple_extent_dims_f",error,total_error) + IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN + WRITE(*,*) "dataset dimensions error occured" + STOP + END IF + + ! + !Get creation property list. + ! + CALL h5dget_create_plist_f(dset_id, crp_list, error) + CALL check("h5dget_create_plist_f",error,total_error) + + + ! + !create memory dataspace. + ! + CALL h5screate_simple_f(rankr, dimsr, memspace, error) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Read data + ! + CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, memspace, dataspace) + CALL check("h5dread_f",error,total_error) + + + ! + !Compare the data. + ! + DO ih = 1, dims1(1) + DO jh = 1, dims1(2) + IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN + WRITE(*, *) "extend dataset test error occured" + WRITE(*, *) "read value is not the same as the written values" END IF - - ! - !Get creation property list. - ! - CALL h5dget_create_plist_f(dset_id, crp_list, error) - CALL check("h5dget_create_plist_f",error,total_error) - - - ! - !create memory dataspace. - ! - CALL h5screate_simple_f(rankr, dimsr, memspace, error) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Read data - ! - CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & - memspace, dataspace) - CALL check("h5dread_f",error,total_error) - - - ! - !Compare the data. - ! - do ih = 1, dims1(1) - do jh = 1, dims1(2) - IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN - write(*, *) "extend dataset test error occured" - write(*, *) "read value is not the same as the written values" - END IF - end do - end do - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the memspace for the dataset. - ! - CALL h5sclose_f(memspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - 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 extenddsettest + END DO + END DO + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the memspace for the dataset. + ! + CALL h5sclose_f(memspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + 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 extenddsettest END MODULE TH5D -- cgit v0.12 From e796ff45c7a858fdd74a8476e41948754332ecd1 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Jul 2015 13:44:52 -0500 Subject: [svn-r27421] changed from add_custom_command to add_custom_target for generated files, OBJECT_DEPENDS is not fully functional on Windows (cmake 3.1). --- fortran/src/CMakeLists.txt | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 773f6ec..0dae501 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -62,13 +62,13 @@ set_target_properties (H5_buildiface PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 - COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5_buildiface -) +#set (CMD $) +#add_custom_command ( +# OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 +# COMMAND ${CMD} +# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} +# DEPENDS H5_buildiface +#) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- @@ -162,10 +162,21 @@ set (f90_F_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) -set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 - PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS}" +set (CMD $) +add_custom_target (H5gen ALL + COMMAND ${CMD} +#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS ${f90_F_BASE_SRCS} ) + +set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) + +# Not implemented in cmake VS >=10 +#set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 +# PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS}" +#) + set_source_files_properties( ${HDF5_F90_BINARY_DIR}/HDF5.F90 PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS} ${HDF5_F90_BINARY_DIR}/H5_gen.F90" -- cgit v0.12 From 479bd3c800160c024742258a82e24c16fccfb161 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Jul 2015 15:34:29 -0500 Subject: [svn-r27422] changed add_custom_command to add_custom_target --- hl/fortran/src/CMakeLists.txt | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 0cccac5..be7fd6c 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -36,14 +36,14 @@ set_target_properties (H5HL_buildiface PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 - COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} - DEPENDS H5HL_buildiface -) +#set (CMD $) +#add_custom_command ( +# OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 +# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 +# COMMAND ${CMD} +# WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} +# DEPENDS H5HL_buildiface +#) #----------------------------------------------------------------------------- # Setup include Directories @@ -98,12 +98,26 @@ set (HDF5_HL_F90_F_SRCS set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) -set_source_files_properties( +#set_source_files_properties( +# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 +# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 +# PROPERTIES OBJECT_DEPENDS "${HDF5_HL_F90_F_BASE_SRCS}" +#) + +set_source_files_properties ( ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 - PROPERTIES OBJECT_DEPENDS "${HDF5_HL_F90_F_BASE_SRCS}" + PROPERTIES GENERATED TRUE ) +set (CMD $) +add_custom_target (H5HLgen ALL + COMMAND ${CMD} +#v3.2 BYPRODUCT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 +#v3.2 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} + DEPENDS ${HDF5_HL_F90_F_BASE_SRCS} +) add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") -- cgit v0.12 From 81d3377737c866deb77628b1b9e89e1fc675724a Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Thu, 23 Jul 2015 10:03:43 -0500 Subject: [svn-r27427] - free comm keyval after setting atribute on comm_self - free allocated buffer in t_file_image test tested on jam with parallel. --- src/H5.c | 3 +++ testpar/t_file_image.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/H5.c b/src/H5.c index 37476b0..3d4512f 100644 --- a/src/H5.c +++ b/src/H5.c @@ -145,6 +145,9 @@ H5_init_library(void) if(MPI_SUCCESS != (mpi_code = MPI_Comm_set_attr(MPI_COMM_SELF, key_val, NULL))) HMPI_GOTO_ERROR(FAIL, "MPI_Comm_set_attr failed", mpi_code) + + if(MPI_SUCCESS != (mpi_code = MPI_Comm_free_keyval(&key_val))) + HMPI_GOTO_ERROR(FAIL, "MPI_Comm_free_keyval failed", mpi_code) } } #endif /*H5_HAVE_PARALLEL*/ diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index 544ba32..a2246b6 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -241,6 +241,9 @@ file_image_daisy_chain_test(void) vector_ok = FALSE; VRFY((vector_ok), "verified received vector."); + HDfree(vector_ptr); + vector_ptr = NULL; + /* 7) closes the core file and exit. */ err = H5Sclose(space_id); -- cgit v0.12 From ac5a796db2b3b35a74b69fc957fc020d42adf6ef Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 24 Jul 2015 02:04:52 -0500 Subject: [svn-r27428] Bug fix: DAILYTEST-170 Description: XL compilers in ostrich (PowerPC64 linux) fail in test/dt_arith because of the removal of the LLONG_TO_LDOUBLE_CORRECT (removed in r26625) and LDOUBLE_TO_LLONG_ACCURATE (removed in r26623). Solution: Reverse revisions r26623: bring back LDOUBLE_TO_LLONG_ACCURATE configure macro r26625: bring back LLONG_TO_LDOUBLE_CORRECT configure macro r26627: bring back WANT_DATA_ACCURACY configure macro which is used together with the above two macros. This also brings back the enable-dconv-accuracy configure option. Tested: h5committested. Also tested in ostrich using the XL compilers. --- config/cmake/ConfigureChecks.cmake | 30 ++++++ config/cmake/ConversionTests.c | 82 ++++++++++++++ config/cmake/H5pubconf.h.in | 11 ++ configure | 214 +++++++++++++++++++++++++++++++++++++ configure.ac | 153 ++++++++++++++++++++++++++ release_docs/INSTALL_CMake.txt | 1 + src/H5T.c | 8 ++ src/H5Tconv.c | 8 ++ src/H5Tpkg.h | 33 ++++++ src/H5config.h.in | 11 ++ test/dt_arith.c | 56 ++++++++++ 11 files changed, 607 insertions(+) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index e223553..09f1caf 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -33,6 +33,18 @@ endif (HDF5_METADATA_TRACE_FILE) MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE) # ---------------------------------------------------------------------- +# Decide whether the data accuracy has higher priority during data +# conversions. If not, some hard conversions will still be prefered even +# though the data may be wrong (for example, some compilers don't +# support denormalized floating values) to maximize speed. +# +option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) +if (HDF5_WANT_DATA_ACCURACY) + set (H5_WANT_DATA_ACCURACY 1) +endif (HDF5_WANT_DATA_ACCURACY) +MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) + +# ---------------------------------------------------------------------- # Decide whether the presence of user's exception handling functions is # checked and data conversion exceptions are returned. This is mainly # for the speed optimization of hard conversions. Soft conversions can @@ -220,6 +232,24 @@ H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts # H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm") # ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'long double' to '(unsigned) long long' values. (This flag should be set for +# all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +# of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +# start to go wrong on these two machines. Adjusting it higher to +# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +# values wildly wrong. This test detects this wrong behavior and disable the test. +# +H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# '(unsigned) long long' to 'long double' values. (This flag should be set for +# all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +# as big as they should be. +# +H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") +# ---------------------------------------------------------------------- # Check if pointer alignments are enforced # H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index cd2e8bb..d964bf8 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -116,6 +116,88 @@ done: #endif +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST +int main(void) +{ + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } +done: + exit(ret); +} +#endif + +#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST +int main(void) +{ + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } +done: + exit(ret); +} +#endif + #ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST #include diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index fcbdbd5..31bcc08 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -398,10 +398,18 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ +/* Define if your system can convert long double to (unsigned) long long + values correctly. */ +#cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@ + /* Define if your system converts long double to (unsigned) long values with special algorithm. */ #cmakedefine H5_LDOUBLE_TO_LONG_SPECIAL @H5_LDOUBLE_TO_LONG_SPECIAL@ +/* Define if your system can convert (unsigned) long long to long double + values correctly. */ +#cmakedefine H5_LLONG_TO_LDOUBLE_CORRECT @H5_LLONG_TO_LDOUBLE_CORRECT@ + /* Define if your system can convert (unsigned) long to long double values with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ @@ -606,6 +614,9 @@ /* Version number of package */ #define H5_VERSION "@HDF5_PACKAGE_VERSION_STRING@" +/* Data accuracy is prefered to speed during data conversions */ +#cmakedefine H5_WANT_DATA_ACCURACY @H5_WANT_DATA_ACCURACY@ + /* Check exception handling functions during data conversions */ #cmakedefine H5_WANT_DCONV_EXCEPTION @H5_WANT_DCONV_EXCEPTION@ diff --git a/configure b/configure index 00dbf24..2c3ddb9 100755 --- a/configure +++ b/configure @@ -911,6 +911,7 @@ with_mpe enable_direct_vfd with_default_plugindir enable_dconv_exception +enable_dconv_accuracy enable_build_all enable_deprecated_symbols with_default_api_version @@ -1608,6 +1609,8 @@ Optional Features: --enable-dconv-exception if exception handling functions is checked during data conversions [default=yes] + --enable-dconv-accuracy if data accuracy is guaranteed during data + conversions [default=yes] --enable-build-all Build helper programs that only developers should need [default=no] --enable-deprecated-symbols @@ -27477,6 +27480,33 @@ $as_echo "no" >&6; } fi ## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether data accuracy is guaranteed during data conversions" >&5 +$as_echo_n "checking whether data accuracy is guaranteed during data conversions... " >&6; } +# Check whether --enable-dconv-accuracy was given. +if test "${enable_dconv_accuracy+set}" = set; then : + enableval=$enable_dconv_accuracy; DATA_ACCURACY=$enableval +else + DATA_ACCURACY=yes +fi + + +if test "$DATA_ACCURACY" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WANT_DATA_ACCURACY 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where @@ -27740,6 +27770,190 @@ $as_echo "no" >&6; } fi ## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should +## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and +## Powerpc Linux using XL compilers. +## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., +## the values of (unsigned)long long start to go wrong on these +## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or +## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. +## This test detects this wrong behavior and disable the test. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to (unsigned) long long values" >&5 +$as_echo_n "checking if correctly converting long double to (unsigned) long long values... " >&6; } + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} +else + if ${hdf5_cv_ldouble_to_llong_accurate+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(void) + { + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + hdf5_cv_ldouble_to_llong_accurate=yes +else + hdf5_cv_ldouble_to_llong_accurate=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +fi + +if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then + +$as_echo "#define LDOUBLE_TO_LLONG_ACCURATE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be +## set for all machines, except for Mac OS 10.4 and Powerpc Linux using +## XL compilers. +## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the converted values are twice as big as they should be. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting (unsigned) long long to long double values" >&5 +$as_echo_n "checking if correctly converting (unsigned) long long to long double values... " >&6; } + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} +else + if ${hdf5_cv_llong_to_ldouble_correct+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(void) + { + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + hdf5_cv_llong_to_ldouble_correct=yes +else + hdf5_cv_llong_to_ldouble_correct=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +fi + +if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then + +$as_echo "#define LLONG_TO_LDOUBLE_CORRECT 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +## ---------------------------------------------------------------------- ## Set some variables for general configuration information to be saved ## and installed with the libraries (used to generate libhdf5.settings). ## diff --git a/configure.ac b/configure.ac index 5dd93b4..5418f28 100644 --- a/configure.ac +++ b/configure.ac @@ -2269,6 +2269,27 @@ else fi ## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## +AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) +AC_ARG_ENABLE([dconv-accuracy], + [AS_HELP_STRING([--enable-dconv-accuracy], + [if data accuracy is guaranteed during + data conversions [default=yes]])], + [DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes]) + +if test "$DATA_ACCURACY" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([WANT_DATA_ACCURACY], [1], + [Data accuracy is prefered to speed during data conversions]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where @@ -2448,6 +2469,138 @@ else fi ## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should +## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and +## Powerpc Linux using XL compilers. +## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., +## the values of (unsigned)long long start to go wrong on these +## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or +## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. +## This test detects this wrong behavior and disable the test. +## +AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate], + [AC_TRY_RUN([ + int main(void) + { + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then + AC_DEFINE([LDOUBLE_TO_LLONG_ACCURATE], [1], + [Define if your system can convert long double to (unsigned) long long values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + + +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be +## set for all machines, except for Mac OS 10.4 and Powerpc Linux using +## XL compilers. +## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the converted values are twice as big as they should be. +## +AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} +else + AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct], + [AC_TRY_RUN([ + int main(void) + { + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); + } + ], [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],)]) +fi + +if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then + AC_DEFINE([LLONG_TO_LDOUBLE_CORRECT], [1], + [Define if your system can convert (unsigned) long long to long double values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- ## Set some variables for general configuration information to be saved ## and installed with the libraries (used to generate libhdf5.settings). ## diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 7f67eb2..7a98bef 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -591,6 +591,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF +HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF if (APPLE) diff --git a/src/H5T.c b/src/H5T.c index 906061e..5f6c8e3 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1222,12 +1222,16 @@ H5T_init_interface(void) /* From long long to floats */ status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T__conv_llong_double, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T__conv_llong_ldouble, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ /* From unsigned long long to floats */ status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_ULLONG_LDOUBLE */ /* From floats to char */ status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T__conv_float_schar, H5AC_ind_dxpl_id, FALSE); @@ -1271,12 +1275,16 @@ H5T_init_interface(void) /* From floats to long long */ status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LDOUBLE_LLONG */ /* From floats to unsigned long long */ status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T__conv_float_ullong, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T__conv_double_ullong, H5AC_ind_dxpl_id, FALSE); +#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T__conv_ldouble_ullong, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LDOUBLE_ULLONG */ /* * The special no-op conversion is the fastest, so we list it last. The diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 81c947d..b14f6e5 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -7936,6 +7936,7 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LLONG_LDOUBLE herr_t H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7944,6 +7945,7 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -); } +#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ /*------------------------------------------------------------------------- @@ -8011,6 +8013,7 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_ULLONG_LDOUBLE herr_t H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8019,6 +8022,7 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -); } +#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/ /*------------------------------------------------------------------------- @@ -8792,6 +8796,7 @@ H5_GCC_DIAG_ON(float-equal) * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LDOUBLE_LLONG herr_t H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8802,6 +8807,7 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); H5_GCC_DIAG_ON(float-equal) } +#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ /*------------------------------------------------------------------------- @@ -8819,6 +8825,7 @@ H5_GCC_DIAG_ON(float-equal) * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG herr_t H5T__conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8829,6 +8836,7 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX); H5_GCC_DIAG_ON(float-equal) } +#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/ /*------------------------------------------------------------------------- diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 4697bfc..0b0cd61 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -111,6 +111,39 @@ /* (_not_ setting H5T_VISIT_SIMPLE and setting either H5T_VISIT_COMPLEX_FIRST or H5T_VISIT_COMPLEX_LAST will mean visiting all nodes _except_ "simple" "leafs" in the "tree" */ +/* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some + * incorrect conversions. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LLONG_LDOUBLE 1 +#endif + +/* Define an internal macro for converting unsigned long long to long double. SGI compilers give + * some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does + * not support unsigned long long. For FreeBSD(sleipnir), the last 2 bytes of mantissa are lost when + * compiler tries to do the conversion. For Cygwin, compiler doesn't do rounding correctly. + * Mac OS 10.4 gives some incorrect result. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1 +#endif + +/* Define an internal macro for converting long double to long long. SGI compilers give some incorrect + * conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates floating exception. + * The hard conversion on Windows .NET 2003 has a bug and gives wrong exception value. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ + (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LDOUBLE_LLONG 1 +#endif + +/* Define an internal macro for converting long double to unsigned long long. SGI compilers give some + * incorrect conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates + * floating exception. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ + (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 1 +#else +#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 0 +#endif + /* Statistics about a conversion function */ struct H5T_stats_t { unsigned ncalls; /*num calls to conversion function */ diff --git a/src/H5config.h.in b/src/H5config.h.in index ac781fc..c0f4466 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -368,10 +368,18 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #undef INCLUDE_HL +/* Define if your system can convert long double to (unsigned) long long + values correctly. */ +#undef LDOUBLE_TO_LLONG_ACCURATE + /* Define if your system converts long double to (unsigned) long values with special algorithm. */ #undef LDOUBLE_TO_LONG_SPECIAL +/* Define if your system can convert (unsigned) long long to long double + values correctly. */ +#undef LLONG_TO_LDOUBLE_CORRECT + /* Define if your system can convert (unsigned) long to long double values with special algorithm. */ #undef LONG_TO_LDOUBLE_SPECIAL @@ -554,6 +562,9 @@ /* Version number of package */ #undef VERSION +/* Data accuracy is prefered to speed during data conversions */ +#undef WANT_DATA_ACCURACY + /* Check exception handling functions during data conversions */ #undef WANT_DCONV_EXCEPTION diff --git a/test/dt_arith.c b/test/dt_arith.c index 8ededc7..b3f5cad 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5032,8 +5032,32 @@ run_int_fp_conv(const char *name) #endif #endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler error in handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "unsigned long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler not handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif @@ -5134,8 +5158,40 @@ run_fp_int_conv(const char *name) #endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0 +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ +#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE) nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "unsigned long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ #endif #endif #ifndef H5_VMS -- cgit v0.12 From f56de2644447b080017866fb917a0f8363315a53 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 26 Jul 2015 19:13:36 -0500 Subject: [svn-r27432] Snapshot version 1.9 release 226 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/cpp_doc_config | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.txt b/README.txt index 068b1e0..3ae4df3 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.226 currently under development +HDF5 version 1.9.227 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index b837527..5dff737 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -670,7 +670,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 # This is our main target diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index c0d8357..53d9a7d 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.226 currently under development +PROJECT_NUMBER = HDF5 version 1.9.227 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/lt_vers.am b/config/lt_vers.am index 7b5a8f1..ac029c0 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -19,7 +19,7 @@ # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 2c3ddb9..860f480 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.226. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.227. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.226' -PACKAGE_STRING='HDF5 1.9.226' +PACKAGE_VERSION='1.9.227' +PACKAGE_STRING='HDF5 1.9.227' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1473,7 +1473,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.226 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.227 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1543,7 +1543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.226:";; + short | recursive ) echo "Configuration of HDF5 1.9.227:";; esac cat <<\_ACEOF @@ -1734,7 +1734,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.226 +HDF5 configure 1.9.227 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2671,7 +2671,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.226, which was +It was created by HDF5 $as_me 1.9.227, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3542,7 +3542,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.226' + VERSION='1.9.227' cat >>confdefs.h <<_ACEOF @@ -28803,7 +28803,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.226 +HDF5 config.lt 1.9.227 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -30919,7 +30919,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.226, which was +This file was extended by HDF5 $as_me 1.9.227, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30985,7 +30985,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.226 +HDF5 config.status 1.9.227 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 5418f28..1e67f39 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.226], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.227], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 161e331..aba85ec 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index ceda49c..742b35c 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -662,7 +662,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 # This is our main target diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 5370198..029e5a1 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -680,7 +680,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 # Our main target, the high-level fortran library diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 4862b6b..d5b0b1e 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -661,7 +661,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6494479..d034cd3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.226 currently under development +HDF5 version 1.9.227 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 3abc038..1d99c11 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 226 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 227 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.226" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.227" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index d2f94a5..8a60a77 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -724,7 +724,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 216 +LT_VERS_REVISION = 217 LT_VERS_AGE = 0 # Our main target, the HDF5 library -- cgit v0.12 From e3ac5f36519fb21c96c8e2be39f65c34b58cd205 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Jul 2015 09:40:47 -0500 Subject: [svn-r27440] added missing h5lt*_attribute_f functions --- hl/fortran/src/hdf5_hl_fortrandll.def.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in index eb07316..9a1231a 100644 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -55,10 +55,12 @@ H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_6 H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_7 H5LT_CONST_mp_H5LTMAKE_DATASET_STRING_F H5LT_CONST_mp_H5LTREAD_DATASET_STRING_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_F H5LT_CONST_mp_H5LTSET_ATTRIBUTE_INT_F H5LT_CONST_mp_H5LTSET_ATTRIBUTE_FLOAT_F H5LT_CONST_mp_H5LTSET_ATTRIBUTE_DOUBLE_F H5LT_CONST_mp_H5LTSET_ATTRIBUTE_STRING_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_F H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INT_F H5LT_CONST_mp_H5LTGET_ATTRIBUTE_FLOAT_F H5LT_CONST_mp_H5LTGET_ATTRIBUTE_DOUBLE_F -- cgit v0.12 From c6ccc94574097b4d12044fe0427156d9035f0856 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Jul 2015 10:17:41 -0500 Subject: [svn-r27441] misc. code clean-up --- fortran/src/CMakeLists.txt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 0dae501..d4141d9 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -62,14 +62,6 @@ set_target_properties (H5_buildiface PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) -#set (CMD $) -#add_custom_command ( -# OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 -# COMMAND ${CMD} -# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} -# DEPENDS H5_buildiface -#) - INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- add_executable (H5match_types @@ -172,16 +164,6 @@ add_custom_target (H5gen ALL set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) -# Not implemented in cmake VS >=10 -#set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 -# PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS}" -#) - -set_source_files_properties( - ${HDF5_F90_BINARY_DIR}/HDF5.F90 - PROPERTIES OBJECT_DEPENDS "${f90_F_BASE_SRCS} ${HDF5_F90_BINARY_DIR}/H5_gen.F90" -) - #----------------------------------------------------------------------------- # Add Main fortran library #----------------------------------------------------------------------------- -- cgit v0.12 From fa52a5a44a18782e2bb57c99786c5f156bcb74c6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 30 Jul 2015 10:18:42 -0500 Subject: [svn-r27442] added missing dependencies --- hl/fortran/src/CMakeLists.txt | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index be7fd6c..0219c22 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -36,15 +36,6 @@ set_target_properties (H5HL_buildiface PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) -#set (CMD $) -#add_custom_command ( -# OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 -# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 -# COMMAND ${CMD} -# WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} -# DEPENDS H5HL_buildiface -#) - #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- @@ -52,6 +43,7 @@ INCLUDE_DIRECTORIES ( ${HDF5_HL_SRC_DIR}/src ${HDF5_F90_SRC_DIR}/src ${HDF5_F90_BINARY_DIR} + ${CMAKE_Fortran_MODULE_DIRECTORY} ) #----------------------------------------------------------------------------- @@ -98,12 +90,6 @@ set (HDF5_HL_F90_F_SRCS set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) -#set_source_files_properties( -# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 -# ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 -# PROPERTIES OBJECT_DEPENDS "${HDF5_HL_F90_F_BASE_SRCS}" -#) - set_source_files_properties ( ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 @@ -121,8 +107,8 @@ add_custom_target (H5HLgen ALL add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") -if (BUILD_SHARED_LIBS) - if (WIN32) +if (WIN32) + if (BUILD_SHARED_LIBS) set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_HL_DLL @@ -130,9 +116,7 @@ if (BUILD_SHARED_LIBS) if (MSVC) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif (MSVC) - endif (WIN32) -endif (BUILD_SHARED_LIBS) -if (WIN32) + endif (BUILD_SHARED_LIBS) set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS @@ -162,7 +146,9 @@ endif (WIN32) set (mod_files ${MOD_BUILD_DIR}/h5ds.mod ${MOD_BUILD_DIR}/h5tb.mod + ${MOD_BUILD_DIR}/h5tb_const.mod ${MOD_BUILD_DIR}/h5lt.mod + ${MOD_BUILD_DIR}/h5lt_const.mod ${MOD_BUILD_DIR}/h5im.mod ) -- cgit v0.12 From 0b4b73331d2cd4d6d3433e8bc5c45011f75d6fd3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Jul 2015 13:41:18 -0500 Subject: [svn-r27446] Correct Windows export name --- hl/fortran/src/H5HL_buildiface.F90 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 index dbbe471..0e85e27 100644 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -224,7 +224,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -256,7 +256,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -287,7 +287,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -318,7 +318,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -348,7 +348,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -379,7 +379,7 @@ PROGRAM H5HL_buildiface DO j = 1, 8 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -514,7 +514,7 @@ PROGRAM H5HL_buildiface WRITE(chr2,'(I2)') k j = 2 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -548,7 +548,7 @@ PROGRAM H5HL_buildiface WRITE(chr2,'(I2)') k j = 2 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -582,7 +582,7 @@ PROGRAM H5HL_buildiface WRITE(chr2,'(I2)') k j = 2 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -614,7 +614,7 @@ PROGRAM H5HL_buildiface WRITE(chr2,'(I2)') k j = 2 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' @@ -646,7 +646,7 @@ PROGRAM H5HL_buildiface WRITE(chr2,'(I2)') k j = 2 ! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) WRITE(11,'(A)') '!DEC$endif' -- cgit v0.12 From 117b9360323a71bacad7babbb3b7064fb58d6683 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 3 Aug 2015 21:19:25 -0500 Subject: [svn-r27459] Merge of 27411 from revise_chunks. Renamed a few "h5tri_t extended" variables to "h5tri_t was_extended". Apparently, "extended" is a typedef name someplace in the headers used on Solaris, which causes potentially confusing warnings to be emitted. Tested on: h5committest Solaris w/ Solaris Studio (emu) --- src/H5Fcwfs.c | 8 +++---- src/H5HL.c | 10 ++++----- src/H5MFaggr.c | 12 +++++----- src/H5Oalloc.c | 8 +++---- test/mf.c | 70 +++++++++++++++++++++++++++++----------------------------- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c index d0688f7..36f0a93 100644 --- a/src/H5Fcwfs.c +++ b/src/H5Fcwfs.c @@ -210,12 +210,12 @@ H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr) new_need = MAX(H5HG_SIZE(f->shared->cwfs[cwfsno]), new_need); if((H5HG_SIZE(f->shared->cwfs[cwfsno]) + new_need) <= H5HG_MAXSIZE) { - htri_t extended; /* Whether the heap was extended */ + htri_t was_extended; /* Whether the heap was extended */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need); - if(extended < 0) + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need); + if(was_extended < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap") - else if(extended == TRUE) { + else if(was_extended == TRUE) { if(H5HG_extend(f, dxpl_id, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection") *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]); diff --git a/src/H5HL.c b/src/H5HL.c index eae0482..49af528 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -763,7 +763,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void * size_t need_more; /* How much more space we need */ size_t new_dblk_size; /* Final size of space allocated for heap data block */ size_t old_dblk_size; /* Previous size of space allocated for heap data block */ - htri_t extended; /* Whether the local heap's data segment on disk was extended */ + htri_t was_extended; /* Whether the local heap's data segment on disk was extended */ /* At least double the heap's size, making certain there's enough room * for the new object */ @@ -786,12 +786,12 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void * H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t); /* Extend current heap if possible */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr, (hsize_t)(heap->dblk_size), (hsize_t)need_more); - if(extended < 0) + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr, (hsize_t)(heap->dblk_size), (hsize_t)need_more); + if(was_extended < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, UFAIL, "error trying to extend heap") - /* Check if we extended the heap data block in file */ - if(extended == TRUE) { + /* Check if we extended the heap data block in file */ + if(was_extended == TRUE) { /* Check for prefix & data block contiguous */ if(heap->single_cache_obj) { /* Resize prefix+data block */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index 3701441..c5a7b49 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -211,7 +211,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz /* Check if the space requested is larger than the space left in the block */ if((size + aggr_frag_size) > aggr->size) { - htri_t extended = FALSE; /* Whether the file was extended */ + htri_t was_extended = FALSE; /* Whether the file was extended */ /* Check if the block asked for is too large for 'normal' aggregator block */ if(size >= aggr->alloc_size) { @@ -221,9 +221,9 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space") - if ((aggr->addr > 0) && (extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) + if ((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") - else if (extended) { + else if (was_extended) { /* aggr->size is unchanged */ ret_value = aggr->addr + aggr_frag_size; aggr->addr += ext_size; @@ -263,9 +263,9 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space") - if((aggr->addr > 0) && (extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) + if((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") - else if (extended) { + else if (was_extended) { aggr->addr += aggr_frag_size; aggr->size += (ext_size - aggr_frag_size); aggr->tot_size += ext_size; @@ -313,7 +313,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") /* Freeing any possible fragment due to alignment in the block after extension */ - if(extended && aggr_frag_size) + if(was_extended && aggr_frag_size) if(H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") } /* end if */ diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 76f392d..e9d4f85 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -514,7 +514,7 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, size_t aligned_size = H5O_ALIGN_OH(oh, size); uint8_t *old_image; /* Old address of chunk's image in memory */ size_t old_size; /* Old size of chunk */ - htri_t extended; /* If chunk can be extended */ + htri_t was_extended; /* If chunk can be extended */ size_t extend_msg; /* Index of null message to extend */ hbool_t extended_msg = FALSE; /* Whether an existing message was extended */ uint8_t new_size_flags = 0; /* New chunk #0 size flags */ @@ -592,11 +592,11 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") /* Determine whether the chunk can be extended */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_OHDR, oh->chunk[chunkno].addr, + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_OHDR, oh->chunk[chunkno].addr, (hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size)); - if(extended < 0) /* error */ + if(was_extended < 0) /* error */ HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk") - else if(extended == FALSE) /* can't extend -- we are done */ + else if(was_extended == FALSE) /* can't extend -- we are done */ HGOTO_DONE(FALSE) /* Adjust object header prefix flags */ diff --git a/test/mf.c b/test/mf.c index 93667de..67ebc4e 100644 --- a/test/mf.c +++ b/test/mf.c @@ -608,12 +608,12 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ h5_stat_size_t file_size, new_file_size; /* File size */ - H5FD_mem_t type; + H5FD_mem_t type; haddr_t addr; - htri_t extended; - haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF; - hsize_t ma_size=0, new_ma_size=0; - hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ + htri_t was_extended; + haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF; + hsize_t ma_size=0, new_ma_size=0; + hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("H5MF_try_extend() of file allocation: test 1"); @@ -685,9 +685,9 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* should succeed */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); - if(extended <= 0) + if(was_extended <= 0) TEST_ERROR /* nothing should be changed in meta_aggr */ @@ -744,10 +744,10 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(new_ma_addr != ma_addr) TEST_ERROR - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50)); /* should not succeed */ - if(extended > 0) + if(was_extended > 0) TEST_ERROR /* nothing should be changed in meta_aggr */ @@ -1454,7 +1454,7 @@ test_mf_fs_extend(hid_t fapl) frspace_state_t state; /* State of free space*/ H5MF_sect_ud_t udata; H5FS_section_info_t *node; - htri_t extended; + htri_t was_extended; TESTING("H5MF_try_extend() of free-space manager:test 1"); @@ -1548,10 +1548,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); /* should succeed */ - if(extended <= 0) + if(was_extended <= 0) TEST_ERROR /* Section B is removed from free-space manager */ @@ -1666,10 +1666,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10)); /* Should not be able to extend the allocated block */ - if(extended) + if(was_extended) TEST_ERROR /* free-space info should remain the same */ @@ -1779,10 +1779,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40)); /* Should succeed in extending the allocated block */ - if(extended <=0) + if(was_extended <=0) TEST_ERROR /* Should have 1 section of size=10 left in free-space manager */ @@ -1892,10 +1892,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50); /* Should not succeed in extending the allocated block */ - if(extended) + if(was_extended) TEST_ERROR /* Free-space info should be the same */ @@ -3241,7 +3241,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) haddr_t new_addr, addr, saddr; haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF, sdata_addr=HADDR_UNDEF; hsize_t ma_size=0, new_ma_size=0, sdata_size=0; - htri_t extended; + htri_t was_extended; hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1"); @@ -3286,10 +3286,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* Try to extend the block by an amount < (% * aggr->alloc_size) */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3302,10 +3302,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE50); /* Try to extend the block by an amount > (% * aggr->alloc_size) but amount < aggr->alloc_size */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3318,10 +3318,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE700); /* Try to extend the block by an amount > (% * aggr->alloc_size) but amount > aggr->alloc_size */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3384,9 +3384,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* should be able to fulfill request from the aggreqator itself */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3454,9 +3454,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* unable to fulfill request from the aggreqator itself */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); - if(extended) + if(was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3772,7 +3772,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) haddr_t addr1, addr2; haddr_t ma_addr=HADDR_UNDEF; hsize_t ma_size=0; - htri_t extended; + htri_t was_extended; frspace_state_t state; hsize_t alignment=0, mis_align=0, tmp=0, accum=0; hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */ @@ -3978,9 +3978,9 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* try to extend the block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30); - if (extended <=0) TEST_ERROR + if (was_extended <=0) TEST_ERROR if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -4052,7 +4052,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) haddr_t addr; frspace_state_t state; H5MF_sect_ud_t udata; - htri_t extended; + htri_t was_extended; hsize_t alignment=0, tmp=0, mis_align=0; hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */ @@ -4197,9 +4197,9 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* try to extend the block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200); - if (extended <=0) TEST_ERROR + if (was_extended <=0) TEST_ERROR /* space should be decreased by 200, # of sections remain the same */ state.tot_space -= TEST_BLOCK_SIZE200; -- cgit v0.12 From ec5d13d65ba1e57be1ea372b5cd9baab2f9d068b Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 3 Aug 2015 22:00:45 -0500 Subject: [svn-r27460] Minor code cleanup in test/trefer.c - Fixed an out-of-range char assignment. - Added a couple of malloc() casts. Tested on: jam (minor change, tests only) --- test/trefer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/trefer.c b/test/trefer.c index 203b602..df4ea76 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -515,7 +515,7 @@ test_reference_region(void) hsize_t high[SPACE2_RANK]; /* Selection bounds */ hdset_reg_ref_t *wbuf, /* buffer to write to disk */ *rbuf; /* buffer read from disk */ - hdset_reg_ref_t nvrbuf[3]={{0},{101},{1000000000}}; /* buffer with non-valid refs */ + hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */ uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ *drbuf; /* Buffer for reading numeric data from disk */ uint8_t *tu8; /* Temporary pointer to uint8 data */ @@ -742,7 +742,7 @@ test_reference_region(void) VERIFY(ret, 36, "H5Sget_select_npoints"); ret = (int)H5Sget_select_hyper_nblocks(sid2); VERIFY(ret, 1, "H5Sget_select_hyper_nblocks"); - coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */ + coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */ ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); VERIFY(coords[0], 2, "Hyperslab Coordinates"); @@ -770,7 +770,7 @@ test_reference_region(void) VERIFY(ret, 10, "H5Sget_select_npoints"); ret = (int)H5Sget_select_elem_npoints(sid2); VERIFY(ret, 10, "H5Sget_select_elem_npoints"); - coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */ + coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */ ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_elem_pointlist"); VERIFY(coords[0], coord1[0][0], "Element Coordinates"); -- cgit v0.12 From 4d0187a4832a60d56bc077a43855b91b8518271c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 5 Aug 2015 10:56:58 -0500 Subject: [svn-r27465] Merge dual-binary CMake changes --- CMakeFilters.cmake | 22 +- CMakeInstallation.cmake | 8 +- CMakeLists.txt | 56 ++-- c++/CMakeLists.txt | 9 - c++/examples/CMakeLists.txt | 8 +- c++/src/CMakeLists.txt | 33 +- c++/test/CMakeLists.txt | 4 +- config/cmake/H5pubconf.h.in | 18 -- config/cmake/cacheinit.cmake | 6 - config/cmake/hdf5-config.cmake.in | 51 ++-- examples/CMakeLists.txt | 22 +- examples/CMakeTests.cmake | 67 +++++ fortran/examples/CMakeLists.txt | 64 +++- fortran/examples/CMakeTests.cmake | 41 +++ fortran/src/CMakeLists.txt | 143 ++++++--- fortran/test/CMakeLists.txt | 244 ++++++++++++--- fortran/test/CMakeTests.cmake | 26 ++ fortran/testpar/CMakeLists.txt | 6 +- hl/CMakeLists.txt | 8 - hl/c++/examples/CMakeLists.txt | 4 +- hl/c++/src/CMakeLists.txt | 34 ++- hl/c++/test/CMakeLists.txt | 4 +- hl/examples/CMakeLists.txt | 4 +- hl/fortran/examples/CMakeLists.txt | 6 +- hl/fortran/src/CMakeLists.txt | 107 ++++--- hl/fortran/test/CMakeLists.txt | 74 ++++- hl/fortran/test/CMakeTests.cmake | 31 ++ hl/src/CMakeLists.txt | 36 ++- hl/test/CMakeLists.txt | 20 +- hl/tools/CMakeLists.txt | 14 +- src/CMakeLists.txt | 39 ++- src/H5api_adpt.h | 18 +- test/CMakeLists.txt | 156 ++++++++-- test/CMakeTests.cmake | 598 ++++++++++++++++++++++++++++++++----- testpar/CMakeLists.txt | 8 +- tools/h5copy/CMakeLists.txt | 10 +- tools/h5diff/CMakeLists.txt | 16 +- tools/h5dump/CMakeLists.txt | 10 +- tools/h5import/CMakeLists.txt | 8 +- tools/h5jam/CMakeLists.txt | 26 +- tools/h5ls/CMakeLists.txt | 4 +- tools/h5repack/CMakeLists.txt | 66 ++-- tools/h5repack/CMakeTests.cmake | 8 - tools/h5stat/CMakeLists.txt | 10 +- tools/lib/CMakeLists.txt | 36 ++- tools/misc/CMakeLists.txt | 20 +- tools/perform/CMakeLists.txt | 36 +-- 47 files changed, 1702 insertions(+), 537 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 7050f87..c2b81dc 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -28,11 +28,12 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) if (HDF5_ENABLE_Z_LIB_SUPPORT) if (NOT H5_ZLIB_HEADER) if (NOT ZLIB_USE_EXTERNAL) - find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) if (NOT ZLIB_FOUND) find_package (ZLIB) # Legacy find if (ZLIB_FOUND) set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES}) endif (ZLIB_FOUND) endif (NOT ZLIB_FOUND) endif (NOT ZLIB_USE_EXTERNAL) @@ -45,7 +46,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) else (ZLIB_FOUND) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) + EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) @@ -63,7 +64,10 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) if (H5_HAVE_FILTER_DEFLATE) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") endif (H5_HAVE_FILTER_DEFLATE) - set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) + if (BUILD_SHARED_LIBS) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY}) + endif (BUILD_SHARED_LIBS) + set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) message (STATUS "Filter ZLIB is ON") endif (HDF5_ENABLE_Z_LIB_SUPPORT) @@ -75,11 +79,12 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) if (HDF5_ENABLE_SZIP_SUPPORT) option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) if (NOT SZIP_USE_EXTERNAL) - find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) if (NOT SZIP_FOUND) find_package (SZIP) # Legacy find if (SZIP_FOUND) set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES}) endif (SZIP_FOUND) endif (NOT SZIP_FOUND) endif (NOT SZIP_USE_EXTERNAL) @@ -88,10 +93,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) - set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR}) + set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) else (SZIP_FOUND) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING}) + EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) @@ -100,7 +105,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT) message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") endif (SZIP_FOUND) - set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) + if (BUILD_SHARED_LIBS) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY}) + endif (BUILD_SHARED_LIBS) + set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) message (STATUS "Filter SZIP is ON") if (H5_HAVE_FILTER_SZIP) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index c5db4ea..f87119e 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -167,11 +167,11 @@ install ( option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) if (HDF5_PACK_EXAMPLES) configure_file ( - ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in - ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY + ${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in + ${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake + FILES ${HDF5_BINARY_DIR}/HDF5_Examples.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) @@ -180,7 +180,7 @@ if (HDF5_PACK_EXAMPLES) COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} ) install ( - DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples-0.1.1-Source + DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples DESTINATION ${HDF5_INSTALL_DATA_DIR} USE_SOURCE_PERMISSIONS COMPONENT hdfdocuments diff --git a/CMakeLists.txt b/CMakeLists.txt index 52a883e..2a552a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,18 +138,30 @@ set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_ #----------------------------------------------------------------------------- # Set the target names of all the libraries #----------------------------------------------------------------------------- -set (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME}) -set (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME}) -set (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME}) -set (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME}) -set (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME}) -set (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME}) -set (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME}) -set (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME}) -set (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME}) -set (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME}) -set (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME}) -set (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME}) +set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static") +set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static") +set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static") +set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-static") +set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-static") +set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-static") +set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-static") +set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-static") +set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static") +set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static") +set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static") +set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static") +set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared") +set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared") +set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared") +set (HDF5_HL_LIBSH_TARGET "${HDF5_HL_LIB_CORENAME}-shared") +set (HDF5_HL_CPP_LIBSH_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared") +set (HDF5_TOOLS_LIBSH_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared") +set (HDF5_F90_LIBSH_TARGET "${HDF5_F90_LIB_CORENAME}-shared") +set (HDF5_F90_C_LIBSH_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared") +set (HDF5_F90_TEST_LIBSH_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared") +set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared") +set (HDF5_HL_F90_LIBSH_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared") +set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project @@ -308,20 +320,15 @@ if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Option to Build Shared/Static libs, default is static +# Option to Build Shared and Static libs, default is static #----------------------------------------------------------------------------- -option (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) -set (LIB_TYPE STATIC) +option (BUILD_SHARED_LIBS "Build Shared Libraries" ON) set (H5_ENABLE_SHARED_LIB NO) -set (H5_ENABLE_STATIC_LIB NO) if (BUILD_SHARED_LIBS) - set (LIB_TYPE SHARED) - set (H5_BUILT_AS_DYNAMIC_LIB 1) set (H5_ENABLE_SHARED_LIB YES) -else (BUILD_SHARED_LIBS) - set (H5_BUILT_AS_STATIC_LIB 1) - set (H5_ENABLE_STATIC_LIB YES) + set (LINK_SHARED_LIBS ${LINK_LIBS}) endif (BUILD_SHARED_LIBS) +set (H5_ENABLE_STATIC_LIB YES) set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- @@ -471,6 +478,7 @@ endif (HDF5_ENABLE_PARALLEL) # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_C_LIBRARIES}) if (MPI_C_LINK_FLAGS) set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif (MPI_C_LINK_FLAGS) @@ -571,9 +579,15 @@ add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB) + if (BUILD_SHARED_LIBS) + add_dependencies (${HDF5_LIBSH_TARGET} ZLIB) + endif (BUILD_SHARED_LIBS) endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) if (SZIP_FOUND AND SZIP_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP) + if (BUILD_SHARED_LIBS) + add_dependencies (${HDF5_LIBSH_TARGET} SZIP) + endif (BUILD_SHARED_LIBS) endif (SZIP_FOUND AND SZIP_USE_EXTERNAL) endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 39280e8..6f288a0 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -7,15 +7,6 @@ PROJECT (HDF5_CPP) add_definitions (${HDF_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- -# Shared/Static Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_DYNAMIC_LIB 1) -else (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_STATIC_LIB 1) -endif (BUILD_SHARED_LIBS) - -#----------------------------------------------------------------------------- # Generate configure file #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index ff375f3..cfcdd8d 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -34,16 +34,16 @@ set (tutr_examples foreach (example ${examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (cpp_ex_${example} STATIC) + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach (example ${examples}) foreach (example ${tutr_examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (cpp_ex_${example} STATIC) + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach (example ${tutr_examples}) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 44b912c..1ae5647 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -2,13 +2,6 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- -# Shared/Static Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_DYNAMIC_LIB 1) -endif (BUILD_SHARED_LIBS) - -#----------------------------------------------------------------------------- # Generate configure file #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in @@ -83,15 +76,31 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h ) -add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS}) -TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SRCS} ${CPP_HDRS}) +TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_CPP_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SRCS} ${CPP_HDRS}) + TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED) + set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES + FOLDER libraries/cpp + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -110,12 +119,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) + INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_CPP_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index dcdf3a3..6f1d857 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -35,8 +35,8 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} ) -TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (cpp_testhdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (cpp_testhdf5 STATIC) +TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ") target_link_libraries (cpp_testhdf5 ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET} diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 31bcc08..af9afde 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -15,24 +15,6 @@ /* Define if using a Windows compiler (i.e. Visual Studio) */ #cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@ -/* Defined if HDF5 was built with CMake AND build as a shared library */ -#cmakedefine H5_BUILT_AS_DYNAMIC_LIB @H5_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 was built with CMake AND build as a static library */ -#cmakedefine H5_BUILT_AS_STATIC_LIB @H5_BUILT_AS_STATIC_LIB@ - -/* Defined if HDF5 CPP was built with CMake AND build as a shared library */ -#cmakedefine H5_CPP_BUILT_AS_DYNAMIC_LIB @H5_CPP_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 CPP was built with CMake AND build as a static library */ -#cmakedefine H5_CPP_BUILT_AS_STATIC_LIB @H5_CPP_BUILT_AS_STATIC_LIB@ - -/* Defined if HDF5 HL was built with CMake AND build as a shared library */ -#cmakedefine H5_HL_BUILT_AS_DYNAMIC_LIB @H5_HL_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 HL was built with CMake AND build as a static library */ -#cmakedefine H5_HL_BUILT_AS_STATIC_LIB @H5_HL_BUILT_AS_STATIC_LIB@ - /* Define if building universal (internal helper macro) */ #cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index f869949..cca6e98 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -4,18 +4,12 @@ # EXTERNAL cache entries ######################## -set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE) - -set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE) - set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) -set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE) - set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 667d3e6..321267f 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -6,6 +6,8 @@ string(TOUPPER @HDF5_PACKAGE@ HDF5_PACKAGE_NAME) set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS + static + shared C CXX Fortran @@ -68,12 +70,6 @@ if (${HDF5_PACKAGE_NAME}_BUILD_TOOLS) set_and_check (${HDF5_PACKAGE_NAME}_TOOLS_DIR "@PACKAGE_CURRENT_BUILD_DIR@/bin") endif () -if (HDF5_BUILD_SHARED_LIBS) - set (H5_BUILT_AS_DYNAMIC_LIB 1) -else () - set (H5_BUILT_AS_STATIC_LIB 1) -endif () - #----------------------------------------------------------------------------- # Version Strings #----------------------------------------------------------------------------- @@ -95,14 +91,25 @@ if (NOT TARGET "@HDF5_PACKAGE@") include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) endif () -# Handle default component : +# Handle default component(static) : if (NOT ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) - set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL) - set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_C true) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE) + set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL static) + set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_static_C true) endif () # Handle requested components: list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) +foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) + if (${comp} STREQUAL "shared") + list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + elseif (${comp} STREQUAL "static") + list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + endif () +endforeach () +foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) set (hdf5_comp2) if (${comp} STREQUAL "C") @@ -122,26 +129,28 @@ list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) set (hdf5_comp2 "hdf5_hl_f90cstub") set (hdf5_comp "hdf5_hl_fortran") endif () - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) if (${HAVE_COMP} LESS 0) - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () if (hdf5_comp2) - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}" HAVE_COMP2) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2) if (${HAVE_COMP2} LESS 0) - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1) - string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) - set (${HDF5_PACKAGE_NAME}_LIBRARIES ${${HDF5_PACKAGE_NAME}_LIBRARIES} ${hdf5_comp2} ${hdf5_comp}) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1) + string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp2}-${libtype} ${hdf5_comp}-${libtype}) endif () else () - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1) - string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) - set (${HDF5_PACKAGE_NAME}_LIBRARIES ${${HDF5_PACKAGE_NAME}_LIBRARIES} ${hdf5_comp}) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1) + string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp}-${libtype}) endif () endif () endforeach () +endforeach () - check_required_components(${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) - \ No newline at end of file +foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) + check_required_components(${HDF5_PACKAGE_NAME}_${libtype}) +endforeach () diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 1f33f04..7953161 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -38,18 +38,32 @@ set (examples foreach (example ${examples}) add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (${example} STATIC) + TARGET_C_PROPERTIES (${example} STATIC " " " ") target_link_libraries (${example} ${HDF5_LIB_TARGET}) set_target_properties (${example} PROPERTIES FOLDER examples) + if (BUILD_SHARED_LIBS) + add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) + TARGET_NAMING (${example}-shared SHARED) + TARGET_C_PROPERTIES (${example}-shared SHARED " " " ") + target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET}) + set_target_properties (${example}-shared PROPERTIES FOLDER examples) + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) if (H5_HAVE_PARALLEL) add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_NAMING (ph5example ${LIB_TYPE}) - TARGET_C_PROPERTIES (ph5example ${LIB_TYPE} " " " ") + TARGET_NAMING (ph5example STATIC) + TARGET_C_PROPERTIES (ph5example STATIC " " " ") target_link_libraries (ph5example ${HDF5_LIB_TARGET}) set_target_properties (ph5example PROPERTIES FOLDER examples) + if (BUILD_SHARED_LIBS) + add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) + TARGET_NAMING (ph5example-shared SHARED) + TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ") + target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET}) + set_target_properties (ph5example-shared PROPERTIES FOLDER examples) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL) if (BUILD_TESTING) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 5a756c8..42b42b3 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -5,6 +5,10 @@ ############################################################################## ############################################################################## file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) + if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5EX-shared") + file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared/red ${PROJECT_BINARY_DIR}/H5EX-shared/blue ${PROJECT_BINARY_DIR}/H5EX-shared/u2w) + endif (BUILD_SHARED_LIBS) # Remove any output file left over from previous test run add_test ( @@ -56,6 +60,61 @@ set (last_test "EXAMPLES-${example}") endforeach (example ${examples}) + if (BUILD_SHARED_LIBS) + # Remove any output file left over from previous test run + add_test ( + NAME EXAMPLES-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + Attributes.h5 + btrees_file.h5 + cmprss.h5 + default_file.h5 + dset.h5 + extend.h5 + extlink_prefix_source.h5 + extlink_source.h5 + extlink_target.h5 + group.h5 + groups.h5 + hard_link.h5 + mount1.h5 + mount2.h5 + one_index_file.h5 + only_dspaces_and_attrs_file.h5 + only_huge_mesgs_file.h5 + REF_REG.h5 + refere.h5 + SDS.h5 + SDScompound.h5 + SDSextendible.h5 + Select.h5 + separate_indexes_file.h5 + small_lists_file.h5 + soft_link.h5 + subset.h5 + unix2win.h5 + blue/prefix_target.h5 + red/prefix_target.h5 + u2w/u2w_target.h5 + WORKING_DIRECTORY + ${PROJECT_BINARY_DIR}/H5EX-shared + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-clear-objects PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-clear-objects") + + foreach (example ${examples}) + add_test (NAME EXAMPLES-shared-${example} COMMAND $) + set_tests_properties (EXAMPLES-shared-${example} PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-${example}") + endforeach (example ${examples}) + endif (BUILD_SHARED_LIBS) + ### Windows pops up a modal permission dialog on this test if (H5_HAVE_PARALLEL AND NOT WIN32) add_test (NAME EXAMPLES-ph5example COMMAND $) @@ -63,4 +122,12 @@ set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "EXAMPLES-ph5example") + if (BUILD_SHARED_LIBS) + add_test (NAME EXAMPLES-shared-ph5example COMMAND $) + set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-ph5example") + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND NOT WIN32) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 2bf0bf6..fabc5cd 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -40,8 +40,8 @@ set (F2003_examples foreach (example ${examples}) add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f90_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f90_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (f90_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ") target_link_libraries (f90_ex_${example} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -50,15 +50,30 @@ foreach (example ${examples}) set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) + if (BUILD_SHARED_LIBS) + add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f90_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ") + target_link_libraries (f90_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f90_ex_${example}-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) if (HDF5_ENABLE_F2003) foreach (example ${F2003_examples}) add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (f03_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") target_link_libraries (f03_ex_${example} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -67,15 +82,30 @@ if (HDF5_ENABLE_F2003) set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) + if (BUILD_SHARED_LIBS) + add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") + target_link_libraries (f03_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f03_ex_${example}-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran03 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endforeach (example ${F2003_examples}) endif (HDF5_ENABLE_F2003) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example ${LIB_TYPE} " " " ") + TARGET_NAMING (f90_ex_ph5example STATIC) + TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ") target_link_libraries (f90_ex_ph5example ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -85,8 +115,24 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) + if (BUILD_SHARED_LIBS) + add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) + TARGET_NAMING (f90_ex_ph5example-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ") + target_link_libraries (f90_ex_ph5example-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ${MPI_Fortran_LIBRARIES} + ) + target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f90_ex_ph5example-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) if (BUILD_TESTING) diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 57aec53..173984c 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -28,6 +28,30 @@ set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f90_ex-clear-objects") + if (BUILD_SHARED_LIBS) + add_test ( + NAME f90_ex-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + compound.h5 + copy1.h5 + copy2.h5 + dsetf.h5 + extend.h5 + FORTRAN.h5 + groupf.h5 + groupsf.h5 + h5_cmprss.h5 + mount1.h5 + mount2.h5 + sdsf.h5 + subset.h5 + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f90_ex-shared-clear-objects") + endif (BUILD_SHARED_LIBS) foreach (example ${examples}) add_test (NAME f90_ex_${example} COMMAND $) @@ -35,6 +59,13 @@ foreach (example ${examples}) set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f90_ex_${example}") + if (BUILD_SHARED_LIBS) + add_test (NAME f90_ex-shared_${example} COMMAND $) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f90_ex-shared_${example}") + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) if (HDF5_ENABLE_F2003) @@ -44,9 +75,19 @@ if (HDF5_ENABLE_F2003) set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f03_ex_${example}") + if (BUILD_SHARED_LIBS) + add_test (NAME f03_ex-shared_${example} COMMAND $) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f03_ex-shared_${example}") + endif (BUILD_SHARED_LIBS) endforeach (example ${F2003_examples}) endif (HDF5_ENABLE_F2003) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + if (BUILD_SHARED_LIBS) + add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 0469aac..bb171d4 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -29,22 +29,37 @@ if (FORTRAN_HAVE_STORAGE_SIZE) add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 ) + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 + ) + endif (BUILD_SHARED_LIBS) set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") else (FORTRAN_HAVE_STORAGE_SIZE) if (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 ) + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 + ) + endif (BUILD_SHARED_LIBS) set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") else (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 ) + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 + ) + endif (BUILD_SHARED_LIBS) endif (FORTRAN_HAVE_SIZEOF) endif (FORTRAN_HAVE_STORAGE_SIZE) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind + set_target_properties (H5test_FortranHavekind-shared PROPERTIES COMPILE_FLAGS "/MT" ) @@ -56,8 +71,14 @@ if (WIN32 AND MSVC) endif (WIN32 AND MSVC) set_target_properties (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + set_target_properties (H5test_FortranHavekind-shared PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) set (CMD $) add_custom_command ( @@ -144,16 +165,33 @@ set (f90CStub_C_HDRS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) -add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) -TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) +TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_F90_C_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) + TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES + FOLDER libraries/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Fortran 2003 standard @@ -233,58 +271,86 @@ set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- # Add Main fortran library #----------------------------------------------------------------------------- -add_library (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS}) +add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS}) set (SHARED_LINK_FLAGS " ") -if (WIN32) - if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - BUILD_HDF5_DLL - ) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") - endif (MSVC) - endif (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - HDF5F90_WINDOWS - ) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS}) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${MPI_Fortran_LIBRARIES}) + endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES + FOLDER libraries/fortran + LINKER_LANGUAGE Fortran + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_F90_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) + set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( - FILES - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h + FILES + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 - DESTINATION + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT + COMPONENT fortheaders ) -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) -else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) -endif (WIN32) +if (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + endif (WIN32) +else (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + endif (WIN32) +endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5fortran_types.mod @@ -330,14 +396,13 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) - #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) + INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) + #INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_F90_C_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 2893156..a2711c0 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -9,56 +9,103 @@ INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- -add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c) +add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) -TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} " " " ") +TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) + TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} + ${HDF5_F90_C_LIBSH_TARGET} + ${HDF5_TEST_LIBSH_TARGET} + ) + H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) +endif (BUILD_SHARED_LIBS) # See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then # fall back to F2003. If F2003 not supported then use F90 for the tests. set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90) + if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F08.f90 tf.f90) + endif (BUILD_SHARED_LIBS) elseif (HDF5_ENABLE_F2003) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F03.f90 tf.f90) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F03.f90 tf.f90) + if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F03.f90 tf.f90) + endif (BUILD_SHARED_LIBS) else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F90.f90 tf.f90) -endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - - -set (SHARED_LINK_FLAGS " ") -if (WIN32) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F90.f90 tf.f90) if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_TEST_DLL) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL") - endif (MSVC) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F90.f90 tf.f90) endif (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) + +TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC) +target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY + COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +if (BUILD_SHARED_LIBS) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_C_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED) + target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test/fortran + LINKER_LANGUAGE Fortran + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY + COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add Tests @@ -82,8 +129,8 @@ add_executable (testhdf5_fortran tH5Z.f90 tHDF5.f90 ) -TARGET_NAMING (testhdf5_fortran ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5_fortran STATIC) +TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ") target_link_libraries (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -96,8 +143,43 @@ target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRE set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5_fortran-shared + fortranlib_test.f90 + tH5A.f90 + tH5D.f90 + tH5E.f90 + tH5F.f90 + tH5G.f90 + tH5I.f90 + tH5P.f90 + tH5R.f90 + tH5S.f90 + tH5Sselect.f90 + tH5T.f90 + tH5VL.f90 + tH5Z.f90 + tHDF5.f90 + ) + TARGET_NAMING (testhdf5_fortran-shared SHARED) + TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ") + target_link_libraries (testhdf5_fortran-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (testhdf5_fortran-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (testhdf5_fortran-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for testhdf5_fortran_1_8 add_executable (testhdf5_fortran_1_8 @@ -108,8 +190,8 @@ add_executable (testhdf5_fortran_1_8 tH5MISC_1_8.f90 tHDF5_1_8.f90 ) -TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5_fortran_1_8 STATIC) +TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ") target_link_libraries (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -122,8 +204,34 @@ target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_ set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5_fortran_1_8-shared + fortranlib_test_1_8.f90 + tH5O.f90 + tH5A_1_8.f90 + tH5G_1_8.f90 + tH5MISC_1_8.f90 + tHDF5_1_8.f90 + ) + TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED) + TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ") + target_link_libraries (testhdf5_fortran_1_8-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for fortranlib_test_F03 if (HDF5_ENABLE_F2003) @@ -137,8 +245,8 @@ if (HDF5_ENABLE_F2003) tH5T_F03.f90 tHDF5_F03.f90 ) - TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 ${LIB_TYPE} " " " ") + TARGET_NAMING (fortranlib_test_F03 STATIC) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") target_link_libraries (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -151,14 +259,42 @@ if (HDF5_ENABLE_F2003) set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + ) + if (BUILD_SHARED_LIBS) + add_executable (fortranlib_test_F03-shared + fortranlib_test_F03.f90 + tH5E_F03.f90 + tH5F_F03.f90 + tH5L_F03.f90 + tH5O_F03.f90 + tH5P_F03.f90 + tH5T_F03.f90 + tHDF5_F03.f90 + ) + TARGET_NAMING (fortranlib_test_F03-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") + target_link_libraries (fortranlib_test_F03-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fortranlib_test_F03-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) + endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_F2003) #-- Adding test for fflush1 add_executable (fflush1 fflush1.f90) -TARGET_NAMING (fflush1 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (fflush1 ${LIB_TYPE} " " " ") +TARGET_NAMING (fflush1 STATIC) +TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ") target_link_libraries (fflush1 ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} @@ -171,13 +307,32 @@ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/st set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (fflush1-shared fflush1.f90) + TARGET_NAMING (fflush1-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ") + target_link_libraries (fflush1-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fflush1-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fflush1-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fflush1-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for fflush2 add_executable (fflush2 fflush2.f90) -TARGET_NAMING (fflush2 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (fflush2 ${LIB_TYPE} " " " ") +TARGET_NAMING (fflush2 STATIC) +TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ") target_link_libraries (fflush2 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -190,7 +345,26 @@ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/st set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (fflush2-shared fflush2.f90) + TARGET_NAMING (fflush2-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ") + target_link_libraries (fflush2-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fflush2-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fflush2-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fflush2-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index 4df50ad..94f6b64 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -26,3 +26,29 @@ add_test (NAME FORTRAN_fflush1 COMMAND $) #-- Adding test for fflush2 add_test (NAME FORTRAN_fflush2 COMMAND $) set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1) + +if (BUILD_SHARED_LIBS) + add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $) + set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran) + + #-- Adding test for testhdf5_fortran_1_8 + add_test (NAME FORTRAN_testhdf5_fortran_1_8-shared COMMAND $) + set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) + + #-- Adding test for fortranlib_test_F03 + if (HDF5_ENABLE_F2003) + add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $) + set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03) + endif (HDF5_ENABLE_F2003) + + #-- Adding test for fflush1 + add_test (NAME FORTRAN_fflush1-shared COMMAND $) + set_tests_properties (FORTRAN_fflush1-shared PROPERTIES DEPENDS FORTRAN_fflush2) + + #-- Adding test for fflush2 + add_test (NAME FORTRAN_fflush2-shared COMMAND $) + set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared) +endif (BUILD_SHARED_LIBS) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 98ef6c8..4f21419 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -16,8 +16,8 @@ add_executable (parallel_test hyper.f90 mdset.f90 ) -TARGET_NAMING (parallel_test ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (parallel_test ${LIB_TYPE} " " " ") +TARGET_NAMING (parallel_test STATIC) +TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ") target_link_libraries (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -27,7 +27,7 @@ target_link_libraries (parallel_test if (WIN32 AND MSVC) target_link_libraries (parallel_test "ws2_32.lib") endif (WIN32 AND MSVC) -target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index b5d4308..bed8291 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -6,14 +6,6 @@ PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- add_definitions (${HDF_EXTRA_C_FLAGS}) -#----------------------------------------------------------------------------- -# Shared Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_DYNAMIC_LIB 1) -else (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_STATIC_LIB 1) -endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # List Source files diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index e3fc3ae..77a50bf 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -11,8 +11,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src) # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp) -TARGET_NAMING (ptExampleFL ${LIB_TYPE}) -TARGET_C_PROPERTIES (ptExampleFL ${LIB_TYPE} " " " ") +TARGET_NAMING (ptExampleFL STATIC) +TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ") target_link_libraries ( ptExampleFL ${HDF5_HL_CPP_LIB_TARGET} diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index b511260..e37c5ba 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -10,22 +10,42 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR}) set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) -add_library (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS}) -TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SRCS}) +TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries ( ${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_HL_CPP_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SRCS}) + TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") + target_link_libraries ( + ${HDF5_HL_CPP_LIBSH_TARGET} + ${HDF5_HL_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -41,12 +61,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries) + INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS - ${HDF5_HL_CPP_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index ff06b22..de5b363 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -16,8 +16,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test) INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) -TARGET_C_PROPERTIES (hl_ptableTest ${LIB_TYPE} " " " ") -TARGET_NAMING (hl_ptableTest ${LIB_TYPE}) +TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ") +TARGET_NAMING (hl_ptableTest STATIC) target_link_libraries ( hl_ptableTest ${HDF5_LIB_TARGET} diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index e264f75..f5e6f5e 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -28,8 +28,8 @@ set (examples foreach (example ${examples}) add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (hl_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (hl_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_ex_${example} STATIC) + TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ") target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl) endforeach (example ${examples}) diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index bded2d9..87838a0 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -16,14 +16,14 @@ set (examples foreach (example ${examples}) add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (hl_f90_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_f90_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ") target_link_libraries (hl_f90_ex_${example} ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) + target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index e5ffb78..7503f72 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -24,16 +24,33 @@ set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) -add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Fortran Modules @@ -46,45 +63,66 @@ set (HDF5_HL_F90_F_SRCS ) set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) -set (SHARED_LINK_FLAGS " ") -if (BUILD_SHARED_LIBS) - if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - BUILD_HDF5_HL_DLL - ) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL") - endif (MSVC) - endif (WIN32) -endif (BUILD_SHARED_LIBS) -if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - HDF5F90_WINDOWS - ) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS}) +TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS}) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl/fortran + LINKER_LANGUAGE Fortran + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) + set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) -else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) -endif (WIN32) +if (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + endif (WIN32) +else (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + endif (WIN32) +endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5ds.mod @@ -107,14 +145,13 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) - #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) + INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) + #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS - ${HDF5_HL_F90_C_LIB_TARGET} - ${HDF5_HL_F90_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 55fb987..52397cb 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -4,42 +4,90 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #-- Adding test for hl_f90_tstds add_executable (hl_f90_tstds tstds.f90) -TARGET_NAMING (hl_f90_tstds ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstds ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstds STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstds-shared tstds.f90) + TARGET_NAMING (hl_f90_tstds-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") + target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstds-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstlite add_executable (hl_f90_tstlite tstlite.f90) -TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstlite STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstlite-shared tstlite.f90) + TARGET_NAMING (hl_f90_tstlite-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") + target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstlite-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstimage add_executable (hl_f90_tstimage tstimage.f90) -TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstimage STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstimage-shared tstimage.f90) + TARGET_NAMING (hl_f90_tstimage-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") + target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstimage-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tsttable add_executable (hl_f90_tsttable tsttable.f90) -TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tsttable STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tsttable-shared tsttable.f90) + TARGET_NAMING (hl_f90_tsttable-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") + target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tsttable-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake index 3676d24..38181bf 100644 --- a/hl/fortran/test/CMakeTests.cmake +++ b/hl/fortran/test/CMakeTests.cmake @@ -31,3 +31,34 @@ set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $) set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) + +if (BUILD_SHARED_LIBS) + add_test ( + NAME HL_FORTRAN_test-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dsetf1.h5 + dsetf2.h5 + dsetf3.h5 + dsetf4.h5 + dsetf5.h5 + f1img.h5 + f1tab.h5 + tstds.h5 + ) + set_tests_properties (HL_FORTRAN_test-shared-clear-objects + PROPERTIES DEPENDS "HL_FORTRAN_f90_tsttable;HL_FORTRAN_f90_tstimage;HL_FORTRAN_f90_tstlite;HL_FORTRAN_f90_tstds" + ) + + add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstds-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstlite-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstimage-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) +endif (BUILD_SHARED_LIBS) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 47029d7..23943f9 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,12 +1,6 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_SRC) -#----------------------------------------------------------------------------- -# Shared Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_DYNAMIC_LIB 1) -endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # List Source files @@ -33,18 +27,34 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h ) -add_library (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} ${HL_SRCS} ${HL_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") +set (install_targets ${HDF5_HL_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}") + set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -60,12 +70,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) + INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS - ${HDF5_HL_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 47383ce..916dcf3 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -22,8 +22,8 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) # -------------------------------------------------------------------- MACRO (HL_ADD_EXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_NAMING (hl_${hl_name} ${LIB_TYPE}) - TARGET_C_PROPERTIES (hl_${hl_name} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_${hl_name} STATIC) + TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -32,6 +32,18 @@ MACRO (HL_ADD_EXE hl_name) set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) ENDMACRO (HL_ADD_EXE) +MACRO (HL_ADD_SHEXE hl_name) + add_executable (hl_${hl_name} ${hl_name}.c) + TARGET_NAMING (hl_${hl_name} SHARED) + TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ") + target_link_libraries (hl_${hl_name} + ${HDF5_HL_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ${HDF5_TEST_LIBSH_TARGET} + ) + set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) +ENDMACRO (HL_ADD_SHEXE) + HL_ADD_EXE (test_ds) HL_ADD_EXE (test_dset_opt) HL_ADD_EXE (test_image) @@ -43,7 +55,7 @@ HL_ADD_EXE (test_table) # This executable is used to generate test files for the test_ds test. # It should only be run during development when new test files are needed # -------------------------------------------------------------------- -if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +if (HDF5_BUILD_GENERATORS) add_executable (hl_gen_test_ds gen_test_ds.c) TARGET_NAMING (hl_gen_test_ds STATIC) TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ") @@ -53,6 +65,6 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ${HDF5_TEST_LIB_TARGET} ) set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) -endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index c9017f3..73d1f22 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -18,8 +18,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5) add_executable (gif2h5 ${GIF2H5_SRCS}) -TARGET_NAMING (gif2h5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (gif2h5 ${LIB_TYPE} " " " ") +TARGET_NAMING (gif2h5 STATIC) +TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) @@ -29,8 +29,8 @@ set (hdf2gif_SRCS ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c ) add_executable (h52gif ${hdf2gif_SRCS}) -TARGET_NAMING (h52gif ${LIB_TYPE}) -TARGET_C_PROPERTIES (h52gif ${LIB_TYPE} " " " ") +TARGET_NAMING (h52gif STATIC) +TARGET_C_PROPERTIES (h52gif STATIC " " " ") target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h52gif PROPERTIES FOLDER tools/hl) @@ -40,15 +40,15 @@ if (BUILD_TESTING) # used in the CMake Build system as we rely on the test files that are # shipped with HDF5 source archives # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c) TARGET_NAMING (hl_h52gifgentest STATIC) TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) - + # add_test (NAME hl_h52gifgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11b37a5..eddc951 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -853,8 +853,8 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED) set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) -add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} dl) @@ -863,7 +863,7 @@ if (H5_HAVE_PARALLEL AND MPI_C_FOUND) target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -876,6 +876,35 @@ if (HDF5_ENABLE_DEBUG_APIS) "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG" ) endif (HDF5_ENABLE_DEBUG_APIS) +set (install_targets ${HDF5_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + if (NOT WIN32) + target_link_libraries (${HDF5_LIBSH_TARGET} dl) + endif (NOT WIN32) + if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED) + set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES + FOLDER libraries + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + + if (HDF5_ENABLE_DEBUG_APIS) + set_property (TARGET ${HDF5_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS + "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG" + ) + endif (HDF5_ENABLE_DEBUG_APIS) + set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -896,12 +925,12 @@ endif (NOT HDF5_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) + INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 74066f7..ab7287c 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -47,7 +47,7 @@ /* This will only be defined if HDF5 was built with CMake */ #ifdef H5_BUILT_AS_DYNAMIC_LIB -#if defined(hdf5_EXPORTS) +#if defined(hdf5_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_DLL __declspec(dllexport) #define H5_DLLVAR extern __declspec(dllexport) @@ -70,7 +70,7 @@ #define H5_DLLVAR extern #endif /* _HDF5DLL_ */ -#if defined(hdf5_test_EXPORTS) +#if defined(hdf5_test_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5TEST_DLL __declspec(dllexport) #define H5TEST_DLLVAR extern __declspec(dllexport) @@ -93,7 +93,7 @@ #define H5TEST_DLLVAR extern #endif /* H5TEST_DLL */ -#if defined(hdf5_tools_EXPORTS) +#if defined(hdf5_tools_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5TOOLS_DLL __declspec(dllexport) #define H5TOOLS_DLLVAR extern __declspec(dllexport) @@ -116,7 +116,7 @@ #define H5TOOLS_DLLVAR extern #endif /* H5TOOLS_DLL */ -#if defined(hdf5_cpp_EXPORTS) +#if defined(hdf5_cpp_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_DLLCPP __declspec(dllexport) #define H5_DLLCPPVAR extern __declspec(dllexport) @@ -139,7 +139,7 @@ #define H5_DLLCPPVAR extern #endif /* H5_DLLCPP */ -#if defined(hdf5_hl_EXPORTS) +#if defined(hdf5_hl_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_HLDLL __declspec(dllexport) #define H5_HLDLLVAR extern __declspec(dllexport) @@ -162,7 +162,7 @@ #define H5_HLDLLVAR extern #endif /* H5_HLDLL */ -#if defined(hdf5_hl_cpp_EXPORTS) +#if defined(hdf5_hl_cpp_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_HLCPPDLL __declspec(dllexport) #define H5_HLCPPDLLVAR extern __declspec(dllexport) @@ -185,7 +185,7 @@ #define H5_HLCPPDLLVAR extern #endif /* H5_HLCPPDLL */ -#if defined(hdf5_f90cstub_EXPORTS) +#if defined(hdf5_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_FCDLL __declspec(dllexport) #define H5_FCDLLVAR extern __declspec(dllexport) @@ -208,7 +208,7 @@ #define H5_FCDLLVAR extern #endif /* H5_FCDLL */ -#if defined(hdf5_test_f90cstub_EXPORTS) +#if defined(hdf5_test_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_FCTESTDLL __declspec(dllexport) #define H5_FCTESTDLLVAR extern __declspec(dllexport) @@ -231,7 +231,7 @@ #define H5_FCTESTDLLVAR extern #endif /* H5_FCTESTDLL */ -#if defined(hdf5_hl_f90cstub_EXPORTS) +#if defined(hdf5_hl_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define HDF5_HL_F90CSTUBDLL __declspec(dllexport) #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 651e4eb..c94b880 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,8 +26,8 @@ set (TEST_LIB_HEADERS ${HDF5_TEST_SOURCE_DIR}/h5test.h ) -add_library (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") if (MSVC) target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") endif (MSVC) @@ -35,16 +35,34 @@ if (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib") endif (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") + if (MSVC) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib") + endif (MSVC) + if (MINGW) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib") + endif (MINGW) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED) + set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) +endif (BUILD_SHARED_LIBS) + #----------------------------------------------------------------------------- # If plugin library tests can be tested #----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") @@ -67,12 +85,12 @@ if (BUILD_SHARED_LIBS) add_definitions (${HDF_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ") + add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} - ${LIB_TYPE} + SHARED HDF5_TEST_PLUGIN_LIB_NAME_RELEASE HDF5_TEST_PLUGIN_LIB_NAME_DEBUG ) @@ -85,7 +103,7 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/testdir1/$" ) @@ -98,12 +116,12 @@ if (BUILD_SHARED_LIBS) add_definitions (${HDF_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ") + add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} - ${LIB_TYPE} + SHARED HDF5_TEST_PLUGIN_LIB_NAME_RELEASE HDF5_TEST_PLUGIN_LIB_NAME_DEBUG ) @@ -116,12 +134,11 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/testdir2/$" ) endforeach (test_lib ${TEST2_PLUGIN_LIBS}) -endif (BUILD_SHARED_LIBS) set (testhdf5_SRCS ${HDF5_TEST_SOURCE_DIR}/testhdf5.c @@ -153,17 +170,31 @@ set (testhdf5_SRCS #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SRCS}) -TARGET_NAMING (testhdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5 STATIC) +TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5-shared ${testhdf5_SRCS}) + TARGET_NAMING (testhdf5-shared SHARED) + TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") + target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (testhdf5-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) MACRO (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ") + TARGET_NAMING (${file} STATIC) + TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_NAMING (${file}-shared SHARED) + TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") + target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (${file}-shared PROPERTIES FOLDER test) + endif (BUILD_SHARED_LIBS) ENDMACRO (ADD_H5_EXE file) set (H5_TESTS @@ -236,24 +267,45 @@ endforeach (test ${H5_TESTS}) #-- Adding test for cache add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache ${LIB_TYPE} " " " ") +TARGET_NAMING (cache STATIC) +TARGET_C_PROPERTIES (cache STATIC " " " ") target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache-shared ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache-shared SHARED) + TARGET_C_PROPERTIES (cache-shared SHARED " " " ") + target_link_libraries (cache-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for cache_api add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_api ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_api ${LIB_TYPE} " " " ") +TARGET_NAMING (cache_api STATIC) +TARGET_C_PROPERTIES (cache_api STATIC " " " ") target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_api PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache_api-shared ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache_api-shared SHARED) + TARGET_C_PROPERTIES (cache_api-shared SHARED " " " ") + target_link_libraries (cache_api-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache_api-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for cache_tagging add_executable (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_tagging ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_tagging ${LIB_TYPE} " " " ") +TARGET_NAMING (cache_tagging STATIC) +TARGET_C_PROPERTIES (cache_tagging STATIC " " " ") target_link_libraries (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_tagging PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache_tagging-shared ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache_tagging-shared SHARED) + TARGET_C_PROPERTIES (cache_tagging-shared SHARED " " " ") + target_link_libraries (cache_tagging-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache_tagging-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for ttsafe add_executable (ttsafe @@ -263,37 +315,71 @@ add_executable (ttsafe ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) -TARGET_NAMING (ttsafe ${LIB_TYPE}) -TARGET_C_PROPERTIES (ttsafe ${LIB_TYPE} " " " ") +TARGET_NAMING (ttsafe STATIC) +TARGET_C_PROPERTIES (ttsafe STATIC " " " ") target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (ttsafe-shared + ${HDF5_TEST_SOURCE_DIR}/ttsafe.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c + ) + TARGET_NAMING (ttsafe-shared SHARED) + TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") + target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (ttsafe-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat ${LIB_TYPE}) - TARGET_C_PROPERTIES (err_compat ${LIB_TYPE} " " " ") + TARGET_NAMING (err_compat STATIC) + TARGET_C_PROPERTIES (err_compat STATIC " " " ") target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (err_compat PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (err_compat-shared ${HDF5_TEST_SOURCE_DIR}/err_compat.c) + TARGET_NAMING (err_compat-shared SHARED) + TARGET_C_PROPERTIES (err_compat-shared SHARED " " " ") + target_link_libraries (err_compat-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (err_compat-shared PROPERTIES FOLDER test) + endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) #-- Adding test for error_test add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) -TARGET_NAMING (error_test ${LIB_TYPE}) -TARGET_C_PROPERTIES (error_test ${LIB_TYPE} " " " ") +TARGET_NAMING (error_test STATIC) +TARGET_C_PROPERTIES (error_test STATIC " " " ") target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (error_test PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (error_test-shared ${HDF5_TEST_SOURCE_DIR}/error_test.c) + TARGET_NAMING (error_test-shared SHARED) + TARGET_C_PROPERTIES (error_test-shared SHARED " " " ") + target_link_libraries (error_test-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (error_test-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for links_env add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) -TARGET_NAMING (links_env ${LIB_TYPE}) -TARGET_C_PROPERTIES (links_env ${LIB_TYPE} " " " ") +TARGET_NAMING (links_env STATIC) +TARGET_C_PROPERTIES (links_env STATIC " " " ") target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (links_env PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (links_env-shared ${HDF5_TEST_SOURCE_DIR}/links_env.c) + TARGET_NAMING (links_env-shared SHARED) + TARGET_C_PROPERTIES (links_env-shared SHARED " " " ") + target_link_libraries (links_env-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (links_env-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -file (WRITE ${GREP_RUNNER} +file (WRITE ${GREP_RUNNER} "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") if (\${TEST_RESULT} STREQUAL \"0\") message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") @@ -312,6 +398,12 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (plugin SHARED " " " ") target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) set_target_properties (plugin PROPERTIES FOLDER test) +else (BUILD_SHARED_LIBS) + add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) + TARGET_NAMING (plugin STATIC) + TARGET_C_PROPERTIES (plugin STATIC " " " ") + target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) + set_target_properties (plugin PROPERTIES FOLDER test) endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index c7803f6..03ce5e3 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -9,6 +9,12 @@ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files") +if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files") +endif (BUILD_SHARED_LIBS) + if (HDF5_TEST_VFD) set (VFD_LIST sec2 @@ -23,6 +29,9 @@ if (HDF5_TEST_VFD) endif (DIRECT_VFD) foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + #if (BUILD_SHARED_LIBS) + # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + #endif (BUILD_SHARED_LIBS) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -35,25 +44,41 @@ set (HDF5_TEST_FILES foreach (h5_tfile ${HDF5_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}") - #message (STATUS " Copying ${h5_tfile}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_tfile ${HDF5_TEST_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (h5_tfile ${HDF5_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}") - #message (STATUS " Copying ${h5_tfile}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_tfile ${HDF5_TEST_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -71,25 +96,41 @@ set (HDF5_REFERENCE_FILES foreach (ref_file ${HDF5_REFERENCE_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}") - #message (STATUS " Copying ${h5_file}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (ref_file ${HDF5_REFERENCE_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (ref_file ${HDF5_REFERENCE_FILES}) set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}") - #message (STATUS " Copying ${h5_file}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (ref_file ${HDF5_REFERENCE_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -126,13 +167,21 @@ set (HDF5_REFERENCE_PLIST_FILES foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}") - #message (STATUS " Copying ${plistfile} to ${dset}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files/${plistfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) # -------------------------------------------------------------------- @@ -177,25 +226,41 @@ set (HDF5_REFERENCE_TEST_FILES foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}") - #message (STATUS " Copying ${h5_file} to ${dest}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}") - #message (STATUS " Copying ${h5_file} to ${dest}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -204,7 +269,7 @@ endif (HDF5_TEST_VFD) add_test ( NAME H5TEST-clear-testhdf5-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove coord.h5 dtypes10.h5 sys_file1 @@ -258,8 +323,40 @@ else (HDF5_ENABLE_USING_MEMCHECKER) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME H5TEST-shared-clear-testhdf5-objects + COMMAND ${CMAKE_COMMAND} + -E remove + coord.h5 + dtypes10.h5 + sys_file1 + tattr.h5 + tfile1.h5 + tfile2.h5 + tfile3.h5 + tfile4.h5 + tfile5.h5 + tfile6.h5 + tfile7.h5 + th5o_file + th5s1.h5 + tselect.h5 + tsohm.h5 + tsohm_dst.h5 + tsohm_src.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-testhdf5 COMMAND $) + set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES + DEPENDS H5TEST-shared-clear-testhdf5-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_USING_MEMCHECKER) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -270,7 +367,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5TEST-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove dt_arith1.h5 dt_arith2.h5 dtransform.h5 @@ -344,7 +441,7 @@ foreach (test ${H5_TESTS}) add_test (NAME H5TEST-${test} COMMAND $) endif (${test} STREQUAL "big" AND CYGWIN) set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects + DEPENDS H5TEST-clear-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -355,6 +452,97 @@ set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) +if (BUILD_SHARED_LIBS) + # Remove any output file left over from previous test run + add_test ( + NAME H5TEST-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dt_arith1.h5 + dt_arith2.h5 + dtransform.h5 + dtypes3.h5 + dtypes4.h5 + dtypes5.h5 + efc0.h5 + efc1.h5 + efc2.h5 + efc3.h5 + efc4.h5 + efc5.h5 + extlinks16A00000.h5 + extlinks16A00001.h5 + extlinks16A00002.h5 + extlinks16B-b.h5 + extlinks16B-g.h5 + extlinks16B-l.h5 + extlinks16B-r.h5 + extlinks16B-s.h5 + extlinks19B00000.h5 + extlinks19B00001.h5 + extlinks19B00002.h5 + extlinks19B00003.h5 + extlinks19B00004.h5 + extlinks19B00005.h5 + extlinks19B00006.h5 + extlinks19B00007.h5 + extlinks19B00008.h5 + extlinks19B00009.h5 + extlinks19B00010.h5 + extlinks19B00011.h5 + extlinks19B00012.h5 + extlinks19B00013.h5 + extlinks19B00014.h5 + extlinks19B00015.h5 + extlinks19B00016.h5 + extlinks19B00017.h5 + extlinks19B00018.h5 + extlinks19B00019.h5 + extlinks19B00020.h5 + extlinks19B00021.h5 + extlinks19B00022.h5 + extlinks19B00023.h5 + extlinks19B00024.h5 + extlinks19B00025.h5 + extlinks19B00026.h5 + extlinks19B00027.h5 + extlinks19B00028.h5 + fheap.h5 + log_vfd_out.log + new_multi_file_v16-r.h5 + new_multi_file_v16-s.h5 + objcopy_ext.dat + testmeta.h5 + tstint1.h5 + tstint2.h5 + unregister_filter_1.h5 + unregister_filter_2.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + foreach (test ${H5_TESTS}) + if (${test} STREQUAL "big" AND CYGWIN) + add_test ( + NAME H5TEST-shared-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" + ) + else (${test} STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-shared-${test} COMMAND $) + endif (${test} STREQUAL "big" AND CYGWIN) + set_tests_properties (H5TEST-shared-${test} PROPERTIES + DEPENDS H5TEST-shared-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endforeach (test ${H5_TESTS}) + + set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1) + set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-testmeta PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800) +endif (BUILD_SHARED_LIBS) + ############################################################################## ############################################################################## ### A D D I T I O N A L T E S T S ### @@ -362,33 +550,35 @@ set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) ############################################################################## #-- Adding test for cache -add_test ( - NAME H5TEST-clear-cache-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -add_test (NAME H5TEST-cache COMMAND $) -set_tests_properties (H5TEST-cache PROPERTIES - DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) +if (NOT CYGWIN) + add_test ( + NAME H5TEST-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + add_test (NAME H5TEST-cache COMMAND $) + set_tests_properties (H5TEST-cache PROPERTIES + DEPENDS H5TEST-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) +endif (NOT CYGWIN) #-- Adding test for cache_api add_test ( NAME H5TEST-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_api_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-cache_api COMMAND $) set_tests_properties (H5TEST-cache_api PROPERTIES - DEPENDS H5TEST-clear-cache_api-objects + DEPENDS H5TEST-clear-cache_api-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -397,7 +587,7 @@ set_tests_properties (H5TEST-cache_api PROPERTIES add_test ( NAME H5TEST-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tagging_test.h5 tagging_ext_test.h5 WORKING_DIRECTORY @@ -414,7 +604,7 @@ set_tests_properties (H5TEST-cache_tagging PROPERTIES add_test ( NAME H5TEST-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ttsafe_error.h5 ttsafe_dcreate.h5 ttsafe_cancel.h5 @@ -434,7 +624,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove err_compat.txt err_compat.txt.err WORKING_DIRECTORY @@ -461,7 +651,7 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-error_test-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove error_test.txt error_test.txt.err WORKING_DIRECTORY @@ -477,7 +667,7 @@ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) -set_tests_properties (H5TEST-error_test PROPERTIES +set_tests_properties (H5TEST-error_test PROPERTIES DEPENDS H5TEST-clear-error_test-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -489,7 +679,7 @@ add_test ( COMMAND ${CMAKE_COMMAND} -E remove links_env.txt - links_env.txt.err + links_env.txt.err extlinks_env0.h5 extlinks_env1.h5 tmp/extlinks_env1.h5 @@ -521,31 +711,186 @@ add_test ( ${HDF5_TEST_BINARY_DIR}/H5TEST ) -############################################################################## -### P L U G I N T E S T S -############################################################################## if (BUILD_SHARED_LIBS) + #-- Adding test for cache + if (NOT CYGWIN) + add_test ( + NAME H5TEST-shared-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache COMMAND $) + set_tests_properties (H5TEST-shared-cache PROPERTIES + DEPENDS H5TEST-shared-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (NOT CYGWIN) + + #-- Adding test for cache_api + add_test ( + NAME H5TEST-shared-clear-cache_api-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_api_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache_api COMMAND $) + set_tests_properties (H5TEST-shared-cache_api PROPERTIES + DEPENDS H5TEST-shared-clear-cache_api-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) - if (WIN32) - set (CMAKE_SEP "\;") - else (WIN32) - set (CMAKE_SEP ":") - endif (WIN32) + #-- Adding test for cache_tagging + add_test ( + NAME H5TEST-shared-clear-cache_tagging-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tagging_test.h5 + tagging_ext_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache_tagging COMMAND $) + set_tests_properties (H5TEST-shared-cache_tagging PROPERTIES + DEPENDS H5TEST-shared-clear-cache_tagging-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) - add_test (NAME H5PLUGIN-plugin COMMAND $) - set_tests_properties (H5PLUGIN-plugin PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} + #-- Adding test for ttsafe + add_test ( + NAME H5TEST-shared-clear-ttsafe-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ttsafe_error.h5 + ttsafe_dcreate.h5 + ttsafe_cancel.h5 + ttsafe_acreate.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-ttsafe COMMAND $) + set_tests_properties (H5TEST-shared-ttsafe PROPERTIES + DEPENDS H5TEST-shared-clear-ttsafe-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) -else (BUILD_SHARED_LIBS) - message (STATUS " **** Plugins libraries must be built as shared libraries **** ") + + #-- Adding test for err_compat + if (HDF5_ENABLE_DEPRECATED_SYMBOLS) + add_test ( + NAME H5TEST-shared-clear-err_compat-objects + COMMAND ${CMAKE_COMMAND} + -E remove + err_compat.txt + err_compat.txt.err + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-err_compat COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=err_compat.txt" + -D "TEST_REFERENCE=err_compat_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-err_compat PROPERTIES + DEPENDS H5TEST-shared-clear-err_compat-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) + + #-- Adding test for error_test add_test ( - NAME H5PLUGIN-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" + NAME H5TEST-shared-clear-error_test-objects + COMMAND ${CMAKE_COMMAND} + -E remove + error_test.txt + error_test.txt.err + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=error_test.txt" + -D "TEST_REFERENCE=error_test_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-error_test PROPERTIES + DEPENDS H5TEST-shared-clear-error_test-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + #-- Adding test for links_env + add_test ( + NAME H5TEST-shared-clear-links_env-objects + COMMAND ${CMAKE_COMMAND} + -E remove + links_env.txt + links_env.txt.err + extlinks_env0.h5 + extlinks_env1.h5 + tmp/extlinks_env1.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX" + -D "TEST_ENV_VALUE:STRING=.:tmp" + -D "TEST_EXPECT=0" + -D "TEST_OUTPUT=links_env.txt" + -D "TEST_REFERENCE=links_env.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-links_env PROPERTIES + DEPENDS H5TEST-shared-clear-links_env-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + #-- Adding test for libinfo + add_test ( + NAME H5TEST-shared-testlibinfo + COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$" -P "${GREP_RUNNER}" + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) endif (BUILD_SHARED_LIBS) ############################################################################## +### P L U G I N T E S T S +############################################################################## +if (WIN32) + set (CMAKE_SEP "\;") +else (WIN32) + set (CMAKE_SEP ":") +endif (WIN32) + +add_test (NAME H5PLUGIN-plugin COMMAND $) +set_tests_properties (H5PLUGIN-plugin PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +) + +############################################################################## ############################################################################## ### V F D T E S T S ### ############################################################################## @@ -560,7 +905,7 @@ if (HDF5_TEST_VFD) ohdr stab gheap - cache +# cache cache_api cache_tagging pool @@ -609,7 +954,7 @@ if (HDF5_TEST_VFD) unregister ) if (NOT CYGWIN) - set (H5_VFD_TESTS ${H5_VFD_TESTS} big) + set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache) endif (NOT CYGWIN) MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) @@ -617,13 +962,13 @@ if (HDF5_TEST_VFD) if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -631,21 +976,44 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME VFD-${vfdname}-${vfdtest} COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" + ) + endif (BUILD_SHARED_LIBS) endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -653,16 +1021,33 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -670,6 +1055,23 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) @@ -679,45 +1081,85 @@ if (HDF5_TEST_VFD) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else (WIN32) add_test ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${test} PROPERTIES ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (WIN32) endforeach (test ${H5_VFD_TESTS}) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + endif (BUILD_SHARED_LIBS) if (HDF5_TEST_FHEAP_VFD) add_test ( - NAME VFD-${vfdname}-fheap - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-fheap PROPERTIES TIMEOUT 1800 ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-fheap-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (HDF5_TEST_FHEAP_VFD) ENDMACRO (ADD_VFD_TEST) - + # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) ADD_VFD_TEST (${vfd} 0) @@ -731,7 +1173,7 @@ endif (HDF5_TEST_VFD) ############################################################################## ############################################################################## -if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +if (HDF5_BUILD_GENERATORS) MACRO (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) TARGET_NAMING (${genfile} STATIC) @@ -767,4 +1209,4 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_H5_GENERATOR (${gen}) endforeach (gen ${H5_GENERATORS}) -endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +endif (HDF5_BUILD_GENERATORS) diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index b02c8e2..634afe3 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -28,15 +28,15 @@ set (testphdf5_SRCS #-- Adding test for testhdf5 add_executable (testphdf5 ${testphdf5_SRCS}) -TARGET_NAMING (testphdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (testphdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (testphdf5 STATIC) +TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ") + TARGET_NAMING (${file} STATIC) + TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index c18b1f9..63b9b5d 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -10,15 +10,15 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5copy and test executables # -------------------------------------------------------------------- add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) -TARGET_NAMING (h5copy ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5copy ${LIB_TYPE} " " " ") +TARGET_NAMING (h5copy STATIC) +TARGET_C_PROPERTIES (h5copy STATIC " " " ") target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) set (H5_DEP_EXECUTABLES h5copy) if (BUILD_TESTING) - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) TARGET_NAMING (h5copygentest STATIC) TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") @@ -26,7 +26,7 @@ if (BUILD_TESTING) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5copygentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) @@ -42,7 +42,7 @@ endif (BUILD_TESTING) #----------------------------------------------------------------------------- #INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications) - + install ( TARGETS h5copy diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 0a5c813..59a3241 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -13,8 +13,8 @@ add_executable (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) -TARGET_NAMING (h5diff ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5diff ${LIB_TYPE} " " " ") +TARGET_NAMING (h5diff STATIC) +TARGET_C_PROPERTIES (h5diff STATIC " " " ") target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) @@ -25,8 +25,8 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) - TARGET_NAMING (ph5diff ${LIB_TYPE}) - TARGET_C_PROPERTIES (ph5diff ${LIB_TYPE} " " " ") + TARGET_NAMING (ph5diff STATIC) + TARGET_C_PROPERTIES (ph5diff STATIC " " " ") target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) endif (H5_HAVE_PARALLEL) @@ -35,18 +35,18 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5diff and test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c) TARGET_NAMING (h5diffgentest STATIC) TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5diffgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 9d5db3f..47ba7a8 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -14,8 +14,8 @@ add_executable (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) -TARGET_NAMING (h5dump ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ") +TARGET_NAMING (h5dump STATIC) +TARGET_C_PROPERTIES (h5dump STATIC " " " ") target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) @@ -25,15 +25,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5dump test executable # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) TARGET_NAMING (h5dumpgentest STATIC) TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5dumpgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index ada3b07..b885a76 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) -TARGET_NAMING (h5import ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5import ${LIB_TYPE} " " " ") +TARGET_NAMING (h5import STATIC) +TARGET_C_PROPERTIES (h5import STATIC " " " ") target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) @@ -23,8 +23,8 @@ if (BUILD_TESTING) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) - TARGET_NAMING (h5importtest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5importtest ${LIB_TYPE} " " " ") + TARGET_NAMING (h5importtest STATIC) + TARGET_C_PROPERTIES (h5importtest STATIC " " " ") target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5importtest PROPERTIES FOLDER tools) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index ceb2eb9..c01f8f7 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -10,26 +10,26 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) -TARGET_NAMING (h5jam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5jam ${LIB_TYPE} " " " ") +TARGET_NAMING (h5jam STATIC) +TARGET_C_PROPERTIES (h5jam STATIC " " " ") target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c) -TARGET_NAMING (getub ${LIB_TYPE}) -TARGET_C_PROPERTIES (getub ${LIB_TYPE} " " " ") +TARGET_NAMING (getub STATIC) +TARGET_C_PROPERTIES (getub STATIC " " " ") target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c) -TARGET_NAMING (tellub ${LIB_TYPE}) -TARGET_C_PROPERTIES (tellub ${LIB_TYPE} " " " ") +TARGET_NAMING (tellub STATIC) +TARGET_C_PROPERTIES (tellub STATIC " " " ") target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c) -TARGET_NAMING (h5unjam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5unjam ${LIB_TYPE} " " " ") +TARGET_NAMING (h5unjam STATIC) +TARGET_C_PROPERTIES (h5unjam STATIC " " " ") target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) @@ -44,15 +44,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5jam test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c) - TARGET_NAMING (h5jamgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") + TARGET_NAMING (h5jamgentest STATIC) + TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5jamgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 116f735..4e96db2 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) -TARGET_NAMING (h5ls ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5ls ${LIB_TYPE} " " " ") +TARGET_NAMING (h5ls STATIC) +TARGET_C_PROPERTIES (h5ls STATIC " " " ") target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 3b31078..7631ae8 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -21,8 +21,8 @@ set (REPACK_COMMON_SRCS ) add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) -TARGET_NAMING (h5repack ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repack ${LIB_TYPE} " " " ") +TARGET_NAMING (h5repack STATIC) +TARGET_C_PROPERTIES (h5repack STATIC " " " ") target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) @@ -33,54 +33,52 @@ if (BUILD_TESTING) # Add h5Repack test executables # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) - TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE}) - TARGET_C_PROPERTIES (testh5repack_detect_szip ${LIB_TYPE} " " " ") + TARGET_NAMING (testh5repack_detect_szip STATIC) + TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ") target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) - TARGET_NAMING (h5repacktest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repacktest ${LIB_TYPE} " " " ") + TARGET_NAMING (h5repacktest STATIC) + TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) #----------------------------------------------------------------------------- # If plugin library tests can be tested #----------------------------------------------------------------------------- - if (BUILD_SHARED_LIBS) - set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") - set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) + set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") + set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") + set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) + add_definitions (${HDF_EXTRA_C_FLAGS}) + INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS ( - ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} - SHARED - HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE - HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG - ) + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + H5_SET_LIB_OPTIONS ( + ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} + SHARED + HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE + HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG + ) - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + # make plugins dir + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + #----------------------------------------------------------------------------- + # Copy plugin library to a plugins folder + #----------------------------------------------------------------------------- + add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" - ) - endif (BUILD_SHARED_LIBS) + ) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index efaa6e5..dee97ed 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -992,16 +992,8 @@ ############################################################################## ### P L U G I N T E S T S ############################################################################## -if (BUILD_SHARED_LIBS) ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) -else (BUILD_SHARED_LIBS) - message (STATUS " **** Plugins libraries must be built as shared libraries **** ") - add_test ( - NAME H5REPACK-plugin - COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" - ) -endif (BUILD_SHARED_LIBS) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 66c8c7e..71c4741 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_NAMING (h5stat ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5stat ${LIB_TYPE} " " " ") +TARGET_NAMING (h5stat STATIC) +TARGET_C_PROPERTIES (h5stat STATIC " " " ") target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) @@ -21,15 +21,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5stat test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c) TARGET_NAMING (h5stat_gentest STATIC) TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5stat_gentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index a103f3d..38c84a2 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -37,21 +37,43 @@ set (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) -TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) +TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS ( ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} - ${LIB_TYPE} + STATIC HDF5_TOOLS_LIB_NAME_RELEASE HDF5_TOOLS_LIB_NAME_DEBUG ) -#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG) -set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES +set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +#set_property (TARGET ${HDF5_TOOLS_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) +set (install_targets ${HDF5_TOOLS_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) + TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS ( + ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} + SHARED + HDF5_TOOLS_LIB_NAME_RELEASE + HDF5_TOOLS_LIB_NAME_DEBUG + ) + set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES + FOLDER libraries/tools + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + #set_property (TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) + set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) ############################################################################## ############################################################################## @@ -76,12 +98,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries) + INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_TOOLS_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 0bab2e6..d53cdc8 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -11,20 +11,20 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) -TARGET_NAMING (h5debug ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5debug ${LIB_TYPE} " " " ") +TARGET_NAMING (h5debug STATIC) +TARGET_C_PROPERTIES (h5debug STATIC " " " ") target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) -TARGET_NAMING (h5repart ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repart ${LIB_TYPE} " " " ") +TARGET_NAMING (h5repart STATIC) +TARGET_C_PROPERTIES (h5repart STATIC " " " ") target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) -TARGET_NAMING (h5mkgrp ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5mkgrp ${LIB_TYPE} " " " ") +TARGET_NAMING (h5mkgrp STATIC) +TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ") target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) @@ -45,18 +45,18 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the misc test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c) TARGET_NAMING (h5repart_gentest STATIC) TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) - TARGET_NAMING (h5repart_test ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repart_test ${LIB_TYPE} " " " ") + TARGET_NAMING (h5repart_test STATIC) + TARGET_C_PROPERTIES (h5repart_test STATIC " " " ") target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index 17b40fa..3a60a84 100644 --- a/tools/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -21,8 +21,8 @@ set (h5perf_serial_SRCS ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial ${h5perf_serial_SRCS}) -TARGET_NAMING (h5perf_serial ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5perf_serial ${LIB_TYPE} " " " ") +TARGET_NAMING (h5perf_serial STATIC) +TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) @@ -33,8 +33,8 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS}) - TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_serial_alone ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf_serial_alone STATIC) + TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_serial_alone @@ -47,8 +47,8 @@ set (chunk_SRCS ${HDF5_PERFORM_SOURCE_DIR}/chunk.c ) ADD_EXECUTABLE(chunk ${chunk_SRCS}) -TARGET_NAMING (chunk ${LIB_TYPE}) -TARGET_C_PROPERTIES (chunk ${LIB_TYPE} " " " ") +TARGET_NAMING (chunk STATIC) +TARGET_C_PROPERTIES (chunk STATIC " " " ") TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) @@ -57,8 +57,8 @@ set (iopipe_SRCS ${HDF5_PERFORM_SOURCE_DIR}/iopipe.c ) add_executable (iopipe ${iopipe_SRCS}) -TARGET_NAMING (iopipe ${LIB_TYPE}) -TARGET_C_PROPERTIES (iopipe ${LIB_TYPE} " " " ") +TARGET_NAMING (iopipe STATIC) +TARGET_C_PROPERTIES (iopipe STATIC " " " ") target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) @@ -67,8 +67,8 @@ set (overhead_SRCS ${HDF5_PERFORM_SOURCE_DIR}/overhead.c ) add_executable (overhead ${overhead_SRCS}) -TARGET_NAMING (overhead ${LIB_TYPE}) -TARGET_C_PROPERTIES (overhead ${LIB_TYPE} " " " ") +TARGET_NAMING (overhead STATIC) +TARGET_C_PROPERTIES (overhead STATIC " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) @@ -78,8 +78,8 @@ if (BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c ) add_executable (perf_meta ${perf_meta_SRCS}) - TARGET_NAMING (perf_meta ${LIB_TYPE}) - TARGET_C_PROPERTIES (perf_meta ${LIB_TYPE} " " " ") + TARGET_NAMING (perf_meta STATIC) + TARGET_C_PROPERTIES (perf_meta STATIC " " " ") target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (perf_meta PROPERTIES FOLDER perform) endif (BUILD_TESTING) @@ -89,8 +89,8 @@ set (zip_perf_SRCS ${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c ) add_executable (zip_perf ${zip_perf_SRCS}) -TARGET_NAMING (zip_perf ${LIB_TYPE}) -TARGET_C_PROPERTIES (zip_perf ${LIB_TYPE} " " " ") +TARGET_NAMING (zip_perf STATIC) +TARGET_C_PROPERTIES (zip_perf STATIC " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) @@ -101,8 +101,8 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf ${h5perf_SRCS}) - TARGET_NAMING (h5perf ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf STATIC) + TARGET_C_PROPERTIES (h5perf STATIC " " " ") target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) @@ -113,8 +113,8 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SRCS}) - TARGET_NAMING (h5perf_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_alone ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf_alone STATIC) + TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_alone -- cgit v0.12 From 173829075cfb70044c28910f361ac0290e5425ac Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 5 Aug 2015 11:37:54 -0500 Subject: [svn-r27466] Add Trunk version --- config/cmake/HDF5_Examples.cmake.in | 126 ++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 config/cmake/HDF5_Examples.cmake.in diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in new file mode 100644 index 0000000..d0c0509 --- /dev/null +++ b/config/cmake/HDF5_Examples.cmake.in @@ -0,0 +1,126 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") +#set(NO_MAC_FORTRAN "true") +#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") +#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + if(NOT NO_MAC_FORTRAN) + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + else(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") + endif(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif(APPLE) + +#----------------------------------------------------------------------------- +set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +## -------------------------- +if(CTEST_USE_TAR_SOURCE) + ## Uncompress source if tar or zip file provided + ## -------------------------- + if(WIN32) + message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) + else(WIN32) + message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) + endif(WIN32) + + if(NOT rv EQUAL 0) + message(STATUS "extracting... [error-(${rv}) clean up]") + file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") + endif(NOT rv EQUAL 0) +endif(CTEST_USE_TAR_SOURCE) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) + +#----------------------------------------------------------------------------- +## -- set output to english +set($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- +configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) +ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") +## NORMAL process +## -------------------------- +ctest_start (Experimental) +ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) +ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) +if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") +endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## +message(STATUS "DONE") \ No newline at end of file -- cgit v0.12 From f0c47dd142be978e684742b8af9cacbf99d5b651 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 5 Aug 2015 12:08:17 -0500 Subject: [svn-r27467] Add trunk version of examples config file --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index 2d64bcd..e5c002f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2437,6 +2437,7 @@ ./config/cmake/UserMacros/Windows_MT.cmake # CMake-specific Examples Files +./config/cmake/HDF5_Examples.cmake.in ./config/cmake/HDF518_Examples.cmake.in ./release_docs/USING_CMake_Examples.txt -- cgit v0.12 From 1efa2d7395e954a736c67ef5cdff00444eab5a9c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 5 Aug 2015 14:32:33 -0500 Subject: [svn-r27468] Merge corrections found elsewhere --- CMakeLists.txt | 1 + config/cmake/README.txt.cmake.in | 8 ++++---- config/cmake/libhdf5.settings.cmake.in | 4 ++-- hl/fortran/src/CMakeLists.txt | 1 + hl/fortran/test/CMakeLists.txt | 2 +- hl/src/H5LT.c | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a552a0..fda7d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ endif () # # Add the sub project # add_subdirectory (Utilities/hdf5-1.8) #----------------------------------------------------------------------------- +string(TIMESTAMP CONFIG_DATE "%Y-%m-%d") #----------------------------------------------------------------------------- # Allow Visual Studio solution directories diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index cc8baeb..a12c5aa 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -26,18 +26,18 @@ After Installation =========================================================================== The examples folder, HDF5Examples, located in the HDF5 install folder, can be built and tested with CMake and the supplied -HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have +HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have been installed in the default location with above compilers. Also, the CMake utility should be installed. To test the installation with the examples; Create a directory to run the examples. Copy HDF5Examples folder to this directory. - Copy HDF518_Examples.cmake to this directory. - Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. + Copy HDF5_Examples.cmake to this directory. + Edit HDF5_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. (The default should be correct unless you installed into a different folder.) Execute from this directory: - ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -V -O test.log + ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log When executed, the ctest script will save the results to the log file, test.log, as indicated by the ctest command. If you wish the to see more build and test information, diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index e2124e1..8ef67a5 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -43,7 +43,7 @@ Languages: @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: YES C++: @HDF5_BUILD_CPP_LIB@ @BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @@ -51,7 +51,7 @@ Languages: @BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@ -@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@ +@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: YES Features: --------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 7503f72..2af665c 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -8,6 +8,7 @@ INCLUDE_DIRECTORIES ( ${HDF5_HL_SRC_DIR}/src ${HDF5_F90_SRC_DIR}/src ${HDF5_F90_BINARY_DIR} + ${CMAKE_Fortran_MODULE_DIRECTORY} ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 52397cb..4918e06 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #-- Adding test for hl_f90_tstds add_executable (hl_f90_tstds tstds.f90) diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 8541cfe..8444e27 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -3357,7 +3357,7 @@ herr_t H5LTget_attribute_long( hid_t loc_id, * * Date: June 17, 2005 * -* Comments: This funstion was added to suuport INTEGER*8 Fortran types +* Comments: This function was added to support INTEGER*8 Fortran types * * Modifications: * -- cgit v0.12 From 9e2434625dde11a19b46a5154477247266792219 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 5 Aug 2015 16:01:07 -0500 Subject: [svn-r27469] Merge from trunk with dual-binary CMake code. Tested: local linux with CMake --- CMakeFilters.cmake | 22 +- CMakeInstallation.cmake | 8 +- CMakeLists.txt | 58 +- MANIFEST | 1 + Makefile.in | 5 +- README.txt | 2 +- aclocal.m4 | 8592 +------------------------------- c++/CMakeLists.txt | 9 - c++/Makefile.in | 5 +- c++/examples/CMakeLists.txt | 8 +- c++/examples/Makefile.in | 5 +- c++/src/CMakeLists.txt | 33 +- c++/src/Makefile.in | 5 +- c++/test/CMakeLists.txt | 4 +- c++/test/Makefile.in | 5 +- config/cmake/ConfigureChecks.cmake | 33 +- config/cmake/ConversionTests.c | 82 + config/cmake/H5pubconf.h.in | 29 +- config/cmake/HDF5_Examples.cmake.in | 126 + config/cmake/README.txt.cmake.in | 8 +- config/cmake/cacheinit.cmake | 6 - config/cmake/hdf5-config.cmake.in | 51 +- config/cmake/libhdf5.settings.cmake.in | 4 +- configure | 240 +- configure.ac | 155 +- examples/CMakeLists.txt | 22 +- examples/CMakeTests.cmake | 67 + examples/Makefile.in | 5 +- fortran/Makefile.in | 5 +- fortran/examples/CMakeLists.txt | 62 +- fortran/examples/CMakeTests.cmake | 41 + fortran/examples/Makefile.in | 5 +- fortran/src/CMakeLists.txt | 106 +- fortran/src/Makefile.in | 5 +- fortran/test/CMakeLists.txt | 235 +- fortran/test/CMakeTests.cmake | 26 + fortran/test/Makefile.in | 5 +- fortran/testpar/CMakeLists.txt | 6 +- fortran/testpar/Makefile.in | 5 +- hl/CMakeLists.txt | 8 - hl/Makefile.in | 5 +- hl/c++/Makefile.in | 5 +- hl/c++/examples/CMakeLists.txt | 4 +- hl/c++/examples/Makefile.in | 5 +- hl/c++/src/CMakeLists.txt | 34 +- hl/c++/src/Makefile.in | 5 +- hl/c++/test/CMakeLists.txt | 4 +- hl/c++/test/Makefile.in | 5 +- hl/examples/CMakeLists.txt | 4 +- hl/examples/Makefile.in | 5 +- hl/fortran/Makefile.in | 5 +- hl/fortran/examples/CMakeLists.txt | 6 +- hl/fortran/examples/Makefile.in | 5 +- hl/fortran/src/CMakeLists.txt | 103 +- hl/fortran/src/Makefile.in | 5 +- hl/fortran/test/CMakeLists.txt | 72 +- hl/fortran/test/CMakeTests.cmake | 31 + hl/fortran/test/Makefile.in | 5 +- hl/src/CMakeLists.txt | 36 +- hl/src/Makefile.in | 5 +- hl/test/CMakeLists.txt | 20 +- hl/test/Makefile.in | 5 +- hl/tools/CMakeLists.txt | 14 +- hl/tools/Makefile.in | 5 +- hl/tools/gif2h5/Makefile.in | 5 +- release_docs/INSTALL_CMake.txt | 1 + release_docs/RELEASE.txt | 2 +- src/CMakeLists.txt | 39 +- src/H5.c | 3 + src/H5Edefin.h | 246 +- src/H5Einit.h | 796 +-- src/H5Epubgen.h | 438 +- src/H5Eterm.h | 248 +- src/H5Fcwfs.c | 8 +- src/H5HL.c | 10 +- src/H5MFaggr.c | 12 +- src/H5Oalloc.c | 8 +- src/H5T.c | 8 + src/H5Tconv.c | 8 + src/H5Tpkg.h | 33 + src/H5api_adpt.h | 18 +- src/H5config.h.in | 11 + src/H5public.h | 4 +- src/Makefile.in | 5 +- test/CMakeLists.txt | 156 +- test/CMakeTests.cmake | 598 ++- test/Makefile.in | 5 +- test/dt_arith.c | 56 + test/mf.c | 70 +- test/trefer.c | 6 +- testpar/CMakeLists.txt | 8 +- testpar/Makefile.in | 5 +- testpar/t_file_image.c | 3 + tools/Makefile.in | 5 +- tools/h5copy/CMakeLists.txt | 10 +- tools/h5copy/Makefile.in | 5 +- tools/h5diff/CMakeLists.txt | 16 +- tools/h5diff/Makefile.in | 5 +- tools/h5dump/CMakeLists.txt | 10 +- tools/h5dump/Makefile.in | 5 +- tools/h5import/CMakeLists.txt | 8 +- tools/h5import/Makefile.in | 5 +- tools/h5jam/CMakeLists.txt | 26 +- tools/h5jam/Makefile.in | 5 +- tools/h5ls/CMakeLists.txt | 4 +- tools/h5ls/Makefile.in | 5 +- tools/h5repack/CMakeLists.txt | 66 +- tools/h5repack/CMakeTests.cmake | 8 - tools/h5repack/Makefile.in | 5 +- tools/h5stat/CMakeLists.txt | 10 +- tools/h5stat/Makefile.in | 5 +- tools/lib/CMakeLists.txt | 36 +- tools/lib/Makefile.in | 5 +- tools/misc/CMakeLists.txt | 20 +- tools/misc/Makefile.in | 5 +- tools/perform/CMakeLists.txt | 36 +- tools/perform/Makefile.in | 5 +- 117 files changed, 3516 insertions(+), 10096 deletions(-) create mode 100644 config/cmake/HDF5_Examples.cmake.in diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 7050f87..c2b81dc 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -28,11 +28,12 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) if (HDF5_ENABLE_Z_LIB_SUPPORT) if (NOT H5_ZLIB_HEADER) if (NOT ZLIB_USE_EXTERNAL) - find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) if (NOT ZLIB_FOUND) find_package (ZLIB) # Legacy find if (ZLIB_FOUND) set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES}) endif (ZLIB_FOUND) endif (NOT ZLIB_FOUND) endif (NOT ZLIB_USE_EXTERNAL) @@ -45,7 +46,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) else (ZLIB_FOUND) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) + EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) @@ -63,7 +64,10 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) if (H5_HAVE_FILTER_DEFLATE) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") endif (H5_HAVE_FILTER_DEFLATE) - set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) + if (BUILD_SHARED_LIBS) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY}) + endif (BUILD_SHARED_LIBS) + set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) message (STATUS "Filter ZLIB is ON") endif (HDF5_ENABLE_Z_LIB_SUPPORT) @@ -75,11 +79,12 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) if (HDF5_ENABLE_SZIP_SUPPORT) option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) if (NOT SZIP_USE_EXTERNAL) - find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) if (NOT SZIP_FOUND) find_package (SZIP) # Legacy find if (SZIP_FOUND) set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES}) endif (SZIP_FOUND) endif (NOT SZIP_FOUND) endif (NOT SZIP_USE_EXTERNAL) @@ -88,10 +93,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) - set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR}) + set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) else (SZIP_FOUND) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING}) + EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) @@ -100,7 +105,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT) message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") endif (SZIP_FOUND) - set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) + if (BUILD_SHARED_LIBS) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY}) + endif (BUILD_SHARED_LIBS) + set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) message (STATUS "Filter SZIP is ON") if (H5_HAVE_FILTER_SZIP) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index c5db4ea..f87119e 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -167,11 +167,11 @@ install ( option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) if (HDF5_PACK_EXAMPLES) configure_file ( - ${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in - ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY + ${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in + ${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake + FILES ${HDF5_BINARY_DIR}/HDF5_Examples.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) @@ -180,7 +180,7 @@ if (HDF5_PACK_EXAMPLES) COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} ) install ( - DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples-0.1.1-Source + DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples DESTINATION ${HDF5_INSTALL_DATA_DIR} USE_SOURCE_PERMISSIONS COMPONENT hdfdocuments diff --git a/CMakeLists.txt b/CMakeLists.txt index a171ad3..799c1da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ endif () # # Add the sub project # add_subdirectory (Utilities/hdf5-1.8) #----------------------------------------------------------------------------- +string(TIMESTAMP CONFIG_DATE "%Y-%m-%d") #----------------------------------------------------------------------------- # Allow Visual Studio solution directories @@ -138,18 +139,30 @@ set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_ #----------------------------------------------------------------------------- # Set the target names of all the libraries #----------------------------------------------------------------------------- -set (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME}) -set (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME}) -set (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME}) -set (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME}) -set (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME}) -set (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME}) -set (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME}) -set (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME}) -set (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME}) -set (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME}) -set (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME}) -set (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME}) +set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static") +set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static") +set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static") +set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-static") +set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-static") +set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-static") +set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-static") +set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-static") +set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static") +set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static") +set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static") +set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static") +set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared") +set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared") +set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared") +set (HDF5_HL_LIBSH_TARGET "${HDF5_HL_LIB_CORENAME}-shared") +set (HDF5_HL_CPP_LIBSH_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared") +set (HDF5_TOOLS_LIBSH_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared") +set (HDF5_F90_LIBSH_TARGET "${HDF5_F90_LIB_CORENAME}-shared") +set (HDF5_F90_C_LIBSH_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared") +set (HDF5_F90_TEST_LIBSH_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared") +set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared") +set (HDF5_HL_F90_LIBSH_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared") +set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project @@ -308,20 +321,15 @@ if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Option to Build Shared/Static libs, default is static +# Option to Build Shared and Static libs, default is static #----------------------------------------------------------------------------- -option (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) -set (LIB_TYPE STATIC) +option (BUILD_SHARED_LIBS "Build Shared Libraries" ON) set (H5_ENABLE_SHARED_LIB NO) -set (H5_ENABLE_STATIC_LIB NO) if (BUILD_SHARED_LIBS) - set (LIB_TYPE SHARED) - set (H5_BUILT_AS_DYNAMIC_LIB 1) set (H5_ENABLE_SHARED_LIB YES) -else (BUILD_SHARED_LIBS) - set (H5_BUILT_AS_STATIC_LIB 1) - set (H5_ENABLE_STATIC_LIB YES) + set (LINK_SHARED_LIBS ${LINK_LIBS}) endif (BUILD_SHARED_LIBS) +set (H5_ENABLE_STATIC_LIB YES) set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- @@ -471,6 +479,7 @@ endif (HDF5_ENABLE_PARALLEL) # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES}) + set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_C_LIBRARIES}) if (MPI_C_LINK_FLAGS) set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif (MPI_C_LINK_FLAGS) @@ -571,9 +580,15 @@ add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB) + if (BUILD_SHARED_LIBS) + add_dependencies (${HDF5_LIBSH_TARGET} ZLIB) + endif (BUILD_SHARED_LIBS) endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) if (SZIP_FOUND AND SZIP_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP) + if (BUILD_SHARED_LIBS) + add_dependencies (${HDF5_LIBSH_TARGET} SZIP) + endif (BUILD_SHARED_LIBS) endif (SZIP_FOUND AND SZIP_USE_EXTERNAL) endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") @@ -707,7 +722,6 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++" # Check if Fortran's default real is double precision. If it is and HL is # being built then configure should fail due to bug HDFFV-889. #----------------------------------------------------------------------------- - if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB ) if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE) message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ") diff --git a/MANIFEST b/MANIFEST index 58a9137..3629e3c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2331,6 +2331,7 @@ ./config/cmake/UserMacros/Windows_MT.cmake # CMake-specific Examples Files +./config/cmake/HDF5_Examples.cmake.in ./config/cmake/HDF518_Examples.cmake.in ./release_docs/USING_CMake_Examples.txt diff --git a/Makefile.in b/Makefile.in index ce0c833..5ee275f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -122,7 +122,10 @@ DIST_COMMON = $(top_srcdir)/config/commence.am $(srcdir)/Makefile.in \ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/README.txt b/README.txt index 068b1e0..3ae4df3 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.226 currently under development +HDF5 version 1.9.227 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/aclocal.m4 b/aclocal.m4 index e10c539..b4b5725 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1185,8590 +1185,8 @@ AC_SUBST([am__untar]) m4_include([m4/aclocal_cxx.m4]) m4_include([m4/aclocal_fc.m4]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 39280e8..6f288a0 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -7,15 +7,6 @@ PROJECT (HDF5_CPP) add_definitions (${HDF_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- -# Shared/Static Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_DYNAMIC_LIB 1) -else (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_STATIC_LIB 1) -endif (BUILD_SHARED_LIBS) - -#----------------------------------------------------------------------------- # Generate configure file #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in diff --git a/c++/Makefile.in b/c++/Makefile.in index 2315cc2..e3b7e89 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -102,7 +102,10 @@ TESTS = subdir = c++ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index ff375f3..cfcdd8d 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -34,16 +34,16 @@ set (tutr_examples foreach (example ${examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (cpp_ex_${example} STATIC) + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach (example ${examples}) foreach (example ${tutr_examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (cpp_ex_${example} STATIC) + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach (example ${tutr_examples}) diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 6b0f894..9de558c 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(TEST_SCRIPT) subdir = c++/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 44b912c..1ae5647 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -2,13 +2,6 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- -# Shared/Static Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (CPP_BUILT_AS_DYNAMIC_LIB 1) -endif (BUILD_SHARED_LIBS) - -#----------------------------------------------------------------------------- # Generate configure file #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in @@ -83,15 +76,31 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h ) -add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS}) -TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SRCS} ${CPP_HDRS}) +TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_CPP_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SRCS} ${CPP_HDRS}) + TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED) + set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES + FOLDER libraries/cpp + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -110,12 +119,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) + INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_CPP_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index c19c169..f9c3964 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -107,7 +107,10 @@ TESTS = subdir = c++/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index dcdf3a3..6f1d857 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -35,8 +35,8 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} ) -TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (cpp_testhdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (cpp_testhdf5 STATIC) +TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ") target_link_libraries (cpp_testhdf5 ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET} diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 0da1d86..6109c13 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -104,7 +104,10 @@ TESTS = $(am__EXEEXT_1) subdir = c++/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index df3a7bd..b9f18a9 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -33,6 +33,18 @@ endif (HDF5_METADATA_TRACE_FILE) MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE) # ---------------------------------------------------------------------- +# Decide whether the data accuracy has higher priority during data +# conversions. If not, some hard conversions will still be prefered even +# though the data may be wrong (for example, some compilers don't +# support denormalized floating values) to maximize speed. +# +option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) +if (HDF5_WANT_DATA_ACCURACY) + set (H5_WANT_DATA_ACCURACY 1) +endif (HDF5_WANT_DATA_ACCURACY) +MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) + +# ---------------------------------------------------------------------- # Decide whether the presence of user's exception handling functions is # checked and data conversion exceptions are returned. This is mainly # for the speed optimization of hard conversions. Soft conversions can @@ -231,6 +243,24 @@ H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts # H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm") # ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'long double' to '(unsigned) long long' values. (This flag should be set for +# all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +# of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +# start to go wrong on these two machines. Adjusting it higher to +# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +# values wildly wrong. This test detects this wrong behavior and disable the test. +# +H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# '(unsigned) long long' to 'long double' values. (This flag should be set for +# all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +# as big as they should be. +# +H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") +# ---------------------------------------------------------------------- # Check if pointer alignments are enforced # H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") @@ -249,6 +279,3 @@ set (FC ${CMAKE_Fortran_COMPILER}) foreach (LINK_LIB ${LINK_LIBS}) set (LIBS "${LIBS} -l${LINK_LIB}") endforeach (LINK_LIB ${LINK_LIBS}) - - - diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index cd2e8bb..d964bf8 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -116,6 +116,88 @@ done: #endif +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST +int main(void) +{ + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } +done: + exit(ret); +} +#endif + +#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST +int main(void) +{ + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } +done: + exit(ret); +} +#endif + #ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST #include diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index f0d3031..37bcfbf 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -15,24 +15,6 @@ /* Define if using a Windows compiler (i.e. Visual Studio) */ #cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@ -/* Defined if HDF5 was built with CMake AND build as a shared library */ -#cmakedefine H5_BUILT_AS_DYNAMIC_LIB @H5_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 was built with CMake AND build as a static library */ -#cmakedefine H5_BUILT_AS_STATIC_LIB @H5_BUILT_AS_STATIC_LIB@ - -/* Defined if HDF5 CPP was built with CMake AND build as a shared library */ -#cmakedefine H5_CPP_BUILT_AS_DYNAMIC_LIB @H5_CPP_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 CPP was built with CMake AND build as a static library */ -#cmakedefine H5_CPP_BUILT_AS_STATIC_LIB @H5_CPP_BUILT_AS_STATIC_LIB@ - -/* Defined if HDF5 HL was built with CMake AND build as a shared library */ -#cmakedefine H5_HL_BUILT_AS_DYNAMIC_LIB @H5_HL_BUILT_AS_DYNAMIC_LIB@ - -/* Defined if HDF5 HL was built with CMake AND build as a static library */ -#cmakedefine H5_HL_BUILT_AS_STATIC_LIB @H5_HL_BUILT_AS_STATIC_LIB@ - /* Define if building universal (internal helper macro) */ #cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ @@ -410,10 +392,18 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ +/* Define if your system can convert long double to (unsigned) long long + values correctly. */ +#cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@ + /* Define if your system converts long double to (unsigned) long values with special algorithm. */ #cmakedefine H5_LDOUBLE_TO_LONG_SPECIAL @H5_LDOUBLE_TO_LONG_SPECIAL@ +/* Define if your system can convert (unsigned) long long to long double + values correctly. */ +#cmakedefine H5_LLONG_TO_LDOUBLE_CORRECT @H5_LLONG_TO_LDOUBLE_CORRECT@ + /* Define if your system can convert (unsigned) long to long double values with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ @@ -618,6 +608,9 @@ /* Version number of package */ #define H5_VERSION "@HDF5_PACKAGE_VERSION_STRING@" +/* Data accuracy is prefered to speed during data conversions */ +#cmakedefine H5_WANT_DATA_ACCURACY @H5_WANT_DATA_ACCURACY@ + /* Check exception handling functions during data conversions */ #cmakedefine H5_WANT_DCONV_EXCEPTION @H5_WANT_DCONV_EXCEPTION@ diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in new file mode 100644 index 0000000..d0c0509 --- /dev/null +++ b/config/cmake/HDF5_Examples.cmake.in @@ -0,0 +1,126 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") +#set(NO_MAC_FORTRAN "true") +#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") +#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + if(NOT NO_MAC_FORTRAN) + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + else(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") + endif(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif(APPLE) + +#----------------------------------------------------------------------------- +set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +## -------------------------- +if(CTEST_USE_TAR_SOURCE) + ## Uncompress source if tar or zip file provided + ## -------------------------- + if(WIN32) + message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) + else(WIN32) + message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) + endif(WIN32) + + if(NOT rv EQUAL 0) + message(STATUS "extracting... [error-(${rv}) clean up]") + file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") + endif(NOT rv EQUAL 0) +endif(CTEST_USE_TAR_SOURCE) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) + +#----------------------------------------------------------------------------- +## -- set output to english +set($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- +configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) +ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") +## NORMAL process +## -------------------------- +ctest_start (Experimental) +ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) +ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) +if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") +endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## +message(STATUS "DONE") \ No newline at end of file diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index cc8baeb..a12c5aa 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -26,18 +26,18 @@ After Installation =========================================================================== The examples folder, HDF5Examples, located in the HDF5 install folder, can be built and tested with CMake and the supplied -HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have +HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have been installed in the default location with above compilers. Also, the CMake utility should be installed. To test the installation with the examples; Create a directory to run the examples. Copy HDF5Examples folder to this directory. - Copy HDF518_Examples.cmake to this directory. - Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. + Copy HDF5_Examples.cmake to this directory. + Edit HDF5_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. (The default should be correct unless you installed into a different folder.) Execute from this directory: - ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -V -O test.log + ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log When executed, the ctest script will save the results to the log file, test.log, as indicated by the ctest command. If you wish the to see more build and test information, diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index f869949..cca6e98 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -4,18 +4,12 @@ # EXTERNAL cache entries ######################## -set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE) - -set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE) - set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) -set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE) - set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index dec59da..adeec55 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -6,6 +6,8 @@ string(TOUPPER @HDF5_PACKAGE@ HDF5_PACKAGE_NAME) set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS + static + shared C CXX Fortran @@ -67,12 +69,6 @@ if (${HDF5_PACKAGE_NAME}_BUILD_TOOLS) set_and_check (${HDF5_PACKAGE_NAME}_TOOLS_DIR "@PACKAGE_CURRENT_BUILD_DIR@/bin") endif () -if (HDF5_BUILD_SHARED_LIBS) - set (H5_BUILT_AS_DYNAMIC_LIB 1) -else () - set (H5_BUILT_AS_STATIC_LIB 1) -endif () - #----------------------------------------------------------------------------- # Version Strings #----------------------------------------------------------------------------- @@ -94,14 +90,25 @@ if (NOT TARGET "@HDF5_PACKAGE@") include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) endif () -# Handle default component : +# Handle default component(static) : if (NOT ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) - set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL) - set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_C true) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE) + set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL static) + set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_static_C true) endif () # Handle requested components: list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) +foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) + if (${comp} STREQUAL "shared") + list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + elseif (${comp} STREQUAL "static") + list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) + set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + endif () +endforeach () +foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) set (hdf5_comp2) if (${comp} STREQUAL "C") @@ -121,26 +128,28 @@ list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) set (hdf5_comp2 "hdf5_hl_f90cstub") set (hdf5_comp "hdf5_hl_fortran") endif () - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) if (${HAVE_COMP} LESS 0) - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () if (hdf5_comp2) - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}" HAVE_COMP2) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2) if (${HAVE_COMP2} LESS 0) - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1) - string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) - set (${HDF5_PACKAGE_NAME}_LIBRARIES ${${HDF5_PACKAGE_NAME}_LIBRARIES} ${hdf5_comp2} ${hdf5_comp}) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1) + string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp2}-${libtype} ${hdf5_comp}-${libtype}) endif () else () - set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1) - string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) - set (${HDF5_PACKAGE_NAME}_LIBRARIES ${${HDF5_PACKAGE_NAME}_LIBRARIES} ${hdf5_comp}) + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1) + string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp}-${libtype}) endif () endif () endforeach () +endforeach () - check_required_components(${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) - +foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) + check_required_components(${HDF5_PACKAGE_NAME}_${libtype}) +endforeach () diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 0544dba..ba764a4 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -42,7 +42,7 @@ Languages: @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: YES C++: @HDF5_BUILD_CPP_LIB@ @BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @@ -50,7 +50,7 @@ Languages: @BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@ @BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@ -@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@ +@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: YES Features: --------- diff --git a/configure b/configure index 3407d8e..062f968 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.226. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.227. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.226' -PACKAGE_STRING='HDF5 1.9.226' +PACKAGE_VERSION='1.9.227' +PACKAGE_STRING='HDF5 1.9.227' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -918,6 +918,7 @@ with_mpe enable_direct_vfd with_default_plugindir enable_dconv_exception +enable_dconv_accuracy enable_build_all enable_deprecated_symbols with_default_api_version @@ -1479,7 +1480,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.226 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.227 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1549,7 +1550,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.226:";; + short | recursive ) echo "Configuration of HDF5 1.9.227:";; esac cat <<\_ACEOF @@ -1613,6 +1614,8 @@ Optional Features: --enable-dconv-exception if exception handling functions is checked during data conversions [default=yes] + --enable-dconv-accuracy if data accuracy is guaranteed during data + conversions [default=yes] --enable-build-all Build helper programs that only developers should need [default=no] --enable-deprecated-symbols @@ -1736,7 +1739,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.226 +HDF5 configure 1.9.227 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2667,7 +2670,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.226, which was +It was created by HDF5 $as_me 1.9.227, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3592,7 +3595,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.226' + VERSION='1.9.227' cat >>confdefs.h <<_ACEOF @@ -12578,6 +12581,10 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -28256,6 +28263,33 @@ $as_echo "no" >&6; } fi ## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether data accuracy is guaranteed during data conversions" >&5 +$as_echo_n "checking whether data accuracy is guaranteed during data conversions... " >&6; } +# Check whether --enable-dconv-accuracy was given. +if test "${enable_dconv_accuracy+set}" = set; then : + enableval=$enable_dconv_accuracy; DATA_ACCURACY=$enableval +else + DATA_ACCURACY=yes +fi + + +if test "$DATA_ACCURACY" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WANT_DATA_ACCURACY 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where @@ -28519,6 +28553,190 @@ $as_echo "no" >&6; } fi ## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should +## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and +## Powerpc Linux using XL compilers. +## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., +## the values of (unsigned)long long start to go wrong on these +## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or +## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. +## This test detects this wrong behavior and disable the test. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to (unsigned) long long values" >&5 +$as_echo_n "checking if correctly converting long double to (unsigned) long long values... " >&6; } + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} +else + if ${hdf5_cv_ldouble_to_llong_accurate+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(void) + { + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + hdf5_cv_ldouble_to_llong_accurate=yes +else + hdf5_cv_ldouble_to_llong_accurate=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +fi + +if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then + +$as_echo "#define LDOUBLE_TO_LLONG_ACCURATE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be +## set for all machines, except for Mac OS 10.4 and Powerpc Linux using +## XL compilers. +## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the converted values are twice as big as they should be. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting (unsigned) long long to long double values" >&5 +$as_echo_n "checking if correctly converting (unsigned) long long to long double values... " >&6; } + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} +else + if ${hdf5_cv_llong_to_ldouble_correct+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(void) + { + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + hdf5_cv_llong_to_ldouble_correct=yes +else + hdf5_cv_llong_to_ldouble_correct=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +fi + +if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then + +$as_echo "#define LLONG_TO_LDOUBLE_CORRECT 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +## ---------------------------------------------------------------------- ## Set some variables for general configuration information to be saved ## and installed with the libraries (used to generate libhdf5.settings). ## @@ -29368,7 +29586,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.226 +HDF5 config.lt 1.9.227 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -31464,7 +31682,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.226, which was +This file was extended by HDF5 $as_me 1.9.227, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31530,7 +31748,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.226 +HDF5 config.status 1.9.227 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d8a2948..08bb371 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.226], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.227], [help@hdfgroup.org]) @@ -2374,6 +2374,27 @@ else fi ## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## +AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) +AC_ARG_ENABLE([dconv-accuracy], + [AS_HELP_STRING([--enable-dconv-accuracy], + [if data accuracy is guaranteed during + data conversions [default=yes]])], + [DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes]) + +if test "$DATA_ACCURACY" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([WANT_DATA_ACCURACY], [1], + [Data accuracy is prefered to speed during data conversions]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where @@ -2553,6 +2574,138 @@ else fi ## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should +## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and +## Powerpc Linux using XL compilers. +## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., +## the values of (unsigned)long long start to go wrong on these +## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or +## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. +## This test detects this wrong behavior and disable the test. +## +AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate], + [AC_TRY_RUN([ + int main(void) + { + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then + AC_DEFINE([LDOUBLE_TO_LLONG_ACCURATE], [1], + [Define if your system can convert long double to (unsigned) long long values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + + +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be +## set for all machines, except for Mac OS 10.4 and Powerpc Linux using +## XL compilers. +## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the converted values are twice as big as they should be. +## +AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} +else + AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct], + [AC_TRY_RUN([ + int main(void) + { + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); + } + ], [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],)]) +fi + +if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then + AC_DEFINE([LLONG_TO_LDOUBLE_CORRECT], [1], + [Define if your system can convert (unsigned) long long to long double values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- ## Set some variables for general configuration information to be saved ## and installed with the libraries (used to generate libhdf5.settings). ## diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 1f33f04..7953161 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -38,18 +38,32 @@ set (examples foreach (example ${examples}) add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (${example} STATIC) + TARGET_C_PROPERTIES (${example} STATIC " " " ") target_link_libraries (${example} ${HDF5_LIB_TARGET}) set_target_properties (${example} PROPERTIES FOLDER examples) + if (BUILD_SHARED_LIBS) + add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) + TARGET_NAMING (${example}-shared SHARED) + TARGET_C_PROPERTIES (${example}-shared SHARED " " " ") + target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET}) + set_target_properties (${example}-shared PROPERTIES FOLDER examples) + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) if (H5_HAVE_PARALLEL) add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_NAMING (ph5example ${LIB_TYPE}) - TARGET_C_PROPERTIES (ph5example ${LIB_TYPE} " " " ") + TARGET_NAMING (ph5example STATIC) + TARGET_C_PROPERTIES (ph5example STATIC " " " ") target_link_libraries (ph5example ${HDF5_LIB_TARGET}) set_target_properties (ph5example PROPERTIES FOLDER examples) + if (BUILD_SHARED_LIBS) + add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) + TARGET_NAMING (ph5example-shared SHARED) + TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ") + target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET}) + set_target_properties (ph5example-shared PROPERTIES FOLDER examples) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL) if (BUILD_TESTING) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 5a756c8..42b42b3 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -5,6 +5,10 @@ ############################################################################## ############################################################################## file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) + if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5EX-shared") + file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared/red ${PROJECT_BINARY_DIR}/H5EX-shared/blue ${PROJECT_BINARY_DIR}/H5EX-shared/u2w) + endif (BUILD_SHARED_LIBS) # Remove any output file left over from previous test run add_test ( @@ -56,6 +60,61 @@ set (last_test "EXAMPLES-${example}") endforeach (example ${examples}) + if (BUILD_SHARED_LIBS) + # Remove any output file left over from previous test run + add_test ( + NAME EXAMPLES-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + Attributes.h5 + btrees_file.h5 + cmprss.h5 + default_file.h5 + dset.h5 + extend.h5 + extlink_prefix_source.h5 + extlink_source.h5 + extlink_target.h5 + group.h5 + groups.h5 + hard_link.h5 + mount1.h5 + mount2.h5 + one_index_file.h5 + only_dspaces_and_attrs_file.h5 + only_huge_mesgs_file.h5 + REF_REG.h5 + refere.h5 + SDS.h5 + SDScompound.h5 + SDSextendible.h5 + Select.h5 + separate_indexes_file.h5 + small_lists_file.h5 + soft_link.h5 + subset.h5 + unix2win.h5 + blue/prefix_target.h5 + red/prefix_target.h5 + u2w/u2w_target.h5 + WORKING_DIRECTORY + ${PROJECT_BINARY_DIR}/H5EX-shared + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-clear-objects PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-clear-objects") + + foreach (example ${examples}) + add_test (NAME EXAMPLES-shared-${example} COMMAND $) + set_tests_properties (EXAMPLES-shared-${example} PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-${example}") + endforeach (example ${examples}) + endif (BUILD_SHARED_LIBS) + ### Windows pops up a modal permission dialog on this test if (H5_HAVE_PARALLEL AND NOT WIN32) add_test (NAME EXAMPLES-ph5example COMMAND $) @@ -63,4 +122,12 @@ set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "EXAMPLES-ph5example") + if (BUILD_SHARED_LIBS) + add_test (NAME EXAMPLES-shared-ph5example COMMAND $) + set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "EXAMPLES-shared-ph5example") + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND NOT WIN32) diff --git a/examples/Makefile.in b/examples/Makefile.in index 79232ae..11954a7 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(TEST_SCRIPT) subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 8585623..3b858ed 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -106,7 +106,10 @@ TESTS = subdir = fortran ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 8442b13..f2dc896 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -40,8 +40,8 @@ set (F2003_examples foreach (example ${examples}) add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f90_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f90_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (f90_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ") target_link_libraries (f90_ex_${example} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -50,14 +50,29 @@ foreach (example ${examples}) set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) + if (BUILD_SHARED_LIBS) + add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f90_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ") + target_link_libraries (f90_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f90_ex_${example}-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) foreach (example ${F2003_examples}) add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (f03_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") target_link_libraries (f03_ex_${example} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -68,12 +83,27 @@ foreach (example ${F2003_examples}) FOLDER examples/fortran03 Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) + if (BUILD_SHARED_LIBS) + add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") + target_link_libraries (f03_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f03_ex_${example}-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran03 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endforeach (example ${F2003_examples}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example ${LIB_TYPE} " " " ") + TARGET_NAMING (f90_ex_ph5example STATIC) + TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ") target_link_libraries (f90_ex_ph5example ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -83,8 +113,24 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) + if (BUILD_SHARED_LIBS) + add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) + TARGET_NAMING (f90_ex_ph5example-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ") + target_link_libraries (f90_ex_ph5example-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ${MPI_Fortran_LIBRARIES} + ) + target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f90_ex_ph5example-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) if (BUILD_TESTING) diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 57aec53..173984c 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -28,6 +28,30 @@ set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f90_ex-clear-objects") + if (BUILD_SHARED_LIBS) + add_test ( + NAME f90_ex-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + compound.h5 + copy1.h5 + copy2.h5 + dsetf.h5 + extend.h5 + FORTRAN.h5 + groupf.h5 + groupsf.h5 + h5_cmprss.h5 + mount1.h5 + mount2.h5 + sdsf.h5 + subset.h5 + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f90_ex-shared-clear-objects") + endif (BUILD_SHARED_LIBS) foreach (example ${examples}) add_test (NAME f90_ex_${example} COMMAND $) @@ -35,6 +59,13 @@ foreach (example ${examples}) set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f90_ex_${example}") + if (BUILD_SHARED_LIBS) + add_test (NAME f90_ex-shared_${example} COMMAND $) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f90_ex-shared_${example}") + endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) if (HDF5_ENABLE_F2003) @@ -44,9 +75,19 @@ if (HDF5_ENABLE_F2003) set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "f03_ex_${example}") + if (BUILD_SHARED_LIBS) + add_test (NAME f03_ex-shared_${example} COMMAND $) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "f03_ex-shared_${example}") + endif (BUILD_SHARED_LIBS) endforeach (example ${F2003_examples}) endif (HDF5_ENABLE_F2003) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + if (BUILD_SHARED_LIBS) + add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + endif (BUILD_SHARED_LIBS) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index f97fdc8..e36cdb5 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index d4141d9..8f63b3c 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -106,16 +106,33 @@ set (f90CStub_C_HDRS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) -add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) -TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) +TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_F90_C_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) + TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES + FOLDER libraries/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE) @@ -167,36 +184,56 @@ set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- # Add Main fortran library #----------------------------------------------------------------------------- -add_library (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS}) +add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS}) set (SHARED_LINK_FLAGS " ") -if (WIN32) - if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - BUILD_HDF5_DLL - ) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") - endif (MSVC) - endif (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - HDF5F90_WINDOWS - ) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS}) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${MPI_Fortran_LIBRARIES}) + endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES + FOLDER libraries/fortran + LINKER_LANGUAGE Fortran + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_F90_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) + set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -214,11 +251,19 @@ install ( fortheaders ) -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) -else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) -endif (WIN32) +if (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + endif (WIN32) +else (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + endif (WIN32) +endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5fortran_types.mod @@ -254,14 +299,13 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) - #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) + INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) + #INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_F90_C_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index dd071ca..2f69ce0 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -113,7 +113,10 @@ TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 32b3a09..19d4975 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -9,46 +9,88 @@ INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- -add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c) +add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) -TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} " " " ") +TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) + TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} + ${HDF5_F90_C_LIBSH_TARGET} + ${HDF5_TEST_LIBSH_TARGET} + ) + H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED) + set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) +endif (BUILD_SHARED_LIBS) set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +endif (BUILD_SHARED_LIBS) -set (SHARED_LINK_FLAGS " ") -if (WIN32) - if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_TEST_DLL) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL") - endif (MSVC) - endif (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC) +target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY + COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +if (BUILD_SHARED_LIBS) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_C_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED) + target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test/fortran + LINKER_LANGUAGE Fortran + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY + COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities @@ -106,8 +148,8 @@ add_executable (testhdf5_fortran tH5Z.f90 tHDF5.f90 ) -TARGET_NAMING (testhdf5_fortran ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5_fortran STATIC) +TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ") target_link_libraries (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -120,8 +162,43 @@ target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRE set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5_fortran-shared + fortranlib_test.f90 + tH5A.f90 + tH5D.f90 + tH5E.f90 + tH5F.f90 + tH5G.f90 + tH5I.f90 + tH5P.f90 + tH5R.f90 + tH5S.f90 + tH5Sselect.f90 + tH5T.f90 + tH5VL.f90 + tH5Z.f90 + tHDF5.f90 + ) + TARGET_NAMING (testhdf5_fortran-shared SHARED) + TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ") + target_link_libraries (testhdf5_fortran-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (testhdf5_fortran-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (testhdf5_fortran-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for testhdf5_fortran_1_8 add_executable (testhdf5_fortran_1_8 @@ -132,8 +209,8 @@ add_executable (testhdf5_fortran_1_8 tH5MISC_1_8.f90 tHDF5_1_8.f90 ) -TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5_fortran_1_8 STATIC) +TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ") target_link_libraries (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -146,8 +223,34 @@ target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_ set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5_fortran_1_8-shared + fortranlib_test_1_8.f90 + tH5O.f90 + tH5A_1_8.f90 + tH5G_1_8.f90 + tH5MISC_1_8.f90 + tHDF5_1_8.f90 + ) + TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED) + TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ") + target_link_libraries (testhdf5_fortran_1_8-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for fortranlib_test_F03 add_executable (fortranlib_test_F03 @@ -159,9 +262,9 @@ add_executable (fortranlib_test_F03 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 - ) -TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 ${LIB_TYPE} " " " ") +) +TARGET_NAMING (fortranlib_test_F03 STATIC) +TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") target_link_libraries (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -174,13 +277,41 @@ target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_D set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static +) +if (BUILD_SHARED_LIBS) + add_executable (fortranlib_test_F03-shared + fortranlib_test_F03.f90 + tH5E_F03.f90 + tH5F_F03.f90 + tH5L_F03.f90 + tH5O_F03.f90 + tH5P_F03.f90 + tH5T_F03.F90 + tHDF5_F03.f90 + ) + TARGET_NAMING (fortranlib_test_F03-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") + target_link_libraries (fortranlib_test_F03-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fortranlib_test_F03-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) +endif (BUILD_SHARED_LIBS) #-- Adding test for fflush1 add_executable (fflush1 fflush1.f90) -TARGET_NAMING (fflush1 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (fflush1 ${LIB_TYPE} " " " ") +TARGET_NAMING (fflush1 STATIC) +TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ") target_link_libraries (fflush1 ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} @@ -193,13 +324,32 @@ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/st set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (fflush1-shared fflush1.f90) + TARGET_NAMING (fflush1-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ") + target_link_libraries (fflush1-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fflush1-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fflush1-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fflush1-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for fflush2 add_executable (fflush2 fflush2.f90) -TARGET_NAMING (fflush2 ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (fflush2 ${LIB_TYPE} " " " ") +TARGET_NAMING (fflush2 STATIC) +TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ") target_link_libraries (fflush2 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -212,7 +362,26 @@ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/st set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (BUILD_SHARED_LIBS) + add_executable (fflush2-shared fflush2.f90) + TARGET_NAMING (fflush2-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ") + target_link_libraries (fflush2-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fflush2-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fflush2-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fflush2-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index 4df50ad..94f6b64 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -26,3 +26,29 @@ add_test (NAME FORTRAN_fflush1 COMMAND $) #-- Adding test for fflush2 add_test (NAME FORTRAN_fflush2 COMMAND $) set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1) + +if (BUILD_SHARED_LIBS) + add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $) + set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran) + + #-- Adding test for testhdf5_fortran_1_8 + add_test (NAME FORTRAN_testhdf5_fortran_1_8-shared COMMAND $) + set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) + + #-- Adding test for fortranlib_test_F03 + if (HDF5_ENABLE_F2003) + add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $) + set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03) + endif (HDF5_ENABLE_F2003) + + #-- Adding test for fflush1 + add_test (NAME FORTRAN_fflush1-shared COMMAND $) + set_tests_properties (FORTRAN_fflush1-shared PROPERTIES DEPENDS FORTRAN_fflush2) + + #-- Adding test for fflush2 + add_test (NAME FORTRAN_fflush2-shared COMMAND $) + set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared) +endif (BUILD_SHARED_LIBS) diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 4e9bbd6..ae8aa1d 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -94,7 +94,10 @@ TESTS = $(am__EXEEXT_1) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 98ef6c8..4f21419 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -16,8 +16,8 @@ add_executable (parallel_test hyper.f90 mdset.f90 ) -TARGET_NAMING (parallel_test ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (parallel_test ${LIB_TYPE} " " " ") +TARGET_NAMING (parallel_test STATIC) +TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ") target_link_libraries (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -27,7 +27,7 @@ target_link_libraries (parallel_test if (WIN32 AND MSVC) target_link_libraries (parallel_test "ws2_32.lib") endif (WIN32 AND MSVC) -target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran) diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 073194a..5665ff6 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -110,7 +110,10 @@ TESTS = subdir = fortran/testpar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index b5d4308..bed8291 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -6,14 +6,6 @@ PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- add_definitions (${HDF_EXTRA_C_FLAGS}) -#----------------------------------------------------------------------------- -# Shared Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_DYNAMIC_LIB 1) -else (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_STATIC_LIB 1) -endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # List Source files diff --git a/hl/Makefile.in b/hl/Makefile.in index b5fbb46..237846b 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -106,7 +106,10 @@ TESTS = subdir = hl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 831dadc..6005ec4 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -102,7 +102,10 @@ TESTS = subdir = hl/c++ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index e3fc3ae..77a50bf 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -11,8 +11,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src) # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp) -TARGET_NAMING (ptExampleFL ${LIB_TYPE}) -TARGET_C_PROPERTIES (ptExampleFL ${LIB_TYPE} " " " ") +TARGET_NAMING (ptExampleFL STATIC) +TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ") target_link_libraries ( ptExampleFL ${HDF5_HL_CPP_LIB_TARGET} diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 67a14ca..03454de 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -107,7 +107,10 @@ TESTS = subdir = hl/c++/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index b511260..e37c5ba 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -10,22 +10,42 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR}) set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) -add_library (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS}) -TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SRCS}) +TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries ( ${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_HL_CPP_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SRCS}) + TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") + target_link_libraries ( + ${HDF5_HL_CPP_LIBSH_TARGET} + ${HDF5_HL_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -41,12 +61,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries) + INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS - ${HDF5_HL_CPP_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 05c8fd8..c5fe977 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -106,7 +106,10 @@ TESTS = subdir = hl/c++/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index ff06b22..de5b363 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -16,8 +16,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test) INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) -TARGET_C_PROPERTIES (hl_ptableTest ${LIB_TYPE} " " " ") -TARGET_NAMING (hl_ptableTest ${LIB_TYPE}) +TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ") +TARGET_NAMING (hl_ptableTest STATIC) target_link_libraries ( hl_ptableTest ${HDF5_LIB_TARGET} diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 4f88242..948d735 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -103,7 +103,10 @@ TESTS = $(am__EXEEXT_1) subdir = hl/c++/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index e264f75..f5e6f5e 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -28,8 +28,8 @@ set (examples foreach (example ${examples}) add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (hl_ex_${example} ${LIB_TYPE}) - TARGET_C_PROPERTIES (hl_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_ex_${example} STATIC) + TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ") target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl) endforeach (example ${examples}) diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index ccf2308..121b6e4 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -107,7 +107,10 @@ TESTS = subdir = hl/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 6d87e82..a67c8d6 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -106,7 +106,10 @@ TESTS = subdir = hl/fortran ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index bded2d9..87838a0 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -16,14 +16,14 @@ set (examples foreach (example ${examples}) add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (hl_f90_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_f90_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ") target_link_libraries (hl_f90_ex_${example} ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) + target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran) diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 71e70dd..d21b5fd 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -107,7 +107,10 @@ TESTS = subdir = hl/fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 0219c22..9d110a8 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -60,16 +60,33 @@ set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) -add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl/fortran + LINKER_LANGUAGE C + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Fortran Modules @@ -105,43 +122,66 @@ add_custom_target (H5HLgen ALL DEPENDS ${HDF5_HL_F90_F_BASE_SRCS} ) -add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) -set (SHARED_LINK_FLAGS " ") -if (WIN32) - if (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - BUILD_HDF5_HL_DLL - ) - if (MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") - endif (MSVC) - endif (BUILD_SHARED_LIBS) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - HDF5F90_WINDOWS - ) -endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) +add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS}) +TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$/include>" - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +if (WIN32) + set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" + ) +endif (WIN32) +set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS}) + set (SHARED_LINK_FLAGS " ") + if (WIN32 AND MSVC) + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + endif (WIN32 AND MSVC) + TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl/fortran + LINKER_LANGUAGE Fortran + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + if (WIN32) + set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS" + ) + endif (WIN32) + set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) -else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) -endif (WIN32) +if (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + endif (WIN32) +else (BUILD_SHARED_LIBS) + if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) + else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + endif (WIN32) +endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5ds.mod @@ -166,14 +206,13 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) - #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) + INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) + #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_HL_F90_C_LIB_TARGET} - ${HDF5_HL_F90_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 4aca74c..44a2d58 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -111,7 +111,10 @@ TESTS = subdir = hl/fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index d90b524..a1d1386 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -8,38 +8,86 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${ #-- Adding test for hl_f90_tstds add_executable (hl_f90_tstds tstds.F90) -TARGET_NAMING (hl_f90_tstds ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstds ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstds STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstds-shared tstds.F90) + TARGET_NAMING (hl_f90_tstds-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") + target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstds-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstlite add_executable (hl_f90_tstlite tstlite.F90) -TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstlite STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstlite-shared tstlite.F90) + TARGET_NAMING (hl_f90_tstlite-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") + target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstlite-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstimage add_executable (hl_f90_tstimage tstimage.F90) -TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tstimage STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tstimage-shared tstimage.F90) + TARGET_NAMING (hl_f90_tstimage-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") + target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tstimage-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tsttable add_executable (hl_f90_tsttable tsttable.F90) -TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE}) -TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable ${LIB_TYPE} " " " ") +TARGET_NAMING (hl_f90_tsttable STATIC) +TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) +target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) +if (BUILD_SHARED_LIBS) + add_executable (hl_f90_tsttable-shared tsttable.F90) + TARGET_NAMING (hl_f90_tsttable-shared SHARED) + TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") + target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (hl_f90_tsttable-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake index 3676d24..38181bf 100644 --- a/hl/fortran/test/CMakeTests.cmake +++ b/hl/fortran/test/CMakeTests.cmake @@ -31,3 +31,34 @@ set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $) set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) + +if (BUILD_SHARED_LIBS) + add_test ( + NAME HL_FORTRAN_test-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dsetf1.h5 + dsetf2.h5 + dsetf3.h5 + dsetf4.h5 + dsetf5.h5 + f1img.h5 + f1tab.h5 + tstds.h5 + ) + set_tests_properties (HL_FORTRAN_test-shared-clear-objects + PROPERTIES DEPENDS "HL_FORTRAN_f90_tsttable;HL_FORTRAN_f90_tstimage;HL_FORTRAN_f90_tstlite;HL_FORTRAN_f90_tstds" + ) + + add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstds-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstlite-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tstimage-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + + add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $) + set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) +endif (BUILD_SHARED_LIBS) diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index ee4b206..6a9c622 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(am__EXEEXT_1) subdir = hl/fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 47029d7..23943f9 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,12 +1,6 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_SRC) -#----------------------------------------------------------------------------- -# Shared Libs -#----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) - set (HL_BUILT_AS_DYNAMIC_LIB 1) -endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # List Source files @@ -33,18 +27,34 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h ) -add_library (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} ${HL_SRCS} ${HL_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") +set (install_targets ${HDF5_HL_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED) + set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES + FOLDER libraries/hl + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}") + set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Add file(s) to CMake Install +# Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( FILES @@ -60,12 +70,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) + INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS - ${HDF5_HL_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 1d8679a..afc191d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -106,7 +106,10 @@ TESTS = subdir = hl/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 47383ce..916dcf3 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -22,8 +22,8 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) # -------------------------------------------------------------------- MACRO (HL_ADD_EXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_NAMING (hl_${hl_name} ${LIB_TYPE}) - TARGET_C_PROPERTIES (hl_${hl_name} ${LIB_TYPE} " " " ") + TARGET_NAMING (hl_${hl_name} STATIC) + TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -32,6 +32,18 @@ MACRO (HL_ADD_EXE hl_name) set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) ENDMACRO (HL_ADD_EXE) +MACRO (HL_ADD_SHEXE hl_name) + add_executable (hl_${hl_name} ${hl_name}.c) + TARGET_NAMING (hl_${hl_name} SHARED) + TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ") + target_link_libraries (hl_${hl_name} + ${HDF5_HL_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ${HDF5_TEST_LIBSH_TARGET} + ) + set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) +ENDMACRO (HL_ADD_SHEXE) + HL_ADD_EXE (test_ds) HL_ADD_EXE (test_dset_opt) HL_ADD_EXE (test_image) @@ -43,7 +55,7 @@ HL_ADD_EXE (test_table) # This executable is used to generate test files for the test_ds test. # It should only be run during development when new test files are needed # -------------------------------------------------------------------- -if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +if (HDF5_BUILD_GENERATORS) add_executable (hl_gen_test_ds gen_test_ds.c) TARGET_NAMING (hl_gen_test_ds STATIC) TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ") @@ -53,6 +65,6 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ${HDF5_TEST_LIB_TARGET} ) set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) -endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 4614152..80dcd15 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(am__EXEEXT_1) subdir = hl/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index c9017f3..73d1f22 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -18,8 +18,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5) add_executable (gif2h5 ${GIF2H5_SRCS}) -TARGET_NAMING (gif2h5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (gif2h5 ${LIB_TYPE} " " " ") +TARGET_NAMING (gif2h5 STATIC) +TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) @@ -29,8 +29,8 @@ set (hdf2gif_SRCS ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c ) add_executable (h52gif ${hdf2gif_SRCS}) -TARGET_NAMING (h52gif ${LIB_TYPE}) -TARGET_C_PROPERTIES (h52gif ${LIB_TYPE} " " " ") +TARGET_NAMING (h52gif STATIC) +TARGET_C_PROPERTIES (h52gif STATIC " " " ") target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h52gif PROPERTIES FOLDER tools/hl) @@ -40,15 +40,15 @@ if (BUILD_TESTING) # used in the CMake Build system as we rely on the test files that are # shipped with HDF5 source archives # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c) TARGET_NAMING (hl_h52gifgentest STATIC) TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) - + # add_test (NAME hl_h52gifgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 653c273..300b992 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -102,7 +102,10 @@ TESTS = subdir = hl/tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 6ebf126..19f6c56 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -106,7 +106,10 @@ TESTS = $(TEST_SCRIPT) subdir = hl/tools/gif2h5 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 7f67eb2..7a98bef 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -591,6 +591,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF +HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF if (APPLE) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6494479..d034cd3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.226 currently under development +HDF5 version 1.9.227 currently under development ================================================================================ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11b37a5..eddc951 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -853,8 +853,8 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED) set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) -add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} dl) @@ -863,7 +863,7 @@ if (H5_HAVE_PARALLEL AND MPI_C_FOUND) target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -876,6 +876,35 @@ if (HDF5_ENABLE_DEBUG_APIS) "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG" ) endif (HDF5_ENABLE_DEBUG_APIS) +set (install_targets ${HDF5_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + if (NOT WIN32) + target_link_libraries (${HDF5_LIBSH_TARGET} dl) + endif (NOT WIN32) + if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED) + set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES + FOLDER libraries + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + + if (HDF5_ENABLE_DEBUG_APIS) + set_property (TARGET ${HDF5_LIBSH_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS + "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5B_DEBUG;H5AC_DEBUG" + ) + endif (HDF5_ENABLE_DEBUG_APIS) + set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -896,12 +925,12 @@ endif (NOT HDF5_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) + INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries diff --git a/src/H5.c b/src/H5.c index 37476b0..3d4512f 100644 --- a/src/H5.c +++ b/src/H5.c @@ -145,6 +145,9 @@ H5_init_library(void) if(MPI_SUCCESS != (mpi_code = MPI_Comm_set_attr(MPI_COMM_SELF, key_val, NULL))) HMPI_GOTO_ERROR(FAIL, "MPI_Comm_set_attr failed", mpi_code) + + if(MPI_SUCCESS != (mpi_code = MPI_Comm_free_keyval(&key_val))) + HMPI_GOTO_ERROR(FAIL, "MPI_Comm_free_keyval failed", mpi_code) } } #endif /*H5_HAVE_PARALLEL*/ diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 183f72c..4d3dce0 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -21,49 +21,109 @@ #define _H5Edefin_H /* Major error IDs */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_FILE_g = FAIL; /* File accessibilty */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_SYM_g = FAIL; /* Symbol table */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ -hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ +hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */ +hid_t H5E_OHDR_g = FAIL; /* Object header */ hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ -hid_t H5E_REFERENCE_g = FAIL; /* References */ -hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ +hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_FILE_g = FAIL; /* File accessibilty */ +hid_t H5E_PLINE_g = FAIL; /* Data filters */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ -hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */ +hid_t H5E_DATASET_g = FAIL; /* Dataset */ +hid_t H5E_REFERENCE_g = FAIL; /* References */ hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ +hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ +hid_t H5E_LINK_g = FAIL; /* Links */ +hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ hid_t H5E_IO_g = FAIL; /* Low-level I/O */ hid_t H5E_EFL_g = FAIL; /* External file list */ -hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ -hid_t H5E_DATASET_g = FAIL; /* Dataset */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ -hid_t H5E_LINK_g = FAIL; /* Links */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ -hid_t H5E_OHDR_g = FAIL; /* Object header */ -hid_t H5E_ATOM_g = FAIL; /* Object atom */ +hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ -hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ -hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ -hid_t H5E_PLINE_g = FAIL; /* Data filters */ +hid_t H5E_ATOM_g = FAIL; /* Object atom */ +hid_t H5E_SYM_g = FAIL; /* Symbol table */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ hid_t H5E_ERROR_g = FAIL; /* Error API */ +hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ hid_t H5E_CACHE_g = FAIL; /* Object cache */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ /* Minor error IDs */ -/* Generic low-level file I/O errors */ -hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ -hid_t H5E_READERROR_g = FAIL; /* Read failed */ -hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ -hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ -hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ -hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ +/* Group related errors */ +hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ +hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ +hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ +hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ + +/* File accessibilty errors */ +hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ +hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ +hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ +hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ +hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ +hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ +hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ +hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ +hid_t H5E_MOUNT_g = FAIL; /* File mount error */ + +/* I/O pipeline errors */ +hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ +hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ +hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ +hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ +hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ +hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ + +/* B-tree related errors */ +hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ +hid_t H5E_EXISTS_g = FAIL; /* Object already exists */ +hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */ +hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */ +hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */ +hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */ +hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */ +hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */ +hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ +hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ +hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ + +/* Argument errors */ +hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ +hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ +hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ +hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ +hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ + +/* Free space errors */ +hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ +hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ +hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ + +/* Parallel MPI errors */ +hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ +hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ +hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ + +/* Link related errors */ +hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ +hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ +hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ +hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ +hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ + +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ + +/* Plugin errors */ +hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ /* Resource errors */ hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ @@ -77,6 +137,15 @@ hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */ hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */ hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */ +/* Datatype conversion errors */ +hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ +hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ + +/* Function entry/exit interface errors */ +hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ +hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ +hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ + /* Heap errors */ hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ @@ -85,67 +154,9 @@ hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ -/* Function entry/exit interface errors */ -hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ -hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ -hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ - -/* Property list errors */ -hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ -hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ -hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ -hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ - -/* Free space errors */ -hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ -hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ -hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ - -/* Object header related errors */ -hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ -hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ -hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ -hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ -hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ -hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ -hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */ -hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */ -hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */ - /* System level errors */ hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ -/* I/O pipeline errors */ -hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ -hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ -hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ -hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ -hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ -hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ - -/* Group related errors */ -hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ -hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ -hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ -hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ - -/* No error */ -hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ - -/* Plugin errors */ -hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ - -/* File accessibilty errors */ -hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ -hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ -hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ -hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ -hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ -hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ -hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ -hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ -hid_t H5E_MOUNT_g = FAIL; /* File mount error */ - /* Object atom related errors */ hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */ hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */ @@ -154,6 +165,14 @@ hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count * hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ +/* Generic low-level file I/O errors */ +hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ +hid_t H5E_READERROR_g = FAIL; /* Read failed */ +hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ +hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ +hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ +hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ + /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ hid_t H5E_CANTSERIALIZE_g = FAIL; /* Unable to serialize data from cache */ @@ -175,17 +194,11 @@ hid_t H5E_CANTDEPEND_g = FAIL; /* Unable to create a flush dependency * hid_t H5E_CANTUNDEPEND_g = FAIL; /* Unable to destroy a flush dependency */ hid_t H5E_CANTNOTIFY_g = FAIL; /* Unable to notify object about action */ -/* Link related errors */ -hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ -hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ -hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ -hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ -hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ - -/* Parallel MPI errors */ -hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ -hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ -hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ +/* Property list errors */ +hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ +hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ +hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ +hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ /* Dataspace errors */ hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ @@ -195,28 +208,15 @@ hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ -/* Argument errors */ -hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ -hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ -hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ -hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ -hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ - -/* B-tree related errors */ -hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ -hid_t H5E_EXISTS_g = FAIL; /* Object already exists */ -hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */ -hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */ -hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */ -hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */ -hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */ -hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */ -hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ -hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ -hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ - -/* Datatype conversion errors */ -hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ -hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ +/* Object header related errors */ +hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ +hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ +hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ +hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ +hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ +hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ +hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */ +hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */ +hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */ #endif /* H5Edefin_H */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 9724748..7b19783 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -24,330 +24,360 @@ /* Major error codes */ /*********************/ -assert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) +assert(H5E_EARRAY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) +assert(H5E_INTERNAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +assert(H5E_STORAGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SYM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) +assert(H5E_ATTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) +assert(H5E_TST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +assert(H5E_DATATYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_INTERNAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) +assert(H5E_FARRAY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_OHDR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_BTREE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_REFERENCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) +assert(H5E_VFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DATASPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) +assert(H5E_FILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_PLINE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_PLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_RESOURCE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_RS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) +assert(H5E_DATASET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FARRAY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL) +assert(H5E_REFERENCE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_HEAP_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_EFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DATASET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) +assert(H5E_SLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_STORAGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) +assert(H5E_DATASPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_LINK_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) +assert(H5E_PLUGIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DATATYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) +assert(H5E_FUNC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OHDR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) +assert(H5E_IO_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) +assert(H5E_EFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_SOHM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_NONE_MAJOR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ARGS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) +assert(H5E_ATOM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_EARRAY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL) +assert(H5E_SYM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PLINE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) +assert(H5E_FSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_ERROR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_RS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_CACHE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_ARGS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /*********************/ /* Minor error codes */ /*********************/ -/* Generic low-level file I/O errors */ -assert(H5E_SEEKERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) +/* Group related errors */ +assert(H5E_CANTOPENOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_READERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) +assert(H5E_CANTCLOSEOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_WRITEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) +assert(H5E_COMPLEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CLOSEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) +assert(H5E_PATH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OVERFLOW_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) + +/* File accessibilty errors */ +assert(H5E_FILEEXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FCNTL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) +assert(H5E_FILEOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Resource errors */ -assert(H5E_NOSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) +assert(H5E_CANTCREATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTALLOC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) +assert(H5E_CANTOPENFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCOPY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) +assert(H5E_CANTCLOSEFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTFREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) +assert(H5E_NOTHDF5_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALREADYEXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) +assert(H5E_BADFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) +assert(H5E_TRUNCATED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) +assert(H5E_MOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) + +/* I/O pipeline errors */ +assert(H5E_NOFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGETSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) +assert(H5E_CALLBACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OBJOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) +assert(H5E_CANAPPLY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_SETLOCAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_NOENCODER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Heap errors */ -assert(H5E_CANTRESTORE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) +/* B-tree related errors */ +assert(H5E_NOTFOUND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCOMPUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) +assert(H5E_EXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) +assert(H5E_CANTENCODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) +assert(H5E_CANTDECODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) +assert(H5E_CANTSPLIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) +assert(H5E_CANTREDISTRIBUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Function entry/exit interface errors */ -assert(H5E_CANTINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) +assert(H5E_CANTSWAP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALREADYINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) +assert(H5E_CANTINSERT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRELEASE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) +assert(H5E_CANTLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTMODIFY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTREMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Property list errors */ -assert(H5E_CANTGET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) +/* Argument errors */ +assert(H5E_UNINITIALIZED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) +assert(H5E_UNSUPPORTED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DUPCLASS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) +assert(H5E_BADTYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SETDISALLOWED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) +assert(H5E_BADRANGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_BADVALUE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Free space errors */ @@ -367,173 +397,182 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Object header related errors */ -assert(H5E_LINKCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) +/* Parallel MPI errors */ +assert(H5E_MPI_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_VERSION_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) +assert(H5E_MPIERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALIGNMENT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) +assert(H5E_CANTRECV_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADMESG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) + +/* Link related errors */ +assert(H5E_TRAVERSE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDELETE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) +assert(H5E_NLINKS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADITER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) +assert(H5E_NOTREGISTERED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) +assert(H5E_CANTMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRESET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) +assert(H5E_CANTSORT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRENAME_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) + +/* No error */ +assert(H5E_NONE_MINOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* System level errors */ -assert(H5E_SYSERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) +/* Plugin errors */ +assert(H5E_OPENERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* I/O pipeline errors */ -assert(H5E_NOFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) +/* Resource errors */ +assert(H5E_NOSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CALLBACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) +assert(H5E_CANTALLOC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANAPPLY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) +assert(H5E_CANTCOPY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SETLOCAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) +assert(H5E_CANTFREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOENCODER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) +assert(H5E_ALREADYEXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) +assert(H5E_CANTLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Group related errors */ -assert(H5E_CANTOPENOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) +assert(H5E_CANTUNLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) +assert(H5E_CANTGC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) +assert(H5E_CANTGETSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) +assert(H5E_OBJOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* No error */ -assert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) +/* Datatype conversion errors */ +assert(H5E_CANTCONVERT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_BADSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Plugin errors */ -assert(H5E_OPENERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) +/* Function entry/exit interface errors */ +assert(H5E_CANTINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* File accessibilty errors */ -assert(H5E_FILEEXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) +assert(H5E_ALREADYINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FILEOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL) +assert(H5E_CANTRELEASE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCREATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL) + +/* Heap errors */ +assert(H5E_CANTRESTORE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTOPENFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL) +assert(H5E_CANTCOMPUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCLOSEFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL) +assert(H5E_CANTEXTEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOTHDF5_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL) +assert(H5E_CANTATTACH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL) +assert(H5E_CANTUPDATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_TRUNCATED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL) +assert(H5E_CANTOPERATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_MOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) + +/* System level errors */ +assert(H5E_SYSERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Object atom related errors */ @@ -568,6 +607,38 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* Generic low-level file I/O errors */ +assert(H5E_SEEKERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_READERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_WRITEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CLOSEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_OVERFLOW_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_FCNTL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* Cache related errors */ assert(H5E_CANTFLUSH_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) @@ -665,48 +736,26 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to notify object about action") if((H5E_CANTNOTIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Link related errors */ -assert(H5E_TRAVERSE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NLINKS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOTREGISTERED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSORT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) +/* Property list errors */ +assert(H5E_CANTGET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Parallel MPI errors */ -assert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) +assert(H5E_CANTSET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) +assert(H5E_DUPCLASS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) +assert(H5E_SETDISALLOWED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Dataspace errors */ @@ -741,100 +790,51 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Argument errors */ -assert(H5E_UNINITIALIZED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_UNSUPPORTED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADTYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADRANGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADVALUE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* B-tree related errors */ -assert(H5E_NOTFOUND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_EXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTENCODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDECODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSPLIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) +/* Object header related errors */ +assert(H5E_LINKCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREDISTRIBUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) +assert(H5E_VERSION_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSWAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) +assert(H5E_ALIGNMENT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTINSERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) +assert(H5E_BADMESG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) +assert(H5E_CANTDELETE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTMODIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) +assert(H5E_BADITER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) +assert(H5E_CANTPACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Datatype conversion errors */ -assert(H5E_CANTCONVERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) +assert(H5E_CANTRESET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) +assert(H5E_CANTRENAME_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") #endif /* H5Einit_H */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index e79106f..f821aba 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -24,90 +24,192 @@ /* Major error codes */ /*********************/ -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_SYM (H5OPEN H5E_SYM_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) -#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) #define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_TST (H5OPEN H5E_TST_g) +#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_FARRAY (H5OPEN H5E_FARRAY_g) +#define H5E_OHDR (H5OPEN H5E_OHDR_g) #define H5E_BTREE (H5OPEN H5E_BTREE_g) -#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) -#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) +#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_FILE (H5OPEN H5E_FILE_g) +#define H5E_PLINE (H5OPEN H5E_PLINE_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) #define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_RS (H5OPEN H5E_RS_g) -#define H5E_FARRAY (H5OPEN H5E_FARRAY_g) +#define H5E_DATASET (H5OPEN H5E_DATASET_g) +#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) #define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_SLIST (H5OPEN H5E_SLIST_g) +#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) +#define H5E_LINK (H5OPEN H5E_LINK_g) +#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) #define H5E_IO (H5OPEN H5E_IO_g) #define H5E_EFL (H5OPEN H5E_EFL_g) -#define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) -#define H5E_DATASET (H5OPEN H5E_DATASET_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) -#define H5E_LINK (H5OPEN H5E_LINK_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) -#define H5E_OHDR (H5OPEN H5E_OHDR_g) -#define H5E_ATOM (H5OPEN H5E_ATOM_g) +#define H5E_SOHM (H5OPEN H5E_SOHM_g) #define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) -#define H5E_SLIST (H5OPEN H5E_SLIST_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) -#define H5E_PLINE (H5OPEN H5E_PLINE_g) +#define H5E_ATOM (H5OPEN H5E_ATOM_g) +#define H5E_SYM (H5OPEN H5E_SYM_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) #define H5E_ERROR (H5OPEN H5E_ERROR_g) +#define H5E_RS (H5OPEN H5E_RS_g) #define H5E_CACHE (H5OPEN H5E_CACHE_g) -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ -H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ -H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ -H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ -H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ +#define H5E_ARGS (H5OPEN H5E_ARGS_g) +H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ +H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */ +H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ -H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ -H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ +H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ +H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ -H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */ +H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ +H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ +H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ +H5_DLLVAR hid_t H5E_LINK_g; /* Links */ +H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ -H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ -H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ -H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ -H5_DLLVAR hid_t H5E_LINK_g; /* Links */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ -H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ -H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ +H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ -H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ -H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ -H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ +H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ +H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ +H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ +H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ /*********************/ /* Minor error codes */ /*********************/ -/* Generic low-level file I/O errors */ -#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) -#define H5E_READERROR (H5OPEN H5E_READERROR_g) -#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) -#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) -#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) -#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) -H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ -H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ -H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ -H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ -H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ -H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ +/* Group related errors */ +#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) +#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) +#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) +#define H5E_PATH (H5OPEN H5E_PATH_g) +H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ +H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ +H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ +H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ + +/* File accessibilty errors */ +#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) +#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) +#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) +#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) +#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) +#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) +#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) +#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) +#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) +H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ +H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ +H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ +H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ +H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ +H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ +H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ +H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ +H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ + +/* I/O pipeline errors */ +#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) +#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) +#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) +#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) +#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) +#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) +H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ +H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ +H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ +H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ +H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ +H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ + +/* B-tree related errors */ +#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) +#define H5E_EXISTS (H5OPEN H5E_EXISTS_g) +#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g) +#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g) +#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g) +#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g) +#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g) +#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g) +#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g) +#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g) +#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g) +H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */ +H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */ +H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */ +H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */ +H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */ +H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */ +H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */ +H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */ +H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ +H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ +H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ + +/* Argument errors */ +#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) +#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) +#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) +#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) +#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) +H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ +H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ +H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ +H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ +H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ + +/* Free space errors */ +#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) +#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) +#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) +H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ +H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ +H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ + +/* Parallel MPI errors */ +#define H5E_MPI (H5OPEN H5E_MPI_g) +#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) +#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) +H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ +H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ +H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ + +/* Link related errors */ +#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) +#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) +#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) +#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) +#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) +H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ +H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ +H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ +H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ +H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ + +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ + +/* Plugin errors */ +#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) +H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ /* Resource errors */ #define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) @@ -131,6 +233,20 @@ H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */ H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */ H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */ +/* Datatype conversion errors */ +#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) +#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) +H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ +H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ + +/* Function entry/exit interface errors */ +#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) +#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) +#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) +H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ +H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ +H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ + /* Heap errors */ #define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) #define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) @@ -145,108 +261,10 @@ H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ -/* Function entry/exit interface errors */ -#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) -#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) -#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) -H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ -H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ -H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ - -/* Property list errors */ -#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) -#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) -#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) -#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) -H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ -H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ -H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ -H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ - -/* Free space errors */ -#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) -#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) -#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) -H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ -H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ -H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ - -/* Object header related errors */ -#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) -#define H5E_VERSION (H5OPEN H5E_VERSION_g) -#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) -#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) -#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) -#define H5E_BADITER (H5OPEN H5E_BADITER_g) -#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) -#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) -#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) -H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ -H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ -H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ -H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ -H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ -H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ -H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */ -H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */ -H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */ - /* System level errors */ #define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ -/* I/O pipeline errors */ -#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) -#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) -#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) -#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) -#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) -#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) -H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ -H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ -H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ -H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ -H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ -H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ - -/* Group related errors */ -#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) -#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) -#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) -#define H5E_PATH (H5OPEN H5E_PATH_g) -H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ -H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ -H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ -H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ - -/* No error */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ - -/* Plugin errors */ -#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) -H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ - -/* File accessibilty errors */ -#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) -#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) -#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) -#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) -#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) -#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) -#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) -#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) -#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) -H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ -H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ -H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ -H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ -H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ -H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ -H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ -H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ -H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ - /* Object atom related errors */ #define H5E_BADATOM (H5OPEN H5E_BADATOM_g) #define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g) @@ -261,6 +279,20 @@ H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ +/* Generic low-level file I/O errors */ +#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) +#define H5E_READERROR (H5OPEN H5E_READERROR_g) +#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) +#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) +#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) +#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) +H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ +H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ +H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ +H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ +H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ +H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ + /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) #define H5E_CANTSERIALIZE (H5OPEN H5E_CANTSERIALIZE_g) @@ -301,25 +333,15 @@ H5_DLLVAR hid_t H5E_CANTDEPEND_g; /* Unable to create a flush dependency */ H5_DLLVAR hid_t H5E_CANTUNDEPEND_g; /* Unable to destroy a flush dependency */ H5_DLLVAR hid_t H5E_CANTNOTIFY_g; /* Unable to notify object about action */ -/* Link related errors */ -#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) -#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) -#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) -#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) -#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) -H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ -H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ -H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ -H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ -H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ - -/* Parallel MPI errors */ -#define H5E_MPI (H5OPEN H5E_MPI_g) -#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) -#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) -H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ -H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ -H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ +/* Property list errors */ +#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) +#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) +#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) +#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) +H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ +H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ +H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ +H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ /* Dataspace errors */ #define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) @@ -335,46 +357,24 @@ H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ -/* Argument errors */ -#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) -#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) -#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) -#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) -#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) -H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ -H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ -H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ -H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ -H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ - -/* B-tree related errors */ -#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) -#define H5E_EXISTS (H5OPEN H5E_EXISTS_g) -#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g) -#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g) -#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g) -#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g) -#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g) -#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g) -#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g) -#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g) -#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g) -H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */ -H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */ -H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */ -H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */ -H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */ -H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */ -H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */ -H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */ -H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ -H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ -H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ - -/* Datatype conversion errors */ -#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) -#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) -H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ -H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ +/* Object header related errors */ +#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) +#define H5E_VERSION (H5OPEN H5E_VERSION_g) +#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) +#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) +#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) +#define H5E_BADITER (H5OPEN H5E_BADITER_g) +#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) +#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) +#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) +H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ +H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ +H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ +H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ +H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ +H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ +H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */ +H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */ +H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */ #endif /* H5Epubgen_H */ diff --git a/src/H5Eterm.h b/src/H5Eterm.h index 5db503c..8363c0a 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -22,50 +22,110 @@ /* Reset major error IDs */ -H5E_FUNC_g= -H5E_FILE_g= -H5E_SOHM_g= -H5E_SYM_g= -H5E_PLUGIN_g= -H5E_VFL_g= +H5E_EARRAY_g= H5E_INTERNAL_g= +H5E_STORAGE_g= +H5E_ATTR_g= +H5E_TST_g= +H5E_DATATYPE_g= +H5E_FARRAY_g= +H5E_OHDR_g= H5E_BTREE_g= -H5E_REFERENCE_g= -H5E_DATASPACE_g= +H5E_VFL_g= +H5E_FILE_g= +H5E_PLINE_g= +H5E_PLIST_g= H5E_RESOURCE_g= -H5E_RS_g= -H5E_FARRAY_g= +H5E_DATASET_g= +H5E_REFERENCE_g= H5E_HEAP_g= -H5E_ATTR_g= +H5E_SLIST_g= +H5E_DATASPACE_g= +H5E_LINK_g= +H5E_PLUGIN_g= +H5E_FUNC_g= H5E_IO_g= H5E_EFL_g= -H5E_TST_g= -H5E_FSPACE_g= -H5E_DATASET_g= -H5E_STORAGE_g= -H5E_LINK_g= -H5E_PLIST_g= -H5E_DATATYPE_g= -H5E_OHDR_g= -H5E_ATOM_g= +H5E_SOHM_g= H5E_NONE_MAJOR_g= -H5E_SLIST_g= -H5E_ARGS_g= -H5E_EARRAY_g= -H5E_PLINE_g= +H5E_ATOM_g= +H5E_SYM_g= +H5E_FSPACE_g= H5E_ERROR_g= -H5E_CACHE_g= (-1); +H5E_RS_g= +H5E_CACHE_g= +H5E_ARGS_g= (-1); /* Reset minor error IDs */ -/* Generic low-level file I/O errors */ -H5E_SEEKERROR_g= -H5E_READERROR_g= -H5E_WRITEERROR_g= -H5E_CLOSEERROR_g= -H5E_OVERFLOW_g= -H5E_FCNTL_g= +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= + +/* File accessibilty errors */ +H5E_FILEEXISTS_g= +H5E_FILEOPEN_g= +H5E_CANTCREATE_g= +H5E_CANTOPENFILE_g= +H5E_CANTCLOSEFILE_g= +H5E_NOTHDF5_g= +H5E_BADFILE_g= +H5E_TRUNCATED_g= +H5E_MOUNT_g= + +/* I/O pipeline errors */ +H5E_NOFILTER_g= +H5E_CALLBACK_g= +H5E_CANAPPLY_g= +H5E_SETLOCAL_g= +H5E_NOENCODER_g= +H5E_CANTFILTER_g= + +/* B-tree related errors */ +H5E_NOTFOUND_g= +H5E_EXISTS_g= +H5E_CANTENCODE_g= +H5E_CANTDECODE_g= +H5E_CANTSPLIT_g= +H5E_CANTREDISTRIBUTE_g= +H5E_CANTSWAP_g= +H5E_CANTINSERT_g= +H5E_CANTLIST_g= +H5E_CANTMODIFY_g= +H5E_CANTREMOVE_g= + +/* Argument errors */ +H5E_UNINITIALIZED_g= +H5E_UNSUPPORTED_g= +H5E_BADTYPE_g= +H5E_BADRANGE_g= +H5E_BADVALUE_g= + +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_g= + +/* Parallel MPI errors */ +H5E_MPI_g= +H5E_MPIERRSTR_g= +H5E_CANTRECV_g= + +/* Link related errors */ +H5E_TRAVERSE_g= +H5E_NLINKS_g= +H5E_NOTREGISTERED_g= +H5E_CANTMOVE_g= +H5E_CANTSORT_g= + +/* No error */ +H5E_NONE_MINOR_g= + +/* Plugin errors */ +H5E_OPENERROR_g= /* Resource errors */ H5E_NOSPACE_g= @@ -79,6 +139,15 @@ H5E_CANTGC_g= H5E_CANTGETSIZE_g= H5E_OBJOPEN_g= +/* Datatype conversion errors */ +H5E_CANTCONVERT_g= +H5E_BADSIZE_g= + +/* Function entry/exit interface errors */ +H5E_CANTINIT_g= +H5E_ALREADYINIT_g= +H5E_CANTRELEASE_g= + /* Heap errors */ H5E_CANTRESTORE_g= H5E_CANTCOMPUTE_g= @@ -87,67 +156,9 @@ H5E_CANTATTACH_g= H5E_CANTUPDATE_g= H5E_CANTOPERATE_g= -/* Function entry/exit interface errors */ -H5E_CANTINIT_g= -H5E_ALREADYINIT_g= -H5E_CANTRELEASE_g= - -/* Property list errors */ -H5E_CANTGET_g= -H5E_CANTSET_g= -H5E_DUPCLASS_g= -H5E_SETDISALLOWED_g= - -/* Free space errors */ -H5E_CANTMERGE_g= -H5E_CANTREVIVE_g= -H5E_CANTSHRINK_g= - -/* Object header related errors */ -H5E_LINKCOUNT_g= -H5E_VERSION_g= -H5E_ALIGNMENT_g= -H5E_BADMESG_g= -H5E_CANTDELETE_g= -H5E_BADITER_g= -H5E_CANTPACK_g= -H5E_CANTRESET_g= -H5E_CANTRENAME_g= - /* System level errors */ H5E_SYSERRSTR_g= -/* I/O pipeline errors */ -H5E_NOFILTER_g= -H5E_CALLBACK_g= -H5E_CANAPPLY_g= -H5E_SETLOCAL_g= -H5E_NOENCODER_g= -H5E_CANTFILTER_g= - -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= - -/* No error */ -H5E_NONE_MINOR_g= - -/* Plugin errors */ -H5E_OPENERROR_g= - -/* File accessibilty errors */ -H5E_FILEEXISTS_g= -H5E_FILEOPEN_g= -H5E_CANTCREATE_g= -H5E_CANTOPENFILE_g= -H5E_CANTCLOSEFILE_g= -H5E_NOTHDF5_g= -H5E_BADFILE_g= -H5E_TRUNCATED_g= -H5E_MOUNT_g= - /* Object atom related errors */ H5E_BADATOM_g= H5E_BADGROUP_g= @@ -156,6 +167,14 @@ H5E_CANTINC_g= H5E_CANTDEC_g= H5E_NOIDS_g= +/* Generic low-level file I/O errors */ +H5E_SEEKERROR_g= +H5E_READERROR_g= +H5E_WRITEERROR_g= +H5E_CLOSEERROR_g= +H5E_OVERFLOW_g= +H5E_FCNTL_g= + /* Cache related errors */ H5E_CANTFLUSH_g= H5E_CANTSERIALIZE_g= @@ -177,17 +196,11 @@ H5E_CANTDEPEND_g= H5E_CANTUNDEPEND_g= H5E_CANTNOTIFY_g= -/* Link related errors */ -H5E_TRAVERSE_g= -H5E_NLINKS_g= -H5E_NOTREGISTERED_g= -H5E_CANTMOVE_g= -H5E_CANTSORT_g= - -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= +/* Property list errors */ +H5E_CANTGET_g= +H5E_CANTSET_g= +H5E_DUPCLASS_g= +H5E_SETDISALLOWED_g= /* Dataspace errors */ H5E_CANTCLIP_g= @@ -197,28 +210,15 @@ H5E_CANTNEXT_g= H5E_BADSELECT_g= H5E_CANTCOMPARE_g= -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= - -/* B-tree related errors */ -H5E_NOTFOUND_g= -H5E_EXISTS_g= -H5E_CANTENCODE_g= -H5E_CANTDECODE_g= -H5E_CANTSPLIT_g= -H5E_CANTREDISTRIBUTE_g= -H5E_CANTSWAP_g= -H5E_CANTINSERT_g= -H5E_CANTLIST_g= -H5E_CANTMODIFY_g= -H5E_CANTREMOVE_g= - -/* Datatype conversion errors */ -H5E_CANTCONVERT_g= -H5E_BADSIZE_g= (-1); +/* Object header related errors */ +H5E_LINKCOUNT_g= +H5E_VERSION_g= +H5E_ALIGNMENT_g= +H5E_BADMESG_g= +H5E_CANTDELETE_g= +H5E_BADITER_g= +H5E_CANTPACK_g= +H5E_CANTRESET_g= +H5E_CANTRENAME_g= (-1); #endif /* H5Eterm_H */ diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c index d0688f7..36f0a93 100644 --- a/src/H5Fcwfs.c +++ b/src/H5Fcwfs.c @@ -210,12 +210,12 @@ H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr) new_need = MAX(H5HG_SIZE(f->shared->cwfs[cwfsno]), new_need); if((H5HG_SIZE(f->shared->cwfs[cwfsno]) + new_need) <= H5HG_MAXSIZE) { - htri_t extended; /* Whether the heap was extended */ + htri_t was_extended; /* Whether the heap was extended */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need); - if(extended < 0) + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need); + if(was_extended < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap") - else if(extended == TRUE) { + else if(was_extended == TRUE) { if(H5HG_extend(f, dxpl_id, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection") *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]); diff --git a/src/H5HL.c b/src/H5HL.c index eae0482..49af528 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -763,7 +763,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void * size_t need_more; /* How much more space we need */ size_t new_dblk_size; /* Final size of space allocated for heap data block */ size_t old_dblk_size; /* Previous size of space allocated for heap data block */ - htri_t extended; /* Whether the local heap's data segment on disk was extended */ + htri_t was_extended; /* Whether the local heap's data segment on disk was extended */ /* At least double the heap's size, making certain there's enough room * for the new object */ @@ -786,12 +786,12 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void * H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t); /* Extend current heap if possible */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr, (hsize_t)(heap->dblk_size), (hsize_t)need_more); - if(extended < 0) + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_LHEAP, heap->dblk_addr, (hsize_t)(heap->dblk_size), (hsize_t)need_more); + if(was_extended < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, UFAIL, "error trying to extend heap") - /* Check if we extended the heap data block in file */ - if(extended == TRUE) { + /* Check if we extended the heap data block in file */ + if(was_extended == TRUE) { /* Check for prefix & data block contiguous */ if(heap->single_cache_obj) { /* Resize prefix+data block */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index 3701441..c5a7b49 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -211,7 +211,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz /* Check if the space requested is larger than the space left in the block */ if((size + aggr_frag_size) > aggr->size) { - htri_t extended = FALSE; /* Whether the file was extended */ + htri_t was_extended = FALSE; /* Whether the file was extended */ /* Check if the block asked for is too large for 'normal' aggregator block */ if(size >= aggr->alloc_size) { @@ -221,9 +221,9 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space") - if ((aggr->addr > 0) && (extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) + if ((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") - else if (extended) { + else if (was_extended) { /* aggr->size is unchanged */ ret_value = aggr->addr + aggr_frag_size; aggr->addr += ext_size; @@ -263,9 +263,9 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); if(H5F_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, "'normal' file space allocation request will overlap into 'temporary' file space") - if((aggr->addr > 0) && (extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) + if((aggr->addr > 0) && (was_extended = H5FD_try_extend(f->shared->lf, alloc_type, f, aggr->addr + aggr->size, ext_size)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") - else if (extended) { + else if (was_extended) { aggr->addr += aggr_frag_size; aggr->size += (ext_size - aggr_frag_size); aggr->tot_size += ext_size; @@ -313,7 +313,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") /* Freeing any possible fragment due to alignment in the block after extension */ - if(extended && aggr_frag_size) + if(was_extended && aggr_frag_size) if(H5MF_xfree(f, alloc_type, dxpl_id, aggr_frag_addr, aggr_frag_size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") } /* end if */ diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 76f392d..e9d4f85 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -514,7 +514,7 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, size_t aligned_size = H5O_ALIGN_OH(oh, size); uint8_t *old_image; /* Old address of chunk's image in memory */ size_t old_size; /* Old size of chunk */ - htri_t extended; /* If chunk can be extended */ + htri_t was_extended; /* If chunk can be extended */ size_t extend_msg; /* Index of null message to extend */ hbool_t extended_msg = FALSE; /* Whether an existing message was extended */ uint8_t new_size_flags = 0; /* New chunk #0 size flags */ @@ -592,11 +592,11 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno, HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") /* Determine whether the chunk can be extended */ - extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_OHDR, oh->chunk[chunkno].addr, + was_extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_OHDR, oh->chunk[chunkno].addr, (hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size)); - if(extended < 0) /* error */ + if(was_extended < 0) /* error */ HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk") - else if(extended == FALSE) /* can't extend -- we are done */ + else if(was_extended == FALSE) /* can't extend -- we are done */ HGOTO_DONE(FALSE) /* Adjust object header prefix flags */ diff --git a/src/H5T.c b/src/H5T.c index 906061e..5f6c8e3 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1222,12 +1222,16 @@ H5T_init_interface(void) /* From long long to floats */ status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T__conv_llong_double, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T__conv_llong_ldouble, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ /* From unsigned long long to floats */ status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_ULLONG_LDOUBLE */ /* From floats to char */ status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T__conv_float_schar, H5AC_ind_dxpl_id, FALSE); @@ -1271,12 +1275,16 @@ H5T_init_interface(void) /* From floats to long long */ status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_ind_dxpl_id, FALSE); +#ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LDOUBLE_LLONG */ /* From floats to unsigned long long */ status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T__conv_float_ullong, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T__conv_double_ullong, H5AC_ind_dxpl_id, FALSE); +#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T__conv_ldouble_ullong, H5AC_ind_dxpl_id, FALSE); +#endif /* H5T_CONV_INTERNAL_LDOUBLE_ULLONG */ /* * The special no-op conversion is the fastest, so we list it last. The diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 81c947d..b14f6e5 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -7936,6 +7936,7 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LLONG_LDOUBLE herr_t H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7944,6 +7945,7 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -); } +#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ /*------------------------------------------------------------------------- @@ -8011,6 +8013,7 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_ULLONG_LDOUBLE herr_t H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8019,6 +8022,7 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -); } +#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/ /*------------------------------------------------------------------------- @@ -8792,6 +8796,7 @@ H5_GCC_DIAG_ON(float-equal) * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LDOUBLE_LLONG herr_t H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8802,6 +8807,7 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); H5_GCC_DIAG_ON(float-equal) } +#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ /*------------------------------------------------------------------------- @@ -8819,6 +8825,7 @@ H5_GCC_DIAG_ON(float-equal) * *------------------------------------------------------------------------- */ +#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG herr_t H5T__conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8829,6 +8836,7 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX); H5_GCC_DIAG_ON(float-equal) } +#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/ /*------------------------------------------------------------------------- diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 4697bfc..0b0cd61 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -111,6 +111,39 @@ /* (_not_ setting H5T_VISIT_SIMPLE and setting either H5T_VISIT_COMPLEX_FIRST or H5T_VISIT_COMPLEX_LAST will mean visiting all nodes _except_ "simple" "leafs" in the "tree" */ +/* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some + * incorrect conversions. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LLONG_LDOUBLE 1 +#endif + +/* Define an internal macro for converting unsigned long long to long double. SGI compilers give + * some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does + * not support unsigned long long. For FreeBSD(sleipnir), the last 2 bytes of mantissa are lost when + * compiler tries to do the conversion. For Cygwin, compiler doesn't do rounding correctly. + * Mac OS 10.4 gives some incorrect result. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1 +#endif + +/* Define an internal macro for converting long double to long long. SGI compilers give some incorrect + * conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates floating exception. + * The hard conversion on Windows .NET 2003 has a bug and gives wrong exception value. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ + (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LDOUBLE_LLONG 1 +#endif + +/* Define an internal macro for converting long double to unsigned long long. SGI compilers give some + * incorrect conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates + * floating exception. */ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ + (!H5_WANT_DATA_ACCURACY) +#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 1 +#else +#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 0 +#endif + /* Statistics about a conversion function */ struct H5T_stats_t { unsigned ncalls; /*num calls to conversion function */ diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 74066f7..ab7287c 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -47,7 +47,7 @@ /* This will only be defined if HDF5 was built with CMake */ #ifdef H5_BUILT_AS_DYNAMIC_LIB -#if defined(hdf5_EXPORTS) +#if defined(hdf5_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_DLL __declspec(dllexport) #define H5_DLLVAR extern __declspec(dllexport) @@ -70,7 +70,7 @@ #define H5_DLLVAR extern #endif /* _HDF5DLL_ */ -#if defined(hdf5_test_EXPORTS) +#if defined(hdf5_test_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5TEST_DLL __declspec(dllexport) #define H5TEST_DLLVAR extern __declspec(dllexport) @@ -93,7 +93,7 @@ #define H5TEST_DLLVAR extern #endif /* H5TEST_DLL */ -#if defined(hdf5_tools_EXPORTS) +#if defined(hdf5_tools_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5TOOLS_DLL __declspec(dllexport) #define H5TOOLS_DLLVAR extern __declspec(dllexport) @@ -116,7 +116,7 @@ #define H5TOOLS_DLLVAR extern #endif /* H5TOOLS_DLL */ -#if defined(hdf5_cpp_EXPORTS) +#if defined(hdf5_cpp_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_DLLCPP __declspec(dllexport) #define H5_DLLCPPVAR extern __declspec(dllexport) @@ -139,7 +139,7 @@ #define H5_DLLCPPVAR extern #endif /* H5_DLLCPP */ -#if defined(hdf5_hl_EXPORTS) +#if defined(hdf5_hl_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_HLDLL __declspec(dllexport) #define H5_HLDLLVAR extern __declspec(dllexport) @@ -162,7 +162,7 @@ #define H5_HLDLLVAR extern #endif /* H5_HLDLL */ -#if defined(hdf5_hl_cpp_EXPORTS) +#if defined(hdf5_hl_cpp_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_HLCPPDLL __declspec(dllexport) #define H5_HLCPPDLLVAR extern __declspec(dllexport) @@ -185,7 +185,7 @@ #define H5_HLCPPDLLVAR extern #endif /* H5_HLCPPDLL */ -#if defined(hdf5_f90cstub_EXPORTS) +#if defined(hdf5_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_FCDLL __declspec(dllexport) #define H5_FCDLLVAR extern __declspec(dllexport) @@ -208,7 +208,7 @@ #define H5_FCDLLVAR extern #endif /* H5_FCDLL */ -#if defined(hdf5_test_f90cstub_EXPORTS) +#if defined(hdf5_test_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5_FCTESTDLL __declspec(dllexport) #define H5_FCTESTDLLVAR extern __declspec(dllexport) @@ -231,7 +231,7 @@ #define H5_FCTESTDLLVAR extern #endif /* H5_FCTESTDLL */ -#if defined(hdf5_hl_f90cstub_EXPORTS) +#if defined(hdf5_hl_f90cstub_shared_EXPORTS) #if defined (_MSC_VER) /* MSVC Compiler Case */ #define HDF5_HL_F90CSTUBDLL __declspec(dllexport) #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport) diff --git a/src/H5config.h.in b/src/H5config.h.in index dfc4f44..ad8dcf9 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -410,10 +410,18 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #undef INCLUDE_HL +/* Define if your system can convert long double to (unsigned) long long + values correctly. */ +#undef LDOUBLE_TO_LLONG_ACCURATE + /* Define if your system converts long double to (unsigned) long values with special algorithm. */ #undef LDOUBLE_TO_LONG_SPECIAL +/* Define if your system can convert (unsigned) long long to long double + values correctly. */ +#undef LLONG_TO_LDOUBLE_CORRECT + /* Define if your system can convert (unsigned) long to long double values with special algorithm. */ #undef LONG_TO_LDOUBLE_SPECIAL @@ -608,6 +616,9 @@ /* Version number of package */ #undef VERSION +/* Data accuracy is prefered to speed during data conversions */ +#undef WANT_DATA_ACCURACY + /* Check exception handling functions during data conversions */ #undef WANT_DCONV_EXCEPTION diff --git a/src/H5public.h b/src/H5public.h index 3abc038..1d99c11 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 226 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 227 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.226" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.227" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index ecffd20..a0f4472 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -110,7 +110,10 @@ TESTS = subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 651e4eb..c94b880 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,8 +26,8 @@ set (TEST_LIB_HEADERS ${HDF5_TEST_SOURCE_DIR}/h5test.h ) -add_library (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) +TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") if (MSVC) target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") endif (MSVC) @@ -35,16 +35,34 @@ if (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib") endif (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE}) +H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") + if (MSVC) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib") + endif (MSVC) + if (MINGW) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib") + endif (MINGW) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED) + set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES + FOLDER libraries/test + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) +endif (BUILD_SHARED_LIBS) + #----------------------------------------------------------------------------- # If plugin library tests can be tested #----------------------------------------------------------------------------- -if (BUILD_SHARED_LIBS) # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") @@ -67,12 +85,12 @@ if (BUILD_SHARED_LIBS) add_definitions (${HDF_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ") + add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} - ${LIB_TYPE} + SHARED HDF5_TEST_PLUGIN_LIB_NAME_RELEASE HDF5_TEST_PLUGIN_LIB_NAME_DEBUG ) @@ -85,7 +103,7 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/testdir1/$" ) @@ -98,12 +116,12 @@ if (BUILD_SHARED_LIBS) add_definitions (${HDF_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ") + add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} - ${LIB_TYPE} + SHARED HDF5_TEST_PLUGIN_LIB_NAME_RELEASE HDF5_TEST_PLUGIN_LIB_NAME_DEBUG ) @@ -116,12 +134,11 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/testdir2/$" ) endforeach (test_lib ${TEST2_PLUGIN_LIBS}) -endif (BUILD_SHARED_LIBS) set (testhdf5_SRCS ${HDF5_TEST_SOURCE_DIR}/testhdf5.c @@ -153,17 +170,31 @@ set (testhdf5_SRCS #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SRCS}) -TARGET_NAMING (testhdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (testhdf5 STATIC) +TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5-shared ${testhdf5_SRCS}) + TARGET_NAMING (testhdf5-shared SHARED) + TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") + target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (testhdf5-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) MACRO (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ") + TARGET_NAMING (${file} STATIC) + TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_NAMING (${file}-shared SHARED) + TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") + target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (${file}-shared PROPERTIES FOLDER test) + endif (BUILD_SHARED_LIBS) ENDMACRO (ADD_H5_EXE file) set (H5_TESTS @@ -236,24 +267,45 @@ endforeach (test ${H5_TESTS}) #-- Adding test for cache add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache ${LIB_TYPE} " " " ") +TARGET_NAMING (cache STATIC) +TARGET_C_PROPERTIES (cache STATIC " " " ") target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache-shared ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache-shared SHARED) + TARGET_C_PROPERTIES (cache-shared SHARED " " " ") + target_link_libraries (cache-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for cache_api add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_api ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_api ${LIB_TYPE} " " " ") +TARGET_NAMING (cache_api STATIC) +TARGET_C_PROPERTIES (cache_api STATIC " " " ") target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_api PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache_api-shared ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache_api-shared SHARED) + TARGET_C_PROPERTIES (cache_api-shared SHARED " " " ") + target_link_libraries (cache_api-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache_api-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for cache_tagging add_executable (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_tagging ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_tagging ${LIB_TYPE} " " " ") +TARGET_NAMING (cache_tagging STATIC) +TARGET_C_PROPERTIES (cache_tagging STATIC " " " ") target_link_libraries (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_tagging PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (cache_tagging-shared ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) + TARGET_NAMING (cache_tagging-shared SHARED) + TARGET_C_PROPERTIES (cache_tagging-shared SHARED " " " ") + target_link_libraries (cache_tagging-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (cache_tagging-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for ttsafe add_executable (ttsafe @@ -263,37 +315,71 @@ add_executable (ttsafe ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) -TARGET_NAMING (ttsafe ${LIB_TYPE}) -TARGET_C_PROPERTIES (ttsafe ${LIB_TYPE} " " " ") +TARGET_NAMING (ttsafe STATIC) +TARGET_C_PROPERTIES (ttsafe STATIC " " " ") target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (ttsafe-shared + ${HDF5_TEST_SOURCE_DIR}/ttsafe.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c + ) + TARGET_NAMING (ttsafe-shared SHARED) + TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") + target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (ttsafe-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat ${LIB_TYPE}) - TARGET_C_PROPERTIES (err_compat ${LIB_TYPE} " " " ") + TARGET_NAMING (err_compat STATIC) + TARGET_C_PROPERTIES (err_compat STATIC " " " ") target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (err_compat PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (err_compat-shared ${HDF5_TEST_SOURCE_DIR}/err_compat.c) + TARGET_NAMING (err_compat-shared SHARED) + TARGET_C_PROPERTIES (err_compat-shared SHARED " " " ") + target_link_libraries (err_compat-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (err_compat-shared PROPERTIES FOLDER test) + endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) #-- Adding test for error_test add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) -TARGET_NAMING (error_test ${LIB_TYPE}) -TARGET_C_PROPERTIES (error_test ${LIB_TYPE} " " " ") +TARGET_NAMING (error_test STATIC) +TARGET_C_PROPERTIES (error_test STATIC " " " ") target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (error_test PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (error_test-shared ${HDF5_TEST_SOURCE_DIR}/error_test.c) + TARGET_NAMING (error_test-shared SHARED) + TARGET_C_PROPERTIES (error_test-shared SHARED " " " ") + target_link_libraries (error_test-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (error_test-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for links_env add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) -TARGET_NAMING (links_env ${LIB_TYPE}) -TARGET_C_PROPERTIES (links_env ${LIB_TYPE} " " " ") +TARGET_NAMING (links_env STATIC) +TARGET_C_PROPERTIES (links_env STATIC " " " ") target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (links_env PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (links_env-shared ${HDF5_TEST_SOURCE_DIR}/links_env.c) + TARGET_NAMING (links_env-shared SHARED) + TARGET_C_PROPERTIES (links_env-shared SHARED " " " ") + target_link_libraries (links_env-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (links_env-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -file (WRITE ${GREP_RUNNER} +file (WRITE ${GREP_RUNNER} "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") if (\${TEST_RESULT} STREQUAL \"0\") message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") @@ -312,6 +398,12 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (plugin SHARED " " " ") target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) set_target_properties (plugin PROPERTIES FOLDER test) +else (BUILD_SHARED_LIBS) + add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) + TARGET_NAMING (plugin STATIC) + TARGET_C_PROPERTIES (plugin STATIC " " " ") + target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) + set_target_properties (plugin PROPERTIES FOLDER test) endif (BUILD_SHARED_LIBS) include (CMakeTests.cmake) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index c7803f6..03ce5e3 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -9,6 +9,12 @@ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files") +if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files") +endif (BUILD_SHARED_LIBS) + if (HDF5_TEST_VFD) set (VFD_LIST sec2 @@ -23,6 +29,9 @@ if (HDF5_TEST_VFD) endif (DIRECT_VFD) foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + #if (BUILD_SHARED_LIBS) + # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + #endif (BUILD_SHARED_LIBS) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -35,25 +44,41 @@ set (HDF5_TEST_FILES foreach (h5_tfile ${HDF5_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}") - #message (STATUS " Copying ${h5_tfile}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_tfile ${HDF5_TEST_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (h5_tfile ${HDF5_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}") - #message (STATUS " Copying ${h5_tfile}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_tfile ${HDF5_TEST_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -71,25 +96,41 @@ set (HDF5_REFERENCE_FILES foreach (ref_file ${HDF5_REFERENCE_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}") - #message (STATUS " Copying ${h5_file}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (ref_file ${HDF5_REFERENCE_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (ref_file ${HDF5_REFERENCE_FILES}) set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}") - #message (STATUS " Copying ${h5_file}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (ref_file ${HDF5_REFERENCE_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -126,13 +167,21 @@ set (HDF5_REFERENCE_PLIST_FILES foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) set (dest "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}") - #message (STATUS " Copying ${plistfile} to ${dset}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files/${plistfile}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) # -------------------------------------------------------------------- @@ -177,25 +226,41 @@ set (HDF5_REFERENCE_TEST_FILES foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}") - #message (STATUS " Copying ${h5_file} to ${dest}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIBSH_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES}) if (HDF5_TEST_VFD) foreach (vfdtest ${VFD_LIST}) foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}") - #message (STATUS " Copying ${h5_file} to ${dest}") add_custom_command ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} ) + if (BUILD_SHARED_LIBS) + set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}") + add_custom_command ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) + endif (BUILD_SHARED_LIBS) endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES}) endforeach (vfdtest ${VFD_LIST}) endif (HDF5_TEST_VFD) @@ -204,7 +269,7 @@ endif (HDF5_TEST_VFD) add_test ( NAME H5TEST-clear-testhdf5-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove coord.h5 dtypes10.h5 sys_file1 @@ -258,8 +323,40 @@ else (HDF5_ENABLE_USING_MEMCHECKER) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME H5TEST-shared-clear-testhdf5-objects + COMMAND ${CMAKE_COMMAND} + -E remove + coord.h5 + dtypes10.h5 + sys_file1 + tattr.h5 + tfile1.h5 + tfile2.h5 + tfile3.h5 + tfile4.h5 + tfile5.h5 + tfile6.h5 + tfile7.h5 + th5o_file + th5s1.h5 + tselect.h5 + tsohm.h5 + tsohm_dst.h5 + tsohm_src.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-testhdf5 COMMAND $) + set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES + DEPENDS H5TEST-shared-clear-testhdf5-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_USING_MEMCHECKER) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -270,7 +367,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5TEST-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove dt_arith1.h5 dt_arith2.h5 dtransform.h5 @@ -344,7 +441,7 @@ foreach (test ${H5_TESTS}) add_test (NAME H5TEST-${test} COMMAND $) endif (${test} STREQUAL "big" AND CYGWIN) set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects + DEPENDS H5TEST-clear-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -355,6 +452,97 @@ set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) +if (BUILD_SHARED_LIBS) + # Remove any output file left over from previous test run + add_test ( + NAME H5TEST-shared-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dt_arith1.h5 + dt_arith2.h5 + dtransform.h5 + dtypes3.h5 + dtypes4.h5 + dtypes5.h5 + efc0.h5 + efc1.h5 + efc2.h5 + efc3.h5 + efc4.h5 + efc5.h5 + extlinks16A00000.h5 + extlinks16A00001.h5 + extlinks16A00002.h5 + extlinks16B-b.h5 + extlinks16B-g.h5 + extlinks16B-l.h5 + extlinks16B-r.h5 + extlinks16B-s.h5 + extlinks19B00000.h5 + extlinks19B00001.h5 + extlinks19B00002.h5 + extlinks19B00003.h5 + extlinks19B00004.h5 + extlinks19B00005.h5 + extlinks19B00006.h5 + extlinks19B00007.h5 + extlinks19B00008.h5 + extlinks19B00009.h5 + extlinks19B00010.h5 + extlinks19B00011.h5 + extlinks19B00012.h5 + extlinks19B00013.h5 + extlinks19B00014.h5 + extlinks19B00015.h5 + extlinks19B00016.h5 + extlinks19B00017.h5 + extlinks19B00018.h5 + extlinks19B00019.h5 + extlinks19B00020.h5 + extlinks19B00021.h5 + extlinks19B00022.h5 + extlinks19B00023.h5 + extlinks19B00024.h5 + extlinks19B00025.h5 + extlinks19B00026.h5 + extlinks19B00027.h5 + extlinks19B00028.h5 + fheap.h5 + log_vfd_out.log + new_multi_file_v16-r.h5 + new_multi_file_v16-s.h5 + objcopy_ext.dat + testmeta.h5 + tstint1.h5 + tstint2.h5 + unregister_filter_1.h5 + unregister_filter_2.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + foreach (test ${H5_TESTS}) + if (${test} STREQUAL "big" AND CYGWIN) + add_test ( + NAME H5TEST-shared-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" + ) + else (${test} STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-shared-${test} COMMAND $) + endif (${test} STREQUAL "big" AND CYGWIN) + set_tests_properties (H5TEST-shared-${test} PROPERTIES + DEPENDS H5TEST-shared-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endforeach (test ${H5_TESTS}) + + set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1) + set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-testmeta PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800) +endif (BUILD_SHARED_LIBS) + ############################################################################## ############################################################################## ### A D D I T I O N A L T E S T S ### @@ -362,33 +550,35 @@ set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) ############################################################################## #-- Adding test for cache -add_test ( - NAME H5TEST-clear-cache-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -add_test (NAME H5TEST-cache COMMAND $) -set_tests_properties (H5TEST-cache PROPERTIES - DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) +if (NOT CYGWIN) + add_test ( + NAME H5TEST-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + add_test (NAME H5TEST-cache COMMAND $) + set_tests_properties (H5TEST-cache PROPERTIES + DEPENDS H5TEST-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) +endif (NOT CYGWIN) #-- Adding test for cache_api add_test ( NAME H5TEST-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_api_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-cache_api COMMAND $) set_tests_properties (H5TEST-cache_api PROPERTIES - DEPENDS H5TEST-clear-cache_api-objects + DEPENDS H5TEST-clear-cache_api-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -397,7 +587,7 @@ set_tests_properties (H5TEST-cache_api PROPERTIES add_test ( NAME H5TEST-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tagging_test.h5 tagging_ext_test.h5 WORKING_DIRECTORY @@ -414,7 +604,7 @@ set_tests_properties (H5TEST-cache_tagging PROPERTIES add_test ( NAME H5TEST-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ttsafe_error.h5 ttsafe_dcreate.h5 ttsafe_cancel.h5 @@ -434,7 +624,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove err_compat.txt err_compat.txt.err WORKING_DIRECTORY @@ -461,7 +651,7 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-error_test-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove error_test.txt error_test.txt.err WORKING_DIRECTORY @@ -477,7 +667,7 @@ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) -set_tests_properties (H5TEST-error_test PROPERTIES +set_tests_properties (H5TEST-error_test PROPERTIES DEPENDS H5TEST-clear-error_test-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -489,7 +679,7 @@ add_test ( COMMAND ${CMAKE_COMMAND} -E remove links_env.txt - links_env.txt.err + links_env.txt.err extlinks_env0.h5 extlinks_env1.h5 tmp/extlinks_env1.h5 @@ -521,31 +711,186 @@ add_test ( ${HDF5_TEST_BINARY_DIR}/H5TEST ) -############################################################################## -### P L U G I N T E S T S -############################################################################## if (BUILD_SHARED_LIBS) + #-- Adding test for cache + if (NOT CYGWIN) + add_test ( + NAME H5TEST-shared-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache COMMAND $) + set_tests_properties (H5TEST-shared-cache PROPERTIES + DEPENDS H5TEST-shared-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (NOT CYGWIN) + + #-- Adding test for cache_api + add_test ( + NAME H5TEST-shared-clear-cache_api-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_api_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache_api COMMAND $) + set_tests_properties (H5TEST-shared-cache_api PROPERTIES + DEPENDS H5TEST-shared-clear-cache_api-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) - if (WIN32) - set (CMAKE_SEP "\;") - else (WIN32) - set (CMAKE_SEP ":") - endif (WIN32) + #-- Adding test for cache_tagging + add_test ( + NAME H5TEST-shared-clear-cache_tagging-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tagging_test.h5 + tagging_ext_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-cache_tagging COMMAND $) + set_tests_properties (H5TEST-shared-cache_tagging PROPERTIES + DEPENDS H5TEST-shared-clear-cache_tagging-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) - add_test (NAME H5PLUGIN-plugin COMMAND $) - set_tests_properties (H5PLUGIN-plugin PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} + #-- Adding test for ttsafe + add_test ( + NAME H5TEST-shared-clear-ttsafe-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ttsafe_error.h5 + ttsafe_dcreate.h5 + ttsafe_cancel.h5 + ttsafe_acreate.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-ttsafe COMMAND $) + set_tests_properties (H5TEST-shared-ttsafe PROPERTIES + DEPENDS H5TEST-shared-clear-ttsafe-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) -else (BUILD_SHARED_LIBS) - message (STATUS " **** Plugins libraries must be built as shared libraries **** ") + + #-- Adding test for err_compat + if (HDF5_ENABLE_DEPRECATED_SYMBOLS) + add_test ( + NAME H5TEST-shared-clear-err_compat-objects + COMMAND ${CMAKE_COMMAND} + -E remove + err_compat.txt + err_compat.txt.err + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-err_compat COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=err_compat.txt" + -D "TEST_REFERENCE=err_compat_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-err_compat PROPERTIES + DEPENDS H5TEST-shared-clear-err_compat-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) + + #-- Adding test for error_test add_test ( - NAME H5PLUGIN-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" + NAME H5TEST-shared-clear-error_test-objects + COMMAND ${CMAKE_COMMAND} + -E remove + error_test.txt + error_test.txt.err + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=error_test.txt" + -D "TEST_REFERENCE=error_test_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-error_test PROPERTIES + DEPENDS H5TEST-shared-clear-error_test-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + #-- Adding test for links_env + add_test ( + NAME H5TEST-shared-clear-links_env-objects + COMMAND ${CMAKE_COMMAND} + -E remove + links_env.txt + links_env.txt.err + extlinks_env0.h5 + extlinks_env1.h5 + tmp/extlinks_env1.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX" + -D "TEST_ENV_VALUE:STRING=.:tmp" + -D "TEST_EXPECT=0" + -D "TEST_OUTPUT=links_env.txt" + -D "TEST_REFERENCE=links_env.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-links_env PROPERTIES + DEPENDS H5TEST-shared-clear-links_env-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + + #-- Adding test for libinfo + add_test ( + NAME H5TEST-shared-testlibinfo + COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$" -P "${GREP_RUNNER}" + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) endif (BUILD_SHARED_LIBS) ############################################################################## +### P L U G I N T E S T S +############################################################################## +if (WIN32) + set (CMAKE_SEP "\;") +else (WIN32) + set (CMAKE_SEP ":") +endif (WIN32) + +add_test (NAME H5PLUGIN-plugin COMMAND $) +set_tests_properties (H5PLUGIN-plugin PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +) + +############################################################################## ############################################################################## ### V F D T E S T S ### ############################################################################## @@ -560,7 +905,7 @@ if (HDF5_TEST_VFD) ohdr stab gheap - cache +# cache cache_api cache_tagging pool @@ -609,7 +954,7 @@ if (HDF5_TEST_VFD) unregister ) if (NOT CYGWIN) - set (H5_VFD_TESTS ${H5_VFD_TESTS} big) + set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache) endif (NOT CYGWIN) MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) @@ -617,13 +962,13 @@ if (HDF5_TEST_VFD) if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -631,21 +976,44 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME VFD-${vfdname}-${vfdtest} COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" + ) + endif (BUILD_SHARED_LIBS) endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -653,16 +1021,33 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) @@ -670,6 +1055,23 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) @@ -679,45 +1081,85 @@ if (HDF5_TEST_VFD) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else (WIN32) add_test ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${test} PROPERTIES ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (WIN32) endforeach (test ${H5_VFD_TESTS}) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + endif (BUILD_SHARED_LIBS) if (HDF5_TEST_FHEAP_VFD) add_test ( - NAME VFD-${vfdname}-fheap - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-fheap PROPERTIES TIMEOUT 1800 ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + if (BUILD_SHARED_LIBS) + add_test ( + NAME VFD-${vfdname}-fheap-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif (BUILD_SHARED_LIBS) endif (HDF5_TEST_FHEAP_VFD) ENDMACRO (ADD_VFD_TEST) - + # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) ADD_VFD_TEST (${vfd} 0) @@ -731,7 +1173,7 @@ endif (HDF5_TEST_VFD) ############################################################################## ############################################################################## -if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +if (HDF5_BUILD_GENERATORS) MACRO (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) TARGET_NAMING (${genfile} STATIC) @@ -767,4 +1209,4 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_H5_GENERATOR (${gen}) endforeach (gen ${H5_GENERATORS}) -endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +endif (HDF5_BUILD_GENERATORS) diff --git a/test/Makefile.in b/test/Makefile.in index d3f1b86..32f757c 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -116,7 +116,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/test/dt_arith.c b/test/dt_arith.c index 8ededc7..b3f5cad 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5032,8 +5032,32 @@ run_int_fp_conv(const char *name) #endif #endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler error in handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "unsigned long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler not handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif @@ -5134,8 +5158,40 @@ run_fp_int_conv(const char *name) #endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0 +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ +#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE) nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "unsigned long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ #endif #endif #ifndef H5_VMS diff --git a/test/mf.c b/test/mf.c index 93667de..67ebc4e 100644 --- a/test/mf.c +++ b/test/mf.c @@ -608,12 +608,12 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ h5_stat_size_t file_size, new_file_size; /* File size */ - H5FD_mem_t type; + H5FD_mem_t type; haddr_t addr; - htri_t extended; - haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF; - hsize_t ma_size=0, new_ma_size=0; - hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ + htri_t was_extended; + haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF; + hsize_t ma_size=0, new_ma_size=0; + hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("H5MF_try_extend() of file allocation: test 1"); @@ -685,9 +685,9 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) FAIL_STACK_ERROR /* should succeed */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); - if(extended <= 0) + if(was_extended <= 0) TEST_ERROR /* nothing should be changed in meta_aggr */ @@ -744,10 +744,10 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(new_ma_addr != ma_addr) TEST_ERROR - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50)); /* should not succeed */ - if(extended > 0) + if(was_extended > 0) TEST_ERROR /* nothing should be changed in meta_aggr */ @@ -1454,7 +1454,7 @@ test_mf_fs_extend(hid_t fapl) frspace_state_t state; /* State of free space*/ H5MF_sect_ud_t udata; H5FS_section_info_t *node; - htri_t extended; + htri_t was_extended; TESTING("H5MF_try_extend() of free-space manager:test 1"); @@ -1548,10 +1548,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50); /* should succeed */ - if(extended <= 0) + if(was_extended <= 0) TEST_ERROR /* Section B is removed from free-space manager */ @@ -1666,10 +1666,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10)); /* Should not be able to extend the allocated block */ - if(extended) + if(was_extended) TEST_ERROR /* free-space info should remain the same */ @@ -1779,10 +1779,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40)); /* Should succeed in extending the allocated block */ - if(extended <=0) + if(was_extended <=0) TEST_ERROR /* Should have 1 section of size=10 left in free-space manager */ @@ -1892,10 +1892,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Try to extend the allocated block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50); /* Should not succeed in extending the allocated block */ - if(extended) + if(was_extended) TEST_ERROR /* Free-space info should be the same */ @@ -3241,7 +3241,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) haddr_t new_addr, addr, saddr; haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF, sdata_addr=HADDR_UNDEF; hsize_t ma_size=0, new_ma_size=0, sdata_size=0; - htri_t extended; + htri_t was_extended; hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1"); @@ -3286,10 +3286,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* Try to extend the block by an amount < (% * aggr->alloc_size) */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3302,10 +3302,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE50); /* Try to extend the block by an amount > (% * aggr->alloc_size) but amount < aggr->alloc_size */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3318,10 +3318,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE700); /* Try to extend the block by an amount > (% * aggr->alloc_size) but amount > aggr->alloc_size */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058)); /* should succeed */ - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3384,9 +3384,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* should be able to fulfill request from the aggreqator itself */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); - if(!extended) + if(!was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3454,9 +3454,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) new_addr = addr - 10; /* unable to fulfill request from the aggreqator itself */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50)); - if(extended) + if(was_extended) TEST_ERROR H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); @@ -3772,7 +3772,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) haddr_t addr1, addr2; haddr_t ma_addr=HADDR_UNDEF; hsize_t ma_size=0; - htri_t extended; + htri_t was_extended; frspace_state_t state; hsize_t alignment=0, mis_align=0, tmp=0, accum=0; hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */ @@ -3978,9 +3978,9 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) FAIL_STACK_ERROR /* try to extend the block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30); - if (extended <=0) TEST_ERROR + if (was_extended <=0) TEST_ERROR if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -4052,7 +4052,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) haddr_t addr; frspace_state_t state; H5MF_sect_ud_t udata; - htri_t extended; + htri_t was_extended; hsize_t alignment=0, tmp=0, mis_align=0; hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */ @@ -4197,9 +4197,9 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* try to extend the block */ - extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200); + was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200); - if (extended <=0) TEST_ERROR + if (was_extended <=0) TEST_ERROR /* space should be decreased by 200, # of sections remain the same */ state.tot_space -= TEST_BLOCK_SIZE200; diff --git a/test/trefer.c b/test/trefer.c index 203b602..df4ea76 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -515,7 +515,7 @@ test_reference_region(void) hsize_t high[SPACE2_RANK]; /* Selection bounds */ hdset_reg_ref_t *wbuf, /* buffer to write to disk */ *rbuf; /* buffer read from disk */ - hdset_reg_ref_t nvrbuf[3]={{0},{101},{1000000000}}; /* buffer with non-valid refs */ + hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */ uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ *drbuf; /* Buffer for reading numeric data from disk */ uint8_t *tu8; /* Temporary pointer to uint8 data */ @@ -742,7 +742,7 @@ test_reference_region(void) VERIFY(ret, 36, "H5Sget_select_npoints"); ret = (int)H5Sget_select_hyper_nblocks(sid2); VERIFY(ret, 1, "H5Sget_select_hyper_nblocks"); - coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */ + coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */ ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); VERIFY(coords[0], 2, "Hyperslab Coordinates"); @@ -770,7 +770,7 @@ test_reference_region(void) VERIFY(ret, 10, "H5Sget_select_npoints"); ret = (int)H5Sget_select_elem_npoints(sid2); VERIFY(ret, 10, "H5Sget_select_elem_npoints"); - coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */ + coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */ ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords); CHECK(ret, FAIL, "H5Sget_select_elem_pointlist"); VERIFY(coords[0], coord1[0][0], "Element Coordinates"); diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index b02c8e2..634afe3 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -28,15 +28,15 @@ set (testphdf5_SRCS #-- Adding test for testhdf5 add_executable (testphdf5 ${testphdf5_SRCS}) -TARGET_NAMING (testphdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (testphdf5 ${LIB_TYPE} " " " ") +TARGET_NAMING (testphdf5 STATIC) +TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ") + TARGET_NAMING (${file} STATIC) + TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 5797dfc..5fb0ad8 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -104,7 +104,10 @@ TESTS = subdir = testpar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index 544ba32..a2246b6 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -241,6 +241,9 @@ file_image_daisy_chain_test(void) vector_ok = FALSE; VRFY((vector_ok), "verified received vector."); + HDfree(vector_ptr); + vector_ptr = NULL; + /* 7) closes the core file and exit. */ err = H5Sclose(space_id); diff --git a/tools/Makefile.in b/tools/Makefile.in index 0f5684d..89440ce 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -102,7 +102,10 @@ TESTS = subdir = tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index c18b1f9..63b9b5d 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -10,15 +10,15 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5copy and test executables # -------------------------------------------------------------------- add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) -TARGET_NAMING (h5copy ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5copy ${LIB_TYPE} " " " ") +TARGET_NAMING (h5copy STATIC) +TARGET_C_PROPERTIES (h5copy STATIC " " " ") target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) set (H5_DEP_EXECUTABLES h5copy) if (BUILD_TESTING) - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) TARGET_NAMING (h5copygentest STATIC) TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") @@ -26,7 +26,7 @@ if (BUILD_TESTING) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5copygentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) @@ -42,7 +42,7 @@ endif (BUILD_TESTING) #----------------------------------------------------------------------------- #INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications) - + install ( TARGETS h5copy diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 1b50662..d21b1bc 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -106,7 +106,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5copy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 0a5c813..59a3241 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -13,8 +13,8 @@ add_executable (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) -TARGET_NAMING (h5diff ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5diff ${LIB_TYPE} " " " ") +TARGET_NAMING (h5diff STATIC) +TARGET_C_PROPERTIES (h5diff STATIC " " " ") target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) @@ -25,8 +25,8 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) - TARGET_NAMING (ph5diff ${LIB_TYPE}) - TARGET_C_PROPERTIES (ph5diff ${LIB_TYPE} " " " ") + TARGET_NAMING (ph5diff STATIC) + TARGET_C_PROPERTIES (ph5diff STATIC " " " ") target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) endif (H5_HAVE_PARALLEL) @@ -35,18 +35,18 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5diff and test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c) TARGET_NAMING (h5diffgentest STATIC) TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5diffgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 7b4d121..20ddb91 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -106,7 +106,10 @@ TESTS = $(am__EXEEXT_2) $(TEST_SCRIPT) subdir = tools/h5diff ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 9d5db3f..47ba7a8 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -14,8 +14,8 @@ add_executable (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) -TARGET_NAMING (h5dump ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ") +TARGET_NAMING (h5dump STATIC) +TARGET_C_PROPERTIES (h5dump STATIC " " " ") target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) @@ -25,15 +25,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5dump test executable # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) TARGET_NAMING (h5dumpgentest STATIC) TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5dumpgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 9865e3a..4b9c88a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -107,7 +107,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5dump ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index ada3b07..b885a76 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) -TARGET_NAMING (h5import ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5import ${LIB_TYPE} " " " ") +TARGET_NAMING (h5import STATIC) +TARGET_C_PROPERTIES (h5import STATIC " " " ") target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) @@ -23,8 +23,8 @@ if (BUILD_TESTING) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) - TARGET_NAMING (h5importtest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5importtest ${LIB_TYPE} " " " ") + TARGET_NAMING (h5importtest STATIC) + TARGET_C_PROPERTIES (h5importtest STATIC " " " ") target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5importtest PROPERTIES FOLDER tools) diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index d6e784a..af933cf 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -106,7 +106,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5import ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index ceb2eb9..c01f8f7 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -10,26 +10,26 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) -TARGET_NAMING (h5jam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5jam ${LIB_TYPE} " " " ") +TARGET_NAMING (h5jam STATIC) +TARGET_C_PROPERTIES (h5jam STATIC " " " ") target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c) -TARGET_NAMING (getub ${LIB_TYPE}) -TARGET_C_PROPERTIES (getub ${LIB_TYPE} " " " ") +TARGET_NAMING (getub STATIC) +TARGET_C_PROPERTIES (getub STATIC " " " ") target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c) -TARGET_NAMING (tellub ${LIB_TYPE}) -TARGET_C_PROPERTIES (tellub ${LIB_TYPE} " " " ") +TARGET_NAMING (tellub STATIC) +TARGET_C_PROPERTIES (tellub STATIC " " " ") target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c) -TARGET_NAMING (h5unjam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5unjam ${LIB_TYPE} " " " ") +TARGET_NAMING (h5unjam STATIC) +TARGET_C_PROPERTIES (h5unjam STATIC " " " ") target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) @@ -44,15 +44,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5jam test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c) - TARGET_NAMING (h5jamgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") + TARGET_NAMING (h5jamgentest STATIC) + TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5jamgentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index c915437..0011e8e 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -106,7 +106,10 @@ TESTS = $(TEST_SCRIPT) subdir = tools/h5jam ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 116f735..4e96db2 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) -TARGET_NAMING (h5ls ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5ls ${LIB_TYPE} " " " ") +TARGET_NAMING (h5ls STATIC) +TARGET_C_PROPERTIES (h5ls STATIC " " " ") target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 8fb9822..a9fafe8 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -105,7 +105,10 @@ TESTS = $(TEST_SCRIPT) subdir = tools/h5ls ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 3b31078..7631ae8 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -21,8 +21,8 @@ set (REPACK_COMMON_SRCS ) add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) -TARGET_NAMING (h5repack ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repack ${LIB_TYPE} " " " ") +TARGET_NAMING (h5repack STATIC) +TARGET_C_PROPERTIES (h5repack STATIC " " " ") target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) @@ -33,54 +33,52 @@ if (BUILD_TESTING) # Add h5Repack test executables # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) - TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE}) - TARGET_C_PROPERTIES (testh5repack_detect_szip ${LIB_TYPE} " " " ") + TARGET_NAMING (testh5repack_detect_szip STATIC) + TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ") target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) - TARGET_NAMING (h5repacktest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repacktest ${LIB_TYPE} " " " ") + TARGET_NAMING (h5repacktest STATIC) + TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) #----------------------------------------------------------------------------- # If plugin library tests can be tested #----------------------------------------------------------------------------- - if (BUILD_SHARED_LIBS) - set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") - set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) + set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") + set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") + set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) + add_definitions (${HDF_EXTRA_C_FLAGS}) + INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS ( - ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} - SHARED - HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE - HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG - ) + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + H5_SET_LIB_OPTIONS ( + ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} + SHARED + HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE + HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG + ) - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + # make plugins dir + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + #----------------------------------------------------------------------------- + # Copy plugin library to a plugins folder + #----------------------------------------------------------------------------- + add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" - ) - endif (BUILD_SHARED_LIBS) + ) include (CMakeTests.cmake) - + endif (BUILD_TESTING) ############################################################################## diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index efaa6e5..dee97ed 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -992,16 +992,8 @@ ############################################################################## ### P L U G I N T E S T S ############################################################################## -if (BUILD_SHARED_LIBS) ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) -else (BUILD_SHARED_LIBS) - message (STATUS " **** Plugins libraries must be built as shared libraries **** ") - add_test ( - NAME H5REPACK-plugin - COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" - ) -endif (BUILD_SHARED_LIBS) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index c0b6685..1ba4c63 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -109,7 +109,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5repack ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 66c8c7e..71c4741 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_NAMING (h5stat ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5stat ${LIB_TYPE} " " " ") +TARGET_NAMING (h5stat STATIC) +TARGET_C_PROPERTIES (h5stat STATIC " " " ") target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) @@ -21,15 +21,15 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5stat test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c) TARGET_NAMING (h5stat_gentest STATIC) TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5stat_gentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) endif (BUILD_TESTING) diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 6bf37f3..b9d2510 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -107,7 +107,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5stat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index a103f3d..38c84a2 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -37,21 +37,43 @@ set (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) -TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ") +add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) +TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS ( ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} - ${LIB_TYPE} + STATIC HDF5_TOOLS_LIB_NAME_RELEASE HDF5_TOOLS_LIB_NAME_DEBUG ) -#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG) -set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES +set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) +#set_property (TARGET ${HDF5_TOOLS_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) +set (install_targets ${HDF5_TOOLS_LIB_TARGET}) + +if (BUILD_SHARED_LIBS) + add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) + TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS ( + ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} + SHARED + HDF5_TOOLS_LIB_NAME_RELEASE + HDF5_TOOLS_LIB_NAME_DEBUG + ) + set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES + FOLDER libraries/tools + COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 + ) + #set_property (TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) + set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET}) +endif (BUILD_SHARED_LIBS) ############################################################################## ############################################################################## @@ -76,12 +98,12 @@ install ( #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries) + INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries) endif (BUILD_SHARED_LIBS) install ( TARGETS - ${HDF5_TOOLS_LIB_TARGET} + ${install_targets} EXPORT ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index fcfb019..52debb4 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -104,7 +104,10 @@ TESTS = $(am__EXEEXT_1) subdir = tools/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 0bab2e6..d53cdc8 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -11,20 +11,20 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) -TARGET_NAMING (h5debug ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5debug ${LIB_TYPE} " " " ") +TARGET_NAMING (h5debug STATIC) +TARGET_C_PROPERTIES (h5debug STATIC " " " ") target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) -TARGET_NAMING (h5repart ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repart ${LIB_TYPE} " " " ") +TARGET_NAMING (h5repart STATIC) +TARGET_C_PROPERTIES (h5repart STATIC " " " ") target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) -TARGET_NAMING (h5mkgrp ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5mkgrp ${LIB_TYPE} " " " ") +TARGET_NAMING (h5mkgrp STATIC) +TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ") target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) @@ -45,18 +45,18 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the misc test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + if (HDF5_BUILD_GENERATORS) add_executable (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c) TARGET_NAMING (h5repart_gentest STATIC) TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) - endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + endif (HDF5_BUILD_GENERATORS) add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) - TARGET_NAMING (h5repart_test ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repart_test ${LIB_TYPE} " " " ") + TARGET_NAMING (h5repart_test STATIC) + TARGET_C_PROPERTIES (h5repart_test STATIC " " " ") target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 2688e8d..639764f 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -108,7 +108,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/misc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index 17b40fa..3a60a84 100644 --- a/tools/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -21,8 +21,8 @@ set (h5perf_serial_SRCS ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial ${h5perf_serial_SRCS}) -TARGET_NAMING (h5perf_serial ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5perf_serial ${LIB_TYPE} " " " ") +TARGET_NAMING (h5perf_serial STATIC) +TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) @@ -33,8 +33,8 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS}) - TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_serial_alone ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf_serial_alone STATIC) + TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_serial_alone @@ -47,8 +47,8 @@ set (chunk_SRCS ${HDF5_PERFORM_SOURCE_DIR}/chunk.c ) ADD_EXECUTABLE(chunk ${chunk_SRCS}) -TARGET_NAMING (chunk ${LIB_TYPE}) -TARGET_C_PROPERTIES (chunk ${LIB_TYPE} " " " ") +TARGET_NAMING (chunk STATIC) +TARGET_C_PROPERTIES (chunk STATIC " " " ") TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) @@ -57,8 +57,8 @@ set (iopipe_SRCS ${HDF5_PERFORM_SOURCE_DIR}/iopipe.c ) add_executable (iopipe ${iopipe_SRCS}) -TARGET_NAMING (iopipe ${LIB_TYPE}) -TARGET_C_PROPERTIES (iopipe ${LIB_TYPE} " " " ") +TARGET_NAMING (iopipe STATIC) +TARGET_C_PROPERTIES (iopipe STATIC " " " ") target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) @@ -67,8 +67,8 @@ set (overhead_SRCS ${HDF5_PERFORM_SOURCE_DIR}/overhead.c ) add_executable (overhead ${overhead_SRCS}) -TARGET_NAMING (overhead ${LIB_TYPE}) -TARGET_C_PROPERTIES (overhead ${LIB_TYPE} " " " ") +TARGET_NAMING (overhead STATIC) +TARGET_C_PROPERTIES (overhead STATIC " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) @@ -78,8 +78,8 @@ if (BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c ) add_executable (perf_meta ${perf_meta_SRCS}) - TARGET_NAMING (perf_meta ${LIB_TYPE}) - TARGET_C_PROPERTIES (perf_meta ${LIB_TYPE} " " " ") + TARGET_NAMING (perf_meta STATIC) + TARGET_C_PROPERTIES (perf_meta STATIC " " " ") target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (perf_meta PROPERTIES FOLDER perform) endif (BUILD_TESTING) @@ -89,8 +89,8 @@ set (zip_perf_SRCS ${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c ) add_executable (zip_perf ${zip_perf_SRCS}) -TARGET_NAMING (zip_perf ${LIB_TYPE}) -TARGET_C_PROPERTIES (zip_perf ${LIB_TYPE} " " " ") +TARGET_NAMING (zip_perf STATIC) +TARGET_C_PROPERTIES (zip_perf STATIC " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) @@ -101,8 +101,8 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf ${h5perf_SRCS}) - TARGET_NAMING (h5perf ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf STATIC) + TARGET_C_PROPERTIES (h5perf STATIC " " " ") target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) @@ -113,8 +113,8 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SRCS}) - TARGET_NAMING (h5perf_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_alone ${LIB_TYPE} " " " ") + TARGET_NAMING (h5perf_alone STATIC) + TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_alone diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 4804533..4e09c08 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -112,7 +112,10 @@ TESTS = $(am__EXEEXT_3) subdir = tools/perform ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -- cgit v0.12 From 2bed6a9a489fa794c688f4d7a3eda137a7bbd177 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Wed, 5 Aug 2015 23:26:06 -0500 Subject: [svn-r27471] Description: Put "" around PROJECT_NUMBER string, otherwise, Doxygen would remove all the spaces when displaying. Platform tested: Re-run Doxygen on cpp_doc_config and verified the html files on a Windows 7 machine. --- c++/src/cpp_doc_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 53d9a7d..13be130 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = HDF5 version 1.9.227 currently under development +PROJECT_NUMBER = "HDF5 version 1.9.227 currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v0.12 From 9ed36ea1f71348ac861749a49252679fb8005028 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Thu, 6 Aug 2015 10:51:38 -0500 Subject: [svn-r27473] Description: Reversed the previous commit because the PROJECT_NUMBER string is generated by h5vers and Larry will fix h5vers to put the "" in. --- c++/src/cpp_doc_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 13be130..53d9a7d 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "HDF5 version 1.9.227 currently under development" +PROJECT_NUMBER = HDF5 version 1.9.227 currently under development # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v0.12 From 786acbcd9004fd596b84cbc7405df2d6dc0b9bc5 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 6 Aug 2015 13:34:42 -0500 Subject: [svn-r27475] Updated h5vers to remove redundant version information for doxygen web pages. Also added "" around version string to prevent elimination of spaces in the string. H5committested. --- bin/h5vers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/h5vers b/bin/h5vers index 2aa8023..2fe9105 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -317,7 +317,7 @@ if ($RELEASE) { # Update the c++/src/cpp_doc_config file if ($CPP_DOC_CONFIG) { my $data = read_file($CPP_DOC_CONFIG); - my $version_string = sprintf("HDF5 version %d.%d.%d%s %s", + my $version_string = sprintf("\"%d.%d.%d%s %s\"", @newver[0,1,2], $newver[3] eq "" ? "" : "-".$newver[3], "currently under development"); -- cgit v0.12 From 1900d6a65db0bebcadbcbf98f8a8a9e1d9ff47b4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 10 Aug 2015 12:34:11 -0500 Subject: [svn-r27485] Change ExpressTest from default of 1 to 2. --- test/CMakeTests.cmake | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 03ce5e3..5fe51ed 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -269,7 +269,7 @@ endif (HDF5_TEST_VFD) add_test ( NAME H5TEST-clear-testhdf5-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove coord.h5 dtypes10.h5 sys_file1 @@ -327,7 +327,7 @@ else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5TEST-shared-clear-testhdf5-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove coord.h5 dtypes10.h5 sys_file1 @@ -356,7 +356,7 @@ else (HDF5_ENABLE_USING_MEMCHECKER) ) endif (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_USING_MEMCHECKER) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -367,7 +367,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5TEST-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove dt_arith1.h5 dt_arith2.h5 dtransform.h5 @@ -441,7 +441,7 @@ foreach (test ${H5_TESTS}) add_test (NAME H5TEST-${test} COMMAND $) endif (${test} STREQUAL "big" AND CYGWIN) set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects + DEPENDS H5TEST-clear-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -457,7 +457,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove dt_arith1.h5 dt_arith2.h5 dtransform.h5 @@ -531,7 +531,7 @@ if (BUILD_SHARED_LIBS) add_test (NAME H5TEST-shared-${test} COMMAND $) endif (${test} STREQUAL "big" AND CYGWIN) set_tests_properties (H5TEST-shared-${test} PROPERTIES - DEPENDS H5TEST-shared-clear-objects + DEPENDS H5TEST-shared-clear-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -554,7 +554,7 @@ if (NOT CYGWIN) add_test ( NAME H5TEST-clear-cache-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -562,7 +562,7 @@ if (NOT CYGWIN) add_test (NAME H5TEST-cache COMMAND $) set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) endif (NOT CYGWIN) @@ -571,14 +571,14 @@ endif (NOT CYGWIN) add_test ( NAME H5TEST-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_api_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-cache_api COMMAND $) set_tests_properties (H5TEST-cache_api PROPERTIES - DEPENDS H5TEST-clear-cache_api-objects + DEPENDS H5TEST-clear-cache_api-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -587,7 +587,7 @@ set_tests_properties (H5TEST-cache_api PROPERTIES add_test ( NAME H5TEST-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tagging_test.h5 tagging_ext_test.h5 WORKING_DIRECTORY @@ -604,7 +604,7 @@ set_tests_properties (H5TEST-cache_tagging PROPERTIES add_test ( NAME H5TEST-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ttsafe_error.h5 ttsafe_dcreate.h5 ttsafe_cancel.h5 @@ -624,7 +624,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove err_compat.txt err_compat.txt.err WORKING_DIRECTORY @@ -651,7 +651,7 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-error_test-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove error_test.txt error_test.txt.err WORKING_DIRECTORY @@ -667,7 +667,7 @@ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) -set_tests_properties (H5TEST-error_test PROPERTIES +set_tests_properties (H5TEST-error_test PROPERTIES DEPENDS H5TEST-clear-error_test-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -679,7 +679,7 @@ add_test ( COMMAND ${CMAKE_COMMAND} -E remove links_env.txt - links_env.txt.err + links_env.txt.err extlinks_env0.h5 extlinks_env1.h5 tmp/extlinks_env1.h5 @@ -717,7 +717,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-cache-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared @@ -725,7 +725,7 @@ if (BUILD_SHARED_LIBS) add_test (NAME H5TEST-shared-cache COMMAND $) set_tests_properties (H5TEST-shared-cache PROPERTIES DEPENDS H5TEST-shared-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) endif (NOT CYGWIN) @@ -734,14 +734,14 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_api_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) add_test (NAME H5TEST-shared-cache_api COMMAND $) set_tests_properties (H5TEST-shared-cache_api PROPERTIES - DEPENDS H5TEST-shared-clear-cache_api-objects + DEPENDS H5TEST-shared-clear-cache_api-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -750,7 +750,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tagging_test.h5 tagging_ext_test.h5 WORKING_DIRECTORY @@ -767,7 +767,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ttsafe_error.h5 ttsafe_dcreate.h5 ttsafe_cancel.h5 @@ -787,7 +787,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove err_compat.txt err_compat.txt.err WORKING_DIRECTORY @@ -814,7 +814,7 @@ if (BUILD_SHARED_LIBS) add_test ( NAME H5TEST-shared-clear-error_test-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove error_test.txt error_test.txt.err WORKING_DIRECTORY @@ -830,7 +830,7 @@ if (BUILD_SHARED_LIBS) -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5TEST-shared-error_test PROPERTIES + set_tests_properties (H5TEST-shared-error_test PROPERTIES DEPENDS H5TEST-shared-clear-error_test-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared @@ -842,7 +842,7 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} -E remove links_env.txt - links_env.txt.err + links_env.txt.err extlinks_env0.h5 extlinks_env1.h5 tmp/extlinks_env1.h5 @@ -962,7 +962,7 @@ if (HDF5_TEST_VFD) if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -978,7 +978,7 @@ if (HDF5_TEST_VFD) ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-${test}-shared + NAME VFD-${vfdname}-${test}-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1000,14 +1000,14 @@ if (HDF5_TEST_VFD) ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-${test}-shared + NAME VFD-${vfdname}-${test}-shared COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" ) endif (BUILD_SHARED_LIBS) endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1023,7 +1023,7 @@ if (HDF5_TEST_VFD) ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-${test}-shared + NAME VFD-${vfdname}-${test}-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1041,7 +1041,7 @@ if (HDF5_TEST_VFD) endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1052,12 +1052,12 @@ if (HDF5_TEST_VFD) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-${vfdtest}-shared + NAME VFD-${vfdname}-${vfdtest}-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1068,7 +1068,7 @@ if (HDF5_TEST_VFD) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) endif (BUILD_SHARED_LIBS) @@ -1081,7 +1081,7 @@ if (HDF5_TEST_VFD) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else (WIN32) add_test ( - NAME VFD-${vfdname}-${test} + NAME VFD-${vfdname}-${test} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1097,7 +1097,7 @@ if (HDF5_TEST_VFD) ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-${test}-shared + NAME VFD-${vfdname}-${test}-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1124,7 +1124,7 @@ if (HDF5_TEST_VFD) endif (BUILD_SHARED_LIBS) if (HDF5_TEST_FHEAP_VFD) add_test ( - NAME VFD-${vfdname}-fheap + NAME VFD-${vfdname}-fheap COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1136,12 +1136,12 @@ if (HDF5_TEST_VFD) ) set_tests_properties (VFD-${vfdname}-fheap PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) if (BUILD_SHARED_LIBS) add_test ( - NAME VFD-${vfdname}-fheap-shared + NAME VFD-${vfdname}-fheap-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -1153,13 +1153,13 @@ if (HDF5_TEST_VFD) ) set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) endif (BUILD_SHARED_LIBS) endif (HDF5_TEST_FHEAP_VFD) ENDMACRO (ADD_VFD_TEST) - + # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) ADD_VFD_TEST (${vfd} 0) -- cgit v0.12 From 3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Aug 2015 20:22:33 -0500 Subject: [svn-r27489] reverted merge of branch --- CMakeLists.txt | 1 - MANIFEST | 174 +- Makefile.in | 27 +- c++/Makefile.in | 27 +- c++/examples/Makefile.in | 27 +- c++/src/Makefile.in | 29 +- c++/test/Makefile.in | 29 +- config/cmake/ConfigureChecks.cmake | 11 - config/cmake/H5pubconf.h.in | 12 - config/cmake/HDF518_Examples.cmake.in | 3 +- config/cmake/HDF5UseFortran.cmake | 491 - config/cmake/hdf5-config.cmake.in | 1 + config/cmake/libhdf5.settings.cmake.in | 1 + config/cmake/mccacheinit.cmake | 2 + configure | 14995 +++++++++---------- configure.ac | 295 +- examples/Makefile.in | 27 +- fortran/Makefile.in | 27 +- fortran/doc/DevelGuide/masterindex.html | 589 + fortran/doc/DevelGuide/robo_functions.html | 39 + fortran/doc/DevelGuide/robo_modules.html | 117 + fortran/doc/DevelGuide/robo_programs.html | 39 + fortran/doc/DevelGuide/robo_sourcefiles.html | 309 + fortran/doc/DevelGuide/robo_subroutines.html | 421 + fortran/doc/DevelGuide/robodoc.css | 302 + fortran/doc/DevelGuide/src/H5Af_c.html | 41 + fortran/doc/DevelGuide/src/H5Aff_F03_f90.html | 130 + fortran/doc/DevelGuide/src/H5Aff_F90_f90.html | 56 + fortran/doc/DevelGuide/src/H5Aff_f90.html | 1102 ++ fortran/doc/DevelGuide/src/H5Df_c.html | 41 + fortran/doc/DevelGuide/src/H5Dff_F03_f90.html | 138 + fortran/doc/DevelGuide/src/H5Dff_F90_f90.html | 116 + fortran/doc/DevelGuide/src/H5Dff_f90.html | 506 + fortran/doc/DevelGuide/src/H5Ef_c.html | 41 + fortran/doc/DevelGuide/src/H5Eff_f90.html | 197 + fortran/doc/DevelGuide/src/H5FDmpiof_c.html | 41 + fortran/doc/DevelGuide/src/H5FDmpioff_f90.html | 253 + fortran/doc/DevelGuide/src/H5Ff_c.html | 41 + fortran/doc/DevelGuide/src/H5Fff_f90.html | 653 + fortran/doc/DevelGuide/src/H5Gf_c.html | 41 + fortran/doc/DevelGuide/src/H5Gff_f90.html | 840 ++ fortran/doc/DevelGuide/src/H5If_c.html | 41 + fortran/doc/DevelGuide/src/H5Iff_f90.html | 304 + fortran/doc/DevelGuide/src/H5Lf_c.html | 41 + fortran/doc/DevelGuide/src/H5Lff_F03_f90.html | 181 + fortran/doc/DevelGuide/src/H5Lff_F90_f90.html | 50 + fortran/doc/DevelGuide/src/H5Lff_f90.html | 637 + fortran/doc/DevelGuide/src/H5Of_c.html | 41 + fortran/doc/DevelGuide/src/H5Off_f90.html | 198 + fortran/doc/DevelGuide/src/H5Pf_c.html | 41 + fortran/doc/DevelGuide/src/H5Pff_F03_f90.html | 832 + fortran/doc/DevelGuide/src/H5Pff_F90_f90.html | 715 + fortran/doc/DevelGuide/src/H5Pff_f90.html | 4752 ++++++ fortran/doc/DevelGuide/src/H5Rf_c.html | 41 + fortran/doc/DevelGuide/src/H5Rff_F03_f90.html | 492 + fortran/doc/DevelGuide/src/H5Rff_F90_f90.html | 305 + fortran/doc/DevelGuide/src/H5Rff_f90.html | 148 + fortran/doc/DevelGuide/src/H5Sf_c.html | 41 + fortran/doc/DevelGuide/src/H5Sff_f90.html | 1165 ++ fortran/doc/DevelGuide/src/H5Tf_c.html | 41 + fortran/doc/DevelGuide/src/H5Tff_f90.html | 2378 +++ fortran/doc/DevelGuide/src/H5Zf_c.html | 41 + fortran/doc/DevelGuide/src/H5Zff_f90.html | 173 + .../src/H5_DBLE_InterfaceExclude_f90.html | 53 + .../src/H5_DBLE_InterfaceInclude_f90.html | 54 + fortran/doc/DevelGuide/src/H5_f_c.html | 41 + fortran/doc/DevelGuide/src/H5_ff_F03_f90.html | 83 + fortran/doc/DevelGuide/src/H5_ff_F90_f90.html | 48 + fortran/doc/DevelGuide/src/H5_ff_f90.html | 269 + fortran/doc/DevelGuide/src/H5f90global_f90.html | 61 + fortran/doc/DevelGuide/src/H5f90kit_c.html | 44 + fortran/doc/DevelGuide/src/H5match_types_c.html | 49 + .../doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html | 61 + fortran/doc/DevelGuide/src/H5test_kind_f90.html | 62 + fortran/doc/DevelGuide/src/HDF5_f90.html | 47 + fortran/doc/DevelGuide/src/HDF5mpio_f90.html | 45 + fortran/doc/DevelGuide/test/fflush1_f90.html | 47 + fortran/doc/DevelGuide/test/fflush2_f90.html | 47 + .../DevelGuide/test/fortranlib_test_1_8_f90.html | 44 + .../DevelGuide/test/fortranlib_test_F03_f90.html | 45 + .../doc/DevelGuide/test/fortranlib_test_f90.html | 44 + fortran/doc/DevelGuide/test/tF2003_f90.html | 53 + fortran/doc/DevelGuide/test/tH5A_1_8_f90.html | 51 + fortran/doc/DevelGuide/test/tH5A_f90.html | 47 + fortran/doc/DevelGuide/test/tH5D_f90.html | 52 + fortran/doc/DevelGuide/test/tH5E_f90.html | 51 + fortran/doc/DevelGuide/test/tH5F_f90.html | 47 + fortran/doc/DevelGuide/test/tH5G_1_8_f90.html | 49 + fortran/doc/DevelGuide/test/tH5G_f90.html | 47 + fortran/doc/DevelGuide/test/tH5I_f90.html | 47 + fortran/doc/DevelGuide/test/tH5O_f90.html | 47 + fortran/doc/DevelGuide/test/tH5P_f90.html | 47 + fortran/doc/DevelGuide/test/tH5R_f90.html | 51 + fortran/doc/DevelGuide/test/tH5S_f90.html | 54 + fortran/doc/DevelGuide/test/tH5Sselect_f90.html | 56 + fortran/doc/DevelGuide/test/tH5T_f90.html | 47 + fortran/doc/DevelGuide/test/tH5VL_f90.html | 47 + fortran/doc/DevelGuide/test/tH5Z_f90.html | 47 + fortran/doc/DevelGuide/test/t_c.html | 44 + fortran/doc/DevelGuide/test/tf_f90.html | 48 + fortran/doc/DevelGuide/toc_index.html | 552 + fortran/examples/CMakeLists.txt | 54 +- fortran/examples/Makefile.am | 12 +- fortran/examples/Makefile.in | 51 +- fortran/examples/nested_derived_type.f90 | 12 +- fortran/examples/rwdset_fortran2003.f90 | 24 +- fortran/src/CMakeLists.txt | 239 +- fortran/src/H5Af.c | 1478 +- fortran/src/H5Aff.F90 | 1873 --- fortran/src/H5Aff.f90 | 1673 +++ fortran/src/H5Aff_F03.f90 | 1267 ++ fortran/src/H5Aff_F90.f90 | 1618 ++ fortran/src/H5Df.c | 1646 +- fortran/src/H5Dff.F90 | 1878 --- fortran/src/H5Dff.f90 | 1035 ++ fortran/src/H5Dff_F03.f90 | 2389 +++ fortran/src/H5Dff_F90.f90 | 3004 ++++ fortran/src/H5Ef.c | 65 +- fortran/src/H5Eff.F90 | 302 - fortran/src/H5Eff.f90 | 251 + fortran/src/H5Eff_F03.f90 | 108 + fortran/src/H5Eff_F90.f90 | 89 + fortran/src/H5FDmpiof.c | 258 + fortran/src/H5FDmpioff.f90 | 212 + fortran/src/H5Ff.c | 238 +- fortran/src/H5Fff.F90 | 871 -- fortran/src/H5Fff.f90 | 834 ++ fortran/src/H5Fff_F03.f90 | 99 + fortran/src/H5Fff_F90.f90 | 43 + fortran/src/H5Gf.c | 393 +- fortran/src/H5Gff.F90 | 1272 -- fortran/src/H5Gff.f90 | 1331 ++ fortran/src/H5If.c | 104 +- fortran/src/H5Iff.F90 | 345 - fortran/src/H5Iff.f90 | 352 + fortran/src/H5Lf.c | 324 +- fortran/src/H5Lff.F90 | 1478 -- fortran/src/H5Lff.f90 | 1300 ++ fortran/src/H5Lff_F03.f90 | 242 + fortran/src/H5Lff_F90.f90 | 39 + fortran/src/H5Of.c | 86 +- fortran/src/H5Off.F90 | 1149 -- fortran/src/H5Off.f90 | 775 + fortran/src/H5Off_F03.f90 | 435 + fortran/src/H5Off_F90.f90 | 39 + fortran/src/H5Pf.c | 2657 ++-- fortran/src/H5Pff.F90 | 7327 --------- fortran/src/H5Pff.f90 | 6400 ++++++++ fortran/src/H5Pff_F03.f90 | 1267 ++ fortran/src/H5Pff_F90.f90 | 949 ++ fortran/src/H5Rf.c | 338 +- fortran/src/H5Rff.F90 | 792 - fortran/src/H5Rff.f90 | 128 + fortran/src/H5Rff_F03.f90 | 719 + fortran/src/H5Rff_F90.f90 | 514 + fortran/src/H5Sf.c | 554 +- fortran/src/H5Sff.F90 | 1754 --- fortran/src/H5Sff.f90 | 1875 +++ fortran/src/H5Tf.c | 681 +- fortran/src/H5Tff.F90 | 3082 ---- fortran/src/H5Tff.f90 | 3105 ++++ fortran/src/H5Tff_F03.f90 | 223 + fortran/src/H5Tff_F90.f90 | 95 + fortran/src/H5Zf.c | 44 +- fortran/src/H5Zff.F90 | 189 - fortran/src/H5Zff.f90 | 198 + fortran/src/H5_DBLE_InterfaceExclude.f90 | 39 + fortran/src/H5_DBLE_InterfaceInclude.f90 | 1859 +++ fortran/src/H5_buildiface.F90 | 1024 -- fortran/src/H5_f.c | 275 +- fortran/src/H5_ff.F90 | 451 - fortran/src/H5_ff.f90 | 409 + fortran/src/H5_ff_F03.f90 | 75 + fortran/src/H5_ff_F90.f90 | 34 + fortran/src/H5config_f.inc.cmake | 84 - fortran/src/H5config_f.inc.in | 59 - fortran/src/H5f90global.F90 | 1040 -- fortran/src/H5f90global.f90 | 947 ++ fortran/src/H5f90kit.c | 32 +- fortran/src/H5f90proto.h | 1468 +- fortran/src/H5fort_type_defines.h.in | 16 - fortran/src/H5match_types.c | 577 +- fortran/src/H5test_kind.f90 | 269 + fortran/src/H5test_kind_SIZEOF.f90 | 228 + fortran/src/H5test_kind_STORAGE_SIZE.f90 | 230 + fortran/src/HDF5.F90 | 46 - fortran/src/HDF5.f90 | 56 + fortran/src/HDF5mpio.f90 | 55 + fortran/src/Makefile.am | 157 +- fortran/src/Makefile.in | 306 +- fortran/src/hdf5_fortrandll.def.in | 272 +- fortran/test/CMakeLists.txt | 143 +- fortran/test/H5_test_buildiface.F90 | 306 - fortran/test/Makefile.am | 61 +- fortran/test/Makefile.in | 224 +- fortran/test/fflush2.f90 | 297 +- fortran/test/tH5A.f90 | 19 +- fortran/test/tH5A_1_8.f90 | 177 +- fortran/test/tH5D.f90 | 950 +- fortran/test/tH5E_F03.f90 | 19 +- fortran/test/tH5F_F03.f90 | 13 +- fortran/test/tH5G_1_8.f90 | 207 +- fortran/test/tH5I.f90 | 10 +- fortran/test/tH5L_F03.f90 | 27 +- fortran/test/tH5MISC_1_8.f90 | 53 +- fortran/test/tH5O.f90 | 56 +- fortran/test/tH5O_F03.f90 | 4 +- fortran/test/tH5P.f90 | 71 +- fortran/test/tH5P_F03.f90 | 65 +- fortran/test/tH5R.f90 | 37 +- fortran/test/tH5S.f90 | 6 +- fortran/test/tH5Sselect.f90 | 219 +- fortran/test/tH5T.f90 | 259 +- fortran/test/tH5T_F03.F90 | 3425 ----- fortran/test/tH5T_F03.f90 | 3453 +++++ fortran/test/tH5VL.f90 | 30 +- fortran/test/tHDF5.f90 | 1 - fortran/test/tf.F90 | 412 - fortran/test/tf.f90 | 393 + fortran/test/tf_F03.f90 | 128 + fortran/test/tf_F08.f90 | 128 + fortran/test/tf_F90.f90 | 33 + fortran/testpar/Makefile.in | 29 +- hl/Makefile.in | 27 +- hl/c++/Makefile.in | 27 +- hl/c++/examples/Makefile.in | 27 +- hl/c++/src/Makefile.in | 29 +- hl/c++/test/Makefile.in | 29 +- hl/examples/Makefile.in | 27 +- hl/fortran/Makefile.in | 27 +- hl/fortran/examples/Makefile.in | 27 +- hl/fortran/src/CMakeLists.txt | 72 +- hl/fortran/src/H5DSfc.c | 36 +- hl/fortran/src/H5DSff.F90 | 518 - hl/fortran/src/H5DSff.f90 | 545 + hl/fortran/src/H5HL_buildiface.F90 | 683 - hl/fortran/src/H5IMfc.c | 24 +- hl/fortran/src/H5IMff.F90 | 667 - hl/fortran/src/H5IMff.f90 | 783 + hl/fortran/src/H5LTf90proto.h | 1380 +- hl/fortran/src/H5LTfc.c | 1428 +- hl/fortran/src/H5LTff.F90 | 1912 --- hl/fortran/src/H5LTff.f90 | 6490 ++++++++ hl/fortran/src/H5TBfc.c | 307 +- hl/fortran/src/H5TBff.F90 | 848 -- hl/fortran/src/H5TBff.f90 | 1900 +++ hl/fortran/src/Makefile.am | 36 +- hl/fortran/src/Makefile.in | 148 +- hl/fortran/src/hdf5_hl_fortrandll.def.in | 88 - hl/fortran/test/CMakeLists.txt | 16 +- hl/fortran/test/Makefile.am | 8 +- hl/fortran/test/Makefile.in | 68 +- hl/fortran/test/tstds.F90 | 353 - hl/fortran/test/tstds.f90 | 353 + hl/fortran/test/tstimage.F90 | 339 - hl/fortran/test/tstimage.f90 | 339 + hl/fortran/test/tstlite.F90 | 1719 --- hl/fortran/test/tstlite.f90 | 1628 ++ hl/fortran/test/tsttable.F90 | 534 - hl/fortran/test/tsttable.f90 | 466 + hl/src/Makefile.in | 29 +- hl/test/Makefile.in | 29 +- hl/tools/Makefile.in | 27 +- hl/tools/gif2h5/Makefile.in | 29 +- m4/aclocal_fc.m4 | 345 +- src/H5config.h.in | 54 - src/Makefile.in | 28 +- src/libhdf5.settings.in | 1 + test/Makefile.in | 29 +- testpar/Makefile.in | 29 +- tools/Makefile.in | 27 +- tools/h5copy/Makefile.in | 29 +- tools/h5diff/Makefile.in | 29 +- tools/h5dump/Makefile.in | 29 +- tools/h5import/Makefile.in | 29 +- tools/h5jam/Makefile.in | 29 +- tools/h5ls/Makefile.in | 29 +- tools/h5repack/Makefile.in | 29 +- tools/h5stat/Makefile.in | 29 +- tools/lib/Makefile.in | 29 +- tools/misc/Makefile.in | 29 +- tools/perform/Makefile.in | 29 +- 282 files changed, 95126 insertions(+), 52687 deletions(-) delete mode 100644 config/cmake/HDF5UseFortran.cmake create mode 100644 fortran/doc/DevelGuide/masterindex.html create mode 100644 fortran/doc/DevelGuide/robo_functions.html create mode 100644 fortran/doc/DevelGuide/robo_modules.html create mode 100644 fortran/doc/DevelGuide/robo_programs.html create mode 100644 fortran/doc/DevelGuide/robo_sourcefiles.html create mode 100644 fortran/doc/DevelGuide/robo_subroutines.html create mode 100644 fortran/doc/DevelGuide/robodoc.css create mode 100644 fortran/doc/DevelGuide/src/H5Af_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Aff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Aff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Aff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Df_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Dff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Dff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Dff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Ef_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Eff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5FDmpiof_c.html create mode 100644 fortran/doc/DevelGuide/src/H5FDmpioff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Ff_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Fff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Gf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Gff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5If_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Iff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Lf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Lff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Lff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Lff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Of_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Off_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Pf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Pff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Pff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Pff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Rf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Rff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Rff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Rff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Sf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Sff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Tf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Tff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5Zf_c.html create mode 100644 fortran/doc/DevelGuide/src/H5Zff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5_f_c.html create mode 100644 fortran/doc/DevelGuide/src/H5_ff_F03_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5_ff_F90_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5_ff_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5f90global_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5f90kit_c.html create mode 100644 fortran/doc/DevelGuide/src/H5match_types_c.html create mode 100644 fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html create mode 100644 fortran/doc/DevelGuide/src/H5test_kind_f90.html create mode 100644 fortran/doc/DevelGuide/src/HDF5_f90.html create mode 100644 fortran/doc/DevelGuide/src/HDF5mpio_f90.html create mode 100644 fortran/doc/DevelGuide/test/fflush1_f90.html create mode 100644 fortran/doc/DevelGuide/test/fflush2_f90.html create mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html create mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html create mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_f90.html create mode 100644 fortran/doc/DevelGuide/test/tF2003_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5A_1_8_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5A_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5D_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5E_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5F_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5G_1_8_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5G_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5I_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5O_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5P_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5R_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5S_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5Sselect_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5T_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5VL_f90.html create mode 100644 fortran/doc/DevelGuide/test/tH5Z_f90.html create mode 100644 fortran/doc/DevelGuide/test/t_c.html create mode 100644 fortran/doc/DevelGuide/test/tf_f90.html create mode 100644 fortran/doc/DevelGuide/toc_index.html delete mode 100644 fortran/src/H5Aff.F90 create mode 100644 fortran/src/H5Aff.f90 create mode 100644 fortran/src/H5Aff_F03.f90 create mode 100644 fortran/src/H5Aff_F90.f90 delete mode 100644 fortran/src/H5Dff.F90 create mode 100644 fortran/src/H5Dff.f90 create mode 100644 fortran/src/H5Dff_F03.f90 create mode 100644 fortran/src/H5Dff_F90.f90 delete mode 100644 fortran/src/H5Eff.F90 create mode 100644 fortran/src/H5Eff.f90 create mode 100644 fortran/src/H5Eff_F03.f90 create mode 100644 fortran/src/H5Eff_F90.f90 create mode 100644 fortran/src/H5FDmpiof.c create mode 100644 fortran/src/H5FDmpioff.f90 delete mode 100644 fortran/src/H5Fff.F90 create mode 100644 fortran/src/H5Fff.f90 create mode 100644 fortran/src/H5Fff_F03.f90 create mode 100644 fortran/src/H5Fff_F90.f90 delete mode 100644 fortran/src/H5Gff.F90 create mode 100644 fortran/src/H5Gff.f90 delete mode 100644 fortran/src/H5Iff.F90 create mode 100644 fortran/src/H5Iff.f90 delete mode 100644 fortran/src/H5Lff.F90 create mode 100644 fortran/src/H5Lff.f90 create mode 100644 fortran/src/H5Lff_F03.f90 create mode 100644 fortran/src/H5Lff_F90.f90 delete mode 100644 fortran/src/H5Off.F90 create mode 100644 fortran/src/H5Off.f90 create mode 100644 fortran/src/H5Off_F03.f90 create mode 100644 fortran/src/H5Off_F90.f90 delete mode 100644 fortran/src/H5Pff.F90 create mode 100644 fortran/src/H5Pff.f90 create mode 100644 fortran/src/H5Pff_F03.f90 create mode 100644 fortran/src/H5Pff_F90.f90 delete mode 100644 fortran/src/H5Rff.F90 create mode 100644 fortran/src/H5Rff.f90 create mode 100644 fortran/src/H5Rff_F03.f90 create mode 100644 fortran/src/H5Rff_F90.f90 delete mode 100644 fortran/src/H5Sff.F90 create mode 100644 fortran/src/H5Sff.f90 delete mode 100644 fortran/src/H5Tff.F90 create mode 100644 fortran/src/H5Tff.f90 create mode 100644 fortran/src/H5Tff_F03.f90 create mode 100644 fortran/src/H5Tff_F90.f90 delete mode 100644 fortran/src/H5Zff.F90 create mode 100644 fortran/src/H5Zff.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceExclude.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceInclude.f90 delete mode 100644 fortran/src/H5_buildiface.F90 delete mode 100644 fortran/src/H5_ff.F90 create mode 100644 fortran/src/H5_ff.f90 create mode 100644 fortran/src/H5_ff_F03.f90 create mode 100644 fortran/src/H5_ff_F90.f90 delete mode 100644 fortran/src/H5config_f.inc.cmake delete mode 100644 fortran/src/H5config_f.inc.in delete mode 100644 fortran/src/H5f90global.F90 create mode 100644 fortran/src/H5f90global.f90 delete mode 100644 fortran/src/H5fort_type_defines.h.in create mode 100644 fortran/src/H5test_kind.f90 create mode 100644 fortran/src/H5test_kind_SIZEOF.f90 create mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.f90 delete mode 100644 fortran/src/HDF5.F90 create mode 100644 fortran/src/HDF5.f90 create mode 100644 fortran/src/HDF5mpio.f90 delete mode 100644 fortran/test/H5_test_buildiface.F90 delete mode 100644 fortran/test/tH5T_F03.F90 create mode 100644 fortran/test/tH5T_F03.f90 delete mode 100644 fortran/test/tf.F90 create mode 100644 fortran/test/tf.f90 create mode 100644 fortran/test/tf_F03.f90 create mode 100644 fortran/test/tf_F08.f90 create mode 100644 fortran/test/tf_F90.f90 delete mode 100644 hl/fortran/src/H5DSff.F90 create mode 100644 hl/fortran/src/H5DSff.f90 delete mode 100644 hl/fortran/src/H5HL_buildiface.F90 delete mode 100644 hl/fortran/src/H5IMff.F90 create mode 100644 hl/fortran/src/H5IMff.f90 delete mode 100644 hl/fortran/src/H5LTff.F90 create mode 100644 hl/fortran/src/H5LTff.f90 delete mode 100644 hl/fortran/src/H5TBff.F90 create mode 100644 hl/fortran/src/H5TBff.f90 delete mode 100644 hl/fortran/src/hdf5_hl_fortrandll.def.in delete mode 100644 hl/fortran/test/tstds.F90 create mode 100644 hl/fortran/test/tstds.f90 delete mode 100644 hl/fortran/test/tstimage.F90 create mode 100644 hl/fortran/test/tstimage.f90 delete mode 100644 hl/fortran/test/tstlite.F90 create mode 100644 hl/fortran/test/tstlite.f90 delete mode 100644 hl/fortran/test/tsttable.F90 create mode 100644 hl/fortran/test/tsttable.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 799c1da..fda7d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -673,7 +673,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif (BUILD_SHARED_LIBS AND APPLE) option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) diff --git a/MANIFEST b/MANIFEST index 3629e3c..e5c002f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -162,6 +162,89 @@ ./fortran/Makefile.in ./fortran/robodoc.rc +./fortran/doc/DevelGuide/toc_index.html +./fortran/doc/DevelGuide/masterindex.html +./fortran/doc/DevelGuide/robo_subroutines.html +./fortran/doc/DevelGuide/robo_sourcefiles.html +./fortran/doc/DevelGuide/robo_functions.html +./fortran/doc/DevelGuide/robo_modules.html +./fortran/doc/DevelGuide/robo_programs.html +./fortran/doc/DevelGuide/robodoc.css +./fortran/doc/DevelGuide/test/fortranlib_test_f90.html +./fortran/doc/DevelGuide/test/tH5A_f90.html +./fortran/doc/DevelGuide/test/tH5VL_f90.html +./fortran/doc/DevelGuide/test/tH5D_f90.html +./fortran/doc/DevelGuide/test/tH5E_f90.html +./fortran/doc/DevelGuide/test/tH5F_f90.html +./fortran/doc/DevelGuide/test/tH5G_f90.html +./fortran/doc/DevelGuide/test/fflush1_f90.html +./fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html +./fortran/doc/DevelGuide/test/tH5A_1_8_f90.html +./fortran/doc/DevelGuide/test/tf_f90.html +./fortran/doc/DevelGuide/test/fflush2_f90.html +./fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html +./fortran/doc/DevelGuide/test/tH5I_f90.html +./fortran/doc/DevelGuide/test/tH5G_1_8_f90.html +./fortran/doc/DevelGuide/test/tF2003_f90.html +./fortran/doc/DevelGuide/test/tH5O_f90.html +./fortran/doc/DevelGuide/test/tH5P_f90.html +./fortran/doc/DevelGuide/test/tH5R_f90.html +./fortran/doc/DevelGuide/test/tH5S_f90.html +./fortran/doc/DevelGuide/test/tH5Sselect_f90.html +./fortran/doc/DevelGuide/test/tH5T_f90.html +./fortran/doc/DevelGuide/test/t_c.html +./fortran/doc/DevelGuide/test/tH5Z_f90.html +./fortran/doc/DevelGuide/src/H5Fff_f90.html +./fortran/doc/DevelGuide/src/H5Zf_c.html +./fortran/doc/DevelGuide/src/H5Pff_F90_f90.html +./fortran/doc/DevelGuide/src/H5Aff_F03_f90.html +./fortran/doc/DevelGuide/src/H5match_types_c.html +./fortran/doc/DevelGuide/src/H5Rff_F90_f90.html +./fortran/doc/DevelGuide/src/H5Lff_f90.html +./fortran/doc/DevelGuide/src/H5FDmpiof_c.html +./fortran/doc/DevelGuide/src/H5_f_c.html +./fortran/doc/DevelGuide/src/H5Pff_f90.html +./fortran/doc/DevelGuide/src/H5Rff_f90.html +./fortran/doc/DevelGuide/src/H5Tff_f90.html +./fortran/doc/DevelGuide/src/H5test_kind_f90.html +./fortran/doc/DevelGuide/src/H5Aff_F90_f90.html +./fortran/doc/DevelGuide/src/H5Zff_f90.html +./fortran/doc/DevelGuide/src/HDF5_f90.html +./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html +./fortran/doc/DevelGuide/src/H5f90kit_c.html +./fortran/doc/DevelGuide/src/H5Aff_f90.html +./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html +./fortran/doc/DevelGuide/src/H5Eff_f90.html +./fortran/doc/DevelGuide/src/H5_ff_F03_f90.html +./fortran/doc/DevelGuide/src/H5Gff_f90.html +./fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html +./fortran/doc/DevelGuide/src/H5Iff_f90.html +./fortran/doc/DevelGuide/src/H5Dff_F03_f90.html +./fortran/doc/DevelGuide/src/H5Af_c.html +./fortran/doc/DevelGuide/src/H5Off_f90.html +./fortran/doc/DevelGuide/src/H5Df_c.html +./fortran/doc/DevelGuide/src/H5Sff_f90.html +./fortran/doc/DevelGuide/src/H5Ef_c.html +./fortran/doc/DevelGuide/src/HDF5mpio_f90.html +./fortran/doc/DevelGuide/src/H5Lff_F03_f90.html +./fortran/doc/DevelGuide/src/H5Ff_c.html +./fortran/doc/DevelGuide/src/H5f90global_f90.html +./fortran/doc/DevelGuide/src/H5Gf_c.html +./fortran/doc/DevelGuide/src/H5If_c.html +./fortran/doc/DevelGuide/src/H5Pff_F03_f90.html +./fortran/doc/DevelGuide/src/H5_ff_F90_f90.html +./fortran/doc/DevelGuide/src/H5Rff_F03_f90.html +./fortran/doc/DevelGuide/src/H5Lf_c.html +./fortran/doc/DevelGuide/src/H5Of_c.html +./fortran/doc/DevelGuide/src/H5Dff_F90_f90.html +./fortran/doc/DevelGuide/src/H5Pf_c.html +./fortran/doc/DevelGuide/src/H5FDmpioff_f90.html +./fortran/doc/DevelGuide/src/H5_ff_f90.html +./fortran/doc/DevelGuide/src/H5Rf_c.html +./fortran/doc/DevelGuide/src/H5Sf_c.html +./fortran/doc/DevelGuide/src/H5Tf_c.html +./fortran/doc/DevelGuide/src/H5Dff_f90.html +./fortran/doc/DevelGuide/src/H5Lff_F90_f90.html ./fortran/examples/Makefile.am ./fortran/examples/Makefile.in @@ -189,44 +272,68 @@ ./fortran/examples/rwdset_fortran2003.f90 ./fortran/src/H5_f.c -./fortran/src/H5_ff.F90 +./fortran/src/H5_ff.f90 +./fortran/src/H5_ff_F90.f90 +./fortran/src/H5_ff_F03.f90 +./fortran/src/H5_DBLE_InterfaceInclude.f90 +./fortran/src/H5_DBLE_InterfaceExclude.f90 ./fortran/src/H5Af.c -./fortran/src/H5Aff.F90 +./fortran/src/H5Aff.f90 +./fortran/src/H5Aff_F90.f90 +./fortran/src/H5Aff_F03.f90 ./fortran/src/H5Df.c -./fortran/src/H5Dff.F90 +./fortran/src/H5Dff.f90 +./fortran/src/H5Dff_F90.f90 +./fortran/src/H5Dff_F03.f90 ./fortran/src/H5Ef.c -./fortran/src/H5Eff.F90 +./fortran/src/H5Eff.f90 +./fortran/src/H5Eff_F90.f90 +./fortran/src/H5Eff_F03.f90 +./fortran/src/H5FDmpiof.c +./fortran/src/H5FDmpioff.f90 ./fortran/src/H5Ff.c -./fortran/src/H5Fff.F90 +./fortran/src/H5Fff.f90 +./fortran/src/H5Fff_F90.f90 +./fortran/src/H5Fff_F03.f90 ./fortran/src/H5Gf.c -./fortran/src/H5Gff.F90 +./fortran/src/H5Gff.f90 ./fortran/src/H5If.c -./fortran/src/H5Iff.F90 +./fortran/src/H5Iff.f90 ./fortran/src/H5Lf.c -./fortran/src/H5Lff.F90 +./fortran/src/H5Lff.f90 +./fortran/src/H5Lff_F90.f90 +./fortran/src/H5Lff_F03.f90 ./fortran/src/H5Of.c -./fortran/src/H5Off.F90 +./fortran/src/H5Off.f90 +./fortran/src/H5Off_F90.f90 +./fortran/src/H5Off_F03.f90 ./fortran/src/H5Pf.c -./fortran/src/H5Pff.F90 +./fortran/src/H5Pff.f90 +./fortran/src/H5Pff_F90.f90 +./fortran/src/H5Pff_F03.f90 ./fortran/src/H5Rf.c -./fortran/src/H5Rff.F90 +./fortran/src/H5Rff.f90 +./fortran/src/H5Rff_F90.f90 +./fortran/src/H5Rff_F03.f90 ./fortran/src/H5Sf.c -./fortran/src/H5Sff.F90 +./fortran/src/H5Sff.f90 ./fortran/src/H5Tf.c -./fortran/src/H5Tff.F90 +./fortran/src/H5Tff.f90 +./fortran/src/H5Tff_F90.f90 +./fortran/src/H5Tff_F03.f90 ./fortran/src/H5Zf.c -./fortran/src/H5Zff.F90 +./fortran/src/H5Zff.f90 ./fortran/src/H5f90.h -./fortran/src/H5f90global.F90 +./fortran/src/H5f90global.f90 ./fortran/src/H5f90i.h ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h -./fortran/src/H5_buildiface.F90 +./fortran/src/H5test_kind.f90 +./fortran/src/H5test_kind_SIZEOF.f90 +./fortran/src/H5test_kind_STORAGE_SIZE.f90 ./fortran/src/H5match_types.c -./fortran/src/HDF5.F90 -./fortran/src/H5config_f.inc.in -./fortran/src/H5config_f.inc.cmake -./fortran/src/H5fort_type_defines.h.in +./fortran/src/HDF5.f90 +./fortran/src/HDF5mpio.f90 ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README @@ -241,10 +348,12 @@ ./fortran/test/fortranlib_test.f90 ./fortran/test/fortranlib_test_1_8.f90 ./fortran/test/fortranlib_test_F03.f90 -./fortran/test/H5_test_buildiface.F90 ./fortran/test/t.c ./fortran/test/t.h -./fortran/test/tf.F90 +./fortran/test/tf.f90 +./fortran/test/tf_F90.f90 +./fortran/test/tf_F03.f90 +./fortran/test/tf_F08.f90 ./fortran/test/tH5A.f90 ./fortran/test/tH5A_1_8.f90 ./fortran/test/tH5D.f90 @@ -264,7 +373,7 @@ ./fortran/test/tH5R.f90 ./fortran/test/tH5S.f90 ./fortran/test/tH5Sselect.f90 -./fortran/test/tH5T_F03.F90 +./fortran/test/tH5T_F03.f90 ./fortran/test/tH5T.f90 ./fortran/test/tH5VL.f90 ./fortran/test/tH5Z.f90 @@ -2245,27 +2354,25 @@ ./hl/fortran/examples/ex_ds1.f90 ./hl/fortran/examples/exlite.f90 ./hl/fortran/examples/run-hlfortran-ex.sh.in -./hl/fortran/src/hdf5_hl_fortrandll.def.in ./hl/fortran/src/H5DSfc.c -./hl/fortran/src/H5DSff.F90 +./hl/fortran/src/H5DSff.f90 ./hl/fortran/src/H5IMcc.c ./hl/fortran/src/H5IMcc.h ./hl/fortran/src/H5IMfc.c -./hl/fortran/src/H5IMff.F90 -./hl/fortran/src/H5HL_buildiface.F90 +./hl/fortran/src/H5IMff.f90 ./hl/fortran/src/H5LTf90proto.h ./hl/fortran/src/H5LTfc.c -./hl/fortran/src/H5LTff.F90 +./hl/fortran/src/H5LTff.f90 ./hl/fortran/src/H5TBfc.c -./hl/fortran/src/H5TBff.F90 +./hl/fortran/src/H5TBff.f90 ./hl/fortran/src/Makefile.am ./hl/fortran/src/Makefile.in ./hl/fortran/test/Makefile.am ./hl/fortran/test/Makefile.in -./hl/fortran/test/tstds.F90 -./hl/fortran/test/tstimage.F90 -./hl/fortran/test/tstlite.F90 -./hl/fortran/test/tsttable.F90 +./hl/fortran/test/tstds.f90 +./hl/fortran/test/tstimage.f90 +./hl/fortran/test/tstlite.f90 +./hl/fortran/test/tsttable.f90 # hl c++ ./hl/c++/COPYING @@ -2297,7 +2404,6 @@ ./config/cmake/hdf5-config-version.cmake.in ./config/cmake/HDFCompilerFlags.cmake ./config/cmake/HDF5Macros.cmake -./config/cmake/HDF5UseFortran.cmake ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/Makefile.in b/Makefile.in index ce0c833..edee230 100644 --- a/Makefile.in +++ b/Makefile.in @@ -128,8 +128,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -289,21 +288,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -313,12 +305,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -360,18 +353,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 2315cc2..c964e95 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -106,8 +106,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -449,21 +448,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -473,12 +465,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -520,18 +513,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 6b0f894..03bd135 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -112,8 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-c++-ex.sh testh5c++.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -397,21 +396,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -421,12 +413,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -468,18 +461,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index c2daa56..5dff737 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5c++ CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -175,7 +174,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -460,21 +459,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -484,12 +476,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -531,18 +524,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 0da1d86..8711eef 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -108,8 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = testhdf5$(EXEEXT) @@ -137,7 +136,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -451,21 +450,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -475,12 +467,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -522,18 +515,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index b9f18a9..09f1caf 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -158,17 +158,6 @@ if (NOT WINDOWS) endif (HDF5_ENABLE_DIRECT_VFD) endif (NOT WINDOWS) -#----------------------------------------------------------------------------- -# Check if C has __float128 extension -#----------------------------------------------------------------------------- - -CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) -if(${HAVE_SIZEOF___FLOAT128}) - SET(H5_HAVE_FLOAT128 1) -else (${HAVE_SIZEOF___FLOAT128}) - SET(H5_HAVE_FLOAT128 0) - SET(SIZEOF___FLOAT128 0) -endif(${HAVE_SIZEOF___FLOAT128}) #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 37bcfbf..af9afde 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -45,18 +45,6 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #define @H5_FC_FUNC_@ -/* Define Fortran Maximum Real Decimal Precision */ -#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ - -/* Define C Maximum Real Decimal Precision */ -#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ - -/* Define if we have Fortran C_LONG_DOUBLE */ -#cmakedefine H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ - -/* Determine if __float128 is available */ -#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ - /* Define to 1 if you have the `alarm' function. */ #cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index c82fcf2..febf20a 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -13,6 +13,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_BUILD_CONFIGURATION "Release") #set(NO_MAC_FORTRAN "true") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") #set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") ############################################################################################################### @@ -122,4 +123,4 @@ if(res GREATER 0) endif(res GREATER 0) #----------------------------------------------------------------------------- ############################################################################################################## -message(STATUS "DONE") +message(STATUS "DONE") \ No newline at end of file diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake deleted file mode 100644 index b3dec14..0000000 --- a/config/cmake/HDF5UseFortran.cmake +++ /dev/null @@ -1,491 +0,0 @@ - -## Check for non-standard extenstion quadmath.h - -CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH) - -if (${C_HAVE_QUADMATH}) - set(HAVE_QUADMATH 1) -else () - set(HAVE_QUADMATH 0) -endif() - -# -# This file provides functions for HDF5 specific Fortran support. -# -#------------------------------------------------------------------------------- -ENABLE_LANGUAGE (Fortran) - -# The provided CMake Fortran macros don't provide a general compile/run function -# so this one is used. -#----------------------------------------------------------------------------- -MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) -# MSB CHECK WHY THIS CHECK? -# if (NOT DEFINED ${RUN_RESULT_VAR}) - message (STATUS "Detecting Fortran ${FUNCTION}") - if (CMAKE_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - else (CMAKE_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - endif (CMAKE_REQUIRED_LIBRARIES) - file (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 - "${CODE}" - ) - TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - RUN_OUTPUT_VARIABLE OUTPUT - ) - - - - set(${RETURN} ${OUTPUT}) - - #message ( "Test result1 ${RETURN} ") - #message ( "Test result3 ${RESULT} ") - #message ( "Test result2 ${CMAKE_MATCH_0} ") - #message ( "Test result4 ${CMAKE_MATCH_1} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result2 ${COMPILE_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result1 ${RUN_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - - if (${COMPILE_RESULT_VAR}) - if (${RUN_RESULT_VAR} MATCHES 0) - message (STATUS "Testing Fortran ${FUNCTION} - OK") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n" - ) - else () - message (STATUS "Testing Fortran ${FUNCTION} - Fail") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") - endif () - endif () -# endif (NOT DEFINED ${RUN_RESULT_VAR}) -ENDMACRO (FORTRAN_RUN) - -#----------------------------------------------------------------------------- -# Check to see C_LONG_DOUBLE is available -CHECK_FORTRAN_FEATURE(c_long_double - " - PROGRAM main - USE ISO_C_BINDING - REAL(KIND=C_LONG_DOUBLE) :: d - END PROGRAM - " - FORTRAN_HAVE_C_LONG_DOUBLE -) -if (${FORTRAN_HAVE_C_LONG_DOUBLE}) - set(FORTRAN_HAVE_C_LONG_DOUBLE 1) -else () - set(FORTRAN_HAVE_C_LONG_DOUBLE 0) -endif() - -# Check to see C_LONG_DOUBLE is different from C_DOUBLE - -CHECK_FORTRAN_FEATURE(c_long_double - " - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - " - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE -) -if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) - set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) -else () - set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) -endif() - -## Set the sizeof function for use later in the fortran tests -if(FORTRAN_HAVE_STORAGE_SIZE) - set(FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") - set(FC_SIZEOF_B "STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") - set(FC_SIZEOF_C "STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") -elseif(FORTRAN_HAVE_C_SIZEOF) - set(FC_SIZEOF_A "SIZEOF(a)") - set(FC_SIZEOF_B "SIZEOF(b)") - set(FC_SIZEOF_C "SIZEOF(c)") -else(FORTRAN_HAVE_STORAGE_SIZE) - message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE") -endif(FORTRAN_HAVE_STORAGE_SIZE) - -#----------------------------------------------------------------------------- -# Determine the available KINDs for REALs and INTEGERs -#----------------------------------------------------------------------------- - -FORTRAN_RUN("REAL and INTEGER KINDs" - " - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(*,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(*,'(I0)') lastkind - ELSE - WRITE(*,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(*,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(*,'(I0)') lastkind - ELSE - WRITE(*,'()') - ENDIF - WRITE(*,'(I0)') max_decimal_prec - WRITE(*,'(I0)') num_ikinds - WRITE(*,'(I0)') num_rkinds - END - " - XX - YY - PROG_OUTPUT -) -# dnl The output from the above program will be: -# dnl -- LINE 1 -- valid integer kinds (comma seperated list) -# dnl -- LINE 2 -- valid real kinds (comma seperated list) -# dnl -- LINE 3 -- max decimal precision for reals -# dnl -- LINE 4 -- number of valid integer kinds -# dnl -- LINE 5 -- number of valid real kinds - -# Convert the string to a list of strings by replacing the carriage return with a semicolon -string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") - -list(GET PROG_OUTPUT 0 pac_validIntKinds) -list(GET PROG_OUTPUT 1 pac_validRealKinds) -list(GET PROG_OUTPUT 2 H5_PAC_FC_MAX_REAL_PRECISION) - -set(PAC_FC_ALL_INTEGER_KINDS "\{${pac_validIntKinds}\}") -set(PAC_FC_ALL_REAL_KINDS "\{${pac_validRealKinds}\}") - -list(GET PROG_OUTPUT 3 NUM_IKIND) -list(GET PROG_OUTPUT 4 NUM_RKIND) - -set(H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") -set(H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") - -message ( " ........REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message ( " ........INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") - -#----------------------------------------------------------------------------- -# Determine the available KINDs for REALs and INTEGERs -#----------------------------------------------------------------------------- -# ********** -# INTEGERS -# ********** -string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}") - -foreach( KIND ${VAR_KIND} ) - set(PROG_SRC - " - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER (KIND=${KIND}) a - WRITE(*,'(I0)') ${FC_SIZEOF_A} - END - " - ) - FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC} - XX - YY - PROG_OUTPUT1 - ) - string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") - set(pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},") -endforeach(KIND) -string(STRIP ${pack_int_sizeof} pack_int_sizeof) - - -#Remove trailing comma -string(REGEX REPLACE ",$" "" pack_int_sizeof "${pack_int_sizeof}") -#Remove spaces -string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") - -set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") - -message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") -# ********** -# REALS -# ********** -string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}") - -#find the maximum kind of the real -list(LENGTH VAR_KIND LEN_VAR_KIND) -MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") -list(GET VAR_KIND ${_LEN} max_real_fortran_kind) - -foreach( KIND ${VAR_KIND} ) - set(PROG_SRC - " - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - REAL (KIND=${KIND}) a - WRITE(*,'(I0)') ${FC_SIZEOF_A} - END - " - ) - FORTRAN_RUN("REAL KIND SIZEOF" ${PROG_SRC} - XX - YY - PROG_OUTPUT1 - ) - string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") - set(pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},") -endforeach(KIND) -string(STRIP ${pack_real_sizeof} pack_real_sizeof) - -#Remove trailing comma -string(REGEX REPLACE ",$" "" pack_real_sizeof "${pack_real_sizeof}") -#Remove spaces -string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") - -set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") - -message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") - -#find the maximum kind of the real -list(LENGTH VAR_KIND LEN_VAR_KIND) -MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") -list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof) - -set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}") -#----------------------------------------------------------------------------- -# Find sizeof of native kinds -#----------------------------------------------------------------------------- -FORTRAN_RUN("SIZEOF NATIVE KINDs" - " - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER a - REAL b - DOUBLE PRECISION c - WRITE(*,*) ${FC_SIZEOF_A} - WRITE(*,*) kind(a) - WRITE(*,*) ${FC_SIZEOF_B} - WRITE(*,*) kind(b) - WRITE(*,*) ${FC_SIZEOF_C} - WRITE(*,*) kind(c) - END - " - XX - YY - PROG_OUTPUT -) -# dnl The output from the above program will be: -# dnl -- LINE 1 -- sizeof INTEGER -# dnl -- LINE 2 -- kind of INTEGER -# dnl -- LINE 3 -- sizeof REAL -# dnl -- LINE 4 -- kind of REAL -# dnl -- LINE 5 -- sizeof DOUBLE PRECISION -# dnl -- LINE 6 -- kind of DOUBLE PRECISION - -# Convert the string to a list of strings by replacing the carriage return with a semicolon -string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") - -list(GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) -list(GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND) -list(GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF) -list(GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND) -list(GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) -list(GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) - -set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) -#set(H5_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) - -# remove the invalid kind from the list -if(NOT(${SIZEOF___FLOAT128} EQUAL 0)) - if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) - message(WARNING " - Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!") - string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS}) - string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) - MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1") - endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) -endif(NOT(${SIZEOF___FLOAT128} EQUAL 0)) - -set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") - -string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS}) -string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) -set(H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)") - -string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) -string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) -set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") - -ENABLE_LANGUAGE (C) - -#----------------------------------------------------------------------------- -# The provided CMake C macros don't provide a general compile/run function -# so this one is used. -#----------------------------------------------------------------------------- -MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) -# MSB CHECK WHY THIS CHECK? -# if (NOT DEFINED ${RUN_RESULT_VAR}) - message (STATUS "Detecting C ${FUNCTION}") - if (CMAKE_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - else (CMAKE_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - endif (CMAKE_REQUIRED_LIBRARIES) - file (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c - ${CODE} - ) - TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - RUN_OUTPUT_VARIABLE OUTPUT - ) - - set(${RETURN} ${OUTPUT}) - - #message ( "Test result1 ${RETURN} ") - #message ( "Test result3 ${RESULT} ") - #message ( "Test result2 ${CMAKE_MATCH_0} ") - #message ( "Test result4 ${CMAKE_MATCH_1} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result ${COMPILE_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test result ${RUN_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - - if (${COMPILE_RESULT_VAR}) - if (${RUN_RESULT_VAR} MATCHES 0) - set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}") - message (STATUS "Testing C ${FUNCTION} - OK") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n" - ) - else () - message (STATUS "Testing C ${FUNCTION} - Fail") - set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") - endif () - endif() -# endif (NOT DEFINED ${RUN_RESULT_VAR}) -ENDMACRO (C_RUN) - -set(PROG_SRC - " -#include -#include -#define CHECK_FLOAT128 ${SIZEOF___FLOAT128} -#if CHECK_FLOAT128!=0 -# if ${HAVE_QUADMATH}!=0 -#include -# endif -# ifdef FLT128_DIG -#define C_FLT128_DIG FLT128_DIG -# else -#define C_FLT128_DIG 0 -# endif -#else -#define C_FLT128_DIG 0 -#endif -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define C_LDBL_DIG DECIMAL_DIG -#else -#define C_LDBL_DIG LDBL_DIG -#endif - void main() { - printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\; - } - " - ) - -C_RUN("maximum decimal precision for C" ${PROG_SRC} - XX - YY - PROG_OUTPUT -) - -# dnl The output from the above program will be: -# dnl -- LINE 1 -- long double decimal precision -# dnl -- LINE 2 -- __float128 decimal precision - -# Convert the string to a list of strings by replacing the carriage return with a semicolon -string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") - -list(GET PROG_OUTPUT 0 LDBL_DIG) -list(GET PROG_OUTPUT 1 FLT128_DIG) - -if(SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) - SET(H5_HAVE_FLOAT128 0) - SET(SIZEOF___FLOAT128 0) - set(H5_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) -else () - set(H5_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) -endif() - - -# Setting definition if there is a 16 byte fortran integer -string(FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos) -if(${pos} EQUAL -1) - set(HAVE_Fortran_INTEGER_SIZEOF_16 0) -else () - set(HAVE_Fortran_INTEGER_SIZEOF_16 1) -endif () diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index adeec55..321267f 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -22,6 +22,7 @@ set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS #----------------------------------------------------------------------------- set (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) set (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) +set (${HDF5_PACKAGE_NAME}_ENABLE_F2003 @HDF5_ENABLE_F2003@) set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@) set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index ba764a4..8ef67a5 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -38,6 +38,7 @@ Languages: ---------- Fortran: @HDF5_BUILD_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HDF5_ENABLE_F2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 39ec124..af506e6 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -16,6 +16,8 @@ set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) +set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE) + set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE) set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE) diff --git a/configure b/configure index fe13186..860f480 100755 --- a/configure +++ b/configure @@ -199,7 +199,6 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -207,7 +206,8 @@ test \$(( 1 + 1 )) = 2 || exit 1 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -682,6 +682,7 @@ AM_MAKEFLAGS LT_STATIC_EXEC USE_PLUGINS_CONDITIONAL_FALSE USE_PLUGINS_CONDITIONAL_TRUE +CPP OTOOL64 OTOOL LIPO @@ -698,6 +699,8 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP SED LIBTOOL FORTRAN_SHARED_CONDITIONAL_FALSE @@ -710,6 +713,7 @@ PARALLEL TIME TR AR +PERL HL_FOR HL CXXCPP @@ -718,26 +722,16 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS -H5CONFIG_F_IKIND -H5CONFIG_F_NUM_IKIND -H5CONFIG_F_RKIND_SIZEOF -H5CONFIG_F_RKIND -H5CONFIG_F_NUM_RKIND -FORTRAN_SIZEOF_LONG_DOUBLE -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE -FORTRAN_HAVE_C_LONG_DOUBLE -HAVE_Fortran_INTEGER_SIZEOF_16 -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF -PAC_FORTRAN_NATIVE_DOUBLE_KIND -PAC_FORTRAN_NATIVE_REAL_SIZEOF -PAC_FORTRAN_NATIVE_REAL_KIND -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF -PAC_FORTRAN_NATIVE_INTEGER_KIND -PAC_FC_ALL_INTEGER_KINDS_SIZEOF -PAC_FC_ALL_REAL_KINDS_SIZEOF -PAC_FC_ALL_INTEGER_KINDS -PAC_FC_MAX_REAL_PRECISION -PAC_FC_ALL_REAL_KINDS +FORTRAN_DEFAULT_REALisDBLE_F_FALSE +FORTRAN_DEFAULT_REALisDBLE_F_TRUE +FORTRAN_2003_CONDITIONAL_F_FALSE +FORTRAN_2003_CONDITIONAL_F_TRUE +FORTRAN_HAVE_STORAGE_SIZE_FALSE +FORTRAN_HAVE_STORAGE_SIZE_TRUE +FORTRAN_HAVE_C_SIZEOF_FALSE +FORTRAN_HAVE_C_SIZEOF_TRUE +FORTRAN_HAVE_SIZEOF_FALSE +FORTRAN_HAVE_SIZEOF_TRUE FCLIBS F9XMODEXT F9XMODFLAG @@ -754,10 +748,8 @@ HSIZE_T HADDR_T R_INTEGER R_LARGE +HAVE_FORTRAN_2003 HDF5_INTERFACES -EGREP -GREP -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -774,7 +766,6 @@ ac_ct_CC LDFLAGS CFLAGS CC -PAC_C_MAX_REAL_PRECISION UNAME_INFO enable_static enable_shared @@ -787,7 +778,9 @@ INSTRUMENT HDF5_HL CXX HDF_CXX +FC2003 FC +HDF_FORTRAN2003 HDF_FORTRAN STATIC_EXEC MPE @@ -841,7 +834,6 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -PERL target_alias host_alias build_alias @@ -888,6 +880,7 @@ enable_maintainer_mode enable_dependency_tracking enable_unsupported enable_fortran +enable_fortran2003 enable_cxx enable_hl enable_shared @@ -933,13 +926,13 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP FC FCFLAGS CXX CXXFLAGS CCC -CXXCPP' +CXXCPP +CPP' # Initialize some variables set by options. @@ -1568,7 +1561,9 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran interface [default=no] + --enable-fortran Compile the Fortran 90/95 interface [default=no] + --enable-fortran2003 Compile the Fortran 2003 interface, must also + specify --enable-fortran [default=no] --enable-cxx Compile the C++ interface [default=no] --enable-hl Enable the high level library [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -1666,12 +1661,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor + CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1791,74 +1786,59 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_retval=1 fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_type +} # ac_fn_fc_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1866,29 +1846,37 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_c_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -1896,438 +1884,204 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.err ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_link + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.err ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : ac_retval=0 else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=1 fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_run +} # ac_fn_cxx_try_compile -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_header_compile +} # ac_fn_cxx_try_cpp -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_compute_int +} # ac_fn_cxx_try_link -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes + eval "$3=yes" else - ac_header_compiler=no + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------- ## -## Report this to help@hdfgroup.org ## -## -------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_compile - -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link +} # ac_fn_c_check_header_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -2335,35 +2089,27 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_c_try_cpp -# ac_fn_fc_try_run LINENO -# ----------------------- +# ac_fn_c_try_run LINENO +# ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. -ac_fn_fc_try_run () +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" @@ -2399,133 +2145,179 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_run +} # ac_fn_c_try_run -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 - ac_retval=1 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_cxx_try_compile +} # ac_fn_c_check_func -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -} # ac_fn_cxx_try_cpp +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## -------------------------------- ## +## Report this to help@hdfgroup.org ## +## -------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_cxx_try_link +} # ac_fn_c_check_header_mongrel -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2533,39 +2325,31 @@ $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else + eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } #endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me #endif - +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -2577,41 +2361,39 @@ choke me int main () { -return $2 (); +if (sizeof (($2))) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" +if ac_fn_c_try_compile "$LINENO"; then : + else - eval "$3=no" + eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_func +} # ac_fn_c_check_type -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #ifdef FC_DUMMY_MAIN @@ -2625,33 +2407,268 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by HDF5 $as_me 1.9.227, which was @@ -3003,54 +3020,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING -## -------------------------------------------------------------------------- -## Requirement #1: Check if Perl is installed. -## - PERL="" -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PERL"; then - ac_cv_prog_PERL="$PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PERL="" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="$PATH" -fi -fi -PERL=$ac_cv_prog_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "x$PERL" = "xfalse"; then - as_fn_error $? "*** Perl is required for installing HDF5, but Perl could not be found!" "$LINENO" 5 -fi - - ac_config_headers="$ac_config_headers src/H5config.h" @@ -3895,6 +3864,7 @@ $as_echo "done" >&6; } ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. +## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -3902,7 +3872,6 @@ $as_echo "done" >&6; } ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. -## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -3914,7 +3883,9 @@ $as_echo "done" >&6; } MPE=no STATIC_EXEC=no HDF_FORTRAN=no + HDF_FORTRAN2003=no HDF_FORTRAN=no + HDF_FORTRAN2003=no HDF_CXX=no HDF_CXX=no HDF5_HL=yes @@ -3928,7 +3899,6 @@ $as_echo "done" >&6; } UNAME_INFO=`uname -a` - ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check ## that it actually does what it's supposed to do. Catch this early @@ -5152,1280 +5122,1627 @@ $as_echo "yes" >&6; } esac ## ---------------------------------------------------------------------- -## Data types and their sizes. +## Check if they would like the Fortran interface compiled ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= + HDF5_INTERFACES="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 +$as_echo_n "checking if Fortran interface enabled... " >&6; } +# Check whether --enable-fortran was given. +if test "${enable_fortran+set}" = set; then : + enableval=$enable_fortran; HDF_FORTRAN=$enableval fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +if test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" else - # Passes both tests. -ac_preproc_ok=: -break + echo "no" fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break + +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5 +$as_echo_n "checking if Fortran 2003 interface enabled... " >&6; } +# Check whether --enable-fortran2003 was given. +if test "${enable_fortran2003+set}" = set; then : + enableval=$enable_fortran2003; HDF_FORTRAN2003=$enableval fi - done - ac_cv_prog_CPP=$CPP -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +## ---------------------------------------------------------------------- +## Check to make sure --enable-fortran is present if --enable-fortran2003 +## was specified +if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then + echo "no" + as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5 else - # Broken: fails on valid input. -continue + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext +if test "X$HDF_FORTRAN" = "Xyes"; then -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + HDF_FORTRAN=yes -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + HDF5_INTERFACES="$HDF5_INTERFACES fortran" + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : + + + + + + + + + ## -------------------------------------------------------------------- + ## Fortran source extention + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac +IFS=$as_save_IFS - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi + +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - ac_cv_path_EGREP=$EGREP + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - fi + + test -n "$ac_ct_FC" && break +done + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ + cat > conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif - ; - return 0; -} + end _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes +if ac_fn_fc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - ac_cv_header_stdc=no + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main + end _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes else - ac_cv_header_stdc=no + ac_cv_prog_fc_g=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi else - ac_cv_header_stdc=no + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi fi -rm -f conftest* +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 + fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -done -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : -else -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF + ## -------------------------------------------------------------------- + ## Check for a Fortran compiler and how to include modules. + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned long -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 else - -cat >>confdefs.h <<_ACEOF -#define ssize_t long -_ACEOF + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - -ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -cat >>confdefs.h <<_ACEOF -#define ptrdiff_t long -_ACEOF + test -n "$ac_ct_FC" && break +done + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif - ; - return 0; -} + end _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +if ac_fn_fc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +ac_cv_fc_compiler_gnu=$ac_compiler_gnu -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main - ; - return 0; -} + end _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_prog_fc_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi fi - fi +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 +$as_echo_n "checking what $FC does with modules... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if ${ac_cv_sizeof_char+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : +test -d conftestdir || mkdir conftestdir +cd conftestdir +rm -rf * -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_char=0 - fi -fi +cat >conftest.$ac_ext <&5 -$as_echo "$ac_cv_sizeof_char" >&6; } +eval $ac_compile +modfiles="" +F9XMODEXT="" +for f in conftest.o module.mod MODULE.mod module.M MODULE.M; do + if test -f "$f" ; then + modfiles="$f" + case "$f" in + *.o) F9XMODEXT="o" ;; + *.mod) F9XMODEXT="mod" ;; + *.M) F9XMODEXT="M" ;; + esac + fi +done -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF +echo $modfiles 6>&1 +if test "$modfiles" = file.o; then + echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 + OLD_FCFLAGS=$FCFLAGS + FCFLAGS="$FCFLAGS -em" + eval $ac_compile + modfiles="" + for f in file.o module.mod MODULE.mod module.M MODULE.M; do + test -f $f && modfiles="$f" + done + if test "$modfiles" = "file.o"; then + FCFLAGS=$OLD_FCFLAGS + echo no 6>&1 + else + echo yes 6>&1 + fi +fi +cd .. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 +$as_echo_n "checking how $FC finds modules... " >&6; } -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : +for flag in "-I" "-M" "-p"; do + cat >conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + F9XMODFLAG=$flag + break + fi +done +if test -n "$F9XMODFLAG"; then + echo $F9XMODFLAG 1>&6 + FCFLAGS="$F9XMODFLAG. $FCFLAGS" else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi + echo unknown 1>&6 fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +rm -rf conftest* +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : + + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + cat > conftest.$ac_ext <<_ACEOF + program main -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat > conftest.$ac_ext <<_ACEOF + program main -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } + end +_ACEOF +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS +rm -rf conftest* -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 -$as_echo_n "checking size of unsigned... " >&6; } -if ${ac_cv_sizeof_unsigned+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; -else - if test "$ac_cv_type_unsigned" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned=0 - fi -fi + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 -$as_echo "$ac_cv_sizeof_unsigned" >&6; } + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - + # look for -l* and *.a constructs in the output + for ac_arg in $ac_fc_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_fc_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_fc_v"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} +fi else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - + if test "x$FCLIBS" != "x"; then + ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - +cat > conftest.$ac_ext <<_ACEOF + program main -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long + end _ACEOF +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 -$as_echo_n "checking size of __int64... " >&6; } -if ${ac_cv_sizeof___int64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : - -else - if test "$ac_cv_type___int64" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (__int64) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof___int64=0 - fi -fi +rm -rf conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 -$as_echo "$ac_cv_sizeof___int64" >&6; } +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; -cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 -_ACEOF + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 -$as_echo_n "checking size of float... " >&6; } -if ${ac_cv_sizeof_float+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac -else - if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (float) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_float=0 - fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&6; } +ac_cv_fc_libs= +# Save positional arguments (if any) +ac_save_positional="$@" -cat >>confdefs.h <<_ACEOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -_ACEOF +set X $ac_fc_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + if test x"$ac_exists" = xtrue; then : -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 -$as_echo_n "checking size of double... " >&6; } -if ${ac_cv_sizeof_double+:} false; then : - $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then : else - if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_double=0 - fi + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double -_ACEOF - + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ + |-LANG:=* | -LIST:* | -LNO:* | -link) + ;; + -lkernel32) + case $host_os in + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + esac + ;; + -[LRuYz]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : + if test x"$ac_exists" = xtrue; then : else - if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi -fi - + ac_arg="$ac_arg $ac_j" + ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double -_ACEOF - - + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done -## Check for non-standard extenstion __FLOAT128 -HAVE_FLOAT128=0 -HAVE_QUADMATH=0 -FLT128_DIG=0 -LDBL_DIG=0 + if test x"$ac_exists" = xtrue; then : -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __float128" >&5 -$as_echo_n "checking size of __float128... " >&6; } -if ${ac_cv_sizeof___float128+:} false; then : - $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__float128))" "ac_cv_sizeof___float128" "$ac_includes_default"; then : + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi + ;; + -zallextract*| -zdefaultextract) + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done else - if test "$ac_cv_type___float128" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (__float128) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof___float128=0 - fi + ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___float128" >&5 -$as_echo "$ac_cv_sizeof___float128" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } +FCLIBS="$ac_cv_fc_libs" +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -cat >>confdefs.h <<_ACEOF -#define SIZEOF___FLOAT128 $ac_cv_sizeof___float128 -_ACEOF +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Quad" >&5 -$as_echo_n "checking size of _Quad... " >&6; } -if ${ac_cv_sizeof__Quad+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Quad))" "ac_cv_sizeof__Quad" "$ac_includes_default"; then : - -else - if test "$ac_cv_type__Quad" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (_Quad) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof__Quad=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Quad" >&5 -$as_echo "$ac_cv_sizeof__Quad" >&6; } - - + ac_fc_dm_save_LIBS=$LIBS + LIBS="$LIBS $FCLIBS" + ac_fortran_dm_var=FC_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -cat >>confdefs.h <<_ACEOF -#define SIZEOF__QUAD $ac_cv_sizeof__Quad -_ACEOF + # First, try linking without a dummy main: + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -for ac_header in quadmath.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "quadmath.h" "ac_cv_header_quadmath_h" "$ac_includes_default" -if test "x$ac_cv_header_quadmath_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_QUADMATH_H 1 + ; + return 0; +} _ACEOF - HAVE_QUADMATH=1 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=none +else + ac_cv_fortran_dummy_main=unknown fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 -$as_echo_n "checking maximum decimal precision for C... " >&6; } -rm -f pac_Cconftest.out - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - - #include - #include - #define CHECK_FLOAT128 $ac_cv_sizeof___float128 - #if CHECK_FLOAT128!=0 - # if $HAVE_QUADMATH!=0 - #include - # endif - # ifdef FLT128_DIG - #define C_FLT128_DIG FLT128_DIG - # else - #define C_FLT128_DIG 0 - # endif - #else - #define C_FLT128_DIG 0 - #endif - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define C_LDBL_DIG DECIMAL_DIG - #else - #define C_LDBL_DIG LDBL_DIG - #endif - +#define $ac_fortran_dm_var $ac_func +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif int main () { - FILE * pFile; - pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); - ; return 0; } - _ACEOF - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - if ac_fn_c_try_run "$LINENO"; then : - - if test -s pac_Cconftest.out ; then - LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" - FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_Cconftest.out - -else - - as_fn_error $? "C program fails to build or run!" "$LINENO" 5 - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=$ac_func; break fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_fc_dm_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } +FC_DUMMY_MAIN=$ac_cv_fc_dummy_main +if test "$FC_DUMMY_MAIN" != unknown; then : + if test $FC_DUMMY_MAIN != none; then +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF -if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG + fi +fi else - PAC_C_MAX_REAL_PRECISION=$LDBL_DIG -fi - -cat >>confdefs.h <<_ACEOF -#define PAC_C_MAX_REAL_PRECISION $PAC_C_MAX_REAL_PRECISION -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_C_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_C_MAX_REAL_PRECISION" >&6; } -## ---------------------------------------------------------------------- -## Check if they would like the Fortran interface compiled -## - HDF5_INTERFACES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 -$as_echo_n "checking if Fortran interface enabled... " >&6; } -# Check whether --enable-fortran was given. -if test "${enable_fortran+set}" = set; then : - enableval=$enable_fortran; HDF_FORTRAN=$enableval + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 else - echo "no" + cat > conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success=yes; break 2 fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test "X$HDF_FORTRAN" = "Xyes"; then + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success_extra=yes; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -## We will output an include file for Fortran, H5config_f.inc which -## contains various configure definitions used by the Fortran Library. -## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro -## names and those generated by another software package that uses the HDF5 library. - ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - HDF_FORTRAN=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } - HDF5_INTERFACES="$HDF5_INTERFACES fortran" +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +case $ac_cv_fc_mangling in + "lower case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + ;; + "lower case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + ;; + "upper case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + ;; + "upper case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + ;; +esac - ## -------------------------------------------------------------------- - ## Fortran source extention - ## - ac_ext=${ac_fc_srcext-f} +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" + + HAVE_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + i = sizeof(x) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_SIZEOF_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + + HAVE_C_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_SIZEOF_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + + HAVE_STORAGE_SIZE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_STORAGE_SIZE_FORTRAN="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - test -n "$FC" && break + + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. + + FORTRAN_DEFAULT_REALisDBLE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 +$as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + INTERFACE h5t + MODULE PROCEDURE h5t_real + MODULE PROCEDURE h5t_dble + END INTERFACE + CONTAINS + SUBROUTINE h5t_real(r) + REAL :: r + END SUBROUTINE h5t_real + SUBROUTINE h5t_dble(d) + DOUBLE PRECISION :: d + END SUBROUTINE h5t_dble + END MODULE type_mod + PROGRAM main + USE type_mod + REAL :: r + DOUBLE PRECISION :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + FORTRAN_DEFAULT_REALisDBLE="yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + if test "X$HDF_FORTRAN2003" = "Xyes"; then + + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 +$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } + HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main + + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_F2003_REQUIREMENTS=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" + fi + fi +else + FC="no" +fi + +## Change back to the C language +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_SIZEOF_TRUE= + FORTRAN_HAVE_SIZEOF_FALSE='#' +else + FORTRAN_HAVE_SIZEOF_TRUE='#' + FORTRAN_HAVE_SIZEOF_FALSE= +fi + + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_C_SIZEOF_TRUE= + FORTRAN_HAVE_C_SIZEOF_FALSE='#' +else + FORTRAN_HAVE_C_SIZEOF_TRUE='#' + FORTRAN_HAVE_C_SIZEOF_FALSE= +fi + + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_STORAGE_SIZE_TRUE= + FORTRAN_HAVE_STORAGE_SIZE_FALSE='#' +else + FORTRAN_HAVE_STORAGE_SIZE_TRUE='#' + FORTRAN_HAVE_STORAGE_SIZE_FALSE= +fi + + if test "X$HAVE_FORTRAN_2003" = "Xyes"; then + FORTRAN_2003_CONDITIONAL_F_TRUE= + FORTRAN_2003_CONDITIONAL_F_FALSE='#' +else + FORTRAN_2003_CONDITIONAL_F_TRUE='#' + FORTRAN_2003_CONDITIONAL_F_FALSE= +fi + + if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then + FORTRAN_DEFAULT_REALisDBLE_F_TRUE= + FORTRAN_DEFAULT_REALisDBLE_F_FALSE='#' +else + FORTRAN_DEFAULT_REALisDBLE_F_TRUE='#' + FORTRAN_DEFAULT_REALisDBLE_F_FALSE= +fi + + +## ---------------------------------------------------------------------- +## Check if they would like the C++ interface compiled +## +## We need to check for a C++ compiler unconditionally, since +## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will +## miss even if c++ is not enabled. + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done +IFS=$as_save_IFS + fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6434,7 +6751,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" + ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6444,21 +6761,21 @@ IFS=$as_save_IFS fi fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_FC" && break + test -n "$ac_ct_CXX" && break done - if test "x$ac_ct_FC" = x; then - FC="" + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6466,13 +6783,14 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - FC=$ac_ct_FC + CXX=$ac_ct_CXX fi fi - + fi +fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6495,136 +6813,153 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ #ifndef __GNUC__ choke me #endif - end + ; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" + if test "$GXX" = yes; then + CXXFLAGS="-O2" else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 + CXXFLAGS= fi - - fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6632,1892 +6967,1375 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +depcc="$CXX" am_compiler_list= - - - - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi -done + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi done -IFS=$as_save_IFS -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + cd .. + rm -rf conftest.dir else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + am_cv_CXX_dependencies_compiler_type=none fi - - test -n "$ac_ct_FC" && break -done - - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include #endif - - end + Syntax error _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if ac_fn_cxx_try_cpp "$LINENO"; then : + else - ac_compiler_gnu=no + # Broken: fails on valid input. +continue fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu +rm -f conftest.err conftest.i conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP else - ac_cv_prog_fc_g=no + ac_cv_prog_CXXCPP=$CXXCPP fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : -if test $ac_compiler_gnu = yes; then - GFC=yes else - GFC= + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + ## this is checked for when AC_HEADER_STDC is done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 -$as_echo_n "checking what $FC does with modules... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 +$as_echo_n "checking if c++ interface enabled... " >&6; } -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * +# Check whether --enable-cxx was given. +if test "${enable_cxx+set}" = set; then : + enableval=$enable_cxx; HDF_CXX=$enableval +fi -cat >conftest.$ac_ext <&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 - else - echo yes 6>&1 - fi -fi -cd .. + # Checking if C++ needs old style header files in includes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 -$as_echo_n "checking how $FC finds modules... " >&6; } -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&5 +$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_compile='${FC-f90} $FCFLAGS ${flag}conftestdir -c conftest.$ac_ext 1>&5' +#include - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - F9XMODFLAG=$flag - break - fi -done +int main(void) { return 0; } -if test -n "$F9XMODFLAG"; then - echo $F9XMODFLAG 1>&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - echo unknown 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" + AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest* -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - ## Change to the Fortran 90 language - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - + # Checking if C++ can handle namespaces - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 +$as_echo_n "checking if $CXX can handle namespaces... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ptr = C_LOC(ichr(1:1)) +namespace H5 { +int fnord; +} +int main(void) { + using namespace H5; + fnord = 37; + return 0; +} - end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 - fi + # Checking if C++ has offsetof extension - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF - program main + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 +$as_echo_n "checking if $CXX has offsetof extension... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end -_ACEOF + #include + #include -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -rm -rf conftest* + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; +$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; + # if C++ can handle static cast - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 +$as_echo_n "checking if $CXX can handle static cast... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void) { + float test_float; + int test_int; + test_float = 37.0; + test_int = static_cast (test_float); + return 0; +} - # look for -l* and *.a constructs in the output - for ac_arg in $ac_fc_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_fc_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" + AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CXX="no" +fi -cat > conftest.$ac_ext <<_ACEOF - program main +## Change back to the C language +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - end -_ACEOF -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS -rm -rf conftest* +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + HL="" +## name of fortran folder inside "hl", if FORTRAN compile is requested + HL_FOR="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 +$as_echo_n "checking if high level library is enabled... " >&6; } +# Check whether --enable-hl was given. +if test "${enable_hl+set}" = set; then : + enableval=$enable_hl; HDF5_HL=$enableval +else + HDF5_HL=yes +fi -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; +if test "X$HDF5_HL" = "Xyes"; then + echo "yes" + HL="hl" - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; +$as_echo "#define INCLUDE_HL 1" >>confdefs.h - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac + ## If Fortran's default real is double precision and HL is being built then configure + ## should fail due to bug HDFFV-889. + if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then + as_fn_error $? "Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl." "$LINENO" 5 + fi +else + echo "no" +fi -ac_cv_fc_libs= +## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## + PERL="" +if test "X$GCC" = "Xyes"; then + for ac_prog in perl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PERL="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Save positional arguments (if any) -ac_save_positional="$@" +fi +fi +PERL=$ac_cv_prog_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -set X $ac_fc_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - if test x"$ac_exists" = xtrue; then : + test -n "$PERL" && break +done -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - if test x"$ac_exists" = xtrue; then : +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## +if test -z "$AR"; then + for ac_prog in ar xar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi fi - ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - esac - ;; - -[LRuYz]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test x"$ac_exists" = xtrue; then : -else - ac_arg="$ac_arg $ac_j" - ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" + test -n "$AR" && break +done +test -n "$AR" || AR=":" + fi - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - if test x"$ac_exists" = xtrue; then : +## Export the AR macro so that it will be placed in the libtool file +## correctly. +export AR + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make fi - ;; - -zallextract*| -zdefaultextract) - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift - -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +## ---------------------------------------------------------------------- +## Set up ${TR} which is used to process DEBUG_PKG. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : +# Extract the first word of "tr", so it can be a program name with args. +set dummy tr; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_TR+:} false; then : $as_echo_n "(cached) " >&6 else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # First, try linking without a dummy main: - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + case $TR in + [\\/]* | ?:[\\/]*) + ac_cv_path_TR="$TR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none + ;; +esac +fi +TR=$ac_cv_path_TR +if test -n "$TR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 +$as_echo "$TR" >&6; } else - ac_cv_fortran_dummy_main=unknown + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF +## ---------------------------------------------------------------------- +## Check that time can be used with srcdir. This is okay on most systems, +## but seems to cause problems on Cygwin. +## The solution on Cygwin is not to record execution time for tests. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 +$as_echo_n "checking if srcdir= and time commands work together... " >&6; } -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - fi -fi +TIME=time +TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` + +if test "X${TIME_TEST}" = "Xbaz"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + TIME= fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext +## The following variables are used to distinguish between building a +## serial and parallel library. +## +## HAVE_PARALLEL -- defined in H5config.h if we are building +## a parallel library even if configure wasn't +## able to find some header file or library that +## might be required. This is defined if the +## user explicitly states +## that a parallel library is being built by supplying +## the `--enable-parallel' configure switch. +## +## PARALLEL -- This variable is set to a non-null value if +## we're building a parallel version of the library. +## +## RUNSERIAL -- This is a command which will be prepended to +## the executable name to run the executable using +## a single process. For serial versions of the +## library this will normally be empty. For parallel +## versions it might be something like `mpiexec -n 1'. +## The value of this variable is substituted in *.in +## files. +## +## RUNPARALLEL -- This is a command which will be prepended to +## the executable name to run the executable on +## multiple processors. For the serial library the +## value will normally be the empty string. For +## parallel library it should be something like +## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will +## eventually contain the number of processors on which +## to run the executable (the double dollarsigns are to +## protect the expansion until make executes the +## command). The value of this variable is +## substituted in *.in files. +## - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +## ---------------------------------------------------------------------- +## Disable shared libraries on CYGWIN. (LK - 04/16/15) +## A number of tests run by "make check" fail on CYGWIN, so for HDF5 v1.8.15 +## we will change the default for shared libraries to disabled. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi +case "`uname`" in + CYGWIN*) + enable_shared="no" + CHECK_WARN="Shared libraries are not currently supported on CYGWIN." + ;; +esac + +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## + +H5_FORTRAN_SHARED="no" +if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 +$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } + H5_FORTRAN_SHARED="yes" + + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) + + case "`uname`" in + Darwin*) + H5_FORTRAN_SHARED="no" + CHECK_WARN="Shared Fortran libraries not currently supported on Mac." + ;; + esac + + ## Report results of check(s) + + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 +$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 +$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 +$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} + if test "X${enable_static}" = "Xno"; then + as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 +$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} + H5_FORTRAN_SHARED="yes" + fi else - ac_cv_fc_mangling="unknown" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +fi - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* + if test "X$H5_FORTRAN_SHARED" = "Xyes"; then + FORTRAN_SHARED_CONDITIONAL_TRUE= + FORTRAN_SHARED_CONDITIONAL_FALSE='#' else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } + FORTRAN_SHARED_CONDITIONAL_TRUE='#' + FORTRAN_SHARED_CONDITIONAL_FALSE= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h +## ---------------------------------------------------------------------- +## dlopen - This will use an improved version of libtool +## win32-dll - This will build clean dlls on win32 platforms. +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h +macro_version='2.4.2' +macro_revision='1.3337' - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" - HAVE_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - PROGRAM main - i = sizeof(x) - END PROGRAM -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" - HAVE_C_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF +ltmain="$ac_aux_dir/ltmain.sh" - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - HAVE_STORAGE_SIZE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_STORAGE_SIZE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - - ## Set the sizeof function for use later in the fortran tests - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then - FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - else - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then - FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(b)" - FC_SIZEOF_C="SIZEOF(c)" - else - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 - fi - fi - - ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" - - HAVE_ISO_FORTRAN_ENV="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE, INTRINSIC :: ISO_FORTRAN_ENV - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_ISO_FORTRAN_ENV="yes" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - ## Check KIND and size of native integer - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -rm -f pac_fconftest.out +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} -if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat > conftest.$ac_ext <<_ACEOF +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE='pac_fconftest.out', form='formatted') - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END - - -_ACEOF -if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - - - pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" - pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" - PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" -cat >>confdefs.h <<_ACEOF -#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION -_ACEOF - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND -_ACEOF -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 -$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 -$as_echo_n "checking for Fortran REAL KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 -$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count fi - rm -f pac_fconftest.out + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 -$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_path_SED=$SED fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of native KINDS" >&5 -$as_echo_n "checking sizeof of native KINDS... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -pack_int_sizeof="" -rm -f pac_fconftest.out - cat > conftest.$ac_ext <<_ACEOF - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER a - REAL b - DOUBLE PRECISION c - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,*) $FC_SIZEOF_A - WRITE(8,*) kind(a) - WRITE(8,*) $FC_SIZEOF_B - WRITE(8,*) kind(b) - WRITE(8,*) $FC_SIZEOF_C - WRITE(8,*) kind(c) - CLOSE(8) - END -_ACEOF - if test "$cross_compiling" = yes; then : - pack_int_sizeof="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam + ac_cv_path_GREP=$GREP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pack_int_sizeof" >&5 -$as_echo "$pack_int_sizeof" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - ## Find all available KINDs - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -rm -f pac_fconftest.out -if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE='pac_fconftest.out', form='formatted') - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END - - -_ACEOF -if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - - - pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" - pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" - PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" - -cat >>confdefs.h <<_ACEOF -#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION -_ACEOF - + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND -_ACEOF + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF +test -z "$GREP" && GREP=grep -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 -$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 -$as_echo_n "checking for Fortran REAL KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 -$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 -$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## Find all sizeofs for available KINDs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 -$as_echo_n "checking sizeof of available INTEGER KINDs... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -pack_int_sizeof="" -rm -f pac_fconftest.out -for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do - cat > conftest.$ac_ext <<_ACEOF - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER (KIND=$kind) a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END -_ACEOF - if test "$cross_compiling" = yes; then : - pack_int_sizeof="" +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_int_sizeof="$pack_int_sizeof $sizes," - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out + with_gnu_ld=no +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld -done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available REAL KINDs" >&5 -$as_echo_n "checking sizeof of available REAL KINDs... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -pack_real_sizeof="" -rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - REAL (KIND=$kind) :: a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END -_ACEOF - if test "$cross_compiling" = yes; then : - - pack_real_sizeof="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_real_sizeof="$pack_real_sizeof $sizes," - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - -done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - - - - - - - - - - - - - - - - - - - - - - ## Setting definition if there is a 16 byte fortran integer - if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then - HAVE_Fortran_INTEGER_SIZEOF_16="1" - -$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 1" >>confdefs.h - - else - HAVE_Fortran_INTEGER_SIZEOF_16="0" - -$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h - - fi - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h - - fi - - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h - - fi - - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h - + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" fi - - ## See if C_LONG_DOUBLE is available - - HAVE_C_LONG_DOUBLE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_LONG_DOUBLE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_LONG_DOUBLE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE ISO_C_BINDING - REAL(KIND=C_LONG_DOUBLE) :: d - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - FORTRAN_HAVE_C_LONG_DOUBLE="0" - if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_LONG_DOUBLE="1" - -$as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h - - fi - - ## Is C_LONG_DOUBLE different from C_DOUBLE - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then - - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE" >&5 -$as_echo_n "checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE... " >&6; } - - cat > conftest.$ac_ext <<_ACEOF - - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" - -$as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h - - else - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - fi - fi - - FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} - -cat >>confdefs.h <<_ACEOF -#define FORTRAN_SIZEOF_LONG_DOUBLE "${ac_cv_sizeof_long_double}" -_ACEOF - - - - - max_real_fortran_sizeof="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" - max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" - - if test "$ac_cv_sizeof___float128" != 0;then - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&5 -$as_echo "$as_me: WARNING: - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&2;} - PAC_FC_ALL_REAL_KINDS="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`" - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5 -$as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND_SIZEOF $H5CONFIG_F_RKIND_SIZEOF -_ACEOF - - -## Change back to the C language - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else - FC="no" -fi - -## ---------------------------------------------------------------------- -## Check if they would like the C++ interface compiled -## -## We need to check for a C++ compiler unconditionally, since -## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -## miss even if c++ is not enabled. - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -8526,7 +8344,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -8536,32 +8354,32 @@ IFS=$as_save_IFS fi fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$CXX" && break + test -n "$DUMPBIN" && break done fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -8570,7 +8388,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -8580,21 +8398,21 @@ IFS=$as_save_IFS fi fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_CXX" && break + test -n "$ac_ct_DUMPBIN" && break done - if test "x$ac_ct_CXX" = x; then - CXX="g++" + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -8602,670 +8420,390 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CXX=$ac_ct_CXX + DUMPBIN=$ac_ct_DUMPBIN fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done +fi +test -z "$NM" && NM=nm -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_compiler_gnu=no + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - GXX= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + i=0 + teststring="ABCD" -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi +max_cmd_len=$lt_cv_sys_max_cmd_len - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CXXCPP=$CXXCPP +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + lt_unset=false fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## this is checked for when AC_HEADER_STDC is done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 -$as_echo_n "checking if c++ interface enabled... " >&6; } -# Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; HDF_CXX=$enableval -fi -if test "X$HDF_CXX" = "Xyes"; then - echo "yes" - HDF5_INTERFACES="$HDF5_INTERFACES c++" +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac - ## Change to the C++ language - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Checking if C++ needs old style header files in includes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 -$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int main(void) { return 0; } -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" - AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } - # Checking if C++ can handle namespaces - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 -$as_echo_n "checking if $CXX can handle namespaces... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace H5 { -int fnord; -} -int main(void) { - using namespace H5; - fnord = 37; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - # Checking if C++ has offsetof extension + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 -$as_echo_n "checking if $CXX has offsetof extension... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - #include - #include +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - struct index_st - { - unsigned char type; - unsigned char num; - unsigned int len; - }; - typedef struct index_st index_t; - int x,y; - x = offsetof(struct index_st, len); - y = offsetof(index_t, num) - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - # if C++ can handle static cast - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 -$as_echo_n "checking if $CXX can handle static cast... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int main(void) { - float test_float; - int test_int; - test_float = 37.0; - test_int = static_cast (test_float); - return 0; -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" - AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXX="no" + lt_cv_ld_reload_flag='-r' fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac -## Change back to the C language -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -## ---------------------------------------------------------------------- -## Check if they would like the High Level library compiled -## - HL="" -## name of fortran folder inside "hl", if FORTRAN compile is requested - HL_FOR="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 -$as_echo_n "checking if high level library is enabled... " >&6; } -# Check whether --enable-hl was given. -if test "${enable_hl+set}" = set; then : - enableval=$enable_hl; HDF5_HL=$enableval -else - HDF5_HL=yes -fi -if test "X$HDF5_HL" = "Xyes"; then - echo "yes" - HL="hl" -$as_echo "#define INCLUDE_HL 1" >>confdefs.h -else - echo "no" -fi -## ---------------------------------------------------------------------- -## Check which archiving tool to use. This needs to be done before -## the AM_PROG_LIBTOOL macro. -## -if test -z "$AR"; then - for ac_prog in ar xar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9274,7 +8812,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_prog" + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9284,84 +8822,37 @@ IFS=$as_save_IFS fi fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$AR" && break -done -test -n "$AR" || AR=":" - -fi - - -## Export the AR macro so that it will be placed in the libtool file -## correctly. -export AR - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" fi - - - - -## ---------------------------------------------------------------------- -## Set up ${TR} which is used to process DEBUG_PKG. - -# Extract the first word of "tr", so it can be a program name with args. -set dummy tr; ac_word=$2 +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TR+:} false; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - case $TR in - [\\/]* | ?:[\\/]*) - ac_cv_path_TR="$TR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9369,242 +8860,275 @@ done done IFS=$as_save_IFS - ;; -esac fi -TR=$ac_cv_path_TR -if test -n "$TR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 -$as_echo "$TR" >&6; } +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi +test -z "$OBJDUMP" && OBJDUMP=objdump -## ---------------------------------------------------------------------- -## Check that time can be used with srcdir. This is okay on most systems, -## but seems to cause problems on Cygwin. -## The solution on Cygwin is not to record execution time for tests. -## -## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- -## and 64-bit platforms. Given how long this has been true, it seems -## unlikely to change, but we should probably re-test this periodically. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 -$as_echo_n "checking if srcdir= and time commands work together... " >&6; } -TIME=time -TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` -if test "X${TIME_TEST}" = "Xbaz"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - TIME= -fi - - -## The following variables are used to distinguish between building a -## serial and parallel library. -## -## HAVE_PARALLEL -- defined in H5config.h if we are building -## a parallel library even if configure wasn't -## able to find some header file or library that -## might be required. This is defined if the -## user explicitly states -## that a parallel library is being built by supplying -## the `--enable-parallel' configure switch. -## -## PARALLEL -- This variable is set to a non-null value if -## we're building a parallel version of the library. -## -## RUNSERIAL -- This is a command which will be prepended to -## the executable name to run the executable using -## a single process. For serial versions of the -## library this will normally be empty. For parallel -## versions it might be something like `mpiexec -n 1'. -## The value of this variable is substituted in *.in -## files. -## -## RUNPARALLEL -- This is a command which will be prepended to -## the executable name to run the executable on -## multiple processors. For the serial library the -## value will normally be the empty string. For -## parallel library it should be something like -## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -## eventually contain the number of processors on which -## to run the executable (the double dollarsigns are to -## protect the expansion until make executes the -## command). The value of this variable is -## substituted in *.in files. -## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; -## ---------------------------------------------------------------------- -## Disable shared libraries on CYGWIN. (LK - 04/16/15) -## A number of tests run by "make check" fail on CYGWIN, so for HDF5 v1.8.15 -## we will change the default for shared libraries to disabled. +beos*) + lt_cv_deplibs_check_method=pass_all + ;; +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; -case "`uname`" in - CYGWIN*) - enable_shared="no" - CHECK_WARN="Shared libraries are not currently supported on CYGWIN." - ;; -esac +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; -## ---------------------------------------------------------------------- -## Fortran libraries are not currently supported on Mac. Disable them. -## (this is overridable with --enable-unsupported). -## +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; -H5_FORTRAN_SHARED="no" -if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 -$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } - H5_FORTRAN_SHARED="yes" +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; - ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; - case "`uname`" in - Darwin*) - H5_FORTRAN_SHARED="no" - CHECK_WARN="Shared Fortran libraries not currently supported on Mac." +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; - esac - - ## Report results of check(s) - - if test "X${H5_FORTRAN_SHARED}" = "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 -$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} - if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 -$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 -$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} - if test "X${enable_static}" = "Xno"; then - as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 -$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} - H5_FORTRAN_SHARED="yes" - fi + esac else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + lt_cv_deplibs_check_method=pass_all fi -fi + ;; - if test "X$H5_FORTRAN_SHARED" = "Xyes"; then - FORTRAN_SHARED_CONDITIONAL_TRUE= - FORTRAN_SHARED_CONDITIONAL_FALSE='#' -else - FORTRAN_SHARED_CONDITIONAL_TRUE='#' - FORTRAN_SHARED_CONDITIONAL_FALSE= -fi +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; -## ---------------------------------------------------------------------- -## Create libtool. If shared/static libraries are going to be enabled -## or disabled, it should happen before these macros. +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; -## ---------------------------------------------------------------------- -## dlopen - This will use an improved version of libtool -## win32-dll - This will build clean dlls on win32 platforms. -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; -macro_version='2.4.2' -macro_revision='1.3337' +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown -ltmain="$ac_aux_dir/ltmain.sh" -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac @@ -9616,81 +9140,99 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - ac_cv_path_SED=$SED + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" +test -z "$DLLTOOL" && DLLTOOL=dlltool @@ -9701,197 +9243,37 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + lt_cv_sharedlib_from_linklib_cmd='unknown' - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -9899,76 +9281,18 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" +if test -n "$ac_tool_prefix"; then + for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9977,7 +9301,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9987,32 +9311,32 @@ IFS=$as_save_IFS fi fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$DUMPBIN" && break + test -n "$AR" && break done fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -10021,7 +9345,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -10031,21 +9355,21 @@ IFS=$as_save_IFS fi fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_DUMPBIN" && break + test -n "$ac_ct_AR" && break done - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" + if test "x$ac_ct_AR" = x; then + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -10053,374 +9377,182 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + AR=$ac_ct_AR fi fi -test -z "$NM" && NM=nm - - +: ${AR=ar} +: ${AR_FLAGS=cru} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + archiver_list_spec=$lt_cv_ar_at_file fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - lt_cv_ld_reload_flag='-r' + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi +test -z "$STRIP" && STRIP=: @@ -10428,15 +9560,15 @@ esac if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -10445,7 +9577,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -10455,10 +9587,10 @@ IFS=$as_save_IFS fi fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10466,17 +9598,17 @@ fi fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -10485,7 +9617,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" + ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -10495,17 +9627,17 @@ IFS=$as_save_IFS fi fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -10513,244 +9645,67 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OBJDUMP=$ac_ct_OBJDUMP + RANLIB=$ac_ct_RANLIB fi else - OBJDUMP="$ac_cv_prog_OBJDUMP" + RANLIB="$ac_cv_prog_RANLIB" fi -test -z "$OBJDUMP" && OBJDUMP=objdump - - +test -z "$RANLIB" && RANLIB=: +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -10765,257 +9720,267 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +# Allow CC to be a program name with arguments. +compiler=$CC +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' + # Check to see that the pipe works correctly. + pipe_works=no -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif +#ifdef __cplusplus +extern "C" { +#endif +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + cat <<_LT_EOF >> conftest.$ac_ext +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - + rm -rf conftest* conftst* - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= fi done - done -IFS=$as_save_IFS fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi - test -n "$ac_ct_AR" && break -done - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi -: ${AR=ar} -: ${AR_FLAGS=cru} @@ -11027,65 +9992,11 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi @@ -11093,184 +10004,337 @@ fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + with_sysroot=no fi -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi -test -z "$STRIP" && STRIP=: +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi -done - done -IFS=$as_save_IFS + rm -rf conftest* + ;; -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -11278,340 +10342,499 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - RANLIB=$ac_ct_RANLIB + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else - RANLIB="$ac_cv_prog_RANLIB" + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi -test -z "$RANLIB" && RANLIB=: - +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= -if test -n "$RANLIB"; then case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Allow CC to be a program name with arguments. -compiler=$CC +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac +done + done +IFS=$as_save_IFS -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi @@ -11638,835 +10861,485 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 else - with_sysroot=no + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif +#ifdef __STDC__ +# include +#else +# include #endif -int -main () -{ - - ; - return 0; -} + Syntax error _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes +if ac_fn_c_try_cpp "$LINENO"; then : + else - lt_cv_cc_needs_belf=no + # Broken: fails on valid input. +continue fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" +rm -f conftest.err conftest.i conftest.$ac_ext -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi + done + ac_cv_prog_CPP=$CPP fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. + CPP=$ac_cv_prog_CPP else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_cv_header_stdc=no +fi +rm -f conftest* fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_stdc=no fi +rm -f conftest* - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_stdc=no fi - - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS fi fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + fi - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi done - done -IFS=$as_save_IFS -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi + done - done -IFS=$as_save_IFS -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi +# Set options +enable_dlopen=yes - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + enable_win32_dll=no -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else - OTOOL64="$ac_cv_prog_OTOOL64" + enable_shared=yes fi @@ -12477,6 +11350,28 @@ fi + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi @@ -12487,218 +11382,86 @@ fi +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi +test -z "$pic_mode" && pic_mode=default - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF -fi -done +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' -# Set options -enable_dlopen=yes - enable_win32_dll=no - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi @@ -12708,28 +11471,6 @@ fi - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi @@ -12740,106 +11481,7 @@ fi -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" +test -z "$LN_S" && LN_S="ln -s" @@ -22676,319 +21318,1190 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_FC= +if test -n "$hardcode_libdir_flag_spec_FC" || + test -n "$runpath_var_FC" || + test "X$hardcode_automatic_FC" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_FC" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no && + test "$hardcode_minus_L_FC" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_FC=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_FC=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_FC=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 +$as_echo "$hardcode_action_FC" >&6; } + +if test "$hardcode_action_FC" = relink || + test "$inherit_rpath_FC" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + + +## ---------------------------------------------------------------------- +## Check if we should install only statically linked executables. +## This check needs to occur after libtool is initialized because +## we check a libtool cache value and may issue a warning based +## on its result. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 +$as_echo_n "checking if we should install only statically linked executables... " >&6; } +# Check whether --enable-static_exec was given. +if test "${enable_static_exec+set}" = set; then : + enableval=$enable_static_exec; STATIC_EXEC=$enableval +fi + + +if test "X$STATIC_EXEC" = "Xyes"; then + echo "yes" + ## Issue a warning if -static flag is not supported. + if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then + echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." + LT_STATIC_EXEC="" + else + LT_STATIC_EXEC="-all-static" + fi +else + echo "no" + LT_STATIC_EXEC="" +fi + if test "X$LT_STATIC_EXEC" = X; then + USE_PLUGINS_CONDITIONAL_TRUE= + USE_PLUGINS_CONDITIONAL_FALSE='#' +else + USE_PLUGINS_CONDITIONAL_TRUE='#' + USE_PLUGINS_CONDITIONAL_FALSE= +fi + + + + +## Fix up the INSTALL macro if it's a relative path. We want the +## full-path to the binary instead. +case "$INSTALL" in + *install-sh*) + INSTALL='\${top_srcdir}/bin/install-sh -c' + ;; +esac + +## ---------------------------------------------------------------------- +## Some users have reported problems with libtool's use of '-Wl,-rpath' to +## link shared libraries in nondefault directories. Allow users to +## disable embedding the rpath information in the executables and to +## instead solely rely on the information in LD_LIBRARY_PATH. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 +$as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } +# Check whether --enable-sharedlib-rpath was given. +if test "${enable_sharedlib_rpath+set}" = set; then : + enableval=$enable_sharedlib_rpath; RPATH=$enableval +fi + + +case "X-$RPATH" in + X-no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + runpath_var= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_into_libs=no + ;; + X-|X-yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } + as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5 + ;; +esac + +## ---------------------------------------------------------------------- +## pmake will throw an error if variables are undefined in a Makefile. +## These errors can be changed to warnings using the -V flag. +## + AM_MAKEFLAGS="" + +## Don't run test if MAKE is defined but is the empty string +if test -n "${MAKE-make}"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 +$as_echo_n "checking whether make will build with undefined variables... " >&6; } + + cat >maketest </dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, setting -V flag" >&5 +$as_echo "no, setting -V flag" >&6; } + AM_MAKEFLAGS="\-V" + fi + + rm maketest +fi + +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 +$as_echo_n "checking for production mode... " >&6; } +# Check whether --enable-production was given. +if test "${enable_production+set}" = set; then : + enableval=$enable_production; +fi + + +case "X-$enable_production" in + X-yes) + enable_production="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5 +$as_echo "production" >&6; } + CONFIG_MODE=production + H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" + ;; + X-|X-no) + enable_production="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5 +$as_echo "development" >&6; } + CONFIG_MODE=development + H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" + ;; + X-pg|X-profile) + enable_production="profile" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 +$as_echo "profile" >&6; } + CONFIG_MODE=profile + H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" + ;; + *) + enable_production="user-defined" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5 +$as_echo "user-defined" >&6; } + CONFIG_MODE="$enableval" + ;; +esac + +## ---------------------------------------------------------------------- +## Check for system libraries. "dl" stands for dynamically loaded library +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 +$as_echo_n "checking for ceil in -lm... " >&6; } +if ${ac_cv_lib_m_ceil+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ceil (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return ceil (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_ceil=yes +else + ac_cv_lib_m_ceil=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 +$as_echo "$ac_cv_lib_m_ceil" >&6; } +if test "x$ac_cv_lib_m_ceil" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + + +if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then + ## ...for Solaris + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_int in -lnsl" >&5 +$as_echo_n "checking for xdr_int in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_xdr_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xdr_int (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return xdr_int (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_xdr_int=yes +else + ac_cv_lib_nsl_xdr_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_xdr_int" >&5 +$as_echo "$ac_cv_lib_nsl_xdr_int" >&6; } +if test "x$ac_cv_lib_nsl_xdr_int" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - +## ---------------------------------------------------------------------- +## Check for system header files. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +fi +## Unix +for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done +for ac_header in sys/socket.h sys/types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done +for ac_header in stddef.h setjmp.h features.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done +for ac_header in dirent.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRENT_H 1 +_ACEOF +fi +done +for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + C9x=yes +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_FC= -if test -n "$hardcode_libdir_flag_spec_FC" || - test -n "$runpath_var_FC" || - test "X$hardcode_automatic_FC" = "Xyes" ; then +done - # We can hardcode non-existent directories. - if test "$hardcode_direct_FC" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no && - test "$hardcode_minus_L_FC" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_FC=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_FC=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_FC=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 -$as_echo "$hardcode_action_FC" >&6; } -if test "$hardcode_action_FC" = relink || - test "$inherit_rpath_FC" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless +## Darwin +for ac_header in mach/mach_time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_mach_time_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MACH_MACH_TIME_H 1 +_ACEOF + fi +done +## Also need to detect Darwin for pubconf +case $host_os in + darwin*) +$as_echo "#define HAVE_DARWIN 1" >>confdefs.h + ;; +esac +## Windows +case "`uname`" in + CYGWIN*) + for ac_header in io.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi - fi # test -n "$compiler" +done - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes + ;; + MINGW*) + for ac_header in io.h winsock2.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_main=yes +else + ac_cv_lib_ws2_32_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + LIBS="-lws2_32 $LIBS" +fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main + ;; + *) + for ac_header in io.h winsock2.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done + ;; +esac - ac_config_commands="$ac_config_commands libtool" +case "$host" in + alpha*-dec*-osf*) + ## The and are needed on the DEC + ## Alpha to turn off UAC fixing. We do *not* attempt to + ## locate these files on other systems because there are too + ## many problems with including them. + for ac_header in sys/sysinfo.h sys/proc.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done + ;; + mips*-sgi*) + ## The is needed on the SGI machines to turn off + ## denormalized floating-point values going to zero. We do *not* + ## attempt to locate these files on other systems because there + ## may be problems with including them. + for ac_header in sys/fpu.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fpu_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_FPU_H 1 +_ACEOF -# Only expand once: +fi +done + for ac_func in get_fpc_csr +do : + ac_fn_c_check_func "$LINENO" "get_fpc_csr" "ac_cv_func_get_fpc_csr" +if test "x$ac_cv_func_get_fpc_csr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GET_FPC_CSR 1 +_ACEOF +fi +done + ;; +esac ## ---------------------------------------------------------------------- -## Check if we should install only statically linked executables. -## This check needs to occur after libtool is initialized because -## we check a libtool cache value and may issue a warning based -## on its result. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 -$as_echo_n "checking if we should install only statically linked executables... " >&6; } -# Check whether --enable-static_exec was given. -if test "${enable_static_exec+set}" = set; then : - enableval=$enable_static_exec; STATIC_EXEC=$enableval +## Some platforms require that all symbols are resolved when a library +## is linked. We can use the -no-undefined flag to tell libtool that +## it will be able to build shared libraries on these architectures, +## as it will not do so by default. +## +if test "X${enable_shared}" = "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 +$as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } + case "`uname`" in + CYGWIN*|MINGW*|AIX*) + ## Add in the -no-undefined flag to LDFLAGS for libtool. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + H5_LDFLAGS="$H5_LDFLAGS -no-undefined" + ;; + *) + ## Don't add in anything. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi +## ---------------------------------------------------------------------- +## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines +## that might need to be set for largefile support to behave +## correctly. This macro is defined in acsite.m4 and overrides +## the version provided by Autoconf (as of v2.65). The custom +## macro additionally adds the appropriate defines to AM_CPPFLAGS +## so that later configure checks have them visible. -if test "X$STATIC_EXEC" = "Xyes"; then - echo "yes" - ## Issue a warning if -static flag is not supported. - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then - echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." - LT_STATIC_EXEC="" - else - LT_STATIC_EXEC="-all-static" - fi +## Check for _FILE_OFFSET_BITS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 else - echo "no" - LT_STATIC_EXEC="" + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break fi - if test "X$LT_STATIC_EXEC" = X; then - USE_PLUGINS_CONDITIONAL_TRUE= - USE_PLUGINS_CONDITIONAL_FALSE='#' -else - USE_PLUGINS_CONDITIONAL_TRUE='#' - USE_PLUGINS_CONDITIONAL_FALSE= +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF - - - -## Fix up the INSTALL macro if it's a relative path. We want the -## full-path to the binary instead. -case "$INSTALL" in - *install-sh*) - INSTALL='\${top_srcdir}/bin/install-sh -c' - ;; + AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; esac +rm -rf conftest* -## ---------------------------------------------------------------------- -## Some users have reported problems with libtool's use of '-Wl,-rpath' to -## link shared libraries in nondefault directories. Allow users to -## disable embedding the rpath information in the executables and to -## instead solely rely on the information in LD_LIBRARY_PATH. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 -$as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } -# Check whether --enable-sharedlib-rpath was given. -if test "${enable_sharedlib_rpath+set}" = set; then : - enableval=$enable_sharedlib_rpath; RPATH=$enableval -fi +## Check for _LARGE_FILES +if test "$ac_cv_sys_file_offset_bits" = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -case "X-$RPATH" in - X-no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - runpath_var= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_into_libs=no - ;; - X-|X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 -$as_echo "error" >&6; } - as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5 - ;; -esac - -## ---------------------------------------------------------------------- -## pmake will throw an error if variables are undefined in a Makefile. -## These errors can be changed to warnings using the -V flag. -## - AM_MAKEFLAGS="" - -## Don't run test if MAKE is defined but is the empty string -if test -n "${MAKE-make}"; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 -$as_echo_n "checking whether make will build with undefined variables... " >&6; } - - cat >maketest </dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, setting -V flag" >&5 -$as_echo "no, setting -V flag" >&6; } - AM_MAKEFLAGS="\-V" - fi +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF - rm maketest + AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; +esac +rm -rf conftest* fi ## ---------------------------------------------------------------------- -## Production flags? Save the value in $CONFIG_MODE so we have it for -## the record. +## Add necessary defines for Linux Systems. ## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 -$as_echo_n "checking for production mode... " >&6; } -# Check whether --enable-production was given. -if test "${enable_production+set}" = set; then : - enableval=$enable_production; -fi +case "$host_cpu-$host_vendor-$host_os" in + *linux*) + ## Make available various LFS-related routines using the following + ## _LARGEFILE*_SOURCE macros. + AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" + + ## Add POSIX support on Linux systems, so defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## + ## This flag was removed from h5cc as of 2009-10-17 when it was found + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen + ## is used only by H5_debug_mask which is used only when debugging in + ## H5_init_library (all in H5.c). When the flag was removed this was + ## the only compile failure noted. + ## + ## This was originally defined as _POSIX_SOURCE which was updated to + ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + ## functionality so clock_gettime and CLOCK_MONOTONIC are defined + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## + ## POSIX feature information can be found in the gcc manual at: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" -case "X-$enable_production" in - X-yes) - enable_production="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5 -$as_echo "production" >&6; } - CONFIG_MODE=production - H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" - ;; - X-|X-no) - enable_production="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5 -$as_echo "development" >&6; } - CONFIG_MODE=development - H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" - ;; - X-pg|X-profile) - enable_production="profile" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 -$as_echo "profile" >&6; } - CONFIG_MODE=profile - H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" - ;; - *) - enable_production="user-defined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5 -$as_echo "user-defined" >&6; } - CONFIG_MODE="$enableval" + ## Also add BSD support on Linux systems, so defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## Linking to the bsd-compat library is required as per the gcc manual: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## however, we do not do this since it breaks the big test on some + ## older platforms. + H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" + + ## _BSD_SOURCE is deprecated as of glibc 2.20, in favor of _DEFAULT_SOURCE. + ## To avoid warnings, we define _DEFAULT_SOURCE in addition to _BSD_SOURCE, + ## which should work for all versions of glibc. + H5_CPPFLAGS="-D_DEFAULT_SOURCE $H5_CPPFLAGS" ;; esac -## ---------------------------------------------------------------------- -## Check for system libraries. "dl" stands for dynamically loaded library -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 -$as_echo_n "checking for ceil in -lm... " >&6; } -if ${ac_cv_lib_m_ceil+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" +## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible +## for configure checks. +## Note: Both will be restored by the end of configure. +CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" +CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ceil (); +#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -23000,48 +22513,46 @@ char ceil (); int main () { -return ceil (); +off64_t n = 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_ceil=yes -else - ac_cv_lib_m_ceil=no +if ac_fn_c_try_compile "$LINENO"; then : + for ac_func in lseek64 fseeko64 ftello64 ftruncate64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +done + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&5 +$as_echo "skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 -$as_echo "$ac_cv_lib_m_ceil" >&6; } -if test "x$ac_cv_lib_m_ceil" = xyes; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +for ac_func in fseeko ftello +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - LIBS="-lm $LIBS" - fi +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); +#include +#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -23053,51 +22564,124 @@ char dlopen (); int main () { -return dlopen (); +struct stat64 sb; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +if ac_fn_c_try_compile "$LINENO"; then : + for ac_func in stat64 fstat64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + else - ac_cv_lib_dl_dlopen=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64() and fstat64()" >&5 +$as_echo "skipping test for stat64() and fstat64()" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +## ---------------------------------------------------------------------- +## Data types and their sizes. +## +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned long _ACEOF - LIBS="-ldl $LIBS" +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t long +_ACEOF fi +ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : -if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - ## ...for Solaris - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : +else + +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t long +_ACEOF + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -23109,48 +22693,23 @@ char socket (); int main () { -return socket (); +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_int in -lnsl" >&5 -$as_echo_n "checking for xdr_int in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_xdr_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char xdr_int (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -23162,47 +22721,28 @@ char xdr_int (); int main () { -return xdr_int (); +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_xdr_int=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - ac_cv_lib_nsl_xdr_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_xdr_int" >&5 -$as_echo "$ac_cv_lib_nsl_xdr_int" >&6; } -if test "x$ac_cv_lib_nsl_xdr_int" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - + ac_cv_c_bigendian=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -## ---------------------------------------------------------------------- -## Check for system header files. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -23215,113 +22755,69 @@ else int main () { +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi +#include -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif #endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi + ac_cv_c_bigendian=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -23334,617 +22830,413 @@ else int main () { -if ((struct tm *) 0) -return 0; +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -## Unix -for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in sys/socket.h sys/types.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -done + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; -for ac_header in stddef.h setjmp.h features.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) -done +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h -for ac_header in dirent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" -if test "x$ac_cv_header_dirent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRENT_H 1 -_ACEOF + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac -fi +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if ${ac_cv_sizeof_char+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : -done +else + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char=0 + fi +fi -for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF - C9x=yes fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } -done -## Darwin -for ac_header in mach/mach_time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_TIME_H 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF -fi - -done - -## Also need to detect Darwin for pubconf -case $host_os in - darwin*) - -$as_echo "#define HAVE_DARWIN 1" >>confdefs.h - ;; -esac +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : -## Windows -case "`uname`" in - CYGWIN*) - for ac_header in io.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +else + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short=0 + fi +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } -done - ;; - MINGW*) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 -$as_echo_n "checking for main in -lws2_32... " >&6; } -if ${ac_cv_lib_ws2_32_main+:} false; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ws2_32_main=yes else - ac_cv_lib_ws2_32_main=no + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 -$as_echo "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } - LIBS="-lws2_32 $LIBS" -fi -ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main - ;; - *) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -fi - -done - ;; -esac +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 +$as_echo_n "checking size of unsigned... " >&6; } +if ${ac_cv_sizeof_unsigned+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : -case "$host" in - alpha*-dec*-osf*) - ## The and are needed on the DEC - ## Alpha to turn off UAC fixing. We do *not* attempt to - ## locate these files on other systems because there are too - ## many problems with including them. - for ac_header in sys/sysinfo.h sys/proc.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +else + if test "$ac_cv_type_unsigned" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned=0 + fi +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 +$as_echo "$ac_cv_sizeof_unsigned" >&6; } -done - ;; - mips*-sgi*) - ## The is needed on the SGI machines to turn off - ## denormalized floating-point values going to zero. We do *not* - ## attempt to locate these files on other systems because there - ## may be problems with including them. - for ac_header in sys/fpu.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_fpu_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_FPU_H 1 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned _ACEOF -fi -done +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - for ac_func in get_fpc_csr -do : - ac_fn_c_check_func "$LINENO" "get_fpc_csr" "ac_cv_func_get_fpc_csr" -if test "x$ac_cv_func_get_fpc_csr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GET_FPC_CSR 1 -_ACEOF +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } - ;; -esac -## ---------------------------------------------------------------------- -## Some platforms require that all symbols are resolved when a library -## is linked. We can use the -no-undefined flag to tell libtool that -## it will be able to build shared libraries on these architectures, -## as it will not do so by default. -## -if test "X${enable_shared}" = "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 -$as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } - case "`uname`" in - CYGWIN*|MINGW*|AIX*) - ## Add in the -no-undefined flag to LDFLAGS for libtool. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - H5_LDFLAGS="$H5_LDFLAGS -no-undefined" - ;; - *) - ## Don't add in anything. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi -## ---------------------------------------------------------------------- -## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines -## that might need to be set for largefile support to behave -## correctly. This macro is defined in acsite.m4 and overrides -## the version provided by Autoconf (as of v2.65). The custom -## macro additionally adds the appropriate defines to AM_CPPFLAGS -## so that later configure checks have them visible. +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF -## Check for _FILE_OFFSET_BITS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF - AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; -esac -rm -rf conftest* -## Check for _LARGE_FILES -if test "$ac_cv_sys_file_offset_bits" = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 +$as_echo_n "checking size of __int64... " >&6; } +if ${ac_cv_sizeof___int64+:} false; then : $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break +else + if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (__int64) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof___int64=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 +$as_echo "$ac_cv_sizeof___int64" >&6; } + + + cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files +#define SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF - AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; -esac -rm -rf conftest* -fi - -## ---------------------------------------------------------------------- -## Add necessary defines for Linux Systems. -## -case "$host_cpu-$host_vendor-$host_os" in - *linux*) - ## Make available various LFS-related routines using the following - ## _LARGEFILE*_SOURCE macros. - AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" - ## Add POSIX support on Linux systems, so defines - ## __USE_POSIX, which is required to get the prototype for fdopen - ## defined correctly in . - ## - ## This flag was removed from h5cc as of 2009-10-17 when it was found - ## that the flag broke compiling netCDF-4 code with h5cc, but kept in - ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - ## is used only by H5_debug_mask which is used only when debugging in - ## H5_init_library (all in H5.c). When the flag was removed this was - ## the only compile failure noted. - ## - ## This was originally defined as _POSIX_SOURCE which was updated to - ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. This was later updated to 200112L so that - ## posix_memalign() is visible for the direct VFD code on Linux - ## systems. - ## - ## POSIX feature information can be found in the gcc manual at: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html -##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if ${ac_cv_sizeof_float+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : - ## Need to add this so that O_DIRECT is visible for the direct - ## VFD on Linux systems. - H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" +else + if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (float) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_float=0 + fi +fi - ## Also add BSD support on Linux systems, so defines - ## __USE_BSD, which is required to get the prototype for strdup - ## defined correctly in and snprintf & vsnprintf defined - ## correctly in - ## Linking to the bsd-compat library is required as per the gcc manual: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - ## however, we do not do this since it breaks the big test on some - ## older platforms. - H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } - ## _BSD_SOURCE is deprecated as of glibc 2.20, in favor of _DEFAULT_SOURCE. - ## To avoid warnings, we define _DEFAULT_SOURCE in addition to _BSD_SOURCE, - ## which should work for all versions of glibc. - H5_CPPFLAGS="-D_DEFAULT_SOURCE $H5_CPPFLAGS" - ;; -esac -## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible -## for configure checks. -## Note: Both will be restored by the end of configure. -CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" -CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -off64_t n = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in lseek64 fseeko64 ftello64 ftruncate64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float _ACEOF -fi -done +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if ${ac_cv_sizeof_double+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&5 -$as_echo "skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&6; } + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_func in fseeko ftello -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct stat64 sb; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in stat64 fstat64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double _ACEOF -fi -done + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if ${ac_cv_sizeof_long_double+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64() and fstat64()" >&5 -$as_echo "skipping test for stat64() and fstat64()" >&6; } + if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_double=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF + + ## Checkpoint the cache cat >confcache <<\_ACEOF @@ -27236,13 +26528,13 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: default ($DEBUG_PKG)" >&5 $as_echo "default ($DEBUG_PKG)" >&6; } ;; X-all) DEBUG_PKG=$all_packages -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($DEBUG_PKG)" >&5 $as_echo "all ($DEBUG_PKG)" >&6; } ;; @@ -27250,7 +26542,7 @@ $as_echo "all ($DEBUG_PKG)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } DEBUG_PKG= -## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_PKG" >&5 @@ -31025,7 +30317,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31165,7 +30457,26 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi - +if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FORTRAN_HAVE_C_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_C_SIZEOF_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_HAVE_C_SIZEOF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FORTRAN_HAVE_STORAGE_SIZE_TRUE}" && test -z "${FORTRAN_HAVE_STORAGE_SIZE_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_HAVE_STORAGE_SIZE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -31178,6 +30489,7 @@ if test -z "${USE_PLUGINS_CONDITIONAL_TRUE}" && test -z "${USE_PLUGINS_CONDITION as_fn_error $? "conditional \"USE_PLUGINS_CONDITIONAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi + if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -32267,7 +31579,6 @@ do "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "fortran/src/H5config_f.inc") CONFIG_HEADERS="$CONFIG_HEADERS fortran/src/H5config_f.inc" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -32321,7 +31632,6 @@ do "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;; "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;; - "fortran/src/H5fort_type_defines.h") CONFIG_FILES="$CONFIG_FILES fortran/src/H5fort_type_defines.h" ;; "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;; "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;; "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;; @@ -33051,7 +32361,6 @@ $as_echo X"$file" | done } ;; - "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/configure.ac b/configure.ac index c37a1c4..1e67f39 100644 --- a/configure.ac +++ b/configure.ac @@ -27,17 +27,6 @@ AC_PREREQ([2.69]) ## release!!! ## AC_INIT([HDF5], [1.9.227], [help@hdfgroup.org]) - -## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING -## -------------------------------------------------------------------------- -## Requirement #1: Check if Perl is installed. -## -AC_SUBST([PERL]) PERL="" -AC_CHECK_PROG([PERL], [perl],, [$PATH]) -if test "x$PERL" = "xfalse"; then - AC_MSG_ERROR([*** Perl is required for installing HDF5, but Perl could not be found!]) -fi - AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) @@ -160,6 +149,7 @@ AC_MSG_RESULT([done]) ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. +## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -167,7 +157,6 @@ AC_MSG_RESULT([done]) ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. -## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -179,7 +168,9 @@ AC_SUBST([EXTERNAL_FILTERS]) AC_SUBST([MPE]) MPE=no AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no +AC_SUBST([HDF_FORTRAN2003]) HDF_FORTRAN2003=no AC_SUBST([FC]) HDF_FORTRAN=no +AC_SUBST([FC2003]) HDF_FORTRAN2003=no AC_SUBST([HDF_CXX]) HDF_CXX=no AC_SUBST([CXX]) HDF_CXX=no AC_SUBST([HDF5_HL]) HDF5_HL=yes @@ -192,7 +183,6 @@ AC_SUBST([STATIC_SHARED]) AC_SUBST([enable_shared]) AC_SUBST([enable_static]) AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` -AC_SUBST([PAC_C_MAX_REAL_PRECISION]) ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check @@ -357,57 +347,13 @@ case "X-$ALLOW_UNSUPPORTED" in esac ## ---------------------------------------------------------------------- -## Data types and their sizes. -## -AC_TYPE_OFF_T -AC_CHECK_TYPE([size_t], [], - [AC_DEFINE_UNQUOTED([size_t], [unsigned long], - [Define to `unsigned long' if does not define.])]) -AC_CHECK_TYPE([ssize_t], [], - [AC_DEFINE_UNQUOTED([ssize_t], [long], - [Define to `long' if does not define.])]) -AC_CHECK_TYPE([ptrdiff_t], [], - [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], - [Define to `long' if does not define.])]) -AC_C_BIGENDIAN -AC_CHECK_SIZEOF([char], [1]) -AC_CHECK_SIZEOF([short], [2]) -AC_CHECK_SIZEOF([int], [4]) -AC_CHECK_SIZEOF([unsigned], [4]) -AC_CHECK_SIZEOF([long], [4]) -AC_CHECK_SIZEOF([long long], [8]) -AC_CHECK_SIZEOF([__int64], [8]) -AC_CHECK_SIZEOF([float], [4]) -AC_CHECK_SIZEOF([double], [8]) -AC_CHECK_SIZEOF([long double], [8]) - -## Check for non-standard extenstion __FLOAT128 -HAVE_FLOAT128=0 -HAVE_QUADMATH=0 -FLT128_DIG=0 -LDBL_DIG=0 - -AC_CHECK_SIZEOF([__float128]) -AC_CHECK_SIZEOF([_Quad]) -AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) -PAC_FC_LDBL_DIG - -if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then - AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG -else - PAC_C_MAX_REAL_PRECISION=$LDBL_DIG -fi -AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C]) -AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION]) -## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--enable-fortran], - [Compile the Fortran interface [default=no]])], + [Compile the Fortran 90/95 interface [default=no]])], [HDF_FORTRAN=$enableval]) if test "X$HDF_FORTRAN" = "Xyes"; then @@ -416,16 +362,35 @@ else echo "no" fi -if test "X$HDF_FORTRAN" = "Xyes"; then -## We will output an include file for Fortran, H5config_f.inc which -## contains various configure definitions used by the Fortran Library. -## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro -## names and those generated by another software package that uses the HDF5 library. - AC_CONFIG_HEADERS([fortran/src/H5config_f.inc], - [cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc]) +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## +AC_MSG_CHECKING([if Fortran 2003 interface enabled]) +AC_ARG_ENABLE([fortran2003], + [AS_HELP_STRING([--enable-fortran2003], + [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], + [HDF_FORTRAN2003=$enableval]) + +## ---------------------------------------------------------------------- +## Check to make sure --enable-fortran is present if --enable-fortran2003 +## was specified + +if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then + echo "no" + AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) +else + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi +fi + +if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([FC]) HDF_FORTRAN=yes + AC_SUBST([HAVE_FORTRAN_2003]) HDF5_INTERFACES="$HDF5_INTERFACES fortran" @@ -458,14 +423,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran]) - fi - ## -------------------------------------------------------------------- ## Define wrappers for the C compiler to use Fortran function names ## @@ -477,138 +434,39 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" PAC_PROG_FC_C_SIZEOF - - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - PAC_PROG_FC_STORAGE_SIZE - - ## Set the sizeof function for use later in the fortran tests - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then - FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - else - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then - FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(b)" - FC_SIZEOF_C="SIZEOF(c)" - else - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) - fi - fi - ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" - PAC_PROG_FC_ISO_FORTRAN_ENV - ## Check KIND and size of native integer - PAC_FC_NATIVE_INTEGER - - ## Find all available KINDs - PAC_FC_AVAIL_KINDS - ## Find all sizeofs for available KINDs - PAC_FC_SIZEOF_INT_KINDS - PAC_FC_SIZEOF_REAL_KINDS - - AC_SUBST([PAC_FC_ALL_REAL_KINDS]) - AC_SUBST([PAC_FC_MAX_REAL_PRECISION]) - AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) - AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) - AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_REAL_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) - AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) - AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) - AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) - AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) - AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) - AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) - AC_SUBST([H5CONFIG_F_NUM_RKIND]) - AC_SUBST([H5CONFIG_F_RKIND]) - AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) - AC_SUBST([H5CONFIG_F_NUM_IKIND]) - AC_SUBST([H5CONFIG_F_IKIND]) - - ## Setting definition if there is a 16 byte fortran integer - if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then - HAVE_Fortran_INTEGER_SIZEOF_16="1" - AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [1], [Determine if INTEGER*16 is available]) - else - HAVE_Fortran_INTEGER_SIZEOF_16="0" - AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) - fi - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) - fi - - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) - fi - - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) - fi + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + PAC_PROG_FC_STORAGE_SIZE - ## See if C_LONG_DOUBLE is available - PAC_PROG_FC_HAVE_C_LONG_DOUBLE + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. + PAC_PROG_FC_DEFAULT_REALisDBLE - FORTRAN_HAVE_C_LONG_DOUBLE="0" - if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_LONG_DOUBLE="1" - AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) - fi + if test "X$HDF_FORTRAN2003" = "Xyes"; then - ## Is C_LONG_DOUBLE different from C_DOUBLE - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then - PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE - if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" - AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. + PAC_PROG_FC_HAVE_F2003_REQUIREMENTS + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) else - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - fi - fi - - FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} - AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double]) - - - dnl get the largest sizeof for REAL kinds - - max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" - max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" - - dnl remove the invalid kind from the list - if test "$ac_cv_sizeof___float128" != 0;then - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then - AC_MSG_WARN([ - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - ]) - PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`" + HAVE_FORTRAN_2003="yes" fi fi - AC_MSG_CHECKING([for Fortran interoperable KINDS with C]) - AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) - - dnl count the number of real kinds - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" - - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) - -## Change back to the C language - AC_LANG_POP(Fortran) else FC="no" fi +## Change back to the C language +AC_LANG_POP(Fortran) + +AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) + ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## @@ -672,12 +530,27 @@ if test "X$HDF5_HL" = "Xyes"; then HL="hl" AC_DEFINE([INCLUDE_HL], [1], [Define if HDF5's high-level library headers should be included in hdf5.h]) + + ## If Fortran's default real is double precision and HL is being built then configure + ## should fail due to bug HDFFV-889. + if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then + AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.]) + fi else echo "no" fi ## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## +AC_SUBST([PERL]) PERL="" +if test "X$GCC" = "Xyes"; then + AC_CHECK_PROGS([PERL], [perl],, [$PATH]) +fi + +## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. ## @@ -1102,7 +975,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html -##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. @@ -1143,6 +1016,31 @@ AC_TRY_COMPILE([ [AC_CHECK_FUNCS([stat64 fstat64])], [AC_MSG_RESULT([skipping test for stat64() and fstat64()])]) +## ---------------------------------------------------------------------- +## Data types and their sizes. +## +AC_TYPE_OFF_T +AC_CHECK_TYPE([size_t], [], + [AC_DEFINE_UNQUOTED([size_t], [unsigned long], + [Define to `unsigned long' if does not define.])]) +AC_CHECK_TYPE([ssize_t], [], + [AC_DEFINE_UNQUOTED([ssize_t], [long], + [Define to `long' if does not define.])]) +AC_CHECK_TYPE([ptrdiff_t], [], + [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], + [Define to `long' if does not define.])]) +AC_C_BIGENDIAN +AC_CHECK_SIZEOF([char], [1]) +AC_CHECK_SIZEOF([short], [2]) +AC_CHECK_SIZEOF([int], [4]) +AC_CHECK_SIZEOF([unsigned], [4]) +AC_CHECK_SIZEOF([long], [4]) +AC_CHECK_SIZEOF([long long], [8]) +AC_CHECK_SIZEOF([__int64], [8]) +AC_CHECK_SIZEOF([float], [4]) +AC_CHECK_SIZEOF([double], [8]) +AC_CHECK_SIZEOF([long double], [8]) + ## Checkpoint the cache AC_CACHE_SAVE @@ -1906,18 +1804,18 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([default ($DEBUG_PKG)]) ;; X-all) DEBUG_PKG=$all_packages -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([all ($DEBUG_PKG)]) ;; X-no|X-none) AC_MSG_RESULT([none]) DEBUG_PKG= -## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" + H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) AC_MSG_RESULT([$DEBUG_PKG]) @@ -3142,7 +3040,6 @@ AC_CONFIG_FILES([src/libhdf5.settings fortran/Makefile fortran/src/h5fc fortran/src/Makefile - fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile diff --git a/examples/Makefile.in b/examples/Makefile.in index 79232ae..5d76be3 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -112,8 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-c-ex.sh testh5cc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -397,21 +396,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -421,12 +413,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -468,18 +461,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 8585623..55ede05 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -453,21 +452,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -477,12 +469,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -524,18 +517,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/doc/DevelGuide/masterindex.html b/fortran/doc/DevelGuide/masterindex.html new file mode 100644 index 0000000..9765ea0 --- /dev/null +++ b/fortran/doc/DevelGuide/masterindex.html @@ -0,0 +1,589 @@ + + + + + + + +Index + + + + +
+
+ +
+

Index

+

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+ h5pget_double + h5pget_hyper_vector_size_f + h5pset_family_offset_f + h5pset_fapl_family_f + h5pset_meta_block_size_f +

F

fflush1.f90 +fflush2.f90 +fortran/test/fflush1.f90 +fortran/test/fflush2.f90 +fortran/test/fortranlib_test.f90 +fortran/test/fortranlib_test_1_8.f90 +fortran/test/fortranlib_test_F03.f90 +fortran/test/tc.c +fortran/test/tf.f90 +fortran/test/tH5A.f90 +fortran/test/tH5A_1_8.f90 +fortran/test/tH5D.f90 +fortran/test/tH5E.f90 +fortran/test/tH5E_F03.f90 +fortran/test/tH5F.f90 +fortran/test/tH5G.f90 +fortran/test/tH5G_1_8.f90 +fortran/test/tH5I.f90 +fortran/test/tH5L_F03.f90 +fortran/test/tH5O.f90 +fortran/test/tH5P.f90 +fortran/test/tH5P_F03.f90 +fortran/test/tH5R.f90 +fortran/test/tH5S.f90 +fortran/test/tH5Sselect.f90 +fortran/test/tH5T.f90 +fortran/test/tH5T_F03.f90 +fortran/test/tH5VL.f90 +fortran/test/tH5Z.f90 +fortranlib_test.f90 +fortranlib_test_1_8.f90 +fortranlib_test_F03.f90 +

H

H5_DBLE_InterfaceExclude.f90 +H5_DBLE_InterfaceInclude.f90 +H5_ff.f90 +H5_ff_F03.f90 +H5_ff_F90.f90 +H5A +H5A (F03) +H5A (F90) +h5aclose_f +h5acreate_by_name_f +h5acreate_f +h5adelete_by_idx_f +h5adelete_by_name_f +h5adelete_f +H5Aexists_by_name_f +H5Aexists_f +H5Af +H5Af.c +H5Aff.f90 +H5Aff_F03.f90 +H5Aff_F90.f90 +h5aget_create_plist_f +h5aget_info_by_idx_f +h5aget_info_by_name_f +h5aget_info_f +h5aget_name_by_idx_f +h5aget_name_f +h5aget_num_attrs_f +h5aget_space_f +h5aget_storage_size_f +h5aget_type_f +h5aopen_by_idx_f +H5Aopen_by_name_f +h5aopen_f +h5aopen_idx_f +h5aopen_name_f +h5aread_f +h5arename_by_name_f +h5arename_f +h5check_version_f +h5close_f +H5D +H5D (F03) +H5D (F90) +h5dclose_f +h5dcreate_anon_f +h5dcreate_f +H5Df +H5Df.c +H5Dff.f90 +H5Dff_F03.f90 +H5Dff_F90.f90 +h5dget_access_plist_f +h5dget_create_plist_f +h5dget_space_f +h5dget_space_status_f +h5dget_storage_size_f +h5dget_type_f +h5dont_atexit_f +h5dopen_f +h5dread_f +h5dset_extent +h5dvlen_get_max_len_f +h5dvlen_reclaim +H5E +H5E (F03) +H5E (F90) +h5eclear_f +H5Ef +H5Ef.c +H5Eff.f90 +H5Eff_F03.f90 +H5Eff_F90.f90 +h5eget_auto_f +h5eget_major_f +h5eget_minor_f +h5eprint_f +h5eset_auto2_f +h5eset_auto_f +H5F +H5f90global.f90 +H5f90kit +H5f90kit.c +h5fclose_f +h5fcreate_f +H5FDMPIO +H5FDmpiof +H5FDmpiof.c +H5FDmpioff.f90 +H5Ff +H5Ff.c +H5Fff.f90 +h5fflush_f +h5fget_access_plist_f +h5fget_create_plist_f +h5fget_filesize_f +h5fget_freespace_f +h5fget_name_f +h5fget_obj_count_f +h5fget_obj_ids_f +h5fis_hdf5_f +h5fmount_f +h5fopen_f +h5freopen_f +h5funmount_f +H5G +h5garbage_collect_f +h5gclose_f +H5Gcreate_anon_f +h5gcreate_f +h5get_libversion_f +H5Gf +H5Gf.c +H5Gff.f90 +h5gget_comment_f +H5Gget_create_plist_f +h5gget_info_by_idx_f +h5gget_info_by_name_f +h5gget_info_f +h5gget_linkval_f +h5gget_obj_info_idx_f +h5glink2_f +h5glink_f +H5GLOBAL +h5gmove2_f +h5gmove_f +h5gn_members_f +h5gopen_f +h5gset_comment_f +h5gunlink_f +H5I +h5idec_ref_f +H5If +H5If.c +H5Iff.f90 +h5iget_file_id_f +h5iget_name_f +h5iget_ref_f +h5iget_type_f +h5iinc_ref_f +h5iis_valid_f +h5kind_to_type +H5L +H5L (F03) +H5L (F90) +h5lcopy_f +H5Lcreate_external_f +H5Lcreate_hard_f +H5Lcreate_soft_f +h5ldelete_by_idx_f +h5ldelete_f +H5Lexists_f +H5Lf +H5Lf.c +H5Lff.f90 +H5Lff_F03.f90 +H5Lff_F90.f90 +h5lget_info_by_idx_f +h5lget_info_f +h5lget_name_by_idx_f +H5LIB +H5LIB_PROVISIONAL +H5LIB_PROVISIONAL (F90) +h5lis_registered_f +h5literate_by_name_f +h5literate_f +h5lmove_f +H5match_types +H5match_types.c +H5O +H5O (F03) +H5O (F90) +h5oclose_f +H5Of +H5Of.c +H5Off.f90 +H5Off_F03.f90 +H5Off_F90.f90 +h5offsetof +h5olink_f +h5oopen_f +h5open_by_addr_f +h5open_f +h5ovisit_f +H5P (_F90) +H5P (F03) +H5P (F90) +h5pall_filters_avail_f +h5pclose_class_f +h5pclose_f +h5pcopy_f +h5pcopy_prop_f +h5pcreate_class_f +h5pcreate_class_f +h5pcreate_f +h5pequal_f +h5pexist_f +H5Pf +H5Pf.c +H5Pff.f90 +H5Pff_F03.f90 +H5Pff_F90.f90 +h5pfill_value_defined_f +h5pget_alignment_f +h5pget_alloc_time_f +H5Pget_attr_creation_order_f +H5Pget_attr_phase_change_f +h5pget_btree_ratios_f +h5pget_buffer_f +h5pget_cache_f +h5pget_char +h5pget_char +H5Pget_char_encoding_f +H5Pget_chunk_cache_f +h5pget_chunk_f +h5pget_class_f +h5pget_class_name_f +h5pget_class_parent_f +h5pget_copy_object_f +H5Pget_create_inter_group_f +h5pget_data_transform_f +h5pget_double +h5pget_driver_f +h5pget_dxpl_mpio_f +h5pget_edc_check_f +H5Pget_est_link_info_f +h5pget_external_count_f +h5pget_external_f +h5pget_fapl_core_f +h5pget_fapl_direct_f +h5pget_fapl_family_f +h5pget_fapl_mpio_f +h5pget_fapl_mpiposix_f +h5pget_fapl_multi_f +h5pget_fclose_degree_f +h5pget_fill_time_f +h5pget_filter_by_id_f +h5pget_filter_f +h5pget_gc_references_f +h5pget_integer +h5pget_integer +h5pget_istore_k_f +h5pget_layout_f +H5Pget_link_creation_order_f +H5Pget_link_phase_change_f +H5Pget_local_heap_size_hint_f +h5pget_meta_block_size_f +h5pget_nfilters_f +h5pget_nlinks_f +h5pget_npros_f +H5Pget_obj_track_times_f +h5pget_preserve_f +h5pget_real +h5pget_real +h5pget_sec2_f +h5pget_sieve_buf_size_f +h5pget_size_f +h5pget_sizes_f +h5pget_small_data_block_size_f +h5pget_split_f +h5pget_stdio_f +h5pget_sym_k_f +h5pget_userblock_f +h5pget_version_f +h5pinsert_char +h5pinsert_char +h5pinsert_double +h5pinsert_double +h5pinsert_integer +h5pinsert_integer +h5pinsert_ptr +h5pinsert_real +h5pinsert_real +h5pisa_class_f +h5pmodify_filter_f +h5pregister_char +h5pregister_char +h5pregister_double +h5pregister_double +h5pregister_integer +h5pregister_integer +h5pregister_ptr +h5pregister_real +h5pregister_real +h5premove_f +h5premove_filter_f +h5pset(get)fill_value_f +h5pset(get)fill_value_f +h5pset_alignment_f +h5pset_alloc_time_f +H5Pset_attr_creation_order_f +H5Pset_attr_phase_change_f +h5pset_btree_ratios_f +h5pset_buffer_f +h5pset_cache_f +h5pset_char +h5pset_char +H5Pset_char_encoding_f +H5Pset_chunk_cache_f +h5pset_chunk_f +h5pset_copy_object_f +H5Pset_create_inter_group_f +h5pset_data_transform_f +h5pset_deflate_f +h5pset_double +h5pset_double +h5pset_dxpl_mpio_f +h5pset_edc_check_f +h5pset_est_link_info_f +h5pset_external_f +h5pset_fapl_core_f +h5pset_fapl_direct_f +h5pset_fapl_mpio_f +h5pset_fapl_mpiposix_f +h5pset_fapl_multi_l +h5pset_fapl_multi_s +h5pset_fapl_sec2_f +h5pset_fapl_split_f +h5pset_fapl_stdio_f +h5pset_fclose_degree_f +h5pset_fill_time_f +h5pset_filter_f +h5pset_fletcher32_f +h5pset_gc_references_f +h5pset_hyper_vector_size_f +h5pset_integer +h5pset_integer +h5pset_istore_k_f +h5pset_layout_f +H5Pset_libver_bounds_f +H5Pset_link_creation_order_f +h5pset_link_phase_change_f +H5Pset_local_heap_size_hint_f +H5Pset_nbit_f +h5pset_nlinks_f +H5Pset_obj_track_times_f +h5pset_preserve_f +h5pset_real +h5pset_real +h5pset_scaleoffset_f +H5Pset_shared_mesg_index_f +H5Pset_shared_mesg_nindexes_f +h5pset_shuffle_f +h5pset_sieve_buf_size_f +h5pset_sizes_f +h5pset_small_data_block_size_f +h5pset_sym_k_f +h5pset_szip_f +h5pset_userblock_f +h5punregister_f +H5R +H5R (F03) +H5R (F90) +h5rcreate_object_f +h5rcreate_object_f +h5rcreate_ptr_f +h5rcreate_region_f +h5rcreate_region_f +h5rdereference_object_f +h5rdereference_object_f +h5rdereference_ptr_f +h5rdereference_region_f +h5rdereference_region_f +H5Rf +H5Rf.c +H5Rff.f90 +H5Rff_F03.f90 +H5Rff_F90.f90 +h5rget_name_object_f +h5rget_name_object_f +h5rget_name_ptr_f +h5rget_name_region_f +h5rget_name_region_f +h5rget_obj_type_f +h5rget_object_type_obj_f +h5rget_region_region_f +H5S +h5sclose_f +h5scopy_f +h5screate_f +h5screate_simple_f +H5Sdecode_f +H5Sencode_f +h5sextent_copy_f +h5sextent_equal_f +H5Sf +H5Sf.c +H5Sff.f90 +h5sget_select_bounds_f +h5sget_select_elem_npoints_f +h5sget_select_elem_pointlist_f +h5sget_select_hyper_blocklist_f +h5sget_select_hyper_nblocks_f +h5sget_select_npoints_f +h5sget_select_type_f +h5sget_simple_extent_dims_f +h5sget_simple_extent_ndims_f +h5sget_simple_extent_npoints_f +h5sget_simple_extent_type_f +h5sis_simple_f +h5soffset_simple_f +h5sselect_all_f +h5sselect_elements_f +h5sselect_hyperslab_f +h5sselect_none_f +h5sselect_valid_f +h5sset_extent_none_f +h5sset_extent_simple_f +H5T +H5T (F03) +H5T (F90) +h5tarray_create_f +h5tclose_f +h5tcommit_anon_f +h5tcommit_f +h5tcommitted_f +h5tcompiler_conv_f +H5Tconvert_f +h5tcopy_f +h5tcreate_f +H5Tdecode_f +h5tenaum_insert_f +H5Tencode_f +h5tenum_create_f +h5tenum_nameof_f +h5tenum_valuof_f +h5tequal_f +H5test_kind +H5test_kind.f90 +H5test_kind_SIZEOF +H5test_kind_SIZEOF.f90 +H5Tf +H5Tf.c +H5Tff.f90 +H5Tff_F03.f90 +H5Tff_F90.f90 +h5tget_array_dims_f +h5tget_array_ndims_f +h5tget_class_f +h5tget_create_plist_f +h5tget_cset_f +h5tget_ebias_f +h5tget_fields_f +h5tget_inpad_f +h5tget_member_class_f +h5tget_member_index_f +h5tget_member_name_f +h5tget_member_offset_f +h5tget_member_type_f +h5tget_member_value_f +h5tget_native_type_f +h5tget_nmembers_f +h5tget_norm_f +h5tget_offset_f +h5tget_order_f +h5tget_pad_f +h5tget_precision_f +h5tget_sign_f +h5tget_size_f +h5tget_strpad_f +h5tget_super_f +h5tget_tag_f +h5tinsert_f +h5tis_variable_str_f +h5topen_f +h5tpack_f +h5tset_cset_f +h5tset_ebias_f +h5tset_fields_f +h5tset_inpad_f +h5tset_norm_f +h5tset_offset_f +h5tset_order_f +h5tset_pad_f +h5tset_precision_f +h5tset_sign_f +h5tset_size_f +h5tset_strpad_f +h5tset_tag_f +h5tvlen_create_f +H5Z +H5Zf +H5Zf.c +H5Zff.f90 +h5zfilter_avail_f +h5zget_filter_info_f +h5zunregister_f +HDF5 +HDF5 (mpio) +HDF5.f90 +HDF5mpio.f90 +

S

src/H5_DBLE_InterfaceExclude.f90 +src/H5_DBLE_InterfaceInclude.f90 +

T

t.c +tf.f90 +tH5A.f90 +tH5A_1_8.f90 +tH5D.f90 +tH5E.f90 +tH5E_F03.f90 +tH5F.f90 +tH5G.f90 +tH5G_1_8.f90 +tH5I.f90 +tH5L_F03.f90 +tH5O.f90 +tH5P.f90 +tH5P_F03.f90 +tH5R.f90 +tH5S.f90 +tH5Sselect.f90 +tH5T.f90 +tH5T_F03.f90 +tH5VL.f90 +tH5Z.f90 +

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+
+ + + diff --git a/fortran/doc/DevelGuide/robo_functions.html b/fortran/doc/DevelGuide/robo_functions.html new file mode 100644 index 0000000..e4f253a --- /dev/null +++ b/fortran/doc/DevelGuide/robo_functions.html @@ -0,0 +1,39 @@ + + + + + + + +Functions + + + + +
+
+ +
+

Functions

+

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+

H

h5kind_to_type +h5offsetof +

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+
+ + + diff --git a/fortran/doc/DevelGuide/robo_modules.html b/fortran/doc/DevelGuide/robo_modules.html new file mode 100644 index 0000000..8e57f38 --- /dev/null +++ b/fortran/doc/DevelGuide/robo_modules.html @@ -0,0 +1,117 @@ + + + + + + + +Modules + + + + +
+
+ + + + + diff --git a/fortran/doc/DevelGuide/robo_programs.html b/fortran/doc/DevelGuide/robo_programs.html new file mode 100644 index 0000000..8c35230 --- /dev/null +++ b/fortran/doc/DevelGuide/robo_programs.html @@ -0,0 +1,39 @@ + + + + + + + +Programs + + + + +
+
+ +
+

Programs

+

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+

H

H5test_kind +H5test_kind_SIZEOF +

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+
+ + + diff --git a/fortran/doc/DevelGuide/robo_sourcefiles.html b/fortran/doc/DevelGuide/robo_sourcefiles.html new file mode 100644 index 0000000..63a8637 --- /dev/null +++ b/fortran/doc/DevelGuide/robo_sourcefiles.html @@ -0,0 +1,309 @@ + + + + + + + +Sourcefiles + + + + +
+
+ + + + + diff --git a/fortran/doc/DevelGuide/robo_subroutines.html b/fortran/doc/DevelGuide/robo_subroutines.html new file mode 100644 index 0000000..0846c77 --- /dev/null +++ b/fortran/doc/DevelGuide/robo_subroutines.html @@ -0,0 +1,421 @@ + + + + + + + +Subroutines + + + + +
+
+ +
+

Subroutines

+

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+ h5pget_double + h5pget_hyper_vector_size_f + h5pset_family_offset_f + h5pset_fapl_family_f + h5pset_meta_block_size_f +

H

h5aclose_f +h5acreate_by_name_f +h5acreate_f +h5adelete_by_idx_f +h5adelete_by_name_f +h5adelete_f +H5Aexists_by_name_f +H5Aexists_f +h5aget_create_plist_f +h5aget_info_by_idx_f +h5aget_info_by_name_f +h5aget_info_f +h5aget_name_by_idx_f +h5aget_name_f +h5aget_num_attrs_f +h5aget_space_f +h5aget_storage_size_f +h5aget_type_f +h5aopen_by_idx_f +H5Aopen_by_name_f +h5aopen_f +h5aopen_idx_f +h5aopen_name_f +h5aread_f +h5arename_by_name_f +h5arename_f +h5check_version_f +h5close_f +h5dclose_f +h5dcreate_anon_f +h5dcreate_f +h5dget_access_plist_f +h5dget_create_plist_f +h5dget_space_f +h5dget_space_status_f +h5dget_storage_size_f +h5dget_type_f +h5dont_atexit_f +h5dopen_f +h5dread_f +h5dset_extent +h5dvlen_get_max_len_f +h5dvlen_reclaim +h5eclear_f +h5eget_auto_f +h5eget_major_f +h5eget_minor_f +h5eprint_f +h5eset_auto2_f +h5eset_auto_f +h5fclose_f +h5fcreate_f +h5fflush_f +h5fget_access_plist_f +h5fget_create_plist_f +h5fget_filesize_f +h5fget_freespace_f +h5fget_name_f +h5fget_obj_count_f +h5fget_obj_ids_f +h5fis_hdf5_f +h5fmount_f +h5fopen_f +h5freopen_f +h5funmount_f +h5garbage_collect_f +h5gclose_f +H5Gcreate_anon_f +h5gcreate_f +h5get_libversion_f +h5gget_comment_f +H5Gget_create_plist_f +h5gget_info_by_idx_f +h5gget_info_by_name_f +h5gget_info_f +h5gget_linkval_f +h5gget_obj_info_idx_f +h5glink2_f +h5glink_f +h5gmove2_f +h5gmove_f +h5gn_members_f +h5gopen_f +h5gset_comment_f +h5gunlink_f +h5idec_ref_f +h5iget_file_id_f +h5iget_name_f +h5iget_ref_f +h5iget_type_f +h5iinc_ref_f +h5iis_valid_f +h5lcopy_f +H5Lcreate_external_f +H5Lcreate_hard_f +H5Lcreate_soft_f +h5ldelete_by_idx_f +h5ldelete_f +H5Lexists_f +h5lget_info_by_idx_f +h5lget_info_f +h5lget_name_by_idx_f +h5lis_registered_f +h5literate_by_name_f +h5literate_f +h5lmove_f +h5oclose_f +h5olink_f +h5oopen_f +h5open_by_addr_f +h5open_f +h5ovisit_f +h5pall_filters_avail_f +h5pclose_class_f +h5pclose_f +h5pcopy_f +h5pcopy_prop_f +h5pcreate_class_f +h5pcreate_class_f +h5pcreate_f +h5pequal_f +h5pexist_f +h5pfill_value_defined_f +h5pget_alignment_f +h5pget_alloc_time_f +H5Pget_attr_creation_order_f +H5Pget_attr_phase_change_f +h5pget_btree_ratios_f +h5pget_buffer_f +h5pget_cache_f +h5pget_char +h5pget_char +H5Pget_char_encoding_f +H5Pget_chunk_cache_f +h5pget_chunk_f +h5pget_class_f +h5pget_class_name_f +h5pget_class_parent_f +h5pget_copy_object_f +H5Pget_create_inter_group_f +h5pget_data_transform_f +h5pget_double +h5pget_driver_f +h5pget_dxpl_mpio_f +h5pget_edc_check_f +H5Pget_est_link_info_f +h5pget_external_count_f +h5pget_external_f +h5pget_fapl_core_f +h5pget_fapl_direct_f +h5pget_fapl_family_f +h5pget_fapl_mpio_f +h5pget_fapl_mpiposix_f +h5pget_fapl_multi_f +h5pget_fclose_degree_f +h5pget_fill_time_f +h5pget_filter_by_id_f +h5pget_filter_f +h5pget_gc_references_f +h5pget_integer +h5pget_integer +h5pget_istore_k_f +h5pget_layout_f +H5Pget_link_creation_order_f +H5Pget_link_phase_change_f +H5Pget_local_heap_size_hint_f +h5pget_meta_block_size_f +h5pget_nfilters_f +h5pget_nlinks_f +h5pget_npros_f +H5Pget_obj_track_times_f +h5pget_preserve_f +h5pget_real +h5pget_real +h5pget_sec2_f +h5pget_sieve_buf_size_f +h5pget_size_f +h5pget_sizes_f +h5pget_small_data_block_size_f +h5pget_split_f +h5pget_stdio_f +h5pget_sym_k_f +h5pget_userblock_f +h5pget_version_f +h5pinsert_char +h5pinsert_char +h5pinsert_double +h5pinsert_double +h5pinsert_integer +h5pinsert_integer +h5pinsert_ptr +h5pinsert_real +h5pinsert_real +h5pisa_class_f +h5pmodify_filter_f +h5pregister_char +h5pregister_char +h5pregister_double +h5pregister_double +h5pregister_integer +h5pregister_integer +h5pregister_ptr +h5pregister_real +h5pregister_real +h5premove_f +h5premove_filter_f +h5pset(get)fill_value_f +h5pset(get)fill_value_f +h5pset_alignment_f +h5pset_alloc_time_f +H5Pset_attr_creation_order_f +H5Pset_attr_phase_change_f +h5pset_btree_ratios_f +h5pset_buffer_f +h5pset_cache_f +h5pset_char +h5pset_char +H5Pset_char_encoding_f +H5Pset_chunk_cache_f +h5pset_chunk_f +h5pset_copy_object_f +H5Pset_create_inter_group_f +h5pset_data_transform_f +h5pset_deflate_f +h5pset_double +h5pset_double +h5pset_dxpl_mpio_f +h5pset_edc_check_f +h5pset_est_link_info_f +h5pset_external_f +h5pset_fapl_core_f +h5pset_fapl_direct_f +h5pset_fapl_mpio_f +h5pset_fapl_mpiposix_f +h5pset_fapl_multi_l +h5pset_fapl_multi_s +h5pset_fapl_sec2_f +h5pset_fapl_split_f +h5pset_fapl_stdio_f +h5pset_fclose_degree_f +h5pset_fill_time_f +h5pset_filter_f +h5pset_fletcher32_f +h5pset_gc_references_f +h5pset_hyper_vector_size_f +h5pset_integer +h5pset_integer +h5pset_istore_k_f +h5pset_layout_f +H5Pset_libver_bounds_f +H5Pset_link_creation_order_f +h5pset_link_phase_change_f +H5Pset_local_heap_size_hint_f +H5Pset_nbit_f +h5pset_nlinks_f +H5Pset_obj_track_times_f +h5pset_preserve_f +h5pset_real +h5pset_real +h5pset_scaleoffset_f +H5Pset_shared_mesg_index_f +H5Pset_shared_mesg_nindexes_f +h5pset_shuffle_f +h5pset_sieve_buf_size_f +h5pset_sizes_f +h5pset_small_data_block_size_f +h5pset_sym_k_f +h5pset_szip_f +h5pset_userblock_f +h5punregister_f +h5rcreate_object_f +h5rcreate_object_f +h5rcreate_ptr_f +h5rcreate_region_f +h5rcreate_region_f +h5rdereference_object_f +h5rdereference_object_f +h5rdereference_ptr_f +h5rdereference_region_f +h5rdereference_region_f +h5rget_name_object_f +h5rget_name_object_f +h5rget_name_ptr_f +h5rget_name_region_f +h5rget_name_region_f +h5rget_obj_type_f +h5rget_object_type_obj_f +h5rget_region_region_f +h5sclose_f +h5scopy_f +h5screate_f +h5screate_simple_f +H5Sdecode_f +H5Sencode_f +h5sextent_copy_f +h5sextent_equal_f +h5sget_select_bounds_f +h5sget_select_elem_npoints_f +h5sget_select_elem_pointlist_f +h5sget_select_hyper_blocklist_f +h5sget_select_hyper_nblocks_f +h5sget_select_npoints_f +h5sget_select_type_f +h5sget_simple_extent_dims_f +h5sget_simple_extent_ndims_f +h5sget_simple_extent_npoints_f +h5sget_simple_extent_type_f +h5sis_simple_f +h5soffset_simple_f +h5sselect_all_f +h5sselect_elements_f +h5sselect_hyperslab_f +h5sselect_none_f +h5sselect_valid_f +h5sset_extent_none_f +h5sset_extent_simple_f +h5tarray_create_f +h5tclose_f +h5tcommit_anon_f +h5tcommit_f +h5tcommitted_f +h5tcompiler_conv_f +H5Tconvert_f +h5tcopy_f +h5tcreate_f +H5Tdecode_f +h5tenaum_insert_f +H5Tencode_f +h5tenum_create_f +h5tenum_nameof_f +h5tenum_valuof_f +h5tequal_f +h5tget_array_dims_f +h5tget_array_ndims_f +h5tget_class_f +h5tget_create_plist_f +h5tget_cset_f +h5tget_ebias_f +h5tget_fields_f +h5tget_inpad_f +h5tget_member_class_f +h5tget_member_index_f +h5tget_member_name_f +h5tget_member_offset_f +h5tget_member_type_f +h5tget_member_value_f +h5tget_native_type_f +h5tget_nmembers_f +h5tget_norm_f +h5tget_offset_f +h5tget_order_f +h5tget_pad_f +h5tget_precision_f +h5tget_sign_f +h5tget_size_f +h5tget_strpad_f +h5tget_super_f +h5tget_tag_f +h5tinsert_f +h5tis_variable_str_f +h5topen_f +h5tpack_f +h5tset_cset_f +h5tset_ebias_f +h5tset_fields_f +h5tset_inpad_f +h5tset_norm_f +h5tset_offset_f +h5tset_order_f +h5tset_pad_f +h5tset_precision_f +h5tset_sign_f +h5tset_size_f +h5tset_strpad_f +h5tset_tag_f +h5tvlen_create_f +h5zfilter_avail_f +h5zget_filter_info_f +h5zunregister_f +

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

+
+ + + diff --git a/fortran/doc/DevelGuide/robodoc.css b/fortran/doc/DevelGuide/robodoc.css new file mode 100644 index 0000000..207a172 --- /dev/null +++ b/fortran/doc/DevelGuide/robodoc.css @@ -0,0 +1,302 @@ +/****h* ROBODoc/ROBODoc Cascading Style Sheet + * FUNCTION + * This is the default cascading style sheet for documentation + * generated with ROBODoc. + * You can edit this file to your own liking and then use + * it with the option + * --css + * + * This style-sheet defines the following layout + * +----------------------------------------+ + * | logo | + * +----------------------------------------+ + * | extra | + * +----------------------------------------+ + * | | navi- | + * | | gation | + * | content | | + * | | | + * +----------------------------------------+ + * | footer | + * +----------------------------------------+ + * + * This style-sheet is based on a style-sheet that was automatically + * generated with the Strange Banana stylesheet generator. + * See http://www.strangebanana.com/generator.aspx + * + ****** + * $Id: html_generator.c,v 1.94 2008/06/17 11:49:27 gumpu Exp $ + */ + +body +{ + background-color: rgb(255,255,255); + color: rgb(98,84,55); + font-family: Arial, serif; + border-color: rgb(226,199,143); +} + +pre +{ + font-family: monospace; + margin: 15px; + padding: 5px; + white-space: pre; + color: #000; +} + +pre.source +{ + background-color: #ffe; + border: dashed #aa9 1px; +} + +p +{ + margin:15px; +} + +p.item_name +{ + font-weight: bolder; + margin:5px; + font-size: 120%; +} + +#content +{ + font-size: 100%; + color: rgb(0,0,0); + background-color: rgb(255,255,255); + border-left-width: 0px; + border-right-width: 0px; + border-top-width: 0px; + border-bottom-width: 0px; + border-left-style: none; + border-right-style: none; + border-top-style: none; + border-bottom-style: none; + padding: 40px 31px 14px 17px; + border-color: rgb(0,0,0); + text-align: justify; +} + +#navigation +{ + background-color: rgb(98,84,55); + color: rgb(230,221,202); + font-family: "Times New Roman", serif; + font-style: normal; + border-color: rgb(0,0,0); +} + +a.menuitem +{ + font-size: 120%; + background-color: rgb(0,0,0); + color: rgb(195,165,100); + font-variant: normal; + text-transform: none; + font-weight: normal; + padding: 1px 8px 3px 1px; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; + margin-bottom: 5px; + border-color: rgb(159,126,57); + text-align: right; +} + +#logo, #logo a +{ + font-size: 130%; + background-color: rgb(198,178,135); + color: rgb(98,84,55); + font-family: Georgia, serif; + font-style: normal; + font-variant: normal; + text-transform: none; + font-weight: bold; + padding: 20px 18px 20px 18px; + border-color: rgb(255,255,255); + text-align: right; +} + +#extra, #extra a +{ + font-size: 128%; + background-color: rgb(0,0,0); + color: rgb(230,221,202); + font-style: normal; + font-variant: normal; + text-transform: none; + font-weight: normal; + border-left-width: 0px; + border-right-width: 0px; + border-top-width: 0px; + border-bottom-width: 0px; + border-left-style: none; + border-right-style: none; + border-top-style: none; + border-bottom-style: none; + padding: 12px 12px 12px 12px; + border-color: rgb(195,165,100); + text-align: center; +} + +#content a +{ + color: rgb(159,126,57); + text-decoration: none; +} + +#content a:hover, #content a:active +{ + color: rgb(255,255,255); + background-color: rgb(159,126,57); +} + +a.indexitem +{ + display: block; +} + +h1, h2, h3, h4, h5, h6 +{ + background-color: rgb(221,221,221); + font-family: Arial, serif; + font-style: normal; + font-variant: normal; + text-transform: none; + font-weight: normal; +} + +h1 +{ + font-size: 151%; +} + +h2 +{ + font-size: 142%; +} + +h3 +{ + font-size: 133%; +} + +h4 +{ + font-size: 124%; +} + +h5 +{ + font-size: 115%; +} + +h6 +{ + font-size: 106%; +} + +#navigation a +{ + text-decoration: none; +} + +.menuitem:hover +{ + background-color: rgb(195,165,100); + color: rgb(0,0,0); +} + +#extra a +{ + text-decoration: none; +} + +#logo a +{ + text-decoration: none; +} + +#extra a:hover +{ +} + +/* layout */ +#navigation +{ + width: 22%; + position: relative; + top: 0; + right: 0; + float: right; + text-align: center; + margin-left: 10px; +} + +.menuitem {width: auto;} +#content {width: auto;} +.menuitem {display: block;} + + +div#footer +{ + background-color: rgb(198,178,135); + color: rgb(98,84,55); + clear: left; + width: 100%; + font-size: 71%; +} + +div#footer a +{ + background-color: rgb(198,178,135); + color: rgb(98,84,55); +} + +div#footer p +{ + margin:0; + padding:5px 10px +} + +span.keyword +{ + color: #00F; +} + +span.comment +{ + color: #080; +} + +span.quote +{ + color: #F00; +} + +span.squote +{ + color: #F0F; +} + +span.sign +{ + color: #008B8B; +} + +span.line_number +{ + color: #808080; +} + +@media print +{ + #navigation {display: none;} + #content {padding: 0px;} + #content a {text-decoration: underline;} +} diff --git a/fortran/doc/DevelGuide/src/H5Af_c.html b/fortran/doc/DevelGuide/src/H5Af_c.html new file mode 100644 index 0000000..7fcecc1 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Af_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Af.c + + + + + +
+
+ +

H5Af

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5A Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html new file mode 100644 index 0000000..9e503f4 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html @@ -0,0 +1,130 @@ + + + + + + + +./src/H5Aff_F03.f90 + + + + + +
+
+ +

H5A (F03)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5A_PROVISIONAL
+
+

FILE

+
  src/fortran/src/H5Aff_F03.f90
+
+

PURPOSE

+
  This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions.
+  It contains the same functions as H5Aff_F90.f90 but includes the
+  Fortran 2003 functions and the interface listings. This file will be compiled
+  instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled.
+
+

NOTES

+
  (A) C_LOC and character strings according to the Fortran 2003 standard:
+
+  15.1.2.5 C_LOC(X)
+
+  Argument. X shall either
+
+  (1) have interoperable type and type parameters and be
+    (a) a variable that has the TARGET attribute and is interoperable,
+    (b) an allocated allocatable variable that has the TARGET attribute
+        and is not an array of zero size, or
+    (c) an associated scalar pointer, or
+  (2) be a nonpolymorphic scalar, have no length type parameters, and be
+    (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
+    (b) an allocated allocatable variable that has the TARGET attribute, or
+    (c) an associated pointer.
+
+  - When X is a character, for interoperability the standard is:
+
+  15.2.1 Interoperability of intrinsic types
+
+  ...if the type is character, interoperability also requires that the length type parameter
+  be omitted or be specified by an initialization expression whose value is one.
+
+  THEREFORE compilers that have not extended the standard  require
+
+  CHARACTER(LEN=1), TARGET :: chr
+  or
+  CHARACTER, TARGET :: chr
+
+  (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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5aread_f

+ +

[ Top ] [ H5A (F03) ] [ Subroutines ]

+

NAME

+
  h5aread_f
+
+

PURPOSE

+
  Reads an attribute.
+
+

INPUTS

+
  attr_id       - attribute identifier
+  memtype_id    - attribute memory type identifier
+  dims          - 1D array of size 7, stores sizes of the
+                - buf array dimensions.
+
+

OUTPUTS

+
  buf           - buffer to read attribute data in
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+  dims parameter was added to make code portable;
+  Aprile 4, 2001
+
+  Changed buf intent to INOUT to be consistant
+  with how the C functions handles it. The pg
+  compiler will return 0 if a buf value is not set.
+  February, 2008
+
+

NOTES

+
  This function is overloaded to write INTEGER,
+  REAL, DOUBLE PRECISION and CHARACTER buffers
+  up to 7 dimensions.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html new file mode 100644 index 0000000..aa01b49 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html @@ -0,0 +1,56 @@ + + + + + + + +./src/H5Aff_F90.f90 + + + + + +
+
+ +

H5A (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5A_PROVISIONAL
+
+

FILE

+
  fortran/src/H5Aff_F90.f90
+
+

PURPOSE

+
  This file contains Fortran 90 interfaces for H5A functions. It contains
+  the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions
+  and the interface listings. This file will be compiled instead of H5Aff_F03.f90
+  if Fortran 2003 functions are not enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Aff_f90.html b/fortran/doc/DevelGuide/src/H5Aff_f90.html new file mode 100644 index 0000000..268c1db --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Aff_f90.html @@ -0,0 +1,1102 @@ + + + + + + + +./src/H5Aff.f90 + + + + + +
+
+ +

H5A

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5A
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5A functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5aclose_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aclose_f
+
+

PURPOSE

+
  Closes the specified attribute.
+
+

INPUTS

+
  attr_id  - attribute identifier
+
+

OUTPUTS

+
  hdferr   - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aclose_f(attr_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5acreate_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5acreate_by_name_f
+
+

PURPOSE

+
  Creates an attribute attached to a specified object
+
+

INPUTS

+
  loc_id        - Location or object identifier; may be dataset or group
+  obj_name      - Name, relative to loc_id, of object that attribute is to be attached to
+  attr_name     - Attribute name
+  type_id       - Attribute datatype identifier
+  space_id      - Attribute dataspace identifier
+
+

OUTPUTS

+
  attr          - an attribute identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  acpl_id       - Attribute creation property list identifier (Currently not used.)
+  aapl_id       - Attribute access property list identifier (Currently not used.)
+  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February, 2008
+
+

SOURCE

+
  SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, &
+       acpl_id, aapl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T),   INTENT(IN)  :: loc_id
+    CHARACTER(LEN=*), INTENT(IN)  :: obj_name
+    CHARACTER(LEN=*), INTENT(IN)  :: attr_name
+    INTEGER(HID_T),   INTENT(IN)  :: type_id
+    INTEGER(HID_T),   INTENT(IN)  :: space_id
+    INTEGER(HID_T),   INTENT(OUT) :: attr
+    INTEGER,          INTENT(OUT) :: hdferr
+
+    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: acpl_id
+    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: aapl_id
+    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: lapl_id
+
+ +
+ +

h5acreate_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5acreate_f
+
+

PURPOSE

+
  Creates a dataset as an attribute of a group, dataset, or named datatype
+
+

INPUTS

+
  loc_id        - identifier of an object (group, dataset,
+                  or named datatype) attribute is attached to
+  name          - attribute name
+  type_id       - attribute datatype identifier
+  space_id      - attribute dataspace identifier
+
+

OUTPUTS

+
  attr_id       - attribute identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  acpl_id       - Attribute creation property list identifier
+  appl_id       - Attribute access property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, &
+                                 hdferr, acpl_id, aapl_id )
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Attribute name
+    INTEGER(HID_T), INTENT(IN) :: type_id  ! Attribute datatype identifier
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier
+    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5adelete_by_idx_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5adelete_by_idx_f
+
+

PURPOSE

+
  Deletes an attribute from an object according to index order
+
+

INPUTS

+
  loc_id        - Location or object identifier; may be dataset or group
+  obj_name      - Name of object, relative to location, from which attribute is to be removed
+  idx_type      - Type of index; Possible values are:
+                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
+                   H5_INDEX_NAME_F          - Index on names
+                   H5_INDEX_CRT_ORDER_F     - Index on creation order
+                   H5_INDEX_N_F             - Number of indices defined
+
+  order         - Order in which to iterate over index; Possible values are:
+                   H5_ITER_UNKNOWN_F    - Unknown order
+                   H5_ITER_INC_F        - Increasing order
+                   H5_ITER_DEC_F        - Decreasing order
+                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
+                   H5_ITER_N_F          - Number of iteration orders
+
+  n             - Offset within index
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
+                                              !  from which attribute is to be removed
+    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
+                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                              !    H5_INDEX_NAME_F      - Index on names
+                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                              !    H5_INDEX_N_F       - Number of indices defined
+
+    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
+                                              !    H5_ITER_UNKNOWN_F  - Unknown order
+                                              !    H5_ITER_INC_F      - Increasing order
+                                              !    H5_ITER_DEC_F      - Decreasing order
+                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+                                              !    H5_ITER_N_F      - Number of iteration orders
+    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Offset within index
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
+                                           ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+
+ +
+ +

h5adelete_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5adelete_by_name_f
+
+

PURPOSE

+
  Removes an attribute from a specified location
+
+

INPUTS

+
  loc_id        - Identifer for object to which attribute is attached
+  obj_name      - Name of attribute to open
+  attr_name     - Attribute access property list
+  lapl_id       - Link access property list
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
+                                              !  from which attribute is to be removed
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
+                                              ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+
+ +
+ +

h5adelete_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5adelete_f
+
+

PURPOSE

+
  Deletes an attribute of an object (group, dataset or
+  named datatype)
+
+

INPUTS

+
  obj_id        - object identifier
+  name          - attribute name
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5adelete_f(obj_id, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Attribute name
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

H5Aexists_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  H5Aexists_by_name_f
+
+

PURPOSE

+
  Determines whether an attribute with a given name exists on an object
+
+

INPUTS

+
  loc_id        - Location identifier
+  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
+  attr_name     - Attribute name
+
+

OUTPUTS

+
  attr_exists   - attribute exists status
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list identifier
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February, 2008
+
+

SOURCE

+
  SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
+                                             ! absolute from the fileâs root group, or '.'
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
+    LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
+                                        ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+
+ +
+ +

H5Aexists_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  H5Aexists_f
+
+

PURPOSE

+
  Determines whether an attribute with a given name exists on an object
+
+

INPUTS

+
  obj_id        - Object identifier
+  attr_name     - Attribute name
+
+

OUTPUTS

+
  attr_exists   - attribute exists status
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February, 2008
+
+

SOURCE

+
  SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
+    LOGICAL, INTENT(OUT) :: attr_exists  ! .TRUE. if exists, .FALSE. otherwise
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5aget_create_plist_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_create_plist_f
+
+

PURPOSE

+
  Gets an attribute creation property list identifier
+
+

INPUTS

+
  attr_id          - Identifier of the attribute
+
+

OUTPUTS

+
  creation_prop_id - Identifier for the attribute’s creation property
+  hdferr           - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Identifier of the attribute
+    INTEGER(HID_T), INTENT(OUT) :: creation_prop_id   ! Identifier for the attributeâs creation property
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5aget_info_by_idx_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_info_by_idx_f
+
+

PURPOSE

+
  Retrieves attribute information, by attribute index position
+
+

INPUTS

+
  loc_id        - Location of object to which attribute is attached
+  obj_name      - Name of object to which attribute is attached, relative to location
+  idx_type      - Type of index
+  order         - Index traversal order
+  n             - Attribute’s position in index
+
+ OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
+  corder_valid  - indicates whether the creation order data is valid for this attribute
+  corder        - is a positive integer containing the creation order of the attribute
+  cset          - indicates the character set used for the attribute’s name
+  data_size     - indicates the size, in the number of characters, of the attribute
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, &
+       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
+    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
+                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                              !    H5_INDEX_NAME_F      - Index on names
+                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                              !    H5_INDEX_N_F       - Number of indices defined
+    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
+                                              !    H5_ITER_UNKNOWN_F  - Unknown order
+                                              !    H5_ITER_INC_F      - Increasing order
+                                              !    H5_ITER_DEC_F      - Decreasing order
+                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+
+    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Attributeâs position in index
+
+
+    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
+    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
+    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
+    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
+
+ +
+ +

h5aget_info_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_info_by_name_f
+
+

PURPOSE

+
  Retrieves attribute information, by attribute name
+
+

INPUTS

+
  loc_id        - Location of object to which attribute is attached
+  obj_name      - Name of object to which attribute is attached, relative to location
+  attr_name     - Attribute name
+
+ OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
+  corder_valid  - indicates whether the creation order data is valid for this attribute
+  corder        - is a positive integer containing the creation order of the attribute
+  cset          - indicates the character set used for the attribute’s name
+  data_size     - indicates the size, in the number of characters, of the attribute
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, &
+       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
+
+
+    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
+    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
+    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attributeâs name
+    INTEGER(HSIZE_T), INTENT(OUT) :: data_size   ! Indicates the size, in the number of characters, of the attribute
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
+                                           ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
+
+ +
+ +

h5aget_info_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_info_f
+
+

PURPOSE

+
  Retrieves attribute information, by attribute identifier
+
+

INPUTS

+
  attr_id       - attribute identifier
+
+

OUTPUTS

+
  NOTE: In C it is defined as a structure: H5A_info_t
+
+  corder_valid  - indicates whether the creation order data is valid for this attribute
+  corder        - is a positive integer containing the creation order of the attribute
+  cset          - indicates the character set used for the attribute’s name
+  data_size     - indicates the size, in the number of characters, of the attribute
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
+
+    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
+    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
+    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
+    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5aget_name_by_idx_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_name_by_idx_f
+
+

PURPOSE

+
  Gets an attribute name, by attribute index position.
+
+

INPUTS

+
  loc_id        - Location of object to which attribute is attached
+  obj_name      - Name of object to which attribute is attached, relative to location
+  idx_type      - Type of index; Possible values are:
+                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
+                   H5_INDEX_NAME_F          - Index on names
+                   H5_INDEX_CRT_ORDER_F     - Index on creation order
+                   H5_INDEX_N_F             - Number of indices defined
+
+  order         - Order in which to iterate over index; Possible values are:
+                   H5_ITER_UNKNOWN_F    - Unknown order
+                   H5_ITER_INC_F        - Increasing order
+                   H5_ITER_DEC_F        - Decreasing order
+                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
+                   H5_ITER_N_F          - Number of iteration orders
+  order         - Index traversal order
+  n             - Attribute’s position in index
+
+

OUTPUTS

+
  name          - Attribute name
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+  size          - Size, in bytes, of attribute name
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, &
+       n, name, hdferr, size, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
+                                              !  from which attribute is to be removed *TEST* check NULL
+    INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are:
+                                    !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                    !    H5_INDEX_NAME_F       - Index on names
+                                    !    H5_INDEX_CRT_ORDER_F  - Index on creation order
+                                    !    H5_INDEX_N_F         - Number of indices defined
+
+    INTEGER, INTENT(IN) :: order    ! Order in which to iterate over index; Possible values are:
+                                    !    H5_ITER_UNKNOWN_F   - Unknown order
+                                    !    H5_ITER_INC_F      - Increasing order
+                                    !    H5_ITER_DEC_F       - Decreasing order
+                                    !    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
+                                    !    H5_ITER_N_F        - Number of iteration orders
+    INTEGER(HSIZE_T), INTENT(IN) :: n !  Attributeâs position in index
+    CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name
+    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
+                                      ! Returns attribute name size,
+                                      ! -1 if fail
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+    INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size  ! Indicates the size, in the number of characters, 
+                                                    ! of the attribute
+
+ +
+ +

h5aget_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_name_f
+
+

PURPOSE

+
  Gets an attribute name.
+
+

INPUTS

+
  attr_id       - attribute identifier
+  size          - size of a buffer to read name in
+
+

OUTPUTS

+
  buf           - buffer to read name in
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size
+    CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name
+    INTEGER, INTENT(OUT) :: hdferr ! Error code:
+                                   ! name length is successful, -1 if fail
+
+ +
+ +

h5aget_num_attrs_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_num_attrs_f
+
+

PURPOSE

+
  Determines the number of attributes attached to an object.
+
+

INPUTS

+
  obj_id        - object (group, dataset, or named datatype)
+  identifier
+
+

OUTPUTS

+
  attr_num      - number of attributes attached to the object
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
+    INTEGER, INTENT(OUT) :: attr_num      ! Number of attributes of the object
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5aget_space_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_space_f
+
+

PURPOSE

+
  Gets a copy of the dataspace for an attribute.
+
+

INPUTS

+
  attr_id       - attribute identifier
+
+

OUTPUTS

+
  space_id      - attribite dataspace identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id   ! Attribute identifier
+    INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5aget_storage_size_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_storage_size_f
+
+

PURPOSE

+
  Returns the amount of storage required for an attribute.
+
+

INPUTS

+
  attr_id       - attribute identifier
+
+

OUTPUTS

+
  size          - attribute storage size
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
+    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Attribute storage requirement
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5aget_type_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aget_type_f
+
+

PURPOSE

+
  Gets an attribute datatype.
+
+

INPUTS

+
  attr_id       - attribute identifier
+
+

OUTPUTS

+
  type_id       - attribute datatype identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
+    INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5aopen_by_idx_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aopen_by_idx_f
+
+

PURPOSE

+
  Opens an existing attribute that is attached to an object specified by location and name
+
+

INPUTS

+
  loc_id        - Location of object to which attribute is attached
+  obj_name      - Name of object to which attribute is attached, relative to location
+  idx_type      - Type of index
+  order         - Index traversal order
+  n             - Attribute’s position in index
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  aapl_id       - Attribute access property list
+  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
+    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
+                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                              !    H5_INDEX_NAME_F      - Index on names
+                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                              !    H5_INDEX_N_F       - Number of indices defined
+    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
+                                              !    H5_ITER_UNKNOWN_F  - Unknown order
+                                              !    H5_ITER_INC_F      - Increasing order
+                                              !    H5_ITER_DEC_F      - Decreasing order
+                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+
+    INTEGER(HSIZE_T), INTENT(IN) :: n       ! Attributeâs position in index
+
+    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code:
+                                            ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id  ! Attribute access property list
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
+
+ +
+ +

H5Aopen_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  H5Aopen_by_name_f
+
+

PURPOSE

+
  Opens an attribute for an object by object name and attribute name.
+
+

INPUTS

+
  loc_id        - Location from which to find object to which attribute is attached
+  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
+  attr_name     - Attribute name
+
+

OUTPUTS

+
  attr_id       - attribute identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  aapl_id       - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
+  lapl_id       - Link access property list identifier
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February, 2008
+
+

SOURCE

+
  SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
+                                             ! absolute from the fileâs root group, or '.'
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
+    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
+                                           ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list
+                                                    ! (Currently unused; should be passed in as H5P_DEFAULT_F)
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+
+ +
+ +

h5aopen_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aopen_f
+
+

PURPOSE

+
  Opens an attribute for an object specified by object
+  identifier and attribute name
+
+

INPUTS

+
  obj_id        - Identifer for object to which attribute is attached
+  attr_name     - Name of attribute to open
+
+

OUTPUTS

+
  attr_id       - attribute identifier
+
+

OPTIONAL PARAMETERS

+
  aapl_id       - Attribute access property list
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
+    INTEGER(HID_T), INTENT(OUT) :: attr_id    ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              !   Success:  0
+                                              !   Failure: -1
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id     ! Attribute access property list
+
+ +
+ +

h5aopen_idx_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aopen_idx_f
+
+

PURPOSE

+
  Opens the attribute specified by its index.
+
+

INPUTS

+
  obj_id        - identifier of a group, dataset, or named
+                  datatype an attribute to be attached to
+  index         - index of the attribute to open (zero-based)
+
+

OUTPUTS

+
  attr_id       - attribute identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
+    INTEGER, INTENT(IN) :: index            ! Attribute index
+    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5aopen_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5aopen_name_f
+
+

PURPOSE

+
  Opens an attribute specified by name.
+
+

INPUTS

+
  obj_id        - identifier of a group, dataset, or named
+                  datatype atttribute to be attached to
+  name          - attribute name
+
+

OUTPUTS

+
  attr_id       - attribute identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces are added for
+  called C functions (it is needed for Windows
+  port).  February 27, 2001
+
+

SOURCE

+
  SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Attribute name
+    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5arename_by_name_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5arename_by_name_f
+
+

PURPOSE

+
  Renames an attribute
+
+

INPUTS

+
  loc_id        - Location or object identifier; may be dataset or group
+  obj_name      - Name of object, relative to location,
+                  whose attribute is to be renamed
+  old_attr_name - Prior attribute name
+  new_attr_name - New attribute name
+  lapl_id       - Link access property list identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, &
+        hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
+                                              !  whose attribute is to be renamed
+    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
+    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
+
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+
+ +
+ +

h5arename_f

+ +

[ Top ] [ H5A ] [ Subroutines ]

+

NAME

+
  h5arename_f
+
+

PURPOSE

+
  Renames an attribute
+
+

INPUTS

+
  loc_id        - Location or object identifier; may be dataset or group
+  old_attr_name - Prior attribute name
+  new_attr_name - New attribute name
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

HISTORY

+
  N/A
+
+

SOURCE

+
  SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
+    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
+    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Df_c.html b/fortran/doc/DevelGuide/src/H5Df_c.html new file mode 100644 index 0000000..1e163f2 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Df_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Df.c + + + + + +
+
+ +

H5Df

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5D Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html new file mode 100644 index 0000000..0bb4173 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html @@ -0,0 +1,138 @@ + + + + + + + +./src/H5Dff_F03.f90 + + + + + +
+
+ +

H5D (F03)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5D_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions.
+  It contains the same functions as H5Dff_DEPRECIATE.f90 but includes the
+  Fortran 2003 functions and the interface listings. This file will be compiled
+  instead of H5Dff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
+
+

NOTES

+
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
+  we only provide an interface for arrays up to and including rank 7.
+
+  (2) Unfortunately we are using a generic interface and one of the factors
+  used in determining the proper routine to select is that of the array
+  rank being passed. Therefore, we can not create just one subroutine for
+  each array type (integer, real, etc...) and use a
+  rank 1 array of assumed size to handle multiple ranks, i.e.
+  (i.e. integer, dimension(*) :: ... )
+  (i.e. real   , dimension(*) :: ... ) etc...
+
+  (3) Could not place the USE ISO_C_BINDING in the module header because it may
+  conflict with the USE ISO_C_BINDING included in the user's program. Moved
+  the statement instead to each subroutine.
+
+
+  (4) C_LOC and character strings according to the Fortran 2003 standard:
+
+  15.1.2.5 C_LOC(X)
+
+  Argument. X shall either
+
+  (A) have interoperable type and type parameters and be
+  (a) a variable that has the TARGET attribute and is interoperable,
+  (b) an allocated allocatable variable that has the TARGET attribute
+  and is not an array of zero size, or
+  (c) an associated scalar pointer, or
+  (B) be a nonpolymorphic scalar, have no length type parameters, and be
+  (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
+  (b) an allocated allocatable variable that has the TARGET attribute, or
+  (c) an associated pointer.
+
+        - When X is a character, for interoperability the standard is:
+
+  15.2.1 Interoperability of intrinsic types
+
+  ...if the type is character, interoperability also requires that the length type parameter
+  be omitted or be specified by an initialization expression whose value is one.
+
+  THEREFORE compilers that have not extended the standard require the
+  argument in C_LOC to be of the variant:
+
+  CHARACTER(LEN=1), TARGET :: chr
+  or
+  CHARACTER, TARGET :: chr
+  (B)
+                         *** 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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5dvlen_reclaim

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dvlen_reclaim
+
+

PURPOSE

+
  Reclaims VL datatype memory buffers. 
+
+

INPUTS

+
  type_id  - Identifier of the datatype. 
+  space_id - Identifier of the dataspace. 
+  plist_id - Identifier of the property list used to create the buffer. 
+       buf - Pointer to the buffer to be reclaimed. 
+
+

OUTPUTS

+
  hdferr   - error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
 M. Scot Breitenfeld
+ January 11, 2011
+
+

SOURCE

+
  SUBROUTINE H5Dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr)
+
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+
+    INTEGER(HID_T), INTENT(IN) :: type_id   ! Identifier of the datatype. 
+    INTEGER(HID_T), INTENT(IN) :: space_id  ! Identifier of the dataspace. 
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Identifier of the property list used to create the buffer. 
+    TYPE(C_PTR), INTENT(INOUT) :: buf       ! Pointer to the buffer to be reclaimed. 
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html new file mode 100644 index 0000000..afebdd8 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html @@ -0,0 +1,116 @@ + + + + + + + +./src/H5Dff_F90.f90 + + + + + +
+
+ +

H5D (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5D_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran 90 interfaces for H5D functions. It contains
+  the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions
+  and the interface listings. This file will be compiled instead of H5Dff_F03.f90
+  if Fortran 2003 functions are not enabled.
+
+

NOTES

+
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
+  we only provide an interface for arrays up to and including rank 7.
+
+  (2) Unfortunately we are using a generic interface and one of the factors
+  used in determining the proper routine to select is that of the array
+  rank being passed, therefore we can not create just one subroutine for
+  each array type (integer, real, etc...) of various ranks and then use a
+  rank 1 array of assumed size in the just one subroutine,
+  (i.e. integer, dimension(*) :: ... )
+  (i.e. real   , dimension(*) :: ... ) etc...
+
+  (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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5dread_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dread_f
+
+

PURPOSE

+
  Reads raw data from the specified dataset into buf,
+  converting from file datatype and dataspace to memory
+  datatype and dataspace.
+
+

INPUTS

+
  dset_id       - dataset identifier
+  mem_type_id   - memory type identifier
+  dims          - 1-dim array of size 7; dims(k) has the size
+                  of k-th dimension of the buf array
+
+

OUTPUTS

+
  buf     - buffer to read data in
+  hdferr: - error code
+             Success:  0
+             Failure: -1
+
+

OPTIONAL PARAMETERS

+
  mem_space_id  - memory dataspace identifier
+  file_space_id - file dataspace identifier
+  xfer_prp      - trasfer property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+  dims parameter was added to make code portable;
+  n parameter was replaced with dims parameter in
+  the h5dwrite_reference_obj and h5dwrite_reference_dsetreg
+  functions.  April 2, 2001
+
+

NOTES

+
  This function is overloaded to read INTEGER,
+  REAL, DOUBLE PRECISION and CHARACTER buffers
+  up to 7 dimensions, and one dimensional buffers
+  of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Dff_f90.html b/fortran/doc/DevelGuide/src/H5Dff_f90.html new file mode 100644 index 0000000..5444a93 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Dff_f90.html @@ -0,0 +1,506 @@ + + + + + + + +./src/H5Dff.f90 + + + + + +
+
+ +

H5D

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5D
+
+

FILE

+
  fortran/src/H5Dff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5D functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5dclose_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dclose_f
+
+

PURPOSE

+
  Closes a dataset.
+
+

INPUTS

+
  dset_id       - dataset identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5dclose_f(dset_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5dcreate_anon_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dcreate_anon_f
+
+

PURPOSE

+
  Creates a dataset in a file without linking it into the file structure
+
+

INPUTS

+
  loc_id        - Identifier of the file or group within which to create the dataset.
+  type_id       - Identifier of the datatype to use when creating the dataset.
+  space_id      - Identifier of the dataspace to use when creating the dataset.
+
+

OUTPUTS

+
  dset_id       - dataset identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  dcpl_id       - Dataset creation property list identifier.
+  dapl_id       - Dataset access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 11, 2008
+
+

SOURCE

+
  SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier.
+    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier.
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier.
+    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier.
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id  ! Dataset creation property list identifier.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id  ! Dataset access property list identifier.
+
+ +
+ +

h5dcreate_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dcreate_f
+
+

PURPOSE

+
  Creates a dataset at the specified location
+
+

INPUTS

+
  loc_id        - file or group identifier
+  name          - dataset name
+  type_id       - dataset datatype identifier
+  space_id      - dataset dataspace identifier
+
+

OUTPUTS

+
  dset_id       - dataset identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  creation_prp  - Dataset creation property list
+  lcpl_id       - Link creation property list
+  dapl_id       - Dataset access property list
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  - Explicit Fortran interfaces were added for
+    called C functions (it is needed for Windows
+    port).  February 28, 2001
+
+  - Added version's 1.8 new optional parameters
+    February, 2008
+
+

SOURCE

+
  SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
+       hdferr, dcpl_id, lcpl_id, dapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
+    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5dget_access_plist_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_access_plist_f
+
+

PURPOSE

+
  Returns a copy of the dataset creation property list.
+
+

INPUTS

+
  dset_id       - Dataset identifier
+
+

OUTPUTS

+
  plist_id      - Dataset access property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 13, 2009
+
+

SOURCE

+
SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr)
+  IMPLICIT NONE
+  INTEGER(HID_T), INTENT(IN)  :: dset_id
+  INTEGER(HID_T), INTENT(OUT) :: plist_id 
+  INTEGER       , INTENT(OUT) :: hdferr  
+
+ +
+ +

h5dget_create_plist_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_create_plist_f
+
+

PURPOSE

+
  Returns an identifier for a copy of the dataset creation
+  property list for a dataset.
+
+

INPUTS

+
  dataset_id    - dataset identifier
+
+

OUTPUTS

+
  plist_id      - creation property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id   ! Dataset identifier
+    INTEGER(HID_T), INTENT(OUT) :: plist_id    ! Dataset creation
+                                               ! property list identifier
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5dget_space_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_space_f
+
+

PURPOSE

+
  Returns an identifier for a copy of the dataspace for a
+  dataset.
+
+

INPUTS

+
  dataset_id    - dataset identifier
+
+

OUTPUTS

+
  dataspace_id  - dataspace identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
+    INTEGER(HID_T), INTENT(OUT) :: dataspace_id   ! Dataspace identifier
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5dget_space_status_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_space_status_f
+
+

PURPOSE

+
  Returns the status of data space allocation.
+
+

INPUTS

+
  dset_id       - dataset identifier
+
+

OUTPUTS

+
  flag          - status; may have one of the following values:
+                   H5D_SPACE_STS_ERROR_F
+                   H5D_SPACE_STS_NOT_ALLOCATED_F
+                   H5D_SPACE_STS_PART_ALLOCATED_F
+                   H5D_SPACE_STS_ALLOCATED_F
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataspace identifier
+    INTEGER, INTENT(IN)        :: flag     ! Memory buffer to fill in
+    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
+
+ +
+ +

h5dget_storage_size_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_storage_size_f
+
+

PURPOSE

+
  Returns the amount of storage requires by a dataset
+
+

INPUTS

+
  dataset_id    - dataset identifier
+
+

OUTPUTS

+
  size          - datastorage size
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  October 15, 2002
+
+

SOURCE

+
  SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier
+    INTEGER(HSIZE_T),  INTENT(OUT)  :: size  ! Amount of storage
+                                             ! allocated for dataset
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5dget_type_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dget_type_f
+
+

PURPOSE

+
  Returns an identifier for a copy of the datatype for a
+  dataset.
+
+

INPUTS

+
  dataset_id    - dataset identifier
+
+

OUTPUTS

+
  datatype_id   - dataspace identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+

SOURCE

+
  SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
+    INTEGER(HID_T), INTENT(OUT) :: datatype_id    ! Datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5dopen_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dopen_f
+
+

PURPOSE

+
  Opens an existing dataset.
+
+

INPUTS

+
  loc_id        - file or group identifier
+  name          - dataset name
+
+

OUTPUTS

+
  dset_id       - dataset identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  dapl_id       - Dataset access property list
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  -Explicit Fortran interfaces were added for
+   called C functions (it is needed for Windows
+   port).  February 28, 2001
+
+  -Added 1.8 (optional) parameter dapl_id
+   February, 2008, M. Scot Breitenfeld
+
+

SOURCE

+
  SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
+    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list
+
+ +
+ +

h5dset_extent

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dset_extent (instead of obsolete name: h5dextend_f)
+
+

PURPOSE

+
  Extends a dataset with unlimited dimension.
+
+

INPUTS

+
  dataset_id    - dataset identifier
+  size          - array containing the new magnitude of
+                  each dimension
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+  Changed name from the now obsolete h5dextend_f
+  to h5dset_extent_f. Provided interface to old name
+  for backward compatability. -MSB- March 14, 2008
+
+

SOURCE

+
  SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
+    INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN)  :: size
+    ! Array containing
+    ! dimensions' sizes
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5dvlen_get_max_len_f

+ +

[ Top ] [ H5D ] [ Subroutines ]

+

NAME

+
  h5dvlen_get_max_len_f
+
+

PURPOSE

+
  Returns maximum length of the VL array elements
+
+

INPUTS

+
  dataset_id    - dataset identifier
+  type_id       - datatype identifier
+  space_id      - dataspace identifier
+
+

OUTPUTS

+
  size          - buffer size
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  October 15, 2002
+
+

SOURCE

+
  SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len,  hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
+    INTEGER(HID_T), INTENT(IN) :: type_id         ! Datatype identifier
+    INTEGER(HID_T), INTENT(IN) :: space_id        ! Dataspace identifier
+    INTEGER(SIZE_T),  INTENT(OUT)  :: len         ! Maximum length of the element
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Ef_c.html b/fortran/doc/DevelGuide/src/H5Ef_c.html new file mode 100644 index 0000000..79b7914 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Ef_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Ef.c + + + + + +
+
+ +

H5Ef

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5E Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Eff_f90.html b/fortran/doc/DevelGuide/src/H5Eff_f90.html new file mode 100644 index 0000000..7eb95e6 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Eff_f90.html @@ -0,0 +1,197 @@ + + + + + + + +./src/H5Eff.f90 + + + + + +
+
+ +

H5E

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5E
+
+

FILE

+
  fortran/src/H5Eff.f90
+
+

PURPOSE

+
  This Module contains Fortran interfaces for H5E functions.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5eclear_f

+ +

[ Top ] [ H5E ] [ Subroutines ]

+

NAME

+
  h5eclear_f
+
+

PURPOSE

+
  Clears the error stack for the current thread.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  estack_id     - Error Stack id
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  April 6, 2001
+
+  Added optional error stack identifier in order to bring
+  the function in line with the h5eclear2 routine.
+  MSB, July 9, 2009
+
+

SOURCE

+
  SUBROUTINE h5eclear_f(hdferr, estack_id)
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id
+
+ +
+ +

h5eget_major_f

+ +

[ Top ] [ H5E ] [ Subroutines ]

+

NAME

+
  h5eget_major_f
+
+

PURPOSE

+
  Returns a character string describing an error specified
+  by a major error number.
+
+

INPUTS

+
  error_no      - major error number
+
+

OUTPUTS

+
  name          - character string describing the error
+  namelen       - number of characters in the name buffer
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  April 6, 2001
+
+

SOURCE

+
  SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr)
+    INTEGER, INTENT(IN) :: error_no        ! Major error number
+    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Character string describing
+                                           ! the error.
+    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters
+                                           ! in name.
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5eget_minor_f

+ +

[ Top ] [ H5E ] [ Subroutines ]

+

NAME

+
  h5eget_minor_f
+
+

PURPOSE

+
  Returns a character string describing an error specified
+  by a minor error number.
+
+

INPUTS

+
  error_no      - minor error number
+
+

OUTPUTS

+
  name          - character string describing the error
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  April 6, 2001
+
+

SOURCE

+
  SUBROUTINE h5eget_minor_f(error_no, name, hdferr)
+    INTEGER, INTENT(IN) :: error_no       ! Major error number
+    CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
+                                          ! the error
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5eprint_f

+ +

[ Top ] [ H5E ] [ Subroutines ]

+

NAME

+
  h5eprint_f
+
+

PURPOSE

+
  Prints the error stack in a default manner.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  name          - name of the file that contains print output
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  April 6, 2001
+
+

SOURCE

+
  SUBROUTINE h5eprint_f(hdferr, name)
+    CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5FDmpiof_c.html b/fortran/doc/DevelGuide/src/H5FDmpiof_c.html new file mode 100644 index 0000000..74143d2 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5FDmpiof_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5FDmpiof.c + + + + + +
+
+ +

H5FDmpiof

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for Parallel Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html b/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html new file mode 100644 index 0000000..473b5db --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html @@ -0,0 +1,253 @@ + + + + + + + +./src/H5FDmpioff.f90 + + + + + +
+
+ +

H5FDMPIO

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5FDMPIO
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5P functions needed by
+  parallel MPI programs.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5pget_dxpl_mpio_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pget_dxpl_mpio_f
+
+

PURPOSE

+
  Returns the data transfer mode.
+
+

INPUTS

+
  prp_id        - data transfer property list identifier
+
+

OUTPUTS

+
  data_xfer_mode- transfer mode; possible values are:
+                     H5FD_MPIO_INDEPENDENT_F
+                     H5FD_MPIO_COLLECTIVE_F
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  November, 2000
+
+

SOURCE

+
  SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
+    INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are:
+                                           ! H5FD_MPIO_INDEPENDENT_F
+                                           ! H5FD_MPIO_COLLECTIVE_F
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5pget_fapl_mpio_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pget_fapl_mpio_f
+
+

PURPOSE

+
  Returns MPI communicator information.
+
+

INPUTS

+
  prp_id        - file access property list identifier
+
+

OUTPUTS

+
  comm          - MPI-2 communicator
+  info          - MPI-2 info object
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  November, 2000
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    INTEGER, INTENT(OUT) :: comm ! buffer to return communicator
+    INTEGER, INTENT(OUT) :: info ! buffer to return info object
+                                 ! as defined in MPI_FILE_OPEN of MPI-2
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ +

h5pget_fapl_mpiposix_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pget_fapl_mpiposix_f
+
+

PURPOSE

+
  Returns MPI communicator information.
+
+

INPUTS

+
  prp_id        - file access property list identifier
+
+

OUTPUTS

+
  comm          - MPI-2 communicator
+  use_gpfs      - flag to use GPFS hints
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  May 6, 2003
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    INTEGER, INTENT(OUT) :: comm         ! Buffer to return communicator
+    LOGICAL, INTENT(OUT) :: use_gpfs
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5pset_dxpl_mpio_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pset_dxpl_mpio_f
+
+

PURPOSE

+
  Sets data transfer mode.
+
+

INPUTS

+
  prp_id         - data transfer property list identifier
+  data_xfer_mode - transfer mode; possible values are:
+                     H5FD_MPIO_INDEPENDENT_F
+                     H5FD_MPIO_COLLECTIVE_F
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  November, 2000
+
+

SOURCE

+
  SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are:
+                                          ! H5FD_MPIO_INDEPENDENT_F
+                                          ! H5FD_MPIO_COLLECTIVE_F
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pset_fapl_mpio_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_mpio_f
+
+

PURPOSE

+
  Stores MPI IO communicator information to the file
+  access property list.
+
+

INPUTS

+
  prp_id        - file access property list identifier
+  comm          - MPI-2 communicator
+  info          - MPI-2 info object
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  November, 2000
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
+                                ! as defined in MPI_FILE_OPEN of MPI-2
+    INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open
+                                ! as defined in MPI_FILE_OPEN of MPI-2
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ +
+ +

h5pset_fapl_mpiposix_f

+ +

[ Top ] [ H5FDMPIO ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_mpiposix_f
+
+

PURPOSE

+
  Stores MPI IO communicator information to the file
+  access property list.
+
+

INPUTS

+
  prp_id        - file access property list identifier
+  comm          - MPI-2 communicator
+  use_gpfs      - logical flag to use the GPFS hints
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  May 6, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
+                                ! as defined in MPI_FILE_OPEN of MPI-2
+    LOGICAL, INTENT(IN) :: use_gpfs
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Ff_c.html b/fortran/doc/DevelGuide/src/H5Ff_c.html new file mode 100644 index 0000000..c91a62d --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Ff_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Ff.c + + + + + +
+
+ +

H5Ff

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5F Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Fff_f90.html b/fortran/doc/DevelGuide/src/H5Fff_f90.html new file mode 100644 index 0000000..b0164c9 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Fff_f90.html @@ -0,0 +1,653 @@ + + + + + + + +./src/H5Fff.f90 + + + + + +
+
+ +

H5F

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5F
+
+

FILE

+
  H5Fff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5F functions.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5fclose_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fclose_f
+
+

PURPOSE

+
  Closes HDF5 file.
+
+

INPUTS

+
  file_id       - file identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fclose_f(file_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5fcreate_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fcreate_f
+
+

PURPOSE

+
  Creates HDF5 files.
+
+

INPUTS

+
  name          - name of the file to create
+  access_flags  - File access flags. Allowable values are:
+                   H5F_ACC_TRUNC_F
+                   H5F_ACC_EXCL_F
+
+

OUTPUTS

+
  file_id       - file identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  creation_prp  - file creation property list identifier
+  access_prp    - file access property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, &
+       creation_prp, access_prp)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
+    INTEGER, INTENT(IN) :: access_flags    ! File access flags
+    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp
+                                           ! File creation propertly
+                                           ! list identifier
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
+                                           ! File access property list
+                                           ! identifier
+
+ +
+ +

h5fflush_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fflush_f
+
+

PURPOSE

+
  Flushes all buffers associated WITH a file to disk
+
+

INPUTS

+
  object_id     - identifier of object used to identify the file.
+  scope         - specifies the scope of the flushing action.
+                  Possible values are:
+                    H5F_SCOPE_GLOBAL_F
+                    H5F_SCOPE_LOCAL_F
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  creation_prp  - file creation property list identifier
+  access_prp    - file access property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fflush_f(object_id, scope, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object
+                                            !associate with a file,
+                                            !including the file itself,
+                                            !a dataset, a group, an
+                                            !attribute, or a named
+                                            !data type
+
+    INTEGER, INTENT(IN) :: scope            !scope of the flushing
+                                            !action, possible values
+                                            !are: H5F_SCOPE_GLOBAL_F
+                                            ! which flushes the entire
+                                            !virtual file,
+                                            !and H5F_SCOPE_LOCAL_F
+                                            !which flushes only the
+                                            !specified file.
+
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5fget_access_plist_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_access_plist_f
+
+

PURPOSE

+
  Returns a file access property list identifier.
+
+

INPUTS

+
  file_id       - identifier of a file to creation property list of
+
+

OUTPUTS

+
  access_id     - access property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
+    INTEGER(HID_T), INTENT(OUT) :: access_id   ! File access property
+                                               ! list identifier
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5fget_create_plist_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_create_plist_f
+
+

PURPOSE

+
  Returns a file creation property list identifier.
+
+

INPUTS

+
  file_id       - identifier of a file to creation property list of
+
+

OUTPUTS

+
  prop_id       - creation property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id    ! File identifier
+    INTEGER(HID_T), INTENT(OUT) :: prop_id   ! File creation property
+                                             ! list identifier
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5fget_filesize_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_filesize_f
+
+

PURPOSE

+
  Retrieves the file size of the HDF5 file.
+
+

INPUTS

+
  file_id       - file identifier
+
+

OUTPUTS

+
  size          - file size
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  July 7, 2004
+
+

SOURCE

+
  SUBROUTINE h5fget_filesize_f(file_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id  ! file identifier
+    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Size of the file
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
+                                           !     -1 if fail
+
+ +
+ +

h5fget_freespace_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_freespace_f
+
+

PURPOSE

+
  Get amount of free space within a file
+
+

INPUTS

+
  file_id       - file identifier
+
+

OUTPUTS

+
  free_space    - amount of free space in file
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Quincey Koziol
+  October 7, 2003
+
+

SOURCE

+
  SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
+    INTEGER(HSSIZE_T), INTENT(OUT) :: free_space
+                                          ! amount of free space in file
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5fget_name_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_name_f
+
+

PURPOSE

+
  Gets the name of the file from the object identifier
+
+

INPUTS

+
  obj_id        - object identifier
+
+

OUTPUTS

+
  buf           - buffer to store the read name
+  size          - actual size of the name
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  July 6, 2004
+
+

SOURCE

+
  SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Object identifier
+    CHARACTER(LEN=*), INTENT(INOUT) :: buf
+                                           ! Buffer to hold file name
+    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Size of the file name
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
+                                           !     -1 if fail
+
+ +
+ +

h5fget_obj_count_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_obj_count_f
+
+

PURPOSE

+
  Gets number of the objects open within a file
+
+

INPUTS

+
  file_id       - file identifier
+  obj_type      - type of the object; possible values are:
+                    H5F_OBJ_FILE_F
+                    H5F_OBJ_DATASET_F
+                    H5F_OBJ_GROUP_F
+                    H5F_OBJ_DATATYPE_F
+                    H5F_OBJ_ALL_F
+
+

OUTPUTS

+
  obj_count     - number of open objects
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  September 30, 2002
+
+

HISTORY

+
  Changed the type of obj_count to INTEGER(SIZE_T)
+  September 25, 2008 EIP
+
+

SOURCE

+
  SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
+    INTEGER, INTENT(IN)  :: obj_type      ! Object type
+    INTEGER(SIZE_T), INTENT(OUT) :: obj_count
+                                          ! Number of open objects
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5fget_obj_ids_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fget_obj_ids_f
+
+

PURPOSE

+
  Get list of open objects identifiers within a file
+
+

INPUTS

+
  file_id       - file identifier
+  obj_type      - type of the object; possible values are:
+                    H5F_OBJ_FILE_F
+                    H5F_OBJ_DATASET_F
+                    H5F_OBJ_GROUP_F
+                    H5F_OBJ_DATATYPE_F
+                    H5F_OBJ_ALL_F
+
+

OUTPUTS

+
  obj_ids       - array of open object identifiers
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  num_objs      - number of open objects
+
+

AUTHOR

+
  Elena Pourmal
+  September 30, 2002
+
+

HISTORY

+
  Added optional parameter num_objs for number of open objects
+  of the specified type and changed type of max_obj to
+  INTEGER(SIZE_T)
+  September 25, 2008 EIP
+
+

SOURCE

+
  SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
+    INTEGER, INTENT(IN)  :: obj_type           ! Object type
+    INTEGER(SIZE_T), INTENT(IN)  :: max_objs   ! Maximum # of objects to retrieve
+    INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids
+                                               ! Array of open objects iidentifiers
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects
+
+ +
+ +

h5fis_hdf5_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fis_hdf5_f
+
+

PURPOSE

+
  Determines whether a file is in the HDF5 format.
+
+

INPUTS

+
  name          - name of the file to check
+
+

OUTPUTS

+
  status        - indicates if file is and HDF5 file
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fis_hdf5_f(name, status, hdferr)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
+    LOGICAL, INTENT(OUT) :: status         ! Indicates if file
+                                           ! is an HDF5 file
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5fmount_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fmount_f
+
+

PURPOSE

+
  Mounts a file.
+
+

INPUTS

+
  loc_id        - the identifier for of file or group in
+                  which name is defined
+  name          - the name of the group onto which the file
+                  specified by child_id is to be mounted.
+  child_id      - the identifier of the file to be mounted.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  access_prp    - the identifier of the property list to be used
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
+                                           ! in which dsetname is defined
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
+    INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the
+                                           ! file to be mounted
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
+                                           ! File access property list
+                                           ! identifier
+
+ +
+ +

h5fopen_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5fopen_f
+
+

PURPOSE

+
  Opens HDF5 file.
+
+

INPUTS

+
  name          - name of the file to acecss
+  access_flags  - File access flags. Allowable values are:
+                   H5F_ACC_RDWR_F
+                   H5F_ACC_RDONLY_F
+
+

OUTPUTS

+
  file_id       - file identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  access_prp    - file access property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
+    INTEGER, INTENT(IN) :: access_flags    ! File access flags
+    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
+                                           ! File access property list
+                                           ! identifier
+
+ +
+ +

h5freopen_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5freopen_f
+
+

PURPOSE

+
  Reopens HDF5 file.
+
+

INPUTS

+
  file_id       - identifier of a file for which an
+                  additional identifier is required
+
+

OUTPUTS

+
  ret_file_id   - new file identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
+    INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5funmount_f

+ +

[ Top ] [ H5F ] [ Subroutines ]

+

NAME

+
  h5funmount_f
+
+

PURPOSE

+
  Unmounts a file.
+
+

INPUTS

+
  loc_id        - the identifier for of file or group in
+                  which name is defined
+  name          - the name of the mount point
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5funmount_f(loc_id, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
+                                           ! at which the specified file
+                                           ! is to be unmounted
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the mount point
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Gf_c.html b/fortran/doc/DevelGuide/src/H5Gf_c.html new file mode 100644 index 0000000..a71f0e8 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Gf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Gf.c + + + + + +
+
+ +

H5Gf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5G Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Gff_f90.html b/fortran/doc/DevelGuide/src/H5Gff_f90.html new file mode 100644 index 0000000..74ec2f4 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Gff_f90.html @@ -0,0 +1,840 @@ + + + + + + + +./src/H5Gff.f90 + + + + + +
+
+ +

H5G

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5G
+
+

FILE

+
  fortran/src/H5Gff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5G functions.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5gclose_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gclose_f
+
+

PURPOSE

+
  Closes the specified group.
+
+

INPUTS

+
  grp_id        - group identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gclose_f(grp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: grp_id  ! Group identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

H5Gcreate_anon_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  H5Gcreate_anon_f
+
+

PURPOSE

+
  Creates a new empty group without linking it into the file structure.
+
+

INPUTS

+
  loc_id        - Location identifier
+
+

OUTPUTS

+
  grp_id        - group identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  gcpl_id       - Group creation property list identifier
+  gapl_id       - Group access property list identifier
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 15, 2008
+
+

SOURCE

+
  SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
+
+ +
+ +

h5gcreate_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gcreate_f
+
+

PURPOSE

+
  Creates a new group.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - group name at the specified location
+
+

OUTPUTS

+
  grp_id        - group identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  size_hint     - a parameter indicating the number of bytes to
+                  reserve for the names that will appear in the group
+  lcpl_id       - Property list for link creation
+  gcpl_id       - Property list for group creation
+  gapl_id       - Property list for group access
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+  Added additional optional paramaters in 1.8
+  MSB - February 27, 2008
+
+

SOURCE

+
  SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
+    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint
+                                           ! Parameter indicating
+                                           ! the number of bytes
+                                           ! to reserve for the
+                                           ! names that will appear
+                                           ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F
+                                           ! if using any of the optional
+                                           ! parameters lcpl_id, gcpl_id, and/or gapl_id when not
+                                           ! using keywords in specifying the optional parameters
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id  ! Property list for link creation
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
+
+ +
+ +

h5gget_comment_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_comment_f
+
+

PURPOSE

+
  Retrieves comment for specified object.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the object at specified location
+  size          - size of the buffer required to hold comment
+
+

OUTPUTS

+
  buffer        - buffer to hold object's comment
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
+    CHARACTER(LEN=size), INTENT(OUT) :: buffer
+                                           ! Buffer to hold a comment
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

H5Gget_create_plist_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  H5Gget_create_plist_f
+
+

PURPOSE

+
  Gets a group creation property list identifier.
+
+

INPUTS

+
  grp_id        - group identifier
+
+

OUTPUTS

+
  gcpl_id       - Group creation property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 15, 2008
+
+

SOURCE

+
  SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN)  :: grp_id  ! Group identifier
+    INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5gget_info_by_idx_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_info_by_idx_f
+
+

PURPOSE

+
  Retrieves information about a group, according to the group’s position within an index.
+
+

INPUTS

+
  loc_id        - File or group identifier
+  group_name    - Name of group containing group for which information is to be retrieved
+  index_type    - Index type
+  order         - Order of the count in the index
+  n             - Position in the index of the group for which information is retrieved
+
+

OUTPUTS

+
  storage_type  - Type of storage for links in group
+                    H5G_STORAGE_TYPE_COMPACT: Compact storage
+                    H5G_STORAGE_TYPE_DENSE: Indexed storage
+                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
+  nlinks        - Number of links in group
+  max_corder    - Current maximum creation order value for group
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+  mounted       - Whether group has a file mounted on it
+
+

NOTES

+
  In C the output is defined as a structure: H5G_info_t
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 18, 2008
+
+

HISTORY

+
  Added 'mounted' paramater
+  M. Scot Breitenfeld
+  July 16, 2008
+
+

SOURCE

+
  SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, &
+       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
+    INTEGER, INTENT(IN) :: index_type ! Index type
+    INTEGER, INTENT(IN) :: order      ! Order of the count in the index
+    INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved
+
+    INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group:
+                                         !   H5G_STORAGE_TYPE_COMPACT_F: Compact storage
+                                         !   H5G_STORAGE_TYPE_DENSE_F: Indexed storage
+                                         !   H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
+    INTEGER, INTENT(OUT) :: nlinks      ! Number of links in group
+    INTEGER, INTENT(OUT) :: max_corder  ! Current maximum creation order value for group
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
+                                        ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
+
+ +
+ +

h5gget_info_by_name_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_info_by_name_f
+
+

PURPOSE

+
  Retrieves information about a group.
+
+

INPUTS

+
  loc_id        - File or group identifier
+  group_name    - Name of group containing group for which information is to be retrieved
+
+

OUTPUTS

+
  storage_type  - Type of storage for links in group
+                    H5G_STORAGE_TYPE_COMPACT: Compact storage
+                    H5G_STORAGE_TYPE_DENSE: Indexed storage
+                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
+  nlinks        - Number of links in group
+  max_corder    - Current maximum creation order value for group
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+  mounted       - Whether group has a file mounted on it
+
+

NOTES

+
  In C the output is defined as a structure: H5G_info_t
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 18, 2008
+
+

HISTORY

+
  Added 'mounted' paramater
+  M. Scot Breitenfeld
+  July 16, 2008
+
+

SOURCE

+
  SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, &
+       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
+
+    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
+                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
+                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
+                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
+    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
+    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          !   0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
+
+ +
+ +

h5gget_info_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_info_f
+
+

PURPOSE

+
  Retrieves information about a group
+
+

INPUTS

+
  group_id      - Group identifier
+
+

OUTPUTS

+
  storage_type  - Type of storage for links in group
+                    H5G_STORAGE_TYPE_COMPACT: Compact storage
+                    H5G_STORAGE_TYPE_DENSE: Indexed storage
+                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
+  nlinks        - Number of links in group
+  max_corder    - Current maximum creation order value for group
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  mounted       - Whether group has a file mounted on it
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 15, 2008
+
+

NOTES

+
  In C the output is defined as a structure: H5G_info_t
+
+

HISTORY

+
  - Added 'mounted' paramater
+    M. Scot Breitenfeld
+    July 16, 2008
+
+

SOURCE

+
  SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier
+
+    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
+                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
+                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
+                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
+    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
+    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+    LOGICAL, INTENT(OUT), OPTIONAL :: mounted  ! Whether group has a file mounted on it
+
+ +
+ +

h5gget_linkval_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_linkval_f
+
+

PURPOSE

+
  Returns the name of the object that the symbolic link
+  points to.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - symbolic link to the object whose name
+                  is to be returned.
+  size          - maximum number of characters to be returned
+
+

OUTPUTS

+
  buffer        - a buffer to hold the name of the object
+  being sought
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
+    CHARACTER(LEN=size), INTENT(OUT) :: buffer
+                                           ! Buffer to hold a name of
+                                           ! the object symbolic link
+                                           ! points to
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5gget_obj_info_idx_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gget_obj_info_idx_f
+
+

PURPOSE

+
  Returns name and type of the group member identified by
+  its index.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the group at the specified location
+  idx           - object index (zero-based)
+
+

OUTPUTS

+
  obj_name      - object name
+  obj_type      - object type
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, &
+       obj_name, obj_type, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
+    INTEGER, INTENT(IN) :: idx             ! Index of member object
+    CHARACTER(LEN=*), INTENT(OUT) :: obj_name   ! Name of the object
+    INTEGER, INTENT(OUT) :: obj_type       ! Object type
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5glink2_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5glink2_f
+
+

PURPOSE

+
  Creates a link of the specified type from new_name
+  to current_name. current_name and new_name are interpreted
+  releative to current and new location identifiers.
+
+

INPUTS

+
  cur_loc_id    - location identifier
+  cur_name      - name of the existing object if link is a
+                  hard link. Can be anything for the soft link.
+  link_type     - link type; possible values are:
+                    H5G_LINK_HARD_F (0)
+                    H5G_LINK_SOFT_F (1)
+  new_loc_id    - new location identifier
+  new_name      - new name for the object
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  September 25, 2002
+
+

SOURCE

+
  SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, &
+       new_name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: cur_name
+                                             ! Current name of an object
+    INTEGER, INTENT(IN) :: link_type         ! link type
+                                                 ! Possible values are:
+                                                 ! H5G_LINK_HARD_F (0) or
+                                                 ! H5G_LINK_SOFT_F (1)
+
+    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5glink_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5glink_f
+
+

PURPOSE

+
  Creates a link of the specified type from new_name
+  to current_name.
+
+

INPUTS

+
  loc_id        - location identifier
+  link_type     - link type; possible values are:
+                    H5G_LINK_HARD_F (0)
+                    H5G_LINK_SOFT_F (1)
+  current_name  - name of the existing object if link is a
+                  hard link. Can be anything for the soft link
+  new_name      - new name for the object
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5glink_f(loc_id, link_type, current_name, &
+       new_name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    INTEGER, INTENT(IN) :: link_type       ! link type
+                                                   ! Possible values are:
+                                                   ! H5G_LINK_HARD_F (0) or
+                                                   ! H5G_LINK_SOFT_F (1)
+
+    CHARACTER(LEN=*), INTENT(IN) :: current_name
+                                                   ! Current name of an object
+    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5gmove2_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gmove2_f
+
+

PURPOSE

+
  Renames an object within an HDF5 file.
+
+

INPUTS

+
  src_loc_id    - original location identifier
+  src_name      - object's name at specified original location
+  dst_loc_id    - original location identifier
+  dst_name      - object's new name
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  September 25, 2002
+
+

SOURCE

+
  SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN)   :: src_loc_id  ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: src_name    ! Original name of an object
+    INTEGER(HID_T), INTENT(IN)   :: dst_loc_id  ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: dst_name    ! New name of an object
+    INTEGER, INTENT(OUT)         :: hdferr      ! Error code
+
+ +
+ +

h5gmove_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gmove_f
+
+

PURPOSE

+
  Renames an object within an HDF5 file.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - object's name at specified location
+  new_name      - object's new name
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id     ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Current name of an object
+    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5gn_members_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gn_members_f
+
+

PURPOSE

+
  Returns the number of group members.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the group at the specified location
+
+

OUTPUTS

+
  nmembers      - number of group members
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+            CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
+            INTEGER, INTENT(OUT) :: nmembers       ! Number of members in the
+                                                   ! group
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5gopen_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gopen_f
+
+

PURPOSE

+
  Opens an existing group.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the group to open
+
+

OUTPUTS

+
  grp_id        - group identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  gapl_id       - Group access property list identifier
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+  Added 1.8 (optional) parameter gapl_id
+  February, 2008 M. Scot Breitenfeld
+
+

SOURCE

+
  SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
+    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! File identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Group access property list identifier
+
+ +
+ +

h5gset_comment_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gset_comment_f
+
+

PURPOSE

+
  Sets comment for specified object.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the object
+  comment       - comment to set for the object
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
+    CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5gunlink_f

+ +

[ Top ] [ H5G ] [ Subroutines ]

+

NAME

+
  h5gunlink_f
+
+

PURPOSE

+
  Removes the specified name from the group graph and
+  decrements the link count for the object to which name
+  points
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the object to unlink
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5gunlink_f(loc_id, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of an object
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5If_c.html b/fortran/doc/DevelGuide/src/H5If_c.html new file mode 100644 index 0000000..8dccce7 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5If_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5If.c + + + + + +
+
+ +

H5If

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5I Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Iff_f90.html b/fortran/doc/DevelGuide/src/H5Iff_f90.html new file mode 100644 index 0000000..5987581 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Iff_f90.html @@ -0,0 +1,304 @@ + + + + + + + +./src/H5Iff.f90 + + + + + +
+
+ +

H5I

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5I
+
+

FILE

+
  fortran/src/H5Iff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5I functions.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5idec_ref_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5idec_ref_f
+
+

PURPOSE

+
  Decrements the reference count of an ID
+
+

INPUTS

+
  obj_id        - Object identifier
+
+

OUTPUTS

+
  ref_count     - Current reference count of the ID
+  hdferr:       - Error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Quincey Koziol
+  December  9, 2003
+
+

SOURCE

+
  SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
+    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5iget_file_id_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iget_file_id_f
+
+

PURPOSE

+
  Obtains file identifier from the object identifier
+
+

INPUTS

+
  obj_id        - object identifier
+
+

OUTPUTS

+
  file_id       - file identifier
+  hdferr:       - error code
+                    Success:  0
+                    Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 23, 2004
+
+

SOURCE

+
  SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN)  :: obj_id   ! Object identifier
+    INTEGER(HID_T), INTENT(OUT) :: file_id  ! File identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5iget_name_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iget_name_f
+
+

PURPOSE

+
  Gets a name of an object specified by its idetifier.
+
+

INPUTS

+
  obj_id    - attribute identifier
+  buf_size  - size of a buffer to read name in
+
+

OUTPUTS

+
  buf       - buffer to read name in, name will be truncated if
+              buffer is not big enough
+  name_size - name size
+  hdferr:   - error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
+    INTEGER(SIZE_T), INTENT(IN) :: buf_size   ! Buffer size
+    CHARACTER(LEN=*), INTENT(OUT) :: buf      ! Buffer to hold object name
+    INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
+                                              !   0 if successful,
+                                              !   -1 if fail
+
+ +
+ +

h5iget_ref_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iget_ref_f
+
+

PURPOSE

+
  Retrieves the reference count of an ID
+
+

INPUTS

+
  obj_id        - object identifier
+
+

OUTPUTS

+
  ref_count     - Current reference count of the ID
+  hdferr:         - error code
+  Success:  0
+  Failure: -1
+
+

AUTHOR

+
  Quincey Koziol
+  December  9, 2003
+
+

SOURCE

+
  SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
+    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5iget_type_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iget_type_f
+
+

PURPOSE

+
  Retrieves the type of an object.
+
+

INPUTS

+
  obj_id   - object identifier
+
+

OUTPUTS

+
  type     - type of the object, possible values:
+              H5I_FILE_F
+              H5I_GROUP_F
+              H5I_DATATYPE_F
+              H5I_DATASPACE_F
+              H5I_DATASET_F
+              H5I_ATTR_F
+              H5I_BADID_F
+  hdferr:  - error code
+              Success:  0
+              Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 5, 2001
+
+

SOURCE

+
  SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
+    INTEGER, INTENT(OUT) :: TYPE ! type of an object.
+                                 ! possible values are:
+                                 !   H5I_FILE_F
+                                 !   H5I_GROUP_F
+                                 !   H5I_DATATYPE_F
+                                 !   H5I_DATASPACE_F
+                                 !   H5I_DATASET_F
+                                 !   H5I_ATTR_F
+                                 !   H5I_BADID_F
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ +

h5iinc_ref_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iinc_ref_f
+
+

PURPOSE

+
  Increments the reference count of an ID
+
+

INPUTS

+
  obj_id        - object identifier
+
+

OUTPUTS

+
  ref_count     - Current reference count of the ID
+  hdferr:              - error code
+  Success:  0
+  Failure: -1
+
+

AUTHOR

+
  Quincey Koziol
+  December  9, 2003
+
+

SOURCE

+
  SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
+    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5iis_valid_f

+ +

[ Top ] [ H5I ] [ Subroutines ]

+

NAME

+
  h5iget_file_id_f
+
+

PURPOSE

+
  Check if an ID is valid without producing an error message
+
+

INPUTS

+
  id           - identifier 
+
+

OUTPUTS

+
  valid        - status of id as a valid identifier
+  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 13, 2009
+
+

SOURCE

+
  SUBROUTINE h5iis_valid_f(id, valid, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN)  :: id ! Identifier 
+    LOGICAL, INTENT(OUT) :: valid     ! Status of id as a valid identifier
+    INTEGER, INTENT(OUT) :: hdferr    ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Lf_c.html b/fortran/doc/DevelGuide/src/H5Lf_c.html new file mode 100644 index 0000000..9adb759 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Lf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Lf.c + + + + + +
+
+ +

H5Lf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5L Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html new file mode 100644 index 0000000..6b9640b --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html @@ -0,0 +1,181 @@ + + + + + + + +./src/H5Lff_F03.f90 + + + + + +
+
+ +

H5L (F03)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5L_PROVISIONAL
+
+

FILE

+
  src/fortran/src/H5Lff_F03.f90
+
+

PURPOSE

+
  This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions.
+  It contains the same functions as H5Lff_DEPRECIATE.f90 but includes the
+  Fortran 2003 functions and the interface listings. This file will be compiled
+  instead of H5Lff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5literate_by_name_f

+ +

[ Top ] [ H5L (F03) ] [ Subroutines ]

+

NAME

+
  h5literate_by_name_f
+
+

PURPOSE

+
  Iterates through links in a group.
+
+

INPUTS

+
  loc_id        - File or group identifier specifying location of subject group
+  group_name    - Name of subject group
+  index_type    - Type of index which determines the order
+  order         - Order within index
+  idx           - Iteration position at which to start
+  op            - Callback function passing data regarding the link to the calling application
+  op_data       - User-defined pointer to data required by the application for its processing of the link
+
+

OUTPUTS

+
  idx      - Position at which an interrupted iteration may be restarted
+  hdferr   - Error code:
+               Success:  0
+               Failure: -1
+
+

OPTIONAL PARAMETERS

+
  lapl_id  - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  Augest 18, 2008
+
+

SOURCE

+
  SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, idx, op, op_data, return_value, hdferr, lapl_id)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Identifier specifying subject group
+    CHARACTER(LEN=*) :: group_name          ! Name of subject group
+    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
+                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
+                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
+    INTEGER, INTENT(IN) :: order            ! Order within index:
+                                                ! H5_ITER_INC_F - Increasing order
+                                                ! H5_ITER_DEC_F - Decreasing order
+                                                ! H5_ITER_NATIVE_F - Fastest available order
+    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
+                                            ! OUT: Position at which an interrupted iteration may be restarted
+
+    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
+    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
+
+    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
+                                         !            returns non-zero, or zero if all members were
+                                         !            processed with no operator returning non-zero.
+
+                                         ! Failure:   Negative if something goes wrong within the
+                                         !            library, or the negative value returned by one
+                                         !            of the operators.
+
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
+
+ +
+ +

h5literate_f

+ +

[ Top ] [ H5L (F03) ] [ Subroutines ]

+

NAME

+
  h5literate_f
+
+

PURPOSE

+
  Iterates through links in a group.
+
+

INPUTS

+
  group_id      - Identifier specifying subject group
+  index_type    - Type of index which determines the order
+  order         - Order within index
+  idx           - Iteration position at which to start
+  op            - Callback function passing data regarding the link to the calling application
+  op_data       - User-defined pointer to data required by the application for its processing of the link
+
+

OUTPUTS

+
  idx           - Position at which an interrupted iteration may be restarted
+  hdferr        - Error code:
+                    Success:  0
+                    Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  July 8, 2008
+
+

SOURCE

+
  SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: group_id  ! Identifier specifying subject group
+    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
+                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
+                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
+    INTEGER, INTENT(IN) :: order            ! Order within index:
+                                                ! H5_ITER_INC_F - Increasing order
+                                                ! H5_ITER_DEC_F - Decreasing order
+                                                ! H5_ITER_NATIVE_F - Fastest available order
+    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
+                                            ! OUT: Position at which an interrupted iteration may be restarted
+
+    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
+    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
+
+    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
+                                         !            returns non-zero, or zero if all members were
+                                         !            processed with no operator returning non-zero.
+
+                                         ! Failure:   Negative if something goes wrong within the
+                                         !            library, or the negative value returned by one
+                                         !            of the operators.
+
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html new file mode 100644 index 0000000..6d1a9bb --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html @@ -0,0 +1,50 @@ + + + + + + + +./src/H5Lff_F90.f90 + + + + + +
+
+ +

H5L (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5L_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran 90 interfaces for H5L functions. It contains
+  the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions
+  and the interface listings. This file will be compiled instead of H5Lff_F03.f90
+  if Fortran 2003 functions are not enabled.
+
+ NOTE
+  Currently contains no functions.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Lff_f90.html b/fortran/doc/DevelGuide/src/H5Lff_f90.html new file mode 100644 index 0000000..1a209f2 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Lff_f90.html @@ -0,0 +1,637 @@ + + + + + + + +./src/H5Lff.f90 + + + + + +
+
+ +

H5L

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5L
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5L functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5lcopy_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lcopy_f
+
+

PURPOSE

+
  Copies a link from one location to another.
+
+

INPUTS

+
  src_loc_id    - Location identifier of the source link
+  src_name      - Name of the link to be copied
+  dest_loc_id   - Location identifier specifying the destination of the copy
+  dest_name     - Name to be assigned to the NEW copy
+  loc_id        - Identifier of the file or group containing the object
+  name          - Name of the link to delete
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier
+  lapl_id       - Link access property list identifier
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 27, 2008
+
+

SOURCE

+
  SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, &
+       lcpl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Location identifier of the source link
+    CHARACTER(LEN=*), INTENT(IN) :: src_name   ! Name of the link to be copied
+    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy
+    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy
+
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+
+ +
+ +

H5Lcreate_external_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  H5Lcreate_external_f
+
+

PURPOSE

+
  Creates a soft link to an object in a different file.
+
+

INPUTS

+
  file_name     - Name of the file containing the target object. Neither the file nor the target object is
+  required to exist. May be the file the link is being created in.
+  obj_name      - Path within the target file to the target object.
+  link_loc_id   - The file or group identifier for the new link.
+  link_name     - The name of the new link.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier.
+  lapl_id       - Link access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 27, 2008
+
+

SOURCE

+
  SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither
+                                              ! the file nor the target object is required to exist.
+                                              ! May be the file the link is being created in.
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
+    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
+    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
+
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
+
+ +
+ +

H5Lcreate_hard_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  H5Lcreate_hard_f
+
+

PURPOSE

+
  Creates a hard link to an object.
+
+

INPUTS

+
  obj_loc_id    - The file or group identifier for the target object.
+  obj_name      - Name of the target object, which must already exist.
+  link_loc_id   - The file or group identifier for the new link.
+  link_name     - The name of the new link.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier.
+  lapl_id       - Link access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 27, 2008
+
+

SOURCE

+
  SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_loc_id  ! The file or group identifier for the target object.
+    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
+    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
+    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
+
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lcpl_id         ! Link creation property list identifier.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lapl_id         ! Link access property list identifier.
+
+ +
+ +

H5Lcreate_soft_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  H5Lcreate_soft_f
+
+

PURPOSE

+
  Creates a soft link to an object.
+
+

INPUTS

+
  target_path   - Path to the target object, which is not required to exist.
+  link_loc_id   - The file or group identifier for the new link.
+  link_name     - The name of the new link.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier.
+  lapl_id       - Link access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 20, 2008
+
+

SOURCE

+
  SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: target_path   ! Path to the target object, which is not required to exist.
+    INTEGER(HID_T), INTENT(IN) :: link_loc_id     ! The file or group identifier for the new link.
+    CHARACTER(LEN=*), INTENT(IN) :: link_name     ! The name of the new link.
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code:
+                                                  !   0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
+
+ +
+ +

h5ldelete_by_idx_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5ldelete_by_idx_f
+
+

PURPOSE

+
  Removes the nth link in a group.
+
+

INPUTS

+
  loc_id        - File or group identifier specifying location of subject group
+  group_name    - Name of subject group
+  index_field   - Type of index; Possible values are:
+                    H5_INDEX_UNKNOWN_F = -1  - Unknown index type
+                    H5_INDEX_NAME_F          - Index on names
+                    H5_INDEX_CRT_ORDER_F     - Index on creation order
+                    H5_INDEX_N_F             - Number of indices defined
+
+  order         - Order within field or index; Possible values are:
+                    H5_ITER_UNKNOWN_F   - Unknown order
+                    H5_ITER_INC_F       - Increasing order
+                    H5_ITER_DEC_F       - Decreasing order
+                    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
+                    H5_ITER_N_F         - Number of iteration orders
+
+  n             - Link for which to retrieve information
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 29, 2008
+
+

SOURCE

+
  SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id       ! Identifer for object to which attribute is attached
+    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location,
+                                               !  from which attribute is to be removed
+    INTEGER, INTENT(IN) :: index_field         ! Type of index; Possible values are:
+                                               !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                               !    H5_INDEX_NAME_F      - Index on names
+                                               !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                               !    H5_INDEX_N_F              - Number of indices defined
+    INTEGER, INTENT(IN) :: order               ! Order in which to iterate over index; Possible values are:
+                                               !    H5_ITER_UNKNOWN_F  - Unknown order
+                                               !    H5_ITER_INC_F      - Increasing order
+                                               !    H5_ITER_DEC_F      - Decreasing order
+                                               !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+                                               !    H5_ITER_N_F     - Number of iteration orders
+    INTEGER(HSIZE_T), INTENT(IN) :: n      ! Offset within index
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
+                                           ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id     ! Link access property list
+
+ +
+ +

h5ldelete_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5ldelete_f
+
+

PURPOSE

+
  Removes a link from a group.
+
+

INPUTS

+
  loc_id        - Identifier of the file or group containing the object
+  name          - Name of the link to delete
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list identifier
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group containing the object
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of the link to delete
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+
+ +
+ +

H5Lexists_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  H5Lexists_f
+
+

PURPOSE

+
  Check if a link with a particular name exists in a group.
+
+

INPUTS

+
  loc_id        - Identifier of the file or group to query.
+  name          - Link name to check
+
+

OUTPUTS

+
  link_exists   - link exists status (.TRUE.,.FALSE.)
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 29, 2008
+
+

SOURCE

+
  SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group to query.
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Link name to check.
+    LOGICAL, INTENT(OUT) :: link_exists   ! .TRUE. if exists, .FALSE. otherwise
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id
+                                          ! Link access property list identifier.
+
+ +
+ +

h5lget_info_by_idx_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lget_info_by_idx_f
+
+

PURPOSE

+
  Retrieves metadata for a link in a group, according to the order within a field or index.
+
+

INPUTS

+
  loc_id        - File or group identifier specifying location of subject group
+  group_name    - Name of subject group
+  index_field   - Index or field which determines the order
+  order         - Order within field or index
+  n             - Link for which to retrieve information
+
+

OUTPUTS

+
            NOTE: In C these are defined as a structure: H5L_info_t
+  corder_valid  - Indicates whether the creation order data is valid for this attribute
+  corder        - Is a positive integer containing the creation order of the attribute
+  cset          - Indicates the character set used for the attribute’s name 
+ address        - If the link is a hard link, address specifies the file address that the link points to
+ val_size       - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
+                  the length of the name of the pointed-to object with a null terminator.
+ hdferr         - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 29, 2008
+
+

HISTORY

+
   Changed the link_type names to match those in C (bug 1720) from,
+   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
+   to
+   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
+   MSB January 8, 2010.  
+
+

SOURCE

+
  SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
+       link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group  
+    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
+    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
+                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                        !    H5_INDEX_NAME_F      - Index on names
+                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                        !    H5_INDEX_N_F             - Number of indices defined
+    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
+                                        !    H5_ITER_UNKNOWN_F  - Unknown order
+                                        !    H5_ITER_INC_F      - Increasing order
+                                        !    H5_ITER_DEC_F      - Decreasing order
+                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
+    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
+                                      !  H5L_TYPE_HARD_F      - Hard link
+                                      !  H5L_TYPE_SOFT_F      - Soft link
+                                      !  H5L_TYPE_EXTERNAL_F  - External link
+                                      !  H5L_TYPE_ERROR _F    - Error
+    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute 
+    INTEGER, INTENT(OUT) :: corder         ! Is a positive integer containing the creation order of the attribute
+    INTEGER, INTENT(OUT) :: cset           ! Indicates the character set used for the attributeâs name
+    INTEGER(HADDR_T), INTENT(OUT) :: address  ! If the link is a hard link, address specifies the file address that the link points to
+    INTEGER(SIZE_T), INTENT(OUT) :: val_size  ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
+                                              ! the length of the name of the pointed-to object with a null terminator. 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
+
+ +
+ +

h5lget_info_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lget_info_f
+
+

PURPOSE

+
  Returns information about a link.
+
+

INPUTS

+
  link_loc_id   - File or group identifier.
+  link_name     - Name of the link for which information is being sought
+
+

OUTPUTS

+
            NOTE: In C these are contained in the structure H5L_info_t
+
+  cset          - indicates the character set used for link’s name.
+  corder        - specifies the link’s creation order position.
+  corder_valid  - indicates whether the value in corder is valid.
+  link_type     - specifies the link class:
+                    H5L_TYPE_HARD_F     - Hard link
+                    H5L_TYPE_SOFT_F     - Soft link
+                    H5L_TYPE_EXTERNAL_F - External link
+                    H5L_TYPE_ERROR_ F   - Error
+  address       - If the link is a hard link, address specifies the file address that the link points to
+  val_size      - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
+                  the length of the name of the pointed-to object with a null terminator. 
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Link access property list
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 29, 2008
+
+

HISTORY

+
   Changed the link_type names to match those in C (bug 1720) from,
+   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
+   to
+   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
+   MSB January 8, 2010.
+
+

SOURCE

+
  SUBROUTINE h5lget_info_f(link_loc_id, link_name, &
+       cset, corder, f_corder_valid, link_type, address, val_size, &
+       hdferr, lapl_id)
+    IMPLICIT NONE
+
+    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier.
+    CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought
+
+! OUTPUTS  NOTE: In C these are contained in the structure H5L_info_t
+    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the linkâs name.
+    INTEGER, INTENT(OUT) :: corder ! Specifies the linkâs creation order position.
+    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid.
+    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
+                                      !  H5L_TYPE_HARD_F      - Hard link
+                                      !  H5L_TYPE_SOFT_F      - Soft link
+                                      !  H5L_TYPE_EXTERNAL_F  - External link
+                                      !  H5L_TYPE_ERROR _F    - Error
+    INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
+    INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
+                                             ! the length of the name of the pointed-to object with a null terminator. 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
+
+ +
+ +

h5lget_name_by_idx_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lget_name_by_idx_f
+
+

PURPOSE

+
  Retrieves name of the nth link in a group, according to the order within a specified field or index.
+
+

INPUTS

+
  loc_id        - File or group identifier specifying location of subject group
+  group_name    - Name of subject group
+  index_field   - Index or field which determines the order
+  order         - Order within field or index
+  n             - Link for which to retrieve information
+
+

OUTPUTS

+
  name          - Buffer in which link value is returned
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - List access property list identifier.
+  size          - Maximum number of characters of link value to be returned.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 10, 2008
+
+

SOURCE

+
  SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, &
+        name, hdferr, size, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group
+    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
+    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
+                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
+                                        !    H5_INDEX_NAME_F      - Index on names
+                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
+                                        !    H5_INDEX_N_F             - Number of indices defined
+    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
+                                        !    H5_ITER_UNKNOWN_F  - Unknown order
+                                        !    H5_ITER_INC_F      - Increasing order
+                                        !    H5_ITER_DEC_F      - Decreasing order
+                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
+    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
+    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5lis_registered_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lis_registered_f
+
+

PURPOSE

+
  Determines whether a class of user-defined links is registered.
+
+

INPUTS

+
  link_cls_id   - User-defined link class identifier
+
+

OUTPUTS

+
  registered    - .TRUE.  - if the link class has been registered
+                  .FALSE. - if it is unregistered
+  hdferr        - Error code
+  Success:  0
+  Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 29, 2008
+
+

SOURCE

+
  SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr)
+    IMPLICIT NONE
+    INTEGER, INTENT(IN) :: link_cls_id  ! User-defined link class identifier
+    LOGICAL, INTENT(OUT) :: registered  ! .TRUE. - if the link class has been registered and
+                                        ! .FALSE. - if it is unregistered
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
+                                        ! 0 on success and -1 on failure
+
+ +
+ +

h5lmove_f

+ +

[ Top ] [ H5L ] [ Subroutines ]

+

NAME

+
  h5lmove_f
+
+

PURPOSE

+
  Renames a link within an HDF5 file.
+
+

INPUTS

+
  src_loc_id    - Original file or group identifier.
+  src_name      - Original link name.
+  dest_loc_id   - Destination file or group identifier.
+  dest_name     - NEW link name.
+
+

OUTPUTS

+
  hdferr        - Error code:
+                   0 on success and -1 on failure
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier to be associated WITH the NEW link.
+  lapl_id       - Link access property list identifier to be associated WITH the NEW link.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

SOURCE

+
  SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Original file or group identifier.
+    CHARACTER(LEN=*), INTENT(IN) :: src_name  ! Original link name.
+    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier.
+    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name.
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
+                                              ! 0 on success and -1 on failure
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
+                                                    ! to be associated WITH the NEW link.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
+                                                    ! to be associated WITH the NEW link.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Of_c.html b/fortran/doc/DevelGuide/src/H5Of_c.html new file mode 100644 index 0000000..e4a97e9 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Of_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Of.c + + + + + +
+
+ +

H5Of

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5O Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Off_f90.html b/fortran/doc/DevelGuide/src/H5Off_f90.html new file mode 100644 index 0000000..790810e --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Off_f90.html @@ -0,0 +1,198 @@ + + + + + + + +./src/H5Off.f90 + + + + + +
+
+ +

H5O

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5O
+
+

FILE

+
  fortran/src/H5Off.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5O functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5oclose_f

+ +

[ Top ] [ H5O ] [ Subroutines ]

+

NAME

+
  h5oclose_f
+
+

PURPOSE

+
  Closes an object in an HDF5 file.
+
+

INPUTS

+
  object_id     - Object identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  December 17, 2008
+
+

SOURCE

+
  SUBROUTINE h5oclose_f(object_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN)  :: object_id
+    INTEGER,        INTENT(OUT) :: hdferr
+
+ +
+ +

h5olink_f

+ +

[ Top ] [ H5O ] [ Subroutines ]

+

NAME

+
  h5olink_f
+
+

PURPOSE

+
  Creates a hard link to an object in an HDF5 file.
+
+

INPUTS

+
  object_id     - Object to be linked.
+  new_loc_id    - File or group identifier specifying location at which object is to be linked.
+  new_link_name - Name of link to be created, relative to new_loc_id.
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list identifier.
+  lapl_id       - Link access property list identifier.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 21, 2008
+
+

SOURCE

+
  SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: object_id  ! Object to be linked
+    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier specifying
+                                             ! location at which object is to be linked.
+    CHARACTER(LEN=*), INTENT(IN) :: new_link_name ! Name of link to be created, relative to new_loc_id.
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          !   Success:  0
+                                          !   Failure: -1
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link creation property list identifier.
+
+ +
+ +

h5oopen_f

+ +

[ Top ] [ H5O ] [ Subroutines ]

+

NAME

+
  h5oopen_f
+
+

PURPOSE

+
  Opens an object in an HDF5 file by location identifier and path name.
+
+

INPUTS

+
  loc_id        - File or group identifier
+  name          - Path to the object, relative to loc_id.
+
+

OUTPUTS

+
  obj_id        - Object identifier for the opened object
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

OPTIONAL PARAMETERS

+
  lapl_id       - Access property list identifier for the link pointing to the object
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 18, 2008
+
+

SOURCE

+
  SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Path to the object, relative to loc_id
+    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          !   Success:  0
+                                          !   Failure: -1
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Attribute access property list
+
+ +
+ +

h5open_by_addr_f

+ +

[ Top ] [ H5O ] [ Subroutines ]

+

NAME

+
  h5oopen_by_addr_f 
+
+

PURPOSE

+
  Opens an object using its address within an HDF5 file. 
+
+

INPUTS

+
    loc_id - File or group identifier
+    addr   - Object’s address in the file
+ OUTPUTS: 
+    obj_id - Object identifier for the opened object
+    hdferr - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  September 14, 2009
+
+

SOURCE

+
  SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
+    INTEGER(HADDR_T), INTENT(IN) :: addr  ! Objectâs address in the file
+    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
+                                          ! 0 on success and -1 on failure
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Pf_c.html b/fortran/doc/DevelGuide/src/H5Pf_c.html new file mode 100644 index 0000000..6b8079a --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Pf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Pf.c + + + + + +
+
+ +

H5Pf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5P Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html new file mode 100644 index 0000000..51882ba --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html @@ -0,0 +1,832 @@ + + + + + + + +./src/H5Pff_F03.f90 + + + + + +
+
+ +

H5P (F03)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5P_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions.
+  It contains the same functions as H5Pff_DEPRECIATE.f90 but includes the
+  Fortran 2003 functions and the interface listings. This file will be compiled
+  instead of H5Pff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5pget_double

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pget_double
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    DOUBLE PRECISION,   INTENT(OUT), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pcreate_class_f

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pcreate_class_f
+
+

PURPOSE

+
  Create a new property list class
+
+

INPUTS

+
  parent        - Property list identifier of the parent class
+                  Possible values include:
+                   H5P_ROOT_F
+                   H5P_FILE_CREATE_F
+                   H5P_FILE_ACCESS_F
+                   H5P_DATASET_CREATE_F
+                   H5P_DATASET_XFER_F
+                   H5P_FILE_MOUNT_F
+  name          - name of the class we are creating
+
+

OUTPUTS

+
  class         - porperty list class identifier
+  hdferr:       - error code
+
+  Success: 0
+  Failure: -1
+
+

OPTIONAL PARAMETERS

+
  H5P_cls_create_func_t (create) - Callback routine called when a property list is created
+  create_data                    - User pointer to any class creation information needed
+  H5P_cls_copy_func_t   (copy)   - Callback routine called when a property list is copied
+  copy_data                      - User pointer to any class copy information needed
+  H5P_cls_close_func_t  (close)  - Callback routine called when a property list is being closed
+  close_data                     - User pointer to any class close information needed
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

HISTORY

+
  Added callback arguments
+  M. Scot Breitenfeld, July 3, 2008
+
+

SOURCE

+
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
+    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+    TYPE(C_PTR), OPTIONAL :: create_data, copy_data, close_data
+    TYPE(C_FUNPTR), OPTIONAL :: create, copy, close
+
+ +
+ +

h5pget_char

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pget_char
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
+    CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5pget_integer

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pget_integer
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
+    INTEGER,   INTENT(OUT), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pget_real

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pget_real
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
+    REAL,   INTENT(OUT), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5pinsert_char

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pinsert_char
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
+    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5pinsert_double

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pinsert_double
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    DOUBLE PRECISION, INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pinsert_integer

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pinsert_integer
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist    ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
+    INTEGER,   INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5pinsert_ptr

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pinsert_ptr
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  June 24, 2008
+
+

SOURCE

+
  SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size  ! Size of property value
+    TYPE(c_ptr),   INTENT(IN) :: value   ! Property value
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5pinsert_real

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pinsert_real
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
+    USE iso_c_binding
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    REAL,   INTENT(IN), TARGET :: value   ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pregister_char

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pregister_char
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
+    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pregister_double

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pregister_double
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class  ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size  ! size of the property value
+    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5pregister_integer

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pregister_integer
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class    ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
+    INTEGER,   INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5pregister_ptr

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pregister_ptr
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  June 24, 2008
+
+

SOURCE

+
  SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    TYPE(C_PTR), INTENT(IN) :: value      ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pregister_real

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pregister_real
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
+    USE ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
+    REAL,   INTENT(IN), TARGET :: value   ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pset(get)fill_value_f

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pset(get)fill_value_f
+
+

PURPOSE

+
  Sets(gets) fill value for a dataset creation property list
+
+

INPUTS

+
  prp_id        - dataset creation property list identifier
+  type_id       - datatype identifier for fill value
+  fillvalue     - fill value
+
+

OUTPUTS

+
  type_id       - datatype identifier for fill value
+  fillvalue     - fill value
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 14, 2001
+
+  Added the recommended way of passing fillvalue
+  and that is by passing the C address, all other
+  ways are obsolete and should be avoided. June, 2008 MSB
+
+

NOTES

+
  h5pset(get)fill_value_f function is overloaded to support
+  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
+
+

SOURCE

+
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
+                                          ! of fillvalue datatype
+                                          ! (in memory)
+    INTEGER, INTENT(IN), TARGET :: fillvalue   ! Fillvalue
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ +

h5pset_char

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pset_char
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
+    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pset_double

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pset_double
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                    Success:  0
+                    Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr                  ! Error code
+
+ +
+ +

h5pset_integer

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pset_integer
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
+    INTEGER,   INTENT(IN), TARGET :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5pset_real

+ +

[ Top ] [ H5P (F03) ] [ Subroutines ]

+

NAME

+
  h5pset_real
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                    Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
+    REAL,   INTENT(IN), TARGET :: value  ! Property value
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html new file mode 100644 index 0000000..5f8d579 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html @@ -0,0 +1,715 @@ + + + + + + + +./src/H5Pff_F90.f90 + + + + + +
+
+ +

H5P (_F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5P_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran 90 interfaces for H5P functions. It contains
+  the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions
+  and the interface listings. This file will be compiled instead of H5Pff_F03.f90
+  if Fortran 2003 functions are not enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5pcreate_class_f

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pcreate_class_f
+
+

PURPOSE

+
  Create a new property list class
+
+

INPUTS

+
  parent        - Property list identifier of the parent class
+                  Possible values include:
+                    H5P_ROOT_F
+                    H5P_FILE_CREATE_F
+                    H5P_FILE_ACCESS_F
+                    H5P_DATASET_CREATE_F
+                    H5P_DATASET_XFER_F
+                    H5P_FILE_MOUNT_F
+  name          - name of the class we are creating
+
+

OUTPUTS

+
  class         - property list class identifier
+  hdferr        - error code
+                   Success: 0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class
+                                          ! identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
+    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pget_char

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pget_char
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
+    CHARACTER(LEN=*),   INTENT(OUT) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5pget_double

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pget_double
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
+    DOUBLE PRECISION,   INTENT(OUT) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5pget_integer

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pget_integer
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    INTEGER,   INTENT(OUT) :: value       ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pget_real

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pget_real
+
+

PURPOSE

+
  Gets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+
+

OUTPUTS

+
  value         - value of property
+  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    REAL,   INTENT(OUT) :: value          ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pinsert_char

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pinsert_char
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
+    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+
+ +
+ +

h5pinsert_double

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pinsert_double
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    DOUBLE PRECISION, INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pinsert_integer

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pinsert_integer
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    INTEGER,   INTENT(IN) :: value        ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pinsert_real

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pinsert_real
+
+

PURPOSE

+
  Registers a temporary property with a property list class.
+
+

INPUTS

+
  plist         - property list identifier
+                  permanent property within
+  name          - name of property to insert
+  size          - size of property in bytes
+  value         - initial value for the property
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    REAL,   INTENT(IN) :: value           ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pregister_char

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pregister_char
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
+    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pregister_double

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pregister_double
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size     ! Size of the property value
+    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pregister_integer

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pregister_integer
+
+

PURPOSE

+
  Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+  created property lists
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
+    INTEGER,   INTENT(IN) :: value        ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pregister_real

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pregister_real
+
+ PURPOSE       Registers a permanent property with a property list class.
+
+

INPUTS

+
  class         - property list class to register
+                  permanent property within
+  name          - name of property to register
+  size          - size of property in bytes
+  value         - default value for property in newly
+                  created property lists
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 10, 2002
+
+

SOURCE

+
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
+    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
+    REAL,   INTENT(IN) :: value           ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pset(get)fill_value_f

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pset(get)fill_value_f
+
+

PURPOSE

+
  Sets(gets) fill value for a dataset creation property list
+
+

INPUTS

+
  prp_id        - dataset creation property list identifier
+  type_id       - datatype identifier for fill value
+  fillvalue     - fill value
+
+

OUTPUTS

+
  type_id      - datatype identifier for fill value
+  fillvalue    - fill value
+  hdferr       - error code
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 14, 2001
+
+

NOTES

+
  h5pset(get)fill_value_f function is overloaded to support
+  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
+
+

SOURCE

+
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
+                                          ! of fillvalue datatype
+                                          ! (in memory)
+    INTEGER, INTENT(IN) :: fillvalue      ! Fillvalue
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pset_char

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pset_char
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr        - error code
+                   Success:  0
+                   Failure: -1
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
+    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pset_double

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pset_double
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
+    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5pset_integer

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pset_integer
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    INTEGER, INTENT(IN) :: value          ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5pset_real

+ +

[ Top ] [ H5P (F90) ] [ Subroutines ]

+

NAME

+
  h5pset_real
+
+

PURPOSE

+
  Sets a property list value
+
+

INPUTS

+
  prp_id        - iproperty list identifier to modify
+  name          - name of property to modify
+  value         - value to set property to
+
+

OUTPUTS

+
  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002
+
+

SOURCE

+
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    REAL, INTENT(IN) :: value             ! Property value
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Pff_f90.html b/fortran/doc/DevelGuide/src/H5Pff_f90.html new file mode 100644 index 0000000..0e9ff5c --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Pff_f90.html @@ -0,0 +1,4752 @@ + + + + + + + +./src/H5Pff.f90 + + + + + +
+
+ +

H5P (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  H5P_PROVISIONAL
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5P functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5pget_hyper_vector_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_hyper_vector_size_f 
+
+

PURPOSE

+
  Get the number of "I/O" vectors (vector size)
+
+

INPUTS

+
  plist_id     - dataset transfer property list identifier
+
+

OUTPUTS

+
  size         - vector size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
+    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Vector size
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_family_offset_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_family_offset_f 
+
+

PURPOSE

+
  Sets offset for family file driver.
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+  offset       - file offset
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  19 March 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_family_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_fapl_family_f 
+
+

PURPOSE

+
  Sets the file access property list to use the family driver. 
+
+

INPUTS

+
  prp_id       - file access property list identifier
+  memb_size    - size in bytes of each file member 
+  memb_plist   - identifier of the file access property 
+                 list to be used for each family member
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes,
+                                              ! of each family member
+    INTEGER(HID_T), INTENT(IN) :: memb_plist  ! Identifier of the file 
+                                              ! access property list for 
+                                              ! each member of the family
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_meta_block_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_meta_block_size_f 
+
+

PURPOSE

+
  Sets the minimum size of metadata block allocations 
+
+

INPUTS

+
  plist_id     - file access property list identifier
+  size         - metatdata block size
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: size    ! Block size in bytes; 
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pall_filters_avail_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pall_filters_avail_f 
+
+

PURPOSE

+
  Checks if all filters set in the dataset creation
+  property list are available
+
+

INPUTS

+
  prp_id       - data creation property list identifier
+
+

OUTPUTS

+
  flag         - .TRUE. if all filters are available
+                 .FALSE. otherwise
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  April 10 2003
+
+

SOURCE

+
  SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
+                                         !  list identifier 
+    LOGICAL, INTENT(OUT) :: flag         ! .TRUE. if all filters are available
+                                         ! .FALSE. otherwise
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pclose_class_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pclose_class_f 
+
+

PURPOSE

+
  Closes an existing property list class.
+
+

INPUTS

+
  class        - Property list class identifier
+
+

OUTPUTS

+
  hdferr       - error code         
+                  Success: 0 
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pclose_class_f(class, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code
+                                        ! 0 on success and -1 on failure
+
+ +
+ +

h5pclose_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pclose_f 
+
+

PURPOSE

+
  Terminates access to a property list. 
+
+

INPUTS

+
  prp_id - identifier of the property list to 
+           terminate access to. 
+
+

OUTPUTS

+
  hdferr - error code          
+           Success:  0
+           Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pclose_f(prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pcopy_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pcopy_f 
+
+

PURPOSE

+
  Copies an existing property list to create a new 
+  property list
+
+

INPUTS

+
  prp_id       - property list identifier
+
+

OUTPUTS

+
  new_prp_id   - new property list identifier
+  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001
+
+

SOURCE

+
  SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
+    INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              ! 0 on success and -1 on failure
+
+ +
+ +

h5pcopy_prop_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pcopy_prop_f 
+
+

PURPOSE

+
  Copies a property from one list or class to another.
+
+

INPUTS

+
  dst_id               - Identifier of the destination property list
+  src_id               - Identifier of the source property list 
+  name                 - name of the property to copy
+
+

OUTPUTS

+
  hdferr:              - error code
+                          Success: 0 
+                          Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dst_id  ! Destination property list 
+                                          ! identifier 
+    INTEGER(HID_T), INTENT(IN) :: src_id  ! Source property list identifier 
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Property name
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pcreate_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pcreate_f 
+
+

PURPOSE

+
       Creates a new property as an instance of a property 
+       list class.
+
+

INPUTS

+
  class  - type of the property class to be created.
+           Possible values are:
+             H5P_FILE_CREATE_F
+             H5P_FILE_ACCESS_F
+             H5P_DATASET_CREATE_F
+             H5P_DATASET_XFER_F
+             H5P_FILE_MOUNT_F
+
+

OUTPUTS

+
  prp_id - property list identifier
+  hdferr - error code          
+            Success:  0
+            Failure: -1 
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pcreate_f(class, prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class   ! The type of the property list 
+                                          ! to be created. Possible values are: 
+                                          !  H5P_FILE_CREATE_F
+                                          !  H5P_FILE_ACCESS_F
+                                          !  H5P_DATASET_CREATE_F
+                                          !  H5P_DATASET_XFER_F
+                                          !  H5P_FILE_MOUNT_F
+    INTEGER(HID_T), INTENT(OUT) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pequal_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pequal_f 
+
+

PURPOSE

+
  Checks if two property lists are eqaul
+
+

INPUTS

+
  plist1_id    - property list identifier
+  plist2_id    - property list identifier
+
+

OUTPUTS

+
  flag         - flag, possible values
+                   .TRUE. or .FALSE.
+  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1, flag is set to .FALSE.   
+
+

AUTHOR

+
  Elena Pourmal
+  September 30, 2002   
+
+

SOURCE

+
  SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier 
+    INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier 
+    LOGICAL, INTENT(OUT)       :: flag      ! Flag
+    INTEGER, INTENT(OUT)       :: hdferr    ! Error code
+                                            !  0 on success and -1 on failure
+
+ +
+ +

h5pexist_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pexist_f 
+
+

PURPOSE

+
  Queries whether a property name exists in a property list or class. 
+
+

INPUTS

+
  prp_id       - property list identifier to query
+  name         - name of property to check for
+
+

OUTPUTS

+
  flag         - logical flag
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
+    LOGICAL, INTENT(OUT) :: flag          ! .TRUE. if exists, .FALSE. otherwise
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5pfill_value_defined_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pfill_value_defined_f
+
+

PURPOSE

+
  Check if fill value is defined.
+
+

INPUTS

+
  plist_id     - dataset creation property list identifier
+
+

OUTPUTS

+
  flag         - fill value status flag
+                 Possible values are:
+                   H5D_FILL_VALUE_ERROR_F
+                   H5D_FILL_VALUE_UNDEFINED_F
+                   H5D_FILL_VALUE_DEFAULT_F
+                   H5D_FILL_VALUE_USER_DEFINED_F
+  hdferr       - error code            
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 4, 2002
+
+

SOURCE

+
  SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
+    INTEGER, INTENT(OUT) :: flag            ! Fill value status flag
+                                            !  H5D_FILL_VALUE_ERROR_F
+                                            !  H5D_FILL_VALUE_UNDEFINED_F
+                                            !  H5D_FILL_VALUE_DEFAULT_F
+                                            !  H5D_FILL_VALUE_USER_DEFINED_F
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_alignment_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_alignment_f 
+
+

PURPOSE

+
  Retrieves the current settings for alignment 
+  properties from a file access property list. 
+
+

INPUTS

+
  prp_id       - file access property list identifier
+
+

OUTPUTS

+
  threshold    - threshold value       
+  alignment    - alignment value
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_alignment_f(prp_id, threshold,  alignment, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value
+    INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                             ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_alloc_time_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_alloc_time_f
+
+

PURPOSE

+
  Get space allocation time for dataset during creation.
+
+

INPUTS

+
  plist_id     - dataset creation property list identifier
+
+

OUTPUTS

+
  flag         - allocation time flag:
+                   H5D_ALLOC_TIME_ERROR_F
+                   H5D_ALLOC_TIME_DEFAULT_F
+                   H5D_ALLOC_TIME_EARLY_F
+                   H5D_ALLOC_TIME_LATE_F
+                   H5D_ALLOC_TIME_INCR_F
+  hdferr:      - error code            
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 4, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
+    INTEGER, INTENT(OUT) :: flag   ! Allocation time flag:
+                                   !  H5D_ALLOC_TIME_ERROR_F
+                                   !  H5D_ALLOC_TIME_DEFAULT_F
+                                   !  H5D_ALLOC_TIME_EARLY_F
+                                   !  H5D_ALLOC_TIME_LATE_F
+                                   !  H5D_ALLOC_TIME_INCR_F
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+                                   ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_attr_creation_order_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_attr_creation_order_f
+
+

PURPOSE

+
  Retrieves tracking and indexing settings for attribute creation order
+
+

INPUTS

+
  ocpl_id         - Object (group or dataset) creation property list identifier
+
+

OUTPUTS

+
  crt_order_flags - Flags specifying whether to track and index attribute creation order
+  hdferr          - Error code         
+                       Success:  0
+                       Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (group or dataset) creation property list identifier 
+    INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order 
+    INTEGER, INTENT(OUT) :: hdferr   ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_attr_phase_change_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_attr_phase_change_f 
+
+

PURPOSE

+
  Retrieves attribute storage phase change thresholds 
+
+

INPUTS

+
  ocpl_id         - Object (dataset or group) creation property list identifier
+
+

OUTPUTS

+
  max_compact     - Maximum number of attributes to be stored in compact storage
+                    (Default: 8)
+  min_dense       - Minimum number of attributes to be stored in dense storage
+                    (Default: 6)
+  hdferr          - Error code         
+                     Success:  0
+                     Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
+    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
+                                          ! (Default: 8)
+    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
+                                          ! (Default: 6)
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_btree_ratios_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_btree_ratios_f
+
+

PURPOSE

+
  Gets B-tree split ratios for a dataset transfer property list
+
+

INPUTS

+
  prp_id       - the dataset transfer property list 
+                 identifier 
+
+

OUTPUTS

+
  left         - the B-tree split ratio for left-most nodes 
+  middle       - the B-tree split ratio for all other nodes
+  right        - the B-tree split ratio for right-most nodes
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    REAL, INTENT(OUT) :: left   ! The B-tree split ratio for left-most nodes.
+    REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes 
+    REAL, INTENT(OUT) :: right  ! The B-tree split ratio for right-most 
+                                !  nodes and lone nodes.
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_buffer_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_buffer_f 
+
+

PURPOSE

+
  Gets size for conversion buffer
+
+

INPUTS

+
  plist_id     - data transfer property list identifier
+
+

OUTPUTS

+
  size         - buffer size 
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 2, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Buffer size in bytes; 
+                                           !  buffer is allocated and freed by 
+                                           !  the library.
+    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_cache_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_cache_f 
+
+

PURPOSE

+
  Queries the meta data cache and raw data chunk cache 
+  parameters.  
+
+

INPUTS

+
  prp_id       - file access property list identifier
+
+

OUTPUTS

+
  mdc_nelmts   - number of elements (objects) in the meta 
+                 data cache 
+  rdcc_nelmts  - number of elements (objects) in the raw 
+                 data chunk cache 
+  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
+  rdcc_w0      - preemption policy (0 or 1)
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+  Bug fix: type of the rdcc_nelmts parameter should be INTEGER
+  instead of INTEGER(SIZE_T) October 10, 2003 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: mdc_nelmts   ! Number of elements (objects)
+                                         !  in the meta data cache
+    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts  ! Number of elements (objects)
+                                                 !  in the meta data cache
+    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes  ! Total size of the raw data 
+                                                 !  chunk cache, in bytes 
+    REAL, INTENT(OUT) :: rdcc_w0                 ! Preemption policy
+    INTEGER, INTENT(OUT) :: hdferr               ! Error code
+                                                 ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_char_encoding_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_char_encoding_f
+
+

PURPOSE

+
  Retrieves the character encoding used to create a string
+
+

INPUTS

+
  plist_id - Property list identifier
+
+

OUTPUTS

+
  encoding - Valid values for encoding are:
+               H5T_CSET_ASCII_F -> US ASCII
+               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+  hdferr   - Error code                
+               Success:  0
+               Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

SOURCE

+
  SUBROUTINE  h5pget_char_encoding_f(plist_id, encoding, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
+
+    INTEGER, INTENT(OUT) :: encoding       ! Valid values for encoding are:
+                                           !  H5T_CSET_ASCII_F -> US ASCII
+                                           !  H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
+    INTEGER, INTENT(OUT) :: hdferr   ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_chunk_cache_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_chunk_cache_f
+
+

PURPOSE

+
  Retrieves the maximum possible number of elements in the meta
+  data cache and the maximum possible number of elements and
+  bytes and the RDCC_W0 value in the raw data chunk cache.  Any
+  (or all) arguments may be null pointers in which case the
+  corresponding datum is not returned.  If these properties have
+  not been set on this property list, the default values for a
+  file access property list are returned.
+
+

INPUTS

+
  dapl_id            - Dataset access property list identifier.
+
+

OUTPUTS

+
  rdcc_nslots        - Number of chunk slots in the raw data chunk cache hash table. 
+  rdcc_nbytes        - Total size of the raw data chunk cache, in bytes. 
+  rdcc_w0            - Preemption policy. 
+  hdferr             - Error code              
+                        Success:  0
+                        Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 13, 2009
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dapl_id       ! Dataset access property list identifier.
+    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table.
+    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. 
+    REAL, INTENT(OUT) :: rdcc_w0                ! Preemption policy.
+    INTEGER, INTENT(OUT) :: hdferr              ! Error code:
+                                                ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_chunk_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_chunk_f 
+
+

PURPOSE

+
  Retrieves the size of chunks for the raw data of a 
+  chunked layout dataset
+
+

INPUTS

+
  prp_id       - property list identifier
+  ndims        - size of dims array
+
+

OUTPUTS

+
  dims         - array with dimension sizes for each chunk
+  hdferr       - error code            
+                  Success:  number of chunk dimensions
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions to
+                                         ! to return
+    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims    
+                                         ! Array containing sizes of
+                                         ! chunk dimensions
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         !  number of chunk dimensions on success,
+                                         !  -1 on failure
+
+ +
+ +

h5pget_class_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_class_f 
+
+

PURPOSE

+
  Returns the property list class for a property list.
+
+

INPUTS

+
  prp_id       - property list identifier
+
+

OUTPUTS

+
  classtype    - property list class
+                 Possible values are:
+                  H5P_ROOT_F
+                  H5P_FILE_CREATE_F
+                  H5P_FILE_ACCESS_F
+                  H5PE_DATASET_CREATE_F
+                  H5P_DATASET_XFER_F
+                  H5P_FILE_MOUNT_F
+  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1 
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: classtype    ! The type of the property list 
+                                         ! to be created. Possible values are: 
+                                         !  H5P_ROOT_F
+                                         !  H5P_FILE_CREATE_F
+                                         !  H5P_FILE_ACCESS_F
+                                         !  H5PE_DATASET_CREATE_F 
+                                         !  H5P_DATASET_XFER_F
+                                         !  H5P_FILE_MOUNT_F
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_class_name_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_class_name_f 
+
+

PURPOSE

+
  Queries the name of a class.
+
+

INPUTS

+
  prp_id       - property list identifier to query
+
+

OUTPUTS

+
  name         - name of a class
+  size         - Actual length of the class name
+                   NOTE: If provided buffer "name" is smaller,
+                   than name will be truncated to fit into
+                   provided user buffer
+  hdferr:      - error code
+                  Success: 0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

HISTORY

+
 Returned the size of name as an argument      
+
+

SOURCE

+
  SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
+    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name
+    INTEGER, INTENT(OUT) :: size          ! Actual length of the class name
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_class_parent_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_class_parent_f 
+
+

PURPOSE

+
  Retrieves the parent class of a genric property class. 
+
+

INPUTS

+
  prp_id       - property list identifier to query
+
+

OUTPUTS

+
  parent_id    - identifier of the parent class
+  hdferr:      - error code          
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
+    INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list 
+                                             ! identifier 
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_copy_object_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_copy_object_f 
+
+

PURPOSE

+
  Retrieves the properties to be used when an object is copied.
+
+

INPUTS

+
  ocp_plist_id - Object copy property list identifier
+
+

OUTPUTS

+
  copy_options - Copy option(s) to be get
+  hdferr       - Error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
+    INTEGER, INTENT(OUT) :: copy_options       ! Valid copy options returned are:
+                                               !   H5O_COPY_SHALLOW_HIERARCHY_F
+                                               !   H5O_COPY_EXPAND_SOFT_LINK_F 
+                                               !   H5O_COPY_EXPAND_EXT_LINK_F
+                                               !   H5O_COPY_EXPAND_REFERENCE_F
+                                               !   H5O_COPY_WITHOUT_ATTR_FLAG_F
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_create_inter_group_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_create_inter_group_f
+
+

PURPOSE

+
  Determines whether property is set to enable creating missing intermediate groups.
+
+

INPUTS

+
  lcpl_id            - Link creation property list identifier
+  crt_intermed_group - Specifying whether to create intermediate groups upon 
+                       the creation of an object
+
+

OUTPUTS

+
  hdferr             - Error code              
+                        Success:  0
+                        Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 4, 2008
+
+

HISTORY

+
 The long subroutine name (>31) on older f90 compilers causes problems
+          so the name was shortened
+
+

SOURCE

+
  SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
+    INTEGER, INTENT(IN) :: crt_intermed_group  ! Flag specifying whether to create intermediate groups
+                                               ! upon creation of an object
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_data_transform_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_data_transform_f 
+
+

PURPOSE

+
  Retrieves a data transform expression.
+
+

INPUTS

+
  plist_id   - Identifier of the property list or class
+
+

OUTPUTS

+
  expression - buffer to hold transform expression
+  hdferr     - Error code
+                 Success:  Actual lenght of the expression
+                           If provided buffer "expression" is 
+                           smaller, than expression will be 
+                           truncated to fit into
+                           provided user buffer
+                 Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 19, 2008
+
+

HISTORY

+
 Should hdferr return just 0 or 1 and add another arguement for the size?
+
+

SOURCE

+
SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id         ! Identifier of the property list or class
+    CHARACTER(LEN=*), INTENT(OUT) :: expression    ! Buffer to hold transform expression
+    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression
+    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
+                                                   !  0 on success and -1 on failure
+
+ +
+ +

h5pget_driver_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_driver_f 
+
+

PURPOSE

+
  Returns low-lever driver identifier. 
+
+

INPUTS

+
  prp_id  - file access or data transfer property 
+            list identifier. 
+
+

OUTPUTS

+
  driver  - low-level driver identifier
+  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
+    INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_edc_check_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_edc_check_f 
+
+

PURPOSE

+
  Queries error detecting  
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  March 13, 2003
+
+

SOURCE

+
  SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier 
+    INTEGER, INTENT(OUT) :: flag         ! Checksum filter flag
+                                         ! May have one of the following values:
+                                         !  H5Z_ERROR_EDC_F
+                                         !  H5Z_DISABLE_EDC_F
+                                         !  H5Z_ENABLE_EDC_F
+                                         !  H5Z_NO_EDC_F
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_est_link_info_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_est_link_info_f 
+
+

PURPOSE

+
  Queries data required to estimate required local heap or object header size.
+
+

INPUTS

+
  gcpl_id         - Group creation property list identifier
+
+

OUTPUTS

+
  est_num_entries - Estimated number of links to be inserted into group
+  est_name_len    - Estimated average length of link names
+  hdferr          - Error code
+                     Success:  0
+                     Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier  
+    INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group
+    INTEGER, INTENT(OUT) :: est_name_len    ! Estimated average length of link names
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_external_count_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_external_count_f 
+
+

PURPOSE

+
  Returns the number of external files for a dataset. 
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+
+

OUTPUTS

+
  count        - number of external files for the 
+                 specified dataset
+  hdferr       - error code            
+                   Success:  0
+                   Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: count        ! Number of external files for the 
+                                         ! Specified dataset
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_external_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_external_f 
+
+

PURPOSE

+
  Returns information about an external file. 
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+
+

OUTPUTS

+
  idx          - external file index 
+  name_size    - maximum size of name array
+  name         - name of the external file     
+  name         - name of external file
+  offset       - offset in bytes from the beginning of the 
+                 file to the location in the file
+                 where the data starts
+  bytes        - size of the external file data
+  hdferr       - error code            
+                  Success:  0
+                   Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    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 
+                                             !  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 
+                                             !  file for the data
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+                                             ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fapl_core_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_fapl_core_f 
+
+

PURPOSE

+
  Queries core file driver properties. 
+
+

INPUTS

+
  prp_id        - file access property list identifier
+
+

OUTPUTS

+
  increment     - size, in bytes, of memory increments 
+  backing_store - boolean flag indicating whether to write 
+                  the file contents to disk when the file is closed. 
+  hdferr        - error code           
+                   Success:  0
+                   Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
+    INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes.
+    LOGICAL, INTENT(OUT) :: backing_store   ! Flag to indicate that
+                                            ! entire file contents are flushed to a file 
+                                            ! with the same name as this core file.
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fapl_direct_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_fapl_direct_f
+
+

PURPOSE

+
  Gets up use of the direct I/O driver.
+
+

INPUTS

+
  fapl_id      - File access property list identifier
+
+

OUTPUTS

+
  alignment    - Required memory alignment boundary
+  block_size   - File system block size
+  cbuf_size    - Copy buffer size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
+    IMPLICIT NONE  
+    INTEGER(HID_T), INTENT(IN) :: fapl_id       ! File access property list identifier
+    INTEGER(SIZE_T), INTENT(OUT) :: alignment   ! Required memory alignment boundary!
+    INTEGER(SIZE_T), INTENT(OUT) :: block_size  ! File system block size
+    INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size   ! Copy buffer size
+    INTEGER, INTENT(OUT) :: hdferr              ! Error code
+                                                ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fapl_family_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_fapl_family_f 
+
+

PURPOSE

+
  Returns file access property list information.       
+
+

INPUTS

+
  prp_id       - file access property list identifier
+
+

OUTPUTS

+
  memb_size    - size in bytes of each file member 
+  memb_plist   - identifier of the file access property 
+                 list to be used for each family member
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes,
+                                               ! of each family member
+    INTEGER(HID_T), INTENT(OUT) :: memb_plist  ! Identifier of the file 
+                                               ! access property list for 
+                                               ! each member of the family
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fapl_multi_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_fapl_multi_f 
+
+

PURPOSE

+
  Sets up use of the multi-file driver. 
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+
+

OUTPUTS

+
  mem_map      - mapping array
+  memb_fapl    - property list for each memory usage type
+  memb_name    - names of member file
+  relax        - flag 
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

OPTIONAL PARAMETERS

+
  maxlen_out   - maximum length for memb_name array element 
+
+

AUTHOR

+
  Elena Pourmal
+  24 March 2003
+
+

SOURCE

+
  SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
+    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map
+    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl
+    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name
+    !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
+    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
+    INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out 
+    LOGICAL, INTENT(OUT) :: relax
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fclose_degree_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_fclose_degree_f 
+
+

PURPOSE

+
  Returns the degree for the file close behavior.
+
+

INPUTS

+
  fapl_id      - File access property list identifier
+
+

OUTPUTS

+
  degree       - Possible values are:
+                  H5F_CLOSE_DEFAULT_F
+                  H5F_CLOSE_WEAK_F
+                  H5F_CLOSE_SEMI_F
+                  H5F_CLOSE_STRONG_F
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  September 26, 2002   
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
+    INTEGER, INTENT(OUT) :: degree        ! Possible values are: 
+                                          !  H5F_CLOSE_DEFAULT_F
+                                          !  H5F_CLOSE_WEAK_F
+                                          !  H5F_CLOSE_SEMI_F
+                                          !  H5F_CLOSE_STRONG_F
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_fill_time_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_fill_time_f
+
+

PURPOSE

+
  Get fill value writing time for dataset
+
+

INPUTS

+
  plist_id     - dataset creation property list identifier
+
+

OUTPUTS

+
  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1
+
+

OPTIONAL PARAMETERS

+
  flag         - fill time flag:
+                  H5D_FILL_TIME_ERROR_F
+                  H5D_FILL_TIME_ALLOC_F
+                  H5D_FILL_TIME_NEVER_F
+
+

AUTHOR

+
  Elena Pourmal
+  October 4, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
+    INTEGER, INTENT(OUT) :: flag   ! Fill time flag:
+                                   !  H5D_FILL_TIME_ERROR_F
+                                   !  H5D_FILL_TIME_ALLOC_F
+                                   !  H5D_FILL_TIME_NEVER_F
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+                                   ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_filter_by_id_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_filter_by_id_f 
+
+

PURPOSE

+
  Returns information about a filter in a pipeline
+
+

INPUTS

+
  prp_id       - data creation or transfer property list 
+                 identifier
+
+

OUTPUTS

+
  filter_id    - filter identifier
+  flags        - bit vector specifying certain general
+                 properties of the filter
+  cd_nelmts    - number of elements in cd_values
+  cd_values    - auxiliary data for the filter
+  namelen      - number of characters in the name buffer
+  name         - buffer to retrieve filter name
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  April 10 2003
+
+

SOURCE

+
  SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
+    INTEGER, INTENT(IN) :: filter_id       ! Filter identifier
+    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts     ! Number of elements in cd_values.
+    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter.
+    INTEGER, INTENT(OUT) :: flags          ! Bit vector specifying certain general
+                                           ! properties of the filter.
+    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name.
+    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Name of the filter
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_filter_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_filter_f 
+
+

PURPOSE

+
  Returns information about a filter in a pipeline
+
+

INPUTS

+
  prp_id        - data creation or transfer property list 
+                  identifier
+  filter_number - sequence number within the filter
+                  pipeline of the filter for which 
+                  information is sought
+
+

OUTPUTS

+
  filter_id    - filter identification number
+  flags        - bit vector specifying certain general
+                 properties of the filter
+  cd_nelmts    - number of elements in cd_values
+  cd_values    - auxiliary data for the filter
+  namelen      - number of characters in the name buffer
+  name         - buffer to retrieve filter name
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter
+                                         !  pipeline of the filter for which 
+                                         !  information is sought
+    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values  ! Auxiliary data for the filter.
+    INTEGER, INTENT(OUT) :: flags        ! Bit vector specifying certain general
+                                         !  properties of the filter.
+    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts  ! Number of elements in cd_values.
+    INTEGER(SIZE_T), INTENT(IN) :: namelen       ! Anticipated number of characters in name.
+    CHARACTER(LEN=*), INTENT(OUT) :: name        ! Name of the filter
+    INTEGER, INTENT(OUT) :: filter_id            ! Filter identification number  
+    INTEGER, INTENT(OUT) :: hdferr               ! Error code
+                                                 ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_gc_references_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_gc_references_f 
+
+

PURPOSE

+
  Returns garbage collecting references setting.       
+
+

INPUTS

+
  prp_id       - file access property list identifier
+
+

OUTPUTS

+
  gc_reference - flag for stting garbage collection on 
+                 and off (1 or 0)
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting
+                                         !  references for the file
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_istore_k_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_istore_k_f 
+
+

PURPOSE

+
  Queries the 1/2 rank of an indexed storage B-tree. 
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+
+

OUTPUTS

+
  ik           - 1/2 rank of chunked storage B-tree
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: ik           ! 1/2 rank of chunked storage B-tree
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_layout_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_layout_f 
+
+

PURPOSE

+
  Returns the layout of the raw data for a dataset. 
+
+

INPUTS

+
  prp_id       - data creation property list identifier
+
+

OUTPUTS

+
  layout       - type of storage layout for raw data
+                 possible values are:
+                  H5D_COMPACT_F
+                  H5D_CONTIGUOUS_F
+                  H5D_CHUNKED_F
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: layout       ! Type of storage layout for raw data
+                                         ! possible values are:
+                                         !  H5D_COMPACT_F(0)
+                                         !  H5D_CONTIGUOUS_F(1)
+                                         !  H5D_CHUNKED_F(2)
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_link_creation_order_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_link_creation_order_f
+
+

PURPOSE

+
  Queries whether link creation order is tracked and/or indexed in a group.
+
+

INPUTS

+
  gcpl_id - Group creation property list identifier
+
+

OUTPUTS

+
  crt_order_flags - Creation order flag(s)
+  hdferr          - Error code         
+                     Success:  0
+                     Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier
+    INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s)
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_link_phase_change_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_link_phase_change_f
+
+

PURPOSE

+
  Queries the settings for conversion between compact and dense groups.
+
+

INPUTS

+
  gcpl_id      - Group creation property list identifier
+
+

OUTPUTS

+
  max_compact  - Maximum number of attributes to be stored in compact storage
+  min_dense    - Minimum number of attributes to be stored in dense storage
+  hdferr       - Error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 20, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
+    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
+    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_local_heap_size_hint_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_local_heap_size_hint_f 
+
+

PURPOSE

+
  Queries the local heap size hint for original-style groups.
+
+

INPUTS

+
  gcpl_id   - Group creation property list identifier
+
+

OUTPUTS

+
  size_hint - Hint for size of local heap
+  hdferr    - Error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id     ! Group creation property list identifier
+    INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_meta_block_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_meta_block_size_f 
+
+

PURPOSE

+
  Gets the minimum size of metadata block allocations 
+
+

INPUTS

+
  plist_id     - file access property list identifier
+
+

OUTPUTS

+
  size         - metatdata block size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Block size in bytes; 
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_nfilters_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_nfilters_f 
+
+

PURPOSE

+
  Returns the number of filters in the pipeline. 
+
+

INPUTS

+
  prp_id       - data creation or transfer property list 
+                 identifier
+
+

OUTPUTS

+
  nfilters     - number of filters in the pipeline
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: nfilters     ! The number of filters in the pipeline
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_nlinks_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_nlinks_f 
+
+

PURPOSE

+
  Gets maximum number of soft or user-defined link traversals.
+
+

INPUTS

+
  lapl_id - File access property list identifier
+  nlinks  - Maximum number of links to traverse
+
+

OUTPUTS

+
  hdferr  - error code
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 24, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: lapl_id  ! File access property list identifier
+    INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_npros_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_npros_f 
+
+

PURPOSE

+
  Queries number of properties in property list or class
+
+

INPUTS

+
  prp_id       - iproperty list identifier to query
+
+

OUTPUTS

+
  nprops       - number of properties in property object
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier 
+    INTEGER(SIZE_T), INTENT(OUT) :: nprops  ! Number of properties
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

H5Pget_obj_track_times_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pget_obj_track_times_f 
+
+

PURPOSE

+
  Returns whether times are tracked for an object.
+
+

INPUTS

+
  plist_id     - property list id
+  flag         - object timestamp setting
+                 .TRUE.,.FALSE.
+
+

OUTPUTS

+
  hdferr       - error code            
+                 Success:  0
+                 Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 22, 2008
+
+

SOURCE

+
  SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property 
+                                           ! list identifier 
+    LOGICAL, INTENT(OUT) :: flag   ! Object timestamp setting
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+                                   ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_preserve_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_preserve_f 
+
+

PURPOSE

+
  Checks status of the dataset transfer property list.
+
+

INPUTS

+
  prp_id  - property list identifier
+
+

OUTPUTS

+
  flag    - status flag
+  hdferr  - error code         
+       Success:  0
+       Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001
+ 
+  Datatype of the flag parameter is changed from 
+  INTEGER to LOGICAL 
+  June 4, 2003 
+
+

SOURCE

+
  SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    LOGICAL, INTENT(OUT) ::  flag        ! TRUE/FALSE flag. Shows status of the dataset's
+                                         ! transfer property for partial writing/reading
+                                         ! compound datatype
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_sec2_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_sec2_f 
+
+

PURPOSE

+
  NOT AVAILABLE
+
+

INPUTS

+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+ SOURCE!          SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) 
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+            INTEGER, INTENT(OUT) :: sec2   ! value indicates whether the file
+            INTEGER, INTENT(OUT) :: hdferr  ! Error code
+ 0 on success and -1 on failure
+
+ +
+ +

h5pget_sieve_buf_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_sieve_buf_size_f 
+
+

PURPOSE

+
  Gets the maximum size of the data sieve buffer
+
+

INPUTS

+
  plist_id     - file access property list identifier
+
+

OUTPUTS

+
  size         - sieve buffer size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
+    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Buffer size in bytes 
+    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_size_f 
+
+

PURPOSE

+
  Queries the size of a property value in bytes.
+
+

INPUTS

+
  prp_id       - property list identifier to query
+  name         - name of property to query
+
+

OUTPUTS

+
  size         - size of property in bytes
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
+    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to query
+    INTEGER(SIZE_T), INTENT(OUT) :: size  ! Size in bytes
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_sizes_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_sizes_f 
+
+

PURPOSE

+
  Retrieves the size of the offsets and lengths used 
+  in an HDF5 file
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+
+

OUTPUTS

+
  sizeof_addr  - size of an object offset in bytes 
+  sizeof_size  - size of an object length in bytes
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
+    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object
+                                                ! offset in bytes 
+    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object
+                                                ! length in bytes 
+    INTEGER, INTENT(OUT) :: hdferr              ! Error code
+                                                ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_small_data_block_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_small_data_block_size_f 
+
+

PURPOSE

+
  Gets the minimum size of "small" raw data block
+
+

INPUTS

+
  plist_id     - file access property list identifier
+
+

OUTPUTS

+
  size         - small raw data block size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Small raw data block size
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_split_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pget_split_f 
+
+

PURPOSE

+
  NOT AVAILABLE
+
+

INPUTS

+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
!          SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,&
+!                                     raw_ext, raw_plist, hdferr)
+!            IMPLICIT NONE
+!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+!            INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta
+                                                         ! file extension to be copied to the
+                                                         ! meta_ext buffer
+
+!            CHARACTER(LEN=*), INTENT(OUT) :: meta_ext  !Name of the extension for
+                                                      !the metafile filename
+!            INTEGER(HID_T), INTENT(OUT) :: meta_plist  ! Identifier of the meta file
+                                                      ! access property list
+!            INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw
+                                                         ! file extension to be copied to the
+                                                         ! raw_ext buffer
+!            CHARACTER(LEN=*), INTENT(OUT) :: raw_ext  !Name extension for the raw file filename
+!            INTEGER(HID_T), INTENT(OUT) :: raw_plist  !Identifier of the raw file
+                                                     !access property list
+!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_stdio_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_stdio_f 
+
+

PURPOSE

+
  NOT AVAILABLE
+
+

INPUTS

+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
!          SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr)
+!
+!            IMPLICIT NONE
+!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+!            INTEGER, INTENT(OUT) :: io   ! value indicates that the file
+                                         !access property list is set to
+                                         !the stdio driver
+!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_sym_k_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_sym_k_f 
+
+

PURPOSE

+
  Retrieves the size of the symbol table B-tree 1/2 rank
+  and the symbol table leaf node 1/2 size. 
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+
+

OUTPUTS

+
  ik           - symbol table tree 1/2 rank
+  lk           - symbol table node 1/2 size
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: ik           ! Symbol table tree rank
+    INTEGER, INTENT(OUT) :: lk           ! Symbol table node size
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_userblock_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_userblock_f 
+
+

PURPOSE

+
  Gets user block size.
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+
+

OUTPUTS

+
  block_size   - size of the user block in bytes
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id         ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(OUT) ::  block_size ! Size of the 
+                                                 ! user-block in bytes 
+    INTEGER, INTENT(OUT) :: hdferr               ! Error code
+                                                 ! 0 on success and -1 on failure
+
+ +
+ +

h5pget_version_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pget_version_f 
+
+

PURPOSE

+
  Retrieves the version information of various objects 
+  for a file creation property list
+
+

INPUTS

+
  prp_id       - file createion property list identifier
+
+

OUTPUTS

+
  boot         - super block version number
+  freelist     - global freelist version number
+  stab         - symbol table version number
+  shhdr        - shared object header version number
+  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pget_version_f(prp_id, boot, freelist, &
+       stab, shhdr, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
+    INTEGER, DIMENSION(:), INTENT(OUT) :: boot  ! Array to put boot
+                                                ! block version number
+    INTEGER, DIMENSION(:), INTENT(OUT) :: freelist  ! Array to put global
+                                                    ! Freelist version number
+
+    INTEGER, DIMENSION(:), INTENT(OUT) :: stab  ! Array to put symbol
+                                                ! table version number
+    INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared
+                                                ! object header version number
+    INTEGER, INTENT(OUT) :: hdferr              ! Error code
+                                                ! 0 on success and -1 on failure
+
+ +
+ +

h5pisa_class_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pisa_class_f 
+
+

PURPOSE

+
  Determines whether a property list is a member of a class. 
+
+

INPUTS

+
  plist        - property list identifier 
+  pclass       - identifier of the property class
+
+

OUTPUTS

+
  flag         - .TRUE. if a member, .FALSE. otherwise
+  hdferr:      - error code           
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist     ! Property list identifier 
+    INTEGER(HID_T), INTENT(IN) :: pclass    ! Class identifier
+    LOGICAL, INTENT(OUT) :: flag            ! logical flag
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5pmodify_filter_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pmodify_filter_f 
+
+

PURPOSE

+
  Adds a filter to the filter pipeline. 
+
+

INPUTS

+
  prp_id       - data creation or transfer property list 
+                 identifier
+  filter       - filter to be modified
+  flags        - bit vector specifying certain general
+                 properties of the filter
+  cd_nelmts    - number of elements in cd_values
+  cd_values    - auxiliary data for the filter
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  April 10 2003
+
+

SOURCE

+
  SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: filter        ! Filter to be modified
+    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
+                                         !  properties of the filter
+    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values
+    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5premove_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5premove_f 
+
+

PURPOSE

+
  Removes a property from a property list. 
+
+

INPUTS

+
  plid         - Property list identofoer
+  name         - name of the property to remove
+
+

OUTPUTS

+
  hdferr:      - error code
+                  Success: 0 
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5premove_f(plid, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plid   ! Property list identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         !  0 on success and -1 on failure
+
+ +
+ +

h5premove_filter_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5premove_filter_f 
+
+

PURPOSE

+
  Delete one or more filters from the filter pipeline. 
+
+

INPUTS

+
  prp_id       - data creation or transfer property list 
+                 identifier
+  filter       - filter to be removed
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Quincey Koziol
+  January 27 2004
+
+

SOURCE

+
  SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list
+                                         ! identifier
+    INTEGER, INTENT(IN) :: filter        ! Filter to be removed
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_alignment_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_alignment_f 
+
+

PURPOSE

+
  Sets alignment properties of a file access property list. 
+
+

INPUTS

+
  prp_id       - file access property list identifier
+  threshold    - threshold value       
+  alignment    - alignment value
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_alignment_f(prp_id, threshold,  alignment, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value
+    INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_alloc_time_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_alloc_time_f
+
+

PURPOSE

+
  Set space allocation time for dataset during creation.
+
+

INPUTS

+
  plist_id     - dataset creation property list identifier
+  flag         - allocation time flag:
+                   H5D_ALLOC_TIME_ERROR_F
+                   H5D_ALLOC_TIME_DEFAULT_F
+                   H5D_ALLOC_TIME_EARLY_F
+                   H5D_ALLOC_TIME_LATE_F
+                   H5D_ALLOC_TIME_INCR_F
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 4, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
+    INTEGER, INTENT(IN) :: flag             ! Allocation time flag:
+                                            !  H5D_ALLOC_TIME_ERROR_F
+                                            !  H5D_ALLOC_TIME_DEFAULT_F
+                                            !  H5D_ALLOC_TIME_EARLY_F
+                                            !  H5D_ALLOC_TIME_LATE_F
+                                            !  H5D_ALLOC_TIME_INCR_F
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_attr_creation_order_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_attr_creation_order_f 
+
+

PURPOSE

+
  Sets tracking and indexing of attribute creation order
+
+

INPUTS

+
  ocpl_id         - Object creation property list identifier
+  crt_order_flags - Flags specifying whether to track and index attribute creation order
+
+

OUTPUTS

+
  hdferr          - Error code         
+                     Success:  0
+                     Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (dataset or group) creation property list identifier
+    INTEGER, INTENT(IN) :: crt_order_flags  ! Flags specifying whether to track and index attribute creation order
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_attr_phase_change_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_attr_phase_change_f 
+
+

PURPOSE

+
  Sets attribute storage phase change thresholds.
+
+

INPUTS

+
  ocpl_id - Object (dataset or group) creation property list identifier
+
+

OUTPUTS

+
  max_compact     - Maximum number of attributes to be stored in compact storage
+                    (Default: 8)
+  min_dense       - Minimum number of attributes to be stored in dense storage
+                    (Default: 6)
+  hdferr          - Error code         
+                     Success:  0
+                     Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
+    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
+                                          !(Default: 8)
+    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
+                                          ! (Default: 6)
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_btree_ratios_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_btree_ratios_f 
+
+

PURPOSE

+
  Sets B-tree split ratios for a dataset transfer 
+  property list. 
+
+

INPUTS

+
  prp_id       - the dataset transfer property list 
+                 identifier 
+  left         - the B-tree split ratio for left-most nodes 
+  middle       - the B-tree split ratio for all other nodes
+  right        - the B-tree split ratio for right-most nodes
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+    REAL, INTENT(IN) :: left   ! The B-tree split ratio for left-most nodes.
+    REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes 
+    REAL, INTENT(IN) :: right  ! The B-tree split ratio for right-most 
+                               !  nodes and lone nodes. 
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_buffer_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_buffer_f 
+
+

PURPOSE

+
  Sets sixe for conversion buffer
+
+

INPUTS

+
  plist_id     - data transfer property list identifier
+  size         - buffer size 
+
+

OUTPUTS

+
  hdferr:      - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 2, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Buffer size in bytes; 
+                                           ! buffer is allocated and freed by 
+                                           ! the library.
+    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_cache_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_cache_f 
+
+

PURPOSE

+
  Sets the meta data cache and raw data chunk 
+  cache parameters
+
+

INPUTS

+
  prp_id       - file access property list identifier
+  mdc_nelmts   - number of elements (objects) in the meta 
+                 data cache 
+  rdcc_nelmts  - number of elements (objects) in the raw 
+                 data chunk cache 
+  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
+  rdcc_w0      - preemption policy (0 or 1)
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: mdc_nelmts    ! Number of elements (objects)
+                                         !  in the meta data cache
+    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects)
+                                               !  in the meta data cache
+    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data 
+                                               !  chunk cache, in bytes 
+    REAL, INTENT(IN) :: rdcc_w0                ! Preemption policy
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               !  0 on success and -1 on failure
+
+ +
+ +

H5Pset_char_encoding_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_char_encoding_f
+
+

PURPOSE

+
  Sets the character encoding used to encode a string.
+
+

INPUTS

+
  plist_id - Property list identifier
+  encoding - Valid values for encoding are:
+               H5T_CSET_ASCII_F -> US ASCII
+               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+
+

OUTPUTS

+
  hdferr   - Error code                
+               Success:  0
+               Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
+    INTEGER, INTENT(IN) :: encoding        ! String encoding character set:
+                                           !   H5T_CSET_ASCII_F -> US ASCII
+                                           !   H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_chunk_cache_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_chunk_cache_f
+
+

PURPOSE

+
  Set the number of objects in the meta data cache and the
+  maximum number of chunks and bytes in the raw data chunk cache.
+  Once set, these values will override the values in the file access
+  property list.  Each of these values can be individually unset
+  (or not set at all) by passing the macros:
+    H5D_CHUNK_CACHE_NSLOTS_DFLT_F,
+    H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or
+    H5D_CHUNK_CACHE_W0_DFLT_F
+    as appropriate.
+
+  The RDCC_W0 value should be between 0 and 1 inclusive and
+  indicates how much chunks that have been fully read or fully
+  written are favored for preemption.  A value of zero means
+  fully read or written chunks are treated no differently than
+  other chunks (the preemption is strictly LRU) while a value
+  of one means fully read chunks are always preempted before
+  other chunks.
+
+

INPUTS

+
  dapl_id          - Dataset access property list identifier.
+  rdcc_nslots      - The number of chunk slots in the raw data chunk cache for this dataset.
+  rdcc_nbytes      - The total size of the raw data chunk cache for this dataset.
+  rdcc_w0          - The chunk preemption policy for this dataset.
+
+

OUTPUTS

+
  hdferr           - Error code                
+                       Success:  0
+                       Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 13, 2009
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dapl_id      ! Dataset access property list identifier.
+    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data 
+                                               ! chunk cache for this dataset.
+    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache 
+                                               ! for this dataset.
+    REAL, INTENT(IN) :: rdcc_w0                ! The chunk preemption policy for this dataset.
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_chunk_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_chunk_f 
+
+

PURPOSE

+
  Sets the size of the chunks used to store 
+  a chunked layout dataset. 
+
+

INPUTS

+
  prp_id  - datatset creation property list identifier
+  ndims   - number of dimensions for each chunk
+  dims    - array with dimension sizes for each chunk
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
   Explicit Fortran interfaces were added for 
+   called C functions (it is needed for Windows
+   port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions
+    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims    
+                                         ! Array containing sizes of
+                                         ! chunk dimensions
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_copy_object_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_copy_object_f 
+
+

PURPOSE

+
  Sets properties to be used when an object is copied.
+
+

INPUTS

+
  ocp_plist_id - Object copy property list identifier
+  copy_options - Copy option(s) to be set
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 3, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
+    INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are:
+                                        !   H5O_COPY_SHALLOW_HIERARCHY_F
+                                        !   H5O_COPY_EXPAND_SOFT_LINK_F
+                                        !   H5O_COPY_EXPAND_EXT_LINK_F
+                                        !   H5O_COPY_EXPAND_REFERENCE_F
+                                        !   H5O_COPY_WITHOUT_ATTR_FLAG_F
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code
+                                        ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_create_inter_group_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_create_inter_group_f
+
+

PURPOSE

+
  Specifies in property list whether to create missing intermediate groups.
+
+

INPUTS

+
  lcpl_id            - Link creation property list identifier
+  crt_intermed_group - crt_intermed_group specifying whether 
+                       to create intermediate groups upon the creation 
+                       of an object
+
+

OUTPUTS

+
  hdferr             - Error code              
+                         Success:  0
+                         Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 22, 2008
+
+

HISTORY

+
 The long subroutine name (>31) on older f90 compilers causes problems
+          so had to shorten the name
+
+

SOURCE

+
  SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
+    INTEGER, INTENT(IN) :: crt_intermed_group  ! specifying whether to create intermediate groups
+                                               ! upon the creation of an object
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+                                   ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_data_transform_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_data_transform_f 
+
+

PURPOSE

+
  Sets a data transform expression.
+
+

INPUTS

+
  plist_id   - Identifier of the property list or class 
+  expression - Buffer to hold transform expression
+
+

OUTPUTS

+
  hdferr     - error code
+                 Success:  0
+                 Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 19, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id     ! Identifier of the property list or class
+    CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_deflate_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_deflate_f 
+
+

PURPOSE

+
   Sets compression method and compression level. 
+
+

INPUTS

+
   prp_id  - property list identifier
+   level   - compression level
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
       Elena Pourmal
+               August 12, 1999
+
+

HISTORY

+
       Explicit Fortran interfaces were added for 
+                       called C functions (it is needed for Windows
+                       port).  March 14, 2001
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: level         ! Compression level 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_edc_check_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_edc_check_f 
+
+

PURPOSE

+
  Enables/disables error detecting  
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+  flag         - EDC flag; possible values:
+                   H5Z_DISABLE_EDC_F
+                   H5Z_ENABLE_EDC_F
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  March 13, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: flag          ! Checksum filter flag
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_est_link_info_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_est_link_info_f 
+
+

PURPOSE

+
  Sets estimated number of links and length of link names in a group.
+
+

INPUTS

+
 gcpl_id         - Group creation property list identifier  
+ est_num_entries - Estimated number of links to be inserted into group
+ est_name_len    - Estimated average length of link names
+
+

OUTPUTS

+
  hdferr         - Error code
+                    Success:  0
+                    Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! Group creation property list identifier  
+    INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group
+    INTEGER, INTENT(IN) :: est_name_len    ! Estimated average length of link names
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_external_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_external_f 
+
+

PURPOSE

+
  Adds an external file to the list of external files. 
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+  name         - name of external file
+  offset       - offset in bytes from the beginning of the 
+                 file to the location in the file
+                 where the data starts
+  bytes        - size of the external file data. 
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  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 
+                                          !  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 
+                                          !  file for the data
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_core_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_fapl_core_f 
+
+

PURPOSE

+
  Modifies the file access property list to use the 
+  H5FD_CORE driver. 
+
+

INPUTS

+
  prp_id           - file access property list identifier
+  increment        - size, in bytes, of memory increments 
+  backing_store    - boolean flag indicating whether to write 
+                     the file contents to disk when the file is closed. 
+
+

OUTPUTS

+
  hdferr           - error code                
+                       Success:  0
+                       Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
+    INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes.
+    LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that
+                                         ! entire file contents are flushed to a file 
+                                         ! with the same name as this core file.
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_direct_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_direct_f
+
+

PURPOSE

+
  Sets up use of the direct I/O driver.
+
+

INPUTS

+
  fapl_id      - File access property list identifier
+  alignment    - Required memory alignment boundary
+  block_size   - File system block size
+  cbuf_size    - Copy buffer size
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
+    IMPLICIT NONE  
+    INTEGER(HID_T), INTENT(IN) :: fapl_id     ! File access property list identifier
+    INTEGER(SIZE_T), INTENT(IN) :: alignment  ! Required memory alignment boundary!
+    INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size
+    INTEGER(SIZE_T), INTENT(IN) :: cbuf_size  ! Copy buffer size
+    INTEGER, INTENT(OUT) :: hdferr            ! Error code
+                                              ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_multi_l

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_multi_l 
+
+

PURPOSE

+
  Sets up use of the multi-file driver. 
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+  mem_map      - mapping array
+  memb_fapl    - property list for each memory usage type
+  memb_name    - names of member file
+  relax        - flag 
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  20 March 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
+    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map ! Mapping array
+    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl ! Property list for each memory usage type
+    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name ! Names of member file
+    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr 
+    LOGICAL, INTENT(IN) :: relax     ! Flag
+    INTEGER, INTENT(OUT) :: hdferr   ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_multi_s

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_multi_s 
+
+

PURPOSE

+
  Sets up use of the multi-file driver. 
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+  relax        - flag 
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  31 March 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
+    LOGICAL, INTENT(IN) :: relax
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_sec2_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_sec2_f 
+
+

PURPOSE

+
  Sets the sec2 driver. 
+
+

INPUTS

+
  prp_id  - file access property list identifier
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_split_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_fapl_split_f 
+
+

PURPOSE

+
  Emulates the old split file driver. 
+
+

INPUTS

+
  prp_id       - file access property list identifier
+  meta_ext     - name of the extension for the metafile 
+                 filename
+  meta_plist   - identifier of the meta file access property 
+                 list
+  raw_ext      - name extension for the raw file filename
+  raw_plist    - identifier of the raw file access property list
+
+

OUTPUTS

+
  hdferr       - error code            
+                   Success:  0
+                   Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
+    CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for
+                                             !  the metafile filename
+    INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file
+                                             !  access property list
+    CHARACTER(LEN=*), INTENT(IN) :: raw_ext  ! Name extension for the raw file filename
+    INTEGER(HID_T), INTENT(IN) :: raw_plist  ! Identifier of the raw file 
+                                             !  access property list
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+                                             ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fapl_stdio_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fapl_stdio_f 
+
+

PURPOSE

+
  Sets the standard I/O driver. 
+
+

INPUTS

+
  prp_id  - file access property list identifier
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fclose_degree_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fclose_degree_f 
+
+

PURPOSE

+
  Sets the degree for the file close behavior.
+
+

INPUTS

+
  fapl_id      - file access property list identifier
+  degree       - Possible values are:
+                   H5F_CLOSE_DEFAULT_F
+                   H5F_CLOSE_WEAK_F
+                   H5F_CLOSE_SEMI_F
+                   H5F_CLOSE_STRONG_F
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  September 26, 2002   
+
+

SOURCE

+
  SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
+    INTEGER, INTENT(IN) :: degree         ! Possible values are: 
+                                          !  H5F_CLOSE_DEFAULT_F
+                                          !  H5F_CLOSE_WEAK_F
+                                          !  H5F_CLOSE_SEMI_F
+                                          !  H5F_CLOSE_STRONG_F
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fill_time_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fill_time_f
+
+

PURPOSE

+
  Set fill value writing time for dataset
+
+

INPUTS

+
  plist_id     - dataset creation property list identifier
+  flag         - fill time flag:
+                   H5D_FILL_TIME_ERROR_F
+                   H5D_FILL_TIME_ALLOC_F
+                   H5D_FILL_TIME_NEVER_F
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 4, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
+    INTEGER, INTENT(IN) :: flag             ! Fill time flag:
+                                            !  H5D_FILL_TIME_ERROR_F
+                                            !  H5D_FILL_TIME_ALLOC_F
+                                            !  H5D_FILL_TIME_NEVER_F
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+                                            ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_filter_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_filter_f 
+
+

PURPOSE

+
  Adds a filter to the filter pipeline. 
+
+

INPUTS

+
  prp_id       - data creation or transfer property list 
+                 identifier
+  filter       - filter to be added to the pipeline 
+  flags        - bit vector specifying certain general
+                 properties of the filter
+  cd_nelmts    - number of elements in cd_values
+  cd_values    - auxiliary data for the filter
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  February, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: filter        ! Filter to be added to the pipeline.
+    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
+                                       !  properties of the filter.
+    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values.
+    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter.
+    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
+                                                 ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_fletcher32_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_fletcher32_f 
+
+

PURPOSE

+
  Sets Fletcher32 checksum of EDC for a dataset creation 
+  property list.
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  March 13, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_gc_references_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_gc_references_f 
+
+

PURPOSE

+
  Sets garbage collecting references flag. 
+
+

INPUTS

+
  prp_id       - file access property list identifier
+  gc_reference - flag for stting garbage collection on 
+                 and off (1 or 0)
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: gc_reference  ! The flag for garbage collecting
+                                         !  references for the file
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_hyper_vector_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_hyper_vector_size_f 
+
+

PURPOSE

+
  Set the number of "I/O" vectors (vector size)
+
+

INPUTS

+
  plist_id     - dataset transfer property list identifier
+  size         - vector size
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Vector size
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_istore_k_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_istore_k_f 
+
+

PURPOSE

+
  Sets the size of the parameter used to control the 
+  B-trees for indexing chunked datasets
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+  ik           - 1/2 rank of chunked storage B-tree
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: ik            ! 1/2 rank of chunked storage B-tree
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_layout_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_layout_f 
+
+

PURPOSE

+
  Sets the type of storage used store the raw data 
+  for a dataset. 
+
+

INPUTS

+
  prp_id       - data creation property list identifier
+  layout       - type of storage layout for raw data
+                 possible values are:
+                   H5D_COMPACT_F
+                   H5D_CONTIGUOUS_F
+                   H5D_CHUNKED_F
+
+

OUTPUTS

+
  hdferr      - error code             
+                 Success:  0
+                 Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: layout        ! Type of storage layout for raw data
+                                         ! possible values are:
+                                         !   H5D_COMPACT_F
+                                         !   H5D_CONTIGUOUS_F
+                                         !   H5D_CHUNKED_F
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_libver_bounds_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
             H5Pset_libver_bounds_f
+
+

PURPOSE

+
    Sets bounds on library versions, and indirectly format versions, to be used when creating objects.
+
+

INPUTS

+
  fapl_id - File access property list identifier
+  low     - The earliest version of the library that will be used for writing objects.
+  high    - The latest version of the library that will be used for writing objects.
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 18, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
+    INTEGER, INTENT(IN) :: low   ! The earliest version of the library that will be used for writing objects.
+                                 ! Currently, low must be one of two pre-defined values:
+                                 !            HDF_LIBVER_EARLIEST_F
+                                 !            HDF_LIBVER_LATEST_F
+    INTEGER, INTENT(IN) :: high  ! The latest version of the library that will be used for writing objects.
+                                 ! Currently, low must set to the pre-defined value:
+                                 !            HDF_LIBVER_LATEST_F
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_link_creation_order_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_link_creation_order_f 
+
+

PURPOSE

+
    Sets creation order tracking and indexing for links in a group.
+
+

INPUTS

+
  gcpl_id         - Group creation property list identifier
+  crt_order_flags - Creation order flag(s)
+
+

OUTPUTS

+
  hdferr           - Error code                
+                       Success:  0
+                       Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 18, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! File access property list identifier
+    INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s)
+    INTEGER, INTENT(OUT) :: hdferr   ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_link_phase_change_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_link_phase_change_f
+
+

PURPOSE

+
  Sets the parameters for conversion between compact and dense groups.
+
+

INPUTS

+
  gcpl_id         - Group creation property list identifier  
+  max_compact     - Maximum number of attributes to be stored in compact storage
+  min_dense       - Minimum number of attributes to be stored in dense storage
+
+

OUTPUTS

+
  hdferr          - error code         
+                     Success:  0
+                     Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
+    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
+    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_local_heap_size_hint_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_local_heap_size_hint_f 
+
+

PURPOSE

+
  Sets the local heap size hint for original-style groups.
+
+

INPUTS

+
  gcpl_id   - Group creation property list identifier
+  size_hint - Hint for size of local heap
+
+

OUTPUTS

+
  hdferr    - Error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: gcpl_id    ! Group creation property list identifier
+    INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+                                             ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_nbit_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_nbit_f 
+
+

PURPOSE

+
  Sets up the use of the N-Bit filter.
+
+

INPUTS

+
  plist_id - Dataset creation property list identifier.
+
+

OUTPUTS

+
  hdferr   - Error code
+              Success:  0
+              Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pset_nbit_f(plist_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_nlinks_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_nlinks_f 
+
+

PURPOSE

+
  Sets maximum number of soft or user-defined link traversals.
+
+

INPUTS

+
  lapl_id - File access property list identifier
+   nlinks - Maximum number of links to traverse
+
+

OUTPUTS

+
  hdferr  - Error code
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 24, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier
+    INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code   
+                                          ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_obj_track_times_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_obj_track_times_f 
+
+

PURPOSE

+
  Set whether the birth, access, modification & change times for
+  an object are stored.
+
+  Birth time is the time the object was created.  Access time is
+  the last time that metadata or raw data was read from this
+  object.  Modification time is the last time the data for
+  this object was changed (either writing raw data to a dataset
+  or inserting/modifying/deleting a link in a group).  Change
+  time is the last time the metadata for this object was written
+  (adding/modifying/deleting an attribute on an object, extending
+  the size of a dataset, etc).
+
+   If these times are not tracked, they will be reported as
+   12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX
+   epoch) when queried.
+
+

INPUTS

+
  plist_id     - property list id
+  flag         - object timestamp setting
+                 .TRUE.,.FALSE.
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 22, 2008
+       
+
+

SOURCE

+
  SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property
+                                           ! list identifier
+    LOGICAL, INTENT(IN) :: flag    ! Object timestamp setting
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+                                   ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_preserve_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
   h5pset_preserve_f 
+
+

PURPOSE

+
  Sets the dataset transfer property list status to 
+  TRUE or FALSE for initializing compound datatype
+  members during write/read operations.
+
+

INPUTS

+
  prp_id       - property list identifier
+  flag         - status flag
+
+

OUTPUTS

+
  hdferr       - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+                       
+  Datatype of the flag parameter is changed from 
+  INTEGER to LOGICAL June 4, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    LOGICAL, INTENT(IN) ::  flag         ! TRUE/FALSE flag to set the dataset
+                                         ! transfer property for partila writing/reading
+                                         ! compound datatype
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_scaleoffset_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_scaleoffset_f 
+
+

PURPOSE

+
  Sets up the use of the Scale-Offset filter.
+
+

INPUTS

+
  plist_id     - Dataset creation property list identifier.
+  scale_type   - Flag indicating compression method.
+  scale_factor - Parameter related to scale.
+
+

OUTPUTS

+
  hdferr        - Error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 21, 2008
+
+

HISTORY

+

SOURCE

+
  SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
+    INTEGER, INTENT(IN) :: scale_type      ! Flag indicating compression method.
+    INTEGER, INTENT(IN) :: scale_factor    ! Parameter related to scale.
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_shared_mesg_index_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_shared_mesg_index_f
+
+

PURPOSE

+
  Configures the specified shared object header message index
+
+

INPUTS

+
  fcpl_id         - File creation property list identifier.
+  index_num       - Index being configured.
+  mesg_type_flags - Types of messages that should be stored in this index.
+  min_mesg_size   - Minimum message size.
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: fcpl_id  ! file creation property list
+    INTEGER, INTENT(IN) :: index_num       ! Index being configured.
+    INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index.
+    INTEGER, INTENT(IN) :: min_mesg_size   ! Minimum message size.
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

H5Pset_shared_mesg_nindexes_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  H5Pset_shared_mesg_nindexes_f 
+
+

PURPOSE

+
  Sets number of shared object header message indexes 
+
+

INPUTS

+
  plist_id - file creation property list
+  nindexes - Number of shared object header message indexes to be available in files created with this property list
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  January, 2008
+
+

SOURCE

+
  SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list
+    INTEGER, INTENT(IN) :: nindexes  ! Number of shared object header message indexes 
+                                     !  available in files created WITH this property list
+    INTEGER, INTENT(OUT) :: hdferr   ! Error code
+                                     ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_shuffle_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_shuffle_f 
+
+

PURPOSE

+
  Sets shuffling filter
+
+

INPUTS

+
  prp_id       - dataset creation property list identifier
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_shuffle_f(prp_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_sieve_buf_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_sieve_buf_size_f 
+
+

PURPOSE

+
  Sets the maximum size of the data sieve buffer
+
+

INPUTS

+
  plist_id     - file access property list identifier
+  size         - sieve buffer size
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
+    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size in bytes; 
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_sizes_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_sizes_f 
+
+

PURPOSE

+
  Sets the byte size of the offsets and lengths used 
+  to address objects in an HDF5 file.
+
+

INPUTS

+
  prp_id       - file creation property list identifier
+  sizeof_addr  - size of an object offset in bytes 
+  sizeof_size  - size of an object length in bytes
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
+    INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object 
+                                               !  offset in bytes 
+    INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object 
+                                               !  length in bytes 
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+                                               ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_small_data_block_size_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_small_data_block_size_f 
+
+

PURPOSE

+
  Sets the minimum size of "small" raw data block
+
+

INPUTS

+
  plist_id     - file access property list identifier
+  size         - small raw data block size
+
+

OUTPUTS

+
  hdferr       - error code            
+                  Success:  0
+                  Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002      
+
+

SOURCE

+
  SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Small raw data block size
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+                                           ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_sym_k_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_sym_k_f 
+
+

PURPOSE

+
  Sets the size of parameters used to control the 
+
+

INPUTS

+
  prp_id  - file creation property list identifier
+  ik      - symbol table tree rank
+  lk      - symbol table node size
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+               
+
+

SOURCE

+
  SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER, INTENT(IN) :: ik            ! Symbol table tree rank 
+    INTEGER, INTENT(IN) :: lk            ! Symbol table node size 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_szip_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_szip_f 
+
+

PURPOSE

+
  Sets up use of szip compression
+
+

INPUTS

+
  prp_id           - dataset creation property list identifier
+  options_mask     - A bit-mask conveying the desired SZIP options.
+                     Current valid values in Fortran are:
+                        H5_SZIP_EC_OM_F
+                        H5_SZIP_NN_OM_F
+  pixels_per_block - szip parameters
+
+

OUTPUTS

+
  hdferr           - error code                
+                       Success:  0
+                       Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  April 10 2003
+
+

SOURCE

+
  SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) 
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
+                                         ! list identifier 
+    INTEGER, INTENT(IN) :: options_mask  ! A bit-mask conveying the desired
+                                         ! SZIP options
+                                         ! Current valid values in Fortran are:
+                                         !    H5_SZIP_EC_OM_F
+                                         !    H5_SZIP_NN_OM_F
+    INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements 
+                                            ! in each data block
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5pset_userblock_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5pset_userblock_f 
+
+

PURPOSE

+
   Sets user block size
+
+

INPUTS

+
   prp_id - file creation property list to modify
+   size   - size of the user-block in bytes
+
+

OUTPUTS

+
  hdferr  - error code         
+             Success:  0
+             Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999      
+
+

HISTORY

+
  Explicit Fortran interfaces were added for 
+  called C functions (it is needed for Windows
+  port).  March 14, 2001 
+
+

SOURCE

+
  SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
+    INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes 
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5punregister_f

+ +

[ Top ] [ Subroutines ]

+

NAME

+
  h5punregister_f 
+
+

PURPOSE

+
  Removes a property from a property list class. 
+
+

INPUTS

+
  class        - Property list class identifier
+  name         - name of the property to remove
+
+

OUTPUTS

+
  hdferr:      - error code
+                  Success: 0 
+                  Failure: -1   
+
+

AUTHOR

+
  Elena Pourmal
+  October 9, 2002      
+
+

SOURCE

+
  SUBROUTINE h5punregister_f(class, name, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: class  ! property list class identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+                                         ! 0 on success and -1 on failure
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Rf_c.html b/fortran/doc/DevelGuide/src/H5Rf_c.html new file mode 100644 index 0000000..bba197e --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Rf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Rf.c + + + + + +
+
+ +

H5Rf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5R Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html new file mode 100644 index 0000000..3202540 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html @@ -0,0 +1,492 @@ + + + + + + + +./src/H5Rff_F03.f90 + + + + + +
+
+ +

H5R (F03)

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5R_PROVISIONAL
+
+

FILE

+
  fortran/src/H5Rff_F03.f90
+
+

PURPOSE

+
  This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions.
+  It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the
+  Fortran 2003 functions and the interface listings. This file will be compiled
+  instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5rcreate_object_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rcreate_object_f
+
+

PURPOSE

+
  Creates reference to the object
+
+

INPUTS

+
  loc_id    - location identifier
+  name      - name of the object at the specified location
+
+

OUTPUTS

+
  ref       - reference to the specified object
+  hdferr:   - error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rcreate_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
+                                           ! by loc_id identifier
+    TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref   ! Object reference
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5rcreate_ptr_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rcreate_ptr_f
+
+

PURPOSE

+
  Creates a reference.
+
+

INPUTS

+
  loc_id     - location identifier
+  name       - name of the dataset at the specified location
+  ref_type   - type of reference:
+                H5R_OBJECT
+                H5T_STD_REF_DSETREG
+
+

OUTPUTS

+
  ref        - reference created by the function call.
+  hdferr     - error code
+                  Success:  0
+                  Failure: -1
+ OPTIONAL
+  space_id   - dataspace identifier that describes selected region
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  June 20, 2008
+
+

NOTES

+
  This is a module procedure for the h5rcreate_f
+  subroutine where the output is a pointer.
+
+

SOURCE

+
  SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of the dataset at location specified
+                                             ! by loc_id identifier
+    INTEGER, INTENT(IN) :: ref_type          ! type of reference
+    TYPE(C_PTR), INTENT(INOUT) :: ref        ! Reference created by the function call
+    INTEGER, INTENT(OUT) :: hdferr           ! Error code
+    INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier
+
+ +
+ +

h5rcreate_region_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rcreate_region_f
+
+

PURPOSE

+
  Creates reference to the dataset region
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the dataset at the specified location
+  space_id      - dataspace identifier that describes selected region
+
+

OUTPUTS

+
  ref           - reference to the dataset region
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rcreate_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
+                                           ! by loc_id identifier
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
+    TYPE(hdset_reg_ref_t_f), INTENT(INOUT), TARGET :: ref ! Dataset region reference
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5rdereference_object_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rdereference_object_f
+
+

PURPOSE

+
  Opens the HDF5 object referenced
+
+

INPUTS

+
  dset_id  - identifier of the dataset containing
+             reference
+  ref      - reference to open
+
+

OUTPUTS

+
  obj_id   - object_identifier
+  hdferr:  - error code
+              Success:  0
+              Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rdereference_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id          ! Dataset identifier
+    TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
+    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id     ! Object identifier
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5rdereference_ptr_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rdereference_ptr_f
+
+

PURPOSE

+
  Opens the HDF5 object referenced.
+
+

INPUTS

+
  obj_id     - valid identifier for the file containing the
+               referenced object or any object in that file.
+  ref_type   - the reference type of ref.
+  ref        - Reference to open.
+
+

OUTPUTS

+
  ref_obj_id - identifier of referenced object
+  hdferr     - error code
+                Success:  0
+                Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  June 20, 2008
+
+

NOTES

+
  This is a module procedure for the h5rdereference_f
+  subroutine using pointers.
+
+

SOURCE

+
  SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Valid identifier for the file containing the
+                                          !  referenced object or any object in that file.
+    INTEGER, INTENT(IN) :: ref_type       ! The reference type of ref.
+    TYPE(C_PTR), INTENT(IN) :: ref        ! Object reference
+    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
+                                          ! Identifier of referenced object
+    INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5rdereference_region_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rdereference_region_f
+
+

PURPOSE

+
  Opens the dataset region
+
+

INPUTS

+
  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
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rdereference_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Dataset identifier
+    TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref   ! Object reference
+    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id  ! Dataspace identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5rget_name_object_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rget_name_object_f
+
+

PURPOSE

+
  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.
+  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
+
+

OPTIONAL PARAMETERS

+
  size     - The size of the name buffer.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 28, 2008
+
+ SOURCES
+ or for the group that dataset is in.
+ returning 0 (zero) if no name is associated
+ with the identifier
+
+ +
+ +

h5rget_name_ptr_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rget_name_ptr_f
+
+

PURPOSE

+
  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.
+  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
+
+

OPTIONAL PARAMETERS

+
   size   - The size of the name buffer.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 28, 2008
+
+

SOURCE

+
  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
+
+ +
+ +

h5rget_name_region_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rget_name_region_f
+
+

PURPOSE

+
  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.
+  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
+
+

OPTIONAL PARAMETERS

+
  size    - The size of the name buffer.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 28, 2008
+
+

SOURCE

+
  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
+
+ +
+ +

h5rget_obj_type_f

+ +

[ Top ] [ H5R (F03) ] [ Subroutines ]

+

NAME

+
  h5rget_obj_type_f
+
+

PURPOSE

+
  Retrieves the type of object that an object reference points to.
+
+

INPUTS

+
  loc_id   - Identifier for the dataset containing the reference or
+             for the group that dataset is in.
+  ref_type - Type of reference to query.
+  ref      - Reference to query.
+
+

OUTPUTS

+
  obj_type - Type of referenced object. 
+               H5G_UNKNOWN_F (-1)
+               H5G_LINK_F      0
+               H5G_GROUP_F     1
+               H5G_DATASET_F   2
+               H5G_TYPE_F      3
+              
+  hdferr   - error code
+               Success:  0
+               Failure: -1
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  Decemeber 17, 2008
+
+

SOURCE

+
  SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr)
+    USE, INTRINSIC :: ISO_C_BINDING
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id
+    INTEGER, INTENT(IN) :: ref_type
+    TYPE(C_PTR), INTENT(IN) :: ref
+    INTEGER, INTENT(OUT) :: obj_type
+    INTEGER, INTENT(OUT) :: hdferr
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html new file mode 100644 index 0000000..7d20d0c --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html @@ -0,0 +1,305 @@ + + + + + + + +./src/H5Rff_F90.f90 + + + + + +
+
+ +

H5R (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5R_PROVISIONAL
+
+

FILE

+
  fortran/src/H5Rff_F90.f90
+
+

PURPOSE

+
  This file contains Fortran 90 interfaces for H5R functions. It contains
+  the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions
+  and the interface listings. This file will be compiled instead of H5Rff_F03.f90
+  if Fortran 2003 functions are not enabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5rcreate_object_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rcreate_object_f
+
+

PURPOSE

+
  Creates reference to the object
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the object at the specified location
+
+

OUTPUTS

+
  ref           - reference to the specified object
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rcreate_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
+                                           ! by loc_id identifier
+    TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5rcreate_region_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rcreate_region_f
+
+

PURPOSE

+
  Creates reference to the dataset region
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the dataset at the specified location
+  space_id      - dataspace identifier that describes selected region
+
+

OUTPUTS

+
  ref           - reference to the dataset region
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rcreate_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
+                                           ! by loc_id identifier
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
+    TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5rdereference_object_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rdereference_object_f
+
+

PURPOSE

+
  Opens the HDF5 object referenced
+
+

INPUTS

+
  dset_id  - identifier of the dataset containing reference
+  ref      - reference to open
+
+

OUTPUTS

+
  obj_id   - object_identifier
+  hdferr   - error code
+              Success:  0
+              Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rdereference_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
+    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
+    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Object identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5rdereference_region_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rdereference_region_f
+
+

PURPOSE

+
  Opens the dataset region
+
+

INPUTS

+
  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
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rdereference_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
+    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference
+    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Dataspace identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5rget_name_object_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rget_name_object_f
+
+

PURPOSE

+
  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.
+  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
+
+

OPTIONAL PARAMETERS

+
  size    - The size of the name buffer.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 28, 2008
+
+ SOURCES
+ or for the group that dataset is in.
+ returning 0 (zero) if no name is associated with the identifier
+
+ +
+ +

h5rget_name_region_f

+ +

[ Top ] [ H5R (F90) ] [ Subroutines ]

+

NAME

+
  h5rget_name_region_f
+
+

PURPOSE

+
  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.
+  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
+
+

OPTIONAL PARAMETERS

+
  size          - The size of the name buffer.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 28, 2008
+
+

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
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Rff_f90.html b/fortran/doc/DevelGuide/src/H5Rff_f90.html new file mode 100644 index 0000000..2b60b08 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Rff_f90.html @@ -0,0 +1,148 @@ + + + + + + + +./src/H5Rff.f90 + + + + + +
+
+ +

H5R

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5R
+
+

FILE

+
  fortran/src/H5Rff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5R functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5rget_object_type_obj_f

+ +

[ Top ] [ H5R ] [ Subroutines ]

+

NAME

+
  h5rget_object_type_obj_f
+
+

PURPOSE

+
  Retrieves the type of object that an object reference points to.
+
+

INPUTS

+
  dset_id       - identifier of the dataset containing
+                  reference to the objects
+  ref           - reference to open
+
+

OUTPUTS

+
  obj_type      - object_type, possible values:
+                    H5G_UNKNOWN_F     (-1)
+                    H5G_GROUP_F        0
+                    H5G_DATASET_F      1
+                    H5G_TYPE_F         2
+                    H5G_LINK_F         3
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rget_object_type_f
+  subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
+    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
+    INTEGER, INTENT(OUT) :: obj_type     ! Object type
+                                         !  H5G_UNKNOWN_F     (-1)
+                                         !  H5G_GROUP_F        0
+                                         !  H5G_DATASET_F      1
+                                         !  H5G_TYPE_F         2
+                                         !  H5G_LINK_F         3
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code
+
+ +
+ +

h5rget_region_region_f

+ +

[ Top ] [ H5R ] [ Subroutines ]

+

NAME

+
  h5rget_region_region_f
+
+

PURPOSE

+
  Retrieves a dataspace with the specified region selected
+
+

INPUTS

+
  dset_id       - identifier of the dataset containing
+                  reference to the regions
+  ref           - reference to open
+
+

OUTPUTS

+
  space_id      - dataspace identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

NOTES

+
  This is a module procedure for the h5rget_region_f subroutine.
+
+

SOURCE

+
  SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
+    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference
+    INTEGER(HID_T), INTENT(OUT) :: space_id    ! Space identifier
+    INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Sf_c.html b/fortran/doc/DevelGuide/src/H5Sf_c.html new file mode 100644 index 0000000..ebdedf7 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Sf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Sf.c + + + + + +
+
+ +

H5Sf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5S Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Sff_f90.html b/fortran/doc/DevelGuide/src/H5Sff_f90.html new file mode 100644 index 0000000..c26b191 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Sff_f90.html @@ -0,0 +1,1165 @@ + + + + + + + +./src/H5Sff.f90 + + + + + +
+
+ +

H5S

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5S
+
+

FILE

+
  fortran/src/H5Sff.f90
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5S functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5sclose_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sclose_f
+
+

PURPOSE

+
  Releases and terminates access to a dataspace.
+
+

INPUTS

+
  space_id    - identifier of dataspace to release
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sclose_f(space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5scopy_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5scopy_f
+
+

PURPOSE

+
  Creates an exact copy of a dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  new_space_id  - identifier of dataspace's copy
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

NOTES

+

SOURCE

+
          SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HID_T), INTENT(OUT) :: new_space_id
+                                             ! Identifier of dataspace's copy
+            INTEGER, INTENT(OUT) :: hdferr   ! Error code
+
+ +
+ +

h5screate_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5screate_f
+
+

PURPOSE

+
  Creates a new dataspace of a specified type.
+
+

INPUTS

+
  classtype   - the type of the dataspace to be created
+
+

OUTPUTS

+
  space_id    - dataspace identifier
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

NOTES

+

SOURCE

+
          SUBROUTINE h5screate_f(classtype, space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER, INTENT(IN) :: classtype     ! The type of the dataspace
+                                                 ! to be created.
+                                                 ! Possible values are:
+                                                 !  H5S_SCALAR_F (0)
+                                                 !  H5S_SIMPLE_F(1)
+                                                 !  H5S_NULL_F(2)
+            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5screate_simple_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5screate_simple_f
+
+

PURPOSE

+
  Creates a new simple data space and opens it for access      .
+
+

INPUTS

+
  rank        - number of dimensions
+  dims        - an array of the size of each dimension
+
+

OUTPUTS

+
  space_id    - dataspace identifier
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  maxdims     - an array of the maximum size of each dimension
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims)
+
+            IMPLICIT NONE
+            INTEGER, INTENT(IN) :: rank             ! Number of dataspace dimensions
+            INTEGER(HSIZE_T), INTENT(IN) :: dims(rank)
+                                                    ! Array with the dimension
+                                                    ! sizes
+            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+            INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank)
+                                                    ! Array with the maximum
+                                                    ! dimension sizes
+
+ +
+ +

H5Sdecode_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  H5Sdecode_f
+
+

PURPOSE

+
  Decode a binary object description of data space and return a new object handle.
+
+

INPUTS

+
  buf   -  Buffer for the data space object to be decoded.
+  obj_id        - Object ID
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 26, 2008
+
+

SOURCE

+
  SUBROUTINE h5sdecode_f(buf, obj_id, hdferr)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
+    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code
+
+ +
+ +

H5Sencode_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  H5Sencode_f
+
+

PURPOSE

+
  Encode a data space object description into a binary buffer.
+
+

INPUTS

+
  obj_id        - Identifier of the object to be encoded.
+  buf   - Buffer for the object to be encoded into.
+  nalloc        - The size of the allocated buffer.
+
+

OUTPUTS

+
  nalloc        - The size of the buffer needed.
+  hdferr      - Returns 0 if successful and -1 if fails.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  March 26, 2008
+
+

SOURCE

+
  SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
+    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
+    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code
+
+ +
+ +

h5sextent_copy_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sextent_copy_f
+
+

PURPOSE

+
  Copies the extent of a dataspace.
+
+

INPUTS

+
  dest_space_id         - the identifier for the dataspace to which
+  the extent is copied
+  source_space_id       - the identifier for the dataspace from
+  which the extent is copied
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

NOTES

+

SOURCE

+
          SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: dest_space_id  ! Identifier of destination
+                                                         ! dataspace
+            INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source
+                                                          ! dataspace
+            INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5sextent_equal_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sextent_equal_f
+
+

PURPOSE

+
  Determines whether two dataspace extents are equal.
+
+

INPUTS

+
  space1_id     - First dataspace identifier.
+  space2_id     - Second dataspace identifier.
+
+

OUTPUTS

+
  Equal         - .TRUE. if equal, .FALSE. if unequal.
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 2, 2008
+
+

SOURCE

+
  SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier.
+    INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier.
+    LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal.
+    INTEGER, INTENT(OUT) :: hdferr                ! Error code
+
+ +
+ +

h5sget_select_bounds_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_bounds_f
+
+

PURPOSE

+
  Gets the bounding box containing the current selection.
+
+

INPUTS

+
  space_id    - dataspace identifier
+
+

OUTPUTS

+
  start       - starting coordinates of bounding box
+  end         - ending coordinates of bounding box
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
  SUBROUTINE  h5sget_select_bounds_f(space_id, start, END, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start
+                                           ! Starting coordinates of the bounding box.
+    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END
+                                           !Ending coordinates of the bounding box,
+                                           !i.e., the coordinates of the diagonally
+                                           !opposite corner
+    INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5sget_select_elem_npoints_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_elem_npoints_f
+
+

PURPOSE

+
  Gets the number of element points in the current selection
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  num_points    - number of element points in the current
+                  dataspace selection
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSSIZE_T), INTENT(OUT) :: num_points
+                                             !number of element points
+                                             !in the current dataspace
+                                             !selection
+            INTEGER, INTENT(OUT) :: hdferr   ! Error code
+
+ +
+ +

h5sget_select_elem_pointlist_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_elem_pointlist_f
+
+

PURPOSE

+
  Gets the list of element points currently selected.
+
+

INPUTS

+
  space_id    - dataspace identifier
+  startpoint  - element point to start with
+  num_points  - number of elemnt points to get
+
+

OUTPUTS

+
  buf         - buffer with element points selected
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, &
+                                                    num_points, buf, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSIZE_T), INTENT(IN) :: startpoint
+                                             !Element point to start with.
+            INTEGER(HSIZE_T), INTENT(IN) :: num_points
+                                             !Number of element points to get
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
+                                             !List of element points selected
+            INTEGER, INTENT(OUT) :: hdferr   ! Error code
+
+ +
+ +

h5sget_select_hyper_blocklist_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_hyper_blocklist_f
+
+

PURPOSE

+
  Gets the list of hyperslab blocks currently selected.
+
+

INPUTS

+
  space_id    - dataspace identifier
+  startblock  - hyperslab block to start with
+  num_blocks  - number of blocks to get
+
+

OUTPUTS

+
  buf         - buffer to hold block list
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, &
+                                                    num_blocks, buf, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSIZE_T), INTENT(IN) :: startblock
+                                             !Hyperslab block to start with.
+            INTEGER(HSIZE_T), INTENT(IN) :: num_blocks
+                                             !number of hyperslab blocks
+                                             !to get in the current dataspace
+                                             !selection
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
+                                             !List of hyperslab blocks selected
+            INTEGER, INTENT(OUT) :: hdferr   ! Error code
+
+ +
+ +

h5sget_select_hyper_nblocks_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_hyper_nblocks_f
+
+

PURPOSE

+
  Get number of hyperslab blocks.
+
+

INPUTS

+
  space_id    - dataspace identifier
+
+

OUTPUTS

+
  num_blocks  - number of hyperslab blocks in the current
+                hyperslab selection
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks
+                                             !number of hyperslab blocks
+                                             !in the current dataspace
+                                             !selection
+            INTEGER, INTENT(OUT) :: hdferr   ! Error code
+
+ +
+ +

h5sget_select_npoints_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_npoints_f
+
+

PURPOSE

+
  Determines the number of elements in a dataspace selection.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  npoints       - number of points in the dataspace selection
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
+            INTEGER(HSSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in the
+                                                       ! selection
+            INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5sget_select_type_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_select_type_f
+
+

PURPOSE

+
  Retrieve the type of selection
+
+

INPUTS

+
  space_id      - dataspace iidentifier with selection
+
+

OUTPUTS

+
  type          - flag, valid values are:
+                    H5S_SEL_ERROR_F
+                    H5S_SEL_NONE_F
+                    H5S_SEL_POINTS_F
+                    H5S_SEL_HYPERSLABS_F
+                    H5S_SEL_ALL_F
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  October 7, 2002
+
+

SOURCE

+
          SUBROUTINE h5sget_select_type_f(space_id, type, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to
+            INTEGER, INTENT(OUT) :: type        ! Selection type
+                                                !  H5S_SEL_ERROR_F
+                                                !  H5S_SEL_NONE_F
+                                                !  H5S_SEL_POINTS_F
+                                                !  H5S_SEL_HYPERSLABS_F
+                                                !  H5S_SEL_ALL_F
+            INTEGER, INTENT(OUT) :: hdferr     ! Error code
+
+ +
+ +

h5sget_simple_extent_dims_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_simple_extent_dims_f
+
+

PURPOSE

+
  Retrieves dataspace dimension size and maximum size.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  dims          - array to store size of each dimension
+  maxdims       - array to store maximum size of each
+  dimension
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims
+                                                   ! Array to store dimension sizes
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims
+                                                   ! Array to store max dimension
+                                                   ! sizes
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code: -1 on failure,
+                                                   ! number of dimensions on
+                                                   ! on success
+
+ +
+ +

h5sget_simple_extent_ndims_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_simple_extent_ndims_f
+
+

PURPOSE

+
  Determines the dimensionality of a dataspace
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  rank          - number of dataspace dimensions
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: rank               ! Number of dimensions
+            INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5sget_simple_extent_npoints_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_simple_extent_npoints_f
+
+

PURPOSE

+
  Determines the number of elements in a dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  npoints       - number of elements in the dataspace
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
+            INTEGER(HSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in
+                                                       ! dataspace
+            INTEGER, INTENT(OUT) :: hdferr             ! Error code
+
+ +
+ +

h5sget_simple_extent_type_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sget_simple_extent_type_f
+
+

PURPOSE

+
  Determine the current class of a dataspace
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  classtype     - class type, possible values are:
+  H5S_NO_CLASS_F (-1)
+  H5S_SCALAR_F (0)
+  H5S_SIMPLE_F (1)
+  H5S_NULL_F   (2)
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: classtype      ! Class type , possible values
+                                                   ! are:
+                                                   !  H5S_NO_CLASS_F (-1)
+                                                   !  H5S_SCALAR_F (0)
+                                                   !  H5S_SIMPLE_F (1)
+                                                   !  H5S_NULL_F   (2)
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5sis_simple_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sis_simple_f
+
+

PURPOSE

+
  Determines whether a dataspace is a simple dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  status        - flag to indicate if dataspace
+  is simple or not
+  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sis_simple_f(space_id, status, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
+            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if dataspace
+                                                ! is simple or not ( TRUE or
+                                                ! FALSE)
+            INTEGER, INTENT(OUT) :: hdferr      ! Error code
+
+ +
+ +

h5soffset_simple_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5soffset_simple_f
+
+

PURPOSE

+
  Sets the offset of a simple dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+  offset        - the offset at which to position the
+  selection
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  NONE
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) ::  offset
+                                                   ! The offset at which to position
+                                                   ! the selection
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ +

h5sselect_all_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sselect_all_f
+
+

PURPOSE

+
  Selects the entire dataspace.
+
+

INPUTS

+
  space_id    - Identifier for the dataspace in which
+                selection being made
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sselect_all_f(space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5sselect_elements_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sselect_elements_f
+
+

PURPOSE

+
  Selects elements to be included in the selection for
+  a dataspace
+
+

INPUTS

+
  space_id      - dataspace identifier
+  operator      - flag, valid values are:
+                   H5S_SELECT_SET_F 
+                   H5S_SELECT_APPEND_F 
+                   H5S_SELECT_PREPEND_F
+  rank          - number of dataspace dimensions
+  num_elements  - number of elements to be selected
+  coord         - 2D (rank x num_elements) array with the
+                  elements coordinates ( 1-based); in C the
+                  array is stored in 2D as (num_element x rank)
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
  SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, &
+       num_elements, coord, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T),   INTENT(IN)                                :: space_id
+    INTEGER,          INTENT(IN)                                :: OPERATOR
+    INTEGER,          INTENT(IN)                                :: rank
+    INTEGER(SIZE_T),  INTENT(IN)                                :: num_elements
+    INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord
+    INTEGER,          INTENT(OUT)                               :: hdferr 
+
+ +
+ +

h5sselect_hyperslab_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sselect_hyperslab_f
+
+

PURPOSE

+
  Selects a hyperslab region to add to the current selected
+  region
+
+

INPUTS

+
  space_id      - dataspace identifier
+  operator      - flag, valid values are:
+  H5S_SELECT_SET_F (0)
+  H5S_SELECT_OR_F (1)
+  start         - array with hyperslab offsets
+  count         - number of blocks included in the
+  hyperslab
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  stride        - array with hyperslab strides
+  block         - array with hyperslab block sizes
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, &
+                                           hdferr, stride, block)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(IN) :: operator     ! Flag, valid values are:
+                                                ! H5S_SELECT_SET_F (0)
+                                                ! H5S_SELECT_OR_F (1)
+                                                !
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start
+                                          ! Starting coordinates of the hyperslab
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count
+                                          ! Number of blocks to select
+                                          ! from dataspace
+            INTEGER, INTENT(OUT) :: hdferr     ! Error code
+            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride
+                                          ! Array of how many elements to move
+                                          ! in each direction
+            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block
+                                          ! Sizes of element block
+
+ +
+ +

h5sselect_none_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sselect_none_f
+
+

PURPOSE

+
  Resets the selection region to include no elements.
+
+

INPUTS

+
  space_id    - the identifier for the dataspace in which
+                the selection is being reset.
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sselect_none_f(space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5sselect_valid_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sselect_valid_f
+
+

PURPOSE

+
  Verifies that the selection is within the extent of
+  the dataspace.
+
+

INPUTS

+
  space_id      - identifier for the dataspace for which
+  selection is verified
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sselect_valid_f(space_id, status, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
+            LOGICAL, INTENT(OUT) :: status          ! TRUE if the selection is
+                                                    ! contained within the extent,
+                                                    ! FALSE otherwise.
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5sset_extent_none_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sset_extent_none_f
+
+

PURPOSE

+
  Removes the extent from a dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sset_extent_none_f(space_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5sset_extent_simple_f

+ +

[ Top ] [ H5S ] [ Subroutines ]

+

NAME

+
  h5sset_extent_simple_f
+
+

PURPOSE

+
  Sets or resets the size of an existing dataspace.
+
+

INPUTS

+
  space_id      - dataspace identifier
+  rank          - dataspace number of dimensions
+  current_size          - array with the new sizes of dimensions
+  maximum_size          - array with the new maximum sizes of
+  dimensions
+
+

OUTPUTS

+
  hdferr      - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 6, 2001
+
+

SOURCE

+
          SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, &
+                                            maximum_size, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
+            INTEGER, INTENT(IN) :: rank            ! Dataspace rank
+            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size
+                                                   ! Array with the new sizes
+                                                   ! of dimensions
+            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size
+                                                   ! Array with the new maximum
+                                                   ! sizes of dimensions
+                                                   ! sizes
+            INTEGER, INTENT(OUT) :: hdferr         ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Tf_c.html b/fortran/doc/DevelGuide/src/H5Tf_c.html new file mode 100644 index 0000000..b36c2a5 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Tf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Tf.c + + + + + +
+
+ +

H5Tf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5T Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Tff_f90.html b/fortran/doc/DevelGuide/src/H5Tff_f90.html new file mode 100644 index 0000000..3b7dfe8 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Tff_f90.html @@ -0,0 +1,2378 @@ + + + + + + + +./src/H5Tff.f90 + + + + + +
+
+ +

H5T

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5T
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5T functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5tarray_create_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tarray_create_f
+
+

PURPOSE

+
  Creates an array datatype object.
+
+

INPUTS

+
  base_id       - datatype identifier for the array
+                  base datatype
+  rank          - rank of the array
+  dims          - array dimension sizes
+
+

OUTPUTS

+
  type_id       - array datatype identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype
+            INTEGER, INTENT(IN) ::  rank ! Rank of the array
+            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension
+            INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tclose_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tclose_f
+
+

PURPOSE

+
  Releases a datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tclose_f(type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tcommit_anon_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcommit_anon_f
+
+

PURPOSE

+
  Commits a transient datatype to a file,
+  creating a new named datatype,
+  but does not link it into the file structure.
+
+

INPUTS

+
  loc_id        - A file or group identifier specifying the file
+                  in which the new named datatype is to be created.
+  dtype_id      - A datatype identifier.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  tcpl_id       - A datatype creation property list identifier.
+                  (H5P_DEFAULT_F for the default property list.)
+  tapl_id       - A datatype access property list identifier.
+                  should always be passed as the value H5P_DEFAULT_F.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 25, 2008
+
+

SOURCE

+
  SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! A file or group identifier specifying
+                                          ! the file in which the new named datatype
+                                          ! is to be created.
+    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property
+                                                    ! list identifier.
+                                                    ! (H5P_DEFAULT_F for the default property list.)
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier.
+                                                    ! should always be passed as the value H5P_DEFAULT_F.
+
+ +
+ +

h5tcommit_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcommit_f
+
+

PURPOSE

+
  Commits a transient datatype to a file, creating a
+  new named datatype.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - name of the datatype to be stored
+                  at the specified location
+  type_id       - identifier of a datatype to be stored
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  lcpl_id       - Link creation property list
+  tcpl_id       - Datatype creation property list
+  tapl_id       - Datatype access property list
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
        - Explicit Fortran interfaces were added for
+          called C functions (it is needed for Windows
+          port).  March 7, 2001
+
+        - Added optional parameters introduced in version 1.8
+          M. Scot Breitenfeld
+
+

SOURCE

+
  SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, &
+       lcpl_id, tcpl_id, tapl_id  )
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name
+                                  ! Datatype name within file or group
+    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr          ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list
+
+ +
+ +

h5tcommitted_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcommitted_f
+
+

PURPOSE

+
  Determines whether a datatype is a named type or a transient type.
+
+

INPUTS

+
  dtype_id      - A datatype identifier.
+
+

OUTPUTS

+
  committed     - .TRUE., if the datatype has been committed
+                  .FALSE., if the datatype has not been committed.
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  February 25, 2008
+
+

SOURCE

+
  SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! A datatype identifier
+    LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed
+                                      !.FALSE., if the datatype has not been committed.
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
+!  Success:  0
+!  Failure: -1
+
+ +
+ +

h5tcompiler_conv_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcompiler_conv_f
+
+

PURPOSE

+
  Check whether the library’s default conversion is hard conversion.R
+
+

INPUTS

+
  src_id        - Identifier for the source datatype.
+  dst_id        - Identifier for the destination datatype.
+
+

OUTPUTS

+
  flag          - TRUE for compiler conversion, FALSE for library conversion
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 9, 2008
+
+

SOURCE

+
  SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype.
+    INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype.
+    LOGICAL, INTENT(OUT) :: flag  ! .TRUE. for compiler conversion, .FALSE. for library conversion
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code:
+                                    ! 0 on success and -1 on failure
+
+ +
+ +

h5tcopy_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcopy_f
+
+

PURPOSE

+
  Creates a copy of exisiting datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  new_type_id   - identifier of datatype's copy
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(HID_T), INTENT(OUT) :: new_type_id
+                                 ! Identifier of datatype's copy
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tcreate_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tcreate_f
+
+

PURPOSE

+
  Creates a new dataype
+
+

INPUTS

+
  class         - datatype class, possible values are:
+                    H5T_COMPOUND_F
+                    H5T_ENUM_F
+                    H5T_OPAQUE_F
+  size          - datattype size
+
+

OUTPUTS

+
  type_id       - datatype identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tcreate_f(class, size, type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER, INTENT(IN) :: class ! Datatype class can be one of
+                                         ! H5T_COMPOUND_F
+                                         ! H5T_ENUM_F
+                                         ! H5T_OPAQUE_F
+            INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the datatype
+            INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

H5Tdecode_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  H5Tdecode_f
+
+

PURPOSE

+
  Decode a binary object description of data type and return a new object handle.
+
+

INPUTS

+
  buf           -  Buffer for the data space object to be decoded.
+  obj_id        - Object ID
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 9, 2008
+
+

SOURCE

+
  SUBROUTINE h5tdecode_f(buf, obj_id, hdferr)
+    IMPLICIT NONE
+    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
+    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code
+
+ +
+ +

h5tenaum_insert_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tenaum_insert_f
+
+

PURPOSE

+
  Inserts a new enumeration datatype member.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tenum_insert_f(type_id,  name, value, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of  the new member
+            INTEGER, INTENT(IN) :: value !value of the new member
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

H5Tencode_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  H5Tencode_f
+
+

PURPOSE

+
  Encode a data type object description into a binary buffer.
+
+

INPUTS

+
  obj_id        - Identifier of the object to be encoded.
+  buf           - Buffer for the object to be encoded into.
+  nalloc        - The size of the allocated buffer.
+
+

OUTPUTS

+
  nalloc        - The size of the buffer needed.
+  hdferr        - Returns 0 if successful and -1 if fails.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 9, 2008
+
+

SOURCE

+
  SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
+    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
+    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
+    INTEGER, INTENT(OUT) :: hdferr     ! Error code
+
+ +
+ +

h5tenum_create_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tenum_create_f
+
+

PURPOSE

+
  Creates a new enumeration datatype.
+
+

INPUTS

+
  parent_id     - datatype identifier for base datatype
+
+

OUTPUTS

+
  new_type_id   - datatype identifier for the enumeration datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: parent_id  ! Datatype identifier for
+                                                     ! the  base datatype
+            INTEGER(HID_T), INTENT(OUT) :: new_type_id
+                                                     !datatype identifier for the
+                                                     ! new enumeration datatype
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tenum_nameof_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tenum_nameof_f
+
+

PURPOSE

+
  Returns the symbol name corresponding to a specified
+  member of an enumeration datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  value         - value of the enumeration datatype
+  namelen       - name buffer size
+
+

OUTPUTS

+
  name          - buffer to hold symbol name
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+ NOTE
+   According to the standard: Because an INTENT(OUT) variable is considered undefined 
+   on entry to the procedure, any default initialization specified for its type will 
+   be applied. So we need to blank out the "name" to be portable and eliminate any 
+   characters the "name' may contain upon entry, depending on compiler implementation.
+
+

SOURCE

+
  SUBROUTINE h5tenum_nameof_f(type_id,  value, namelen, name, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(OUT) :: name  !Name of the  enumeration datatype.
+            INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name
+            INTEGER, INTENT(IN) :: value !value of the  enumeration datatype.
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tenum_valuof_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tenum_valuof_f
+
+

PURPOSE

+
  Returns the value corresponding to a specified
+  member of an enumeration datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  name          - symbol name
+
+

OUTPUTS

+
  value         - value of the enumeration datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tenum_valueof_f(type_id,  name, value, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of the  enumeration datatype.
+            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tequal_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tequal_f
+
+

PURPOSE

+
  Determines whether two datatype identifiers refer
+  to the same datatype.
+
+

INPUTS

+
  type1_id      - datatype identifier
+  type2_id      - datatype identifier
+
+

OUTPUTS

+
  flag          - TRUE/FALSE flag to indicate
+                  if two datatypes are equal
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier
+            INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier
+            LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two
+                                         ! datatypes are equal
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_array_dims_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_array_dims_f
+
+

PURPOSE

+
  Returns sizes of array dimensions.
+
+

INPUTS

+
  type_id       - array datatype identifier
+
+

OUTPUTS

+
  dims          - buffer to store array datatype dimensions
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
+            INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) ::  dims !buffer to store array datatype
+                                                                ! dimensions
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_array_ndims_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_array_ndims_f
+
+

PURPOSE

+
  Returns the rank of an array datatype.
+
+

INPUTS

+
  type_id       - array datatype identifier
+
+

OUTPUTS

+
  ndims         - number of array dimensions
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
+            INTEGER, INTENT(OUT) ::  ndims ! number of array dimensions
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_class_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_class_f
+
+

PURPOSE

+
  Returns the datatype class identifier.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  class         - class, possible values are:
+                   H5T_NO_CLASS_F (-1)
+                   H5T_INTEGER_F  (0)
+                   H5T_FLOAT_F (1)
+                   H5T_TIME_F  (2)
+                   H5T_STRING_F (3)
+                   H5T_BITFIELD_F (4)
+                   H5T_OPAQUE_F (5)
+                   H5T_COMPOUND_F (6)
+                   H5T_REFERENCE_F (7)
+                   H5T_ENUM_F (8)
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_class_f(type_id, class, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: class
+                           ! Datatype class, possible values are:
+                                          ! H5T_NO_CLASS_F (-1)
+                                          ! H5T_INTEGER_F  (0)
+                                          ! H5T_FLOAT_F (1)
+                                          ! H5T_TIME_F  (2)
+                                          ! H5T_STRING_F (3)
+                                          ! H5T_BITFIELD_F (4)
+                                          ! H5T_OPAQUE_F (5)
+                                          ! H5T_COMPOUND_F (6)
+                                          ! H5T_REFERENCE_F (7)
+                                          ! H5T_ENUM_F (8)
+          INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_create_plist_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_create_plist_f
+
+

PURPOSE

+
  Returns a copy of a datatype creation property list.
+
+

INPUTS

+
  dtype_id      - Datatype identifier
+
+

OUTPUTS

+
  dtpl_id       - Datatype property list identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  April 9, 2008
+
+

SOURCE

+
  SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
+    INTEGER(HID_T), INTENT(OUT) :: dtpl_id  ! Datatype property list identifier.
+    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
+                                         ! 0 on success and -1 on failure
+
+ +
+ +

h5tget_cset_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_cset_f
+
+

PURPOSE

+
  Retrieves the character set type of a string datatype.
+
+

INPUTS

+
  type_id  - Datatype identifier
+
+

OUTPUTS

+
  cset     - Character set type of a string datatype
+              Possible values are:
+              H5T_CSET_ASCII_F = 0
+              H5T_CSET_UTF8_F
+  hdferr   - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_cset_f(type_id, cset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: cset   ! character set type of a string datatype
+                                           !  Possible values are:
+                                           !  H5T_CSET_ASCII_F = 0
+                                           !  H5T_CSET_UTF8_F
+            INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ +
+ +

h5tget_ebias_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_ebias_f
+
+

PURPOSE

+
  Retrieves the exponent bias of a floating-point type.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  ebias         - datatype exponent bias
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_fields_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_fields_f
+
+

PURPOSE

+
  Retrieves floating point datatype bit field information.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  spos          - sign bit-position
+  epos          - exponent bit-position
+  esize         - size of exponent in bits
+  mpos          - mantissa position
+  msize         - size of mantissa in bits
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(OUT) :: spos   ! sign bit-position
+            INTEGER(SIZE_T), INTENT(OUT) :: epos   ! exponent bit-position
+            INTEGER(SIZE_T), INTENT(OUT) :: esize  ! size of exponent in bits
+            INTEGER(SIZE_T), INTENT(OUT) :: mpos   ! mantissa bit-position
+            INTEGER(SIZE_T), INTENT(OUT) :: msize  ! size of mantissa in bits
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_inpad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_inpad_f
+
+

PURPOSE

+
  Retrieves the internal padding type for unused bits
+  in floating-point datatypes.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  padtype       - padding type for unused bits
+                  Possible values of padding type are:
+                    H5T_PAD_ZERO_F = 0
+                    H5T_PAD_ONE_F = 1
+                    H5T_PAD_BACKGROUND_F = 2
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits
+                                            ! in floating-point datatypes.
+                                            ! Possible values of padding type are:
+                                            ! H5T__PAD_ZERO_F = 0
+                                            ! H5T__PAD_ONE_F = 1
+                                            ! H5T__PAD_BACKGROUND_F = 2
+
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_member_class_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_class_f
+
+

PURPOSE

+
  Returns datatype class of compound datatype member.
+
+

INPUTS

+
  type_id       - datartpe identifier
+  member_no     - index of compound datatype member
+
+

OUTPUTS

+
  class         - class type for compound dadtype member
+                  Valid classes:
+                    H5T_NO_CLASS_F (error)
+                    H5T_INTEGER_F
+                    H5T_FLOAT_F
+                    H5T_TIME_F
+                    H5T_STRING_F
+                    H5T_BITFIELD_F
+                    H5T_OPAQUE_F
+                    H5T_COMPOUND_F
+                    H5T_REFERENCE_F
+                    H5T_ENUM_F
+                    H5T_VLEN_F
+                    H5T_ARRAY_F
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  April 6, 2005
+
+

SOURCE

+
  SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
+            INTEGER, INTENT(IN)       :: member_no  ! Member number
+            INTEGER, INTENT(OUT)     :: class      ! Member class
+            INTEGER, INTENT(OUT) :: hdferr      ! Error code
+
+ +
+ +

h5tget_member_index_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_index_f
+
+

PURPOSE

+
  Retrieves the index of a compound or enumeration datatype member.
+
+

INPUTS

+
  type_id       - datatype identifier
+  name          - name of the field or member whose index to
+  to be retrieved from the datatype.
+
+

OUTPUTS

+
  index         - 0-based index of the filed or member (0 to N-1)
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  September 26, 2002
+
+

SOURCE

+
  SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(IN) :: name   ! Field or member name
+            INTEGER, INTENT(OUT) :: index          ! Field or member index
+            INTEGER, INTENT(OUT) :: hdferr          ! Error code
+
+ +
+ +

h5tget_member_name_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_name_f
+
+

PURPOSE

+
  Retrieves the name of a field of a compound datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  index         - filed index (0-based)
+
+

OUTPUTS

+
  member_name   - buffer to hold member's name
+  namelen       - name length
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_member_name_f(type_id, index, member_name,  namelen, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve
+            CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of
+                                                         !a compound datatype
+            INTEGER, INTENT(OUT) :: namelen ! Length of the name
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_member_offset_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_offset_f
+
+

PURPOSE

+
  Retrieves the offset of a field of a compound datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  member_no     - number of the field
+
+

OUTPUTS

+
  offset        - byte offset of the requested field
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: member_no !Number of the field
+                                                       !whose offset is requested
+            INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_member_type_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_type_f
+
+

PURPOSE

+
  Returns the datatype of the specified member.
+
+

INPUTS

+
  type_id       - compound datatype identifier
+  field_idx     - field index (0-based)
+
+

OUTPUTS

+
  datatype      - idnetifier of the member's datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_member_type_f(type_id,  field_idx, datatype, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve
+            INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of
+                                                    !the datatype of the field
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_member_value_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_member_value_f
+
+

PURPOSE

+
  Returns the value of an enumeration datatype member.
+
+

INPUTS

+
  type_id       - datatype identifier
+  member_no     - number of the enumeration datatype member
+
+

OUTPUTS

+
  value         - value of the enumeration datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_member_value_f(type_id,  member_no, value, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member
+            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_native_type_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_native_type_f
+
+

PURPOSE

+
  Returns the native datatype of a specified datatype.
+
+

INPUTS

+
  dtype_id      - Datatype identifier for the dataset datatype.
+  
+  direction     - Direction of search:
+                  H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent */
+                  H5T_DIR_ASCEND      = 1,    /*in inscendent order             */
+                  H5T_DIR_DESCEND     = 2     /*in descendent order             */
+  * NOTE: In C it is defined as a structure: H5T_direction_t
+
+

OUTPUTS

+
  native_dtype_id - The native datatype identifier for the specified dataset datatype
+  hdferr          - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  June 18, 2008
+
+

SOURCE

+
  SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
+    INTEGER, INTENT(IN) :: direction  ! Direction of search:
+                                      ! H5T_DIR_ASCEND_F      = 1  in inscendent order
+                                      ! H5T_DIR_DESCEND_F     = 2  in descendent order
+    INTEGER(HID_T), INTENT(OUT) :: native_dtype_id  ! The native datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
+                                      ! 0 on success and -1 on failure
+
+ +
+ +

h5tget_nmembers_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_nmembers_f
+
+

PURPOSE

+
  Retrieves the number of fields in a compound datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  num_members   - number of members
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_norm_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_norm_f
+
+

PURPOSE

+
  Retrieves mantissa normalization of a floating-point
+  datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  norm          - normalization types, valid values are:
+                    H5T_NORM_IMPLIED_F(0)
+                    H5T_NORM_MSBSET_F(1)
+                    H5T_NORM_NONE_F(2)
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_norm_f(type_id, norm, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype
+                                         !Valid normalization types are:
+                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
+                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
+                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
+                                         !Mantissa is not normalize
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_offset_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_offset_f
+
+

PURPOSE

+
  Retrieves the bit offset of the first significant bit.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  offset        - offset value
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_offset_f(type_id, offset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the
+                                           ! first significant bit
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_order_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_order_f
+
+

PURPOSE

+
  Returns the byte order of an atomic datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  order         - byte order for the datatype, possible
+                  values are:
+                    H5T_ORDER_LE_F
+                    H5T_ORDER_BE_F
+                    H5T_ORDER_VAX_F (not implemented yet)
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_order_f(type_id, order, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+    INTEGER, INTENT(OUT) :: order
+                                    ! Datatype byte order, possible values are:
+                                    ! H5T_ORDER_LE_F
+                                    ! H5T_ORDER_BE_F
+                                    ! H5T_ORDER_VAX_F
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ +

h5tget_pad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_pad_f
+
+

PURPOSE

+
  Retrieves the padding type of the least and
+  most          -significant bit padding.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  lsbpad        - least-significant bit padding type
+  msbpad        - most-significant bit padding type
+                  Possible values of padding type are:
+                    H5T_PAD_ERROR_F      = -1
+                    H5T_PAD_ZERO_F = 0
+                    H5T_PAD_ONE_F = 1
+                    H5T_PAD_BACKGROUND_F = 2
+                    H5T_PAD_NPAD_F      = 3
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: lsbpad ! padding type of the
+                                           ! least significant bit
+            INTEGER, INTENT(OUT) :: msbpad ! padding type of the
+                                           ! most significant bit
+                                           ! Possible values of padding type are:
+                                           ! H5T__PAD_ZERO_F = 0
+                                           ! H5T__PAD_ONE_F = 1
+                                           ! H5T__PAD_BACKGROUND_F = 2
+                                           ! H5T_PAD_ERROR_F      = -1
+                                           ! H5T_PAD_NPAD_F      = 3
+
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_precision_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_precision_f
+
+

PURPOSE

+
  Returns the precision of an atomic datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  precision     - precision of the datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_precision_f(type_id, precision, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_sign_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_sign_f
+
+

PURPOSE

+
  Retrieves the sign type for an integer type.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  sign          - sign type
+                  Possible values are:
+                    - Unsigned integer type 
+                        H5T_SGN_NONE_F = 0
+                    - Two's complement signed integer type
+                        H5T_SGN_2_F = 1
+                    - error value: H5T_SGN_ERROR_F=-1
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_sign_f(type_id, sign, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: sign ! sign type for an integer type
+                                         !possible values are:
+                                         !Unsigned integer type H5T_SGN_NONE_F = 0
+                                         !Two's complement signed integer type
+                                         !H5T_SGN_2_F = 1
+                                         !or error value: H5T_SGN_ERROR_F=-1
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_size_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_size_f
+
+

PURPOSE

+
  Returns the size of a datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  size          - datatype size
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_size_f(type_id, size, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_strpad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_strpad_f
+
+

PURPOSE

+
  Retrieves the storage mechanism for a string datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  strpad        - storage method for a string datatype
+                  Possible values are:
+                    H5T_STR_NULLTERM_F,
+                    H5T_STR_NULLPAD_F,
+                    H5T_STR_SPACEPAD_F
+                    H5T_STR_ERROR_F
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: strpad
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_super_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_super_f
+
+

PURPOSE

+
  Returns the base datatype from which a datatype is derived.
+
+

INPUTS

+
  type_id       - datatype identifier
+
+

OUTPUTS

+
  base_type_id          - identifier of the base type
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier
+            INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype
+                                           ! from which datatype (type_id) was derived
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tget_tag_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tget_tag_f
+
+

PURPOSE

+
  Gets the tag associated with an opaque datatype.
+
+

INPUTS

+
  type_id       - identifier for opaque datatype
+
+

OUTPUTS

+
  tag           - unique ASCII string associated with opaque
+                  datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(OUT) :: tag  ! Unique ASCII string with which
+                                                  !  the opaque datatype is to be tagged
+            INTEGER, INTENT(OUT) :: taglen        ! Length of tag
+            INTEGER(SIZE_T)      :: tag_size      ! Declared character length of tab 
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tinsert_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tinsert_f
+
+

PURPOSE

+
  Adds a new member to a compound datatype.
+
+

INPUTS

+
  type_id       - compound dattype identifier
+  name          - name of the field to insert
+  offset        - start of the member in an instance of
+                  the compound datatype
+  field_id      - datatype identifier of the field to insert
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tinsert_f(type_id,  name, offset, field_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert
+            INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of
+                                                   !the compound datatype
+            INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member
+
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tis_variable_str_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tis_variable_str_f
+
+

PURPOSE

+
  Determines whether a dattype is a variable string.
+
+

INPUTS

+
  type_id       - datartpe identifier
+
+

OUTPUTS

+
  status        - flag to indicate if datatype
+                  is a variable string
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
+            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if datatype
+                                                ! is a variable string or not ( TRUE or
+                                                ! FALSE)
+            INTEGER, INTENT(OUT) :: hdferr      ! Error code
+
+ +
+ +

h5topen_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5topen_f
+
+

PURPOSE

+
  Opens named datatype.
+
+

INPUTS

+
  loc_id        - location identifier
+  name          - a datatype name
+
+

OUTPUTS

+
  type_id       - datatype identifier
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

OPTIONAL PARAMETERS

+
  tapl_id       - datatype access property list identifier.
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+  Added optional parameter 'tapl_id' for compatability
+  with H5Topen2. April 9, 2009.
+
+

SOURCE

+
  SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
+    CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group
+    INTEGER(HID_T), INTENT(OUT) :: type_id  ! Datatype identifier
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier
+
+ +
+ +

h5tpack_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tpack_f
+
+

PURPOSE

+
  Recursively removes padding from within a compound datatype.
+
+

INPUTS

+
  type_id       - compound datatype identifier
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tpack_f(type_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_cset_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_cset_f
+
+

PURPOSE

+
  Sets character set to be used.
+
+

INPUTS

+
  type_id       - datatype identifier
+  cset          - character set type of a string datatype
+                    Possible values are:
+                     H5T_CSET_ASCII_F = 0
+                     H5T_CSET_UTF8_F
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_cset_f(type_id, cset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: cset !character set type of a string datatype
+                                           ! Possible values of padding type are:
+                                           ! H5T_CSET_ASCII_F = 0
+                                           ! H5T_CSET_UTF8_F
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_ebias_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_ebias_f
+
+

PURPOSE

+
  Sets the exponent bias of a floating-point type.
+
+

INPUTS

+
  type_id       - datatype identifier
+  ebias         - datatype exponent bias
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_fields_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_fields_f
+
+

PURPOSE

+
  Sets locations and sizes of floating point bit fields.
+
+

INPUTS

+
  type_id       - datatype identifier
+  spos          - sign bit-position
+  epos          - exponent bit-position
+  esize         - size of exponent in bits
+  mpos          - mantissa position
+  msize         - size of mantissa in bits
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(IN) :: spos   ! sign bit-position
+            INTEGER(SIZE_T), INTENT(IN) :: epos   ! exponent bit-position
+            INTEGER(SIZE_T), INTENT(IN) :: esize  ! size of exponent in bits
+            INTEGER(SIZE_T), INTENT(IN) :: mpos   ! mantissa bit-position
+            INTEGER(SIZE_T), INTENT(IN) :: msize  ! size of mantissa in bits
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_inpad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_inpad_f
+
+

PURPOSE

+
  Fills unused internal floating point bits.
+
+

INPUTS

+
  type_id       - datatype identifier
+  padtype       - padding type for unused bits
+                  Possible values of padding type are:
+                    H5T_PAD_ZERO_F = 0
+                    H5T_PAD_ONE_F = 1
+                    H5T_PAD_BACKGROUND_F = 2
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: padtype ! padding type for unused bits
+                                           ! in floating-point datatypes.
+                                           ! Possible values of padding type are:
+                                           ! H5T__PAD_ZERO_F = 0
+                                           ! H5T__PAD_ONE_F = 1
+                                           ! H5T__PAD_BACKGROUND_F = 2
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_norm_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_norm_f
+
+

PURPOSE

+
  Sets the mantissa normalization of a floating-point datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  norm          - normalization types, valid values are:
+                    H5T_NORM_IMPLIED_F(0)
+                    H5T_NORM_MSBSET_F(1)
+                    H5T_NORM_NONE_F(2)
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_norm_f(type_id, norm, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype
+                                         !Valid normalization types are:
+                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
+                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
+                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
+                                         !Mantissa is not normalize
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_offset_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_offset_f
+
+

PURPOSE

+
  Sets the bit offset of the first significant bit.
+
+

INPUTS

+
  type_id       - datatype identifier
+  offset        - offset value
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_offset_f(type_id, offset, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the
+                                           ! first significant bit
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_order_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_order_f
+
+

PURPOSE

+
  Sets the byte ordering of an atomic datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  order         - datatype byte order Possible values are:
+                    H5T_ORDER_LE_F
+                    H5T_ORDER_BE_F
+                    H5T_ORDER_VAX_F (not implemented yet)
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_order_f(type_id, order, hdferr)
+    IMPLICIT NONE
+    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+    INTEGER, INTENT(IN) :: order   ! Datatype byte order, possible values
+                                   ! are:
+                                   ! H5T_ORDER_LE_F
+                                   ! H5T_ORDER_BE_F
+                                   ! H5T_ORDER_VAX_F
+    INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ +
+ +

h5tset_pad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_pad_f
+
+

PURPOSE

+
  Sets the least and most-significant bits padding types.
+
+

INPUTS

+
  type_id       - datatype identifier
+  lsbpad        - least-significant bit padding type
+  msbpad        - most-significant bit padding type
+                  Possible values of padding type are:
+                    H5T_PAD_ERROR_F      = -1
+                    H5T_PAD_ZERO_F = 0
+                    H5T_PAD_ONE_F = 1
+                    H5T_PAD_BACKGROUND_F = 2
+                    H5T_PAD_NPAD_F      = 3
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: lsbpad ! padding type of the
+                                           ! least significant bit
+            INTEGER, INTENT(IN) :: msbpad ! padding type of the
+                                           ! most significant bit
+                                           ! Possible values of padding type are:
+                                           ! H5T_PAD_ZERO_F = 0
+                                           ! H5T_PAD_ONE_F = 1
+                                           ! H5T_PAD_BACKGROUND_F = 2
+                                           ! H5T_PAD_ERROR_F      = -1
+                                           ! H5T_PAD_NPAD_F      = 3
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_precision_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_precision_f
+
+

PURPOSE

+
  Sets the precision of an atomic datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  precision     - datatype precision
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_precision_f(type_id, precision, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_sign_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_sign_f
+
+

PURPOSE

+
  Sets the sign proprety for an integer type.
+
+

INPUTS

+
  type_id       - datatype identifier
+  sign          - sign type
+                  Possible values are:
+                    - Unsigned integer type 
+                        H5T_SGN_NONE_F = 0
+                    - Two's complement signed integer type
+                        H5T_SGN_2_F = 1
+                    - error value: H5T_SGN_ERROR_F=-1
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_sign_f(type_id, sign, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: sign !sign type for an integer type
+                                         !possible values are:
+                                         !Unsigned integer type H5T_SGN_NONE_F = 0
+                                         !Two's complement signed integer type
+                                         !H5T_SGN_2_F = 1
+                                         !or error value: H5T_SGN_ERROR_F=-1
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_size_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_size_f
+
+

PURPOSE

+
  Sets the total size for an atomic datatype.
+
+

INPUTS

+
  type_id       - datatype identifier
+  size          - size of the datatype
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_size_f(type_id, size, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_strpad_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_strpad_f
+
+

PURPOSE

+
  Defines the storage mechanism for character strings.
+
+

INPUTS

+
  type_id       - datatype identifier
+  strpad        - storage method for a string datatype
+                  Possible values are:
+                    H5T_STR_NULLTERM_F,
+                    H5T_STR_NULLPAD_F,
+                    H5T_STR_SPACEPAD_F
+                    H5T_STR_ERROR_F
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tset_tag_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tset_tag_f
+
+

PURPOSE

+
  Tags an opaque datatype.
+
+

INPUTS

+
  type_id       - identifier for opaque datatype
+  tag           - unique ASCII string with which the opaque
+                  datatype is to be tagged.
+
+

OUTPUTS

+
  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  March 7, 2001
+
+

SOURCE

+
  SUBROUTINE h5tset_tag_f(type_id, tag, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
+            CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which
+                                                !the opaque datatype is to be tagged
+            INTEGER, INTENT(OUT) :: hdferr        ! Error code
+
+ +
+ +

h5tvlen_create_f

+ +

[ Top ] [ H5T ] [ Subroutines ]

+

NAME

+
  h5tvlen_create_f
+
+

PURPOSE

+
  Creates a new variable-length datatype.
+
+

INPUTS

+
  type_id       - identifier iof base datatype
+
+

OUTPUTS

+
  vltype_id     - identifier for VL datatype
+  hdferr        - Returns 0 if successful and -1 if fails
+
+

AUTHOR

+
  Elena Pourmal
+  Wednesday, October 23, 2002
+
+

NOTES

+
  Only basic Fortran base datatypes are supported
+
+

SOURCE

+
  SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr)
+            IMPLICIT NONE
+            INTEGER(HID_T), INTENT(IN)  :: type_id    ! Datatype identifier
+            INTEGER(HID_T), INTENT(OUT) :: vltype_id  ! VL datatype identifier
+            INTEGER, INTENT(OUT) :: hdferr            ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Zf_c.html b/fortran/doc/DevelGuide/src/H5Zf_c.html new file mode 100644 index 0000000..2973548 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Zf_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5Zf.c + + + + + +
+
+ +

H5Zf

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   This file contains C stubs for H5Z Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5Zff_f90.html b/fortran/doc/DevelGuide/src/H5Zff_f90.html new file mode 100644 index 0000000..8ccd0ae --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5Zff_f90.html @@ -0,0 +1,173 @@ + + + + + + + +./src/H5Zff.f90 + + + + + +
+
+ +

H5Z

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5Z
+
+

PURPOSE

+
  This file contains Fortran interfaces for H5Z functions. It includes
+  all the functions that are independent on whether the Fortran 2003 functions
+  are enabled or disabled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5zfilter_avail_f

+ +

[ Top ] [ H5Z ] [ Subroutines ]

+

NAME

+
  h5zfilter_avail_f
+
+

PURPOSE

+
  Queries if filter is available
+
+

INPUTS

+
  filter        - filter
+
+

OUTPUTS

+
  status        - status; .TRUE. if filter is available,
+                  .FALSE. otherwise
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5zfilter_avail_f(filter, status, hdferr)
+    IMPLICIT NONE
+    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
+                                        !   H5Z_FILTER_DEFLATE_F
+                                        !   H5Z_FILTER_SZIP_F
+                                        !   H5Z_FILTER_NBIT_F
+                                        !   H5Z_FILTER_SCALEOFFSET_F
+                                        !   H5Z_FILTER_SHUFFLE_F
+                                        !   H5Z_FILTER_FLETCHER32_F
+    LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if filter
+                                        ! is availble  not ( TRUE or
+                                        ! FALSE)
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code
+
+ +
+ +

h5zget_filter_info_f

+ +

[ Top ] [ H5Z ] [ Subroutines ]

+

NAME

+
  h5zget_filter_info_f
+
+

PURPOSE

+
  Queries if filter has its encoder and/or decoder
+  available
+
+

INPUTS

+
  filter        - filter
+
+

OUTPUTS

+
  config_flags  - Bit vector possibly containing the
+                  following values:
+                     H5Z_FILTER_ENCODE_ENABLED_F
+                     H5Z_FILTER_DECODE_ENABLED_F
+  hdferr:       - error code
+                   Success:  0
+                   Failure: -1
+
+

AUTHOR

+
  Nat Furrer and James Laird
+  June 16, 2004
+
+

SOURCE

+
  SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr)
+    IMPLICIT NONE
+    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
+                                        !   H5Z_FILTER_DEFLATE_F
+                                        !   H5Z_FILTER_SZIP_F
+                                        !   H5Z_FILTER_NBIT_F
+                                        !   H5Z_FILTER_SCALEOFFSET_F
+                                        !   H5Z_FILTER_SHUFFLE_F
+                                        !   H5Z_FILTER_FLETCHER32_F
+    INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter
+                                        ! has its encoder and/or decoder
+                                        ! available
+    INTEGER, INTENT(OUT) :: hdferr      ! Error code
+
+ +
+ +

h5zunregister_f

+ +

[ Top ] [ H5Z ] [ Subroutines ]

+

NAME

+
  h5zunregister_f
+
+

PURPOSE

+
  Unregisters specified filetr
+
+

INPUTS

+
  filter - filter; may have one of the following values:
+            H5Z_FILTER_DEFLATE_F
+            H5Z_FILTER_SZIP_F
+            H5Z_FILTER_NBIT_F
+            H5Z_FILTER_SCALEOFFSET_F
+            H5Z_FILTER_SHUFFLE_F
+            H5Z_FILTER_FLETCHER32_F
+
+

OUTPUTS

+
  hdferr - error code
+            Success:  0
+            Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  March 12, 2003
+
+

SOURCE

+
  SUBROUTINE h5zunregister_f(filter, hdferr)
+    IMPLICIT NONE
+    INTEGER, INTENT(IN)  :: filter
+    INTEGER, INTENT(OUT) :: hdferr  ! Error code
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html new file mode 100644 index 0000000..4e51e7f --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html @@ -0,0 +1,53 @@ + + + + + + + +./src/H5_DBLE_InterfaceExclude.f90 + + + + + +
+
+ +

src/H5_DBLE_InterfaceExclude.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
   H5_DBLE_INTERFACE
+
+

FUNCTION

+
   This module is used for when the default REAL is of type DOUBLE PRECISION.
+   We do not include the double precision interfaces if the defaut REAL is
+   DOUBLE PRECISION since this would lead to a non-unique conflict with the
+   generic interfaces declared as REAL and those declared as DOUBLE PRECISION.
+
+

NOTES

+
   Empty module.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html new file mode 100644 index 0000000..5a71d52 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html @@ -0,0 +1,54 @@ + + + + + + + +./src/H5_DBLE_InterfaceInclude.f90 + + + + + +
+
+ +

src/H5_DBLE_InterfaceInclude.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
   H5_DBLE_INTERFACE
+
+

FUNCTION

+
   This module is used for when the default REAL is not of the type DOUBLE PRECISION.
+   We only do not include the double precision interfaces if the defaut REAL is
+   DOUBLE PRECISION since this would lead to a non-unique conflict with the
+   generic interfaces declared as REAL. Otherwise it is okay to include the interfaces.
+
+

NOTES

+
   This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines
+   from the HDF function catagory H5A, H5D and H5P.
+
+

AUTHOR

+
  M. Scot Breitenfeld
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_f_c.html b/fortran/doc/DevelGuide/src/H5_f_c.html new file mode 100644 index 0000000..2bdbce1 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_f_c.html @@ -0,0 +1,41 @@ + + + + + + + +./src/H5_f.c + + + + + +
+
+ +

fortran/src/H5_f.c

+ +

[ Top ] [ Modules ]

+

FUNCTION

+
   This file contains C stubs for H5 Fortran APIs
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html new file mode 100644 index 0000000..17f07c1 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html @@ -0,0 +1,83 @@ + + + + + + + +./src/H5_ff_F03.f90 + + + + + +
+
+ +

H5LIB_PROVISIONAL

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5LIB_PROVISIONAL
+
+

PURPOSE

+
  This file contains helper functions for Fortran 2003 features and is
+  only compiled when Fortran 2003 features are enabled, otherwise
+  the file H5_ff_F90.f90 is compiled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5offsetof

+ +

[ Top ] [ H5LIB_PROVISIONAL ] [ Functions ]

+

NAME

+
  h5offsetof
+
+

PURPOSE

+
  Computes the offset in memory
+
+

INPUTS

+
  start - starting pointer address
+  end   - ending pointer address
+
+

OUTPUTS

+
  offset - offset
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  Augest 25, 2008
+
+

SOURCE

+
  FUNCTION h5offsetof(start,end) RESULT(offset)
+    USE, INTRINSIC :: ISO_C_BINDING
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER(SIZE_T) :: offset
+    TYPE(C_PTR), VALUE, INTENT(IN) :: start, end
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html new file mode 100644 index 0000000..c310ef2 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html @@ -0,0 +1,48 @@ + + + + + + + +./src/H5_ff_F90.f90 + + + + + +
+
+ +

H5LIB_PROVISIONAL (F90)

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5LIB_PROVISIONAL
+
+

FILE

+
  fortran/src/H5_ff_F90.f90
+
+

PURPOSE

+
  This file is a dummy module for when Fortran 2003 features are not enabled.
+  It is compiled in place of H5_ff_F03.f90 and is empty.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5_ff_f90.html b/fortran/doc/DevelGuide/src/H5_ff_f90.html new file mode 100644 index 0000000..021c7c5 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5_ff_f90.html @@ -0,0 +1,269 @@ + + + + + + + +./src/H5_ff.f90 + + + + + +
+
+ +

H5LIB

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5LIB
+
+

PURPOSE

+
  This module provides fortran specific helper functions for the HDF library
+
+

USES

+
  H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003
+                      only features. If Fortran 2003 functions are enabled then
+                      H5_ff_F03.f90 is compiled, else H5_ff_F90.f90,
+                      which is just a place holder blank module, is compiled.
+
+

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.
+  This is needed for Windows based operating systems.
+
+ +
+ +

h5check_version_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5check_version_f
+
+

PURPOSE

+
  Verifies that library versions are consistent.
+
+

INPUTS

+
  majnum               - major version of the library
+  minum                - minor version of the library
+  relnum               - release version of the library
+
+

OUTPUTS

+
  error                - error code
+                          Success:  0
+                          Failure:  application aborts
+
+

AUTHOR

+
  Elena Pourmal
+  September 24, 2002
+
+

SOURCE

+
  SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(IN) :: majnum, minnum, relnum
+    INTEGER, INTENT(OUT) :: error
+
+ +
+ +

h5close_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5close_f
+
+

PURPOSE

+
  Closes the HDF5 library and Fortran90 interface.
+
+

OUTPUTS

+
  error - error code
+            Success:  0
+            Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5close_f(error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: error
+
+ +
+ +

h5dont_atexit_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5dont_atexit_f
+
+

PURPOSE

+
  Instructs library not to install atexit cleanup routine.
+
+

OUTPUTS

+
  error  - error code
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  September 24, 2002
+
+

SOURCE

+
  SUBROUTINE h5dont_atexit_f(error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: error
+
+ +
+ +

h5garbage_collect_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5garbage_collect_f
+
+

PURPOSE

+
  Garbage collects on all free-lists of all types.
+
+

OUTPUTS

+
  error  - error code
+             Success:  0
+             Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  September 24, 2002
+
+

SOURCE

+
  SUBROUTINE h5garbage_collect_f(error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: error
+
+ +
+ +

h5get_libversion_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5get_libversion_f
+
+

PURPOSE

+
  Returns the HDF5 LIbrary release number
+
+

OUTPUTS

+
  majnum               - major version of the library
+  minum                - minor version of the library
+  relnum               - release version of the library
+  error                - error code
+                           Success:  0
+                           Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  September 24, 2002
+
+

SOURCE

+
  SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error
+
+ +
+ +

h5kind_to_type

+ +

[ Top ] [ H5LIB ] [ Functions ]

+

NAME

+
  h5kind_to_type
+
+

PURPOSE

+
  Converts the KIND to the correct HDF type
+
+

INPUTS

+
  kind    - Fortran KIND parameter
+  flag    - whether KIND is of type INTEGER or REAL:
+              H5_INTEGER_KIND - integer
+              H5_REAL_KIND    - real
+
+

OUTPUTS

+
  h5_type - returns the type
+
+

AUTHOR

+
  M. Scot Breitenfeld
+  Augest 25, 2008
+
+

SOURCE

+
  INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(IN) :: kind
+    INTEGER, INTENT(IN) :: flag
+
+ +
+ +

h5open_f

+ +

[ Top ] [ H5LIB ] [ Subroutines ]

+

NAME

+
  h5open_f
+
+

PURPOSE

+
  Initializes the HDF5 library and Fortran90 interface.
+
+

OUTPUTS

+
  error - error code
+            Success:  0
+            Failure: -1
+
+

AUTHOR

+
  Elena Pourmal
+  August 12, 1999
+
+

HISTORY

+
  Explicit Fortran interfaces were added for
+  called C functions (it is needed for Windows
+  port).  February 28, 2001
+
+

SOURCE

+
  SUBROUTINE h5open_f(error)
+    USE H5GLOBAL
+    IMPLICIT NONE
+    INTEGER, INTENT(OUT) :: error
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5f90global_f90.html b/fortran/doc/DevelGuide/src/H5f90global_f90.html new file mode 100644 index 0000000..587b6d0 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5f90global_f90.html @@ -0,0 +1,61 @@ + + + + + + + +./src/H5f90global.f90 + + + + + +
+
+ +

H5GLOBAL

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE H5GLOBAL
+
+

FILE

+
  src/fortran/H5f90global.f90
+
+

PURPOSE

+
  This module is used to pass C stubs for H5 Fortran APIs. The C stubs are
+  packed into arrays in H5_f.c and these arrays are then passed to Fortran.
+  This module then uses EQUIVALENCE to assign elements of the arrays to
+  Fortran equivalent C stubs.
+
+

NOTES

+
  The size of the C arrays in H5_f.c has to match the values of the variables
+  declared as PARAMETER, hence if the size of an array in H5_f.c is changed
+  then the PARAMETER of that corresponding array in Fortran must also be changed.
+
+

USES

+
  H5FORTRAN_TYPES       - This module is generated at run time. See
+
+

AUTHOR

+
  Elena Pourmal
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5f90kit_c.html b/fortran/doc/DevelGuide/src/H5f90kit_c.html new file mode 100644 index 0000000..1329a87 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5f90kit_c.html @@ -0,0 +1,44 @@ + + + + + + + +./src/H5f90kit.c + + + + + +
+
+ +

H5f90kit

+ +

[ Top ] [ Modules ]

+

PURPOSE

+
   Routines from HDF4 to deal with C-FORTRAN issues:
+
+   HD5f2cstring   -- convert a Fortran string to a C string
+   HD5packFstring -- convert a C string into a Fortran string
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5match_types_c.html b/fortran/doc/DevelGuide/src/H5match_types_c.html new file mode 100644 index 0000000..083319a --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5match_types_c.html @@ -0,0 +1,49 @@ + + + + + + + +./src/H5match_types.c + + + + + +
+
+ +

H5match_types

+ +

[ Top ] [ Procedures ]

+

NAME

+
  Executable: H5match_types
+
+

FILE

+
  fortran/src/H5match_types.c
+
+

PURPOSE

+
  C Program to match C types to Fortran types.
+  Creates the files H5f90i_gen.h for the C code and
+  H5fortran_types.f90 for the Fortran code.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html new file mode 100644 index 0000000..3494db0 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html @@ -0,0 +1,61 @@ + + + + + + + +./src/H5test_kind_SIZEOF.f90 + + + + + +
+
+ +

H5test_kind_SIZEOF

+ +

[ Top ] [ Procedures ]

+

NAME

+
  Executable: H5test_kind
+
+

FILE

+
  fortran/src/H5test_kind_SIZEOF.f90
+
+

PURPOSE

+
  This stand alone program is used at build time to generate the program
+  H5fortran_detect.f90. It cycles through all the available KIND parameters for
+  integers and reals. The appropriate program and subroutines are then generated
+  depending on which of the KIND values are found.
+
+

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.
+
+  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
+  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
+
+

AUTHOR

+
  M. Scot Breitenfeld
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/H5test_kind_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_f90.html new file mode 100644 index 0000000..c08e488 --- /dev/null +++ b/fortran/doc/DevelGuide/src/H5test_kind_f90.html @@ -0,0 +1,62 @@ + + + + + + + +./src/H5test_kind.f90 + + + + + +
+
+ +

H5test_kind

+ +

[ Top ] [ Procedures ]

+

NAME

+
  Executable: H5test_kind
+
+

FILE

+
  fortran/src/H5test_kind.f90
+
+

PURPOSE

+
  This stand alone program is used at build time to generate the program
+  H5fortran_detect.f90. It cycles through all the available KIND parameters for
+  integers and reals. The appropriate program and subroutines are then generated
+  depending on which of the KIND values are found.
+
+

NOTES

+
  This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only
+  used when the Fortran intrinsic function SIZEOF is not available. It generates
+  code that does not make use of SIZEOF in H5fortran_detect.f90 which is less
+  portable in comparison to using SIZEOF.
+
+  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
+  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
+
+

AUTHOR

+
  Elena Pourma
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/HDF5_f90.html b/fortran/doc/DevelGuide/src/HDF5_f90.html new file mode 100644 index 0000000..1490c7c --- /dev/null +++ b/fortran/doc/DevelGuide/src/HDF5_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./src/HDF5.f90 + + + + + +
+
+ +

HDF5

+ +

[ Top ] [ Modules ]

+

NAME

+
  MODULE HDF5
+
+

FILE

+
  src/fortran/src/HDF5.f90
+
+

PURPOSE

+
  This is the main module used for linking to the Fortran HDF library.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/src/HDF5mpio_f90.html b/fortran/doc/DevelGuide/src/HDF5mpio_f90.html new file mode 100644 index 0000000..9ef5f32 --- /dev/null +++ b/fortran/doc/DevelGuide/src/HDF5mpio_f90.html @@ -0,0 +1,45 @@ + + + + + + + +./src/HDF5mpio.f90 + + + + + +
+
+ +

HDF5 (mpio)

+ +

[ Top ] [ Modules ]

+

NAME

+
  HDF5
+
+

PURPOSE

+
  This is the main module used for linking to the Fortran parallel HDF library.
+  This file replaces HDF5.f90 when compiling the parallel library.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/fflush1_f90.html b/fortran/doc/DevelGuide/test/fflush1_f90.html new file mode 100644 index 0000000..eaab841 --- /dev/null +++ b/fortran/doc/DevelGuide/test/fflush1_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/fflush1.f90 + + + + + +
+
+ +

fortran/test/fflush1.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  FFLUSH1EXAMPLE
+
+

FUNCTION

+
  This is the first half of a two-part test that makes sure
+  that a file can be read after an application crashes as long
+  as the file was flushed first.  We simulate by exit the 
+  the program using stop statement
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/fflush2_f90.html b/fortran/doc/DevelGuide/test/fflush2_f90.html new file mode 100644 index 0000000..23b7797 --- /dev/null +++ b/fortran/doc/DevelGuide/test/fflush2_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/fflush2.f90 + + + + + +
+
+ +

fortran/test/fflush2.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  fflush2.f90
+
+

FUNCTION

+
  This is the second half of a two-part test that makes sure
+  that a file can be read after an application crashes as long
+  as the file was flushed first.  This half tries to read the
+  file created by the first half.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html new file mode 100644 index 0000000..3ce387d --- /dev/null +++ b/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html @@ -0,0 +1,44 @@ + + + + + + + +./test/fortranlib_test_1_8.f90 + + + + + +
+
+ +

fortran/test/fortranlib_test_1_8.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  fortranlib_test_1_8.f90
+
+

FUNCTION

+
  Basic testing of Fortran API's introduced in 1.8 release.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html new file mode 100644 index 0000000..1a0c7be --- /dev/null +++ b/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html @@ -0,0 +1,45 @@ + + + + + + + +./test/fortranlib_test_F03.f90 + + + + + +
+
+ +

fortran/test/fortranlib_test_F03.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  fortranlib_test_F03.f90
+
+

FUNCTION

+
  Basic testing of Fortran API's requiring Fortran 2003
+  compliance.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_f90.html new file mode 100644 index 0000000..29fb2f1 --- /dev/null +++ b/fortran/doc/DevelGuide/test/fortranlib_test_f90.html @@ -0,0 +1,44 @@ + + + + + + + +./test/fortranlib_test.f90 + + + + + +
+
+ +

fortran/test/fortranlib_test.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  fortranlib_test.f90
+
+

FUNCTION

+
  Basic testing of Fortran API's functionality.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tF2003_f90.html b/fortran/doc/DevelGuide/test/tF2003_f90.html new file mode 100644 index 0000000..8101411 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tF2003_f90.html @@ -0,0 +1,53 @@ + + + + + + + +./test/tF2003.f90 + + + + + +
+
+ +

fortran/test/tF2003.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tF2003.f90
+
+

FUNCTION

+
  Test FORTRAN HDF5 APIs which are dependent on the FORTRAN 2003
+  features. Tests H5L, H5P, H5T APIs. 
+
+

USES

+
  liter_cb_mod, test_genprop_cls_cb1_mod
+
+

CONTAINS SUBROUTINES

+
  test_iter_group, test_create, test_genprop_class_callback,
+  test_array_compound_atomic, test_array_compound_array,
+  test_array_bkg 
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html new file mode 100644 index 0000000..c217d99 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html @@ -0,0 +1,51 @@ + + + + + + + +./test/tH5A_1_8.f90 + + + + + +
+
+ +

fortran/test/tH5A_1_8.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5A_1_8.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5A APIs introduced in 1.8.
+
+

CONTAINS SUBROUTINES

+
  attribute_test_1_8, test_attr_corder_create_compact, test_attr_null_space,
+  test_attr_create_by_name, test_attr_info_by_idx, attr_info_by_idx_check,
+  test_attr_shared_rename, test_attr_delete_by_idx, test_attr_shared_delete,
+  test_attr_dense_open, test_attr_dense_verify, test_attr_corder_create_basic,
+  test_attr_basic_write, test_attr_many, attr_open_check, 
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5A_f90.html b/fortran/doc/DevelGuide/test/tH5A_f90.html new file mode 100644 index 0000000..87c5a45 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5A_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5A.f90 + + + + + +
+
+ +

fortran/test/tH5A.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5A.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5A APIs.
+
+

CONTAINS SUBROUTINES

+
  attribute_test 
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5D_f90.html b/fortran/doc/DevelGuide/test/tH5D_f90.html new file mode 100644 index 0000000..c840425 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5D_f90.html @@ -0,0 +1,52 @@ + + + + + + + +./test/tH5D.f90 + + + + + +
+
+ +

fortran/test/tH5D.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5D.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5D APIs.
+
+

NOTES

+
  Tests the H5D APIs functionalities of:
+   h5dcreate_f, h5dopen_f, h5dclose_f, h5dget_space_f, h5dget_type_f,
+   h5dread_f, and h5dwrite_f
+
+

CONTAINS SUBROUTINES

+
  datasettest, extenddsettest
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5E_f90.html b/fortran/doc/DevelGuide/test/tH5E_f90.html new file mode 100644 index 0000000..6a1ef56 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5E_f90.html @@ -0,0 +1,51 @@ + + + + + + + +./test/tH5E.f90 + + + + + +
+
+ +

fortran/test/tH5E.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5E.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5E APIs.
+
+

NOTES

+
  Tests the H5D APIs functionalities of:
+   h5eprint_f
+
+

CONTAINS SUBROUTINES

+
  error_report_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5F_f90.html b/fortran/doc/DevelGuide/test/tH5F_f90.html new file mode 100644 index 0000000..d1aff59 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5F_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5F.f90 + + + + + +
+
+ +

fortran/test/tH5F.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5F.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5F APIs.
+
+

CONTAINS SUBROUTINES

+
  mountingtest, reopentest, plisttest, file_close, file_space
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html new file mode 100644 index 0000000..81fdd3c --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html @@ -0,0 +1,49 @@ + + + + + + + +./test/tH5G_1_8.f90 + + + + + +
+
+ +

fortran/test/tH5G_1_8.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5G_1_8.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5G APIs introduced in 1.8.
+
+

CONTAINS SUBROUTINES

+
  group_test, group_info, timestamps, mklinks, test_move_preserves, lifecycle
+  cklinks, delete_by_idx, link_info_by_idx_check, test_lcpl, objcopy, 
+  lapl_nlinks
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5G_f90.html b/fortran/doc/DevelGuide/test/tH5G_f90.html new file mode 100644 index 0000000..6c60a3c --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5G_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5G.f90 + + + + + +
+
+ +

fortran/test/tH5G.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5G.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5G APIs.
+
+

CONTAINS SUBROUTINES

+
  group_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5I_f90.html b/fortran/doc/DevelGuide/test/tH5I_f90.html new file mode 100644 index 0000000..52e21fc --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5I_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5I.f90 + + + + + +
+
+ +

fortran/test/tH5I.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5I.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5I APIs.
+
+

CONTAINS SUBROUTINES

+
  identifier_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5O_f90.html b/fortran/doc/DevelGuide/test/tH5O_f90.html new file mode 100644 index 0000000..a128da5 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5O_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5O.f90 + + + + + +
+
+ +

fortran/test/tH5O.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5O.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5O APIs.
+
+

CONTAINS SUBROUTINES

+
  test_h5o, test_h5o_link, test_h5o_plist
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5P_f90.html b/fortran/doc/DevelGuide/test/tH5P_f90.html new file mode 100644 index 0000000..edc0787 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5P_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5P.f90 + + + + + +
+
+ +

fortran/test/tH5P.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5P.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5P APIs.
+
+

CONTAINS SUBROUTINES

+
  external_test, multi_file_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5R_f90.html b/fortran/doc/DevelGuide/test/tH5R_f90.html new file mode 100644 index 0000000..fd44062 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5R_f90.html @@ -0,0 +1,51 @@ + + + + + + + +./test/tH5R.f90 + + + + + +
+
+ +

fortran/test/tH5R.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5R.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5R, Reference Interface, APIs.
+
+

NOTES

+
  Tests h5rcreate_f, h5rdereference_f, h5rget_name_f 
+  and H5Rget_object_type functions
+
+

CONTAINS SUBROUTINES

+
  refobjtest, refregtest
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5S_f90.html b/fortran/doc/DevelGuide/test/tH5S_f90.html new file mode 100644 index 0000000..5879d28 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5S_f90.html @@ -0,0 +1,54 @@ + + + + + + + +./test/tH5S.f90 + + + + + +
+
+ +

fortran/test/tH5S.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5S.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5S, Dataspace Interface, APIs.
+
+

NOTES

+
  Tests the following functionalities:
+   h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f,
+   h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f
+   h5sget_simple_extent_npoints_f, h5sget_simple_extent_type_f,
+   h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f
+
+

CONTAINS SUBROUTINES

+
  dataspace_basic_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5Sselect_f90.html b/fortran/doc/DevelGuide/test/tH5Sselect_f90.html new file mode 100644 index 0000000..e8eaa73 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5Sselect_f90.html @@ -0,0 +1,56 @@ + + + + + + + +./test/tH5Sselect.f90 + + + + + +
+
+ +

fortran/test/tH5Sselect.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5Sselect.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5S, Selection-related Dataspace Interface, APIs.
+
+

NOTES

+
  Tests the following functionalities:
+    h5sget_select_npoints_f, h5sselect_elements_f, h5sselect_all_f,
+    h5sselect_none_f, h5sselect_valid_f, h5sselect_hyperslab_f,
+    h5sget_select_bounds_f, h5sget_select_elem_pointlist_f,
+    h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f,
+    h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f   
+
+

CONTAINS SUBROUTINES

+
  test_select_hyperslab, test_select_element, test_basic_select,
+  test_select_point, test_select_combine, test_select_bounds
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5T_f90.html b/fortran/doc/DevelGuide/test/tH5T_f90.html new file mode 100644 index 0000000..35006b3 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5T_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5T.f90 + + + + + +
+
+ +

fortran/test/tH5T.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5T.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5T APIs.
+
+

CONTAINS SUBROUTINES

+
  compoundtest, basic_data_type_test, enumtest, test_derived_flt
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5VL_f90.html b/fortran/doc/DevelGuide/test/tH5VL_f90.html new file mode 100644 index 0000000..a34a01d --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5VL_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5VL.f90 + + + + + +
+
+ +

fortran/test/tH5VL.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5VL.f90
+
+

FUNCTION

+
  Basic testing of Fortran Variable_length datatypes APIs.
+
+

CONTAINS SUBROUTINES

+
  vl_test_integer, vl_test_real, vl_test_string 
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tH5Z_f90.html b/fortran/doc/DevelGuide/test/tH5Z_f90.html new file mode 100644 index 0000000..94325b9 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tH5Z_f90.html @@ -0,0 +1,47 @@ + + + + + + + +./test/tH5Z.f90 + + + + + +
+
+ +

fortran/test/tH5Z.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tH5Z.f90
+
+

FUNCTION

+
  Basic testing of Fortran H5Z szip APIs.
+
+

CONTAINS SUBROUTINES

+
  filters_test, szip_test
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/t_c.html b/fortran/doc/DevelGuide/test/t_c.html new file mode 100644 index 0000000..c9512a7 --- /dev/null +++ b/fortran/doc/DevelGuide/test/t_c.html @@ -0,0 +1,44 @@ + + + + + + + +./test/t.c + + + + + +
+
+ +

fortran/test/tc.c

+ +

[ Top ] [ Modules ]

+

NAME

+
   tc.c
+
+

FUNCTION

+
   This file contains C routines needed for the test programs.
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/test/tf_f90.html b/fortran/doc/DevelGuide/test/tf_f90.html new file mode 100644 index 0000000..e3c51f4 --- /dev/null +++ b/fortran/doc/DevelGuide/test/tf_f90.html @@ -0,0 +1,48 @@ + + + + + + + +./test/tf.f90 + + + + + +
+
+ +

fortran/test/tf.f90

+ +

[ Top ] [ Modules ]

+

NAME

+
  tf.f90
+
+

FUNCTION

+
  Contains subroutines which are needed in all the hdf5 fortran tests
+
+

CONTAINS SUBROUTINES

+
  write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f,
+  h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f
+
+ +
+ + + diff --git a/fortran/doc/DevelGuide/toc_index.html b/fortran/doc/DevelGuide/toc_index.html new file mode 100644 index 0000000..94a2792 --- /dev/null +++ b/fortran/doc/DevelGuide/toc_index.html @@ -0,0 +1,552 @@ + + + + + + + +Table of Contents + + + + +
+
+ +
+

TABLE OF CONTENTS

+ +
+ + + diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index f2dc896..fabc5cd 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -69,36 +69,38 @@ foreach (example ${examples}) endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) -foreach (example ${F2003_examples}) - add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} STATIC) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") - target_link_libraries (f03_ex_${example} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} - ) - target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (f03_ex_${example} PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} - ) - if (BUILD_SHARED_LIBS) - add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example}-shared SHARED) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") - target_link_libraries (f03_ex_${example}-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} +if (HDF5_ENABLE_F2003) + foreach (example ${F2003_examples}) + add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") + target_link_libraries (f03_ex_${example} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} ) - target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (f03_ex_${example}-shared PROPERTIES + target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) - endif (BUILD_SHARED_LIBS) -endforeach (example ${F2003_examples}) + if (BUILD_SHARED_LIBS) + add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") + target_link_libraries (f03_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f03_ex_${example}-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran03 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) + endforeach (example ${F2003_examples}) +endif (HDF5_ENABLE_F2003) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index cdd9317..caaa08c 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -46,10 +46,12 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \ # Add attention tests for Fortran 2003 features -EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ - compound_fortran2003 compound_complex_fortran2003 -INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ - compound_fortran2003.f90 compound_complex_fortran2003.f90 +if FORTRAN_2003_CONDITIONAL_F + EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ + compound_fortran2003 compound_complex_fortran2003 + INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ + compound_fortran2003.f90 compound_complex_fortran2003.f90 +endif TEST_SCRIPT=testh5fc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -101,10 +103,12 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 +if FORTRAN_2003_CONDITIONAL_F rwdset_fortran2003: rwdset_fortran2003.f90 nested_derived_type: nested_derived_type.f90 compound_fortran2003: compound_fortran2003.f90 compound_complex_fortran2003: compound_complex_fortran2003.f90 +endif include $(top_srcdir)/config/examples.am include $(top_srcdir)/config/conclude.am diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index f97fdc8..c894b75 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -104,6 +104,14 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ $(srcdir)/run-fortran-ex.sh.in $(srcdir)/testh5fc.sh.in \ $(top_srcdir)/bin/test-driver + +# Add attention tests for Fortran 2003 features +@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_1 = rwdset_fortran2003 nested_derived_type \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003 compound_complex_fortran2003 + +@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = rwdset_fortran2003.f90 nested_derived_type.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003.f90 compound_complex_fortran2003.f90 + TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -112,8 +120,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-fortran-ex.sh testh5fc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -397,21 +404,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -421,12 +421,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -468,18 +469,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -630,21 +619,17 @@ INSTALL_SCRIPT_FILES = run-fortran-ex.sh # be run. # We don't tell automake about these programs so that it doesn't try to # compile them with the regular fortran compiler. - -# Add attention tests for Fortran 2003 features 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 \ - rwdset_fortran2003 nested_derived_type compound_fortran2003 \ - compound_complex_fortran2003 + $(am__append_1) # List files to be installed here 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 \ - rwdset_fortran2003.f90 nested_derived_type.f90 \ - compound_fortran2003.f90 compound_complex_fortran2003.f90 + $(am__append_2) TEST_SCRIPT = testh5fc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -1082,10 +1067,10 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 -rwdset_fortran2003: rwdset_fortran2003.f90 -nested_derived_type: nested_derived_type.f90 -compound_fortran2003: compound_fortran2003.f90 -compound_complex_fortran2003: compound_complex_fortran2003.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@rwdset_fortran2003: rwdset_fortran2003.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@nested_derived_type: nested_derived_type.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_fortran2003: compound_fortran2003.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_complex_fortran2003: compound_complex_fortran2003.f90 # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90 index 65e7e75..f806110 100644 --- a/fortran/examples/nested_derived_type.f90 +++ b/fortran/examples/nested_derived_type.f90 @@ -23,13 +23,13 @@ PROGRAM main IMPLICIT NONE ! KIND parameters - INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(2) ! This should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(4) ! This should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(9) ! This should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(18) ! This should map to INTEGER*8 on most modern processors + INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(Fortran_INTEGER_1) ! This should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(Fortran_INTEGER_2) ! This should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! This should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(Fortran_INTEGER_8) ! This should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(6,37) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(15,307) ! This should map to REAL*8 on most modern processors + INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(Fortran_REAL_4) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(Fortran_REAL_8) ! This should map to REAL*8 on most modern processors ! FILES diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90 index 682676f..d65db9e 100644 --- a/fortran/examples/rwdset_fortran2003.f90 +++ b/fortran/examples/rwdset_fortran2003.f90 @@ -28,13 +28,13 @@ PROGRAM RWDSET_FORTRAN2003 IMPLICIT NONE - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors + INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors + 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(6,37) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(15,307) !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=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name @@ -148,12 +148,12 @@ PROGRAM RWDSET_FORTRAN2003 CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) ! memory type - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(2): ',data_out_i8a - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(4): ',data_out_i4 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(9): ',data_out_i8 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(18): ',data_out_i16 - WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(6,37): ',data_out_r7 - WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(15,307): ',data_out_r15 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_1): ',data_out_i8a + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_4): ',data_out_i4 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_8): ',data_out_i8 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_16): ',data_out_i16 + WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(Fortran_REAL_7): ',data_out_r7 + WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(Fortran_REAL_15): ',data_out_r15 ! ! Close the dataset. ! diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 8f63b3c..bb171d4 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -19,47 +19,100 @@ if (WIN32) endif (BUILD_SHARED_LIBS) endif (WIN32) -# configure for Fortran preprocessor - -# Define Parallel variable for passing to H5config_f.inc.cmake -set (CMAKE_H5_HAVE_PARALLEL 0) -if (H5_HAVE_PARALLEL) - set (CMAKE_H5_HAVE_PARALLEL 1) -endif (H5_HAVE_PARALLEL) - -set (CMAKE_H5_HAVE_FLOAT128 0) -if (HAVE_FLOAT128) - set (CMAKE_H5_HAVE_FLOAT128 1) -endif(HAVE_FLOAT128) - -configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) -configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) - #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5_buildiface.F90 used to generate various KIND interfaces -# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 +# H5test_kind(_SIZEOF,_STORAGE_SIZE).f90 used to generate H5fortran_detect.f90 +# H5fortran_detect.f90 used to generate H5fort_type_defines.h +# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90 #----------------------------------------------------------------------------- - -add_executable (H5_buildiface - ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90 +if (FORTRAN_HAVE_STORAGE_SIZE) + add_executable (H5test_FortranHavekind + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 ) - + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 + ) + endif (BUILD_SHARED_LIBS) + set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") +else (FORTRAN_HAVE_STORAGE_SIZE) + if (FORTRAN_HAVE_SIZEOF) + add_executable (H5test_FortranHavekind + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 + ) + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 + ) + endif (BUILD_SHARED_LIBS) + set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") + else (FORTRAN_HAVE_SIZEOF) + add_executable (H5test_FortranHavekind + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 + ) + if (BUILD_SHARED_LIBS) + add_executable (H5test_FortranHavekind-shared + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 + ) + endif (BUILD_SHARED_LIBS) + endif (FORTRAN_HAVE_SIZEOF) +endif (FORTRAN_HAVE_STORAGE_SIZE) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) - set_target_properties (H5_buildiface + set_target_properties (H5test_FortranHavekind-shared PROPERTIES COMPILE_FLAGS "/MT" ) endif (BUILD_SHARED_LIBS) - set_target_properties (H5_buildiface + set_target_properties (H5test_FortranHavekind PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) endif (WIN32 AND MSVC) -set_target_properties (H5_buildiface PROPERTIES +set_target_properties (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static +) +if (BUILD_SHARED_LIBS) + set_target_properties (H5test_FortranHavekind-shared PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif (BUILD_SHARED_LIBS) + +set (CMD $) +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + COMMAND ${CMD} + ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5test_FortranHavekind +) +#----------------------------------------------------------------------------- +add_executable (H5fortran_detect + ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 +) +if (WIN32 AND MSVC) + if (BUILD_SHARED_LIBS) + set_target_properties (H5fortran_detect + PROPERTIES + COMPILE_FLAGS "/MT" + ) + endif (BUILD_SHARED_LIBS) + set_target_properties (H5fortran_detect + PROPERTIES + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) +endif (WIN32 AND MSVC) +set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) + +set (CMD $) +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h + COMMAND ${CMD} + ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5fortran_detect ) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) @@ -71,7 +124,7 @@ add_executable (H5match_types set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 COMMAND ${CMD} WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types @@ -99,6 +152,12 @@ set (f90CStub_C_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c ) +if (H5_HAVE_PARALLEL) + set (f90CStub_C_SRCS + ${f90CStub_C_SRCS} + ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c + ) +endif (H5_HAVE_PARALLEL) set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS @@ -134,51 +193,79 @@ if (BUILD_SHARED_LIBS) set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE) - #----------------------------------------------------------------------------- -# Fortran Modules +# Fortran 2003 standard #----------------------------------------------------------------------------- -set (f90_F_BASE_SRCS - # generated files - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 +if (HDF5_ENABLE_F2003) + # F2003 features are enabled + set (F_STATUS "_F03") +else (HDF5_ENABLE_F2003) + # F2003 features are not enabled + set (F_STATUS "_F90") +endif (HDF5_ENABLE_F2003) - # normal distribution - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 -) +#----------------------------------------------------------------------------- +# Fortran Real Size +#----------------------------------------------------------------------------- +if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + # default real is 4 bytes, so include double signatures + set (F_DBLE "Include") +else (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + # default real is 8 bytes, so exclude double signatures + set (F_DBLE "Exclude") +endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) +#----------------------------------------------------------------------------- +# Fortran Modules +#----------------------------------------------------------------------------- set (f90_F_SRCS - ${f90_F_BASE_SRCS} - - # generated file - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + # generated files + ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 # normal distribution - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 -) - -set (CMD $) -add_custom_target (H5gen ALL - COMMAND ${CMD} -#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS ${f90_F_BASE_SRCS} + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff${F_STATUS}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.f90 + ${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 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff${F_STATUS}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff${F_STATUS}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.f90 ) +#----------------------------------------------------------------------------- +# Add H5FDMPIO if parallel +#----------------------------------------------------------------------------- +if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + set (f90_F_SRCS + ${f90_F_SRCS} + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 + ) +else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + set (f90_F_SRCS + ${f90_F_SRCS} + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 + ) +endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- @@ -239,15 +326,15 @@ endif (BUILD_SHARED_LIBS) # Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( - FILES - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h + FILES + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 - DESTINATION + ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT + COMPONENT fortheaders ) @@ -283,7 +370,17 @@ set (mod_files ${MOD_BUILD_DIR}/h5s.mod ${MOD_BUILD_DIR}/h5t.mod ${MOD_BUILD_DIR}/h5z.mod - ${MOD_BUILD_DIR}/h5_gen.mod + ${MOD_BUILD_DIR}/h5a_provisional.mod + ${MOD_BUILD_DIR}/h5d_provisional.mod + ${MOD_BUILD_DIR}/h5e_provisional.mod + ${MOD_BUILD_DIR}/h5f_provisional.mod + ${MOD_BUILD_DIR}/h5l_provisional.mod + ${MOD_BUILD_DIR}/h5lib_provisional.mod + ${MOD_BUILD_DIR}/h5o_provisional.mod + ${MOD_BUILD_DIR}/h5p_provisional.mod + ${MOD_BUILD_DIR}/h5r_provisional.mod + ${MOD_BUILD_DIR}/h5t_provisional.mod + ${MOD_BUILD_DIR}/h5_dble_interface.mod ) install ( FILES diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 8f012cf..bc2e9f1 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -1,6 +1,6 @@ /****h* H5Af/H5Af * PURPOSE - * This file contains C stubs for H5A Fortran APIs + * This file contains C stubs for H5A Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,73 +26,941 @@ /****if* H5Af/h5acreate_c * NAME - * h5acreate_c + * h5acreate_c * PURPOSE - * Call H5Acreate2 to create an attribute + * Call H5Acreate2 to create an attribute * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * type_id - datatype identifier - * space_id - dataspace identifier - * crt_pr - identifier of creation property list + * obj_id - object identifier + * name - name of the attribute + * namelen - name length + * type_id - datatype identifier + * space_id - dataspace identifier + * crt_pr - identifier of creation property list * OUTPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, + hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id) +/*******/ +{ + char *c_name = NULL; /* Buffer to hold C string */ + int_f ret_value = 0; /* Return value */ + + /* + * Convert FORTRAN name to C name + */ + if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen))) + HGOTO_DONE(FAIL); + + /* + * Call H5Acreate2 function. + */ + if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0) + HGOTO_DONE(FAIL); + +done: + if(c_name) + HDfree(c_name); + return ret_value; +} + +/****if* H5Af/h5aopen_name_c + * NAME + * h5aopen_name_c + * PURPOSE + * Call H5Aopen to open an attribute + * INPUTS + * obj_id - object identifier + * name - name of the attribute + * namelen - name length + * OUTPUTS + * attr_id - dataset identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) +/*******/ +{ + char *c_name = NULL; /* Buffer to hold C string */ + int_f ret_value = 0; /* Return value */ + + /* + * Convert FORTRAN name to C name + */ + if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) + HGOTO_DONE(FAIL); + + /* + * Call H5Aopen function. + */ + if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_name, H5P_DEFAULT)) < 0) + HGOTO_DONE(FAIL); + +done: + if(c_name) + HDfree(c_name); + return ret_value; +} + +/****if* H5Af/h5awritec_c + * NAME + * h5awritec_c + * PURPOSE + * Call h5awrite_c to write a character attribute + * INPUTS + * attr_id - dataset identifier + * mem_type_id - memory datatype identifier + * buf - character data buffer + * dims - array to store dimensions sizes of buf; used only + * by Fortran routine. + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday , August 12, 1999 + * HISTORY + * dims paramete added. + * April 4, 2001 + * SOURCE +*/ +int_f +nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} +int_f +nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + + + +/****if* H5Af/h5awrite_c + * NAME + * h5awrite_c + * PURPOSE + * Call H5Awrite to write a attribute + * INPUTS + * attr_id - attribute identifier + * mem_type_id - memory datatype identifier + * buf - data buffer + * dims - array to store dimensions sizes of buf; used only + * by Fortran routine. + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * dims parameter added + * April 4, 2001 + * Added nh5awrite_integer(real,double)_s,1-7 functions to eliminate + * complains about wrong parameters types in h5awrite_c function + * called by Fortran routines. + * October 9, 2006 EIP + * SOURCE +*/ +int_f +nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + /* + * Call h5awrite_c function. + */ + return nh5awrite_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) +/******/ +{ + int_f ret_value=0; /* Return value */ + + /* + * Call H5Awrite function. + */ + if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + + +/****if* H5Af/h5areadc_c + * NAME + * h5areadc_c + * PURPOSE + * Call h5aread_c to read character attribute + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * dims - array to store dimensions sizes of buf; used only + * by Fortran routine. + * OUTPUTS + * buf - character data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * dims parameter added. + * April 4, 2001 + * Added nh5areadc_s,1-7 functions to eliminate + * complains about wrong parameters types in h5awrite_c function + * called by Fortran routines. + * October 9, 2006 EIP + * SOURCE +*/ +int_f +nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} +int_f +nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + +int_f +nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} +int_f +nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); +} + + + +/****if* H5Af/h5aread_c + * NAME + * h5aread_c + * PURPOSE + * Call H5Aread to read an attribute + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * dims - array to store dimensions sizes of buf; used only + * by Fortran routine. + * OUTPUTS + * buf - data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * dims paramete added. + * April 4, 2001 + * Added nh5aread_integer(real,double)_s,1-7 functions to eliminate + * complains about wrong parameters types in h5awrite_c function + * called by Fortran routines. + * October 9, 2006 EIP + * SOURCE +*/ +int_f +nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + int_f ret_value=0; /* Return value */ + + /* + * Call H5Aread function. + */ + if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + +int_f +nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + +int_f +nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) +/******/ +{ + /* + * Call h5aread_c function. + */ + return nh5aread_c(attr_id, mem_type_id, buf, dims); +} + + +/****if* H5Af/h5aclose_c + * NAME + * h5aclose_c + * PURPOSE + * Call H5Aclose to close an attribute + * INPUTS + * attr_id - identifier of an attribute to be closed + * RETURNS + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ + int_f -h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, - hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id) -/*******/ +nh5aclose_c ( hid_t_f *attr_id ) +/******/ { - char *c_name = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; /* Return value */ - - /* - * Convert FORTRAN name to C name - */ - if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL); + int_f ret_value=0; /* Return value */ - /* - * Call H5Acreate2 function. - */ - if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0) + if (H5Aclose((hid_t)*attr_id) < 0) HGOTO_DONE(FAIL); done: - if(c_name) - HDfree(c_name); return ret_value; } /****if* H5Af/h5adelete_c * NAME - * h5adelete_c + * h5adelete_c * PURPOSE - * Call H5Adelete to delete an attribute + * Call H5Adelete to delete an attribute * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length + * obj_id - object identifier + * name - name of the attribute + * namelen - name length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) +nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -117,26 +985,131 @@ done: return ret_value; } + +/****if* H5Af/h5aopen_idx_c + * NAME + * h5aopen_idx_c + * PURPOSE + * Call H5Aopen_by_idx to open an attribute + * INPUTS + * obj_id - object identifier + * idx - attribute index ( zero based) + * OUTPUTS + * attr_id - attribute identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) +/******/ +{ + int_f ret_value = 0; /* Return value */ + + /* + * Call H5Aopen_by_idx function. + */ + if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + + +/****if* H5Af/h5aget_space_c + * NAME + * h5aget_space_c + * PURPOSE + * Call H5Aget_space to get attribute's dataspace + * INPUTS + * attr_id - attribute identifier + * OUTPUTS + * space_id - dataspace identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) +/******/ +{ + int_f ret_value=0; /* Return value */ + + /* + * Call H5Aget_space function. + */ + if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + +/****if* H5Af/h5aget_type_c + * NAME + * h5aget_type_c + * PURPOSE + * Call H5Aget_space to get attribute's datatype + * INPUTS + * attr_id - attribute identifier + * OUTPUTS + * type_id - datatype identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, August 12, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) +/******/ +{ + int_f ret_value=0; /* Return value */ + + /* + * Call H5Aget_type function. + */ + if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + /****if* H5Af/h5aget_num_attrs_c * NAME - * h5aget_num_attrs_c + * h5aget_num_attrs_c * PURPOSE - * Call H5Oget_info to determine number of - * attributes of an object + * Call H5Oget_info to determine number of + * attributes of an object * INPUTS - * obj_id - object identifier - * attr_num - number of attributes + * obj_id - object identifier + * attr_num - number of attributes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) +nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) /******/ { H5O_info_t oinfo; /* Object info */ @@ -157,25 +1130,25 @@ done: /****if* H5Af/h5aget_name_c * NAME - * h5aget_name_c + * h5aget_name_c * PURPOSE - * Call H5Aget_name to get attribute's name + * Call H5Aget_name to get attribute's name * INPUTS - * attr_id - attribute identifier - * bufsize - size of the buffer + * attr_id - attribute identifier + * bufsize - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) +nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) /******/ { size_t c_bufsize; @@ -206,36 +1179,99 @@ done: return ret_value; } +/****if* H5Af/h5aget_storage_size_c + * NAME + * h5aget_storage_size_c + * PURPOSE + * Call H5Aget_storage_size + * INPUTS + * attr_id - identifier of an attribute + * OUTPUTS + * size - attributes storage requirements + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * January, 2008 + * HISTORY + * N/A + * SOURCE +*/ + +int_f +nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) +/******/ +{ + int_f ret_value=0; /* Return value */ + + if ((*size = (hsize_t_f)H5Aget_storage_size((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} + +/****if* H5Af/h5aget_create_plist_c + * NAME + * h5aget_create_plist_c + * PURPOSE + * Call H5Aget_create_plist + * INPUTS + * attr_id - identifier of an attribute + * OUTPUTS + * creation_prop_id - Identifier for the attribute’s creation property + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * January, 2008 + * HISTORY + * N/A + * SOURCE +*/ + +int_f +nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) +/******/ +{ + int_f ret_value=0; /* Return value */ + + if ((*creation_prop_id = (hid_t_f)H5Aget_create_plist((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; +} /****if* H5Af/h5arename_by_name_c * NAME - * h5arename_by_name_c + * h5arename_by_name_c * PURPOSE - * Calls H5Arename_by_name + * Calls H5Arename_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object, relative to location, - * whose attribute is to be renamed - * obj_name_len - Object name length - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length - * lapl_id - Link access property list identifier + * loc_id - Object identifier + * obj_name - Name of object, relative to location, + * whose attribute is to be renamed + * obj_name_len - Object name length + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length + * lapl_id - Link access property list identifier * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ) @@ -270,27 +1306,27 @@ done: /****if* H5Af/h5aopen_c * NAME - * h5aopen_c + * h5aopen_c * PURPOSE - * Call H5Aopen to open an attribute + * Call H5Aopen to open an attribute * INPUTS - * obj_id - Identifer for object to which attribute is attached + * obj_id - Identifer for object to which attribute is attached * attr_name - Attribute access property list - * attr_namelen - size of attr_name - * aapl_id - Link access property list + * attr_namelen - size of attr_name + * aapl_id - Link access property list * OUTPUTS - * attr_id - dataset identifier + * attr_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) +nh5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) /******/ { char *c_attr_name = NULL; /* Buffer to hold C string */ @@ -315,30 +1351,30 @@ done: } /****if* H5Af/h5adelete_by_name_c * NAME - * h5adelete_by_name_c + * h5adelete_by_name_c * PURPOSE - * Call h5adelete_by_name to remove an attribute from a specified location + * Call h5adelete_by_name to remove an attribute from a specified location * INPUTS - * loc_id - identifer for object to which attribute is attached - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - identifer for object to which attribute is attached + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) +nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) /******/ { char *c_obj_name = NULL; /* Buffer to hold C string */ @@ -368,30 +1404,30 @@ done: } /****if* H5Af/h5adelete_by_idx_c * NAME - * h5adelete_by_idx_c + * h5adelete_by_idx_c * PURPOSE - * Call h5adelete_by_idx + * Call h5adelete_by_idx * INPUTS - * loc_id - Location or object identifier; may be dataset or group - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - Location or object identifier; may be dataset or group + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -418,50 +1454,50 @@ done: } /****if* H5Af/h5aget_name_by_idx_c * NAME - * h5aget_name_by_idx_c + * h5aget_name_by_idx_c * PURPOSE - * Call h5aget_name_by_idx + * Call h5aget_name_by_idx * INPUTS * * - * loc_id - Identifer for object to which attribute is attached - * obj_name - Name of object, relative to location, - * from which attribute is to be removed *TEST* check NULL - * idx_type - Type of index; Possible values are: + * loc_id - Identifer for object to which attribute is attached + * obj_name - Name of object, relative to location, + * from which attribute is to be removed *TEST* check NULL + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * attr_id - Attribute identifier - * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value + * n - Attribute’s position in index + * attr_id - Attribute identifier + * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value * - * lapl_id - Link access property list - * hdferr - Error code: - * Returns attribute name size, -1 if fail + * lapl_id - Link access property list + * hdferr - Error code: + * Returns attribute name size, -1 if fail * * OUTPUTS - * name - Attribute name + * name - Attribute name * * RETURNS - * Size of buffer on success, -1 on failure + * Size of buffer on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id) /******/ @@ -509,42 +1545,42 @@ done: /****if* H5Af/h5aopen_by_idx_c * NAME - * h5aopen_by_idx_c + * h5aopen_by_idx_c * PURPOSE - * Call H5Aopen_by_idx + * Call H5Aopen_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * aapl_id - Attribute access property list - * lapl_id - Link access property list + * n - Attribute’s position in index + * aapl_id - Attribute access property list + * lapl_id - Link access property list * OUTPUTS - * attr_id - attribute identifer + * attr_id - attribute identifer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) /******/ { @@ -572,29 +1608,29 @@ done: /****if* H5Af/h5aget_info_c * NAME - * h5aget_info_c + * h5aget_info_c * PURPOSE - * Call H5Aget_info + * Call H5Aget_info * INPUTS - * loc_id - Object identifier + * loc_id - Object identifier * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) /******/ { @@ -624,46 +1660,46 @@ done: /****if* H5Af/h5aget_info_by_idx_c * NAME - * h5aget_info_by_idx_c + * h5aget_info_by_idx_c * PURPOSE - * Call H5Aget_info_by_idx + * Call H5Aget_info_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * lapl_id - Link access property list + * n - Attribute’s position in index + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -703,34 +1739,34 @@ done: /****if* H5Af/h5aget_info_by_name_c * NAME - * h5aget_info_by_name_c + * h5aget_info_by_name_c * PURPOSE - * Call H5Aget_info_by_name + * Call H5Aget_info_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -774,38 +1810,38 @@ done: /****if* H5Af/h5acreate_by_name_c * NAME - * h5acreate_by_name_c + * h5acreate_by_name_c * PURPOSE - * Call h5acreate_by_name + * Call h5acreate_by_name * INPUTS * - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * type_id - Attribute datatype identifier - * space_id - Attribute dataspace identifier - * acpl_id - Attribute creation property list identifier (Currently not used.) - * aapl_id - Attribute access property list identifier (Currently not used.) - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * type_id - Attribute datatype identifier + * space_id - Attribute dataspace identifier + * acpl_id - Attribute creation property list identifier (Currently not used.) + * aapl_id - Attribute access property list identifier (Currently not used.) + * lapl_id - Link access property list * * OUTPUTS * - * attr - an attribute identifier + * attr - an attribute identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * N/A * SOURCE */ int_f -h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) @@ -840,27 +1876,27 @@ done: /****if* H5Af/h5aexists_c * NAME - * h5aexists_c + * h5aexists_c * PURPOSE * CAll h5aexists * INPUTS * - * obj_id - Object identifier - * attr_name - Attribute name + * obj_id - Object identifier + * attr_name - Attribute name * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) +nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -886,29 +1922,29 @@ done: /****if* H5Af/h5aexists_by_name_c * NAME - * h5aexists_by_name_c + * h5aexists_by_name_c * PURPOSE * CAll H5Aexists_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * lapl_id - Link access property list identifier + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists) /******/ { @@ -940,30 +1976,30 @@ done: /****if* H5Af/h5aopen_by_name_c * NAME - * h5aopen_by_name_c + * h5aopen_by_name_c * PURPOSE - * Call H5Aopen_by_name + * Call H5Aopen_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) - * lapl_id - Link access property list identifier + * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id) /******/ { @@ -995,29 +2031,29 @@ h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd a /****if* H5Af/h5arename_c * NAME - * h5arename_c + * h5arename_c * PURPOSE - * Calls H5Arename + * Calls H5Arename * INPUTS - * loc_id - Object identifier - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length + * loc_id - Object identifier + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5arename_c( hid_t_f *loc_id, +nh5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen) /******/ diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 deleted file mode 100644 index 132bf41..0000000 --- a/fortran/src/H5Aff.F90 +++ /dev/null @@ -1,1873 +0,0 @@ -!****h* ROBODoc/H5A -! -! NAME -! MODULE H5A -! -! PURPOSE -! This file contains Fortran interfaces for H5A functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 -! -! (A) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (1) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (2) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! (B) -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5A 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. -! -!***** - -#include - -MODULE H5A - - USE, INTRINSIC :: ISO_C_BINDING - - USE H5GLOBAL - - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_char_scalar - ! This is the preferred way to call h5awrite - ! by passing an address - MODULE PROCEDURE h5awrite_ptr - END INTERFACE - - INTERFACE h5aread_f - MODULE PROCEDURE h5aread_char_scalar - ! This is the preferred way to call h5aread - ! by passing an address - MODULE PROCEDURE h5aread_ptr - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Awrite routine - INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5awrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Aread routine - INTERFACE - INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5aread_f_c - END INTERFACE - -CONTAINS - -! -!****s* H5A/h5acreate_f -! -! NAME -! h5acreate_f -! -! PURPOSE -! Creates a dataset as an attribute of a group, dataset, or named datatype -! -! INPUTS -! loc_id - identifier of an object (group, dataset, -! or named datatype) attribute is attached to -! name - attribute name -! type_id - attribute datatype identifier -! space_id - attribute dataspace identifier -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier -! appl_id - Attribute access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & - hdferr, acpl_id, aapl_id ) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - INTERFACE - INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & - space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN), VALUE :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN), VALUE :: type_id - INTEGER(HID_T), INTENT(IN), VALUE :: space_id - INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default - INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default - END FUNCTION H5Acreate2 - END INTERFACE - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - IF (PRESENT(acpl_id)) acpl_id_default = acpl_id - IF (PRESENT(aapl_id)) aapl_id_default = aapl_id - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & - acpl_id_default, aapl_id_default) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE h5acreate_f - -! -!****s* H5A/h5aopen_name_f -! -! NAME -! h5aopen_name_f -! -! PURPOSE -! Opens an attribute specified by name. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype atttribute to be attached to -! name - attribute name -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - -! H5Aopen_name is deprecated - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen(obj_id, name, aapl_id) BIND(C,NAME='H5Aopen') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN), VALUE :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id - END FUNCTION H5Aopen - END INTERFACE - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = H5Aopen(obj_id, c_name, H5P_DEFAULT_F) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aopen_name_f -! -!****s* H5A/H5Aopen_idx_f -! -! NAME -! H5Aopen_idx_f -! -! PURPOSE -! Opens the attribute specified by its index. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype an attribute to be attached to -! index - index of the attribute to open (zero-based) -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(IN) :: index ! Attribute index - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** -! H5Aopen_idx is deprecated in favor of the function H5Aopen_by_idx. - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_by_idx(obj_id, index) BIND(C,NAME='H5Aopen_by_idx') - IMPORT :: HID_T - IMPORT :: C_INT - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(C_INT), INTENT(IN) :: index - END FUNCTION H5Aopen_by_idx - END INTERFACE - - attr_id = H5Aopen_by_idx(obj_id, INT(index, C_INT)) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aopen_idx_f -! -!****s* H5A/H5Aget_space_f -! -! NAME -! H5Aget_space_f -! -! PURPOSE -! Gets a copy of the dataspace for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! space_id - attribite dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_space - END INTERFACE - - space_id = H5Aget_space(attr_id) - - hdferr = 0 - IF(space_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_space_f -! -!****s* H5A/H5Aget_type_f -! -! NAME -! H5Aget_type_f -! -! PURPOSE -! Gets an attribute datatype. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! type_id - attribute datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_type - END INTERFACE - - type_id = H5Aget_type(attr_id) - - hdferr = 0 - IF(type_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_type_f -! -!****s* H5A/H5Aget_name_f -! -! NAME -! H5Aget_name_f -! -! PURPOSE -! Gets an attribute name. -! -! INPUTS -! attr_id - attribute identifier -! size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! name length is successful, -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) & - BIND(C,NAME='h5aget_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5aget_name_c - END INTERFACE - - hdferr = h5aget_name_c(attr_id, size, buf) - END SUBROUTINE h5aget_name_f -! -!****s* H5A/H5Aget_name_by_idx_f -! -! NAME -! H5Aget_name_by_idx_f -! -! PURPOSE -! Gets an attribute name, by attribute index position. -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS -! name - Attribute name -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! size - Size, in bytes, of attribute name -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & - n, name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed *TEST* check NULL - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! Returns attribute name size, - ! -1 if fail - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, - ! of the attribute -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) BIND(C,NAME='h5aget_name_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - INTEGER(SIZE_T) :: size_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_name_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5aget_name_by_idx_f -! -!****s* H5A/H5Aget_num_attrs_f -! -! NAME -! H5Aget_num_attrs_f -! -! PURPOSE -! Determines the number of attributes attached to an object. -! -! INPUTS -! obj_id - object (group, dataset, or named datatype) -! identifier -! OUTPUTS -! attr_num - number of attributes attached to the object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: attr_num - END FUNCTION h5aget_num_attrs_c - END INTERFACE - - hdferr = h5aget_num_attrs_c(obj_id, attr_num) - END SUBROUTINE h5aget_num_attrs_f - -! -!****s* H5A/H5Adelete_f -! -! NAME -! H5Adelete_f -! -! PURPOSE -! Deletes an attribute of an object (group, dataset or -! named datatype) -! -! INPUTS -! obj_id - object identifier -! name - attribute name -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE H5Adelete_f(obj_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - END FUNCTION H5Adelete_c - END INTERFACE - - namelen = LEN(name) - hdferr = H5Adelete_c(obj_id, name, namelen) - END SUBROUTINE H5Adelete_f - -! -!****s* H5A/H5Aclose_f -! -! NAME -! H5Aclose_f -! -! PURPOSE -! Closes the specified attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! SOURCE - - SUBROUTINE H5Aclose_f(attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aclose - END INTERFACE - - hdferr = INT(H5Aclose(attr_id)) - END SUBROUTINE H5Aclose_f - -! -!****s* H5A/H5Aget_storage_size_f -! -! NAME -! H5Aget_storage_size_f -! -! PURPOSE -! Returns the amount of storage required for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! size - attribute storage size -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') - IMPORT :: HID_T, HSIZE_T - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_storage_size - END INTERFACE - - size = H5Aget_storage_size(attr_id) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_storage_size_f - -! -!****s* H5A/H5Aget_create_plist_f -! -! NAME -! H5Aget_create_plist_f -! -! PURPOSE -! Gets an attribute creation property list identifier -! -! INPUTS -! attr_id - Identifier of the attribute -! OUTPUTS -! creation_prop_id - Identifier for the attribute’s creation property -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_create_plist - END INTERFACE - - creation_prop_id = H5Aget_create_plist(attr_id) - - hdferr = 0 - IF(creation_prop_id.LT.0) hdferr = -1 - - END SUBROUTINE H5Aget_create_plist_f - -! -!****s* H5A/H5Arename_by_name_f -! -! NAME -! H5Arename_by_name_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, -! whose attribute is to be renamed -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! lapl_id - Link access property list identifier -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! whose attribute is to be renamed - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) BIND(C,NAME='h5arename_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(SIZE_T) :: obj_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION H5Arename_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - - hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - - END SUBROUTINE H5Arename_by_name_f - -! -!****s* H5A/H5Aopen_f -! -! NAME -! H5Aopen_f -! -! PURPOSE -! Opens an attribute for an object specified by object -! identifier and attribute name -! -! INPUTS -! obj_id - Identifer for object to which attribute is attached -! attr_name - Name of attribute to open -! OUTPUTS -! attr_id - attribute identifier - -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! Success: 0 - ! Failure: -1 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list -!***** - INTEGER(HID_T) :: aapl_id_default - - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) & - BIND(C,NAME='h5aopen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - - hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_f - -! -!****s* H5A/H5Adelete_by_idx_f -! -! NAME -! H5Adelete_by_idx_f -! -! PURPOSE -! Deletes an attribute from an object according to index order -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, from which attribute is to be removed -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Offset within index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) & - BIND(C,NAME='h5adelete_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - obj_namelen = LEN(obj_name) - hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - - END SUBROUTINE H5Adelete_by_idx_f - -! -!****s* H5A/H5Adelete_by_name_f -! -! NAME -! H5Adelete_by_name_f -! -! PURPOSE -! Removes an attribute from a specified location -! -! INPUTS -! loc_id - Identifer for object to which attribute is attached -! obj_name - Name of attribute to open -! attr_name - Attribute access property list -! lapl_id - Link access property list -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) & - BIND(C,NAME='h5adelete_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - - END SUBROUTINE H5Adelete_by_name_f - -! -!****s* H5A/H5Aopen_by_idx_f -! -! NAME -! H5Aopen_by_idx_f -! -! PURPOSE -! Opens an existing attribute that is attached to an object specified by location and name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - END FUNCTION H5Aopen_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_by_idx_f - -! -!****s* H5A/H5Aget_info_f -! -! NAME -! H5Aget_info_f -! -! PURPOSE -! Retrieves attribute information, by attribute identifier -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! NOTE: In C it is defined as a structure: H5A_info_t -! -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! SOURCE - SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION H5Aget_info_c - END INTERFACE - - hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - - END SUBROUTINE H5Aget_info_f - -! -!****s* H5A/H5Aget_info_by_idx_f -! -! NAME -! H5Aget_info_by_idx_f -! -! PURPOSE -! Retrieves attribute information, by attribute index position -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Aget_info_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(present(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE H5Aget_info_by_idx_f - -! -!****s* H5A/H5Aget_info_by_name_f -! -! NAME -! H5Aget_info_by_name_f -! -! PURPOSE -! Retrieves attribute information, by attribute name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! attr_name - Attribute name -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - END FUNCTION H5Aget_info_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE H5Aget_info_by_name_f - -! -!****s* H5A/H5Acreate_by_name_f -! -! NAME -! H5Acreate_by_name_f -! -! PURPOSE -! Creates an attribute attached to a specified object -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name, relative to loc_id, of object that attribute is to be attached to -! attr_name - Attribute name -! type_id - Attribute datatype identifier -! space_id - Attribute dataspace identifier -! -! OUTPUTS -! attr - an attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier (Currently not used.) -! aapl_id - Attribute access property list identifier (Currently not used.) -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & - acpl_id, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT) :: attr - INTEGER, INTENT(OUT) :: hdferr - - INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) & - BIND(C,NAME='h5acreate_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr - - END FUNCTION H5Acreate_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(acpl_id)) acpl_id_default = acpl_id - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - END SUBROUTINE H5Acreate_by_name_f - -! -!****s* H5A/H5Aexists_f -! -! NAME -! H5Aexists_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! obj_id - Object identifier -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T) :: attr_exists_c - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) BIND(C,NAME='h5aexists_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: attr_exists_c - END FUNCTION H5Aexists_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE H5Aexists_f - -! -!****s* H5A/H5Aexists_by_name_f -! -! NAME -! H5Aexists_by_name_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! loc_id - Location identifier -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER :: attr_exists_c - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - lapl_id_default, attr_exists_c) BIND(C,NAME='h5aexists_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: attr_exists_c - END FUNCTION H5Aexists_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE H5Aexists_by_name_f -! -!****s* H5A/H5Aopen_by_name_f -! -! NAME -! H5Aopen_by_name_f -! -! PURPOSE -! Opens an attribute for an object by object name and attribute name. -! -! INPUTS -! loc_id - Location from which to find object to which attribute is attached -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - ! (Currently unused; should be passed in as H5P_DEFAULT_F) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE H5Aopen_by_name_f - -! -!****s* H5A/H5Arename_f -! -! NAME -! H5Arename_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! HISTORY -! N/A -! -! - -! SOURCE - SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) BIND(C,NAME='h5arename_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - END FUNCTION H5Arename_c - END INTERFACE - - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - hdferr = H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - - END SUBROUTINE H5Arename_f - - SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE H5Awrite_char_scalar - - SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_scalar_fix - - -!****s* H5A (F03)/H5Awrite_f_F03 -! -! NAME -! H5Awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Awrite_ptr - - SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) - - END SUBROUTINE H5Aread_char_scalar - - SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_scalar_fix - -!****s* H5A (F03)/H5Aread_f_F03 -! -! NAME -! H5Aread_f_F03 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! Fortran2003 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Aread_ptr - -END MODULE H5A - - diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 new file mode 100644 index 0000000..25f7fa7 --- /dev/null +++ b/fortran/src/H5Aff.f90 @@ -0,0 +1,1673 @@ +!****h* ROBODoc/H5A +! +! NAME +! MODULE H5A +! +! PURPOSE +! This file contains Fortran interfaces for H5A functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5A 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 H5A + + USE H5GLOBAL +! +! On Windows there are no big (integer*8) integers, so overloading +! for bug #670 does not work. I have to use DEC compilation directives to make +! Windows DEC Visual Fortran and OSF compilers happy and do right things. +! 05/01/02 EP +! + +CONTAINS + +! +!****s* H5A/h5acreate_f +! +! NAME +! h5acreate_f +! +! PURPOSE +! Creates a dataset as an attribute of a group, dataset, or named datatype +! +! INPUTS +! loc_id - identifier of an object (group, dataset, +! or named datatype) attribute is attached to +! name - attribute name +! type_id - attribute datatype identifier +! space_id - attribute dataspace identifier +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier +! appl_id - Attribute access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & + hdferr, acpl_id, aapl_id ) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(SIZE_T) :: namelen + INTERFACE + INTEGER FUNCTION h5acreate_c(loc_id, name, namelen, type_id, & + space_id, acpl_id_default, aapl_id_default, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_C'::h5acreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION h5acreate_c + END INTERFACE + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + namelen = LEN(name) + IF (PRESENT(acpl_id)) acpl_id_default = acpl_id + IF (PRESENT(aapl_id)) aapl_id_default = aapl_id + + hdferr = h5acreate_c(loc_id, name, namelen, type_id, space_id, & + acpl_id_default, aapl_id_default, attr_id) + + END SUBROUTINE h5acreate_f + + +! +!****s* H5A/h5aopen_name_f +! +! NAME +! h5aopen_name_f +! +! PURPOSE +! Opens an attribute specified by name. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype atttribute to be attached to +! name - attribute name +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5aopen_name_c(obj_id, name, namelen, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_NAME_C'::h5aopen_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION h5aopen_name_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5aopen_name_c(obj_id, name, namelen, attr_id) + END SUBROUTINE h5aopen_name_f +! +!****s* H5A/h5aopen_idx_f +! +! NAME +! h5aopen_idx_f +! +! PURPOSE +! Opens the attribute specified by its index. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype an attribute to be attached to +! index - index of the attribute to open (zero-based) +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(IN) :: index ! Attribute index + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aopen_idx_c(obj_id, index, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_IDX_C'::h5aopen_idx_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: index + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION h5aopen_idx_c + END INTERFACE + + hdferr = h5aopen_idx_c(obj_id, index, attr_id) + END SUBROUTINE h5aopen_idx_f +! +!****s* H5A/h5aget_space_f +! +! NAME +! h5aget_space_f +! +! PURPOSE +! Gets a copy of the dataspace for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! space_id - attribite dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5aget_space_c(attr_id, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_SPACE_C'::h5aget_space_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5aget_space_c + END INTERFACE + + hdferr = h5aget_space_c(attr_id, space_id) + END SUBROUTINE h5aget_space_f +! +!****s* H5A/h5aget_type_f +! +! NAME +! h5aget_type_f +! +! PURPOSE +! Gets an attribute datatype. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! type_id - attribute datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5aget_type_c(attr_id, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_TYPE_C'::h5aget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5aget_type_c + END INTERFACE + + hdferr = h5aget_type_c(attr_id, type_id) + END SUBROUTINE h5aget_type_f +! +!****s* H5A/h5aget_name_f +! +! NAME +! h5aget_name_f +! +! PURPOSE +! Gets an attribute name. +! +! INPUTS +! attr_id - attribute identifier +! size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! name length is successful, -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_C'::h5aget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buf + END FUNCTION h5aget_name_c + END INTERFACE + + hdferr = h5aget_name_c(attr_id, size, buf) + END SUBROUTINE h5aget_name_f + +! +!****s* H5A/h5aget_name_by_idx_f +! +! NAME +! h5aget_name_by_idx_f +! +! PURPOSE +! Gets an attribute name, by attribute index position. +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS +! name - Attribute name +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! size - Size, in bytes, of attribute name +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & + n, name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed *TEST* check NULL + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! Returns attribute name size, + ! -1 if fail + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, + ! of the attribute +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T) :: size_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5aget_name_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5aget_name_by_idx_f +! +!****s* H5A/h5aget_num_attrs_f +! +! NAME +! h5aget_num_attrs_f +! +! PURPOSE +! Determines the number of attributes attached to an object. +! +! INPUTS +! obj_id - object (group, dataset, or named datatype) +! identifier +! OUTPUTS +! attr_num - number of attributes attached to the object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NUM_ATTRS_C'::h5aget_num_attrs_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: attr_num + END FUNCTION h5aget_num_attrs_c + END INTERFACE + + hdferr = h5aget_num_attrs_c(obj_id, attr_num) + END SUBROUTINE h5aget_num_attrs_f + +! +!****s* H5A/h5adelete_f +! +! NAME +! h5adelete_f +! +! PURPOSE +! Deletes an attribute of an object (group, dataset or +! named datatype) +! +! INPUTS +! obj_id - object identifier +! name - attribute name +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5adelete_f(obj_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5adelete_c(obj_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_C'::h5adelete_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + END FUNCTION h5adelete_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5adelete_c(obj_id, name, namelen) + END SUBROUTINE h5adelete_f + +! +!****s* H5A/h5aclose_f +! +! NAME +! h5aclose_f +! +! PURPOSE +! Closes the specified attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! SOURCE + SUBROUTINE h5aclose_f(attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aclose_c(attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACLOSE_C'::h5aclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + END FUNCTION h5aclose_c + END INTERFACE + + hdferr = h5aclose_c(attr_id) + END SUBROUTINE h5aclose_f + +! +!****s* H5A/h5aget_storage_size_f +! +! NAME +! h5aget_storage_size_f +! +! PURPOSE +! Returns the amount of storage required for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! size - attribute storage size +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aget_storage_size_c(attr_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_STORAGE_SIZE_C'::h5aget_storage_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5aget_storage_size_c + END INTERFACE + + hdferr = h5aget_storage_size_c(attr_id, size) + END SUBROUTINE h5aget_storage_size_f + +! +!****s* H5A/h5aget_create_plist_f +! +! NAME +! h5aget_create_plist_f +! +! PURPOSE +! Gets an attribute creation property list identifier +! +! INPUTS +! attr_id - Identifier of the attribute +! OUTPUTS +! creation_prop_id - Identifier for the attribute’s creation property +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute + INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5aget_create_plist_c(attr_id, creation_prop_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_CREATE_PLIST_C'::h5aget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: creation_prop_id + END FUNCTION h5aget_create_plist_c + END INTERFACE + + hdferr = h5aget_create_plist_c(attr_id, creation_prop_id) + END SUBROUTINE h5aget_create_plist_f + +! +!****s* H5A/h5arename_by_name_f +! +! NAME +! h5arename_by_name_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, +! whose attribute is to be renamed +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! lapl_id - Link access property list identifier +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! whose attribute is to be renamed + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION h5arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::h5arename_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5arename_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default=lapl_id + + hdferr = h5arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + + END SUBROUTINE h5arename_by_name_f + +! +!****s* H5A/h5aopen_f +! +! NAME +! h5aopen_f +! +! PURPOSE +! Opens an attribute for an object specified by object +! identifier and attribute name +! +! INPUTS +! obj_id - Identifer for object to which attribute is attached +! attr_name - Name of attribute to open +! OUTPUTS +! attr_id - attribute identifier + +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! Success: 0 + ! Failure: -1 + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list +!***** + INTEGER(HID_T) :: aapl_id_default + + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::h5aopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: aapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION h5aopen_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + + hdferr = h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + + END SUBROUTINE h5aopen_f + +! +!****s* H5A/h5adelete_by_idx_f +! +! NAME +! h5adelete_by_idx_f +! +! PURPOSE +! Deletes an attribute from an object according to index order +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, from which attribute is to be removed +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Offset within index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::h5adelete_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5adelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + obj_namelen = LEN(obj_name) + hdferr = h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + + END SUBROUTINE h5adelete_by_idx_f + +! +!****s* H5A/h5adelete_by_name_f +! +! NAME +! h5adelete_by_name_f +! +! PURPOSE +! Removes an attribute from a specified location +! +! INPUTS +! loc_id - Identifer for object to which attribute is attached +! obj_name - Name of attribute to open +! attr_name - Attribute access property list +! lapl_id - Link access property list +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::h5adelete_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5adelete_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + + END SUBROUTINE h5adelete_by_name_f + +! +!****s* H5A/h5aopen_by_idx_f +! +! NAME +! h5aopen_by_idx_f +! +! PURPOSE +! Opens an existing attribute that is attached to an object specified by location and name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::h5aopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + END FUNCTION h5aopen_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE h5aopen_by_idx_f + +! +!****s* H5A/h5aget_info_f +! +! NAME +! h5aget_info_f +! +! PURPOSE +! Retrieves attribute information, by attribute identifier +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! NOTE: In C it is defined as a structure: H5A_info_t +! +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! SOURCE + SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::h5aget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + END FUNCTION h5aget_info_c + END INTERFACE + + hdferr = h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + + END SUBROUTINE h5aget_info_f + +! +!****s* H5A/h5aget_info_by_idx_f +! +! NAME +! h5aget_info_by_idx_f +! +! PURPOSE +! Retrieves attribute information, by attribute index position +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::h5aget_info_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5aget_info_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(present(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5aget_info_by_idx_f + +! +!****s* H5A/h5aget_info_by_name_f +! +! NAME +! h5aget_info_by_name_f +! +! PURPOSE +! Retrieves attribute information, by attribute name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! attr_name - Attribute name +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::h5aget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + END FUNCTION h5aget_info_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5aget_info_by_name_f + +! +!****s* H5A/h5acreate_by_name_f +! +! NAME +! h5acreate_by_name_f +! +! PURPOSE +! Creates an attribute attached to a specified object +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name, relative to loc_id, of object that attribute is to be attached to +! attr_name - Attribute name +! type_id - Attribute datatype identifier +! space_id - Attribute dataspace identifier +! +! OUTPUTS +! attr - an attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier (Currently not used.) +! aapl_id - Attribute access property list identifier (Currently not used.) +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & + acpl_id, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: attr + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::h5acreate_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr + + END FUNCTION h5acreate_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(acpl_id)) acpl_id_default = acpl_id + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + END SUBROUTINE h5acreate_by_name_f + +! +!****s* H5A/H5Aexists_f +! +! NAME +! H5Aexists_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! obj_id - Object identifier +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T) :: attr_exists_c + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::h5aexists_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: attr_exists_c + END FUNCTION h5aexists_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + hdferr = h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE h5aexists_f + +! +!****s* H5A/H5Aexists_by_name_f +! +! NAME +! H5Aexists_by_name_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! loc_id - Location identifier +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER :: attr_exists_c + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::h5aexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: attr_exists_c + END FUNCTION h5aexists_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE h5aexists_by_name_f +! +!****s* H5A/H5Aopen_by_name_f +! +! NAME +! H5Aopen_by_name_f +! +! PURPOSE +! Opens an attribute for an object by object name and attribute name. +! +! INPUTS +! loc_id - Location from which to find object to which attribute is attached +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + ! (Currently unused; should be passed in as H5P_DEFAULT_F) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::h5aopen_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION h5aopen_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE h5aopen_by_name_f + +! +!****s* H5A/h5arename_f +! +! NAME +! h5arename_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! HISTORY +! N/A +! +! + +! SOURCE + SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION h5arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::h5arename_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + + END FUNCTION h5arename_c + END INTERFACE + + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + hdferr = h5arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + + END SUBROUTINE h5arename_f + +END MODULE H5A + + diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90 new file mode 100644 index 0000000..5278280 --- /dev/null +++ b/fortran/src/H5Aff_F03.f90 @@ -0,0 +1,1267 @@ +!****h* ROBODoc/H5A (F03) +! NAME +! H5A_PROVISIONAL +! +! FILE +! src/fortran/src/H5Aff_F03.f90 +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions. +! It contains the same functions as H5Aff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 +! +! (A) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (1) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (2) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! (B) +! *** IMPORTANT *** +! If you add a new H5A 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 H5A_PROVISIONAL + + USE H5GLOBAL +! +! On Windows there are no big (integer*8) integers, so overloading +! for bug #670 does not work. I have to use DEC compilation directives to make +! Windows DEC Visual Fortran and OSF compilers happy and do right things. +! 05/01/02 EP +! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_real_scalar + MODULE PROCEDURE h5awrite_real_1 + MODULE PROCEDURE h5awrite_real_2 + MODULE PROCEDURE h5awrite_real_3 + MODULE PROCEDURE h5awrite_real_4 + MODULE PROCEDURE h5awrite_real_5 + MODULE PROCEDURE h5awrite_real_6 + MODULE PROCEDURE h5awrite_real_7 + ! This is the preferred way to call h5awrite + ! by passing an address + MODULE PROCEDURE h5awrite_ptr + + END INTERFACE + + INTERFACE h5aread_f + + MODULE PROCEDURE h5aread_integer_scalar + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_real_scalar + MODULE PROCEDURE h5aread_real_1 + MODULE PROCEDURE h5aread_real_2 + MODULE PROCEDURE h5aread_real_3 + MODULE PROCEDURE h5aread_real_4 + MODULE PROCEDURE h5aread_real_5 + MODULE PROCEDURE h5aread_real_6 + MODULE PROCEDURE h5aread_real_7 + + ! This is the preferred way to call h5aread + ! by passing an address + MODULE PROCEDURE h5aread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Awrite routine + + INTERFACE + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5awrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Aread routine + + INTERFACE + INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5aread_f_c + END INTERFACE + +CONTAINS + +!****s* H5A (F03)/h5awrite_f_F90 +! +! NAME +! h5awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_scalar + + SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_integer_1 + + + SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_2 + + SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_3 + + + SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_4 + + + SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_5 + + + SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_integer_6 + + + SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & + TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_integer_7 + + + SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_scalar + + SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_real_1 + + + SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_real_2 + + + SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_3 + + + SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_4 + + + SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_5 + + + SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_6 + + + SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5awrite_real_7 + + SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL h5awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + + END SUBROUTINE h5awrite_char_scalar + + SUBROUTINE h5awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_scalar_fix + + SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_1 + + SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_2 + + SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_3 + + SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_4 + + SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_5 + + + SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_6 + + SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5awrite_char_7 + +!****s* H5A (F03)/h5awrite_f_F03 +! +! NAME +! h5awrite_f_F03 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran2003 Interface: +!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5awrite_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5awrite_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE h5awrite_ptr + +!****s* H5A (F03)/h5aread_f_F90 +! +! NAME +! h5aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_scalar + + SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_1 + + + SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_2 + + + SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_3 + + + SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_4 + + + SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_5 + + + SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_6 + + + SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_integer_7 + + + SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_scalar + + SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_1 + + + SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_2 + + + SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_3 + + + SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_4 + + + SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_5 + + + SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_6 + + + SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE h5aread_real_7 + + SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL h5aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) + + END SUBROUTINE h5aread_char_scalar + + SUBROUTINE h5aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_scalar_fix + + SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_1 + + + SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_2 + + + SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_3 + + SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_4 + + SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_5 + + + SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_6 + + + SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE h5aread_char_7 + + +!****s* H5A (F03)/h5aread_f_F03 +! +! NAME +! h5aread_f_F03 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran2003 Interface: +!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5aread_ptr(attr_id, mem_type_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5aread_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE h5aread_ptr + +END MODULE H5A_PROVISIONAL + + diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90 new file mode 100644 index 0000000..974b023 --- /dev/null +++ b/fortran/src/H5Aff_F90.f90 @@ -0,0 +1,1618 @@ +!****h* ROBODoc/H5A (F90) +! +! NAME +! H5A_PROVISIONAL +! +! FILE +! fortran/src/H5Aff_F90.f90 +! +! PURPOSE +! +! This file contains Fortran 90 interfaces for H5A functions. It contains +! the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Aff_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. * +! 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 H5A 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 H5A_PROVISIONAL + + USE H5GLOBAL + ! + !On Windows there are no big (integer*8) integers, so overloading + !for bug #670 does not work. I have to use DEC compilation directives to make + !Windows DEC Visual Fortran and OSF compilers happy and do right things. + ! 05/01/02 EP + ! + INTERFACE h5awrite_f + + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_real_scalar + MODULE PROCEDURE h5awrite_real_1 + MODULE PROCEDURE h5awrite_real_2 + MODULE PROCEDURE h5awrite_real_3 + MODULE PROCEDURE h5awrite_real_4 + MODULE PROCEDURE h5awrite_real_5 + MODULE PROCEDURE h5awrite_real_6 + MODULE PROCEDURE h5awrite_real_7 + + END INTERFACE + + INTERFACE h5aread_f + + MODULE PROCEDURE h5aread_integer_scalar + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_real_scalar + MODULE PROCEDURE h5aread_real_1 + MODULE PROCEDURE h5aread_real_2 + MODULE PROCEDURE h5aread_real_3 + MODULE PROCEDURE h5aread_real_4 + MODULE PROCEDURE h5aread_real_5 + MODULE PROCEDURE h5aread_real_6 + MODULE PROCEDURE h5aread_real_7 + END INTERFACE + +CONTAINS + + SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_S_C'::h5awrite_integer_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN)::buf + END FUNCTION h5awrite_integer_s_c + END INTERFACE + + hdferr = h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_scalar + + SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awrite_integer_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_1_C'::h5awrite_integer_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), DIMENSION(dims(1)) :: buf + END FUNCTION h5awrite_integer_1_c + END INTERFACE + + hdferr = h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) + + END SUBROUTINE h5awrite_integer_1 + + + SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) , & + DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_2_C'::h5awrite_integer_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awrite_integer_2_c + END INTERFACE + + hdferr = h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_2 + + + SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_3_C'::h5awrite_integer_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awrite_integer_3_c + END INTERFACE + + hdferr = h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_3 + + + SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_4_C'::h5awrite_integer_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awrite_integer_4_c + END INTERFACE + + hdferr = h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_4 + + + SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_5_C'::h5awrite_integer_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awrite_integer_5_c + END INTERFACE + + hdferr = h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_5 + + + SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_6_C'::h5awrite_integer_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awrite_integer_6_c + END INTERFACE + + hdferr = h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_6 + + + SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_integer_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_7_C'::h5awrite_integer_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awrite_integer_7_c + END INTERFACE + + hdferr = h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_7 + + + SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_S_C'::h5awrite_real_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN)::buf + END FUNCTION h5awrite_real_s_c + END INTERFACE + + hdferr = h5awrite_real_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_scalar + + SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_1_C'::h5awrite_real_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5awrite_real_1_c + END INTERFACE + + hdferr = h5awrite_real_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_1 + + + SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_2_C'::h5awrite_real_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awrite_real_2_c + END INTERFACE + + hdferr = h5awrite_real_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_2 + + + SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_3_C'::h5awrite_real_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awrite_real_3_c + END INTERFACE + + hdferr = h5awrite_real_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_3 + + + SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_4_C'::h5awrite_real_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awrite_real_4_c + END INTERFACE + + hdferr = h5awrite_real_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_4 + + + SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_5_C'::h5awrite_real_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awrite_real_5_c + END INTERFACE + + hdferr = h5awrite_real_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_5 + + + SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_6_C'::h5awrite_real_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awrite_real_6_c + END INTERFACE + + hdferr = h5awrite_real_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_6 + + + SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_real_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_real_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_7_C'::h5awrite_real_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awrite_real_7_c + END INTERFACE + + hdferr = h5awrite_real_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_7 + + SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*),INTENT(IN) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_S_C'::h5awritec_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN)::buf + END FUNCTION h5awritec_s_c + END INTERFACE + + hdferr = h5awritec_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_scalar + + SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_1_C'::h5awritec_1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1))::buf + END FUNCTION h5awritec_1_c + END INTERFACE + + hdferr = h5awritec_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_1 + + + SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awritec_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_2_C'::h5awritec_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awritec_2_c + END INTERFACE + + hdferr = h5awritec_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_2 + + + SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_3_C'::h5awritec_3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awritec_3_c + END INTERFACE + + hdferr = h5awritec_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_3 + + + SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_4_C'::h5awritec_4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awritec_4_c + END INTERFACE + + hdferr = h5awritec_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_4 + + + SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_5_C'::h5awritec_5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awritec_5_c + END INTERFACE + + hdferr = h5awritec_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_5 + + + SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_6_C'::h5awritec_6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awritec_6_c + END INTERFACE + + hdferr = h5awritec_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_6 + + + SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! INTEGER, EXTERNAL :: h5awritec_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awritec_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_7_C'::h5awritec_7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awritec_7_c + END INTERFACE + + hdferr = h5awritec_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_7 + +! +! NAME +! h5aread_f +! +! PURPOSE +! Reads an attribute. +! +! INPUTS +! attr_id - attribute identifier +! memtype_id - attribute memory type identifier +! dims - 1D array of size 7, stores sizes of the +! - buf array dimensions. +! OUTPUTS +! buf - buffer to read attribute data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! April 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! + + SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_S_C'::h5aread_integer_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT)::buf + END FUNCTION h5aread_integer_s_c + END INTERFACE + hdferr = h5aread_integer_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_scalar + + SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_1_C'::h5aread_integer_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf + END FUNCTION h5aread_integer_1_c + END INTERFACE + + hdferr = h5aread_integer_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_1 + + + SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_2_C'::h5aread_integer_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5aread_integer_2_c + END INTERFACE + + hdferr = h5aread_integer_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_2 + + + SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_3_C'::h5aread_integer_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5aread_integer_3_c + END INTERFACE + + hdferr = h5aread_integer_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_3 + + + SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_4_C'::h5aread_integer_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5aread_integer_4_c + END INTERFACE + + hdferr = h5aread_integer_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_4 + + + SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_5_C'::h5aread_integer_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5aread_integer_5_c + END INTERFACE + + hdferr = h5aread_integer_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_5 + + + SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_6_C'::h5aread_integer_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5aread_integer_6_c + END INTERFACE + + hdferr = h5aread_integer_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_6 + + + SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_integer_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_integer_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_7_C'::h5aread_integer_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5aread_integer_7_c + END INTERFACE + + hdferr = h5aread_integer_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_7 + + + SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_S_C'::h5aread_real_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT)::buf + END FUNCTION h5aread_real_s_c + END INTERFACE + + hdferr = h5aread_real_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_scalar + + SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_1_C'::h5aread_real_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5aread_real_1_c + END INTERFACE + + hdferr = h5aread_real_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_1 + + + SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_2_C'::h5aread_real_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5aread_real_2_c + END INTERFACE + + hdferr = h5aread_real_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_2 + + + SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_3_C'::h5aread_real_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5aread_real_3_c + END INTERFACE + + hdferr = h5aread_real_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_3 + + + SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_4_C'::h5aread_real_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5aread_real_4_c + END INTERFACE + + hdferr = h5aread_real_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_4 + + + SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_5_C'::h5aread_real_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5aread_real_5_c + END INTERFACE + + hdferr = h5aread_real_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_5 + + + SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_6_C'::h5aread_real_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5aread_real_6_c + END INTERFACE + + hdferr = h5aread_real_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_6 + + + SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_real_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_real_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_7_C'::h5aread_real_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5aread_real_7_c + END INTERFACE + + hdferr = h5aread_real_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_7 + + SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_S_C'::h5areadc_s_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT) :: buf + END FUNCTION h5areadc_s_c + END INTERFACE + + hdferr = h5areadc_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_scalar + + SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_1_C'::h5areadc_1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5areadc_1_c + END INTERFACE + + hdferr = h5areadc_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_1 + + + SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_2_C'::h5areadc_2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5areadc_2_c + END INTERFACE + + hdferr = h5areadc_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_2 + + + SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_3_C'::h5areadc_3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5areadc_3_c + END INTERFACE + + hdferr = h5areadc_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_3 + + + SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_4_C'::h5areadc_4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5areadc_4_c + END INTERFACE + + hdferr = h5areadc_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_4 + + + SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_5_C'::h5areadc_5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5areadc_5_c + END INTERFACE + + hdferr = h5areadc_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_5 + + + SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_6_C'::h5areadc_6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5areadc_6_c + END INTERFACE + + hdferr = h5areadc_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_6 + + + SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5areadc_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5areadc_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_7_C'::h5areadc_7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5areadc_7_c + END INTERFACE + + hdferr = h5areadc_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_7 + +END MODULE H5A_PROVISIONAL + + diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 57b4d4d..0d32dac 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -1,6 +1,6 @@ /****h* H5Df/H5Df * PURPOSE - * This file contains C stubs for H5D Fortran APIs + * This file contains C stubs for H5D Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -48,7 +48,7 @@ * SOURCE */ int_f -h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -84,118 +84,1161 @@ DONE: * PURPOSE * Call H5Dopen2 to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * dapl_id - Dataset access property list + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * dapl_id - Dataset access property list * OUTPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, August 4, 1999 + * HISTORY + * Added 1.8 parameter: dapl_id + * SOURCE +*/ +int_f +nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) +/******/ +{ + char *c_name = NULL; + hid_t c_dset_id; + int ret_value = -1; + + /* + * Convert FORTRAN name to C name + */ + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) + goto DONE; + + /* + * Call H5Dopen2 function. + */ + if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0) + goto DONE; + + *dset_id = (hid_t_f)c_dset_id; + ret_value = 0; + +DONE: + if(c_name) + HDfree(c_name); + return ret_value; +} + + +/****if* H5Df/h5dwritec_c + * NAME + * h5dwritec_c + * PURPOSE + * Call h5dwrite_c to write a dataset of characters + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - character data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Tuesday, May 14, 2002 + * HISTORY + * This function is added to accomodate oveloaded h5dwrite_f + * with the dims argument being of INTEGER(HSIZE_T) type + + * SOURCE +*/ +int_f +nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +/******/ +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dwrite_c function. + */ + ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +/****if* H5Df/h5dwrite_c + * NAME + * h5dwrite_c + * PURPOSE + * Call H5Dwrite to write a dataset + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Tuesday, May 14, 2002 + * HISTORY + * This function is added to accomodate oveloaded h5dwrite_f + * with the dims argument being of INTEGER(HSIZE_T) type + * + * Added nh5dwrite_integer(real,double)_s,1-7_c functions to eliminate + * complains about wrong parameter types in h5dwrite_c function + * called by Fortran rouitnes + * October 10, 2006 EIP + * + * SOURCE +*/ +int_f +nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims) +/******/ +{ + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Call H5Dwrite function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); + + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +int_f +nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +int_f +nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dwrite_c function. + */ + return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + + +/****if* H5Df/h5dwrite_ref_obj_c + * NAME + * h5dwrite_ref_obj_c + * PURPOSE + * Call H5Dwrite to write a dataset of object references + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer with references to the objects. + * n - number of references to be stored. + * RETURNS + * 0 on success,e-1 on failure + * AUTHOR + * Elena Pourmal + * Tuesday, May 14, 2002 + * HISTORY + * This function was added to accomodate h5dwrite_f with the + * dims argumnet being of INTEGER(HSIZE_T) type. + * SOURCE +*/ +int_f +nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) +/******/ +{ + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hobj_ref_t *buf_c; + unsigned int i, n; + + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Allocate temporary buffer and copy references from Fortran. + */ + n = (unsigned int)*dims; + buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); + if ( buf_c != NULL ) { + for (i = 0; i < n; i++) + HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); + } + else return ret_value; + + /* + * Call H5Dwrite function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + HDfree(buf_c); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +/****if* H5Df/h5dwrite_ref_reg_c + * NAME + * h5dwrite_ref_reg_c + * PURPOSE + * Call H5Dwrite to write a dataset of dataset region references + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer with references to the objects. + * n - number of references to be stored. * RETURNS * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Tuesday, May 14, 2002 + * HISTORY + * This function was added to accomodate h5dwrite_f with the + * dims argument being of INTEGER(HSIZE_T) type + * SOURCE +*/ +int_f +nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) +/******/ +{ + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hdset_reg_ref_t *buf_c = NULL; + unsigned int i, n; + + n = (unsigned int)*dims; + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Allocate temporary buffer and copy references from Fortran. + */ + buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); + if ( buf_c != NULL ) { + for (i = 0; i < n; i++) { + HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); + buf = buf + REF_REG_BUF_LEN_F; + } + } + else return ret_value; + + + /* + * Call H5Dwrite function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + HDfree(buf_c); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + + + +/****if* H5Df/h5dreadc_c + * NAME + * h5dreadc_c + * PURPOSE + * Call h5dread_c to read a dataset of characters + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * OUTPUTS + * buf - character data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, May 15, 2002 + * HISTORY + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * SOURCE +*/ +int_f +nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) +/******/ +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +int_f +nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) + +{ + int ret_value = -1; + + /* + * Call h5dread_c function. + */ + ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); + + return ret_value; +} + +/****if* H5Df/h5dread_c + * NAME + * h5dread_c + * PURPOSE + * Call H5Draed to read a dataset + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * OUTPUTS + * buf - data buffer + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, May 15, 2002 * HISTORY - * Added 1.8 parameter: dapl_id + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * + * Added nh5dread_integer(real,double)_s,1-7_c functions to eliminate + * complains about wrong parameter types in h5dwrite_c function + * called by Fortran rouitnes + * October 10, 2006 EIP + * * SOURCE */ int_f -h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) -/******/ +nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims) +/******/ +{ + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Call H5Dread function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); + + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +int_f +nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + { - char *c_name = NULL; - hid_t c_dset_id; - int ret_value = -1; + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} +int_f +nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ /* - * Convert FORTRAN name to C name + * Call h5dread_c function. */ - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - goto DONE; + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +int_f +nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +{ /* - * Call H5Dopen2 function. + * Call h5dread_c function. */ - if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0) - goto DONE; + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} - *dset_id = (hid_t_f)c_dset_id; - ret_value = 0; +int_f +nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) -DONE: - if(c_name) - HDfree(c_name); - return ret_value; +{ + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); } -/****if* H5Df/h5dwrite_ref_reg_c - * NAME - * h5dwrite_ref_reg_c - * PURPOSE - * Call H5Dwrite to write a dataset of dataset region references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argument being of INTEGER(HSIZE_T) type - * SOURCE -*/ int_f -h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) -/******/ +nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + { - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c = NULL; - unsigned int i, n; + /* + * Call h5dread_c function. + */ + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} - n = (unsigned int)*dims; +int_f +nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ /* - * Define transfer property + * Call h5dread_c function. */ - c_xfer_prp = (hid_t)*xfer_prp; + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} +int_f +nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + +{ /* - * Allocate temporary buffer and copy references from Fortran. + * Call h5dread_c function. */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) { - HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); - buf = buf + REF_REG_BUF_LEN_F; - } - } - else return ret_value; + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} +int_f +nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) +{ /* - * Call H5Dwrite function. + * Call h5dread_c function. */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; + return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +} + +/****if* H5Df/h5dread_ref_obj_c + * NAME + * h5dread_ref_obj_c + * PURPOSE + * Call H5Dread to read a dataset of object references + * INPUTS + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer to store references to the objects. + * n - number of references to be stored. + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, May 15, 2002 + * HISTORY + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * SOURCE +*/ +int_f +nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims) +/******/ +{ + int ret_value = -1; + herr_t ret = -1; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hobj_ref_t *buf_c = NULL; + hsize_t i,n; + + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Allocate temporary buffer. + */ + n = (hsize_t)*dims; + buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n); + if ( buf_c != NULL ) { + /* + * Call H5Dread function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + if (ret >=0) { + for (i = 0; i < n; i++) + HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t)); + } + if ( buf_c != NULL ) HDfree(buf_c); + } + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; } /****if* H5Df/h5dread_ref_reg_c @@ -204,25 +1247,25 @@ h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i * PURPOSE * Call H5Dread to read a dataset of dataset region references * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer to store references to the objects. - * n - number of references to be stored. + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer to store references to the objects. + * n - number of references to be stored. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, May 15, 2002 + * Wednesday, May 15, 2002 * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. * SOURCE */ int_f -h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) +nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -274,19 +1317,19 @@ h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id * PURPOSE * Call H5Dclose to close a dataset * INPUTS - * dset_id - identifier of the dataset to be closed + * dset_id - identifier of the dataset to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -h5dclose_c ( hid_t_f *dset_id ) +nh5dclose_c ( hid_t_f *dset_id ) /******/ { int ret_value = 0; @@ -302,21 +1345,21 @@ h5dclose_c ( hid_t_f *dset_id ) * PURPOSE * Call H5Dget_space to obtain dataspace of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * space_id - identifier of the dataset's dataspace + * space_id - identifier of the dataset's dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) +nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) /******/ { int ret_value = -1; @@ -337,21 +1380,21 @@ h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) * PURPOSE * Call H5Dget_type to obtain datatype of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * type_id - identifier of the dataset's datatype + * type_id - identifier of the dataset's datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) +nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) /******/ { int ret_value = -1; @@ -373,23 +1416,23 @@ h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) * h5dget_create_plist_c * PURPOSE * Call H5Dget_create_plist to obtain creation property list - * of a dataset + * of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * plist_id - identifier of he dataset creation property list + * plist_id - identifier of he dataset creation property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) +nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -413,24 +1456,24 @@ h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) * PURPOSE * Call H5Dset_extent to extend dataset with unlimited dimensions * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * dims - array with the dimension sizes + * dims - array with the dimension sizes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * * HISTORY - * Changed name from the now obsolete h5dextend - * to h5dset_extent in order to match new fortran interface. + * Changed name from the now obsolete h5dextend + * to h5dset_extent in order to match new fortran interface. * -MSB- March 14, 2008 * SOURCE */ int_f -h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) +nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) /******/ { hid_t c_space_id; @@ -460,28 +1503,28 @@ h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) return ret_value; } -/****if* H5Df/h5dget_storage_size_c +/****if* H5Df/nh5dget_storage_size_c * NAME - * h5dget_storage_size_c + * nh5dget_storage_size_c * PURPOSE * Call H5Dget_storage_size to return the amount of storage - * required for a dataset + * required for a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * size - the amount of storage required for a dataset + * size - the amount of storage required for a dataset * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE */ int_f -h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) +nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -496,29 +1539,29 @@ h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) return ret_value; } -/****if* H5Df/h5dvlen_get_max_len_c +/****if* H5Df/nh5dvlen_get_max_len_c * NAME - * h5dvlen_get_max_len_c + * nh5dvlen_get_max_len_c * PURPOSE * Get the maximum size of the VL dataset element * INPUTS - * dset_id - identifier of the dataset - * type_id - datatype identifier - * space_id - dataspace identifier + * dset_id - identifier of the dataset + * type_id - datatype identifier + * space_id - dataspace identifier * OUTPUTS - * len - maximum length of the VL dataset element + * len - maximum length of the VL dataset element * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE */ int_f -h5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) +nh5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) /******/ { int ret_value = -1; @@ -554,34 +1597,34 @@ DONE: HDfree(c_buf); return ret_value; } -/****if* H5Df/h5dwrite_vl_integer_c +/****if* H5Df/nh5dwrite_vl_integer_c * NAME - * h5dwrite_vl_integer_c + * nh5dwrite_vl_integer_c * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE */ int_f -h5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -627,35 +1670,35 @@ DONE: return ret_value; } -/****if* H5Df/h5dread_vl_integer_c +/****if* H5Df/nh5dread_vl_integer_c * NAME - * h5dread_vl_integer_c + * nh5dread_vl_integer_c * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 24, 2002 + * Wednesday, October 24, 2002 * HISTORY * * SOURCE */ int_f -h5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -699,33 +1742,33 @@ DONE: return ret_value; } -/****if* H5Df/h5dwrite_vl_string_c +/****if* H5Df/nh5dwrite_vl_string_c * NAME - * h5dwrite_vl_string_c + * nh5dwrite_vl_string_c * PURPOSE * Write variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 28, 2002 + * Monday, October 28, 2002 * HISTORY * * SOURCE */ int_f -h5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -786,33 +1829,33 @@ DONE: HDfree(tmp); return ret_value; } -/****if* H5Df/h5dread_vl_string_c +/****if* H5Df/nh5dread_vl_string_c * NAME - * h5dread_vl_string_c + * nh5dread_vl_string_c * PURPOSE * Read variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * Output: buf - data buffer - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * Output: buf - data buffer + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, November 1, 2002 + * Friday, November 1, 2002 * HISTORY * * SOURCE */ int_f -h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -869,34 +1912,34 @@ h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac return ret_value; } -/****if* H5Df/h5dwrite_vl_real_c +/****if* H5Df/nh5dwrite_vl_real_c * NAME - * h5dwrite_vl_real_c + * nh5dwrite_vl_real_c * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE */ int_f -h5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -942,35 +1985,35 @@ DONE: return ret_value; } -/****if* H5Df/h5dread_vl_real_c +/****if* H5Df/nh5dread_vl_real_c * NAME - * h5dread_vl_real_c + * nh5dread_vl_real_c * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE */ int_f -h5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1015,6 +2058,39 @@ DONE: return ret_value; } +/****if* H5Df/h5dfillc_c + * NAME + * h5dfillc_c + * PURPOSE + * Call h5fill_c to fill memory buffer with a fill value + * INPUTS + * fill_value - fill value + * fill_type_id - fill value datatype identifier + * space_id - memory space selection identifier + * buf - memory buffer to fill + * mem_type_id - memory buffer dtatype identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, March 12, 2003 + * HISTORY + * + * SOURCE +*/ +int_f +nh5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id) +/******/ +{ + int ret_value = -1; + + /* + * Call h5dfill_c function. + */ + ret_value = h5dfill_c(_fcdtocp(fill_value), fill_type_id, space_id, _fcdtocp(buf), mem_type_id); + + return ret_value; +} /****if* H5Df/h5dfill_c * NAME * h5dfill_c @@ -1059,26 +2135,98 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b return ret_value; } +int_f +nh5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) + +{ + int ret_value = -1; + herr_t ret; + hid_t c_fill_type_id; + hid_t c_mem_type_id; + hid_t c_space_id; + + c_fill_type_id = (hid_t)*fill_type_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_space_id = (hid_t)*space_id; + + /* + * Call H5Dfill function. + */ + ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); + + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +int_f +nh5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) + +{ + int ret_value = -1; + herr_t ret; + hid_t c_fill_type_id; + hid_t c_mem_type_id; + hid_t c_space_id; + + c_fill_type_id = (hid_t)*fill_type_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_space_id = (hid_t)*space_id; + + /* + * Call H5Dfill function. + */ + ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); + + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +int_f +nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) + +{ + int ret_value = -1; + herr_t ret; + hid_t c_fill_type_id; + hid_t c_mem_type_id; + hid_t c_space_id; + + c_fill_type_id = (hid_t)*fill_type_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_space_id = (hid_t)*space_id; + + /* + * Call H5Dfill function. + */ + ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); + + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + /****if* H5Df/h5dget_space_status_c * NAME * h5dget_space_status_c * PURPOSE * Call H5Dget_space_status to request dataspace allocation status * INPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) +nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) /******/ { int ret_value = -1; @@ -1108,21 +2256,21 @@ h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) * loc_id - Identifier of the file or group within which to create the dataset. * type_id - Identifier of the datatype to use when creating the dataset. * space_id - Identifier of the dataspace to use when creating the dataset. - * dcpl_id - Dataset creation property list identifier. - * dapl_id - Dataset access property list identifier. + * dcpl_id - Dataset creation property list identifier. + * dapl_id - Dataset access property list identifier. * OUTPUTS * - * dset_id - dataset identifier + * dset_id - dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * SOURCE */ int_f -h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -1207,8 +2355,8 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, * file_space_id - file dataspace identifier * xfer - file transfer property * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer * len - array element lenghts @@ -1248,9 +2396,9 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, ret_value = 0; return ret_value; } -/****if* H5Df/h5dget_access_plist_c +/****if* H5Df/nh5dget_access_plist_c * NAME - * h5dget_access_plist_c + * nh5dget_access_plist_c * PURPOSE * Call H5Dget_access_plist * INPUTS @@ -1266,7 +2414,7 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, * SOURCE */ int_f -h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) +nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -1282,22 +2430,22 @@ h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) return ret_value; } -/****if* H5Df/h5dvlen_reclaim_c +/****if* H5Df/nh5dvlen_reclaim_c * NAME * h5dvlen_reclaim_c * PURPOSE * Call H5Dvlen_reclaim * INPUTS - * type_id - Identifier of the datatype. - * space_id - Identifier of the dataspace. - * plist_id - Identifier of the property list used to create the buffer. - * buf - Pointer to the buffer to be reclaimed. + * type_id - Identifier of the datatype. + * space_id - Identifier of the dataspace. + * plist_id - Identifier of the property list used to create the buffer. + * buf - Pointer to the buffer to be reclaimed. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January 15, 2011 + * January 15, 2011 * * SOURCE */ diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 deleted file mode 100644 index afdb5ba..0000000 --- a/fortran/src/H5Dff.F90 +++ /dev/null @@ -1,1878 +0,0 @@ -!****h* ROBODoc/H5D -! -! NAME -! MODULE H5D -! -! FILE -! fortran/src/H5Dff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5D 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed. Therefore, we can not create just one subroutine for -! each array type (integer, real, etc...) and use a -! rank 1 array of assumed size to handle multiple ranks, i.e. -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may -! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved -! the statement instead to each subroutine. -! -! -! (4) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (A) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (B) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require the -! argument in C_LOC to be of the variant: -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5D 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. -! -!***** - -#include - -MODULE H5D - - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - - INTERFACE h5dextend_f - MODULE PROCEDURE h5dset_extent_f - END INTERFACE - - INTERFACE h5dread_vl_f - MODULE PROCEDURE h5dread_vl_integer - MODULE PROCEDURE h5dread_vl_real - MODULE PROCEDURE h5dread_vl_string - END INTERFACE - - INTERFACE h5dwrite_vl_f - MODULE PROCEDURE h5dwrite_vl_integer - MODULE PROCEDURE h5dwrite_vl_real - MODULE PROCEDURE h5dwrite_vl_string - END INTERFACE - - INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_char_scalar - ! This is the preferred way to call h5dwrite - ! by passing an address - MODULE PROCEDURE h5dwrite_ptr - END INTERFACE - - INTERFACE h5dread_f - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_char_scalar - ! This is the preferred way to call h5dread - ! by passing an address - MODULE PROCEDURE h5dread_ptr - - END INTERFACE - - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dwrite routine - - INTERFACE - INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & - mem_space_id_default , & - file_space_id_default, & - xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dwrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dread routine - - INTERFACE - INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dread_f_c - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_c_float - MODULE PROCEDURE h5dfill_c_double -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - MODULE PROCEDURE h5dfill_c_long_double -#endif - MODULE PROCEDURE h5dfill_char - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dfill routine - - INTERFACE - INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - TYPE(C_PTR), VALUE :: f_ptr_fill_value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - TYPE(C_PTR), VALUE :: f_ptr_buf - INTEGER(HID_T) :: mem_type_id - END FUNCTION h5dfill_c - END INTERFACE - -CONTAINS - -! -!****s* H5D/h5dcreate_f -! -! NAME -! h5dcreate_f -! -! PURPOSE -! Creates a dataset at the specified location -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! type_id - dataset datatype identifier -! space_id - dataset dataspace identifier -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! creation_prp - Dataset creation property list -! lcpl_id - Link creation property list -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! - Added version's 1.8 new optional parameters -! February, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & - hdferr, dcpl_id, lcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & - space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) & - BIND(C,NAME='h5dcreate_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & - lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_f - -! -!****s* H5D/h5dopen_f -! -! NAME -! h5dopen_f -! -! PURPOSE -! Opens an existing dataset. -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! -Added 1.8 (optional) parameter dapl_id -! February, 2008, M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list -!***** - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: dapl_id_default - - INTERFACE - INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) & - BIND(C,NAME='h5dopen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dopen_c - END INTERFACE - - dapl_id_default = H5P_DEFAULT_F - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - - END SUBROUTINE h5dopen_f - -! -!****s* H5D/h5dclose_f -! -! NAME -! h5dclose_f -! -! PURPOSE -! Closes a dataset. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dclose_f(dset_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dclose_c(dset_id) & - BIND(C,NAME='h5dclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - END FUNCTION h5dclose_c - END INTERFACE - - hdferr = h5dclose_c(dset_id) - - END SUBROUTINE h5dclose_f - -! -!****s* H5D/h5dget_type_f -! -! NAME -! h5dget_type_f -! -! PURPOSE -! Returns an identifier for a copy of the datatype for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! datatype_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! -! SOURCE - SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_type_c(dataset_id, datatype_id) & - BIND(C,NAME='h5dget_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: datatype_id - END FUNCTION h5dget_type_c - END INTERFACE - - hdferr = h5dget_type_c (dataset_id, datatype_id) - END SUBROUTINE h5dget_type_f - -! -!****s* H5D/h5dset_extent -! -! NAME -! h5dset_extent (instead of obsolete name: h5dextend_f) -! -! PURPOSE -! Extends a dataset with unlimited dimension. -! -! INPUTS -! dataset_id - dataset identifier -! size - array containing the new magnitude of -! each dimension -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Changed name from the now obsolete h5dextend_f -! to h5dset_extent_f. Provided interface to old name -! for backward compatability. -MSB- March 14, 2008 -! -! SOURCE - SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dset_extent_c(dataset_id, size) & - BIND(C,NAME='h5dset_extent_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - END FUNCTION h5dset_extent_c - END INTERFACE - - hdferr = H5Dset_extent_c(dataset_id, size) - END SUBROUTINE h5dset_extent_f - -!****s* H5D/h5dget_create_plist_f -! -! NAME -! h5dget_create_plist_f -! -! PURPOSE -! Returns an identifier for a copy of the dataset creation -! property list for a dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! plist_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! SOURCE - SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation - ! property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) & - BIND(C,NAME='h5dget_create_plist_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_create_plist_c - END INTERFACE - - hdferr = h5dget_create_plist_c(dataset_id, plist_id) - END SUBROUTINE h5dget_create_plist_f - -! -!****s* H5D/h5dget_storage_size_f -! -! NAME -! h5dget_storage_size_f -! -! PURPOSE -! Returns the amount of storage requires by a dataset -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! size - datastorage size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! SOURCE - SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage - ! allocated for dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) & - BIND(C,NAME='h5dget_storage_size_c') - IMPORT :: HID_T, HSIZE_T - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5dget_storage_size_c - END INTERFACE - - hdferr = h5dget_storage_size_c(dataset_id, size) - END SUBROUTINE h5dget_storage_size_f - -! -!****s* H5D/h5dvlen_get_max_len_f -! -! NAME -! h5dvlen_get_max_len_f -! -! PURPOSE -! Returns maximum length of the VL array elements -! -! INPUTS -! dataset_id - dataset identifier -! type_id - datatype identifier -! space_id - dataspace identifier -! OUTPUTS -! size - buffer size -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! -! SOURCE - SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) & - BIND(C,NAME='h5dvlen_get_max_len_c') - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(SIZE_T), INTENT(OUT) :: len - END FUNCTION h5dvlen_get_max_len_c - END INTERFACE - - hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - END SUBROUTINE h5dvlen_get_max_len_f - -! -!****s* H5D/h5dget_space_status_f -! -! NAME -! h5dget_space_status_f -! -! PURPOSE -! Returns the status of data space allocation. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! flag - status; may have one of the following values: -! H5D_SPACE_STS_ERROR_F -! H5D_SPACE_STS_NOT_ALLOCATED_F -! H5D_SPACE_STS_PART_ALLOCATED_F -! H5D_SPACE_STS_ALLOCATED_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - !***** - INTERFACE - INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) & - BIND(C,NAME='h5dget_space_status_c') - IMPORT :: HID_T - INTEGER(HID_T) :: dset_id - INTEGER :: flag - END FUNCTION h5dget_space_status_c - END INTERFACE - - hdferr = h5dget_space_status_c(dset_id, flag) - END SUBROUTINE h5dget_space_status_f - -! -!****s* H5D/h5dcreate_anon_f -! -! NAME -! h5dcreate_anon_f -! -! PURPOSE -! Creates a dataset in a file without linking it into the file structure -! -! INPUTS -! loc_id - Identifier of the file or group within which to create the dataset. -! type_id - Identifier of the datatype to use when creating the dataset. -! space_id - Identifier of the dataspace to use when creating the dataset. -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dcpl_id - Dataset creation property list identifier. -! dapl_id - Dataset access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 11, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. -!***** - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) & - BIND(C,NAME='h5dcreate_anon_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_anon_c - END INTERFACE - - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_anon_f - - SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) & - BIND(C,NAME='h5dwrite_vl_integer_c') - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_integer_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_integer - - SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) & - BIND(C,NAME='h5dread_vl_integer_c') - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_integer_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_integer - - SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) & - BIND(C,NAME='h5dwrite_vl_real_c') - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_real_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_real - - SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) & - BIND(C,NAME='h5dread_vl_real_c') - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_real_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_real - - SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - ! xfer_prp_default, tmp_buf, dims, str_len) - xfer_prp_default, buf, dims, str_len) & - BIND(C,NAME='h5dwrite_vl_string_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len - CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf - END FUNCTION - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - - END SUBROUTINE h5dwrite_vl_string - - SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store - ! the length of each - ! element - CHARACTER(LEN=*), INTENT(OUT), & - DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, str_len) & - BIND(C,NAME='h5dread_vl_string_c') - IMPORT :: c_char - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len - CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf - END FUNCTION h5dread_vl_string_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - RETURN - END SUBROUTINE h5dread_vl_string - -! -!****s* H5D/h5dget_offset_f -! -! NAME -! h5dget_offset_f -! -! PURPOSE -! Returns dataset address in file. -! -! INPUTS -! dataset_id - Dataset identifier. -! OUTPUTS -! offset - The offset in bytes. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 16, 2015 -! -! SOURCE - SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T), INTENT(OUT) :: offset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER(HADDR_T) FUNCTION h5dget_offset(dset_id) BIND(C,NAME='H5Dget_offset') - IMPORT :: HID_T, HADDR_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN), VALUE :: dset_id - END FUNCTION h5dget_offset - END INTERFACE - - offset = h5dget_offset(dset_id) - - hdferr = 0 - IF(offset .LT. 0) hdferr = -1 - - END SUBROUTINE h5dget_offset_f - -! -!****s* H5D/h5dget_space_f -! -! NAME -! h5dget_space_f -! -! PURPOSE -! Returns an identifier for a copy of the dataspace for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! dataspace_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) BIND(C,NAME='h5dget_space_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: dataspace_id - END FUNCTION h5dget_space_c - END INTERFACE - - hdferr = h5dget_space_c(dataset_id, dataspace_id) - END SUBROUTINE h5dget_space_f - -!****s* H5D/h5dget_access_plist_f -! -! NAME -! h5dget_access_plist_f -! -! PURPOSE -! Returns a copy of the dataset creation property list. -! -! INPUTS -! dset_id - Dataset identifier -! -! OUTPUTS -! plist_id - Dataset access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! SOURCE - SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - INTEGER , INTENT(OUT) :: hdferr - !***** - INTERFACE - INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) BIND(C,NAME='h5dget_access_plist_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_access_plist_c - END INTERFACE - - hdferr = h5dget_access_plist_c(dset_id, plist_id) - - END SUBROUTINE h5dget_access_plist_f - - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) & - BIND(C,NAME='h5dwrite_ref_reg_c') - IMPORT :: HID_T, HSIZE_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_scalar_fix - - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) & - BIND(C,NAME='h5dread_ref_reg_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) - - END SUBROUTINE h5dread_char_scalar_fix - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dwrite_ptr - -!****s* H5D (F03)/h5dread_f_F03 -! -! NAME -! h5dread_f_F03 -! -! PURPOSE -! Reads raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset read from. -! mem_type_id - Identifier of the memory datatype. -! -! Outputs: -! buf - Buffer to receive data read from file. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dread_ptr - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_c_float -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_FLOAT), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_valuer) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_c_float - - !---------------------------------------------------------------------- - ! Name: h5dfill_c_double - ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes - ! of the fillvalues and buffers are supported. Buffer and fillvalue - ! are assumed to have the same datatype. - ! Only one-dimesional buffers are supported. - ! - ! Inputs: - ! fill_value - fill value - ! space_id - memory space selection identifier - ! buf - data buffer iin memory ro apply selection to - ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - - SUBROUTINE h5dfill_c_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_c_double - -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_c_long_double -#endif -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_char -! -!****s* H5D (F03)/h5dvlen_reclaim_f -! NAME -! h5dvlen_reclaim_f -! -! PURPOSE -! Reclaims VL datatype memory buffers. -! -! Inputs: -! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January 11, 2011 -! -! Fortran2003 Interface: - SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(IN) :: plist_id - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - IMPORT :: C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T) :: type_id - INTEGER(HID_T) :: space_id - INTEGER(HID_T) :: plist_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dvlen_reclaim_c - END INTERFACE - - hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) - - END SUBROUTINE H5Dvlen_reclaim_f - - -END MODULE H5D - - diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 new file mode 100644 index 0000000..3ad868c --- /dev/null +++ b/fortran/src/H5Dff.f90 @@ -0,0 +1,1035 @@ +!****h* ROBODoc/H5D +! +! NAME +! MODULE H5D +! +! FILE +! fortran/src/H5Dff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5D functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 H5D 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 H5D + USE H5GLOBAL + + INTERFACE h5dextend_f + MODULE PROCEDURE h5dset_extent_f + END INTERFACE + + INTERFACE h5dread_vl_f + MODULE PROCEDURE h5dread_vl_integer + MODULE PROCEDURE h5dread_vl_real + MODULE PROCEDURE h5dread_vl_string + END INTERFACE + + INTERFACE h5dwrite_vl_f + MODULE PROCEDURE h5dwrite_vl_integer + MODULE PROCEDURE h5dwrite_vl_real + MODULE PROCEDURE h5dwrite_vl_string + END INTERFACE + +CONTAINS + +! +!****s* H5D/h5dcreate_f +! +! NAME +! h5dcreate_f +! +! PURPOSE +! Creates a dataset at the specified location +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! type_id - dataset datatype identifier +! space_id - dataset dataspace identifier +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! creation_prp - Dataset creation property list +! lcpl_id - Link creation property list +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! - Added version's 1.8 new optional parameters +! February, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & + hdferr, dcpl_id, lcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER :: namelen ! Name length + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & + space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & + lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_f + +! +!****s* H5D/h5dopen_f +! +! NAME +! h5dopen_f +! +! PURPOSE +! Opens an existing dataset. +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! -Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! -Added 1.8 (optional) parameter dapl_id +! February, 2008, M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list +!***** + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: dapl_id_default + + INTERFACE + INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dopen_c + END INTERFACE + + dapl_id_default = H5P_DEFAULT_F + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + + END SUBROUTINE h5dopen_f + +! +!****s* H5D/h5dclose_f +! +! NAME +! h5dclose_f +! +! PURPOSE +! Closes a dataset. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dclose_f(dset_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dclose_c(dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + END FUNCTION h5dclose_c + END INTERFACE + + hdferr = h5dclose_c(dset_id) + + END SUBROUTINE h5dclose_f + +! +!****s* H5D/h5dget_type_f +! +! NAME +! h5dget_type_f +! +! PURPOSE +! Returns an identifier for a copy of the datatype for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! datatype_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! +! SOURCE + SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: datatype_id + END FUNCTION h5dget_type_c + END INTERFACE + + hdferr = h5dget_type_c (dataset_id, datatype_id) + END SUBROUTINE h5dget_type_f + +! +!****s* H5D/h5dset_extent +! +! NAME +! h5dset_extent (instead of obsolete name: h5dextend_f) +! +! PURPOSE +! Extends a dataset with unlimited dimension. +! +! INPUTS +! dataset_id - dataset identifier +! size - array containing the new magnitude of +! each dimension +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Changed name from the now obsolete h5dextend_f +! to h5dset_extent_f. Provided interface to old name +! for backward compatability. -MSB- March 14, 2008 +! +! SOURCE + SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + ! Array containing + ! dimensions' sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dset_extent_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + END FUNCTION h5dset_extent_c + END INTERFACE + + hdferr = H5Dset_extent_c(dataset_id, size) + END SUBROUTINE h5dset_extent_f + +!****s* H5D/h5dget_create_plist_f +! +! NAME +! h5dget_create_plist_f +! +! PURPOSE +! Returns an identifier for a copy of the dataset creation +! property list for a dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! plist_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! SOURCE + SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation + ! property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_create_plist_c + END INTERFACE + + hdferr = h5dget_create_plist_c(dataset_id, plist_id) + END SUBROUTINE h5dget_create_plist_f + +! +!****s* H5D/h5dget_storage_size_f +! +! NAME +! h5dget_storage_size_f +! +! PURPOSE +! Returns the amount of storage requires by a dataset +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! size - datastorage size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! SOURCE + SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage + ! allocated for dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5dget_storage_size_c + END INTERFACE + + hdferr = h5dget_storage_size_c(dataset_id, size) + END SUBROUTINE h5dget_storage_size_f + +! +!****s* H5D/h5dvlen_get_max_len_f +! +! NAME +! h5dvlen_get_max_len_f +! +! PURPOSE +! Returns maximum length of the VL array elements +! +! INPUTS +! dataset_id - dataset identifier +! type_id - datatype identifier +! space_id - dataspace identifier +! OUTPUTS +! size - buffer size +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! +! SOURCE + SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(SIZE_T), INTENT(OUT) :: len + END FUNCTION h5dvlen_get_max_len_c + END INTERFACE + + hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + END SUBROUTINE h5dvlen_get_max_len_f + +! +!****s* H5D/h5dget_space_status_f +! +! NAME +! h5dget_space_status_f +! +! PURPOSE +! Returns the status of data space allocation. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! flag - status; may have one of the following values: +! H5D_SPACE_STS_ERROR_F +! H5D_SPACE_STS_NOT_ALLOCATED_F +! H5D_SPACE_STS_PART_ALLOCATED_F +! H5D_SPACE_STS_ALLOCATED_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + !***** + INTERFACE + INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c + !DEC$ENDIF + INTEGER(HID_T) :: dset_id + INTEGER :: flag + END FUNCTION h5dget_space_status_c + END INTERFACE + + hdferr = h5dget_space_status_c(dset_id, flag) + END SUBROUTINE h5dget_space_status_f + +! +!****s* H5D/h5dcreate_anon_f +! +! NAME +! h5dcreate_anon_f +! +! PURPOSE +! Creates a dataset in a file without linking it into the file structure +! +! INPUTS +! loc_id - Identifier of the file or group within which to create the dataset. +! type_id - Identifier of the datatype to use when creating the dataset. +! space_id - Identifier of the dataspace to use when creating the dataset. +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dcpl_id - Dataset creation property list identifier. +! dapl_id - Dataset access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 11, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. +!***** + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_anon_c + END INTERFACE + + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_anon_f + + SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_integer_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_integer + + SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_integer_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_integer + + SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_real_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_real + + SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_real_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_real + + SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + ! xfer_prp_default, tmp_buf, dims, str_len) + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + + END SUBROUTINE h5dwrite_vl_string + + SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store + ! the length of each + ! element + CHARACTER(LEN=*), INTENT(OUT), & + DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION h5dread_vl_string_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + RETURN + END SUBROUTINE h5dread_vl_string + +! +!****s* H5D/h5dget_space_f +! +! NAME +! h5dget_space_f +! +! PURPOSE +! Returns an identifier for a copy of the dataspace for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! dataspace_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + END FUNCTION h5dget_space_c + END INTERFACE + + hdferr = h5dget_space_c(dataset_id, dataspace_id) +END SUBROUTINE h5dget_space_f + +!****s* H5D/h5dget_access_plist_f +! +! NAME +! h5dget_access_plist_f +! +! PURPOSE +! Returns a copy of the dataset creation property list. +! +! INPUTS +! dset_id - Dataset identifier +! +! OUTPUTS +! plist_id - Dataset access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! SOURCE +SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_access_plist_c + END INTERFACE + + hdferr = h5dget_access_plist_c(dset_id, plist_id) + +END SUBROUTINE h5dget_access_plist_f + +END MODULE H5D + + diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90 new file mode 100644 index 0000000..7026ae3 --- /dev/null +++ b/fortran/src/H5Dff_F03.f90 @@ -0,0 +1,2389 @@ +!****h* ROBODoc/H5D (F03) +! +! NAME +! H5D_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions. +! It contains the same functions as H5Dff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Dff_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed. Therefore, we can not create just one subroutine for +! each array type (integer, real, etc...) and use a +! rank 1 array of assumed size to handle multiple ranks, i.e. +! (i.e. integer, dimension(*) :: ... ) +! (i.e. real , dimension(*) :: ... ) etc... +! +! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may +! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved +! the statement instead to each subroutine. +! +! +! (4) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (A) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (B) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require the +! argument in C_LOC to be of the variant: +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5D_PROVISIONAL + USE H5GLOBAL + + INTERFACE h5dwrite_f + + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_integer_scalar + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_char_scalar + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_real_scalar + MODULE PROCEDURE h5dwrite_real_1 + MODULE PROCEDURE h5dwrite_real_2 + MODULE PROCEDURE h5dwrite_real_3 + MODULE PROCEDURE h5dwrite_real_4 + MODULE PROCEDURE h5dwrite_real_5 + MODULE PROCEDURE h5dwrite_real_6 + MODULE PROCEDURE h5dwrite_real_7 + + ! This is the preferred way to call h5dwrite + ! by passing an address + MODULE PROCEDURE h5dwrite_ptr + + END INTERFACE + + INTERFACE h5dread_f + + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_integer_scalar + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_char_scalar + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_real_scalar + MODULE PROCEDURE h5dread_real_1 + MODULE PROCEDURE h5dread_real_2 + MODULE PROCEDURE h5dread_real_3 + MODULE PROCEDURE h5dread_real_4 + MODULE PROCEDURE h5dread_real_5 + MODULE PROCEDURE h5dread_real_6 + MODULE PROCEDURE h5dread_real_7 + + ! This is the preferred way to call h5dread + ! by passing an address + MODULE PROCEDURE h5dread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dwrite routine + + INTERFACE + INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & + mem_space_id_default , & + file_space_id_default, & + xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dwrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dread routine + + INTERFACE + INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dread_f_c + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_char + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dfill routine + + INTERFACE + INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + TYPE(C_PTR), VALUE :: f_ptr_fill_value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + TYPE(C_PTR), VALUE :: f_ptr_buf + INTEGER(HID_T) :: mem_type_id + END FUNCTION h5dfill_c + END INTERFACE + +CONTAINS + + SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + TYPE(C_PTR) :: f_ptr + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_scalar + + SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_1 + + SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_2 + + SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_3 + + SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_4 + + SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_5 + + SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_6 + + SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_7 + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_scalar_fix + + SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_1 + + SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_2 + + SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_3 + + SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_4 + + SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_5 + + SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_6 + + SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_7 + + + SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_scalar + + + SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_1 + + SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_2 + + SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_3 + + SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_4 + + SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_5 + + SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_6 + + SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_7 + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dread_reference_dsetreg + + + SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dread_integer_scalar + + SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_1 + + SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_2 + + SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_3 + + SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_4 + + SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_5 + + SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_6 + + SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_7 + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) + + END SUBROUTINE h5dread_char_scalar_fix + + SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_1 + + SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_2 + + SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_3 + + SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_4 + + SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_5 + + SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_6 + + SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_7 + + SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_scalar + + SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_1 + + SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_2 + + SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_3 + + SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_4 + + SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_5 + + SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_6 + + SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_7 + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dwrite_ptr +!****s* H5D (F03)/h5dread_f_F03 +! +! NAME +! h5dread_f_F03 +! +! PURPOSE +! Reads raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset read from. +! mem_type_id - Identifier of the memory datatype. +! +! Outputs: +! buf - Buffer to receive data read from file. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dread_ptr + +! +! NAME +! h5dfill_integer +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_real +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_valuer) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_real + +! +! NAME +! h5dfill_char +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_char +! +!****s* H5D (F03)/h5dvlen_reclaim_f +! NAME +! h5dvlen_reclaim_f +! +! PURPOSE +! Reclaims VL datatype memory buffers. +! +! Inputs: +! +! type_id - Identifier of the datatype. +! space_id - Identifier of the dataspace. +! plist_id - Identifier of the property list used to create the buffer. +! buf - Pointer to the buffer to be reclaimed. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January 11, 2011 +! +! Fortran2003 Interface: + SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: plist_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + INTEGER(HID_T) :: type_id + INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: plist_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dvlen_reclaim_c + END INTERFACE + + hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) + + END SUBROUTINE H5Dvlen_reclaim_f + +END MODULE H5D_PROVISIONAL + + diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90 new file mode 100644 index 0000000..66cfe62 --- /dev/null +++ b/fortran/src/H5Dff_F90.f90 @@ -0,0 +1,3004 @@ +!****h* ROBODoc/H5D (F90) +! +! NAME +! +! H5D_PROVISIONAL +! +! PURPOSE +! +! This file contains Fortran 90 interfaces for H5D functions. It contains +! the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Dff_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. * +! 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 +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed, therefore we can not create just one subroutine for +! each array type (integer, real, etc...) of various ranks and then use a +! rank 1 array of assumed size in the just one subroutine, +! (i.e. integer, dimension(*) :: ... ) +! (i.e. real , dimension(*) :: ... ) etc... +! +! (3) +! *** IMPORTANT *** +! If you add a new H5D 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 H5D_PROVISIONAL + USE H5GLOBAL + + INTERFACE h5dwrite_f + + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_integer_scalar + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_char_scalar + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_real_scalar + MODULE PROCEDURE h5dwrite_real_1 + MODULE PROCEDURE h5dwrite_real_2 + MODULE PROCEDURE h5dwrite_real_3 + MODULE PROCEDURE h5dwrite_real_4 + MODULE PROCEDURE h5dwrite_real_5 + MODULE PROCEDURE h5dwrite_real_6 + MODULE PROCEDURE h5dwrite_real_7 + + END INTERFACE + + INTERFACE h5dread_f + + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_integer_scalar + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_char_scalar + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_real_scalar + MODULE PROCEDURE h5dread_real_1 + MODULE PROCEDURE h5dread_real_2 + MODULE PROCEDURE h5dread_real_3 + MODULE PROCEDURE h5dread_real_4 + MODULE PROCEDURE h5dread_real_5 + MODULE PROCEDURE h5dread_real_6 + MODULE PROCEDURE h5dread_real_7 + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_char + END INTERFACE + +CONTAINS + +!****s* H5D/h5dread_f +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! INPUTS +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! of k-th dimension of the buf array +! OUTPUTS +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! OPTIONAL PARAMETERS +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types. +!***** + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER(HSIZE_T) :: j + + INTERFACE + INTEGER FUNCTION h5dread_ref_obj_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_OBJ_C'::h5dread_ref_obj_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(HADDR_T), DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_obj_c + END INTERFACE + + ALLOCATE(ref_buf(dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DO j = 1, dims(1) + buf(j)%ref = ref_buf(j) + ENDDO + DEALLOCATE(ref_buf) + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + END SUBROUTINE h5dread_reference_dsetreg + + SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_integer_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_S_C'::h5dread_integer_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: buf + END FUNCTION h5dread_integer_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_integer_scalar + + SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_integer_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_1_C'::h5dread_integer_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT), DIMENSION(dims(1)) :: buf + END FUNCTION h5dread_integer_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_integer_1 + + SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_integer_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_2_C'::h5dread_integer_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_integer_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_2 + + SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_integer_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_3_C'::h5dread_integer_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dread_integer_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_3 + + SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_integer_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_4_C'::h5dread_integer_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dread_integer_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_4 + + SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_integer_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_5_C'::h5dread_integer_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dread_integer_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_5 + + SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + + INTERFACE + INTEGER FUNCTION h5dread_integer_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_6_C'::h5dread_integer_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dread_integer_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_6 + + SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_integer_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_7_C'::h5dread_integer_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dread_integer_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dread_integer_7 + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_S_C'::h5dreadc_s_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(OUT) :: buf + END FUNCTION h5dreadc_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_1_C'::h5dreadc_1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dreadc_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_1 + + SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + + INTERFACE + INTEGER FUNCTION h5dreadc_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_2_C'::h5dreadc_2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dreadc_2_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_2 + + SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_3_C'::h5dreadc_3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dreadc_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_3 + + SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_4_C'::h5dreadc_4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dreadc_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_4 + + SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_5_C'::h5dreadc_5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dreadc_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_5 + + SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_6_C'::h5dreadc_6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dreadc_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_6 + + SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dreadc_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_7_C'::h5dreadc_7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dreadc_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dreadc_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_char_7 + + SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_S_C'::h5dread_real_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(OUT) :: buf + END FUNCTION h5dread_real_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_scalar + + SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_real_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_real_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_1_C'::h5dread_real_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dread_real_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_1 + + SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_2_C'::h5dread_real_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_real_2_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_2 + + SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_3_C'::h5dread_real_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dread_real_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_3 + + SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_4_C'::h5dread_real_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf + END FUNCTION h5dread_real_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_4 + + SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_5_C'::h5dread_real_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dread_real_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_5 + + SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_6_C'::h5dread_real_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dread_real_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_6 + + SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_real_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_7_C'::h5dread_real_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dread_real_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_real_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_real_7 + + SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER(HSIZE_T) :: j + + INTERFACE + INTEGER FUNCTION h5dwrite_ref_obj_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_OBJ_C'::h5dwrite_ref_obj_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HADDR_T), DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_obj_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + ALLOCATE(ref_buf(dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + ref_buf(j) = buf(j)%ref + ENDDO + ENDIF + hdferr = h5dwrite_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims(1)) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN) :: buf ! Data buffer + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_S_C'::h5dwrite_integer_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN) :: buf + END FUNCTION h5dwrite_integer_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_integer_scalar + + SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_1_C'::h5dwrite_integer_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwrite_integer_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_integer_1 + + SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_2_C'::h5dwrite_integer_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_integer_2_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + hdferr = h5dwrite_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_2 + + SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_3_C'::h5dwrite_integer_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwrite_integer_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_3 + + SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_4_C'::h5dwrite_integer_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwrite_integer_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_4 + + SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_5_C'::h5dwrite_integer_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwrite_integer_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_5 + + SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_6_C'::h5dwrite_integer_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwrite_integer_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_6 + + SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_integer_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_7_C'::h5dwrite_integer_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwrite_integer_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims) + + END SUBROUTINE h5dwrite_integer_7 + + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_S_C'::h5dwritec_s_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN) :: buf + END FUNCTION h5dwritec_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_1_C'::h5dwritec_1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwritec_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_1 + + SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_2_C'::h5dwritec_2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwritec_2_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_2 + + SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_3_C'::h5dwritec_3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwritec_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_3 + + SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_4_C'::h5dwritec_4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwritec_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_4 + + SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_5_C'::h5dwritec_5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwritec_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_5 + + SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_6_C'::h5dwritec_6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwritec_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_6 + + SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwritec_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_7_C'::h5dwritec_7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwritec_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwritec_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_char_7 + + SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_S_C'::h5dwrite_real_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN) :: buf + END FUNCTION h5dwrite_real_s_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_scalar + + SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_1_C'::h5dwrite_real_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwrite_real_1_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_1 + + SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_2_C'::h5dwrite_real_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_real_2_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_2 + + SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_3_C'::h5dwrite_real_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwrite_real_3_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_3 + + SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_4_C'::h5dwrite_real_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwrite_real_4_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_4 + + SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_5_C'::h5dwrite_real_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwrite_real_5_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_5 + + SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_6_C'::h5dwrite_real_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwrite_real_6_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_6 + + SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_real_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_7_C'::h5dwrite_real_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwrite_real_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_real_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_real_7 + +! +! NAME +! h5dfill_integer +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! INPUTS +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfill_integer_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfill_integer_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_INTEGER_C'::h5dfill_integer_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfill_integer_c + END INTERFACE + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_integer_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_real +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! INPUTS +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + IMPLICIT NONE + REAL, INTENT(IN) :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfill_real_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfill_real_c(fill_valuer, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_REAL_C'::h5dfill_real_c + !DEC$ENDIF + REAL, INTENT(IN) :: fill_valuer ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfill_real_c + END INTERFACE + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_real_c(fill_valuer, fill_type_id, space_id, & + buf, mem_type_id) + END SUBROUTINE h5dfill_real + +! +! NAME +! h5dfill_char +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! INPUTS +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + CHARACTER, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfillc_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfillc_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILLC_C'::h5dfillc_c + !DEC$ENDIF + CHARACTER, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfillc_c + END INTERFACE + fill_type_id = H5T_NATIVE_CHARACTER + mem_type_id = H5T_NATIVE_CHARACTER + + hdferr = h5dfillc_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + + END SUBROUTINE h5dfill_char + + +END MODULE H5D_PROVISIONAL diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 4b1d4c9..f5c0c45 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -1,6 +1,6 @@ /****h* H5Ef/H5Ef * PURPOSE - * This file contains C stubs for H5E Fortran APIs + * This file contains C stubs for H5E Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -42,7 +42,7 @@ * SOURCE */ int_f -h5eclear_c(hid_t_f *estack_id ) +nh5eclear_c(hid_t_f *estack_id ) /******/ { int_f ret_value = 0; @@ -78,7 +78,7 @@ done: * SOURCE */ int_f -h5eprint_c1(_fcd name, int_f* namelen) +nh5eprint_c1(_fcd name, int_f* namelen) /******/ { FILE *file = NULL; @@ -124,7 +124,7 @@ done: * SOURCE */ int_f -h5eprint_c2(void) +nh5eprint_c2(void) /******/ { int_f ret_value = 0; @@ -159,7 +159,7 @@ done: * SOURCE */ int_f -h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) +nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -207,7 +207,7 @@ done: * SOURCE */ int_f -h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) +nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -235,25 +235,62 @@ done: return ret_value; } +/****if* H5Ef/h5eset_auto_c + * NAME + * h5eset_auto_c + * PURPOSE + * Call H5Eset_auto to turn automatic error printing on or off. + * INPUTS + * printflag - flag to turn automatic error printing on or off. + * OUTPUTS + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Friday, November 17, 2000 + * HISTORY + * Major bug fix: Function never disabled printing. + * SOURCE +*/ +int_f +nh5eset_auto_c(int_f* printflag) +/******/ +{ + herr_t status = -1; + int_f ret_value = 0; + + if(*printflag == 1) + status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr); + else if(*printflag == 0) + status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL); + if(status < 0) + HGOTO_DONE(FAIL) + +done: + return ret_value; +} + + /****if* H5Ef/h5eset_auto2_c * NAME - * h5eset_auto2_c + * h5eset_auto2_c * PURPOSE - * Calls H5Eset_auto2 + * Calls H5Eset_auto2 * INPUTS - * estack_id - Error stack identifier. - * func - Function to be called upon an error condition. - * client_data - Data passed to the error function. + * estack_id - Error stack identifier. + * func - Function to be called upon an error condition. + * client_data - Data passed to the error function. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * July 22, 2009 + * July 22, 2009 * SOURCE */ /* int_f */ -/* h5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ +/* nh5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ /* /\******\/ */ /* { */ /* int ret_val = -1; */ diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 deleted file mode 100644 index a2efe61..0000000 --- a/fortran/src/H5Eff.F90 +++ /dev/null @@ -1,302 +0,0 @@ -!****h* ROBODoc/H5E -! -! NAME -! MODULE H5E -! -! FILE -! fortran/src/H5Eff.f90 -! -! PURPOSE -! This Module contains Fortran interfaces for H5E functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! 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' in the fortran/src directory. -! This is needed for Windows based operating systems. -! -!***** - -MODULE H5E - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR - USE H5GLOBAL - - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 - -CONTAINS - -!****s* H5E/h5eclear_f -! -! NAME -! h5eclear_f -! -! PURPOSE -! Clears the error stack for the current thread. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! estack_id - Error Stack id -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! Added optional error stack identifier in order to bring -! the function in line with the h5eclear2 routine. -! MSB, July 9, 2009 -! -! SOURCE - SUBROUTINE h5eclear_f(hdferr, estack_id) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id -!***** - INTEGER(HID_T) :: estack_id_default - - INTERFACE - INTEGER FUNCTION h5eclear_c(estack_id_default) BIND(C,NAME='h5eclear_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T) :: estack_id_default - END FUNCTION h5eclear_c - END INTERFACE - - estack_id_default = H5E_DEFAULT_F - IF(PRESENT(estack_id)) estack_id_default = estack_id - - hdferr = h5eclear_c(estack_id_default) - END SUBROUTINE h5eclear_f - -!****s* H5E/h5eprint_f -! -! NAME -! h5eprint_f -! -! PURPOSE -! Prints the error stack in a default manner. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! name - name of the file that contains print output -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) BIND(C,NAME='h5eprint_c1') - IMPORT :: C_CHAR - IMPLICIT NONE - INTEGER :: namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - END FUNCTION h5eprint_c1 - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5eprint_c2() BIND(C,NAME='h5eprint_c2') - END FUNCTION h5eprint_c2 - END INTERFACE - namelen = LEN(NAME) - IF (PRESENT(name)) THEN - hdferr = h5eprint_c1(name, namelen) - ELSE - hdferr = h5eprint_c2() - ENDIF - END SUBROUTINE h5eprint_f -!****s* H5E/h5eget_major_f -! -! NAME -! h5eget_major_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a major error number. -! -! INPUTS -! error_no - major error number -! -! OUTPUTS -! name - character string describing the error -! namelen - number of characters in the name buffer -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters - ! in name. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) BIND(C,NAME='h5eget_major_c') - IMPORT :: C_CHAR - IMPORT :: SIZE_T - IMPLICIT NONE - INTEGER :: error_no - CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - END FUNCTION h5eget_major_c - END INTERFACE - - hdferr = h5eget_major_c(error_no, name, namelen) - END SUBROUTINE h5eget_major_f -!****s* H5E/h5eget_minor_f -! -! NAME -! h5eget_minor_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a minor error number. -! -! INPUTS -! error_no - minor error number -! -! OUTPUTS -! name - character string describing the error -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_minor_f(error_no, name, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) BIND(C,NAME='h5eget_minor_c') - IMPORT :: C_CHAR - INTEGER :: error_no - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - END FUNCTION h5eget_minor_c - END INTERFACE - - hdferr = h5eget_minor_c(error_no, name) - END SUBROUTINE h5eget_minor_f - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Returns settings for automatic error stack traversal function and its data. -! -! Inputs: -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! estack_id - Error stack identifier. -! func - Function to be called upon an error condition. -! client_data - Data passed to the error function -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 10, 2009 -! -! Fortran2003 Interface: - SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) - USE, INTRINSIC :: ISO_C_BINDING - INTEGER , INTENT(IN) :: printflag - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id - TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func - TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data -!***** - INTEGER(HID_T) :: estack_id_default - TYPE(C_FUNPTR) :: func_default - TYPE(C_PTR) :: client_data_default - INTERFACE - INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & - BIND(C, NAME='h5eset_auto2_c') - IMPORT :: c_ptr, c_funptr - IMPORT :: HID_T - INTEGER :: printflag - INTEGER(HID_T) :: estack_id - TYPE(C_FUNPTR), VALUE :: func - TYPE(C_PTR), VALUE :: client_data - END FUNCTION h5eset_auto2_c - END INTERFACE - - estack_id_default = -1 - func_default = C_NULL_FUNPTR - client_data_default = C_NULL_PTR - - IF(PRESENT(estack_id)) estack_id_default = estack_id - IF(PRESENT(func)) func_default = func - IF(PRESENT(client_data)) client_data_default = client_data - - hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) - END SUBROUTINE h5eset_auto_f - -END MODULE H5E - diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 new file mode 100644 index 0000000..7b56376 --- /dev/null +++ b/fortran/src/H5Eff.f90 @@ -0,0 +1,251 @@ +!****h* ROBODoc/H5E +! +! NAME +! MODULE H5E +! +! FILE +! fortran/src/H5Eff.f90 +! +! PURPOSE +! This Module contains Fortran interfaces for H5E functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! 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 H5E function to the module 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 H5E + + USE H5GLOBAL + + !Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTON = 1 + + !Turn off automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 + +CONTAINS + +!****s* H5E/h5eclear_f +! +! NAME +! h5eclear_f +! +! PURPOSE +! Clears the error stack for the current thread. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! estack_id - Error Stack id +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! Added optional error stack identifier in order to bring +! the function in line with the h5eclear2 routine. +! MSB, July 9, 2009 +! +! SOURCE + SUBROUTINE h5eclear_f(hdferr, estack_id) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id +!***** + INTEGER(HID_T) :: estack_id_default + + INTERFACE + INTEGER FUNCTION h5eclear_c(estack_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c + !DEC$ENDIF + INTEGER(HID_T) :: estack_id_default + END FUNCTION h5eclear_c + END INTERFACE + + estack_id_default = H5E_DEFAULT_F + IF(PRESENT(estack_id)) estack_id_default = estack_id + + hdferr = h5eclear_c(estack_id_default) + END SUBROUTINE h5eclear_f + +!****s* H5E/h5eprint_f +! +! NAME +! h5eprint_f +! +! PURPOSE +! Prints the error stack in a default manner. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! name - name of the file that contains print output +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eprint_f(hdferr, name) + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5eprint_c1(name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: namelen + CHARACTER(LEN=*),INTENT(IN) :: name + END FUNCTION h5eprint_c1 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5eprint_c2() + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 + !DEC$ENDIF + END FUNCTION h5eprint_c2 + END INTERFACE + namelen = LEN(NAME) + IF (PRESENT(name)) THEN + hdferr = h5eprint_c1(name, namelen) + ELSE + hdferr = h5eprint_c2() + ENDIF + END SUBROUTINE h5eprint_f +!****s* H5E/h5eget_major_f +! +! NAME +! h5eget_major_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a major error number. +! +! INPUTS +! error_no - major error number +! +! OUTPUTS +! name - character string describing the error +! namelen - number of characters in the name buffer +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters + ! in name. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + END FUNCTION h5eget_major_c + END INTERFACE + + hdferr = h5eget_major_c(error_no, name, namelen) + END SUBROUTINE h5eget_major_f +!****s* H5E/h5eget_minor_f +! +! NAME +! h5eget_minor_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a minor error number. +! +! INPUTS +! error_no - minor error number +! +! OUTPUTS +! name - character string describing the error +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_minor_f(error_no, name, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_minor_c(error_no, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + END FUNCTION h5eget_minor_c + END INTERFACE + + hdferr = h5eget_minor_c(error_no, name) + END SUBROUTINE h5eget_minor_f + +END MODULE H5E + diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90 new file mode 100644 index 0000000..ff8d11c --- /dev/null +++ b/fortran/src/H5Eff_F03.f90 @@ -0,0 +1,108 @@ +!****h* ROBODoc/H5E (F03) +! +! NAME +! H5E_PROVISIONAL +! +! FILE +! src/fortran/src/H5Eff_F03.f90 +! +! PURPOSE +! +! This file contains Fortran 90 and Fortran 2003 interfaces for H5E functions. +! It contains the same functions as H5Eff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Eff_F90.f90 if Fortran 2003 functions are enabled. +! +! +! 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 H5E function to the module 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 H5E_PROVISIONAL + + USE H5GLOBAL + +CONTAINS + +!****s* H5E/h5eset_auto_f +! +! NAME +! h5eset_auto_f +! +! PURPOSE +! Returns settings for automatic error stack traversal function and its data. +! +! Inputs: +! printflag - Flag to turn automatic error printing on or off; +! possible values are: +! printon (1) +! printoff(0) +! estack_id - Error stack identifier. +! func - Function to be called upon an error condition. +! client_data - Data passed to the error function +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 10, 2009 +! +! Fortran2003 Interface: + SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) + USE, INTRINSIC :: ISO_C_BINDING + INTEGER , INTENT(IN) :: printflag + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id + TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func + TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data +!***** + INTEGER(HID_T) :: estack_id_default + TYPE(C_FUNPTR) :: func_default + TYPE(C_PTR) :: client_data_default + INTERFACE + INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & + BIND(C, NAME='h5eset_auto2_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER :: printflag + INTEGER(HID_T) :: estack_id +!!$ TYPE(C_FUNPTR) :: func +!!$ TYPE(C_PTR), VALUE :: client_data + TYPE(C_FUNPTR), VALUE :: func + TYPE(C_PTR), VALUE :: client_data + END FUNCTION h5eset_auto2_c + END INTERFACE + + estack_id_default = -1 + func_default = C_NULL_FUNPTR + client_data_default = C_NULL_PTR + + IF(PRESENT(estack_id)) estack_id_default = estack_id + IF(PRESENT(func)) func_default = func + IF(PRESENT(client_data)) client_data_default = client_data + + hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) + END SUBROUTINE h5eset_auto_f + +END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90 new file mode 100644 index 0000000..158ec12 --- /dev/null +++ b/fortran/src/H5Eff_F90.f90 @@ -0,0 +1,89 @@ +!****h* ROBODoc/H5E (F90) +! +! NAME +! MODULE H5E_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 interfaces for H5E functions. It contains +! the same functions as H5Eff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Eff_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. * +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5E_PROVISIONAL + + USE H5GLOBAL + +CONTAINS + +!****s* H5E/h5eset_auto_f +! +! NAME +! h5eset_auto_f +! +! PURPOSE +! Turns automatic error printing on or off. +! +! INPUTS +! printflag - Flag to turn automatic error printing on or off; +! possible values are: +! printon (1) +! printoff(0) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eset_auto_f(printflag, hdferr) + INTEGER, INTENT(IN) :: printflag ! flag to turn automatic error + ! printing on or off + ! possible values are: + ! printon (1) + ! printoff(0) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eset_auto_c(printflag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ESET_AUTO_C'::h5eset_auto_c + !DEC$ENDIF + INTEGER :: printflag + END FUNCTION h5eset_auto_c + END INTERFACE + + hdferr = h5eset_auto_c(printflag) + END SUBROUTINE h5eset_auto_f + + +END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c new file mode 100644 index 0000000..bbdb170 --- /dev/null +++ b/fortran/src/H5FDmpiof.c @@ -0,0 +1,258 @@ +/****h* H5FDmpiof/H5FDmpiof + * + * PURPOSE + * This file contains C stubs for Parallel Fortran APIs + * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + ****** +*/ + +#include "H5f90.h" +#include +#include "H5public.h" + + +/* Support for C to Fortran translation in MPI */ +#ifndef H5_HAVE_MPI_MULTI_LANG_Comm +#define MPI_Comm_c2f(comm) (int_f)(comm) +#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) +#endif /*MPI Comm*/ +#ifndef H5_HAVE_MPI_MULTI_LANG_Info +#define MPI_Info_c2f(info) (int_f)(info) +#define MPI_Info_f2c(info) (MPI_Info)(info) +#endif /*MPI Info*/ + +/****if* H5FDmpiof/h5pset_fapl_mpio_c + * NAME + * h5pset_fapl_mpio_c + * PURPOSE + * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user + * supplied communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + c_comm = MPI_Comm_f2c(*comm); + c_info = MPI_Info_f2c(*info); + + /* + * Call H5Pset_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} +/****if* H5FDmpiof/h5pget_fapl_mpio_c + * NAME + * h5pget_fapl_mpio_c + * PURPOSE + * Call H5Pget_fapl_mpio to retrieve communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - buffer to return MPI communicator + * info - buffer to return MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + + /* + * Call H5Pget_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); + if (ret < 0) return ret_value; + *comm = (int_f) MPI_Comm_c2f(c_comm); + *info = (int_f) MPI_Info_c2f(c_info); + ret_value = 0; + return ret_value; +} +/****if* H5FDmpiof/h5pset_dxpl_mpio_c + * NAME + * h5pset_dxpl_mpio_c + * PURPOSE + * Call H5Pset_dxpl_mpio to set transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; +/* + switch (*data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT_F: + c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; + break; + + case H5FD_MPIO_COLLECTIVE_F: + c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; + break; + default: + return ret_value; + } +*/ + c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; + /* + * Call H5Pset_dxpl_mpio function. + */ + c_prp_id = *prp_id; + ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +/****if* H5FDmpiof/h5pget_dxpl_mpio_c + * NAME + * h5pget_dxpl_mpio_c + * PURPOSE + * Call H5Pget_dxpl_mpio to get transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - buffer to retrieve transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, June 15, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; + + /* + * Call H5Pget_xfer function. + */ + c_prp_id = *prp_id; + ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); + if (ret < 0) return ret_value; + *data_xfer_mode = (int_f)c_data_xfer_mode; +/* + switch (c_data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT: + *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; + break; + + case H5FD_MPIO_COLLECTIVE: + *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; + break; + + default: + return ret_value; + } +*/ + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_mpio_actual_io_mode_c + * NAME + * h5pget_mpio_actual_io_mode_c + * PURPOSE + * Calls H5Pget_mpio_actual_io_mode + * + * INPUTS + * dxpl_id - Dataset transfer property list identifier. + * OUTPUTS + * actual_io_mode - The type of I/O performed by this process. + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * July 27, 2012 + * SOURCE +*/ +int_f +nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) +/******/ +{ + int ret_value = -1; + H5D_mpio_actual_io_mode_t c_actual_io_mode; + + /* + * Call H5Pget_mpio_actual_io_mode_f function. + */ + if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) + return ret_value; /* error occurred */ + + *actual_io_mode =(int_f)c_actual_io_mode; + + ret_value = 0; + return ret_value; +} diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90 new file mode 100644 index 0000000..50a77d9 --- /dev/null +++ b/fortran/src/H5FDmpioff.f90 @@ -0,0 +1,212 @@ +!****h* ROBODoc/H5FDMPIO +! +! NAME +! MODULE H5FDMPIO +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions needed by +! parallel MPI programs. +! +! 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 H5P 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 H5FDMPIO + USE H5GLOBAL +CONTAINS + +!****s* H5FDMPIO/h5pset_fapl_mpio_f +! +! NAME +! h5pset_fapl_mpio_f +! +! PURPOSE +! Stores MPI IO communicator information to the file +! access property list. +! +! INPUTS +! prp_id - file access property list identifier +! comm - MPI-2 communicator +! info - MPI-2 info object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_fapl_mpio_c + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pset_fapl_mpio_f + +!****s* H5FDMPIO/h5pget_fapl_mpio_f +! +! NAME +! h5pget_fapl_mpio_f +! +! PURPOSE +! Returns MPI communicator information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! comm - MPI-2 communicator +! info - MPI-2 info object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: info ! buffer to return info object + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_fapl_mpio_c + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pget_fapl_mpio_f + +!****s* H5FDMPIO/h5pset_dxpl_mpio_f +! +! NAME +! h5pset_dxpl_mpio_f +! +! PURPOSE +! Sets data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! data_xfer_mode - transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pset_dxpl_mpio_f + +!****s* H5FDMPIO/h5pget_dxpl_mpio_f +! +! NAME +! h5pget_dxpl_mpio_f +! +! PURPOSE +! Returns the data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! OUTPUTS +! data_xfer_mode- transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c + hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pget_dxpl_mpio_f + +!****s* H5P/h5pget_mpio_actual_io_mode_f +! NAME +! h5pget_mpio_actual_io_mode_f +! +! PURPOSE +! Retrieves the type of I/O that HDF5 actually performed on the last +! parallel I/O call. This is not necessarily the type of I/O requested. +! +! INPUTS +! dxpl_id - Dataset transfer property list identifier. +! OUTPUTS +! actual_io_mode - The type of I/O performed by this process. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 27, 2012 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + END FUNCTION h5pget_mpio_actual_io_mode_c + END INTERFACE + + actual_io_mode = -1 + + hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + + END SUBROUTINE h5pget_mpio_actual_io_mode_f + +END MODULE H5FDMPIO diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index c1cdb91..1696672 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -1,6 +1,6 @@ /****h* H5Ff/H5Ff * PURPOSE - * This file contains C stubs for H5F Fortran APIs + * This file contains C stubs for H5F Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,26 +26,26 @@ /****if* H5Ff/h5fcreate_c * NAME - * h5fcreate_c + * h5fcreate_c * PURPOSE - * Call H5Fcreate to create the file + * Call H5Fcreate to create the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * crt_pr - identifier of creation property list - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * crt_pr - identifier of creation property list + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * SOURCE */ int_f -h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) +nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -95,23 +95,23 @@ h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hi /****if* H5Ff/h5fflush_c * NAME - * h5fflush_c + * h5fflush_c * PURPOSE - * Call H5Fflush to flush the object + * Call H5Fflush to flush the object * INPUTS - * object_id - identifier of either a file, a dataset, - * a group, an attribute or a named data type - * scope - integer to specify the flushing action, either + * object_id - identifier of either a file, a dataset, + * a group, an attribute or a named data type + * scope - integer to specify the flushing action, either * H5F_SCOPE_GLOBAL or H5F_SCOPE_LOCAL * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 5, 1999 + * Friday, November 5, 1999 * SOURCE */ int_f -h5fflush_c (hid_t_f *object_id, int_f *scope) +nh5fflush_c (hid_t_f *object_id, int_f *scope) /******/ { int ret_value = -1; @@ -136,24 +136,24 @@ h5fflush_c (hid_t_f *object_id, int_f *scope) /****if* H5Ff/h5fmount_c * NAME - * h5fmount_c + * h5fmount_c * PURPOSE - * Call H5Fmount to mount the file + * Call H5Fmount to mount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length - * file_id - file identifier for the file to be mounted - * acc_prp - identifier of access property list + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length + * file_id - file identifier for the file to be mounted + * acc_prp - identifier of access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * HISTORY */ int_f -h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) +nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) /******/ { int ret_value = -1; @@ -194,22 +194,22 @@ h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hi /****if* H5Ff/h5funmount_c * NAME - * h5funmount_c + * h5funmount_c * PURPOSE - * Call H5Funmount to unmount the file + * Call H5Funmount to unmount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * SOURCE */ int_f -h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) +nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /******/ { int ret_value = -1; @@ -242,25 +242,25 @@ h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /****if* H5Ff/h5fopen_c * NAME - * h5fopen_c + * h5fopen_c * PURPOSE - * Call H5Fopen to open the file + * Call H5Fopen to open the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * SOURCE */ int_f -h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) +nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -305,22 +305,22 @@ h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid /****if* H5Ff/h5freopen_c * NAME - * h5freopen_c + * h5freopen_c * PURPOSE - * Call H5Freopen to open the file + * Call H5Freopen to open the file * INPUTS - * file_id1 - file identifier + * file_id1 - file identifier * OUTPUTS - * file_id2 - file identifier + * file_id2 - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f -h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) +nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /******/ { int ret_value = -1; @@ -338,22 +338,22 @@ h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /****if* H5Ff/h5fget_create_plist_c * NAME - * h5fget_create_plist_c + * h5fget_create_plist_c * PURPOSE - * Call H5Fget_create_plist to get the file creation property list + * Call H5Fget_create_plist to get the file creation property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * prop_id - creation property list identifier + * prop_id - creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal, Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f -h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) +nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /******/ { int ret_value = -1; @@ -371,24 +371,24 @@ h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /****if* H5Ff/h5fget_access_plist_c * NAME - * h5fget_access_plist_c + * h5fget_access_plist_c * PURPOSE - * Call H5Fget_access_plist to get the file access property list + * Call H5Fget_access_plist to get the file access property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * access_id - access property list identifier + * access_id - access property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * * SOURCE */ int_f -h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) +nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /******/ { int ret_value = -1; @@ -406,26 +406,26 @@ h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /****if* H5Ff/h5fis_hdf5_c * NAME - * h5fis_hdf5_c + * h5fis_hdf5_c * PURPOSE - * Call H5Fis_hdf5 to determone if the file is an HDF5 file + * Call H5Fis_hdf5 to determone if the file is an HDF5 file * INPUTS - * name - name of the file - * namelen - name length + * name - name of the file + * namelen - name length * OUTPUTS - * flag - 0 if file is not HDF5 file , positive if a file - * is an HDF5 file, and negative on failure. + * flag - 0 if file is not HDF5 file , positive if a file + * is an HDF5 file, and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * HISTORY * * SOURCE */ int_f -h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) +nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) /******/ { int ret_value = -1; @@ -452,23 +452,23 @@ h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) } /****if* H5Ff/h5fclose_c * NAME - * h5fclose_c + * h5fclose_c * PURPOSE - * Call H5Fclose to close the file + * Call H5Fclose to close the file * INPUTS - * file_id - identifier of the file to be closed + * file_id - identifier of the file to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * HISTORY * * SOURCE */ int_f -h5fclose_c ( hid_t_f *file_id ) +nh5fclose_c ( hid_t_f *file_id ) /******/ { int ret_value = 0; @@ -480,27 +480,27 @@ h5fclose_c ( hid_t_f *file_id ) } /****if* H5Ff/h5fget_obj_count_c * NAME - * h5fget_obj_count_c + * h5fget_obj_count_c * PURPOSE - * Call H5Fget_obj_count to get number of open objects within a file + * Call H5Fget_obj_count to get number of open objects within a file * INPUTS - * file_id - identifier of the file to be closed - * obj_type - type of the object + * file_id - identifier of the file to be closed + * obj_type - type of the object * RETURNS - * obj_count - number of objects - * 0 on success, -1 on failure + * obj_count - number of objects + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * - * Changed type of obj_count to size_t_f - * Thursday, September 25, 2008 + * Changed type of obj_count to size_t_f + * Thursday, September 25, 2008 * SOURCE */ int_f -h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) +nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) /******/ { int ret_value = 0; @@ -525,7 +525,7 @@ h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * obj_type - type of the object * RETURNS * obj_ids - iarray of open objects identifiers - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Monday, September 30, 2002 @@ -538,7 +538,7 @@ h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * SOURCE */ int_f -h5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, +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) /******/ { @@ -569,22 +569,22 @@ h5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, /****if* H5Ff/h5fget_freespace_c * NAME - * h5fget_freespace_c + * h5fget_freespace_c * PURPOSE - * Call H5Fget_freespace to get amount of free space within a file + * Call H5Fget_freespace to get amount of free space within a file * INPUTS - * file_id - identifier of the file to query + * file_id - identifier of the file to query * RETURNS - * free_space - amount of free space in file - * 0 on success, -1 on failure + * free_space - amount of free space in file + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, October 7, 2003 + * Tuesday, October 7, 2003 * SOURCE */ int_f -h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) +nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /******/ { int ret_value = 0; @@ -599,24 +599,24 @@ h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /****if* H5Ff/h5fget_name_c * NAME - * h5fget_name_c + * h5fget_name_c * PURPOSE - * Call H5Fget_name to get file's name + * Call H5Fget_name to get file's name * INPUTS - * obj_id - object identifier - * buflen -size of the buffer + * obj_id - object identifier + * buflen -size of the buffer * OUTPUTS - * buf - buffer to hold the name - * size - size of the file's name + * buf - buffer to hold the name + * size - size of the file's name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, July 6, 2004 + * Tuesday, July 6, 2004 * SOURCE */ int_f -h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) +nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /******/ { char *c_buf = NULL; /* Buffer to hold C string */ @@ -648,22 +648,22 @@ done: /****if* H5Ff/h5fget_filesize_c * NAME - * h5fget_filesize_c + * h5fget_filesize_c * PURPOSE - * Call H5Fget_filesize to get file size + * Call H5Fget_filesize to get file size * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * size - size of the file + * size - size of the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, July 7, 2004 + * Wednesday, July 7, 2004 * SOURCE */ int_f -h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) +nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) /******/ { hsize_t size_c; diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 deleted file mode 100644 index c69ad82..0000000 --- a/fortran/src/H5Fff.F90 +++ /dev/null @@ -1,871 +0,0 @@ -!****h* ROBODoc/H5F -! -! NAME -! MODULE H5F -! -! FILE -! H5Fff.f90 -! -! PURPOSE -! This file contains Fortran 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! 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. -! -!***** - -MODULE H5F - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR - USE H5GLOBAL - IMPLICIT NONE - -CONTAINS -!****s* H5F/h5fcreate_f -! -! NAME -! h5fcreate_f -! -! PURPOSE -! Creates HDF5 files. -! -! INPUTS -! name - name of the file to create -! access_flags - File access flags. Allowable values are: -! H5F_ACC_TRUNC_F -! H5F_ACC_EXCL_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & - creation_prp, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp - ! File creation propertly - ! list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: creation_prp_default - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) BIND(C,NAME='h5fcreate_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(OUT) :: file_id - INTEGER(HID_T), INTENT(IN) :: creation_prp_default - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fcreate_c - END INTERFACE - - creation_prp_default = H5P_DEFAULT_F - access_prp_default = H5P_DEFAULT_F - - IF (PRESENT(creation_prp)) creation_prp_default = creation_prp - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - - END SUBROUTINE h5fcreate_f -!****s* H5F/h5fflush_f -! -! NAME -! h5fflush_f -! -! PURPOSE -! Flushes all buffers associated WITH a file to disk -! -! INPUTS -! object_id - identifier of object used to identify the file. -! scope - specifies the scope of the flushing action. -! Possible values are: -! H5F_SCOPE_GLOBAL_F -! H5F_SCOPE_LOCAL_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fflush_f(object_id, scope, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object - !associate with a file, - !including the file itself, - !a dataset, a group, an - !attribute, or a named - !data type - - INTEGER, INTENT(IN) :: scope !scope of the flushing - !action, possible values - !are: H5F_SCOPE_GLOBAL_F - ! which flushes the entire - !virtual file, - !and H5F_SCOPE_LOCAL_F - !which flushes only the - !specified file. - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fflush_c(object_id, scope) BIND(C,NAME='h5fflush_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: scope - END FUNCTION h5fflush_c - END INTERFACE - - hdferr = h5fflush_c(object_id, scope) - - END SUBROUTINE h5fflush_f -!****s* H5F/h5fmount_f -! -! NAME -! h5fmount_f -! -! PURPOSE -! Mounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the group onto which the file -! specified by child_id is to be mounted. -! child_id - the identifier of the file to be mounted. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - the identifier of the property list to be used -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! in which dsetname is defined - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the - ! file to be mounted - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & - child_id, access_prp_default) BIND(C,NAME='h5fmount_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN) :: child_id - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fmount_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) - - END SUBROUTINE h5fmount_f - -!****s* H5F/h5funmount_f -! -! NAME -! h5funmount_f -! -! PURPOSE -! Unmounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the mount point -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5funmount_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! at which the specified file - ! is to be unmounted - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) BIND(C,NAME='h5funmount_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5funmount_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5funmount_c(loc_id, name, namelen) - - END SUBROUTINE h5funmount_f -!****s* H5F/h5fopen_f -! -! NAME -! h5fopen_f -! -! PURPOSE -! Opens HDF5 file. -! -! INPUTS -! name - name of the file to acecss -! access_flags - File access flags. Allowable values are: -! H5F_ACC_RDWR_F -! H5F_ACC_RDONLY_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) BIND(C,NAME='h5fopen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5fopen_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - END SUBROUTINE h5fopen_f -!****s* H5F/h5freopen_f -! -! NAME -! h5freopen_f -! -! PURPOSE -! Reopens HDF5 file. -! -! INPUTS -! file_id - identifier of a file for which an -! additional identifier is required -! OUTPUTS -! ret_file_id - new file identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) BIND(C,NAME='h5freopen_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: ret_file_id - END FUNCTION h5freopen_c - END INTERFACE - - hdferr = h5freopen_c(file_id, ret_file_id) - - END SUBROUTINE h5freopen_f -!****s* H5F/h5fget_create_plist_f -! -! NAME -! h5fget_create_plist_f -! -! PURPOSE -! Returns a file creation property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! prop_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) BIND(C,NAME='h5fget_create_plist_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: prop_id - END FUNCTION h5fget_create_plist_c - END INTERFACE - - hdferr = h5fget_create_plist_c(file_id, prop_id) - - END SUBROUTINE h5fget_create_plist_f -!****s* H5F/h5fget_access_plist_f -! -! NAME -! h5fget_access_plist_f -! -! PURPOSE -! Returns a file access property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! access_id - access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) BIND(C,NAME='h5fget_access_plist_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: access_id - END FUNCTION h5fget_access_plist_c - END INTERFACE - - hdferr = h5fget_access_plist_c(file_id, access_id) - - END SUBROUTINE h5fget_access_plist_f - -!****s* H5F/h5fis_hdf5_f -! -! NAME -! h5fis_hdf5_f -! -! PURPOSE -! Determines whether a file is in the HDF5 format. -! -! INPUTS -! name - name of the file to check -! OUTPUTS -! status - indicates if file is and HDF5 file -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fis_hdf5_f(name, status, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - LOGICAL, INTENT(OUT) :: status ! Indicates if file - ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: flag ! "TRUE/FALSE" flag from C routine - ! to define status value. - - INTERFACE - INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) BIND(C,NAME='h5fis_hdf5_c') - IMPORT :: C_CHAR - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER :: flag - END FUNCTION h5fis_hdf5_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5fis_hdf5_c(name, namelen, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5fis_hdf5_f -!****s* H5F/h5fclose_f -! -! NAME -! h5fclose_f -! -! PURPOSE -! Closes HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fclose_f(file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fclose_c(file_id) BIND(C,NAME='h5fclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - END FUNCTION h5fclose_c - END INTERFACE - - hdferr = h5fclose_c(file_id) - - END SUBROUTINE h5fclose_f - -!****s* H5F/h5fget_obj_count_f -! -! NAME -! h5fget_obj_count_f -! -! PURPOSE -! Gets number of the objects open within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_count - number of open objects -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Changed the type of obj_count to INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) BIND(C,NAME='h5fget_obj_count_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - END FUNCTION h5fget_obj_count_c - END INTERFACE - - hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) - - END SUBROUTINE h5fget_obj_count_f - -!****s* H5F/h5fget_obj_ids_f -! -! NAME -! h5fget_obj_ids_f -! -! PURPOSE -! Get list of open objects identifiers within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_ids - array of open object identifiers -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! num_objs - number of open objects -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Added optional parameter num_objs for number of open objects -! of the specified type and changed type of max_obj to -! INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - ! Array of open objects iidentifiers - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects -!***** - INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type - - INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) & - BIND(C,NAME='h5fget_obj_ids_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type - INTEGER(SIZE_T), INTENT(IN) :: max_objs - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs - END FUNCTION h5fget_obj_ids_c - END INTERFACE - - hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - IF (PRESENT(num_objs)) num_objs= c_num_objs - - END SUBROUTINE h5fget_obj_ids_f -!****s* H5F/h5fget_freespace_f -! -! NAME -! h5fget_freespace_f -! -! PURPOSE -! Get amount of free space within a file -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! free_space - amount of free space in file -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Quincey Koziol -! October 7, 2003 -! -! SOURCE - SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - ! amount of free space in file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) & - BIND(C,NAME='h5fget_freespace_c') - IMPORT :: HID_T, HSSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - END FUNCTION h5fget_freespace_c - END INTERFACE - - hdferr = h5fget_freespace_c(file_id, free_space) - - END SUBROUTINE h5fget_freespace_f -!****s* H5F/h5fget_name_f -! -! NAME -! h5fget_name_f -! -! PURPOSE -! Gets the name of the file from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! buf - buffer to store the read name -! size - actual size of the name -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! July 6, 2004 -! -! SOURCE - SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Buffer to hold file name - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTEGER(SIZE_T) :: buflen - - INTERFACE - INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) & - BIND(C,NAME='h5fget_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(SIZE_T), INTENT(OUT) :: size - INTEGER(SIZE_T) :: buflen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5fget_name_c - END INTERFACE - buflen = LEN_TRIM(buf) - hdferr = h5fget_name_c(obj_id, size, buf, buflen) - END SUBROUTINE h5fget_name_f -!****s* H5F/h5fget_filesize_f -! -! NAME -! h5fget_filesize_f -! -! PURPOSE -! Retrieves the file size of the HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! size - file size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! July 7, 2004 -! -! SOURCE - SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5fget_filesize_c(file_id, size) & - BIND(C,NAME='h5fget_filesize_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5fget_filesize_c - END INTERFACE - hdferr = h5fget_filesize_c(file_id, size) - END SUBROUTINE h5fget_filesize_f - -!****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 PARAMETERS -! buf_size - Returns the size in bytes of the buffer required to store the file image, -! no data will be copied. -! -! AUTHOR -! M. Scot Breitenfeld -! November 26, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: file_id - TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER , INTENT(OUT) :: hdferr - INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size -!***** - - INTEGER(SIZE_T) :: buf_size_default - - INTERFACE - INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - IMPORT :: C_PTR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - 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 diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 new file mode 100644 index 0000000..faa1967 --- /dev/null +++ b/fortran/src/H5Fff.f90 @@ -0,0 +1,834 @@ +!****h* ROBODoc/H5F +! +! NAME +! MODULE H5F +! +! FILE +! H5Fff.f90 +! +! PURPOSE +! This file contains Fortran 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 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. +! +!***** + +MODULE H5F + USE H5GLOBAL + +CONTAINS +!****s* H5F/h5fcreate_f +! +! NAME +! h5fcreate_f +! +! PURPOSE +! Creates HDF5 files. +! +! INPUTS +! name - name of the file to create +! access_flags - File access flags. Allowable values are: +! H5F_ACC_TRUNC_F +! H5F_ACC_EXCL_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & + creation_prp, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp + ! File creation propertly + ! list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: creation_prp_default + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER(HID_T), INTENT(IN) :: creation_prp_default + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fcreate_c + END INTERFACE + + creation_prp_default = H5P_DEFAULT_F + access_prp_default = H5P_DEFAULT_F + + IF (PRESENT(creation_prp)) creation_prp_default = creation_prp + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + + END SUBROUTINE h5fcreate_f +!****s* H5F/h5fflush_f +! +! NAME +! h5fflush_f +! +! PURPOSE +! Flushes all buffers associated WITH a file to disk +! +! INPUTS +! object_id - identifier of object used to identify the file. +! scope - specifies the scope of the flushing action. +! Possible values are: +! H5F_SCOPE_GLOBAL_F +! H5F_SCOPE_LOCAL_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fflush_f(object_id, scope, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object + !associate with a file, + !including the file itself, + !a dataset, a group, an + !attribute, or a named + !data type + + INTEGER, INTENT(IN) :: scope !scope of the flushing + !action, possible values + !are: H5F_SCOPE_GLOBAL_F + ! which flushes the entire + !virtual file, + !and H5F_SCOPE_LOCAL_F + !which flushes only the + !specified file. + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fflush_c(object_id, scope) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: scope + END FUNCTION h5fflush_c + END INTERFACE + + hdferr = h5fflush_c(object_id, scope) + + END SUBROUTINE h5fflush_f +!****s* H5F/h5fmount_f +! +! NAME +! h5fmount_f +! +! PURPOSE +! Mounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the group onto which the file +! specified by child_id is to be mounted. +! child_id - the identifier of the file to be mounted. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - the identifier of the property list to be used +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! in which dsetname is defined + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the + ! file to be mounted + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & + child_id, access_prp_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fmount_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) + + END SUBROUTINE h5fmount_f + +!****s* H5F/h5funmount_f +! +! NAME +! h5funmount_f +! +! PURPOSE +! Unmounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the mount point +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5funmount_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! at which the specified file + ! is to be unmounted + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5funmount_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5funmount_c(loc_id, name, namelen) + + END SUBROUTINE h5funmount_f +!****s* H5F/h5fopen_f +! +! NAME +! h5fopen_f +! +! PURPOSE +! Opens HDF5 file. +! +! INPUTS +! name - name of the file to acecss +! access_flags - File access flags. Allowable values are: +! H5F_ACC_RDWR_F +! H5F_ACC_RDONLY_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5fopen_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + END SUBROUTINE h5fopen_f +!****s* H5F/h5freopen_f +! +! NAME +! h5freopen_f +! +! PURPOSE +! Reopens HDF5 file. +! +! INPUTS +! file_id - identifier of a file for which an +! additional identifier is required +! OUTPUTS +! ret_file_id - new file identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: ret_file_id + END FUNCTION h5freopen_c + END INTERFACE + + hdferr = h5freopen_c(file_id, ret_file_id) + + END SUBROUTINE h5freopen_f +!****s* H5F/h5fget_create_plist_f +! +! NAME +! h5fget_create_plist_f +! +! PURPOSE +! Returns a file creation property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! prop_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: prop_id + END FUNCTION h5fget_create_plist_c + END INTERFACE + + hdferr = h5fget_create_plist_c(file_id, prop_id) + + END SUBROUTINE h5fget_create_plist_f +!****s* H5F/h5fget_access_plist_f +! +! NAME +! h5fget_access_plist_f +! +! PURPOSE +! Returns a file access property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! access_id - access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: access_id + END FUNCTION h5fget_access_plist_c + END INTERFACE + + hdferr = h5fget_access_plist_c(file_id, access_id) + + END SUBROUTINE h5fget_access_plist_f + +!****s* H5F/h5fis_hdf5_f +! +! NAME +! h5fis_hdf5_f +! +! PURPOSE +! Determines whether a file is in the HDF5 format. +! +! INPUTS +! name - name of the file to check +! OUTPUTS +! status - indicates if file is and HDF5 file +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fis_hdf5_f(name, status, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + LOGICAL, INTENT(OUT) :: status ! Indicates if file + ! is an HDF5 file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: flag ! "TRUE/FALSE" flag from C routine + ! to define status value. + + INTERFACE + INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER :: flag + END FUNCTION h5fis_hdf5_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5fis_hdf5_c(name, namelen, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5fis_hdf5_f +!****s* H5F/h5fclose_f +! +! NAME +! h5fclose_f +! +! PURPOSE +! Closes HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fclose_f(file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fclose_c(file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + END FUNCTION h5fclose_c + END INTERFACE + + hdferr = h5fclose_c(file_id) + + END SUBROUTINE h5fclose_f + +!****s* H5F/h5fget_obj_count_f +! +! NAME +! h5fget_obj_count_f +! +! PURPOSE +! Gets number of the objects open within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_count - number of open objects +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Changed the type of obj_count to INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + END FUNCTION h5fget_obj_count_c + END INTERFACE + + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) + + END SUBROUTINE h5fget_obj_count_f + +!****s* H5F/h5fget_obj_ids_f +! +! NAME +! h5fget_obj_ids_f +! +! PURPOSE +! Get list of open objects identifiers within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_ids - array of open object identifiers +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! num_objs - number of open objects +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Added optional parameter num_objs for number of open objects +! of the specified type and changed type of max_obj to +! INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + ! Array of open objects iidentifiers + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects +!***** + INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type + + INTERFACE + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(IN) :: max_objs + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs + END FUNCTION h5fget_obj_ids_c + END INTERFACE + + hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + IF (PRESENT(num_objs)) num_objs= c_num_objs + + END SUBROUTINE h5fget_obj_ids_f +!****s* H5F/h5fget_freespace_f +! +! NAME +! h5fget_freespace_f +! +! PURPOSE +! Get amount of free space within a file +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! free_space - amount of free space in file +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Quincey Koziol +! October 7, 2003 +! +! SOURCE + SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + ! amount of free space in file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + END FUNCTION h5fget_freespace_c + END INTERFACE + + hdferr = h5fget_freespace_c(file_id, free_space) + + END SUBROUTINE h5fget_freespace_f +!****s* H5F/h5fget_name_f +! +! NAME +! h5fget_name_f +! +! PURPOSE +! Gets the name of the file from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! buf - buffer to store the read name +! size - actual size of the name +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! July 6, 2004 +! +! SOURCE + SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(INOUT) :: buf + ! Buffer to hold file name + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTEGER(SIZE_T) :: buflen + + INTERFACE + INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER(SIZE_T) :: buflen + CHARACTER(LEN=*), INTENT(OUT) :: buf + END FUNCTION h5fget_name_c + END INTERFACE + buflen = LEN_TRIM(buf) + hdferr = h5fget_name_c(obj_id, size, buf, buflen) + END SUBROUTINE h5fget_name_f +!****s* H5F/h5fget_filesize_f +! +! NAME +! h5fget_filesize_f +! +! PURPOSE +! Retrieves the file size of the HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! size - file size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! July 7, 2004 +! +! SOURCE + SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5fget_filesize_c(file_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5fget_filesize_c + END INTERFACE + hdferr = h5fget_filesize_c(file_id, size) + END SUBROUTINE h5fget_filesize_f + + +END MODULE H5F diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90 new file mode 100644 index 0000000..8544870 --- /dev/null +++ b/fortran/src/H5Fff_F03.f90 @@ -0,0 +1,99 @@ +!****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 PARAMETERS +! buf_size - Returns the size in bytes of the buffer required to store the file image, +! no data will be copied. +! +! 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 , INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size +!***** + + INTEGER(SIZE_T) :: buf_size_default + + INTERFACE + INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + USE H5GLOBAL + 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/src/H5Fff_F90.f90 b/fortran/src/H5Fff_F90.f90 new file mode 100644 index 0000000..b6e659b --- /dev/null +++ b/fortran/src/H5Fff_F90.f90 @@ -0,0 +1,43 @@ +!****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. * +! 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 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. +! +!***** + + +MODULE H5F_PROVISIONAL + + USE H5GLOBAL + IMPLICIT NONE + +END MODULE H5F_PROVISIONAL diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index b9c44bb..7f755b3 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -1,6 +1,6 @@ /****h* H5Gf/H5Gf * PURPOSE - * This file contains C stubs for H5G Fortran APIs + * This file contains C stubs for H5G Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,29 +26,30 @@ /****if* H5Gf/h5gcreate_c * NAME - * h5gcreate_c + * h5gcreate_c * PURPOSE - * Call H5Gcreate to create a group + * Call H5Gcreate to create a group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * size_hint - length of names in the group + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * size_hint - length of names in the group * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * HISTORY - * Changed to call H5Gcreate2 because H5Gcreate flip-flops and - * H5Gcreate1 can be compiled out of the library - * QAK - 2007/08/23 + * + * Changed to call H5Gcreate2 because H5Gcreate flip-flops and + * H5Gcreate1 can be compiled out of the library + * QAK - 2007/08/23 * SOURCE */ int_f -h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, +nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id ) /******/ { @@ -97,26 +98,26 @@ DONE: /****if* H5Gf/h5gopen_c * NAME - * h5gopen_c + * h5gopen_c * PURPOSE - * Call H5Gopen to open a dataset + * Call H5Gopen to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * gapl_id - Group access property list identifier + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * gapl_id - Group access property list identifier * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * * SOURCE */ int_f -h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) +nh5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { char *c_name = NULL; @@ -147,28 +148,28 @@ DONE: /****if* H5Gf/h5gget_obj_info_idx_c * NAME - * h5gget_obj_info_idx_c + * h5gget_obj_info_idx_c * PURPOSE - * Call H5Gget_obj_info to return name and the type of group - * member + * Call H5Gget_obj_info to return name and the type of group + * member * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * idx - index of the group member + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * idx - index of the group member * OUTPUTS - * obj_name - buffer to store member's name - * obj_namelen - length of the buffer - * obj_type - type of the object + * obj_name - buffer to store member's name + * obj_namelen - length of the buffer + * obj_type - type of the object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, +nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type) /******/ { @@ -206,7 +207,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, goto DONE; /* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't - * work on non-hard links - QAK + * work on non-hard links - QAK */ *obj_type = oinfo.type; @@ -230,24 +231,24 @@ DONE: /****if* H5Gf/h5gn_members_c * NAME - * h5gn_members_c + * h5gn_members_c * PURPOSE - * Call H5Gget_info_by_name to find number of objects in the group + * Call H5Gget_info_by_name to find number of objects in the group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length + * loc_id - file or group identifier + * name - name of the group + * namelen - name length * OUTPUTS - * nmemebers - number of members + * nmemebers - number of members * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) +nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) /******/ { char *c_name = NULL; @@ -275,21 +276,21 @@ DONE: /****if* H5Gf/h5gclose_c * NAME - * h5gclose_c + * h5gclose_c * PURPOSE - * Call H5Gclose to close the group + * Call H5Gclose to close the group * INPUTS - * grp_id - identifier of the group to be closed + * grp_id - identifier of the group to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -h5gclose_c(hid_t_f *grp_id) +nh5gclose_c(hid_t_f *grp_id) /******/ { int ret_value = 0; @@ -302,19 +303,19 @@ h5gclose_c(hid_t_f *grp_id) /****if* H5Gf/h5glink_c * NAME - * h5glink_c + * h5glink_c * PURPOSE - * Call H5Glink to link the specified type + * Call H5Glink to link the specified type * INPUTS - * loc_id - identifier of file or group - * link_type - link type - * current_name - name of the existing object for hard link, - * anything for the soft link - * current_namelen - current name lenghth - * new_name - new name for the object - * new_namelen - new_name lenghth + * loc_id - identifier of file or group + * link_type - link type + * current_name - name of the existing object for hard link, + * anything for the soft link + * current_namelen - current name lenghth + * new_name - new name for the object + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -322,7 +323,7 @@ h5gclose_c(hid_t_f *grp_id) */ int_f -h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, +nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen) /******/ { @@ -384,32 +385,32 @@ DONE: /****if* H5Gf/h5glink2_c * NAME - * h5glink2_c + * h5glink2_c * PURPOSE - * Call H5Glink2 to link the specified type + * Call H5Glink2 to link the specified type * INPUTS - * cur_loc_id - identifier of file or group - * cur_name - name of the existing object for hard link releative - * to cur_loc_id location, - * anything for the soft link - * current_namelen - current name lenghth - * link_type - link type - * new_loc_id - location identifier - * new_name - new name for the object releative to the new_loc_id - * location - * new_namelen - new_name lenghth + * cur_loc_id - identifier of file or group + * cur_name - name of the existing object for hard link releative + * to cur_loc_id location, + * anything for the soft link + * current_namelen - current name lenghth + * link_type - link type + * new_loc_id - location identifier + * new_name - new name for the object releative to the new_loc_id + * location + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, September 25, 2002 + * Wednesday, September 25, 2002 * HISTORY * * SOURCE */ int_f -h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, +nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen) /******/ { @@ -469,14 +470,14 @@ DONE: /****if* H5Gf/h5gunlink_c * NAME - * h5gunlink_c + * h5gunlink_c * PURPOSE - * Call H5Gunlink to remove the specified name + * Call H5Gunlink to remove the specified name * INPUTS - * loc_id - identifier of file or group - * name - name of the object to unlink + * loc_id - identifier of file or group + * name - name of the object to unlink * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -484,7 +485,7 @@ DONE: */ int_f -h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) +nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) /******/ { char *c_name = NULL; @@ -511,17 +512,17 @@ DONE: /****if* H5Gf/h5gmove_c * NAME - * h5gmove_c + * h5gmove_c * PURPOSE - * Call H5Gmove to rename an object within an HDF5 file + * Call H5Gmove to rename an object within an HDF5 file * INPUTS - * loc_id - identifier of file or group - * src_name - name of the original object - * src_namelen - original name lenghth - * dst_name - new name for the object - * dst_namelen - new name lenghth + * loc_id - identifier of file or group + * src_name - name of the original object + * src_namelen - original name lenghth + * dst_name - new name for the object + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -529,7 +530,7 @@ DONE: */ int_f -h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) +nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -561,18 +562,18 @@ DONE: /****if* H5Gf/h5gmove2_c * NAME - * h5gmove2_c + * h5gmove2_c * PURPOSE - * Call H5Gmove2 to rename an object within an HDF5 file + * Call H5Gmove2 to rename an object within an HDF5 file * INPUTS - * src_loc_id - identifier of file or group - * src_name - name of the original object relative to src_loc_id - * src_namelen - original name lenghth - * dst_loc_id - new location identifier - * dst_name - new name for the object relative to dst_loc_id - * dst_namelen - new name lenghth + * src_loc_id - identifier of file or group + * src_name - name of the original object relative to src_loc_id + * src_namelen - original name lenghth + * dst_loc_id - new location identifier + * dst_name - new name for the object relative to dst_loc_id + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, September 25, 2002 @@ -581,7 +582,7 @@ DONE: */ int_f -h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) +nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -613,18 +614,18 @@ DONE: /****if* H5Gf/h5gget_linkval_c * NAME - * h5gget_linkval_c + * h5gget_linkval_c * PURPOSE - * Call H5Gget_linkval to return the name of object + * Call H5Gget_linkval to return the name of object * INPUTS - * loc_id - identifier of file or group - * name - name of the object that symbolic link points to - * namelen - the name lenghth - * size - lenghth of retrurned value + * loc_id - identifier of file or group + * name - name of the object that symbolic link points to + * namelen - the name lenghth + * size - lenghth of retrurned value * OUTPUTS - * value - name to be returned + * value - name to be returned * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -632,7 +633,7 @@ DONE: */ int_f -h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, +nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value) /******/ { @@ -677,26 +678,26 @@ DONE: /****if* H5Gf/h5gset_comment_c * NAME - * h5gset_comment_c + * h5gset_comment_c * PURPOSE - * Call H5Oset_comment_by_name to set comments for the specified object + * Call H5Oset_comment_by_name to set comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * comment - the new comment - * commentlen - new comment lenghth + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * comment - the new comment + * commentlen - new comment lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * HISTORY - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f -h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, +nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen) /******/ { @@ -728,24 +729,24 @@ DONE: /****if* H5Gf/h5gget_comment_c * NAME - * h5gget_comment_c + * h5gget_comment_c * PURPOSE - * Call H5Oget_comment_by_name to retrieve comments for the specified object + * Call H5Oget_comment_by_name to retrieve comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * bufsize - at most bufsize characters - * comment - the new comment + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * bufsize - at most bufsize characters + * comment - the new comment * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * SOURCE */ int_f -h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, +nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment) /******/ { @@ -790,26 +791,26 @@ DONE: /****if* H5Gf/h5gcreate_anon_c * NAME - * h5gcreate_anon_c + * h5gcreate_anon_c * PURPOSE - * Call H5Gcreate_anon + * Call H5Gcreate_anon * INPUTS * - * loc_id - Location identifier - * gcpl_id - Group creation property list identifier - * gapl_id - Group access property list identifier + * loc_id - Location identifier + * gcpl_id - Group creation property list identifier + * gapl_id - Group access property list identifier * * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 * SOURCE */ int_f -h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) +nh5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { @@ -824,24 +825,24 @@ done: /****if* H5Gf/h5gget_create_plist_c * NAME - * h5gget_create_plist_c + * h5gget_create_plist_c * PURPOSE - * Call H5Gget_create_plist + * Call H5Gget_create_plist * INPUTS * - * grp_id - group identifier + * grp_id - group identifier * * OUTPUTS - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 * SOURCE */ int_f -h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) +nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -856,36 +857,36 @@ done: /****if* H5Gf/h5gget_info_c * NAME - * h5gget_info_c + * h5gget_info_c * PURPOSE - * Call H5Gget_info + * Call H5Gget_info * INPUTS - * group_id - Group identifier + * group_id - Group identifier * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 15, 2008 + * February 15, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) +nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ { @@ -913,43 +914,43 @@ done: /****if* H5Gf/h5gget_info_by_idx_c * NAME - * h5gget_info_by_idx_c + * h5gget_info_by_idx_c * PURPOSE - * Call H5Gget_info_by_idx + * Call H5Gget_info_by_idx * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * index_type - Index type - * order - Order of the count in the index - * n - Position in the index of the group for which information is retrieved - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * index_type - Index type + * order - Order of the count in the index + * n - Position in the index of the group for which information is retrieved + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * - * - Added 'mounted' parameter - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ @@ -986,40 +987,40 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, /****if* H5Gf/h5gget_info_by_name_c * NAME - * h5gget_info_by_name_c + * h5gget_info_by_name_c * PURPOSE - * Call H5Gget_info_by_name + * Call H5Gget_info_by_name * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted) /******/ { diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 deleted file mode 100644 index 2e002b5..0000000 --- a/fortran/src/H5Gff.F90 +++ /dev/null @@ -1,1272 +0,0 @@ -!****h* ROBODoc/H5G -! -! NAME -! MODULE H5G -! -! FILE -! fortran/src/H5Gff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5G 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5G 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 H5G - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR - USE H5GLOBAL - -CONTAINS - -!****s* H5G/h5gcreate_f -! -! NAME -! h5gcreate_f -! -! PURPOSE -! Creates a new group. -! -! INPUTS -! loc_id - location identifier -! name - group name at the specified location -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! size_hint - a parameter indicating the number of bytes to -! reserve for the names that will appear in the group -! lcpl_id - Property list for link creation -! gcpl_id - Property list for group creation -! gapl_id - Property list for group access -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added additional optional paramaters in 1.8 -! MSB - February 27, 2008 -! -! SOURCE - SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint - ! Parameter indicating - ! the number of bytes - ! to reserve for the - ! names that will appear - ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F - ! if using any of the optional - ! parameters lcpl_id, gcpl_id, and/or gapl_id when not - ! using keywords in specifying the optional parameters - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTEGER :: namelen ! Length of the name character string - INTEGER(SIZE_T) :: size_hint_default - - INTERFACE - INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & - size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) & - BIND(C,NAME='h5gcreate_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T) :: size_hint_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - END FUNCTION h5gcreate_c - END INTERFACE - - size_hint_default = OBJECT_NAMELEN_DEFAULT_F - IF (PRESENT(size_hint)) size_hint_default = size_hint - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - gcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - - hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & - lcpl_id_default, gcpl_id_default, gapl_id_default) - - END SUBROUTINE h5gcreate_f - -!!$! -!!$!****s* H5G/ -!!$! -!!$! NAME -!!$! h5gcreate2_f -!!$! -!!$! PURPOSE -!!$! Creates a new group. -!!$! -!!$! INPUTS -!!$! loc_id - location identifier -!!$! name - group name at the specified location -!!$! OUTPUTS -!!$! grp_id - group identifier -!!$! hdferr: - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! -!!$! lcpl_id - Property list for link creation -!!$! gcpl_id - Property list for group creation -!!$! gapl_id - Property list for group access -!!$! -!!$! AUTHOR M. Scot Breitenfeld -!!$! February 27, 2008 -!!$! -!!$! HISTORY -!!$! -!!$! NOTES Needed to switch the first 2 arguments to avoid conflect -!!$! with h5gcreate1_f -!!$! -!!$ -!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & -!!$ lcpl_id, gcpl_id, gapl_id) -!!$ IMPLICIT NONE -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of the group -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier -!!$ -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!!$ -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT ! Dummy argument to pass to c call -!!$ INTEGER :: namelen ! Length of the name character string -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & -!!$ OBJECT_NAME -! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c -!!$ !DEC$ENDIF -!!$ !DEC$ATTRIBUTES reference :: name -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name -!!$ INTEGER :: namelen -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id -!!$ END FUNCTION h5gcreate_c -!!$ END INTERFACE -!!$ -!!$ namelen = LEN(name) -!!$ OBJECT_NAME -! LEN_DEFAULT = OBJECT_NAME -! LEN_DEFAULT_F -!!$ -!!$ lcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id -!!$ gcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id -!!$ gapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id -!!$ -!!$ -!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME -! LEN_DEFAULT, grp_id, & -!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ -!!$ END SUBROUTINE h5gcreate2_f - -! -!****s* H5G/h5gopen_f -! -! NAME -! h5gopen_f -! -! PURPOSE -! Opens an existing group. -! -! INPUTS -! loc_id - location identifier -! name - name of the group to open -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gapl_id - Group access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added 1.8 (optional) parameter gapl_id -! February, 2008 M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier -!***** - INTEGER(HID_T) :: gapl_id_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) & - BIND(C,NAME='h5gopen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: gapl_id_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - END FUNCTION h5gopen_c - END INTERFACE - - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - - END SUBROUTINE h5gopen_f -! -!****s* H5G/h5gclose_f -! -! NAME -! h5gclose_f -! -! PURPOSE -! Closes the specified group. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gclose_f(grp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gclose_c(grp_id) BIND(C,NAME='h5gclose_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: grp_id - END FUNCTION h5gclose_c - END INTERFACE - - hdferr = h5gclose_c(grp_id) - - END SUBROUTINE h5gclose_f -! -!****s* H5G/h5gget_obj_info_idx_f -! -! NAME -! h5gget_obj_info_idx_f -! -! PURPOSE -! Returns name and type of the group member identified by -! its index. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! idx - object index (zero-based) -! OUTPUTS -! obj_name - object name -! obj_type - object type -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & - obj_name, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(IN) :: idx ! Index of member object - CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object - INTEGER, INTENT(OUT) :: obj_type ! Object type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: obj_namelen ! Length of the obj_name character string - - INTERFACE - INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & - namelen, idx, & - obj_name, obj_namelen, obj_type) BIND(C,NAME='h5gget_obj_info_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: idx - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: obj_name - INTEGER :: obj_namelen - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5gget_obj_info_idx_c - END INTERFACE - - namelen = LEN(name) - obj_namelen = LEN(obj_name) - hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & - obj_name, obj_namelen, obj_type) - END SUBROUTINE h5gget_obj_info_idx_f - -! -!****s* H5G/h5gn_members_f -! -! NAME -! h5gn_members_f -! -! PURPOSE -! Returns the number of group members. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! OUTPUTS -! nmembers - number of group members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(OUT) :: nmembers ! Number of members in the - ! group - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) & - BIND(C,NAME='h5gn_members_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(OUT) :: nmembers - END FUNCTION h5gn_members_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) - - END SUBROUTINE h5gn_members_f -! -!****s* H5G/h5glink_f -! -! NAME -! h5glink_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. -! -! INPUTS -! loc_id - location identifier -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! current_name - name of the existing object if link is a -! hard link. Can be anything for the soft link -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5glink_f(loc_id, link_type, current_name, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - CHARACTER(LEN=*), INTENT(IN) :: current_name - ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: current_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) & - BIND(C,NAME='h5glink_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: current_name - INTEGER :: current_namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5glink_c - END INTERFACE - - current_namelen = LEN(current_name) - new_namelen = LEN(new_name) - hdferr = h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - END SUBROUTINE h5glink_f - -! -!****s* H5G/h5glink2_f -! -! NAME -! h5glink2_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. current_name and new_name are interpreted -! releative to current and new location identifiers. -! -! INPUTS -! cur_loc_id - location identifier -! cur_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! new_loc_id - new location identifier -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: cur_name - ! Current name of an object - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: cur_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & - link_type, new_loc_id, & - new_name, new_namelen) BIND(C,NAME='h5glink2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: cur_loc_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: cur_name - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name - INTEGER :: cur_namelen - INTEGER :: new_namelen - END FUNCTION h5glink2_c - END INTERFACE - - cur_namelen = LEN(cur_name) - new_namelen = LEN(new_name) - hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & - new_loc_id, new_name, new_namelen) - END SUBROUTINE h5glink2_f - -! -!****s* H5G/h5gunlink_f -! -! NAME -! h5gunlink_f -! -! PURPOSE -! Removes the specified name from the group graph and -! decrements the link count for the object to which name -! points -! -! INPUTS -! loc_id - location identifier -! name - name of the object to unlink -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gunlink_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the name character string - - INTERFACE - INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) BIND(C,NAME='h5gunlink_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5gunlink_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gunlink_c(loc_id, name, namelen) - END SUBROUTINE h5gunlink_f - -! -!****s* H5G/h5gmove_f -! -! NAME -! h5gmove_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! loc_id - location identifier -! name - object's name at specified location -! new_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) BIND(C,NAME='h5gmove_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5gmove_c - END INTERFACE - - namelen = LEN(name) - new_namelen = LEN(new_name) - hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - END SUBROUTINE h5gmove_f -! -!****s* H5G/h5gmove2_f -! -! NAME -! h5gmove2_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! src_loc_id - original location identifier -! src_name - object's name at specified original location -! dst_loc_id - original location identifier -! dst_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object - INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: src_namelen ! Length of the current_name string - INTEGER :: dst_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & - dst_loc_id, dst_name, dst_namelen) BIND(C,NAME='h5gmove2_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: src_loc_id - INTEGER(HID_T), INTENT(IN) :: dst_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name - INTEGER :: src_namelen - INTEGER :: dst_namelen - END FUNCTION h5gmove2_c - END INTERFACE - - src_namelen = LEN(src_name) - dst_namelen = LEN(dst_name) - hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) - END SUBROUTINE h5gmove2_f -! -!****s* H5G/h5gget_linkval_f -! -! NAME -! h5gget_linkval_f -! -! PURPOSE -! Returns the name of the object that the symbolic link -! points to. -! -! INPUTS -! loc_id - location identifier -! name - symbolic link to the object whose name -! is to be returned. -! size - maximum number of characters to be returned -! OUTPUTS -! buffer - a buffer to hold the name of the object -! being sought -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a name of - ! the object symbolic link - ! points to - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_linkval_c') - IMPORT :: C_CHAR, SIZE_T - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer - END FUNCTION h5gget_linkval_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) - END SUBROUTINE h5gget_linkval_f - -! -!****s* H5G/h5gset_comment_f -! -! NAME -! h5gset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object -! comment - comment to set for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: commentlen ! Lenghth of the comment string - - INTERFACE - INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & - comment, commentlen) BIND(C,NAME='h5gset_comment_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment - INTEGER :: commentlen - END FUNCTION h5gset_comment_c - END INTERFACE - - namelen = LEN(name) - commentlen = LEN(comment) - hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) - END SUBROUTINE h5gset_comment_f -! -!****s* H5G/h5gget_comment_f -! -! NAME -! h5gget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object at specified location -! size - size of the buffer required to hold comment -! OUTPUTS -! buffer - buffer to hold object's comment -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a comment - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_comment_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer - END FUNCTION h5gget_comment_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) - - END SUBROUTINE h5gget_comment_f -! -!****s* H5G/H5Gcreate_anon_f -! -! NAME -! H5Gcreate_anon_f -! -! PURPOSE -! Creates a new empty group without linking it into the file structure. -! -! INPUTS -! loc_id - Location identifier -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gcpl_id - Group creation property list identifier -! gapl_id - Group access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTERFACE - INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) & - BIND(C,NAME='h5gcreate_anon_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation - INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - END FUNCTION h5gcreate_anon_c - END INTERFACE - - gcpl_id_default = H5P_DEFAULT_F - gapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - - END SUBROUTINE h5Gcreate_anon_f -! -!****s* H5G/H5Gget_create_plist_f -! -! NAME -! H5Gget_create_plist_f -! -! PURPOSE -! Gets a group creation property list identifier. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! gcpl_id - Group creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) BIND(C,NAME='h5gget_create_plist_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: grp_id - INTEGER(HID_T), INTENT(OUT) :: gcpl_id - END FUNCTION h5gget_create_plist_c - END INTERFACE - - hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) - - END SUBROUTINE h5gget_create_plist_f - -! -!****s* H5G/h5gget_info_f -! -! NAME -! h5gget_info_f -! -! PURPOSE -! Retrieves information about a group -! -! INPUTS -! group_id - Group identifier -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! mounted - Whether group has a file mounted on it -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! HISTORY -! -! - Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - - INTERFACE - INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) & - BIND(C,NAME='h5gget_info_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - INTEGER :: mounted_c - END FUNCTION h5gget_info_c - END INTERFACE - - hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_f -! -!****s* H5G/h5gget_info_by_idx_f -! -! NAME -! h5gget_info_by_idx_f -! -! PURPOSE -! Retrieves information about a group, according to the group’s position within an index. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! index_type - Index type -! order - Order of the count in the index -! n - Position in the index of the group for which information is retrieved -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - INTEGER, INTENT(IN) :: index_type ! Index type - INTEGER, INTENT(IN) :: order ! Order of the count in the index - INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_idx_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & - index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_idx_f -! -!****s* H5G/h5gget_info_by_name_f -! -! NAME -! h5gget_info_by_name_f -! -! PURPOSE -! Retrieves information about a group. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! -! OUTPUTS -! -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! SOURCE - SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_name_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_name_f - -END MODULE H5G diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90 new file mode 100644 index 0000000..d4d7496 --- /dev/null +++ b/fortran/src/H5Gff.f90 @@ -0,0 +1,1331 @@ +!****h* ROBODoc/H5G +! +! NAME +! MODULE H5G +! +! FILE +! fortran/src/H5Gff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5G 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 H5G 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 H5G + USE H5GLOBAL + +! PRIVATE :: h5gcreate1_f +! PRIVATE :: h5gcreate2_f + +! INTERFACE h5gcreate_f +! MODULE PROCEDURE h5gcreate1_f +! MODULE PROCEDURE h5gcreate2_f +! END INTERFACE + +CONTAINS + +!****s* H5G/h5gcreate_f +! +! NAME +! h5gcreate_f +! +! PURPOSE +! Creates a new group. +! +! INPUTS +! loc_id - location identifier +! name - group name at the specified location +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! size_hint - a parameter indicating the number of bytes to +! reserve for the names that will appear in the group +! lcpl_id - Property list for link creation +! gcpl_id - Property list for group creation +! gapl_id - Property list for group access +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added additional optional paramaters in 1.8 +! MSB - February 27, 2008 +! +! SOURCE + SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint + ! Parameter indicating + ! the number of bytes + ! to reserve for the + ! names that will appear + ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F + ! if using any of the optional + ! parameters lcpl_id, gcpl_id, and/or gapl_id when not + ! using keywords in specifying the optional parameters + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTEGER :: namelen ! Length of the name character string + INTEGER(SIZE_T) :: size_hint_default + + INTERFACE + INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & + size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T) :: size_hint_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + END FUNCTION h5gcreate_c + END INTERFACE + + size_hint_default = OBJECT_NAMELEN_DEFAULT_F + IF (PRESENT(size_hint)) size_hint_default = size_hint + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + gcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + + hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & + lcpl_id_default, gcpl_id_default, gapl_id_default) + + END SUBROUTINE h5gcreate_f + +!!$! +!!$!****s* H5G/ +!!$! +!!$! NAME +!!$! h5gcreate2_f +!!$! +!!$! PURPOSE +!!$! Creates a new group. +!!$! +!!$! INPUTS +!!$! loc_id - location identifier +!!$! name - group name at the specified location +!!$! OUTPUTS +!!$! grp_id - group identifier +!!$! hdferr: - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! +!!$! lcpl_id - Property list for link creation +!!$! gcpl_id - Property list for group creation +!!$! gapl_id - Property list for group access +!!$! +!!$! AUTHOR M. Scot Breitenfeld +!!$! February 27, 2008 +!!$! +!!$! HISTORY +!!$! +!!$! NOTES Needed to switch the first 2 arguments to avoid conflect +!!$! with h5gcreate1_f +!!$! +!!$ +!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & +!!$ lcpl_id, gcpl_id, gapl_id) +!!$ IMPLICIT NONE +!!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier +!!$ +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!!$ +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT ! Dummy argument to pass to c call +!!$ INTEGER :: namelen ! Length of the name character string +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & +!!$ OBJECT_NAME +! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c +!!$ !DEC$ENDIF +!!$ !DEC$ATTRIBUTES reference :: name +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(LEN=*), INTENT(IN) :: name +!!$ INTEGER :: namelen +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id +!!$ END FUNCTION h5gcreate_c +!!$ END INTERFACE +!!$ +!!$ namelen = LEN(name) +!!$ OBJECT_NAME +! LEN_DEFAULT = OBJECT_NAME +! LEN_DEFAULT_F +!!$ +!!$ lcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id +!!$ gcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id +!!$ gapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id +!!$ +!!$ +!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME +! LEN_DEFAULT, grp_id, & +!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ +!!$ END SUBROUTINE h5gcreate2_f + +! +!****s* H5G/h5gopen_f +! +! NAME +! h5gopen_f +! +! PURPOSE +! Opens an existing group. +! +! INPUTS +! loc_id - location identifier +! name - name of the group to open +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gapl_id - Group access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added 1.8 (optional) parameter gapl_id +! February, 2008 M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier +!***** + INTEGER(HID_T) :: gapl_id_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: gapl_id_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + END FUNCTION h5gopen_c + END INTERFACE + + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + + END SUBROUTINE h5gopen_f +! +!****s* H5G/h5gclose_f +! +! NAME +! h5gclose_f +! +! PURPOSE +! Closes the specified group. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gclose_f(grp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gclose_c(grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + END FUNCTION h5gclose_c + END INTERFACE + + hdferr = h5gclose_c(grp_id) + + END SUBROUTINE h5gclose_f +! +!****s* H5G/h5gget_obj_info_idx_f +! +! NAME +! h5gget_obj_info_idx_f +! +! PURPOSE +! Returns name and type of the group member identified by +! its index. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! idx - object index (zero-based) +! OUTPUTS +! obj_name - object name +! obj_type - object type +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & + obj_name, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(IN) :: idx ! Index of member object + CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object + INTEGER, INTENT(OUT) :: obj_type ! Object type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: obj_namelen ! Length of the obj_name character string + + INTERFACE + INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & + namelen, idx, & + obj_name, obj_namelen, obj_type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: idx + CHARACTER(LEN=*), INTENT(OUT) :: obj_name + INTEGER :: obj_namelen + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5gget_obj_info_idx_c + END INTERFACE + + namelen = LEN(name) + obj_namelen = LEN(obj_name) + hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & + obj_name, obj_namelen, obj_type) + END SUBROUTINE h5gget_obj_info_idx_f + +! +!****s* H5G/h5gn_members_f +! +! NAME +! h5gn_members_f +! +! PURPOSE +! Returns the number of group members. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! OUTPUTS +! nmembers - number of group members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(OUT) :: nmembers ! Number of members in the + ! group + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(OUT) :: nmembers + END FUNCTION h5gn_members_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) + + END SUBROUTINE h5gn_members_f +! +!****s* H5G/h5glink_f +! +! NAME +! h5glink_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. +! +! INPUTS +! loc_id - location identifier +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! current_name - name of the existing object if link is a +! hard link. Can be anything for the soft link +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5glink_f(loc_id, link_type, current_name, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + CHARACTER(LEN=*), INTENT(IN) :: current_name + ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: current_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: current_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: current_name + INTEGER :: current_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5glink_c + END INTERFACE + + current_namelen = LEN(current_name) + new_namelen = LEN(new_name) + hdferr = h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + END SUBROUTINE h5glink_f + +! +!****s* H5G/h5glink2_f +! +! NAME +! h5glink2_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. current_name and new_name are interpreted +! releative to current and new location identifiers. +! +! INPUTS +! cur_loc_id - location identifier +! cur_name - name of the existing object if link is a +! hard link. Can be anything for the soft link. +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! new_loc_id - new location identifier +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: cur_name + ! Current name of an object + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: cur_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & + link_type, new_loc_id, & + new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: cur_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: cur_loc_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: cur_name + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: cur_namelen + INTEGER :: new_namelen + END FUNCTION h5glink2_c + END INTERFACE + + cur_namelen = LEN(cur_name) + new_namelen = LEN(new_name) + hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & + new_loc_id, new_name, new_namelen) + END SUBROUTINE h5glink2_f + +! +!****s* H5G/h5gunlink_f +! +! NAME +! h5gunlink_f +! +! PURPOSE +! Removes the specified name from the group graph and +! decrements the link count for the object to which name +! points +! +! INPUTS +! loc_id - location identifier +! name - name of the object to unlink +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gunlink_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the name character string + + INTERFACE + INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5gunlink_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gunlink_c(loc_id, name, namelen) + END SUBROUTINE h5gunlink_f + +! +!****s* H5G/h5gmove_f +! +! NAME +! h5gmove_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! loc_id - location identifier +! name - object's name at specified location +! new_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5gmove_c + END INTERFACE + + namelen = LEN(name) + new_namelen = LEN(new_name) + hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + END SUBROUTINE h5gmove_f +! +!****s* H5G/h5gmove2_f +! +! NAME +! h5gmove2_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! src_loc_id - original location identifier +! src_name - object's name at specified original location +! dst_loc_id - original location identifier +! dst_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object + INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: src_namelen ! Length of the current_name string + INTEGER :: dst_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & + dst_loc_id, dst_name, dst_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name + !DEC$ATTRIBUTES reference :: dst_name + INTEGER(HID_T), INTENT(IN) :: src_loc_id + INTEGER(HID_T), INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER :: src_namelen + INTEGER :: dst_namelen + END FUNCTION h5gmove2_c + END INTERFACE + + src_namelen = LEN(src_name) + dst_namelen = LEN(dst_name) + hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) + END SUBROUTINE h5gmove2_f +! +!****s* H5G/h5gget_linkval_f +! +! NAME +! h5gget_linkval_f +! +! PURPOSE +! Returns the name of the object that the symbolic link +! points to. +! +! INPUTS +! loc_id - location identifier +! name - symbolic link to the object whose name +! is to be returned. +! size - maximum number of characters to be returned +! OUTPUTS +! buffer - a buffer to hold the name of the object +! being sought +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a name of + ! the object symbolic link + ! points to + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_linkval_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) + END SUBROUTINE h5gget_linkval_f + +! +!****s* H5G/h5gset_comment_f +! +! NAME +! h5gset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object +! comment - comment to set for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: commentlen ! Lenghth of the comment string + + INTERFACE + INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & + comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER :: commentlen + END FUNCTION h5gset_comment_c + END INTERFACE + + namelen = LEN(name) + commentlen = LEN(comment) + hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) + END SUBROUTINE h5gset_comment_f +! +!****s* H5G/h5gget_comment_f +! +! NAME +! h5gget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object at specified location +! size - size of the buffer required to hold comment +! OUTPUTS +! buffer - buffer to hold object's comment +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a comment + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_comment_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) + + END SUBROUTINE h5gget_comment_f +! +!****s* H5G/H5Gcreate_anon_f +! +! NAME +! H5Gcreate_anon_f +! +! PURPOSE +! Creates a new empty group without linking it into the file structure. +! +! INPUTS +! loc_id - Location identifier +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gcpl_id - Group creation property list identifier +! gapl_id - Group access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTERFACE + INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation + INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + END FUNCTION h5gcreate_anon_c + END INTERFACE + + gcpl_id_default = H5P_DEFAULT_F + gapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + + END SUBROUTINE h5Gcreate_anon_f +! +!****s* H5G/H5Gget_create_plist_f +! +! NAME +! H5Gget_create_plist_f +! +! PURPOSE +! Gets a group creation property list identifier. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! gcpl_id - Group creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER(HID_T), INTENT(OUT) :: gcpl_id + END FUNCTION h5gget_create_plist_c + END INTERFACE + + hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) + + END SUBROUTINE h5gget_create_plist_f + +! +!****s* H5G/h5gget_info_f +! +! NAME +! h5gget_info_f +! +! PURPOSE +! Retrieves information about a group +! +! INPUTS +! group_id - Group identifier +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! mounted - Whether group has a file mounted on it +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! HISTORY +! +! - Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + + INTERFACE + INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER :: mounted_c + END FUNCTION h5gget_info_c + END INTERFACE + + hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_f +! +!****s* H5G/h5gget_info_by_idx_f +! +! NAME +! h5gget_info_by_idx_f +! +! PURPOSE +! Retrieves information about a group, according to the group’s position within an index. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! index_type - Index type +! order - Order of the count in the index +! n - Position in the index of the group for which information is retrieved +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + INTEGER, INTENT(IN) :: index_type ! Index type + INTEGER, INTENT(IN) :: order ! Order of the count in the index + INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c + !DEC$ENDIF + + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_idx_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & + index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_idx_f +! +!****s* H5G/h5gget_info_by_name_f +! +! NAME +! h5gget_info_by_name_f +! +! PURPOSE +! Retrieves information about a group. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! +! OUTPUTS +! +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! SOURCE + SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_name_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_name_f + +END MODULE H5G diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index fdab0b6..55868dd 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -1,6 +1,6 @@ /****h* H5If/H5If * PURPOSE - * This file contains C stubs for H5I Fortran APIs + * This file contains C stubs for H5I Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,15 +25,15 @@ /****if* H5If/h5iget_type_c * NAME - * h5iget_type_c + * h5iget_type_c * PURPOSE - * Call H5Iget_type to get the type of an object + * Call H5Iget_type to get the type of an object * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * type - object type + * type - object type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su * Thursday, March 24, 2000 @@ -42,7 +42,7 @@ * SOURCE */ int_f -h5iget_type_c (hid_t_f *obj_id, int_f *type) +nh5iget_type_c (hid_t_f *obj_id, int_f *type) /******/ { int ret_value = -1; @@ -61,29 +61,29 @@ h5iget_type_c (hid_t_f *obj_id, int_f *type) } /****if* H5If/h5iget_name_c * NAME - * h5iget_name_c + * h5iget_name_c * PURPOSE - * Call H5Iget_name to get object's name + * Call H5Iget_name to get object's name * INPUTS - * obj_id - object identifier - * buf_size - size of the buffer + * obj_id - object identifier + * buf_size - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * length of the name on success, -1 on failure + * length of the name on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * - * Changed the size of c_buf_size to c_buf_size + 1, which - * fixes the problem of truncating the string by 1 if the - * exact size of the string (buf_size) is passed in. + * Changed the size of c_buf_size to c_buf_size + 1, which + * fixes the problem of truncating the string by 1 if the + * exact size of the string (buf_size) is passed in. * M. Scot Breitenfeld, April 21, 2008 * SOURCE */ int_f -h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) +nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) /******/ { int ret_value = -1; @@ -120,22 +120,22 @@ DONE: /****if* H5If/h5iinc_ref_c * NAME - * h5iinc_ref_c + * h5iinc_ref_c * PURPOSE - * Call H5Iinc_ref to increment object's reference count + * Call H5Iinc_ref to increment object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 * SOURCE */ int_f -h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) +nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -156,22 +156,22 @@ done: /****if* H5If/h5idec_ref_c * NAME - * h5idec_ref_c + * h5idec_ref_c * PURPOSE - * Call H5Idec_ref to decrement object's reference count + * Call H5Idec_ref to decrement object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, December 9, 2003 + * Tuesday, December 9, 2003 * SOURCE */ int_f -h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) +nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -192,15 +192,15 @@ done: /****if* H5If/h5iget_ref_c * NAME - * h5iget_ref_c + * h5iget_ref_c * PURPOSE - * Call H5Iget_ref to retrieve object's reference count + * Call H5Iget_ref to retrieve object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 @@ -208,7 +208,7 @@ done: * SOURCE */ int_f -h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) +nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -229,15 +229,15 @@ done: /****if* H5If/h5iget_file_id_c * NAME - * h5iget_file_id_c + * h5iget_file_id_c * PURPOSE - * Call H5Iget_file_id to obtain file identifier from object identifier + * Call H5Iget_file_id to obtain file identifier from object identifier * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Tuesday, August 24, 2004 @@ -245,7 +245,7 @@ done: * SOURCE */ int_f -h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) +nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) /******/ { int ret_value; @@ -266,17 +266,17 @@ done: } /*---------------------------------------------------------------------------- - * Name: h5iis_valid_c - * Purpose: Calls H5Iis_valid - * Inputs: obj_id - object identifier - * Outputs: 0 = false, 1 = true - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, August 24, 2004 - * Modifications: + * Name: h5iis_valid_c + * Purpose: Calls H5Iis_valid + * Inputs: obj_id - object identifier + * Outputs: 0 = false, 1 = true + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Tuesday, August 24, 2004 + * Modifications: *---------------------------------------------------------------------------*/ int_f -h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) +nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) { int ret_value; htri_t c_ret_value; diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 deleted file mode 100644 index c91a8aa..0000000 --- a/fortran/src/H5Iff.F90 +++ /dev/null @@ -1,345 +0,0 @@ -!****h* ROBODoc/H5I -! -! NAME -! MODULE H5I -! -! FILE -! fortran/src/H5Iff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5I 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5I 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 H5I - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR - USE H5GLOBAL - -CONTAINS - -!****s* H5I/h5iget_type_f -! -! NAME -! h5iget_type_f -! -! PURPOSE -! Retrieves the type of an object. -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! type - type of the object, possible values: -! H5I_FILE_F -! H5I_GROUP_F -! H5I_DATATYPE_F -! H5I_DATASPACE_F -! H5I_DATASET_F -! H5I_ATTR_F -! H5I_BADID_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: TYPE ! type of an object. - ! possible values are: - ! H5I_FILE_F - ! H5I_GROUP_F - ! H5I_DATATYPE_F - ! H5I_DATASPACE_F - ! H5I_DATASET_F - ! H5I_ATTR_F - ! H5I_BADID_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: TYPE - END FUNCTION h5iget_type_c - END INTERFACE - hdferr = h5iget_type_c(obj_id, TYPE) - END SUBROUTINE h5iget_type_f - -!****s* H5I/h5iget_name_f -! -! NAME -! h5iget_name_f -! -! PURPOSE -! Gets a name of an object specified by its idetifier. -! -! INPUTS -! obj_id - attribute identifier -! buf_size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in, name will be truncated if -! buffer is not big enough -! name_size - name size -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! SOURCE - SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name - INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 if successful, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(IN) :: buf_size - INTEGER(SIZE_T), INTENT(OUT) :: name_size - END FUNCTION h5iget_name_c - END INTERFACE - - hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) - END SUBROUTINE h5iget_name_f - -!****s* H5I/h5iinc_ref_f -! -! NAME -! h5iinc_ref_f -! -! PURPOSE -! Increments the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iinc_ref_c - END INTERFACE - hdferr = h5iinc_ref_c(obj_id, ref_count) - END SUBROUTINE h5iinc_ref_f - -!****s* H5I/h5idec_ref_f -! -! NAME -! h5idec_ref_f -! -! PURPOSE -! Decrements the reference count of an ID -! -! INPUTS -! obj_id - Object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5idec_ref_c - END INTERFACE - hdferr = h5idec_ref_c(obj_id, ref_count) - END SUBROUTINE h5idec_ref_f - -!****s* H5I/h5iget_ref_f -! NAME -! h5iget_ref_f -! -! PURPOSE -! Retrieves the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iget_ref_c - END INTERFACE - hdferr = h5iget_ref_c(obj_id, ref_count) - END SUBROUTINE h5iget_ref_f -! -!****s* H5I/h5iget_file_id_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Obtains file identifier from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! file_id - file identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 23, 2004 -! SOURCE - SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5iget_file_id_c - END INTERFACE - hdferr = h5iget_file_id_c(obj_id, file_id) - END SUBROUTINE h5iget_file_id_f -! -!****s* H5I/h5iis_valid_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Check if an ID is valid without producing an error message -! -! INPUTS -! id - identifier -! OUTPUTS -! valid - status of id as a valid identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! SOURCE - SUBROUTINE h5iis_valid_f(id, valid, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_valid ! 0 = .false, 1 = .true. - - INTERFACE - INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - INTEGER :: c_valid - END FUNCTION h5iis_valid_c - END INTERFACE - - hdferr = h5iis_valid_c(id, c_valid) - - valid = .FALSE. ! Default - IF(c_valid.EQ.1) valid = .TRUE. - - END SUBROUTINE h5iis_valid_f -END MODULE H5I - diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 new file mode 100644 index 0000000..7c9a843 --- /dev/null +++ b/fortran/src/H5Iff.f90 @@ -0,0 +1,352 @@ +!****h* ROBODoc/H5I +! +! NAME +! MODULE H5I +! +! FILE +! fortran/src/H5Iff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5I 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 H5I 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 H5I + + USE H5GLOBAL + +CONTAINS + +!****s* H5I/h5iget_type_f +! +! NAME +! h5iget_type_f +! +! PURPOSE +! Retrieves the type of an object. +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! type - type of the object, possible values: +! H5I_FILE_F +! H5I_GROUP_F +! H5I_DATATYPE_F +! H5I_DATASPACE_F +! H5I_DATASET_F +! H5I_ATTR_F +! H5I_BADID_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: TYPE ! type of an object. + ! possible values are: + ! H5I_FILE_F + ! H5I_GROUP_F + ! H5I_DATATYPE_F + ! H5I_DATASPACE_F + ! H5I_DATASET_F + ! H5I_ATTR_F + ! H5I_BADID_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5iget_type_c + END INTERFACE + hdferr = h5iget_type_c(obj_id, TYPE) + END SUBROUTINE h5iget_type_f + +!****s* H5I/h5iget_name_f +! +! NAME +! h5iget_name_f +! +! PURPOSE +! Gets a name of an object specified by its idetifier. +! +! INPUTS +! obj_id - attribute identifier +! buf_size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in, name will be truncated if +! buffer is not big enough +! name_size - name size +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! SOURCE + SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name + INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 if successful, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(IN) :: buf_size + INTEGER(SIZE_T), INTENT(OUT) :: name_size + END FUNCTION h5iget_name_c + END INTERFACE + + hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) + END SUBROUTINE h5iget_name_f + +!****s* H5I/h5iinc_ref_f +! +! NAME +! h5iinc_ref_f +! +! PURPOSE +! Increments the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iinc_ref_c + END INTERFACE + hdferr = h5iinc_ref_c(obj_id, ref_count) + END SUBROUTINE h5iinc_ref_f + +!****s* H5I/h5idec_ref_f +! +! NAME +! h5idec_ref_f +! +! PURPOSE +! Decrements the reference count of an ID +! +! INPUTS +! obj_id - Object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - Error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5idec_ref_c + END INTERFACE + hdferr = h5idec_ref_c(obj_id, ref_count) + END SUBROUTINE h5idec_ref_f + +!****s* H5I/h5iget_ref_f +! NAME +! h5iget_ref_f +! +! PURPOSE +! Retrieves the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iget_ref_c + END INTERFACE + hdferr = h5iget_ref_c(obj_id, ref_count) + END SUBROUTINE h5iget_ref_f +! +!****s* H5I/h5iget_file_id_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Obtains file identifier from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! file_id - file identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 23, 2004 +! SOURCE + SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5iget_file_id_c + END INTERFACE + hdferr = h5iget_file_id_c(obj_id, file_id) + END SUBROUTINE h5iget_file_id_f +! +!****s* H5I/h5iis_valid_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Check if an ID is valid without producing an error message +! +! INPUTS +! id - identifier +! OUTPUTS +! valid - status of id as a valid identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! SOURCE + SUBROUTINE h5iis_valid_f(id, valid, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_valid ! 0 = .false, 1 = .true. + + INTERFACE + INTEGER FUNCTION h5iis_valid_c(id, c_valid) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER :: c_valid + END FUNCTION h5iis_valid_c + END INTERFACE + + hdferr = h5iis_valid_c(id, c_valid) + + valid = .FALSE. ! Default + IF(c_valid.EQ.1) valid = .TRUE. + + END SUBROUTINE h5iis_valid_f +END MODULE H5I + diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 0d3aac2..6523ab4 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -1,6 +1,6 @@ /****h* H5Lf/H5Lf * PURPOSE - * This file contains C stubs for H5L Fortran APIs + * This file contains C stubs for H5L Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,34 +26,34 @@ /****if* H5Lf/h5lcopy_c * NAME - * h5lcopy_c + * h5lcopy_c * PURPOSE - * Call H5Lcopy + * Call H5Lcopy * INPUTS * - * src_loc_id - Location identifier of the source link - * src_name - Name of the link to be copied - * src_namelen - length of the name - * dest_loc_id - Location identifier specifying the destination of the copy - * dest_name - Name to be assigned to the NEW copy - * dest_namelen - Length of the name - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lcpl_id - Link creation property list identifier - * lapl_id - Link access property list identifier + * src_loc_id - Location identifier of the source link + * src_name - Name of the link to be copied + * src_namelen - length of the name + * dest_loc_id - Location identifier specifying the destination of the copy + * dest_name - Name to be assigned to the NEW copy + * dest_namelen - Length of the name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lcpl_id - Link creation property list identifier + * lapl_id - Link access property list identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -88,21 +88,21 @@ done: /****if* H5Lf/h5lcreate_external_c * NAME - * h5lcreate_external_c + * h5lcreate_external_c * PURPOSE - * Call H5Lcreate_external_c + * Call H5Lcreate_external_c * INPUTS * - * file_name - Name of the file containing the target object. Neither the file nor the target object is - * required to exist. May be the file the link is being created in. - * obj_name - Path within the target file to the target object. + * file_name - Name of the file containing the target object. Neither the file nor the target object is + * required to exist. May be the file the link is being created in. + * obj_name - Path within the target file to the target object. * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 29, 2008 @@ -110,7 +110,7 @@ done: */ int_f -h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -150,27 +150,27 @@ done: /****if* H5Lf/h5ldelete_c * NAME - * h5ldelete_c + * h5ldelete_c * PURPOSE - * Call H5Ldelete + * Call H5Ldelete * INPUTS * * - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lapl_id - Link access property list identifier - * namelen - length of name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lapl_id - Link access property list identifier + * namelen - length of name * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * SOURCE */ int_f -h5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) +nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) /******/ { char *c_name = NULL; @@ -197,28 +197,28 @@ done: /****if* H5Lf/h5lcreate_soft_c * NAME - * h5lcreate_soft_c + * h5lcreate_soft_c * PURPOSE - * Call H5Lcreate_soft + * Call H5Lcreate_soft * INPUTS * * - * target_path - Path to the target object, which is not required to exist. - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * target_path - Path to the target object, which is not required to exist. + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * SOURCE */ int_f -h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -253,29 +253,29 @@ h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, /****if* H5Lf/h5lcreate_hard_c * NAME - * h5lcreate_hard_c + * h5lcreate_hard_c * PURPOSE - * Call H5Lcreate_hard + * Call H5Lcreate_hard * INPUTS * - * obj_loc_id - The file or group identifier for the target object. - * obj_name - Name of the target object, which must already exist. - * obj_namelen - Name length - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * link_namelen- Name length - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * obj_loc_id - The file or group identifier for the target object. + * obj_name - Name of the target object, which must already exist. + * obj_namelen - Name length + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * link_namelen- Name length + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 27, 2008 * SOURCE */ int_f -h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -310,41 +310,41 @@ h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, /****if* H5Lf/h5ldelete_by_idx_c * NAME - * h5ldelete_by_idx_c + * h5ldelete_by_idx_c * PURPOSE - * Calls h5ldelete_by_idx + * Calls h5ldelete_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * group_namelen - Name length - * index_field - Type of index; Possible values are: + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * group_namelen - Name length + * index_field - Type of index; Possible values are: * H5_INDEX_UNKNOWN_F = -1 - Unknown index type * H5_INDEX_NAME_F - Index on names * H5_INDEX_CRT_ORDER_F - Index on creation order * H5_INDEX_N_F - Number of indices defined - * order - Order within field or index; Possible values are: + * order - Order within field or index; Possible values are: * H5_ITER_UNKNOWN_F - Unknown order * H5_ITER_INC_F - Increasing order * H5_ITER_DEC_F - Decreasing order * H5_ITER_NATIVE_F - No particular order, whatever is fastest * H5_ITER_N_F - Number of iteration orders - * n - Link for which to retrieve information - * lapl_id - Link access property list + * n - Link for which to retrieve information + * lapl_id - Link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * N/A * SOURCE */ int_f -h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -376,28 +376,28 @@ done: /****if* H5Lf/h5lexists_c * NAME - * h5lexists_c + * h5lexists_c * PURPOSE - * Calls H5Lexists + * Calls H5Lexists * INPUTS * - * loc_id - Identifier of the file or group to query. - * name - Link name to check - * lapl_id - Link access property list identifier. + * loc_id - Identifier of the file or group to query. + * name - Link name to check + * lapl_id - Link access property list identifier. * OUTPUTS * - * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * * SOURCE */ int_f -h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) +nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -423,40 +423,40 @@ done: /****if* H5Lf/h5lget_info_c * NAME - * h5lget_info_c + * h5lget_info_c * PURPOSE - * Call H5Lget_info + * Call H5Lget_info * INPUTS * * link_loc_id - File or group identifier. - * link_name - Name of the link for which information is being sought - * link_namelen - Name length - * lapl_id - Link access property list + * link_name - Name of the link for which information is being sought + * link_namelen - Name length + * lapl_id - Link access property list * OUTPUTS * * - * cset - indicates the character set used for link’s name. - * corder - specifies the link’s creation order position. - * corder_valid - indicates whether the value in corder is valid. - * link_type - specifies the link class: + * cset - indicates the character set used for link’s name. + * corder - specifies the link’s creation order position. + * corder_valid - indicates whether the value in corder is valid. + * link_type - specifies the link class: * H5L_LINK_HARD_F - Hard link * H5L_LINK_SOFT_F - Soft link * H5L_LINK_EXTERNAL_F - External link * H5L_LINK_ERROR_F - Error - * address - If the link is a hard link, address specifies the file address that the link points to - * val_size - If the link is a symbolic link, val_size will be the length of the link value + * address - If the link is a hard link, address specifies the file address that the link points to + * val_size - If the link is a symbolic link, val_size will be the length of the link value * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) @@ -496,36 +496,36 @@ done: /****if* H5Lf/h5lget_info_by_idx_c * NAME - * h5lget_info_by_idx_c + * h5lget_info_by_idx_c * PURPOSE - * Call H5Lget_info_by_idx + * Call H5Lget_info_by_idx * INPUTS * * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * group_namelen - Name length + * group_name - Name of subject group + *group_namelen - Name length * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * lapl_id - Link access property list + * order - Order within field or index + * n - Link for which to retrieve information + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) /******/ @@ -570,7 +570,7 @@ done: * NAME * H5Lis_registered_c * PURPOSE - * Call H5Lis_registered + * Call H5Lis_registered * INPUTS * * link_cls_id - User-defined link class identifier @@ -578,17 +578,17 @@ done: * NONE * * RETURNS - * Returns a positive value if the link class has been registered - * and zero if it is unregistered. Otherwise returns a negative value + * Returns a positive value if the link class has been registered + * and zero if it is unregistered. Otherwise returns a negative value * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * N/A * SOURCE */ int_f -h5lis_registered_c(int_f *link_cls_id) +nh5lis_registered_c(int_f *link_cls_id) /******/ { int_f ret_value; /* Return value */ @@ -621,29 +621,29 @@ h5lis_registered_c(int_f *link_cls_id) /****if* H5Lf/h5lmove_c * NAME - * h5lmove_c + * h5lmove_c * PURPOSE - * Call H5Lmove + * Call H5Lmove * INPUTS * - * src_loc_id - Original file or group identifier. - * src_name - Original link name. - * src_namelen - name length - * dest_loc_id - Destination file or group identifier. - * dest_name - NEW link name. - * dest_namelen - name length + * src_loc_id - Original file or group identifier. + * src_name - Original link name. + * src_namelen - name length + * dest_loc_id - Destination file or group identifier. + * dest_name - NEW link name. + * dest_namelen - name length * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * SOURCE */ int_f -h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -682,17 +682,17 @@ done: * Call H5Lget_name_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * size - Maximum number of characters of link value to be returned. - * lapl_id - Link access property list + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * index_field - Index or field which determines the order + * order - Order within field or index + * n - Link for which to retrieve information + * size - Maximum number of characters of link value to be returned. + * lapl_id - Link access property list * OUTPUTS * - * name - Buffer in which link value is returned - * size - The size of the link name on success + * name - Buffer in which link value is returned + * size - The size of the link name on success * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -701,7 +701,7 @@ done: * SOURCE */ int_f -h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ @@ -774,7 +774,7 @@ done: /* * SOURCE */ /* *\/ */ /* int_f */ -/* h5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ +/* nh5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ /* size_t_f *size, _fcd linkval_buff, */ /* hid_t_f *lapl_id) */ /* { */ @@ -842,7 +842,7 @@ done: /* int_f */ -/* h5lregistered_c(int_f *version, int_f *class_id, */ +/* nh5lregistered_c(int_f *version, int_f *class_id, */ /* _fcd comment, size_t_f *comment_len, */ /* _fcd create_func, size_t_f *create_func_len, */ /* _fcd move_func, size_t_f *move_func_len, */ @@ -916,29 +916,29 @@ done: /****if* H5Lf/h5lget_val_c * NAME - * h5lget_val_c + * h5lget_val_c * PURPOSE - * Call H5Lget_val + * Call H5Lget_val * INPUTS * - * link_loc_id - File or group identifier. - * link_name - Link whose value is to be returned. - * link_name_len - length of link_name - * size - Maximum number of characters of link value to be returned. - * lapl_id - List access property list identifier + * link_loc_id - File or group identifier. + * link_name - Link whose value is to be returned. + * link_name_len - length of link_name + * size - Maximum number of characters of link value to be returned. + * lapl_id - List access property list identifier * OUTPUTS * - * linkval_buff - The buffer to hold the returned link value. + * linkval_buff - The buffer to hold the returned link value. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 11, 2008 + * April 11, 2008 * SOURCE */ int_f -h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) /******/ { @@ -971,16 +971,16 @@ done: * Calls H5Literate * INPUTS * - * group_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * group_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -1018,19 +1018,19 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, * Call H5Literate_by_name * INPUTS * - * loc_id - Identifier specifying subject group - * name - Name of subject group - * namelen - Name length - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link - * lapl_id - List access property list identifier + * loc_id - Identifier specifying subject group + * name - Name of subject group + * namelen - Name length + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link + * lapl_id - List access property list identifier * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 deleted file mode 100644 index bc91072..0000000 --- a/fortran/src/H5Lff.F90 +++ /dev/null @@ -1,1478 +0,0 @@ -!****h* ROBODoc/H5L -! -! NAME -! MODULE H5L -! -! PURPOSE -! This file contains Fortran interfaces for H5L 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5L 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 H5L - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT - USE H5GLOBAL - - IMPLICIT NONE - -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! - TYPE, bind(c) :: union_t - INTEGER(haddr_t) :: address - INTEGER(size_t) :: val_size - END TYPE union_t - - TYPE, bind(c) :: h5l_info_t - INTEGER(c_int) :: type ! H5L_type_t type -! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid - INTEGER(c_int64_t) :: corder ! int64_t corder; - INTEGER(c_int) :: cset ! H5T_cset_t cset; - TYPE(union_t) :: u - END TYPE h5l_info_t - -!***** - -!type specifies the link class. Valid values include the following: -! H5L_TYPE_HARD Hard link -! H5L_TYPE_SOFT Soft link -! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error -!cset specifies the character set in which the link name is encoded. Valid values include the following: -! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding - -CONTAINS - -! -!****s* H5L/h5lcopy_f -! -! NAME -! h5lcopy_f -! -! PURPOSE -! Copies a link from one location to another. -! -! INPUTS -! src_loc_id - Location identifier of the source link -! src_name - Name of the link to be copied -! dest_loc_id - Location identifier specifying the destination of the copy -! dest_name - Name to be assigned to the NEW copy -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & - lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTERFACE - INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) BIND(C,name='h5lcopy_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - END FUNCTION h5lcopy_c - END INTERFACE - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcopy_f - -! -!****s* H5L/h5ldelete_f -! -! NAME -! h5ldelete_f -! -! PURPOSE -! Removes a link from a group. -! -! INPUTS -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) BIND(C,name='h5ldelete_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - END FUNCTION h5ldelete_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) - - END SUBROUTINE h5ldelete_f - -! -!****s* H5L/H5Lcreate_soft_f -! -! NAME -! H5Lcreate_soft_f -! -! PURPOSE -! Creates a soft link to an object. -! -! INPUTS -! target_path - Path to the target object, which is not required to exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: target_path_len - INTEGER(SIZE_T) :: link_name_len - - INTERFACE - INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & - link_loc_id, & - link_name,link_name_len, & - lcpl_id_default, lapl_id_default ) BIND(C,NAME='h5lcreate_soft_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: target_path - INTEGER(SIZE_T) :: target_path_len - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: link_name_len - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_soft_c - END INTERFACE - - target_path_len = LEN(target_path) - link_name_len = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_soft_c(target_path, target_path_len,& - link_loc_id, & - link_name, link_name_len, & - lcpl_id_default, lapl_id_default ) - - END SUBROUTINE h5lcreate_soft_f - -! -!****s* H5L/H5Lcreate_hard_f -! -! NAME -! H5Lcreate_hard_f -! -! PURPOSE -! Creates a hard link to an object. -! -! INPUTS -! -! obj_loc_id - The file or group identifier for the target object. -! obj_name - Name of the target object, which must already exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_hard_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_hard_c - END INTERFACE - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_hard_f - -! -!****s* H5L/H5Lcreate_external_f -! -! NAME -! H5Lcreate_external_f -! -! PURPOSE -! Creates a soft link to an object in a different file. -! -! INPUTS -! -! file_name - Name of the file containing the target object. Neither the file nor the target object is -! required to exist. May be the file the link is being created in. -! obj_name - Path within the target file to the target object. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! SOURCE - SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither - ! the file nor the target object is required to exist. - ! May be the file the link is being created in. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_external_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: file_name - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_external_c - END INTERFACE - file_namelen = LEN(file_name) - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_external_f - -! -!****s* H5L/h5ldelete_by_idx_f -! -! NAME -! h5ldelete_by_idx_f -! -! PURPOSE -! Removes the nth link in a group. -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order within field or index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Link for which to retrieve information -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! SOURCE - SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) & - BIND(C,NAME='h5ldelete_by_idx_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - END FUNCTION h5ldelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - group_namelen = LEN(group_name) - hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - - END SUBROUTINE h5ldelete_by_idx_f - -! -!****s* H5L/H5Lexists_f -! -! NAME -! H5Lexists_f -! -! PURPOSE -! Check if a link with a particular name exists in a group. -! -! INPUTS -! loc_id - Identifier of the file or group to query. -! name - Link name to check -! -! OUTPUTS -! link_exists - link exists status (.TRUE.,.FALSE.) -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. - CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. - LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id - ! Link access property list identifier. -!***** - INTEGER :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) & - BIND(C,NAME='h5lexists_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lexists_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - - link_exists = .FALSE. - IF(link_exists_c.GT.0) link_exists = .TRUE. - - END SUBROUTINE h5lexists_f - -! -!****s* H5L/h5lget_info_f -! -! NAME -! h5lget_info_f -! -! PURPOSE -! Returns information about a link. -! -! INPUTS -! link_loc_id - File or group identifier. -! link_name - Name of the link for which information is being sought -! -! OUTPUTS -! NOTE: In C these are contained in the structure H5L_info_t -! -! cset - indicates the character set used for link’s name. -! corder - specifies the link’s creation order position. -! corder_valid - indicates whether the value in corder is valid. -! link_type - specifies the link class: -! H5L_TYPE_HARD_F - Hard link -! H5L_TYPE_SOFT_F - Soft link -! H5L_TYPE_EXTERNAL_F - External link -! H5L_TYPE_ERROR_ F - Error -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_f(link_loc_id, link_name, & - cset, corder, f_corder_valid, link_type, address, val_size, & - hdferr, lapl_id) - IMPLICIT NONE - - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought - -! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. - INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, address, val_size, & - lapl_id_default) BIND(C,NAME='h5lget_info_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T, HADDR_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: link_type - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: link_namelen - INTEGER :: corder_valid - END FUNCTION h5lget_info_c - END INTERFACE - - link_namelen = LEN(link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, & - address, val_size, & - lapl_id_default) - - f_corder_valid =.FALSE. - IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_f - -! -!****s* H5L/h5lget_info_by_idx_f -! -! NAME -! h5lget_info_by_idx_f -! -! PURPOSE -! Retrieves metadata for a link in a group, according to the order within a field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! NOTE: In C these are defined as a structure: H5L_info_t -! corder_valid - Indicates whether the creation order data is valid for this attribute -! corder - Is a positive integer containing the creation order of the attribute -! cset - Indicates the character set used for the attribute’s name -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) & - BIND(C,NAME='h5lget_info_by_idx_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER, INTENT(OUT) :: link_type - INTEGER :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_info_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_by_idx_f - -! -!****s* H5L/h5lis_registered_f -! -! NAME -! h5lis_registered_f -! -! PURPOSE -! Determines whether a class of user-defined links is registered. -! -! INPUTS -! link_cls_id - User-defined link class identifier -! -! OUTPUTS -! registered - .TRUE. - if the link class has been registered -! .FALSE. - if it is unregistered -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and - ! .FALSE. - if it is unregistered - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') - IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - END FUNCTION h5lis_registered_c - END INTERFACE - - hdferr = h5lis_registered_c(link_cls_id) - - IF(hdferr.GT.0)THEN - registered = .TRUE. - ELSE IF(hdferr.EQ.0)THEN - registered = .FALSE. - ENDIF - - END SUBROUTINE h5lis_registered_f - -! -!****s* H5L/h5lmove_f -! -! NAME -! h5lmove_f -! -! PURPOSE -! Renames a link within an HDF5 file. -! -! INPUTS -! src_loc_id - Original file or group identifier. -! src_name - Original link name. -! dest_loc_id - Destination file or group identifier. -! dest_name - NEW link name. -! -! OUTPUTS -! hdferr - Error code: -! 0 on success and -1 on failure -! -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. -! lapl_id - Link access property list identifier to be associated WITH the NEW link. -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! SOURCE - SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - ! to be associated WITH the NEW link. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - ! to be associated WITH the NEW link. -!***** - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lmove_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id - - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name - INTEGER(SIZE_T) :: src_namelen - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lmove_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lmove_f - -! -!****s* H5L/h5lget_name_by_idx_f -! -! NAME -! h5lget_name_by_idx_f -! -! PURPOSE -! Retrieves name of the nth link in a group, according to the order within a specified field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! name - Buffer in which link value is returned -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - List access property list identifier. -! size - Maximum number of characters of link value to be returned. -! -! AUTHOR -! M. Scot Breitenfeld -! March 10, 2008 -! -! SOURCE - SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & - name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) BIND(C,NAME='h5lget_name_by_idx_c') - IMPORT :: c_char - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(SIZE_T) :: size_default - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_name_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5lget_name_by_idx_f - - -! HAS PROBLEM WITH void pointer in C -!!$! -!!$!****s* H5L/ -!!$! -!!$! NAME -!!$! h5lget_val_by_idx_f -!!$! -!!$! PURPOSE -!!$! Returns the link value of a link, according to the order of -!!$! an index. For symbolic links, this is the path to which the -!!$! link points, including the null terminator. For user-defined -!!$! links, it is the link buffer. -!!$! INPUTS -!!$! loc_id - File or group identifier specifying location of subject group -!!$! group_name - Name of subject group -!!$! index_field - Index or field which determines the order -!!$! order - Order within field or index -!!$! n - Link for which to retrieve information -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t -!!$! corder_valid - indicates whether the creation order data is valid for this attribute -!!$! corder - is a positive integer containing the creation order of the attribute -!!$! cset - indicates the character set used for the attribute’s name -!!$! data_size - indicates the size, in the number of characters, of the attribute -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & -!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group -!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order -!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute -!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute -!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: corder_valid -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER, INTENT(IN) :: index_field -!!$ INTEGER, INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ INTEGER :: corder_valid -!!$ INTEGER, INTENT(OUT) :: corder -!!$ INTEGER, INTENT(OUT) :: cset -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION h5lget_val_by_idx_c -!!$ END INTERFACE -!!$ -!!$ group_namelen = LEN(group_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ -!!$ f_corder_valid =.FALSE. -!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. -!!$ -!!$ END SUBROUTINE h5lget_val_by_idx_f - -!!$! -!!$!****s* H5L/h5lget_val_f -!!$! -!!$! NAME -!!$! h5lget_val_f -!!$! -!!$! PURPOSE -!!$! Returns the value of a symbolic link. -!!$! -!!$! INPUTS -!!$! link_loc_id - File or group identifier. -!!$! link_name - Link whose value is to be returned. -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS -!!$! linkval_buff - The buffer to hold the returned link value. -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & -!!$ hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER :: corder_valid -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER :: link_namelen -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ END FUNCTION h5lget_val_c -!!$ END INTERFACE -!!$ -!!$ link_namelen = LEN(link_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ -!!$ END SUBROUTINE h5lget_val_f - -!!$! -!!$!****s* H5L/H5Lregistered_f -!!$! -!!$! NAME -!!$! H5Lregistered_f -!!$! -!!$! PURPOSE -!!$! Registers user-defined link class or changes behavior of existing class. -!!$! -!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: -!!$! version - Version number of this struct -!!$! class_id - Link class identifier -!!$! comment - Comment for debugging -!!$! create_func - Callback during link creation -!!$! move_func - Callback after moving link -!!$! copy_func - Callback after copying link -!!$! trav_func - The main traversal function -!!$! del_func - Callback for link deletion -!!$! query_func - Callback for queries -!!$! -!!$! OUTPUTS -!!$! hdferr - Error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! None -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! February 29, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & -!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) -!!$ IMPLICIT NONE -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func,query_func_len) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c -!!$ !DEC$ENDIF -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ END FUNCTION H5Lregistered_c -!!$ END INTERFACE -!!$ -!!$ comment_len = LEN(comment) -!!$ create_func_len = LEN(create_func) -!!$ move_func_len = LEN(move_func) -!!$ copy_func_len = LEN(copy_func) -!!$ trav_func_len = LEN(trav_func) -!!$ del_func_len = LEN(del_func) -!!$ query_func_len = LEN(query_func) -!!$ -!!$ hdferr = H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func, query_func_len) -!!$ -!!$ END SUBROUTINE H5Lregistered_f - -!****s* H5L (F03)/h5literate_f -! -! NAME -! h5literate_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! group_id - Identifier specifying subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: group_id - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & - BIND(C, NAME='h5literate_c') - IMPORT :: c_ptr, c_funptr - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5literate_c - END INTERFACE - - return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_f - -!****s* H5L (F03)/h5literate_by_name_f -! -! NAME -! h5literate_by_name_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 18, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & - idx, op, op_data, return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& - idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - IMPORT :: c_char, c_ptr, c_funptr - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - END FUNCTION - END INTERFACE - - namelen = LEN(group_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_by_name_f - -END MODULE H5L diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 new file mode 100644 index 0000000..4660e52 --- /dev/null +++ b/fortran/src/H5Lff.f90 @@ -0,0 +1,1300 @@ +!****h* ROBODoc/H5L +! +! NAME +! MODULE H5L +! +! PURPOSE +! This file contains Fortran interfaces for H5L functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 H5L 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 H5L + + USE H5GLOBAL + +CONTAINS + +! +!****s* H5L/h5lcopy_f +! +! NAME +! h5lcopy_f +! +! PURPOSE +! Copies a link from one location to another. +! +! INPUTS +! src_loc_id - Location identifier of the source link +! src_name - Name of the link to be copied +! dest_loc_id - Location identifier specifying the destination of the copy +! dest_name - Name to be assigned to the NEW copy +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & + lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTERFACE + INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCOPY_C'::h5lcopy_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name, dest_name + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dest_name + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + END FUNCTION h5lcopy_c + END INTERFACE + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcopy_f + +! +!****s* H5L/h5ldelete_f +! +! NAME +! h5ldelete_f +! +! PURPOSE +! Removes a link from a group. +! +! INPUTS +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_C'::h5ldelete_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + END FUNCTION h5ldelete_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) + + END SUBROUTINE h5ldelete_f + +! +!****s* H5L/H5Lcreate_soft_f +! +! NAME +! H5Lcreate_soft_f +! +! PURPOSE +! Creates a soft link to an object. +! +! INPUTS +! target_path - Path to the target object, which is not required to exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: target_path_len + INTEGER(SIZE_T) :: link_name_len + + INTERFACE + INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & + link_loc_id, & + link_name,link_name_len, & + lcpl_id_default, lapl_id_default ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_SOFT_C'::h5lcreate_soft_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: target_path, link_name + CHARACTER(LEN=*), INTENT(IN) :: target_path + INTEGER(SIZE_T) :: target_path_len + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: link_name_len + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_soft_c + END INTERFACE + + target_path_len = LEN(target_path) + link_name_len = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_soft_c(target_path, target_path_len,& + link_loc_id, & + link_name, link_name_len, & + lcpl_id_default, lapl_id_default ) + + END SUBROUTINE h5lcreate_soft_f + +! +!****s* H5L/H5Lcreate_hard_f +! +! NAME +! H5Lcreate_hard_f +! +! PURPOSE +! Creates a hard link to an object. +! +! INPUTS +! +! obj_loc_id - The file or group identifier for the target object. +! obj_name - Name of the target object, which must already exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_HARD_C'::h5lcreate_hard_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, link_name + INTEGER(HID_T), INTENT(IN) :: obj_loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_hard_c + END INTERFACE + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_hard_f + +! +!****s* H5L/H5Lcreate_external_f +! +! NAME +! H5Lcreate_external_f +! +! PURPOSE +! Creates a soft link to an object in a different file. +! +! INPUTS +! +! file_name - Name of the file containing the target object. Neither the file nor the target object is +! required to exist. May be the file the link is being created in. +! obj_name - Path within the target file to the target object. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! SOURCE + SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither + ! the file nor the target object is required to exist. + ! May be the file the link is being created in. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_EXTERNAL_C'::h5lcreate_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: file_name, obj_name, link_name + CHARACTER(LEN=*), INTENT(IN) :: file_name + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_external_c + END INTERFACE + file_namelen = LEN(file_name) + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_external_f + +! +!****s* H5L/h5ldelete_by_idx_f +! +! NAME +! h5ldelete_by_idx_f +! +! PURPOSE +! Removes the nth link in a group. +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order within field or index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Link for which to retrieve information +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! SOURCE + SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_BY_IDX_C'::h5ldelete_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + END FUNCTION h5ldelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + group_namelen = LEN(group_name) + hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) + + END SUBROUTINE h5ldelete_by_idx_f + +! +!****s* H5L/H5Lexists_f +! +! NAME +! H5Lexists_f +! +! PURPOSE +! Check if a link with a particular name exists in a group. +! +! INPUTS +! loc_id - Identifier of the file or group to query. +! name - Link name to check +! +! OUTPUTS +! link_exists - link exists status (.TRUE.,.FALSE.) +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. + CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. + LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + ! Link access property list identifier. +!***** + INTEGER :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LEXISTS_C'::h5lexists_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lexists_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) + + link_exists = .FALSE. + IF(link_exists_c.GT.0) link_exists = .TRUE. + + END SUBROUTINE h5lexists_f + +! +!****s* H5L/h5lget_info_f +! +! NAME +! h5lget_info_f +! +! PURPOSE +! Returns information about a link. +! +! INPUTS +! link_loc_id - File or group identifier. +! link_name - Name of the link for which information is being sought +! +! OUTPUTS +! NOTE: In C these are contained in the structure H5L_info_t +! +! cset - indicates the character set used for link’s name. +! corder - specifies the link’s creation order position. +! corder_valid - indicates whether the value in corder is valid. +! link_type - specifies the link class: +! H5L_TYPE_HARD_F - Hard link +! H5L_TYPE_SOFT_F - Soft link +! H5L_TYPE_EXTERNAL_F - External link +! H5L_TYPE_ERROR_ F - Error +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_f(link_loc_id, link_name, & + cset, corder, f_corder_valid, link_type, address, val_size, & + hdferr, lapl_id) + IMPLICIT NONE + + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought + +! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. + INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, address, val_size, & + lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_C'::h5lget_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: link_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: link_type + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: link_namelen + INTEGER :: corder_valid + END FUNCTION h5lget_info_c + END INTERFACE + + link_namelen = LEN(link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, & + address, val_size, & + lapl_id_default) + + f_corder_valid =.FALSE. + IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_f + +! +!****s* H5L/h5lget_info_by_idx_f +! +! NAME +! h5lget_info_by_idx_f +! +! PURPOSE +! Retrieves metadata for a link in a group, according to the order within a field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! NOTE: In C these are defined as a structure: H5L_info_t +! corder_valid - Indicates whether the creation order data is valid for this attribute +! corder - Is a positive integer containing the creation order of the attribute +! cset - Indicates the character set used for the attribute’s name +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_BY_IDX_C'::h5lget_info_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: link_type + INTEGER :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_info_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_by_idx_f + +! +!****s* H5L/h5lis_registered_f +! +! NAME +! h5lis_registered_f +! +! PURPOSE +! Determines whether a class of user-defined links is registered. +! +! INPUTS +! link_cls_id - User-defined link class identifier +! +! OUTPUTS +! registered - .TRUE. - if the link class has been registered +! .FALSE. - if it is unregistered +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and + ! .FALSE. - if it is unregistered + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5lis_registered_c(link_cls_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LIS_REGISTERED_C'::h5lis_registered_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + END FUNCTION h5lis_registered_c + END INTERFACE + + hdferr = h5lis_registered_c(link_cls_id) + + IF(hdferr.GT.0)THEN + registered = .TRUE. + ELSE IF(hdferr.EQ.0)THEN + registered = .FALSE. + ENDIF + + END SUBROUTINE h5lis_registered_f + +! +!****s* H5L/h5lmove_f +! +! NAME +! h5lmove_f +! +! PURPOSE +! Renames a link within an HDF5 file. +! +! INPUTS +! src_loc_id - Original file or group identifier. +! src_name - Original link name. +! dest_loc_id - Destination file or group identifier. +! dest_name - NEW link name. +! +! OUTPUTS +! hdferr - Error code: +! 0 on success and -1 on failure +! +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. +! lapl_id - Link access property list identifier to be associated WITH the NEW link. +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! SOURCE + SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + ! to be associated WITH the NEW link. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier + ! to be associated WITH the NEW link. +!***** + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LMOVE_C'::h5lmove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name, dest_name + INTEGER(HID_T), INTENT(IN) :: src_loc_id + + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(SIZE_T) :: src_namelen + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dest_name + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lmove_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lmove_f + +! +!****s* H5L/h5lget_name_by_idx_f +! +! NAME +! h5lget_name_by_idx_f +! +! PURPOSE +! Retrieves name of the nth link in a group, according to the order within a specified field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! name - Buffer in which link value is returned +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - List access property list identifier. +! size - Maximum number of characters of link value to be returned. +! +! AUTHOR +! M. Scot Breitenfeld +! March 10, 2008 +! +! SOURCE + SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & + name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name, name + INTEGER(HID_T), INTENT(IN) :: loc_id + + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(SIZE_T) :: size_default + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_name_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5lget_name_by_idx_f + + +! HAS PROBLEM WITH void pointer in C +!!$! +!!$!****s* H5L/ +!!$! +!!$! NAME +!!$! h5lget_val_by_idx_f +!!$! +!!$! PURPOSE +!!$! Returns the link value of a link, according to the order of +!!$! an index. For symbolic links, this is the path to which the +!!$! link points, including the null terminator. For user-defined +!!$! links, it is the link buffer. +!!$! INPUTS +!!$! loc_id - File or group identifier specifying location of subject group +!!$! group_name - Name of subject group +!!$! index_field - Index or field which determines the order +!!$! order - Order within field or index +!!$! n - Link for which to retrieve information +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t +!!$! corder_valid - indicates whether the creation order data is valid for this attribute +!!$! corder - is a positive integer containing the creation order of the attribute +!!$! cset - indicates the character set used for the attribute’s name +!!$! data_size - indicates the size, in the number of characters, of the attribute +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & +!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group +!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group +!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order +!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type +!!$ ! H5_INDEX_NAME_F - Index on names +!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order +!!$ ! H5_INDEX_N_F - Number of indices defined +!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: +!!$ ! H5_ITER_UNKNOWN_F - Unknown order +!!$ ! H5_ITER_INC_F - Increasing order +!!$ ! H5_ITER_DEC_F - Decreasing order +!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index +!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute +!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute +!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: corder_valid +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER, INTENT(IN) :: index_field +!!$ INTEGER, INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ INTEGER :: corder_valid +!!$ INTEGER, INTENT(OUT) :: corder +!!$ INTEGER, INTENT(OUT) :: cset +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION h5lget_val_by_idx_c +!!$ END INTERFACE +!!$ +!!$ group_namelen = LEN(group_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ +!!$ f_corder_valid =.FALSE. +!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. +!!$ +!!$ END SUBROUTINE h5lget_val_by_idx_f + +!!$! +!!$!****s* H5L/h5lget_val_f +!!$! +!!$! NAME +!!$! h5lget_val_f +!!$! +!!$! PURPOSE +!!$! Returns the value of a symbolic link. +!!$! +!!$! INPUTS +!!$! link_loc_id - File or group identifier. +!!$! link_name - Link whose value is to be returned. +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS +!!$! linkval_buff - The buffer to hold the returned link value. +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & +!!$ hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER :: corder_valid +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER :: link_namelen +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ END FUNCTION h5lget_val_c +!!$ END INTERFACE +!!$ +!!$ link_namelen = LEN(link_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ +!!$ END SUBROUTINE h5lget_val_f + +!!$! +!!$!****s* H5L/H5Lregistered_f +!!$! +!!$! NAME +!!$! H5Lregistered_f +!!$! +!!$! PURPOSE +!!$! Registers user-defined link class or changes behavior of existing class. +!!$! +!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: +!!$! version - Version number of this struct +!!$! class_id - Link class identifier +!!$! comment - Comment for debugging +!!$! create_func - Callback during link creation +!!$! move_func - Callback after moving link +!!$! copy_func - Callback after copying link +!!$! trav_func - The main traversal function +!!$! del_func - Callback for link deletion +!!$! query_func - Callback for queries +!!$! +!!$! OUTPUTS +!!$! hdferr - Error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! None +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! February 29, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & +!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) +!!$ IMPLICIT NONE +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func,query_func_len) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c +!!$ !DEC$ENDIF +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ END FUNCTION H5Lregistered_c +!!$ END INTERFACE +!!$ +!!$ comment_len = LEN(comment) +!!$ create_func_len = LEN(create_func) +!!$ move_func_len = LEN(move_func) +!!$ copy_func_len = LEN(copy_func) +!!$ trav_func_len = LEN(trav_func) +!!$ del_func_len = LEN(del_func) +!!$ query_func_len = LEN(query_func) +!!$ +!!$ hdferr = H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func, query_func_len) +!!$ +!!$ END SUBROUTINE H5Lregistered_f + +END MODULE H5L diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90 new file mode 100644 index 0000000..fa95717 --- /dev/null +++ b/fortran/src/H5Lff_F03.f90 @@ -0,0 +1,242 @@ +!****h* ROBODoc/H5L (F03) +! +! NAME +! H5L_PROVISIONAL +! +! FILE +! src/fortran/src/H5Lff_F03.f90 +! +! PURPOSE +! +! This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions. +! It contains the same functions as H5Lff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Lff_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 H5A 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 H5L_PROVISIONAL + + USE H5GLOBAL + USE ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5L (F03)/h5l_info_t +! +! Fortran2003 Derived Type: +! + TYPE, bind(c) :: union_t + INTEGER(haddr_t) :: address + INTEGER(size_t) :: val_size + END TYPE union_t + + TYPE, bind(c) :: h5l_info_t + INTEGER(c_int) :: type ! H5L_type_t type +! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + INTEGER(c_int64_t) :: corder ! int64_t corder; + INTEGER(c_int) :: cset ! H5T_cset_t cset; + TYPE(union_t) :: u + END TYPE h5l_info_t + +!***** + +!type specifies the link class. Valid values include the following: +! H5L_TYPE_HARD Hard link +! H5L_TYPE_SOFT Soft link +! H5L_TYPE_EXTERNAL External link +! H5L_TYPE_ERROR Error +!cset specifies the character set in which the link name is encoded. Valid values include the following: +! H5T_CSET_ASCII US ASCII +! H5T_CSET_UTF8 UTF-8 Unicode encoding + +CONTAINS + +!****s* H5L (F03)/h5literate_f +! +! NAME +! h5literate_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! group_id - Identifier specifying subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: group_id + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & + BIND(C, NAME='h5literate_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5literate_c + END INTERFACE + + return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_f + +!****s* H5L (F03)/h5literate_by_name_f +! +! NAME +! h5literate_by_name_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 18, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & + idx, op, op_data, return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& + idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + END FUNCTION + END INTERFACE + + namelen = LEN(group_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_by_name_f + +END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90 new file mode 100644 index 0000000..dd62b7b --- /dev/null +++ b/fortran/src/H5Lff_F90.f90 @@ -0,0 +1,39 @@ +!****h* ROBODoc/H5L (F90) +! +! NAME +! MODULE H5L_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 interfaces for H5L functions. It contains +! the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Lff_F03.f90 +! if Fortran 2003 functions are not enabled. +! +! NOTE +! Currently contains no 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5L_PROVISIONAL + +END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 4801f7d..ae344a5 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -1,6 +1,6 @@ /****h* H5Of/H5Of * PURPOSE - * This file contains C stubs for H5O Fortran APIs + * This file contains C stubs for H5O Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -109,12 +109,12 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * PURPOSE * Calls H5Olink * INPUTS - * object_id - Object to be linked. - * new_loc_id - File or group identifier specifying location at which object is to be linked. - * name - Name of link to be created, relative to new_loc_id. - * namelen - Length of buffer for link to be created. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * object_id - Object to be linked. + * new_loc_id - File or group identifier specifying location at which object is to be linked. + * name - Name of link to be created, relative to new_loc_id. + * namelen - Length of buffer for link to be created. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -123,7 +123,7 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * SOURCE */ int_f -h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -169,7 +169,7 @@ h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen * SOURCE */ int_f -h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) +nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -194,20 +194,20 @@ h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_ } /****if* H5Of/h5oclose_c * NAME - * h5oclose_c + * h5oclose_c * PURPOSE - * Call H5Oclose + * Call H5Oclose * INPUTS - * object_id - Object identifier + * object_id - Object identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * December 17, 2008 + * December 17, 2008 * SOURCE */ int_f -h5oclose_c ( hid_t_f *object_id ) +nh5oclose_c ( hid_t_f *object_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -225,15 +225,15 @@ h5oclose_c ( hid_t_f *object_id ) * PURPOSE * Calls H5Ovisit * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -266,20 +266,20 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, * Calls H5open_by_addr * INPUTS * loc_id - File or group identifier - * addr - Object’s address in the file + * addr - Object’s address in the file * * OUTPUTS * obj_id - Dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * September 14, 2009 * SOURCE */ int_f -h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) +nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -458,7 +458,7 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info) * SOURCE */ int_f -h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ) /******/ @@ -499,15 +499,15 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, * PURPOSE * Calls H5Ovisit_by_name * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -560,7 +560,7 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f * SOURCE */ int_f -h5odecr_refcount_c (hid_t_f *object_id) +nh5odecr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -594,7 +594,7 @@ h5odecr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) +nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -633,7 +633,7 @@ h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lap * SOURCE */ int_f -h5oincr_refcount_c (hid_t_f *object_id) +nh5oincr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -665,7 +665,7 @@ h5oincr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) +nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -697,7 +697,7 @@ h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * INPUTS * object_id - Identifier of the target object. * name - Name of the object whose comment is to be set or reset, - * specified as a path relative to loc_id. + * specified as a path relative to loc_id. * namelen - Length of the name. * comment - The new comment. * commentlen - Length of the comment. @@ -710,7 +710,7 @@ h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * SOURCE */ int_f -h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) +nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -755,7 +755,7 @@ h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fc * n - Object to open. * lapl_id - Link access property list. * OUTPUTS - * obj_id - An object identifier for the opened object. + * obj_id - An object identifier for the opened object. * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -764,7 +764,7 @@ h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fc * SOURCE */ int_f -h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id) /******/ { @@ -813,7 +813,7 @@ h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * SOURCE */ int_f -h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) +nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -869,7 +869,7 @@ h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssi * SOURCE */ int_f -h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id) /******/ { diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 deleted file mode 100644 index da940df..0000000 --- a/fortran/src/H5Off.F90 +++ /dev/null @@ -1,1149 +0,0 @@ -!****h* ROBODoc/H5O -! -! NAME -! MODULE H5O -! -! FILE -! fortran/src/H5Off.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5O 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5O 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 H5O - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_LONG, C_INT, C_LOC - USE H5GLOBAL - IMPLICIT NONE - -!****t* H5T (F03)/h5o_info_t -! -! Fortran2003 Derived Type: -! - TYPE, BIND(C) :: space_t - INTEGER(hsize_t) :: total ! Total space for storing object header in file - INTEGER(hsize_t) :: meta ! Space within header for object header metadata information - INTEGER(hsize_t) :: mesg ! Space within header for actual message information - INTEGER(hsize_t) :: free ! Free space within object header - END TYPE space_t - - TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header - INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header - END TYPE mesg_t - - TYPE, BIND(C) :: hdr_t - INTEGER :: version ! Version number of header format in file - INTEGER :: nmesgs ! Number of object header messages - INTEGER :: nchunks ! Number of object header chunks - INTEGER :: flags ! Object header status flags - TYPE(space_t) :: space - TYPE(mesg_t) :: mesg - END TYPE hdr_t - - ! Extra metadata storage for obj & attributes - TYPE, BIND(C) :: H5_ih_info_t - INTEGER(hsize_t) :: index_size ! btree and/or list - INTEGER(hsize_t) :: heap_size - END TYPE H5_ih_info_t - - TYPE, BIND(C) :: meta_size_t - TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets - TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes - ENDTYPE meta_size_t - - TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - INTEGER(haddr_t) :: addr ! Object address in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER :: rc ! Reference count of object - - INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- - INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array - INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran - INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) - - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object - - TYPE(hdr_t) :: hdr - - TYPE(meta_size_t) :: meta_size - END TYPE h5o_info_t - -!***** - -CONTAINS - -!****s* H5O/h5olink_f -! -! NAME -! h5olink_f -! -! PURPOSE -! Creates a hard link to an object in an HDF5 file. -! -! Inputs: -! object_id - Object to be linked. -! new_loc_id - File or group identifier specifying location at which object is to be linked. -! new_link_name - Name of link to be created, relative to new_loc_id. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! April 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - INTEGER(HID_T) , INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - - INTEGER(SIZE_T) :: new_link_namelen - - INTERFACE - INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) BIND(C,NAME='h5olink_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_link_name - INTEGER(SIZE_T) :: new_link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - END FUNCTION h5olink_c - END INTERFACE - - new_link_namelen = LEN(new_link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5olink_f - -!****s* H5O/h5oopen_f -! -! NAME -! h5oopen_f -! -! PURPOSE -! Opens an object in an HDF5 file by location identifier and path name. -! -! Inputs: -! loc_id - File or group identifier. -! name - Path to the object, relative to loc_id. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Access property list identifier for the link pointing to the object. -! -! AUTHOR -! M. Scot Breitenfeld -! April 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) BIND(C,NAME='h5oopen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - - END SUBROUTINE h5oopen_f -! -!****s* H5O/h5oclose_f -! -! NAME -! h5oclose_f -! -! PURPOSE -! Closes an object in an HDF5 file. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! December 17, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oclose_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oclose_c(object_id) BIND(C,NAME='h5oclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - END FUNCTION h5oclose_c - END INTERFACE - - hdferr = h5oclose_c(object_id) - END SUBROUTINE h5oclose_f - -! -!****s* H5O/h5open_by_addr_f -! NAME -! h5oopen_by_addr_f -! -! PURPOSE -! Opens an object using its address within an HDF5 file. -! -! Inputs: -! loc_id - File or group identifier. -! addr - Object’s address in the file. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! September 14, 2009 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) BIND(C,NAME='h5oopen_by_addr_c') - IMPORT :: HID_T, HADDR_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_by_addr_c - END INTERFACE - - hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) - - END SUBROUTINE h5oopen_by_addr_f -! -!****s* H5O/h5ocopy_f -! NAME -! h5ocopy_f -! -! PURPOSE -! Copies an object in an HDF5 file. -! -! Inputs: -! src_loc_id - Object identifier indicating the location of the source object to be copied. -! src_name - Name of the source object to be copied. -! dst_loc_id - Location identifier specifying the destination. -! dst_name - Name to be assigned to the new copy. -! -! Optional parameters: -! ocpypl_id - Object copy property list. -! lcpl_id - Link creation property list for the new hard link. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 14, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id -!***** - - INTEGER(SIZE_T) :: src_name_len, dst_name_len - INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default - - INTERFACE - INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) & - BIND(C,NAME='h5ocopy_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name - INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default - INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default - INTEGER(SIZE_T) :: src_name_len, dst_name_len - - END FUNCTION h5ocopy_c - END INTERFACE - - src_name_len = LEN(src_name) - dst_name_len = LEN(dst_name) - - ocpypl_id_default = H5P_DEFAULT_F - IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - - END SUBROUTINE h5ocopy_f - -!****s* H5O/h5odecr_refcount_f -! NAME -! h5odecr_refcount_f -! -! PURPOSE -! Decrements an object reference count. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5odecr_refcount_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5odecr_refcount_c(object_id) BIND(C,NAME='h5odecr_refcount_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - END FUNCTION h5odecr_refcount_c - END INTERFACE - - hdferr = h5odecr_refcount_c(object_id) - - END SUBROUTINE h5odecr_refcount_f - -!****s* H5O/h5oexists_by_name_f -! NAME -! h5oexists_by_name_f -! -! PURPOSE -! Determines whether a link resolves to an actual object. -! -! Inputs: -! loc_id - Identifier of the file or group to query. -! name - The name of the link to check. -! -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! Outputs: -! link_exists - Existing link resolves to an object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - LOGICAL , INTENT(OUT) :: link_exists - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - - INTEGER(size_t) :: namelen - INTEGER :: status - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) & - BIND(C,NAME='h5oexists_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - - END FUNCTION h5oexists_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) - - link_exists = .FALSE. - IF(status.EQ.1)THEN - link_exists = .TRUE. - ENDIF - - hdferr = 0 - IF(status.LT.0)THEN - hdferr = -1 - ENDIF - - END SUBROUTINE h5oexists_by_name_f - -!****s* H5O/h5oget_comment_f -! NAME -! h5oget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! obj_id - Identifier for the target object. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*) , INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(HSSIZE_T) :: bufsize_default - - INTERFACE - INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) & - BIND(C,NAME='h5oget_comment_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSSIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize - END FUNCTION h5oget_comment_c - END INTERFACE - - commentsize_default = LEN(comment) - - hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_f - -!****s* H5O/h5oget_comment_by_name_f -! NAME -! h5oget_comment_by_name_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be retrieved, -! specified as a path relative to loc_id. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 6, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(SIZE_T) :: name_size - INTEGER(SIZE_T) :: bufsize_default - INTEGER(HID_T) :: lapl_id_default - INTERFACE - INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id) BIND(C,NAME='h5oget_comment_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: name_size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oget_comment_by_name_c - END INTERFACE - - commentsize_default = LEN(comment) - name_size = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_by_name_f - -!****s* H5O/h5oincr_refcount_f -! NAME -! h5oincr_refcount_f -! -! PURPOSE -! Increments an object reference count. -! -! Inputs: -! obj_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5oincr_refcount_c(obj_id) BIND(C,NAME='h5oincr_refcount_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - END FUNCTION h5oincr_refcount_c - END INTERFACE - - hdferr = h5oincr_refcount_c(obj_id) - - END SUBROUTINE h5oincr_refcount_f - -!****s* H5O/h5oopen_by_idx_f -! -! NAME -! h5oopen_by_idx_f -! -! PURPOSE -! Open the nth object in a group. -! -! Inputs: -! loc_id - A file or group identifier. -! group_name - Name of group, relative to loc_id, in which object is located. -! index_type - Type of index by which objects are ordered. -! order - Order of iteration within index, NOTE: zero-based. -! n - Object to open. -! -! Outputs: -! obj_id - An object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! May 17, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) & - BIND(C,NAME='h5oopen_by_idx_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: group_namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - - END FUNCTION h5oopen_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - - END SUBROUTINE H5Oopen_by_idx_f - -!****s* H5O/h5oset_comment_f -! NAME -! h5oset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! obj_id - Identifier of the target object. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: commentlen - - INTERFACE - INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) BIND(C,NAME='h5oset_comment_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - - END FUNCTION h5oset_comment_c - END INTERFACE - - commentlen = LEN(comment) - - hdferr = h5oset_comment_c(obj_id, comment, commentlen) - - END SUBROUTINE h5oset_comment_f - -!****s* H5O/h5oset_comment_by_name_f -! NAME -! h5oset_comment_by_name_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be set or reset, -! specified as a path relative to loc_id. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: commentlen - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) & - BIND(C,NAME='h5oset_comment_by_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oset_comment_by_name_c - END INTERFACE - - commentlen = LEN(comment) - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) - - END SUBROUTINE h5oset_comment_by_name_f - -!****s* H5O (F03)/h5ovisit_f_F03 -! -! NAME -! h5ovisit_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! object_id - Identifier of the object at which the recursive iteration begins. -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - - TYPE(C_FUNPTR):: op - TYPE(C_PTR) :: op_data - INTEGER, INTENT(OUT) :: return_value - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & - BIND(C, NAME='h5ovisit_c') - IMPORT :: C_FUNPTR, C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5ovisit_c - END INTERFACE - - return_value = h5ovisit_c(object_id, index_type, order, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_f - -!****s* H5O (F03)/h5oget_info_by_name_f_F03 -! -! NAME -! h5oget_info_by_name_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by location and relative name. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! name - Name of group, relative to loc_id. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & - BIND(C, NAME='h5oget_info_by_name_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR),VALUE :: object_info - - END FUNCTION h5oget_info_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - - hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_name_f - -!****s* H5O (F03)/h5oget_info_f_F03 -! -! NAME -! h5oget_info_f -! -! PURPOSE -! Retrieves the metadata for an object specified by an identifier. -! -! Inputs: -! object_id - Identifier for target object. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr -!***** - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_c(object_id, object_info) & - BIND(C, NAME='h5oget_info_c') - IMPORT :: C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - TYPE(C_PTR), VALUE :: object_info - END FUNCTION h5oget_info_c - END INTERFACE - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_c(object_id, ptr) - - END SUBROUTINE H5Oget_info_f - -!****s* H5O (F03)/h5oget_info_by_idx_f_F03 -! -! NAME -! h5oget_info_by_idx_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by an index position. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! group_name - Name of group in which object is located. -! index_field - Index or field that determines the order. -! order - Order within field or index. -! n - Object for which information is to be returned -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. (Not currently used.) -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & - index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - IMPORT :: c_char, c_ptr, c_funptr - IMPORT :: HID_T, SIZE_T, HSIZE_T - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR), VALUE :: object_info - - END FUNCTION h5oget_info_by_idx_c - END INTERFACE - - namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_idx_f - - -!****s* H5O (F03)/h5ovisit_by_name_f_F03 -! -! NAME -! h5ovisit_by_name_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & - return_value, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - - TYPE(C_FUNPTR) :: op - TYPE(C_PTR) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - IMPORT :: C_CHAR, C_PTR, C_FUNPTR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name - INTEGER(SIZE_T) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - TYPE(C_FUNPTR) , VALUE :: op - TYPE(C_PTR) , VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5ovisit_by_name_c - END INTERFACE - - namelen = LEN(object_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_by_name_f - -END MODULE H5O - diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 new file mode 100644 index 0000000..8a40079 --- /dev/null +++ b/fortran/src/H5Off.f90 @@ -0,0 +1,775 @@ +!****h* ROBODoc/H5O +! +! NAME +! MODULE H5O +! +! FILE +! fortran/src/H5Off.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5O functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5O 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 H5O + + USE H5GLOBAL + +CONTAINS + +!****s* H5O/h5olink_f +! +! NAME +! h5olink_f +! +! PURPOSE +! Creates a hard link to an object in an HDF5 file. +! +! Inputs: +! object_id - Object to be linked. +! new_loc_id - File or group identifier specifying location at which object is to be linked. +! new_link_name - Name of link to be created, relative to new_loc_id. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! April 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + INTEGER(HID_T) , INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + + INTEGER(SIZE_T) :: new_link_namelen + + INTERFACE + INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: new_link_name + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER(SIZE_T) :: new_link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + END FUNCTION h5olink_c + END INTERFACE + + new_link_namelen = LEN(new_link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5olink_f + +!****s* H5O/h5oopen_f +! +! NAME +! h5oopen_f +! +! PURPOSE +! Opens an object in an HDF5 file by location identifier and path name. +! +! Inputs: +! loc_id - File or group identifier. +! name - Path to the object, relative to loc_id. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Access property list identifier for the link pointing to the object. +! +! AUTHOR +! M. Scot Breitenfeld +! April 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + + END SUBROUTINE h5oopen_f +! +!****s* H5O/h5oclose_f +! +! NAME +! h5oclose_f +! +! PURPOSE +! Closes an object in an HDF5 file. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! December 17, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oclose_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oclose_c(object_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + END FUNCTION h5oclose_c + END INTERFACE + + hdferr = h5oclose_c(object_id) + END SUBROUTINE h5oclose_f + +! +!****s* H5O/h5open_by_addr_f +! NAME +! h5oopen_by_addr_f +! +! PURPOSE +! Opens an object using its address within an HDF5 file. +! +! Inputs: +! loc_id - File or group identifier. +! addr - Object’s address in the file. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! September 14, 2009 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_by_addr_c + END INTERFACE + + hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) + + END SUBROUTINE h5oopen_by_addr_f +! +!****s* H5O/h5ocopy_f +! NAME +! h5ocopy_f +! +! PURPOSE +! Copies an object in an HDF5 file. +! +! Inputs: +! src_loc_id - Object identifier indicating the location of the source object to be copied. +! src_name - Name of the source object to be copied. +! dst_loc_id - Location identifier specifying the destination. +! dst_name - Name to be assigned to the new copy. +! +! Optional parameters: +! ocpypl_id - Object copy property list. +! lcpl_id - Link creation property list for the new hard link. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 14, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id +!***** + + INTEGER(SIZE_T) :: src_name_len, dst_name_len + INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default + + INTERFACE + INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name, dst_name + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default + INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default + INTEGER(SIZE_T) :: src_name_len, dst_name_len + + END FUNCTION h5ocopy_c + END INTERFACE + + src_name_len = LEN(src_name) + dst_name_len = LEN(dst_name) + + ocpypl_id_default = H5P_DEFAULT_F + IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + + END SUBROUTINE h5ocopy_f + +!****s* H5O/h5odecr_refcount_f +! NAME +! h5odecr_refcount_f +! +! PURPOSE +! Decrements an object reference count. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5odecr_refcount_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5odecr_refcount_c(object_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: object_id + END FUNCTION h5odecr_refcount_c + END INTERFACE + + hdferr = h5odecr_refcount_c(object_id) + + END SUBROUTINE h5odecr_refcount_f + +!****s* H5O/h5oexists_by_name_f +! NAME +! h5oexists_by_name_f +! +! PURPOSE +! Determines whether a link resolves to an actual object. +! +! Inputs: +! loc_id - Identifier of the file or group to query. +! name - The name of the link to check. +! +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! Outputs: +! link_exists - Existing link resolves to an object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL , INTENT(OUT) :: link_exists + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + + INTEGER(size_t) :: namelen + INTEGER :: status + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + + END FUNCTION h5oexists_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) + + link_exists = .FALSE. + IF(status.EQ.1)THEN + link_exists = .TRUE. + ENDIF + + hdferr = 0 + IF(status.LT.0)THEN + hdferr = -1 + ENDIF + + END SUBROUTINE h5oexists_by_name_f + +!****s* H5O/h5oget_comment_f +! NAME +! h5oget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! obj_id - Identifier for the target object. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*) , INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(HSSIZE_T) :: bufsize_default + + INTERFACE + INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize + END FUNCTION h5oget_comment_c + END INTERFACE + + commentsize_default = LEN(comment) + + hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_f + +!****s* H5O/h5oget_comment_by_name_f +! NAME +! h5oget_comment_by_name_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be retrieved, +! specified as a path relative to loc_id. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 6, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(SIZE_T) :: name_size + INTEGER(SIZE_T) :: bufsize_default + INTEGER(HID_T) :: lapl_id_default + INTERFACE + INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment, name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oget_comment_by_name_c + END INTERFACE + + commentsize_default = LEN(comment) + name_size = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_by_name_f + +!****s* H5O/h5oincr_refcount_f +! NAME +! h5oincr_refcount_f +! +! PURPOSE +! Increments an object reference count. +! +! Inputs: +! obj_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5oincr_refcount_c(obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: obj_id + END FUNCTION h5oincr_refcount_c + END INTERFACE + + hdferr = h5oincr_refcount_c(obj_id) + + END SUBROUTINE h5oincr_refcount_f + +!****s* H5O/h5oopen_by_idx_f +! +! NAME +! h5oopen_by_idx_f +! +! PURPOSE +! Open the nth object in a group. +! +! Inputs: +! loc_id - A file or group identifier. +! group_name - Name of group, relative to loc_id, in which object is located. +! index_type - Type of index by which objects are ordered. +! order - Order of iteration within index, NOTE: zero-based. +! n - Object to open. +! +! Outputs: +! obj_id - An object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! May 17, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: group_namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + + END FUNCTION h5oopen_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + + END SUBROUTINE H5Oopen_by_idx_f + +!****s* H5O/h5oset_comment_f +! NAME +! h5oset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! obj_id - Identifier of the target object. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: commentlen + + INTERFACE + INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + + END FUNCTION h5oset_comment_c + END INTERFACE + + commentlen = LEN(comment) + + hdferr = h5oset_comment_c(obj_id, comment, commentlen) + + END SUBROUTINE h5oset_comment_f + +!****s* H5O/h5oset_comment_by_name_f +! NAME +! h5oset_comment_by_name_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be set or reset, +! specified as a path relative to loc_id. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: commentlen + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, comment + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oset_comment_by_name_c + END INTERFACE + + commentlen = LEN(comment) + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) + + END SUBROUTINE h5oset_comment_by_name_f + +END MODULE H5O + diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90 new file mode 100644 index 0000000..36b6246 --- /dev/null +++ b/fortran/src/H5Off_F03.f90 @@ -0,0 +1,435 @@ +!****h* ROBODoc/H5O (F03) +! +! NAME +! H5O_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5O functions. +! It contains the same functions as H5Off_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Off_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 H5P 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 H5O_PROVISIONAL + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5T (F03)/h5o_info_t +! +! Fortran2003 Derived Type: +! + TYPE, BIND(C) :: space_t + INTEGER(hsize_t) :: total ! Total space for storing object header in file + INTEGER(hsize_t) :: meta ! Space within header for object header metadata information + INTEGER(hsize_t) :: mesg ! Space within header for actual message information + INTEGER(hsize_t) :: free ! Free space within object header + END TYPE space_t + + TYPE, BIND(C) :: mesg_t + INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header + END TYPE mesg_t + + TYPE, BIND(C) :: hdr_t + INTEGER :: version ! Version number of header format in file + INTEGER :: nmesgs ! Number of object header messages + INTEGER :: nchunks ! Number of object header chunks + INTEGER :: flags ! Object header status flags + TYPE(space_t) :: space + TYPE(mesg_t) :: mesg + END TYPE hdr_t + + ! Extra metadata storage for obj & attributes + TYPE, BIND(C) :: H5_ih_info_t + INTEGER(hsize_t) :: index_size ! btree and/or list + INTEGER(hsize_t) :: heap_size + END TYPE H5_ih_info_t + + TYPE, BIND(C) :: meta_size_t + TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets + TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes + ENDTYPE meta_size_t + + TYPE, BIND(C) :: h5o_info_t + INTEGER(C_LONG) :: fileno ! File number that object is located in + INTEGER(haddr_t) :: addr ! Object address in file + INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) + INTEGER :: rc ! Reference count of object + + INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- + INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array + INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran + INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) + + INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + + TYPE(hdr_t) :: hdr + + TYPE(meta_size_t) :: meta_size + END TYPE h5o_info_t + +!***** + +CONTAINS + +!****s* H5O (F03)/h5ovisit_f_F03 +! +! NAME +! h5ovisit_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! object_id - Identifier of the object at which the recursive iteration begins. +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + + TYPE(C_FUNPTR):: op + TYPE(C_PTR) :: op_data + INTEGER, INTENT(OUT) :: return_value + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & + BIND(C, NAME='h5ovisit_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5ovisit_c + END INTERFACE + + return_value = h5ovisit_c(object_id, index_type, order, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_f + +!****s* H5O (F03)/h5oget_info_by_name_f_F03 +! +! NAME +! h5oget_info_by_name_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by location and relative name. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! name - Name of group, relative to loc_id. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! December 1, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & + BIND(C, NAME='h5oget_info_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR),VALUE :: object_info + + END FUNCTION h5oget_info_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + + hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_name_f + +!****s* H5O (F03)/h5oget_info_f_F03 +! +! NAME +! h5oget_info_f +! +! PURPOSE +! Retrieves the metadata for an object specified by an identifier. +! +! Inputs: +! object_id - Identifier for target object. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr +!***** + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_c(object_id, object_info) & + BIND(C, NAME='h5oget_info_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: object_id + TYPE(C_PTR), VALUE :: object_info + END FUNCTION h5oget_info_c + END INTERFACE + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_c(object_id, ptr) + + END SUBROUTINE H5Oget_info_f + +!****s* H5O (F03)/h5oget_info_by_idx_f_F03 +! +! NAME +! h5oget_info_by_idx_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by an index position. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! group_name - Name of group in which object is located. +! index_field - Index or field that determines the order. +! order - Order within field or index. +! n - Object for which information is to be returned +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. (Not currently used.) +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & + index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR), VALUE :: object_info + + END FUNCTION h5oget_info_by_idx_c + END INTERFACE + + namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_idx_f + + +!****s* H5O (F03)/h5ovisit_by_name_f_F03 +! +! NAME +! h5ovisit_by_name_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! loc_id - Identifier of a file or group. +! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - Returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & + return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: object_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + + TYPE(C_FUNPTR) :: op + TYPE(C_PTR) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name + INTEGER(SIZE_T) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + TYPE(C_FUNPTR) , VALUE :: op + TYPE(C_PTR) , VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5ovisit_by_name_c + END INTERFACE + + namelen = LEN(object_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_by_name_f + +END MODULE H5O_PROVISIONAL + diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90 new file mode 100644 index 0000000..5688c5d --- /dev/null +++ b/fortran/src/H5Off_F90.f90 @@ -0,0 +1,39 @@ +!****h* ROBODoc/H5O (F90) +! +! NAME +! MODULE H5O_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 interfaces for H5O functions. It contains +! the same functions as H5Off_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Off_F03.f90 +! if Fortran 2003 functions are not enabled. +! +! NOTE +! Currently contains no 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5O_PROVISIONAL + +END MODULE H5O_PROVISIONAL diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 9735f48..fe2f21a 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1,6 +1,6 @@ /****h* H5Pf/H5Pf * PURPOSE - * This file contains C stubs for H5P Fortran APIs + * This file contains C stubs for H5P Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -23,35 +23,18 @@ #include "H5f90.h" #include "H5Eprivate.h" -#include "H5public.h" - -#ifdef H5_HAVE_PARALLEL - -#include -/* Support for C to Fortran translation in MPI */ -#ifndef H5_HAVE_MPI_MULTI_LANG_Comm -#define MPI_Comm_c2f(comm) (int_f)(comm) -#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) -#endif /*MPI Comm*/ - -#ifndef H5_HAVE_MPI_MULTI_LANG_Info -#define MPI_Info_c2f(info) (int_f)(info) -#define MPI_Info_f2c(info) (MPI_Info)(info) -#endif /*MPI Info*/ - -#endif /*H5_HAVE_PARALLEL*/ /****if* H5Pf/h5pcreate_c * NAME - * h5pcreate_c + * h5pcreate_c * PURPOSE - * Call H5Pcreate to create a property list + * Call H5Pcreate to create a property list * INPUTS - * cls - property list class identifier + * cls - property list class identifier * OUTPUTS - * prp_id - identifier of the created property list + * prp_id - identifier of the created property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, October 9, 2002 @@ -60,7 +43,7 @@ */ int_f -h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) +nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) /******/ { hid_t c_prp_id; @@ -78,22 +61,22 @@ done: /****if* H5Pf/h5pclose_c * NAME - * h5pclose_c + * h5pclose_c * PURPOSE - * Call H5Pclose to close property lis + * Call H5Pclose to close property lis * INPUTS - * prp_id - identifier of the property list to be closed + * prp_id - identifier of the property list to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ int_f -h5pclose_c ( hid_t_f *prp_id ) +nh5pclose_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -107,23 +90,23 @@ h5pclose_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pcopy_c * NAME - * h5pcopy_c + * h5pcopy_c * PURPOSE - * Call H5Pcopy to copy property list + * Call H5Pcopy to copy property list * INPUTS - * prp_id - identifier of the property list to be copied + * prp_id - identifier of the property list to be copied * OUTPUTS - * new_prp_id - identifier of the new property list + * new_prp_id - identifier of the new property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ int_f -h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) +nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) /******/ { hid_t c_new_prp_id; @@ -141,24 +124,24 @@ done: /****if* H5Pf/h5pequal_c * NAME - * h5pequal_c + * h5pequal_c * PURPOSE - * Call H5Pequal to check if two property lists are equal + * Call H5Pequal to check if two property lists are equal * INPUTS - * plist1_id - property list identifier - * plist2_id - property list identifier + * plist1_id - property list identifier + * plist2_id - property list identifier * OUTPUTS - * c_flag - flag to indicate that lists are eqaul + * c_flag - flag to indicate that lists are eqaul * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * * SOURCE */ int_f -h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) +nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) /******/ { htri_t c_c_flag; @@ -193,7 +176,7 @@ done: */ int_f -h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) +nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) /******/ { hid_t c_classtype; @@ -210,15 +193,15 @@ done: /****if* H5Pf/h5pset_preserve_c * NAME - * h5pset_preserve_c + * h5pset_preserve_c * PURPOSE - * Call H5Pset_preserve to set transfer property for compound - * datatype + * Call H5Pset_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier - * flag - TRUE/FALSE flag + * prp_id - property list identifier + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -226,7 +209,7 @@ done: */ int_f -h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) +nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -244,16 +227,16 @@ h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pget_preserve_c * NAME - * h5pget_preserve_c + * h5pget_preserve_c * PURPOSE - * Call H5Pget_preserve to set transfer property for compound - * datatype + * Call H5Pget_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -261,7 +244,7 @@ h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) */ int_f -h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) +nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -277,22 +260,22 @@ h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pset_deflate_c * NAME - * h5pset_deflate_c + * h5pset_deflate_c * PURPOSE - * Call H5Pset_deflate to set deflate level + * Call H5Pset_deflate to set deflate level * INPUTS - * prp_id - property list identifier - * level - level of deflation + * prp_id - property list identifier + * level - level of deflation * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * SOURCE */ int_f -h5pset_deflate_c ( hid_t_f *prp_id , int_f *level) +nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /******/ { int ret_value = 0; @@ -311,24 +294,24 @@ h5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /****if* H5Pf/h5pset_chunk_c * NAME - * h5pset_chunk_c + * h5pset_chunk_c * PURPOSE - * Call H5Pset_chunk to set the sizes of chunks for a chunked - * layout dataset + * Call H5Pset_chunk to set the sizes of chunks for a chunked + * layout dataset * INPUTS - * prp_id - property list identifier - * rank - number of dimensions of each chunk - * dims - array of the size of each chunk + * prp_id - property list identifier + * rank - number of dimensions of each chunk + * dims - array of the size of each chunk * RETURNS - * 0 on success, -1 on failure - * Saturday, August 14, 1999 + * 0 on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE */ int_f -h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) +nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -355,24 +338,24 @@ DONE: /****if* H5Pf/h5pget_chunk_c * NAME - * h5pget_chunk_c + * h5pget_chunk_c * PURPOSE - * Call H5Pget_chunk to get the sizes of chunks for a chunked - * layout dataset for at list max_rank number of dimensions + * Call H5Pget_chunk to get the sizes of chunks for a chunked + * layout dataset for at list max_rank number of dimensions * INPUTS - * prp_id - property list identifier - * max rank - maximum number of dimensions to return - * dims - array of the size of each chunk + * prp_id - property list identifier + * max rank - maximum number of dimensions to return + * dims - array of the size of each chunk * RETURNS - * number of chunk's dimnesion on success, -1 on failure - * Saturday, August 14, 1999 + * number of chunk's dimnesion on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE */ int_f -h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) +nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -394,6 +377,36 @@ h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) return ret_value; } +/****if* H5Pf/h5pset_fill_valuec_c + * NAME + * h5pset_fill_valuec_c + * PURPOSE + * Call h5pset_fill_value_c to a character fill value + * INPUTS + * prp_id - property list identifier + * type_id - datatype identifier (fill value is of type type_id) + * fillvalue - character value + * RETURNS + * 0 on success, -1 on failure + * Saturday, August 14, 1999 + * AUTHOR + * Elena Pourmal + * SOURCE +*/ +int_f +nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) +/******/ +{ + int ret_value = -1; + + /* + * Call h5pset_fill_value_c function. + */ + ret_value = h5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); + + return ret_value; +} + /****if* H5Pf/h5pset_fill_value_c * NAME * h5pset_fill_value_c @@ -431,6 +444,68 @@ h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } +int_f +nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +/******/ +{ + /* + * Call h5pset_fill_value_c function. + */ + return h5pset_fill_value_c(prp_id, type_id, fillvalue); +} + +int_f +nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +{ + /* + * Call h5pset_fill_value_c function. + */ + return h5pset_fill_value_c(prp_id, type_id, fillvalue); +} + +int_f +nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +{ + /* + * Call h5pset_fill_value_c function. + */ + return h5pset_fill_value_c(prp_id, type_id, fillvalue); +} + +/****if* H5Pf/h5pget_fill_valuec_c + * NAME + * h5pget_fill_valuec_c + * PURPOSE + * Call h5pget_fill_value_c to a character fill value + * INPUTS + * prp_id - property list identifier + * type_id - datatype identifier (fill value is of type type_id) + * fillvalue - character value + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Saturday, August 14, 1999 + * HISTORY + * Fixed wrong call to C wrapper, was nh5pset_fill_value_c, changed + * to nh5pget_fill_value_c. MSB - 7/21/2014 + * + * SOURCE +*/ +int_f +nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) +/******/ +{ + int ret_value = -1; + + /* + * Call h5pget_fill_value_c function. + */ + ret_value = h5pget_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); + + return ret_value; +} + /****if* H5Pf/h5pget_fill_value_c * NAME * h5pget_fill_value_c @@ -468,30 +543,57 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } +int_f +nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +{ + /* + * Call h5pget_fill_value_c function. + */ + return h5pget_fill_value_c(prp_id, type_id, fillvalue); +} + +int_f +nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +{ + /* + * Call h5pget_fill_value_c function. + */ + return h5pget_fill_value_c(prp_id, type_id, fillvalue); +} + +int_f +nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) +{ + /* + * Call h5pget_fill_value_c function. + */ + return h5pget_fill_value_c(prp_id, type_id, fillvalue); +} + /****if* H5Pf/h5pget_version_c * NAME - * h5pget_version_c + * h5pget_version_c * PURPOSE - * Call H5Pget_version to get the version information - * of various objects for a file creation property list + * Call H5Pget_version to get the version information + * of various objects for a file creation property list * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * boot - array to put boot block version number - * freelist - array to put global freelist version number - * stab - array to put symbol table version number - * shhdr - array to put shared object header version number + * boot - array to put boot block version number + * freelist - array to put global freelist version number + * stab - array to put symbol table version number + * shhdr - array to put shared object header version number * 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 - * Removed extra length parameters EP 7/6/00 + * Removed extra length parameters EP 7/6/00 * SOURCE */ int_f -h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) +nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) /******/ { int ret_value = -1; @@ -528,22 +630,22 @@ h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, /****if* H5Pf/h5pget_userblock_c * NAME - * h5pget_userblock_c + * h5pget_userblock_c * PURPOSE - * Call H5Pget_userblock to get the size of a user block in - * a file creation property list + * Call H5Pget_userblock to get the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * Outputs size - Size of the user-block in bytes + * prp_id - property list identifier + * Outputs size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f -h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -566,22 +668,22 @@ h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pset_userblock_c * NAME - * h5pset_userblock_c + * h5pset_userblock_c * PURPOSE - * Call H5Pset_userblock to set the size of a user block in - * a file creation property list + * Call H5Pset_userblock to set the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * size - Size of the user-block in bytes + * prp_id - property list identifier + * size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f -h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -603,25 +705,25 @@ h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pget_sizes_c * NAME - * h5pget_sizes_c + * h5pget_sizes_c * PURPOSE - * Call H5Pget_sizes to get the size of the offsets - * and lengths used in an HDF5 file + * Call H5Pget_sizes to get the size of the offsets + * and lengths used in an HDF5 file * INPUTS - * prp_id - property list identifier - * Outputs sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * Outputs sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 - * Deleted extra length parameters. EP 6/7/00 + * Deleted extra length parameters. EP 6/7/00 * SOURCE */ int_f -h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -646,24 +748,24 @@ h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /****if* H5Pf/h5pset_sizes_c * NAME - * h5pset_sizes_c + * h5pset_sizes_c * PURPOSE - * Call H5Pset_sizes to set the size of the offsets + * Call H5Pset_sizes to set the size of the offsets * INPUTS - * prp_id - property list identifier - * sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 * * SOURCE */ int_f -h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -686,23 +788,23 @@ h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /****if* H5Pf/h5pset_sym_k_c * NAME - * h5pset_sym_k_c + * h5pset_sym_k_c * PURPOSE - * Call H5Pset_sym_k to set the size of parameters used - * to control the symbol table node + * Call H5Pset_sym_k to set the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank - * lk - Symbol table node size + * prp_id - property list identifier + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * SOURCE */ int_f -h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -726,26 +828,26 @@ h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pget_sym_k_c * NAME - * h5pget_sym_k_c + * h5pget_sym_k_c * PURPOSE - * Call H5Pget_sym_k to get the size of parameters used - * to control the symbol table node + * Call H5Pget_sym_k to get the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank - * lk - Symbol table node size + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -768,24 +870,24 @@ h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pset_istore_k_c * NAME - * h5pset_istore_k_c + * h5pset_istore_k_c * PURPOSE - * Call H5Pset_istore_k to set the size of the parameter - * used to control the B-trees for indexing chunked datasets + * Call H5Pset_istore_k to set the size of the parameter + * used to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank + * prp_id - property list identifier + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) +nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -807,25 +909,25 @@ h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_istore_k_c * NAME - * h5pget_istore_k_c + * h5pget_istore_k_c * PURPOSE - * Call H5Pget_istore_k to get the size of parameters used - * to control the B-trees for indexing chunked datasets + * Call H5Pget_istore_k to get the size of parameters used + * to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) +nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -846,24 +948,24 @@ h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_driver_c * NAME - * h5pget_driver_c + * h5pget_driver_c * PURPOSE - * Call H5Pget_driver to get low-level file driver identifier + * Call H5Pget_driver to get low-level file driver identifier * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * driver - low-level file driver identifier + * driver - low-level file driver identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) +nh5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) /******/ { int ret_value = -1; @@ -884,23 +986,23 @@ DONE: /****if* H5Pf/h5pset_fapl_stdio_c * NAME - * h5pset_fapl_stdio_c + * h5pset_fapl_stdio_c * PURPOSE - * Call H5Pset_stdio to set the low level file driver to - * use the functions declared in the stdio.h + * Call H5Pset_stdio to set the low level file driver to + * use the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 7, 2001 + * March 7, 2001 * HISTORY * * SOURCE */ int_f -h5pset_fapl_stdio_c (hid_t_f *prp_id) +nh5pset_fapl_stdio_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -918,26 +1020,26 @@ h5pset_fapl_stdio_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_stdio_c * NAME - * h5pget_fapl_stdio_c + * h5pget_fapl_stdio_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the stdio.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * io - value indicates whether the file driver uses - * the functions declared in the stdio.h + * io - value indicates whether the file driver uses + * the functions declared in the stdio.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) +nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /******/ { int ret_value = -1; @@ -958,23 +1060,23 @@ h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /****if* H5Pf/h5pset_fapl_sec2_c * NAME - * h5pset_fapl_sec2_c + * h5pset_fapl_sec2_c * PURPOSE - * Call H5Pset_fapl_sec2 to set the low level file driver to - * use the functions declared in the unistd.h + * Call H5Pset_fapl_sec2 to set the low level file driver to + * use the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pset_fapl_sec2_c (hid_t_f *prp_id) +nh5pset_fapl_sec2_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -993,26 +1095,26 @@ h5pset_fapl_sec2_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_sec2_c * NAME - * h5pget_fapl_sec2_c + * h5pget_fapl_sec2_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the unistd.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * sec2 - value indicates whether the file driver uses - * the functions declared in the unistd.h + * sec2 - value indicates whether the file driver uses + * the functions declared in the unistd.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) +nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /******/ { int ret_value = -1; @@ -1032,25 +1134,25 @@ h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /****if* H5Pf/h5pset_alignment_c * NAME - * h5pset_alignment_c + * h5pset_alignment_c * PURPOSE - * Call H5Pset_alignment to set alignment properties of - * a file access property list + * Call H5Pset_alignment to set alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1071,25 +1173,25 @@ h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /****if* H5Pf/h5pget_alignment_c * NAME - * h5pget_alignment_c + * h5pget_alignment_c * PURPOSE - * Call H5Pget_alignment to get alignment properties of - * a file access property list + * Call H5Pget_alignment to get alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1111,26 +1213,26 @@ h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /****if* H5Pf/h5pset_fapl_core_c * NAME - * h5pset_fapl_core_c + * h5pset_fapl_core_c * PURPOSE - * Call H5Pset_fapl_core to set the low-level file driver - * to use malloc() and free() + * Call H5Pset_fapl_core to set the low-level file driver + * to use malloc() and free() * INPUTS - * prp_id - property list identifier - * increment - File block size in bytes - * flag - Boolean flag indicating whether to write the - * file contents to disk when the file is closed. + * prp_id - property list identifier + * increment - File block size in bytes + * flag - Boolean flag indicating whether to write the + * file contents to disk when the file is closed. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1153,24 +1255,24 @@ h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pget_fapl_core_c * NAME - * h5pget_fapl_core_c + * h5pget_fapl_core_c * PURPOSE - * Call H5Pget_fapl_core to determine whether the file access - * property list is set to the core drive + * Call H5Pget_fapl_core to determine whether the file access + * property list is set to the core drive * INPUTS - * prp_id - property list identifier - * Outputs increment - File block size in bytes + * prp_id - property list identifier + * Outputs increment - File block size in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1193,26 +1295,26 @@ h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pset_fapl_family_c * NAME - * h5pset_fapl_family_c + * h5pset_fapl_family_c * PURPOSE - * Call H5Pset_fapl_family to set the file access properties list - * to the family driver + * Call H5Pset_fapl_family to set the file access properties list + * to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) +nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) /******/ { int ret_value = -1; @@ -1234,26 +1336,26 @@ h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist /****if* H5Pf/h5pget_fapl_family_c * NAME - * h5pget_fapl_family_c + * h5pget_fapl_family_c * PURPOSE - * Call H5Pget_fapl_family to determine whether the file access - * property list is set to the family driver + * Call H5Pget_fapl_family to determine whether the file access + * property list is set to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) +nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) /******/ { int ret_value = -1; @@ -1276,29 +1378,29 @@ h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) /****if* H5Pf/h5pset_cache_c * NAME - * h5pset_cache_c + * h5pset_cache_c * PURPOSE - * Call H5Pset_cache to set he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pset_cache to set he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * prp_id - property list identifier + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 - * instead of double + * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 + * instead of double * SOURCE */ int_f -h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) +nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) /******/ { int ret_value = -1; @@ -1325,32 +1427,32 @@ h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_ /****if* H5Pf/h5pget_cache_c * NAME - * h5pget_cache_c + * h5pget_cache_c * PURPOSE - * Call H5Pget_cache to get he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pget_cache to get he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nelmts - Number of elements in the raw data chunk - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nelmts - Number of elements in the raw data chunk + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed type of the rdcc_w0 parameter to be real_f instead of double - * Changed type of the rdcc_nelmts parameter to be int_f. + * Changed type of the rdcc_w0 parameter to be real_f instead of double + * Changed type of the rdcc_nelmts parameter to be int_f. * EIP October 10, 2003 * SOURCE */ int_f -h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) +nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) /******/ { int ret_value = -1; @@ -1377,29 +1479,29 @@ h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t /****if* H5Pf/h5pset_fapl_split_c * NAME - * h5pset_fapl_split_c + * h5pset_fapl_split_c * PURPOSE - * Call H5Pset_fapl_split to set he low-level driver to split meta data - * from raw data + * Call H5Pset_fapl_split to set he low-level driver to split meta data + * from raw data * INPUTS - * prp_id - property list identifier - * meta_len - Length of meta_ext - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_len - Length of raw _ext - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * prp_id - property list identifier + * meta_len - Length of meta_ext + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_len - Length of raw _ext + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) +nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1438,32 +1540,32 @@ DONE: #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_split_c * NAME - * h5pget_fapl_split_c + * h5pget_fapl_split_c * PURPOSE - * Call H5Pget_fapl_split to determine whether the file access - * property list is set to the split driver + * Call H5Pget_fapl_split to determine whether the file access + * property list is set to the split driver * INPUTS - * prp_id - property list identifier - * meta_ext_size - Number of characters of the meta file extension - * to be copied to the meta_ext buffer - * raw_ext_size - Number of characters of the raw file extension - * to be copied to the raw_ext buffer + * prp_id - property list identifier + * meta_ext_size - Number of characters of the meta file extension + * to be copied to the meta_ext buffer + * raw_ext_size - Number of characters of the raw file extension + * to be copied to the raw_ext buffer *OUTPUT - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9 , 2001 + * March 9 , 2001 * HISTORY * * SOURCE */ int_f -h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) +nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1501,25 +1603,25 @@ h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hi /****if* H5Pf/h5pset_gc_references_c * NAME - * h5pset_gc_references_c + * h5pset_gc_references_c * PURPOSE - * Call H5Pset_gc_references to set garbage - * collecting references flag + * Call H5Pset_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1541,25 +1643,25 @@ h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pget_gc_references_c * NAME - * h5pget_gc_references_c + * h5pget_gc_references_c * PURPOSE - * Call H5Pget_gc_references to set garbage - * collecting references flag + * Call H5Pget_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * Outputs gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * Outputs gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1579,24 +1681,24 @@ h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pset_layout_c * NAME - * h5pset_layout_c + * h5pset_layout_c * PURPOSE - * Call H5Pset_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pset_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier - * layout - Type of storage layout for raw data. + * prp_id - property list identifier + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pset_layout_c (hid_t_f *prp_id, int_f* layout) +nh5pset_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1617,25 +1719,25 @@ h5pset_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pget_layout_c * NAME - * h5pget_layout_c + * h5pget_layout_c * PURPOSE - * Call H5Pget_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pget_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * layout - Type of storage layout for raw data. + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_layout_c (hid_t_f *prp_id, int_f* layout) +nh5pget_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1654,27 +1756,27 @@ h5pget_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pset_filter_c * NAME - * h5pset_filter_c + * h5pset_filter_c * PURPOSE - * Call H5Pset_filter to add a filter to the filter pipeline. + * Call H5Pset_filter to add a filter to the filter pipeline. * INPUTS - * prp_id - property list identifier - * filter - Filter to be added to the pipeline. - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be added to the pipeline. + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * 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 * * SOURCE */ int_f -h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int ret_value = -1; @@ -1722,7 +1824,7 @@ DONE: * SOURCE */ int_f -h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) +nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) /******/ { int ret_value = -1; @@ -1742,30 +1844,30 @@ h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) } /*---------------------------------------------------------------------------- - * Name: h5pget_filter_c - * Purpose: Call H5Pget_filter2 to get information about a filter - * in a pipeline - * Inputs: prp_id - property list identifier - * filter_number - Sequence number within the filter - * pipeline of the filter for which - * information is sought. - * namelen - Anticipated number of characters in name. - * Outputs: flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter - * filter_id - filter identification number - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su - * Friday, February 25, 2000 - * Modifications: - * Since cd_nelmts has IN/OUT attributes, fixed the input and - * returned value of cd_nelmnts to satisfy this specification. + * Name: h5pget_filter_c + * Purpose: Call H5Pget_filter2 to get information about a filter + * in a pipeline + * Inputs: prp_id - property list identifier + * filter_number - Sequence number within the filter + * pipeline of the filter for which + * information is sought. + * namelen - Anticipated number of characters in name. + *Outputs: flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter + * filter_id - filter identification number + * Returns: 0 on success, -1 on failure + * Programmer: Xiangyang Su + * Friday, February 25, 2000 + * Modifications: + * Since cd_nelmts has IN/OUT attributes, fixed the input and + * returned value of cd_nelmnts to satisfy this specification. * MSB January 27, 2009 *---------------------------------------------------------------------------*/ int_f -h5pget_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) +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) /******/ { unsigned int c_flags; @@ -1819,7 +1921,7 @@ DONE: * 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. + * 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 @@ -1832,7 +1934,7 @@ DONE: * SOURCE */ int_f -h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_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; @@ -1865,25 +1967,25 @@ DONE: /****if* H5Pf/h5pget_external_count_c * NAME - * h5pget_external_count_c + * h5pget_external_count_c * PURPOSE - * Call H5Pget_external_count to get the number of external - * files for the specified dataset. + * Call H5Pget_external_count to get the number of external + * files for the specified dataset. * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * count - number of external files + * count - number of external files * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -h5pget_external_count_c (hid_t_f *prp_id, int_f* count) +nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) /******/ { int ret_value = -1; @@ -1906,14 +2008,14 @@ h5pget_external_count_c (hid_t_f *prp_id, int_f* count) * PURPOSE * 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. + * prp_id - property list identifier + * name_size - length of name + * idx - External file index. * 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. - * bytes - Number of bytes reserved in the file for the data. + * 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. + * bytes - Number of bytes reserved in the file for the data. * RETURNS * on success, -1 on failure * AUTHOR @@ -1925,7 +2027,7 @@ h5pget_external_count_c (hid_t_f *prp_id, int_f* count) * SOURCE */ int_f -h5pget_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) +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; @@ -1969,27 +2071,27 @@ DONE: /****if* H5Pf/h5pset_btree_ratios_c * NAME - * h5pset_btree_ratios_c + * h5pset_btree_ratios_c * PURPOSE - * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a - * dataset transfer property list. + * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a + * dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f -h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2014,27 +2116,27 @@ h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig /****if* H5Pf/h5pget_btree_ratios_c * NAME - * h5pget_btree_ratios_c + * h5pget_btree_ratios_c * PURPOSE - * Call H5Pget_btree_ratios to Gets B-tree split ratios - * for a dataset transfer property list. + * Call H5Pget_btree_ratios to Gets B-tree split ratios + * for a dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f -h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2056,30 +2158,30 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig } /****if* H5Pf/h5pget_fclose_degree_c * NAME - * h5pget_fclose_degree_c + * h5pget_fclose_degree_c * PURPOSE - * Call H5Pget_fclose_degree to determine file close behavior + * Call H5Pget_fclose_degree to determine file close behavior * INPUTS - * fapl_id - file access identifier + * fapl_id - file access identifier * OUTPUTS * - * degree - possible values are: + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE */ int_f -h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2096,28 +2198,28 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_fclose_degree_c * NAME - * h5pset_fclose_degree_c + * h5pset_fclose_degree_c * PURPOSE - * Call H5Pset_fclose_degree to set file close behavior + * Call H5Pset_fclose_degree to set file close behavior * INPUTS - * fapl_id - file access identifier - * degree - possible values are: + * fapl_id - file access identifier + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE */ int_f -h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2134,26 +2236,26 @@ h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_buffer_c * NAME - * h5pset_buffer_c + * h5pset_buffer_c * PURPOSE - * Call H5Pset_buffer to set size of conversion buffer + * Call H5Pset_buffer to set size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier - * size - size of the buffer + * prp_id - t`dataset trasfer property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE */ int_f -h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2168,25 +2270,25 @@ h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /****if* H5Pf/h5pget_buffer_c * NAME - * h5pget_buffer_c + * h5pget_buffer_c * PURPOSE - * Call H5Pget_buffer to get size of conversion buffer + * Call H5Pget_buffer to get size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier + * prp_id - t`dataset trasfer property list identifier * OUTPUTS - * size - size of conversion buffer + * size - size of conversion buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE */ int_f -h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -2202,25 +2304,25 @@ h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pfill_value_defined_c * NAME - * h5pfill_value_defined_c + * h5pfill_value_defined_c * PURPOSE - * Call H5Pfill_value_defined to check if fill value is defined + * Call H5Pfill_value_defined to check if fill value is defined * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value status flag + * flag - fill value status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) +nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2235,26 +2337,26 @@ h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_alloc_time_c * NAME - * h5pget_alloc_time_c + * h5pget_alloc_time_c * PURPOSE - * Call H5Pget_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pget_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - allocation time flag + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2269,25 +2371,25 @@ h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_alloc_time_c * NAME - * h5pset_alloc_time_c + * h5pset_alloc_time_c * PURPOSE - * Call H5Pset_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pset_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - allocation time flag + * prp_id - dataset creation property list identifier + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2302,26 +2404,26 @@ h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fill_time_c * NAME - * h5pget_fill_time_c + * h5pget_fill_time_c * PURPOSE - * Call H5Pget_fill_time to get fill value writing - * time for dataset during creation + * Call H5Pget_fill_time to get fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value writing time flag + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) +nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2336,25 +2438,25 @@ h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_fill_time_c * NAME - * h5pset_fill_time_c + * h5pset_fill_time_c * PURPOSE - * Call H5Pset_fill_time to set fill value writing - * time for dataset during creation + * Call H5Pset_fill_time to set fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - fill value writing time flag + * prp_id - dataset creation property list identifier + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) +nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2369,26 +2471,26 @@ h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_meta_block_size_c * NAME - * h5pset_meta_block_size_c + * h5pset_meta_block_size_c * PURPOSE - * Call H5Pset_meta_block_size to set size of metadata block + * Call H5Pset_meta_block_size to set size of metadata block * INPUTS - * prp_id - file access property list identifier - * size - size of the metadata block + * prp_id - file access property list identifier + * size - size of the metadata block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2402,26 +2504,26 @@ h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_meta_block_size_c * NAME - * h5pget_meta_block_size_c + * h5pget_meta_block_size_c * PURPOSE - * Call H5Pget_meta_block_size to get size of metadata block + * Call H5Pget_meta_block_size to get size of metadata block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the metadata block + * size - size of the metadata block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2435,26 +2537,26 @@ h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_sieve_buf_size_c * NAME - * h5pset_sieve_buf_size_c + * h5pset_sieve_buf_size_c * PURPOSE - * Call H5Pset_sieve_buf_size to set size of datasieve buffer + * Call H5Pset_sieve_buf_size to set size of datasieve buffer * INPUTS - * prp_id - file access property list identifier - * size - size of the buffer + * prp_id - file access property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2468,26 +2570,26 @@ h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_sieve_buf_size_c * NAME - * h5pget_sieve_buf_size_c + * h5pget_sieve_buf_size_c * PURPOSE - * Call H5Pget_sieve_buf_size to get size of datasieve buffer + * Call H5Pget_sieve_buf_size to get size of datasieve buffer * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the buffer + * size - size of the buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2501,26 +2603,26 @@ h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pset_small_data_block_size_c * NAME - * h5pset_small_data_block_size_c + * h5pset_small_data_block_size_c * PURPOSE - * Call H5Pset_small_data_block_size to set size of raw small data block + * Call H5Pset_small_data_block_size to set size of raw small data block * INPUTS - * prp_id - file access property list identifier - * size - size of the block + * prp_id - file access property list identifier + * size - size of the block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2534,26 +2636,26 @@ h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_small_data_block_size_c * NAME - * h5pget_small_data_block_size_c + * h5pget_small_data_block_size_c * PURPOSE - * Call H5Pget_small_data_block_size to get size of raw small data block + * Call H5Pget_small_data_block_size to get size of raw small data block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the block + * size - size of the block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2567,26 +2669,26 @@ h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_hyper_vector_size_c * NAME - * h5pset_hyper_vector_size_c + * h5pset_hyper_vector_size_c * PURPOSE - * Call H5Pset_hyper_vector_size to set size of the hyper vector + * Call H5Pset_hyper_vector_size to set size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier - * size - size of the vector + * prp_id - dataset transfer property list identifier + * size - size of the vector * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2600,26 +2702,26 @@ h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_hyper_vector_size_c * NAME - * h5pget_hyper_vector_size_c + * h5pget_hyper_vector_size_c * PURPOSE - * Call H5Pget_hyper_vector_size to get size of the hyper vector + * Call H5Pget_hyper_vector_size to get size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier + * prp_id - dataset transfer property list identifier * OUTPUTS * - * size - size of the vector + * size - size of the vector * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2631,6 +2733,36 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) *size = (size_t_f)c_size; return ret_value; } +/****if* H5Pf/h5pcreate_class_c + * NAME + * h5pcreate_class_c + * PURPOSE + * Call H5Pcreate_class to create a new property class + * INPUTS + * parent - property list class identifier + * name - name of the new class + * name_len - lenght of the "name" buffer + * OUTPUTS + * cls - new class identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * October 11, 2002 + * + * HISTORY + * SOURCE +*/ +int_f +nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls) +/******/ +{ + int ret_value = -1; + + ret_value = h5pcreate_class_c(parent, name, name_len, cls, NULL, NULL, NULL, NULL, NULL, NULL); + return ret_value; +} + /****if* H5Pf/h5pcreate_class_c * NAME @@ -2682,17 +2814,18 @@ DONE: return ret_value; } -/****if* H5Pf/h5pregister_c + +/****if* H5Pf/h5pregisterc_c * NAME - * h5pregister_c + * h5pregisterc_c * PURPOSE - * Call H5Pregister2 to registers a permanent property + * Call h5pregister_c to registers a permanent property * INPUTS * class - property list class identifier * name - name of the new property * name_len - length of the "name" buffer * size - property size - * value - property value + * value - property value of character type * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -2703,28 +2836,121 @@ DONE: * SOURCE */ int_f -h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value) +nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len) /******/ { - char* c_name = NULL; - int_f ret_value = -1; - - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len))) - goto DONE; + int ret_value = -1; /* - * Call H5Pregister2 function. + * Call h5pregister_c function */ - if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - goto DONE; - ret_value = 0; + ret_value = h5pregister_c(cls, name, name_len, size, _fcdtocp(value)); + return ret_value; +} -DONE: +/****if* H5Pf/h5pregister_c + * NAME + * h5pregister_c + * PURPOSE + * Call H5Pregister2 to registers a permanent property + * INPUTS + * class - property list class identifier + * name - name of the new property + * name_len - length of the "name" buffer + * size - property size + * value - property value + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * October 11, 2002 + * HISTORY + * + * SOURCE +*/ +int_f +h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value) +/******/ +{ + char* c_name = NULL; + int_f ret_value = -1; + + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len))) + goto DONE; + + /* + * Call H5Pregister2 function. + */ + if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + goto DONE; + ret_value = 0; + +DONE: if(c_name != NULL) HDfree(c_name); return ret_value; } +int_f +nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pregister_c function + */ + return h5pregister_c(cls, name, name_len, size, value); +} + +int_f +nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pregister_c function + */ + return h5pregister_c(cls, name, name_len, size, value); +} + +int_f +nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pregister_c function + */ + return h5pregister_c(cls, name, name_len, size, value); +} + +/****if* H5Pf/h5pinsertc_c + * NAME + * h5pinsertc_c + * PURPOSE + * Call h5pinsert_c to register a temporary property + * INPUTS + * plist - property list identifier + * name - name of the new property + * name_len - length of the "name" buffer + * size - property size + * value - property value of character type + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * October 11, 2002 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len) +/******/ +{ + int_f ret_value = -1; + + /* + * Call h5pinsert_c function + */ + ret_value = h5pinsert_c(plist, name, name_len, size, _fcdtocp(value)); + return ret_value; +} + /****if* H5Pf/h5pinsert_c * NAME * h5pinsert_c @@ -2768,27 +2994,54 @@ DONE: return ret_value; } +int_f +nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pinsert_c function + */ + return h5pinsert_c(plist, name, name_len, size, value); +} + +int_f +nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pinsert_c function + */ + return h5pinsert_c(plist, name, name_len, size, value); +} + +int_f +nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) +{ + /* + * Call h5pinsert_c function + */ + return h5pinsert_c(plist, name, name_len, size, value); +} + /****if* H5Pf/h5pexist_c * NAME - * h5pexist_c + * h5pexist_c * PURPOSE - * Call H5Pexist to querie whether a property name exists - * in a property list or class + * Call H5Pexist to querie whether a property name exists + * in a property list or class * INPUTS - * plist - property list or property class identifier - * name - name of the new property - * name_len - length of the "name" buffer + * plist - property list or property class identifier + * name - name of the new property + * name_len - length of the "name" buffer * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) +nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -2812,24 +3065,24 @@ DONE: } /****if* H5Pf/h5pisa_class_c * NAME - * h5pisa_class_c + * h5pisa_class_c * PURPOSE - * Call H5Pisa_class to querie whether a property is a - * member of a class + * Call H5Pisa_class to querie whether a property is a + * member of a class * INPUTS - * plist - property list identifier - * cls - property class identifier + * plist - property list identifier + * cls - property class identifier * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pisa_class_c(hid_t_f *plist, hid_t_f *cls) +nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -2849,26 +3102,26 @@ h5pisa_class_c(hid_t_f *plist, hid_t_f *cls) } /****if* H5Pf/h5pget_size_c * NAME - * h5pget_size_c + * h5pget_size_c * PURPOSE - * Call H5Pget_size to querie the size of the property + * Call H5Pget_size to querie the size of the property * INPUTS - * plist - property list to query - * name - name of the property - * name_len - length of the "name" buffer + * plist - property list to query + * name - name of the property + * name_len - length of the "name" buffer * OUTPUTS - * size - size of the property in bytes + * size - size of the property in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) +nh5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) /******/ { int_f ret_value = -1; @@ -2893,24 +3146,24 @@ DONE: } /****if* H5Pf/h5pget_nprops_c * NAME - * h5pget_nprops_c + * h5pget_nprops_c * PURPOSE - * Call H5Pget_nporps to get number of the properties in the list + * Call H5Pget_nporps to get number of the properties in the list * INPUTS - * plist - property list to query + * plist - property list to query * OUTPUTS - * nprops - number of properties in the list + * nprops - number of properties in the list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) +nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) /******/ { int_f ret_value = -1; @@ -2930,25 +3183,25 @@ h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) } /****if* H5Pf/h5pget_class_parent_c * NAME - * h5pget_class_parent_c + * h5pget_class_parent_c * PURPOSE - * Call H5Pget_class_parent to get the parent class of - * a genereic property class + * Call H5Pget_class_parent to get the parent class of + * a genereic property class * INPUTS - * prp_id - property list to query + * prp_id - property list to query * OUTPUTS - * parent_id - parent classs identifier + * parent_id - parent classs identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) +nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) /******/ { int_f ret_value = -1; @@ -2969,26 +3222,26 @@ h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) } /****if* H5Pf/h5pcopy_prop_c * NAME - * h5pcopy_prop_c + * h5pcopy_prop_c * PURPOSE - * Call H5Pcopy_prop to copy a property from one list or - * class to another + * Call H5Pcopy_prop to copy a property from one list or + * class to another * INPUTS - * dst_id - identifier of destination property list - * src_id - identifier of source property list - * name - name of the property - * name_len - length of the "name" buffer + * dst_id - identifier of destination property list + * src_id - identifier of source property list + * name - name of the property + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) +nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3012,24 +3265,24 @@ DONE: } /****if* H5Pf/h5premove_c * NAME - * h5premove_c + * h5premove_c * PURPOSE - * Call H5Premove to remove a property from a list + * Call H5Premove to remove a property from a list * INPUTS - * plid - identifier of property list - * name - name of the property to remove - * name_len - length of the "name" buffer + * plid - identifier of property list + * name - name of the property to remove + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) +nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3052,15 +3305,15 @@ DONE: } /****if* H5Pf/h5punregister_c * NAME - * h5punregister_c + * h5punregister_c * PURPOSE - * Call H5Punregister to remove a property from a property class + * Call H5Punregister to remove a property from a property class * INPUTS - * cls - identifier of property class - * name - name of the property to unregister - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - name of the property to unregister + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3069,7 +3322,7 @@ DONE: * SOURCE */ int_f -h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) +nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3092,13 +3345,13 @@ DONE: } /****if* H5Pf/h5pclose_class_c * NAME - * h5pclose_class_c + * h5pclose_class_c * PURPOSE - * Call H5Pclose_class to close property class + * Call H5Pclose_class to close property class * INPUTS - * class - identifier of property class to close + * class - identifier of property class to close * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3107,7 +3360,7 @@ DONE: * SOURCE */ int_f -h5pclose_class_c(hid_t_f *cls) +nh5pclose_class_c(hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -3124,15 +3377,15 @@ h5pclose_class_c(hid_t_f *cls) /****if* H5Pf/h5pget_class_name_c * NAME - * h5pget_class_name_c + * h5pget_class_name_c * PURPOSE - * Call H5Pget_class_name to get property class name + * Call H5Pget_class_name to get property class name * INPUTS - * cls - identifier of property class - * name - buffer to retrieve name in - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - buffer to retrieve name in + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3141,7 +3394,7 @@ h5pclose_class_c(hid_t_f *cls) * SOURCE */ int_f -h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) +nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3164,6 +3417,38 @@ DONE: return ret_value; } +/****if* H5Pf/h5psetc_c + * NAME + * h5psetc_c + * PURPOSE + * Call h5setc_c to set property with the character string value + * INPUTS + * plist - property list identifier + * name - name of property + * name_len - length of the "name" buffer + * value - property value of character type + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * October 11, 2002 + * HISTORY + * + * SOURCE +*/ +int_f +nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len) +/******/ +{ + int_f ret_value = -1; + + /* + * Call h5pset_c function + */ + ret_value = h5pset_c(plist, name, name_len, _fcdtocp(value)); + return ret_value; +} + /****if* H5Pf/h5pset_c * NAME * h5pset_c @@ -3204,6 +3489,64 @@ DONE: return ret_value; } +int_f +nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pset_c function + */ + return h5pset_c(plist, name, name_len, value); +} + +int_f +nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pset_c function + */ + return h5pset_c(plist, name, name_len, value); +} + +int_f +nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pset_c function + */ + return h5pset_c(plist, name, name_len, value); +} +/****if* H5Pf/h5pgetc_c + * NAME + * h5pgetc_c + * PURPOSE + * Call h5set_c to set property with the character string value + * INPUTS + * plist - property list identifier + * name - name of property + * name_len - length of the "name" buffer + * Output: value - property value of character type + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * October 11, 2002 + * HISTORY + * + * SOURCE +*/ +int_f +nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len) +/******/ +{ + int_f ret_value = -1; + + /* + * Call h5pget_c function + */ + ret_value = h5pget_c(plist, name, name_len, _fcdtocp(value)); + return ret_value; +} + /****if* H5Pf/h5pget_c * NAME * h5pget_c @@ -3213,7 +3556,7 @@ DONE: * plist - property list class identifier * name - name of the new property * name_len - length of the "name" buffer - * Output: + * Output: * value - property value * RETURNS * 0 on success, -1 on failure @@ -3245,26 +3588,54 @@ DONE: return ret_value; } +int_f +nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pget_c function + */ + return h5pget_c(plist, name, name_len, value); +} + +int_f +nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pget_c function + */ + return h5pget_c(plist, name, name_len, value); +} + +int_f +nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) +{ + /* + * Call h5pget_c function + */ + return h5pget_c(plist, name, name_len, value); +} + + /****if* H5Pf/h5pset_shuffle_c * NAME - * h5pset_shuffle_c + * h5pset_shuffle_c * PURPOSE - * Call H5Pset_shuffle + * Call H5Pset_shuffle * INPUTS - * prp_id - property list identifier - * type_size - size of the datatype in bytes + * prp_id - property list identifier + * type_size - size of the datatype in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -h5pset_shuffle_c ( hid_t_f *prp_id ) +nh5pset_shuffle_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3278,23 +3649,23 @@ h5pset_shuffle_c ( hid_t_f *prp_id ) } /****if* H5Pf/h5pset_fletcher32_c * NAME - * h5pset_fletcher32_c + * h5pset_fletcher32_c * PURPOSE - * Call H5Pset_fletcher32 to enable EDC + * Call H5Pset_fletcher32 to enable EDC * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -h5pset_fletcher32_c ( hid_t_f *prp_id ) +nh5pset_fletcher32_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3309,24 +3680,24 @@ h5pset_fletcher32_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pset_edc_check_c * NAME - * h5pset_edc_check_c + * h5pset_edc_check_c * PURPOSE - * Call H5Pset_edc_check to enable EDC + * Call H5Pset_edc_check to enable EDC * INPUTS - * prp_id - dataset transfer property list identifier - * flag - EDC flag + * prp_id - dataset transfer property list identifier + * flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3343,24 +3714,24 @@ h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /****if* H5Pf/h5pget_edc_check_c * NAME - * h5pget_edc_check_c + * h5pget_edc_check_c * PURPOSE - * Call H5Pget_edc_check to query EDC + * Call H5Pget_edc_check to query EDC * INPUTS - * prp_id - dataset transfer property list identifier - * Outouts: flag - EDC flag + * prp_id - dataset transfer property list identifier + * Outouts: flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3375,24 +3746,24 @@ h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) } /****if* H5Pf/h5pset_family_offset_c * NAME - * h5pset_family_offset_c + * h5pset_family_offset_c * PURPOSE - * Call H5Pset_family_offset to set and offset for family driver + * Call H5Pset_family_offset to set and offset for family driver * INPUTS - * prp_id - property list identifier - * offset - offset in bytes + * prp_id - property list identifier + * offset - offset in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, 19 March 2003 + * Wednesday, 19 March 2003 * HISTORY * * SOURCE */ int_f -h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) +nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /******/ { int_f ret_value = 0; @@ -3409,30 +3780,30 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /****if* H5Pf/h5pset_fapl_multi_c * NAME - * h5pset_fapl_multi_c + * h5pset_fapl_multi_c * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * mem_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * lenmax - lenght of the name a sdeclared in Fortran - * flag - flag allowing partila access when one of the files is missing + * prp_id - file_creation property list identifier + * mem_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * lenmax - lenght of the name a sdeclared in Fortran + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE */ int_f -/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ -h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) +/*nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ +nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) /******/ { int_f ret_value = -1; @@ -3450,13 +3821,13 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc c_lenmax = (int)*lenmax; relax = (hbool_t)*flag; /* - * Check that we got correct values from Fortran for memb_addr array + * Check that we got correct values from Fortran for memb_addr array */ for (i=0; i < H5FD_MEM_NTYPES; i++) { if(memb_addr[i] >= 1.0f) return ret_value; } /* - * Take care of names array + * Take care of names array */ tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES)); @@ -3470,7 +3841,7 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc tmp_p = tmp_p + c_lenmax; } /* - * Take care of othe arguments + * Take care of othe arguments */ tmp_max_addr = (long double)(HADDR_MAX); c_prp_id = (hid_t)*prp_id; @@ -3481,7 +3852,7 @@ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr)); } /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax); @@ -3497,23 +3868,23 @@ DONE: /****if* H5Pf/h5pset_fapl_multi_sc * NAME - * h5pset_fapl_multi_sc + * h5pset_fapl_multi_sc * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier + * prp_id - file_creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 31 2003 + * March 31 2003 * HISTORY * * SOURCE */ int_f -h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) +nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) /******/ { int_f ret_value = -1; @@ -3524,7 +3895,7 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) relax = (hbool_t)*flag; c_prp_id = (hid_t)*prp_id; /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax); @@ -3534,30 +3905,30 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fapl_multi_c * NAME - * h5pget_fapl_multi_c + * h5pget_fapl_multi_c * PURPOSE - * Call H5Pget_fapl_multi to set multi file dirver + * Call H5Pget_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * lenmax - lenght of the name a sdeclared in Fortran + * prp_id - file_creation property list identifier + * lenmax - lenght of the name a sdeclared in Fortran * OUTPUTS - * memb_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * flag - flag allowing partila access when one of the files is missing + * memb_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE */ int_f -h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) +nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) /******/ { int_f ret_value = -1; @@ -3576,14 +3947,14 @@ h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc c_prp_id = (hid_t)*prp_id; /* - * Call H5Pget_fapl_multi function + * Call H5Pget_fapl_multi function */ status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax); if ( status < 0 ) return ret_value; /* - * Take care of names array + * Take care of names array */ tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1); tmp_p = tmp; @@ -3598,7 +3969,7 @@ h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fc HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /* - * Take care of other arguments + * Take care of other arguments */ for (i=0; i < H5FD_MEM_NTYPES; i++) { @@ -3618,25 +3989,25 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /****if* H5Pf/h5pset_szip_c * NAME - * h5pset_szip_c + * h5pset_szip_c * PURPOSE - * Call H5Pset_szip to set szip compression + * Call H5Pset_szip to set szip compression * INPUTS - * prp_id - dataset creation property list identifier - * options_mask - * pixels_per_block -szip compression parameters + * prp_id - dataset creation property list identifier + * options_mask + * pixels_per_block -szip compression parameters * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 8 2003 + * April 8 2003 * HISTORY * * SOURCE */ int_f -h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) +nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) /******/ { int_f ret_value = -1; @@ -3649,7 +4020,7 @@ h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) c_options_mask = (unsigned)*options_mask; c_pixels_per_block = (unsigned)*pixels_per_block; /* - * Call H5Pset_szip function + * Call H5Pset_szip function */ status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block); @@ -3659,25 +4030,25 @@ h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) } /****if* H5Pf/h5pall_filters_avail_c * NAME - * h5pall_filters_avail_c + * h5pall_filters_avail_c * PURPOSE - * Call H5Pall_filters_avail + * Call H5Pall_filters_avail * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * status - logical flag + * status - logical flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE */ int_f -h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) +nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /******/ { int_f ret_value = -1; @@ -3687,7 +4058,7 @@ h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) c_prp_id = (hid_t)*prp_id; /* - * Call H5Pall_filters_avail function + * Call H5Pall_filters_avail function */ c_status = H5Pall_filters_avail(c_prp_id); @@ -3700,31 +4071,31 @@ h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /****if* H5Pf/h5pget_filter_by_id_c * NAME - * h5pget_filter_by_id_c + * h5pget_filter_by_id_c * PURPOSE - * Call H5Pget_filter_by_id2 to get information about a filter - * in a pipeline + * Call H5Pget_filter_by_id2 to get information about a filter + * in a pipeline * INPUTS - * prp_id - property list identifier - * filter_id - filter id - * namelen - Anticipated number of characters in name. + * prp_id - property list identifier + * filter_id - filter id + * namelen - Anticipated number of characters in name. *OUTPUT - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena POurmal - * April 10, 2003 + * April 10, 2003 * HISTORY * * SOURCE */ int_f -h5pget_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) +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) /******/ { unsigned int c_flags; @@ -3767,27 +4138,27 @@ DONE: /****if* H5Pf/h5pmodify_filter_c * NAME - * h5pmodify_filter_c + * h5pmodify_filter_c * PURPOSE - * Call H5Pmodify_filter to modify a filter + * Call H5Pmodify_filter to modify a filter * INPUTS - * prp_id - property list identifier - * filter - Filter to be modified - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be modified + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE */ int_f -h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int_f ret_value = -1; @@ -3819,23 +4190,23 @@ DONE: /****if* H5Pf/h5premove_filter_c * NAME - * h5premove_filter_c + * h5premove_filter_c * PURPOSE - * Call H5Premove_filter to delete one or more filters + * Call H5Premove_filter to delete one or more filters * INPUTS - * prp_id - property list identifier - * filter - Filter to be deleted + * prp_id - property list identifier + * filter - Filter to be deleted * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * January 27 2004 + * January 27 2004 * HISTORY * * SOURCE */ int_f -h5premove_filter_c (hid_t_f *prp_id, int_f* filter) +nh5premove_filter_c (hid_t_f *prp_id, int_f* filter) /******/ { int_f ret_value = -1; @@ -3857,25 +4228,25 @@ DONE: /****if* H5Pf/h5pget_attr_phase_change_c * NAME - * h5pget_attr_phase_change_c + * h5pget_attr_phase_change_c * PURPOSE - * Calls H5Pget_attr_phase_change + * Calls H5Pget_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -3898,24 +4269,24 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pset_attr_creation_order_c * NAME - * h5pset_attr_creation_order_c + * h5pset_attr_creation_order_c * PURPOSE - * Calls H5Ppset_attr_creation_order + * Calls H5Ppset_attr_creation_order * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) +nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -3935,29 +4306,29 @@ h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pset_shared_mesg_nindexes_c * NAME - * h5pset_shared_mesg_nindexes_c + * h5pset_shared_mesg_nindexes_c * PURPOSE - * Calls h5pset_shared_mesg_nindexes + * Calls h5pset_shared_mesg_nindexes * * INPUTS * - * plist_id - file creation property list - * nindexes - Number of shared object header message indexes - * available in files created WITH this property list + * plist_id - file creation property list + * nindexes - Number of shared object header message indexes + * available in files created WITH this property list * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) +nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /******/ { int ret_value = -1; @@ -3978,30 +4349,30 @@ h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /****if* H5Pf/h5pset_shared_mesg_index_c * NAME - * h5pset_shared_mesg_index_c + * h5pset_shared_mesg_index_c * PURPOSE - * Calls H5Pset_shared_mesg_index + * Calls H5Pset_shared_mesg_index * * INPUTS * - * fcpl_id - File creation property list identifier. - * index_num - Index being configured. - * mesg_type_flags - Types of messages that should be stored in this index. - * min_mesg_size - Minimum message size. + * fcpl_id - File creation property list identifier. + * index_num - Index being configured. + * mesg_type_flags - Types of messages that should be stored in this index. + * min_mesg_size - Minimum message size. * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) +nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) /******/ { int ret_value = -1; @@ -4018,28 +4389,28 @@ h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_ /****if* H5Pf/h5pget_attr_creation_order_c * NAME - * h5pget_attr_creation_order_c + * h5pget_attr_creation_order_c * PURPOSE - * Calls H5Pget_attr_creation_order + * Calls H5Pget_attr_creation_order * * INPUTS * - * ocpl_id - Object (group or dataset) creation property list identifier + * ocpl_id - Object (group or dataset) creation property list identifier * OUTPUTS * - * crt_order_flags - Flags specifying whether to track and index attribute creation order + * crt_order_flags - Flags specifying whether to track and index attribute creation order * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) +nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4060,29 +4431,29 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) } /****if* H5Pf/h5pset_libver_bounds_c * NAME - * h5pset_libver_bounds_c + * h5pset_libver_bounds_c * PURPOSE - * Calls H5Pset_libver_bounds + * Calls H5Pset_libver_bounds * * INPUTS * - * fapl_id - File access property list identifier - * low - The earliest version of the library that will be used for writing objects. - * high - The latest version of the library that will be used for writing objects. + * fapl_id - File access property list identifier + * low - The earliest version of the library that will be used for writing objects. + * high - The latest version of the library that will be used for writing objects. * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE */ int_f -h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) +nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /******/ { int ret_value = -1; @@ -4100,26 +4471,26 @@ h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /****if* H5Pf/h5pset_link_creation_order_c * NAME - * h5pset_link_creation_order_c + * h5pset_link_creation_order_c * PURPOSE - * Calls H5Pset_link_creation_order + * Calls H5Pset_link_creation_order * * INPUTS - * gcpl_id - Group creation property list identifier - * crt_order_flags - Creation order flag(s) + * gcpl_id - Group creation property list identifier + * crt_order_flags - Creation order flag(s) * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE */ int_f -h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) +nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -4136,25 +4507,25 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pget_link_phase_change_c * NAME - * h5pget_link_phase_change_c + * h5pget_link_phase_change_c * PURPOSE - * Calls H5Pget_link_phase_change + * Calls H5Pget_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * gcpl_id - Group creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * HISTORY * * SOURCE */ int_f -h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4176,27 +4547,27 @@ h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pget_obj_track_times_c * NAME - * h5pget_obj_track_times_c + * h5pget_obj_track_times_c * PURPOSE - * Call H5Pget_obj_track_times + * Call H5Pget_obj_track_times * * INPUTS - * plist_id - property list id + * plist_id - property list id * OUTPUTS * - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4218,25 +4589,25 @@ h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_obj_track_times_c * NAME - * h5pset_obj_track_times_c + * h5pset_obj_track_times_c * PURPOSE - * Call H5Pset_obj_track_times + * Call H5Pset_obj_track_times * * INPUTS - * plist_id - property list id - * flag - TRUE/FALSE flag + * plist_id - property list id + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4258,28 +4629,28 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_create_inter_group_c * NAME - * h5pset_create_inter_group_c + * h5pset_create_inter_group_c * PURPOSE - * Calls H5Pset_create_intermediate_group + * Calls H5Pset_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - crt_intermed_group specifying whether - * to create intermediate groups upon the - * creation of an object + * crt_intermed_group - crt_intermed_group specifying whether + * to create intermediate groups upon the + * creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -4297,28 +4668,28 @@ h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /****if* H5Pf/h5pget_link_creation_order_c * NAME - * h5pget_link_creation_order_c + * h5pget_link_creation_order_c * PURPOSE - * Calls H5Pget_link_creation_order + * Calls H5Pget_link_creation_order * * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * OUTPUTS * - * crt_order_flags - Creation order flag(s) + * crt_order_flags - Creation order flag(s) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) +nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4340,30 +4711,30 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /****if* H5Pf/h5pset_char_encoding_c * NAME - * h5pset_char_encoding_c + * h5pset_char_encoding_c * PURPOSE * Calls H5Pset_char_encoding * * INPUTS * - * plist_id - Property list identifier - * encoding - String encoding character set: + * plist_id - Property list identifier + * encoding - String encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * OUTPUTS * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4382,30 +4753,30 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pget_char_encoding_c * NAME - * h5pget_char_encoding_c + * h5pget_char_encoding_c * PURPOSE * Calls H5Pget_char_encoding * * INPUTS * - * plist_id - Property list identifier + * plist_id - Property list identifier * OUTPUTS * - * encoding - Encoding character set: + * encoding - Encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4425,30 +4796,30 @@ h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pset_copy_object_c * NAME - * h5pset_copy_object_c + * h5pset_copy_object_c * PURPOSE * Calls H5Pset_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier - * copy_options - Copy option(s) to be set + * ocp_plist_id - Object copy property list identifier + * copy_options - Copy option(s) to be set * * OUTPUTS * * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4465,29 +4836,29 @@ h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_copy_object_c * NAME - * h5pget_copy_object_c + * h5pget_copy_object_c * PURPOSE * Calls H5Pget_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier + * ocp_plist_id - Object copy property list identifier * * OUTPUTS * - * copy_options - Copy option(s) to be get + * copy_options - Copy option(s) to be get * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4507,31 +4878,31 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_data_transform_c * NAME - * h5pget_data_transform_c + * h5pget_data_transform_c * PURPOSE - * Calls H5Pget_data_transform + * Calls H5Pget_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression_len - buffer size transorm expression * - * Output: - * expression - buffer to hold transform expression + * Output: + * expression - buffer to hold transform expression * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE */ int_f -h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) +nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) /******/ { char *c_expression = NULL; /* Buffer to hold C string */ @@ -4569,31 +4940,31 @@ done: /****if* H5Pf/h5pset_data_transform_c * NAME - * h5pset_data_transform_c + * h5pset_data_transform_c * PURPOSE - * Calls H5Pset_data_transform + * Calls H5Pset_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression - buffer to hold transform expression - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression - buffer to hold transform expression + * expression_len - buffer size transorm expression * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE */ int_f -h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) +nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) /******/ { char* c_expression = NULL; /* Buffer to hold C string */ @@ -4620,29 +4991,29 @@ done: /****if* H5Pf/h5pget_local_heap_size_hint_c * NAME - * h5pget_local_heap_size_hint_c + * h5pget_local_heap_size_hint_c * PURPOSE - * Calls H5Pget_local_heap_size_hint + * Calls H5Pget_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * size_hint - Hint for size of local heap + * Output: + * size_hint - Hint for size of local heap * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -4661,30 +5032,30 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pget_est_link_info_c * NAME - * h5pget_est_link_info_c + * h5pget_est_link_info_c * PURPOSE - * Calls H5Pget_est_link_info + * Calls H5Pget_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * Output: + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -4706,30 +5077,30 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name /****if* H5Pf/h5pset_local_heap_size_hint_c * NAME - * h5pset_local_heap_size_hint_c + * h5pset_local_heap_size_hint_c * PURPOSE - * Calls H5Pset_local_heap_size_hint + * Calls H5Pset_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier - * size_hint - Hint for size of local heap + * gcpl_id - Group creation property list identifier + * size_hint - Hint for size of local heap * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -4746,30 +5117,30 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pset_est_link_info_c * NAME - * h5pset_est_link_info_c + * h5pset_est_link_info_c * PURPOSE - * Calls H5Pset_est_link_info + * Calls H5Pset_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * gcpl_id - Group creation property list identifier + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * - * Output: + * Output: * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -4786,26 +5157,26 @@ h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name /****if* H5Pf/h5pset_link_phase_change_c * NAME - * h5pset_link_phase_change_c + * h5pset_link_phase_change_c * PURPOSE - * Calls H5Pset_link_phase_change + * Calls H5Pset_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage - * Outputs + * gcpl_id - Group creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage + * Outputs * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4823,28 +5194,28 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pset_fapl_direct_c * NAME - * h5pset_fapl_direct_c + * h5pset_fapl_direct_c * PURPOSE - * Calls H5Pset_fapl_direct + * Calls H5Pset_fapl_direct * * INPUTS * - * fapl_id - File access property list identifier - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size - * Outputs + * fapl_id - File access property list identifier + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size + * Outputs * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) +nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -4865,29 +5236,29 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a /****if* H5Pf/h5pget_fapl_direct_c * NAME - * h5pget_fapl_direct_c + * h5pget_fapl_direct_c * PURPOSE - * Calls H5Pget_fapl_direct + * Calls H5Pget_fapl_direct * * INPUTS * - * fapl_id - File access property list identifier + * fapl_id - File access property list identifier * OUTPUTS * - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) +nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -4914,27 +5285,27 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a /****if* H5Pf/h5pset_attr_phase_change_c * NAME - * h5pset_attr_phase_change_c + * h5pset_attr_phase_change_c * PURPOSE - * Calls H5Pset_attr_phase_change + * Calls H5Pset_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4951,25 +5322,25 @@ h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens /****if* H5Pf/h5pset_nbit_c * NAME - * h5pset_nbit_c + * h5pset_nbit_c * PURPOSE - * Calls H5Pset_nbit + * Calls H5Pset_nbit * * INPUTS - * plist_id - Dataset creation property list identifier + * plist_id - Dataset creation property list identifier * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -h5pset_nbit_c(hid_t_f *plist_id ) +nh5pset_nbit_c(hid_t_f *plist_id ) /******/ { int ret_value = -1; @@ -5002,7 +5373,7 @@ h5pset_nbit_c(hid_t_f *plist_id ) * SOURCE */ int_f -h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) +nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) /******/ { int ret_value = -1; @@ -5037,7 +5408,7 @@ h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) * SOURCE */ int_f -h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5054,29 +5425,29 @@ h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_nlinks * NAME - * h5pget_nlinks + * h5pget_nlinks * PURPOSE - * Calls H5Pget_nlinks + * Calls H5Pget_nlinks * * INPUTS * - * lapl_id - File access property list identifier + * lapl_id - File access property list identifier * * OUTPUTS * - * nlinks - Maximum number of links to traverse + * nlinks - Maximum number of links to traverse * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 24, 2008 + * March 24, 2008 * HISTORY * * SOURCE */ int_f -h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5095,26 +5466,26 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_create_inter_group_c * NAME - * h5pget_create_inter_group_c + * h5pget_create_inter_group_c * PURPOSE - * Calls H5Pget_create_intermediate_group + * Calls H5Pget_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - Specifying whether to create intermediate groups upon - * the creation of an object + * crt_intermed_group - Specifying whether to create intermediate groups upon + * the creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE */ int_f -h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -5134,22 +5505,22 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) } /*---------------------------------------------------------------------------- - * Name: h5pset_chunk_cache_c - * Purpose: Calls H5Pset_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pset_chunk_cache_c + * Purpose: Calls H5Pset_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f -h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; @@ -5164,23 +5535,23 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby } /*---------------------------------------------------------------------------- - * Name: h5pget_chunk_cache_c - * Purpose: Calls H5Pget_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * Outputs: - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pget_chunk_cache_c + * Purpose: Calls H5Pget_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * Outputs: + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f -h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; size_t c_rdcc_nslots; @@ -5201,18 +5572,18 @@ h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby } /*---------------------------------------------------------------------------- - * Name: h5pset_file_image_c - * Purpose: Calls H5Pset_file_image + * Name: h5pset_file_image_c + * Purpose: Calls H5Pset_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5230,19 +5601,19 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len) } /*---------------------------------------------------------------------------- - * Name: h5pget_file_image_c - * Purpose: Calls H5Pget_file_image + * Name: h5pget_file_image_c + * Purpose: Calls H5Pget_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier - * Outputs: + * Outputs: * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5269,225 +5640,3 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) return ret_value; } - -#ifdef H5_HAVE_PARALLEL -/****if* H5Pf/h5pset_fapl_mpio_c - * NAME - * h5pset_fapl_mpio_c - * PURPOSE - * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user - * supplied communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - MPI communicator - * info - MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - c_comm = MPI_Comm_f2c(*comm); - c_info = MPI_Info_f2c(*info); - - /* - * Call H5Pset_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} -/****if* H5Pf/h5pget_fapl_mpio_c - * NAME - * h5pget_fapl_mpio_c - * PURPOSE - * Call H5Pget_fapl_mpio to retrieve communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - buffer to return MPI communicator - * info - buffer to return MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - - /* - * Call H5Pget_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); - if (ret < 0) return ret_value; - *comm = (int_f) MPI_Comm_c2f(c_comm); - *info = (int_f) MPI_Info_c2f(c_info); - ret_value = 0; - return ret_value; -} -/****if* H5Pf/h5pset_dxpl_mpio_c - * NAME - * h5pset_dxpl_mpio_c - * PURPOSE - * Call H5Pset_dxpl_mpio to set transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; -/* - switch (*data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT_F: - c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; - break; - - case H5FD_MPIO_COLLECTIVE_F: - c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; - break; - default: - return ret_value; - } -*/ - c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; - /* - * Call H5Pset_dxpl_mpio function. - */ - c_prp_id = *prp_id; - ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/****if* H5Pf/h5pget_dxpl_mpio_c - * NAME - * h5pget_dxpl_mpio_c - * PURPOSE - * Call H5Pget_dxpl_mpio to get transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - buffer to retrieve transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, June 15, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; - - /* - * Call H5Pget_xfer function. - */ - c_prp_id = *prp_id; - ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); - if (ret < 0) return ret_value; - *data_xfer_mode = (int_f)c_data_xfer_mode; -/* - switch (c_data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT: - *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; - break; - - case H5FD_MPIO_COLLECTIVE: - *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; - break; - - default: - return ret_value; - } -*/ - ret_value = 0; - return ret_value; -} - -/****if* H5Pf/h5pget_mpio_actual_io_mode_c - * NAME - * h5pget_mpio_actual_io_mode_c - * PURPOSE - * Calls H5Pget_mpio_actual_io_mode - * - * INPUTS - * dxpl_id - Dataset transfer property list identifier. - * OUTPUTS - * actual_io_mode - The type of I/O performed by this process. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * July 27, 2012 - * SOURCE -*/ -int_f -h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) -/******/ -{ - int ret_value = -1; - H5D_mpio_actual_io_mode_t c_actual_io_mode; - - /* - * Call H5Pget_mpio_actual_io_mode_f function. - */ - if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) - return ret_value; /* error occurred */ - - *actual_io_mode =(int_f)c_actual_io_mode; - - ret_value = 0; - return ret_value; -} -#endif /*H5_HAVE_PARALLEL*/ diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 deleted file mode 100644 index 97f907b..0000000 --- a/fortran/src/H5Pff.F90 +++ /dev/null @@ -1,7327 +0,0 @@ -!****h* ROBODoc/H5Pff -! -! NAME -! H5P -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. *S -! 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 -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5P 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. -!***** - -#include - -MODULE H5P - - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - - INTERFACE h5pset_fapl_multi_f - MODULE PROCEDURE h5pset_fapl_multi_l - MODULE PROCEDURE h5pset_fapl_multi_s - END INTERFACE - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_fill_value_ptr - - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_fill_value_ptr - - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_ptr - - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_ptr - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - ! Recommended procedure: - MODULE PROCEDURE h5pregister_ptr - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_char - ! Recommended procedure: - MODULE PROCEDURE h5pinsert_ptr - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pget_fill_value_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - TYPE(C_PTR), VALUE :: fillvalue - END FUNCTION h5pget_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pset_fill_value_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - TYPE(C_PTR), VALUE :: fillvalue - END FUNCTION h5pset_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pset_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value - END FUNCTION h5pset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pget_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value - END FUNCTION h5pget_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & - BIND(C, NAME='h5pregister_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pregister_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & - BIND(C, NAME='h5pinsert_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pinsert_c - END INTERFACE - -CONTAINS - -!****s* H5P/h5pcreate_f -! NAME -! h5pcreate_f -! -! PURPOSE -! Creates a new property as an instance of a property -! list class. -! -! INPUTS -! class - type of the property class to be created. -! Possible values are: -! H5P_OBJECT_CREATE_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_ACCESS_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! H5P_GROUP_CREATE_F -! H5P_GROUP_ACCESS_F -! H5P_DATATYPE_CREATE_F -! H5P_DATATYPE_ACCESS_F -! H5P_STRING_CREATE_F -! H5P_ATTRIBUTE_CREATE _F -! H5P_OBJECT_COPY_F -! H5P_LINK_CREATE_F -! H5P_LINK_ACCESS_F -! -! OUTPUTS -! prp_id - property list identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcreate_f(class, prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pcreate_c(class, prp_id) & - BIND(C,NAME='h5pcreate_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - END FUNCTION h5pcreate_c - END INTERFACE - - hdferr = h5pcreate_c(class, prp_id) - END SUBROUTINE h5pcreate_f - -!****s* H5P/h5pset_preserve_f -! NAME -! h5pset_preserve_f -! -! PURPOSE -! Sets the dataset transfer property list status to -! TRUE or FALSE for initializing compound datatype -! members during write/read operations. -! -! INPUTS -! prp_id - property list identifier -! flag - status flag -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset - ! transfer property for partila writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - - INTERFACE - INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) & - BIND(C,NAME='h5pset_preserve_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pset_preserve_c - END INTERFACE - flag_c = 0 - IF(flag) flag_c = 1 - hdferr = h5pset_preserve_c(prp_id, flag_c) - END SUBROUTINE h5pset_preserve_f - -!****s* H5P/h5pget_preserve_f -! NAME -! h5pget_preserve_f -! -! PURPOSE -! Checks status of the dataset transfer property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! flag - status flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's - ! transfer property for partial writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - - INTERFACE - INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) & - BIND(C,NAME='h5pget_preserve_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pget_preserve_c - END INTERFACE - - hdferr = h5pget_preserve_c(prp_id, flag_c) - flag = .FALSE. - IF(flag_c .EQ. 1) flag = .TRUE. - END SUBROUTINE h5pget_preserve_f - -!****s* H5P/h5pget_class_f -! NAME -! h5pget_class_f -! -! PURPOSE -! Returns the property list class for a property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! classtype - property list class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list - ! to be created. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_c(prp_id, classtype) & - BIND(C,NAME='h5pget_class_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: classtype - END FUNCTION h5pget_class_c - END INTERFACE - - hdferr = h5pget_class_c(prp_id, classtype) - END SUBROUTINE h5pget_class_f - -!****s* H5P/h5pcopy_f -! NAME -! h5pcopy_f -! -! PURPOSE -! Copies an existing property list to create a new -! property list -! -! INPUTS -! prp_id - property list identifier -! OUTPUTS -! new_prp_id - new property list identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) & - BIND(C,NAME='h5pcopy_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: new_prp_id - END FUNCTION h5pcopy_c - END INTERFACE - - hdferr = h5pcopy_c(prp_id, new_prp_id) - END SUBROUTINE h5pcopy_f - -!****s* H5P/h5pclose_f -! NAME -! h5pclose_f -! -! PURPOSE -! Terminates access to a property list. -! -! INPUTS -! prp_id - identifier of the property list to -! terminate access to. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pclose_c(prp_id) & - BIND(C,NAME='h5pclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pclose_c - END INTERFACE - - hdferr = h5pclose_c(prp_id) - END SUBROUTINE h5pclose_f - -!****s* H5P/h5pset_chunk_f -! NAME -! h5pset_chunk_f -! -! PURPOSE -! Sets the size of the chunks used to store -! a chunked layout dataset. -! -! INPUTS -! prp_id - datatset creation property list identifier -! ndims - number of dimensions for each chunk -! dims - array with dimension sizes for each chunk -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) & - BIND(C,NAME='h5pset_chunk_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ndims - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - END FUNCTION h5pset_chunk_c - END INTERFACE - - hdferr = h5pset_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pset_chunk_f - -!****s* H5P/h5pget_chunk_f -! NAME -! h5pget_chunk_f -! -! PURPOSE -! Retrieves the size of chunks for the raw data of a -! chunked layout dataset -! -! INPUTS -! prp_id - property list identifier -! ndims - size of dims array -! OUTPUTS -! dims - array with dimension sizes for each chunk -! hdferr - error code -! Success: number of chunk dimensions -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to - ! to return - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! number of chunk dimensions on success, - ! -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) & - BIND(C,NAME='h5pget_chunk_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: ndims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5pget_chunk_c - END INTERFACE - - hdferr = h5pget_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pget_chunk_f - -!****s* H5P/h5pset_deflate_f -! NAME -! h5pset_deflate_f -! -! PURPOSE -! Sets compression method and compression level. -! -! INPUTS -! prp_id - property list identifier -! level - compression level -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_deflate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_deflate_c(prp_id, level) & - BIND(C,NAME='h5pset_deflate_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: level - END FUNCTION h5pset_deflate_c - END INTERFACE - hdferr = h5pset_deflate_c(prp_id, level) - - END SUBROUTINE h5pset_deflate_f - -!****s* H5P/h5pget_version_f -! NAME -! h5pget_version_f -! -! PURPOSE -! Retrieves the version information of various objects -! for a file creation property list -! -! INPUTS -! prp_id - file createion property list identifier -! OUTPUTS -! boot - super block version number -! freelist - global freelist version number -! stab - symbol table version number -! shhdr - shared object header version number -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & - stab, shhdr, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot - ! block version number - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global - ! Freelist version number - - INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol - ! table version number - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared - ! object header version number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) & - BIND(C,NAME='h5pget_version_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(*), INTENT(OUT) :: boot - INTEGER, DIMENSION(*), INTENT(OUT) :: freelist - INTEGER, DIMENSION(*), INTENT(OUT) :: stab - INTEGER, DIMENSION(*), INTENT(OUT) :: shhdr - END FUNCTION h5pget_version_c - END INTERFACE - - hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - END SUBROUTINE h5pget_version_f - -!****s* H5P/h5pset_userblock_f -! NAME -! h5pset_userblock_f -! -! PURPOSE -! Sets user block size -! -! INPUTS -! prp_id - file creation property list to modify -! size - size of the user-block in bytes -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_userblock_c(prp_id, size) & - BIND(C,NAME='h5pset_userblock_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_userblock_c - END INTERFACE - - hdferr = h5pset_userblock_c(prp_id, size) - END SUBROUTINE h5pset_userblock_f - -!****s* H5P/h5pget_userblock_f -! NAME -! h5pget_userblock_f -! -! PURPOSE -! Gets user block size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! block_size - size of the user block in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the - ! user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) & - BIND(C,NAME='h5pget_userblock_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: block_size - END FUNCTION h5pget_userblock_c - END INTERFACE - hdferr = h5pget_userblock_c(prp_id, block_size) - END SUBROUTINE h5pget_userblock_f - -!****s* H5P/h5pset_sizes_f -! NAME -! h5pset_sizes_f -! -! PURPOSE -! Sets the byte size of the offsets and lengths used -! to address objects in an HDF5 file. -! -! INPUTS -! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) & - BIND(C,NAME='h5pset_sizes_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size - END FUNCTION h5pset_sizes_c - END INTERFACE - - hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pset_sizes_f - -!****s* H5P/h5pget_sizes_f -! NAME -! h5pget_sizes_f -! -! PURPOSE -! Retrieves the size of the offsets and lengths used -! in an HDF5 file -! -! INPUTS -! prp_id - file creation property list identifier -! OUTPUTS -! -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) & - BIND(C,NAME='h5pget_sizes_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size - END FUNCTION h5pget_sizes_c - END INTERFACE - - hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pget_sizes_f - -!****s* H5P/h5pset_sym_k_f -! NAME -! h5pset_sym_k_f -! -! PURPOSE -! Sets the size of parameters used to control the -!symbol table nodes -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - symbol table tree rank -! lk - symbol table node size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) & - BIND(C,NAME='h5pset_sym_k_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - INTEGER, INTENT(IN) :: lk - END FUNCTION h5pset_sym_k_c - END INTERFACE - - hdferr = h5pset_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pset_sym_k_f -!****s* H5P/h5pget_sym_k_f -! NAME -! h5pget_sym_k_f -! -! PURPOSE -! Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - symbol table tree 1/2 rank -! lk - symbol table node 1/2 size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank - INTEGER, INTENT(OUT) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) & - BIND(C,NAME='h5pget_sym_k_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - INTEGER, INTENT(OUT) :: lk - END FUNCTION h5pget_sym_k_c - END INTERFACE - - hdferr = h5pget_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pget_sym_k_f -!****s* H5P/h5pset_istore_k_f -! NAME -! h5pset_istore_k_f -! -! PURPOSE -! Sets the size of the parameter used to control the -! B-trees for indexing chunked datasets -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - 1/2 rank of chunked storage B-tree -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) & - BIND(C,NAME='h5pset_istore_k_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - END FUNCTION h5pset_istore_k_c - END INTERFACE - - hdferr = h5pset_istore_k_c(prp_id, ik) - END SUBROUTINE h5pset_istore_k_f - -!****s* H5P/h5pget_istore_k_f -! NAME -! h5pget_istore_k_f -! -! PURPOSE -! Queries the 1/2 rank of an indexed storage B-tree. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - 1/2 rank of chunked storage B-tree -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) & - BIND(C,NAME='h5pget_istore_k_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - END FUNCTION h5pget_istore_k_c - END INTERFACE - - hdferr = h5pget_istore_k_c(prp_id, ik) - END SUBROUTINE h5pget_istore_k_f - -!****s* H5P/h5pget_driver_f -! NAME -! h5pget_driver_f -! -! PURPOSE -! Returns low-lever driver identifier. -! -! INPUTS -! -! prp_id - file access or data transfer property -! list identifier. -! OUTPUTS -! -! driver - low-level driver identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_driver_c(prp_id, driver) & - BIND(C,NAME='h5pget_driver_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: driver - END FUNCTION h5pget_driver_c - END INTERFACE - - hdferr = h5pget_driver_c(prp_id, driver) - END SUBROUTINE h5pget_driver_f - -!****s* H5P/h5pset_fapl_stdio_f -! NAME -! h5pset_fapl_stdio_f -! -! PURPOSE -! Sets the standard I/O driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) & - BIND(C,NAME='h5pset_fapl_stdio_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fapl_stdio_c - END INTERFACE - - hdferr = h5pset_fapl_stdio_c(prp_id) - END SUBROUTINE h5pset_fapl_stdio_f - -!****s* H5P/h5pget_stdio_f -! NAME -! h5pget_stdio_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) -! -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: io ! value indicates that the file - !access property list is set to - !the stdio driver -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_stdio_c -! hdferr = h5pget_stdio_c(prp_id, io) -! END SUBROUTINE h5pget_stdio_f - -!****s* H5P/h5pset_fapl_sec2_f -! NAME -! h5pset_fapl_sec2_f -! -! PURPOSE -! Sets the sec2 driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) & - BIND(C,NAME='h5pset_fapl_sec2_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - END FUNCTION h5pset_fapl_sec2_c - END INTERFACE - - hdferr = h5pset_fapl_sec2_c(prp_id) - END SUBROUTINE h5pset_fapl_sec2_f - -!****s* H5P/h5pget_sec2_f -! NAME -! h5pget_sec2_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file - !driver uses the functions declared - !in the unistd.h file -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sec2_c -! hdferr = h5pget_sec2_c(prp_id, sec2) -! END SUBROUTINE h5pget_sec2_f - -!****s* H5P/h5pset_alignment_f -! NAME -! h5pset_alignment_f -! -! PURPOSE -! Sets alignment properties of a file access property list. -! -! INPUTS -! -! prp_id - file access property list identifier -! threshold - threshold value -! alignment - alignment value -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) & - BIND(C,NAME='h5pset_alignment_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: threshold - INTEGER(HSIZE_T), INTENT(IN) :: alignment - END FUNCTION h5pset_alignment_c - END INTERFACE - - hdferr = h5pset_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pset_alignment_f - -!****s* H5P/h5pget_alignment_f -! NAME -! h5pget_alignment_f -! -! PURPOSE -! Retrieves the current settings for alignment -! properties from a file access property list. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! threshold - threshold value -! alignment - alignment value -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) & - BIND(C,NAME='h5pget_alignment_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: threshold - INTEGER(HSIZE_T), INTENT(OUT) :: alignment - END FUNCTION h5pget_alignment_c - END INTERFACE - - hdferr = h5pget_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pget_alignment_f - -!****s* H5P/h5pset_fapl_core_f -! NAME -! h5pset_fapl_core_f -! -! PURPOSE -! Modifies the file access property list to use the -! H5FD_CORE driver. -! -! INPUTS -! prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. - LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - INTERFACE - INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) & - BIND(C,NAME='h5pset_fapl_core_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pset_fapl_core_c - END INTERFACE - backing_store_flag = 0 - IF(backing_store) backing_store_flag = 1 - hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - END SUBROUTINE h5pset_fapl_core_f - -!****s* H5P/h5pget_fapl_core_f -! NAME -! h5pget_fapl_core_f -! -! PURPOSE -! Queries core file driver properties. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. - LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - - INTERFACE - INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) & - BIND(C,NAME='h5pget_fapl_core_c') - IMPORT :: HID_T,SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pget_fapl_core_c - END INTERFACE - - hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - backing_store =.FALSE. - IF (backing_store_flag .EQ. 1) backing_store =.TRUE. - END SUBROUTINE h5pget_fapl_core_f - -!****s* H5P/ h5pset_fapl_family_f -! NAME -! h5pset_fapl_family_f -! -! PURPOSE -! Sets the file access property list to use the family driver. -! -! INPUTS -! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) & - BIND(C,NAME='h5pset_fapl_family_c') - IMPORT :: HID_T,HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: memb_size - INTEGER(HID_T), INTENT(IN) :: memb_plist - END FUNCTION h5pset_fapl_family_c - END INTERFACE - - hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pset_fapl_family_f - -!****s* H5P/h5pget_fapl_family_f -! NAME -! h5pget_fapl_family_f -! -! PURPOSE -! Returns file access property list information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) & - BIND(C,NAME='h5pget_fapl_family_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size - INTEGER(HID_T), INTENT(OUT) :: memb_plist - END FUNCTION h5pget_fapl_family_c - END INTERFACE - - hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pget_fapl_family_f - -!****s* H5P/h5pset_cache_f -! NAME -! h5pset_cache_f -! -! PURPOSE -! Sets the meta data cache and raw data chunk -! cache parameters -! -! INPUTS -! -! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & - BIND(C,NAME='h5pset_cache_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_cache_c - END INTERFACE - - hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pset_cache_f - -!****s* H5P/h5pget_cache_f -! NAME -! h5pget_cache_f -! -! PURPOSE -! Queries the meta data cache and raw data chunk cache -! parameters. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & - BIND(C,NAME='h5pget_cache_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_cache_c - END INTERFACE - - hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pget_cache_f - -!****s* H5P/h5pset_fapl_split_f -! NAME -! h5pset_fapl_split_f -! -! PURPOSE -! Emulates the old split file driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile -! filename -! meta_plist - identifier of the meta file access property -! list -! raw_ext - name extension for the raw file filename -! raw_plist - identifier of the raw file access property list -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for - ! the metafile filename - INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file - ! access property list - CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file - ! access property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: meta_len, raw_len - INTERFACE - INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) & - BIND(C,NAME='h5pset_fapl_split_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: meta_ext - INTEGER(HID_T), INTENT(IN) :: meta_plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: raw_ext - INTEGER(HID_T), INTENT(IN) :: raw_plist - INTEGER :: meta_len, raw_len - END FUNCTION h5pset_fapl_split_c - END INTERFACE - - meta_len = LEN(meta_ext) - raw_len = LEN(raw_ext) - hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - END SUBROUTINE h5pset_fapl_split_f - -!****s* H5P/h5pget_split_f -! NAME -! h5pget_split_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& -! raw_ext, raw_plist, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta - ! file extension to be copied to the - ! meta_ext buffer - -! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for - !the metafile filename -! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file - ! access property list -! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw - ! file extension to be copied to the - ! raw_ext buffer -! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename -! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file - !access property list -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_split_c -! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & -! raw_ext_size, raw_ext, raw_plist ) -! END SUBROUTINE h5pget_split_f - -!****s* H5P/h5pset_gc_references_f -! NAME -! h5pset_gc_references_f -! -! PURPOSE -! Sets garbage collecting references flag. -! -! INPUTS -! -! prp_id - file access property list identifier -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) & - BIND(C,NAME='h5pset_gc_references_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: gc_reference - END FUNCTION h5pset_gc_references_c - END INTERFACE - - hdferr = h5pset_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pset_gc_references_f - -!****s* H5P/h5pget_gc_references_f -! NAME -! h5pget_gc_references_f -! -! PURPOSE -! Returns garbage collecting references setting. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) & - BIND(C,NAME='h5pget_gc_references_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: gc_reference - END FUNCTION h5pget_gc_references_c - END INTERFACE - - hdferr = h5pget_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pget_gc_references_f - -!****s* H5P/h5pset_layout_f -! NAME -! h5pset_layout_f -! -! PURPOSE -! Sets the type of storage used store the raw data -! for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F - ! H5D_CONTIGUOUS_F - ! H5D_CHUNKED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_layout_c(prp_id, layout) & - BIND(C,NAME='h5pset_layout_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: layout - END FUNCTION h5pset_layout_c - END INTERFACE - - hdferr = h5pset_layout_c(prp_id, layout) - END SUBROUTINE h5pset_layout_f - -!****s* H5P/h5pget_layout_f -! NAME -! h5pget_layout_f -! -! PURPOSE -! Returns the layout of the raw data for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F(0) - ! H5D_CONTIGUOUS_F(1) - ! H5D_CHUNKED_F(2) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_layout_c(prp_id, layout) & - BIND(C,NAME='h5pget_layout_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: layout - END FUNCTION h5pget_layout_c - END INTERFACE - - hdferr = h5pget_layout_c(prp_id, layout) - END SUBROUTINE h5pget_layout_f - -!****s* H5P/h5pset_filter_f -! NAME -! h5pset_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be added to the pipeline -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! February, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & - BIND(C,NAME='h5pset_filter_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pset_filter_c - END INTERFACE - - hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pset_filter_f - -!****s* H5P/h5pget_nfilters_f -! NAME -! h5pget_nfilters_f -! -! PURPOSE -! Returns the number of filters in the pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! nfilters - number of filters in the pipeline -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) & - BIND(C,NAME='h5pget_nfilters_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: nfilters - END FUNCTION h5pget_nfilters_c - END INTERFACE - - hdferr = h5pget_nfilters_c(prp_id, nfilters) - END SUBROUTINE h5pget_nfilters_f - -!****s* H5P/h5pget_filter_f -! NAME -! h5pget_filter_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter_number - sequence number within the filter -! pipeline of the filter for which -! information is sought -! OUTPUTS -! -! filter_id - filter identification number -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter - ! pipeline of the filter for which - ! information is sought - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! Filter identification number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) & - BIND(C,NAME='h5pget_filter_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_number - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - INTEGER, INTENT(OUT) :: filter_id - END FUNCTION h5pget_filter_c - END INTERFACE - - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - END SUBROUTINE h5pget_filter_f - -!****s* H5P/h5pset_external_f -! NAME -! h5pset_external_f -! -! PURPOSE -! Adds an external file to the list of external files. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file - 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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) & - BIND(C,NAME='h5pset_external_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, OFF_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(OFF_T), INTENT(IN) :: offset - INTEGER(HSIZE_T), INTENT(IN) :: bytes - END FUNCTION h5pset_external_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) - END SUBROUTINE h5pset_external_f - -!****s* H5P/h5pget_external_count_f -! NAME -! h5pget_external_count_f -! -! PURPOSE -! Returns the number of external files for a dataset. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! count - number of external files for the -! specified dataset -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count ! Number of external files for the - ! Specified dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_external_count_c(prp_id, count) & - BIND(C,NAME='h5pget_external_count_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: count - END FUNCTION h5pget_external_count_c - END INTERFACE - - hdferr = h5pget_external_count_c(prp_id, count) - END SUBROUTINE h5pget_external_count_f - -!****s* H5P/h5pget_external_f -! NAME -! h5pget_external_f -! -! PURPOSE -! Returns information about an external file. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! idx - external file index -! name_size - maximum size of name array -! name - name of the external file -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - 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(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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) & - BIND(C,NAME='h5pget_external_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T, OFF_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: idx - INTEGER(SIZE_T), INTENT(IN) :: name_size - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - INTEGER(OFF_T), INTENT(OUT) :: offset - INTEGER(HSIZE_T), INTENT(OUT) :: bytes - END FUNCTION h5pget_external_c - END INTERFACE - - hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - END SUBROUTINE h5pget_external_f - -!****s* H5P/h5pset_btree_ratios_f -! NAME -! h5pset_btree_ratios_f -! -! PURPOSE -! Sets B-tree split ratios for a dataset transfer -! property list. -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) & - BIND(C,NAME='h5pset_btree_ratios_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(IN) :: left - REAL, INTENT(IN) :: middle - REAL, INTENT(IN) :: right - END FUNCTION h5pset_btree_ratios_c - END INTERFACE - - hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pset_btree_ratios_f - -!****s* H5P/h5pget_btree_ratios_f -! NAME -! h5pget_btree_ratios_f -! -! PURPOSE -! Gets B-tree split ratios for a dataset transfer property list -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! OUTPUTS -! -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) & - BIND(C,NAME='h5pget_btree_ratios_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(OUT) :: left - REAL, INTENT(OUT) :: middle - REAL, INTENT(OUT) :: right - END FUNCTION h5pget_btree_ratios_c - END INTERFACE - - hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pget_btree_ratios_f - -!****s* H5P/h5pget_fclose_degree_f -! NAME -! h5pget_fclose_degree_f -! -! PURPOSE -! Returns the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(OUT) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) & - BIND(C,NAME='h5pget_fclose_degree_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(OUT) :: degree - END FUNCTION h5pget_fclose_degree_c - END INTERFACE - - hdferr = h5pget_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pget_fclose_degree_f - -!****s* H5P/h5pset_fclose_degree_f -! NAME -! h5pset_fclose_degree_f -! -! PURPOSE -! Sets the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - file access property list identifier -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(IN) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) & - BIND(C,NAME='h5pset_fclose_degree_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: degree - END FUNCTION h5pset_fclose_degree_c - END INTERFACE - - hdferr = h5pset_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pset_fclose_degree_f - -!****s* H5P/h5pequal_f -! NAME -! h5pequal_f -! -! PURPOSE -! Checks if two property lists are eqaul -! -! INPUTS -! -! plist1_id - property list identifier -! plist2_id - property list identifier -! OUTPUTS -! -! flag - flag, possible values -! .TRUE. or .FALSE. -! hdferr: - error code -! Success: 0 -! Failure: -1, flag is set to .FALSE. -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! Flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) & - BIND(C,NAME='h5pequal_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id - INTEGER(HID_T), INTENT(IN) :: plist2_id - INTEGER, INTENT(OUT) :: c_flag - END FUNCTION h5pequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) - IF (c_flag .GT. 0) flag = .TRUE. - END SUBROUTINE h5pequal_f - -!****s* H5P/h5pset_buffer_f -! NAME -! h5pset_buffer_f -! -! PURPOSE -! Sets sixe for conversion buffer -! -! INPUTS -! plist_id - data transfer property list identifier -! size - buffer size -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_buffer_c(plist_id, size) & - BIND(C,NAME='h5pset_buffer_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_buffer_c - END INTERFACE - - hdferr = h5pset_buffer_c(plist_id, size) - END SUBROUTINE h5pset_buffer_f - -!****s* H5P/h5pget_buffer_f -! NAME -! h5pget_buffer_f -! -! PURPOSE -! Gets size for conversion buffer -! -! INPUTS -! -! plist_id - data transfer property list identifier -! OUTPUTS -! -! size - buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_buffer_c(plist_id, size) & - BIND(C,NAME='h5pget_buffer_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_buffer_c - END INTERFACE - - hdferr = h5pget_buffer_c(plist_id, size) - END SUBROUTINE h5pget_buffer_f - -!****s* H5P/h5pfill_value_defined_f -! NAME -! h5pfill_value_defined_f -! -! PURPOSE -! Check if fill value is defined. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - fill value status flag -! Possible values are: -! H5D_FILL_VALUE_ERROR_F -! H5D_FILL_VALUE_UNDEFINED_F -! H5D_FILL_VALUE_DEFAULT_F -! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill value status flag - ! H5D_FILL_VALUE_ERROR_F - ! H5D_FILL_VALUE_UNDEFINED_F - ! H5D_FILL_VALUE_DEFAULT_F - ! H5D_FILL_VALUE_USER_DEFINED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) & - BIND(C,NAME='h5pfill_value_defined_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pfill_value_defined_c - END INTERFACE - - hdferr = h5pfill_value_defined_c(plist_id, flag) - END SUBROUTINE h5pfill_value_defined_f - -!****s* H5P/h5pset_alloc_time_f -! NAME -! h5pset_alloc_time_f -! -! PURPOSE -! Set space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) & - BIND(C,NAME='h5pset_alloc_time_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_alloc_time_c - END INTERFACE - - hdferr = h5pset_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pset_alloc_time_f - -!****s* H5P/h5pget_alloc_time_f -! NAME -! h5pget_alloc_time_f -! -! PURPOSE -! Get space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) & - BIND(C,NAME='h5pget_alloc_time_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_alloc_time_c - END INTERFACE - - hdferr = h5pget_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pget_alloc_time_f - -!****s* H5P/h5pset_fill_time_f -! NAME -! h5pset_fill_time_f -! -! PURPOSE -! Set fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) & - BIND(C,NAME='h5pset_fill_time_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fill_time_c - END INTERFACE - - hdferr = h5pset_fill_time_c(plist_id, flag) - END SUBROUTINE h5pset_fill_time_f - -!****s* H5P/h5pget_fill_time_f -! NAME -! h5pget_fill_time_f -! -! PURPOSE -! Get fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) & - BIND(C,NAME='h5pget_fill_time_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fill_time_c - END INTERFACE - - hdferr = h5pget_fill_time_c(plist_id, flag) - END SUBROUTINE h5pget_fill_time_f - -!****s* H5P/ h5pset_meta_block_size_f -! NAME -! h5pset_meta_block_size_f -! -! PURPOSE -! Sets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! size - metatdata block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) & - BIND(C,NAME='h5pset_meta_block_size_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_meta_block_size_c - END INTERFACE - - hdferr = h5pset_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pset_meta_block_size_f - -!****s* H5P/h5pget_meta_block_size_f -! NAME -! h5pget_meta_block_size_f -! -! PURPOSE -! Gets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - metatdata block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) & - BIND(C,NAME='h5pget_meta_block_size_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_meta_block_size_c - END INTERFACE - - hdferr = h5pget_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pget_meta_block_size_f - -!****s* H5P/h5pset_sieve_buf_size_f -! NAME -! h5pset_sieve_buf_size_f -! -! PURPOSE -! Sets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! size - sieve buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) & - BIND(C,NAME='h5pset_sieve_buf_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_sieve_buf_size_c - END INTERFACE - - hdferr = h5pset_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pset_sieve_buf_size_f - -!****s* H5P/h5pget_sieve_buf_size_f -! NAME -! h5pget_sieve_buf_size_f -! -! PURPOSE -! Gets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - sieve buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) & - BIND(C,NAME='h5pget_sieve_buf_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_sieve_buf_size_c - END INTERFACE - - hdferr = h5pget_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pget_sieve_buf_size_f - -!****s* H5P/h5pset_small_data_block_size_f -! NAME -! h5pset_small_data_block_size_f -! -! PURPOSE -! Sets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! size - small raw data block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) & - BIND(C,NAME='h5pset_small_data_block_size_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_small_data_block_size_c - END INTERFACE - - hdferr = h5pset_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pset_small_data_block_size_f - -!****s* H5P/h5pget_small_data_block_size_f -! NAME -! h5pget_small_data_block_size_f -! -! PURPOSE -! Gets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - small raw data block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) & - BIND(C,NAME='h5pget_small_data_block_size_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_small_data_block_size_c - END INTERFACE - - hdferr = h5pget_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pget_small_data_block_size_f - -!****s* H5P/h5pset_hyper_vector_size_f -! NAME -! h5pset_hyper_vector_size_f -! -! PURPOSE -! Set the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! size - vector size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) & - BIND(C,NAME='h5pset_hyper_vector_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_hyper_vector_size_c - END INTERFACE - - hdferr = h5pset_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pset_hyper_vector_size_f - -!****s* H5P/ h5pget_hyper_vector_size_f -! NAME -! h5pget_hyper_vector_size_f -! -! PURPOSE -! Get the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! OUTPUTS -! -! size - vector size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) & - BIND(C,NAME='h5pget_hyper_vector_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_hyper_vector_size_c - END INTERFACE - - hdferr = h5pget_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pget_hyper_vector_size_f - -!****s* H5P/h5pexist_f -! NAME -! h5pexist_f -! -! PURPOSE -! Queries whether a property name exists in a property list or class. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to check for -! OUTPUTS -! -! flag - logical flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) & - BIND(C,NAME='h5pexist_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pexist_c - END INTERFACE - flag = .FALSE. - name_len = LEN(name) - hdferr = h5pexist_c(prp_id, name , name_len) - IF (hdferr > 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pexist_f - -!****s* H5P/h5pget_size_f -! -! NAME -! h5pget_size_f -! -! PURPOSE -! Queries the size of a property value in bytes. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to query -! OUTPUTS -! -! size - size of property in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) & - BIND(C,NAME='h5pget_size_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_size_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pget_size_c(prp_id, name , name_len, size) - END SUBROUTINE h5pget_size_f - -!****s* H5P/h5pget_npros_f -! NAME -! h5pget_npros_f -! -! PURPOSE -! Queries number of properties in property list or class -! -! INPUTS -! -! prp_id - iproperty list identifier to query -! OUTPUTS -! -! nprops - number of properties in property object -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) & - BIND(C,NAME='h5pget_nprops_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: nprops - END FUNCTION h5pget_nprops_c - END INTERFACE - hdferr = h5pget_nprops_c(prp_id, nprops) - END SUBROUTINE h5pget_nprops_f - -!****s* H5P/h5pget_class_name_f -! NAME -! h5pget_class_name_f -! -! PURPOSE -! Queries the name of a class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! name - name of a class -! size - Actual length of the class name -! NOTE: If provided buffer "name" is smaller, -! than name will be truncated to fit into -! provided user buffer. -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Returned the size of name as an argument -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name - INTEGER, INTENT(OUT) :: size ! Actual length of the class name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) & - BIND(C,NAME='h5pget_class_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pget_class_name_c - END INTERFACE - - name_len = LEN(name) - size = h5pget_class_name_c(prp_id, name, name_len) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE h5pget_class_name_f - -!****s* H5P/h5pget_class_parent_f -! NAME -! h5pget_class_parent_f -! -! PURPOSE -! Retrieves the parent class of a genric property class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! parent_id - identifier of the parent class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) & - BIND(C,NAME='h5pget_class_parent_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: parent_id - END FUNCTION h5pget_class_parent_c - END INTERFACE - hdferr = h5pget_class_parent_c(prp_id, parent_id) - END SUBROUTINE h5pget_class_parent_f - -!****s* H5P/h5pisa_class_f -! NAME -! h5pisa_class_f -! -! PURPOSE -! Determines whether a property list is a member of a class. -! -! INPUTS -! -! plist - property list identifier -! pclass - identifier of the property class -! OUTPUTS -! -! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier - LOGICAL, INTENT(OUT) :: flag ! logical flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pisa_class_c(plist, pclass) & - BIND(C,NAME='h5pisa_class_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist - INTEGER(HID_T), INTENT(IN) :: pclass - END FUNCTION h5pisa_class_c - END INTERFACE - flag = .FALSE. - hdferr = h5pisa_class_c(plist, pclass) - IF (hdferr .GT. 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pisa_class_f - -!****s* H5P/h5pcopy_prop_f -! NAME -! h5pcopy_prop_f -! -! PURPOSE -! Copies a property from one list or class to another. -! -! INPUTS -! -! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list -! name - name of the property to copy -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Property name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) & - BIND(C,NAME='h5pcopy_prop_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER(HID_T), INTENT(IN) :: src_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pcopy_prop_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) - END SUBROUTINE h5pcopy_prop_f - -!****s* H5P/h5premove_f -! NAME -! h5premove_f -! -! PURPOSE -! Removes a property from a property list. - -! -! INPUTS -! -! plid - Property list identofoer -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5premove_f(plid, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5premove_c(plid, name, name_len) & - BIND(C,NAME='h5premove_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5premove_c - END INTERFACE - name_len = LEN(name) - hdferr = h5premove_c(plid, name , name_len) - END SUBROUTINE h5premove_f - -!****s* H5P/h5punregister_f -! NAME -! h5punregister_f -! -! PURPOSE -! Removes a property from a property list class. -! -! INPUTS -! -! class - Property list class identifier -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5punregister_f(class, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5punregister_c(class, name, name_len) & - BIND(C,NAME='h5punregister_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5punregister_c - END INTERFACE - name_len = LEN(name) - hdferr = h5punregister_c(class, name , name_len) - END SUBROUTINE h5punregister_f - -!****s* H5P/h5pclose_class_f -! NAME -! h5pclose_class_f -! -! PURPOSE -! Closes an existing property list class. -! -! INPUTS -! -! class - Property list class identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_class_f(class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pclose_class_c(class) & - BIND(C,NAME='h5pclose_class_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - END FUNCTION h5pclose_class_c - END INTERFACE - hdferr = h5pclose_class_c(class) - END SUBROUTINE h5pclose_class_f - -!****s* H5P/h5pset_shuffle_f -! NAME -! h5pset_shuffle_f -! -! PURPOSE -! Sets shuffling filter -! -! INPUTS -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_shuffle_c(prp_id) & - BIND(C,NAME='h5pset_shuffle_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_shuffle_c - END INTERFACE - hdferr = h5pset_shuffle_c(prp_id) - - END SUBROUTINE h5pset_shuffle_f - -!****s* H5P/h5pset_edc_check_f -! NAME -! h5pset_edc_check_f -! -! PURPOSE -! Enables/disables error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! flag - EDC flag; possible values: -! H5Z_DISABLE_EDC_F -! H5Z_ENABLE_EDC_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: flag ! Checksum filter flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) & - BIND(C,NAME='h5pset_edc_check_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_edc_check_c - END INTERFACE - hdferr = h5pset_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pset_edc_check_f - -!****s* H5P/h5pget_edc_check_f -! NAME -! h5pget_edc_check_f -! -! PURPOSE -! Queries error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier - INTEGER, INTENT(OUT) :: flag ! Checksum filter flag - ! May have one of the following values: - ! H5Z_ERROR_EDC_F - ! H5Z_DISABLE_EDC_F - ! H5Z_ENABLE_EDC_F - ! H5Z_NO_EDC_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) & - BIND(C,NAME='h5pget_edc_check_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_edc_check_c - END INTERFACE - hdferr = h5pget_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pget_edc_check_f - -!****s* H5P/h5pset_fletcher32_f -! NAME -! h5pset_fletcher32_f -! -! PURPOSE -! Sets Fletcher32 checksum of EDC for a dataset creation -! property list. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fletcher32_c(prp_id) & - BIND(C,NAME='h5pset_fletcher32_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fletcher32_c - END INTERFACE - hdferr = h5pset_fletcher32_c(prp_id) - - END SUBROUTINE h5pset_fletcher32_f - -!****s* H5P/ h5pset_family_offset_f -! NAME -! h5pset_family_offset_f -! -! PURPOSE -! Sets offset for family file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! offset - file offset -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 19 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) & - BIND(C,NAME='h5pset_family_offset_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset - END FUNCTION h5pset_family_offset_c - END INTERFACE - hdferr = h5pset_family_offset_c(prp_id, offset) - - END SUBROUTINE h5pset_family_offset_f - -!****s* H5P/h5pset_fapl_multi_l -! NAME -! h5pset_fapl_multi_l -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 20 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: flag = 0 - INTEGER :: i - - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag) & - BIND(C,NAME='h5pset_fapl_multi_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - IF(relax) flag = 1 - hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) - - END SUBROUTINE h5pset_fapl_multi_l -!****s* H5P/h5pset_fapl_multi_s -! NAME -! h5pset_fapl_multi_s -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 31 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag - - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) & - BIND(C,NAME='h5pset_fapl_multi_sc') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_sc - END INTERFACE - flag = 0 - IF (relax) flag = 1 - hdferr = h5pset_fapl_multi_sc(prp_id, flag) - - END SUBROUTINE h5pset_fapl_multi_s -!****s* H5P/h5pget_fapl_multi_f -! NAME -! h5pget_fapl_multi_f -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! maxlen_out - maximum length for memb_name array element -! -! AUTHOR -! Elena Pourmal -! 24 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out - LOGICAL, INTENT(OUT) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER :: flag - INTEGER :: i -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag, c_maxlen_out) & - BIND(C,NAME='h5pget_fapl_multi_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) - - relax = .TRUE. - IF(flag .EQ. 0) relax = .FALSE. - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - END SUBROUTINE h5pget_fapl_multi_f -!****s* H5P/h5pset_szip_f -! NAME -! h5pset_szip_f -! -! PURPOSE -! Sets up use of szip compression -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! options_mask - A bit-mask conveying the desired SZIP options. -! Current valid values in Fortran are: -! H5_SZIP_EC_OM_F -! H5_SZIP_NN_OM_F -! pixels_per_block - szip parameters -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired - ! SZIP options - ! Current valid values in Fortran are: - ! H5_SZIP_EC_OM_F - ! H5_SZIP_NN_OM_F - INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements - ! in each data block - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) & - BIND(C,NAME='h5pset_szip_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: options_mask - INTEGER, INTENT(IN) :: pixels_per_block - END FUNCTION h5pset_szip_c - END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) - - END SUBROUTINE h5pset_szip_f - -!****s* H5P/h5pall_filters_avail_f -! NAME -! h5pall_filters_avail_f -! -! PURPOSE -! Checks if all filters set in the dataset creation -! property list are available -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! flag - .TRUE. if all filters are available -! .FALSE. otherwise -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available - ! .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status - - INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) & - BIND(C,NAME='h5pall_filters_avail_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pall_filters_avail_c - END INTERFACE - flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) - IF (status .EQ. 0 ) flag = .FALSE. - - END SUBROUTINE h5pall_filters_avail_f - -!****s* H5P/h5pget_filter_by_id_f -! NAME -! h5pget_filter_by_id_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! filter_id - filter identifier -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_id ! Filter identifier - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) & - BIND(C,NAME='h5pget_filter_by_id_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - END FUNCTION h5pget_filter_by_id_c - END INTERFACE - - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - END SUBROUTINE h5pget_filter_by_id_f - -!****s* H5P/h5pmodify_filter_f -! NAME -! h5pmodify_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be modified -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be modified - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & - BIND(C,NAME='h5pmodify_filter_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pmodify_filter_c - END INTERFACE - - hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pmodify_filter_f - -!****s* H5P/h5premove_filter_f -! NAME -! h5premove_filter_f -! -! PURPOSE -! Delete one or more filters from the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be removed -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Quincey Koziol -! January 27 2004 -! -! Fortran90 Interface: - SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list - ! identifier - INTEGER, INTENT(IN) :: filter ! Filter to be removed - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5premove_filter_c(prp_id, filter) & - BIND(C,NAME='h5premove_filter_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - END FUNCTION h5premove_filter_c - END INTERFACE - - hdferr = h5premove_filter_c(prp_id, filter) - END SUBROUTINE h5premove_filter_f - -!****s* H5P/H5Pget_attr_phase_change_f -! NAME -! H5Pget_attr_phase_change_f -! -! PURPOSE -! Retrieves attribute storage phase change thresholds -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - ! (Default: 8) - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) & - BIND(C,NAME='h5pget_attr_phase_change_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_attr_phase_change_c - END INTERFACE - - hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_attr_phase_change_f - -!****s* H5P/H5Pset_attr_creation_order_f -! NAME -! H5Pset_attr_creation_order_f -! -! PURPOSE -! Sets tracking and indexing of attribute creation order -! -! INPUTS -! -! ocpl_id - Object creation property list identifier -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) & - BIND(C,NAME='h5pset_attr_creation_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5Pset_attr_creation_order_c - END INTERFACE - - hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - END SUBROUTINE h5pset_attr_creation_order_f - -!****s* H5P/H5Pset_shared_mesg_nindexes_f -! NAME -! H5Pset_shared_mesg_nindexes_f -! -! PURPOSE -! Sets number of shared object header message indexes -! -! INPUTS -! -! plist_id - file creation property list -! nindexes - Number of shared object header message indexes to be available in files created with this property list -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes - ! available in files created WITH this property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) & - BIND(C,NAME='h5pset_shared_mesg_nindexes_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: nindexes - - END FUNCTION H5pset_shared_mesg_nindexes_c - END INTERFACE - - hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - - END SUBROUTINE h5pset_shared_mesg_nindexes_f - -!****s* H5P/H5Pset_shared_mesg_index_f -! NAME -! H5Pset_shared_mesg_index_f -! -! PURPOSE -! Configures the specified shared object header message index -! -! INPUTS -! -! fcpl_id - File creation property list identifier. -! index_num - Index being configured. -! mesg_type_flags - Types of messages that should be stored in this index. -! min_mesg_size - Minimum message size. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list - INTEGER, INTENT(IN) :: index_num ! Index being configured. - INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. - INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) & - BIND(C,NAME='h5pset_shared_mesg_index_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id - INTEGER, INTENT(IN) :: index_num - INTEGER, INTENT(IN) :: mesg_type_flags - INTEGER, INTENT(IN) :: min_mesg_size - END FUNCTION H5pset_shared_mesg_index_c - END INTERFACE - - hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - END SUBROUTINE h5pset_shared_mesg_index_f - -!****s* H5P/H5Pget_attr_creation_order_f -! NAME -! H5Pget_attr_creation_order_f -! -! PURPOSE -! Retrieves tracking and indexing settings for attribute creation order -! -! INPUTS -! -! ocpl_id - Object (group or dataset) creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) & - BIND(C,NAME='h5pget_attr_creation_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - END FUNCTION H5pget_attr_creation_order_c - END INTERFACE - - hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - END SUBROUTINE h5pget_attr_creation_order_f - -!****s* H5P/H5Pset_libver_bounds_f -! NAME -! H5Pset_libver_bounds_f -! -! PURPOSE -! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. -! -! INPUTS -! -! fapl_id - File access property list identifier -! low - The earliest version of the library that will be used for writing objects. -! high - The latest version of the library that will be used for writing objects. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. - ! Currently, low must be one of two pre-defined values: - ! HDF_LIBVER_EARLIEST_F - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - ! Currently, low must set to the pre-defined value: - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) & - BIND(C,NAME='h5pset_libver_bounds_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: low - INTEGER, INTENT(IN) :: high - - END FUNCTION H5pset_libver_bounds_c - END INTERFACE - - hdferr = h5pset_libver_bounds_c(fapl_id, low, high) - - END SUBROUTINE h5pset_libver_bounds_f - -!****s* H5P/H5Pset_link_creation_order_f -! NAME -! H5Pset_link_creation_order_f -! -! PURPOSE -! Sets creation order tracking and indexing for links in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! crt_order_flags - Creation order flag(s) -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) & - BIND(C,NAME='h5pset_link_creation_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5pset_link_creation_order_c - END INTERFACE - - hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pset_link_creation_order_f - -!****s* H5P/H5Pget_link_phase_change_f -! NAME -! H5Pget_link_phase_change_f -! -! PURPOSE -! Queries the settings for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) & - BIND(C,NAME='h5pget_link_phase_change_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_link_phase_change_c - END INTERFACE - - hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_link_phase_change_f - -!****s* H5P/H5Pget_obj_track_times_f -! NAME -! H5Pget_obj_track_times_f -! -! PURPOSE -! Returns whether times are tracked for an object. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) & - BIND(C,NAME='h5pget_obj_track_times_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pget_obj_track_times_c - END INTERFACE - flag = .TRUE. - hdferr = h5pget_obj_track_times_c(plist_id, status) - IF(status.EQ.0) flag = .FALSE. - - END SUBROUTINE h5pget_obj_track_times_f - -!****s* H5P/H5Pset_obj_track_times_f -! NAME -! H5Pset_obj_track_times_f -! -! PURPOSE -! Set whether the birth, access, modification & change times for -! an object are stored. -! -! Birth time is the time the object was created. Access time is -! the last time that metadata or raw data was read from this -! object. Modification time is the last time the data for -! this object was changed (either writing raw data to a dataset -! or inserting/modifying/deleting a link in a group). Change -! time is the last time the metadata for this object was written -! (adding/modifying/deleting an attribute on an object, extending -! the size of a dataset, etc). -! -! If these times are not tracked, they will be reported as -! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX -! epoch) when queried. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(IN) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) & - BIND(C,NAME='h5pset_obj_track_times_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(IN) :: status - END FUNCTION h5pset_obj_track_times_c - END INTERFACE - - status = 0 - IF(flag) status = 1 - - hdferr = h5pset_obj_track_times_c(plist_id, status) - - END SUBROUTINE h5pset_obj_track_times_f - -!****s* H5P/H5Pset_create_inter_group_f -! NAME -! H5Pset_create_inter_group_f -! -! PURPOSE -! Specifies in property list whether to create missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation -! of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! HISTORY -! The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name -! Fortran90 Interface: - SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups - ! upon the creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) & - BIND(C,NAME='h5pset_create_inter_group_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pset_create_inter_group_c - END INTERFACE - - hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pset_create_inter_group_f - -!****s* H5P/H5Pget_link_creation_order_f -! NAME -! H5Pget_link_creation_order_f -! -! PURPOSE -! Queries whether link creation order is tracked and/or indexed in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Creation order flag(s) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) & - BIND(C,NAME='h5pget_link_creation_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_link_creation_order_c - END INTERFACE - - hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pget_link_creation_order_f - -!****s* H5P/H5Pset_char_encoding_f -! NAME -! H5Pset_char_encoding_f -! -! PURPOSE -! Sets the character encoding used to encode a string. -! -! INPUTS -! -! plist_id - Property list identifier -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - INTEGER, INTENT(IN) :: encoding ! String encoding character set: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) & - BIND(C,NAME='h5pset_char_encoding_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: encoding - - END FUNCTION H5pset_char_encoding_c - END INTERFACE - - hdferr = h5pset_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pset_char_encoding_f - -!****s* H5P/H5Pget_char_encoding_f -! NAME -! H5Pget_char_encoding_f -! -! PURPOSE -! Retrieves the character encoding used to create a string -! -! INPUTS -! -! plist_id - Property list identifier -! -! OUTPUTS -! -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - - INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) & - BIND(C,NAME='h5pget_char_encoding_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: encoding - - END FUNCTION H5pget_char_encoding_c - END INTERFACE - - hdferr = h5pget_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pget_char_encoding_f - -!****s* H5P/h5pset_copy_object_f -! NAME -! h5pset_copy_object_f -! -! PURPOSE -! Sets properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! copy_options - Copy option(s) to be set -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) & - BIND(C,NAME='h5pset_copy_object_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(IN) :: copy_options - END FUNCTION h5pset_copy_object_c - END INTERFACE - hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pset_copy_object_f - -!****s* H5P/h5pget_copy_object_f -! NAME -! h5pget_copy_object_f -! -! PURPOSE -! Retrieves the properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! OUTPUTS -! -! copy_options - Copy option(s) to be get -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) & - BIND(C,NAME='h5pget_copy_object_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(OUT) :: copy_options - END FUNCTION h5pget_copy_object_c - END INTERFACE - hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pget_copy_object_f - -!****s* H5P/h5pget_data_transform_f -! NAME -! h5pget_data_transform_f -! -! PURPOSE -! Retrieves a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! OUTPUTS -! -! expression - buffer to hold transform expression -! hdferr - Error code -! Success: Actual lenght of the expression -! If provided buffer "expression" is -! smaller, than expression will be -! truncated to fit into -! provided user buffer -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! HISTORY -! -! Should hdferr return just 0 or 1 and add another arguement for the size? -! Fortran90 Interface: -SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) & - BIND(C,NAME='h5pget_data_transform_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: expression - INTEGER(SIZE_T) :: size_default - INTEGER :: expression_len - END FUNCTION h5pget_data_transform_c - END INTERFACE - - size_default = 0 - expression_len = LEN(expression) - - hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - - IF(present(size)) size = size_default - - END SUBROUTINE h5pget_data_transform_f - -!****s* H5P/h5pset_data_transform_f -! NAME -! h5pset_data_transform_f -! -! PURPOSE -! Sets a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! expression - Buffer to hold transform expression -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - - INTERFACE - INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) & - BIND(C,NAME='h5pset_data_transform_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: expression - INTEGER :: expression_len - END FUNCTION h5pset_data_transform_c - END INTERFACE - - expression_len = LEN(expression) - hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) - - END SUBROUTINE h5pset_data_transform_f - -!****s* H5P/H5Pget_local_heap_size_hint_f -! NAME -! H5Pget_local_heap_size_hint_f -! -! PURPOSE -! Queries the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! size_hint - Hint for size of local heap -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) & - BIND(C,NAME='h5pget_local_heap_size_hint_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(OUT) :: size_hint - END FUNCTION H5Pget_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pget_local_heap_size_hint_f - -!****s* H5P/H5Pget_est_link_info_f -! NAME -! H5Pget_est_link_info_f -! -! PURPOSE -! Queries data required to estimate required local heap or object header size. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & - BIND(C,NAME='h5pget_est_link_info_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: est_num_entries - INTEGER, INTENT(OUT) :: est_name_len - END FUNCTION h5pget_est_link_info_c - END INTERFACE - - hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pget_est_link_info_f - -!****s* H5P/H5Pset_local_heap_size_hint_f -! NAME -! H5Pset_local_heap_size_hint_f -! -! PURPOSE -! Sets the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! size_hint - Hint for size of local heap -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) & - BIND(C,NAME='h5pset_local_heap_size_hint_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(IN) :: size_hint - END FUNCTION h5pset_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pset_local_heap_size_hint_f - -!****s* H5P/h5pset_est_link_info_f -! NAME -! h5pset_est_link_info_f -! -! PURPOSE -! Sets estimated number of links and length of link names in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & - BIND(C,NAME='h5pset_est_link_info_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: est_num_entries - INTEGER, INTENT(IN) :: est_name_len - END FUNCTION h5pset_est_link_info_c - END INTERFACE - - hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pset_est_link_info_f - -!****s* H5P/h5pset_link_phase_change_f -! NAME -! h5pset_link_phase_change_f -! -! PURPOSE -! Sets the parameters for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) & - BIND(C,NAME='h5pset_link_phase_change_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - END FUNCTION h5pset_link_phase_change_c - END INTERFACE - - hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pset_link_phase_change_f - -!****s* H5P/h5pset_fapl_direct_f -! NAME -! h5pset_fapl_direct_f -! -! PURPOSE -! Sets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & - BIND(C,NAME='h5pset_fapl_direct_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(IN) :: alignment - INTEGER(SIZE_T), INTENT(IN) :: block_size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size - END FUNCTION h5pset_fapl_direct_c - END INTERFACE - - hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pset_fapl_direct_f - -!****s* H5P/h5pget_fapl_direct_f -! NAME -! h5pget_fapl_direct_f -! -! PURPOSE -! Gets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & - BIND(C,NAME='h5pget_fapl_direct_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(OUT) :: alignment - INTEGER(SIZE_T), INTENT(OUT) :: block_size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size - END FUNCTION h5pget_fapl_direct_c - END INTERFACE - - hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pget_fapl_direct_f - -!****s* H5P/H5Pset_attr_phase_change_f -! NAME -! H5Pset_attr_phase_change_f -! -! PURPOSE -! Sets attribute storage phase change thresholds. -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - !(Default: 8) - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) & - BIND(C,NAME='h5pset_attr_phase_change_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_attr_phase_change_c - END INTERFACE - - hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - - - END SUBROUTINE h5pset_attr_phase_change_f - -!****s* H5P/H5Pset_nbit_f -! NAME -! H5Pset_nbit_f -! -! PURPOSE -! Sets up the use of the N-Bit filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_nbit_f(plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION H5Pset_nbit_c(plist_id) & - BIND(C,NAME='h5pset_nbit_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - END FUNCTION H5Pset_nbit_c - END INTERFACE - - hdferr = H5Pset_nbit_c(plist_id) - - END SUBROUTINE h5pset_nbit_f - -!****s* H5P/h5pset_scaleoffset_f -! NAME -! h5pset_scaleoffset_f -! -! PURPOSE -! Sets up the use of the scale-offset filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! scale_type - Flag indicating compression method. Valid values: -! H5Z_SO_FLOAT_DSCALE_F -! H5Z_SO_FLOAT_ESCALE_F -! H5Z_SO_INT_F -! -! scale_factor - Parameter related to scale. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(IN) :: scale_type - INTEGER , INTENT(IN) :: scale_factor - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) & - BIND(C,NAME='h5pset_scaleoffset_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: scale_type - INTEGER, INTENT(IN) :: scale_factor - END FUNCTION h5pset_scaleoffset_c - END INTERFACE - - hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) - - END SUBROUTINE h5pset_scaleoffset_f - -!****s* H5P/h5pset_nlinks_f -! NAME -! h5pset_nlinks_f -! -! PURPOSE -! Sets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) & - BIND(C,NAME='h5pset_nlinks_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(IN) :: nlinks - END FUNCTION h5pset_nlinks_c - END INTERFACE - - hdferr = h5pset_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pset_nlinks_f - -!****s* H5P/h5pget_nlinks_f -! NAME -! h5pget_nlinks_f -! -! PURPOSE -! Gets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) & - BIND(C,NAME='h5pget_nlinks_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(OUT) :: nlinks - END FUNCTION h5pget_nlinks_c - END INTERFACE - - hdferr = h5pget_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pget_nlinks_f - -!****s* H5P/H5Pget_create_inter_group_f -! NAME -! H5Pget_create_inter_group_f -! -! PURPOSE -! Determines whether property is set to enable creating missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon -! the creation of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 4, 2008 -! -! HISTORY -! -! The long subroutine name (>31) on older f90 compilers causes problems -! so the name was shortened -! Fortran90 Interface: - SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups - ! upon creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) & - BIND(C,NAME='h5pget_create_inter_group_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pget_create_inter_group_c - END INTERFACE - - hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pget_create_inter_group_f - -!****s* H5P/H5Pset_chunk_cache_f -! NAME -! H5Pset_chunk_cache_f -! -! PURPOSE -! Set the number of objects in the meta data cache and the -! maximum number of chunks and bytes in the raw data chunk cache. -! Once set, these values will override the values in the file access -! property list. Each of these values can be individually unset -! (or not set at all) by passing the macros: -! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, -! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or -! H5D_CHUNK_CACHE_W0_DFLT_F -! as appropriate. -! -! The RDCC_W0 value should be between 0 and 1 inclusive and -! indicates how much chunks that have been fully read or fully -! written are favored for preemption. A value of zero means -! fully read or written chunks are treated no differently than -! other chunks (the preemption is strictly LRU) while a value -! of one means fully read chunks are always preempted before -! other chunks. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. -! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. -! rdcc_w0 - The chunk preemption policy for this dataset. -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data - ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache - ! for this dataset. - REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & - BIND(C,NAME='h5pset_chunk_cache_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_chunk_cache_c - END INTERFACE - - hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pset_chunk_cache_f - -!****s* H5P/H5Pget_chunk_cache_f -! NAME -! H5Pget_chunk_cache_f -! -! PURPOSE -! Retrieves the maximum possible number of elements in the meta -! data cache and the maximum possible number of elements and -! bytes and the RDCC_W0 value in the raw data chunk cache. Any -! (or all) arguments may be null pointers in which case the -! corresponding datum is not returned. If these properties have -! not been set on this property list, the default values for a -! file access property list are returned. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! OUTPUTS -! -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & - BIND(C,NAME='h5pget_chunk_cache_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_chunk_cache_c - END INTERFACE - - hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pget_chunk_cache_f - -! -!****s* H5P (F03)/h5pset_fill_value_f_F90 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! IMPLICIT NONE -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_integer -! -!****s* H5P (F03)/h5pget_fill_value_f_F90 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_integer - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr ! C address - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(fillvalue) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - f_ptr = C_LOC(chr(1)(1:1)) - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - DO i = 1, chr_len - fillvalue(i:i) = chr(i) - ENDDO - DEALLOCATE(chr) - - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F03)/h5pset_fill_value_f_F03 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pset_fill_value_ptr - -! -!****s* H5P (F03)/h5pget_fill_value_f_F03 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pget_fill_value_ptr - -! -!****s* H5P (F03)/h5pset_f_F90 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_integer - - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pset_char -! -!****s* H5P (F03)/h5pget_f_F90 -! -! NAME -! h5pget_f -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pget_integer - - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - TYPE(C_PTR) :: f_ptr - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DO i = 1, chr_len - value(i:i) = chr(i) - ENDDO - - DEALLOCATE(chr) - - END SUBROUTINE h5pget_char - -! -!****s* H5P (F03)/h5pset_f_F03 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Pointer to value to set the property to -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pset_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pset_ptr -! -!****s* H5P (F03)/h5pget_f_F03 -! -! NAME -! h5pget_f (F03) -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Pointer to a location to which to copy the value of of the property -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pget_ptr -! -!****s* H5P (F03)/h5pregister_f_F90 -! -! NAME -! h5pregister -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_integer - - - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - DEALLOCATE(chr) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F03)/h5pregister_f_F03 -! -! NAME -! h5pregister (F03) -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Pointer to value to set the property to -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, value) - END SUBROUTINE h5pregister_ptr - -! -!****s* H5P (F03)/h5pinsert_f_F90 -! -! NAME -! h5pinsert (f90) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_integer - - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(c_ptr) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F03)/h5pinsert_f_F03 -! -! NAME -! h5pinsert (f03) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Pointer to new value pointer for the property being modified -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - TYPE(c_ptr), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_ptr -! -!****s* H5P (F03)/h5pcreate_class_f_F03 -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! Inputs: -! parent - Parent property list class identifier -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - Name of property to create -! -! Outputs: -! class - Property list class identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! H5P_cls_create_func_t (create) - Callback routine called when a property list is created -! create_data - User pointer to any class creation information needed -! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied -! copy_data - User pointer to any class copy information needed -! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed -! close_data - User pointer to any class close information needed -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Added callback arguments -! M. Scot Breitenfeld, July 3, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, & - copy, copy_data, CLOSE, close_data) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: class - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data - TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close -!***** - INTEGER :: name_len - TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default - TYPE(C_FUNPTR) :: create_default, copy_default, close_default - INTERFACE - INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & - create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - IMPORT :: c_char, c_ptr, c_funptr - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - TYPE(C_PTR), VALUE :: create_data, copy_data, close_data - TYPE(C_FUNPTR), VALUE :: create, copy, close - END FUNCTION h5pcreate_class_c - END INTERFACE - name_len = LEN(name) - - create_default = c_null_funptr !fix:scot - create_data_default = c_null_ptr - copy_default = c_null_funptr !fix:scot - copy_data_default = c_null_ptr - close_default = c_null_funptr !fix:scot - close_data_default = c_null_ptr - - IF(PRESENT(create)) create_default = create - IF(PRESENT(create_data)) create_data_default = create_data - IF(PRESENT(copy)) copy_default = copy - IF(PRESENT(copy_data)) copy_data_default = copy_data - IF(PRESENT(close)) close_default = close - IF(PRESENT(close_data)) close_data_default = close_data - - hdferr = h5pcreate_class_c(parent, name , name_len, class, & - create_default, create_data_default, & - copy_default, copy_data_default, & - close_default, close_data_default) - - END SUBROUTINE h5pcreate_class_f - -! -!****s* H5P (F03)/h5pset_file_image_f_F03 -! -! NAME -! h5pset_file_image_f -! -! PURPOSE -! Sets an initial file image in a memory buffer. -! -! Inputs: -! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, -! or C_NULL_PTR if no initial file image is desired -! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(IN) :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & - BIND(C, NAME='h5pset_file_image_c') - IMPORT :: c_ptr - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - END FUNCTION h5pset_file_image_c - END INTERFACE - - hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) - - END SUBROUTINE h5pset_file_image_f -! -!****s* H5P (F03)/h5pget_file_image_f_F03 -! -! NAME -! h5pget_file_image_f -! -! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. -! -! Inputs: -! fapl_id - File access property list identifier. -! -! Outputs: -! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type -! c_loc. If buf_ptr is not C_NULL_PTR, on successful -! return, buf_ptr shall contain a C pointer to a copy -! of the initial image provided in the last call to -! H5Pset_file_image_f for the supplied fapl_id, or -! buf_ptr shall contain a C_NULL_PTR if there is no -! initial image set. -! -! buf_len_ptr - Contains the value of the buffer parameter for -! the initial image in the supplied fapl_id. The value -! will be 0 if no initial image is set. -! -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - INTEGER , INTENT(OUT) :: hdferr - -!***** - INTERFACE - INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & - BIND(C, NAME='h5pget_file_image_c') - IMPORT :: c_ptr - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - END FUNCTION h5pget_file_image_c - END INTERFACE - - hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) - - END SUBROUTINE h5pget_file_image_f - -! ********************************************************************* -! Fortran interfaces for H5P functions needed by parallel MPI programs. -! ********************************************************************* - -#ifdef H5_HAVE_PARALLEL -!****s* H5P/h5pset_fapl_mpio_f -! -! NAME -! h5pset_fapl_mpio_f -! -! PURPOSE -! Stores MPI IO communicator information to the file -! access property list. -! -! INPUTS -! prp_id - file access property list identifier -! comm - MPI-2 communicator -! info - MPI-2 info object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pset_fapl_mpio_c(prp_id, comm, info) & - BIND(C,NAME='h5pset_fapl_mpio_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER , INTENT(IN) :: comm - INTEGER , INTENT(IN) :: info - END FUNCTION h5pset_fapl_mpio_c - END INTERFACE - - hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) - - END SUBROUTINE h5pset_fapl_mpio_f - -!****s* H5P/h5pget_fapl_mpio_f -! -! NAME -! h5pget_fapl_mpio_f -! -! PURPOSE -! Returns MPI communicator information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! comm - MPI-2 communicator -! info - MPI-2 info object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pget_fapl_mpio_c(prp_id, comm, info) & - BIND(C,NAME='h5pget_fapl_mpio_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER , INTENT(OUT) :: comm - INTEGER , INTENT(OUT) :: info - END FUNCTION h5pget_fapl_mpio_c - END INTERFACE - - hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) - - END SUBROUTINE h5pget_fapl_mpio_f - -!****s* H5P/h5pset_dxpl_mpio_f -! -! NAME -! h5pset_dxpl_mpio_f -! -! PURPOSE -! Sets data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! data_xfer_mode - transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) & - BIND(C,NAME='h5pset_dxpl_mpio_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER , INTENT(IN) :: data_xfer_mode - END FUNCTION h5pset_dxpl_mpio_c - END INTERFACE - - hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pset_dxpl_mpio_f - -!****s* H5P/h5pget_dxpl_mpio_f -! -! NAME -! h5pget_dxpl_mpio_f -! -! PURPOSE -! Returns the data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! OUTPUTS -! data_xfer_mode- transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) & - BIND(C,NAME='h5pget_dxpl_mpio_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER , INTENT(OUT) :: data_xfer_mode - END FUNCTION h5pget_dxpl_mpio_c - END INTERFACE - - hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pget_dxpl_mpio_f - -!****s* H5P/h5pget_mpio_actual_io_mode_f -! NAME -! h5pget_mpio_actual_io_mode_f -! -! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. -! -! INPUTS -! dxpl_id - Dataset transfer property list identifier. -! OUTPUTS -! actual_io_mode - The type of I/O performed by this process. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 27, 2012 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) & - BIND(C,NAME='h5pget_mpio_actual_io_mode_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - END FUNCTION h5pget_mpio_actual_io_mode_c - END INTERFACE - - actual_io_mode = -1 - - hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - - END SUBROUTINE h5pget_mpio_actual_io_mode_f -#endif - -END MODULE H5P - - - diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 new file mode 100644 index 0000000..3409f15 --- /dev/null +++ b/fortran/src/H5Pff.f90 @@ -0,0 +1,6400 @@ +!****h* ROBODoc/H5P (F90) +! +! NAME +! H5P_PROVISIONAL +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! 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 H5P 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 H5P + + USE H5GLOBAL + + INTERFACE h5pset_fapl_multi_f + MODULE PROCEDURE h5pset_fapl_multi_l + MODULE PROCEDURE h5pset_fapl_multi_s + END INTERFACE + +CONTAINS + +!****s* H5P/h5pcreate_f +! NAME +! h5pcreate_f +! +! PURPOSE +! Creates a new property as an instance of a property +! list class. +! +! INPUTS +! class - type of the property class to be created. +! Possible values are: +! H5P_OBJECT_CREATE_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_ACCESS_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! H5P_GROUP_CREATE_F +! H5P_GROUP_ACCESS_F +! H5P_DATATYPE_CREATE_F +! H5P_DATATYPE_ACCESS_F +! H5P_STRING_CREATE_F +! H5P_ATTRIBUTE_CREATE _F +! H5P_OBJECT_COPY_F +! H5P_LINK_CREATE_F +! H5P_LINK_ACCESS_F +! +! OUTPUTS +! prp_id - property list identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcreate_f(class, prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + INTEGER , INTENT(OUT) :: hdferr +!***** +! INTEGER, EXTERNAL :: h5pcreate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcreate_c(class, prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + END FUNCTION h5pcreate_c + END INTERFACE + + hdferr = h5pcreate_c(class, prp_id) + END SUBROUTINE h5pcreate_f + +!****s* H5P/h5pset_preserve_f +! NAME +! h5pset_preserve_f +! +! PURPOSE +! Sets the dataset transfer property list status to +! TRUE or FALSE for initializing compound datatype +! members during write/read operations. +! +! INPUTS +! prp_id - property list identifier +! flag - status flag +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset + ! transfer property for partila writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + +! INTEGER, EXTERNAL :: h5pset_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pset_preserve_c + END INTERFACE + flag_c = 0 + IF(flag) flag_c = 1 + hdferr = h5pset_preserve_c(prp_id, flag_c) + END SUBROUTINE h5pset_preserve_f + +!****s* H5P/h5pget_preserve_f +! NAME +! h5pget_preserve_f +! +! PURPOSE +! Checks status of the dataset transfer property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! flag - status flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's + ! transfer property for partial writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + +! INTEGER, EXTERNAL :: h5pget_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pget_preserve_c + END INTERFACE + + hdferr = h5pget_preserve_c(prp_id, flag_c) + flag = .FALSE. + IF(flag_c .EQ. 1) flag = .TRUE. + END SUBROUTINE h5pget_preserve_f + +!****s* H5P/h5pget_class_f +! NAME +! h5pget_class_f +! +! PURPOSE +! Returns the property list class for a property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! classtype - property list class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list + ! to be created. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_c(prp_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype + END FUNCTION h5pget_class_c + END INTERFACE + + hdferr = h5pget_class_c(prp_id, classtype) + END SUBROUTINE h5pget_class_f + +!****s* H5P/h5pcopy_f +! NAME +! h5pcopy_f +! +! PURPOSE +! Copies an existing property list to create a new +! property list +! +! INPUTS +! prp_id - property list identifier +! OUTPUTS +! new_prp_id - new property list identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pcopy_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: new_prp_id + END FUNCTION h5pcopy_c + END INTERFACE + + hdferr = h5pcopy_c(prp_id, new_prp_id) + END SUBROUTINE h5pcopy_f + +!****s* H5P/h5pclose_f +! NAME +! h5pclose_f +! +! PURPOSE +! Terminates access to a property list. +! +! INPUTS +! prp_id - identifier of the property list to +! terminate access to. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pclose_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pclose_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pclose_c + END INTERFACE + + hdferr = h5pclose_c(prp_id) + END SUBROUTINE h5pclose_f + +!****s* H5P/h5pset_chunk_f +! NAME +! h5pset_chunk_f +! +! PURPOSE +! Sets the size of the chunks used to store +! a chunked layout dataset. +! +! INPUTS +! prp_id - datatset creation property list identifier +! ndims - number of dimensions for each chunk +! dims - array with dimension sizes for each chunk +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + END FUNCTION h5pset_chunk_c + END INTERFACE + + hdferr = h5pset_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pset_chunk_f + +!****s* H5P/h5pget_chunk_f +! NAME +! h5pget_chunk_f +! +! PURPOSE +! Retrieves the size of chunks for the raw data of a +! chunked layout dataset +! +! INPUTS +! prp_id - property list identifier +! ndims - size of dims array +! OUTPUTS +! dims - array with dimension sizes for each chunk +! hdferr - error code +! Success: number of chunk dimensions +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to + ! to return + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! number of chunk dimensions on success, + ! -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: ndims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5pget_chunk_c + END INTERFACE + + hdferr = h5pget_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pget_chunk_f + +!****s* H5P/h5pset_deflate_f +! NAME +! h5pset_deflate_f +! +! PURPOSE +! Sets compression method and compression level. +! +! INPUTS +! prp_id - property list identifier +! level - compression level +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: level ! Compression level + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_deflate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_deflate_c(prp_id, level) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: level + END FUNCTION h5pset_deflate_c + END INTERFACE + hdferr = h5pset_deflate_c(prp_id, level) + + END SUBROUTINE h5pset_deflate_f + +!****s* H5P/h5pget_version_f +! NAME +! h5pget_version_f +! +! PURPOSE +! Retrieves the version information of various objects +! for a file creation property list +! +! INPUTS +! prp_id - file createion property list identifier +! OUTPUTS +! boot - super block version number +! freelist - global freelist version number +! stab - symbol table version number +! shhdr - shared object header version number +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & + stab, shhdr, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot + ! block version number + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global + ! Freelist version number + + INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol + ! table version number + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared + ! object header version number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_version_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(:), INTENT(OUT) :: boot + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist + INTEGER, DIMENSION(:), INTENT(OUT) :: stab + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr + END FUNCTION h5pget_version_c + END INTERFACE + + hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + END SUBROUTINE h5pget_version_f + +!****s* H5P/h5pset_userblock_f +! NAME +! h5pset_userblock_f +! +! PURPOSE +! Sets user block size +! +! INPUTS +! prp_id - file creation property list to modify +! size - size of the user-block in bytes +! +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_userblock_c(prp_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_userblock_c + END INTERFACE + + hdferr = h5pset_userblock_c(prp_id, size) + END SUBROUTINE h5pset_userblock_f + +!****s* H5P/h5pget_userblock_f +! NAME +! h5pget_userblock_f +! +! PURPOSE +! Gets user block size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! block_size - size of the user block in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the + ! user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: block_size + END FUNCTION h5pget_userblock_c + END INTERFACE + hdferr = h5pget_userblock_c(prp_id, block_size) + END SUBROUTINE h5pget_userblock_f + +!****s* H5P/h5pset_sizes_f +! NAME +! h5pset_sizes_f +! +! PURPOSE +! Sets the byte size of the offsets and lengths used +! to address objects in an HDF5 file. +! +! INPUTS +! prp_id - file creation property list identifier +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pset_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size + END FUNCTION h5pset_sizes_c + END INTERFACE + + hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pset_sizes_f + +!****s* H5P/h5pget_sizes_f +! NAME +! h5pget_sizes_f +! +! PURPOSE +! Retrieves the size of the offsets and lengths used +! in an HDF5 file +! +! INPUTS +! prp_id - file creation property list identifier +! OUTPUTS +! +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size + END FUNCTION h5pget_sizes_c + END INTERFACE + + hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pget_sizes_f + +!****s* H5P/h5pset_sym_k_f +! NAME +! h5pset_sym_k_f +! +! PURPOSE +! Sets the size of parameters used to control the +!symbol table nodes +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - symbol table tree rank +! lk - symbol table node size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! Symbol table tree rank + INTEGER, INTENT(IN) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(IN) :: lk + END FUNCTION h5pset_sym_k_c + END INTERFACE + + hdferr = h5pset_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pset_sym_k_f +!****s* H5P/h5pget_sym_k_f +! NAME +! h5pget_sym_k_f +! +! PURPOSE +! Retrieves the size of the symbol table B-tree 1/2 rank +! and the symbol table leaf node 1/2 size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - symbol table tree 1/2 rank +! lk - symbol table node 1/2 size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank + INTEGER, INTENT(OUT) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: lk + END FUNCTION h5pget_sym_k_c + END INTERFACE + + hdferr = h5pget_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pget_sym_k_f +!****s* H5P/h5pset_istore_k_f +! NAME +! h5pset_istore_k_f +! +! PURPOSE +! Sets the size of the parameter used to control the +! B-trees for indexing chunked datasets +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - 1/2 rank of chunked storage B-tree +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + END FUNCTION h5pset_istore_k_c + END INTERFACE + + hdferr = h5pset_istore_k_c(prp_id, ik) + END SUBROUTINE h5pset_istore_k_f + +!****s* H5P/h5pget_istore_k_f +! NAME +! h5pget_istore_k_f +! +! PURPOSE +! Queries the 1/2 rank of an indexed storage B-tree. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - 1/2 rank of chunked storage B-tree +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + END FUNCTION h5pget_istore_k_c + END INTERFACE + + hdferr = h5pget_istore_k_c(prp_id, ik) + END SUBROUTINE h5pget_istore_k_f + +!****s* H5P/h5pget_driver_f +! NAME +! h5pget_driver_f +! +! PURPOSE +! Returns low-lever driver identifier. +! +! INPUTS +! +! prp_id - file access or data transfer property +! list identifier. +! OUTPUTS +! +! driver - low-level driver identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_driver_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_driver_c(prp_id, driver) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: driver + END FUNCTION h5pget_driver_c + END INTERFACE + + hdferr = h5pget_driver_c(prp_id, driver) + END SUBROUTINE h5pget_driver_f + +!****s* H5P/h5pset_fapl_stdio_f +! NAME +! h5pset_fapl_stdio_f +! +! PURPOSE +! Sets the standard I/O driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fapl_stdio_c + END INTERFACE + + hdferr = h5pset_fapl_stdio_c(prp_id) + END SUBROUTINE h5pset_fapl_stdio_f + +!****s* H5P/h5pget_stdio_f +! NAME +! h5pget_stdio_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) +! +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: io ! value indicates that the file + !access property list is set to + !the stdio driver +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_stdio_c +! hdferr = h5pget_stdio_c(prp_id, io) +! END SUBROUTINE h5pget_stdio_f + +!****s* H5P/h5pset_fapl_sec2_f +! NAME +! h5pset_fapl_sec2_f +! +! PURPOSE +! Sets the sec2 driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + END FUNCTION h5pset_fapl_sec2_c + END INTERFACE + + hdferr = h5pset_fapl_sec2_c(prp_id) + END SUBROUTINE h5pset_fapl_sec2_f + +!****s* H5P/h5pget_sec2_f +! NAME +! h5pget_sec2_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file + !driver uses the functions declared + !in the unistd.h file +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_sec2_c +! hdferr = h5pget_sec2_c(prp_id, sec2) +! END SUBROUTINE h5pget_sec2_f + +!****s* H5P/h5pset_alignment_f +! NAME +! h5pset_alignment_f +! +! PURPOSE +! Sets alignment properties of a file access property list. +! +! INPUTS +! +! prp_id - file access property list identifier +! threshold - threshold value +! alignment - alignment value +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: threshold + INTEGER(HSIZE_T), INTENT(IN) :: alignment + END FUNCTION h5pset_alignment_c + END INTERFACE + + hdferr = h5pset_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pset_alignment_f + +!****s* H5P/h5pget_alignment_f +! NAME +! h5pget_alignment_f +! +! PURPOSE +! Retrieves the current settings for alignment +! properties from a file access property list. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! threshold - threshold value +! alignment - alignment value +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: threshold + INTEGER(HSIZE_T), INTENT(OUT) :: alignment + END FUNCTION h5pget_alignment_c + END INTERFACE + + hdferr = h5pget_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pget_alignment_f + +!****s* H5P/h5pset_fapl_core_f +! NAME +! h5pset_fapl_core_f +! +! PURPOSE +! Modifies the file access property list to use the +! H5FD_CORE driver. +! +! INPUTS +! prp_id - file access property list identifier +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. + LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + +! INTEGER, EXTERNAL :: h5pset_fapl_core_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pset_fapl_core_c + END INTERFACE + backing_store_flag = 0 + IF(backing_store) backing_store_flag = 1 + hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + END SUBROUTINE h5pset_fapl_core_f + +!****s* H5P/h5pget_fapl_core_f +! NAME +! h5pget_fapl_core_f +! +! PURPOSE +! Queries core file driver properties. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. + LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + + INTERFACE + INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pget_fapl_core_c + END INTERFACE + + hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + backing_store =.FALSE. + IF (backing_store_flag .EQ. 1) backing_store =.TRUE. + END SUBROUTINE h5pget_fapl_core_f + +!****s* H5P/ h5pset_fapl_family_f +! NAME +! h5pset_fapl_family_f +! +! PURPOSE +! Sets the file access property list to use the family driver. +! +! INPUTS +! prp_id - file access property list identifier +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: memb_size + INTEGER(HID_T), INTENT(IN) :: memb_plist + END FUNCTION h5pset_fapl_family_c + END INTERFACE + + hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pset_fapl_family_f + +!****s* H5P/h5pget_fapl_family_f +! NAME +! h5pget_fapl_family_f +! +! PURPOSE +! Returns file access property list information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size + INTEGER(HID_T), INTENT(OUT) :: memb_plist + END FUNCTION h5pget_fapl_family_c + END INTERFACE + + hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pget_fapl_family_f + +!****s* H5P/h5pset_cache_f +! NAME +! h5pset_cache_f +! +! PURPOSE +! Sets the meta data cache and raw data chunk +! cache parameters +! +! INPUTS +! +! prp_id - file access property list identifier +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_cache_c + END INTERFACE + + hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pset_cache_f + +!****s* H5P/h5pget_cache_f +! NAME +! h5pget_cache_f +! +! PURPOSE +! Queries the meta data cache and raw data chunk cache +! parameters. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Bug fix: type of the rdcc_nelmts parameter should be INTEGER +! instead of INTEGER(SIZE_T) October 10, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_cache_c + END INTERFACE + + hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pget_cache_f + +!****s* H5P/h5pset_fapl_split_f +! NAME +! h5pset_fapl_split_f +! +! PURPOSE +! Emulates the old split file driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! meta_ext - name of the extension for the metafile +! filename +! meta_plist - identifier of the meta file access property +! list +! raw_ext - name extension for the raw file filename +! raw_plist - identifier of the raw file access property list +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for + ! the metafile filename + INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file + ! access property list + CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename + INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file + ! access property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: meta_len, raw_len + +! INTEGER, EXTERNAL :: h5pset_fapl_split_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: meta_ext + !DEC$ATTRIBUTES reference :: raw_ext + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: meta_ext + INTEGER(HID_T), INTENT(IN) :: meta_plist + CHARACTER(LEN=*), INTENT(IN) :: raw_ext + INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER :: meta_len, raw_len + END FUNCTION h5pset_fapl_split_c + END INTERFACE + + meta_len = LEN(meta_ext) + raw_len = LEN(raw_ext) + hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + END SUBROUTINE h5pset_fapl_split_f + +!****s* H5P/h5pget_split_f +! NAME +! h5pget_split_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& +! raw_ext, raw_plist, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta + ! file extension to be copied to the + ! meta_ext buffer + +! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for + !the metafile filename +! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file + ! access property list +! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw + ! file extension to be copied to the + ! raw_ext buffer +! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename +! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file + !access property list +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_split_c +! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & +! raw_ext_size, raw_ext, raw_plist ) +! END SUBROUTINE h5pget_split_f + +!****s* H5P/h5pset_gc_references_f +! NAME +! h5pset_gc_references_f +! +! PURPOSE +! Sets garbage collecting references flag. +! +! INPUTS +! +! prp_id - file access property list identifier +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: gc_reference + END FUNCTION h5pset_gc_references_c + END INTERFACE + + hdferr = h5pset_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pset_gc_references_f + +!****s* H5P/h5pget_gc_references_f +! NAME +! h5pget_gc_references_f +! +! PURPOSE +! Returns garbage collecting references setting. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: gc_reference + END FUNCTION h5pget_gc_references_c + END INTERFACE + + hdferr = h5pget_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pget_gc_references_f + +!****s* H5P/h5pset_layout_f +! NAME +! h5pset_layout_f +! +! PURPOSE +! Sets the type of storage used store the raw data +! for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F + ! H5D_CONTIGUOUS_F + ! H5D_CHUNKED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: layout + END FUNCTION h5pset_layout_c + END INTERFACE + + hdferr = h5pset_layout_c(prp_id, layout) + END SUBROUTINE h5pset_layout_f + +!****s* H5P/h5pget_layout_f +! NAME +! h5pget_layout_f +! +! PURPOSE +! Returns the layout of the raw data for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F(0) + ! H5D_CONTIGUOUS_F(1) + ! H5D_CHUNKED_F(2) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: layout + END FUNCTION h5pget_layout_c + END INTERFACE + + hdferr = h5pget_layout_c(prp_id, layout) + END SUBROUTINE h5pget_layout_f + +!****s* H5P/h5pset_filter_f +! NAME +! h5pset_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be added to the pipeline +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! February, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pset_filter_c + END INTERFACE + + hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pset_filter_f + +!****s* H5P/h5pget_nfilters_f +! NAME +! h5pget_nfilters_f +! +! PURPOSE +! Returns the number of filters in the pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! nfilters - number of filters in the pipeline +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_nfilters_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: nfilters + END FUNCTION h5pget_nfilters_c + END INTERFACE + + hdferr = h5pget_nfilters_c(prp_id, nfilters) + END SUBROUTINE h5pget_nfilters_f + +!****s* H5P/h5pget_filter_f +! NAME +! h5pget_filter_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter_number - sequence number within the filter +! pipeline of the filter for which +! information is sought +! OUTPUTS +! +! filter_id - filter identification number +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter + ! pipeline of the filter for which + ! information is sought + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: filter_id ! Filter identification number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_number + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: filter_id + END FUNCTION h5pget_filter_c + END INTERFACE + + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + END SUBROUTINE h5pget_filter_f + +!****s* H5P/h5pset_external_f +! NAME +! h5pset_external_f +! +! PURPOSE +! Adds an external file to the list of external files. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file + 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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(OFF_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: bytes + END FUNCTION h5pset_external_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) + END SUBROUTINE h5pset_external_f + +!****s* H5P/h5pget_external_count_f +! NAME +! h5pget_external_count_f +! +! PURPOSE +! Returns the number of external files for a dataset. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! count - number of external files for the +! specified dataset +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: count ! Number of external files for the + ! Specified dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_external_count_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_count_c(prp_id, count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: count + END FUNCTION h5pget_external_count_c + END INTERFACE + + hdferr = h5pget_external_count_c(prp_id, count) + END SUBROUTINE h5pget_external_count_f + +!****s* H5P/h5pget_external_f +! NAME +! h5pget_external_f +! +! PURPOSE +! Returns information about an external file. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! idx - external file index +! name_size - maximum size of name array +! name - name of the external file +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + 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(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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_external_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: idx + INTEGER(SIZE_T), INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(OFF_T), INTENT(OUT) :: offset + INTEGER(HSIZE_T), INTENT(OUT) :: bytes + END FUNCTION h5pget_external_c + END INTERFACE + + hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + END SUBROUTINE h5pget_external_f + +!****s* H5P/h5pset_btree_ratios_f +! NAME +! h5pset_btree_ratios_f +! +! PURPOSE +! Sets B-tree split ratios for a dataset transfer +! property list. +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(IN) :: left + REAL, INTENT(IN) :: middle + REAL, INTENT(IN) :: right + END FUNCTION h5pset_btree_ratios_c + END INTERFACE + + hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pset_btree_ratios_f + +!****s* H5P/h5pget_btree_ratios_f +! NAME +! h5pget_btree_ratios_f +! +! PURPOSE +! Gets B-tree split ratios for a dataset transfer property list +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! OUTPUTS +! +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(OUT) :: left + REAL, INTENT(OUT) :: middle + REAL, INTENT(OUT) :: right + END FUNCTION h5pget_btree_ratios_c + END INTERFACE + + hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pget_btree_ratios_f + +!****s* H5P/h5pget_fclose_degree_f +! NAME +! h5pget_fclose_degree_f +! +! PURPOSE +! Returns the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(OUT) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_fclose_degree_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: degree + END FUNCTION h5pget_fclose_degree_c + END INTERFACE + + hdferr = h5pget_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pget_fclose_degree_f + +!****s* H5P/h5pset_fclose_degree_f +! NAME +! h5pset_fclose_degree_f +! +! PURPOSE +! Sets the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - file access property list identifier +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(IN) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: degree + END FUNCTION h5pset_fclose_degree_c + END INTERFACE + + hdferr = h5pset_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pset_fclose_degree_f + +!****s* H5P/h5pequal_f +! NAME +! h5pequal_f +! +! PURPOSE +! Checks if two property lists are eqaul +! +! INPUTS +! +! plist1_id - property list identifier +! plist2_id - property list identifier +! OUTPUTS +! +! flag - flag, possible values +! .TRUE. or .FALSE. +! hdferr: - error code +! Success: 0 +! Failure: -1, flag is set to .FALSE. +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! Flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist1_id + INTEGER(HID_T), INTENT(IN) :: plist2_id + INTEGER, INTENT(OUT) :: c_flag + END FUNCTION h5pequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + IF (c_flag .GT. 0) flag = .TRUE. + END SUBROUTINE h5pequal_f + +!****s* H5P/h5pset_buffer_f +! NAME +! h5pset_buffer_f +! +! PURPOSE +! Sets sixe for conversion buffer +! +! INPUTS +! plist_id - data transfer property list identifier +! size - buffer size +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_buffer_c + END INTERFACE + + hdferr = h5pset_buffer_c(plist_id, size) + END SUBROUTINE h5pset_buffer_f + +!****s* H5P/h5pget_buffer_f +! NAME +! h5pget_buffer_f +! +! PURPOSE +! Gets size for conversion buffer +! +! INPUTS +! +! plist_id - data transfer property list identifier +! OUTPUTS +! +! size - buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_buffer_c + END INTERFACE + + hdferr = h5pget_buffer_c(plist_id, size) + END SUBROUTINE h5pget_buffer_f + +!****s* H5P/h5pfill_value_defined_f +! NAME +! h5pfill_value_defined_f +! +! PURPOSE +! Check if fill value is defined. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - fill value status flag +! Possible values are: +! H5D_FILL_VALUE_ERROR_F +! H5D_FILL_VALUE_UNDEFINED_F +! H5D_FILL_VALUE_DEFAULT_F +! H5D_FILL_VALUE_USER_DEFINED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill value status flag + ! H5D_FILL_VALUE_ERROR_F + ! H5D_FILL_VALUE_UNDEFINED_F + ! H5D_FILL_VALUE_DEFAULT_F + ! H5D_FILL_VALUE_USER_DEFINED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pfill_value_defined_c + END INTERFACE + + hdferr = h5pfill_value_defined_c(plist_id, flag) + END SUBROUTINE h5pfill_value_defined_f + +!****s* H5P/h5pset_alloc_time_f +! NAME +! h5pset_alloc_time_f +! +! PURPOSE +! Set space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_alloc_time_c + END INTERFACE + + hdferr = h5pset_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pset_alloc_time_f + +!****s* H5P/h5pget_alloc_time_f +! NAME +! h5pget_alloc_time_f +! +! PURPOSE +! Get space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_alloc_time_c + END INTERFACE + + hdferr = h5pget_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pget_alloc_time_f + +!****s* H5P/h5pset_fill_time_f +! NAME +! h5pset_fill_time_f +! +! PURPOSE +! Set fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fill_time_c + END INTERFACE + + hdferr = h5pset_fill_time_c(plist_id, flag) + END SUBROUTINE h5pset_fill_time_f + +!****s* H5P/h5pget_fill_time_f +! NAME +! h5pget_fill_time_f +! +! PURPOSE +! Get fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! OPTIONAL PARAMETERS +! +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fill_time_c + END INTERFACE + + hdferr = h5pget_fill_time_c(plist_id, flag) + END SUBROUTINE h5pget_fill_time_f + +!****s* H5P/ h5pset_meta_block_size_f +! NAME +! h5pset_meta_block_size_f +! +! PURPOSE +! Sets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! size - metatdata block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_meta_block_size_c + END INTERFACE + + hdferr = h5pset_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pset_meta_block_size_f + +!****s* H5P/h5pget_meta_block_size_f +! NAME +! h5pget_meta_block_size_f +! +! PURPOSE +! Gets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - metatdata block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_meta_block_size_c + END INTERFACE + + hdferr = h5pget_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pget_meta_block_size_f + +!****s* H5P/h5pset_sieve_buf_size_f +! NAME +! h5pset_sieve_buf_size_f +! +! PURPOSE +! Sets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! size - sieve buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_sieve_buf_size_c + END INTERFACE + + hdferr = h5pset_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pset_sieve_buf_size_f + +!****s* H5P/h5pget_sieve_buf_size_f +! NAME +! h5pget_sieve_buf_size_f +! +! PURPOSE +! Gets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - sieve buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_sieve_buf_size_c + END INTERFACE + + hdferr = h5pget_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pget_sieve_buf_size_f + +!****s* H5P/h5pset_small_data_block_size_f +! NAME +! h5pset_small_data_block_size_f +! +! PURPOSE +! Sets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! size - small raw data block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_small_data_block_size_c + END INTERFACE + + hdferr = h5pset_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pset_small_data_block_size_f + +!****s* H5P/h5pget_small_data_block_size_f +! NAME +! h5pget_small_data_block_size_f +! +! PURPOSE +! Gets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - small raw data block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_small_data_block_size_c + END INTERFACE + + hdferr = h5pget_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pget_small_data_block_size_f + +!****s* H5P/h5pset_hyper_vector_size_f +! NAME +! h5pset_hyper_vector_size_f +! +! PURPOSE +! Set the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! size - vector size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_hyper_vector_size_c + END INTERFACE + + hdferr = h5pset_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pset_hyper_vector_size_f + +!****s* H5P/ h5pget_hyper_vector_size_f +! NAME +! h5pget_hyper_vector_size_f +! +! PURPOSE +! Get the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! OUTPUTS +! +! size - vector size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_hyper_vector_size_c + END INTERFACE + + hdferr = h5pget_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pget_hyper_vector_size_f + +!****s* H5P/h5pexist_f +! NAME +! h5pexist_f +! +! PURPOSE +! Queries whether a property name exists in a property list or class. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to check for +! OUTPUTS +! +! flag - logical flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pexist_c + END INTERFACE + flag = .FALSE. + name_len = LEN(name) + hdferr = h5pexist_c(prp_id, name , name_len) + IF (hdferr > 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pexist_f + +!****s* H5P/h5pget_size_f +! +! NAME +! h5pget_size_f +! +! PURPOSE +! Queries the size of a property value in bytes. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to query +! OUTPUTS +! +! size - size of property in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_size_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pget_size_c(prp_id, name , name_len, size) + END SUBROUTINE h5pget_size_f + +!****s* H5P/h5pget_npros_f +! NAME +! h5pget_npros_f +! +! PURPOSE +! Queries number of properties in property list or class +! +! INPUTS +! +! prp_id - iproperty list identifier to query +! OUTPUTS +! +! nprops - number of properties in property object +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: nprops + END FUNCTION h5pget_nprops_c + END INTERFACE + hdferr = h5pget_nprops_c(prp_id, nprops) + END SUBROUTINE h5pget_nprops_f + +!****s* H5P/h5pget_class_name_f +! NAME +! h5pget_class_name_f +! +! PURPOSE +! Queries the name of a class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! name - name of a class +! size - Actual length of the class name +! NOTE: If provided buffer "name" is smaller, +! than name will be truncated to fit into +! provided user buffer. +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Returned the size of name as an argument +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name + INTEGER, INTENT(OUT) :: size ! Actual length of the class name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pget_class_name_c + END INTERFACE + + name_len = LEN(name) + size = h5pget_class_name_c(prp_id, name, name_len) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE h5pget_class_name_f + +!****s* H5P/h5pget_class_parent_f +! NAME +! h5pget_class_parent_f +! +! PURPOSE +! Retrieves the parent class of a genric property class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! parent_id - identifier of the parent class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list + ! identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: parent_id + END FUNCTION h5pget_class_parent_c + END INTERFACE + hdferr = h5pget_class_parent_c(prp_id, parent_id) + END SUBROUTINE h5pget_class_parent_f + +!****s* H5P/h5pisa_class_f +! NAME +! h5pisa_class_f +! +! PURPOSE +! Determines whether a property list is a member of a class. +! +! INPUTS +! +! plist - property list identifier +! pclass - identifier of the property class +! OUTPUTS +! +! flag - .TRUE. if a member, .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier + LOGICAL, INTENT(OUT) :: flag ! logical flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pisa_class_c(plist, pclass) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist + INTEGER(HID_T), INTENT(IN) :: pclass + END FUNCTION h5pisa_class_c + END INTERFACE + flag = .FALSE. + hdferr = h5pisa_class_c(plist, pclass) + IF (hdferr .GT. 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pisa_class_f + +!****s* H5P/h5pcopy_prop_f +! NAME +! h5pcopy_prop_f +! +! PURPOSE +! Copies a property from one list or class to another. +! +! INPUTS +! +! dst_id - Identifier of the destination property list +! src_id - Identifier of the source property list +! name - name of the property to copy +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list + ! identifier + INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Property name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER(HID_T), INTENT(IN) :: src_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pcopy_prop_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) + END SUBROUTINE h5pcopy_prop_f + +!****s* H5P/h5premove_f +! NAME +! h5premove_f +! +! PURPOSE +! Removes a property from a property list. + +! +! INPUTS +! +! plid - Property list identofoer +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5premove_f(plid, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5premove_c(plid, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plid + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5premove_c + END INTERFACE + name_len = LEN(name) + hdferr = h5premove_c(plid, name , name_len) + END SUBROUTINE h5premove_f + +!****s* H5P/h5punregister_f +! NAME +! h5punregister_f +! +! PURPOSE +! Removes a property from a property list class. +! +! INPUTS +! +! class - Property list class identifier +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5punregister_f(class, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5punregister_c(class, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5punregister_c + END INTERFACE + name_len = LEN(name) + hdferr = h5punregister_c(class, name , name_len) + END SUBROUTINE h5punregister_f + +!****s* H5P/h5pclose_class_f +! NAME +! h5pclose_class_f +! +! PURPOSE +! Closes an existing property list class. +! +! INPUTS +! +! class - Property list class identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_class_f(class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pclose_class_c(class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + END FUNCTION h5pclose_class_c + END INTERFACE + hdferr = h5pclose_class_c(class) + END SUBROUTINE h5pclose_class_f + +!****s* H5P/h5pset_shuffle_f +! NAME +! h5pset_shuffle_f +! +! PURPOSE +! Sets shuffling filter +! +! INPUTS +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_shuffle_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shuffle_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_shuffle_c + END INTERFACE + hdferr = h5pset_shuffle_c(prp_id) + + END SUBROUTINE h5pset_shuffle_f + +!****s* H5P/h5pset_edc_check_f +! NAME +! h5pset_edc_check_f +! +! PURPOSE +! Enables/disables error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! flag - EDC flag; possible values: +! H5Z_DISABLE_EDC_F +! H5Z_ENABLE_EDC_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: flag ! Checksum filter flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_edc_check_c + END INTERFACE + hdferr = h5pset_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pset_edc_check_f + +!****s* H5P/h5pget_edc_check_f +! NAME +! h5pget_edc_check_f +! +! PURPOSE +! Queries error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier + INTEGER, INTENT(OUT) :: flag ! Checksum filter flag + ! May have one of the following values: + ! H5Z_ERROR_EDC_F + ! H5Z_DISABLE_EDC_F + ! H5Z_ENABLE_EDC_F + ! H5Z_NO_EDC_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_edc_check_c + END INTERFACE + hdferr = h5pget_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pget_edc_check_f + +!****s* H5P/h5pset_fletcher32_f +! NAME +! h5pset_fletcher32_f +! +! PURPOSE +! Sets Fletcher32 checksum of EDC for a dataset creation +! property list. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_fletcher32_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fletcher32_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fletcher32_c + END INTERFACE + hdferr = h5pset_fletcher32_c(prp_id) + + END SUBROUTINE h5pset_fletcher32_f + +!****s* H5P/ h5pset_family_offset_f +! NAME +! h5pset_family_offset_f +! +! PURPOSE +! Sets offset for family file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! offset - file offset +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 19 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_family_offset_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: offset + END FUNCTION h5pset_family_offset_c + END INTERFACE + hdferr = h5pset_family_offset_c(prp_id, offset) + + END SUBROUTINE h5pset_family_offset_f + +!****s* H5P/h5pset_fapl_multi_l +! NAME +! h5pset_fapl_multi_l +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 20 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: flag = 0 + INTEGER :: i + + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + IF(relax) flag = 1 + hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) + + END SUBROUTINE h5pset_fapl_multi_l +!****s* H5P/h5pset_fapl_multi_s +! NAME +! h5pset_fapl_multi_s +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 31 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag + +! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_sc + END INTERFACE + flag = 0 + IF (relax) flag = 1 + hdferr = h5pset_fapl_multi_sc(prp_id, flag) + + END SUBROUTINE h5pset_fapl_multi_s +!****s* H5P/h5pget_fapl_multi_f +! NAME +! h5pget_fapl_multi_f +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! OPTIONAL PARAMETERS +! maxlen_out - maximum length for memb_name array element +! +! AUTHOR +! Elena Pourmal +! 24 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out + LOGICAL, INTENT(OUT) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER :: flag + INTEGER :: i +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag, c_maxlen_out) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + + relax = .TRUE. + IF(flag .EQ. 0) relax = .FALSE. + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + END SUBROUTINE h5pget_fapl_multi_f +!****s* H5P/h5pset_szip_f +! NAME +! h5pset_szip_f +! +! PURPOSE +! Sets up use of szip compression +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! options_mask - A bit-mask conveying the desired SZIP options. +! Current valid values in Fortran are: +! H5_SZIP_EC_OM_F +! H5_SZIP_NN_OM_F +! pixels_per_block - szip parameters +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired + ! SZIP options + ! Current valid values in Fortran are: + ! H5_SZIP_EC_OM_F + ! H5_SZIP_NN_OM_F + INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements + ! in each data block + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_szip_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: options_mask + INTEGER, INTENT(IN) :: pixels_per_block + END FUNCTION h5pset_szip_c + END INTERFACE + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + + END SUBROUTINE h5pset_szip_f + +!****s* H5P/h5pall_filters_avail_f +! NAME +! h5pall_filters_avail_f +! +! PURPOSE +! Checks if all filters set in the dataset creation +! property list are available +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! flag - .TRUE. if all filters are available +! .FALSE. otherwise +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available + ! .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status + +! INTEGER, EXTERNAL :: h5pall_filters_avail_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pall_filters_avail_c + END INTERFACE + flag = .TRUE. + hdferr = h5pall_filters_avail_c(prp_id, status) + IF (status .EQ. 0 ) flag = .FALSE. + + END SUBROUTINE h5pall_filters_avail_f + +!****s* H5P/h5pget_filter_by_id_f +! NAME +! h5pget_filter_by_id_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! filter_id - filter identifier +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_id ! Filter identifier + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_filter_by_id_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_id + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + END FUNCTION h5pget_filter_by_id_c + END INTERFACE + + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + END SUBROUTINE h5pget_filter_by_id_f + +!****s* H5P/h5pmodify_filter_f +! NAME +! h5pmodify_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be modified +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be modified + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pmodify_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pmodify_filter_c + END INTERFACE + + hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pmodify_filter_f + +!****s* H5P/h5premove_filter_f +! NAME +! h5premove_filter_f +! +! PURPOSE +! Delete one or more filters from the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be removed +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Quincey Koziol +! January 27 2004 +! +! Fortran90 Interface: + SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list + ! identifier + INTEGER, INTENT(IN) :: filter ! Filter to be removed + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5premove_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + END FUNCTION h5premove_filter_c + END INTERFACE + + hdferr = h5premove_filter_c(prp_id, filter) + END SUBROUTINE h5premove_filter_f + +!****s* H5P/H5Pget_attr_phase_change_f +! NAME +! H5Pget_attr_phase_change_f +! +! PURPOSE +! Retrieves attribute storage phase change thresholds +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + ! (Default: 8) + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_attr_phase_change_c + END INTERFACE + + hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_attr_phase_change_f + +!****s* H5P/H5Pset_attr_creation_order_f +! NAME +! H5Pset_attr_creation_order_f +! +! PURPOSE +! Sets tracking and indexing of attribute creation order +! +! INPUTS +! +! ocpl_id - Object creation property list identifier +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5Pset_attr_creation_order_c + END INTERFACE + + hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + END SUBROUTINE h5pset_attr_creation_order_f + +!****s* H5P/H5Pset_shared_mesg_nindexes_f +! NAME +! H5Pset_shared_mesg_nindexes_f +! +! PURPOSE +! Sets number of shared object header message indexes +! +! INPUTS +! +! plist_id - file creation property list +! nindexes - Number of shared object header message indexes to be available in files created with this property list +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list + INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes + ! available in files created WITH this property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: nindexes + + END FUNCTION H5pset_shared_mesg_nindexes_c + END INTERFACE + + hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + + END SUBROUTINE h5pset_shared_mesg_nindexes_f + +!****s* H5P/H5Pset_shared_mesg_index_f +! NAME +! H5Pset_shared_mesg_index_f +! +! PURPOSE +! Configures the specified shared object header message index +! +! INPUTS +! +! fcpl_id - File creation property list identifier. +! index_num - Index being configured. +! mesg_type_flags - Types of messages that should be stored in this index. +! min_mesg_size - Minimum message size. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list + INTEGER, INTENT(IN) :: index_num ! Index being configured. + INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. + INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER, INTENT(IN) :: index_num + INTEGER, INTENT(IN) :: mesg_type_flags + INTEGER, INTENT(IN) :: min_mesg_size + + END FUNCTION H5pset_shared_mesg_index_c + END INTERFACE + + hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + END SUBROUTINE h5pset_shared_mesg_index_f + +!****s* H5P/H5Pget_attr_creation_order_f +! NAME +! H5Pget_attr_creation_order_f +! +! PURPOSE +! Retrieves tracking and indexing settings for attribute creation order +! +! INPUTS +! +! ocpl_id - Object (group or dataset) creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_attr_creation_order_c + END INTERFACE + + hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + END SUBROUTINE h5pget_attr_creation_order_f + +!****s* H5P/H5Pset_libver_bounds_f +! NAME +! H5Pset_libver_bounds_f +! +! PURPOSE +! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. +! +! INPUTS +! +! fapl_id - File access property list identifier +! low - The earliest version of the library that will be used for writing objects. +! high - The latest version of the library that will be used for writing objects. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. + ! Currently, low must be one of two pre-defined values: + ! HDF_LIBVER_EARLIEST_F + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. + ! Currently, low must set to the pre-defined value: + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: low + INTEGER, INTENT(IN) :: high + + END FUNCTION H5pset_libver_bounds_c + END INTERFACE + + hdferr = h5pset_libver_bounds_c(fapl_id, low, high) + + END SUBROUTINE h5pset_libver_bounds_f + +!****s* H5P/H5Pset_link_creation_order_f +! NAME +! H5Pset_link_creation_order_f +! +! PURPOSE +! Sets creation order tracking and indexing for links in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! crt_order_flags - Creation order flag(s) +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5pset_link_creation_order_c + END INTERFACE + + hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pset_link_creation_order_f + +!****s* H5P/H5Pget_link_phase_change_f +! NAME +! H5Pget_link_phase_change_f +! +! PURPOSE +! Queries the settings for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_link_phase_change_c + END INTERFACE + + hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_link_phase_change_f + +!****s* H5P/H5Pget_obj_track_times_f +! NAME +! H5Pget_obj_track_times_f +! +! PURPOSE +! Returns whether times are tracked for an object. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pget_obj_track_times_c + END INTERFACE + flag = .TRUE. + hdferr = h5pget_obj_track_times_c(plist_id, status) + IF(status.EQ.0) flag = .FALSE. + + END SUBROUTINE h5pget_obj_track_times_f + +!****s* H5P/H5Pset_obj_track_times_f +! NAME +! H5Pset_obj_track_times_f +! +! PURPOSE +! Set whether the birth, access, modification & change times for +! an object are stored. +! +! Birth time is the time the object was created. Access time is +! the last time that metadata or raw data was read from this +! object. Modification time is the last time the data for +! this object was changed (either writing raw data to a dataset +! or inserting/modifying/deleting a link in a group). Change +! time is the last time the metadata for this object was written +! (adding/modifying/deleting an attribute on an object, extending +! the size of a dataset, etc). +! +! If these times are not tracked, they will be reported as +! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX +! epoch) when queried. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(IN) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(IN) :: status + END FUNCTION h5pset_obj_track_times_c + END INTERFACE + + status = 0 + IF(flag) status = 1 + + hdferr = h5pset_obj_track_times_c(plist_id, status) + + END SUBROUTINE h5pset_obj_track_times_f + +!****s* H5P/H5Pset_create_inter_group_f +! NAME +! H5Pset_create_inter_group_f +! +! PURPOSE +! Specifies in property list whether to create missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - crt_intermed_group specifying whether +! to create intermediate groups upon the creation +! of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! HISTORY +! The long subroutine name (>31) on older f90 compilers causes problems +! so had to shorten the name +! Fortran90 Interface: + SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups + ! upon the creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pset_create_inter_group_c + END INTERFACE + + hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pset_create_inter_group_f + +!****s* H5P/H5Pget_link_creation_order_f +! NAME +! H5Pget_link_creation_order_f +! +! PURPOSE +! Queries whether link creation order is tracked and/or indexed in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Creation order flag(s) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_link_creation_order_c + END INTERFACE + + hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pget_link_creation_order_f + +!****s* H5P/H5Pset_char_encoding_f +! NAME +! H5Pset_char_encoding_f +! +! PURPOSE +! Sets the character encoding used to encode a string. +! +! INPUTS +! +! plist_id - Property list identifier +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! +! OUTPUTS +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + INTEGER, INTENT(IN) :: encoding ! String encoding character set: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: encoding + + END FUNCTION H5pset_char_encoding_c + END INTERFACE + + hdferr = h5pset_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pset_char_encoding_f + +!****s* H5P/H5Pget_char_encoding_f +! NAME +! H5Pget_char_encoding_f +! +! PURPOSE +! Retrieves the character encoding used to create a string +! +! INPUTS +! +! plist_id - Property list identifier +! +! OUTPUTS +! +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + + INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: encoding + + END FUNCTION H5pget_char_encoding_c + END INTERFACE + + hdferr = h5pget_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pget_char_encoding_f + +!****s* H5P/h5pset_copy_object_f +! NAME +! h5pset_copy_object_f +! +! PURPOSE +! Sets properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! copy_options - Copy option(s) to be set +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(IN) :: copy_options + END FUNCTION h5pset_copy_object_c + END INTERFACE + hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pset_copy_object_f + +!****s* H5P/h5pget_copy_object_f +! NAME +! h5pget_copy_object_f +! +! PURPOSE +! Retrieves the properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! OUTPUTS +! +! copy_options - Copy option(s) to be get +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(OUT) :: copy_options + END FUNCTION h5pget_copy_object_c + END INTERFACE + hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pget_copy_object_f + +!****s* H5P/h5pget_data_transform_f +! NAME +! h5pget_data_transform_f +! +! PURPOSE +! Retrieves a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! OUTPUTS +! +! expression - buffer to hold transform expression +! hdferr - Error code +! Success: Actual lenght of the expression +! If provided buffer "expression" is +! smaller, than expression will be +! truncated to fit into +! provided user buffer +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! HISTORY +! +! Should hdferr return just 0 or 1 and add another arguement for the size? +! Fortran90 Interface: +SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + INTEGER(SIZE_T) :: size_default + + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(OUT) :: expression + INTEGER(SIZE_T) :: size_default + INTEGER :: expression_len + END FUNCTION h5pget_data_transform_c + END INTERFACE + + size_default = 0 + expression_len = LEN(expression) + + hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + + IF(present(size)) size = size_default + + END SUBROUTINE h5pget_data_transform_f + +!****s* H5P/h5pset_data_transform_f +! NAME +! h5pset_data_transform_f +! +! PURPOSE +! Sets a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! expression - Buffer to hold transform expression +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(IN) :: expression + INTEGER :: expression_len + END FUNCTION h5pset_data_transform_c + END INTERFACE + + expression_len = LEN(expression) + hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) + + END SUBROUTINE h5pset_data_transform_f + +!****s* H5P/H5Pget_local_heap_size_hint_f +! NAME +! H5Pget_local_heap_size_hint_f +! +! PURPOSE +! Queries the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! size_hint - Hint for size of local heap +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(OUT) :: size_hint + END FUNCTION H5Pget_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pget_local_heap_size_hint_f + +!****s* H5P/H5Pget_est_link_info_f +! NAME +! H5Pget_est_link_info_f +! +! PURPOSE +! Queries data required to estimate required local heap or object header size. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: est_num_entries + INTEGER, INTENT(OUT) :: est_name_len + END FUNCTION h5pget_est_link_info_c + END INTERFACE + + hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pget_est_link_info_f + +!****s* H5P/H5Pset_local_heap_size_hint_f +! NAME +! H5Pset_local_heap_size_hint_f +! +! PURPOSE +! Sets the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! size_hint - Hint for size of local heap +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(IN) :: size_hint + END FUNCTION h5pset_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pset_local_heap_size_hint_f + +!****s* H5P/h5pset_est_link_info_f +! NAME +! h5pset_est_link_info_f +! +! PURPOSE +! Sets estimated number of links and length of link names in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: est_num_entries + INTEGER, INTENT(IN) :: est_name_len + END FUNCTION h5pset_est_link_info_c + END INTERFACE + + hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pset_est_link_info_f + +!****s* H5P/h5pset_link_phase_change_f +! NAME +! h5pset_link_phase_change_f +! +! PURPOSE +! Sets the parameters for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_link_phase_change_c + END INTERFACE + + hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pset_link_phase_change_f + +!****s* H5P/h5pset_fapl_direct_f +! NAME +! h5pset_fapl_direct_f +! +! PURPOSE +! Sets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(IN) :: alignment + INTEGER(SIZE_T), INTENT(IN) :: block_size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size + END FUNCTION h5pset_fapl_direct_c + END INTERFACE + + hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pset_fapl_direct_f + +!****s* H5P/h5pget_fapl_direct_f +! NAME +! h5pget_fapl_direct_f +! +! PURPOSE +! Gets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(OUT) :: alignment + INTEGER(SIZE_T), INTENT(OUT) :: block_size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size + END FUNCTION h5pget_fapl_direct_c + END INTERFACE + + hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pget_fapl_direct_f + +!****s* H5P/H5Pset_attr_phase_change_f +! NAME +! H5Pset_attr_phase_change_f +! +! PURPOSE +! Sets attribute storage phase change thresholds. +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + !(Default: 8) + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_attr_phase_change_c + END INTERFACE + + hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + + + END SUBROUTINE h5pset_attr_phase_change_f + +!****s* H5P/H5Pset_nbit_f +! NAME +! H5Pset_nbit_f +! +! PURPOSE +! Sets up the use of the N-Bit filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_nbit_f(plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION H5Pset_nbit_c(plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + END FUNCTION H5Pset_nbit_c + END INTERFACE + + hdferr = H5Pset_nbit_c(plist_id) + + END SUBROUTINE h5pset_nbit_f + +!****s* H5P/h5pset_scaleoffset_f +! NAME +! h5pset_scaleoffset_f +! +! PURPOSE +! Sets up the use of the scale-offset filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! scale_type - Flag indicating compression method. Valid values: +! H5Z_SO_FLOAT_DSCALE_F +! H5Z_SO_FLOAT_ESCALE_F +! H5Z_SO_INT_F +! +! scale_factor - Parameter related to scale. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(IN) :: scale_type + INTEGER , INTENT(IN) :: scale_factor + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: scale_type + INTEGER, INTENT(IN) :: scale_factor + END FUNCTION h5pset_scaleoffset_c + END INTERFACE + + hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) + + END SUBROUTINE h5pset_scaleoffset_f + +!****s* H5P/h5pset_nlinks_f +! NAME +! h5pset_nlinks_f +! +! PURPOSE +! Sets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(IN) :: nlinks + END FUNCTION h5pset_nlinks_c + END INTERFACE + + hdferr = h5pset_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pset_nlinks_f + +!****s* H5P/h5pget_nlinks_f +! NAME +! h5pget_nlinks_f +! +! PURPOSE +! Gets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(OUT) :: nlinks + END FUNCTION h5pget_nlinks_c + END INTERFACE + + hdferr = h5pget_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pget_nlinks_f + +!****s* H5P/H5Pget_create_inter_group_f +! NAME +! H5Pget_create_inter_group_f +! +! PURPOSE +! Determines whether property is set to enable creating missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - Specifying whether to create intermediate groups upon +! the creation of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 4, 2008 +! +! HISTORY +! +! The long subroutine name (>31) on older f90 compilers causes problems +! so the name was shortened +! Fortran90 Interface: + SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups + ! upon creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pget_create_inter_group_c + END INTERFACE + + hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pget_create_inter_group_f + +!****s* H5P/H5Pset_chunk_cache_f +! NAME +! H5Pset_chunk_cache_f +! +! PURPOSE +! Set the number of objects in the meta data cache and the +! maximum number of chunks and bytes in the raw data chunk cache. +! Once set, these values will override the values in the file access +! property list. Each of these values can be individually unset +! (or not set at all) by passing the macros: +! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, +! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or +! H5D_CHUNK_CACHE_W0_DFLT_F +! as appropriate. +! +! The RDCC_W0 value should be between 0 and 1 inclusive and +! indicates how much chunks that have been fully read or fully +! written are favored for preemption. A value of zero means +! fully read or written chunks are treated no differently than +! other chunks (the preemption is strictly LRU) while a value +! of one means fully read chunks are always preempted before +! other chunks. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. +! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. +! rdcc_w0 - The chunk preemption policy for this dataset. +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data + ! chunk cache for this dataset. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache + ! for this dataset. + REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_chunk_cache_c + END INTERFACE + + hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pset_chunk_cache_f + +!****s* H5P/H5Pget_chunk_cache_f +! NAME +! H5Pget_chunk_cache_f +! +! PURPOSE +! Retrieves the maximum possible number of elements in the meta +! data cache and the maximum possible number of elements and +! bytes and the RDCC_W0 value in the raw data chunk cache. Any +! (or all) arguments may be null pointers in which case the +! corresponding datum is not returned. If these properties have +! not been set on this property list, the default values for a +! file access property list are returned. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! OUTPUTS +! +! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. +! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. +! rdcc_w0 - Preemption policy. +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_chunk_cache_c + END INTERFACE + + hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pget_chunk_cache_f + +END MODULE H5P + + + diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90 new file mode 100644 index 0000000..01d1d98 --- /dev/null +++ b/fortran/src/H5Pff_F03.f90 @@ -0,0 +1,1267 @@ +!****h* ROBODoc/H5P (F03) +! +! NAME +! H5P_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions. +! It contains the same functions as H5Pff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Pff_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 H5P 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 H5P_PROVISIONAL + + USE H5GLOBAL + + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_fill_value_ptr + + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_fill_value_ptr + + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_ptr + + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_real + MODULE PROCEDURE h5pget_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_ptr + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + MODULE PROCEDURE h5pregister_real + MODULE PROCEDURE h5pregister_char + ! Recommended procedure: + MODULE PROCEDURE h5pregister_ptr + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_char + ! Recommended procedure: + MODULE PROCEDURE h5pinsert_ptr + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pget_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pget_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pset_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pset_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pset_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pget_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pget_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & + BIND(C, NAME='h5pregister_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pregister_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & + BIND(C, NAME='h5pinsert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pinsert_c + END INTERFACE + +CONTAINS + +! +!****s* H5P (F03)/h5pset_fill_value_f_F90 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! IMPLICIT NONE +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_integer +! +!****s* H5P (F03)/h5pget_fill_value_f_F90 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_integer + + + SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_real + + + SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_real + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr ! C address + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(fillvalue) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + f_ptr = C_LOC(chr(1)(1:1)) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + DO i = 1, chr_len + fillvalue(i:i) = chr(i) + ENDDO + DEALLOCATE(chr) + + END SUBROUTINE h5pget_fill_value_char +! +!****s* H5P (F03)/h5pset_fill_value_f_F03 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pset_fill_value_ptr + +! +!****s* H5P (F03)/h5pget_fill_value_f_F03 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pget_fill_value_ptr + +! +!****s* H5P (F03)/h5pset_f_F90 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_integer + + SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_real + + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pset_char +! +!****s* H5P (F03)/h5pget_f_F90 +! +! NAME +! h5pget_f +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pget_integer + + SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_real + + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + TYPE(C_PTR) :: f_ptr + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DO i = 1, chr_len + value(i:i) = chr(i) + ENDDO + + DEALLOCATE(chr) + + END SUBROUTINE h5pget_char + + +! +!****s* H5P (F03)/h5pset_f_F03 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Pointer to value to set the property to +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pset_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pset_ptr +! +!****s* H5P (F03)/h5pget_f_F03 +! +! NAME +! h5pget_f (F03) +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Pointer to a location to which to copy the value of of the property +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pget_ptr + + +! +!****s* H5P (F03)/h5pregister_f_F90 +! +! NAME +! h5pregister +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_integer + + SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_real + + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + DEALLOCATE(chr) + END SUBROUTINE h5pregister_char +! +!****s* H5P (F03)/h5pregister_f_F03 +! +! NAME +! h5pregister (F03) +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Pointer to value to set the property to +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, value) + END SUBROUTINE h5pregister_ptr + +! +!****s* H5P (F03)/h5pinsert_f_F90 +! +! NAME +! h5pinsert (f90) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + END SUBROUTINE h5pinsert_integer + + SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_real + + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(c_ptr) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pinsert_char + +! +!****s* H5P (F03)/h5pinsert_f_F03 +! +! NAME +! h5pinsert (f03) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Pointer to new value pointer for the property being modified +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + TYPE(c_ptr), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_ptr +! +!****s* H5P (F03)/h5pcreate_class_f_F03 +! +! NAME +! h5pcreate_class_f +! +! PURPOSE +! Create a new property list class +! +! Inputs: +! parent - Parent property list class identifier +! Possible values include: +! H5P_ROOT_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! name - Name of property to create +! +! Outputs: +! class - Property list class identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! H5P_cls_create_func_t (create) - Callback routine called when a property list is created +! create_data - User pointer to any class creation information needed +! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied +! copy_data - User pointer to any class copy information needed +! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed +! close_data - User pointer to any class close information needed +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Added callback arguments +! M. Scot Breitenfeld, July 3, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: class + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data + TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close +!***** + INTEGER :: name_len + TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default + TYPE(C_FUNPTR) :: create_default, copy_default, close_default + INTERFACE + INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & + create, create_data, copy, copy_data, close, close_data) & + BIND(C, NAME='h5pcreate_class_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + TYPE(C_PTR), VALUE :: create_data, copy_data, close_data + TYPE(C_FUNPTR), VALUE :: create, copy, close + END FUNCTION h5pcreate_class_c + END INTERFACE + name_len = LEN(name) + + create_default = c_null_funptr !fix:scot + create_data_default = c_null_ptr + copy_default = c_null_funptr !fix:scot + copy_data_default = c_null_ptr + close_default = c_null_funptr !fix:scot + close_data_default = c_null_ptr + + IF(PRESENT(create)) create_default = create + IF(PRESENT(create_data)) create_data_default = create_data + IF(PRESENT(copy)) copy_default = copy + IF(PRESENT(copy_data)) copy_data_default = copy_data + IF(PRESENT(close)) close_default = close + IF(PRESENT(close_data)) close_data_default = close_data + + hdferr = h5pcreate_class_c(parent, name , name_len, class, & + create_default, create_data_default, & + copy_default, copy_data_default, & + close_default, close_data_default) + + END SUBROUTINE h5pcreate_class_f + +! +!****s* H5P (F03)/h5pset_file_image_f_F03 +! +! NAME +! h5pset_file_image_f +! +! PURPOSE +! Sets an initial file image in a memory buffer. +! +! Inputs: +! fapl_id - File access property list identifier +! buf_ptr - Pointer to the initial file image, +! or C_NULL_PTR if no initial file image is desired +! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(IN) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & + BIND(C, NAME='h5pset_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + END FUNCTION h5pset_file_image_c + END INTERFACE + + hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) + + END SUBROUTINE h5pset_file_image_f +! +!****s* H5P (F03)/h5pget_file_image_f_F03 +! +! NAME +! h5pget_file_image_f +! +! PURPOSE +! Retrieves a copy of the file image designated as the initial content and structure of a file. +! +! Inputs: +! fapl_id - File access property list identifier. +! +! Outputs: +! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type +! c_loc. If buf_ptr is not C_NULL_PTR, on successful +! return, buf_ptr shall contain a C pointer to a copy +! of the initial image provided in the last call to +! H5Pset_file_image_f for the supplied fapl_id, or +! buf_ptr shall contain a C_NULL_PTR if there is no +! initial image set. +! +! buf_len_ptr - Contains the value of the buffer parameter for +! the initial image in the supplied fapl_id. The value +! will be 0 if no initial image is set. +! +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + INTEGER , INTENT(OUT) :: hdferr + +!***** + INTERFACE + INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & + BIND(C, NAME='h5pget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + END FUNCTION h5pget_file_image_c + END INTERFACE + + hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) + + END SUBROUTINE h5pget_file_image_f + +END MODULE H5P_PROVISIONAL + diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90 new file mode 100644 index 0000000..b5ea13d --- /dev/null +++ b/fortran/src/H5Pff_F90.f90 @@ -0,0 +1,949 @@ +!****h* ROBODoc/H5P (_F90) +! +! NAME +! H5P_PROVISIONAL +! +! PURPOSE +! +! This file contains Fortran 90 interfaces for H5P functions. It contains +! the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Pff_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. * +! 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 H5P 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 H5P_PROVISIONAL + + USE H5GLOBAL + + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_char + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_char + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_char + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_real + MODULE PROCEDURE h5pget_char + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + MODULE PROCEDURE h5pregister_real + MODULE PROCEDURE h5pregister_char + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_char + END INTERFACE + +CONTAINS +! +!****s* H5P (F90)/h5pset(get)fill_value_f +! +! NAME +! h5pset(get)fill_value_f +! +! PURPOSE +! Sets(gets) fill value for a dataset creation property list +! +! INPUTS +! prp_id - dataset creation property list identifier +! type_id - datatype identifier for fill value +! fillvalue - fill value +! OUTPUTS +! type_id - datatype identifier for fill value +! fillvalue - fill value +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! SOURCE + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_INTEGER_C'::h5pset_fill_value_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_value_integer_c + END INTERFACE + + hdferr = h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_integer + + + SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_INTEGER_C'::h5pget_fill_value_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: fillvalue + END FUNCTION h5pget_fill_value_integer_c + END INTERFACE + + hdferr = h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_integer + + + SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_real_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_REAL_C'::h5pset_fill_value_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + REAL, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_value_real_c + END INTERFACE + + hdferr = h5pset_fill_value_real_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_real + + + SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + REAL, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_real_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_REAL_C'::h5pget_fill_value_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + REAL :: fillvalue + END FUNCTION h5pget_fill_value_real_c + END INTERFACE + + hdferr = h5pget_fill_value_real_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_real + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_fill_valuec_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUEC_C'::h5pset_fill_valuec_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: fillvalue + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_valuec_c + END INTERFACE + + hdferr = h5pset_fill_valuec_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_valuec_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUEC_C'::h5pget_fill_valuec_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: fillvalue + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER :: fillvalue + END FUNCTION h5pget_fill_valuec_c + END INTERFACE + + hdferr = h5pget_fill_valuec_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_char +! +!****s* H5P (F90)/h5pset_integer +! +! NAME +! h5pset_integer +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pset_integer_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_INTEGER_C'::h5pset_integer_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER, INTENT(IN) :: value + END FUNCTION h5pset_integer_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pset_integer_c(prp_id, name , name_len, value) + END SUBROUTINE h5pset_integer + +! +!****s* H5P (F90)/h5pset_real +! +! NAME +! h5pset_real +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pset_real_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_REAL_C'::h5pset_real_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + REAL, INTENT(IN) :: value + END FUNCTION h5pset_real_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pset_real_c(prp_id, name , name_len, value) + END SUBROUTINE h5pset_real + +!****s* H5P (F90)/h5pset_char +! +! NAME +! h5pset_char +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + INTEGER :: value_len + + INTERFACE + INTEGER FUNCTION h5psetc_c(prp_id, name, name_len, value, value_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSETC_C'::h5psetc_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: value + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(IN) :: value_len + END FUNCTION h5psetc_c + END INTERFACE + + name_len = LEN(name) + value_len = LEN(value) + hdferr = h5psetc_c(prp_id, name , name_len, value, value_len) + END SUBROUTINE h5pset_char + +!****s* H5P (F90)/h5pget_integer +! +! NAME +! h5pget_integer +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_integer_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_INTEGER_C'::h5pget_integer_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER, INTENT(OUT) :: value + END FUNCTION h5pget_integer_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pget_integer_c(prp_id, name , name_len, value) + END SUBROUTINE h5pget_integer + +! +!****s* H5P (F90)/h5pget_real +! +! NAME +! h5pget_real +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_real_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_REAL_C'::h5pget_real_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + REAL, INTENT(OUT) :: value + END FUNCTION h5pget_real_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pget_real_c(prp_id, name , name_len, value) + END SUBROUTINE h5pget_real + +! +!****s* H5P (F90)/h5pget_char +! +! NAME +! h5pget_char +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + INTEGER :: value_len + + INTERFACE + INTEGER FUNCTION h5pgetc_c(prp_id, name, name_len, value, value_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGETC_C'::h5pgetc_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: value + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + CHARACTER(LEN=*), INTENT(OUT) :: value + INTEGER, INTENT(IN) :: value_len + END FUNCTION h5pgetc_c + END INTERFACE + + name_len = LEN(name) + value_len = LEN(value) + hdferr = h5pgetc_c(prp_id, name , name_len, value, value_len) + END SUBROUTINE h5pget_char + +! +!****s* H5P (F90)/h5pregister_integer +! +! NAME +! h5pregister_integer +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pregister_integer_c(class, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_INTEGER_C'::h5pregister_integer_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(IN) :: value + END FUNCTION h5pregister_integer_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pregister_integer_c(class, name , name_len, size, value) + END SUBROUTINE h5pregister_integer + +!****s* H5P (F90)/h5pregister_real +! +! NAME +! +! h5pregister_real +! +! PURPOSE Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + REAL, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pregister_real_c(class, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_REAL_C'::h5pregister_real_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + REAL, INTENT(IN) :: value + END FUNCTION h5pregister_real_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pregister_real_c(class, name , name_len, size, value) + END SUBROUTINE h5pregister_real + +! +!****s* H5P (F90)/h5pregister_char +! +! NAME +! h5pregister_char +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + INTEGER :: value_len + + INTERFACE + INTEGER FUNCTION h5pregisterc_c(class, name, name_len, size, value, & + value_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTERC_C'::h5pregisterc_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: value + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(IN) :: value_len + END FUNCTION h5pregisterc_c + END INTERFACE + + name_len = LEN(name) + value_len = LEN(value) + hdferr = h5pregisterc_c(class, name , name_len, size, value, value_len) + END SUBROUTINE h5pregister_char +! +!****s* H5P (F90)/h5pinsert_integer +! +! NAME +! h5pinsert_integer +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pinsert_integer_c(plist, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_INTEGER_C'::h5pinsert_integer_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(IN) :: value + END FUNCTION h5pinsert_integer_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pinsert_integer_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_integer + +! +!****s* H5P (F90)/h5pinsert_real +! +! NAME +! h5pinsert_real +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + REAL, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pinsert_real_c(plist, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_REAL_C'::h5pinsert_real_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + REAL, INTENT(IN) :: value + END FUNCTION h5pinsert_real_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pinsert_real_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_real + + +! +!****s* H5P (F90)/h5pinsert_char +! +! NAME +! h5pinsert_char +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE +SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + INTEGER :: value_len + + INTERFACE + INTEGER FUNCTION h5pinsertc_c(plist, name, name_len, size, value, value_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERTC_C'::h5pinsertc_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: value + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(IN) :: value_len + END FUNCTION h5pinsertc_c + END INTERFACE + + name_len = LEN(name) + value_len = LEN(value) + hdferr = h5pinsertc_c(plist, name , name_len, size, value, value_len) + END SUBROUTINE h5pinsert_char + +! +!****s* H5P (F90)/h5pcreate_class_f +! +! NAME +! h5pcreate_class_f +! +! PURPOSE +! Create a new property list class +! +! INPUTS +! parent - Property list identifier of the parent class +! Possible values include: +! H5P_ROOT_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! name - name of the class we are creating +! OUTPUTS +! class - property list class identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent ! parent property list class + ! identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! name of property tocreate + INTEGER(HID_T), INTENT(OUT) :: class ! property list class identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pcreate_class_f90_c(parent, name, name_len, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_CLASS_F90_C'::h5pcreate_class_f90_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + END FUNCTION h5pcreate_class_f90_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pcreate_class_f90_c(parent, name, name_len, class) + + END SUBROUTINE h5pcreate_class_f + +END MODULE H5P_PROVISIONAL + diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 9cd9950..068f24e 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -1,6 +1,6 @@ /****h* H5Rf/H5Rf * PURPOSE - * This file contains C stubs for H5R Fortran APIs + * This file contains C stubs for H5R Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -24,21 +24,68 @@ #include "H5f90.h" #include "H5Eprivate.h" +/****if* H5Rf/h5rcreate_object_c + * NAME + * h5rcreate_object_c + * PURPOSE + * Call H5Rcreate to create a reference to an object + * INPUTS + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * OUTPUTS + * ref - reference to the object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, December 1, 1999 + * SOURCE +*/ +int_f +nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) +/******/ +{ + char *c_name = NULL; + hobj_ref_t ref_c; + int_f ret_value = 0; + + /* + * Convert FORTRAN name to C name + */ + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) + HGOTO_DONE(FAIL) + + /* + * Call H5Rcreate function. + */ + if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0) + HGOTO_DONE(FAIL) + + /* Copy the reference created */ + *ref = (haddr_t_f)ref_c; + +done: + if(c_name) + HDfree(c_name); + return ret_value; +} /* nh5rcreate_object_c() */ + /****if* H5Rf/h5rcreate_region_c * NAME - * h5rcreate_region_c + * h5rcreate_region_c * PURPOSE - * Call H5Rcreate to create a reference to dataset region - * region + * Call H5Rcreate to create a reference to dataset region + * region * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * space_id - dataset space identifier + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * space_id - dataset space identifier * OUTPUTS - * ref - reference to the dataset region + * ref - reference to the dataset region * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -47,7 +94,7 @@ * SOURCE */ int_f -h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) +nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) /******/ { char *c_name = NULL; @@ -73,7 +120,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* end h5rcreate_region_c() */ +} /* end nh5rcreate_region_c() */ /****if* H5Rf/h5rcreate_ptr_c * NAME @@ -118,6 +165,89 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r return ret_value; } +/****if* H5Rf/h5rdereference_region_c + * NAME + * h5rdereference_region_c + * PURPOSE + * Call H5Rdereference to dereference to dataset region + * INPUTS + * dset_id - dataset identifier + * ref - reference to the dataset region + * OUTPUTS + * obj_id - dereferenced dataset identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, December 1, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) +/******/ +{ + hdset_reg_ref_t ref_c; + hid_t c_obj_id; + int_f ret_value = 0; + + /* Copy the reference to dereference */ + HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); + + /* + * Call H5Rdereference function. + */ + if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_c)) < 0) + HGOTO_DONE(FAIL) + + /* Copy the object's ID */ + *obj_id = (hid_t_f)c_obj_id; + +done: + return ret_value; +} /* end nh5rdereference_region_c() */ + +/****if* H5Rf/h5rdereference_object_c + * NAME + * h5rdereference_object_c + * PURPOSE + * Call H5Rdereference to dereference an object + * INPUTS + * dset_id - dataset identifier + * ref - reference to an object + * OUTPUTS + * obj_id - dereferenced object identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, December 1, 1999 + * HISTORY + * + * SOURCE +*/ +int_f +nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) +/******/ +{ + hid_t c_obj_id; + hobj_ref_t ref_c = (hobj_ref_t)*ref; + int_f ret_value = 0; + + /* + * Call H5Rdereference function. + */ + if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_OBJECT, &ref_c)) < 0) + HGOTO_DONE(FAIL) + + /* Copy the object's ID */ + *obj_id = (hid_t_f)c_obj_id; + +done: + return ret_value; +} /* end nh5rdereference_object_c() */ + /****if* H5Rf/h5rdereference_ptr_c * NAME * h5rdereference_ptr_c @@ -125,7 +255,7 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r * Call H5Rdereference * INPUTS * obj_id - Valid identifier for the file containing the - * referenced object or any object in that file. + * referenced object or any object in that file. * ref_typ - The reference type of ref. * ref - Object reference * OUTPUTS @@ -162,8 +292,8 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -176,7 +306,7 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * SOURCE */ int_f -h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) +nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; @@ -197,7 +327,7 @@ h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) done: return ret_value; -} /* end h5rget_region_region_c() */ +} /* end nh5rget_region_region_c() */ /****if* H5Rf/h5rget_region_ptr_c * NAME @@ -205,8 +335,8 @@ done: * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -236,22 +366,22 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) done: return ret_value; -} /* end h5rget_region_ptr_c() */ +} /* end nh5rget_region_ptr_c() */ /****if* H5Rf/h5rget_object_type_obj_c * NAME - * h5rget_object_type_obj_c + * h5rget_object_type_obj_c * PURPOSE - * Call H5Rget_object_type to retrieve the type of the object reference points - * to + * Call H5Rget_object_type to retrieve the type of the object reference points + * to * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS - * obj_type - type of dereferenced object + * obj_type - type of dereferenced object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -260,7 +390,7 @@ done: * SOURCE */ int_f -h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) +nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) /******/ { H5O_type_t c_obj_type; @@ -278,7 +408,125 @@ h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) done: return ret_value; -} /* end h5rget_object_type_obj_c() */ +} /* end nh5rget_object_type_obj_c() */ + +/****if* H5Rf/h5rget_name_object_c + * NAME + * h5rget_name_object_c + * PURPOSE + * Call H5Rget_name for an object + * INPUTS + * + * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. + * ref - An object or dataset region reference. + * + * OUTPUTS + * name - A name associated with the referenced object or dataset region. + * size - The size of the name buffer. + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * March 31, 2008 + * HISTORY + * + * SOURCE +*/ +int_f +nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +/******/ +{ + hobj_ref_t ref_c = (hobj_ref_t)*ref; + ssize_t c_size; + size_t c_bufsize = (size_t)*name_len + 1; + char *c_buf = NULL; /* Buffer to hold C string */ + int_f ret_value = 0; + + + /* + * Allocate buffer to hold name of an attribute + */ + if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) + HGOTO_DONE(FAIL) + + /* + * Call H5Rget_name function. + */ + if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0) + HGOTO_DONE(FAIL) + + /* + * Convert C name to FORTRAN and place it in the given buffer + */ + HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1); + *size_default = (size_t_f)c_size; + +done: + if(c_buf) + HDfree(c_buf); + return ret_value; +} /* end nh5rget_name_object_c() */ + +/****if* H5Rf/h5rget_name_region_c + * NAME + * h5rget_name_region_c + * PURPOSE + * Call H5Rget_name for a dataset region + * INPUTS + * + * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. + * ref - An object or dataset region reference. + * + * OUTPUTS + * name - A name associated with the referenced object or dataset region. + * size - The size of the name buffer. + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * March 31, 2008 + * HISTORY + * + * SOURCE +*/ +int_f +nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +/******/ +{ + hdset_reg_ref_t ref_c; + ssize_t c_size; + size_t c_bufsize = (size_t)*name_len + 1; + char *c_buf = NULL; /* Buffer to hold C string */ + int_f ret_value = 0; + + /* Copy the reference to query */ + HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); + + /* + * Allocate buffer to hold name of an attribute + */ + if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) + HGOTO_DONE(FAIL) + + /* + * Call H5Rget_name function. + */ + if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0) + HGOTO_DONE(FAIL) + + /* + * Convert C name to FORTRAN and place it in the given buffer + */ + HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1); + *size_default = (size_t_f)c_size; + +done: + if(c_buf) + HDfree(c_buf); + return ret_value; +} /****if* H5Rf/h5rget_name_ptr_c * NAME @@ -287,13 +535,13 @@ done: * Call H5Rget_name * INPUTS * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref_type - Type of reference. - * ref - An object or dataset region reference. + * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. + * ref_type - Type of reference. + * ref - An object or dataset region reference. * * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. + * name - A name associated with the referenced object or dataset region. + * size - The size of the name buffer. * * RETURNS * 0 on success, -1 on failure @@ -341,24 +589,24 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_ /****if* H5Rf/h5rget_obj_type_c * NAME - * h5rget_obj_type_c + * h5rget_obj_type_c * PURPOSE - * Call H5Rget_obj_type + * Call H5Rget_obj_type * INPUTS - * loc_id - Identifier for the dataset containing the reference or - * for the group that dataset is in. - * ref_type - Type of reference to query. - * ref - Reference to query. + * loc_id - Identifier for the dataset containing the reference or + * for the group that dataset is in. + * ref_type - Type of reference to query. + * ref - Reference to query. * * OUTPUTS - * obj_type - Type of referenced object. These are defined in H5Opublic.h, - * enum H5O_type_t + * obj_type - Type of referenced object. These are defined in H5Opublic.h, + * enum H5O_type_t * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * M. Scot Breitenfeld - * December 17, 2008 + * M. Scot Breitenfeld + * December 17, 2008 * * SOURCE */ diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 deleted file mode 100644 index a90bd9a..0000000 --- a/fortran/src/H5Rff.F90 +++ /dev/null @@ -1,792 +0,0 @@ -!****h* ROBODoc/H5R -! -! NAME -! MODULE H5R -! -! FILE -! fortran/src/H5Rff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5R 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 -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5R 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 H5R - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR - USE H5GLOBAL - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - - INTERFACE h5rget_object_type_f - - MODULE PROCEDURE h5rget_object_type_obj_f - - END INTERFACE - - TYPE :: hdset_reg_ref_t_f03 - INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref - END TYPE hdset_reg_ref_t_f03 - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 - - END INTERFACE - - - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f ! obsolete - MODULE PROCEDURE h5rcreate_region_f ! obsolete - MODULE PROCEDURE h5rcreate_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f ! obsolete - MODULE PROCEDURE h5rdereference_region_f ! obsolete - MODULE PROCEDURE h5rdereference_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f ! obsolete - MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & - BIND(C, NAME='h5rget_name_ptr_c') - IMPORT :: c_char, c_ptr - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: name_len - INTEGER(SIZE_T) :: size_default - END FUNCTION h5rget_name_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & - BIND(C, NAME='h5rdereference_ptr_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - END FUNCTION h5rdereference_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & - BIND(C, NAME='h5rcreate_ptr_c') - IMPORT :: c_ptr, c_char - IMPORT :: HID_T - IMPLICIT NONE - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: ref_type - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & - BIND(C, NAME='h5rget_region_ptr_c') - IMPORT :: c_ptr - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_ptr_c - END INTERFACE - - -CONTAINS - -!****s* H5R/h5rget_object_type_obj_f -! -! NAME -! h5rget_object_type_obj_f -! -! PURPOSE -! Retrieves the type of object that an object reference points to. -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the objects -! ref - reference to open -! OUTPUTS -! obj_type - object_type, possible values: -! H5G_UNKNOWN_F -! H5G_GROUP_F -! H5G_DATASET_F -! H5G_TYPE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_object_type_f -! subroutine. -! SOURCE - SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER, INTENT(OUT) :: obj_type ! Object type - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) BIND(C, NAME='h5rget_object_type_obj_c') - IMPORT :: HID_T, HADDR_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5rget_object_type_obj_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) - - END SUBROUTINE h5rget_object_type_obj_f - - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) BIND(C, NAME='h5rget_region_region_c') - IMPORT :: HID_T, REF_REG_BUF_LEN - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - -!****s* H5R/h5rget_region_ptr_f -! -! NAME -! h5rget_region_ptr_f -! -! PURPOSE -! Retrieves a dataspace with the specified region -! selected using pointer -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! August 4, 2012 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) - - END SUBROUTINE h5rget_region_ptr_f - - -!****s* H5R (F03)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! Inputs: -! loc_id - location identifier -! name - name of the object at the specified location -! Outputs: -! ref - reference to the specified object -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! Signature: - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - namelen = LEN(name) - - hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) BIND(C,NAME='h5rcreate_region_c') - IMPORT :: HID_T, REF_REG_BUF_LEN - IMPORT :: C_CHAR - IMPLICIT NONE - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f - -!****s* H5R (F03)/h5rcreate_ptr_f -! -! NAME -! h5rcreate_ptr_f -! -! PURPOSE -! Creates a reference. -! -! Inputs: -! loc_id - location identifier -! name - name of the dataset at the specified location -! ref_type - type of reference: -! H5R_OBJECT -! H5T_STD_REF_DSETREG -! Outputs: -! ref - reference created by the function call. -! hdferr - returns 0 if successful and -1 if fails. -! OPTIONAL -! space_id - dataspace identifier that describes selected region -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rcreate_f -! subroutine where the output is a pointer. -! -! Signature: - SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER, INTENT(IN) :: ref_type ! type of reference - TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: space_id_c - - namelen = LEN(name) - space_id_c = -1 - IF(PRESENT(space_id)) space_id_c = space_id - hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) - - END SUBROUTINE h5rcreate_ptr_f -!****s* H5R (F03)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference -! ref - reference to open -! Outputs: -! obj_id - object_identifier -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F03)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to teh regions -! ref - reference to open -! Outputs: -! obj_id - dataspace identifier -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_region_f - -!****s* H5R (F03)/h5rdereference_ptr_f -! -! NAME -! h5rdereference_ptr_f -! -! PURPOSE -! Opens the HDF5 object referenced. -! -! Inputs: -! obj_id - valid identifier for the file containing the -! referenced object or any object in that file. -! ref_type - the reference type of ref. -! ref - Reference to open. -! Outputs: -! ref_obj_id - identifier of referenced object -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rdereference_f -! subroutine using pointers. -! -! Signature: - SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the - ! referenced object or any object in that file. - INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. - TYPE(C_PTR), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) - - END SUBROUTINE h5rdereference_ptr_f -! -!****s* H5R (F03)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - 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 -!****s* H5R (F03)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - - !****s* H5R (F03)/h5rget_name_ptr_f - ! - ! NAME - ! h5rget_name_ptr_f - ! - ! PURPOSE - ! Retrieves a name of a referenced object. - ! - ! Inputs: - ! 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 - Returns 0 if successful and -1 if fails. - ! - ! Optional parameters: - ! 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: - 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 - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_ptr_f - - !****s* H5R (F03)/h5rget_obj_type_f - ! - ! NAME - ! h5rget_obj_type_f - ! - ! PURPOSE - ! Retrieves the type of object that an object reference points to. - ! - ! Inputs: - ! loc_id - Identifier for the dataset containing the reference or - ! for the group that dataset is in. - ! ref_type - Type of reference to query. - ! ref - Reference to query. - ! - ! Outputs: - ! obj_type - Type of referenced object. - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - ! - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! Decemeber 17, 2008 - ! - ! Signature: - SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - INTEGER, INTENT(OUT) :: obj_type - INTEGER, INTENT(OUT) :: hdferr - !***** - - INTERFACE - INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & - BIND(C, NAME='h5rget_obj_type_c') - IMPORT :: C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), VALUE :: ref - INTEGER :: obj_type - END FUNCTION h5rget_obj_type_c - END INTERFACE - - hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) - - END SUBROUTINE h5rget_obj_type_f - -END MODULE H5R diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 new file mode 100644 index 0000000..77a1ff8 --- /dev/null +++ b/fortran/src/H5Rff.f90 @@ -0,0 +1,128 @@ +!****h* ROBODoc/H5R +! +! NAME +! MODULE H5R +! +! FILE +! fortran/src/H5Rff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5R functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5R 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 H5R + USE H5GLOBAL + + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! + ! TYPE hobj_ref_t_f + ! INTEGER ref(REF_OBJ_BUF_LEN) + ! END TYPE + ! + ! TYPE hdset_reg_ref_t_f + ! INTEGER ref(REF_REG_BUF_LEN) + ! END TYPE + ! + + INTERFACE h5rget_object_type_f + + MODULE PROCEDURE h5rget_object_type_obj_f + + END INTERFACE + +CONTAINS + +!****s* H5R/h5rget_object_type_obj_f +! +! NAME +! h5rget_object_type_obj_f +! +! PURPOSE +! Retrieves the type of object that an object reference points to. +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the objects +! ref - reference to open +! OUTPUTS +! obj_type - object_type, possible values: +! H5G_UNKNOWN_F +! H5G_GROUP_F +! H5G_DATASET_F +! H5G_TYPE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_object_type_f +! subroutine. +! SOURCE + SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER, INTENT(OUT) :: obj_type ! Object type + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_OBJECT_TYPE_OBJ_C':: h5rget_object_type_obj_c + !DEC$ENDIF + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T) :: ref_f + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5rget_object_type_obj_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) + + END SUBROUTINE h5rget_object_type_obj_f + +END MODULE H5R diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90 new file mode 100644 index 0000000..8f40607 --- /dev/null +++ b/fortran/src/H5Rff_F03.f90 @@ -0,0 +1,719 @@ +!****h* ROBODoc/H5R (F03) +! +! NAME +! MODULE H5R_PROVISIONAL +! +! FILE +! fortran/src/H5Rff_F03.f90 +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions. +! It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled. +! +! 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 H5R 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 H5R_PROVISIONAL + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! + ! TYPE hobj_ref_t_f + ! INTEGER ref(REF_OBJ_BUF_LEN) + ! END TYPE + ! + ! TYPE hdset_reg_ref_t_f + ! INTEGER ref(REF_REG_BUF_LEN) + ! END TYPE + ! + + TYPE :: hdset_reg_ref_t_f03 + INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref + END TYPE hdset_reg_ref_t_f03 + + INTERFACE h5rget_region_f + + MODULE PROCEDURE h5rget_region_region_f ! obsolete + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + + END INTERFACE + + + INTERFACE h5rcreate_f + + MODULE PROCEDURE h5rcreate_object_f ! obsolete + MODULE PROCEDURE h5rcreate_region_f ! obsolete + MODULE PROCEDURE h5rcreate_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rdereference_f + + MODULE PROCEDURE h5rdereference_object_f ! obsolete + MODULE PROCEDURE h5rdereference_region_f ! obsolete + MODULE PROCEDURE h5rdereference_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rget_name_f + + MODULE PROCEDURE h5rget_name_object_f ! obsolete + MODULE PROCEDURE h5rget_name_region_f ! obsolete + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 + + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & + BIND(C, NAME='h5rget_name_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: name_len + INTEGER(SIZE_T) :: size_default + END FUNCTION h5rget_name_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & + BIND(C, NAME='h5rdereference_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + END FUNCTION h5rdereference_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & + BIND(C, NAME='h5rcreate_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: ref_type + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & + BIND(C, NAME='h5rget_region_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_ptr_c + END INTERFACE + +CONTAINS + +!****s* H5R/h5rget_region_region_f +! +! NAME +! h5rget_region_region_f +! +! PURPOSE +! Retrieves a dataspace with the specified region selected +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) + + END SUBROUTINE h5rget_region_region_f + +!****s* H5R/h5rget_region_ptr_f +! +! NAME +! h5rget_region_ptr_f +! +! PURPOSE +! Retrieves a dataspace with the specified region +! selected using pointer +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! August 4, 2012 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + + END SUBROUTINE h5rget_region_ptr_f + + +!****s* H5R (F03)/h5rcreate_object_f +! +! NAME +! h5rcreate_object_f +! +! PURPOSE +! Creates reference to the object +! +! Inputs: +! loc_id - location identifier +! name - name of the object at the specified location +! Outputs: +! ref - reference to the specified object +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! Signature: + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + namelen = LEN(name) + + hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) + + END SUBROUTINE h5rcreate_object_f + +!****s* H5R (F90)/h5rcreate_region_f +! +! NAME +! h5rcreate_region_f +! +! PURPOSE +! Creates reference to the dataset region +! +! INPUTS +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region +! OUTPUTS +! ref - reference to the dataset region +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_region_f + +!****s* H5R (F03)/h5rcreate_ptr_f +! +! NAME +! h5rcreate_ptr_f +! +! PURPOSE +! Creates a reference. +! +! Inputs: +! loc_id - location identifier +! name - name of the dataset at the specified location +! ref_type - type of reference: +! H5R_OBJECT +! H5T_STD_REF_DSETREG +! Outputs: +! ref - reference created by the function call. +! hdferr - returns 0 if successful and -1 if fails. +! OPTIONAL +! space_id - dataspace identifier that describes selected region +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rcreate_f +! subroutine where the output is a pointer. +! +! Signature: + SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER, INTENT(IN) :: ref_type ! type of reference + TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: space_id_c + + namelen = LEN(name) + space_id_c = -1 + IF(PRESENT(space_id)) space_id_c = space_id + hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) + + END SUBROUTINE h5rcreate_ptr_f +!****s* H5R (F03)/h5rdereference_object_f +! +! NAME +! h5rdereference_object_f +! +! PURPOSE +! Opens the HDF5 object referenced +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference +! ref - reference to open +! Outputs: +! obj_id - object_identifier +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_object_f +!****s* H5R (F03)/h5rdereference_region_f +! +! NAME +! h5rdereference_region_f +! +! PURPOSE +! Opens the dataset region +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference to teh regions +! ref - reference to open +! Outputs: +! obj_id - dataspace identifier +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_region_f + +!****s* H5R (F03)/h5rdereference_ptr_f +! +! NAME +! h5rdereference_ptr_f +! +! PURPOSE +! Opens the HDF5 object referenced. +! +! Inputs: +! obj_id - valid identifier for the file containing the +! referenced object or any object in that file. +! ref_type - the reference type of ref. +! ref - Reference to open. +! Outputs: +! ref_obj_id - identifier of referenced object +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rdereference_f +! subroutine using pointers. +! +! Signature: + SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the + ! referenced object or any object in that file. + INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. + TYPE(C_PTR), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + ! Identifier of referenced object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) + + END SUBROUTINE h5rdereference_ptr_f +! +!****s* H5R (F03)/h5rget_name_object_f +! +! NAME +! h5rget_name_object_f +! +! PURPOSE +! Retrieves a name of a referenced object. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + 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 +!****s* H5R (F03)/h5rget_name_region_f +! +! NAME +! h5rget_name_region_f +! +! PURPOSE +! Retrieves a name of a dataset region. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_region_f + + !****s* H5R (F03)/h5rget_name_ptr_f + ! + ! NAME + ! h5rget_name_ptr_f + ! + ! PURPOSE + ! Retrieves a name of a referenced object. + ! + ! Inputs: + ! 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 - Returns 0 if successful and -1 if fails. + ! + ! Optional parameters: + ! 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: + 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 + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_ptr_f + + !****s* H5R (F03)/h5rget_obj_type_f + ! + ! NAME + ! h5rget_obj_type_f + ! + ! PURPOSE + ! Retrieves the type of object that an object reference points to. + ! + ! Inputs: + ! loc_id - Identifier for the dataset containing the reference or + ! for the group that dataset is in. + ! ref_type - Type of reference to query. + ! ref - Reference to query. + ! + ! Outputs: + ! obj_type - Type of referenced object. + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + ! + ! hdferr - Returns 0 if successful and -1 if fails. + ! + ! AUTHOR + ! M. Scot Breitenfeld + ! Decemeber 17, 2008 + ! + ! Signature: + SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr + !***** + + INTERFACE + INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & + BIND(C, NAME='h5rget_obj_type_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), VALUE :: ref + INTEGER :: obj_type + END FUNCTION h5rget_obj_type_c + END INTERFACE + + hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) + + END SUBROUTINE h5rget_obj_type_f + +END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90 new file mode 100644 index 0000000..ac45857 --- /dev/null +++ b/fortran/src/H5Rff_F90.f90 @@ -0,0 +1,514 @@ +!****h* ROBODoc/H5R (F90) +! +! NAME +! MODULE H5R_PROVISIONAL +! +! FILE +! fortran/src/H5Rff_F90.f90 +! +! PURPOSE +! This file contains Fortran 90 interfaces for H5R functions. It contains +! the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Rff_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. * +! 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 H5R 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 H5R_PROVISIONAL + USE H5GLOBAL + +! If you change the value of these parameters, do not forget to change corresponding +! values in the H5f90.h file. +! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 +! +! TYPE hobj_ref_t_f +! INTEGER ref(REF_OBJ_BUF_LEN) +! END TYPE +! +! TYPE hdset_reg_ref_t_f +! INTEGER ref(REF_REG_BUF_LEN) +! END TYPE +! + INTERFACE h5rcreate_f + + MODULE PROCEDURE h5rcreate_object_f + MODULE PROCEDURE h5rcreate_region_f + + END INTERFACE + + INTERFACE h5rdereference_f + + MODULE PROCEDURE h5rdereference_object_f + MODULE PROCEDURE h5rdereference_region_f + + END INTERFACE + + INTERFACE h5rget_name_f + + MODULE PROCEDURE h5rget_name_object_f + MODULE PROCEDURE h5rget_name_region_f + + END INTERFACE + + INTERFACE h5rget_region_f + + MODULE PROCEDURE h5rget_region_region_f + + END INTERFACE + + +CONTAINS + + +!****s* H5R/h5rget_region_region_f +! +! NAME +! h5rget_region_region_f +! +! PURPOSE +! Retrieves a dataspace with the specified region selected +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) + + END SUBROUTINE h5rget_region_region_f + + + +!****s* H5R (F90)/h5rcreate_object_f +! +! NAME +! h5rcreate_object_f +! +! PURPOSE +! Creates reference to the object +! +! INPUTS +! loc_id - location identifier +! name - name of the object at the specified location +! OUTPUTS +! ref - reference to the specified object +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_object_c(ref_f, loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_OBJECT_C':: h5rcreate_object_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HADDR_T) :: ref_f + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5rcreate_object_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_object_c(ref_f, loc_id, name, namelen ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_object_f + +!****s* H5R (F90)/h5rcreate_region_f +! +! NAME +! h5rcreate_region_f +! +! PURPOSE +! Creates reference to the dataset region +! +! INPUTS +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region +! OUTPUTS +! ref - reference to the dataset region +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_region_f +!****s* H5R (F90)/h5rdereference_object_f +! +! NAME +! h5rdereference_object_f +! +! PURPOSE +! Opens the HDF5 object referenced +! +! INPUTS +! dset_id - identifier of the dataset containing reference +! ref - reference to open +! OUTPUTS +! obj_id - object_identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! SOURCE + SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rdereference_object_c(dset_id, ref_f, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_OBJECT_C':: h5rdereference_object_c + !DEC$ENDIF + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T) :: ref_f + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5rdereference_object_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rdereference_object_c(dset_id, ref_f, obj_id ) + + END SUBROUTINE h5rdereference_object_f +!****s* H5R (F90)/h5rdereference_region_f +! +! NAME +! h5rdereference_region_f +! +! PURPOSE +! Opens the dataset region +! +! INPUTS +! 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 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! SOURCE + SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rdereference_region_c(dset_id, ref_f, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_REGION_C':: h5rdereference_region_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id +! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5rdereference_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rdereference_region_c(dset_id, ref_f, obj_id ) + + END SUBROUTINE h5rdereference_region_f +!****s* H5R (F90)/h5rget_name_object_f +! +! NAME +! h5rget_name_object_f +! +! PURPOSE +! Retrieves a name of a referenced object. +! +! INPUTS +! 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 +! +! OPTIONAL PARAMETERS +! 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 +! +! SOURCES + SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) + IMPLICIT NONE + 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, + ! 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(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + + INTERFACE + INTEGER FUNCTION h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_OBJECT_C':: h5rget_name_object_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(SIZE_T) :: size_default + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(HADDR_T) :: ref_f + + INTEGER(SIZE_T) :: name_len + END FUNCTION h5rget_name_object_c + END INTERFACE + + name_len=LEN(name) + + ref_f = ref%ref + hdferr = h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_object_f + +!****s* H5R (F90)/h5rget_name_region_f +! +! NAME +! h5rget_name_region_f +! +! PURPOSE +! Retrieves a name of a dataset region. +! +! INPUTS +! 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 +! +! OPTIONAL PARAMETERS +! 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 +! +! SOURCE + SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) + IMPLICIT NONE + 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 + INTEGER(SIZE_T) :: name_len + + INTERFACE + INTEGER FUNCTION h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_REGION_C':: h5rget_name_region_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(SIZE_T) :: size_default + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER :: ref_f(REF_REG_BUF_LEN) + + INTEGER(SIZE_T) :: name_len + END FUNCTION h5rget_name_region_c + END INTERFACE + + name_len=LEN(name) + + ref_f = ref%ref + hdferr = h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_region_f + +END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 67427a7..6947d64 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -1,6 +1,6 @@ /****h* H5Sf/H5Sf * PURPOSE - * This file contains C stubs for H5S Fortran APIs + * This file contains C stubs for H5S Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,27 +26,27 @@ /****if* H5Sf/h5screate_simple_c * NAME - * h5screate_simple_c + * h5screate_simple_c * PURPOSE - * Call H5Screate_simple to create a dataspace + * Call H5Screate_simple to create a dataspace * INPUTS - * rank - number of dimensions of dataspace - * dims - array of the size of each dimension + * rank - number of dimensions of dataspace + * dims - array of the size of each dimension maxdims - an array of the maximum size of each dimension * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) +nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -75,23 +75,23 @@ done: /****if* H5Sf/h5sclose_c * NAME - * h5sclose_c + * h5sclose_c * PURPOSE - * Call H5Sclose to close the dataspace + * Call H5Sclose to close the dataspace * INPUTS - * space_id - identifier of the dataspace to be closed + * space_id - identifier of the dataspace to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -h5sclose_c ( hid_t_f *space_id ) +nh5sclose_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -104,25 +104,25 @@ h5sclose_c ( hid_t_f *space_id ) /****if* H5Sf/h5screate_c * NAME - * h5screate_c + * h5screate_c * PURPOSE - * Call H5Screate to create a dataspace + * Call H5Screate to create a dataspace * INPUTS - * classtype - type of the dataspace class + * classtype - type of the dataspace class * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -h5screate_c ( int_f *classtype, hid_t_f *space_id ) +nh5screate_c ( int_f *classtype, hid_t_f *space_id ) /******/ { H5S_class_t c_classtype; @@ -138,25 +138,25 @@ h5screate_c ( int_f *classtype, hid_t_f *space_id ) /****if* H5Sf/h5scopy_c * NAME - * h5scopy_c + * h5scopy_c * PURPOSE - * Call H5Scopy to copy dataspace + * Call H5Scopy to copy dataspace * INPUTS - * space_id - identifier of the dataspace to be copied + * space_id - identifier of the dataspace to be copied * OUTPUTS - * new_space_id - identifier of the new datspace + * new_space_id - identifier of the new datspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) +nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /******/ { int ret_value = 0; @@ -173,28 +173,28 @@ h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /****if* H5Sf/h5sget_select_hyper_nblocks_c * NAME - * h5sget_select_hyper_nblocks_c + * h5sget_select_hyper_nblocks_c * PURPOSE - * Call H5SH5Sget_select_hyper_nblocks to - * get the the number of hyperslab blocks in - * the current dataspace selection if successful + * Call H5SH5Sget_select_hyper_nblocks to + * get the the number of hyperslab blocks in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 12, 1999 + * Friday, November 12, 1999 * HISTORY * * SOURCE */ int_f -h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) +nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /******/ { int ret_value = 0; @@ -211,28 +211,28 @@ h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /****if* H5Sf/h5sget_select_elem_npoints_c * NAME - * h5sget_select_elem_npoints_c + * h5sget_select_elem_npoints_c * PURPOSE - * Call H5Sget_select_elem_npoints to - * get the the number of element points in - * the current dataspace selection if successful + * Call H5Sget_select_elem_npoints to + * get the the number of element points in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_points - number of element points in - * the current dataspace selection + * num_points - number of element points in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * * SOURCE */ int_f -h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) +nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /******/ { int ret_value = 0; @@ -249,36 +249,36 @@ h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /****if* H5Sf/h5sget_select_hyper_blocklist_c * NAME - * h5sget_select_hyper_blocklist_c + * h5sget_select_hyper_blocklist_c * PURPOSE - * Call H5Sget_select_hyper_blocklist to - * get a list of the hyperslab blocks currently selected - * Starting with the startblock-th block in the - * list of blocks, num_blocks blocks are put into the user's - * buffer. If the user's buffer fills up before numblocks - * blocks are inserted, the buffer - * will contain only as many blocks as fit. + * Call H5Sget_select_hyper_blocklist to + * get a list of the hyperslab blocks currently selected + * Starting with the startblock-th block in the + * list of blocks, num_blocks blocks are put into the user's + * buffer. If the user's buffer fills up before numblocks + * blocks are inserted, the buffer + * will contain only as many blocks as fit. * INPUTS - * space_id - identifier of the dataspace - * startblock - Hyperslab block to start with - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * space_id - identifier of the dataspace + * startblock - Hyperslab block to start with + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * OUTPUTS - * buf - List of hyperslab blocks selected + * buf - List of hyperslab blocks selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * - * Transpose dimension arrays because of C-FORTRAN storage order - * M. Scot Breitenfeld + * Transpose dimension arrays because of C-FORTRAN storage order + * M. Scot Breitenfeld * SOURCE */ int_f -h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, +nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, hsize_t_f *num_blocks, hsize_t_f *buf) /******/ { @@ -327,31 +327,31 @@ h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, /****if* H5Sf/h5sget_select_bounds_c * NAME - * h5sget_select_bounds_c + * h5sget_select_bounds_c * PURPOSE - * Call H5Sget_select_bounds to retrieve the coordinates - * of the bounding box containing the current selection - * and places them into user-supplied buffers + * Call H5Sget_select_bounds to retrieve the coordinates + * of the bounding box containing the current selection + * and places them into user-supplied buffers * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * start - Starting coordinates of the bounding box - * end - Ending coordinates of the bounding box, - * i.e., the coordinates of the diagonally opposite corne + * start - Starting coordinates of the bounding box + * end - Ending coordinates of the bounding box, + * i.e., the coordinates of the diagonally opposite corne * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY - * swapped array bounds to account for C and Fortran reversed - * matrix notation. - * M. Scot Breitenfeld + * swapped array bounds to account for C and Fortran reversed + * matrix notation. + * M. Scot Breitenfeld * SOURCE */ int_f -h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) +nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) /******/ { hid_t c_space_id; @@ -379,34 +379,34 @@ done: /****if* H5Sf/h5sget_select_elem_pointlist_c * NAME - * h5sget_select_elem_pointlist_c + * h5sget_select_elem_pointlist_c * PURPOSE - * Call H5Sget_select_elem_pointlist - * get a list of element points in the - * current dataspace selectin. - * Starting with the startpoint-th point in the - * list of points, numpoints points are put into the user's - * buffer. If the user's buffer fills up before numpoints - * points are inserted, the buffer - * will contain only as many points as fit. + * Call H5Sget_select_elem_pointlist + * get a list of element points in the + * current dataspace selectin. + * Starting with the startpoint-th point in the + * list of points, numpoints points are put into the user's + * buffer. If the user's buffer fills up before numpoints + * points are inserted, the buffer + * will contain only as many points as fit. * INPUTS - * space_id - identifier of the dataspace - * startpoint - Element point to start with - * numpoints - Number of element points to get + * space_id - identifier of the dataspace + * startpoint - Element point to start with + * numpoints - Number of element points to get * OUTPUTS - * buf - List of element points selected + * buf - List of element points selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY * * SOURCE */ int_f -h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, +nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf) /******/ { @@ -451,23 +451,23 @@ h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, /****if* H5Sf/h5sselect_all_c * NAME - * h5sselect_all_c + * h5sselect_all_c * PURPOSE - * Call H5Sselect_all to select entire dataspace + * Call H5Sselect_all to select entire dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -h5sselect_all_c ( hid_t_f *space_id ) +nh5sselect_all_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -480,23 +480,23 @@ h5sselect_all_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_none_c * NAME - * h5sselect_none_c + * h5sselect_none_c * PURPOSE - * Call H5Sselect_none to reset the selection region + * Call H5Sselect_none to reset the selection region * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -h5sselect_none_c ( hid_t_f *space_id ) +nh5sselect_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -509,27 +509,27 @@ h5sselect_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_valid_c * NAME - * h5sselect_valid_c + * h5sselect_valid_c * PURPOSE - * Call H5Sselect_valid to verify that selection - * is within dataspace extent. + * Call H5Sselect_valid to verify that selection + * is within dataspace extent. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not valid selection, 1 if is valid selection, - * and negative on failure. + * flag - 0 if not valid selection, 1 if is valid selection, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) +nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -545,26 +545,26 @@ h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sget_simple_extent_npoints_c * NAME - * h5sget_simple_extent_npoints_c + * h5sget_simple_extent_npoints_c * PURPOSE - * Call H5Sget_simple_extent_npoints to determine the number - * of elements in a dataspace + * Call H5Sget_simple_extent_npoints to determine the number + * of elements in a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace + * npoints - number of points in a dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) +nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /******/ { int ret_value = 0; @@ -580,26 +580,26 @@ h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /****if* H5Sf/h5sget_select_npoints_c * NAME - * h5sget_select_npoints_c + * h5sget_select_npoints_c * PURPOSE - * Call H5Sget_select_npoints to determine the number - * of elements in a dataspace selection + * Call H5Sget_select_npoints to determine the number + * of elements in a dataspace selection * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace selection + * npoints - number of points in a dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) +nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /******/ { int ret_value = 0; @@ -615,26 +615,26 @@ h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /****if* H5Sf/h5sget_simple_extent_ndims_c * NAME - * h5sget_simple_extent_ndims_c + * h5sget_simple_extent_ndims_c * PURPOSE - * Call H5Sget_simple_extent_ndims to determine the number - * dimensions + * Call H5Sget_simple_extent_ndims to determine the number + * dimensions * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * rank - number of dataspace dimensions + * rank - number of dataspace dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) +nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /******/ { int ret_value = 0; @@ -650,27 +650,27 @@ h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /****if* H5Sf/h5sget_simple_extent_type_c * NAME - * h5sget_simple_extent_type_c + * h5sget_simple_extent_type_c * PURPOSE - * Call H5Sget_simple_extent_type to determine the class type - * of a dataspace + * Call H5Sget_simple_extent_type to determine the class type + * of a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * classtype - class type; possible values are: + * classtype - class type; possible values are: * H5S_SCALAR_F (0), H5S_SIMPLE_F (1), H5S_NULL_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) +nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /******/ { int ret_value = 0; @@ -691,25 +691,25 @@ h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /****if* H5Sf/h5soffset_simple_c * NAME - * h5soffset_simple_c + * h5soffset_simple_c * PURPOSE - * Call H5Soffset_simple to set the offset of a simple - * dataspace + * Call H5Soffset_simple to set the offset of a simple + * dataspace * INPUTS - * space_id - identifier of the dataspace - * offset - offset array + * space_id - identifier of the dataspace + * offset - offset array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) +nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) /******/ { hid_t c_space_id; @@ -738,27 +738,27 @@ done: /****if* H5Sf/h5sset_extent_simple_c * NAME - * h5sset_extent_simple_c + * h5sset_extent_simple_c * PURPOSE - * Call H5Sset_extent_simple to set or reset size of - * existing dataspace + * Call H5Sset_extent_simple to set or reset size of + * existing dataspace * INPUTS - * space_id - identifier of the dataspace - * rank - dataspace rank - * current_size - array with the new dimension sizes - * maximum_size - aray with maximum sizes of dimensions + * space_id - identifier of the dataspace + * rank - dataspace rank + * current_size - array with the new dimension sizes + * maximum_size - aray with maximum sizes of dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) +nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) /******/ { hsize_t c_current_size[H5S_MAX_RANK]; @@ -784,27 +784,27 @@ done: /****if* H5Sf/h5sget_simple_extent_dims_c * NAME - * h5sget_simple_extent_dims_c + * h5sget_simple_extent_dims_c * PURPOSE - * Call H5Sget_simple_extent_dims to retrieve sizes of an - * existing dataspace + * Call H5Sget_simple_extent_dims to retrieve sizes of an + * existing dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * dims - array with the dimension sizes - * maxdims - aray with maximum sizes of dimensions + * dims - array with the dimension sizes + * maxdims - aray with maximum sizes of dimensions * RETURNS - * number of dataspace dimensions (rank) on success, -1 on failure + * number of dataspace dimensions (rank) on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) +nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) /******/ { hid_t c_space_id; @@ -838,27 +838,27 @@ done: /****if* H5Sf/h5sis_simple_c * NAME - * h5sis_simple_c + * h5sis_simple_c * PURPOSE - * Call H5Sis_simple to detrmine if the dataspace - * is simple. + * Call H5Sis_simple to detrmine if the dataspace + * is simple. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not simple, 1 if is simple, - * and negative on failure. + * flag - 0 if not simple, 1 if is simple, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sis_simple_c ( hid_t_f *space_id , int_f *flag ) +nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -875,24 +875,24 @@ h5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sextent_copy_c * NAME - * h5sextent_copy_c + * h5sextent_copy_c * PURPOSE - * Call H5Sextent_copy to copy an extent of dataspace + * Call H5Sextent_copy to copy an extent of dataspace * INPUTS - * dest_space_id - identifier of the destination dataspace - * source_space_id - identifier of the source dataspace + * dest_space_id - identifier of the destination dataspace + * source_space_id - identifier of the source dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) +nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /******/ { int ret_value = 0; @@ -908,23 +908,23 @@ h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /****if* H5Sf/h5sset_extent_none_c * NAME - * h5sset_extent_none_c + * h5sset_extent_none_c * PURPOSE - * Call H5Sset_extent_none to remove extent from a dataspace + * Call H5Sset_extent_none to remove extent from a dataspace * INPUTS - * space_id - dataspace identifier + * space_id - dataspace identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sset_extent_none_c ( hid_t_f *space_id ) +nh5sset_extent_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -939,30 +939,30 @@ h5sset_extent_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_hyperslab_c * NAME - * h5sselect_hyperslab_c + * h5sselect_hyperslab_c * PURPOSE - * Call H5Sselect_hyperslab to select a hyperslab + * Call H5Sselect_hyperslab to select a hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) and H5S_SELECT_OR_F (1) - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) +nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) /******/ { hsize_t c_start[H5S_MAX_RANK]; @@ -1000,30 +1000,30 @@ done: #ifdef NEW_HYPERSLAB_API /****if* H5Sf/h5scombine_hyperslab_c * NAME - * h5scombine_hyperslab_c + * h5scombine_hyperslab_c * PURPOSE - * Call H5Scombine_hyperslab + * Call H5Scombine_hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * OUTPUTS - * hyper_id - identifier for the new dataspace + * hyper_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) +nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) /******/ { int ret_value = -1; @@ -1082,27 +1082,27 @@ DONE: } /****if* H5Sf/h5scombine_select_c * NAME - * h5scombine_select_c + * h5scombine_select_c * PURPOSE - * Call H5Scombine_ select + * Call H5Scombine_ select * INPUTS - * space1_id - identifier of the first dataspace - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * OUTPUTS - * ds_id - identifier for the new dataspace + * ds_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) +nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) /******/ { int ret_value = -1; @@ -1123,25 +1123,25 @@ h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_ } /****if* H5Sf/h5sselect_select_c * NAME - * h5sselect_select_c + * h5sselect_select_c * PURPOSE - * Call H5Sselect_ select + * Call H5Sselect_ select * INPUTS - * space1_id - identifier of the first dataspace to modify - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace to modify + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) +nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) /******/ { int ret_value = -1; @@ -1160,24 +1160,24 @@ h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) #endif /*NEW_HYPERSLAB_API*/ /****if* H5Sf/h5sget_select_type_c * NAME - * h5sget_select_type_c + * h5sget_select_type_c * PURPOSE - * Call H5Sget_select_type + * Call H5Sget_select_type * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * type - type of selection + * type - type of selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -h5sget_select_type_c ( hid_t_f *space_id , int_f *type) +nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) /******/ { int ret_value = -1; @@ -1195,28 +1195,28 @@ h5sget_select_type_c ( hid_t_f *space_id , int_f *type) /****if* H5Sf/h5sselect_elements_c * NAME - * h5sselect_elements_c + * h5sselect_elements_c * PURPOSE - * Call H5Sselect_elements to select elements of a dataspace + * Call H5Sselect_elements to select elements of a dataspace * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) - * nelements - number of elements in the selection - * coord - arrays with the elements coordinates + * nelements - number of elements in the selection + * coord - arrays with the elements coordinates * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) +nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) /******/ { int ret_value = -1; @@ -1251,28 +1251,28 @@ h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsiz /****if* H5Sf/h5sdecode_c * NAME - * h5sdecode_c + * h5sdecode_c * PURPOSE - * Call H5Sdecode + * Call H5Sdecode * INPUTS * * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE */ int_f -h5sdecode_c ( _fcd buf, hid_t_f *obj_id ) +nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -1297,26 +1297,26 @@ h5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /****if* H5Sf/h5sencode_c * NAME - * h5sencode_c + * h5sencode_c * PURPOSE - * Call H5Sencode + * Call H5Sencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE */ int_f -h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -1366,28 +1366,28 @@ h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /****if* H5Sf/h5sextent_equal_c * NAME - * h5sextent_equal_c + * h5sextent_equal_c * PURPOSE - * Call H5Sextent_equal + * Call H5Sextent_equal * INPUTS * * space1_id - First dataspace identifier. - * space2_id - Second dataspace identifier. + * space2_id - Second dataspace identifier. * OUTPUTS * - * equal - TRUE if equal, FALSE if unequal. + * equal - TRUE if equal, FALSE if unequal. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE */ int_f -h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) +nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 deleted file mode 100644 index aeb3314..0000000 --- a/fortran/src/H5Sff.F90 +++ /dev/null @@ -1,1754 +0,0 @@ -!****h* ROBODoc/H5S -! -! NAME -! MODULE H5S -! -! FILE -! fortran/src/H5Sff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5S 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 -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5S 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 H5S - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR - USE H5GLOBAL - -CONTAINS -! -!****s* H5S/h5screate_simple_f -! -! NAME -! h5screate_simple_f -! -! PURPOSE -! Creates a new simple data space and opens it for access . -! -! INPUTS -! rank - number of dimensions -! dims - an array of the size of each dimension -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! maxdims - an array of the maximum size of each dimension -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) - - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - INTEGER, INTENT(OUT) :: hdferr - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims - - INTERFACE - INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) BIND(C,NAME='h5screate_simple_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_simple_c - END INTERFACE - - ALLOCATE (f_maxdims(rank), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - IF (PRESENT(maxdims)) THEN - f_maxdims = maxdims - ELSE - f_maxdims = dims - ENDIF - hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) - DEALLOCATE(f_maxdims) - - END SUBROUTINE h5screate_simple_f - -! -!****s* H5S/h5sclose_f -! -! NAME -! h5sclose_f -! -! PURPOSE -! Releases and terminates access to a dataspace. -! -! INPUTS -! space_id - identifier of dataspace to release -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sclose_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sclose_c(space_id) BIND(C,NAME='h5sclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sclose_c - END INTERFACE - - hdferr = h5sclose_c(space_id) - - END SUBROUTINE h5sclose_f - -! -!****s* H5S/h5screate_f -! -! NAME -! h5screate_f -! -! PURPOSE -! Creates a new dataspace of a specified type. -! -! INPUTS -! classtype - The type of the dataspace to be created -! Possible values are: -! H5S_SCALAR_F -! H5S_SIMPLE_F -! H5S_NULL_F -! OUTPUTS -! space_id - Dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5screate_f(classtype, space_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5screate_c(classtype, space_id) BIND(C,NAME='h5screate_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_c - END INTERFACE - - hdferr = h5screate_c(classtype, space_id) - - END SUBROUTINE h5screate_f - -! -!****s* H5S/h5scopy_f -! -! NAME -! h5scopy_f -! -! PURPOSE -! Creates an exact copy of a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! new_space_id - identifier of dataspace's copy -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT) :: new_space_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) BIND(C,NAME='h5scopy_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT):: new_space_id - END FUNCTION h5scopy_c - END INTERFACE - - hdferr = h5scopy_c(space_id, new_space_id) - - END SUBROUTINE h5scopy_f - -! -!****s* H5S/h5sget_select_hyper_nblocks_f -! -! NAME -! h5sget_select_hyper_nblocks_f -! -! PURPOSE -! Get number of hyperslab blocks. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_blocks - number of hyperslab blocks in the current -! hyperslab selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) & - BIND(C,NAME='h5sget_select_hyper_nblocks_c') - IMPORT :: HID_T, HSSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - END FUNCTION h5sget_select_hyper_nblocks_c - END INTERFACE - - hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - - END SUBROUTINE h5sget_select_hyper_nblocks_f - -! -!****s* H5S/h5sget_select_hyper_blocklist_f -! -! NAME -! h5sget_select_hyper_blocklist_f -! -! PURPOSE -! Gets the list of hyperslab blocks currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startblock - hyperslab block to start with -! num_blocks - number of blocks to get -! OUTPUTS -! buf - buffer to hold block list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & - num_blocks, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) BIND(C,NAME='h5sget_select_hyper_blocklist_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_hyper_blocklist_c - END INTERFACE - - hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, num_blocks, buf ) - - END SUBROUTINE h5sget_select_hyper_blocklist_f - -! -!****s* H5S/h5sget_select_bounds_f -! -! NAME -! h5sget_select_bounds_f -! -! PURPOSE -! Gets the bounding box containing the current selection. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! start - starting coordinates of bounding box -! end - ending coordinates of bounding box -! i.e., the coordinates of the diagonally opposite corner -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, end) & - BIND(C,NAME='h5sget_select_bounds_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - END FUNCTION h5sget_select_bounds_c - END INTERFACE - - hdferr = h5sget_select_bounds_c(space_id, start, END) - - END SUBROUTINE h5sget_select_bounds_f - -! -!****s* H5S/h5sget_select_elem_npoints_f -! -! NAME -! h5sget_select_elem_npoints_f -! -! PURPOSE -! Gets the number of element points in the current selection -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_points - number of element points in the current -! dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) BIND(C,NAME='h5sget_select_elem_npoints_c') - IMPORT :: HID_T, HSSIZE_T - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - END FUNCTION h5sget_select_elem_npoints_c - END INTERFACE - - hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - - END SUBROUTINE h5sget_select_elem_npoints_f - -! -!****s* H5S/h5sget_select_elem_pointlist_f -! -! NAME -! h5sget_select_elem_pointlist_f -! -! PURPOSE -! Gets the list of element points currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startpoint - element point to start with -! num_points - number of elemnt points to get -! OUTPUTS -! buf - buffer with element points selected -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & - num_points, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) BIND(C,NAME='h5sget_select_elem_pointlist_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_elem_pointlist_c - END INTERFACE - - hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - - END SUBROUTINE h5sget_select_elem_pointlist_f - -! -!****s* H5S/h5sselect_elements_f -! -! NAME -! h5sselect_elements_f -! -! PURPOSE -! Selects elements to be included in the selection for -! a dataspace -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! rank - number of dataspace dimensions -! num_elements - number of elements to be selected -! coord - 2D (rank x num_elements) array with the -! elements coordinates ( 1-based); in C the -! array is stored in 2D as (num_element x rank) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & - num_elements, coord, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER, INTENT(IN) :: rank - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord - INTEGER :: error, i - - INTERFACE - INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& - num_elements,c_c_coord) BIND(C,NAME='h5sselect_elements_c') - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord - END FUNCTION h5sselect_elements_c - END INTERFACE - - ALLOCATE(c_coord(rank,num_elements), STAT = error) - IF (error.NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - DO i = 1, rank - c_coord(i,:) = coord(rank-i+1, :) - 1 - ENDDO - hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) - -! ALLOCATE(c_coord(num_elements,rank), stat = error) -! IF (error.NE. 0) THEN -! hdferr = -1 -! RETURN -! ENDIF -! -! c_coord = TRANSPOSE(coord) -! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) - - - DEALLOCATE(c_coord) - - END SUBROUTINE h5sselect_elements_f - -! -!****s* H5S/h5sselect_all_f -! -! NAME -! h5sselect_all_f -! -! PURPOSE -! Selects the entire dataspace. -! -! INPUTS -! space_id - Identifier for the dataspace in which -! selection being made -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_all_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sselect_all_c(space_id) BIND(C,NAME='h5sselect_all_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_all_c - END INTERFACE - - hdferr = h5sselect_all_c(space_id) - - END SUBROUTINE h5sselect_all_f - -! -!****s* H5S/h5sselect_none_f -! -! NAME -! h5sselect_none_f -! -! PURPOSE -! Resets the selection region to include no elements. -! -! INPUTS -! space_id - the identifier for the dataspace in which -! the selection is being reset. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sselect_none_c(space_id) BIND(C,NAME='h5sselect_none_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_none_c - END INTERFACE - - hdferr = h5sselect_none_c(space_id) - - END SUBROUTINE h5sselect_none_f - -! -!****s* H5S/h5sselect_valid_f -! -! NAME -! h5sselect_valid_f -! -! PURPOSE -! Verifies that the selection is within the extent of -! the dataspace. -! -! INPUTS -! space_id - identifier for the dataspace for which -! selection is verified -! OUTPUTS -! status - TRUE if the selection is contained within -! the extent, FALSE otherwise. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - LOGICAL, INTENT(OUT) :: status - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine - - INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) BIND(C,NAME='h5sselect_valid_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sselect_valid_c - END INTERFACE - - hdferr = h5sselect_valid_c(space_id, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sselect_valid_f - -! -!****s* H5S/h5sget_simple_extent_npoints_f -! -! NAME -! h5sget_simple_extent_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of elements in the dataspace -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) BIND(C,NAME='h5sget_simple_extent_npoints_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_simple_extent_npoints_c - END INTERFACE - - hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - - END SUBROUTINE h5sget_simple_extent_npoints_f - -! -!****s* H5S/h5sget_select_npoints_f -! -! NAME -! h5sget_select_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace selection. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of points in the dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) BIND(C,NAME='h5sget_select_npoints_c') - IMPORT :: HID_T, HSSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_select_npoints_c - END INTERFACE - - hdferr = h5sget_select_npoints_c(space_id, npoints) - - END SUBROUTINE h5sget_select_npoints_f - -! -!****s* H5S/h5sget_simple_extent_ndims_f -! -! NAME -! h5sget_simple_extent_ndims_f -! -! PURPOSE -! Determines the dimensionality of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! rank - number of dataspace dimensions -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) BIND(C,NAME='h5sget_simple_extent_ndims_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - END FUNCTION h5sget_simple_extent_ndims_c - END INTERFACE - - hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - - END SUBROUTINE h5sget_simple_extent_ndims_f -! -!****s* H5S/h5sget_simple_extent_dims_f -! -! NAME -! h5sget_simple_extent_dims_f -! -! PURPOSE -! Retrieves dataspace dimension size and maximum size. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! dims - array to store size of each dimension -! maxdims - array to store maximum size of each dimension -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) BIND(C,NAME='h5sget_simple_extent_dims_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - END FUNCTION h5sget_simple_extent_dims_c - END INTERFACE - - hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - - END SUBROUTINE h5sget_simple_extent_dims_f - -! -!****s* H5S/h5sget_simple_extent_type_f -! -! NAME -! h5sget_simple_extent_type_f -! -! PURPOSE -! Determine the current class of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! classtype - class type, possible values are: -! H5S_NO_CLASS_F -! H5S_SCALAR_F -! H5S_SIMPLE_F -! H5S_NULL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) BIND(C,NAME='h5sget_simple_extent_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - END FUNCTION h5sget_simple_extent_type_c - END INTERFACE - - hdferr = h5sget_simple_extent_type_c(space_id, classtype) - - END SUBROUTINE h5sget_simple_extent_type_f - ! -!****s* H5S/h5sset_extent_simple_f -! -! NAME -! h5sset_extent_simple_f -! -! PURPOSE -! Sets or resets the size of an existing dataspace. -! -! INPUTS -! space_id - dataspace identifier -! rank - dataspace number of dimensions -! current_size - array with the new sizes of dimensions -! maximum_size - array with the new maximum sizes of -! dimensions -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) BIND(C,NAME='h5sset_extent_simple_c') - IMPORT :: HID_T, HSIZE_T - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - END FUNCTION h5sset_extent_simple_c - END INTERFACE - - hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & - maximum_size) - - END SUBROUTINE h5sset_extent_simple_f -! -!****s* H5S/h5sis_simple_f -! -! NAME -! h5sis_simple_f -! -! PURPOSE -! Determines whether a dataspace is a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! status - flag to indicate if dataspace -! is simple or not (TRUE or FALSE) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sis_simple_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - LOGICAL, INTENT(OUT) :: status - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) BIND(C,NAME='h5sis_simple_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sis_simple_c - END INTERFACE - - hdferr = h5sis_simple_c(space_id, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sis_simple_f - -! -!****s* H5S/h5soffset_simple_f -! -! NAME -! h5soffset_simple_f -! -! PURPOSE -! Sets the offset of a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! offset - the offset at which to position the -! selection -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) BIND(C,NAME='h5soffset_simple_c') - IMPORT :: HID_T, HSSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - END FUNCTION h5soffset_simple_c - END INTERFACE - - hdferr = h5soffset_simple_c(space_id, offset) - - END SUBROUTINE h5soffset_simple_f - -! -!****s* H5S/h5sextent_copy_f -! -! NAME -! h5sextent_copy_f -! -! PURPOSE -! Copies the extent of a dataspace. -! -! INPUTS -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from -! which the extent is copied -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) BIND(C,NAME='h5sextent_copy_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - END FUNCTION h5sextent_copy_c - END INTERFACE - - hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - - END SUBROUTINE h5sextent_copy_f - -! -!****s* H5S/h5sset_extent_none_f -! -! NAME -! h5sset_extent_none_f -! -! PURPOSE -! Removes the extent from a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) BIND(C,NAME='h5sset_extent_none_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sset_extent_none_c - END INTERFACE - - hdferr = h5sset_extent_none_c(space_id) - - END SUBROUTINE h5sset_extent_none_f -! -!****s* H5S/h5sselect_hyperslab_f -! -! NAME -! h5sselect_hyperslab_f -! -! PURPOSE -! Selects a hyperslab region to add to the current selected -! region -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_OR_F -! start - array with hyperslab offsets -! count - number of blocks included in the hyperslab -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! stride - array with hyperslab strides -! block - array with hyperslab block sizes -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_hyperslab_f(space_id, OPERATOR, start, count, & - hdferr, stride, BLOCK) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER, INTENT(OUT) :: hdferr - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: BLOCK -!***** - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride - INTEGER :: rank - INTEGER :: error1, error2 - - INTERFACE - INTEGER FUNCTION h5sselect_hyperslab_c(space_id, OPERATOR, & - start, count, stride, BLOCK) BIND(C,NAME='h5sselect_hyperslab_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: BLOCK - END FUNCTION h5sselect_hyperslab_c - END INTERFACE - - IF (PRESENT(stride).AND. PRESENT(BLOCK)) THEN - hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & - stride, BLOCK) - RETURN - ENDIF - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! - CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IF( hdferr .EQ. -1) RETURN - ! - IF (PRESENT(stride).AND. .NOT.PRESENT(BLOCK)) THEN - ALLOCATE(def_block(rank), stat=error1) - IF (error1.NE.0) THEN - hdferr = -1 - RETURN - ENDIF - def_block = 1 - hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & - stride, def_block) - DEALLOCATE(def_block) - RETURN - ENDIF - - IF (.NOT.PRESENT(stride).AND. PRESENT(BLOCK)) THEN - ALLOCATE(def_stride(rank), stat=error2) - IF (error2.NE.0) THEN - hdferr = -1 - RETURN - ENDIF - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & - def_stride, BLOCK) - DEALLOCATE(def_stride) - RETURN - ENDIF - ALLOCATE(def_block(rank), stat=error1) - ALLOCATE(def_stride(rank), stat=error2) - IF ((error1.NE.0) .OR. (error2.NE.0)) THEN - hdferr = -1 - RETURN - ENDIF - def_block = 1 - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & - def_stride, def_block) - DEALLOCATE(def_block) - DEALLOCATE(def_stride) - - END SUBROUTINE h5sselect_hyperslab_f -! !$! -! !$!****s* H5S/h5scombine_hyperslab_f -! !$! -! !$! NAME -! !$! h5scombine_hyperslab_f -! !$! -! !$! PURPOSE -! !$! Combine a hyperslab selection with the current -! !$! selection for a dataspace -! !$! -! !$! INPUTS -! !$! space_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! start - array with hyperslab offsets -! !$! count - number of blocks included in the -! !$! hyperslab -! !$! OUTPUTS -! !$! hyper_id - identifier for the new hyperslab -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS -! !$! stride - array with hyperslab strides -! !$! block - array with hyperslab block sizes -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES -! !$! Commented out until 1.6 ? 10/08/2002 -! !$! -! !$! SOURCE -! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & -! hyper_id, hdferr, stride, block) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace -! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride -! INTEGER :: rank -! INTEGER :: error1, error2 - -! INTERFACE -! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & -! start, count, stride, block, hyper_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block -! INTEGER(HID_T), INTENT(OUT) :: hyper_id -! END FUNCTION h5scombine_hyperslab_c -! END INTERFACE - -! if (present(stride).and. present(block)) then -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, block, hyper_id) -! return -! endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! -! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) -! if( hdferr .EQ. -1) return - ! -! if (present(stride).and. .not.present(block)) then -! allocate(def_block(rank), stat=error1) -! if (error1.NE.0) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, def_block, hyper_id) -! deallocate(def_block) -! return -! endif - -! if (.not.present(stride).and. present(block)) then -! allocate(def_stride(rank), stat=error2) -! if (error2.NE.0) then -! hdferr = -1 -! return -! endif -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, block, hyper_id) -! deallocate(def_stride) -! return -! endif -! allocate(def_block(rank), stat=error1) -! allocate(def_stride(rank), stat=error2) -! if ((error1.NE.0) .OR. (error2.NE.0)) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, def_block, hyper_id) -! deallocate(def_block) -! deallocate(def_stride) - -! END SUBROUTINE h5scombine_hyperslab_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5scombine_select_f -! !$! -! !$! PURPOSE -! !$! Combine two hyperslab selections with an operation -! !$! and return a dataspace with resulting selection. -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! OUTPUTS -! !$! ds_id - idataspace identifier with the new selection -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES commented out until 1.6 release(?) 10/08/2002 -! !$! - -! ! SOURCE -! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & -! ds_id, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! -! INTERFACE -! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & -! space2_id, ds_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HID_T), INTENT(OUT) :: ds_id -! END FUNCTION h5scombine_select_c -! END INTERFACE - -! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & -! ds_id) -! return - -! END SUBROUTINE h5scombine_select_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5sselect_select_f -! !$! -! !$! PURPOSE -! !$! Refine a hyperslab selection with an operation -! !$! using second hyperslab -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to modify -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP -! !$! - -! ! SOURCE -! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & -! hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to - ! modify -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTERFACE -! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & -! space2_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(INOUT) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! END FUNCTION h5sselect_select_c -! END INTERFACE - -! hdferr = h5sselect_select_c(space1_id, operator, space2_id) -! return - -! END SUBROUTINE h5sselect_select_f - -! -!****s* H5S/h5sget_select_type_f -! -! NAME -! h5sget_select_type_f -! -! PURPOSE -! Retrieve the type of selection -! -! INPUTS -! space_id - dataspace identifier with selection -! OUTPUTS -! type - selection type flag, valid values are: -! H5S_SEL_ERROR_F -! H5S_SEL_NONE_F -! H5S_SEL_POINTS_F -! H5S_SEL_HYPERSLABS_F -! H5S_SEL_ALL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! SOURCE - SUBROUTINE h5sget_select_type_f(space_id, TYPE, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(INOUT) :: space_id - INTEGER, INTENT(OUT) :: TYPE - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_type_c(space_id, TYPE) BIND(C,NAME='h5sget_select_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: TYPE - END FUNCTION h5sget_select_type_c - END INTERFACE - - hdferr = h5sget_select_type_c(space_id, TYPE) - RETURN - - END SUBROUTINE h5sget_select_type_f - -! -!****s* H5S/H5Sdecode_f -! -! NAME -! H5Sdecode_f -! -! PURPOSE -! Decode a binary object description of data space and return a new object handle. -! -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5sdecode_c(buf, obj_id) BIND(C,NAME='h5sdecode_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5sdecode_c - END INTERFACE - - hdferr = h5sdecode_c(buf, obj_id) - - END SUBROUTINE h5sdecode_f - -! -!****s* H5S/H5Sencode_f -! -! NAME -! H5Sencode_f -! -! PURPOSE -! Encode a data space object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5sencode_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5sencode_c - END INTERFACE - - hdferr = h5sencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5sencode_f - -!****s* H5S/h5sextent_equal_f -! -! NAME -! h5sextent_equal_f -! -! PURPOSE -! Determines whether two dataspace extents are equal. -! -! INPUTS -! space1_id - First dataspace identifier. -! space2_id - Second dataspace identifier. -! OUTPUTS -! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! April 2, 2008 -! -! SOURCE - SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id - INTEGER(HID_T), INTENT(IN) :: space2_id - LOGICAL, INTENT(OUT) :: Equal - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(HID_T) :: c_equal - - INTERFACE - INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) BIND(C,NAME='h5sextent_equal_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id - INTEGER(HID_T), INTENT(IN) :: space2_id - INTEGER(HID_T) :: c_equal - END FUNCTION h5sextent_equal_c - END INTERFACE - - hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - equal = .FALSE. - IF(c_equal.GT.0) equal = .TRUE. - - END SUBROUTINE h5sextent_equal_f - -END MODULE H5S diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 new file mode 100644 index 0000000..c493d46 --- /dev/null +++ b/fortran/src/H5Sff.f90 @@ -0,0 +1,1875 @@ +!****h* ROBODoc/H5S +! +! NAME +! MODULE H5S +! +! FILE +! fortran/src/H5Sff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5S functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5S 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 H5S + USE H5GLOBAL + +CONTAINS + +! +!****s* H5S/h5screate_simple_f +! +! NAME +! h5screate_simple_f +! +! PURPOSE +! Creates a new simple data space and opens it for access . +! +! INPUTS +! rank - number of dimensions +! dims - an array of the size of each dimension +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! maxdims - an array of the maximum size of each dimension +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) + + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + ! Array with the dimension + ! sizes + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) + ! Array with the maximum + ! dimension sizes +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims + + INTERFACE + INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_simple_c + END INTERFACE + + allocate (f_maxdims(rank), stat=hdferr) + if (hdferr .NE. 0) then + hdferr = -1 + return + endif + if (present(maxdims)) then + f_maxdims = maxdims + else + f_maxdims = dims + endif + hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) + deallocate(f_maxdims) + + END SUBROUTINE h5screate_simple_f + +! +!****s* H5S/h5sclose_f +! +! NAME +! h5sclose_f +! +! PURPOSE +! Releases and terminates access to a dataspace. +! +! INPUTS +! space_id - identifier of dataspace to release +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sclose_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sclose_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sclose_c + END INTERFACE + + hdferr = h5sclose_c(space_id) + + END SUBROUTINE h5sclose_f + +! +!****s* H5S/h5screate_f +! +! NAME +! h5screate_f +! +! PURPOSE +! Creates a new dataspace of a specified type. +! +! INPUTS +! classtype - the type of the dataspace to be created +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5screate_f(classtype, space_id, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype ! The type of the dataspace + ! to be created. + ! Possible values are: + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F(1) + ! H5S_NULL_F(2) + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5screate_c(classtype, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_c + END INTERFACE + + hdferr = h5screate_c(classtype, space_id) + + END SUBROUTINE h5screate_f + +! +!****s* H5S/h5scopy_f +! +! NAME +! h5scopy_f +! +! PURPOSE +! Creates an exact copy of a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! new_space_id - identifier of dataspace's copy +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: new_space_id + ! Identifier of dataspace's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT):: new_space_id + END FUNCTION h5scopy_c + END INTERFACE + + hdferr = h5scopy_c(space_id, new_space_id) + + END SUBROUTINE h5scopy_f + +! +!****s* H5S/h5sget_select_hyper_nblocks_f +! +! NAME +! h5sget_select_hyper_nblocks_f +! +! PURPOSE +! Get number of hyperslab blocks. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_blocks - number of hyperslab blocks in the current +! hyperslab selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + !number of hyperslab blocks + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + END FUNCTION h5sget_select_hyper_nblocks_c + END INTERFACE + + hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + + END SUBROUTINE h5sget_select_hyper_nblocks_f + +! +!****s* H5S/h5sget_select_hyper_blocklist_f +! +! NAME +! h5sget_select_hyper_blocklist_f +! +! PURPOSE +! Gets the list of hyperslab blocks currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startblock - hyperslab block to start with +! num_blocks - number of blocks to get +! OUTPUTS +! buf - buffer to hold block list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & + num_blocks, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startblock + !Hyperslab block to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + !number of hyperslab blocks + !to get in the current dataspace + !selection + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of hyperslab blocks selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_hyper_blocklist_c + END INTERFACE + + + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + + END SUBROUTINE h5sget_select_hyper_blocklist_f + +! +!****s* H5S/h5sget_select_bounds_f +! +! NAME +! h5sget_select_bounds_f +! +! PURPOSE +! Gets the bounding box containing the current selection. +! +! INPUTS +! space_id - dataspace identifier +! +! OUTPUTS +! start - starting coordinates of bounding box +! end - ending coordinates of bounding box +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + ! Starting coordinates of the bounding box. + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + !Ending coordinates of the bounding box, + !i.e., the coordinates of the diagonally + !opposite corner + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + END FUNCTION h5sget_select_bounds_c + END INTERFACE + + hdferr = h5sget_select_bounds_c(space_id, start, END) + + END SUBROUTINE h5sget_select_bounds_f + +! +!****s* H5S/h5sget_select_elem_npoints_f +! +! NAME +! h5sget_select_elem_npoints_f +! +! PURPOSE +! Gets the number of element points in the current selection +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_points - number of element points in the current +! dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + !number of element points + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + END FUNCTION h5sget_select_elem_npoints_c + END INTERFACE + + hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + + END SUBROUTINE h5sget_select_elem_npoints_f + +! +!****s* H5S/h5sget_select_elem_pointlist_f +! +! NAME +! h5sget_select_elem_pointlist_f +! +! PURPOSE +! Gets the list of element points currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startpoint - element point to start with +! num_points - number of elemnt points to get +! OUTPUTS +! buf - buffer with element points selected +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & + num_points, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + !Element point to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_points + !Number of element points to get + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of element points selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_elem_pointlist_c + END INTERFACE + + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + + END SUBROUTINE h5sget_select_elem_pointlist_f + +! +!****s* H5S/h5sselect_elements_f +! +! NAME +! h5sselect_elements_f +! +! PURPOSE +! Selects elements to be included in the selection for +! a dataspace +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F +! rank - number of dataspace dimensions +! num_elements - number of elements to be selected +! coord - 2D (rank x num_elements) array with the +! elements coordinates ( 1-based); in C the +! array is stored in 2D as (num_element x rank) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & + num_elements, coord, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER, INTENT(IN) :: rank + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord + INTEGER :: error, i + + INTERFACE + INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& + num_elements,c_c_coord) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord + END FUNCTION h5sselect_elements_c + END INTERFACE + + ALLOCATE(c_coord(rank,num_elements), STAT = error) + IF (error.NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + DO i = 1, rank + c_coord(i,:) = coord(rank-i+1, :) - 1 + ENDDO + hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) + +! ALLOCATE(c_coord(num_elements,rank), stat = error) +! IF (error.NE. 0) THEN +! hdferr = -1 +! RETURN +! ENDIF +! +! c_coord = TRANSPOSE(coord) +! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) + + + DEALLOCATE(c_coord) + + END SUBROUTINE h5sselect_elements_f + +! +!****s* H5S/h5sselect_all_f +! +! NAME +! h5sselect_all_f +! +! PURPOSE +! Selects the entire dataspace. +! +! INPUTS +! space_id - Identifier for the dataspace in which +! selection being made +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_all_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_all_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_all_c + END INTERFACE + + hdferr = h5sselect_all_c(space_id) + + END SUBROUTINE h5sselect_all_f + +! +!****s* H5S/h5sselect_none_f +! +! NAME +! h5sselect_none_f +! +! PURPOSE +! Resets the selection region to include no elements. +! +! INPUTS +! space_id - the identifier for the dataspace in which +! the selection is being reset. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_none_c + END INTERFACE + + hdferr = h5sselect_none_c(space_id) + + END SUBROUTINE h5sselect_none_f + +! +!****s* H5S/h5sselect_valid_f +! +! NAME +! h5sselect_valid_f +! +! PURPOSE +! Verifies that the selection is within the extent of +! the dataspace. +! +! INPUTS +! space_id - identifier for the dataspace for which +! selection is verified +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is + ! contained within the extent, + ! FALSE otherwise. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine + + INTERFACE + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sselect_valid_c + END INTERFACE + + hdferr = h5sselect_valid_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sselect_valid_f + +! +!****s* H5S/h5sget_simple_extent_npoints_f +! +! NAME +! h5sget_simple_extent_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of elements in the dataspace +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_simple_extent_npoints_c + END INTERFACE + + hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) + + END SUBROUTINE h5sget_simple_extent_npoints_f + +! +!****s* H5S/h5sget_select_npoints_f +! +! NAME +! h5sget_select_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace selection. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of points in the dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the + ! selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_select_npoints_c + END INTERFACE + + hdferr = h5sget_select_npoints_c(space_id, npoints) + + END SUBROUTINE h5sget_select_npoints_f + +! +!****s* H5S/h5sget_simple_extent_ndims_f +! +! NAME +! h5sget_simple_extent_ndims_f +! +! PURPOSE +! Determines the dimensionality of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! rank - number of dataspace dimensions +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: rank ! Number of dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + END FUNCTION h5sget_simple_extent_ndims_c + END INTERFACE + + hdferr = h5sget_simple_extent_ndims_c(space_id, rank) + + END SUBROUTINE h5sget_simple_extent_ndims_f +! +!****s* H5S/h5sget_simple_extent_dims_f +! +! NAME +! h5sget_simple_extent_dims_f +! +! PURPOSE +! Retrieves dataspace dimension size and maximum size. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! dims - array to store size of each dimension +! maxdims - array to store maximum size of each +! dimension +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + ! Array to store dimension sizes + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + ! Array to store max dimension + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, + ! number of dimensions on + ! on success +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + END FUNCTION h5sget_simple_extent_dims_c + END INTERFACE + + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) + + END SUBROUTINE h5sget_simple_extent_dims_f + +! +!****s* H5S/h5sget_simple_extent_type_f +! +! NAME +! h5sget_simple_extent_type_f +! +! PURPOSE +! Determine the current class of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! classtype - class type, possible values are: +! H5S_NO_CLASS_F (-1) +! H5S_SCALAR_F (0) +! H5S_SIMPLE_F (1) +! H5S_NULL_F (2) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: classtype ! Class type , possible values + ! are: + ! H5S_NO_CLASS_F (-1) + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F (1) + ! H5S_NULL_F (2) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + END FUNCTION h5sget_simple_extent_type_c + END INTERFACE + + hdferr = h5sget_simple_extent_type_c(space_id, classtype) + + END SUBROUTINE h5sget_simple_extent_type_f +! +!****s* H5S/h5sset_extent_simple_f +! +! NAME +! h5sset_extent_simple_f +! +! PURPOSE +! Sets or resets the size of an existing dataspace. +! +! INPUTS +! space_id - dataspace identifier +! rank - dataspace number of dimensions +! current_size - array with the new sizes of dimensions +! maximum_size - array with the new maximum sizes of +! dimensions +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & + maximum_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: rank ! Dataspace rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + ! Array with the new sizes + ! of dimensions + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + ! Array with the new maximum + ! sizes of dimensions + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & + current_size, maximum_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + END FUNCTION h5sset_extent_simple_c + END INTERFACE + + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & + maximum_size) + + END SUBROUTINE h5sset_extent_simple_f +! +!****s* H5S/h5sis_simple_f +! +! NAME +! h5sis_simple_f +! +! PURPOSE +! Determines whether a dataspace is a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! status - flag to indicate if dataspace +! is simple or not +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sis_simple_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace + ! is simple or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5sis_simple_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sis_simple_c + END INTERFACE + + hdferr = h5sis_simple_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sis_simple_f + +! +!****s* H5S/h5soffset_simple_f +! +! NAME +! h5soffset_simple_f +! +! PURPOSE +! Sets the offset of a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! offset - the offset at which to position the +! selection +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + ! The offset at which to position + ! the selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + END FUNCTION h5soffset_simple_c + END INTERFACE + + hdferr = h5soffset_simple_c(space_id, offset) + + END SUBROUTINE h5soffset_simple_f + +! +!****s* H5S/h5sextent_copy_f +! +! NAME +! h5sextent_copy_f +! +! PURPOSE +! Copies the extent of a dataspace. +! +! INPUTS +! dest_space_id - the identifier for the dataspace to which +! the extent is copied +! source_space_id - the identifier for the dataspace from +! which the extent is copied +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination + ! dataspace + INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + END FUNCTION h5sextent_copy_c + END INTERFACE + + hdferr = h5sextent_copy_c(dest_space_id, source_space_id) + + END SUBROUTINE h5sextent_copy_f + +! +!****s* H5S/h5sset_extent_none_f +! +! NAME +! h5sset_extent_none_f +! +! PURPOSE +! Removes the extent from a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sset_extent_none_c + END INTERFACE + + hdferr = h5sset_extent_none_c(space_id) + + END SUBROUTINE h5sset_extent_none_f + +! +!****s* H5S/h5sselect_hyperslab_f +! +! NAME +! h5sselect_hyperslab_f +! +! PURPOSE +! Selects a hyperslab region to add to the current selected +! region +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F (0) +! H5S_SELECT_OR_F (1) +! start - array with hyperslab offsets +! count - number of blocks included in the +! hyperslab +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! stride - array with hyperslab strides +! block - array with hyperslab block sizes +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & + hdferr, stride, block) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_SET_F (0) + ! H5S_SELECT_OR_F (1) + ! + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + ! Starting coordinates of the hyperslab + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + ! Array of how many elements to move + ! in each direction + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + ! Sizes of element block +!***** + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride + INTEGER :: rank + INTEGER :: error1, error2 + + INTERFACE + INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & + start, count, stride, block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_hyperslab_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: operator + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block + END FUNCTION h5sselect_hyperslab_c + END INTERFACE + + if (present(stride).and. present(block)) then + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, block) + return + endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! + CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + if( hdferr .EQ. -1) return + ! + if (present(stride).and. .not.present(block)) then + allocate(def_block(rank), stat=error1) + if (error1.NE.0) then + hdferr = -1 + return + endif + def_block = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, def_block) + deallocate(def_block) + return + endif + + if (.not.present(stride).and. present(block)) then + allocate(def_stride(rank), stat=error2) + if (error2.NE.0) then + hdferr = -1 + return + endif + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, block) + deallocate(def_stride) + return + endif + allocate(def_block(rank), stat=error1) + allocate(def_stride(rank), stat=error2) + if ((error1.NE.0) .OR. (error2.NE.0)) then + hdferr = -1 + return + endif + def_block = 1 + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, def_block) + deallocate(def_block) + deallocate(def_stride) + + END SUBROUTINE h5sselect_hyperslab_f +! !$! +! !$!****s* H5S/h5scombine_hyperslab_f +! !$! +! !$! NAME +! !$! h5scombine_hyperslab_f +! !$! +! !$! PURPOSE +! !$! Combine a hyperslab selection with the current +! !$! selection for a dataspace +! !$! +! !$! INPUTS +! !$! space_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! start - array with hyperslab offsets +! !$! count - number of blocks included in the +! !$! hyperslab +! !$! OUTPUTS +! !$! hyper_id - identifier for the new hyperslab +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS +! !$! stride - array with hyperslab strides +! !$! block - array with hyperslab block sizes +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES +! !$! Commented out until 1.6 ? 10/08/2002 +! !$! +! !$! SOURCE +! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & +! hyper_id, hdferr, stride, block) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + ! Starting coordinates of the hyperslab +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace +! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + ! Array of how many elements to move + ! in each direction +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + ! Sizes of element block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride +! INTEGER :: rank +! INTEGER :: error1, error2 + +! INTERFACE +! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & +! start, count, stride, block, hyper_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block +! INTEGER(HID_T), INTENT(OUT) :: hyper_id +! END FUNCTION h5scombine_hyperslab_c +! END INTERFACE + +! if (present(stride).and. present(block)) then +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, block, hyper_id) +! return +! endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! +! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) +! if( hdferr .EQ. -1) return + ! +! if (present(stride).and. .not.present(block)) then +! allocate(def_block(rank), stat=error1) +! if (error1.NE.0) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, def_block, hyper_id) +! deallocate(def_block) +! return +! endif + +! if (.not.present(stride).and. present(block)) then +! allocate(def_stride(rank), stat=error2) +! if (error2.NE.0) then +! hdferr = -1 +! return +! endif +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, block, hyper_id) +! deallocate(def_stride) +! return +! endif +! allocate(def_block(rank), stat=error1) +! allocate(def_stride(rank), stat=error2) +! if ((error1.NE.0) .OR. (error2.NE.0)) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, def_block, hyper_id) +! deallocate(def_block) +! deallocate(def_stride) + +! END SUBROUTINE h5scombine_hyperslab_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5scombine_select_f +! !$! +! !$! PURPOSE +! !$! Combine two hyperslab selections with an operation +! !$! and return a dataspace with resulting selection. +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! OUTPUTS +! !$! ds_id - idataspace identifier with the new selection +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES commented out until 1.6 release(?) 10/08/2002 +! !$! + +! ! SOURCE +! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & +! ds_id, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! +! INTERFACE +! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & +! space2_id, ds_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HID_T), INTENT(OUT) :: ds_id +! END FUNCTION h5scombine_select_c +! END INTERFACE + +! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & +! ds_id) +! return + +! END SUBROUTINE h5scombine_select_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5sselect_select_f +! !$! +! !$! PURPOSE +! !$! Refine a hyperslab selection with an operation +! !$! using second hyperslab +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to modify +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP +! !$! + +! ! SOURCE +! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & +! hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to + ! modify +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTERFACE +! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & +! space2_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(INOUT) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! END FUNCTION h5sselect_select_c +! END INTERFACE + +! hdferr = h5sselect_select_c(space1_id, operator, space2_id) +! return + +! END SUBROUTINE h5sselect_select_f + +! +!****s* H5S/h5sget_select_type_f +! +! NAME +! h5sget_select_type_f +! +! PURPOSE +! Retrieve the type of selection +! +! INPUTS +! space_id - dataspace iidentifier with selection +! OUTPUTS +! type - flag, valid values are: +! H5S_SEL_ERROR_F +! H5S_SEL_NONE_F +! H5S_SEL_POINTS_F +! H5S_SEL_HYPERSLABS_F +! H5S_SEL_ALL_F +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! SOURCE + SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to + INTEGER, INTENT(OUT) :: type ! Selection type + ! H5S_SEL_ERROR_F + ! H5S_SEL_NONE_F + ! H5S_SEL_POINTS_F + ! H5S_SEL_HYPERSLABS_F + ! H5S_SEL_ALL_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_type_c(space_id, type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: type + END FUNCTION h5sget_select_type_c + END INTERFACE + + hdferr = h5sget_select_type_c(space_id, type) + return + + END SUBROUTINE h5sget_select_type_f + +! +!****s* H5S/H5Sdecode_f +! +! NAME +! H5Sdecode_f +! +! PURPOSE +! Decode a binary object description of data space and return a new object handle. +! +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5sdecode_c + END INTERFACE + + hdferr = h5sdecode_c(buf, obj_id) + + END SUBROUTINE h5sdecode_f + +! +!****s* H5S/H5Sencode_f +! +! NAME +! H5Sencode_f +! +! PURPOSE +! Encode a data space object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5sencode_c + END INTERFACE + + hdferr = h5sencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5sencode_f + +!****s* H5S/h5sextent_equal_f +! +! NAME +! h5sextent_equal_f +! +! PURPOSE +! Determines whether two dataspace extents are equal. +! +! INPUTS +! space1_id - First dataspace identifier. +! space2_id - Second dataspace identifier. +! OUTPUTS +! Equal - .TRUE. if equal, .FALSE. if unequal. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! April 2, 2008 +! +! SOURCE + SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. + INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. + LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T) :: c_equal + + INTERFACE + INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + INTEGER(HID_T) :: c_equal + END FUNCTION h5sextent_equal_c + END INTERFACE + + hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) + + + equal = .FALSE. + IF(c_equal.GT.0) equal = .TRUE. + + + END SUBROUTINE h5sextent_equal_f + +END MODULE H5S diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index b6389258..7e1aa42 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -1,6 +1,6 @@ /****h* H5Tf/H5Tf * PURPOSE - * This file contains C stubs for H5T Fortran APIs + * This file contains C stubs for H5T Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -23,29 +23,30 @@ #include "H5f90.h" + /****if* H5Tf/h5topen_c * NAME * h5topen_c * PURPOSE * Call H5Topen2 to open a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * tapl_id - datatype access property list identifier + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * tapl_id - datatype access property list identifier * OUTPUTS - * type_id - dataset identifier + * type_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) +nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) /******/ { char *c_name = NULL; @@ -74,24 +75,25 @@ done: return ret_value; } + /****if* H5Tf/h5tcommit_c * NAME * h5tcommit_c * PURPOSE * Call H5Tcommit2 to commit a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * type_id - dataset identifier - * lcpl_id - Link creation property list - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * type_id - dataset identifier + * lcpl_id - Link creation property list + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * - Added passing optional parameters for version 1.8 @@ -99,7 +101,7 @@ done: * SOURCE */ int_f -h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, +nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -128,19 +130,19 @@ done: * PURPOSE * Call H5Tclose to close the datatype * INPUTS - * type_id - identifier of the datatype to be closed + * type_id - identifier of the datatype to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tclose_c ( hid_t_f *type_id ) +nh5tclose_c ( hid_t_f *type_id ) /******/ { int ret_value = 0; @@ -151,27 +153,28 @@ h5tclose_c ( hid_t_f *type_id ) return ret_value; } + /****if* H5Tf/h5tcopy_c * NAME * h5tcopy_c * PURPOSE * Call H5Tcopy to copy a datatype * INPUTS - * type_id - identifier of the datatype to be copied + * type_id - identifier of the datatype to be copied * OUTPUTS - * new_type_id - identifier of the new datatype + * new_type_id - identifier of the new datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) +nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -191,22 +194,22 @@ h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) * PURPOSE * Call H5Tequal to copy a datatype * INPUTS - * type1_id - datatype identifier - * type2_id - datatype identifier + * type1_id - datatype identifier + * type2_id - datatype identifier * OUTPUTS - * c_flag - flag; indicates if two datatypes are equal or not. + * c_flag - flag; indicates if two datatypes are equal or not. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, February 22, 2000 + * Tuesday, February 22, 2000 * HISTORY * * SOURCE */ int_f -h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) +nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -254,7 +257,7 @@ h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) */ int_f -h5tget_class_c ( hid_t_f *type_id , int_f *classtype) +nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) /******/ { int ret_value = 0; @@ -290,24 +293,24 @@ h5tget_class_c ( hid_t_f *type_id , int_f *classtype) * PURPOSE * Call H5Tget_order to determine byte order * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * order; possible values are: + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tget_order_c ( hid_t_f *type_id , int_f *order) +nh5tget_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = -1; @@ -334,23 +337,23 @@ h5tget_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tset_order to set byte order * INPUTS - * type_id - identifier of the dataspace - * order; possible values are: + * type_id - identifier of the dataspace + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tset_order_c ( hid_t_f *type_id , int_f *order) +nh5tset_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = 0; @@ -375,21 +378,21 @@ h5tset_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tget_size_c ( hid_t_f *type_id , size_t_f *size) +nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -410,21 +413,21 @@ h5tget_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -h5tset_size_c ( hid_t_f *type_id , size_t_f *size) +nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -446,21 +449,21 @@ h5tset_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_precision to get precision of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * precision - number of significant bits + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) +nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -481,20 +484,20 @@ h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) * PURPOSE * Call H5Tset_precision to set precision of the datatype * INPUTS - * type_id - identifier of the dataspace - * precision - number of significant bits + * type_id - identifier of the dataspace + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) +nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -515,23 +518,23 @@ h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) * h5tget_offset_c * PURPOSE * Call H5Tget_offset to get bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * offset - bit offset of the first significant bit + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) +nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -552,22 +555,22 @@ h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tset_offset_c * PURPOSE * Call H5Tset_offset to set bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace - * offset - bit offset of the first significant bit + * type_id - identifier of the dataspace + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) +nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -588,25 +591,25 @@ h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tget_pad_c * PURPOSE * Call H5Tget_pad to get the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) +nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) /******/ { int ret_value = -1; @@ -628,27 +631,27 @@ h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) * NAME * h5tset_pad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_pad to set the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * type_id - identifier of the dataspace + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) +nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) /******/ { int ret_value = -1; @@ -671,21 +674,21 @@ h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) * PURPOSE * Call H5Tget_sign to get sign type for an integer type * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * sign - sign type for an integer type + * sign - sign type for an integer type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tget_sign_c ( hid_t_f *type_id , int_f *sign) +nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) /******/ { int ret_value = -1; @@ -706,20 +709,20 @@ h5tget_sign_c ( hid_t_f *type_id , int_f *sign) * PURPOSE * Call H5Tset_sign to set sign type for an integer type * INPUTS - * type_id - identifier of the dataspace - * sign - sign type for an integer typ + * type_id - identifier of the dataspace + * sign - sign type for an integer typ * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_sign_c ( hid_t_f *type_id , int_f* sign) +nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) /******/ { int ret_value = -1; @@ -741,26 +744,26 @@ h5tset_sign_c ( hid_t_f *type_id , int_f* sign) * h5tget_fields_c * PURPOSE * Call H5Tget_fields to get floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, January 27, 2000 + * Thursday, January 27, 2000 * HISTORY * * SOURCE */ int_f -h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -785,25 +788,25 @@ h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* e * h5tset_fields_c * PURPOSE * Call H5Tset_fields to set floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * type_id - identifier of the dataspace + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -829,23 +832,23 @@ h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* es * h5tget_ebias_c * PURPOSE * Call H5Tget_ebias to get exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * ebias - exponent bias of a floating-point type of the datatype + * ebias - exponent bias of a floating-point type of the datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -866,22 +869,22 @@ h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tset_ebias_c * PURPOSE * Call H5Tset_ebias to set exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * ebias - exponent bias of a floating-point type of the datatyp + * type_id - identifier of the dataspace + * ebias - exponent bias of a floating-point type of the datatyp * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -903,23 +906,23 @@ h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tget_norm_c * PURPOSE * Call H5Tget_norm to get mantissa normalization - * of a floating-point datatype + * of a floating-point datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * norm - mantissa normalization of a floating-point type + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -h5tget_norm_c ( hid_t_f *type_id , int_f *norm) +nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -940,22 +943,22 @@ h5tget_norm_c ( hid_t_f *type_id , int_f *norm) * h5tset_norm_c * PURPOSE * Call H5Tset_norm to set mantissa normalization of - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * norm - mantissa normalization of a floating-point type + * type_id - identifier of the dataspace + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -h5tset_norm_c ( hid_t_f *type_id , int_f *norm) +nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -977,25 +980,25 @@ h5tset_norm_c ( hid_t_f *type_id , int_f *norm) * h5tget_inpad_c * PURPOSE * Call H5Tget_inpad to get the padding type for - * unused bits in floating-point datatypes + * unused bits in floating-point datatypes * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * padtype - padding type for - * unused bits in floating-point datatype + * padtype - padding type for + * unused bits in floating-point datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) +nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) /******/ { int ret_value = -1; @@ -1015,27 +1018,27 @@ h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) * NAME * h5tset_inpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_inpad to set the padding type - * unused bits in floating-point datatype + * unused bits in floating-point datatype * * INPUTS - * type_id - identifier of the dataspace - * padtype - padding type for unused bits - * in floating-point datatypes + * type_id - identifier of the dataspace + * padtype - padding type for unused bits + * in floating-point datatypes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) +nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) /******/ { int ret_value = -1; @@ -1057,24 +1060,24 @@ h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) * h5tget_cset_c * PURPOSE * Call H5Tget_cset to get character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * cset - character set type of a string datatype + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tget_cset_c ( hid_t_f *type_id , int_f * cset) +nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) /******/ { int ret_value = -1; @@ -1094,26 +1097,26 @@ h5tget_cset_c ( hid_t_f *type_id , int_f * cset) * NAME * h5tset_cset_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_cset to set character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace - * cset - character set type of a string datatype + * type_id - identifier of the dataspace + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_cset_c ( hid_t_f *type_id, int_f * cset) +nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) /******/ { int ret_value = -1; @@ -1135,22 +1138,22 @@ h5tset_cset_c ( hid_t_f *type_id, int_f * cset) * h5tget_strpad_c * PURPOSE * Call H5Tget_strpad to get string padding method - * for a string datatype + * for a string datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * strpad - string padding method for a string datatype + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) +nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) /******/ { int ret_value = -1; @@ -1170,26 +1173,26 @@ h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) * NAME * h5tset_strpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_strpad to set string padding method - * for a string datatype + * for a string datatype * * INPUTS - * type_id - identifier of the dataspace - * strpad - string padding method for a string datatype + * type_id - identifier of the dataspace + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) +nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) /******/ { int ret_value = -1; @@ -1211,23 +1214,23 @@ h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) * h5tget_nmembers_c * PURPOSE * Call H5Tget_nmembers to get number of fields - * in a compound datatype + * in a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * num_members - number of fields in a compound datatype + * num_members - number of fields in a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) +nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) /******/ { int ret_value = -1; @@ -1246,24 +1249,24 @@ h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) * h5tget_member_name_c * PURPOSE * Call H5Tget_member_name to get name - * of a compound datatype + * of a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * member_name - name of a field of a compound datatype + * member_name - name of a field of a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY - * Elena Pourmal - * Added namelen parameter to return length of the name to Fortran user + * Elena Pourmal + * Added namelen parameter to return length of the name to Fortran user * SOURCE */ int_f -h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) +nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) /******/ { int ret_value = -1; @@ -1287,15 +1290,15 @@ h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *na * h5tget_member_index_c * PURPOSE * Call H5Tget_member_index to get an index of - * the specified datatype filed or member. + * the specified datatype filed or member. * INPUTS - * type_id - datatype identifier - * name - name of the datatype within file or group - * namelen - name length + * type_id - datatype identifier + * name - name of the datatype within file or group + * namelen - name length * OUTPUTS - * index - 0-based index + * index - 0-based index * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, September 26, 2002 @@ -1304,7 +1307,7 @@ h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *na * SOURCE */ int_f -h5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) +nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) /******/ { int ret_value = -1; @@ -1338,26 +1341,26 @@ DONE: * h5tget_member_offset_c * PURPOSE * Call H5Tget_member_offset to get byte offset of the - * beginning of a field within a compound datatype with - * respect to the beginning of the compound data type datum + * beginning of a field within a compound datatype with + * respect to the beginning of the compound data type datum * INPUTS - * type_id - identifier of the dataspace - * member_no - Number of the field whose offset is requested + * type_id - identifier of the dataspace + * member_no - Number of the field whose offset is requested * OUTPUTS - * offset - byte offset of the the beginning of the field of - * a compound datatype + * offset - byte offset of the the beginning of the field of + * a compound datatype * RETURNS - * always 0 + * always 0 * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) +nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) /******/ { int ret_value = -1; @@ -1374,23 +1377,23 @@ h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) * h5tget_array_dims_c * PURPOSE * Call H5Tget_array_dims2 to get - * dimensions of array datatype + * dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * dims - dimensions(sizes of dimensions) of the array + * dims - dimensions(sizes of dimensions) of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) +nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1417,23 +1420,23 @@ DONE: * h5tget_array_ndims_c * PURPOSE * Call H5Tget_array_ndims to get number - * of dimensions of array datatype + * of dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * ndims - number of dimensions of the array + * ndims - number of dimensions of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) +nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) /******/ { int ret_value = -1; @@ -1454,23 +1457,23 @@ h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) * h5tget_super_c * PURPOSE * Call H5Tget_super to get base datatype from which - * datatype was derived + * datatype was derived * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * base_type_id - base datatype identifier + * base_type_id - base datatype identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) +nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) /******/ { int ret_value = -1; @@ -1492,14 +1495,14 @@ h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) * h5tget_member_type_c * PURPOSE * Call H5Tget_member_type to get the identifier of a copy of - * the datatype of the field + * the datatype of the field * INPUTS - * type_id - identifier of the datatype - * field_idx - Field index (0-based) of the field type to retrieve + * type_id - identifier of the datatype + * field_idx - Field index (0-based) of the field type to retrieve * OUTPUTS - * datatype - identifier of a copy of the datatype of the field + * datatype - identifier of a copy of the datatype of the field * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Thursday, February 3, 2000 @@ -1509,7 +1512,7 @@ h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) */ int_f -h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) +nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /******/ { int ret_value = -1; @@ -1528,10 +1531,10 @@ h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) * PURPOSE * Call H5Tcreate to create a datatype * INPUTS - * cls - class type - * size - size of the class memeber + * cls - class type + * size - size of the class memeber * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -1541,7 +1544,7 @@ h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) */ int_f -h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) +nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) /******/ { int ret_value = -1; @@ -1580,7 +1583,7 @@ h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) */ int_f -h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) +nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) /******/ { int ret_value = -1; @@ -1619,7 +1622,7 @@ h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t */ int_f -h5tpack_c(hid_t_f * type_id) +nh5tpack_c(hid_t_f * type_id) /******/ { int ret_value = -1; @@ -1640,12 +1643,12 @@ h5tpack_c(hid_t_f * type_id) * PURPOSE * Call H5Tarray_create2 to create array datatype * INPUTS - * base_id - identifier of array base datatype - * rank - array's rank - * dims - Size of new member array - * type_id - identifier of the array datatype + * base_id - identifier of array base datatype + * rank - array's rank + * dims - Size of new member array + * type_id - identifier of the array datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, November 16, 2000 @@ -1654,7 +1657,7 @@ h5tpack_c(hid_t_f * type_id) * SOURCE */ int_f -h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) +nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1689,7 +1692,7 @@ DONE: * parent_id - Datatype identifier for the base datatype * OUTPUTS * new_type_id - datatype identifier for the new - * enumeration datatype + * enumeration datatype * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -1701,7 +1704,7 @@ DONE: */ int_f -h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) +nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -1737,7 +1740,7 @@ h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) */ int_f -h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1764,24 +1767,24 @@ h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tenum_nameof_c * PURPOSE * Call H5Tenum_nameof to find the symbol name that corresponds to - * the specified value of the enumeration datatype type + * the specified value of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * namelen - length of the name - * value - value of the enumeration datatype - * Output: name - Name of the enumeration datatype + * type_id - identifier of the datatype + * namelen - length of the name + * value - value of the enumeration datatype + * Output: name - Name of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) +nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) /******/ { int ret_value = -1; @@ -1808,24 +1811,24 @@ h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) * h5tenum_valueof_c * PURPOSE * Call H5Tenum_valueof to find the value of that corresponds to - * the specified name of the enumeration datatype type + * the specified name of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * name - Name of the enumeration datatype - * namelen - length of name - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * name - Name of the enumeration datatype + * namelen - length of name + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1848,23 +1851,23 @@ h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tget_member_value_c * PURPOSE * Call H5Tget_member_value to get the value of an - * enumeration datatype member + * enumeration datatype member * INPUTS - * type_id - identifier of the datatype - * member_no - Number of the enumeration datatype member. - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * member_no - Number of the enumeration datatype member. + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) +nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) /******/ { int ret_value = -1; @@ -1883,25 +1886,25 @@ h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) * NAME * h5tset_tag_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_tag to set an opaque datatype tag * INPUTS - * type_id - identifier of the dataspace - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * namelen - length of tag + * type_id - identifier of the dataspace + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * namelen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) +nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) /******/ { int ret_value = -1; @@ -1926,11 +1929,11 @@ h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * INPUTS * type_id - identifier of the datatype * OUTPUTS - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * taglen - length of tag + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * taglen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Wednesday, January 26, 2000 @@ -1939,7 +1942,7 @@ h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * SOURCE */ int_f -h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) +nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) /******/ { int ret_value = -1; @@ -1962,20 +1965,20 @@ h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) * PURPOSE * Call H5Tvlen_create to create VL dtatype * INPUTS - * type_id - identifier of the base datatype + * type_id - identifier of the base datatype * OUTPUTS - * vltype_id - identifier of the VL datatype + * vltype_id - identifier of the VL datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE */ int_f -h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) +nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) /******/ { int ret_value = -1; @@ -1994,24 +1997,24 @@ h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) * h5tis_variable_str_c * PURPOSE * Call H5Tis_variable_str to detrmine if the datatype - * is a variable string. + * is a variable string. * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not VL str, 1 if is not - * and negative on failure. + * flag - 0 if not VL str, 1 if is not + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12 , 2003 + * Wednesday, March 12 , 2003 * HISTORY * * SOURCE */ int_f -h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) +nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) /******/ { int ret_value = 0; @@ -2031,13 +2034,13 @@ h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) * Call H5Tget_member_class to detrmine ithe class of the compound * datatype member * INPUTS - * type_id - identifier of the dataspace - * member_no - member's index + * type_id - identifier of the dataspace + * member_no - member's index * OUTPUTS - * class - member's class - * and negative on failure. + * class - member's class + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, April 6, 2005 @@ -2047,7 +2050,7 @@ h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) */ int_f -h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) +nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) /******/ { int ret_value = 0; @@ -2070,12 +2073,12 @@ h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * PURPOSE * Call H5Tcommit_anon * INPUTS - * loc_id - file or group identifier - * dtype_id - dataset identifier - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * dtype_id - dataset identifier + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 25, 2008 @@ -2084,7 +2087,7 @@ h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * SOURCE */ int_f -h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, +nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -2105,10 +2108,10 @@ h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * h5tcommitted_c * PURPOSE * Call H5Tcommitted - * dtype_id - dataset identifier + * dtype_id - dataset identifier * RETURNS - * a positive value, for TRUE, if the datatype has been committed, - * or 0 (zero), for FALSE, if the datatype has not been committed. + * a positive value, for TRUE, if the datatype has been committed, + * or 0 (zero), for FALSE, if the datatype has not been committed. * Otherwise returns a negative value. * AUTHOR * M. Scot Breitenfeld @@ -2118,7 +2121,7 @@ h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * SOURCE */ int_f -h5tcommitted_c(hid_t_f *dtype_id) +nh5tcommitted_c(hid_t_f *dtype_id) /******/ { int_f ret_value; @@ -2141,10 +2144,10 @@ h5tcommitted_c(hid_t_f *dtype_id) * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2154,7 +2157,7 @@ h5tcommitted_c(hid_t_f *dtype_id) */ int_f -h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) +nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -2184,11 +2187,11 @@ h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) * Call H5Tencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2198,7 +2201,7 @@ h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) */ int_f -h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -2253,11 +2256,11 @@ h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) * PURPOSE * Call H5Tget_create_plist * INPUTS - * dtype_id - Datatype identifier + * dtype_id - Datatype identifier * OUTPUTS - * dtpl_id - Datatype property list identifier + * dtpl_id - Datatype property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2267,7 +2270,7 @@ h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) */ int_f -h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) +nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) /******/ { int_f ret_value=-1; /* Return value */ @@ -2286,12 +2289,12 @@ h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) * Call H5Tcompiler_conv * INPUTS * - * src_id - Identifier for the source datatype. - * dst_id - Identifier for the destination datatype. + * src_id - Identifier for the source datatype. + * dst_id - Identifier for the destination datatype. * OUTPUTS - * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion + * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M.Scot Breitenfeld * April 9, 2008 @@ -2301,7 +2304,7 @@ h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) */ int_f -h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) +nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -2320,12 +2323,12 @@ h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) * Call H5Tget_native_type * INPUTS * - * dtype_id - Datatype identifier for the dataset datatype. - * direction - Direction of search. + * dtype_id - Datatype identifier for the dataset datatype. + * direction - Direction of search. * OUTPUTS - * native_dtype_id - The native datatype identifier for the specified dataset datatype + * native_dtype_id - The native datatype identifier for the specified dataset datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * June 18, 2008 @@ -2335,7 +2338,7 @@ h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) */ int_f -h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) +nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 deleted file mode 100644 index 6b8f896..0000000 --- a/fortran/src/H5Tff.F90 +++ /dev/null @@ -1,3082 +0,0 @@ -!****h* ROBODoc/H5T -! -! NAME -! MODULE H5T -! -! PURPOSE -! This file contains Fortran interfaces for H5T 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 -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new function here then 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 H5T - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR - USE H5GLOBAL - IMPLICIT NONE - -!****t* H5T/hvl_t -! Fortran2003 Derived Type: - TYPE hvl_t - INTEGER(size_t) :: len ! Length of VL data (in base type units) - TYPE(C_PTR) :: p ! Pointer to VL data - END TYPE hvl_t - -!***** - - INTERFACE h5tenum_insert_f - MODULE PROCEDURE h5tenum_insert_f03 - MODULE PROCEDURE h5tenum_insert_f90 - END INTERFACE - -CONTAINS - -! -!****s* H5T/h5topen_f -! -! NAME -! h5topen_f -! -! PURPOSE -! Opens named datatype. -! -! INPUTS -! loc_id - location identifier -! name - a datatype name -! OUTPUTS -! type_id - datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tapl_id - datatype access property list identifier. -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! Added optional parameter 'tapl_id' for compatability -! with H5Topen2. April 9, 2009. -! -! SOURCE - SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER, INTENT(OUT) :: hdferr - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) BIND(C,NAME='h5topen_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5topen_c - END INTERFACE - - namelen = LEN(name) - - tapl_id_default = H5P_DEFAULT_F - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - END SUBROUTINE h5topen_f -! -!****s* H5T/h5tcommit_f -! -! NAME -! h5tcommit_f -! -! PURPOSE -! Commits a transient datatype to a file, creating a -! new named datatype. -! -! INPUTS -! loc_id - location identifier -! name - name of the datatype to be stored -! at the specified location -! type_id - identifier of a datatype to be stored -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list -! tcpl_id - Datatype creation property list -! tapl_id - Datatype access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! - Added optional parameters introduced in version 1.8 -! M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & - lcpl_id, tcpl_id, tapl_id ) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name - ! Datatype name within file or group - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list -!***** - - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) BIND(C,NAME='h5tcommit_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF (PRESENT(tapl_id)) tapl_id_default = tapl_id - - namelen = LEN(name) - - hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_f -! -!****s* H5T/h5tcopy_f -! -! NAME -! h5tcopy_f -! -! PURPOSE -! Creates a copy of exisiting datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! new_type_id - identifier of datatype's copy -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) BIND(C,NAME='h5tcopy_c') - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tcopy_c - END INTERFACE - - hdferr = h5tcopy_c(type_id, new_type_id) - END SUBROUTINE h5tcopy_f -! -!****s* H5T/h5tequal_f -! -! NAME -! h5tequal_f -! -! PURPOSE -! Determines whether two datatype identifiers refer -! to the same datatype. -! -! INPUTS -! type1_id - datatype identifier -! type2_id - datatype identifier -! OUTPUTS -! flag - TRUE/FALSE flag to indicate -! if two datatypes are equal -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - LOGICAL, INTENT(OUT) :: flag - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: c_flag - INTERFACE - INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) BIND(C,NAME='h5tequal_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - INTEGER :: c_flag - END FUNCTION h5tequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5tequal_c(type1_id, type2_id, c_flag) - IF(c_flag .GT. 0) flag = .TRUE. - END SUBROUTINE h5tequal_f -! -!****s* H5T/h5tclose_f -! -! NAME -! h5tclose_f -! -! PURPOSE -! Releases a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tclose_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tclose_c(type_id) BIND(C,NAME='h5tclose_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tclose_c - END INTERFACE - - hdferr = h5tclose_c(type_id) - END SUBROUTINE h5tclose_f -! -!****s* H5T/h5tget_class_f -! -! NAME -! h5tget_class_f -! -! PURPOSE -! Returns the datatype class identifier. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! class - Class, possible values are: -! H5T_NO_CLASS_F (-1) -! H5T_INTEGER_F (0) -! H5T_FLOAT_F (1) -! H5T_TIME_F (2) -! H5T_STRING_F (3) -! H5T_BITFIELD_F (4) -! H5T_OPAQUE_F (5) -! H5T_COMPOUND_F (6) -! H5T_REFERENCE_F (7) -! H5T_ENUM_F (8) -! H5T_VLEN_F (9) -! H5T_ARRAY_F (10) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_class_f(type_id, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_class_c(type_id, class) BIND(C,NAME='h5tget_class_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_class_c - END INTERFACE - - hdferr = h5tget_class_c(type_id, class) - END SUBROUTINE h5tget_class_f -! -!****s* H5T/h5tget_size_f -! -! NAME -! h5tget_size_f -! -! PURPOSE -! Returns the size of a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! size - datatype size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_size_c(type_id, size) BIND(C,NAME='h5tget_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5tget_size_c - END INTERFACE - - hdferr = h5tget_size_c(type_id, size) - END SUBROUTINE h5tget_size_f - -! -!****s* H5T/h5tset_size_f -! -! NAME -! h5tset_size_f -! -! PURPOSE -! Sets the total size for an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! size - size of the datatype -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! -! SOURCE - SUBROUTINE h5tset_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_size_c(type_id, size) BIND(C,NAME='h5tset_size_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5tset_size_c - END INTERFACE - - hdferr = h5tset_size_c(type_id, size) - END SUBROUTINE h5tset_size_f - -! -!****s* H5T/h5tget_order_f -! -! NAME -! h5tget_order_f -! -! PURPOSE -! Returns the byte order of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! order - byte order for the datatype, possible -! values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: order - ! Datatype byte order, possible values are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_order_c(type_id, order) BIND(C,NAME='h5tget_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: order - END FUNCTION h5tget_order_c - END INTERFACE - - hdferr = h5tget_order_c(type_id, order) - END SUBROUTINE h5tget_order_f -! -!****s* H5T/h5tset_order_f -! -! NAME -! h5tset_order_f -! -! PURPOSE -! Sets the byte ordering of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! order - datatype byte order Possible values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values - ! are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_order_c(type_id, order) BIND(C,NAME='h5tset_order_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: order - END FUNCTION h5tset_order_c - END INTERFACE - - hdferr = h5tset_order_c(type_id, order) - END SUBROUTINE h5tset_order_f - -! -!****s* H5T/h5tget_precision_f -! -! NAME -! h5tget_precision_f -! -! PURPOSE -! Returns the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! precision - precision of the datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_precision_f(type_id, PRECISION, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_precision_c(type_id, PRECISION) BIND(C,NAME='h5tget_precision_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: PRECISION - END FUNCTION h5tget_precision_c - END INTERFACE - - hdferr = h5tget_precision_c(type_id, PRECISION) - END SUBROUTINE h5tget_precision_f - -! -!****s* H5T/h5tset_precision_f -! -! NAME -! h5tset_precision_f -! -! PURPOSE -! Sets the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! precision - datatype precision -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_precision_f(type_id, PRECISION, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: PRECISION - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_precision_c (type_id, PRECISION) BIND(C,NAME='h5tset_precision_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: PRECISION - END FUNCTION h5tset_precision_c - END INTERFACE - - hdferr = h5tset_precision_c(type_id, PRECISION) - END SUBROUTINE h5tset_precision_f - -! -!****s* H5T/h5tget_offset_f -! -! NAME -! h5tget_offset_f -! -! PURPOSE -! Retrieves the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! offset - offset value -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_offset_c(type_id, offset) BIND(C,NAME='h5tget_offset_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_offset_c - END INTERFACE - - hdferr = h5tget_offset_c(type_id, offset) - END SUBROUTINE h5tget_offset_f - -! -!****s* H5T/h5tset_offset_f -! -! NAME -! h5tset_offset_f -! -! PURPOSE -! Sets the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! offset - offset value -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_offset_c(type_id, offset) BIND(C,NAME='h5tset_offset_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - END FUNCTION h5tset_offset_c - END INTERFACE - - hdferr = h5tset_offset_c(type_id, offset) - END SUBROUTINE h5tset_offset_f - -! -!****s* H5T/h5tget_pad_f -! -! NAME -! h5tget_pad_f -! -! PURPOSE -! Retrieves the padding type of the least and -! most -significant bit padding. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! H5T_PAD_NPAD_F -! hdferr - Returns 0 if successful and -1 if fails - -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tget_pad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - END FUNCTION h5tget_pad_c - END INTERFACE - - hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tget_pad_f - -! -!****s* H5T/h5tset_pad_f -! -! NAME -! h5tset_pad_f -! -! PURPOSE -! Sets the least and most-significant bits padding types. -! -! INPUTS -! type_id - datatype identifier -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tset_pad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - END FUNCTION h5tset_pad_c - END INTERFACE - - hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tset_pad_f - -! -!****s* H5T/h5tget_sign_f -! -! NAME -! h5tget_sign_f -! -! PURPOSE -! Retrieves the sign type for an integer type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tget_sign_c(type_id, sign) BIND(C,NAME='h5tget_sign_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - END FUNCTION h5tget_sign_c - END INTERFACE - - hdferr = h5tget_sign_c(type_id, sign) - END SUBROUTINE h5tget_sign_f - -! -!****s* H5T/h5tset_sign_f -! -! NAME -! h5tset_sign_f -! -! PURPOSE -! Sets the sign proprety for an integer type. -! -! INPUTS -! type_id - datatype identifier -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_sign_c(type_id, sign) BIND(C,NAME='h5tset_sign_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - END FUNCTION h5tset_sign_c - END INTERFACE - - hdferr = h5tset_sign_c(type_id, sign) - END SUBROUTINE h5tset_sign_f - -! -!****s* H5T/h5tget_fields_f -! -! NAME -! h5tget_fields_f -! -! PURPOSE -! Retrieves floating point datatype bit field information. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) & - BIND(C,NAME='h5tget_fields_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - END FUNCTION h5tget_fields_c - END INTERFACE - - hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tget_fields_f - -! -!****s* H5T/h5tset_fields_f -! -! NAME -! h5tset_fields_f -! -! PURPOSE -! Sets locations and sizes of floating point bit fields. -! -! INPUTS -! type_id - datatype identifier -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) & - BIND(C,NAME='h5tset_fields_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - END FUNCTION h5tset_fields_c - END INTERFACE - - hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tset_fields_f - -! -!****s* H5T/h5tget_ebias_f -! -! NAME -! h5tget_ebias_f -! -! PURPOSE -! Retrieves the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! ebias - datatype exponent bias -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) BIND(C,NAME='h5tget_ebias_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - END FUNCTION h5tget_ebias_c - END INTERFACE - - hdferr = h5tget_ebias_c(type_id, ebias) - END SUBROUTINE h5tget_ebias_f - -! -!****s* H5T/h5tset_ebias_f -! -! NAME -! h5tset_ebias_f -! -! PURPOSE -! Sets the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! ebias - datatype exponent bias -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) BIND(C,NAME='h5tset_ebias_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - END FUNCTION h5tset_ebias_c - END INTERFACE - - hdferr = h5tset_ebias_c(type_id, ebias) - END SUBROUTINE h5tset_ebias_f - -! -!****s* H5T/h5tget_norm_f -! -! NAME -! h5tget_norm_f -! -! PURPOSE -! Retrieves mantissa normalization of a floating-point -! datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F -! H5T_NORM_MSBSET_F -! H5T_NORM_NONE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tget_norm_c(type_id, norm) BIND(C,NAME='h5tget_norm_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - END FUNCTION h5tget_norm_c - END INTERFACE - - hdferr = h5tget_norm_c(type_id, norm) - END SUBROUTINE h5tget_norm_f - -! -!****s* H5T/h5tset_norm_f -! -! NAME -! h5tset_norm_f -! -! PURPOSE -! Sets the mantissa normalization of a floating-point datatype. -! -! INPUTS -! type_id - datatype identifier -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F -! H5T_NORM_MSBSET_F -! H5T_NORM_NONE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_norm_c(type_id, norm) BIND(C,NAME='h5tset_norm_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - END FUNCTION h5tset_norm_c - END INTERFACE - - hdferr = h5tset_norm_c(type_id, norm) - END SUBROUTINE h5tset_norm_f - -! -!****s* H5T/h5tget_inpad_f -! -! NAME -! h5tget_inpad_f -! -! PURPOSE -! Retrieves the internal padding type for unused bits -! in floating-point datatypes. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) BIND(C,NAME='h5tget_inpad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - END FUNCTION h5tget_inpad_c - END INTERFACE - - hdferr = h5tget_inpad_c(type_id, padtype) - END SUBROUTINE h5tget_inpad_f - -! -!****s* H5T/h5tset_inpad_f -! -! NAME -! h5tset_inpad_f -! -! PURPOSE -! Fills unused internal floating point bits. -! -! INPUTS -! type_id - datatype identifier -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) BIND(C,NAME='h5tset_inpad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - END FUNCTION h5tset_inpad_c - END INTERFACE - - hdferr = h5tset_inpad_c(type_id, padtype) - END SUBROUTINE h5tset_inpad_f - -! -!****s* H5T/h5tget_cset_f -! -! NAME -! h5tget_cset_f -! -! PURPOSE -! Retrieves the character set type of a string datatype. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! cset - Character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F -! H5T_CSET_UTF8_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_cset_c(type_id, cset) BIND(C,NAME='h5tget_cset_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - END FUNCTION h5tget_cset_c - END INTERFACE - - hdferr = h5tget_cset_c(type_id, cset) - END SUBROUTINE h5tget_cset_f - -! -!****s* H5T/h5tset_cset_f -! -! NAME -! h5tset_cset_f -! -! PURPOSE -! Sets character set to be used. -! -! INPUTS -! type_id - datatype identifier -! cset - character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F -! H5T_CSET_UTF8_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_cset_c(type_id, cset) BIND(C,NAME='h5tset_cset_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - END FUNCTION h5tset_cset_c - END INTERFACE - - hdferr = h5tset_cset_c(type_id, cset) - END SUBROUTINE h5tset_cset_f -! -!****s* H5T/h5tget_strpad_f -! -! NAME -! h5tget_strpad_f -! -! PURPOSE -! Retrieves the storage mechanism for a string datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) BIND(C,NAME='h5tget_strpad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - END FUNCTION h5tget_strpad_c - END INTERFACE - - hdferr = h5tget_strpad_c(type_id, strpad) - END SUBROUTINE h5tget_strpad_f - -! -!****s* H5T/h5tset_strpad_f -! -! NAME -! h5tset_strpad_f -! -! PURPOSE -! Defines the storage mechanism for character strings. -! -! INPUTS -! type_id - datatype identifier -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F, -! H5T_STR_ERROR_F. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) BIND(C,NAME='h5tset_strpad_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - END FUNCTION h5tset_strpad_c - END INTERFACE - - hdferr = h5tset_strpad_c(type_id, strpad) - END SUBROUTINE h5tset_strpad_f - -! -!****s* H5T/h5tget_nmembers_f -! -! NAME -! h5tget_nmembers_f -! -! PURPOSE -! Retrieves the number of fields in a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! num_members - number of members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) BIND(C,NAME='h5tget_nmembers_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - END FUNCTION h5tget_nmembers_c - END INTERFACE - - hdferr = h5tget_nmembers_c(type_id, num_members) - END SUBROUTINE h5tget_nmembers_f - -! -!****s* H5T/h5tget_member_name_f -! -! NAME -! h5tget_member_name_f -! -! PURPOSE -! Retrieves the name of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! index - filed index (0-based) -! OUTPUTS -! member_name - buffer to hold member's name -! namelen - name length -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(LEN=*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) BIND(C,NAME='h5tget_member_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - END FUNCTION h5tget_member_name_c - END INTERFACE - - hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) - END SUBROUTINE h5tget_member_name_f - -! -!****s* H5T/h5tget_member_offset_f -! -! NAME -! h5tget_member_offset_f -! -! PURPOSE -! Retrieves the offset of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the field -! OUTPUTS -! offset - byte offset of the requested field -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) BIND(C,NAME='h5tget_member_offset_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_member_offset_c - END INTERFACE - - hdferr = h5tget_member_offset_c(type_id, member_no, offset ) - END SUBROUTINE h5tget_member_offset_f -! -!****s* H5T/h5tget_member_index_f -! -! NAME -! h5tget_member_index_f -! -! PURPOSE -! Retrieves the index of a compound or enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! name - name of the field or member whose index to -! to be retrieved from the datatype. -! OUTPUTS -! index - 0-based index of the filed or member (0 to N-1) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! SOURCE - SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(OUT) :: index - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) BIND(C,NAME='h5tget_member_index_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index - END FUNCTION h5tget_member_index_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tget_member_index_c(type_id, name, namelen, index) - END SUBROUTINE h5tget_member_index_f - - -! !$! -! !$!****s* H5T/h5tget_member_dim_f -! !$! -! !$! NAME -! !$! h5tget_member_dim_f -! !$! -! !$! PURPOSE -! !$! This function is not supported in hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! -! !$! SOURCE -! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) -! !$! -! !$! IMPLICIT NONE -! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier -! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of -! !$! !field_dims, perm) -! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field -! !$! -! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the -! !$! !dimensions of the field -! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the -! !$! !permutation vector of the field -! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !$!*****! -! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c -! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) -! !$! -! !$! END SUBROUTINE h5tget_member_dims_f - - -!****s* H5T/h5tget_array_dims_f -! -! NAME -! h5tget_array_dims_f -! -! PURPOSE -! Returns sizes of array dimensions. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! dims - buffer to store array datatype dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) BIND(C,NAME='h5tget_array_dims_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5tget_array_dims_c - END INTERFACE - - hdferr = h5tget_array_dims_c(type_id, dims) - - END SUBROUTINE h5tget_array_dims_f - -! -!****s* H5T/h5tget_array_ndims_f -! -! NAME -! h5tget_array_ndims_f -! -! PURPOSE -! Returns the rank of an array datatype. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! ndims - number of array dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) BIND(C,NAME='h5tget_array_ndims_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - END FUNCTION h5tget_array_ndims_c - END INTERFACE - - hdferr = h5tget_array_ndims_c(type_id, ndims) - - END SUBROUTINE h5tget_array_ndims_f - -! -!****s* H5T/h5tget_super_f -! -! NAME -! h5tget_super_f -! -! PURPOSE -! Returns the base datatype from which a datatype is derived. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! base_type_id - identifier of the base type -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) BIND(C,NAME='h5tget_super_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - END FUNCTION h5tget_super_c - END INTERFACE - - hdferr = h5tget_super_c(type_id, base_type_id) - - END SUBROUTINE h5tget_super_f - -! -!****s* H5T/h5tget_member_type_f -! -! NAME -! h5tget_member_type_f -! -! PURPOSE -! Returns the datatype of the specified member. -! -! INPUTS -! type_id - compound datatype identifier -! field_idx - field index (0-based) -! -! OUTPUTS -! datatype - identifier of the member's datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) & - BIND(C,NAME='h5tget_member_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - END FUNCTION h5tget_member_type_c - END INTERFACE - - hdferr = h5tget_member_type_c(type_id, field_idx , datatype) - END SUBROUTINE h5tget_member_type_f - -! -!****s* H5T/h5tcreate_f -! -! NAME -! h5tcreate_f -! -! PURPOSE -! Creates a new datatype. -! -! INPUTS -! class - Datatype class can be one of: -! H5T_COMPOUND_F -! H5T_ENUM_F -! H5T_OPAQUE_F -! H5T_STRING_F -! -! size - Size of the datatype. -! OUTPUTS -! type_id - Datatype identifier. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) - IMPLICIT NONE - INTEGER , INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T) , INTENT(OUT) :: type_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tcreate_c(class, size, type_id) BIND(C,NAME='h5tcreate_c') - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tcreate_c - END INTERFACE - - hdferr = h5tcreate_c(class, size, type_id) - END SUBROUTINE h5tcreate_f - -! -!****s* H5T/h5tinsert_f -! -! NAME -! h5tinsert_f -! -! PURPOSE -! Adds a new member to a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! name - name of the field to insert -! offset - start of the member in an instance of -! the compound datatype -! field_id - datatype identifier of the field to insert -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) BIND(C,NAME='h5tinsert_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER :: namelen - END FUNCTION h5tinsert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) - END SUBROUTINE h5tinsert_f - -! -!****s* H5T/h5tpack_f -! -! NAME -! h5tpack_f -! -! PURPOSE -! Recursively removes padding from within a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tpack_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tpack_c(type_id) BIND(C,NAME='h5tpack_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tpack_c - END INTERFACE - - hdferr = h5tpack_c(type_id) - END SUBROUTINE h5tpack_f - -! !$! -! !$!****s* H5T/h5tinsert_array_f -! !$! -! !$! NAME -! !$! h5tinsert_array_f -! !$! -! !$! PURPOSE -! !$! This function is not available on hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! SOURCE -! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype -! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member -! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member -! !within compound datatype -! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. -! !Valid values are 0 (zero) through 4 (four) -! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array -! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !*****! -! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm -! !Pointer to buffer to store -! !the permutation vector of the field -! INTEGER :: namelen, sizeofperm -! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 -! namelen = LEN(name) -! if (present(perm)) then -! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) -! else -! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) -! end if -! -! END SUBROUTINE h5tinsert_array_f - -! -!****s* H5T/h5tarray_create_f -! -! NAME -! h5tarray_create_f -! -! PURPOSE -! Creates an array datatype object. -! -! INPUTS -! base_id - datatype identifier for the array -! base datatype -! rank - rank of the array -! dims - array dimension sizes -! OUTPUTS -! type_id - array datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) BIND(C,NAME='h5tarray_create_c') - IMPORT :: HID_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tarray_create_c - END INTERFACE - - hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - - END SUBROUTINE h5tarray_create_f - -! -!****s* H5T/h5tenum_create_f -! -! NAME -! h5tenum_create_f -! -! PURPOSE -! Creates a new enumeration datatype. -! -! INPUTS -! parent_id - datatype identifier for base datatype -! OUTPUTS -! new_type_id - datatype identifier for the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) BIND(C,NAME='h5tenum_create_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tenum_create_c - END INTERFACE - - hdferr = h5tenum_create_c(parent_id, new_type_id) - END SUBROUTINE h5tenum_create_f -! -!****s* H5T/h5tenum_nameof_f -! -! NAME -! h5tenum_nameof_f -! -! PURPOSE -! Returns the symbol name corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! value - value of the enumeration datatype -! namelen - name buffer size -! OUTPUTS -! name - buffer to hold symbol name -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! NOTE -! According to the standard: Because an INTENT(OUT) variable is considered undefined -! on entry to the procedure, any default initialization specified for its type will -! be applied. So we need to blank out the "name" to be portable and eliminate any -! characters the "name' may contain upon entry, depending on compiler implementation. -! SOURCE - SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) BIND(C,NAME='h5tenum_nameof_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - END FUNCTION h5tenum_nameof_c - END INTERFACE - - name(1:LEN(name)) = ' ' - - hdferr = h5tenum_nameof_c(type_id, value, name, namelen) - END SUBROUTINE h5tenum_nameof_f -! -!****s* H5T/h5tenum_valuof_f -! -! NAME -! h5tenum_valuof_f -! -! PURPOSE -! Returns the value corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! name - symbol name -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(OUT) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) & - BIND(C,NAME='h5tenum_valueof_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tenum_valueof_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_valueof_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_valueof_f - -! -!****s* H5T/h5tget_member_value_f -! -! NAME -! h5tget_member_value_f -! -! PURPOSE -! Returns the value of an enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the enumeration datatype member -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) & - BIND(C,NAME='h5tget_member_value_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tget_member_value_c - END INTERFACE - - hdferr = h5tget_member_value_c(type_id, member_no, value) - END SUBROUTINE h5tget_member_value_f - -! -!****s* H5T/h5tset_tag_f -! -! NAME -! h5tset_tag_f -! -! PURPOSE -! Tags an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! tag - unique ASCII string with which the opaque -! datatype is to be tagged. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: tag - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: taglen - - INTERFACE - INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) BIND(C,NAME='h5tset_tag_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: tag - INTEGER :: taglen - END FUNCTION h5tset_tag_c - END INTERFACE - - taglen = LEN(tag) - hdferr = h5tset_tag_c(type_id, tag, taglen) - END SUBROUTINE h5tset_tag_f - -! -!****s* H5T/h5tget_tag_f -! -! NAME -! h5tget_tag_f -! -! PURPOSE -! Gets the tag associated with an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! OUTPUTS -! tag - unique ASCII string associated with opaque -! datatype -! taglen - Length of tag -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER, INTENT(OUT) :: taglen - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T):: tag_size ! Declared character length of tab - INTERFACE - INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) & - BIND(C,NAME='h5tget_tag_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: tag - INTEGER(SIZE_T), INTENT(IN) :: tag_size - INTEGER, INTENT(OUT) :: taglen - END FUNCTION h5tget_tag_c - END INTERFACE - - tag_size = LEN(tag) - hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) - END SUBROUTINE h5tget_tag_f - -! -!****s* H5T/h5tvlen_create_f -! -! NAME -! h5tvlen_create_f -! -! PURPOSE -! Creates a new variable-length datatype. -! -! INPUTS -! type_id - identifier iof base datatype -! OUTPUTS -! vltype_id - identifier for VL datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! Wednesday, October 23, 2002 -! -! NOTES -! Only basic Fortran base datatypes are supported -! -! SOURCE - SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) BIND(C,NAME='h5tvlen_create_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - END FUNCTION h5tvlen_create_c - END INTERFACE - - hdferr = h5tvlen_create_c(type_id, vltype_id) - END SUBROUTINE h5tvlen_create_f - -! -!****s* H5T/h5tis_variable_str_f -! -! NAME -! h5tis_variable_str_f -! -! PURPOSE -! Determines whether a dattype is a variable string. -! -! INPUTS -! type_id - datartpe identifier -! OUTPUTS -! status - flag to indicate if datatype -! is a variable string ( TRUE or FALSE) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - LOGICAL, INTENT(OUT) :: status - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) & - BIND(C,NAME='h5tis_variable_str_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: flag - END FUNCTION h5tis_variable_str_c - END INTERFACE - - hdferr = h5tis_variable_str_c(type_id, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5tis_variable_str_f - -! -!****s* H5T/h5tget_member_class_f -! -! NAME -! h5tget_member_class_f -! -! PURPOSE -! Returns datatype class of compound datatype member. -! -! INPUTS -! type_id - datartpe identifier -! member_no - index of compound datatype member -! OUTPUTS -! class - class type for compound dadtype member -! Valid classes: -! H5T_NO_CLASS_F (error) -! H5T_INTEGER_F -! H5T_FLOAT_F -! H5T_TIME_F -! H5T_STRING_F -! H5T_BITFIELD_F -! H5T_OPAQUE_F -! H5T_COMPOUND_F -! H5T_REFERENCE_F -! H5T_ENUM_F -! H5T_VLEN_F -! H5T_ARRAY_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! April 6, 2005 -! -! SOURCE - SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) & - BIND(C,NAME='h5tget_member_class_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_member_class_c - END INTERFACE - - hdferr = h5tget_member_class_c(type_id, member_no, class) - - END SUBROUTINE h5tget_member_class_f - -! -!****s* H5T/h5tcommit_anon_f -! -! NAME -! h5tcommit_anon_f -! -! PURPOSE -! Commits a transient datatype to a file, -! creating a new named datatype, -! but does not link it into the file structure. -! -! INPUTS -! loc_id - A file or group identifier specifying the file -! in which the new named datatype is to be created. -! dtype_id - A datatype identifier. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tcpl_id - A datatype creation property list identifier. -! (H5P_DEFAULT_F for the default property list.) -! tapl_id - A datatype access property list identifier. -! should always be passed as the value H5P_DEFAULT_F. -! -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(OUT) :: hdferr - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id -!***** - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default) BIND(C,NAME='h5tcommit_anon_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_anon_c - END INTERFACE - - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_anon_f - -! -!****s* H5T/h5tcommitted_f -! -! NAME -! h5tcommitted_f -! -! PURPOSE -! Determines whether a datatype is a named type or a transient type. -! -! INPUTS -! dtype_id - A datatype identifier. -! -! OUTPUTS -! committed - .TRUE., if the datatype has been committed -! .FALSE., if the datatype has not been committed. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - LOGICAL, INTENT(OUT) :: committed - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tcommitted_c(dtype_id) BIND(C,NAME='h5tcommitted_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - END FUNCTION h5tcommitted_c - END INTERFACE - - hdferr = h5tcommitted_c(dtype_id) - - IF(hdferr.GT.0)THEN - committed = .TRUE. - hdferr = 0 - ELSE IF(hdferr.EQ.0)THEN - committed = .FALSE. - hdferr = 0 - ELSE - hdferr = -1 - ENDIF - - END SUBROUTINE h5tcommitted_f - -! -!****s* H5T/H5Tdecode_f -! -! NAME -! H5Tdecode_f -! -! PURPOSE -! Decode a binary object description of data type and return a new object handle. -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tdecode_c(buf, obj_id) BIND(C,NAME='h5tdecode_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5tdecode_c - END INTERFACE - - hdferr = h5tdecode_c(buf, obj_id) - - END SUBROUTINE h5tdecode_f - -! -!****s* H5T/H5Tencode_f -! -! NAME -! H5Tencode_f -! -! PURPOSE -! Encode a data type object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5tencode_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5tencode_c - END INTERFACE - - hdferr = h5tencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5tencode_f - -! -!****s* H5T/h5tget_create_plist_f -! -! NAME -! h5tget_create_plist_f -! -! PURPOSE -! Returns a copy of a datatype creation property list. -! -! INPUTS -! dtype_id - Datatype identifier -! OUTPUTS -! dtpl_id - Datatype property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T), INTENT(OUT) :: dtpl_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) BIND(C,NAME='h5tget_create_plist_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T), INTENT(OUT) :: dtpl_id - END FUNCTION h5tget_create_plist_c - END INTERFACE - - hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) - END SUBROUTINE h5tget_create_plist_f - -! -!****s* H5T/h5tcompiler_conv_f -! -! NAME -! h5tcompiler_conv_f -! -! PURPOSE -! Check whether the library’s default conversion is hard conversion.R -! -! INPUTS -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! OUTPUTS -! flag - TRUE for compiler conversion, FALSE for library conversion -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id - INTEGER(HID_T), INTENT(IN) :: dst_id - LOGICAL, INTENT(OUT) :: flag - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) BIND(C,NAME='h5tcompiler_conv_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER :: c_flag - END FUNCTION h5tcompiler_conv_c - END INTERFACE - - hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) - - flag = .FALSE. - IF(c_flag .GT. 0) flag = .TRUE. - - END SUBROUTINE h5tcompiler_conv_f - -! -!****s* H5T/h5tget_native_type_f -! -! NAME -! h5tget_native_type_f -! -! PURPOSE -! Returns the native datatype of a specified datatype. -! -! INPUTS -! dtype_id - Datatype identifier for the dataset datatype. -! -! direction - Direction of search: -! H5T_DIR_DEFAULT, default direction is inscendent, -! H5T_DIR_ASCEND , in inscendent order, -! H5T_DIR_DESCEND, in descendent order. -! -! * NOTE: In C it is defined as a structure: H5T_direction_t -! -! OUTPUTS -! native_dtype_id - The native datatype identifier for the specified dataset datatype -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! June 18, 2008 -! SOURCE - SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) BIND(C,NAME='h5tget_native_type_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id - END FUNCTION h5tget_native_type_c - END INTERFACE - - hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) - END SUBROUTINE h5tget_native_type_f - -!****s* H5T/H5Tconvert_f_F03 -! -! NAME -! H5Tconvert_f -! -! PURPOSE -! Converts data from between specified datatypes. -! -! Inputs: -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! nelmts - Size of array buf. -! buf - Array containing pre-conversion values. -! background - Optional background buffer. -! plist_id - Dataset transfer property list identifier. -! -! Outputs: -! buf - Array containing post-conversion values. -! hdferr - error code: -! 0 on success and -1 on failure -! AUTHOR -! M. Scot Breitenfeld -! Decemember 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id -!***** - INTEGER(HID_T) :: plist_id_default - TYPE(C_PTR) :: background_default - - INTERFACE - INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & - BIND(C, NAME='h5tconvert_c') - IMPORT :: c_ptr - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , VALUE :: buf - TYPE(C_PTR) , VALUE :: background - INTEGER(HID_T) , INTENT(IN) :: plist_id - END FUNCTION h5tconvert_c - END INTERFACE - - plist_id_default = H5P_DEFAULT_F - IF(PRESENT(plist_id)) plist_id_default = plist_id - - background_default = C_NULL_PTR - IF(PRESENT(background)) background_default = background - - hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) - - END SUBROUTINE h5tconvert_f -! -!****s* H5T/h5tenum_insert_f90 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) BIND(C,NAME='h5tenum_insert_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* H5T/h5tenum_insert_f03 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Pointer to the value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 6, 2015 -! -! HISTORY -! F2003 implementation of function -! SOURCE - SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & - BIND(C, NAME='h5tenum_insert_ptr_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 - -END MODULE H5T diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 new file mode 100644 index 0000000..4b4c0b6 --- /dev/null +++ b/fortran/src/H5Tff.f90 @@ -0,0 +1,3105 @@ +!****h* ROBODoc/H5T +! +! NAME +! MODULE H5T +! +! PURPOSE +! This file contains Fortran interfaces for H5T functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5T + + USE H5GLOBAL + +CONTAINS + +! +!****s* H5T/h5topen_f +! +! NAME +! h5topen_f +! +! PURPOSE +! Opens named datatype. +! +! INPUTS +! loc_id - location identifier +! name - a datatype name +! OUTPUTS +! type_id - datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tapl_id - datatype access property list identifier. +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! Added optional parameter 'tapl_id' for compatability +! with H5Topen2. April 9, 2009. +! +! SOURCE + SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group + INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5topen_c + END INTERFACE + + namelen = LEN(name) + + tapl_id_default = H5P_DEFAULT_F + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + END SUBROUTINE h5topen_f +! +!****s* H5T/h5tcommit_f +! +! NAME +! h5tcommit_f +! +! PURPOSE +! Commits a transient datatype to a file, creating a +! new named datatype. +! +! INPUTS +! loc_id - location identifier +! name - name of the datatype to be stored +! at the specified location +! type_id - identifier of a datatype to be stored +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list +! tcpl_id - Datatype creation property list +! tapl_id - Datatype access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! - Added optional parameters introduced in version 1.8 +! M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & + lcpl_id, tcpl_id, tapl_id ) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name + ! Datatype name within file or group + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list +!***** + + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF (PRESENT(tapl_id)) tapl_id_default = tapl_id + + namelen = LEN(name) + + hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_f +! +!****s* H5T/h5tcopy_f +! +! NAME +! h5tcopy_f +! +! PURPOSE +! Creates a copy of exisiting datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! new_type_id - identifier of datatype's copy +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: new_type_id + ! Identifier of datatype's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tcopy_c + END INTERFACE + + hdferr = h5tcopy_c(type_id, new_type_id) + END SUBROUTINE h5tcopy_f +! +!****s* H5T/h5tequal_f +! +! NAME +! h5tequal_f +! +! PURPOSE +! Determines whether two datatype identifiers refer +! to the same datatype. +! +! INPUTS +! type1_id - datatype identifier +! type2_id - datatype identifier +! OUTPUTS +! flag - TRUE/FALSE flag to indicate +! if two datatypes are equal +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two + ! datatypes are equal + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_flag + INTERFACE + INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER :: c_flag + END FUNCTION h5tequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5tequal_c(type1_id, type2_id, c_flag) + if(c_flag .gt. 0) flag = .TRUE. + END SUBROUTINE h5tequal_f +! +!****s* H5T/h5tclose_f +! +! NAME +! h5tclose_f +! +! PURPOSE +! Releases a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tclose_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tclose_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tclose_c + END INTERFACE + + hdferr = h5tclose_c(type_id) + END SUBROUTINE h5tclose_f +! +!****s* H5T/h5tget_class_f +! +! NAME +! h5tget_class_f +! +! PURPOSE +! Returns the datatype class identifier. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! class - Class, possible values are: +! H5T_NO_CLASS_F (-1) +! H5T_INTEGER_F (0) +! H5T_FLOAT_F (1) +! H5T_TIME_F (2) +! H5T_STRING_F (3) +! H5T_BITFIELD_F (4) +! H5T_OPAQUE_F (5) +! H5T_COMPOUND_F (6) +! H5T_REFERENCE_F (7) +! H5T_ENUM_F (8) +! H5T_VLEN_F (9) +! H5T_ARRAY_F (10) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_class_f(type_id, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_class_c(type_id, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_class_c + END INTERFACE + + hdferr = h5tget_class_c(type_id, class) + END SUBROUTINE h5tget_class_f +! +!****s* H5T/h5tget_size_f +! +! NAME +! h5tget_size_f +! +! PURPOSE +! Returns the size of a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! size - datatype size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5tget_size_c + END INTERFACE + + hdferr = h5tget_size_c(type_id, size) + END SUBROUTINE h5tget_size_f + +! +!****s* H5T/h5tset_size_f +! +! NAME +! h5tset_size_f +! +! PURPOSE +! Sets the total size for an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! size - size of the datatype +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! +! SOURCE + SUBROUTINE h5tset_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5tset_size_c + END INTERFACE + + hdferr = h5tset_size_c(type_id, size) + END SUBROUTINE h5tset_size_f + +! +!****s* H5T/h5tget_order_f +! +! NAME +! h5tget_order_f +! +! PURPOSE +! Returns the byte order of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! order - byte order for the datatype, possible +! values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: order + ! Datatype byte order, possible values are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: order + END FUNCTION h5tget_order_c + END INTERFACE + + hdferr = h5tget_order_c(type_id, order) + END SUBROUTINE h5tget_order_f +! +!****s* H5T/h5tset_order_f +! +! NAME +! h5tset_order_f +! +! PURPOSE +! Sets the byte ordering of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! order - datatype byte order Possible values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values + ! are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: order + END FUNCTION h5tset_order_c + END INTERFACE + + hdferr = h5tset_order_c(type_id, order) + END SUBROUTINE h5tset_order_f + +! +!****s* H5T/h5tget_precision_f +! +! NAME +! h5tget_precision_f +! +! PURPOSE +! Returns the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! precision - precision of the datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision + END FUNCTION h5tget_precision_c + END INTERFACE + + hdferr = h5tget_precision_c(type_id, precision) + END SUBROUTINE h5tget_precision_f + +! +!****s* H5T/h5tset_precision_f +! +! NAME +! h5tset_precision_f +! +! PURPOSE +! Sets the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! precision - datatype precision +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: precision + END FUNCTION h5tset_precision_c + END INTERFACE + + hdferr = h5tset_precision_c(type_id, precision) + END SUBROUTINE h5tset_precision_f + +! +!****s* H5T/h5tget_offset_f +! +! NAME +! h5tget_offset_f +! +! PURPOSE +! Retrieves the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! offset - offset value +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_offset_c + END INTERFACE + + hdferr = h5tget_offset_c(type_id, offset) + END SUBROUTINE h5tget_offset_f + +! +!****s* H5T/h5tset_offset_f +! +! NAME +! h5tset_offset_f +! +! PURPOSE +! Sets the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! offset - offset value +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + END FUNCTION h5tset_offset_c + END INTERFACE + + hdferr = h5tset_offset_c(type_id, offset) + END SUBROUTINE h5tset_offset_f + +! +!****s* H5T/h5tget_pad_f +! +! NAME +! h5tget_pad_f +! +! PURPOSE +! Retrieves the padding type of the least and +! most -significant bit padding. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! hdferr - Returns 0 if successful and -1 if fails + +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(OUT) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + END FUNCTION h5tget_pad_c + END INTERFACE + + hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tget_pad_f + +! +!****s* H5T/h5tset_pad_f +! +! NAME +! h5tset_pad_f +! +! PURPOSE +! Sets the least and most-significant bits padding types. +! +! INPUTS +! type_id - datatype identifier +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(IN) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T_PAD_ZERO_F = 0 + ! H5T_PAD_ONE_F = 1 + ! H5T_PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: type_id + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + END FUNCTION h5tset_pad_c + END INTERFACE + + hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tset_pad_f + +! +!****s* H5T/h5tget_sign_f +! +! NAME +! h5tget_sign_f +! +! PURPOSE +! Retrieves the sign type for an integer type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: sign ! sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + END FUNCTION h5tget_sign_c + END INTERFACE + + hdferr = h5tget_sign_c(type_id, sign) + END SUBROUTINE h5tget_sign_f + +! +!****s* H5T/h5tset_sign_f +! +! NAME +! h5tset_sign_f +! +! PURPOSE +! Sets the sign proprety for an integer type. +! +! INPUTS +! type_id - datatype identifier +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: sign !sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + END FUNCTION h5tset_sign_c + END INTERFACE + + hdferr = h5tset_sign_c(type_id, sign) + END SUBROUTINE h5tset_sign_f + +! +!****s* H5T/h5tget_fields_f +! +! NAME +! h5tget_fields_f +! +! PURPOSE +! Retrieves floating point datatype bit field information. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + END FUNCTION h5tget_fields_c + END INTERFACE + + hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tget_fields_f + +! +!****s* H5T/h5tset_fields_f +! +! NAME +! h5tset_fields_f +! +! PURPOSE +! Sets locations and sizes of floating point bit fields. +! +! INPUTS +! type_id - datatype identifier +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + END FUNCTION h5tset_fields_c + END INTERFACE + + hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tset_fields_f + +! +!****s* H5T/h5tget_ebias_f +! +! NAME +! h5tget_ebias_f +! +! PURPOSE +! Retrieves the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! ebias - datatype exponent bias +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + END FUNCTION h5tget_ebias_c + END INTERFACE + + hdferr = h5tget_ebias_c(type_id, ebias) + END SUBROUTINE h5tget_ebias_f + +! +!****s* H5T/h5tset_ebias_f +! +! NAME +! h5tset_ebias_f +! +! PURPOSE +! Sets the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! ebias - datatype exponent bias +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + END FUNCTION h5tset_ebias_c + END INTERFACE + + hdferr = h5tset_ebias_c(type_id, ebias) + END SUBROUTINE h5tset_ebias_f + +! +!****s* H5T/h5tget_norm_f +! +! NAME +! h5tget_norm_f +! +! PURPOSE +! Retrieves mantissa normalization of a floating-point +! datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + END FUNCTION h5tget_norm_c + END INTERFACE + + hdferr = h5tget_norm_c(type_id, norm) + END SUBROUTINE h5tget_norm_f + +! +!****s* H5T/h5tset_norm_f +! +! NAME +! h5tset_norm_f +! +! PURPOSE +! Sets the mantissa normalization of a floating-point datatype. +! +! INPUTS +! type_id - datatype identifier +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + END FUNCTION h5tset_norm_c + END INTERFACE + + hdferr = h5tset_norm_c(type_id, norm) + END SUBROUTINE h5tset_norm_f + +! +!****s* H5T/h5tget_inpad_f +! +! NAME +! h5tget_inpad_f +! +! PURPOSE +! Retrieves the internal padding type for unused bits +! in floating-point datatypes. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + END FUNCTION h5tget_inpad_c + END INTERFACE + + hdferr = h5tget_inpad_c(type_id, padtype) + END SUBROUTINE h5tget_inpad_f + +! +!****s* H5T/h5tset_inpad_f +! +! NAME +! h5tset_inpad_f +! +! PURPOSE +! Fills unused internal floating point bits. +! +! INPUTS +! type_id - datatype identifier +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + END FUNCTION h5tset_inpad_c + END INTERFACE + + hdferr = h5tset_inpad_c(type_id, padtype) + END SUBROUTINE h5tset_inpad_f + +! +!****s* H5T/h5tget_cset_f +! +! NAME +! h5tget_cset_f +! +! PURPOSE +! Retrieves the character set type of a string datatype. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! cset - Character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F = 0 +! H5T_CSET_UTF8_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype + ! Possible values are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + END FUNCTION h5tget_cset_c + END INTERFACE + + hdferr = h5tget_cset_c(type_id, cset) + END SUBROUTINE h5tget_cset_f + +! +!****s* H5T/h5tset_cset_f +! +! NAME +! h5tset_cset_f +! +! PURPOSE +! Sets character set to be used. +! +! INPUTS +! type_id - datatype identifier +! cset - character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F = 0 +! H5T_CSET_UTF8_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: cset !character set type of a string datatype + ! Possible values of padding type are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + END FUNCTION h5tset_cset_c + END INTERFACE + + hdferr = h5tset_cset_c(type_id, cset) + END SUBROUTINE h5tset_cset_f + +! +!****s* H5T/h5tget_strpad_f +! +! NAME +! h5tget_strpad_f +! +! PURPOSE +! Retrieves the storage mechanism for a string datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F +! H5T_STR_ERROR_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: strpad + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + END FUNCTION h5tget_strpad_c + END INTERFACE + + hdferr = h5tget_strpad_c(type_id, strpad) + END SUBROUTINE h5tget_strpad_f + +! +!****s* H5T/h5tset_strpad_f +! +! NAME +! h5tset_strpad_f +! +! PURPOSE +! Defines the storage mechanism for character strings. +! +! INPUTS +! type_id - datatype identifier +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F +! H5T_STR_ERROR_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + END FUNCTION h5tset_strpad_c + END INTERFACE + + hdferr = h5tset_strpad_c(type_id, strpad) + END SUBROUTINE h5tset_strpad_f + +! +!****s* H5T/h5tget_nmembers_f +! +! NAME +! h5tget_nmembers_f +! +! PURPOSE +! Retrieves the number of fields in a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! num_members - number of members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + END FUNCTION h5tget_nmembers_c + END INTERFACE + + hdferr = h5tget_nmembers_c(type_id, num_members) + END SUBROUTINE h5tget_nmembers_f + +! +!****s* H5T/h5tget_member_name_f +! +! NAME +! h5tget_member_name_f +! +! PURPOSE +! Retrieves the name of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! index - filed index (0-based) +! OUTPUTS +! member_name - buffer to hold member's name +! namelen - name length +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve + CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of + !a compound datatype + INTEGER, INTENT(OUT) :: namelen ! Length of the name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: member_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(LEN=*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + END FUNCTION + END INTERFACE + + hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) + END SUBROUTINE h5tget_member_name_f + +! +!****s* H5T/h5tget_member_offset_f +! +! NAME +! h5tget_member_offset_f +! +! PURPOSE +! Retrieves the offset of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the field +! OUTPUTS +! offset - byte offset of the requested field +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the field + !whose offset is requested + INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_member_offset_c + END INTERFACE + + hdferr = h5tget_member_offset_c(type_id, member_no, offset ) + END SUBROUTINE h5tget_member_offset_f +! +!****s* H5T/h5tget_member_index_f +! +! NAME +! h5tget_member_index_f +! +! PURPOSE +! Retrieves the index of a compound or enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! name - name of the field or member whose index to +! to be retrieved from the datatype. +! OUTPUTS +! index - 0-based index of the filed or member (0 to N-1) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! SOURCE + SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name + INTEGER, INTENT(OUT) :: index ! Field or member index + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + + INTERFACE + INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: index + END FUNCTION h5tget_member_index_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tget_member_index_c(type_id, name, namelen, index) + END SUBROUTINE h5tget_member_index_f + + +! !$! +! !$!****s* H5T/h5tget_member_dim_f +! !$! +! !$! NAME +! !$! h5tget_member_dim_f +! !$! +! !$! PURPOSE +! !$! This function is not supported in hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! +! !$! SOURCE +! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) +! !$! +! !$! IMPLICIT NONE +! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier +! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of +! !$! !field_dims, perm) +! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field +! !$! +! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the +! !$! !dimensions of the field +! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the +! !$! !permutation vector of the field +! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !$!*****! +! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c +! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) +! !$! +! !$! END SUBROUTINE h5tget_member_dims_f + + +!****s* H5T/h5tget_array_dims_f +! +! NAME +! h5tget_array_dims_f +! +! PURPOSE +! Returns sizes of array dimensions. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! dims - buffer to store array datatype dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype + ! dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5tget_array_dims_c + END INTERFACE + + hdferr = h5tget_array_dims_c(type_id, dims) + + END SUBROUTINE h5tget_array_dims_f + +! +!****s* H5T/h5tget_array_ndims_f +! +! NAME +! h5tget_array_ndims_f +! +! PURPOSE +! Returns the rank of an array datatype. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! ndims - number of array dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER, INTENT(OUT) :: ndims ! number of array dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + END FUNCTION h5tget_array_ndims_c + END INTERFACE + + hdferr = h5tget_array_ndims_c(type_id, ndims) + + END SUBROUTINE h5tget_array_ndims_f + +! +!****s* H5T/h5tget_super_f +! +! NAME +! h5tget_super_f +! +! PURPOSE +! Returns the base datatype from which a datatype is derived. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! base_type_id - identifier of the base type +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype + ! from which datatype (type_id) was derived + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + END FUNCTION h5tget_super_c + END INTERFACE + + hdferr = h5tget_super_c(type_id, base_type_id) + + END SUBROUTINE h5tget_super_f + +! +!****s* H5T/h5tget_member_type_f +! +! NAME +! h5tget_member_type_f +! +! PURPOSE +! Returns the datatype of the specified member. +! +! INPUTS +! type_id - compound datatype identifier +! field_idx - field index (0-based) +! +! OUTPUTS +! datatype - idnetifier of the member's datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve + INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of + !the datatype of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + END FUNCTION h5tget_member_type_c + END INTERFACE + + hdferr = h5tget_member_type_c(type_id, field_idx , datatype) + END SUBROUTINE h5tget_member_type_f + +! +!****s* H5T/h5tcreate_f +! +! NAME +! h5tcreate_f +! +! PURPOSE +! Creates a new datatype. +! +! INPUTS +! class - Datatype class can be one of: +! H5T_COMPOUND_F +! H5T_ENUM_F +! H5T_OPAQUE_F +! H5T_STRING_F +! +! size - Size of the datatype. +! OUTPUTS +! type_id - Datatype identifier. +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) + IMPLICIT NONE + INTEGER , INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T) , INTENT(OUT) :: type_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tcreate_c(class, size, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tcreate_c + END INTERFACE + + hdferr = h5tcreate_c(class, size, type_id) + END SUBROUTINE h5tcreate_f + +! +!****s* H5T/h5tinsert_f +! +! NAME +! h5tinsert_f +! +! PURPOSE +! Adds a new member to a compound datatype. +! +! INPUTS +! type_id - compound dattype identifier +! name - name of the field to insert +! offset - start of the member in an instance of +! the compound datatype +! field_id - datatype identifier of the field to insert +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert + INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of + !the compound datatype + INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER :: namelen + END FUNCTION h5tinsert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) + END SUBROUTINE h5tinsert_f + +! +!****s* H5T/h5tpack_f +! +! NAME +! h5tpack_f +! +! PURPOSE +! Recursively removes padding from within a compound datatype. +! +! INPUTS +! type_id - compound datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tpack_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tpack_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tpack_c + END INTERFACE + + hdferr = h5tpack_c(type_id) + END SUBROUTINE h5tpack_f + +! !$! +! !$!****s* H5T/h5tinsert_array_f +! !$! +! !$! NAME +! !$! h5tinsert_array_f +! !$! +! !$! PURPOSE +! !$! This function is not available on hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! SOURCE +! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype +! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member +! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member +! !within compound datatype +! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. +! !Valid values are 0 (zero) through 4 (four) +! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array +! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !*****! +! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm +! !Pointer to buffer to store +! !the permutation vector of the field +! INTEGER :: namelen, sizeofperm +! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 +! namelen = LEN(name) +! if (present(perm)) then +! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) +! else +! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) +! end if +! +! END SUBROUTINE h5tinsert_array_f + +! +!****s* H5T/h5tarray_create_f +! +! NAME +! h5tarray_create_f +! +! PURPOSE +! Creates an array datatype object. +! +! INPUTS +! base_id - datatype identifier for the array +! base datatype +! rank - rank of the array +! dims - array dimension sizes +! OUTPUTS +! type_id - array datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype + INTEGER, INTENT(IN) :: rank ! Rank of the array + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension + INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tarray_create_c + END INTERFACE + + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) + + END SUBROUTINE h5tarray_create_f + +! +!****s* H5T/h5tenum_create_f +! +! NAME +! h5tenum_create_f +! +! PURPOSE +! Creates a new enumeration datatype. +! +! INPUTS +! parent_id - datatype identifier for base datatype +! OUTPUTS +! new_type_id - datatype identifier for the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for + ! the base datatype + INTEGER(HID_T), INTENT(OUT) :: new_type_id + !datatype identifier for the + ! new enumeration datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tenum_create_c + END INTERFACE + + hdferr = h5tenum_create_c(parent_id, new_type_id) + END SUBROUTINE h5tenum_create_f +! +!****s* H5T/h5tenum_nameof_f +! +! NAME +! h5tenum_nameof_f +! +! PURPOSE +! Returns the symbol name corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! value - value of the enumeration datatype +! namelen - name buffer size +! OUTPUTS +! name - buffer to hold symbol name +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! NOTE +! According to the standard: Because an INTENT(OUT) variable is considered undefined +! on entry to the procedure, any default initialization specified for its type will +! be applied. So we need to blank out the "name" to be portable and eliminate any +! characters the "name' may contain upon entry, depending on compiler implementation. +! SOURCE + SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. + INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name + INTEGER, INTENT(IN) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + END FUNCTION h5tenum_nameof_c + END INTERFACE + + name(1:LEN(name)) = ' ' + + hdferr = h5tenum_nameof_c(type_id, value, name, namelen) + END SUBROUTINE h5tenum_nameof_f + +! +!****s* H5T/h5tenum_valuof_f +! +! NAME +! h5tenum_valuof_f +! +! PURPOSE +! Returns the value corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! name - symbol name +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tenum_valueof_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_valueof_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_valueof_f + +! +!****s* H5T/h5tget_member_value_f +! +! NAME +! h5tget_member_value_f +! +! PURPOSE +! Returns the value of an enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the enumeration datatype member +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + END FUNCTION + END INTERFACE + + hdferr = h5tget_member_value_c(type_id, member_no, value) + END SUBROUTINE h5tget_member_value_f + +! +!****s* H5T/h5tset_tag_f +! +! NAME +! h5tset_tag_f +! +! PURPOSE +! Tags an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! tag - unique ASCII string with which the opaque +! datatype is to be tagged. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which + !the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: taglen + + INTERFACE + INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: tag + INTEGER :: taglen + END FUNCTION h5tset_tag_c + END INTERFACE + + taglen = LEN(tag) + hdferr = h5tset_tag_c(type_id, tag, taglen) + END SUBROUTINE h5tset_tag_f + +! +!****s* H5T/h5tget_tag_f +! +! NAME +! h5tget_tag_f +! +! PURPOSE +! Gets the tag associated with an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! OUTPUTS +! tag - unique ASCII string associated with opaque +! datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which + ! the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: taglen ! Length of tag + INTEGER(SIZE_T) :: tag_size ! Declared character length of tab + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: tag + INTEGER(SIZE_T), INTENT(IN) :: tag_size + INTEGER, INTENT(OUT) :: taglen + END FUNCTION h5tget_tag_c + END INTERFACE + + tag_size = LEN(tag) + + hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) + END SUBROUTINE h5tget_tag_f + +! +!****s* H5T/h5tvlen_create_f +! +! NAME +! h5tvlen_create_f +! +! PURPOSE +! Creates a new variable-length datatype. +! +! INPUTS +! type_id - identifier iof base datatype +! OUTPUTS +! vltype_id - identifier for VL datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! Wednesday, October 23, 2002 +! +! NOTES +! Only basic Fortran base datatypes are supported +! +! SOURCE + SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + END FUNCTION h5tvlen_create_c + END INTERFACE + + hdferr = h5tvlen_create_c(type_id, vltype_id) + END SUBROUTINE h5tvlen_create_f + +! +!****s* H5T/h5tis_variable_str_f +! +! NAME +! h5tis_variable_str_f +! +! PURPOSE +! Determines whether a dattype is a variable string. +! +! INPUTS +! type_id - datartpe identifier +! OUTPUTS +! status - flag to indicate if datatype +! is a variable string +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype + ! is a variable string or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: flag + END FUNCTION h5tis_variable_str_c + END INTERFACE + + hdferr = h5tis_variable_str_c(type_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5tis_variable_str_f + +! +!****s* H5T/h5tget_member_class_f +! +! NAME +! h5tget_member_class_f +! +! PURPOSE +! Returns datatype class of compound datatype member. +! +! INPUTS +! type_id - datartpe identifier +! member_no - index of compound datatype member +! OUTPUTS +! class - class type for compound dadtype member +! Valid classes: +! H5T_NO_CLASS_F (error) +! H5T_INTEGER_F +! H5T_FLOAT_F +! H5T_TIME_F +! H5T_STRING_F +! H5T_BITFIELD_F +! H5T_OPAQUE_F +! H5T_COMPOUND_F +! H5T_REFERENCE_F +! H5T_ENUM_F +! H5T_VLEN_F +! H5T_ARRAY_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! April 6, 2005 +! +! SOURCE + SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no ! Member number + INTEGER, INTENT(OUT) :: class ! Member class + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_member_class_c + END INTERFACE + + hdferr = h5tget_member_class_c(type_id, member_no, class) + + END SUBROUTINE h5tget_member_class_f + +! +!****s* H5T/h5tcommit_anon_f +! +! NAME +! h5tcommit_anon_f +! +! PURPOSE +! Commits a transient datatype to a file, +! creating a new named datatype, +! but does not link it into the file structure. +! +! INPUTS +! loc_id - A file or group identifier specifying the file +! in which the new named datatype is to be created. +! dtype_id - A datatype identifier. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tcpl_id - A datatype creation property list identifier. +! (H5P_DEFAULT_F for the default property list.) +! tapl_id - A datatype access property list identifier. +! should always be passed as the value H5P_DEFAULT_F. +! +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying + ! the file in which the new named datatype + ! is to be created. + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property + ! list identifier. + ! (H5P_DEFAULT_F for the default property list.) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. + ! should always be passed as the value H5P_DEFAULT_F. +!***** + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_anon_c + END INTERFACE + + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_anon_f + +! +!****s* H5T/h5tcommitted_f +! +! NAME +! h5tcommitted_f +! +! PURPOSE +! Determines whether a datatype is a named type or a transient type. +! +! INPUTS +! dtype_id - A datatype identifier. +! +! OUTPUTS +! committed - .TRUE., if the datatype has been committed +! .FALSE., if the datatype has not been committed. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier + LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed + !.FALSE., if the datatype has not been committed. + INTEGER, INTENT(OUT) :: hdferr ! Error code: +! Success: 0 +! Failure: -1 +!***** + INTERFACE + INTEGER FUNCTION h5tcommitted_c(dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + END FUNCTION h5tcommitted_c + END INTERFACE + + hdferr = h5tcommitted_c(dtype_id) + + IF(hdferr.GT.0)THEN + committed = .TRUE. + hdferr = 0 + ELSE IF(hdferr.EQ.0)THEN + committed = .FALSE. + hdferr = 0 + ELSE + hdferr = -1 + ENDIF + + + END SUBROUTINE h5tcommitted_f + +! +!****s* H5T/H5Tdecode_f +! +! NAME +! H5Tdecode_f +! +! PURPOSE +! Decode a binary object description of data type and return a new object handle. +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5tdecode_c + END INTERFACE + + hdferr = h5tdecode_c(buf, obj_id) + + END SUBROUTINE h5tdecode_f + +! +!****s* H5T/H5Tencode_f +! +! NAME +! H5Tencode_f +! +! PURPOSE +! Encode a data type object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5tencode_c + END INTERFACE + + hdferr = h5tencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5tencode_f + +! +!****s* H5T/h5tget_create_plist_f +! +! NAME +! h5tget_create_plist_f +! +! PURPOSE +! Returns a copy of a datatype creation property list. +! +! INPUTS +! dtype_id - Datatype identifier +! OUTPUTS +! dtpl_id - Datatype property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + END FUNCTION h5tget_create_plist_c + END INTERFACE + + hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) + END SUBROUTINE h5tget_create_plist_f + +! +!****s* H5T/h5tcompiler_conv_f +! +! NAME +! h5tcompiler_conv_f +! +! PURPOSE +! Check whether the library’s default conversion is hard conversion.R +! +! INPUTS +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! OUTPUTS +! flag - TRUE for compiler conversion, FALSE for library conversion +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. + INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. + LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER :: c_flag + END FUNCTION h5tcompiler_conv_c + END INTERFACE + + hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) + + flag = .FALSE. + IF(c_flag .GT. 0) flag = .TRUE. + + END SUBROUTINE h5tcompiler_conv_f + +! +!****s* H5T/h5tget_native_type_f +! +! NAME +! h5tget_native_type_f +! +! PURPOSE +! Returns the native datatype of a specified datatype. +! +! INPUTS +! dtype_id - Datatype identifier for the dataset datatype. +! +! direction - Direction of search: +! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ +! H5T_DIR_ASCEND = 1, /*in inscendent order */ +! H5T_DIR_DESCEND = 2 /*in descendent order */ +! * NOTE: In C it is defined as a structure: H5T_direction_t +! +! OUTPUTS +! native_dtype_id - The native datatype identifier for the specified dataset datatype +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! June 18, 2008 +! SOURCE + SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(IN) :: direction ! Direction of search: + ! H5T_DIR_ASCEND_F = 1 in inscendent order + ! H5T_DIR_DESCEND_F = 2 in descendent order + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + END FUNCTION h5tget_native_type_c + END INTERFACE + + hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) + END SUBROUTINE h5tget_native_type_f + +END MODULE H5T diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90 new file mode 100644 index 0000000..2c9f212 --- /dev/null +++ b/fortran/src/H5Tff_F03.f90 @@ -0,0 +1,223 @@ +!****h* ROBODoc/H5T (F03) +! +! NAME +! H5T_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 and Fortran 2003 interfaces for H5T functions. +! It contains the same functions as H5Tff_F90.f90 but includes the +! Fortran 2003 functions and the interface listings. This file will be compiled +! instead of H5Tff_F90.f90 if Fortran 2003 functions are enabled. +! +! 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 H5T_PROVISIONAL + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +!****t* H5T (F03)/hvl_t +! Fortran2003 Derived Type: + TYPE hvl_t + INTEGER(size_t) :: len ! Length of VL data (in base type units) + TYPE(C_PTR) :: p ! Pointer to VL data + END TYPE hvl_t + +!***** + + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + +CONTAINS + +!****s* H5T (F03)/H5Tconvert_f_F03 +! +! NAME +! H5Tconvert_f +! +! PURPOSE +! Converts data from between specified datatypes. +! +! Inputs: +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! nelmts - Size of array buf. +! buf - Array containing pre-conversion values. +! background - Optional background buffer. +! plist_id - Dataset transfer property list identifier. +! +! Outputs: +! buf - Array containing post-conversion values. +! hdferr - error code: +! 0 on success and -1 on failure +! AUTHOR +! M. Scot Breitenfeld +! Decemember 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id +!***** + INTEGER(HID_T) :: plist_id_default + TYPE(C_PTR) :: background_default + + INTERFACE + INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & + BIND(C, NAME='h5tconvert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , VALUE :: buf + TYPE(C_PTR) , VALUE :: background + INTEGER(HID_T) , INTENT(IN) :: plist_id + END FUNCTION h5tconvert_c + END INTERFACE + + plist_id_default = H5P_DEFAULT_F + IF(PRESENT(plist_id)) plist_id_default = plist_id + + background_default = C_NULL_PTR + IF(PRESENT(background)) background_default = background + + hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) + + END SUBROUTINE h5tconvert_f +! +!****s* (F03) H5T/h5tenum_insert_f90 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value ! value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) H5T/h5tenum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 + +END MODULE H5T_PROVISIONAL + diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90 new file mode 100644 index 0000000..380fbec --- /dev/null +++ b/fortran/src/H5Tff_F90.f90 @@ -0,0 +1,95 @@ +!****h* ROBODoc/H5T (F90) +! +! NAME +! MODULE H5T_PROVISIONAL +! +! PURPOSE +! This file contains Fortran 90 interfaces for H5T functions. It contains +! the same functions as H5Tff_F03.f90 but excludes the Fortran 2003 functions +! and the interface listings. This file will be compiled instead of H5Tff_F03.f90 +! if Fortran 2003 functions are not enabled. +! +! NOTE +! Currently contains no 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! *** IMPORTANT *** +! If you add a new H5D 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 H5T_PROVISIONAL + + USE H5GLOBAL + +CONTAINS + +! +!****s* H5T/h5tenum_insert_f +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f + +END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index a8cf1c2..169e018 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -1,6 +1,6 @@ /****h* H5Zf/H5Zf * PURPOSE - * This file contains C stubs for H5Z Fortran APIs + * This file contains C stubs for H5Z Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,22 +25,22 @@ /****if* H5Zf/h5zunregister_c * NAME - * h5zunregister_c + * h5zunregister_c * PURPOSE - * Call H5Zunregister to unregister filter + * Call H5Zunregister to unregister filter * INPUTS - * filter identifier + * filter identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -h5zunregister_c (int_f *filter) +nh5zunregister_c (int_f *filter) /******/ { int ret_value = -1; @@ -58,25 +58,25 @@ h5zunregister_c (int_f *filter) } /****if* H5Zf/h5zfiletr_avail_c * NAME - * h5zfiletr_avail_c + * h5zfiletr_avail_c * PURPOSE - * Call H5Zfilter_avail to find if filter is available + * Call H5Zfilter_avail to find if filter is available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -h5zfilter_avail_c ( int_f *filter , int_f *flag ) +nh5zfilter_avail_c ( int_f *filter , int_f *flag ) /******/ { int ret_value = 0; @@ -92,26 +92,26 @@ h5zfilter_avail_c ( int_f *filter , int_f *flag ) /****if* H5Zf/h5zget_filter_info_c * NAME - * h5zget_filter_info_c + * h5zget_filter_info_c * PURPOSE - * Call H5Zget_filter_info to find if filter has its encoder - * and/or its decoder available + * Call H5Zget_filter_info to find if filter has its encoder + * and/or its decoder available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Nat Furrer and James Laird - * Wednesday, June 16, 2004 + * Wednesday, June 16, 2004 * HISTORY * * SOURCE */ int_f -h5zget_filter_info_c ( int_f *filter , int_f *flag ) +nh5zget_filter_info_c ( int_f *filter , int_f *flag ) /******/ { int ret_value = 0; diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 deleted file mode 100644 index 0259959..0000000 --- a/fortran/src/H5Zff.F90 +++ /dev/null @@ -1,189 +0,0 @@ -!****h* ROBODoc/H5Z -! -! NAME -! MODULE H5Z -! -! PURPOSE -! This file contains Fortran interfaces for H5Z 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! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new H5Z 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 H5Z - - USE H5GLOBAL - -CONTAINS - -!****s* H5Z/h5zunregister_f -! -! NAME -! h5zunregister_f -! -! PURPOSE -! Unregisters specified filetr -! -! INPUTS -! filter - Filter; may have one of the following values: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zunregister_f(filter, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5zunregister_c(filter) BIND(C,NAME='h5zunregister_c') - INTEGER, INTENT(IN) :: filter - END FUNCTION h5zunregister_c - END INTERFACE - hdferr = h5zunregister_c(filter) - END SUBROUTINE h5zunregister_f - -!****s* H5Z/h5zfilter_avail_f -! NAME -! h5zfilter_avail_f -! -! PURPOSE -! Queries if filter is available -! -! INPUTS -! filter - Filter; may be one of the following: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! OUTPUTS -! status - Flag; .TRUE. if filter is available, -! .FALSE. otherwise -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - LOGICAL, INTENT(OUT) :: status - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5zfilter_avail_c(filter, flag) BIND(C,NAME='h5zfilter_avail_c') - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER :: flag - END FUNCTION h5zfilter_avail_c - END INTERFACE - - hdferr = h5zfilter_avail_c(filter, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5zfilter_avail_f - -!****s* H5Z/h5zget_filter_info_f -! -! NAME -! h5zget_filter_info_f -! -! PURPOSE -! Queries if filter has its encoder and/or decoder -! available -! -! INPUTS -! filter - Filter; may be one of the following: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_Ffilter -! OUTPUTS -! config_flags - Flag, indicates if filter has its encoder -! and/or decoder available, possibly containing the -! following values: -! H5Z_FILTER_ENCODE_ENABLED_F -! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Nat Furrer and James Laird -! June 16, 2004 -! SOURCE - SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: config_flags - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) BIND(C,NAME='h5zget_filter_info_c') - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: config_flags - END FUNCTION h5zget_filter_info_c - END INTERFACE - - hdferr = h5zget_filter_info_c(filter, config_flags) - - END SUBROUTINE h5zget_filter_info_f - -END MODULE H5Z - - - - - diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 new file mode 100644 index 0000000..7b67b5b --- /dev/null +++ b/fortran/src/H5Zff.f90 @@ -0,0 +1,198 @@ +!****h* ROBODoc/H5Z +! +! NAME +! MODULE H5Z +! +! PURPOSE +! This file contains Fortran interfaces for H5Z functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 H5Z 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 H5Z + + USE H5GLOBAL + +CONTAINS + +!****s* H5Z/h5zunregister_f +! +! NAME +! h5zunregister_f +! +! PURPOSE +! Unregisters specified filetr +! +! INPUTS +! filter - filter; may have one of the following values: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zunregister_f(filter, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5zunregister_c (filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + END FUNCTION h5zunregister_c + END INTERFACE + hdferr = h5zunregister_c (filter) + END SUBROUTINE h5zunregister_f + +!****s* H5Z/h5zfilter_avail_f +! NAME +! h5zfilter_avail_f +! +! PURPOSE +! Queries if filter is available +! +! INPUTS +! filter - filter +! OUTPUTS +! status - status; .TRUE. if filter is available, +! .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SZIP_F + ! H5Z_FILTER_NBIT_F + ! H5Z_FILTER_SCALEOFFSET_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter + ! is availble not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER :: flag + END FUNCTION h5zfilter_avail_c + END INTERFACE + + hdferr = h5zfilter_avail_c(filter, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5zfilter_avail_f +!****s* H5Z/h5zget_filter_info_f +! +! NAME +! h5zget_filter_info_f +! +! PURPOSE +! Queries if filter has its encoder and/or decoder +! available +! +! INPUTS +! filter - filter +! OUTPUTS +! config_flags - Bit vector possibly containing the +! following values: +! H5Z_FILTER_ENCODE_ENABLED_F +! H5Z_FILTER_DECODE_ENABLED_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Nat Furrer and James Laird +! June 16, 2004 +! SOURCE + SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: + ! H5Z_FILTER_DEFLATE_F + ! H5Z_FILTER_SZIP_F + ! H5Z_FILTER_NBIT_F + ! H5Z_FILTER_SCALEOFFSET_F + ! H5Z_FILTER_SHUFFLE_F + ! H5Z_FILTER_FLETCHER32_F + INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter + ! has its encoder and/or decoder + ! available + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + END FUNCTION h5zget_filter_info_c + END INTERFACE + + hdferr = h5zget_filter_info_c(filter, config_flags) + + END SUBROUTINE h5zget_filter_info_f + +END MODULE H5Z + + + + + diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90 new file mode 100644 index 0000000..2a3e26f --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceExclude.f90 @@ -0,0 +1,39 @@ +!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is of type DOUBLE PRECISION. +! We do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. +! +! NOTES +! Empty module. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90 new file mode 100644 index 0000000..11e0a85 --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceInclude.f90 @@ -0,0 +1,1859 @@ +!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is not of the type DOUBLE PRECISION. +! We only do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. +! +! NOTES +! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines +! from the HDF function catagory H5A, H5D and H5P. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + USE H5GLOBAL + + ! + ! ----- H5A ---- + ! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_double_scalar + MODULE PROCEDURE h5awrite_double_1 + MODULE PROCEDURE h5awrite_double_2 + MODULE PROCEDURE h5awrite_double_3 + MODULE PROCEDURE h5awrite_double_4 + MODULE PROCEDURE h5awrite_double_5 + MODULE PROCEDURE h5awrite_double_6 + MODULE PROCEDURE h5awrite_double_7 + END INTERFACE + + INTERFACE h5aread_f + MODULE PROCEDURE h5aread_double_scalar + MODULE PROCEDURE h5aread_double_1 + MODULE PROCEDURE h5aread_double_2 + MODULE PROCEDURE h5aread_double_3 + MODULE PROCEDURE h5aread_double_4 + MODULE PROCEDURE h5aread_double_5 + MODULE PROCEDURE h5aread_double_6 + MODULE PROCEDURE h5aread_double_7 + END INTERFACE + ! + ! ----- H5D ---- + ! + INTERFACE h5dwrite_f + MODULE PROCEDURE h5dwrite_double_scalar + MODULE PROCEDURE h5dwrite_double_1 + MODULE PROCEDURE h5dwrite_double_2 + MODULE PROCEDURE h5dwrite_double_3 + MODULE PROCEDURE h5dwrite_double_4 + MODULE PROCEDURE h5dwrite_double_5 + MODULE PROCEDURE h5dwrite_double_6 + MODULE PROCEDURE h5dwrite_double_7 + END INTERFACE + + INTERFACE h5dread_f + MODULE PROCEDURE h5dread_double_scalar + MODULE PROCEDURE h5dread_double_1 + MODULE PROCEDURE h5dread_double_2 + MODULE PROCEDURE h5dread_double_3 + MODULE PROCEDURE h5dread_double_4 + MODULE PROCEDURE h5dread_double_5 + MODULE PROCEDURE h5dread_double_6 + MODULE PROCEDURE h5dread_double_7 + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_double + END INTERFACE + + ! + ! ----- H5P ---- + ! + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_double + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_double + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_double + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_double + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_double + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_double + END INTERFACE + +CONTAINS + + ! + ! ----- H5A ---- + ! + SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN)::buf + END FUNCTION h5awrite_double_s_c + END INTERFACE + + hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_scalar + + SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5awrite_double_1_c + END INTERFACE + + hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_1 + + + SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awrite_double_2_c + END INTERFACE + + hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_2 + + + SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awrite_double_3_c + END INTERFACE + + hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_3 + + + SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awrite_double_4_c + END INTERFACE + + hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_4 + + + SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awrite_double_5_c + END INTERFACE + + hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_5 + + + SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awrite_double_6_c + END INTERFACE + + hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_6 + + + SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awrite_double_7_c + END INTERFACE + + hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_7 + + + SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT)::buf + END FUNCTION h5aread_double_s_c + END INTERFACE + + hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_scalar + + SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5aread_double_1_c + END INTERFACE + + hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_1 + + + SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5aread_double_2_c + END INTERFACE + + hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_2 + + + SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5aread_double_3_c + END INTERFACE + + hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_3 + + + SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5aread_double_4_c + END INTERFACE + + hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_4 + + + SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5aread_double_5_c + END INTERFACE + + hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_5 + + + SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5aread_double_6_c + END INTERFACE + + hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_6 + + + SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c + !DEC$ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5aread_double_7_c + END INTERFACE + + hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_7 + + + ! + ! ----- H5D ---- + ! + SUBROUTINE h5dwrite_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf + END FUNCTION h5dwrite_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_scalar + + SUBROUTINE h5dwrite_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwrite_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_1 + + SUBROUTINE h5dwrite_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_2 + + SUBROUTINE h5dwrite_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwrite_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_3 + + SUBROUTINE h5dwrite_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwrite_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_4 + + SUBROUTINE h5dwrite_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwrite_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_5 + + SUBROUTINE h5dwrite_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwrite_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_6 + + SUBROUTINE h5dwrite_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwrite_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_7 + + SUBROUTINE h5dread_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(OUT) :: buf + END FUNCTION h5dread_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_scalar + + SUBROUTINE h5dread_double_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dread_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_1 + + SUBROUTINE h5dread_double_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_2 + + SUBROUTINE h5dread_double_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dread_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_3 + + SUBROUTINE h5dread_double_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dread_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_4 + + SUBROUTINE h5dread_double_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dread_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_5 + + SUBROUTINE h5dread_double_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dread_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_6 + + SUBROUTINE h5dread_double_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dread_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_7 + + !---------------------------------------------------------------------- + ! Name: h5dfill_double + ! + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! of the fillvalues and buffers are supported. Buffer and fillvalue + ! are assumed to have the same datatype. + ! Only one-dimesional buffers are supported. + ! + ! Inputs: + ! fill_value - fill value + ! space_id - memory space selection identifier + ! buf - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfill_double_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c + !DEC$ENDIF + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfill_double_c + END INTERFACE + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + + + END SUBROUTINE h5dfill_double + + ! + ! -- H5P --- + ! + + SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_value_double_c + END INTERFACE + + hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_double + + SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & + hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION :: fillvalue + END FUNCTION h5pget_fill_value_double_c + END INTERFACE + + hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_double + +! +!****s* H5P (F90)/h5pset_double +! +! NAME +! h5pset_double +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pset_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pset_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pset_double + +!****s* H5P (F90)/h5pget_double +! +! NAME +! h5pget_double +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_double(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + DOUBLE PRECISION, INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(OUT) :: value + END FUNCTION h5pget_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pget_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pget_double + +! +!****s* H5P (F90)/h5pregister_double +! +! NAME +! h5pregister_double +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_double(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pregister_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pregister_double_c(class, name , name_len, size, value) + END SUBROUTINE h5pregister_double + +!****s* H5P (F90)/h5pinsert_double +! +! NAME +! +! h5pinsert_double +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pinsert_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pinsert_double_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_double + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 deleted file mode 100644 index 9a42cbf..0000000 --- a/fortran/src/H5_buildiface.F90 +++ /dev/null @@ -1,1024 +0,0 @@ -!****p* Program/H5_buildiface -! -! NAME -! Executable: H5_buildiface -! -! FILE -! fortran/src/H5_buildiface.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the module -! H5_gen (H5_gen.F90). It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of -! STORAGE_SIZE/SIZEOF in H5_gen.F90. STORAGE_SIZE is standard -! compliant and should always be chosen over SIZEOF. -! -! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or -! "FORTRAN_HAVE_SIZEOF". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -#include - -PROGRAM H5_buildiface - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - -! These values are valid REAL KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_RKIND - H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C integer) found during configure - H5_H5CONFIG_F_NUM_IKIND - H5_H5CONFIG_F_IKIND - - INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var - CHARACTER(LEN=2) :: chr2 -! subroutine rank of array being passed in - CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) -! rank definitions - CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & - ' ', & - ', DIMENSION(dims(1)) ', & - ', DIMENSION(dims(1),dims(2)) ', & - ', DIMENSION(dims(1),dims(2),dims(3)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & - /) -! pointer to the buffer - CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & - /) - CHARACTER(LEN=42), DIMENSION(1:8), PARAMETER :: fchr_ptr_line=(/ & - ' f_ptr = C_LOC(buf(1:1)) ', & - ' f_ptr = C_LOC(buf(1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1))' & - /) - -! (a) Generate Fortran H5* interfaces having multiple KIND interfaces. -! -! DEVELOPER'S NOTES: -! -! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 -! standard extended the maximum rank to 15, it was decided that user's should use the -! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility -! with the Fortran 90/95 APIs codes which could never handle ranks greater than 7. - - OPEN(11,FILE='H5_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5_gen.F90',& -'!',& -'! NAME',& -'! H5_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5_buildiface.F90 to handle all the',& -'! detected KINDs for APIs being passed INTEGERs, REALs and CHARACTERs. Currently ',& -'! these are H5A, H5D and H5P APIs',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5_buildiface.F90',& -'!',& -'!*****' - - WRITE(11,'(A)') "MODULE H5_GEN" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE H5GLOBAL' - - WRITE(11,'(A)') ' USE H5A' - WRITE(11,'(A)') ' USE H5D' - WRITE(11,'(A)') ' USE H5P' - WRITE(11,'(A)') ' IMPLICIT NONE' -!*************** -! H5A INTERFACES -!*************** -! -! H5Awrite_f -! - WRITE(11,'(A)') " INTERFACE h5awrite_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO k = 2, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ckind_rank"//chr_rank(k) - ENDDO - WRITE(11,'(A)') " END INTERFACE" - -! H5Aread_f - WRITE(11,'(A)') " INTERFACE h5aread_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5aread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO k = 2, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ckind_rank"//chr_rank(k) - ENDDO - WRITE(11,'(A)') " END INTERFACE" -!*************** -! H5D INTERFACES -!*************** -! -! H5Dwrite_f - WRITE(11,'(A)') " INTERFACE h5dwrite_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO k = 2, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ckind_rank"//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Dread_f - WRITE(11,'(A)') " INTERFACE h5dread_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - DO k = 2, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ckind_rank"//chr_rank(k) - ENDDO - WRITE(11,'(A)') " END INTERFACE" - -!*************** -! H5P INTERFACES -!*************** -! -! H5Pset_fill_value_f - WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pget_fill_value_f - WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pset_f - WRITE(11,'(A)') " INTERFACE h5pset_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pget_f - WRITE(11,'(A)') " INTERFACE h5pget_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pregister_f - WRITE(11,'(A)') " INTERFACE h5pregister_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! H5Pinsert_f - WRITE(11,'(A)') " INTERFACE h5pinsert_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -!********************** -! H5A APIs -!********************** -! -! H5Awrite_f - -!****s* H5A (F03)/H5Awrite_f_F90 -! -! NAME -! H5Awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - DO j = 2, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ckind_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5awrite_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' CHARACTER(LEN=*) , INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') fchr_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ckind_rank'//chr_rank(j) - ENDDO - -! -! H5Aread_f - -!****s* H5A (F03)/H5Aread_f_F90 -! -! NAME -! H5Aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - DO j = 2, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ckind_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5aread_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' - WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') fchr_ptr_line(j) - WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5aread_ckind_rank'//chr_rank(j) - ENDDO - -!********************** -! H5D APIs -!********************** -! -! h5dread_f - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - - ENDDO - ENDDO - - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - - ENDDO - ENDDO - DO j = 2, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ckind_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dread_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') fchr_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dread_ckind_rank'//chr_rank(j) - ENDDO -! -! h5dwrite_f - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - DO j = 2, 8 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ckind_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' - WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' - WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' - WRITE(11,'(A)') ' CHARACTER(LEN=*),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' - WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' - WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' - WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' - WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' - WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' - WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' - WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' - WRITE(11,'(A)') fchr_ptr_line(j) - WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' - WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j) - ENDDO - -!********************** -! H5P APIs -!********************** -! -! H5Pset_fill_value_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, type_id, fillvalue, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' - WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' - WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pget_fill_value_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, type_id, fillvalue, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: fillvalue' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' - WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pset_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, name, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' - - WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pget_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& - &//'(prp_id, name, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pregister_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pregister_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& - &//'(class, name, size, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: class' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = C_LOC(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pregister_c(class, name, name_len, size, f_ptr)' - WRITE(11,'(A)') 'END SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! H5Pinsert_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& - &//'(plist, name, size, value, hdferr)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: plist' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' - WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' - WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' - WRITE(11,'(A)') ' INTEGER :: name_len' - WRITE(11,'(A)') ' TYPE(c_ptr) :: f_ptr' - WRITE(11,'(A)') ' f_ptr = c_loc(value)' - WRITE(11,'(A)') ' name_len = LEN(name)' - WRITE(11,'(A)') ' hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - - WRITE(11,'(A)') 'END MODULE H5_gen' - - CLOSE(11) - -END PROGRAM H5_buildiface - - - diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index e527dce..1641989 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -1,6 +1,6 @@ /****ih* H5_f/H5_f * PURPOSE - * This file contains C stubs for H5 Fortran APIs + * This file contains C stubs for H5 Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -22,7 +22,7 @@ */ #include "H5f90.h" -#include "H5fort_type_defines.h" + /****if* H5_f/h5init_types_c * NAME * h5init_types_c @@ -30,17 +30,17 @@ * Initialize predefined datatypes in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the types array defined in the + * H5f90global.f90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the floatingtypes array defined in the + * H5f90global.f90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the integertypes array defined in the + * H5f90global.f90 * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -49,14 +49,14 @@ * SOURCE */ int_f -h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) +nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) /******/ { int ret_value = -1; hid_t c_type_id; size_t tmp_val; -/* Fortran INTEGER may not be the same as C; do all checking to find +/* Fortran INTEGER is may not be the same as C in; do all checking to find an appropriate size */ if (sizeof(int_f) == sizeof(int)) { @@ -92,12 +92,6 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; }/*end else */ #endif -#ifdef H5_HAVE_FLOAT128 - else if(sizeof(double_f)==sizeof(__float128)) { - if ((types[2] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[2], 128) < 0) return ret_value; - }/*end else */ -#endif /* if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value; @@ -132,11 +126,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; } /*end if */ else if (sizeof(int_1_f) == sizeof(long long)) { - if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; - } /*end if */ - else { - if ((types[6] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[6], 128) < 0) return ret_value; + if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ /* * FIND H5T_NATIVE_INTEGER_2 @@ -153,10 +143,6 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_2_f) == sizeof(long long)) { if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ - else { - if ((types[7] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[7], 128) < 0) return ret_value; - } /*end else */ /* * FIND H5T_NATIVE_INTEGER_4 */ @@ -172,10 +158,6 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_4_f) == sizeof(long long)) { if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ - else { - if ((types[8] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[8], 128) < 0) return ret_value; - } /*end else */ /* * FIND H5T_NATIVE_INTEGER_8 */ @@ -191,65 +173,47 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes else if (sizeof(int_8_f) == sizeof(long long)) { if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ - else { - if ((types[9] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[9], 128) < 0) return ret_value; - } /*end else */ - /* - * FIND H5T_NATIVE_REAL_C_FLOAT + * FIND H5T_NATIVE_REAL_4 */ - if (sizeof(real_C_FLOAT_f) == sizeof(float)) { + if (sizeof(real_4_f) == sizeof(float)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_C_FLOAT_f) == sizeof(double)) { + else if (sizeof(real_4_f) == sizeof(double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_C_FLOAT_f) == sizeof(long double)) { + else if (sizeof(real_4_f) == sizeof(long double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_C_DOUBLE + * FIND H5T_NATIVE_REAL_8 */ - if (sizeof(real_C_DOUBLE_f) == sizeof(float)) { + if (sizeof(real_8_f) == sizeof(float)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_C_DOUBLE_f) == sizeof(double)) { + else if (sizeof(real_8_f) == sizeof(double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_C_DOUBLE_f) == sizeof(long double)) { + else if (sizeof(real_8_f) == sizeof(long double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE + * FIND H5T_NATIVE_REAL_16 */ -#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) { + if (sizeof(real_16_f) == sizeof(float)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { + else if (sizeof(real_16_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ -# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 - else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { - if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) { +#if H5_SIZEOF_LONG_DOUBLE!=0 + else if (sizeof(real_16_f) == sizeof(long double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; - } - else { - if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[12], 128) < 0) return ret_value; - } - } -# else - if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[12], 64) < 0) return ret_value; -# endif -#else - if ((types[12] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; + } /*end else */ #endif /* * FIND H5T_NATIVE_B_8 @@ -257,38 +221,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0) return ret_value; if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0) return ret_value; if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value; - if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; - -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - /* - * FIND H5T_NATIVE_INTEGER_16 - */ - if (sizeof(int_16_f) == sizeof(char)) { - if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value; - } /*end if */ - else if (sizeof(int_16_f) == sizeof(short)) { - if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value; - } /*end if */ - else if (sizeof(int_16_f) == sizeof(int)) { - if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; - } /*end if */ - else if (sizeof(int_16_f) == sizeof(long long)) { - if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; - } /*end else */ - else { - if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[17], 128) < 0) return ret_value; - } /*end else */ -#else - if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; - if ( H5Tset_precision (types[17], 128) < 0) return ret_value; -#endif - - /* - * FIND H5T_NATIVE_FLOAT_128 - */ - if ((types[18] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; - if ( H5Tset_precision (types[18], 128) < 0) return ret_value; + if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value; if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value; @@ -339,35 +272,35 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes * Closes predefined datatype in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the types array defined in the + * H5f90global.f90 * lentypes - length of the types array, which must be the - * same as the length of types array defined - * in the H5f90global.F90 + * same as the length of types array defined + * in the H5f90global.f90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the floatingtypes array defined in the + * H5f90global.f90 * floatinglen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.F90 + * same as the length of floatingtypes array defined + * in the H5f90global.f90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the - * H5f90global.F90 + * type, its element and length must be the + * same as the integertypes array defined in the + * H5f90global.f90 * integerlen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.F90 + * same as the length of floatingtypes array defined + * in the H5f90global.f90 * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, August 3, 1999 + * Elena Pourmal + * Tuesday, August 3, 1999 * SOURCE */ int_f -h5close_types_c( hid_t_f * types, int_f *lentypes, +nh5close_types_c( hid_t_f * types, int_f *lentypes, hid_t_f * floatingtypes, int_f* floatinglen, hid_t_f * integertypes, int_f * integerlen ) /******/ @@ -377,16 +310,16 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, int i; for (i = 0; i < *lentypes; i++) { - c_type_id = types[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = types[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *floatinglen; i++) { - c_type_id = floatingtypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = floatingtypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *integerlen; i++) { - c_type_id = integertypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = integertypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } ret_value = 0; return ret_value; @@ -435,7 +368,7 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, * SOURCE */ int_f -h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, +nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, @@ -591,11 +524,11 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[6] = (int_f)H5O_COPY_ALL; /* All object copying flags (for internal checking) */ /* Flags for shared message indexes. - * Pass these flags in using the mesg_type_flags parameter in + * Pass these flags in using the mesg_type_flags parameter in * H5P_set_shared_mesg_index. * (Developers: These flags correspond to object header message type IDs, - * but we need to assign each kind of message to a different bit so that - * one index can hold multiple types.) + * but we need to assign each kind of message to a different bit so that + * one index can hold multiple types.) */ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */ @@ -614,7 +547,7 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS; /* Maximum shared message values. Number of indexes is 8 to allow room to add - * new types of messages. + * new types of messages. */ h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES; h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE; @@ -756,7 +689,7 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* - * H5 Generic flags introduced in version 1.8 + * H5 Generic flags introduced in version 1.8 -MSB- */ /* H5_index_t enum struct */ @@ -780,7 +713,7 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, } int_f -h5init1_flags_c(int_f *h5lib_flags) +nh5init1_flags_c(int_f *h5lib_flags) /******/ { int ret_value = -1; @@ -794,19 +727,19 @@ h5init1_flags_c(int_f *h5lib_flags) /****if* H5_f/h5open_c * NAME - * h5open_c + * h5open_c * PURPOSE - * Calls H5open call to initialize C HDF5 library + * Calls H5open call to initialize C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 + * Elena Pourmal + * Friday, November 17, 2000 * * SOURCE */ int_f -h5open_c(void) +nh5open_c(void) /******/ { int ret_value = -1; @@ -817,17 +750,17 @@ h5open_c(void) } /****if* H5_f/h5close_c * NAME - * h5close_c + * h5close_c * PURPOSE - * Calls H5close call to close C HDF5 library + * Calls H5close call to close C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f -h5close_c(void) +nh5close_c(void) /******/ { int ret_value = -1; @@ -839,28 +772,28 @@ h5close_c(void) /****if* H5_f/h5get_libversion_c * NAME - * h5get_libversion_c + * h5get_libversion_c * PURPOSE - * Calls H5get_libversion function + * Calls H5get_libversion function * to retrieve library version info. * INPUTS * - * None + * None * OUTPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE * */ int_f -h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) +nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { @@ -878,27 +811,27 @@ h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5check_version_c * NAME - * h5check_version_c + * h5check_version_c * PURPOSE - * Calls H5check_version function + * Calls H5check_version function * to verify library version info. * INPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * OUTPUTS * - * None + * None * RETURNS - * 0 on success, aborts on failure + * 0 on success, aborts on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) +nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { int ret_value = -1; @@ -916,18 +849,18 @@ h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5garbage_collect_c * NAME - * h5garbage_collect_c + * h5garbage_collect_c * PURPOSE - * Calls H5garbage_collect to collect on all free-lists of all types + * Calls H5garbage_collect to collect on all free-lists of all types * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -h5garbage_collect_c(void) +nh5garbage_collect_c(void) /******/ { int ret_value = -1; @@ -939,18 +872,18 @@ h5garbage_collect_c(void) /****if* H5_f/h5dont_atexit_c * NAME - * h5dont_atexit_c + * h5dont_atexit_c * PURPOSE - * Calls H5dont_atexit not to install atexit cleanup routine + * Calls H5dont_atexit not to install atexit cleanup routine * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -h5dont_atexit_c(void) +nh5dont_atexit_c(void) /******/ { int ret_value = -1; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 deleted file mode 100644 index 39e23a7..0000000 --- a/fortran/src/H5_ff.F90 +++ /dev/null @@ -1,451 +0,0 @@ -!****h* ROBODoc/H5LIB -! -! NAME -! MODULE H5LIB -! -! PURPOSE -! This module provides fortran specific helper functions for the HDF library -! -! 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 -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new 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. -! -!***** - -#include - -MODULE H5LIB - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T - USE H5GLOBAL - IMPLICIT NONE - -CONTAINS -!****s* H5LIB/h5open_f -! -! NAME -! h5open_f -! -! PURPOSE -! Initializes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5open_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5open_f(error) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1, error_2, error_3 - - INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) & - BIND(C,NAME='h5init_types_c') - IMPORT :: HID_T - IMPORT :: PREDEF_TYPES_LEN, FLOATING_TYPES_LEN, INTEGER_TYPES_LEN - IMPLICIT NONE - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - END FUNCTION h5init_types_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & - i_H5D_size_flags,& - i_H5E_flags, & - i_H5E_hid_flags, & - i_H5F_flags, & - i_H5FD_flags, & - i_H5FD_hid_flags, & - i_H5G_flags, & - i_H5I_flags, & - i_H5L_flags, & - i_H5O_flags, & - i_H5P_flags, & - i_H5P_flags_int, & - i_H5R_flags, & - i_H5S_flags, & - i_H5S_hsize_flags, & - i_H5T_flags, & - i_H5Z_flags, & - i_H5generic_flags) & - BIND(C,NAME='h5init_flags_c') - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, & - H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, & - H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, & - H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, & - H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, & - H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & - H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN - IMPLICIT NONE - INTEGER i_H5D_flags(H5D_FLAGS_LEN) - INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) - INTEGER i_H5E_flags(H5E_FLAGS_LEN) - INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) - INTEGER i_H5F_flags(H5F_FLAGS_LEN) - INTEGER i_H5G_flags(H5G_FLAGS_LEN) - INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) - INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - INTEGER i_H5I_flags(H5I_FLAGS_LEN) - INTEGER i_H5L_flags(H5L_FLAGS_LEN) - INTEGER i_H5O_flags(H5O_FLAGS_LEN) - INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) - INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) - INTEGER i_H5R_flags(H5R_FLAGS_LEN) - INTEGER i_H5S_flags(H5S_FLAGS_LEN) - INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - INTEGER i_H5T_flags(H5T_FLAGS_LEN) - INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) - INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - END FUNCTION h5init_flags_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) & - BIND(C,NAME='h5init1_flags_c') - IMPORT :: H5LIB_FLAGS_LEN - IMPLICIT NONE - INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - END FUNCTION h5init1_flags_c - END INTERFACE - error_1 = h5init_types_c(predef_types, floating_types, integer_types) - error_2 = h5init_flags_c(H5D_flags, & - H5D_size_flags, & - H5E_flags, & - H5E_hid_flags, & - H5F_flags, & - H5FD_flags, & - H5FD_hid_flags, & - H5G_flags, & - H5I_flags, & - H5L_flags, & - H5O_flags, & - H5P_flags, & - H5P_flags_int, & - H5R_flags, & - H5S_flags, & - H5S_hsize_flags, & - H5T_flags, & - H5Z_flags, & - H5generic_flags) - error_3 = h5init1_flags_c(H5LIB_flags ) - error = error_1 + error_2 + error_3 - END SUBROUTINE h5open_f - -!****s* H5LIB/h5close_f -! -! NAME -! h5close_f -! -! PURPOSE -! Closes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5close_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5close_f(error) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1 - INTERFACE - INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & - f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) & - BIND(C,NAME='h5close_types_c') - IMPORT :: HID_T - INTEGER P_TYPES_LEN - INTEGER F_TYPES_LEN - INTEGER I_TYPES_LEN - INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - END FUNCTION h5close_types_c - END INTERFACE - error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & - floating_types, FLOATING_TYPES_LEN, & - integer_types, INTEGER_TYPES_LEN ) - error = error_1 - - END SUBROUTINE h5close_f - -!****s* H5LIB/h5get_libversion_f -! -! NAME -! h5get_libversion_f -! -! PURPOSE -! Returns the HDF5 LIbrary release number -! -! Outputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error -!***** - INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) & - BIND(C,NAME='h5get_libversion_c') - IMPLICIT NONE - INTEGER, INTENT(OUT) :: majnum, minnum, relnum - END FUNCTION h5get_libversion_c - END INTERFACE - - error = h5get_libversion_c(majnum, minnum, relnum) - - END SUBROUTINE h5get_libversion_f - -!****s* H5LIB/h5check_version_f -! -! NAME -! h5check_version_f -! -! PURPOSE -! Verifies that library versions are consistent. -! -! Inputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - IMPLICIT NONE - INTEGER, INTENT(IN) :: majnum, minnum, relnum - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) & - BIND(C,NAME='h5check_version_c') - IMPLICIT NONE - INTEGER, INTENT(IN) :: majnum, minnum, relnum - END FUNCTION h5check_version_c - END INTERFACE - - error = h5check_version_c(majnum, minnum, relnum) - - END SUBROUTINE h5check_version_f -!****s* H5LIB/h5garbage_collect_f -! -! NAME -! h5garbage_collect_f -! -! PURPOSE -! Garbage collects on all free-lists of all types. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5garbage_collect_f(error) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5garbage_collect_c() & - BIND(C,NAME='h5garbage_collect_c') - END FUNCTION h5garbage_collect_c - END INTERFACE - - error = h5garbage_collect_c() - - END SUBROUTINE h5garbage_collect_f -!****s* H5LIB/h5dont_atexit_f -! -! NAME -! h5dont_atexit_f -! -! PURPOSE -! Instructs library not to install atexit cleanup routine. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5dont_atexit_f(error) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5dont_atexit_c() & - BIND(C,NAME='h5dont_atexit_c') - END FUNCTION h5dont_atexit_c - END INTERFACE - - error = h5dont_atexit_c() - - END SUBROUTINE h5dont_atexit_f - -!****f* H5LIB/h5kind_to_type -! -! NAME -! h5kind_to_type -! -! PURPOSE -! Converts the KIND to the correct HDF type -! -! Inputs: -! kind - Fortran KIND parameter -! flag - Whether KIND is of type INTEGER or REAL: -! H5_INTEGER_KIND - integer -! H5_REAL_KIND - real -! Outputs: -! h5_type - Returns the type -! -! AUTHOR -! M. Scot Breitenfeld -! August 25, 2008 -! -! Fortran90 Interface: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - IMPLICIT NONE - INTEGER, INTENT(IN) :: kind - INTEGER, INTENT(IN) :: flag -!***** - IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN - h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN - h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN - h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN - h5_type = H5T_NATIVE_INTEGER_8 -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN - h5_type = H5T_NATIVE_INTEGER_16 -#endif - ENDIF - ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN - h5_type = H5T_NATIVE_REAL_C_FLOAT - ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN - h5_type = H5T_NATIVE_REAL_C_DOUBLE -#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN - h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -#endif -#if H5_PAC_FC_MAX_REAL_PRECISION > 28 -#if H5_HAVE_FLOAT128 == 1 - ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN - h5_type = H5T_NATIVE_FLOAT_128 -#endif -#endif - ELSE - h5_type = -1 - ENDIF - ENDIF - - END FUNCTION h5kind_to_type - -!****f* H5LIB_PROVISIONAL/h5offsetof -! -! NAME -! h5offsetof -! -! PURPOSE -! Computes the offset in memory -! -! Inputs: -! start - starting pointer address -! end - ending pointer address -! -! Outputs: -! offset - offset of a member within the derived type -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: - FUNCTION h5offsetof(start,end) RESULT(offset) - IMPLICIT NONE - INTEGER(SIZE_T) :: offset - TYPE(C_PTR), VALUE, INTENT(IN) :: start, end -!***** - INTEGER(C_INTPTR_T) :: int_address_start, int_address_end - int_address_start = TRANSFER(start, int_address_start) - int_address_end = TRANSFER(end , int_address_end ) - - offset = int_address_end - int_address_start - - END FUNCTION h5offsetof - -END MODULE H5LIB diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 new file mode 100644 index 0000000..49e64a3 --- /dev/null +++ b/fortran/src/H5_ff.f90 @@ -0,0 +1,409 @@ +!****h* ROBODoc/H5LIB +! +! NAME +! MODULE H5LIB +! +! PURPOSE +! This module provides fortran specific helper functions for the HDF library +! +! USES +! H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003 +! only features. If Fortran 2003 functions are enabled then +! H5_ff_F03.f90 is compiled, else H5_ff_F90.f90, +! which is just a place holder blank module, is compiled. +! 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 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 H5LIB + + USE H5LIB_PROVISIONAL ! helper functions for Fortran 2003 features: + ! pre-Fortran 2003 - empty module + ! Forttran 2003 - contains functions + USE H5GLOBAL + +CONTAINS +!****s* H5LIB/h5open_f +! +! NAME +! h5open_f +! +! PURPOSE +! Initializes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5open_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5open_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1, error_2, error_3 + + INTERFACE + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) + USE H5GLOBAL + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c + !DEC$ENDIF + END FUNCTION h5init_types_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & + i_H5D_size_flags,& + i_H5E_flags, & + i_H5E_hid_flags, & + i_H5F_flags, & + i_H5FD_flags, & + i_H5FD_hid_flags, & + i_H5G_flags, & + i_H5I_flags, & + i_H5L_flags, & + i_H5O_flags, & + i_H5P_flags, & + i_H5P_flags_int, & + i_H5R_flags, & + i_H5S_flags, & + i_H5S_hsize_flags, & + i_H5T_flags, & + i_H5Z_flags, & + i_H5generic_flags) + USE H5GLOBAL + INTEGER i_H5D_flags(H5D_FLAGS_LEN) + INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) + INTEGER i_H5E_flags(H5E_FLAGS_LEN) + INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) + INTEGER i_H5F_flags(H5F_FLAGS_LEN) + INTEGER i_H5G_flags(H5G_FLAGS_LEN) + INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) + INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + INTEGER i_H5I_flags(H5I_FLAGS_LEN) + INTEGER i_H5L_flags(H5L_FLAGS_LEN) + INTEGER i_H5O_flags(H5O_FLAGS_LEN) + INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) + INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) + INTEGER i_H5R_flags(H5R_FLAGS_LEN) + INTEGER i_H5S_flags(H5S_FLAGS_LEN) + INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + INTEGER i_H5T_flags(H5T_FLAGS_LEN) + INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) + INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c + !DEC$ENDIF + END FUNCTION h5init_flags_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) + USE H5GLOBAL + INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c + !DEC$ENDIF + END FUNCTION h5init1_flags_c + END INTERFACE + error_1 = h5init_types_c(predef_types, floating_types, integer_types) + error_2 = h5init_flags_c(H5D_flags, & + H5D_size_flags, & + H5E_flags, & + H5E_hid_flags, & + H5F_flags, & + H5FD_flags, & + H5FD_hid_flags, & + H5G_flags, & + H5I_flags, & + H5L_flags, & + H5O_flags, & + H5P_flags, & + H5P_flags_int, & + H5R_flags, & + H5S_flags, & + H5S_hsize_flags, & + H5T_flags, & + H5Z_flags, & + H5generic_flags) + error_3 = h5init1_flags_c(H5LIB_flags ) + error = error_1 + error_2 + error_3 + END SUBROUTINE h5open_f + +!****s* H5LIB/h5close_f +! +! NAME +! h5close_f +! +! PURPOSE +! Closes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5close_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5close_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1 + INTERFACE + INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & + f_types, F_TYPES_LEN, & + i_types, I_TYPES_LEN ) + USE H5GLOBAL + INTEGER P_TYPES_LEN + INTEGER F_TYPES_LEN + INTEGER I_TYPES_LEN + INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c + !DEC$ENDIF + END FUNCTION h5close_types_c + END INTERFACE + error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & + floating_types, FLOATING_TYPES_LEN, & + integer_types, INTEGER_TYPES_LEN ) + error = error_1 + + END SUBROUTINE h5close_f + +!****s* H5LIB/h5get_libversion_f +! +! NAME +! h5get_libversion_f +! +! PURPOSE +! Returns the HDF5 LIbrary release number +! +! Outputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error +!***** + INTERFACE + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c + !DEC$ENDIF + INTEGER, INTENT(OUT) :: majnum, minnum, relnum + END FUNCTION h5get_libversion_c + END INTERFACE + + error = h5get_libversion_c(majnum, minnum, relnum) + + END SUBROUTINE h5get_libversion_f + +!****s* H5LIB/h5check_version_f +! +! NAME +! h5check_version_f +! +! PURPOSE +! Verifies that library versions are consistent. +! +! Inputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: majnum, minnum, relnum + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: majnum, minnum, relnum + END FUNCTION h5check_version_c + END INTERFACE + + error = h5check_version_c(majnum, minnum, relnum) + + END SUBROUTINE h5check_version_f +!****s* H5LIB/h5garbage_collect_f +! +! NAME +! h5garbage_collect_f +! +! PURPOSE +! Garbage collects on all free-lists of all types. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5garbage_collect_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5garbage_collect_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c + !DEC$ENDIF + END FUNCTION h5garbage_collect_c + END INTERFACE + + error = h5garbage_collect_c() + + END SUBROUTINE h5garbage_collect_f +!****s* H5LIB/h5dont_atexit_f +! +! NAME +! h5dont_atexit_f +! +! PURPOSE +! Instructs library not to install atexit cleanup routine. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5dont_atexit_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5dont_atexit_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c + !DEC$ENDIF + END FUNCTION h5dont_atexit_c + END INTERFACE + + error = h5dont_atexit_c() + + END SUBROUTINE h5dont_atexit_f + +!****f* H5LIB/h5kind_to_type +! +! NAME +! h5kind_to_type +! +! PURPOSE +! Converts the KIND to the correct HDF type +! +! Inputs: +! kind - Fortran KIND parameter +! flag - Whether KIND is of type INTEGER or REAL: +! H5_INTEGER_KIND - integer +! H5_REAL_KIND - real +! Outputs: +! h5_type - Returns the type +! +! AUTHOR +! M. Scot Breitenfeld +! August 25, 2008 +! +! Fortran90 Interface: + INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: flag +!***** + IF(flag.EQ.H5_INTEGER_KIND)THEN + IF(kind.EQ.Fortran_INTEGER_1)THEN + h5_type = H5T_NATIVE_INTEGER_1 + ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + h5_type = H5T_NATIVE_INTEGER_2 + ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + h5_type = H5T_NATIVE_INTEGER_4 + ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + h5_type = H5T_NATIVE_INTEGER_8 + ENDIF + ELSE IF(flag.EQ.H5_REAL_KIND)THEN + IF(kind.EQ.Fortran_REAL_4)THEN + h5_type = H5T_NATIVE_REAL_4 + ELSE IF(kind.EQ.Fortran_REAL_8)THEN + h5_type = H5T_NATIVE_REAL_8 + ELSE IF(kind.EQ.Fortran_REAL_16)THEN + h5_type = H5T_NATIVE_REAL_16 + ENDIF + ENDIF + + END FUNCTION h5kind_to_type + +END MODULE H5LIB diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90 new file mode 100644 index 0000000..d418ed5 --- /dev/null +++ b/fortran/src/H5_ff_F03.f90 @@ -0,0 +1,75 @@ +!****h* ROBODoc/H5LIB_PROVISIONAL +! +! NAME +! MODULE H5LIB_PROVISIONAL +! +! PURPOSE +! This file contains helper functions for Fortran 2003 features and is +! only compiled when Fortran 2003 features are enabled, otherwise +! the file H5_ff_F90.f90 is compiled. +! +! 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 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 H5LIB_PROVISIONAL + +CONTAINS +!****f* H5LIB_PROVISIONAL/h5offsetof +! +! NAME +! h5offsetof +! +! PURPOSE +! Computes the offset in memory +! +! Inputs: +! start - starting pointer address +! end - ending pointer address +! +! Outputs: +! offset - offset of a member within the derived type +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 25, 2008 +! +! ACKNOWLEDGEMENTS +! Joe Krahn +! +! Fortran2003 Interface: + FUNCTION h5offsetof(start,end) RESULT(offset) + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + IMPLICIT NONE + INTEGER(SIZE_T) :: offset + TYPE(C_PTR), VALUE, INTENT(IN) :: start, end +!***** + INTEGER(C_INTPTR_T) :: int_address_start, int_address_end + int_address_start = TRANSFER(start, int_address_start) + int_address_end = TRANSFER(end , int_address_end ) + + offset = int_address_end - int_address_start + + END FUNCTION h5offsetof + +END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5_ff_F90.f90 b/fortran/src/H5_ff_F90.f90 new file mode 100644 index 0000000..a5d303a --- /dev/null +++ b/fortran/src/H5_ff_F90.f90 @@ -0,0 +1,34 @@ +!****h* ROBODoc/H5LIB_PROVISIONAL (F90) +! +! NAME +! MODULE H5LIB_PROVISIONAL +! +! FILE +! fortran/src/H5_ff_F90.f90 +! +! PURPOSE +! This file is a dummy module for when Fortran 2003 features are not enabled. +! It is compiled in place of H5_ff_F03.f90 and is empty. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE H5LIB_PROVISIONAL + + +END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake deleted file mode 100644 index cc36889..0000000 --- a/fortran/src/H5config_f.inc.cmake +++ /dev/null @@ -1,84 +0,0 @@ -! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure - -! Define if we have parallel support -#define H5_HAVE_PARALLEL @CMAKE_H5_HAVE_PARALLEL@ - -#if H5_HAVE_PARALLEL==0 -#undef H5_HAVE_PARALLEL -#endif - -! Define if the intrinsic function STORAGE_SIZE exists -#define H5_FORTRAN_HAVE_STORAGE_SIZE @FORTRAN_HAVE_STORAGE_SIZE@ - -#if H5_FORTRAN_HAVE_STORAGE_SIZE==0 -#undef H5_FORTRAN_HAVE_STORAGE_SIZE -#endif - -! Define if the intrinsic function SIZEOF exists -#define H5_FORTRAN_HAVE_SIZEOF @FORTRAN_HAVE_SIZEOF@ - -#if H5_FORTRAN_HAVE_SIZEOF==0 -#undef H5_FORTRAN_HAVE_SIZEOF -#endif - -! Define if the intrinsic function C_SIZEOF exists -#define H5_FORTRAN_HAVE_C_SIZEOF @FORTRAN_HAVE_C_SIZEOF@ - -#if H5_FORTRAN_HAVE_C_SIZEOF==0 -#undef H5_FORTRAN_HAVE_C_SIZEOF -#endif - -! Define if the intrinsic C_LONG_DOUBLE exists -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ - -#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 -#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE -#endif - -! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE -#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ - -! Define if the intrinsic module ISO_FORTRAN_ENV exists -#define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@ - - -! should this be ${HDF_PREFIX} instead of H5 MSB -#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ - -#if H5_SIZEOF_DOUBLE==0 -#undef H5_SIZEOF_DOUBLE -#endif - -! should this be ${HDF_PREFIX} instead of H5 MSB -#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ - -#if H5_SIZEOF_LONG_DOUBLE==0 -#undef H5_SIZEOF_LONG_DOUBLE -#endif - -! Define the maximum decimal precision for reals -#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ - -! If C has quad precision -#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ - -! Define if INTEGER*16 is available -#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ - -! Maximum decimal precision for C -#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ - -! number of valid REAL KINDs -#define H5_H5CONFIG_F_NUM_RKIND @H5CONFIG_F_NUM_RKIND@ - -! valid REAL KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_RKIND @H5CONFIG_F_RKIND@ - -! valid REAL KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_RKIND_SIZEOF @H5CONFIG_F_RKIND_SIZEOF@ - -! number of valid INTEGER KINDs -#define H5_H5CONFIG_F_NUM_IKIND @H5CONFIG_F_NUM_IKIND@ - -! valid INTEGER KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in deleted file mode 100644 index 64c3a0c..0000000 --- a/fortran/src/H5config_f.inc.in +++ /dev/null @@ -1,59 +0,0 @@ -! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure - -! The script to replace the defines in H5config_f.inc.in is -! located in configure.ac in the Fortran section. - -! Define if we have parallel support -#undef HAVE_PARALLEL - -! Define if the intrinsic function STORAGE_SIZE exists -#undef FORTRAN_HAVE_STORAGE_SIZE - -! Define if the intrinsic function SIZEOF exists -#undef FORTRAN_HAVE_SIZEOF - -! Define if the intrinsic function C_SIZEOF exists -#undef FORTRAN_HAVE_C_SIZEOF - -! Define if the intrinsic function C_LONG_DOUBLE exists -#undef FORTRAN_HAVE_C_LONG_DOUBLE - -! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE -#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE - -! Define if the intrinsic module ISO_FORTRAN_ENV exists -#undef HAVE_ISO_FORTRAN_ENV - -! Define the size of C's long double -#undef SIZEOF_DOUBLE - -! Define the size of C's long double -#undef SIZEOF_LONG_DOUBLE - -! Define the maximum decimal precision for reals -#undef PAC_FC_MAX_REAL_PRECISION - -! If C has quad precision -#undef HAVE_FLOAT128 - -! Define if INTEGER*16 is available -#undef HAVE_Fortran_INTEGER_SIZEOF_16 - -! Maximum decimal precision for C -#undef PAC_C_MAX_REAL_PRECISION - -! number of valid REAL KINDs -#undef H5CONFIG_F_NUM_RKIND - -! valid REAL KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_RKIND - -! valid REAL KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_RKIND_SIZEOF - -! number of valid INTEGER KINDs -#undef H5CONFIG_F_NUM_IKIND - -! valid INTEGER KINDs (need to have a matching C counter-part) -#undef H5CONFIG_F_IKIND - diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 deleted file mode 100644 index c88327c..0000000 --- a/fortran/src/H5f90global.F90 +++ /dev/null @@ -1,1040 +0,0 @@ -!****h* ROBODoc/H5GLOBAL -! -! NAME -! MODULE H5GLOBAL -! -! FILE -! src/fortran/H5f90global.f90 -! -! PURPOSE -! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are -! packed into arrays in H5_f.c and these arrays are then passed to Fortran. -! This module then uses EQUIVALENCE to assign elements of the arrays to -! Fortran equivalent C stubs. -! -! NOTES -! The size of the C arrays in H5_f.c has to match the values of the variables -! declared as PARAMETER, hence if the size of an array in H5_f.c is changed -! then the PARAMETER of that corresponding array in Fortran must also be changed. -! -! USES -! H5FORTRAN_TYPES - This module is generated at run time. See -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourmal -! -!***** - -MODULE H5GLOBAL - USE H5FORTRAN_TYPES - - IMPLICIT NONE - - ! Definitions for reference datatypes. - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - - ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. - ! The flag is used to tell the function whether the kind input variable - ! is for a REAL or INTEGER data type. - - INTEGER, PARAMETER :: H5_REAL_KIND = 1 - INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 - - TYPE :: hobj_ref_t_f - INTEGER(HADDR_T) ref - END TYPE hobj_ref_t_f - - TYPE :: hdset_reg_ref_t_f - INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref - END TYPE hdset_reg_ref_t_f - - INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 19 ! Do not forget to change this - ! value when new predefined - ! datatypes are added - - ! Do not forget to change the following line when new predefined - ! floating data types are added - INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 - - ! Do not forget to change the following line when new predefined - ! integer data types are added - INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 - - INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & - H5T_NATIVE_INTEGER_2, & - H5T_NATIVE_INTEGER_4, & - H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_C_FLOAT, & - H5T_NATIVE_REAL_C_DOUBLE, & - H5T_NATIVE_REAL_C_LONG_DOUBLE, & - H5T_NATIVE_INTEGER, & - H5T_NATIVE_REAL, & - H5T_NATIVE_DOUBLE, & - H5T_NATIVE_CHARACTER , & - H5T_STD_REF_OBJ, & - H5T_STD_REF_DSETREG, & - H5T_IEEE_F32BE, & - H5T_IEEE_F32LE, & - H5T_IEEE_F64BE, & - H5T_IEEE_F64LE, & - H5T_STD_I8BE, & - H5T_STD_I8LE, & - H5T_STD_I16BE, & - H5T_STD_I16LE, & - H5T_STD_I32BE, & - H5T_STD_I32LE, & - H5T_STD_I64BE, & - H5T_STD_I64LE, & - H5T_STD_U8BE, & - H5T_STD_U8LE, & - H5T_STD_U16BE, & - H5T_STD_U16LE, & - H5T_STD_U32BE - - INTEGER(HID_T) :: H5T_NATIVE_INTEGER_16 ! NEED IFDEF -MSB- - INTEGER(HID_T) :: H5T_NATIVE_FLOAT_128 ! NEED IFDEF -MSB- - -! NOTE: Splitting the line since the Fortran 95 standard limits the number of -! continuation lines to 39; the F03/F08 standard limits the number -! to 255 lines. - - INTEGER(HID_T) :: H5T_STD_U32LE, & - H5T_STD_U64BE, & - H5T_STD_U64LE, & - H5T_STRING, & - H5T_STD_B8BE, & - H5T_STD_B8LE, & - H5T_STD_B16BE, & - H5T_STD_B16LE, & - H5T_STD_B32BE, & - H5T_STD_B32LE, & - H5T_STD_B64BE, & - H5T_STD_B64LE, & - H5T_NATIVE_B8, & - H5T_NATIVE_B16, & - H5T_NATIVE_B32, & - H5T_NATIVE_B64, & - H5T_FORTRAN_S1, & - H5T_C_S1 - - - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types - EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) - EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) - EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) - EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) - EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) - EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) - EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) - EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) - EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) - EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_C_FLOAT) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_C_DOUBLE) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_C_LONG_DOUBLE) - EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) - EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) - EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) - EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) - EQUIVALENCE (predef_types(18), H5T_NATIVE_INTEGER_16) ! ADDED NEW TYPE -MSB- - EQUIVALENCE (predef_types(19), H5T_NATIVE_FLOAT_128) ! ADDED NEW TYPE -MSB- - - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types - EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) - EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) - EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) - EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) - - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types - EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) - EQUIVALENCE (integer_types(2), H5T_STD_I8LE) - EQUIVALENCE (integer_types(3), H5T_STD_I16BE) - EQUIVALENCE (integer_types(4), H5T_STD_I16LE) - EQUIVALENCE (integer_types(5), H5T_STD_I32BE) - EQUIVALENCE (integer_types(6), H5T_STD_I32LE) - EQUIVALENCE (integer_types(7), H5T_STD_I64BE) - EQUIVALENCE (integer_types(8), H5T_STD_I64LE) - EQUIVALENCE (integer_types(9), H5T_STD_U8BE) - EQUIVALENCE (integer_types(10), H5T_STD_U8LE) - EQUIVALENCE (integer_types(11), H5T_STD_U16BE) - EQUIVALENCE (integer_types(12), H5T_STD_U16LE) - EQUIVALENCE (integer_types(13), H5T_STD_U32BE) - EQUIVALENCE (integer_types(14), H5T_STD_U32LE) - EQUIVALENCE (integer_types(15), H5T_STD_U64BE) - EQUIVALENCE (integer_types(16), H5T_STD_U64LE) - EQUIVALENCE (integer_types(17), H5T_STRING) - EQUIVALENCE (integer_types(18), H5T_STD_B8BE) - EQUIVALENCE (integer_types(19), H5T_STD_B8LE) - EQUIVALENCE (integer_types(20), H5T_STD_B16BE) - EQUIVALENCE (integer_types(21), H5T_STD_B16LE) - EQUIVALENCE (integer_types(22), H5T_STD_B32BE) - EQUIVALENCE (integer_types(23), H5T_STD_B32LE) - EQUIVALENCE (integer_types(24), H5T_STD_B64BE) - EQUIVALENCE (integer_types(25), H5T_STD_B64LE) - EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) - EQUIVALENCE (integer_types(27), H5T_C_S1) - - - ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & - ! H5T_NATIVE_REAL, & - ! H5T_NATIVE_DOUBLE, & - ! H5T_NATIVE_CHARACTER, & - ! H5T_STD_REF_OBJ, & - ! H5T_STD_REF_DSETREG - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ - !DEC$endif - COMMON /PREDEFINED_TYPES/ predef_types - - ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & - ! H5T_IEEE_F32LE, & - ! H5T_IEEE_F64BE, & - ! H5T_IEEE_F64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ - !DEC$endif - COMMON /FLOATING_TYPES/ floating_types - ! - ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & - ! H5T_STD_I8LE, & - ! H5T_STD_I16BE, & - ! H5T_STD_I16LE, & - ! H5T_STD_I32BE, & - ! H5T_STD_I32LE, & - ! H5T_STD_I64BE, & - ! H5T_STD_I64LE, & - ! H5T_STD_U8BE, & - ! H5T_STD_U8LE, & - ! H5T_STD_U16BE, & - ! H5T_STD_U16LE, & - ! H5T_STD_U32BE, & - ! H5T_STD_U32LE, & - ! H5T_STD_U64BE, & - ! H5T_STD_U64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ - !DEC$endif - COMMON /INTEGER_TYPES/ integer_types - ! - ! Fortran flags - ! - ! - ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) - ! - ! H5F flags declaration - ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 - INTEGER :: H5F_flags(H5F_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ - !DEC$endif - COMMON /H5F_FLAGS/ H5F_flags - - INTEGER :: H5F_ACC_RDWR_F - INTEGER :: H5F_ACC_RDONLY_F - INTEGER :: H5F_ACC_TRUNC_F - INTEGER :: H5F_ACC_EXCL_F - INTEGER :: H5F_ACC_DEBUG_F - INTEGER :: H5F_SCOPE_LOCAL_F - INTEGER :: H5F_SCOPE_GLOBAL_F - INTEGER :: H5F_CLOSE_DEFAULT_F - INTEGER :: H5F_CLOSE_WEAK_F - INTEGER :: H5F_CLOSE_SEMI_F - INTEGER :: H5F_CLOSE_STRONG_F - INTEGER :: H5F_OBJ_FILE_F - INTEGER :: H5F_OBJ_DATASET_F - INTEGER :: H5F_OBJ_GROUP_F - INTEGER :: H5F_OBJ_DATATYPE_F - INTEGER :: H5F_OBJ_ALL_F - INTEGER :: H5F_LIBVER_EARLIEST_F - INTEGER :: H5F_LIBVER_LATEST_F - INTEGER :: H5F_UNLIMITED_F - - EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) - EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) - EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) - EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) - EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) - EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) - EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) - EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) - EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) - EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) - EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) - EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) - EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) - EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) - EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) - EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) - EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) - EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) - EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) - ! - ! H5generic flags declaration - ! - INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 - INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ - !DEC$endif - COMMON /H5generic_FLAGS/ H5generic_flags - - INTEGER :: H5_INDEX_UNKNOWN_F - INTEGER :: H5_INDEX_NAME_F - INTEGER :: H5_INDEX_CRT_ORDER_F - INTEGER :: H5_INDEX_N_F - INTEGER :: H5_ITER_UNKNOWN_F - INTEGER :: H5_ITER_INC_F - INTEGER :: H5_ITER_DEC_F - INTEGER :: H5_ITER_NATIVE_F - INTEGER :: H5_ITER_N_F - - EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) - EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) - EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) - EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) - EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) - EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) - EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) - ! - ! H5G flags declaration - ! - INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 - INTEGER :: H5G_flags(H5G_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ - !DEC$endif - COMMON /H5G_FLAGS/ H5G_flags - - INTEGER :: H5G_UNKNOWN_F - INTEGER :: H5G_GROUP_F - INTEGER :: H5G_DATASET_F - INTEGER :: H5G_TYPE_F - INTEGER :: H5G_LINK_F - INTEGER :: H5G_UDLINK_F - INTEGER :: H5G_SAME_LOC_F - INTEGER :: H5G_LINK_ERROR_F - INTEGER :: H5G_LINK_HARD_F - INTEGER :: H5G_LINK_SOFT_F - INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F - INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F - INTEGER :: H5G_STORAGE_TYPE_COMPACT_F - INTEGER :: H5G_STORAGE_TYPE_DENSE_F - - EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type - EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group - EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type - EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) - EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) - EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) - EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) - - EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) - EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) - EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) - EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) - ! - ! H5D flags declaration - ! - - INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 - INTEGER :: H5D_flags(H5D_FLAGS_LEN) - INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 - INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ - !DEC$endif - COMMON /H5D_FLAGS/ H5D_flags - COMMON /H5D_SIZE_FLAGS/ H5D_size_flags - - INTEGER :: H5D_COMPACT_F - INTEGER :: H5D_CONTIGUOUS_F - INTEGER :: H5D_CHUNKED_F - - INTEGER :: H5D_ALLOC_TIME_ERROR_F - INTEGER :: H5D_ALLOC_TIME_DEFAULT_F - INTEGER :: H5D_ALLOC_TIME_EARLY_F - INTEGER :: H5D_ALLOC_TIME_LATE_F - INTEGER :: H5D_ALLOC_TIME_INCR_F - - INTEGER :: H5D_SPACE_STS_ERROR_F - INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_ALLOCATED_F - - INTEGER :: H5D_FILL_TIME_ERROR_F - INTEGER :: H5D_FILL_TIME_ALLOC_F - INTEGER :: H5D_FILL_TIME_NEVER_F - - INTEGER :: H5D_FILL_VALUE_ERROR_F - INTEGER :: H5D_FILL_VALUE_UNDEFINED_F - INTEGER :: H5D_FILL_VALUE_DEFAULT_F - INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F - -! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 -! characters for variable names in Fortran. -! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 -! characters for variable names in Fortran. - - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F - INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F - INTEGER :: H5D_MPIO_NO_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F - INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_MIXED_F - INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F - - EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) - EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) - EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) - - EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) - EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) - EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) - EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) - - EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) - EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) - EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) - EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) - - EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) - EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) - - EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) - EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) - EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) - EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) - - EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) - EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) - EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) - EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) - - EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) - EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) - - ! - ! H5E flags declaration - ! - INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 - INTEGER :: H5E_flags(H5E_FLAGS_LEN) - INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 - INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ - !DEC$endif - COMMON /H5E_FLAGS/ H5E_flags - COMMON /H5E_HID_FLAGS/ H5E_hid_flags - - INTEGER(HID_T) :: H5E_DEFAULT_F - INTEGER :: H5E_MAJOR_F - INTEGER :: H5E_MINOR_F - INTEGER :: H5E_WALK_UPWARD_F - INTEGER :: H5E_WALK_DOWNWARD_F - - EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) - EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) - EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) - EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) - EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) - - ! - ! H5FD flags declaration - ! - INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 - INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ - !DEC$endif - COMMON /H5FD_FLAGS/ H5FD_flags - - INTEGER :: H5FD_MPIO_INDEPENDENT_F - INTEGER :: H5FD_MPIO_COLLECTIVE_F - INTEGER :: H5FD_MEM_NOLIST_F - INTEGER :: H5FD_MEM_DEFAULT_F - INTEGER :: H5FD_MEM_SUPER_F - INTEGER :: H5FD_MEM_BTREE_F - INTEGER :: H5FD_MEM_DRAW_F - INTEGER :: H5FD_MEM_GHEAP_F - INTEGER :: H5FD_MEM_LHEAP_F - INTEGER :: H5FD_MEM_OHDR_F - INTEGER :: H5FD_MEM_NTYPES_F - - EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) - EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) - EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) - EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) - EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) - EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) - EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) - EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) - EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) - EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) - EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) - ! - ! H5FD file drivers flags declaration - ! - INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 - INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ - !DEC$endif - COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags - - INTEGER(HID_T) :: H5FD_CORE_F - INTEGER(HID_T) :: H5FD_FAMILY_F - INTEGER(HID_T) :: H5FD_LOG_F - INTEGER(HID_T) :: H5FD_MPIO_F - INTEGER(HID_T) :: H5FD_MULTI_F - INTEGER(HID_T) :: H5FD_SEC2_F - INTEGER(HID_T) :: H5FD_STDIO_F - - EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) - EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) - EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) - EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) - EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) - EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) - EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) - - ! - ! H5I flags declaration - ! - INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 - INTEGER :: H5I_flags(H5I_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ - !DEC$endif - COMMON /H5I_FLAGS/ H5I_flags - - INTEGER :: H5I_FILE_F - INTEGER :: H5I_GROUP_F - INTEGER :: H5I_DATATYPE_F - INTEGER :: H5I_DATASPACE_F - INTEGER :: H5I_DATASET_F - INTEGER :: H5I_ATTR_F - INTEGER :: H5I_BADID_F - - EQUIVALENCE(H5I_flags(1), H5I_FILE_F) - EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) - EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) - EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) - EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) - EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) - EQUIVALENCE(H5I_flags(7), H5I_BADID_F) - ! - ! H5L flags declaration - ! - INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 - INTEGER :: H5L_flags(H5L_FLAGS_LEN) - - INTEGER :: H5L_TYPE_ERROR_F - INTEGER :: H5L_TYPE_HARD_F - INTEGER :: H5L_TYPE_SOFT_F - INTEGER :: H5L_TYPE_EXTERNAL_F - INTEGER :: H5L_SAME_LOC_F - INTEGER :: H5L_LINK_CLASS_T_VERS_F - - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ - !DEC$endif - COMMON /H5L_FLAGS/ H5L_flags - - EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) - EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) - EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) - EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) - EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) - EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) - ! - ! H5O flags declaration - ! - INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 - INTEGER :: H5o_flags(H5O_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ - !DEC$endif - COMMON /H5O_FLAGS/ H5O_flags - - INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO - INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE - INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER - INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE - INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F - INTEGER :: H5O_COPY_ALL_F - INTEGER :: H5O_SHMESG_NONE_FLAG_F - INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F - INTEGER :: H5O_SHMESG_DTYPE_FLAG_F - INTEGER :: H5O_SHMESG_FILL_FLAG_F - INTEGER :: H5O_SHMESG_PLINE_FLAG_F - INTEGER :: H5O_SHMESG_ATTR_FLAG_F - INTEGER :: H5O_SHMESG_ALL_FLAG_F - INTEGER :: H5O_HDR_CHUNK0_SIZE_F - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE - INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** - INTEGER :: H5O_HDR_STORE_TIMES_F - INTEGER :: H5O_HDR_ALL_FLAGS_F - INTEGER :: H5O_SHMESG_MAX_NINDEXES_F - INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F - INTEGER :: H5O_TYPE_UNKNOWN_F - INTEGER :: H5O_TYPE_GROUP_F - INTEGER :: H5O_TYPE_DATASET_F - INTEGER :: H5O_TYPE_NAMED_DATATYPE_F - INTEGER :: H5O_TYPE_NTYPES_F - - EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) - EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) - EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) - EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) - EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) - EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) - EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) - EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) - EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) - EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) - EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) - EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) - EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) - EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) - EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) - EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) - EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) - EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) - EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) - EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) - EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) - EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) - EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) - EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) - EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) - - ! - ! H5P flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 - INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ - !DEC$endif - COMMON /H5P_FLAGS/ H5P_flags - - INTEGER(HID_T) :: H5P_FILE_CREATE_F - INTEGER(HID_T) :: H5P_FILE_ACCESS_F - INTEGER(HID_T) :: H5P_DATASET_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_XFER_F - INTEGER(HID_T) :: H5P_FILE_MOUNT_F - INTEGER(HID_T) :: H5P_DEFAULT_F - INTEGER(HID_T) :: H5P_ROOT_F - INTEGER(HID_T) :: H5P_OBJECT_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_ACCESS_F - INTEGER(HID_T) :: H5P_GROUP_CREATE_F - INTEGER(HID_T) :: H5P_GROUP_ACCESS_F - INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F - INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F - INTEGER(HID_T) :: H5P_STRING_CREATE_F - INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F - INTEGER(HID_T) :: H5P_OBJECT_COPY_F - INTEGER(HID_T) :: H5P_LINK_CREATE_F - INTEGER(HID_T) :: H5P_LINK_ACCESS_F - - EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) - EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) - EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) - EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) - EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) - EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) - EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) - EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) - EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) - EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) - EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) - EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) - EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) - EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) - EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) - EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) - EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) - EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) - - ! - ! H5P integers flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 - INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ - !DEC$endif - COMMON /H5P_FLAGS_INT/ H5P_flags_int - INTEGER :: H5P_CRT_ORDER_INDEXED_F - INTEGER :: H5P_CRT_ORDER_TRACKED_F - EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) - EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) - ! - ! H5R flags declaration - ! - INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 - INTEGER :: H5R_flags(H5R_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ - !DEC$endif - COMMON /H5R_FLAGS/ H5R_flags - - INTEGER :: H5R_OBJECT_F - INTEGER :: H5R_DATASET_REGION_F - - EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) - EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) - - ! - ! H5S flags declaration - ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 - INTEGER :: H5S_flags(H5S_FLAGS_LEN) - INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 - INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ - !DEC$endif - COMMON /H5S_FLAGS/ H5S_flags - COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags - - INTEGER(HSIZE_T) :: H5S_UNLIMITED_F - - INTEGER :: H5S_SCALAR_F - INTEGER :: H5S_SIMPLE_F - INTEGER :: H5S_NULL_F - - INTEGER :: H5S_ALL_F - - INTEGER :: H5S_SELECT_NOOP_F - INTEGER :: H5S_SELECT_SET_F - INTEGER :: H5S_SELECT_OR_F - INTEGER :: H5S_SELECT_AND_F - INTEGER :: H5S_SELECT_XOR_F - INTEGER :: H5S_SELECT_NOTB_F - INTEGER :: H5S_SELECT_NOTA_F - INTEGER :: H5S_SELECT_APPEND_F - INTEGER :: H5S_SELECT_PREPEND_F - INTEGER :: H5S_SELECT_INVALID_F - - INTEGER :: H5S_SEL_ERROR_F - INTEGER :: H5S_SEL_NONE_F - INTEGER :: H5S_SEL_POINTS_F - INTEGER :: H5S_SEL_HYPERSLABS_F - INTEGER :: H5S_SEL_ALL_F - - EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) - EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) - EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) - EQUIVALENCE(H5S_flags(3), H5S_NULL_F) - EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) - EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) - EQUIVALENCE(H5S_flags(6), H5S_ALL_F) - - EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) - EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) - EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) - - - EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) - EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) - EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) - EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) - EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) - - ! - ! H5T flags declaration - ! - INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 - INTEGER :: H5T_flags(H5T_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ - !DEC$endif - COMMON /H5T_FLAGS/ H5T_flags - - INTEGER :: H5T_NO_CLASS_F - INTEGER :: H5T_INTEGER_F - INTEGER :: H5T_FLOAT_F - INTEGER :: H5T_TIME_F - INTEGER :: H5T_STRING_F - INTEGER :: H5T_BITFIELD_F - INTEGER :: H5T_OPAQUE_F - INTEGER :: H5T_COMPOUND_F - INTEGER :: H5T_REFERENCE_F - INTEGER :: H5T_ENUM_F - INTEGER :: H5T_VLEN_F - INTEGER :: H5T_ARRAY_F - INTEGER :: H5T_ORDER_LE_F - INTEGER :: H5T_ORDER_BE_F - INTEGER :: H5T_ORDER_VAX_F - INTEGER :: H5T_ORDER_NONE_F - INTEGER :: H5T_ORDER_MIXED_F - INTEGER :: H5T_PAD_ZERO_F - INTEGER :: H5T_PAD_ONE_F - INTEGER :: H5T_PAD_BACKGROUND_F - INTEGER :: H5T_PAD_ERROR_F - INTEGER :: H5T_SGN_NONE_F - INTEGER :: H5T_SGN_2_F - INTEGER :: H5T_SGN_ERROR_F - INTEGER :: H5T_NORM_IMPLIED_F - INTEGER :: H5T_NORM_MSBSET_F - INTEGER :: H5T_NORM_NONE_F - INTEGER :: H5T_CSET_ASCII_F - INTEGER :: H5T_CSET_UTF8_F - INTEGER :: H5T_STR_NULLTERM_F - INTEGER :: H5T_STR_NULLPAD_F - INTEGER :: H5T_STR_SPACEPAD_F - INTEGER :: H5T_STR_ERROR_F - INTEGER :: H5T_DIR_ASCEND_F - INTEGER :: H5T_DIR_DESCEND_F - - EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) - EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) - EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) - EQUIVALENCE(H5T_flags(4), H5T_TIME_F) - EQUIVALENCE(H5T_flags(5), H5T_STRING_F) - EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) - EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) - EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) - EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) - EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) - EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) - EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) - EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) - EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) - EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) - EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) - EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) - EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) - EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) - EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) - EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) - EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) - EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) - EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) - EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) - EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) - EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) - EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) - EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) - EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) - EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) - EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) - EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) - EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) - EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) - ! - ! H5Z flags declaration - ! - INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 - INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ - !DEC$endif - COMMON /H5Z_FLAGS/ H5Z_flags - - INTEGER :: H5Z_FILTER_ERROR_F - INTEGER :: H5Z_FILTER_NONE_F - INTEGER :: H5Z_FILTER_ALL_F - INTEGER :: H5Z_FILTER_DEFLATE_F - INTEGER :: H5Z_FILTER_SHUFFLE_F - INTEGER :: H5Z_FILTER_FLETCHER32_F - INTEGER :: H5Z_FILTER_SZIP_F - INTEGER :: H5Z_ERROR_EDC_F - INTEGER :: H5Z_DISABLE_EDC_F - INTEGER :: H5Z_ENABLE_EDC_F - INTEGER :: H5Z_NO_EDC_F - INTEGER :: H5Z_FLAG_OPTIONAL_F - INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F - INTEGER :: H5Z_FILTER_DECODE_ENABLED_F - INTEGER :: H5Z_FILTER_NBIT_F - INTEGER :: H5Z_FILTER_SCALEOFFSET_F - INTEGER :: H5Z_SO_FLOAT_DSCALE_F - INTEGER :: H5Z_SO_FLOAT_ESCALE_F - INTEGER :: H5Z_SO_INT_F - INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F - - EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) - EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) - EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) - EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) - EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) - EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) - EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) - EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) - EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) - EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) - EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) - EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) - EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) - EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) - EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) - EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) - EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) - EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) - - ! - ! H5 Library flags declaration - ! - INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 - INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ - !DEC$endif - COMMON /H5LIB_FLAGS/ H5LIB_flags - INTEGER :: H5_SZIP_EC_OM_F - INTEGER :: H5_SZIP_NN_OM_F - ! - EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) - EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) - - - ! General H5 flags declarations - ! -!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 -!!$ INTEGER H5_flags(H5_FLAGS_LEN) -!!$!DEC$if defined(BUILD_HDF5_DLL) -!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ -!!$!DEC$endif -!!$ COMMON /H5_FLAGS/ H5_flags -!!$ -!!$ INTEGER :: _F -!!$ INTEGER :: H5F_SCOPE_LOCAL_F -!!$ -!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) -!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) - -CONTAINS - - ! Copy a c string to a Fortran string - - SUBROUTINE H5_Fortran_string_c2f(c_string, f_string) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string - CHARACTER(LEN=*), INTENT(OUT) :: f_string - INTEGER(SIZE_T) :: c_len, f_len - - ! Find the length of the C string by located the null terminator - c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) - ! Find the length of the Fortran string - f_len = LEN(f_string) - - ! CASE (1): C string is equal to or larger then Fortran character buffer, - ! so fill the entire Fortran buffer. - IF(c_len.GE.f_len)THEN ! - f_string(1:f_len) = c_string(1:f_len) - - ! CASE (2): C string is smaller then Fortran character buffer, - ! so copy C string and blank pad remaining characters. - ELSE - f_string(1:c_len) = c_string(1:c_len) - f_string(c_len+1:f_len) =' ' - ENDIF - END SUBROUTINE H5_Fortran_string_c2f - - SUBROUTINE H5_Fortran_string_f2c(f_string, c_string) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: f_string - CHARACTER(KIND=C_CHAR, LEN=*), INTENT(OUT) :: c_string - INTEGER(SIZE_T) :: c_len, f_len - - c_string = TRIM(f_string)//C_NULL_CHAR - - END SUBROUTINE H5_Fortran_string_f2c - - -! Copy Fortran string to C charater array, assuming the C array is one-char -! longer for the terminating null char. -! fstring : the Fortran input string -! cstring : the C output string (with memory already allocated) -!!$subroutine MPIR_Fortran_string_f2c(fstring, cstring) -!!$ implicit none -!!$ character(len=*), intent(in) :: fstring -!!$ character(kind=c_char), intent(out) :: cstring(:) -!!$ integer :: i, j -!!$ logical :: met_non_blank -!!$ -!!$ ! Trim the leading and trailing blank characters -!!$ j = 1 -!!$ met_non_blank = .false. -!!$ do i = 1, len_trim(fstring) -!!$ if (met_non_blank) then -!!$ cstring(j) = fstring(i:i) -!!$ j = j + 1 -!!$ else if (fstring(i:i) /= ' ') then -!!$ met_non_blank = .true. -!!$ cstring(j) = fstring(i:i) -!!$ j = j + 1 -!!$ end if -!!$ end do -!!$ -!!$ cstring(j) = C_NULL_CHAR -!!$end subroutine MPIR_Fortran_string_f2c -!!$ -!!$! Copy C charater array to Fortran string -!!$subroutine MPIR_Fortran_string_c2f(cstring, fstring) -!!$ implicit none -!!$ character(kind=c_char), intent(in) :: cstring(:) -!!$ character(len=*), intent(out) :: fstring -!!$ integer :: i, j, length -!!$ -!!$ i = 1 -!!$ do while (cstring(i) /= C_NULL_CHAR) -!!$ fstring(i:i) = cstring(i) -!!$ i = i + 1 -!!$ end do -!!$ -!!$ ! Zero out the trailing characters -!!$ length = len(fstring) -!!$ do j = i, length -!!$ fstring(j:j) = ' ' -!!$ end do -!!$end subroutine MPIR_Fortran_string_c2f - -END MODULE H5GLOBAL - diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 new file mode 100644 index 0000000..0e371f5 --- /dev/null +++ b/fortran/src/H5f90global.f90 @@ -0,0 +1,947 @@ +!****h* ROBODoc/H5GLOBAL +! +! NAME +! MODULE H5GLOBAL +! +! FILE +! src/fortran/H5f90global.f90 +! +! PURPOSE +! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are +! packed into arrays in H5_f.c and these arrays are then passed to Fortran. +! This module then uses EQUIVALENCE to assign elements of the arrays to +! Fortran equivalent C stubs. +! +! NOTES +! The size of the C arrays in H5_f.c has to match the values of the variables +! declared as PARAMETER, hence if the size of an array in H5_f.c is changed +! then the PARAMETER of that corresponding array in Fortran must also be changed. +! +! USES +! H5FORTRAN_TYPES - This module is generated at run time. See +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourmal +! +!***** + +MODULE H5GLOBAL + USE H5FORTRAN_TYPES + + IMPLICIT NONE + + ! Definitions for reference datatypes. + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + + ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. + ! The flag is used to tell the function whether the kind input variable + ! is for a REAL or INTEGER data type. + + INTEGER, PARAMETER :: H5_REAL_KIND = 1 + INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 + + TYPE :: hobj_ref_t_f + INTEGER(HADDR_T) ref + END TYPE hobj_ref_t_f + + TYPE :: hdset_reg_ref_t_f + INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref + END TYPE hdset_reg_ref_t_f + + INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this + ! value when new predefined + ! datatypes are added + + ! Do not forget to change the following line when new predefined + ! floating data types are added + INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 + + ! Do not forget to change the following line when new predefined + ! integer data types are added + INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & + H5T_NATIVE_INTEGER_2, & + H5T_NATIVE_INTEGER_4, & + H5T_NATIVE_INTEGER_8, & + H5T_NATIVE_REAL_4, & + H5T_NATIVE_REAL_8, & + H5T_NATIVE_REAL_16, & + H5T_NATIVE_INTEGER, & + H5T_NATIVE_REAL, & + H5T_NATIVE_DOUBLE, & + H5T_NATIVE_CHARACTER , & + H5T_STD_REF_OBJ, & + H5T_STD_REF_DSETREG, & + H5T_IEEE_F32BE, & + H5T_IEEE_F32LE, & + H5T_IEEE_F64BE, & + H5T_IEEE_F64LE, & + H5T_STD_I8BE, & + H5T_STD_I8LE, & + H5T_STD_I16BE, & + H5T_STD_I16LE, & + H5T_STD_I32BE, & + H5T_STD_I32LE, & + H5T_STD_I64BE, & + H5T_STD_I64LE, & + H5T_STD_U8BE, & + H5T_STD_U8LE, & + H5T_STD_U16BE, & + H5T_STD_U16LE, & + H5T_STD_U32BE + +! NOTE: Splitting the line since the Fortran 95 standard limits the number of +! continuation lines to 39; the F03/F08 standard limits the number +! to 255 lines. + + INTEGER(HID_T) :: H5T_STD_U32LE, & + H5T_STD_U64BE, & + H5T_STD_U64LE, & + H5T_STRING, & + H5T_STD_B8BE, & + H5T_STD_B8LE, & + H5T_STD_B16BE, & + H5T_STD_B16LE, & + H5T_STD_B32BE, & + H5T_STD_B32LE, & + H5T_STD_B64BE, & + H5T_STD_B64LE, & + H5T_NATIVE_B8, & + H5T_NATIVE_B16, & + H5T_NATIVE_B32, & + H5T_NATIVE_B64, & + H5T_FORTRAN_S1, & + H5T_C_S1 + + + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types + EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) + EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) + EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) + EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) + EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) + EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) + EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) + EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) + EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) + EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) + EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) + EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) + EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) + EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) + + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types + EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) + EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) + EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) + EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) + + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types + EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) + EQUIVALENCE (integer_types(2), H5T_STD_I8LE) + EQUIVALENCE (integer_types(3), H5T_STD_I16BE) + EQUIVALENCE (integer_types(4), H5T_STD_I16LE) + EQUIVALENCE (integer_types(5), H5T_STD_I32BE) + EQUIVALENCE (integer_types(6), H5T_STD_I32LE) + EQUIVALENCE (integer_types(7), H5T_STD_I64BE) + EQUIVALENCE (integer_types(8), H5T_STD_I64LE) + EQUIVALENCE (integer_types(9), H5T_STD_U8BE) + EQUIVALENCE (integer_types(10), H5T_STD_U8LE) + EQUIVALENCE (integer_types(11), H5T_STD_U16BE) + EQUIVALENCE (integer_types(12), H5T_STD_U16LE) + EQUIVALENCE (integer_types(13), H5T_STD_U32BE) + EQUIVALENCE (integer_types(14), H5T_STD_U32LE) + EQUIVALENCE (integer_types(15), H5T_STD_U64BE) + EQUIVALENCE (integer_types(16), H5T_STD_U64LE) + EQUIVALENCE (integer_types(17), H5T_STRING) + EQUIVALENCE (integer_types(18), H5T_STD_B8BE) + EQUIVALENCE (integer_types(19), H5T_STD_B8LE) + EQUIVALENCE (integer_types(20), H5T_STD_B16BE) + EQUIVALENCE (integer_types(21), H5T_STD_B16LE) + EQUIVALENCE (integer_types(22), H5T_STD_B32BE) + EQUIVALENCE (integer_types(23), H5T_STD_B32LE) + EQUIVALENCE (integer_types(24), H5T_STD_B64BE) + EQUIVALENCE (integer_types(25), H5T_STD_B64LE) + EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) + EQUIVALENCE (integer_types(27), H5T_C_S1) + + + ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & + ! H5T_NATIVE_REAL, & + ! H5T_NATIVE_DOUBLE, & + ! H5T_NATIVE_CHARACTER, & + ! H5T_STD_REF_OBJ, & + ! H5T_STD_REF_DSETREG + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ + !DEC$endif + COMMON /PREDEFINED_TYPES/ predef_types + + ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & + ! H5T_IEEE_F32LE, & + ! H5T_IEEE_F64BE, & + ! H5T_IEEE_F64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ + !DEC$endif + COMMON /FLOATING_TYPES/ floating_types + ! + ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & + ! H5T_STD_I8LE, & + ! H5T_STD_I16BE, & + ! H5T_STD_I16LE, & + ! H5T_STD_I32BE, & + ! H5T_STD_I32LE, & + ! H5T_STD_I64BE, & + ! H5T_STD_I64LE, & + ! H5T_STD_U8BE, & + ! H5T_STD_U8LE, & + ! H5T_STD_U16BE, & + ! H5T_STD_U16LE, & + ! H5T_STD_U32BE, & + ! H5T_STD_U32LE, & + ! H5T_STD_U64BE, & + ! H5T_STD_U64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ + !DEC$endif + COMMON /INTEGER_TYPES/ integer_types + ! + ! Fortran flags + ! + ! + ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) + ! + ! NOTE: H5F_ACC_DEBUG is deprecated (nonfunctional) but retained for + ! backward compatibility since it's in the public API. + ! + ! H5F flags declaration + ! + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 + INTEGER :: H5F_flags(H5F_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ + !DEC$endif + COMMON /H5F_FLAGS/ H5F_flags + + INTEGER :: H5F_ACC_RDWR_F + INTEGER :: H5F_ACC_RDONLY_F + INTEGER :: H5F_ACC_TRUNC_F + INTEGER :: H5F_ACC_EXCL_F + INTEGER :: H5F_ACC_DEBUG_F + INTEGER :: H5F_SCOPE_LOCAL_F + INTEGER :: H5F_SCOPE_GLOBAL_F + INTEGER :: H5F_CLOSE_DEFAULT_F + INTEGER :: H5F_CLOSE_WEAK_F + INTEGER :: H5F_CLOSE_SEMI_F + INTEGER :: H5F_CLOSE_STRONG_F + INTEGER :: H5F_OBJ_FILE_F + INTEGER :: H5F_OBJ_DATASET_F + INTEGER :: H5F_OBJ_GROUP_F + INTEGER :: H5F_OBJ_DATATYPE_F + INTEGER :: H5F_OBJ_ALL_F + INTEGER :: H5F_LIBVER_EARLIEST_F + INTEGER :: H5F_LIBVER_LATEST_F + INTEGER :: H5F_UNLIMITED_F + + EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) + EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) + EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) + EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) + EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) + EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) + EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) + EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) + EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) + EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) + EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) + EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) + EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) + EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) + EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) + EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) + EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) + EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) + EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) + ! + ! H5generic flags declaration + ! + INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 + INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ + !DEC$endif + COMMON /H5generic_FLAGS/ H5generic_flags + + INTEGER :: H5_INDEX_UNKNOWN_F + INTEGER :: H5_INDEX_NAME_F + INTEGER :: H5_INDEX_CRT_ORDER_F + INTEGER :: H5_INDEX_N_F + INTEGER :: H5_ITER_UNKNOWN_F + INTEGER :: H5_ITER_INC_F + INTEGER :: H5_ITER_DEC_F + INTEGER :: H5_ITER_NATIVE_F + INTEGER :: H5_ITER_N_F + + EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) + EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) + EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) + EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) + EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) + EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) + EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) + ! + ! H5G flags declaration + ! + INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 + INTEGER :: H5G_flags(H5G_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ + !DEC$endif + COMMON /H5G_FLAGS/ H5G_flags + + INTEGER :: H5G_UNKNOWN_F + INTEGER :: H5G_GROUP_F + INTEGER :: H5G_DATASET_F + INTEGER :: H5G_TYPE_F + INTEGER :: H5G_LINK_F + INTEGER :: H5G_UDLINK_F + INTEGER :: H5G_SAME_LOC_F + INTEGER :: H5G_LINK_ERROR_F + INTEGER :: H5G_LINK_HARD_F + INTEGER :: H5G_LINK_SOFT_F + INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F + INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F + INTEGER :: H5G_STORAGE_TYPE_COMPACT_F + INTEGER :: H5G_STORAGE_TYPE_DENSE_F + + EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type + EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group + EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type + EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) + EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) + EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) + EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) + + EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) + EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) + EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) + EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) + ! + ! H5D flags declaration + ! + + INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 + INTEGER :: H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 + INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ + !DEC$endif + COMMON /H5D_FLAGS/ H5D_flags + COMMON /H5D_SIZE_FLAGS/ H5D_size_flags + + INTEGER :: H5D_COMPACT_F + INTEGER :: H5D_CONTIGUOUS_F + INTEGER :: H5D_CHUNKED_F + + INTEGER :: H5D_ALLOC_TIME_ERROR_F + INTEGER :: H5D_ALLOC_TIME_DEFAULT_F + INTEGER :: H5D_ALLOC_TIME_EARLY_F + INTEGER :: H5D_ALLOC_TIME_LATE_F + INTEGER :: H5D_ALLOC_TIME_INCR_F + + INTEGER :: H5D_SPACE_STS_ERROR_F + INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_ALLOCATED_F + + INTEGER :: H5D_FILL_TIME_ERROR_F + INTEGER :: H5D_FILL_TIME_ALLOC_F + INTEGER :: H5D_FILL_TIME_NEVER_F + + INTEGER :: H5D_FILL_VALUE_ERROR_F + INTEGER :: H5D_FILL_VALUE_UNDEFINED_F + INTEGER :: H5D_FILL_VALUE_DEFAULT_F + INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F + +! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 +! characters for variable names in Fortran. +! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 +! characters for variable names in Fortran. + + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F + INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F + INTEGER :: H5D_MPIO_NO_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F + INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_MIXED_F + INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F + + EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) + EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) + EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) + + EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) + EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) + EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) + EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) + + EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) + EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) + EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) + EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) + + EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) + EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) + + EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) + EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) + EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) + EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) + + EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) + EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) + EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) + EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) + + EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) + EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) + + ! + ! H5E flags declaration + ! + INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 + INTEGER :: H5E_flags(H5E_FLAGS_LEN) + INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 + INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ + !DEC$endif + COMMON /H5E_FLAGS/ H5E_flags + COMMON /H5E_HID_FLAGS/ H5E_hid_flags + + INTEGER(HID_T) :: H5E_DEFAULT_F + INTEGER :: H5E_MAJOR_F + INTEGER :: H5E_MINOR_F + INTEGER :: H5E_WALK_UPWARD_F + INTEGER :: H5E_WALK_DOWNWARD_F + + EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) + EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) + EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) + EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) + EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) + + ! + ! H5FD flags declaration + ! + INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 + INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ + !DEC$endif + COMMON /H5FD_FLAGS/ H5FD_flags + + INTEGER :: H5FD_MPIO_INDEPENDENT_F + INTEGER :: H5FD_MPIO_COLLECTIVE_F + INTEGER :: H5FD_MEM_NOLIST_F + INTEGER :: H5FD_MEM_DEFAULT_F + INTEGER :: H5FD_MEM_SUPER_F + INTEGER :: H5FD_MEM_BTREE_F + INTEGER :: H5FD_MEM_DRAW_F + INTEGER :: H5FD_MEM_GHEAP_F + INTEGER :: H5FD_MEM_LHEAP_F + INTEGER :: H5FD_MEM_OHDR_F + INTEGER :: H5FD_MEM_NTYPES_F + + EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) + EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) + EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) + EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) + EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) + EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) + EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) + EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) + EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) + EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) + EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) + ! + ! H5FD file drivers flags declaration + ! + INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 + INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ + !DEC$endif + COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags + + INTEGER(HID_T) :: H5FD_CORE_F + INTEGER(HID_T) :: H5FD_FAMILY_F + INTEGER(HID_T) :: H5FD_LOG_F + INTEGER(HID_T) :: H5FD_MPIO_F + INTEGER(HID_T) :: H5FD_MULTI_F + INTEGER(HID_T) :: H5FD_SEC2_F + INTEGER(HID_T) :: H5FD_STDIO_F + + EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) + EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) + EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) + EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) + EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) + EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) + EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) + + ! + ! H5I flags declaration + ! + INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 + INTEGER :: H5I_flags(H5I_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ + !DEC$endif + COMMON /H5I_FLAGS/ H5I_flags + + INTEGER :: H5I_FILE_F + INTEGER :: H5I_GROUP_F + INTEGER :: H5I_DATATYPE_F + INTEGER :: H5I_DATASPACE_F + INTEGER :: H5I_DATASET_F + INTEGER :: H5I_ATTR_F + INTEGER :: H5I_BADID_F + + EQUIVALENCE(H5I_flags(1), H5I_FILE_F) + EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) + EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) + EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) + EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) + EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) + EQUIVALENCE(H5I_flags(7), H5I_BADID_F) + ! + ! H5L flags declaration + ! + INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 + INTEGER :: H5L_flags(H5L_FLAGS_LEN) + + INTEGER :: H5L_TYPE_ERROR_F + INTEGER :: H5L_TYPE_HARD_F + INTEGER :: H5L_TYPE_SOFT_F + INTEGER :: H5L_TYPE_EXTERNAL_F + INTEGER :: H5L_SAME_LOC_F + INTEGER :: H5L_LINK_CLASS_T_VERS_F + + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ + !DEC$endif + COMMON /H5L_FLAGS/ H5L_flags + + EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) + EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) + EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) + EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) + EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) + EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) + ! + ! H5O flags declaration + ! + INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 + INTEGER :: H5o_flags(H5O_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ + !DEC$endif + COMMON /H5O_FLAGS/ H5O_flags + + INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO + INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE + INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER + INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE + INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F + INTEGER :: H5O_COPY_ALL_F + INTEGER :: H5O_SHMESG_NONE_FLAG_F + INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F + INTEGER :: H5O_SHMESG_DTYPE_FLAG_F + INTEGER :: H5O_SHMESG_FILL_FLAG_F + INTEGER :: H5O_SHMESG_PLINE_FLAG_F + INTEGER :: H5O_SHMESG_ATTR_FLAG_F + INTEGER :: H5O_SHMESG_ALL_FLAG_F + INTEGER :: H5O_HDR_CHUNK0_SIZE_F + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE + INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** + INTEGER :: H5O_HDR_STORE_TIMES_F + INTEGER :: H5O_HDR_ALL_FLAGS_F + INTEGER :: H5O_SHMESG_MAX_NINDEXES_F + INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F + INTEGER :: H5O_TYPE_UNKNOWN_F + INTEGER :: H5O_TYPE_GROUP_F + INTEGER :: H5O_TYPE_DATASET_F + INTEGER :: H5O_TYPE_NAMED_DATATYPE_F + INTEGER :: H5O_TYPE_NTYPES_F + + EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) + EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) + EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) + EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) + EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) + EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) + EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) + EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) + EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) + EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) + EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) + EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) + EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) + EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) + EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) + EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) + EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) + EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) + EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) + EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) + EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) + EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) + EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) + EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) + EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) + + ! + ! H5P flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 + INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ + !DEC$endif + COMMON /H5P_FLAGS/ H5P_flags + + INTEGER(HID_T) :: H5P_FILE_CREATE_F + INTEGER(HID_T) :: H5P_FILE_ACCESS_F + INTEGER(HID_T) :: H5P_DATASET_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_XFER_F + INTEGER(HID_T) :: H5P_FILE_MOUNT_F + INTEGER(HID_T) :: H5P_DEFAULT_F + INTEGER(HID_T) :: H5P_ROOT_F + INTEGER(HID_T) :: H5P_OBJECT_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_ACCESS_F + INTEGER(HID_T) :: H5P_GROUP_CREATE_F + INTEGER(HID_T) :: H5P_GROUP_ACCESS_F + INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F + INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F + INTEGER(HID_T) :: H5P_STRING_CREATE_F + INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F + INTEGER(HID_T) :: H5P_OBJECT_COPY_F + INTEGER(HID_T) :: H5P_LINK_CREATE_F + INTEGER(HID_T) :: H5P_LINK_ACCESS_F + + EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) + EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) + EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) + EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) + EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) + EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) + EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) + EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) + EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) + EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) + EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) + EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) + EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) + EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) + EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) + EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) + EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) + EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) + + ! + ! H5P integers flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 + INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ + !DEC$endif + COMMON /H5P_FLAGS_INT/ H5P_flags_int + INTEGER :: H5P_CRT_ORDER_INDEXED_F + INTEGER :: H5P_CRT_ORDER_TRACKED_F + EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) + EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) + ! + ! H5R flags declaration + ! + INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 + INTEGER :: H5R_flags(H5R_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ + !DEC$endif + COMMON /H5R_FLAGS/ H5R_flags + + INTEGER :: H5R_OBJECT_F + INTEGER :: H5R_DATASET_REGION_F + + EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) + EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) + + ! + ! H5S flags declaration + ! + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 + INTEGER :: H5S_flags(H5S_FLAGS_LEN) + INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 + INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ + !DEC$endif + COMMON /H5S_FLAGS/ H5S_flags + COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags + + INTEGER(HSIZE_T) :: H5S_UNLIMITED_F + + INTEGER :: H5S_SCALAR_F + INTEGER :: H5S_SIMPLE_F + INTEGER :: H5S_NULL_F + + INTEGER :: H5S_ALL_F + + INTEGER :: H5S_SELECT_NOOP_F + INTEGER :: H5S_SELECT_SET_F + INTEGER :: H5S_SELECT_OR_F + INTEGER :: H5S_SELECT_AND_F + INTEGER :: H5S_SELECT_XOR_F + INTEGER :: H5S_SELECT_NOTB_F + INTEGER :: H5S_SELECT_NOTA_F + INTEGER :: H5S_SELECT_APPEND_F + INTEGER :: H5S_SELECT_PREPEND_F + INTEGER :: H5S_SELECT_INVALID_F + + INTEGER :: H5S_SEL_ERROR_F + INTEGER :: H5S_SEL_NONE_F + INTEGER :: H5S_SEL_POINTS_F + INTEGER :: H5S_SEL_HYPERSLABS_F + INTEGER :: H5S_SEL_ALL_F + + EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) + EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) + EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) + EQUIVALENCE(H5S_flags(3), H5S_NULL_F) + EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) + EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) + EQUIVALENCE(H5S_flags(6), H5S_ALL_F) + + EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) + EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) + EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) + EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) + EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) + + + EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) + EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) + EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) + EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) + EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) + + ! + ! H5T flags declaration + ! + INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 + INTEGER :: H5T_flags(H5T_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ + !DEC$endif + COMMON /H5T_FLAGS/ H5T_flags + + INTEGER :: H5T_NO_CLASS_F + INTEGER :: H5T_INTEGER_F + INTEGER :: H5T_FLOAT_F + INTEGER :: H5T_TIME_F + INTEGER :: H5T_STRING_F + INTEGER :: H5T_BITFIELD_F + INTEGER :: H5T_OPAQUE_F + INTEGER :: H5T_COMPOUND_F + INTEGER :: H5T_REFERENCE_F + INTEGER :: H5T_ENUM_F + INTEGER :: H5T_VLEN_F + INTEGER :: H5T_ARRAY_F + INTEGER :: H5T_ORDER_LE_F + INTEGER :: H5T_ORDER_BE_F + INTEGER :: H5T_ORDER_VAX_F + INTEGER :: H5T_ORDER_NONE_F + INTEGER :: H5T_ORDER_MIXED_F + INTEGER :: H5T_PAD_ZERO_F + INTEGER :: H5T_PAD_ONE_F + INTEGER :: H5T_PAD_BACKGROUND_F + INTEGER :: H5T_PAD_ERROR_F + INTEGER :: H5T_SGN_NONE_F + INTEGER :: H5T_SGN_2_F + INTEGER :: H5T_SGN_ERROR_F + INTEGER :: H5T_NORM_IMPLIED_F + INTEGER :: H5T_NORM_MSBSET_F + INTEGER :: H5T_NORM_NONE_F + INTEGER :: H5T_CSET_ASCII_F + INTEGER :: H5T_CSET_UTF8_F + INTEGER :: H5T_STR_NULLTERM_F + INTEGER :: H5T_STR_NULLPAD_F + INTEGER :: H5T_STR_SPACEPAD_F + INTEGER :: H5T_STR_ERROR_F + INTEGER :: H5T_DIR_ASCEND_F + INTEGER :: H5T_DIR_DESCEND_F + + EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) + EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) + EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) + EQUIVALENCE(H5T_flags(4), H5T_TIME_F) + EQUIVALENCE(H5T_flags(5), H5T_STRING_F) + EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) + EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) + EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) + EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) + EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) + EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) + EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) + EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) + EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) + EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) + EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) + EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) + EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) + EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) + EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) + EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) + EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) + EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) + EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) + EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) + EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) + EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) + EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) + EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) + EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) + EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) + EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) + EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) + EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) + EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) + ! + ! H5Z flags declaration + ! + INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 + INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ + !DEC$endif + COMMON /H5Z_FLAGS/ H5Z_flags + + INTEGER :: H5Z_FILTER_ERROR_F + INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ALL_F + INTEGER :: H5Z_FILTER_DEFLATE_F + INTEGER :: H5Z_FILTER_SHUFFLE_F + INTEGER :: H5Z_FILTER_FLETCHER32_F + INTEGER :: H5Z_FILTER_SZIP_F + INTEGER :: H5Z_ERROR_EDC_F + INTEGER :: H5Z_DISABLE_EDC_F + INTEGER :: H5Z_ENABLE_EDC_F + INTEGER :: H5Z_NO_EDC_F + INTEGER :: H5Z_FLAG_OPTIONAL_F + INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F + INTEGER :: H5Z_FILTER_DECODE_ENABLED_F + INTEGER :: H5Z_FILTER_NBIT_F + INTEGER :: H5Z_FILTER_SCALEOFFSET_F + INTEGER :: H5Z_SO_FLOAT_DSCALE_F + INTEGER :: H5Z_SO_FLOAT_ESCALE_F + INTEGER :: H5Z_SO_INT_F + INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F + + EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) + EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) + EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) + EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) + EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) + EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) + EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) + EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) + EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) + EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) + EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) + EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) + EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) + EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) + EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) + EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) + EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) + EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) + + ! + ! H5 Library flags declaration + ! + INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 + INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ + !DEC$endif + COMMON /H5LIB_FLAGS/ H5LIB_flags + INTEGER :: H5_SZIP_EC_OM_F + INTEGER :: H5_SZIP_NN_OM_F + ! + EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) + EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) + + + ! General H5 flags declarations + ! +!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 +!!$ INTEGER H5_flags(H5_FLAGS_LEN) +!!$!DEC$if defined(BUILD_HDF5_DLL) +!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ +!!$!DEC$endif +!!$ COMMON /H5_FLAGS/ H5_flags +!!$ +!!$ INTEGER :: _F +!!$ INTEGER :: H5F_SCOPE_LOCAL_F +!!$ +!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) +!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) + +END MODULE H5GLOBAL + diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index c6c874f..0bc721f 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -1,6 +1,6 @@ /****h* H5f90kit/H5f90kit * PURPOSE - * Routines from HDF4 to deal with C-FORTRAN issues: + * Routines from HDF4 to deal with C-FORTRAN issues: * * HD5f2cstring -- convert a Fortran string to a C string * HD5packFstring -- convert a C string into a Fortran string @@ -31,16 +31,16 @@ /****if* H5f90kit/HDf2cstring * NAME * HD5f2cstring -- convert a Fortran string to a C string - * char * HDf2cstring(fdesc, len) + * char * HDf2cstring(fdesc, len) * INPUTS * _fcd fdesc; IN: Fortran string descriptor - * int len; IN: length of Fortran string + * int len; IN: length of Fortran string * RETURNS - * Pointer to the C string if success, else NULL + * Pointer to the C string if success, else NULL * PURPOSE - * Chop off trailing blanks off of a Fortran string and - * move it into a newly allocated C string. It is up - * to the user to free this string. + * Chop off trailing blanks off of a Fortran string and + * move it into a newly allocated C string. It is up + * to the user to free this string. * SOURCE */ char * @@ -72,21 +72,21 @@ HD5f2cstring(_fcd fdesc, size_t len) /****if* H5f90kit/HD5packFstring * NAME * HD5packFstring -- convert a C string into a Fortran string - * int HD5packFstring(src, dest, len) + * int HD5packFstring(src, dest, len) * INPUTS - * char * src; IN: source string - * int len; IN: length of string + * char * src; IN: source string + * int len; IN: length of string * OUTPUTS - * char * dest; OUT: destination + * char * dest; OUT: destination * RETURNS * SUCCEED / FAIL * PURPOSE - * given a NULL terminated C string 'src' convert it to - * a space padded Fortran string 'dest' of length 'len' + * given a NULL terminated C string 'src' convert it to + * a space padded Fortran string 'dest' of length 'len' * - * This is very similar to HDc2fstr except that function does - * it in place and this one copies. We should probably only - * support one of these. + * This is very similar to HDc2fstr except that function does + * it in place and this one copies. We should probably only + * support one of these. * SOURCE */ void diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index b26e985..6bde877 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -18,7 +18,6 @@ #define _H5f90proto_H #include "H5public.h" -#include "H5f90.h" H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len); @@ -81,505 +80,1236 @@ typedef struct H5O_info_t_f { /* * Functions from H5Ff.c */ -H5_FCDLL int_f h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f h5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f h5fis_hdf5_c(_fcd name, int_f *namelen, int_f *flag); -H5_FCDLL int_f h5fclose_c(hid_t_f *file_id); -H5_FCDLL int_f h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); -H5_FCDLL int_f h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen); -H5_FCDLL int_f h5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2); -H5_FCDLL int_f h5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id); -H5_FCDLL int_f h5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id); -H5_FCDLL int_f h5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count); -H5_FCDLL int_f h5fget_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 h5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space); +#define nh5fcreate_c H5_FC_FUNC_(h5fcreate_c, H5FCREATE_C) +#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C) +#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C) +#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C) +#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C) +#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C) +#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C) +#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C) +#define nh5fget_create_plist_c H5_FC_FUNC_(h5fget_create_plist_c, H5FGET_CREATE_PLIST_C) +#define nh5fget_access_plist_c H5_FC_FUNC_(h5fget_access_plist_c, H5FGET_ACCESS_PLIST_C) +#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_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C) +#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C) + +H5_FCDLL int_f nh5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag); +H5_FCDLL int_f nh5fclose_c (hid_t_f *file_id); +H5_FCDLL int_f nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); +H5_FCDLL int_f nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen); +H5_FCDLL int_f nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2); +H5_FCDLL int_f nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id); +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 h5fget_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 h5fflush_c(hid_t_f *obj_id, int_f *scope); -H5_FCDLL int_f h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen); -H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size); +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); /* * Functions from H5Sf.c */ -H5_FCDLL int_f h5screate_simple_c( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); -H5_FCDLL int_f h5sclose_c( hid_t_f *space_id ); -H5_FCDLL int_f h5screate_c( int_f *classtype, hid_t_f *space_id ); -H5_FCDLL int_f h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id); -H5_FCDLL int_f h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); -H5_FCDLL int_f h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); -H5_FCDLL int_f h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); -H5_FCDLL int_f h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); -H5_FCDLL int_f h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); -H5_FCDLL int_f h5sselect_all_c( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_none_c( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_valid_c( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f h5sget_simple_extent_npoints_c( hid_t_f *space_id , hsize_t_f *npoints ); -H5_FCDLL int_f h5sget_select_npoints_c( hid_t_f *space_id , hssize_t_f *npoints ); -H5_FCDLL int_f h5sget_simple_extent_ndims_c( hid_t_f *space_id , int_f *ndims ); -H5_FCDLL int_f h5sget_simple_extent_type_c( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f h5soffset_simple_c( hid_t_f *space_id , hssize_t_f *offset); -H5_FCDLL int_f h5sset_extent_simple_c( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); -H5_FCDLL int_f h5sis_simple_c( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f h5sget_simple_extent_dims_c( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); -H5_FCDLL int_f h5sextent_copy_c( hid_t_f *dest_space_id , hid_t_f *source_space_id); -H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id ); -H5_FCDLL int_f h5sselect_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); -H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op); -H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); -H5_FCDLL int_f h5scombine_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); -H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); -H5_FCDLL int_f h5sselect_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); -H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); +#define nh5screate_simple_c H5_FC_FUNC_(h5screate_simple_c, H5SCREATE_SIMPLE_C) +#define nh5sclose_c H5_FC_FUNC_(h5sclose_c, H5SCLOSE_C) +#define nh5screate_c H5_FC_FUNC_(h5screate_c, H5SCREATE_C) +#define nh5scopy_c H5_FC_FUNC_(h5scopy_c, H5SCOPY_C) +#define nh5sget_select_hyper_nblocks_c H5_FC_FUNC_(h5sget_select_hyper_nblocks_c, H5SGET_SELECT_HYPER_NBLOCKS_C) +#define nh5sget_select_hyper_blocklist_c H5_FC_FUNC_(h5sget_select_hyper_blocklist_c, H5SGET_SELECT_HYPER_BLOCKLIST_C) +#define nh5sget_select_elem_npoints_c H5_FC_FUNC_(h5sget_select_elem_npoints_c, H5SGET_SELECT_ELEM_NPOINTS_C) +#define nh5sget_select_elem_pointlist_c H5_FC_FUNC_(h5sget_select_elem_pointlist_c, H5SGET_SELECT_ELEM_POINTLIST_C) +#define nh5sget_select_bounds_c H5_FC_FUNC_(h5sget_select_bounds_c, H5SGET_SELECT_BOUNDS_C) +#define nh5sselect_all_c H5_FC_FUNC_(h5sselect_all_c, H5SSELECT_ALL_C) +#define nh5sselect_none_c H5_FC_FUNC_(h5sselect_none_c, H5SSELECT_NONE_C) +#define nh5sselect_valid_c H5_FC_FUNC_(h5sselect_valid_c, H5SSELECT_VALID_C) +#define nh5sget_simple_extent_npoints_c H5_FC_FUNC_(h5sget_simple_extent_npoints_c, H5SGET_SIMPLE_EXTENT_NPOINTS_C) +#define nh5sget_select_npoints_c H5_FC_FUNC_(h5sget_select_npoints_c, H5SGET_SELECT_NPOINTS_C) +#define nh5sget_simple_extent_ndims_c H5_FC_FUNC_(h5sget_simple_extent_ndims_c, H5SGET_SIMPLE_EXTENT_NDIMS_C) +#define nh5sget_simple_extent_type_c H5_FC_FUNC_(h5sget_simple_extent_type_c, H5SGET_SIMPLE_EXTENT_TYPE_C) +#define nh5soffset_simple_c H5_FC_FUNC_(h5soffset_simple_c, H5SOFFSET_SIMPLE_C) +#define nh5sset_extent_simple_c H5_FC_FUNC_(h5sset_extent_simple_c, H5SSET_EXTENT_SIMPLE_C) +#define nh5sis_simple_c H5_FC_FUNC_(h5sis_simple_c, H5SIS_SIMPLE_C) +#define nh5sextent_class_c H5_FC_FUNC_(h5sextent_class_c, H5SEXTENT_CLASS_C) +#define nh5sget_simple_extent_dims_c H5_FC_FUNC_(h5sget_simple_extent_dims_c, H5SGET_SIMPLE_EXTENT_DIMS_C) +#define nh5sextent_copy_c H5_FC_FUNC_(h5sextent_copy_c, H5SEXTENT_COPY_C) +#define nh5sset_extent_none_c H5_FC_FUNC_(h5sset_extent_none_c, H5SSET_EXTENT_NONE_C) +#define nh5sselect_hyperslab_c H5_FC_FUNC_(h5sselect_hyperslab_c, H5SSELECT_HYPERSLAB_C) +#define nh5scombine_hyperslab_c H5_FC_FUNC_(h5scombine_hyperslab_c, H5SCOMBINE_HYPERSLAB_C) +#define nh5scombine_select_c H5_FC_FUNC_(h5scombine_select_c, H5SCOMBINE_SELECT_C) +#define nh5sselect_select_c H5_FC_FUNC_(h5sselect_select_c, H5SSELECT_SELECT_C) +#define nh5sget_select_type_c H5_FC_FUNC_(h5sget_select_type_c, H5SGET_SELECT_TYPE_C) +#define nh5sselect_elements_c H5_FC_FUNC_(h5sselect_elements_c, H5SSELECT_ELEMENTS_C) +#define nh5sdecode_c H5_FC_FUNC_(h5sdecode_c, H5SDECODE_C) +#define nh5sencode_c H5_FC_FUNC_(h5sencode_c, H5SENCODE_C) +#define nh5sextent_equal_c H5_FC_FUNC_(h5sextent_equal_c, H5SEXTENT_EQUAL_C) + +H5_FCDLL int_f nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); +H5_FCDLL int_f nh5sclose_c ( hid_t_f *space_id ); +H5_FCDLL int_f nh5screate_c ( int_f *classtype, hid_t_f *space_id ); +H5_FCDLL int_f nh5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id); +H5_FCDLL int_f nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); +H5_FCDLL int_f nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); +H5_FCDLL int_f nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); +H5_FCDLL int_f nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); +H5_FCDLL int_f nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); +H5_FCDLL int_f nh5sselect_all_c ( hid_t_f *space_id ); +H5_FCDLL int_f nh5sselect_none_c ( hid_t_f *space_id ); +H5_FCDLL int_f nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ); +H5_FCDLL int_f nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ); +H5_FCDLL int_f nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ); +H5_FCDLL int_f nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset); +H5_FCDLL int_f nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); +H5_FCDLL int_f nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f nh5sextent_class_c ( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); +H5_FCDLL int_f nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id); +H5_FCDLL int_f nh5sset_extent_none_c ( hid_t_f *space_id ); +H5_FCDLL int_f nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); +H5_FCDLL int_f nh5sget_select_type_c ( hid_t_f *space_id , int_f *op); +H5_FCDLL int_f nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); +H5_FCDLL int_f nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); +H5_FCDLL int_f nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); +H5_FCDLL int_f nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); +H5_FCDLL int_f nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); /* * Functions from H5Df.c */ +#define nh5dcreate_c H5_FC_FUNC_(h5dcreate_c, H5DCREATE_C) +#define nh5dclose_c H5_FC_FUNC_(h5dclose_c, H5DCLOSE_C) +#define nh5dopen_c H5_FC_FUNC_(h5dopen_c, H5DOPEN_C) +#define nh5dwrite_c H5_FC_FUNC_(h5dwrite_c, H5DWRITE_C) +#define nh5dwrite_integer_s_c H5_FC_FUNC_(h5dwrite_integer_s_c, H5DWRITE_INTEGER_S_C) +#define nh5dwrite_integer_1_c H5_FC_FUNC_(h5dwrite_integer_1_c, H5DWRITE_INTEGER_1_C) +#define nh5dwrite_integer_2_c H5_FC_FUNC_(h5dwrite_integer_2_c, H5DWRITE_INTEGER_2_C) +#define nh5dwrite_integer_3_c H5_FC_FUNC_(h5dwrite_integer_3_c, H5DWRITE_INTEGER_3_C) +#define nh5dwrite_integer_4_c H5_FC_FUNC_(h5dwrite_integer_4_c, H5DWRITE_INTEGER_4_C) +#define nh5dwrite_integer_5_c H5_FC_FUNC_(h5dwrite_integer_5_c, H5DWRITE_INTEGER_5_C) +#define nh5dwrite_integer_6_c H5_FC_FUNC_(h5dwrite_integer_6_c, H5DWRITE_INTEGER_6_C) +#define nh5dwrite_integer_7_c H5_FC_FUNC_(h5dwrite_integer_7_c, H5DWRITE_INTEGER_7_C) +#define nh5dwrite_real_s_c H5_FC_FUNC_(h5dwrite_real_s_c, H5DWRITE_REAL_S_C) +#define nh5dwrite_real_1_c H5_FC_FUNC_(h5dwrite_real_1_c, H5DWRITE_REAL_1_C) +#define nh5dwrite_real_2_c H5_FC_FUNC_(h5dwrite_real_2_c, H5DWRITE_REAL_2_C) +#define nh5dwrite_real_3_c H5_FC_FUNC_(h5dwrite_real_3_c, H5DWRITE_REAL_3_C) +#define nh5dwrite_real_4_c H5_FC_FUNC_(h5dwrite_real_4_c, H5DWRITE_REAL_4_C) +#define nh5dwrite_real_5_c H5_FC_FUNC_(h5dwrite_real_5_c, H5DWRITE_REAL_5_C) +#define nh5dwrite_real_6_c H5_FC_FUNC_(h5dwrite_real_6_c, H5DWRITE_REAL_6_C) +#define nh5dwrite_real_7_c H5_FC_FUNC_(h5dwrite_real_7_c, H5DWRITE_REAL_7_C) +#define nh5dwrite_double_s_c H5_FC_FUNC_(h5dwrite_double_s_c, H5DWRITE_DOUBLE_S_C) +#define nh5dwrite_double_1_c H5_FC_FUNC_(h5dwrite_double_1_c, H5DWRITE_DOUBLE_1_C) +#define nh5dwrite_double_2_c H5_FC_FUNC_(h5dwrite_double_2_c, H5DWRITE_DOUBLE_2_C) +#define nh5dwrite_double_3_c H5_FC_FUNC_(h5dwrite_double_3_c, H5DWRITE_DOUBLE_3_C) +#define nh5dwrite_double_4_c H5_FC_FUNC_(h5dwrite_double_4_c, H5DWRITE_DOUBLE_4_C) +#define nh5dwrite_double_5_c H5_FC_FUNC_(h5dwrite_double_5_c, H5DWRITE_DOUBLE_5_C) +#define nh5dwrite_double_6_c H5_FC_FUNC_(h5dwrite_double_6_c, H5DWRITE_DOUBLE_6_C) +#define nh5dwrite_double_7_c H5_FC_FUNC_(h5dwrite_double_7_c, H5DWRITE_DOUBLE_7_C) +#define nh5dwrite_ref_obj_c H5_FC_FUNC_(h5dwrite_ref_obj_c, H5DWRITE_REF_OBJ_C) +#define nh5dwrite_ref_reg_c H5_FC_FUNC_(h5dwrite_ref_reg_c, H5DWRITE_REF_REG_C) +#define nh5dwritec_c H5_FC_FUNC_(h5dwritec_c, H5DWRITEC_C) +#define nh5dwritec_s_c H5_FC_FUNC_(h5dwritec_s_c, H5DWRITEC_S_C) +#define nh5dwritec_1_c H5_FC_FUNC_(h5dwritec_1_c, H5DWRITEC_1_C) +#define nh5dwritec_2_c H5_FC_FUNC_(h5dwritec_2_c, H5DWRITEC_2_C) +#define nh5dwritec_3_c H5_FC_FUNC_(h5dwritec_3_c, H5DWRITEC_3_C) +#define nh5dwritec_4_c H5_FC_FUNC_(h5dwritec_4_c, H5DWRITEC_4_C) +#define nh5dwritec_5_c H5_FC_FUNC_(h5dwritec_5_c, H5DWRITEC_5_C) +#define nh5dwritec_6_c H5_FC_FUNC_(h5dwritec_6_c, H5DWRITEC_6_C) +#define nh5dwritec_7_c H5_FC_FUNC_(h5dwritec_7_c, H5DWRITEC_7_C) +#define nh5dread_c H5_FC_FUNC_(h5dread_c, H5DREAD_C) +#define nh5dread_integer_s_c H5_FC_FUNC_(h5dread_integer_s_c, H5DREAD_INTEGER_S_C) +#define nh5dread_integer_1_c H5_FC_FUNC_(h5dread_integer_1_c, H5DREAD_INTEGER_1_C) +#define nh5dread_integer_2_c H5_FC_FUNC_(h5dread_integer_2_c, H5DREAD_INTEGER_2_C) +#define nh5dread_integer_3_c H5_FC_FUNC_(h5dread_integer_3_c, H5DREAD_INTEGER_3_C) +#define nh5dread_integer_4_c H5_FC_FUNC_(h5dread_integer_4_c, H5DREAD_INTEGER_4_C) +#define nh5dread_integer_5_c H5_FC_FUNC_(h5dread_integer_5_c, H5DREAD_INTEGER_5_C) +#define nh5dread_integer_6_c H5_FC_FUNC_(h5dread_integer_6_c, H5DREAD_INTEGER_6_C) +#define nh5dread_integer_7_c H5_FC_FUNC_(h5dread_integer_7_c, H5DREAD_INTEGER_7_C) +#define nh5dread_real_s_c H5_FC_FUNC_(h5dread_real_s_c, H5DREAD_REAL_S_C) +#define nh5dread_real_1_c H5_FC_FUNC_(h5dread_real_1_c, H5DREAD_REAL_1_C) +#define nh5dread_real_2_c H5_FC_FUNC_(h5dread_real_2_c, H5DREAD_REAL_2_C) +#define nh5dread_real_3_c H5_FC_FUNC_(h5dread_real_3_c, H5DREAD_REAL_3_C) +#define nh5dread_real_4_c H5_FC_FUNC_(h5dread_real_4_c, H5DREAD_REAL_4_C) +#define nh5dread_real_5_c H5_FC_FUNC_(h5dread_real_5_c, H5DREAD_REAL_5_C) +#define nh5dread_real_6_c H5_FC_FUNC_(h5dread_real_6_c, H5DREAD_REAL_6_C) +#define nh5dread_real_7_c H5_FC_FUNC_(h5dread_real_7_c, H5DREAD_REAL_7_C) +#define nh5dread_double_s_c H5_FC_FUNC_(h5dread_double_s_c, H5DREAD_DOUBLE_S_C) +#define nh5dread_double_1_c H5_FC_FUNC_(h5dread_double_1_c, H5DREAD_DOUBLE_1_C) +#define nh5dread_double_2_c H5_FC_FUNC_(h5dread_double_2_c, H5DREAD_DOUBLE_2_C) +#define nh5dread_double_3_c H5_FC_FUNC_(h5dread_double_3_c, H5DREAD_DOUBLE_3_C) +#define nh5dread_double_4_c H5_FC_FUNC_(h5dread_double_4_c, H5DREAD_DOUBLE_4_C) +#define nh5dread_double_5_c H5_FC_FUNC_(h5dread_double_5_c, H5DREAD_DOUBLE_5_C) +#define nh5dread_double_6_c H5_FC_FUNC_(h5dread_double_6_c, H5DREAD_DOUBLE_6_C) +#define nh5dread_double_7_c H5_FC_FUNC_(h5dread_double_7_c, H5DREAD_DOUBLE_7_C) +#define nh5dread_c_b H5_FC_FUNC_(h5dread_c_b, H5DREAD_C_B) +#define nh5dread_ref_reg_c H5_FC_FUNC_(h5dread_ref_reg_c, H5DREAD_REF_REG_C) +#define nh5dread_ref_obj_c H5_FC_FUNC_(h5dread_ref_obj_c, H5DREAD_REF_OBJ_C) +#define nh5dreadc_c H5_FC_FUNC_(h5dreadc_c, H5DREADC_C) +#define nh5dreadc_s_c H5_FC_FUNC_(h5dreadc_s_c, H5DREADC_S_C) +#define nh5dreadc_1_c H5_FC_FUNC_(h5dreadc_1_c, H5DREADC_1_C) +#define nh5dreadc_2_c H5_FC_FUNC_(h5dreadc_2_c, H5DREADC_2_C) +#define nh5dreadc_3_c H5_FC_FUNC_(h5dreadc_3_c, H5DREADC_3_C) +#define nh5dreadc_4_c H5_FC_FUNC_(h5dreadc_4_c, H5DREADC_4_C) +#define nh5dreadc_5_c H5_FC_FUNC_(h5dreadc_5_c, H5DREADC_5_C) +#define nh5dreadc_6_c H5_FC_FUNC_(h5dreadc_6_c, H5DREADC_6_C) +#define nh5dreadc_7_c H5_FC_FUNC_(h5dreadc_7_c, H5DREADC_7_C) +#define nh5dreadc_c_b H5_FC_FUNC_(h5dreadc_c_b, H5DREADC_C_B) +#define nh5dget_space_c H5_FC_FUNC_(h5dget_space_c, H5DGET_SPACE_C) +#define nh5dget_type_c H5_FC_FUNC_(h5dget_type_c, H5DGET_TYPE_C) +#define nh5dget_create_plist_c H5_FC_FUNC_(h5dget_create_plist_c, H5DGET_CREATE_PLIST_C) +#define nh5dset_extent_c H5_FC_FUNC_(h5dset_extent_c, H5DSET_EXTENT_C) +#define nh5dget_storage_size_c H5_FC_FUNC_(h5dget_storage_size_c, H5DGET_STORAGE_SIZE_C) +#define nh5dvlen_get_max_len_c H5_FC_FUNC_(h5dvlen_get_max_len_c, H5DVLEN_GET_MAX_LEN_C) +#define nh5dwrite_vl_integer_c H5_FC_FUNC_(h5dwrite_vl_integer_c, H5DWRITE_VL_INTEGER_C) +#define nh5dread_vl_integer_c H5_FC_FUNC_(h5dread_vl_integer_c, H5DREAD_VL_INTEGER_C) +#define nh5dwrite_vl_real_c H5_FC_FUNC_(h5dwrite_vl_real_c, H5DWRITE_VL_REAL_C) +#define nh5dread_vl_real_c H5_FC_FUNC_(h5dread_vl_real_c, H5DREAD_VL_REAL_C) +#define nh5dwrite_vl_string_c H5_FC_FUNC_(h5dwrite_vl_string_c, H5DWRITE_VL_STRING_C) +#define nh5dread_vl_string_c H5_FC_FUNC_(h5dread_vl_string_c, H5DREAD_VL_STRING_C) +#define nh5dfillc_c H5_FC_FUNC_(h5dfillc_c, H5DFILLC_C) +#define nh5dfill_integer_c H5_FC_FUNC_(h5dfill_integer_c, H5DFILL_INTEGER_C) +#define nh5dfill_real_c H5_FC_FUNC_(h5dfill_real_c, H5DFILL_REAL_C) +#define nh5dfill_double_c H5_FC_FUNC_(h5dfill_double_c, H5DFILL_DOUBLE_C) +#define nh5dget_space_status_c H5_FC_FUNC_(h5dget_space_status_c, H5DGET_SPACE_STATUS_C) +#define nh5dcreate_anon_c H5_FC_FUNC_(h5dcreate_anon_c, H5DCREATE_ANON_C) +#define nh5dget_access_plist_c H5_FC_FUNC_(h5dget_access_plist_c, H5DGET_ACCESS_PLIST_C) -H5_FCDLL int_f h5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, + +H5_FCDLL int_f nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dclose_c( hid_t_f *dset_id ); - -H5_FCDLL int_f h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); -H5_FCDLL int_f h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); -H5_FCDLL int_f h5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id); -H5_FCDLL int_f h5dget_space_c( hid_t_f *dset_id , hid_t_f *space_id); -H5_FCDLL int_f h5dget_type_c( hid_t_f *dset_id , hid_t_f *type_id); -H5_FCDLL int_f h5dget_create_plist_c( hid_t_f *dset_id , hid_t_f *plist_id); -H5_FCDLL int_f h5dset_extent_c( hid_t_f *dset_id , hsize_t_f *dims); -H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); -H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); +H5_FCDLL int_f nh5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); +H5_FCDLL int_f nh5dclose_c ( hid_t_f *dset_id ); +H5_FCDLL int_f nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); + +H5_FCDLL int_f nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); +H5_FCDLL int_f nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); + + +H5_FCDLL int_f nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); +H5_FCDLL int_f nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); +H5_FCDLL int_f nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); +H5_FCDLL int_f nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); +H5_FCDLL int_f nh5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); +H5_FCDLL int_f nh5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); +H5_FCDLL int_f nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id); H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f h5dget_space_status_c( hid_t_f *dset_id, int_f *flag); -H5_FCDLL int_f h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f nh5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f nh5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f nh5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); +H5_FCDLL int_f nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); +H5_FCDLL int_f nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dread_f_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); - +H5_FCDLL int_f h5dvlen_reclaim_c (hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); /* * Functions from H5Gf.c */ -H5_FCDLL int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, +#define nh5gcreate_c H5_FC_FUNC_(h5gcreate_c, H5GCREATE_C) +#define nh5gclose_c H5_FC_FUNC_(h5gclose_c, H5GCLOSE_C) +#define nh5gopen_c H5_FC_FUNC_(h5gopen_c, H5GOPEN_C) +#define nh5gget_obj_info_idx_c H5_FC_FUNC_(h5gget_obj_info_idx_c, H5GGET_OBJ_INFO_IDX_C) +#define nh5gn_members_c H5_FC_FUNC_(h5gn_members_c, H5GN_MEMBERS_C) +#define nh5glink_c H5_FC_FUNC_(h5glink_c, H5GLINK_C) +#define nh5glink2_c H5_FC_FUNC_(h5glink2_c, H5GLINK2_C) +#define nh5gunlink_c H5_FC_FUNC_(h5gunlink_c, H5GUNLINK_C) +#define nh5gmove_c H5_FC_FUNC_(h5gmove_c, H5GMOVE_C) +#define nh5gmove2_c H5_FC_FUNC_(h5gmove2_c, H5GMOVE2_C) +#define nh5gget_linkval_c H5_FC_FUNC_(h5gget_linkval_c, H5GGET_LINKVAL_C) +#define nh5gset_comment_c H5_FC_FUNC_(h5gset_comment_c, H5GSET_COMMENT_C) +#define nh5gget_comment_c H5_FC_FUNC_(h5gget_comment_c, H5GGET_COMMENT_C) +#define nh5gcreate_anon_c H5_FC_FUNC_(h5gcreate_anon_c, H5GCREATE_ANON_C) +#define nh5gget_create_plist_c H5_FC_FUNC_(h5gget_create_plist_c, H5GGET_CREATE_PLIST_C) +#define nh5gget_info_c H5_FC_FUNC_(h5gget_info_c, H5GGET_INFO_C) +#define nh5gget_info_by_idx_c H5_FC_FUNC_(h5gget_info_by_idx_c, H5GGET_INFO_BY_IDX_C) +#define nh5gget_info_by_name_c H5_FC_FUNC_(h5gget_info_by_name_c, H5GGET_INFO_BY_NAME_C) + + +H5_FCDLL int_f nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id); -H5_FCDLL int_f h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f h5gclose_c( hid_t_f *grp_id ); -H5_FCDLL int_f h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); -H5_FCDLL int_f h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); -H5_FCDLL int_f h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); -H5_FCDLL int_f h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); -H5_FCDLL int_f h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); -H5_FCDLL int_f h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); -H5_FCDLL int_f h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f nh5gclose_c ( hid_t_f *grp_id ); +H5_FCDLL int_f nh5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); +H5_FCDLL int_f nh5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); +H5_FCDLL int_f nh5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f nh5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f nh5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f nh5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f nh5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f nh5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); +H5_FCDLL int_f nh5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); +H5_FCDLL int_f nh5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); +H5_FCDLL int_f nh5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); +H5_FCDLL int_f nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); +H5_FCDLL int_f nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); /* * Functions from H5Af.c */ +#define nh5acreate_c H5_FC_FUNC_(h5acreate_c, H5ACREATE_C) +#define nh5aclose_c H5_FC_FUNC_(h5aclose_c, H5ACLOSE_C) +#define nh5aopen_name_c H5_FC_FUNC_(h5aopen_name_c, H5AOPEN_NAME_C) +#define nh5awrite_c H5_FC_FUNC_(h5awrite_c, H5AWRITE_C) +#define nh5awrite_integer_s_c H5_FC_FUNC_(h5awrite_integer_s_c, H5AWRITE_INTEGER_S_C) +#define nh5awrite_integer_1_c H5_FC_FUNC_(h5awrite_integer_1_c, H5AWRITE_INTEGER_1_C) +#define nh5awrite_integer_2_c H5_FC_FUNC_(h5awrite_integer_2_c, H5AWRITE_INTEGER_2_C) +#define nh5awrite_integer_3_c H5_FC_FUNC_(h5awrite_integer_3_c, H5AWRITE_INTEGER_3_C) +#define nh5awrite_integer_4_c H5_FC_FUNC_(h5awrite_integer_4_c, H5AWRITE_INTEGER_4_C) +#define nh5awrite_integer_5_c H5_FC_FUNC_(h5awrite_integer_5_c, H5AWRITE_INTEGER_5_C) +#define nh5awrite_integer_6_c H5_FC_FUNC_(h5awrite_integer_6_c, H5AWRITE_INTEGER_6_C) +#define nh5awrite_integer_7_c H5_FC_FUNC_(h5awrite_integer_7_c, H5AWRITE_INTEGER_7_C) +#define nh5awrite_real_s_c H5_FC_FUNC_(h5awrite_real_s_c, H5AWRITE_REAL_S_C) +#define nh5awrite_real_1_c H5_FC_FUNC_(h5awrite_real_1_c, H5AWRITE_REAL_1_C) +#define nh5awrite_real_2_c H5_FC_FUNC_(h5awrite_real_2_c, H5AWRITE_REAL_2_C) +#define nh5awrite_real_3_c H5_FC_FUNC_(h5awrite_real_3_c, H5AWRITE_REAL_3_C) +#define nh5awrite_real_4_c H5_FC_FUNC_(h5awrite_real_4_c, H5AWRITE_REAL_4_C) +#define nh5awrite_real_5_c H5_FC_FUNC_(h5awrite_real_5_c, H5AWRITE_REAL_5_C) +#define nh5awrite_real_6_c H5_FC_FUNC_(h5awrite_real_6_c, H5AWRITE_REAL_6_C) +#define nh5awrite_real_7_c H5_FC_FUNC_(h5awrite_real_7_c, H5AWRITE_REAL_7_C) +#define nh5awrite_double_s_c H5_FC_FUNC_(h5awrite_double_s_c, H5AWRITE_DOUBLE_S_C) +#define nh5awrite_double_1_c H5_FC_FUNC_(h5awrite_double_1_c, H5AWRITE_DOUBLE_1_C) +#define nh5awrite_double_2_c H5_FC_FUNC_(h5awrite_double_2_c, H5AWRITE_DOUBLE_2_C) +#define nh5awrite_double_3_c H5_FC_FUNC_(h5awrite_double_3_c, H5AWRITE_DOUBLE_3_C) +#define nh5awrite_double_4_c H5_FC_FUNC_(h5awrite_double_4_c, H5AWRITE_DOUBLE_4_C) +#define nh5awrite_double_5_c H5_FC_FUNC_(h5awrite_double_5_c, H5AWRITE_DOUBLE_5_C) +#define nh5awrite_double_6_c H5_FC_FUNC_(h5awrite_double_6_c, H5AWRITE_DOUBLE_6_C) +#define nh5awrite_double_7_c H5_FC_FUNC_(h5awrite_double_7_c, H5AWRITE_DOUBLE_7_C) +#define nh5awritec_c H5_FC_FUNC_(h5awritec_c, H5AWRITEC_C) +#define nh5awritec_s_c H5_FC_FUNC_(h5awritec_s_c, H5AWRITEC_S_C) +#define nh5awritec_1_c H5_FC_FUNC_(h5awritec_1_c, H5AWRITEC_1_C) +#define nh5awritec_2_c H5_FC_FUNC_(h5awritec_2_c, H5AWRITEC_2_C) +#define nh5awritec_3_c H5_FC_FUNC_(h5awritec_3_c, H5AWRITEC_3_C) +#define nh5awritec_4_c H5_FC_FUNC_(h5awritec_4_c, H5AWRITEC_4_C) +#define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C) +#define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C) +#define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C) +#define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C) +#define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C) +#define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C) +#define nh5aread_integer_2_c H5_FC_FUNC_(h5aread_integer_2_c, H5AREAD_INTEGER_2_C) +#define nh5aread_integer_3_c H5_FC_FUNC_(h5aread_integer_3_c, H5AREAD_INTEGER_3_C) +#define nh5aread_integer_4_c H5_FC_FUNC_(h5aread_integer_4_c, H5AREAD_INTEGER_4_C) +#define nh5aread_integer_5_c H5_FC_FUNC_(h5aread_integer_5_c, H5AREAD_INTEGER_5_C) +#define nh5aread_integer_6_c H5_FC_FUNC_(h5aread_integer_6_c, H5AREAD_INTEGER_6_C) +#define nh5aread_integer_7_c H5_FC_FUNC_(h5aread_integer_7_c, H5AREAD_INTEGER_7_C) +#define nh5aread_real_s_c H5_FC_FUNC_(h5aread_real_s_c, H5AREAD_REAL_S_C) +#define nh5aread_real_1_c H5_FC_FUNC_(h5aread_real_1_c, H5AREAD_REAL_1_C) +#define nh5aread_real_2_c H5_FC_FUNC_(h5aread_real_2_c, H5AREAD_REAL_2_C) +#define nh5aread_real_3_c H5_FC_FUNC_(h5aread_real_3_c, H5AREAD_REAL_3_C) +#define nh5aread_real_4_c H5_FC_FUNC_(h5aread_real_4_c, H5AREAD_REAL_4_C) +#define nh5aread_real_5_c H5_FC_FUNC_(h5aread_real_5_c, H5AREAD_REAL_5_C) +#define nh5aread_real_6_c H5_FC_FUNC_(h5aread_real_6_c, H5AREAD_REAL_6_C) +#define nh5aread_real_7_c H5_FC_FUNC_(h5aread_real_7_c, H5AREAD_REAL_7_C) +#define nh5aread_double_s_c H5_FC_FUNC_(h5aread_double_s_c, H5AREAD_DOUBLE_S_C) +#define nh5aread_double_1_c H5_FC_FUNC_(h5aread_double_1_c, H5AREAD_DOUBLE_1_C) +#define nh5aread_double_2_c H5_FC_FUNC_(h5aread_double_2_c, H5AREAD_DOUBLE_2_C) +#define nh5aread_double_3_c H5_FC_FUNC_(h5aread_double_3_c, H5AREAD_DOUBLE_3_C) +#define nh5aread_double_4_c H5_FC_FUNC_(h5aread_double_4_c, H5AREAD_DOUBLE_4_C) +#define nh5aread_double_5_c H5_FC_FUNC_(h5aread_double_5_c, H5AREAD_DOUBLE_5_C) +#define nh5aread_double_6_c H5_FC_FUNC_(h5aread_double_6_c, H5AREAD_DOUBLE_6_C) +#define nh5aread_double_7_c H5_FC_FUNC_(h5aread_double_7_c, H5AREAD_DOUBLE_7_C) +#define nh5areadc_c H5_FC_FUNC_(h5areadc_c, H5AREADC_C) +#define nh5areadc_s_c H5_FC_FUNC_(h5areadc_s_c, H5AREADC_S_C) +#define nh5areadc_1_c H5_FC_FUNC_(h5areadc_1_c, H5AREADC_1_C) +#define nh5areadc_2_c H5_FC_FUNC_(h5areadc_2_c, H5AREADC_2_C) +#define nh5areadc_3_c H5_FC_FUNC_(h5areadc_3_c, H5AREADC_3_C) +#define nh5areadc_4_c H5_FC_FUNC_(h5areadc_4_c, H5AREADC_4_C) +#define nh5areadc_5_c H5_FC_FUNC_(h5areadc_5_c, H5AREADC_5_C) +#define nh5areadc_6_c H5_FC_FUNC_(h5areadc_6_c, H5AREADC_6_C) +#define nh5areadc_7_c H5_FC_FUNC_(h5areadc_7_c, H5AREADC_7_C) +#define nh5aget_name_c H5_FC_FUNC_(h5aget_name_c, H5AGET_NAME_C) +#define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C) +#define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C) +#define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C) +#define nh5aget_num_attrs_c H5_FC_FUNC_(h5aget_num_attrs_c, H5AGET_NUM_ATTRS_C) +#define nh5adelete_c H5_FC_FUNC_(h5adelete_c, H5ADELETE_C) +#define nh5aget_storage_size_c H5_FC_FUNC_(h5aget_storage_size_c, H5AGET_STORAGE_SIZE_C) +#define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C) +#define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C) +#define nh5adelete_by_name_c H5_FC_FUNC_(h5adelete_by_name_c,H5ADELETE_BY_NAME_C) +#define nh5adelete_by_idx_c H5_FC_FUNC_(h5adelete_by_idx_c,H5ADELETE_BY_IDX_C) +#define nh5aget_name_by_idx_c H5_FC_FUNC_(h5aget_name_by_idx_c,H5AGET_NAME_BY_IDX_C) +#define nh5aget_create_plist_c H5_FC_FUNC_(h5aget_create_plist_c,H5AGET_CREATE_PLIST_C) +#define nh5aopen_by_idx_c H5_FC_FUNC_(h5aopen_by_idx_c,H5AOPEN_BY_IDX_C) +#define nh5aget_info_c H5_FC_FUNC_(h5aget_info_c,H5AGET_INFO_C) +#define nh5aget_info_by_idx_c H5_FC_FUNC_(h5aget_info_by_idx_c,H5AGET_INFO_BY_IDX_C) +#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) +#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) +#define nh5acreate_by_name_c H5_FC_FUNC_(h5acreate_by_name_c,H5ACREATE_BY_NAME_C) +#define nh5aexists_c H5_FC_FUNC_(h5aexists_c,H5AEXISTS_C) +#define nh5aexists_by_name_c H5_FC_FUNC_(h5aexists_by_name_c,H5AEXISTS_BY_NAME_C) +#define nh5aopen_by_name_c H5_FC_FUNC_(h5aopen_by_name_c,H5AOPEN_BY_NAME_C) +#define nh5arename_c H5_FC_FUNC_(h5arename_c,H5ARENAME_C) -H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num); -H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); -H5_FCDLL int_f h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); +H5_FCDLL int_f nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); +H5_FCDLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); +H5_FCDLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); +H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f nh5aclose_c ( hid_t_f *attr_id ); +H5_FCDLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); +H5_FCDLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); +H5_FCDLL int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); +H5_FCDLL int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); +H5_FCDLL int_f nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); +H5_FCDLL int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); +H5_FCDLL int_f nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); +H5_FCDLL int_f nh5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f h5aopen_c( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f nh5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id); -H5_FCDLL int_f h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id); -H5_FCDLL int_f h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id); -H5_FCDLL int_f h5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id ); +H5_FCDLL int_f nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +H5_FCDLL int_f nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ); -H5_FCDLL int_f h5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); -H5_FCDLL int_f h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); +H5_FCDLL int_f nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists); -H5_FCDLL int_f h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f h5arename_c( hid_t_f *loc_id, +H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen); /* * Functions form H5Tf.c file */ +#define nh5topen_c H5_FC_FUNC_(h5topen_c, H5TOPEN_C) +#define nh5tcommit_c H5_FC_FUNC_(h5tcommit_c, H5TCOMMIT_C) +#define nh5tcommitted_c H5_FC_FUNC_(h5tcommitted_c, H5TCOMMITTED_C) +#define nh5tclose_c H5_FC_FUNC_(h5tclose_c, H5TCLOSE_C) +#define nh5tcopy_c H5_FC_FUNC_(h5tcopy_c, H5TCOPY_C) +#define nh5tequal_c H5_FC_FUNC_(h5tequal_c, H5TEQUAL_C) +#define nh5tget_class_c H5_FC_FUNC_(h5tget_class_c, H5TGET_CLASS_C) +#define nh5tget_order_c H5_FC_FUNC_(h5tget_order_c, H5TGET_ORDER_C) +#define nh5tset_order_c H5_FC_FUNC_(h5tset_order_c, H5TSET_ORDER_C) +#define nh5tget_size_c H5_FC_FUNC_(h5tget_size_c, H5TGET_SIZE_C) +#define nh5tset_size_c H5_FC_FUNC_(h5tset_size_c, H5TSET_SIZE_C) +#define nh5tget_precision_c H5_FC_FUNC_(h5tget_precision_c, H5TGET_PRECISION_C) +#define nh5tset_precision_c H5_FC_FUNC_(h5tset_precision_c, H5TSET_PRECISION_C) +#define nh5tget_offset_c H5_FC_FUNC_(h5tget_offset_c, H5TGET_OFFSET_C) +#define nh5tset_offset_c H5_FC_FUNC_(h5tset_offset_c, H5TSET_OFFSET_C) +#define nh5tget_pad_c H5_FC_FUNC_(h5tget_pad_c, H5TGET_PAD_C) +#define nh5tset_pad_c H5_FC_FUNC_(h5tset_pad_c, H5TSET_PAD_C) +#define nh5tget_sign_c H5_FC_FUNC_(h5tget_sign_c, H5TGET_SIGN_C) +#define nh5tset_sign_c H5_FC_FUNC_(h5tset_sign_c, H5TSET_SIGN_C) +#define nh5tget_fields_c H5_FC_FUNC_(h5tget_fields_c, H5TGET_FIELDS_C) +#define nh5tset_fields_c H5_FC_FUNC_(h5tset_fields_c, H5TSET_FIELDS_C) +#define nh5tget_ebias_c H5_FC_FUNC_(h5tget_ebias_c, H5TGET_EBIAS_C) +#define nh5tset_ebias_c H5_FC_FUNC_(h5tset_ebias_c, H5TSET_EBIAS_C) +#define nh5tget_norm_c H5_FC_FUNC_(h5tget_norm_c, H5TGET_NORM_C) +#define nh5tset_norm_c H5_FC_FUNC_(h5tset_norm_c, H5TSET_NORM_C) +#define nh5tget_inpad_c H5_FC_FUNC_(h5tget_inpad_c, H5TGET_INPAD_C) +#define nh5tset_inpad_c H5_FC_FUNC_(h5tset_inpad_c, H5TSET_INPAD_C) +#define nh5tget_cset_c H5_FC_FUNC_(h5tget_cset_c, H5TGET_CSET_C) +#define nh5tset_cset_c H5_FC_FUNC_(h5tset_cset_c, H5TSET_CSET_C) +#define nh5tget_strpad_c H5_FC_FUNC_(h5tget_strpad_c, H5TGET_STRPAD_C) +#define nh5tset_strpad_c H5_FC_FUNC_(h5tset_strpad_c, H5TSET_STRPAD_C) +#define nh5tget_nmembers_c H5_FC_FUNC_(h5tget_nmembers_c, H5TGET_NMEMBERS_C) +#define nh5tget_member_name_c H5_FC_FUNC_(h5tget_member_name_c, H5TGET_MEMBER_NAME_C) +#define nh5tget_member_offset_c H5_FC_FUNC_(h5tget_member_offset_c, H5TGET_MEMBER_OFFSET_C) +#define nh5tget_member_dims_c H5_FC_FUNC_(h5tget_member_dims_c, H5TGET_MEMBER_DIMS_C) +#define nh5tget_member_type_c H5_FC_FUNC_(h5tget_member_type_c, H5TGET_MEMBER_TYPE_C) +#define nh5tget_member_index_c H5_FC_FUNC_(h5tget_member_index_c, H5TGET_MEMBER_INDEX_C) +#define nh5tinsert_c H5_FC_FUNC_(h5tinsert_c, H5TINSERT_C) +#define nh5tcreate_c H5_FC_FUNC_(h5tcreate_c, H5TCREATE_C) +#define nh5tpack_c H5_FC_FUNC_(h5tpack_c, H5TPACK_C) +#define nh5tinsert_array_c H5_FC_FUNC_(h5tinsert_array_c, H5TINSERT_ARRAY_C) +#define nh5tinsert_array_c2 H5_FC_FUNC_(h5tinsert_array_c2, H5TINSERT_ARRAY_C2) +#define nh5tenum_create_c H5_FC_FUNC_(h5tenum_create_c, H5TENUM_CREATE_C) +#define nh5tenum_insert_c H5_FC_FUNC_(h5tenum_insert_c, H5TENUM_INSERT_C) +#define nh5tenum_nameof_c H5_FC_FUNC_(h5tenum_nameof_c, H5TENUM_NAMEOF_C) +#define nh5tenum_valueof_c H5_FC_FUNC_(h5tenum_valueof_c, H5TENUM_VALUEOF_C) +#define nh5tget_member_value_c H5_FC_FUNC_(h5tget_member_value_c, H5TGET_MEMBER_VALUE_C) +#define nh5tset_tag_c H5_FC_FUNC_(h5tset_tag_c, H5TSET_TAG_C) +#define nh5tget_tag_c H5_FC_FUNC_(h5tget_tag_c, H5TGET_TAG_C) +#define nh5tarray_create_c H5_FC_FUNC_(h5tarray_create_c, H5TARRAY_CREATE_C) +#define nh5tget_array_ndims_c H5_FC_FUNC_(h5tget_array_ndims_c, H5TGET_ARRAY_NDIMS_C) +#define nh5tget_array_dims_c H5_FC_FUNC_(h5tget_array_dims_c, H5TGET_ARRAY_DIMS_C) +#define nh5tget_super_c H5_FC_FUNC_(h5tget_super_c, H5TGET_SUPER_C) +#define nh5tvlen_create_c H5_FC_FUNC_(h5tvlen_create_c, H5TVLEN_CREATE_C) +#define nh5tis_variable_str_c H5_FC_FUNC_(h5tis_variable_str_c, H5TIS_VARIABLE_STR_C) +#define nh5tget_member_class_c H5_FC_FUNC_(h5tget_member_class_c, H5TGET_MEMBER_CLASS_C) +#define nh5tcommit_anon_c H5_FC_FUNC_(h5tcommit_anon_c, H5TCOMMIT_ANON_C) +#define nh5tdecode_c H5_FC_FUNC_(h5tdecode_c, H5TDECODE_C) +#define nh5tencode_c H5_FC_FUNC_(h5tencode_c, H5TENCODE_C) +#define nh5tget_create_plist_c H5_FC_FUNC_(h5tget_create_plist_c, H5TGET_CREATE_PLIST_C) +#define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C) +#define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C ) -H5_FCDLL int_f h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); -H5_FCDLL int_f h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); -H5_FCDLL int_f h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f h5tclose_c( hid_t_f *type_id ); -H5_FCDLL int_f h5tequal_c( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); -H5_FCDLL int_f h5tcopy_c( hid_t_f *type_id , hid_t_f *new_type_id); -H5_FCDLL int_f h5tget_class_c( hid_t_f *type_id , int_f *classtype); -H5_FCDLL int_f h5tget_order_c( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f h5tset_order_c( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f h5tget_size_c( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f h5tset_size_c( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f h5tcommitted_c(hid_t_f *dtype_id); -H5_FCDLL int_f h5tget_precision_c( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f h5tset_precision_c( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f h5tget_offset_c( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f h5tset_offset_c( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f h5tget_pad_c( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); -H5_FCDLL int_f h5tset_pad_c( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); -H5_FCDLL int_f h5tget_sign_c( hid_t_f *type_id , int_f* sign); -H5_FCDLL int_f h5tset_sign_c( hid_t_f *type_id , int_f *sign); -H5_FCDLL int_f h5tget_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f h5tset_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f h5tget_ebias_c( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f h5tset_ebias_c( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f h5tget_norm_c( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f h5tset_norm_c( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f h5tget_inpad_c( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f h5tset_inpad_c( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f h5tget_cset_c( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f h5tset_cset_c( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f h5tget_strpad_c( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f h5tset_strpad_c( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f h5tget_nmembers_c( hid_t_f *type_id , int_f * num_members); -H5_FCDLL int_f h5tget_member_name_c( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); -H5_FCDLL int_f h5tget_member_dims_c( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); -H5_FCDLL int_f h5tget_member_offset_c( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); -H5_FCDLL int_f h5tget_member_type_c( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); -H5_FCDLL int_f h5tget_member_index_c( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); -H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); -H5_FCDLL int_f h5tpack_c(hid_t_f * type_id); -H5_FCDLL int_f h5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); -H5_FCDLL int_f h5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); -H5_FCDLL int_f h5tenum_create_c( hid_t_f *parent_id , hid_t_f *new_type_id); -H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); +H5_FCDLL int_f nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); +H5_FCDLL int_f nh5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f nh5tclose_c ( hid_t_f *type_id ); +H5_FCDLL int_f nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); +H5_FCDLL int_f nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id); +H5_FCDLL int_f nh5tget_class_c ( hid_t_f *type_id , int_f *classtype); +H5_FCDLL int_f nh5tget_order_c ( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f nh5tset_order_c ( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f nh5tget_size_c ( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f nh5tset_size_c ( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f nh5tcommitted_c (hid_t_f *dtype_id); +H5_FCDLL int_f nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); +H5_FCDLL int_f nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); +H5_FCDLL int_f nh5tget_sign_c ( hid_t_f *type_id , int_f* sign); +H5_FCDLL int_f nh5tset_sign_c ( hid_t_f *type_id , int_f *sign); +H5_FCDLL int_f nh5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f nh5tget_norm_c ( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f nh5tset_norm_c ( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f nh5tget_inpad_c ( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f nh5tget_cset_c ( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f nh5tset_cset_c ( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f nh5tget_strpad_c ( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members); +H5_FCDLL int_f nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); +H5_FCDLL int_f nh5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); +H5_FCDLL int_f nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); +H5_FCDLL int_f nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); +H5_FCDLL int_f nh5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); +H5_FCDLL int_f nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); +H5_FCDLL int_f nh5tpack_c(hid_t_f * type_id); +H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); +H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); +H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); +H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); -H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); -H5_FCDLL int_f h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); -H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); -H5_FCDLL int_f h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); -H5_FCDLL int_f h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); -H5_FCDLL int_f h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); -H5_FCDLL int_f h5tget_array_dims_c( hid_t_f *type_id , hsize_t_f * dims); -H5_FCDLL int_f h5tget_array_ndims_c( hid_t_f *type_id , int_f * ndims); -H5_FCDLL int_f h5tget_super_c( hid_t_f *type_id , hid_t_f *base_type_id); -H5_FCDLL int_f h5tvlen_create_c( hid_t_f *type_id , hid_t_f *vltype_id); -H5_FCDLL int_f h5tis_variable_str_c( hid_t_f *type_id , int_f *flag ); -H5_FCDLL int_f h5tget_member_class_c( hid_t_f *type_id , int_f *member_no, int_f *cls ); -H5_FCDLL int_f h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f h5tdecode_c( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f h5tget_create_plist_c( hid_t_f *dtype_id, hid_t_f *dtpl_id); -H5_FCDLL int_f h5tcompiler_conv_c( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); -H5_FCDLL int_f h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); +H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); +H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); +H5_FCDLL int_f nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); +H5_FCDLL int_f nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); +H5_FCDLL int_f nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); +H5_FCDLL int_f nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims); +H5_FCDLL int_f nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims); +H5_FCDLL int_f nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); +H5_FCDLL int_f nh5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id); +H5_FCDLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); +H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ); +H5_FCDLL int_f nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id); +H5_FCDLL int_f nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); +H5_FCDLL int_f nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id); + /* * Functions from H5Of.c */ -H5_FCDLL int_f h5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); -H5_FCDLL int_f h5oclose_c(hid_t_f *object_id ); -H5_FCDLL int_f h5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); -H5_FCDLL int_f h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +#define nh5olink_c H5_FC_FUNC_(h5olink_c, H5OLINK_C) +#define nh5oopen_c H5_FC_FUNC_(h5oopen_c, H5OOPEN_C) +#define nh5oclose_c H5_FC_FUNC_(h5oclose_c, H5OCLOSE_C) +#define nh5oopen_by_addr_c H5_FC_FUNC_(h5oopen_by_addr_c, H5OOPEN_BY_ADDR_C) +#define nh5ocopy_c H5_FC_FUNC_(h5ocopy_c, H5OCOPY_C) +#define nh5odecr_refcount_c H5_FC_FUNC_(h5odecr_refcount_c, H5ODECR_REFCOUNT_C) +#define nh5oincr_refcount_c H5_FC_FUNC_(h5oincr_refcount_c, H5OINCR_REFCOUNT_C) +#define nh5oexists_by_name_c H5_FC_FUNC_(h5oexists_by_name_c, H5OEXISTS_BY_NAME_C) +#define nh5oset_comment_c H5_FC_FUNC_(h5oset_comment_c, H5OSET_COMMENT_C) +#define nh5oset_comment_by_name_c H5_FC_FUNC_(h5oset_comment_by_name_c, H5OSET_COMMENT_BY_NAME_C) +#define nh5oopen_by_idx_c H5_FC_FUNC_(h5oopen_by_idx_c, H5OOPEN_BY_IDX_C) +#define nh5oget_comment_c H5_FC_FUNC_(h5oget_comment_c, H5OGET_COMMENT_C) +#define nh5oget_comment_by_name_c H5_FC_FUNC_(h5oget_comment_by_name_c, H5OGET_COMMENT_BY_NAME_C) + +H5_FCDLL int_f nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); +H5_FCDLL int_f nh5oclose_c (hid_t_f *object_id ); +H5_FCDLL int_f nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); +H5_FCDLL int_f nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); +H5_FCDLL int_f h5ovisit_c (hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data, hid_t_f *lapl_id ); -H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, +H5_FCDLL int_f h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info); +H5_FCDLL int_f h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, +H5_FCDLL int_f h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +H5_FCDLL int_f nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ); -H5_FCDLL int_f h5odecr_refcount_c(hid_t_f *object_id); -H5_FCDLL int_f h5oincr_refcount_c(hid_t_f *object_id); -H5_FCDLL int_f h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); -H5_FCDLL int_f h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen); -H5_FCDLL int_f h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); -H5_FCDLL int_f h5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f nh5odecr_refcount_c (hid_t_f *object_id); +H5_FCDLL int_f nh5oincr_refcount_c (hid_t_f *object_id); +H5_FCDLL int_f nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); +H5_FCDLL int_f nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen); +H5_FCDLL int_f nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); +H5_FCDLL int_f nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); -H5_FCDLL int_f h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, +H5_FCDLL int_f nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); +H5_FCDLL int_f nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id); /* * Functions from H5Pf.c */ -H5_FCDLL int_f h5pcreate_c( hid_t_f *cls, hid_t_f *prp_id ); -H5_FCDLL int_f h5pclose_c( hid_t_f *prp_id ); -H5_FCDLL int_f h5pcopy_c( hid_t_f *prp_id , hid_t_f *new_prp_id); -H5_FCDLL int_f h5pequal_c( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); -H5_FCDLL int_f h5pget_class_c( hid_t_f *prp_id , hid_t_f *classtype); -H5_FCDLL int_f h5pset_deflate_c( hid_t_f *prp_id , int_f *level); -H5_FCDLL int_f h5pset_chunk_c( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); -H5_FCDLL int_f h5pget_chunk_c( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); -H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pset_preserve_c( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_preserve_c( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); -H5_FCDLL int_f h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f h5pget_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f h5pset_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f h5pset_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f h5pget_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f*driver); -H5_FCDLL int_f h5pset_fapl_stdio_c(hid_t_f *prp_id); -#ifdef NO_SUCH_F90_FUNCTION -H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f* io); -#endif -H5_FCDLL int_f h5pset_fapl_sec2_c(hid_t_f *prp_id); -#ifdef NO_SUCH_F90_FUNCTION -H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f* sec2); -#endif -H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -#ifdef NO_SUCH_F90_FUNCTION -H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); -#endif -H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); -H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f h5pset_layout_c(hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f h5pget_layout_c(hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f h5pset_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f h5premove_filter_c(hid_t_f *prp_id, int_f* filter); -H5_FCDLL int_f h5pmodify_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f h5pget_nfilters_c(hid_t_f *prp_id, int_f* nfilters); -H5_FCDLL int_f h5pget_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 h5pget_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 h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes); -H5_FCDLL int_f h5pget_external_count_c(hid_t_f *prp_id, int_f* count); -H5_FCDLL int_f h5pget_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 h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); -H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); -H5_FCDLL int_f h5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f h5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f h5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pset_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f h5pget_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f h5pset_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f h5pget_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f h5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f h5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f h5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f h5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f h5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +#define nh5pcreate_c H5_FC_FUNC_(h5pcreate_c, H5PCREATE_C) +#define nh5pclose_c H5_FC_FUNC_(h5pclose_c, H5PCLOSE_C) +#define nh5pcopy_c H5_FC_FUNC_(h5pcopy_c, H5PCOPY_C) +#define nh5pcreate_class_f90_c H5_FC_FUNC_(h5pcreate_class_f90_c, H5PCREATE_CLASS_F90_C) +#define nh5pequal_c H5_FC_FUNC_(h5pequal_c, H5PEQUAL_C) +#define nh5pget_class_c H5_FC_FUNC_(h5pget_class_c, H5PGET_CLASS_C) +#define nh5pset_deflate_c H5_FC_FUNC_(h5pset_deflate_c, H5PSET_DEFLATE_C) +#define nh5pset_preserve_c H5_FC_FUNC_(h5pset_preserve_c, H5PSET_PRESERVE_C) +#define nh5pget_preserve_c H5_FC_FUNC_(h5pget_preserve_c, H5PGET_PRESERVE_C) +#define nh5pset_chunk_c H5_FC_FUNC_(h5pset_chunk_c, H5PSET_CHUNK_C) +#define nh5pget_chunk_c H5_FC_FUNC_(h5pget_chunk_c, H5PGET_CHUNK_C) +#define nh5pset_fill_valuec_c H5_FC_FUNC_(h5pset_fill_valuec_c, H5PSET_FILL_VALUEC_C) +#define nh5pset_fill_value_integer_c H5_FC_FUNC_(h5pset_fill_value_integer_c, H5PSET_FILL_VALUE_INTEGER_C) +#define nh5pset_fill_value_real_c H5_FC_FUNC_(h5pset_fill_value_real_c, H5PSET_FILL_VALUE_REAL_C) +#define nh5pset_fill_value_double_c H5_FC_FUNC_(h5pset_fill_value_double_c, H5PSET_FILL_VALUE_DOUBLE_C) +#define nh5pget_fill_valuec_c H5_FC_FUNC_(h5pget_fill_valuec_c, H5PGET_FILL_VALUEC_C) +#define nh5pget_fill_value_integer_c H5_FC_FUNC_(h5pget_fill_value_integer_c, H5PGET_FILL_VALUE_INTEGER_C) +#define nh5pget_fill_value_real_c H5_FC_FUNC_(h5pget_fill_value_real_c, H5PGET_FILL_VALUE_REAL_C) +#define nh5pget_fill_value_double_c H5_FC_FUNC_(h5pget_fill_value_double_c, H5PGET_FILL_VALUE_DOUBLE_C) +#define nh5pget_version_c H5_FC_FUNC_(h5pget_version_c, H5PGET_VERSION_C) +#define nh5pget_userblock_c H5_FC_FUNC_(h5pget_userblock_c, H5PGET_USERBLOCK_C) +#define nh5pset_userblock_c H5_FC_FUNC_(h5pset_userblock_c, H5PSET_USERBLOCK_C) +#define nh5pset_sizes_c H5_FC_FUNC_(h5pset_sizes_c, H5PSET_SIZES_C) +#define nh5pget_sizes_c H5_FC_FUNC_(h5pget_sizes_c, H5PGET_SIZES_C) +#define nh5pget_sym_k_c H5_FC_FUNC_(h5pget_sym_k_c, H5PGET_SYM_K_C) +#define nh5pset_sym_k_c H5_FC_FUNC_(h5pset_sym_k_c, H5PSET_SYM_K_C) +#define nh5pget_istore_k_c H5_FC_FUNC_(h5pget_istore_k_c, H5PGET_ISTORE_K_C) +#define nh5pset_istore_k_c H5_FC_FUNC_(h5pset_istore_k_c, H5PSET_ISTORE_K_C) +#define nh5pget_driver_c H5_FC_FUNC_(h5pget_driver_c, H5PGET_DRIVER_C) +#define nh5pset_fapl_stdio_c H5_FC_FUNC_(h5pset_fapl_stdio_c, H5PSET_FAPL_STDIO_C) +#define nh5pget_fapl_stdio_c H5_FC_FUNC_(h5pget_fapl_stdio_c, H5PGET_FAPL_STDIO_C) +#define nh5pset_fapl_sec2_c H5_FC_FUNC_(h5pset_fapl_sec2_c, H5PSET_FAPL_SEC2_C) +#define nh5pget_fapl_sec2_c H5_FC_FUNC_(h5pget_fapl_sec2_c, H5PGET_FAPL_SEC2_C) +#define nh5pset_alignment_c H5_FC_FUNC_(h5pset_alignment_c, H5PSET_ALIGNMENT_C) +#define nh5pget_alignment_c H5_FC_FUNC_(h5pget_alignment_c, H5PGET_ALIGNMENT_C) +#define nh5pset_fapl_core_c H5_FC_FUNC_(h5pset_fapl_core_c, H5PSET_FAPL_CORE_C) +#define nh5pget_fapl_core_c H5_FC_FUNC_(h5pget_fapl_core_c, H5PGET_FAPL_CORE_C) +#define nh5pset_fapl_family_c H5_FC_FUNC_(h5pset_fapl_family_c, H5PSET_FAPL_FAMILY_C) +#define nh5pget_fapl_family_c H5_FC_FUNC_(h5pget_fapl_family_c, H5PGET_FAPL_FAMILY_C) +#define nh5pset_cache_c H5_FC_FUNC_(h5pset_cache_c, H5PSET_CACHE_C) +#define nh5pget_cache_c H5_FC_FUNC_(h5pget_cache_c, H5PGET_CACHE_C) +#define nh5pset_fapl_split_c H5_FC_FUNC_(h5pset_fapl_split_c, H5PSET_FAPL_SPLIT_C) +#define nh5pget_fapl_split_c H5_FC_FUNC_(h5pget_fapl_split_c, H5PGET_FAPL_SPLIT_C) +#define nh5pset_gc_references_c H5_FC_FUNC_(h5pset_gc_references_c, H5PSET_GC_REFERENCES_C) +#define nh5pget_gc_references_c H5_FC_FUNC_(h5pget_gc_references_c, H5PGET_GC_REFERENCES_C) +#define nh5pset_layout_c H5_FC_FUNC_(h5pset_layout_c, H5PSET_LAYOUT_C) +#define nh5pget_layout_c H5_FC_FUNC_(h5pget_layout_c, H5PGET_LAYOUT_C) +#define nh5pset_filter_c H5_FC_FUNC_(h5pset_filter_c, H5PSET_FILTER_C) +#define nh5premove_filter_c H5_FC_FUNC_(h5premove_filter_c, H5PREMOVE_FILTER_C) +#define nh5pmodify_filter_c H5_FC_FUNC_(h5pmodify_filter_c, H5PMODIFY_FILTER_C) +#define nh5pget_nfilters_c H5_FC_FUNC_(h5pget_nfilters_c, H5PGET_NFILTERS_C) +#define nh5pget_filter_c H5_FC_FUNC_(h5pget_filter_c, H5PGET_FILTER_C) +#define nh5pget_filter_by_id_c H5_FC_FUNC_(h5pget_filter_by_id_c, H5PGET_FILTER_BY_ID_C) +#define nh5pset_external_c H5_FC_FUNC_(h5pset_external_c, H5PSET_EXTERNAL_C) +#define nh5pget_external_count_c H5_FC_FUNC_(h5pget_external_count_c, H5PGET_EXTERNAL_COUNT_C) +#define nh5pget_external_c H5_FC_FUNC_(h5pget_external_c, H5PGET_EXTERNAL_C) +#define nh5pget_btree_ratios_c H5_FC_FUNC_(h5pget_btree_ratios_c, H5PGET_BTREE_RATIOS_C) +#define nh5pset_btree_ratios_c H5_FC_FUNC_(h5pset_btree_ratios_c, H5PSET_BTREE_RATIOS_C) +#define nh5pset_fapl_mpio_c H5_FC_FUNC_(h5pset_fapl_mpio_c, H5PSET_FAPL_MPIO_C) +#define nh5pget_fapl_mpio_c H5_FC_FUNC_(h5pget_fapl_mpio_c, H5PGET_FAPL_MPIO_C) +#define nh5pset_dxpl_mpio_c H5_FC_FUNC_(h5pset_dxpl_mpio_c, H5PSET_DXPL_MPIO_C) +#define nh5pget_dxpl_mpio_c H5_FC_FUNC_(h5pget_dxpl_mpio_c, H5PGET_DXPL_MPIO_C) +#define nh5pget_fclose_degree_c H5_FC_FUNC_(h5pget_fclose_degree_c, H5PGET_FCLOSE_DEGREE_C) +#define nh5pset_fclose_degree_c H5_FC_FUNC_(h5pset_fclose_degree_c, H5PSET_FCLOSE_DEGREE_C) +#define nh5pset_buffer_c H5_FC_FUNC_(h5pset_buffer_c, H5PSET_BUFFER_C) +#define nh5pget_buffer_c H5_FC_FUNC_(h5pget_buffer_c, H5PGET_BUFFER_C) +#define nh5pfill_value_defined_c H5_FC_FUNC_(h5pfill_value_defined_c, H5PFILL_VALUE_DEFINED_C) +#define nh5pset_alloc_time_c H5_FC_FUNC_(h5pset_alloc_time_c, H5PSET_ALLOC_TIME_C) +#define nh5pget_alloc_time_c H5_FC_FUNC_(h5pget_alloc_time_c, H5PGET_ALLOC_TIME_C) +#define nh5pset_fill_time_c H5_FC_FUNC_(h5pset_fill_time_c, H5PSET_FILL_TIME_C) +#define nh5pget_fill_time_c H5_FC_FUNC_(h5pget_fill_time_c, H5PGET_FILL_TIME_C) +#define nh5pset_meta_block_size_c H5_FC_FUNC_(h5pset_meta_block_size_c, H5PSET_META_BLOCK_SIZE_C) +#define nh5pget_meta_block_size_c H5_FC_FUNC_(h5pget_meta_block_size_c, H5PGET_META_BLOCK_SIZE_C) +#define nh5pset_sieve_buf_size_c H5_FC_FUNC_(h5pset_sieve_buf_size_c, H5PSET_SIEVE_BUF_SIZE_C) +#define nh5pget_sieve_buf_size_c H5_FC_FUNC_(h5pget_sieve_buf_size_c, H5PGET_SIEVE_BUF_SIZE_C) +#define nh5pset_hyper_vector_size_c H5_FC_FUNC_(h5pset_hyper_vector_size_c, H5PSET_HYPER_VECTOR_SIZE_C) +#define nh5pget_hyper_vector_size_c H5_FC_FUNC_(h5pget_hyper_vector_size_c, H5PGET_HYPER_VECTOR_SIZE_C) +#define nh5pset_small_data_block_size_c H5_FC_FUNC_(h5pset_small_data_block_size_c, H5PSET_SMALL_DATA_BLOCK_SIZE_C) +#define nh5pget_small_data_block_size_c H5_FC_FUNC_(h5pget_small_data_block_size_c, H5PGET_SMALL_DATA_BLOCK_SIZE_C) +#define nh5pregister_integer_c H5_FC_FUNC_(h5pregister_integer_c, H5PREGISTER_INTEGER_C) +#define nh5pregister_real_c H5_FC_FUNC_(h5pregister_real_c, H5PREGISTER_REAL_C) +#define nh5pregister_double_c H5_FC_FUNC_(h5pregister_double_c, H5PREGISTER_DOUBLE_C) +#define nh5pregisterc_c H5_FC_FUNC_(h5pregisterc_c, H5PREGISTERC_C) +#define nh5pinsert_integer_c H5_FC_FUNC_(h5pinsert_integer_c, H5PINSERT_INTEGER_C) +#define nh5pinsert_real_c H5_FC_FUNC_(h5pinsert_real_c, H5PINSERT_REAL_C) +#define nh5pinsert_double_c H5_FC_FUNC_(h5pinsert_double_c, H5PINSERT_DOUBLE_C) +#define nh5pinsertc_c H5_FC_FUNC_(h5pinsertc_c, H5PINSERTC_C) +#define nh5pset_integer_c H5_FC_FUNC_(h5pset_integer_c, H5PSET_INTEGER_C) +#define nh5pset_real_c H5_FC_FUNC_(h5pset_real_c, H5PSET_REAL_C) +#define nh5pset_double_c H5_FC_FUNC_(h5pset_double_c, H5PSET_DOUBLE_C) +#define nh5psetc_c H5_FC_FUNC_(h5psetc_c, H5PSETC_C) +#define nh5pget_integer_c H5_FC_FUNC_(h5pget_integer_c, H5PGET_INTEGER_C) +#define nh5pget_real_c H5_FC_FUNC_(h5pget_real_c, H5PGET_REAL_C) +#define nh5pget_double_c H5_FC_FUNC_(h5pget_double_c, H5PGET_DOUBLE_C) +#define nh5pgetc_c H5_FC_FUNC_(h5pgetc_c, H5PGETC_C) +#define nh5pexist_c H5_FC_FUNC_(h5pexist_c, H5PEXIST_C) +#define nh5pget_size_c H5_FC_FUNC_(h5pget_size_c, H5PGET_SIZE_C) +#define nh5pget_nprops_c H5_FC_FUNC_(h5pget_nprops_c, H5PGET_NPROPS_C) +#define nh5pget_class_parent_c H5_FC_FUNC_(h5pget_class_parent_c, H5PGET_CLASS_PARENT_C) +#define nh5pisa_class_c H5_FC_FUNC_(h5pisa_class_c, H5PISA_CLASS_C) +#define nh5pcopy_prop_c H5_FC_FUNC_(h5pcopy_prop_c, H5PCOPY_PROP_C) +#define nh5premove_c H5_FC_FUNC_(h5premove_c, H5PREMOVE_C) +#define nh5punregister_c H5_FC_FUNC_(h5punregister_c, H5PUNREGISTER_C) +#define nh5pclose_class_c H5_FC_FUNC_(h5pclose_class_c, H5PCLOSE_CLASS_C) +#define nh5pget_class_name_c H5_FC_FUNC_(h5pget_class_name_c, H5PGET_CLASS_NAME_C) +#define nh5pset_shuffle_c H5_FC_FUNC_(h5pset_shuffle_c, H5PSET_SHUFFLE_C) +#define nh5pset_fletcher32_c H5_FC_FUNC_(h5pset_fletcher32_c, H5PSET_FLETCHER32_C) +#define nh5pset_edc_check_c H5_FC_FUNC_(h5pset_edc_check_c, H5PSET_EDC_CHECK_C) +#define nh5pget_edc_check_c H5_FC_FUNC_(h5pget_edc_check_c, H5PGET_EDC_CHECK_C) +#define nh5pset_family_offset_c H5_FC_FUNC_(h5pset_family_offset_c, H5PSET_FAMILY_OFFSET_C) +#define nh5pget_fapl_multi_c H5_FC_FUNC_(h5pget_fapl_multi_c, H5PGET_FAPL_MULTI_C) +#define nh5pset_fapl_multi_c H5_FC_FUNC_(h5pset_fapl_multi_c, H5PSET_FAPL_MULTI_C) +#define nh5pset_fapl_multi_sc H5_FC_FUNC_(h5pset_fapl_multi_sc, H5PSET_FAPL_MULTI_SC) +#define nh5pset_szip_c H5_FC_FUNC_(h5pset_szip_c, H5PSET_SZIP_C) +#define nh5pall_filters_avail_c H5_FC_FUNC_(h5pall_filters_avail_c, H5PALL_FILTERS_AVAIL_C) +#define nh5pget_attr_phase_change_c H5_FC_FUNC_(h5pget_attr_phase_change_c, H5PGET_ATTR_PHASE_CHANGE_C) +#define nh5pset_attr_creation_order_c H5_FC_FUNC_(h5pset_attr_creation_order_c, H5PSET_ATTR_CREATION_ORDER_C) +#define nh5pset_shared_mesg_nindexes_c H5_FC_FUNC_(h5pset_shared_mesg_nindexes_c, H5PSET_SHARED_MESG_NINDEXES_C) +#define nh5pset_shared_mesg_index_c H5_FC_FUNC_(h5pset_shared_mesg_index_c,H5PSET_SHARED_MESG_INDEX_C) +#define nh5pget_attr_creation_order_c H5_FC_FUNC_(h5pget_attr_creation_order_c,H5PGET_ATTR_CREATION_ORDER_C) +#define nh5pset_libver_bounds_c H5_FC_FUNC_(h5pset_libver_bounds_c,H5PSET_LIBVER_BOUNDS_C) +#define nh5pset_link_creation_order_c H5_FC_FUNC_(h5pset_link_creation_order_c, H5PSET_LINK_CREATION_ORDER_C) +#define nh5pget_link_phase_change_c H5_FC_FUNC_(h5pget_link_phase_change_c, H5PGET_LINK_PHASE_CHANGE_C) +#define nh5pget_obj_track_times_c H5_FC_FUNC_(h5pget_obj_track_times_c, H5PGET_OBJ_TRACK_TIMES_C) +#define nh5pset_obj_track_times_c H5_FC_FUNC_(h5pset_obj_track_times_c, H5PSET_OBJ_TRACK_TIMES_C) +#define nh5pset_create_inter_group_c H5_FC_FUNC_(h5pset_create_inter_group_c,H5PSET_CREATE_INTER_GROUP_C) +#define nh5pget_create_inter_group_c H5_FC_FUNC_(h5pget_create_inter_group_c,H5PGET_CREATE_INTER_GROUP_C) +#define nh5pget_link_creation_order_c H5_FC_FUNC_(h5pget_link_creation_order_c,H5PGET_LINK_CREATION_ORDER_C) +#define nh5pset_char_encoding_c H5_FC_FUNC_(h5pset_char_encoding_c, H5PSET_CHAR_ENCODING_C) +#define nh5pget_char_encoding_c H5_FC_FUNC_(h5pget_char_encoding_c, H5PGET_CHAR_ENCODING_C) +#define nh5pset_copy_object_c H5_FC_FUNC_(h5pset_copy_object_c, H5PSET_COPY_OBJECT_C) +#define nh5pget_copy_object_c H5_FC_FUNC_(h5pget_copy_object_c, H5PGET_COPY_OBJECT_C) +#define nh5pget_data_transform_c H5_FC_FUNC_(h5pget_data_transform_c, H5PGET_DATA_TRANSFORM_C) +#define nh5pset_data_transform_c H5_FC_FUNC_(h5pset_data_transform_c, H5PSET_DATA_TRANSFORM_C) +#define nh5pget_local_heap_size_hint_c H5_FC_FUNC_(h5pget_local_heap_size_hint_c, H5PGET_LOCAL_HEAP_SIZE_HINT_C) +#define nh5pget_est_link_info_c H5_FC_FUNC_(h5pget_est_link_info_c,H5PGET_EST_LINK_INFO_C) +#define nh5pset_est_link_info_c H5_FC_FUNC_(h5pset_est_link_info_c,H5PSET_EST_LINK_INFO_C) +#define nh5pset_local_heap_size_hint_c H5_FC_FUNC_(h5pset_local_heap_size_hint_c, H5PSET_LOCAL_HEAP_SIZE_HINT_C) +#define nh5pset_link_phase_change_c H5_FC_FUNC_(h5pset_link_phase_change_c, H5PSET_LINK_PHASE_CHANGE_C) +#define nh5pset_fapl_direct_c H5_FC_FUNC_(h5pset_fapl_direct_c, H5PSET_FAPL_DIRECT_C) +#define nh5pget_fapl_direct_c H5_FC_FUNC_(h5pget_fapl_direct_c, H5PGET_FAPL_DIRECT_C) +#define nh5pset_attr_phase_change_c H5_FC_FUNC_(h5pset_attr_phase_change_c, H5PSET_ATTR_PHASE_CHANGE_C) +#define nh5pset_nbit_c H5_FC_FUNC_(h5pset_nbit_c, H5PSET_NBIT_C) +#define nh5pset_scaleoffset_c H5_FC_FUNC_(h5pset_scaleoffset_c, H5PSET_SCALEOFFSET_C) +#define nh5pset_nlinks_c H5_FC_FUNC_(h5pset_nlinks_c, H5PSET_NLINKS_C) +#define nh5pget_nlinks_c H5_FC_FUNC_(h5pget_nlinks_c, H5PGET_NLINKS_C) +#define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C) +#define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C) +#define nh5pget_mpio_actual_io_mode_c H5_FC_FUNC_(h5pget_mpio_actual_io_mode_c, H5PGET_MPIO_ACTUAL_IO_MODE_C) + +H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); +H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id ); +H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); +H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); +H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); +H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level); +H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); +H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); +H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); +H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); +H5_FCDLL int_f nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f nh5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver); +H5_FCDLL int_f nh5pset_fapl_stdio_c (hid_t_f *prp_id); +H5_FCDLL int_f nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io); +H5_FCDLL int_f nh5pset_fapl_sec2_c (hid_t_f *prp_id); +H5_FCDLL int_f nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2); +H5_FCDLL int_f nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f nh5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f nh5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +H5_FCDLL int_f nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +H5_FCDLL int_f nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); +H5_FCDLL int_f nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); +H5_FCDLL int_f nh5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f nh5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f nh5pset_layout_c (hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f nh5pget_layout_c (hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f nh5premove_filter_c (hid_t_f *prp_id, int_f* filter); +H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +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, 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, 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); +H5_FCDLL int_f nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f nh5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f nh5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f nh5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pset_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f nh5pget_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f nh5pset_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f nh5pget_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f nh5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f nh5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f nh5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f nh5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f nh5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, void *close_data); +H5_FCDLL int_f nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); +H5_FCDLL int_f nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pset_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5psetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); H5_FCDLL int_f h5pget_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f h5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f h5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); -H5_FCDLL int_f h5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); -H5_FCDLL int_f h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); -H5_FCDLL int_f h5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); -H5_FCDLL int_f h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); -H5_FCDLL int_f h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); -H5_FCDLL int_f h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); -H5_FCDLL int_f h5pclose_class_c(hid_t_f * cls); -H5_FCDLL int_f h5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f h5pset_shuffle_c( hid_t_f *prp_id); -H5_FCDLL int_f h5pset_fletcher32_c( hid_t_f *prp_id ); -H5_FCDLL int_f h5pset_edc_check_c( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f h5pget_edc_check_c( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f h5pset_family_offset_c( hid_t_f *prp_id , hsize_t_f *offset); -H5_FCDLL int_f h5pget_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); -H5_FCDLL int_f h5pset_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); -H5_FCDLL int_f h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pset_szip_c( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); -H5_FCDLL int_f h5pall_filters_avail_c( hid_t_f *prp_id , int_f *status); -H5_FCDLL int_f h5pfill_value_defined_c( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); -H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); -H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); -H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); -H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); -H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); -H5_FCDLL int_f h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); -H5_FCDLL int_f h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id ); -H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); -H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -#ifdef H5_HAVE_PARALLEL -H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); -H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -#endif +H5_FCDLL int_f nh5pget_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pget_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pget_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); +H5_FCDLL int_f nh5pgetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); +H5_FCDLL int_f nh5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f nh5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); +H5_FCDLL int_f nh5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); +H5_FCDLL int_f nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); +H5_FCDLL int_f nh5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); +H5_FCDLL int_f nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); +H5_FCDLL int_f nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); +H5_FCDLL int_f nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); +H5_FCDLL int_f nh5pclose_class_c(hid_t_f * cls); +H5_FCDLL int_f nh5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f nh5pset_shuffle_c ( hid_t_f *prp_id); +H5_FCDLL int_f nh5pset_fletcher32_c ( hid_t_f *prp_id ); +H5_FCDLL int_f nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset); +H5_FCDLL int_f nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); +H5_FCDLL int_f nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); +H5_FCDLL int_f nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); +H5_FCDLL int_f nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); +H5_FCDLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f nh5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); +H5_FCDLL int_f nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); +H5_FCDLL int_f nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); +H5_FCDLL int_f nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); +H5_FCDLL int_f nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); +H5_FCDLL int_f nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); +H5_FCDLL int_f nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); +H5_FCDLL int_f nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f nh5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f nh5pset_nbit_c(hid_t_f *plist_id ); +H5_FCDLL int_f nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); +H5_FCDLL int_f nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +H5_FCDLL int_f nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); /* * Functions frome H5Rf.c */ -H5_FCDLL int_f h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); -H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); -H5_FCDLL int_f h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); +#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C) +#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C) +#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C) +#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C) +#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C) +#define nh5rget_object_type_obj_c H5_FC_FUNC_(h5rget_object_type_obj_c, H5RGET_OBJECT_TYPE_OBJ_C) +#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C) +#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C) + + +H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); +H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); +H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); -H5_FCDLL int_f h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); +H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); +H5_FCDLL int_f nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* * Functions from H5If.c */ -H5_FCDLL int_f h5iget_type_c(hid_t_f *obj_id, int_f *type); -H5_FCDLL int_f h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); -H5_FCDLL int_f h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); -H5_FCDLL int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); +#define nh5iget_type_c H5_FC_FUNC_(h5iget_type_c, H5IGET_TYPE_C) +#define nh5iget_name_c H5_FC_FUNC_(h5iget_name_c, H5IGET_NAME_C) +#define nh5iinc_ref_c H5_FC_FUNC_(h5iinc_ref_c, H5IINC_REF_C) +#define nh5idec_ref_c H5_FC_FUNC_(h5idec_ref_c, H5IDEC_REF_C) +#define nh5iget_ref_c H5_FC_FUNC_(h5iget_ref_c, H5IGET_REF_C) +#define nh5iget_file_id_c H5_FC_FUNC_(h5iget_file_id_c, H5IGET_FILE_ID_C) +#define nh5iis_valid_c H5_FC_FUNC_(h5iis_valid_c, H5IIS_VALID_C) + +H5_FCDLL int_f nh5iget_type_c(hid_t_f *obj_id, int_f *type); +H5_FCDLL int_f nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); +H5_FCDLL int_f nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); +H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); /* * Functions from H5Ef.c */ +#define nh5eclear_c H5_FC_FUNC_(h5eclear_c, H5ECLEAR_C) +#define nh5eprint_c1 H5_FC_FUNC_(h5eprint_c1, H5EPRINT_C1) +#define nh5eprint_c2 H5_FC_FUNC_(h5eprint_c2, H5EPRINT_C2) +#define nh5eget_major_c H5_FC_FUNC_(h5eget_major_c, H5EGET_MAJOR_C) +#define nh5eget_minor_c H5_FC_FUNC_(h5eget_minor_c, H5EGET_MINOR_C) +#define nh5eset_auto_c H5_FC_FUNC_(h5eset_auto_c, H5ESET_AUTO_C) +#define nprocess_buffer H5_FC_FUNC_(process_buffer, PROCESS_BUFFER) -H5_FCDLL int_f h5eclear_c(hid_t_f *estack_id); -H5_FCDLL int_f h5eprint_c1(_fcd name, int_f* namelen); -H5_FCDLL int_f h5eprint_c2(void); -H5_FCDLL int_f h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); + +H5_FCDLL int_f nh5eclear_c(hid_t_f *estack_id); +H5_FCDLL int_f nh5eprint_c1(_fcd name, int_f* namelen); +H5_FCDLL int_f nh5eprint_c2(void); +H5_FCDLL int_f nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); +H5_FCDLL int_f nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); +H5_FCDLL int_f nh5eset_auto_c(int_f* printflag); H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data); +H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer); /* * Functions from H5f.c */ -H5_FCDLL int_f h5open_c(void); -H5_FCDLL int_f h5close_c(void); -H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); -H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); -H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, +#define nh5open_c H5_FC_FUNC_(h5open_c, H5OPEN_C) +#define nh5close_c H5_FC_FUNC_(h5close_c, H5CLOSE_C) +#define nh5init_types_c H5_FC_FUNC_(h5init_types_c, H5INIT_TYPES_C) +#define nh5close_types_c H5_FC_FUNC_(h5close_types_c, H5CLOSE_TYPES_C) +#define nh5init_flags_c H5_FC_FUNC_(h5init_flags_c, H5INIT_FLAGS_C) +#define nh5init1_flags_c H5_FC_FUNC_(h5init1_flags_c, H5INIT1_FLAGS_C) +#define nh5get_libversion_c H5_FC_FUNC_(h5get_libversion_c, H5GET_LIBVERSION_C) +#define nh5check_version_c H5_FC_FUNC_(h5check_version_c, H5CHECK_VERSION_C) +#define nh5garbage_collect_c H5_FC_FUNC_(h5garbage_collect_c, H5GARBAGE_COLLECT_C) +#define nh5dont_atexit_c H5_FC_FUNC_(h5dont_atexit_c, H5DONT_ATEXIT_C) + + +H5_FCDLL int_f nh5open_c(void); +H5_FCDLL int_f nh5close_c(void); +H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); +H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); +H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags); -H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags); -H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f h5garbage_collect_c(void); -H5_FCDLL int_f h5dont_atexit_c(void); +H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags); +H5_FCDLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f nh5garbage_collect_c(void); +H5_FCDLL int_f nh5dont_atexit_c(void); /* * Functions from H5Zf.c */ -H5_FCDLL int_f h5zunregister_c(int_f *filter); -H5_FCDLL int_f h5zfilter_avail_c(int_f *filter, int_f *flag); -H5_FCDLL int_f h5zget_filter_info_c(int_f *filter, int_f *flag); +#define nh5zunregister_c H5_FC_FUNC_(h5zunregister_c, H5ZUNREGISTER_C) +#define nh5zfilter_avail_c H5_FC_FUNC_(h5zfilter_avail_c, H5ZFILTER_AVAIL_C) +#define nh5zget_filter_info_c H5_FC_FUNC_(h5zget_filter_info_c, H5ZGET_FILTER_INFO_C) + + +H5_FCDLL int_f nh5zunregister_c (int_f *filter); +H5_FCDLL int_f nh5zfilter_avail_c (int_f *filter, int_f *flag); +H5_FCDLL int_f nh5zget_filter_info_c (int_f *filter, int_f *flag); + /* * Functions from H5Lf.c */ +#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C) +#define nh5lcreate_external_c H5_FC_FUNC_(h5lcreate_external_c, H5LCREATE_EXTERNAL_C) +#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C) +#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C) +#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C) +#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C) +#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C) +#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C) +#define nh5lget_info_by_idx_c H5_FC_FUNC_(h5lget_info_by_idx_c, H5LGET_INFO_BY_IDX_C) +#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C) +#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C) +#define nh5lget_name_by_idx_c H5_FC_FUNC_(h5lget_name_by_idx_c, H5LGET_NAME_BY_IDX_C) +#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C) -H5_FCDLL int_f h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f nh5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); +H5_FCDLL int_f nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); -H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +H5_FCDLL int_f nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); +H5_FCDLL int_f nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id); -H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f nh5lis_registered_c(int_f *link_cls_id); +H5_FCDLL int_f nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id); -H5_FCDLL int_f h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +H5_FCDLL int_f nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) ; H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data ); diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in deleted file mode 100644 index 0e14e86..0000000 --- a/fortran/src/H5fort_type_defines.h.in +++ /dev/null @@ -1,16 +0,0 @@ -/* If you are reading this file and it has a '.h' suffix, it was automatically - * generated from the '.in' version. Make changes there. - */ -#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@ -#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@ -#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ -#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ -#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 37509a0..c4b7f73 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -9,7 +9,7 @@ * PURPOSE * C Program to match C types to Fortran types. * Creates the files H5f90i_gen.h for the C code and - * H5fortran_types.F90 for the Fortran code. + * H5fortran_types.f90 for the Fortran code. * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -31,7 +31,6 @@ */ #include -#include #include #include "H5public.h" @@ -46,13 +45,12 @@ FILE * c_header; FILE * fort_header; #define CFILE "H5f90i_gen.h" -#define FFILE "H5fortran_types.F90" +#define FFILE "H5fortran_types.f90" /* Prototypes for the write routines */ -void writeTypedef(const char* c_typedef, const char* c_type, int size); -void writeTypedefDefault(const char* c_typedef, int size); -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind); -void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); +void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); +void writeTypedefDefault(const char* c_typedef, unsigned int size); +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind); static void initCfile(void) @@ -102,7 +100,6 @@ initFfile(void) !\n!\n\ ! This file is automatically generated and contains HDF5 Fortran90 type definitions.\n!\n\ MODULE H5FORTRAN_TYPES\n\ - USE ISO_C_BINDING\n\ !\n\ ! HDF5 integers\n\ !\n"); @@ -122,198 +119,253 @@ endFfile(void) } /* Define a c_int_x type in the C header */ -void writeTypedef(const char* c_typedef, const char* c_type, int size) +void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size) { fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type); } /* Call this function if there is no matching C type for sizes > 1 */ -void writeTypedefDefault(const char* c_typedef, int size) +void writeTypedefDefault(const char* c_typedef, unsigned int size) { assert(size %2 == 0); - fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u;\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); + fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); } /* Create matching Fortran and C types by writing to both files */ -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind) +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind) { fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } -void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind) -{ - fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); - fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); -} + int main(void) { - int FoundIntSize[10]; - int FoundIntSizeKind[10]; - int FoundRealSize[10]; - int FoundRealSizeKind[10]; - int i, j,flag; - char chrA[32],chrB[32]; - - int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; - int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF; - int RealKinds[] = H5_FORTRAN_REAL_KINDS; - int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF; - char Real_C_TYPES[10][32]; - - int H5_FORTRAN_NUM_INTEGER_KINDS; - int H5_FORTRAN_NUM_REAL_KINDS; - int found_long_double = 0; + int FoundIntSize[4]; + unsigned FoundIntSizeKind[4]; + int FoundRealSize[3]; + unsigned FoundRealSizeKind[3]; + int i,j,flag; + char chrA[20],chrB[20]; + int H5_C_HAS_REAL_NATIVE_16; /* Open target files */ c_header = fopen(CFILE, "w"); fort_header = fopen(FFILE, "w"); + /* Default is C has 16 byte float */ + H5_C_HAS_REAL_NATIVE_16 = 1; + /* Write copyright, boilerplate to both files */ initCfile(); initFfile(); - /* (a) define c_int_x */ - - H5_FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds)/sizeof(IntKinds[0])); - H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds)/sizeof(RealKinds[0])); - - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(sizeof(long long) == IntKinds_SizeOf[i]) - writeTypedef("int", "long long", IntKinds[i]); - else if(sizeof(long) == IntKinds[i]) - writeTypedef("int", "long", IntKinds[i]); - else if(sizeof(int) == IntKinds_SizeOf[i]) - writeTypedef("int", "int", IntKinds[i]); - else if(sizeof(short) == IntKinds_SizeOf[i]) - writeTypedef("int", "short", IntKinds[i]); - else - if(IntKinds_SizeOf[i] == 1) { - writeTypedef("int", "char", IntKinds[i]); - /* Actually, char is not necessarily one byte. - * But if char isn't, then nothing is, so this - * is as close as we can get. */ - } else { - writeTypedefDefault("int",IntKinds[i]); - } - if(sizeof(size_t) == IntKinds_SizeOf[i]) - writeTypedef("size_t", "size_t", IntKinds[i]); - if(sizeof(hsize_t) == IntKinds_SizeOf[i]) - writeTypedef("hsize_t", "hsize_t", IntKinds[i]); - } - - /* (b) Define c_float_x */ - - for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { - if (sizeof(float) == RealKinds_SizeOf[i]) { - writeTypedef("float", "float", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT"); - } - else if(sizeof(double) == RealKinds_SizeOf[i]) { - writeTypedef("float", "double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_DOUBLE"); - } -#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 - else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { - writeTypedef("float", "long double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); - found_long_double = 1; - } -# ifdef H5_HAVE_FLOAT128 - /* Don't select a higher precision than Fortran can support */ - else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { - writeTypedef("float", "__float128", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } -# else - else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { - writeTypedef("float", "long double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } -# endif -#else /* There is no C_LONG_DOUBLE intrinsic */ -# ifdef H5_HAVE_FLOAT128 - /* Don't select a higher precision than Fortran can support */ - else if(sizeof(__float128) == RealKinds_SizeOf[i] ) { - writeTypedef("float", "__float128", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } -# else - else if(sizeof(long double) == RealKinds_SizeOf[i] ) { - writeTypedef("float", "long double", RealKinds[i]); - strcpy(Real_C_TYPES[i], "C_FLOAT128"); - } -# endif -#endif - else { - printf("\n **** HDF5 WARNING ****\n"); - printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]); - printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",RealKinds[i]); - - RealKinds_SizeOf[i] = -1; - RealKinds[i] = -1; - } - } + /* First, define c_int_x */ + +#if defined H5_FORTRAN_HAS_INTEGER_1_KIND + if(sizeof(long long) == 1) + writeTypedef("int", "long long", 1); + else if(sizeof(long) == 1) + writeTypedef("int", "long", 1); + else if(sizeof(int) == 1) + writeTypedef("int", "int", 1); + else if(sizeof(short) == 1) + writeTypedef("int", "short", 1); + else + writeTypedef("int", "char", 1); + /* Actually, char is not necessarily one byte. + * But if char isn't, then nothing is, so this + * is as close as we can get. */ + if(sizeof(size_t) == 1) + writeTypedef("size_t", "size_t", 1); + if(sizeof(hsize_t) == 1) + writeTypedef("hsize_t", "hsize_t", 1); +#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/ + +#if defined H5_FORTRAN_HAS_INTEGER_2_KIND + if(sizeof(long long) == 2) + writeTypedef("int", "long long", 2); + else if(sizeof(long) == 2) + writeTypedef("int", "long", 2); + else if(sizeof(int) == 2) + writeTypedef("int", "int", 2); + else if(sizeof(short) == 2) + writeTypedef("int", "short", 2); + else + writeTypedefDefault("int",2); + + if(sizeof(size_t) == 2) + writeTypedef("size_t", "size_t", 2); + if(sizeof(hsize_t) == 2) + writeTypedef("hsize_t", "hsize_t", 2); +#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/ + +#if defined H5_FORTRAN_HAS_INTEGER_4_KIND + if(sizeof(long long) == 4) + writeTypedef("int", "long long", 4); + else if(sizeof(long) == 4) + writeTypedef("int", "long", 4); + else if(sizeof(int) == 4) + writeTypedef("int", "int", 4); + else if(sizeof(short) == 4) + writeTypedef("int", "short", 4); + else + writeTypedefDefault("int",4); + + if(sizeof(size_t) == 4) + writeTypedef("size_t", "size_t", 4); + if(sizeof(hsize_t) == 4) + writeTypedef("hsize_t", "hsize_t", 4); + +#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/ + +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND + if(sizeof(long long) == 8) + writeTypedef("int", "long long", 8); + else if(sizeof(long) == 8) + writeTypedef("int", "long", 8); + else if(sizeof(int) == 8) + writeTypedef("int", "int", 8); + else if(sizeof(short) == 8) + writeTypedef("int", "short", 8); + else + writeTypedefDefault("int",8); + + if(sizeof(size_t) == 8) + writeTypedef("size_t", "size_t", 8); + if(sizeof(hsize_t) == 8) + writeTypedef("hsize_t", "hsize_t", 8); + +#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/ + + /* Define c_float_x */ + +#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND + if(sizeof(long double) == 4) + writeTypedef("float", "long double", 4); + else if(sizeof(double) == 4) + writeTypedef("float", "double", 4); + else if(sizeof(float) == 4) + writeTypedef("float", "float", 4); + else + { printf("Fortran REAL is 4 bytes, no corresponding C floating type\n"); + printf("Quitting....\n"); + return -1; + } +#endif /*H5_FORTRAN_HAS_REAL_NATIVE_4_KIND*/ + +#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND + if(sizeof(long double) == 8) + writeTypedef("float", "long double", 8); + else if(sizeof(double) == 8) + writeTypedef("float", "double", 8); + else if(sizeof(float) == 8) + writeTypedef("float", "float", 8); + else + { printf("Fortran REAL is 16 bytes, no corresponding C floating type\n"); + printf("Quitting....\n"); + return -1; + } +#endif /*H5_FORTRAN_HAS_REAL_NATIVE_8_KIND*/ + +#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND + if(sizeof(long double) == 16) + writeTypedef("float", "long double", 16); + else if(sizeof(double) == 16) + writeTypedef("float", "double", 16); + else if(sizeof(float) == 16) + writeTypedef("float", "float", 16); + else /*C has no 16 byte float so disable it in Fortran*/ + { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n"); + printf(" Disabling Fortran 16 byte REALs\n"); + H5_C_HAS_REAL_NATIVE_16 = 0; + } +#endif /*H5_FORTRAN_HAS_REAL_NATIVE_16_KIND*/ /* Now begin defining fortran types. */ fprintf(c_header, "\n"); - /* haddr_t */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) { - writeToFiles("int","HADDR_T", "haddr_t_f", H5_SIZEOF_HADDR_T, IntKinds[i]); - break; - } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for haddr_t */ - return -1; - } +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8 + writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4 + writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2 + writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1 + writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); +#else + /* Error: couldn't find a size for haddr_t */ + return -1; +#endif /* hsize_t */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) { - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", H5_SIZEOF_HSIZE_T, IntKinds[i]); - break; - } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for hsize_t */ - return -1; - } +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8 + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4 + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2 + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1 + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); +#else + /* Error: couldn't find a size for hsize_t */ + return -1; +#endif /* hssize_t */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) { - writeToFiles("int","HSSIZE_T", "hssize_t_f", H5_SIZEOF_HSSIZE_T, IntKinds[i]); - break; - } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for hssize_t */ - return -1; - } +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8 + writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4 + writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2 + writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1 + writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); +#else + /* Error: couldn't find a size for hssize_t */ + return -1; +#endif /* off_t */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) { - writeToFiles("int","OFF_T", "off_t_f", H5_SIZEOF_OFF_T, IntKinds[i]); - break; - } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for off_t */ - return -1; - } +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8 + writeToFiles("int","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("int","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("int","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("int","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 */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) { - writeToFiles("size_t","SIZE_T", "size_t_f", H5_SIZEOF_SIZE_T, IntKinds[i]); - break; - } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for size_t */ - return -1; - } +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8 + writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4 + writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2 + writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1 + writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); +#else + /* Error: couldn't find a size for size_t */ + return -1; +#endif /* int */ - writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_SIZEOF, H5_FORTRAN_NATIVE_INTEGER_KIND); +#if defined H5_FORTRAN_HAS_NATIVE_8_KIND + writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND); +#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND + writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND); +#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND + writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND); +#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND + writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND); +#else + /* Error: couldn't find a size for int */ + return -1; +#endif /* int_1, int_2, int_4, int_8 */ @@ -322,20 +374,29 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ + FoundIntSize[0] = -1; + FoundIntSize[1] = -2; + FoundIntSize[2] = -4; + FoundIntSize[3] = -8; - FoundIntSize[0] = -1; - FoundIntSize[1] = -1; - FoundIntSize[2] = -1; - FoundIntSize[3] = -1; - FoundIntSize[4] = -1; - - for(i=0;i 0) /* Found the integer type */ { sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]); @@ -382,77 +443,129 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundRealSize[0] = -1; - FoundRealSize[1] = -1; - FoundRealSize[2] = -1; - FoundRealSize[3] = -1; - FoundRealSize[4] = -1; - - for(i=0;i 0) { - FoundRealSize[i] = (int)RealKinds[i]; - FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i]; - sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]); - sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); - writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); + FoundRealSize[0] = -4; + FoundRealSize[1] = -8; + FoundRealSize[2] = -16; + +#if defined H5_FORTRAN_HAS_REAL_4_KIND + FoundRealSize[0] = 4; + FoundRealSizeKind[0] = H5_FORTRAN_HAS_REAL_4_KIND; +#endif +#if defined H5_FORTRAN_HAS_REAL_8_KIND + FoundRealSize[1] = 8; + FoundRealSizeKind[1] = H5_FORTRAN_HAS_REAL_8_KIND; +#endif + +#if defined H5_FORTRAN_HAS_REAL_16_KIND + if(H5_C_HAS_REAL_NATIVE_16 != 0) { + FoundRealSize[2] = 16; + FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND; } - } +#endif - /* hid_t */ - for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { - if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) { - writeToFiles("int","HID_T", "hid_t_f", H5_SIZEOF_HID_T, IntKinds[i]); - break; + for(i=0;i<3;i++) { + if( FoundRealSize[i] > 0) /* Found the real type */ + { + sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]); + sprintf(chrB, "real_%d_f", FoundRealSize[i]); + writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); + } + else /* Did not find the real type */ + { + flag = 0; /* flag indicating if found the next highest */ + for(j=i+1;j<3;j++) /* search for next highest */ + { + if( FoundRealSize[j] > 0) /* Found the next highest */ + { + sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); + sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); + if(FoundRealSize[j]>4) { + writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); + flag = 1; + } + /* else { */ +/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ +/* } */ + flag = 1; + break; + } + } + if(flag == 0) /* No higher one found, so find next lowest */ + { + for(j=1;j>-1;j--) /* Search for next lowest */ + { + if( FoundRealSize[j] > 0) /* Found the next lowest */ + { + sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); + sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); + if(FoundRealSize[j]>4) + writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); + /* else { */ +/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ +/* } */ + flag = 1; + break; + } + } + } + if(flag == 0) /* No higher or lower one found, indicating an error */ + return -1; + } } - if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) - /* Error: couldn't find a size for hid_t */ - return -1; - } + + /* hid_t */ +#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8 + writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4 + writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2 + writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1 + writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); +#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4 + writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); +#else + /* Error: couldn't find a size for hid_t */ + return -1; +#endif /* real_f */ - if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); - else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); - else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); - else { - /* No exact match, choose the next highest */ - if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); - else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); - else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float)) - writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); - else { - /* Error: couldn't find a size for real_f */ - printf("Error: couldn't find a size for real_f \n"); - return -1; +#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND + if(H5_C_HAS_REAL_NATIVE_16 != 0) { + writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND); } - } +#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND + writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); +#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND + writeToFiles("float", "Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); +#else + /* Error: couldn't find a size for real_f */ + return -1; +#endif /* double_f */ - if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)) - writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); - else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) - writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE"); - else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float)) - writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT"); -#ifdef H5_HAVE_FLOAT128 - /* Don't select a higher precision than Fortran can support */ - else if(sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { - writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); +#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND + if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ + writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND); + } else { +#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ + writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); + } +#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ + writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); } #else - else if(sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { - writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); + /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ + return -1; } #endif - else { - /* Error: couldn't find a size for double_f */ - printf("Error: couldn't find a size for double_f \n"); + +#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND + writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND); +#else + /* Error: couldn't find a size for real_f */ return -1; - } +#endif /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03' * in order to be interoperable with C's structure, the C buffer size @@ -461,12 +574,12 @@ int main(void) fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 ); + /* Close files */ endCfile(); endFfile(); fclose(c_header); fclose(fort_header); - return 0; } diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 new file mode 100644 index 0000000..1a1a0ec --- /dev/null +++ b/fortran/src/H5test_kind.f90 @@ -0,0 +1,269 @@ +!****p* Program/H5test_kind +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only +! used when the Fortran intrinsic function SIZEOF is not available. It generates +! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less +! portable in comparison to using SIZEOF. +! +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourma +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + j = SELECTED_INT_KIND(18) + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind.f90',& +'!',& +'! NOTES',& +'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be not available at',& +'! configure time',& +'!',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.f90',& +'!',& +'!*****' + +! Generate a program + + WRITE(*,*) "PROGRAM int_kind" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM int_kind" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: b=0" + WRITE(*,*)" INTEGER :: a(8)=0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: b_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1))" + WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" + WRITE(*,*)" IF (b_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (b_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER(",j,") :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL(KIND=",j,") :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 new file mode 100644 index 0000000..468086a --- /dev/null +++ b/fortran/src/H5test_kind_SIZEOF.f90 @@ -0,0 +1,228 @@ +!****p* Program/H5test_kind_SIZEOF +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_SIZEOF.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! 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 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". +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_SIZEOF.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" + WRITE(*,*) "USE H5test_kind_SIZEOF_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.f90 b/fortran/src/H5test_kind_STORAGE_SIZE.f90 new file mode 100644 index 0000000..89c904c --- /dev/null +++ b/fortran/src/H5test_kind_STORAGE_SIZE.f90 @@ -0,0 +1,230 @@ +!****p* Program/H5test_kind_STORAGE_SIZE +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_STORAGE_SIZE.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when +! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code +! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard +! compliant. This program is the preferred method. +! +! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_STORAGE_SIZE.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_C_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" + WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" + +END PROGRAM test_kind + + + diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 deleted file mode 100644 index 64f5be6..0000000 --- a/fortran/src/HDF5.F90 +++ /dev/null @@ -1,46 +0,0 @@ -!****h* ROBODoc/HDF5 -! -! NAME -! MODULE HDF5 -! -! FILE -! src/fortran/src/HDF5.f90 -! -! PURPOSE -! This is the main module used for linking to the Fortran HDF library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5G - USE H5E - USE H5I - USE H5L - USE H5S - USE H5D - USE H5A - USE H5T - USE H5O - USE H5P - USE H5R - USE H5Z - USE H5_gen - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 new file mode 100644 index 0000000..75af333 --- /dev/null +++ b/fortran/src/HDF5.f90 @@ -0,0 +1,56 @@ +!****h* ROBODoc/HDF5 +! +! NAME +! MODULE HDF5 +! +! FILE +! src/fortran/src/HDF5.f90 +! +! PURPOSE +! This is the main module used for linking to the Fortran HDF library. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5F_PROVISIONAL + USE H5G + USE H5E + USE H5E_PROVISIONAL + USE H5I + USE H5L + USE H5L_PROVISIONAL + USE H5S + USE H5D + USE H5D_PROVISIONAL + USE H5A + USE H5A_PROVISIONAL + USE H5T + USE H5T_PROVISIONAL + USE H5O + USE H5O_PROVISIONAL + USE H5P + USE H5P_PROVISIONAL + USE H5R + USE H5R_PROVISIONAL + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90 new file mode 100644 index 0000000..b8fb645 --- /dev/null +++ b/fortran/src/HDF5mpio.f90 @@ -0,0 +1,55 @@ +!****h* ROBODoc/HDF5 (mpio) +! +! NAME +! HDF5 +! +! PURPOSE +! This is the main module used for linking to the Fortran parallel HDF library. +! This file replaces HDF5.f90 when compiling the parallel library. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5F_PROVISIONAL + USE H5G + USE H5E + USE H5E_PROVISIONAL + USE H5I + USE H5L + USE H5L_PROVISIONAL + USE H5S + USE H5D + USE H5D_PROVISIONAL + USE H5A + USE H5A_PROVISIONAL + USE H5T + USE H5T_PROVISIONAL + USE H5O + USE H5O_PROVISIONAL + USE H5P + USE H5P_PROVISIONAL + USE H5FDMPIO + USE H5R + USE H5R_PROVISIONAL + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 734f46e..a4b3843 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,13 +42,42 @@ else AM_LDFLAGS+=-static endif +# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled +if BUILD_PARALLEL_CONDITIONAL + PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 +else + PARALLEL_COND_SRC = HDF5.f90 +endif + +# Check if the compiler supports the Fortran 2003 standard +# which should include the intrinsic module iso_c_binding +if FORTRAN_2003_CONDITIONAL_F + F_STATUS = _F03 +else + F_STATUS = _F90 +endif + +# Condition for including/excluding the DBLE interfaces for when the +# default REAL is of type DOUBLE PRECISION. +# We do not include the double precision interfaces if the defaut REAL is +# DOUBLE PRECISION since this would lead to a non-unique conflict with the +# generic interfaces declared as REAL. +if FORTRAN_DEFAULT_REALisDBLE_F + F_DBLE = Exclude +else + F_DBLE = Include +endif + # Source files for the library. -libhdf5_fortran_la_SOURCES=H5f90global.F90 \ - H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ - H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 H5_gen.f90 \ +libhdf5_fortran_la_SOURCES=H5f90global.f90 \ + H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ + H5Tff.f90 H5Zff.f90 \ + H5_DBLE_Interface$(F_DBLE).f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 + 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 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. libhdf5_fortran_la_LIBADD=$(LIBHDF5) @@ -57,10 +86,11 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES=h5fc -# H5fortran_types.F90 and H5f90i.h are automatically generaed by +# H5fortran_types.f90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h +MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.f90 # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -106,35 +136,55 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5_buildiface is compiled and run to produce H5_gen.F90. -# H5match_types.c then includes H5fort_type_defines.h and can be compiled into +# H5test_kind is compiled and run to produce H5fortran_detect.f90. +# H5fortran_detect is compiled and run to produce H5fort_type_defines.h. +# H5match_types.c then includes this file and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.F90, which are included in the Fortran library. +# and H5fortran_types.f90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5_buildiface +noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.F90 as a side effect. +# H5fortran_types.f90 as a side effect. BUILT_SOURCES = H5f90i_gen.h #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. +# H5fort_type_defines.h is created by running H5fortran_detect. +# Obviously, H5fortran_detect needs to be built first. +H5fort_type_defines.h: H5fortran_detect$(EXEEXT) + $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h + +H5match_types.$(OBJEXT): H5fort_type_defines.h + +# Automake knows how to build fortran programs if we tell it the source +# files. +H5fortran_detect_SOURCES = H5fortran_detect.f90 -H5_gen.F90: H5_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_buildiface$(EXEEXT) +# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# intrinsic function SIZEOF is available. -# H5_buildiface.F90 is included in the distribution, and Automake knows +H5fortran_detect.f90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 + +# H5test_kind.f90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5_buildiface_SOURCES = H5_buildiface.F90 +if FORTRAN_HAVE_STORAGE_SIZE + H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 +else +if FORTRAN_HAVE_SIZEOF + H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 +else + H5test_kind_SOURCES = H5test_kind.f90 +endif +endif # Mark this directory as part of the Fortran API FORTRAN_API=yes @@ -143,28 +193,51 @@ FORTRAN_API=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 -H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo -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_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo -HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ - H5Dff.lo \ - H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ - H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo +H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.f90 +H5fortran_detect.lo: H5fortran_detect.f90 +H5test_kind.lo: $(srcdir)/H5test_kind.f90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 +H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo +H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo +H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo +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 +H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo +H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo +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 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 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: $(srcdir)/H5FDmpioff.f90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 9a1ce4f..aba85ec 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -99,16 +99,16 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/lt_vers.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \ - $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \ - $(srcdir)/H5fort_type_defines.h.in $(top_srcdir)/bin/depcomp \ + $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ + $(srcdir)/h5fc.in $(top_srcdir)/bin/depcomp \ $(top_srcdir)/bin/test-driver README # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5match_types$(EXEEXT) H5_buildiface$(EXEEXT) +noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ + H5test_kind$(EXEEXT) TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -117,8 +117,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc -CONFIG_CLEAN_FILES = h5fc H5fort_type_defines.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_CLEAN_FILES = h5fc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -150,12 +150,30 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) +am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ + H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 \ + H5Dff.f90 H5Eff.f90 H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 \ + H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ + H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ + H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ + H5Tf.c H5Zf.c 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 HDF5.f90 H5FDmpiof.c HDF5mpio.f90 \ + H5FDmpioff.f90 +@BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo +@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ +@BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ - H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ - H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ - H5_gen.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 HDF5.lo + H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo H5_DBLE_Interface$(F_DBLE).lo \ + H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo \ + H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo \ + H5Zf.lo H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo \ + 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@) @@ -166,12 +184,19 @@ libhdf5_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) -am_H5_buildiface_OBJECTS = H5_buildiface.$(OBJEXT) -H5_buildiface_OBJECTS = $(am_H5_buildiface_OBJECTS) -H5_buildiface_LDADD = $(LDADD) +am_H5fortran_detect_OBJECTS = H5fortran_detect.$(OBJEXT) +H5fortran_detect_OBJECTS = $(am_H5fortran_detect_OBJECTS) +H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) +am__H5test_kind_SOURCES_DIST = H5test_kind.f90 H5test_kind_SIZEOF.f90 \ + H5test_kind_STORAGE_SIZE.f90 +@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) +@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind_SIZEOF.$(OBJEXT) +@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_H5test_kind_OBJECTS = H5test_kind_STORAGE_SIZE.$(OBJEXT) +H5test_kind_OBJECTS = $(am_H5test_kind_OBJECTS) +H5test_kind_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -188,24 +213,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_FCFLAGS) $(FCFLAGS) -AM_V_PPFC = $(am__v_PPFC_@AM_V@) -am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) -am__v_PPFC_0 = @echo " PPFC " $@; -am__v_PPFC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -231,17 +238,25 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ - H5match_types.c -DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ - H5match_types.c +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ + H5match_types.c $(H5test_kind_SOURCES) +DIST_SOURCES = $(am__libhdf5_fortran_la_SOURCES_DIST) \ + $(H5fortran_detect_SOURCES) H5match_types.c \ + $(am__H5test_kind_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)H5config_f.inc.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -498,21 +513,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -522,12 +530,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -569,18 +578,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -736,14 +733,34 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 + +# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled +@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 +@FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 + +# Check if the compiler supports the Fortran 2003 standard +# which should include the intrinsic module iso_c_binding +@FORTRAN_2003_CONDITIONAL_F_TRUE@F_STATUS = _F03 +@FORTRAN_DEFAULT_REALisDBLE_F_FALSE@F_DBLE = Include + +# Condition for including/excluding the DBLE interfaces for when the +# default REAL is of type DOUBLE PRECISION. +# We do not include the double precision interfaces if the defaut REAL is +# DOUBLE PRECISION since this would lead to a non-unique conflict with the +# generic interfaces declared as REAL. +@FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. -libhdf5_fortran_la_SOURCES = H5f90global.F90 \ - H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ - H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ - H5Tff.F90 H5Zff.F90 H5_gen.f90 \ +libhdf5_fortran_la_SOURCES = H5f90global.f90 \ + H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ + H5Tff.f90 H5Zff.f90 \ + H5_DBLE_Interface$(F_DBLE).f90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ - H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 + 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 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. @@ -753,10 +770,12 @@ libhdf5_fortran_la_LIBADD = $(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES = h5fc -# H5fortran_types.F90 and H5f90i.h are automatically generaed by +# H5fortran_types.f90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h +MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.f90 + @BUILD_PARALLEL_CONDITIONAL_FALSE@H5FC_NAME = h5fc # Custom rule for installing h5fc, since it will be named h5pfc if hdf5 @@ -765,12 +784,18 @@ MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.F90 as a side effect. +# H5fortran_types.f90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# H5_buildiface.F90 is included in the distribution, and Automake knows +# Automake knows how to build fortran programs if we tell it the source +# files. +H5fortran_detect_SOURCES = H5fortran_detect.f90 +@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.f90 +@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 + +# H5test_kind.f90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -H5_buildiface_SOURCES = H5_buildiface.F90 +@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -794,11 +819,11 @@ TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: $(BUILT_SOURCES) H5config_f.inc +all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -830,21 +855,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -H5config_f.inc: stamp-h2 - @test -f $@ || rm -f stamp-h2 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 - -stamp-h2: $(srcdir)/H5config_f.inc.in $(top_builddir)/config.status - @rm -f stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status fortran/src/H5config_f.inc - -distclean-hdr: - -rm -f H5config_f.inc stamp-h2 h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -H5fort_type_defines.h: $(top_builddir)/config.status $(srcdir)/H5fort_type_defines.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -893,14 +905,18 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -H5_buildiface$(EXEEXT): $(H5_buildiface_OBJECTS) $(H5_buildiface_DEPENDENCIES) $(EXTRA_H5_buildiface_DEPENDENCIES) - @rm -f H5_buildiface$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5_buildiface_OBJECTS) $(H5_buildiface_LDADD) $(LIBS) +H5fortran_detect$(EXEEXT): $(H5fortran_detect_OBJECTS) $(H5fortran_detect_DEPENDENCIES) $(EXTRA_H5fortran_detect_DEPENDENCIES) + @rm -f H5fortran_detect$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5fortran_detect_OBJECTS) $(H5fortran_detect_LDADD) $(LIBS) H5match_types$(EXEEXT): $(H5match_types_OBJECTS) $(H5match_types_DEPENDENCIES) $(EXTRA_H5match_types_DEPENDENCIES) @rm -f H5match_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(H5match_types_OBJECTS) $(H5match_types_LDADD) $(LIBS) +H5test_kind$(EXEEXT): $(H5test_kind_OBJECTS) $(H5test_kind_DEPENDENCIES) $(EXTRA_H5test_kind_DEPENDENCIES) + @rm -f H5test_kind$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5test_kind_OBJECTS) $(H5test_kind_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -910,6 +926,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Af.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Df.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ef.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpiof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5If.Plo@am__quote@ @@ -924,15 +941,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5f90kit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5match_types.Po@am__quote@ -.F90.o: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< - -.F90.obj: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.F90.lo: - $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< - .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1200,7 +1208,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) H5config_f.inc all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1251,7 +1259,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-local distclean-tags + distclean-local distclean-tags dvi: dvi-am @@ -1320,14 +1328,14 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-local distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-local install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + distclean-libtool distclean-local distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-html install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ @@ -1393,42 +1401,72 @@ install-exec-local: #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. +# H5fort_type_defines.h is created by running H5fortran_detect. +# Obviously, H5fortran_detect needs to be built first. +H5fort_type_defines.h: H5fortran_detect$(EXEEXT) + $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h + +H5match_types.$(OBJEXT): H5fort_type_defines.h + +# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# intrinsic function SIZEOF is available. -H5_gen.F90: H5_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_buildiface$(EXEEXT) +H5fortran_detect.f90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 -H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo -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_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo -HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ - H5Dff.lo \ - H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ - H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo +H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.f90 +H5fortran_detect.lo: H5fortran_detect.f90 +H5test_kind.lo: $(srcdir)/H5test_kind.f90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 +H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo +H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo +H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo +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 +H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo +H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo +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 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 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: $(srcdir)/H5FDmpioff.f90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 7b218ca..48fb343 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -7,13 +7,99 @@ H5LIB_mp_H5CHECK_VERSION_F H5LIB_mp_H5GARBAGE_COLLECT_F H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE -H5LIB_mp_H5OFFSETOF +@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF +; H5_DBLE_INTERFACE +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_2 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_3 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_4 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_5 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_6 +H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_7 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_SCALAR +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_1 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_2 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_3 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_4 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_5 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_6 +H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_7 +H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_2 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_3 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_4 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_5 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_6 +H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_7 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_SCALAR +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_1 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_2 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_3 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_4 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_5 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_6 +H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_7 +H5_DBLE_INTERFACE_mp_H5PGET_DOUBLE +H5_DBLE_INTERFACE_mp_H5PSET_DOUBLE +H5_DBLE_INTERFACE_mp_H5PSET_FILL_VALUE_DOUBLE +H5_DBLE_INTERFACE_mp_H5PGET_FILL_VALUE_DOUBLE +H5_DBLE_INTERFACE_mp_H5PINSERT_DOUBLE +H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE ; H5A -H5A_mp_H5AWRITE_CHAR_SCALAR -H5A_mp_H5AREAD_CHAR_SCALAR H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_SCALAR +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_1 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_2 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_3 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_4 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_5 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_6 +H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_7 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_SCALAR +H5A_PROVISIONAL_mp_H5AWRITE_REAL_1 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_2 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_3 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_4 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_5 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_6 +H5A_PROVISIONAL_mp_H5AWRITE_REAL_7 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_SCALAR +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_1 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_2 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_3 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_4 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_5 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_6 +H5A_PROVISIONAL_mp_H5AWRITE_CHAR_7 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_SCALAR +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_1 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_2 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_3 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_4 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_5 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_6 +H5A_PROVISIONAL_mp_H5AREAD_INTEGER_7 +H5A_PROVISIONAL_mp_H5AREAD_REAL_SCALAR +H5A_PROVISIONAL_mp_H5AREAD_REAL_1 +H5A_PROVISIONAL_mp_H5AREAD_REAL_2 +H5A_PROVISIONAL_mp_H5AREAD_REAL_3 +H5A_PROVISIONAL_mp_H5AREAD_REAL_4 +H5A_PROVISIONAL_mp_H5AREAD_REAL_5 +H5A_PROVISIONAL_mp_H5AREAD_REAL_6 +H5A_PROVISIONAL_mp_H5AREAD_REAL_7 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_SCALAR +H5A_PROVISIONAL_mp_H5AREAD_CHAR_1 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_2 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_3 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_4 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_5 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_6 +H5A_PROVISIONAL_mp_H5AREAD_CHAR_7 H5A_mp_H5AGET_SPACE_F H5A_mp_H5AGET_TYPE_F H5A_mp_H5AGET_NAME_F @@ -36,16 +122,64 @@ H5A_mp_H5AEXISTS_F H5A_mp_H5AEXISTS_BY_NAME_F H5A_mp_H5AOPEN_BY_NAME_F H5A_mp_H5ARENAME_F +@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR +@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR ; H5D H5D_mp_H5DCREATE_F H5D_mp_H5DOPEN_F H5D_mp_H5DCLOSE_F -H5D_mp_H5DWRITE_REFERENCE_OBJ -H5D_mp_H5DWRITE_REFERENCE_DSETREG -H5D_mp_H5DWRITE_CHAR_SCALAR -H5D_mp_H5DREAD_REFERENCE_OBJ -H5D_mp_H5DREAD_REFERENCE_DSETREG -H5D_mp_H5DREAD_CHAR_SCALAR +H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_OBJ +H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_DSETREG +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_SCALAR +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_1 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_2 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_3 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_4 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_5 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_6 +H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_7 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_SCALAR +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_1 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_2 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_3 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_4 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_5 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_6 +H5D_PROVISIONAL_mp_H5DWRITE_CHAR_7 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_SCALAR +H5D_PROVISIONAL_mp_H5DWRITE_REAL_1 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_2 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_3 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_4 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_5 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_6 +H5D_PROVISIONAL_mp_H5DWRITE_REAL_7 +H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_OBJ +H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_DSETREG +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_SCALAR +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_1 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_2 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_3 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_4 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_5 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_6 +H5D_PROVISIONAL_mp_H5DREAD_INTEGER_7 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_SCALAR +H5D_PROVISIONAL_mp_H5DREAD_CHAR_1 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_2 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_3 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_4 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_5 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_6 +H5D_PROVISIONAL_mp_H5DREAD_CHAR_7 +H5D_PROVISIONAL_mp_H5DREAD_REAL_SCALAR +H5D_PROVISIONAL_mp_H5DREAD_REAL_1 +H5D_PROVISIONAL_mp_H5DREAD_REAL_2 +H5D_PROVISIONAL_mp_H5DREAD_REAL_3 +H5D_PROVISIONAL_mp_H5DREAD_REAL_4 +H5D_PROVISIONAL_mp_H5DREAD_REAL_5 +H5D_PROVISIONAL_mp_H5DREAD_REAL_6 +H5D_PROVISIONAL_mp_H5DREAD_REAL_7 H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F @@ -58,8 +192,9 @@ H5D_mp_H5DWRITE_VL_REAL H5D_mp_H5DREAD_VL_REAL H5D_mp_H5DWRITE_VL_STRING H5D_mp_H5DREAD_VL_STRING -H5D_mp_H5DFILL_CHAR -H5D_mp_H5DFILL_INTEGER +H5D_PROVISIONAL_mp_H5DFILL_INTEGER +H5D_PROVISIONAL_mp_H5DFILL_REAL +H5D_PROVISIONAL_mp_H5DFILL_CHAR H5D_mp_H5DGET_SPACE_STATUS_F H5D_mp_H5DCREATE_ANON_F H5D_mp_H5DGET_SPACE_F @@ -69,15 +204,15 @@ H5D_mp_H5DGET_CREATE_PLIST_F H5D_mp_H5DGET_STORAGE_SIZE_F H5D_mp_H5DVLEN_GET_MAX_LEN_F H5D_mp_H5DGET_ACCESS_PLIST_F -H5D_mp_H5DWRITE_PTR -H5D_mp_H5DREAD_PTR -H5D_mp_H5DVLEN_RECLAIM_F +@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR +@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR +@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F ; H5E H5E_mp_H5ECLEAR_F H5E_mp_H5EPRINT_F H5E_mp_H5EGET_MAJOR_F H5E_mp_H5EGET_MINOR_F -H5E_mp_H5ESET_AUTO_F +H5E_PROVISIONAL_mp_H5ESET_AUTO_F ; H5F H5F_mp_H5FCREATE_F H5F_mp_H5FFLUSH_F @@ -94,7 +229,7 @@ H5F_mp_H5FGET_ACCESS_PLIST_F H5F_mp_H5FIS_HDF5_F H5F_mp_H5FGET_NAME_F H5F_mp_H5FGET_FILESIZE_F -H5F_mp_H5FGET_FILE_IMAGE_F +@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F ; H5G H5G_mp_H5GOPEN_F H5G_mp_H5GCREATE_F @@ -156,8 +291,8 @@ H5L_mp_H5LGET_INFO_BY_IDX_F H5L_mp_H5LIS_REGISTERED_F H5L_mp_H5LMOVE_F H5L_mp_H5LGET_NAME_BY_IDX_F -H5L_mp_H5LITERATE_F -H5L_mp_H5LITERATE_BY_NAME_F +@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F +@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F ; H5O H5O_mp_H5OCLOSE_F H5O_mp_H5OCOPY_F @@ -172,11 +307,11 @@ H5O_mp_H5OOPEN_BY_IDX_F H5O_mp_H5OOPEN_F H5O_mp_H5OSET_COMMENT_F H5O_mp_H5OSET_COMMENT_BY_NAME_F -H5O_mp_H5OGET_INFO_BY_IDX_F -H5O_mp_H5OGET_INFO_BY_NAME_F -H5O_mp_H5OGET_INFO_F -H5O_mp_H5OVISIT_BY_NAME_F -H5O_mp_H5OVISIT_F +@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F +@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F +@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F +@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F +@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F ; H5P H5P_mp_H5PCREATE_F H5P_mp_H5PSET_PRESERVE_F @@ -187,10 +322,12 @@ H5P_mp_H5PCLOSE_F H5P_mp_H5PSET_CHUNK_F H5P_mp_H5PGET_CHUNK_F H5P_mp_H5PSET_DEFLATE_F -H5P_mp_H5PSET_FILL_VALUE_CHAR -H5P_mp_H5PGET_FILL_VALUE_CHAR -H5P_mp_H5PSET_FILL_VALUE_INTEGER -H5P_mp_H5PGET_FILL_VALUE_INTEGER +H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_INTEGER +H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_INTEGER +H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_REAL +H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_REAL +H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_CHAR +H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_CHAR H5P_mp_H5PGET_VERSION_F H5P_mp_H5PSET_USERBLOCK_F H5P_mp_H5PGET_USERBLOCK_F @@ -242,10 +379,12 @@ H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F -H5P_mp_H5PSET_CHAR -H5P_mp_H5PSET_INTEGER -H5P_mp_H5PGET_CHAR -H5P_mp_H5PGET_INTEGER +H5P_PROVISIONAL_mp_H5PSET_INTEGER +H5P_PROVISIONAL_mp_H5PSET_REAL +H5P_PROVISIONAL_mp_H5PSET_CHAR +H5P_PROVISIONAL_mp_H5PGET_INTEGER +H5P_PROVISIONAL_mp_H5PGET_REAL +H5P_PROVISIONAL_mp_H5PGET_CHAR H5P_mp_H5PEXIST_F H5P_mp_H5PGET_SIZE_F H5P_mp_H5PGET_NPROPS_F @@ -256,11 +395,13 @@ H5P_mp_H5PCOPY_PROP_F H5P_mp_H5PREMOVE_F H5P_mp_H5PUNREGISTER_F H5P_mp_H5PCLOSE_CLASS_F -H5P_mp_H5PCREATE_CLASS_F -H5P_mp_H5PREGISTER_INTEGER -H5P_mp_H5PREGISTER_CHAR -H5P_mp_H5PINSERT_CHAR -H5P_mp_H5PINSERT_INTEGER +H5P_PROVISIONAL_mp_H5PCREATE_CLASS_F +H5P_PROVISIONAL_mp_H5PREGISTER_INTEGER +H5P_PROVISIONAL_mp_H5PREGISTER_REAL +H5P_PROVISIONAL_mp_H5PREGISTER_CHAR +H5P_PROVISIONAL_mp_H5PINSERT_INTEGER +H5P_PROVISIONAL_mp_H5PINSERT_REAL +H5P_PROVISIONAL_mp_H5PINSERT_CHAR H5P_mp_H5PSET_SHUFFLE_F H5P_mp_H5PSET_EDC_CHECK_F H5P_mp_H5PGET_EDC_CHECK_F @@ -307,34 +448,28 @@ H5P_mp_H5PGET_NLINKS_F H5P_mp_H5PGET_CREATE_INTER_GROUP_F H5P_mp_H5PSET_CHUNK_CACHE_F H5P_mp_H5PGET_CHUNK_CACHE_F -H5P_mp_H5PSET_FILL_VALUE_PTR -H5P_mp_H5PGET_FILL_VALUE_PTR -H5P_mp_H5PSET_PTR -H5P_mp_H5PGET_PTR -H5P_mp_H5PREGISTER_PTR -H5P_mp_H5PINSERT_PTR -H5P_mp_H5PGET_FILE_IMAGE_F -H5P_mp_H5PSET_FILE_IMAGE_F -; Parallel -@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F -@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F -@H5_NOPAREXP@H5P_mp_H5PSET_DXPL_MPIO_F -@H5_NOPAREXP@H5P_mp_H5PGET_DXPL_MPIO_F -@H5_NOPAREXP@H5P_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILE_IMAGE_F +@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILE_IMAGE_F ; H5R -H5R_mp_H5RCREATE_OBJECT_F -H5R_mp_H5RCREATE_REGION_F -H5R_mp_H5RDEREFERENCE_OBJECT_F -H5R_mp_H5RDEREFERENCE_REGION_F -H5R_mp_H5RGET_REGION_REGION_F +H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F +H5R_PROVISIONAL_mp_H5RCREATE_REGION_F +H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F +H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F +H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F -H5R_mp_H5RGET_NAME_OBJECT_F -H5R_mp_H5RGET_NAME_REGION_F -H5R_mp_H5RGET_REGION_PTR_F -H5R_mp_H5RCREATE_PTR_F -H5R_mp_H5RDEREFERENCE_PTR_F -H5R_mp_H5RGET_NAME_PTR_F -H5R_mp_H5RGET_OBJ_TYPE_F +H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F +H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F +@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F +@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F +@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F +@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F +@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F ; H5S H5S_mp_H5SCREATE_SIMPLE_F H5S_mp_H5SCLOSE_F @@ -423,10 +558,17 @@ H5T_mp_H5TENCODE_F H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F -H5T_mp_H5TCONVERT_F -H5T_mp_H5TENUM_INSERT_F90 -H5T_mp_H5TENUM_INSERT_F03 +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F +@H5_F03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F90 +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F03 ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F H5Z_mp_H5ZGET_FILTER_INFO_F +; Parallel +@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F +@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F +@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F +@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F +@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 19d4975..a2711c0 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -39,11 +39,26 @@ if (BUILD_SHARED_LIBS) ) endif (BUILD_SHARED_LIBS) -set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) -if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) -endif (BUILD_SHARED_LIBS) +# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then +# fall back to F2003. If F2003 not supported then use F90 for the tests. + +set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) +if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90) + if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F08.f90 tf.f90) + endif (BUILD_SHARED_LIBS) +elseif (HDF5_ENABLE_F2003) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F03.f90 tf.f90) + if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F03.f90 tf.f90) + endif (BUILD_SHARED_LIBS) +else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) + add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F90.f90 tf.f90) + if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F90.f90 tf.f90) + endif (BUILD_SHARED_LIBS) +endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} @@ -93,40 +108,6 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Setup the Fortran auto-detection utilities -# H5_test_buildiface.F90 used to generate various KIND test interfaces -#----------------------------------------------------------------------------- - -add_executable (H5_test_buildiface - ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90 - ) - -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5_test_buildiface - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif (BUILD_SHARED_LIBS) - set_target_properties (H5_test_buildiface - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif (WIN32 AND MSVC) -set_target_properties (H5_test_buildiface PROPERTIES - LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} -) - -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 - COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5_test_buildiface -) - -#----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- @@ -253,60 +234,62 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for fortranlib_test_F03 -add_executable (fortranlib_test_F03 - fortranlib_test_F03.f90 - tH5E_F03.f90 - tH5F_F03.f90 - tH5L_F03.f90 - tH5O_F03.f90 - tH5P_F03.f90 - tH5T_F03.F90 - tHDF5_F03.f90 -) -TARGET_NAMING (fortranlib_test_F03 STATIC) -TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") -target_link_libraries (fortranlib_test_F03 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} -) -if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03 "ws2_32.lib") -endif (WIN32 AND MSVC) -target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set_target_properties (fortranlib_test_F03 PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static -) -if (BUILD_SHARED_LIBS) - add_executable (fortranlib_test_F03-shared +if (HDF5_ENABLE_F2003) + add_executable (fortranlib_test_F03 fortranlib_test_F03.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 - tH5T_F03.F90 + tH5T_F03.f90 tHDF5_F03.f90 ) - TARGET_NAMING (fortranlib_test_F03-shared SHARED) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") - target_link_libraries (fortranlib_test_F03-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + TARGET_NAMING (fortranlib_test_F03 STATIC) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") + target_link_libraries (fortranlib_test_F03 + ${HDF5_F90_TEST_LIB_TARGET} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} ) if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") + target_link_libraries (fortranlib_test_F03 "ws2_32.lib") endif (WIN32 AND MSVC) - target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (fortranlib_test_F03-shared PROPERTIES + target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared -) -endif (BUILD_SHARED_LIBS) + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + ) + if (BUILD_SHARED_LIBS) + add_executable (fortranlib_test_F03-shared + fortranlib_test_F03.f90 + tH5E_F03.f90 + tH5F_F03.f90 + tH5L_F03.f90 + tH5O_F03.f90 + tH5P_F03.f90 + tH5T_F03.f90 + tHDF5_F03.f90 + ) + TARGET_NAMING (fortranlib_test_F03-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") + target_link_libraries (fortranlib_test_F03-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} + ) + if (WIN32 AND MSVC) + target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") + endif (WIN32 AND MSVC) + target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fortranlib_test_F03-shared PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + endif (BUILD_SHARED_LIBS) +endif (HDF5_ENABLE_F2003) #-- Adding test for fflush1 add_executable (fflush1 fflush1.f90) diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 deleted file mode 100644 index 30687df..0000000 --- a/fortran/test/H5_test_buildiface.F90 +++ /dev/null @@ -1,306 +0,0 @@ -!****p* Program/H5_buildiface -! -! NAME -! Executable: H5_buildiface -! -! FILE -! fortran/src/H5_buildiface.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of -! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard -! compliant and should always be chosen over SIZEOF. -! -! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or -! "FORTRAN_HAVE_SIZEOF". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -#include - -PROGRAM H5_test_buildiface - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - -! These values are valid REAL KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_RKIND - H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C integer) found during configure - H5_H5CONFIG_F_NUM_IKIND - H5_H5CONFIG_F_IKIND - - INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var - CHARACTER(LEN=2) :: chr2 -! subroutine rank of array being passed in - CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) -! rank definitions - CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & - ' ', & - ', DIMENSION(dims(1)) ', & - ', DIMENSION(dims(1),dims(2)) ', & - ', DIMENSION(dims(1),dims(2),dims(3)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & - /) -! pointer to the buffer - CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & - /) - -! Generate Fortran Check routines for the tests KIND interfaces. - - OPEN(11,FILE='tf_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/TH5_MISC_gen.F90',& -'!',& -'! NAME',& -'! TH5_MISC_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5_test_buildiface.F90 to handle checking ',& -'! in the tests all the detected KINDs.',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5_test_buildiface.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE TH5_MISC_gen" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - -! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs - - WRITE(11,'(A)') ' INTERFACE verify' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) - END DO - DO i = 1, num_ikinds - j = ikind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " MODULE PROCEDURE verify_character" - WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') ' INTERFACE check_real_eq' - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -! *************************** -! VALIDATE INTEGERS -! *************************** - DO i = 1, num_ikinds - k = ikind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE REALS -! *************************** - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' - WRITE(11,'(A)') ' total_error=total_error+1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) - - -! *********************************** -! TEST IF TWO REAL NUMBERS ARE EQUAL -! *********************************** - -! [1] The test performed is -! -! ABS( x - y ) < ( ULP * SPACING( MAX(ABS(x),ABS(y)) ) ) -! -! The numbers are considered equal if true -! -! The intrinsic function SPACING(x) returns the absolute spacing of numbers -! near the value of x, -! -! { EXPONENT(x)-DIGITS(x) -! { 2.0 for x /= 0 -! SPACING(x) = { -! { -! { TINY(x) for x == 0 -! -! The ULP optional argument scales the comparison: -! -! Unit of data precision. The acronym stands for "unit in -! the last place," the smallest possible increment or decrement -! that can be made using a machine's floating point arithmetic. -! A 0.5 ulp maximum error is the best you could hope for, since -! this corresponds to always rounding to the nearest representable -! floating-point number. Value must be positive - if a negative -! value is supplied, the absolute value is used. -! If not specified, the default value is 1. -! -! James Van Buskirk and James Giles suggested this method for floating -! point comparisons in the comp.lang.fortran newsgroup. -! -! Reference: [1] Paul van Delst, paul.vandelst@ssec.wisc.edu - - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') '!DEC$endif' - WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b,ulp)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: Rel' - WRITE(11,'(A)') ' INTEGER, OPTIONAL, INTENT( IN ) :: ulp' - WRITE(11,'(A)') ' IF ( PRESENT( ulp ) ) Rel = REAL( ABS(ulp), '//TRIM(ADJUSTL(chr2))//')' - WRITE(11,'(A)') ' Rel = 1.0_'//TRIM(ADJUSTL(chr2)) - WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS( a - b ) < ( Rel * SPACING( MAX(ABS(a),ABS(b)) ) )' - WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) - ENDDO - -! *************************** -! VALIDATE CHARACTER STRINGS -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER*(*) :: string' - WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - WRITE(11,'(A)') ' END SUBROUTINE verify_character' - -! *************************** -! VALIDATE LOGICAL -! *************************** - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' - WRITE(11,'(A)') '!DEC$endif' -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' - WRITE(11,'(A)') ' LOGICAL :: value, correct_value' - WRITE(11,'(A)') ' INTEGER :: total_error' - WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' - WRITE(11,'(A)') ' total_error = total_error + 1' - WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' - WRITE(11,'(A)') ' ENDIF' - - WRITE(11,'(A)') ' END SUBROUTINE verify_logical' - - WRITE(11,'(A)') "END MODULE TH5_MISC_gen" - - CLOSE(11) - -END PROGRAM H5_test_buildiface - - - diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 608b1e9..735ab7a 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -36,12 +36,40 @@ else AM_LDFLAGS+=-static endif +# Check if the compiler supports the Fortran 2003 standard +# which should include the intrinsic module iso_c_binding +if FORTRAN_2003_CONDITIONAL_F + ff_PREFIX = F03 +else + ff_PREFIX = F90 +endif + # Our main targets, the tests themselves -TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 +TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 + +if FORTRAN_2003_CONDITIONAL_F + TEST_PROG += fortranlib_test_F03 +endif check_PROGRAMS=$(TEST_PROG) -libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c +if FORTRAN_HAVE_STORAGE_SIZE +if FORTRAN_HAVE_C_SIZEOF + libh5test_fortran_la_SOURCES = tf_F08.f90 +else + libh5test_fortran_la_SOURCES = tf_F03.f90 +endif +else +if FORTRAN_2003_CONDITIONAL_F + libh5test_fortran_la_SOURCES = tf_F03.f90 +else + libh5test_fortran_la_SOURCES = tf_F90.f90 +endif +endif + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +libh5test_fortran_la_SOURCES += tf.f90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -51,11 +79,13 @@ fortranlib_test_CFLAGS=$(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ fortranlib_test_1_8.f90 -fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 +if FORTRAN_2003_CONDITIONAL_F + fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 +endif fflush1_SOURCES=fflush1.f90 @@ -76,32 +106,13 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) tf_gen.F90; \ + $(RM) *.$(F9XMODEXT); \ fi # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) FORTRAN_API=yes -# helper program we need to build. -noinst_PROGRAMS = H5_test_buildiface - -# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated -# with them. - -tf_gen.F90: H5_test_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) - -# H5_test_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. - -H5_test_buildiface_SOURCES = H5_test_buildiface.F90 - -# The build of the H5_test_buildiface does depend on any libraries, so set it -# to nothing. - -H5_test_buildiface_LDADD = - # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 4e9bbd6..4ec1ad5 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -14,7 +14,6 @@ @SET_MAKE@ - VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -88,9 +87,9 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -check_PROGRAMS = $(am__EXEEXT_1) -noinst_PROGRAMS = H5_test_buildiface$(EXEEXT) -TESTS = $(am__EXEEXT_1) +@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = fortranlib_test_F03 +check_PROGRAMS = $(am__EXEEXT_2) +TESTS = $(am__EXEEXT_2) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ @@ -98,25 +97,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_fortran_la_LIBADD = -am_libh5test_fortran_la_OBJECTS = tf_gen.lo tf.lo t.lo +am__libh5test_fortran_la_SOURCES_DIST = tf_F90.f90 tf.f90 t.c \ + tf_F03.f90 tf_F08.f90 +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F90.lo \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \ +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -am__EXEEXT_1 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ - fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) \ - fortranlib_test_F03$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_H5_test_buildiface_OBJECTS = H5_test_buildiface.$(OBJEXT) -H5_test_buildiface_OBJECTS = $(am_H5_test_buildiface_OBJECTS) -H5_test_buildiface_DEPENDENCIES = +@FORTRAN_2003_CONDITIONAL_F_TRUE@am__EXEEXT_1 = \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03$(EXEEXT) +am__EXEEXT_2 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ + fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) $(am__EXEEXT_1) am_fflush1_OBJECTS = fflush1.$(OBJEXT) fflush1_OBJECTS = $(am_fflush1_OBJECTS) fflush1_LDADD = $(LDADD) @@ -151,10 +159,18 @@ fortranlib_test_1_8_OBJECTS = $(am_fortranlib_test_1_8_OBJECTS) fortranlib_test_1_8_LDADD = $(LDADD) fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ $(LIBH5F) $(LIBHDF5) -am_fortranlib_test_F03_OBJECTS = tH5E_F03.$(OBJEXT) tH5F_F03.$(OBJEXT) \ - tH5L_F03.$(OBJEXT) tH5O_F03.$(OBJEXT) tH5P_F03.$(OBJEXT) \ - tH5T_F03.$(OBJEXT) tHDF5_F03.$(OBJEXT) \ - fortranlib_test_F03.$(OBJEXT) +am__fortranlib_test_F03_SOURCES_DIST = tH5E_F03.f90 tH5F_F03.f90 \ + tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 \ + tHDF5_F03.f90 fortranlib_test_F03.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = \ +@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) \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tHDF5_F03.$(OBJEXT) \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03.$(OBJEXT) fortranlib_test_F03_OBJECTS = $(am_fortranlib_test_F03_OBJECTS) fortranlib_test_F03_LDADD = $(LDADD) fortranlib_test_F03_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ @@ -171,28 +187,10 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_FCFLAGS) $(FCFLAGS) -AM_V_PPFC = $(am__v_PPFC_@AM_V@) -am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) -am__v_PPFC_0 = @echo " PPFC " $@; -am__v_PPFC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -218,14 +216,21 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libh5test_fortran_la_SOURCES) \ - $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ - $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ - $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) -DIST_SOURCES = $(libh5test_fortran_la_SOURCES) \ - $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) +DIST_SOURCES = $(am__libh5test_fortran_la_SOURCES_DIST) \ + $(fflush1_SOURCES) $(fflush2_SOURCES) \ + $(fortranlib_test_SOURCES) $(fortranlib_test_1_8_SOURCES) \ + $(am__fortranlib_test_F03_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -517,21 +522,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -541,12 +539,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -588,18 +587,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -745,10 +732,39 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.raw # The Fortran test library noinst_LTLIBRARIES = libh5test_fortran.la +@FORTRAN_2003_CONDITIONAL_F_FALSE@ff_PREFIX = F90 + +# Check if the compiler supports the Fortran 2003 standard +# which should include the intrinsic module iso_c_binding +@FORTRAN_2003_CONDITIONAL_F_TRUE@ff_PREFIX = F03 # Our main targets, the tests themselves -TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 -libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c +TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ + $(am__append_2) + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F90.f90 \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ +@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F08.f90 \ +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ +@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -757,11 +773,11 @@ fortranlib_test_CFLAGS = $(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ fortranlib_test_1_8.f90 -fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 +@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 @@ -774,14 +790,6 @@ MOSTLYCLEANFILES = *.tmp # from tests in conclude.am) FORTRAN_API = yes -# H5_test_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. -H5_test_buildiface_SOURCES = H5_test_buildiface.F90 - -# The build of the H5_test_buildiface does depend on any libraries, so set it -# to nothing. -H5_test_buildiface_LDADD = - # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -804,7 +812,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -860,19 +868,6 @@ clean-checkPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -H5_test_buildiface$(EXEEXT): $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_DEPENDENCIES) $(EXTRA_H5_test_buildiface_DEPENDENCIES) - @rm -f H5_test_buildiface$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_LDADD) $(LIBS) - fflush1$(EXEEXT): $(fflush1_OBJECTS) $(fflush1_DEPENDENCIES) $(EXTRA_fflush1_DEPENDENCIES) @rm -f fflush1$(EXEEXT) $(AM_V_FCLD)$(FCLINK) $(fflush1_OBJECTS) $(fflush1_LDADD) $(LIBS) @@ -901,15 +896,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t.Plo@am__quote@ -.F90.o: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< - -.F90.obj: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.F90.lo: - $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< - .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1302,7 +1288,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local +all-am: Makefile $(LTLIBRARIES) all-local installdirs: install: install-am install-exec: install-exec-am @@ -1341,7 +1327,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1414,19 +1400,19 @@ uninstall-am: .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-local \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am + clean-local clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-local distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am # @@ -1467,15 +1453,9 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) tf_gen.F90; \ + $(RM) *.$(F9XMODEXT); \ fi -# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated -# with them. - -tf_gen.F90: H5_test_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) - # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90 index 4230832..04ce439 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.f90 @@ -27,151 +27,152 @@ ! !***** -PROGRAM FFLUSH2EXAMPLE - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" - CHARACTER(LEN=80) :: fix_filename - - ! - !data space rank and dimensions - ! - INTEGER, PARAMETER :: NX = 4 - INTEGER, PARAMETER :: NY = 5 - - ! - ! File identifiers - ! - INTEGER(HID_T) :: file_id - - ! - ! Group identifier - ! - INTEGER(HID_T) :: gid - - ! - ! dataset identifier - ! - INTEGER(HID_T) :: dset_id - - - ! - ! data type identifier - ! - INTEGER(HID_T) :: dtype_id - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !general purpose integer - ! - INTEGER :: i, j, total_error = 0 - - ! - !data buffers - ! - INTEGER, DIMENSION(NX,NY) :: data_out - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - data_dims(1) = NX - data_dims(2) = NY - - ! - !Initialize FORTRAN predifined datatypes - ! - CALL h5open_f(error) - CALL check("h5open_f",error,total_error) - - ! - !Open the file. - ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) - IF (error .NE. 0) THEN - WRITE(*,*) "Cannot modify filename" - CALL h5_exit_f (1) - ENDIF - CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error,total_error) - - ! - !Open the dataset - ! - CALL h5dopen_f(file_id, "/D", dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's data type. - ! - CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f",error,total_error) - ! - !Read the dataset. - ! - CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) - CALL check("h5dread_f",error,total_error) - - ! - !Print the dataset. - ! - DO i = 1, NX - WRITE(*,*) (data_out(i,j), j = 1, NY) - END DO - ! - !result of the print statement - ! - ! 0, 1, 2, 3, 4 - ! 1, 2, 3, 4, 5 - ! 2, 3, 4, 5, 6 - ! 3, 4, 5, 6, 7 - - ! - !Open the group. - ! - CALL h5gopen_f(file_id, "G", gid, error) - CALL check("h5gopen_f",error,total_error) - - ! - !In case error happens, exit. - ! - IF (error == -1) CALL h5_exit_f (1) - ! - !Close the datatype - ! - CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the group. - ! - CALL h5gclose_f(gid, error) - CALL check("h5gclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !Close FORTRAN predifined datatypes - ! - CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL h5close_f(error) - CALL check("h5close_types_f",error,total_error) - - ! if errors detected, exit with non-zero code. - IF (total_error .ne. 0) CALL h5_exit_f (1) - -END PROGRAM FFLUSH2EXAMPLE + PROGRAM FFLUSH2EXAMPLE + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" + CHARACTER(LEN=80) :: fix_filename + + ! + !data space rank and dimensions + ! + INTEGER, PARAMETER :: NX = 4 + INTEGER, PARAMETER :: NY = 5 + + ! + ! File identifiers + ! + INTEGER(HID_T) :: file_id + + ! + ! Group identifier + ! + INTEGER(HID_T) :: gid + + ! + ! dataset identifier + ! + INTEGER(HID_T) :: dset_id + + + ! + ! data type identifier + ! + INTEGER(HID_T) :: dtype_id + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !general purpose integer + ! + INTEGER :: i, j, total_error = 0 + + ! + !data buffers + ! + INTEGER, DIMENSION(NX,NY) :: data_out + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + data_dims(1) = NX + data_dims(2) = NY + + ! + !Initialize FORTRAN predifined datatypes + ! + CALL h5open_f(error) + CALL check("h5open_f",error,total_error) + + ! + !Open the file. + ! + CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + if (error .ne. 0) then + write(*,*) "Cannot modify filename" + CALL h5_exit_f (1) + endif + CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error,total_error) + + ! + !Open the dataset + ! + CALL h5dopen_f(file_id, "/D", dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's data type. + ! + CALL h5dget_type_f(dset_id, dtype_id, error) + CALL check("h5dget_type_f",error,total_error) + + ! + !Read the dataset. + ! + CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) + CALL check("h5dread_f",error,total_error) + + ! + !Print the dataset. + ! + do i = 1, NX + write(*,*) (data_out(i,j), j = 1, NY) + end do +! +!result of the print statement +! +! 0, 1, 2, 3, 4 +! 1, 2, 3, 4, 5 +! 2, 3, 4, 5, 6 +! 3, 4, 5, 6, 7 + + ! + !Open the group. + ! + CALL h5gopen_f(file_id, "G", gid, error) + CALL check("h5gopen_f",error,total_error) + + ! + !In case error happens, exit. + ! + IF (error == -1) CALL h5_exit_f (1) + ! + !Close the datatype + ! + CALL h5tclose_f(dtype_id, error) + CALL check("h5tclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the group. + ! + CALL h5gclose_f(gid, error) + CALL check("h5gclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !Close FORTRAN predifined datatypes + ! + CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL h5close_f(error) + CALL check("h5close_types_f",error,total_error) + + ! if errors detected, exit with non-zero code. + IF (total_error .ne. 0) CALL h5_exit_f (1) + + END PROGRAM FFLUSH2EXAMPLE diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90 index 5b814fa..e3b3b2a 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.f90 @@ -29,10 +29,6 @@ !***** MODULE TH5A - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE attribute_test(cleanup, total_error) @@ -40,6 +36,9 @@ CONTAINS ! h5acreate_f, h5awrite_f, h5aclose_f,h5aread_f, h5aopen_name_f, ! h5aget_name_f,h5aget_space_f, h5aget_type_f, ! + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -310,7 +309,7 @@ CONTAINS ! CALL h5aget_storage_size_f(attr_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) -! CALL verify("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) +! CALL VERIFY("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) CALL h5aget_storage_size_f(attr2_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) ! CALL verify("h5aget_storage_size_f",attr_storage,1,total_error) @@ -518,15 +517,21 @@ CONTAINS data_dims(1) = 1 CALL h5aread_f(attr3_id, H5T_NATIVE_DOUBLE, aread_double_data, data_dims, error) CALL check("h5aread_f",error,total_error) - CALL VERIFY("Read back double attrbute is wrong", aread_double_data(1),3.459_Fortran_DOUBLE,total_error) + IF( .NOT.dreal_eq( REAL(aread_double_data(1),dp), 3.459_dp) )THEN + WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1) + total_error = total_error + 1 + ENDIF ! !read the real attribute data back to memory ! data_dims(1) = 1 CALL h5aread_f(attr4_id, H5T_NATIVE_REAL, aread_real_data, data_dims, error) CALL check("h5aread_f",error,total_error) - CALL VERIFY("Read back real attrbute is wrong", aread_real_data(1),4.0,total_error) + IF( .NOT.dreal_eq( REAL(aread_real_data(1),dp), 4.0_dp) )THEN + WRITE(*,*) "Read back real attrbute is wrong", aread_real_data(1) + total_error = total_error + 1 + ENDIF ! !read the Integer attribute data back to memory ! diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90 index c70e288..8e20100 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.f90 @@ -32,10 +32,6 @@ !***** MODULE TH5A_1_8 - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE attribute_test_1_8(cleanup, total_error) @@ -45,6 +41,8 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) ! H5Pset_shared_mesg_index_f ! + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -201,6 +199,8 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Needed for get_info_by_name + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE @@ -350,7 +350,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) @@ -363,7 +363,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) END DO @@ -389,7 +389,8 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) !** Tests storing attribute with "null" dataspace !** !*************************************************************** - + USE HDF5 + USE TH5_MISC IMPLICIT NONE @@ -472,22 +473,22 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL H5Sextent_equal_f(attr_sid, null_sid, equal, error) CALL check("H5Sextent_equal_f",error,total_error) - CALL verify("H5Sextent_equal_f",equal,.TRUE.,total_error) + CALL Verifylogical("H5Sextent_equal_f",equal,.TRUE.,total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL verify("h5aget_storage_size_f",INT(storage_size),0,total_error) + CALL VERIFY("h5aget_storage_size_f",INT(storage_size),0,total_error) CALL h5aget_info_f(attr, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f", error, total_error) ! Check the attribute's information - CALL verify("h5aget_info_f.corder",corder,0,total_error) + CALL VERIFY("h5aget_info_f.corder",corder,0,total_error) - CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) CALL h5aclose_f(attr,error) CALL check("h5aclose_f",error,total_error) @@ -519,6 +520,9 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(SIZE_T), PARAMETER :: NAME_BUF_SIZE = 7 @@ -731,6 +735,9 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE LOGICAL :: new_format @@ -852,24 +859,24 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, 0_hsize_t, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) + CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,hsize_t), & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) + CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) + CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) CALL h5aget_name_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & hzero, tmpname, error, size, lapl_id=H5P_DEFAULT_F) - CALL verify("h5aget_name_by_idx_f",error,minusone,total_error) + CALL VERIFY("h5aget_name_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form @@ -934,6 +941,9 @@ END SUBROUTINE test_attr_info_by_idx SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER :: error, total_error @@ -964,7 +974,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing creation order @@ -973,12 +983,12 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & n, tmpname, error, NAME_BUF_SIZE) CALL check("h5aget_name_by_idx_f",error,total_error) - CALL verify("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) + CALL VERIFY("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) IF(attrname.NE.tmpname)THEN error = -1 ENDIF - CALL verify("h5aget_name_by_idx_f",error,0,total_error) + CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) ! Don't test "native" order if there is no creation order index, since ! * there's not a good way to easily predict the attribute's order in the name @@ -989,13 +999,13 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,0,total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) ! Verify the information for new attribute, in native creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing native order CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, & @@ -1005,14 +1015,14 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) WRITE(*,*) "ERROR: attribute name size wrong!" error = -1 ENDIF - CALL verify("h5aget_name_by_idx_f",error,0,total_error) + CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) END IF CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,0,total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & @@ -1023,41 +1033,41 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,0,total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,0,total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) END SUBROUTINE attr_info_by_idx_check @@ -1072,6 +1082,9 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -1358,7 +1371,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! Check size of file !filesize = h5_get_file_size(FILENAME); - !verify(filesize, empty_filesize, "h5_get_file_size"); + !VERIFY(filesize, empty_filesize, "h5_get_file_size"); ENDDO ! Close dataspaces @@ -1379,6 +1392,9 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -1502,7 +1518,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deleting non-existant attribute !EP CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, 0_HSIZE_T,error, lapl_id=H5P_DEFAULT_F) CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, hzero,error, lapl_id=H5P_DEFAULT_F) - CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) + CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form DO u = 0, max_compact - 1 @@ -1530,7 +1546,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for out of bound deletions CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) - CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) + CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO @@ -1568,10 +1584,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL verify("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) + CALL VERIFY("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1588,7 +1604,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL verify("h5aget_name_by_idx_f",error,0,total_error) + CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) ENDDO ! Delete last attribute @@ -1639,7 +1655,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDDO ! Check for out of bound deletion CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error) - CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) + CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Work on all the datasets @@ -1668,10 +1684,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) f_corder_valid, corder, cset, data_size, error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL verify("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) + CALL VERIFY("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1689,7 +1705,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL verify("h5aget_name_by_idx_f",error,0,total_error) + CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) ENDDO @@ -1700,7 +1716,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deletion on empty attribute storage again CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) - CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) + CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Close Datasets @@ -1737,6 +1753,9 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2011,6 +2030,9 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) !** !*************************************************************** + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2147,7 +2169,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) ! Check size of file ! filesize = h5_get_file_size(FILENAME); - ! verify(filesize, empty_filesize, "h5_get_file_size") + ! VERIFY(filesize, empty_filesize, "h5_get_file_size") END SUBROUTINE test_attr_dense_open @@ -2160,6 +2182,9 @@ END SUBROUTINE test_attr_dense_open SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -2202,7 +2227,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_F", error, total_error) - CALL verify("H5Aread_F", value, u, total_error) + CALL VERIFY("H5Aread_F", value, u, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2234,7 +2259,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) data_dims(1) = 1 CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_f", error, total_error) - CALL verify("H5Aread_f", value, u, total_error) + CALL VERIFY("H5Aread_f", value, u, total_error) ! Close attribute @@ -2253,6 +2278,9 @@ END SUBROUTINE test_attr_dense_verify SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2286,14 +2314,14 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Get creation order indexing on object CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Setting invalid combination of a attribute order creation order indexing on should fail CALL H5Pset_attr_creation_order_f(dcpl, H5P_CRT_ORDER_INDEXED_F, error) - CALL verify("H5Pset_attr_creation_order_f",error , minusone, total_error) + CALL VERIFY("H5Pset_attr_creation_order_f",error , minusone, total_error) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Set attribute creation order tracking & indexing for object CALL h5pset_attr_creation_order_f(dcpl, IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), error) @@ -2301,7 +2329,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error) ! Create dataspace for dataset @@ -2346,7 +2374,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Query the attribute creation properties CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error ) ! Close property list @@ -2373,6 +2401,9 @@ END SUBROUTINE test_attr_corder_create_basic SUBROUTINE test_attr_basic_write(fapl, total_error) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl @@ -2481,7 +2512,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL h5aget_storage_size_f(attr, attr_size, error) CALL check("h5aget_storage_size_f",error,total_error) -!EP CALL verify("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) +!EP CALL VERIFY("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) ! Read attribute information immediately, without closing attribute @@ -2490,7 +2521,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) ! Verify values read in DO i = 1, ATTR1_DIM1 - CALL verify('h5aread_f',attr_data1(i),read_data1(i), total_error) + CALL VERIFY('h5aread_f',attr_data1(i),read_data1(i), total_error) ENDDO ! CLOSE attribute @@ -2539,7 +2570,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) size = 18 CALL H5Aget_name_f(attr, size, chr_exact_size, error) CALL check('H5Aget_name_f',error,total_error) - CALL verify('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) + CALL VerifyString('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2568,6 +2599,9 @@ END SUBROUTINE test_attr_basic_write SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -2622,19 +2656,19 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) WRITE(chr5,'(I5.5)') u attrname = 'attr '//chr5 CALL H5Aexists_f( gid, attrname, exists, error) - CALL verify("H5Aexists",exists,.FALSE.,total_error ) + CALL VerifyLogical("H5Aexists",exists,.FALSE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error, lapl_id = H5P_DEFAULT_F) - CALL verify("H5Aexists_by_name_f",exists,.FALSE.,total_error ) + CALL VerifyLogical("H5Aexists_by_name_f",exists,.FALSE.,total_error ) CALL h5acreate_f(gid, attrname, H5T_NATIVE_INTEGER, sid, aid, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL verify("H5Aexists",exists,.TRUE.,total_error ) + CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) attr_data1(1) = u data_dims(1) = 1 @@ -2646,10 +2680,10 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) CALL check("h5aclose_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL verify("H5Aexists",exists,.TRUE.,total_error ) + CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) ENDDO @@ -2683,6 +2717,9 @@ END SUBROUTINE test_attr_many SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fid CHARACTER(LEN=*), INTENT(IN) :: dsetname @@ -2720,13 +2757,13 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check that the object's attributes are correct - CALL verify("h5aget_info_f.corder",corder,u,total_error) - CALL verify("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) - CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("h5aget_info_f.corder",corder,u,total_error) + CALL Verifylogical("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) + CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) ! Close attribute @@ -2741,12 +2778,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL verify("h5aget_info_f",corder,u,total_error) - CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("h5aget_info_f",corder,u,total_error) + CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) @@ -2763,12 +2800,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL verify("h5aget_info_f",corder,u,total_error) - CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("h5aget_info_f",corder,u,total_error) + CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90 index b5febb3..c0eb8f9 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.f90 @@ -36,477 +36,503 @@ ! MODULE TH5D - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS - SUBROUTINE datasettest(cleanup, total_error) - - IMPLICIT NONE - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name - CHARACTER(LEN=80) :: fix_filename - CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: null_dset ! Null dataset identifier - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - INTEGER(HID_T) :: null_dspace ! Null dataspace identifier - INTEGER(HID_T) :: dtype_id ! Datatype identifier - - 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 :: i, j !general purpose integers - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim - INTEGER :: null_dset_data = 1 ! null data - INTEGER :: flag ! Space allocation status - - ! - ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f", error, total_error) - ! - ! Create the dataspace. - ! - CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) - ! - ! Create null dataspace. - ! - CALL h5screate_f(H5S_NULL_F, null_dspace, 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) - ! - ! Create the null dataset. - ! - CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, null_dset, 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) - ! - ! Write null dataset. Nothing can be written. - ! - null_data_dim(1) = 1 - CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) - CALL h5dclose_f(null_dset, 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) - CALL h5sclose_f(null_dspace, error) - CALL check("h5sclose_f", error, total_error) - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_error) - ! - ! Open the existing file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) - ! - ! Open the existing dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) - CALL h5dopen_f(file_id, null_dsetname, null_dset, error) - CALL check("h5dopen_f", error, total_error) - - ! Test whether space has been allocated for a dataset - CALL h5dget_space_status_f(dset_id, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) - - CALL h5dget_space_status_f(null_dset, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) - ! - ! Read the null dataset. Nothing should be read. - ! - CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" + SUBROUTINE datasettest(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name + CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name + CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: null_dset ! Null dataset identifier + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + INTEGER(HID_T) :: null_dspace ! Null dataspace identifier + INTEGER(HID_T) :: dtype_id ! Datatype identifier + + + 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 :: i, j !general purpose integers + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim + INTEGER :: null_dset_data = 1 ! null data + INTEGER :: flag ! Space allocation status + + ! + ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f", error, total_error) + + + ! + ! Create the dataspace. + ! + CALL h5screate_simple_f(rank, dims, dspace_id, error) + CALL check("h5screate_simple_f", error, total_error) + ! + ! Create null dataspace. + ! + CALL h5screate_f(H5S_NULL_F, null_dspace, 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) + ! + ! Create the null dataset. + ! + CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, & + null_dset, 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) + ! + ! Write null dataset. Nothing can be written. + ! + null_data_dim(1) = 1 + CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) + CALL h5dclose_f(null_dset, 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) + CALL h5sclose_f(null_dspace, error) + CALL check("h5sclose_f", error, total_error) + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f", error, total_error) + + ! + ! Open the existing file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) + CALL check("h5fopen_f", error, total_error) + + ! + ! Open the existing dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f", error, total_error) + CALL h5dopen_f(file_id, null_dsetname, null_dset, error) + CALL check("h5dopen_f", error, total_error) + + ! Test whether space has been allocated for a dataset + CALL h5dget_space_status_f(dset_id, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) + + CALL h5dget_space_status_f(null_dset, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) + ! + ! Read the null dataset. Nothing should be read. + ! + CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" + END IF + end do + end do + + ! + ! Check if no change to null_dset_data + ! + IF (null_dset_data .NE. 1) THEN + write(*, *) "null dataset test error occured" END IF - END DO - END DO - ! - ! Check if no change to null_dset_data - ! - IF (null_dset_data .NE. 1) THEN - WRITE(*, *) "null dataset test error occured" - END IF - ! - ! End access to the dataset and release resources used by it. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) - CALL h5dclose_f(null_dset, 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) - IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL check("h5_cleanup_f", error, total_error) - - RETURN - END SUBROUTINE datasettest - + + ! + ! End access to the dataset and release resources used by it. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f", error, total_error) + CALL h5dclose_f(null_dset, 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) + if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) + + RETURN + END SUBROUTINE datasettest + ! !the following subroutine tests h5dextend_f functionality ! - SUBROUTINE extenddsettest(cleanup, total_error) - - IMPLICIT NONE - - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - ! - !the dataset is stored in file "extf.h5" - ! - CHARACTER(LEN=4), PARAMETER :: filename = "extf" - CHARACTER(LEN=80) :: fix_filename - - ! - !dataset name is "ExtendibleArray" - ! - CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" - - ! - !dataset rank is 2 - ! - 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 creatation property identifier - - ! - !dataset dimensions at creation time - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) - - ! - !data dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) - - ! - !Maximum dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: maxdims - - ! - !data arrays for reading and writing - ! - INTEGER, DIMENSION(10,3) :: data_in, data_out - - ! - !Size of data in the file - ! - INTEGER(HSIZE_T), DIMENSION(2) :: size - - ! - !general purpose integer - ! - INTEGER :: i, j - INTEGER(HSIZE_T) :: ih, jh - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !Variables used in reading data back - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr - INTEGER :: rankr - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - - ! - !data initialization - ! - DO i = 1, 10 - DO j = 1, 3 - data_in(i,j) = 2 - END DO - END DO - - ! - !Initialize FORTRAN predifined datatypes - ! + SUBROUTINE extenddsettest(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + ! + !the dataset is stored in file "extf.h5" + ! + CHARACTER(LEN=4), PARAMETER :: filename = "extf" + CHARACTER(LEN=80) :: fix_filename + + ! + !dataset name is "ExtendibleArray" + ! + CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" + + ! + !dataset rank is 2 + ! + 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 creatation property identifier + + ! + !dataset dimensions at creation time + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) + + ! + !data dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) + + ! + !Maximum dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: maxdims + + ! + !data arrays for reading and writing + ! + INTEGER, DIMENSION(10,3) :: data_in, data_out + + ! + !Size of data in the file + ! + INTEGER(HSIZE_T), DIMENSION(2) :: size + + ! + !general purpose integer + ! + INTEGER :: i, j + INTEGER(HSIZE_T) :: ih, jh + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !Variables used in reading data back + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr + INTEGER :: rankr + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + + ! + !data initialization + ! + do i = 1, 10 + do j = 1, 3 + data_in(i,j) = 2 + end do + end do + + ! + !Initialize FORTRAN predifined datatypes + ! ! CALL h5init_types_f(error) ! CALL check("h5init_types_f",error,total_error) - ! - !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error,total_error) - - ! - !Create the data space with unlimited dimensions. - ! - maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) - - CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Modify dataset creation properties, i.e. enable chunking - ! - CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) - CALL check("h5pcreat_f",error,total_error) - - CALL h5pset_chunk_f(crp_list, RANK, dims1, error) - CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) - - ! - !Extend the dataset. This call assures that dataset is 3 x 3. - ! - SIZE(1) = 3 - SIZE(2) = 3 - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - - ! - !Extend the dataset. Dataset becomes 10 x 3. - ! - SIZE(1) = 10; - SIZE(2) = 3; - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - ! - !Write the data of size 10X3 to the extended dataset. - ! - data_dims(1) = 10 - data_dims(2) = 3 - CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) - CALL check("h5dwrite_f",error,total_error) - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !read the data back - ! - !Open the file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("hfopen_f",error,total_error) - - ! - !Open the dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's dataspace handle. - ! - CALL h5dget_space_f(dset_id, dataspace, error) - CALL check("h5dget_space_f",error,total_error) - - ! - !Get dataspace's rank. - ! - CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) - CALL check("h5sget_simple_extent_ndims_f",error,total_error) - IF (rankr .NE. RANK) THEN - WRITE(*,*) "dataset rank error occured" - STOP - END IF - - ! - !Get dataspace's dimensinons. - ! - CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) - CALL check("h5sget_simple_extent_dims_f",error,total_error) - IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN - WRITE(*,*) "dataset dimensions error occured" - STOP - END IF - - ! - !Get creation property list. - ! - CALL h5dget_create_plist_f(dset_id, crp_list, error) - CALL check("h5dget_create_plist_f",error,total_error) - - - ! - !create memory dataspace. - ! - CALL h5screate_simple_f(rankr, dimsr, memspace, error) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Read data - ! - CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, memspace, dataspace) - CALL check("h5dread_f",error,total_error) - - - ! - !Compare the data. - ! - DO ih = 1, dims1(1) - DO jh = 1, dims1(2) - IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN - WRITE(*, *) "extend dataset test error occured" - WRITE(*, *) "read value is not the same as the written values" + ! + !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error,total_error) + + + ! + !Create the data space with unlimited dimensions. + ! + maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) + + CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Modify dataset creation properties, i.e. enable chunking + ! + CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) + CALL check("h5pcreat_f",error,total_error) + + CALL h5pset_chunk_f(crp_list, RANK, dims1, error) + CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) + + ! + !Extend the dataset. This call assures that dataset is 3 x 3. + ! + size(1) = 3 + size(2) = 3 + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + + ! + !Extend the dataset. Dataset becomes 10 x 3. + ! + size(1) = 10; + size(2) = 3; + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + ! + !Write the data of size 10X3 to the extended dataset. + ! + data_dims(1) = 10 + data_dims(2) = 3 + CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) + CALL check("h5dwrite_f",error,total_error) + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !read the data back + ! + !Open the file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("hfopen_f",error,total_error) + + ! + !Open the dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's dataspace handle. + ! + CALL h5dget_space_f(dset_id, dataspace, error) + CALL check("h5dget_space_f",error,total_error) + + ! + !Get dataspace's rank. + ! + CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) + CALL check("h5sget_simple_extent_ndims_f",error,total_error) + IF (rankr .NE. RANK) then + write(*,*) "dataset rank error occured" + stop + END IF + + ! + !Get dataspace's dimensinons. + ! + CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) + CALL check("h5sget_simple_extent_dims_f",error,total_error) + IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN + write(*,*) "dataset dimensions error occured" + stop END IF - END DO - END DO - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the memspace for the dataset. - ! - CALL h5sclose_f(memspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - 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 extenddsettest + + ! + !Get creation property list. + ! + CALL h5dget_create_plist_f(dset_id, crp_list, error) + CALL check("h5dget_create_plist_f",error,total_error) + + + ! + !create memory dataspace. + ! + CALL h5screate_simple_f(rankr, dimsr, memspace, error) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Read data + ! + CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & + memspace, dataspace) + CALL check("h5dread_f",error,total_error) + + + ! + !Compare the data. + ! + do ih = 1, dims1(1) + do jh = 1, dims1(2) + IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN + write(*, *) "extend dataset test error occured" + write(*, *) "read value is not the same as the written values" + END IF + end do + end do + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the memspace for the dataset. + ! + CALL h5sclose_f(memspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + 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 extenddsettest END MODULE TH5D diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.f90 index 63e70a3..a7d45f2 100644 --- a/fortran/test/tH5E_F03.f90 +++ b/fortran/test/tH5E_F03.f90 @@ -36,9 +36,6 @@ ! ***************************************** MODULE test_my_hdf5_error_handler - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN CONTAINS @@ -52,6 +49,8 @@ CONTAINS ! This error function handle works with only version 2 error stack + USE HDF5 + USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -75,6 +74,8 @@ CONTAINS ! This error function handle works with only version 2 error stack + USE HDF5 + USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -101,6 +102,8 @@ CONTAINS SUBROUTINE test_error(total_error) + USE HDF5 + USE TH5_MISC USE ISO_C_BINDING USE test_my_hdf5_error_handler @@ -144,15 +147,15 @@ SUBROUTINE test_error(total_error) ! Create the erring dataset CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL verify("h5dcreate_f", error, -1, total_error) + CALL VERIFY("h5dcreate_f", error, -1, total_error) -!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) -!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) +!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) +!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) !!$ ! Test enabling and disabling default printing !!$ !!$ CALL H5Eget_auto_f(H5E_DEFAULT_F, func1, f_ptr1, error) -!!$ CALL verify("H5Eget_auto_f", error, 0, total_error) +!!$ CALL VERIFY("H5Eget_auto_f", error, 0, total_error) ! PRINT*,c_associated(f_ptr1) @@ -184,7 +187,7 @@ SUBROUTINE test_error(total_error) CALL H5Eset_auto_f(1, error, H5E_DEFAULT_F, func, f_ptr) CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL verify("h5dcreate_f", error, -1, total_error) + CALL VERIFY("h5dcreate_f", error, -1, total_error) ! turn on automatic printing with h5eprint_f which prints an error stack in the default manner. diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90 index 9e23d19..c878a59 100644 --- a/fortran/test/tH5F_F03.f90 +++ b/fortran/test/tH5F_F03.f90 @@ -38,17 +38,16 @@ MODULE TH5F_F03 - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - USE ISO_C_BINDING - CONTAINS SUBROUTINE test_get_file_image(total_error) ! ! Tests the wrapper for h5fget_file_image ! + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error ! returns error @@ -129,8 +128,8 @@ SUBROUTINE test_get_file_image(total_error) 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) + 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)) diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90 index ddc3736..ab75163 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.f90 @@ -31,13 +31,11 @@ MODULE TH5G_1_8 - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE group_test(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -141,6 +139,9 @@ END SUBROUTINE group_test SUBROUTINE group_info(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -268,7 +269,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Check for out of bound query by index on empty group, should fail CALL H5Gget_info_by_idx_f(group_id, ".", H5_INDEX_NAME_F, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error) - CALL verify("H5Gget_info_by_idx_f", error, -1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", error, -1, total_error) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 @@ -286,29 +287,29 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_f", nlinks, 0, total_error) - CALL verify("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, 0, total_error) + CALL verifyLogical("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error, mounted=mounted) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) - CALL verify("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verifyLogical("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name", error, total_error) ! Check (new/empty) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) ! Create objects in new group created DO v = 0, u @@ -330,27 +331,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f",max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f",max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information IF(order.NE.H5_ITER_NATIVE_F)THEN @@ -358,17 +359,17 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(u,HSIZE_T), & storage_type, nlinks, max_corder, error,lapl_id=H5P_DEFAULT_F, mounted=mounted) CALL check("H5Gget_info_by_idx_f", error, total_error) - CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) ELSE CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error, mounted=mounted) - CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) CALL check("H5Gget_info_by_idx_f", error, total_error) ENDIF ! Check (new) group's information - CALL verify("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_idx_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_idx_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_idx_f", nlinks, u+1, total_error) ENDIF ! Close group created CALL H5Gclose_f(group_id2, error) @@ -379,27 +380,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(group_id, ".", storage_type, nlinks, max_corder, error, H5P_DEFAULT_F) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Create soft link in another group, to objects in main group valname = CORDER_GROUP_NAME//objname @@ -411,9 +412,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check soft link group's information - CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL verify("H5Gget_info_f", max_corder, u+1, total_error) - CALL verify("H5Gget_info_f", nlinks, u+1, total_error) + CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) + CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) ENDDO ! Close the groups @@ -455,6 +456,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE timestamps(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -487,7 +491,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL verify("H5Pget_obj_track_times",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times",track_times,.TRUE.,total_error) ! Set a non-default object timestamp setting CALL H5Pset_obj_track_times_f(gcpl_id, .FALSE., error) @@ -498,7 +502,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL verify("H5Pget_obj_track_times",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times",track_times,.FALSE.,total_error) ! Create file !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -529,10 +533,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) ! Query the object information for each group ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -589,10 +593,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) !!$ !!$ Query the object information for each group !!$ if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -649,6 +653,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE mklinks(fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -704,12 +711,12 @@ SUBROUTINE group_info(cleanup, fapl, total_error) error, H5P_DEFAULT_F) CALL check("H5Lget_info_f",error,total_error) -! CALL verify("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) +! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) - CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) - CALL verify("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) ! should be '/d1' + NULL character = 4 - CALL verify("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) ! Create a symbolic link to something that doesn't exist @@ -742,6 +749,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE test_move_preserves(fapl_id, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl_id @@ -788,14 +798,14 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL verify("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) + CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) CALL H5Pset_link_creation_order_f(fcpl_id, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_link_creation_order_f", error, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL verify("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) + CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) ! Create file ! (with creation order tracking for the root group) @@ -825,10 +835,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR old_cset = cset - CALL verify("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) - CALL verify("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) + CALL VERIFY("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) + CALL VerifyLogical("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) old_corder = corder; - CALL verify("H5Lget_info_f",old_corder,0,total_error) + CALL VERIFY("H5Lget_info_f",old_corder,0,total_error) ! old_modification_time = oinfo.mtime; @@ -946,6 +956,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! SUBROUTINE lifecycle(cleanup, fapl2, total_error) + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl2 @@ -1091,6 +1105,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) SUBROUTINE cklinks(fapl, total_error) +! USE ISO_C_BINDING + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1128,10 +1146,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Lexists_f(file,"d1",Lexists, error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) CALL H5Lexists_f(file,"grp1/hard",Lexists, error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) ! Cleanup CALL H5Fclose_f(file,error) @@ -1158,6 +1176,9 @@ END SUBROUTINE cklinks ! SUBROUTINE delete_by_idx(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1273,7 +1294,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! Check for deletion on empty group CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) - CALL verify("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL VERIFY("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 ! Make name for link @@ -1298,7 +1319,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) - CALL verify("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL VERIFY("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Delete links from compact group @@ -1319,21 +1340,21 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Iget_type_f(grp, id_type, error) CALL check("H5Iget_type_f", error, total_error) - CALL verify("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) + CALL VERIFY("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) CALL H5Gclose_f(grp, error) CALL check("H5Gclose_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) + CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) - CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) IF(iorder.EQ.H5_ITER_INC_F)THEN - CALL verify("H5Lget_info_by_idx_f", corder, u+1, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error) ELSE - CALL verify("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) ENDIF - CALL verify("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) + CALL VERIFY("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) @@ -1350,7 +1371,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ ENDIF !!$ objname = 'fill '//chr2 !!$ PRINT*,objname, tmpname -!!$ CALL verify("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) +!!$ CALL verifyString("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) ENDDO ! Close the group @@ -1397,6 +1418,9 @@ END SUBROUTINE delete_by_idx SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: group_id @@ -1431,14 +1455,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, 0, total_error) ! Verify the link information for new link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL verify("H5Lget_info_by_idx_f", corder, n, total_error) + CALL VERIFY("H5Lget_info_by_idx_f", corder, n, total_error) ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN @@ -1457,21 +1481,21 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_small, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname_small)), tmpname_small(1:LEN(tmpname_small)), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! try it with the correct size CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname, error, size=size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname)), tmpname(1:LEN(tmpname)), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_big, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:7), tmpname_big(1:7), total_error) - CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! Try with a buffer set to small @@ -1498,6 +1522,9 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & SUBROUTINE test_lcpl(cleanup, fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1564,7 +1591,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- - CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) + CALL VERIFY("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) ! Create and commit a datatype with the default LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) @@ -1625,10 +1652,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & DO i = 1, 2 tmp1 = INT(dimsout(i)) tmp2 = INT(extend_dim(i)) - CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) tmp1 = INT(maxdimsout(i)) tmp2 = INT(dims(i)) - CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) ENDDO ! close data set @@ -1695,7 +1722,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Pget_char_encoding_f(lcpl_id, encoding, error) CALL check("H5Pget_char_encoding_f", error, total_error) - CALL verify("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) + CALL VERIFY("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "dataset2", & @@ -1717,7 +1744,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lexists_f(file_id,"/dataset2_link",Lexists, error) CALL check("H5Lexists",error, total_error) - CALL verify("H5Lexists", Lexists,.TRUE.,total_error) + CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) ! Check that its character encoding is ASCII CALL H5Lget_info_f(file_id, "/dataset2_link", & @@ -1807,6 +1834,9 @@ END SUBROUTINE test_lcpl SUBROUTINE objcopy(fapl, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1837,7 +1867,7 @@ SUBROUTINE objcopy(fapl, total_error) ! Verify object copy flags CALL H5Pget_copy_object_f(pid, cpy_flags, error) CALL check("H5Pget_copy_object_f",error, total_error) - CALL verify("H5Pget_copy_object_f", cpy_flags, flag, total_error) + CALL VERIFY("H5Pget_copy_object_f", cpy_flags, flag, total_error) !!$ !!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, @@ -1868,6 +1898,9 @@ END SUBROUTINE objcopy SUBROUTINE lapl_nlinks( fapl, total_error) + USE HDF5 + USE TH5_MISC + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -1939,7 +1972,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) - CALL verify("H5Pset_nlinks_f",INT(nlinks), 20, total_error) + CALL VERIFY("H5Pset_nlinks_f",INT(nlinks), 20, total_error) ! Open object through what is normally too many soft links using @@ -1951,7 +1984,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL verify("h5iget_name_f", TRIM(objname),"/soft17", total_error) + CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft17", total_error) ! Create group using soft link CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) @@ -1973,12 +2006,12 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pget_nlinks_f",error,total_error) - CALL verify("H5Pget_nlinks_f", INT(nlinks), 4, total_error) + CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 4, total_error) ! Try opening through what is now too many soft links CALL H5Oopen_f(fid,"soft5",gid,error,plist) - CALL verify("H5Oopen_f", error, -1, total_error) ! should fail + CALL VERIFY("H5Oopen_f", error, -1, total_error) ! should fail ! Open object through lesser soft link CALL H5Oopen_f(fid,"soft4",gid,error,plist) @@ -1987,7 +2020,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL verify("h5iget_name_f", TRIM(objname),"/soft4", total_error) + CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft4", total_error) ! Test other functions that should use a LAPL nlinks = 20 diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90 index 97c48c6..088b4eb 100644 --- a/fortran/test/tH5I.f90 +++ b/fortran/test/tH5I.f90 @@ -27,10 +27,6 @@ ! !***** MODULE TH5I - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN CONTAINS @@ -38,6 +34,8 @@ CONTAINS ! This subroutine tests following functionalities: h5iget_type_f + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -90,7 +88,7 @@ CONTAINS dtype = -1 CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL verify("H5Iis_valid_f", tri_ret, .FALSE., total_error) + CALL VerifyLogical("H5Iis_valid_f", tri_ret, .FALSE., total_error) ! Create a datatype id CALL H5Tcopy_f(H5T_NATIVE_INTEGER,dtype,error) @@ -99,7 +97,7 @@ CONTAINS ! Check that the ID is valid CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL verify("H5Tequal_f", tri_ret, .TRUE., total_error) + CALL VerifyLogical("H5Tequal_f", tri_ret, .TRUE., total_error) CALL H5Tclose_f(dtype, error) CALL check("H5Tclose_f", error, total_error) diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90 index 40afdbc..795f1e2 100644 --- a/fortran/test/tH5L_F03.f90 +++ b/fortran/test/tH5L_F03.f90 @@ -32,10 +32,8 @@ !***** MODULE liter_cb_mod - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - USE, INTRINSIC :: ISO_C_BINDING + USE HDF5 + USE ISO_C_BINDING IMPLICIT NONE TYPE iter_enum @@ -47,7 +45,7 @@ MODULE liter_cb_mod ! Custom group iteration callback data TYPE, bind(c) :: iter_info - CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object + CHARACTER(LEN=1), DIMENSION(1:10) :: name ! The name of the object INTEGER(c_int) :: TYPE ! The TYPE of the object INTEGER(c_int) :: command ! The TYPE of RETURN value END TYPE iter_info @@ -62,6 +60,8 @@ CONTAINS INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C) + USE HDF5 + USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), VALUE :: group @@ -123,6 +123,9 @@ CONTAINS !*************************************************************** SUBROUTINE test_iter_group(total_error) + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING USE liter_cb_mod IMPLICIT NONE @@ -248,11 +251,11 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT ! Verify return value from iterator gets propagated correctly - CALL verify("H5Literate", ret_value, 2, total_error) + CALL VERIFY("H5Literate", ret_value, 2, total_error) ! Increment the number of times "2" is returned i = i + 1 ! Verify that the index is the correct value - CALL verify("H5Literate", INT(idx), INT(i), total_error) + CALL VERIFY("H5Literate", INT(idx), INT(i), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"ERROR: Group iteration function walked too far!" ENDIF @@ -261,14 +264,14 @@ SUBROUTINE test_iter_group(total_error) DO j = 1, 10 ichr10(j:j) = info%name(j)(1:1) ENDDO - CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.52)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIXME- scot END DO ! put check if did not walk far enough -scot FIXME IF(i .NE. (NDATASETS + 2)) THEN - CALL verify("H5Literate_f", i, INT(NDATASETS + 2), total_error) + CALL VERIFY("H5Literate_f", i, INT(NDATASETS + 2), total_error) PRINT*,"ERROR: Group iteration function didn't perform multiple iterations correctly" ENDIF @@ -285,13 +288,13 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT - CALL verify("H5Literate_f", ret_value, 1, total_error) + CALL VERIFY("H5Literate_f", ret_value, 1, total_error) ! Increment the number of times "1" is returned i = i + 1 ! Verify that the index is the correct value - CALL verify("H5Literate_f", INT(idx), INT(i+10), total_error) + CALL VERIFY("H5Literate_f", INT(idx), INT(i+10), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"Group iteration function walked too far!" @@ -301,7 +304,7 @@ SUBROUTINE test_iter_group(total_error) ichr10(j:j) = info%name(j)(1:1) ENDDO ! Verify that the correct name is retrieved - CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.42)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIX- scot ENDDO diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90 index ba3f095..efaf594 100644 --- a/fortran/test/tH5MISC_1_8.f90 +++ b/fortran/test/tH5MISC_1_8.f90 @@ -25,13 +25,11 @@ !***** MODULE TH5MISC_1_8 - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE dtransform(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -59,22 +57,22 @@ SUBROUTINE dtransform(cleanup, total_error) CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL verify("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) - CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) + CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to small CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_small, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) - CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) + CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to big CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_big, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) - CALL verify("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) + CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) + CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) @@ -94,6 +92,9 @@ END SUBROUTINE dtransform SUBROUTINE test_genprop_basic_class(total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -116,7 +117,7 @@ SUBROUTINE test_genprop_basic_class(total_error) cid1 = 456 CALL H5Pget_class_name_f(cid1, name, size, error) - CALL verify("H5Pget_class_name", error, -1, error) + CALL VERIFY("H5Pget_class_name", error, -1, error) ! Create a new generic class, derived from the root of the class hierarchy CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error) @@ -125,8 +126,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name CALL H5Pget_class_name_f(cid1, name, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL verify("H5Pget_class_name", size,7,error) - CALL verify("H5Pget_class_name", name, CLASS1_NAME, error) + CALL VERIFY("H5Pget_class_name", size,7,error) + CALL verifystring("H5Pget_class_name", name, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -135,8 +136,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name smaller buffer CALL H5Pget_class_name_f(cid1, name_small, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL verify("H5Pget_class_name", size,7,error) - CALL verify("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) + CALL VERIFY("H5Pget_class_name", size,7,error) + CALL verifystring("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name_small(1:4), 'CLASS1_NAME=',CLASS1_NAME(1:4) total_error = total_error + 1 @@ -145,8 +146,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name bigger buffer CALL H5Pget_class_name_f(cid1, name_big, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL verify("H5Pget_class_name", size,7,error) - CALL verify("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) + CALL VERIFY("H5Pget_class_name", size,7,error) + CALL verifystring("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',TRIM(name_small), 'CLASS1_NAME=',TRIM(CLASS1_NAME) total_error = total_error + 1 @@ -159,13 +160,13 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Verify class parent correct CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verify("H5Pequal_f", flag, .TRUE., total_error) + CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) ! Make certain false postives aren't being returned CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verify("H5Pequal_f", flag, .FALSE., total_error) + CALL verifylogical("H5Pequal_f", flag, .FALSE., total_error) ! Close parent class CALL H5Pclose_class_f(cid2, error) @@ -186,6 +187,8 @@ SUBROUTINE test_h5s_encode(total_error) !** !*************************************************************** + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -238,7 +241,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Try decoding bogus buffer CALL H5Sdecode_f(sbuf, decoded_sid1, error) - CALL verify("H5Sdecode", error, -1, total_error) + CALL VERIFY("H5Sdecode", error, -1, total_error) CALL H5Sencode_f(sid1, sbuf, sbuf_size, error) CALL check("H5Sencode", error, total_error) @@ -251,7 +254,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Verify the decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL verify("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & + CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & total_error) ! @@ -294,16 +297,16 @@ SUBROUTINE test_h5s_encode(total_error) CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error) CALL check("H5Sget_simple_extent_type_f", error, total_error) - CALL verify("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) + CALL VERIFY("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) ! Verify decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL verify("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) + CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) CALL H5Sget_simple_extent_ndims_f(decoded_sid3, rank, error) CALL CHECK("H5Sget_simple_extent_ndims_f", error, total_error) - CALL verify("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) + CALL VERIFY("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) CALL h5sclose_f(sid3, error) CALL check("h5sclose_f", error, total_error) @@ -332,6 +335,8 @@ END SUBROUTINE test_h5s_encode SUBROUTINE test_scaleoffset(cleanup, total_error ) + USE HDF5 + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90 index 51e1d64..99d4c22 100644 --- a/fortran/test/tH5O.f90 +++ b/fortran/test/tH5O.f90 @@ -28,13 +28,11 @@ !***** MODULE TH5O - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE test_h5o(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -59,6 +57,9 @@ END SUBROUTINE test_h5o SUBROUTINE test_h5o_link(total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -156,7 +157,7 @@ SUBROUTINE test_h5o_link(total_error) CALL H5Tcommitted_f(type_id, committed, error) CALL check("H5Tcommitted_f",error,total_error) - CALL verify("H5Tcommitted_f", committed, .TRUE., total_error) + CALL verifyLogical("H5Tcommitted_f", committed, .TRUE., total_error) ! Create a dataset with no name using the committed datatype CALL H5Dcreate_anon_f(file_id, type_id, space_id, dset_id, error ) ! using no optional parameters @@ -180,7 +181,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL verify("H5Dread_f",wdata(i,j),rdata(i,j),total_error) + CALL VERIFY("H5Dread_f",wdata(i,j),rdata(i,j),total_error) wdata(i,j) = i*j ENDDO ENDDO @@ -228,7 +229,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL verify("H5Dread",wdata(i,j),rdata(i,j),total_error) + CALL VERIFY("H5Dread",wdata(i,j),rdata(i,j),total_error) ENDDO ENDDO ! Close open IDs @@ -463,7 +464,7 @@ SUBROUTINE test_h5o_link(total_error) nlinks = 0 CALL h5pget_nlinks_f(plist, nlinks, error) CALL check("h5pget_nlinks_f",error,total_error) - CALL verify("h5pget_nlinks_f", INT(nlinks), 2, total_error) + CALL VERIFY("h5pget_nlinks_f", INT(nlinks), 2, total_error) ! See if the link exists CALL h5oexists_by_name_f(file_id,"/G1_LINK", link_exists, error, plist) @@ -577,6 +578,9 @@ END SUBROUTINE test_h5o_link SUBROUTINE test_h5o_plist(total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -627,18 +631,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Create a group, dataset, and committed datatype within the file, ! using the respective type of creation property lists. @@ -696,18 +700,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) @@ -753,18 +757,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.f90 index 834308b..8e014f4 100644 --- a/fortran/test/tH5O_F03.f90 +++ b/fortran/test/tH5O_F03.f90 @@ -31,7 +31,7 @@ MODULE visit_cb USE HDF5 - USE, INTRINSIC :: ISO_C_BINDING + USE ISO_C_BINDING IMPLICIT NONE @@ -53,7 +53,7 @@ MODULE visit_cb ! ! Object visit structs TYPE, bind(c) :: obj_visit_t - CHARACTER(KIND=C_CHAR), DIMENSION(1:180) :: path ! Path to object + CHARACTER(LEN=1), DIMENSION(1:180) :: path ! Path to object INTEGER :: type_obj ! type of object END TYPE obj_visit_t diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index 39d8c1e..7dcc580 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -27,9 +27,6 @@ ! !***** MODULE TH5P - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN CONTAINS @@ -39,6 +36,8 @@ SUBROUTINE external_test(cleanup, total_error) ! h5pset_external_f, h5pget_external_count_f, ! h5pget_external_f + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -154,6 +153,8 @@ SUBROUTINE external_test(cleanup, total_error) END SUBROUTINE external_test SUBROUTINE multi_file_test(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -420,7 +421,10 @@ END SUBROUTINE multi_file_test ! April 16, 2009 !------------------------------------------------------------------------- ! -SUBROUTINE test_chunk_cache(cleanup, total_error) +SUBROUTINE test_chunk_cache(cleanup, total_error) + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -466,16 +470,19 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Pget_cache_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl1, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", nslots_1, nslots_4, total_error) - CALL verify("H5Pget_chunk_cache_f", nbytes_1, nbytes_4, total_error) - CALL verify("H5Pget_chunk_cache_f", w0_1, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_1), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_1), INT(nbytes_4), total_error) + + IF( .NOT.dreal_eq( REAL(w0_1,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF ! 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) CALL check("H5Pget_nlinks_f", error, total_error) - CALL verify("H5Pget_nlinks_f", INT(nlinks), 134, total_error) + CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 134, total_error) CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl_local, error) @@ -522,9 +529,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -552,9 +561,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error) + ENDIF CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -570,9 +581,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -588,9 +601,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF ! Don't close dapl2, we will use it in the next section ! Modify cache values on fapl_local @@ -623,9 +638,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF ! Test H5D_CHUNK_CACHE_NSLOTS_DEFAULT and H5D_CHUNK_CACHE_W0_DEFAULT nslots_2 = H5D_CHUNK_CACHE_NSLOTS_DFLT_F @@ -646,9 +663,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN + CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) + ENDIF ! Close diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90 index ec9fef2..56f9679 100644 --- a/fortran/test/tH5P_F03.f90 +++ b/fortran/test/tH5P_F03.f90 @@ -52,6 +52,8 @@ CONTAINS INTEGER FUNCTION test_genprop_cls_cb1_f(list_id, create_data ) bind(C) + USE HDF5 + USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: list_id @@ -69,11 +71,6 @@ END MODULE test_genprop_cls_cb1_mod MODULE TH5P_F03 - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - USE ISO_C_BINDING - CONTAINS !------------------------------------------------------------------------- @@ -95,6 +92,9 @@ CONTAINS SUBROUTINE test_create(total_error) + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -187,12 +187,18 @@ SUBROUTINE test_create(total_error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_DOUBLE, dpfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - CALL VERIFY("***ERROR: Returned wrong fill value (double)", dpfill, 1.0_dp, total_error) + IF(.NOT.dreal_eq( REAL(dpfill,dp), 1.0_dp))THEN + PRINT*,"***ERROR: Returned wrong fill value (double)" + total_error = total_error + 1 + ENDIF CALL H5Pset_fill_value_f(dcpl, H5T_NATIVE_REAL, 2.0, error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_REAL, rfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - CALL VERIFY("***ERROR: Returned wrong fill value (real)", rfill, 2.0, total_error) + IF(.NOT.dreal_eq( REAL(rfill,dp), REAL(2.0,dp)))THEN + PRINT*,"***ERROR: Returned wrong fill value (real)" + total_error = total_error + 1 + ENDIF ! For the actual compound type CALL H5Pset_fill_value_f(dcpl, comp_type_id, f_ptr, error) @@ -228,10 +234,10 @@ SUBROUTINE test_create(total_error) CALL H5Pget_fill_value_f(dcpl, comp_type_id, f_ptr, error) CALL check("H5Pget_fill_value_f", error, total_error) - CALL verify("***ERROR: Returned wrong fill value", rd_c%a, fill_ctype%a, total_error) - CALL verify("***ERROR: Returned wrong fill value", rd_c%y, fill_ctype%y, total_error) - IF( rd_c%x .NE. fill_ctype%x .OR. & + IF( .NOT.dreal_eq( REAL(rd_c%a,dp), REAL(fill_ctype%a, dp)) .OR. & + .NOT.dreal_eq( REAL(rd_c%y,dp), REAL(fill_ctype%y, dp)) .OR. & + rd_c%x .NE. fill_ctype%x .OR. & rd_c%z .NE. fill_ctype%z )THEN PRINT*,"***ERROR: Returned wrong fill value" @@ -263,6 +269,9 @@ SUBROUTINE test_genprop_class_callback(total_error) ! ! + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING USE test_genprop_cls_cb1_mod IMPLICIT NONE @@ -321,7 +330,7 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check the number of properties in class CALL h5pget_nprops_f(cid1, nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) ! Initialize class callback structs @@ -341,12 +350,12 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check that the list's class is correct CALL H5Pequal_f(cid2, cid1, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verify("H5Pequal_f", flag, .TRUE., total_error) + CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) ! Check the class name CALL H5Pget_class_name_f(cid2, CLASS1_NAME_BUF, CLASS1_NAME_SIZE, error) CALL check("H5Pget_class_name_f", error, total_error) - CALL verify("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) + CALL verifystring("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',CLASS1_NAME_BUF, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -356,42 +365,42 @@ SUBROUTINE test_genprop_class_callback(total_error) CALL check("h5pclose_class_f", error, total_error) ! Verify that the creation callback occurred - CALL verify("h5pcreate_f", crt_cb_struct%count, 1, total_error) - CALL verify("h5pcreate_f", crt_cb_struct%id, lid1, total_error) + CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 1, total_error) + CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid1, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid1,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) ! Create another property list from the class CALL h5pcreate_f(cid1, lid2, error) CALL check("h5pcreate_f", error, total_error) ! Verify that the creation callback occurred - CALL verify("h5pcreate_f", crt_cb_struct%count, 2, total_error) - CALL verify("h5pcreate_f", crt_cb_struct%id, lid2, total_error) + CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 2, total_error) + CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid2, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid2,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) ! Close first list CALL h5pclose_f(lid1, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL verify("h5pcreate_f", cls_cb_struct%count, 1, total_error) - CALL verify("h5pcreate_f", cls_cb_struct%id, lid1, total_error) + CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 1, total_error) + CALL VERIFY_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid1, total_error) ! Close second list CALL h5pclose_f(lid2, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL verify("h5pcreate_f", cls_cb_struct%count, 2, total_error) - CALL verify("h5pcreate_f", cls_cb_struct%id, lid2, total_error) + CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 2, total_error) + CALL verify_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid2, total_error) ! Close class CALL h5pclose_class_f(cid1, error) @@ -414,6 +423,8 @@ END SUBROUTINE test_genprop_class_callback SUBROUTINE test_h5p_file_image(total_error) + USE HDF5 + USE TH5_MISC USE, INTRINSIC :: iso_c_binding IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -464,11 +475,11 @@ SUBROUTINE test_h5p_file_image(total_error) CALL check("h5pget_file_image_f", error, total_error) ! Check that sizes are the same, and that the buffers are identical but separate - CALL verify("h5pget_file_image_f", INT(temp_size), INT(size), total_error) + CALL VERIFY("h5pget_file_image_f", INT(temp_size), INT(size), total_error) ! Verify the image data is correct DO i = 1, count - CALL verify("h5pget_file_image_f", temp(i), buffer(i), total_error) + CALL VERIFY("h5pget_file_image_f", temp(i), buffer(i), total_error) ENDDO END SUBROUTINE test_h5p_file_image @@ -488,6 +499,10 @@ END SUBROUTINE test_h5p_file_image ! SUBROUTINE external_test_offset(cleanup,total_error) + USE ISO_C_BINDING + USE TH5_MISC + USE HDF5 ! This module contains all necessary modules + IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index ef392b4..bd6264f 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -33,13 +33,11 @@ ! MODULE TH5R - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE refobjtest(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -127,6 +125,7 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "MyType", type_id, error) CALL check("h5tcommit_f",error,total_error) + ! ! Close dataspaces, groups and integer dataset ! @@ -165,22 +164,22 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),7, total_error) - CALL verify("H5Rget_name_f", buf, "/GROUP1", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),7, total_error) + CALL VerifyString("H5Rget_name_f", buf, "/GROUP1", total_error) ! with buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) - CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) + CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) ! getting path to dataset in /Group1 CALL H5Rget_name_f(dsetr_id, ref(2), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),14,total_error) - CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),14,total_error) + CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) ! !Close the dataset @@ -234,6 +233,7 @@ SUBROUTINE refobjtest(cleanup, 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 @@ -244,6 +244,9 @@ END SUBROUTINE refobjtest ! and h5rdereference_f functionalities ! SUBROUTINE refregtest(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC +! use iso_c_binding ! NOTE: if this is uncommented, then need to move subroutine into another file. IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -405,23 +408,23 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(1), buf, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) - CALL verify("H5Rget_name_f", buf, "/MATRIX", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) + CALL VerifyString("H5Rget_name_f", buf, "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) - CALL verify("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) + CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer smaller then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_small, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) - CALL verify("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) + CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) + CALL VerifyString("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) ! ! Dereference the first reference. ! @@ -433,7 +436,7 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the second region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(2), buf, error) ! no optional size CALL check("H5Rget_name_f", error, total_error) - CALL verify("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) + CALL VerifyString("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) ! ! Read selected data from the dataset. ! diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90 index 7223772..eaaf29a 100644 --- a/fortran/test/tH5S.f90 +++ b/fortran/test/tH5S.f90 @@ -35,14 +35,12 @@ !***** MODULE TH5S - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE dataspace_basic_test(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90 index aeb80e9..7d07308 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.f90 @@ -38,14 +38,13 @@ !***** MODULE TH5SSELECT - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE test_select_hyperslab(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -700,6 +699,8 @@ CONTAINS SUBROUTINE test_basic_select(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1035,6 +1036,8 @@ CONTAINS !*************************************************************** SUBROUTINE test_select_point(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1137,9 +1140,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1168,9 +1171,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1199,8 +1202,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO !!$ @@ -1235,8 +1238,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1281,8 +1284,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(0,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1308,8 +1311,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(POINT1_NPOINTS,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1360,6 +1363,8 @@ END SUBROUTINE test_select_point !*************************************************************** SUBROUTINE test_select_combine(total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1395,7 +1400,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(all_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Copy base dataspace and set selection to "none" CALL h5scopy_f(base_id, none_id, error) @@ -1406,7 +1411,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(none_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) ! Copy "all" selection & space CALL H5Scopy_f(all_id, space1, error) @@ -1424,7 +1429,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that it's still "all" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1446,12 +1451,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same at the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) @@ -1459,10 +1464,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1485,12 +1490,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined @@ -1502,19 +1507,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1537,12 +1542,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1554,19 +1559,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) -!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) +!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace @@ -1589,7 +1594,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1612,13 +1617,13 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1626,10 +1631,10 @@ SUBROUTINE test_select_combine(total_error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1652,7 +1657,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1675,23 +1680,23 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1714,7 +1719,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1736,12 +1741,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is ONLY one BLOCK CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined @@ -1752,10 +1757,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1780,6 +1785,8 @@ END SUBROUTINE test_select_combine !*************************************************************** SUBROUTINE test_select_bounds(total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1810,10 +1817,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) ! Set offset for selection offset(1:2) = 1 @@ -1824,10 +1831,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) - CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) + CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1840,7 +1847,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for 'none' selection, should fail CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL verify("h5sget_select_bounds_f", error, -1, total_error) + CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) ! Set point selection @@ -1856,10 +1863,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) - CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-4,hsize_t), total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-4,hsize_t), total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error) ! Set bad offset for selection @@ -1869,7 +1876,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL verify("h5sget_select_bounds_f", error, -1, total_error) + CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/2,-2/) @@ -1880,10 +1887,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 5_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-2,hsize_t), total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-6,hsize_t), total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1904,10 +1911,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), 37_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), 37_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 37, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 37, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1916,7 +1923,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL verify("h5sget_select_bounds_f", error, -1, total_error) + CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1927,10 +1934,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), 42_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), 35_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 42, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 35, total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1951,10 +1958,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), 50_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), 50_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 50, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 50, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1963,7 +1970,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL verify("h5sget_select_bounds_f", error, -1, total_error) + CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1974,10 +1981,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(1), 55_hsize_t, total_error) - CALL verify("h5sget_select_bounds_f", high_bounds(2), 48_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 55, total_error) + CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 48, total_error) ! Reset offset for selection offset(1:2) = 0 diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index efbceea..7822c16 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -29,10 +29,6 @@ MODULE TH5T - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - CONTAINS SUBROUTINE compoundtest(cleanup, total_error) @@ -51,6 +47,8 @@ CONTAINS ! h5tget_class_f, h5tget_member_name_f, h5tget_member_offset_f, h5tget_member_type_f, ! h5tequal_f, h5tinsert_array_f, h5tcommit_f, h5tencode_f, h5tdecode_f + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -157,6 +155,7 @@ CONTAINS CALL h5tclose_f(fixed_str2,error) CALL check("h5tclose_f", error, total_error) + data_dims(1) = dimsize ! ! Initialize data buffer. @@ -179,47 +178,47 @@ CONTAINS ! during write/read to/from dataset with compound datatype. ! CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) - CALL check("h5pcreate_f", error, total_error) + CALL check("h5pcreate_f", error, total_error) CALL h5pset_preserve_f(plist_id, flag, error) - CALL check("h5pset_preserve_f", error, total_error) + CALL check("h5pset_preserve_f", error, total_error) ! ! Create a new file using default properties. ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + 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 check("h5fcreate_f", error, total_error) ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) + CALL check("h5screate_simple_f", error, total_error) ! ! Create compound datatype. ! ! First calculate total size by calculating sizes of each member ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt5_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt5_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt5_id, type_sizec, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) !write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized type_size = type_sizec + type_sizei + type_sized + type_sizer CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtype_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) ! ! Insert memebers ! @@ -227,19 +226,19 @@ CONTAINS ! offset = 0 CALL h5tinsert_f(dtype_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! INTEGER member ! offset = offset + type_sizec ! Offset of the second memeber is 2 CALL h5tinsert_f(dtype_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! DOUBLE PRECISION member ! offset = offset + type_sizei ! Offset of the third memeber is 6 CALL h5tinsert_f(dtype_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! REAL member ! @@ -251,122 +250,123 @@ CONTAINS ! CALL h5dcreate_f(file_id, dsetname, dtype_id, dspace_id, & dset_id, error) - CALL check("h5dcreate_f", error, total_error) + CALL check("h5dcreate_f", error, total_error) ! ! Create memory types. We have to create a compound datatype ! for each member we want to write. ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizec, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt2_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt2_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Write data by fields in the datatype. Fields order is not important. ! CALL h5dwrite_f(dset_id, dt4_id, real_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt1_id, char_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt2_id, int_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_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) + 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) + CALL check("h5sclose_f", error, total_error) ! ! Terminate access to the datatype ! CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) + ! ! Create and store compound datatype with the character and ! array members. ! type_size = type_sizec + elements*type_sizer ! Size of compound datatype CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtarray_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dtarray_id, "char_field", offset, H5T_NATIVE_CHARACTER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) offset = type_sizec CALL h5tarray_create_f(H5T_NATIVE_REAL, array_dims_range, array_dims, arrayt_id, error) - CALL check("h5tarray_create_f", error, total_error) + CALL check("h5tarray_create_f", error, total_error) CALL h5tinsert_f(dtarray_id,"array_field", offset, arrayt_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) CALL h5tcommit_f(file_id, "Compound_with_array_member", dtarray_id, error) - CALL check("h5tcommit_f", error, total_error) + CALL check("h5tcommit_f", error, total_error) CALL h5tclose_f(arrayt_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dtarray_id, error) - CALL check("h5tclose_f", error, total_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 check("h5fclose_f", error, total_error) ! ! Open the file. ! CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) + CALL check("h5fopen_f", error, total_error) ! ! Open the dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) + CALL check("h5dopen_f", error, total_error) ! ! Get datatype of the open dataset. ! Check it class, number of members, and member's names. ! CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f", error, total_error) + CALL check("h5dget_type_f", error, total_error) CALL h5tget_class_f(dtype_id, class, error) - CALL check("h5dget_class_f", error, total_error) + CALL check("h5dget_class_f", error, total_error) if (class .ne. H5T_COMPOUND_F) then write(*,*) " Wrong class type returned" total_error = total_error + 1 endif CALL h5tget_nmembers_f(dtype_id, num_members, error) - CALL check("h5dget_nmembers_f", error, total_error) + CALL check("h5dget_nmembers_f", error, total_error) if (num_members .ne. COMP_NUM_MEMBERS ) then write(*,*) " Wrong number of members returned" total_error = total_error + 1 @@ -377,11 +377,11 @@ CONTAINS ! do i = 1, num_members CALL h5tget_member_name_f(dtype_id, i-1, member_name, len, error) - CALL check("h5tget_member_name_f", error, total_error) + CALL check("h5tget_member_name_f", error, total_error) CALL h5tget_member_offset_f(dtype_id, i-1, offset_out, error) - CALL check("h5tget_member_offset_f", error, total_error) + CALL check("h5tget_member_offset_f", error, total_error) CALL h5tget_member_index_f(dtype_id, member_name(1:len), member_index, error) - CALL check("h5tget_member_index_f", error, total_error) + CALL check("h5tget_member_index_f", error, total_error) if(member_index .ne. i-1) then write(*,*) "Index returned is incorrect" write(*,*) member_index, i-1 @@ -394,16 +394,16 @@ CONTAINS write(*,*) "Offset of the char member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, dt5_id, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, dt5_id, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for character member" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_STRING_F) then write(*,*) "Wrong class returned for character member" total_error = total_error + 1 @@ -413,16 +413,16 @@ CONTAINS write(*,*) "Offset of the integer member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for integer memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_INTEGER_F) then write(*,*) "Wrong class returned for INTEGER member" total_error = total_error + 1 @@ -432,16 +432,16 @@ CONTAINS write(*,*) "Offset of the double precision member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for double precision memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for double precision member" total_error = total_error + 1 @@ -451,16 +451,16 @@ CONTAINS write(*,*) "Offset of the real member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for real memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for real member" total_error = total_error + 1 @@ -476,22 +476,22 @@ CONTAINS ! Create memory datatype to read character member of the compound datatype. ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt2_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt2_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt2_id, type_size, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt2_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (char_member_out(i) .ne. char_member(i)) then write(*,*) " Wrong character data is read back " @@ -500,15 +500,15 @@ CONTAINS enddo ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt5_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt5_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt5_id, int_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (int_member_out(i) .ne. int_member(i)) then write(*,*) " Wrong integer data is read back " @@ -518,33 +518,39 @@ CONTAINS ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) - DO i = 1, dimsize - CALL VERIFY("h5dread_f:Wrong double precision data is read back", double_member_out(i), double_member(i), total_error) - ENDDO + CALL check("h5dread_f", error, total_error) + do i = 1, dimsize + IF( .NOT.dreal_eq( REAL(double_member_out(i),dp), REAL( double_member(i), dp)) ) THEN + write(*,*) " Wrong double precision data is read back " + total_error = total_error + 1 + endif + enddo ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) - DO i = 1, dimsize - CALL VERIFY("h5dread_f:Wrong double precision data is read back", real_member_out(i), real_member(i), total_error) - ENDDO + CALL check("h5dread_f", error, total_error) + DO i = 1, dimsize + IF( .NOT.dreal_eq( REAL(real_member_out(i),dp), REAL( real_member(i), dp)) ) THEN + WRITE(*,*) " Wrong real precision data is read back " + total_error = total_error + 1 + ENDIF + ENDDO ! ! *----------------------------------------------------------------------- ! * Test encoding and decoding compound datatypes @@ -559,7 +565,7 @@ CONTAINS ! Try decoding bogus buffer CALL H5Tdecode_f(cmpd_buf, decoded_tid1, error) - CALL verify("H5Tdecode_f", error, -1, total_error) + CALL VERIFY("H5Tdecode_f", error, -1, total_error) CALL H5Tencode_f(dtype_id, cmpd_buf, cmpd_buf_size, error) CALL check("H5Tencode_f", error, total_error) @@ -572,27 +578,27 @@ CONTAINS CALL H5Tequal_f(decoded_tid1, dtype_id, flag, error) CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) ! ! Close all open objects. ! CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt5_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_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) + if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) RETURN END SUBROUTINE compoundtest @@ -608,6 +614,9 @@ CONTAINS ! H5tset_norm_f, H5tget_inpad_f, H5tset_inpad_f, H5tget_cset_f, ! H5tset_cset_f, H5tget_strpad_f, H5tset_strpad_f + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error @@ -893,7 +902,7 @@ CONTAINS CALL check("H5Tget_order_f",error, total_error) CALL H5Tget_order_f(H5T_NATIVE_INTEGER, order2, error) CALL check("H5Tget_order_f",error, total_error) - CALL verify("H5Tget_native_type_f",order1, order2, total_error) + CALL VERIFY("H5Tget_native_type_f",order1, order2, total_error) ! this test depends on whether -i8 was specified @@ -901,11 +910,11 @@ CONTAINS !!$ CALL check("H5Tget_size_f",error, total_error) !!$ CALL H5Tget_size_f(H5T_STD_I32BE, type_size2, error) !!$ CALL check("H5Tget_size_f",error, total_error) -!!$ CALL verify("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) +!!$ CALL VERIFY("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) CALL H5Tget_class_f(native_type, class, error) CALL check("H5Tget_class_f",error, total_error) - CALL verify("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) + CALL VERIFY("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) CALL h5dclose_f(dset_id,error) CALL check("h5dclose_f", error, total_error) @@ -963,6 +972,8 @@ CONTAINS SUBROUTINE test_derived_flt(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1049,24 +1060,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.44 .OR. epos.NE.34 .OR. esize.NE.10 .OR. mpos.NE.3 .OR. msize.NE.31)THEN - CALL verify("H5Tget_fields_f", -1, 0, total_error) + CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid1, precision1, error) CALL check("H5Tget_precision_f", error, total_error) - CALL verify("H5Tget_precision_f", INT(precision1), 42, total_error) + CALL VERIFY("H5Tget_precision_f", INT(precision1), 42, total_error) CALL H5Tget_offset_f(tid1, offset1, error) CALL check("H5Tget_offset_f", error, total_error) - CALL verify("H5Tget_offset_f", INT(offset1), 3, total_error) + CALL VERIFY("H5Tget_offset_f", INT(offset1), 3, total_error) CALL H5Tget_size_f(tid1, size1, error) CALL check("H5Tget_size_f", error, total_error) - CALL verify("H5Tget_size_f", INT(size1), 7, total_error) + CALL VERIFY("H5Tget_size_f", INT(size1), 7, total_error) CALL H5Tget_ebias_f(tid1, ebias1, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL verify("H5Tget_ebias_f", INT(ebias1), 511, total_error) + CALL VERIFY("H5Tget_ebias_f", INT(ebias1), 511, total_error) !-------------------------------------------------------------------------- ! * 2nd floating-point type @@ -1110,24 +1121,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.23 .OR. epos.NE.16 .OR. esize.NE.7 .OR. mpos.NE.0 .OR. msize.NE.16)THEN - CALL verify("H5Tget_fields_f", -1, 0, total_error) + CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid2, precision2, error) CALL check("H5Tget_precision_f", error, total_error) - CALL verify("H5Tget_precision_f", INT(precision2), 24, total_error) + CALL VERIFY("H5Tget_precision_f", INT(precision2), 24, total_error) CALL H5Tget_offset_f(tid2, offset2, error) CALL check("H5Tget_offset_f", error, total_error) - CALL verify("H5Tget_offset_f", INT(offset2), 0, total_error) + CALL VERIFY("H5Tget_offset_f", INT(offset2), 0, total_error) CALL H5Tget_size_f(tid2, size2, error) CALL check("H5Tget_size_f", error, total_error) - CALL verify("H5Tget_size_f", INT(size2), 3, total_error) + CALL VERIFY("H5Tget_size_f", INT(size2), 3, total_error) CALL H5Tget_ebias_f(tid2, ebias2, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL verify("H5Tget_ebias_f", INT(ebias2), 63, total_error) + CALL VERIFY("H5Tget_ebias_f", INT(ebias2), 63, total_error) CALL h5tclose_f(tid1, error) CALL check("h5tclose_f", error, total_error) diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 deleted file mode 100644 index d50b76d..0000000 --- a/fortran/test/tH5T_F03.F90 +++ /dev/null @@ -1,3425 +0,0 @@ -!****h* root/fortran/test/tH5T_F03.f90 -! -! NAME -! tH5T_F03.f90 -! -! FUNCTION -! Test FORTRAN HDF5 H5T 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! CONTAINS SUBROUTINES -! test_array_compound_atomic, test_array_compound_array, -! test_array_bkg, test_h5kind_to_type -! -!***** - -! ***************************************** -! *** H 5 T T E S T S -! ***************************************** - -!*************************************************************** -!** -!** test_array_compound_atomic(): Test basic array datatype code. -!** Tests 1-D array of compound datatypes (with no array fields) -!** -!*************************************************************** -! -#include - -MODULE TH5T_F03 - - USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN - USE ISO_C_BINDING - -CONTAINS - -SUBROUTINE test_array_compound_atomic(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - ! 1-D dataset WITH fixed dimensions - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" - - TYPE s1_t - INTEGER :: i - REAL :: f - END TYPE s1_t - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - INTEGER(hid_t) :: sid1 ! Dataspace ID - INTEGER(hid_t) :: tid1 ! Array Datatype ID - INTEGER(hid_t) :: tid2 ! Compound Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER :: ndims ! Array rank for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER :: i,j ! counting variables - - INTEGER :: error ! Generic RETURN value - INTEGER :: namelen - LOGICAL :: flag - - TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work - - ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - wdata(i,j)%i = i * 10 + j - wdata(i,j)%f = i * 2.5 + j - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Insert float field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write dataset to disk - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2, error) - CALL check("h5tclose_f", error, total_error) - - ! Read dataset from disk - - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',wdata(i,j)%f, rdata(i,j)%f, total_error) - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - -END SUBROUTINE test_array_compound_atomic -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_compound_array(): Test basic array datatype code. -!!$!** Tests 1-D array of compound datatypes (with array fields) -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_compound_array(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 3 - INTEGER, PARAMETER :: ARRAY2_DIM1= 5 - - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" - - TYPE st_t_struct ! Typedef for compound datatype - INTEGER :: i - REAL, DIMENSION(1:ARRAY2_DIM1) :: f - CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c - END TYPE st_t_struct - ! Information to write - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata - ! Information read in - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata - - - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - integer(hid_t) :: sid1 ! Dataspace ID - integer(hid_t) :: tid1 ! Array Datatype ID - integer(hid_t) :: tid2 ! Compound Datatype ID - integer(hid_t) :: tid3 ! Nested Array Datatype ID - integer(hid_t) :: tid4 ! Nested Array Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) - - INTEGER ndims ! Array rank for reading - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER(hid_t) :: mtid2 ! Datatype ID for field - - INTEGER :: mclass ! Datatype class for field - INTEGER :: i,j,k ! counting variables - - INTEGER :: error - CHARACTER(LEN=2) :: ichr2 - INTEGER :: namelen - LOGICAL :: flag - INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier - INTEGER(SIZE_T) :: attrlen ! Length of the attribute string - - TYPE(c_ptr) :: f_ptr - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, array1_DIM1 - wdata(i,j)%i = i*10+j - DO k = 1, ARRAY2_DIM1 - wdata(i,j)%f(k) = 10*i+j+.5 - WRITE(ichr2,'(I2.2)') k - wdata(i,j)%c(k) = ichr2 - ENDDO - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - ! Create a compound datatype to refer to - ! - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array of floats datatype - CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) - CALL check("h5tarray_create_f", error, total_error) - ! Insert float array field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) - CALL check("h5tinsert_f", error, total_error) - - ! - ! Create datatype for the String attribute. - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) - CALL check("h5tcopy_f",error,total_error) - - attrlen = LEN(wdata(1,1)%c(1)) - CALL h5tset_size_f(atype_id, attrlen, error) - CALL check("h5tset_size_f",error,total_error) - - ! Create an array of character datatype - CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) - 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)(1:1))), tid4, error) - CALL check("h5tinsert2_f", error, total_error) - - ! Close array of floats field datatype - CALL h5tclose_f(tid3,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5tclose_f(tid4,error) - CALL check("h5tclose_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - - ! Write dataset to disk - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 2nd field's class - CALL H5Tget_class_f(mtid, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the 3rd field's name - CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verify("H5Tget_member_name_f",mname(1:namelen),"c", total_error) - - ! Check the 3rd field's offset - 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)(1:1)))), total_error) - - ! Check the 3rd field's datatype - CALL H5Tget_member_type_f(tid2, 2, mtid2, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 3rd field's class - CALL H5Tget_class_f(mtid2, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid2, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid2, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid2, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, atype_id, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL verify("H5Tequal_f", flag, .TRUE., total_error) - - ! Close the array's base type datatype - CALL h5tclose_f(tid3, error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! READ dataset from disk - - f_ptr = c_null_ptr - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - DO k = 1, ARRAY2_DIM1 - - IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN - PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN - PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - END SUBROUTINE test_array_compound_array -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_bkg(): Test basic array datatype code. -!!$!** Tests reading compound datatype with array fields and -!!$!** writing partial fields. -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_bkg(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: LENGTH = 5 - INTEGER, PARAMETER :: ALEN = 10 - INTEGER, PARAMETER :: RANK = 1 - INTEGER, PARAMETER :: NMAX = 100 - CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" - - INTEGER(hid_t) :: fid, array_dt - INTEGER(hid_t) :: space - INTEGER(hid_t) :: type - INTEGER(hid_t) :: dataset - - INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) - INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) - - INTEGER :: i, j - INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) - - TYPE CmpField_struct - INTEGER, DIMENSION(1:ALEN) :: a - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - REAL(KIND=dp), DIMENSION(1:ALEN) :: c - ENDTYPE CmpField_struct - - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr - - TYPE CmpDTSinfo_struct - INTEGER :: nsubfields - CHARACTER(LEN=5), DIMENSION(1:nmax) :: name - INTEGER(size_t), DIMENSION(1:nmax) :: offset - INTEGER(hid_t), DIMENSION(1:nmax) :: datatype - END TYPE CmpDTSinfo_struct - - TYPE(CmpDTSinfo_struct) :: dtsinfo - - TYPE fld_t_struct - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - END TYPE fld_t_struct - - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double datatype - INTEGER(SIZE_T) :: sizeof_compound ! total size of compound - - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr - - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - - INTEGER :: error - TYPE(c_ptr) :: f_ptr - -! Initialize the data -! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - cf(i)%a(j) = 100*(i+1) + j - cf(i)%b(j) = (100.*(i+1) + 0.01*j) - cf(i)%c(j) = 100.*(i+1) + 0.02*j - ENDDO - ENDDO - - ! Set the number of data members - ! ------------------------------ - - dtsinfo%nsubfields = 3 - - ! Initialize the offsets - ! ----------------------- - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) - IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ENDIF - - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) - - dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) - dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) - dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) - - - ! Initialize the data type IDs - ! ---------------------------- - dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; - dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; - dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; - - - ! Initialize the names of data members - ! ------------------------------------ - - dtsinfo%name(1) = "One " - dtsinfo%name(2) = "Two " - dtsinfo%name(3) = "Three" - - ! Create file - ! ----------- - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create data space - ! ----------------- - CALL h5screate_simple_f(RANK, dim, space, error) - CALL check("h5screate_simple_f", error, total_error) - - - ! Create the memory data type - ! --------------------------- - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) - CALL check("h5tcreate_f", error, total_error) - - ! Add members to the compound data type - ! -------------------------------------- - - DO i = 1, dtsinfo%nsubfields - CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - ENDDO - - ! Create the dataset - ! ------------------ / - CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write data to the dataset - ! ------------------------- - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(cf(1)) - - CALL h5dwrite_f(dataset, type, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ALLOCATE(rdims1(1:2)) ! dummy not needed - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, type, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j), cfr(i)%b(j), total_error) - CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) - ENDDO - ENDDO - - - ! Release IDs - ! ----------- - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - CALL h5sclose_f(space,error) - CALL check("h5sclose_f", error, total_error) - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - !**************************** - ! Reopen the file and update - !**************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - sizeof_compound = INT( type_sizer*ALEN, size_t) - - CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) - CALL check("h5tcreate_f", error, total_error) - - CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - - CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - ! Initialize the data to overwrite - ! -------------------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - fld(i)%b(j) = 1.313 - cf(i)%b(j) = fld(i)%b(j) - ENDDO - ENDDO - - f_ptr = C_LOC(fld(1)) - - CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ! Read just the field changed - - f_ptr = C_LOC(fldr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - DO i = 1, LENGTH - DO j = 1, ALEN - CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',fld(i)%b(j), fldr(i)%b(j), total_error) - ENDDO - ENDDO - CALL h5tclose_f(TYPE,error) - CALL check("h5tclose_f", error, total_error) - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Read the entire dataset again - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) - CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) - CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - -!************************************************** -! Reopen the file and print out all the data again -!************************************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Reset the data to read in - ! ------------------------- - - DO i = 1, LENGTH - cfr(i)%a(:) = 0 - cfr(i)%b(:) = 0 - cfr(i)%c(:) = 0 - ENDDO - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) - CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) - CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - END SUBROUTINE test_array_bkg - - SUBROUTINE test_h5kind_to_type(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors - INTEGER(int_kind_32), DIMENSION(1:4), TARGET :: dset_data_i32, data_out_i32 - INTEGER(HID_T) :: dset_id32 ! Dataset identifier - CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name -#endif - INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors - -! Check if C has quad precision extension -#if H5_HAVE_FLOAT128!=0 -! Check if Fortran supports quad precision -# if H5_PAC_FC_MAX_REAL_PRECISION > 26 - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) -# else - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) -# endif -#else -! Check if the default of long double is quad precision -# if H5_PAC_C_MAX_REAL_PRECISION > 26 -# if H5_PAC_FC_MAX_REAL_PRECISION > 26 - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) -# else - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) -# endif -# else - INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) -# endif -#endif - REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 - INTEGER(HID_T) :: dset_idr16 ! Dataset identifier - CHARACTER(LEN=7), PARAMETER :: dsetnamer16 = "dsetr16" ! Dataset name - - CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id1 ! Dataset identifier - INTEGER(HID_T) :: dset_id4 ! Dataset identifier - INTEGER(HID_T) :: dset_id8 ! Dataset identifier - INTEGER(HID_T) :: dset_id16 ! Dataset identifier - INTEGER(HID_T) :: dset_idr ! Dataset identifier - INTEGER(HID_T) :: dset_idr4 ! Dataset identifier - INTEGER(HID_T) :: dset_idr8 ! Dataset identifier - - INTEGER :: error ! Error flag - INTEGER :: i - -! Data buffers: - - INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 - INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 - INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 - INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 - - REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r - REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 - REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 - - INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize the dset_data array. - ! - DO i = 1, 4 - dset_data_i1(i) = HUGE(0_int_kind_1)-i - dset_data_i4(i) = HUGE(0_int_kind_4)-i - dset_data_i8(i) = HUGE(0_int_kind_8)-i - dset_data_i16(i) = HUGE(0_int_kind_16)-i -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - dset_data_i32(i) = HUGE(0_int_kind_32)-i -#endif - dset_data_r(i) = 4.0*ATAN(1.0)-REAL(i-1) - dset_data_r7(i) = 4.0_real_kind_7*ATAN(1.0_real_kind_7)-REAL(i-1,real_kind_7) - dset_data_r15(i) = 4.0_real_kind_15*ATAN(1.0_real_kind_15)-REAL(i-1,real_kind_15) - dset_data_r31(i) = 4.0_real_kind_31*ATAN(1.0_real_kind_31)-REAL(i-1,real_kind_31) - - END DO - - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspaces for datasets - ! - CALL h5screate_simple_f(1, data_dims , dspace_id, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) - CALL check("H5Dcreate_f",error, total_error) -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - CALL H5Dcreate_f(file_id, dsetname16, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), dspace_id, dset_id32, error) - CALL check("H5Dcreate_f",error, total_error) -#endif - CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) - CALL check("H5Dcreate_f",error, total_error) -!#ifdef H5_HAVE_FLOAT128 - CALL H5Dcreate_f(file_id, dsetnamer16, h5kind_to_type(real_kind_31,H5_REAL_KIND), dspace_id, dset_idr16, error) - CALL check("H5Dcreate_f",error, total_error) -!#endif - ! - ! Write the dataset. - ! - f_ptr = C_LOC(dset_data_i1(1)) - CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i4(1)) - CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i8(1)) - CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i16(1)) - CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - f_ptr = C_LOC(dset_data_i32(1)) - CALL h5dwrite_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) -#endif - f_ptr = C_LOC(dset_data_r(1)) - CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r7(1)) - CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r15(1)) - CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) -!#ifdef H5_HAVE_FLOAT128 - f_ptr = C_LOC(dset_data_r31(1)) - CALL h5dwrite_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) -!#endif - ! - ! Close the file - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - - ! Open the file - - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error, total_error) - ! - ! Read the dataset. - ! - ! Read data back into an integer size that is larger then the original size used for - ! writing the data - f_ptr = C_LOC(data_out_i1) - CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i4) - CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i8) - CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i16) - CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - f_ptr = C_LOC(data_out_i32) - CALL h5dread_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) -#endif - f_ptr = C_LOC(data_out_r) - CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r7) - CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r15) - CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r31) - CALL h5dread_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - DO i = 1, 4 - - CALL verify("h5kind_to_type",dset_data_i1(i),data_out_i1(i),total_error) - CALL verify("h5kind_to_type",dset_data_i4(i),data_out_i4(i),total_error) - CALL verify("h5kind_to_type",dset_data_i8(i),data_out_i8(i),total_error) - CALL verify("h5kind_to_type",dset_data_i16(i),data_out_i16(i),total_error) - -#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - CALL verify("h5kind_to_type",dset_data_i32(i),data_out_i32(i),total_error) -#endif - CALL verify("h5kind_to_type",dset_data_r(i),data_out_r(i),total_error) - CALL verify("h5kind_to_type",dset_data_r7(i),data_out_r7(i),total_error) - CALL verify("h5kind_to_type",dset_data_r15(i),data_out_r15(i),total_error) - CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error) - END DO - - ! - ! Close the dataset. - ! - CALL h5dclose_f(dset_id1, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id8, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id16, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr8, error) - CALL check("h5dclose_f",error, total_error) - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE test_h5kind_to_type - -!************************************************************ -! -! This test reads and writes array datatypes -! to a dataset. The test first writes integers arrays of -! dimension ADIM0xADIM1 to a dataset with a dataspace of -! DIM0, then closes the file. Next, it reopens the file, -! reads back the data. -! -!************************************************************ -SUBROUTINE t_array(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: adim0 = 3 - INTEGER , PARAMETER :: adim1 = 5 - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: i, j, k - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - - ! - ! Initialize data. i is the element in the dataspace, j and k the - ! elements within the array datatype. - ! - DO i = 1, dim0 - DO j = 1, adim0 - DO k = 1, adim1 - wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) - ENDDO - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, error) - ! - ! Create array datatypes for file and memory. - ! - CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) - CALL check("H5Tarray_create_f",error, total_error) - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the array data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset, and attribute. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its dimensions. - ! - CALL h5dget_type_f(dset, filetype, error) - CALL check("h5dget_type_f",error, error) - CALL H5Tget_array_dims_f(filetype, adims, error) - CALL check("h5dget_type_f",error, total_error) - CALL VERIFY("H5Tget_array_dims_f", adims(1), INT(adim0,hsize_t), total_error) - CALL VERIFY("H5Tget_array_dims_f", adims(2), INT(adim1,hsize_t), total_error) - ! - ! Get dataspace and allocate memory for read buffer. This is a - ! three dimensional attribute when the array datatype is included. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - - ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) - ! - ! Create the memory datatype. - ! - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j=1, INT(adim0) - DO k = 1, INT(adim1) - CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_array - -SUBROUTINE t_enum(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - INTEGER(HID_T) :: F_BASET ! File base type - INTEGER(HID_T) :: M_BASET ! Memory base type - INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 - -! Enumerated type - INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER, DIMENSION(1:1), TARGET :: val - - CHARACTER(LEN=6), DIMENSION(1:4) :: & - names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) - CHARACTER(LEN=NAME_BUF_SIZE) :: name - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j, idx - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize DATA. - ! - F_BASET = H5T_STD_I16BE ! File base type - M_BASET = H5T_NATIVE_INTEGER ! Memory base type - DO i = 1, dim0 - DO j = 1, dim1 - wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create the enumerated datatypes for file and memory. This - ! process is simplified IF native types are used for the file, - ! as only one type must be defined. - ! - CALL h5tenum_create_f(F_BASET, filetype, error) - CALL check("h5tenum_create_f",error, total_error) - - CALL h5tenum_create_f(M_BASET, memtype, error) - CALL check("h5tenum_create_f",error, total_error) - - DO i = SOLID, PLASMA - ! - ! Insert enumerated value for memtype. - ! - val(1) = i - f_ptr = C_LOC(val(1)) - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, error) - CALL check("H5Tenum_insert_f", error, total_error) - ! - ! Insert enumerated value for filetype. We must first convert - ! the numerical value val to the base type of the destination. - ! - f_ptr = C_LOC(val(1)) - CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) - CALL check("H5Tconvert_f",error, total_error) - IF(i.GE.1)THEN ! test both F90 and F03 APIs - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) - ELSE - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) - ENDIF - CALL check("H5Tenum_insert_f",error, total_error) - ENDDO - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, total_error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the enumerated data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f (file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset,space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) - - ALLOCATE(rdata(1:dims(1),1:dims(2))) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1,1)) - CALL h5dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - ! - ! Get the name of the enumeration member. - ! - CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) - CALL check("h5tenum_nameof_f",error, total_error) - idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 - CALL verify("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_enum - -SUBROUTINE t_bit(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - - INTEGER(HID_T) :: file, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: A, B, C, D - INTEGER :: Aw, Bw, Cw, Dw - INTEGER :: i, j - INTEGER, PARAMETER :: hex = Z'00000003' - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize data. We will manually pack 4 2-bit integers into - ! each unsigned char data element. - ! - DO i = 0, dim0-1 - DO j = 0, dim1-1 - wdata(i+1,j+1) = 0 - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the bitfield data to it. - ! - CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) - ALLOCATE(rdata(1:dims(1),1:dims(2))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" - B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" - C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" - D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" - - Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) - Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) - Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) - Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) - - CALL VERIFY("bitfield", A, Aw, total_error) - CALL VERIFY("bitfield", B, Bw, total_error) - CALL VERIFY("bitfield", C, Cw, total_error) - CALL VERIFY("bitfield", D, Dw, total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - -END SUBROUTINE t_bit - -SUBROUTINE t_opaque(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: size = 7 - INTEGER(HID_T) :: file, space, dtype, dset ! Handles - INTEGER(size_t) :: len - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) - - CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - CHARACTER(LEN=size-1) :: str = "OPAQUE" - - CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into - CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact - CHARACTER(LEN=17) :: tag_big ! and to big. - - INTEGER :: taglen - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hsize_t) :: i - CHARACTER(LEN=1) :: ichr - TYPE(C_PTR) :: f_ptr - INTEGER :: error - ! - ! Initialize data. - ! - DO i = 1, dim0 - WRITE(ichr,'(I1)') i-1 - wdata(i) = str//ichr - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create opaque datatype and set the tag to something appropriate. - ! For this example we will write and view the data as a character - ! array. - ! - CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) - CALL check("h5tcreate_f",error, total_error) - CALL h5tset_tag_f(dtype,"Character array",error) - CALL check("h5tset_tag_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the opaque data to it. - ! - CALL h5dcreate_f(file, dataset, dtype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)(1:1)) - CALL h5dwrite_f(dset, dtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get datatype and properties for the datatype. - ! - CALL h5dget_type_f(dset, dtype, error) - CALL check("h5dget_type_f",error, total_error) - CALL h5tget_size_f(dtype, len, error) - CALL check("h5tget_size_f",error, total_error) - - ! Next tests should return - ! opaque_tag = tag = "Character array" and the actual length = 15 - - ! Test reading into a string that is to small - CALL h5tget_tag_f(dtype, tag_sm, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verify("h5tget_tag_f",tag_sm,"Character arra", total_error) - - ! Test reading into a string that is exact - CALL h5tget_tag_f(dtype, tag_exact, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verify("h5tget_tag_f",tag_exact,"Character array", total_error) - - ! Test reading into a string that is to big - CALL h5tget_tag_f(dtype, tag_big, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verify("h5tget_tag_f",tag_big,"Character array ", total_error) - - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL h5dread_f(dset, dtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - DO i = 1, dims(1) - CALL verify("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_opaque - -SUBROUTINE t_objref(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 2 - - INTEGER(HID_T) :: file, space, dset, obj ! Handles - INTEGER :: error - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) - TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: objtype - INTEGER(SIZE_T) :: name_size - CHARACTER(LEN=80) :: name - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER :: i - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with a null dataspace. - ! - CALL h5screate_f(H5S_NULL_F,space,error) - CALL check("h5screate_f",error, total_error) - CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) - CALL check("h5dcreate_f",error, total_error) - ! - CALL h5dclose_f(obj , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create a group. - ! - CALL h5gcreate_f(file, "G1", obj, error) - CALL check("h5gcreate_f",error, total_error) - CALL h5gclose_f(obj, error) - CALL check("h5gclose_f",error, total_error) - ! - ! Create references to the previously created objects. note, space_id - ! is not needed for object references. - ! - f_ptr = C_LOC(wdata(1)) - CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the object references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - - ALLOCATE(rdata(1:maxdims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, INT(maxdims(1)) - ! - ! Open the referenced object, get its name and type. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) - CALL check("H5Rdereference_f",error, total_error) - CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) - CALL check("H5Rget_obj_type_f",error, total_error) - ! - ! Get the length of the name and name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) - CALL check("H5Iget_name_f",error, total_error) - ! - ! Print the object type and close the object. - ! - IF(objtype.EQ.H5G_GROUP_F)THEN - CALL verify("t_objref", name(1:name_size),"/G1", total_error) - ELSE IF(objtype.EQ.H5G_DATASET_F)THEN - CALL verify("t_objref", name(1:name_size),"/DS2", total_error) - ELSE - total_error = total_error + 1 - ENDIF - CALL h5oclose_f(obj, error) - CALL check("h5oclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - -END SUBROUTINE t_objref - - -SUBROUTINE t_regref(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" - INTEGER , PARAMETER :: dim0 = 2 - INTEGER , PARAMETER :: ds2dim0 = 16 - INTEGER , PARAMETER :: ds2dim1 = 3 - - INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) - - INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) - - INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) - - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hssize_t) :: npoints - TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - - INTEGER(size_t) :: size - CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 - - CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 - CHARACTER(LEN=80) :: name - INTEGER(hsize_t) :: i - TYPE(C_PTR) :: f_ptr - CHARACTER(LEN=ds2dim0) :: chrvar - CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct - - chrvar = "The quick brown " - READ(chrvar,'(16A1)') wdata2(1:16,1) - chrvar = "fox jumps over " - READ(chrvar,'(16A1)') wdata2(1:16,2) - chrvar = "the 5 lazy dogs " - READ(chrvar,'(16A1)') wdata2(1:16,3) - - chrref_correct(1) = 'hdf5' - chrref_correct(2) = 'Therowthedog' - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with character data. - ! - CALL h5screate_simple_f(2, dims2, space, error) - CALL check("h5screate_simple_f",error, total_error) - CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata2(1,1)) - CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Create reference to a list of elements in dset2. - ! - CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) - CALL check("h5sselect_elements_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - ! - ! Create reference to a hyperslab in dset2, close dataspace. - ! - CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) - CALL check("h5sselect_hyperslab_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - - ! - ! Create the dataset and write the region references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset2, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - ALLOCATE(rdata(1:dims(1))) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - - ! - ! Open the referenced object, retrieve its region as a - ! dataspace selection. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) - CALL check("H5Rdereference_f",error, total_error) - - CALL H5Rget_region_f(dset, f_ptr, space, error) - CALL check("H5Rget_region_f",error, total_error) - - ! - ! Get the object's name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) - CALL check("H5Iget_name_f",error, total_error) - CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) - CALL verify("H5Iget_name_f",name(1:size),TRIM(name), total_error) - ! - ! Allocate space for the read buffer. - ! - CALL H5Sget_select_npoints_f(space, npoints, error) - CALL check("H5Sget_select_npoints_f",error, total_error) - CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) - - dims3(1) = npoints - ! - ! Read the dataset region. - ! - CALL h5screate_simple_f(1, dims3, memspace, error) - CALL check("h5screate_simple_f",error, total_error) - - 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 verify("h5dread_f",rdata2(1)(1:npoints),TRIM(chrref_correct(i)), total_error) - - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Sclose_f(memspace, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Dclose_f(dset2, error) - CALL check("h5dclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_regref - -SUBROUTINE t_vlen(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER, PARAMETER :: LEN0 = 3 - INTEGER, PARAMETER :: LEN1 = 12 - INTEGER(hsize_t) :: dim0 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j - - ! vl data - TYPE vl - INTEGER, DIMENSION(:), POINTER :: DATA - END TYPE vl - TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr - - - TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures - TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) - INTEGER, DIMENSION(:), POINTER :: ptr_r - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize variable-length data. wdata(1) is a countdown of - ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. - ! - wdata(1)%len = LEN0 - wdata(2)%len = LEN1 - - ALLOCATE( ptr(1:2) ) - ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) - ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) - - DO i=1, wdata(1)%len - ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 - ENDDO - wdata(1)%p = C_LOC(ptr(1)%data(1)) - - ptr(2)%data(1:2) = 1 - DO i = 3, wdata(2)%len - ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) - ENDDO - wdata(2)%p = C_LOC(ptr(2)%data(1)) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create variable-length datatype for file and memory. - ! - CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) - CALL check("H5Tvlen_create_f",error, total_error) - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length data to it. - ! - CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. Note the use of H5Dvlen_reclaim - ! removes the need to manually deallocate the previously allocated - ! data. - ! - - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - - ! - ! Get dataspace and allocate memory for array of vlen structures. - ! This does not actually allocate memory for the vlen data, that - ! will be done by the library. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - dim0 = dims(1) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ! - ! Create the memory datatype. - ! - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, INT(dims(1)) - CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) - DO j = 1, rdata(i)%len - CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) - ENDDO - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(ptr) - CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlen - - -SUBROUTINE t_vlstring(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - - INTEGER(SIZE_T), PARAMETER :: dim0 = 4 - INTEGER(SIZE_T), PARAMETER :: sdim = 7 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) - INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) - INTEGER(hsize_t) :: i - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this example we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) - CALL check("H5Tset_strpad_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) - CALL check("h5dwrite_vl_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ALLOCATE(rdata(1:dims(1))) - - ! - ! Read the data. - ! - CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) - CALL check("H5Dread_vl_f",error, total_error) - - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - CALL verify("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring - -SUBROUTINE t_vlstring_readwrite(total_error) - -! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" - - INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 - INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR - CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D - - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer - CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string - TYPE(C_PTR) :: f_ptr - INTEGER(hsize_t) :: i, j - INTEGER :: len - INTEGER :: error - - ! Initialize array of C pointers - - 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)(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) - data2D_w(1,3) = A13(1) - data2D_w(1,4) = A14(1) - data2D_w(2,1) = A21(1) - data2D_w(2,2) = A22(1) - data2D_w(2,3) = A23(1) - data2D_w(2,4) = A24(1) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this test we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(2, dims2D, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata2D(1,1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this test. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims(1) - CALL C_F_POINTER(rdata(i), data) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verify("h5dread_f",data(1:len), data_w(i)(1:len), total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Test reading in 2D dataset - ! - CALL h5dopen_f(file, dataset2D, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - - CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) - - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata2D(1,1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims2D(1) - DO j = 1, dims2D(2) - CALL C_F_POINTER(rdata2D(i,j), DATA) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verify("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) - ENDDO - END DO - - DEALLOCATE(rdata2D) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring_readwrite - - -SUBROUTINE t_string(total_error) - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: sdim = 8 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata - INTEGER(hsize_t) :: i - INTEGER(SIZE_T) :: size - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file datatypes. For this example we will save - ! the strings as FORTRAN strings - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(filetype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the string data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)(1:1)) - CALL H5Dwrite_f(dset, filetype, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its size. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - CALL H5Tget_size_f(filetype, size, error) - CALL check("H5Tget_size_f",error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) - ! - ! Get dataspace. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) - - ALLOCATE(rdata(1:dims(1))) - ! - ! Create the memory datatype. - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(memtype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL H5Dread_f(dset, memtype, f_ptr, error, space) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, dims(1) - CALL verify("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - - -END SUBROUTINE t_string - -SUBROUTINE vl_test_special_char(total_error) - - IMPLICIT NONE - -! INTERFACE -! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) -! USE HDF5 -! USE ISO_C_BINDING -! IMPLICIT NONE -! CHARACTER(len=*), DIMENSION(:) :: data_in -! INTEGER(size_t), DIMENSION(:) :: line_lengths -! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type -! END SUBROUTINE setup_buffer -! END INTERFACE - - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" - INTEGER, PARAMETER :: line_length = 10 - INTEGER(hid_t) :: file - INTEGER(hid_t) :: dataset0 - CHARACTER(len=line_length), DIMENSION(1:100) :: data_in - CHARACTER(len=line_length), DIMENSION(1:100) :: data_out - INTEGER(size_t), DIMENSION(1:100) :: line_lengths - INTEGER(hid_t) :: string_id, space, dcpl - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) - INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) - INTEGER, PARAMETER :: ncontrolchar = 7 - CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & - (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) - INTEGER :: i, j, n, error - n = 8 - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - - max_dims = (/H5S_UNLIMITED_F/) - - ! - ! Create the memory datatype. - ! - CALL h5tcopy_f(h5t_string, string_id, error) - CALL check("h5tcopy_f", error, total_error) - CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) - CALL check("h5tset_strpad_f", error, total_error) - dims(1) = n - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error, max_dims) - CALL check("h5screate_simple_f", error, total_error) - CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) - CALL check("h5pcreate_f", error, total_error) - CALL h5pset_chunk_f(dcpl, 1, chunk, error) - CALL check("h5pset_chunk_f", error, total_error) - - data_dims(1) = line_length - data_dims(2) = n - ! - ! Create data with strings containing various control characters. - ! - DO i = 1, ncontrolchar - ! - ! Create the dataset, for the string with control character and write the string data to it. - ! - CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) - CALL check("h5dcreate_f", error, total_error) - CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) - CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dwrite_vl_f", error, total_error) - ! - ! Read the string back. - ! - CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dread_vl_f", error, total_error) - - DO j = 1, n - IF(data_in(j).NE.data_out(j))THEN - total_error = total_error + 1 - EXIT - ENDIF - ENDDO - - CALL h5dclose_f(dataset0, error) - CALL check("h5dclose_f", error, total_error) - ENDDO - - 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) - -END SUBROUTINE vl_test_special_char - - -SUBROUTINE setup_buffer(data_in, line_lengths, char_type) - - IMPLICIT NONE - - ! Creates a simple "Data_in" consisting of the letters of the alphabet, - ! one per line, with a control character. - - CHARACTER(len=10), DIMENSION(:) :: data_in - INTEGER(size_t), DIMENSION(:) :: line_lengths - INTEGER, DIMENSION(1:3) :: letters - CHARACTER(LEN=3) :: lets - CHARACTER(KIND=C_CHAR,LEN=*) :: char_type - CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp - INTEGER :: i, j, n, ff - - ! Convert the letters and special character to integers - lets = 'abc' - - READ(lets,'(3A1)') letters - READ(char_type,'(A1)') ff - n = SIZE(data_in) - j = 1 - DO i=1,n-1 - IF( j .EQ. 4 )THEN - WRITE(char_tmp,'(A1)') ff - data_in(i:i) = char_tmp - ELSE - WRITE(char_tmp,'(A1)') letters(j) - data_in(i:i) = char_tmp - ENDIF - line_lengths(i) = LEN_TRIM(data_in(i)) - j = j + 1 - IF( j .EQ. 5 ) j = 1 - END DO - WRITE(char_tmp,'(A1)') ff - data_in(n:n) = char_tmp - line_lengths(n) = 1 - -END SUBROUTINE setup_buffer - -!------------------------------------------------------------------------- -! Function: test_nbit -! -! Purpose: Tests (real, 4 byte) datatype for nbit filter -! -! Return: Success: 0 -! Failure: >0 -! -! Programmer: M. Scot Breitenfeld -! Decemeber 7, 2010 -! -! Modifications: Moved this subroutine from the 1.8 test file and -! modified it to use F2003 features. -! This routine requires 4 byte reals, so we use F2003 features to -! ensure the requirement is satisfied in a portable way. -! The need for this arises when a user specifies the default real is 8 bytes. -! MSB 7/31/12 -! -!------------------------------------------------------------------------- -! - -SUBROUTINE test_nbit(total_error ) - - IMPLICIT NONE - INTEGER, PARAMETER :: wp = C_FLOAT !should map to REAL*4 on most modern processors - INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: file - - INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) - INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) - ! orig_data[] are initialized to be within the range that can be represented by - ! dataset datatype (no precision loss during datatype conversion) - ! - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & - RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & - 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data - INTEGER(size_t) :: PRECISION, offset - INTEGER :: error - LOGICAL :: status - INTEGER(hsize_t) :: i, j - TYPE(C_PTR) :: f_ptr - - ! check to see if filter is available - CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) - IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter - total_error = -1 ! so return - RETURN - ENDIF - - CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) - CALL check("H5Fcreate_f", error, total_error) - - ! Define dataset datatype (integer), and set precision, offset - CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) - CALL CHECK(" H5Tcopy_f", error, total_error) - CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) - CALL CHECK(" H5Tset_fields_f", error, total_error) - offset = 7 - CALL H5Tset_offset_f(datatype, offset, error) - CALL CHECK(" H5Tset_offset_f", error, total_error) - PRECISION = 20 - CALL H5Tset_precision_f(datatype,PRECISION, error) - CALL CHECK(" H5Tset_precision_f", error, total_error) - - CALL H5Tset_size_f(datatype, 4_size_t, error) - CALL CHECK(" H5Tset_size_f", error, total_error) - - CALL H5Tset_ebias_f(datatype, 31_size_t, error) - CALL CHECK(" H5Tset_ebias_f", error, total_error) - - ! Create the data space - CALL H5Screate_simple_f(2, dims, space, error) - CALL CHECK(" H5Screate_simple_f", error, total_error) - - ! USE nbit filter - CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) - CALL CHECK(" H5Pcreate_f", error, total_error) - - CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) - CALL CHECK(" H5Pset_chunk_f", error, total_error) - CALL H5Pset_nbit_f(dc, error) - CALL CHECK(" H5Pset_nbit_f", error, total_error) - - ! Create the dataset - CALL H5Dcreate_f(file, "nbit_real", datatype, & - space, dataset, error, dc) - CALL CHECK(" H5Dcreate_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 1: Test nbit by setting up a chunked dataset and writing - ! to it. - !---------------------------------------------------------------------- - ! - mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) - - f_ptr = C_LOC(orig_data(1,1)) - CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dwrite_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 2: Try to read the data we just wrote. - !---------------------------------------------------------------------- - ! - f_ptr = C_LOC(new_data(1,1)) - CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dread_f", error, total_error) - - ! Check that the values read are the same as the values written - ! Assume size of long long = size of double - ! - i_loop: DO i = 1, dims(1) - j_loop: DO j = 1, dims(2) - - IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN - - IF( .NOT.check_real_eq( new_data(i,j), orig_data(i,j)) ) THEN - total_error = total_error + 1 - WRITE(*,'(" Read different values than written.")') - WRITE(*,'(" At index ", 2(1X,I0))') i, j - EXIT i_loop - END IF - ENDDO j_loop - ENDDO i_loop - - !---------------------------------------------------------------------- - ! Cleanup - !---------------------------------------------------------------------- - ! - CALL H5Tclose_f(datatype, error) - CALL CHECK(" H5Tclose_f", error, total_error) - CALL H5Pclose_f(dc, error) - CALL CHECK(" H5Pclose_f", error, total_error) - CALL H5Sclose_f(space, error) - CALL CHECK(" H5Sclose_f", error, total_error) - CALL H5Dclose_f(dataset, error) - CALL CHECK(" H5Dclose_f", error, total_error) - CALL H5Fclose_f(file, error) - CALL CHECK(" H5Fclose_f", error, 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. -!------------------------------------------------------------------------- -! - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors - - INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors - - INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& - INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - 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(hsize_t) :: ih - 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", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_GREEN - f_ptr = C_LOC(val) - CALL H5Tenum_insert_f(dtype, "GREEN", f_ptr, error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLUE - f_ptr = C_LOC(val) - CALL H5Tenum_insert_f(dtype, "BLUE", f_ptr, error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_WHITE - f_ptr = C_LOC(val) - CALL H5Tenum_insert_f(dtype, "WHITE", f_ptr, error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLACK - f_ptr = C_LOC(val) - CALL H5Tenum_insert_f(dtype, "BLACK", f_ptr, 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data2(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_short(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & - ih, INT(data1(ih)), ih, INT(data_double(ih)) - EXIT - ENDIF - ENDDO - - ! Test converting the data to (SELECTED_INT_KIND(9)) number. - ! Read enum data back as (SELECTED_INT_KIND(9)) 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i8(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i8(ih)) - EXIT - ENDIF - ENDDO - - ! Test converting the data to (SELECTED_INT_KIND(18)) number. - ! Read enum data back as (SELECTED_INT_KIND(18)) 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i16(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i16(ih)) - EXIT - ENDIF - ENDDO - - ! Test converting the data to C_FLOAT number. - ! Read enum data back as C_FLOAT 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_r7(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_int(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) - EXIT - ENDIF - ENDDO - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f", error, total_error) - - !********************************************************* - !* Dataset of real C_FLOAT type - !********************************************************* - - ! Create a dataset of C_FLOAT 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) - EXIT - ENDIF - ENDDO - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f", error, total_error) - - ! ***************************************************************** - ! * Dataset of integer SELECTED_INT_KIND(18) type - ! ***************************************************************** - - ! Create a integer dataset of (SELECTED_INT_KIND(18)) 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_i16(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) - 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 - -END MODULE TH5T_F03 diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 new file mode 100644 index 0000000..32531b0 --- /dev/null +++ b/fortran/test/tH5T_F03.f90 @@ -0,0 +1,3453 @@ +!****h* root/fortran/test/tH5T_F03.f90 +! +! NAME +! tH5T_F03.f90 +! +! FUNCTION +! Test FORTRAN HDF5 H5T 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! +! CONTAINS SUBROUTINES +! test_array_compound_atomic, test_array_compound_array, +! test_array_bkg, test_h5kind_to_type +! +!***** + +! ***************************************** +! *** H 5 T T E S T S +! ***************************************** + +!*************************************************************** +!** +!** test_array_compound_atomic(): Test basic array datatype code. +!** Tests 1-D array of compound datatypes (with no array fields) +!** +!*************************************************************** +! + +MODULE TH5T_F03 + + USE HDF5 + USE ISO_C_BINDING + +CONTAINS + +SUBROUTINE test_array_compound_atomic(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + ! 1-D dataset WITH fixed dimensions + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" + + TYPE s1_t + INTEGER :: i + REAL :: f + END TYPE s1_t + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + INTEGER(hid_t) :: sid1 ! Dataspace ID + INTEGER(hid_t) :: tid1 ! Array Datatype ID + INTEGER(hid_t) :: tid2 ! Compound Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER :: ndims ! Array rank for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER :: i,j ! counting variables + + INTEGER :: error ! Generic RETURN value + INTEGER :: namelen + LOGICAL :: flag + + TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work + + ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + wdata(i,j)%i = i * 10 + j + wdata(i,j)%f = i * 2.5 + j + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Insert float field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write dataset to disk + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2, error) + CALL check("h5tclose_f", error, total_error) + + ! Read dataset from disk + + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(wdata(i,j)%f,dp), REAL( rdata(i,j)%f, dp)) ) THEN + PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + +END SUBROUTINE test_array_compound_atomic +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_compound_array(): Test basic array datatype code. +!!$!** Tests 1-D array of compound datatypes (with array fields) +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_compound_array(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 3 + INTEGER, PARAMETER :: ARRAY2_DIM1= 5 + + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" + + TYPE st_t_struct ! Typedef for compound datatype + INTEGER :: i + REAL, DIMENSION(1:ARRAY2_DIM1) :: f + CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c + END TYPE st_t_struct + ! Information to write + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata + ! Information read in + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata + + + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + integer(hid_t) :: sid1 ! Dataspace ID + integer(hid_t) :: tid1 ! Array Datatype ID + integer(hid_t) :: tid2 ! Compound Datatype ID + integer(hid_t) :: tid3 ! Nested Array Datatype ID + integer(hid_t) :: tid4 ! Nested Array Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) + + INTEGER ndims ! Array rank for reading + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER(hid_t) :: mtid2 ! Datatype ID for field + + INTEGER :: mclass ! Datatype class for field + INTEGER :: i,j,k ! counting variables + + INTEGER :: error + CHARACTER(LEN=2) :: ichr2 + INTEGER :: namelen + LOGICAL :: flag + INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier + INTEGER(SIZE_T) :: attrlen ! Length of the attribute string + + TYPE(c_ptr) :: f_ptr + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, array1_DIM1 + wdata(i,j)%i = i*10+j + DO k = 1, ARRAY2_DIM1 + wdata(i,j)%f(k) = 10*i+j+.5 + WRITE(ichr2,'(I2.2)') k + wdata(i,j)%c(k) = ichr2 + ENDDO + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + ! Create a compound datatype to refer to + ! + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array of floats datatype + CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) + CALL check("h5tarray_create_f", error, total_error) + ! Insert float array field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) + CALL check("h5tinsert_f", error, total_error) + + ! + ! Create datatype for the String attribute. + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) + CALL check("h5tcopy_f",error,total_error) + + attrlen = LEN(wdata(1,1)%c(1)) + CALL h5tset_size_f(atype_id, attrlen, error) + CALL check("h5tset_size_f",error,total_error) + + ! Create an array of character datatype + CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) + 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)(1:1))), tid4, error) + CALL check("h5tinsert2_f", error, total_error) + + ! Close array of floats field datatype + CALL h5tclose_f(tid3,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5tclose_f(tid4,error) + CALL check("h5tclose_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + + ! Write dataset to disk + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 2nd field's class + CALL H5Tget_class_f(mtid, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the 3rd field's name + CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"c", total_error) + + ! Check the 3rd field's offset + 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)(1:1)))), total_error) + + ! Check the 3rd field's datatype + CALL H5Tget_member_type_f(tid2, 2, mtid2, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 3rd field's class + CALL H5Tget_class_f(mtid2, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid2, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid2, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid2, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, atype_id, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + + ! Close the array's base type datatype + CALL h5tclose_f(tid3, error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! READ dataset from disk + + f_ptr = c_null_ptr + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + DO k = 1, ARRAY2_DIM1 + + IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN + PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN + PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + END SUBROUTINE test_array_compound_array +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_bkg(): Test basic array datatype code. +!!$!** Tests reading compound datatype with array fields and +!!$!** writing partial fields. +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_bkg(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: LENGTH = 5 + INTEGER, PARAMETER :: ALEN = 10 + INTEGER, PARAMETER :: RANK = 1 + INTEGER, PARAMETER :: NMAX = 100 + CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" + + INTEGER(hid_t) :: fid, array_dt + INTEGER(hid_t) :: space + INTEGER(hid_t) :: type + INTEGER(hid_t) :: dataset + + INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) + INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) + + INTEGER :: i, j + INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) + + TYPE CmpField_struct + INTEGER, DIMENSION(1:ALEN) :: a + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + REAL(KIND=dp), DIMENSION(1:ALEN) :: c + ENDTYPE CmpField_struct + + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr + + TYPE CmpDTSinfo_struct + INTEGER :: nsubfields + CHARACTER(LEN=5), DIMENSION(1:nmax) :: name + INTEGER(size_t), DIMENSION(1:nmax) :: offset + INTEGER(hid_t), DIMENSION(1:nmax) :: datatype + END TYPE CmpDTSinfo_struct + + TYPE(CmpDTSinfo_struct) :: dtsinfo + + TYPE fld_t_struct + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + END TYPE fld_t_struct + + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double datatype + INTEGER(SIZE_T) :: sizeof_compound ! total size of compound + + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr + + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + + INTEGER :: error + TYPE(c_ptr) :: f_ptr + +! Initialize the data +! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + cf(i)%a(j) = 100*(i+1) + j + cf(i)%b(j) = (100.*(i+1) + 0.01*j) + cf(i)%c(j) = 100.*(i+1) + 0.02*j + ENDDO + ENDDO + + ! Set the number of data members + ! ------------------------------ + + dtsinfo%nsubfields = 3 + + ! Initialize the offsets + ! ----------------------- + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) + CALL check("h5tget_size_f", error, total_error) + IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ENDIF + + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) + CALL check("h5tget_size_f", error, total_error) + + dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) + dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) + dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) + + + ! Initialize the data type IDs + ! ---------------------------- + dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; + dtsinfo%datatype(2) = H5T_NATIVE_REAL_4; + dtsinfo%datatype(3) = H5T_NATIVE_REAL_8; + + + ! Initialize the names of data members + ! ------------------------------------ + + dtsinfo%name(1) = "One " + dtsinfo%name(2) = "Two " + dtsinfo%name(3) = "Three" + + ! Create file + ! ----------- + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create data space + ! ----------------- + CALL h5screate_simple_f(RANK, dim, space, error) + CALL check("h5screate_simple_f", error, total_error) + + + ! Create the memory data type + ! --------------------------- + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) + CALL check("h5tcreate_f", error, total_error) + + ! Add members to the compound data type + ! -------------------------------------- + + DO i = 1, dtsinfo%nsubfields + CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + ENDDO + + ! Create the dataset + ! ------------------ / + CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write data to the dataset + ! ------------------------- + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(cf(1)) + + CALL h5dwrite_f(dataset, type, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ALLOCATE(rdims1(1:2)) ! dummy not needed + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, type, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL( cfr(i)%b(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL( cfr(i)%c(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + + + ! Release IDs + ! ----------- + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + CALL h5sclose_f(space,error) + CALL check("h5sclose_f", error, total_error) + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + !**************************** + ! Reopen the file and update + !**************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + sizeof_compound = INT( type_sizer*ALEN, size_t) + + CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) + CALL check("h5tcreate_f", error, total_error) + + CALL h5tarray_create_f(H5T_NATIVE_REAL_4, 1, dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + + CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + ! Initialize the data to overwrite + ! -------------------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + fld(i)%b(j) = 1.313 + cf(i)%b(j) = fld(i)%b(j) + ENDDO + ENDDO + + f_ptr = C_LOC(fld(1)) + + CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ! Read just the field changed + + f_ptr = C_LOC(fldr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + DO i = 1, LENGTH + DO j = 1, ALEN + IF( .NOT.dreal_eq( REAL(fld(i)%b(j),dp), REAL( fldr(i)%b(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + CALL h5tclose_f(TYPE,error) + CALL check("h5tclose_f", error, total_error) + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Read the entire dataset again + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + +!************************************************** +! Reopen the file and print out all the data again +!************************************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Reset the data to read in + ! ------------------------- + + DO i = 1, LENGTH + cfr(i)%a(:) = 0 + cfr(i)%b(:) = 0 + cfr(i)%c(:) = 0 + ENDDO + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN + PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + END SUBROUTINE test_array_bkg + + + + SUBROUTINE test_h5kind_to_type(total_error) + + USE ISO_C_BINDING + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors + 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 + + CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id1 ! Dataset identifier + INTEGER(HID_T) :: dset_id4 ! Dataset identifier + INTEGER(HID_T) :: dset_id8 ! Dataset identifier + INTEGER(HID_T) :: dset_id16 ! Dataset identifier + INTEGER(HID_T) :: dset_idr ! Dataset identifier + INTEGER(HID_T) :: dset_idr4 ! Dataset identifier + INTEGER(HID_T) :: dset_idr8 ! Dataset identifier + + INTEGER :: error ! Error flag + INTEGER :: i + +! Data buffers: + + INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 + INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 + INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 + INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 + + REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r + REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 + REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 + + INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize the dset_data array. + ! + DO i = 1, 4 + dset_data_i1(i) = i + dset_data_i4(i) = i + dset_data_i8(i) = i + dset_data_i16(i) = i + + dset_data_r(i) = (i)*100. + dset_data_r7(i) = (i)*100. + dset_data_r15(i) = (i)*1000. + + END DO + + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspaces for datasets + ! + CALL h5screate_simple_f(1, data_dims , dspace_id, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset. + ! + CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) + CALL check("H5Dcreate_f",error, total_error) + + CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) + CALL check("H5Dcreate_f",error, total_error) + + ! + ! Write the dataset. + ! + f_ptr = C_LOC(dset_data_i1(1)) + CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i4(1)) + CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i8(1)) + CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i16(1)) + CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r(1)) + CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r7(1)) + CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r15(1)) + CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + ! + ! Close the file + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + + ! Open the file + + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error, total_error) + ! + ! Read the dataset. + ! + ! Read data back into an integer size that is larger then the original size used for + ! writing the data + f_ptr = C_LOC(data_out_i1) + CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i4) + CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i8) + CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i16) + CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r) + CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r7) + CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r15) + CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + + DO i = 1, 4 + + CALL verify_Fortran_INTEGER_4("h5kind_to_type1",INT(dset_data_i1(i),int_kind_8),INT(data_out_i1(i),int_kind_8),total_error) + CALL verify_Fortran_INTEGER_4("h5kind_to_type2",INT(dset_data_i4(i),int_kind_8),INT(data_out_i4(i),int_kind_8),total_error) + CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) + CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) + + CALL verify_real_kind_7("h5kind_to_type5",REAL(dset_data_r(i),real_kind_7),REAL(data_out_r(i),real_kind_7),total_error) + CALL verify_real_kind_7("h5kind_to_type6",REAL(dset_data_r7(i),real_kind_7),REAL(data_out_r7(i),real_kind_7),total_error) + CALL verify_real_kind_7("h5kind_to_type7",REAL(dset_data_r15(i),real_kind_7),REAL(data_out_r15(i),real_kind_7),total_error) + + END DO + + ! + ! Close the dataset. + ! + CALL h5dclose_f(dset_id1, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id8, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id16, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr8, error) + CALL check("h5dclose_f",error, total_error) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE test_h5kind_to_type + +!************************************************************ +! +! This test reads and writes array datatypes +! to a dataset. The test first writes integers arrays of +! dimension ADIM0xADIM1 to a dataset with a dataspace of +! DIM0, then closes the file. Next, it reopens the file, +! reads back the data. +! +!************************************************************ +SUBROUTINE t_array(total_error) + + USE ISO_C_BINDING + USE HDF5 + USE TH5_MISC + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: adim0 = 3 + INTEGER , PARAMETER :: adim1 = 5 + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: i, j, k + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + + ! + ! Initialize data. i is the element in the dataspace, j and k the + ! elements within the array datatype. + ! + DO i = 1, dim0 + DO j = 1, adim0 + DO k = 1, adim1 + wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) + ENDDO + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, error) + ! + ! Create array datatypes for file and memory. + ! + CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) + CALL check("H5Tarray_create_f",error, total_error) + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the array data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset, and attribute. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its dimensions. + ! + CALL h5dget_type_f(dset, filetype, error) + CALL check("h5dget_type_f",error, error) + CALL H5Tget_array_dims_f(filetype, adims, error) + CALL check("h5dget_type_f",error, total_error) + CALL VERIFY("H5Tget_array_dims_f", INT(adims(1)), adim0, total_error) + CALL VERIFY("H5Tget_array_dims_f", INT(adims(2)), adim1, total_error) + ! + ! Get dataspace and allocate memory for read buffer. This is a + ! three dimensional attribute when the array datatype is included. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) + ! + ! Create the memory datatype. + ! + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j=1, INT(adim0) + DO k = 1, INT(adim1) + CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_array + +SUBROUTINE t_enum(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + INTEGER(HID_T) :: F_BASET ! File base type + INTEGER(HID_T) :: M_BASET ! Memory base type + INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 + +! Enumerated type + INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER, DIMENSION(1:1), TARGET :: val + + CHARACTER(LEN=6), DIMENSION(1:4) :: & + names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) + CHARACTER(LEN=NAME_BUF_SIZE) :: name + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j, idx + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize DATA. + ! + F_BASET = H5T_STD_I16BE ! File base type + M_BASET = H5T_NATIVE_INTEGER ! Memory base type + DO i = 1, dim0 + DO j = 1, dim1 + wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create the enumerated datatypes for file and memory. This + ! process is simplified IF native types are used for the file, + ! as only one type must be defined. + ! + CALL h5tenum_create_f(F_BASET, filetype, error) + CALL check("h5tenum_create_f",error, total_error) + + CALL h5tenum_create_f(M_BASET, memtype, error) + CALL check("h5tenum_create_f",error, total_error) + + DO i = SOLID, PLASMA + ! + ! Insert enumerated value for memtype. + ! + val(1) = i + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), C_LOC(val(1)), error) + CALL check("H5Tenum_insert_f", error, total_error) + ! + ! Insert enumerated value for filetype. We must first convert + ! the numerical value val to the base type of the destination. + ! + f_ptr = C_LOC(val(1)) + CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) + CALL check("H5Tconvert_f",error, total_error) + IF(i.GE.1)THEN ! test both F90 and F03 APIs + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) + ELSE + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + ENDIF + CALL check("H5Tenum_insert_f",error, total_error) + ENDDO + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, total_error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the enumerated data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f (file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset,space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + + ALLOCATE(rdata(1:dims(1),1:dims(2))) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1,1)) + CALL h5dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + ! + ! Get the name of the enumeration member. + ! + CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) + CALL check("h5tenum_nameof_f",error, total_error) + idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 + CALL verifystring("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_enum + +SUBROUTINE t_bit(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + + INTEGER(HID_T) :: file, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: A, B, C, D + INTEGER :: Aw, Bw, Cw, Dw + INTEGER :: i, j + INTEGER, PARAMETER :: hex = Z'00000003' + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize data. We will manually pack 4 2-bit integers into + ! each unsigned char data element. + ! + DO i = 0, dim0-1 + DO j = 0, dim1-1 + wdata(i+1,j+1) = 0 + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the bitfield data to it. + ! + CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) + ALLOCATE(rdata(1:dims(1),1:dims(2))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" + B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" + C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" + D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" + + Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) + Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) + Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) + Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) + + CALL VERIFY("bitfield", A, Aw, total_error) + CALL VERIFY("bitfield", B, Bw, total_error) + CALL VERIFY("bitfield", C, Cw, total_error) + CALL VERIFY("bitfield", D, Dw, total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + +END SUBROUTINE t_bit + +SUBROUTINE t_opaque(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: size = 7 + INTEGER(HID_T) :: file, space, dtype, dset ! Handles + INTEGER(size_t) :: len + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) + + CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + CHARACTER(LEN=size-1) :: str = "OPAQUE" + + CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into + CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact + CHARACTER(LEN=17) :: tag_big ! and to big. + + INTEGER :: taglen + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hsize_t) :: i + CHARACTER(LEN=1) :: ichr + TYPE(C_PTR) :: f_ptr + INTEGER :: error + ! + ! Initialize data. + ! + DO i = 1, dim0 + WRITE(ichr,'(I1)') i-1 + wdata(i) = str//ichr + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create opaque datatype and set the tag to something appropriate. + ! For this example we will write and view the data as a character + ! array. + ! + CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) + CALL check("h5tcreate_f",error, total_error) + CALL h5tset_tag_f(dtype,"Character array",error) + CALL check("h5tset_tag_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the opaque data to it. + ! + CALL h5dcreate_f(file, dataset, dtype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)(1:1)) + CALL h5dwrite_f(dset, dtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get datatype and properties for the datatype. + ! + CALL h5dget_type_f(dset, dtype, error) + CALL check("h5dget_type_f",error, total_error) + CALL h5tget_size_f(dtype, len, error) + CALL check("h5tget_size_f",error, total_error) + + ! Next tests should return + ! opaque_tag = tag = "Character array" and the actual length = 15 + + ! Test reading into a string that is to small + CALL h5tget_tag_f(dtype, tag_sm, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verifystring("h5tget_tag_f",tag_sm,"Character arra", total_error) + + ! Test reading into a string that is exact + CALL h5tget_tag_f(dtype, tag_exact, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verifystring("h5tget_tag_f",tag_exact,"Character array", total_error) + + ! Test reading into a string that is to big + CALL h5tget_tag_f(dtype, tag_big, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verifystring("h5tget_tag_f",tag_big,"Character array ", total_error) + + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL h5dread_f(dset, dtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + DO i = 1, dims(1) + CALL verifystring("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_opaque + +SUBROUTINE t_objref(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 2 + + INTEGER(HID_T) :: file, space, dset, obj ! Handles + INTEGER :: error + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) + TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: objtype + INTEGER(SIZE_T) :: name_size + CHARACTER(LEN=80) :: name + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER :: i + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with a null dataspace. + ! + CALL h5screate_f(H5S_NULL_F,space,error) + CALL check("h5screate_f",error, total_error) + CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) + CALL check("h5dcreate_f",error, total_error) + ! + CALL h5dclose_f(obj , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create a group. + ! + CALL h5gcreate_f(file, "G1", obj, error) + CALL check("h5gcreate_f",error, total_error) + CALL h5gclose_f(obj, error) + CALL check("h5gclose_f",error, total_error) + ! + ! Create references to the previously created objects. note, space_id + ! is not needed for object references. + ! + f_ptr = C_LOC(wdata(1)) + CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the object references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:maxdims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, INT(maxdims(1)) + ! + ! Open the referenced object, get its name and type. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) + CALL check("H5Rdereference_f",error, total_error) + CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) + CALL check("H5Rget_obj_type_f",error, total_error) + ! + ! Get the length of the name and name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) + CALL check("H5Iget_name_f",error, total_error) + ! + ! Print the object type and close the object. + ! + IF(objtype.EQ.H5G_GROUP_F)THEN + CALL verifystring("t_objref", name(1:name_size),"/G1", total_error) + ELSE IF(objtype.EQ.H5G_DATASET_F)THEN + CALL verifystring("t_objref", name(1:name_size),"/DS2", total_error) + ELSE + total_error = total_error + 1 + ENDIF + CALL h5oclose_f(obj, error) + CALL check("h5oclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + +END SUBROUTINE t_objref + + +SUBROUTINE t_regref(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" + INTEGER , PARAMETER :: dim0 = 2 + INTEGER , PARAMETER :: ds2dim0 = 16 + INTEGER , PARAMETER :: ds2dim1 = 3 + + INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) + + INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) + + INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) + + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hssize_t) :: npoints + TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + + INTEGER(size_t) :: size + CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 + + CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 + CHARACTER(LEN=80) :: name + INTEGER(hsize_t) :: i + TYPE(C_PTR) :: f_ptr + CHARACTER(LEN=ds2dim0) :: chrvar + CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct + + chrvar = "The quick brown " + READ(chrvar,'(16A1)') wdata2(1:16,1) + chrvar = "fox jumps over " + READ(chrvar,'(16A1)') wdata2(1:16,2) + chrvar = "the 5 lazy dogs " + READ(chrvar,'(16A1)') wdata2(1:16,3) + + chrref_correct(1) = 'hdf5' + chrref_correct(2) = 'Therowthedog' + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with character data. + ! + CALL h5screate_simple_f(2, dims2, space, error) + CALL check("h5screate_simple_f",error, total_error) + CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata2(1,1)) + CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Create reference to a list of elements in dset2. + ! + CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) + CALL check("h5sselect_elements_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + ! + ! Create reference to a hyperslab in dset2, close dataspace. + ! + CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) + CALL check("h5sselect_hyperslab_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + + ! + ! Create the dataset and write the region references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset2, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + ALLOCATE(rdata(1:dims(1))) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + + ! + ! Open the referenced object, retrieve its region as a + ! dataspace selection. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) + CALL check("H5Rdereference_f",error, total_error) + + CALL H5Rget_region_f(dset, f_ptr, space, error) + CALL check("H5Rget_region_f",error, total_error) + + ! + ! Get the object's name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) + CALL check("H5Iget_name_f",error, total_error) + CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) + CALL verifystring("H5Iget_name_f",name(1:size),TRIM(name), total_error) + ! + ! Allocate space for the read buffer. + ! + CALL H5Sget_select_npoints_f(space, npoints, error) + CALL check("H5Sget_select_npoints_f",error, total_error) + CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) + + dims3(1) = npoints + ! + ! Read the dataset region. + ! + CALL h5screate_simple_f(1, dims3, memspace, error) + CALL check("h5screate_simple_f",error, total_error) + + 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) + + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Sclose_f(memspace, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Dclose_f(dset2, error) + CALL check("h5dclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_regref + +SUBROUTINE t_vlen(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER, PARAMETER :: LEN0 = 3 + INTEGER, PARAMETER :: LEN1 = 12 + INTEGER(hsize_t) :: dim0 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j + + ! vl data + TYPE vl + INTEGER, DIMENSION(:), POINTER :: DATA + END TYPE vl + TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr + + + TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures + TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) + INTEGER, DIMENSION(:), POINTER :: ptr_r + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize variable-length data. wdata(1) is a countdown of + ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. + ! + wdata(1)%len = LEN0 + wdata(2)%len = LEN1 + + ALLOCATE( ptr(1:2) ) + ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) + ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) + + DO i=1, wdata(1)%len + ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 + ENDDO + wdata(1)%p = C_LOC(ptr(1)%data(1)) + + ptr(2)%data(1:2) = 1 + DO i = 3, wdata(2)%len + ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) + ENDDO + wdata(2)%p = C_LOC(ptr(2)%data(1)) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create variable-length datatype for file and memory. + ! + CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) + CALL check("H5Tvlen_create_f",error, total_error) + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length data to it. + ! + CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. Note the use of H5Dvlen_reclaim + ! removes the need to manually deallocate the previously allocated + ! data. + ! + + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + + ! + ! Get dataspace and allocate memory for array of vlen structures. + ! This does not actually allocate memory for the vlen data, that + ! will be done by the library. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + dim0 = dims(1) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ! + ! Create the memory datatype. + ! + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, INT(dims(1)) + CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) + DO j = 1, rdata(i)%len + CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) + ENDDO + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(ptr) + CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlen + + +SUBROUTINE t_vlstring(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + + INTEGER(SIZE_T), PARAMETER :: dim0 = 4 + INTEGER(SIZE_T), PARAMETER :: sdim = 7 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) + INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) + INTEGER(hsize_t) :: i + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this example we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) + CALL check("H5Tset_strpad_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) + CALL check("h5dwrite_vl_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ALLOCATE(rdata(1:dims(1))) + + ! + ! Read the data. + ! + CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) + CALL check("H5Dread_vl_f",error, total_error) + + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + CALL verifystring("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring + +SUBROUTINE t_vlstring_readwrite(total_error) + +! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" + + INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 + INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR + CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D + + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer + CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string + TYPE(C_PTR) :: f_ptr + INTEGER(hsize_t) :: i, j + INTEGER :: len + INTEGER :: error + + ! Initialize array of C pointers + + 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)(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) + data2D_w(1,3) = A13(1) + data2D_w(1,4) = A14(1) + data2D_w(2,1) = A21(1) + data2D_w(2,2) = A22(1) + data2D_w(2,3) = A23(1) + data2D_w(2,4) = A24(1) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this test we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(2, dims2D, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata2D(1,1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this test. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims(1) + CALL C_F_POINTER(rdata(i), data) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verifystring("h5dread_f",data(1:len), data_w(i)(1:len), total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Test reading in 2D dataset + ! + CALL h5dopen_f(file, dataset2D, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + + CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) + + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata2D(1,1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims2D(1) + DO j = 1, dims2D(2) + CALL C_F_POINTER(rdata2D(i,j), DATA) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verifystring("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) + ENDDO + END DO + + DEALLOCATE(rdata2D) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring_readwrite + + +SUBROUTINE t_string(total_error) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: sdim = 8 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata + INTEGER(hsize_t) :: i + INTEGER(SIZE_T) :: size + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file datatypes. For this example we will save + ! the strings as FORTRAN strings + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(filetype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the string data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)(1:1)) + CALL H5Dwrite_f(dset, filetype, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its size. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + CALL H5Tget_size_f(filetype, size, error) + CALL check("H5Tget_size_f",error, total_error) + CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) + ! + ! Get dataspace. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) + + ALLOCATE(rdata(1:dims(1))) + ! + ! Create the memory datatype. + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(memtype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL H5Dread_f(dset, memtype, f_ptr, error, space) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, dims(1) + CALL verifystring("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + + +END SUBROUTINE t_string + +SUBROUTINE vl_test_special_char(total_error) + + USE HDF5 + USE TH5_MISC + IMPLICIT NONE + +! INTERFACE +! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) +! USE HDF5 +! USE ISO_C_BINDING +! IMPLICIT NONE +! CHARACTER(len=*), DIMENSION(:) :: data_in +! INTEGER(size_t), DIMENSION(:) :: line_lengths +! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type +! END SUBROUTINE setup_buffer +! END INTERFACE + + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" + INTEGER, PARAMETER :: line_length = 10 + INTEGER(hid_t) :: file + INTEGER(hid_t) :: dataset0 + CHARACTER(len=line_length), DIMENSION(1:100) :: data_in + CHARACTER(len=line_length), DIMENSION(1:100) :: data_out + INTEGER(size_t), DIMENSION(1:100) :: line_lengths + INTEGER(hid_t) :: string_id, space, dcpl + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) + INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) + INTEGER, PARAMETER :: ncontrolchar = 7 + CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & + (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) + INTEGER :: i, j, n, error + n = 8 + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + + max_dims = (/H5S_UNLIMITED_F/) + + ! + ! Create the memory datatype. + ! + CALL h5tcopy_f(h5t_string, string_id, error) + CALL check("h5tcopy_f", error, total_error) + CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) + CALL check("h5tset_strpad_f", error, total_error) + dims(1) = n + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error, max_dims) + CALL check("h5screate_simple_f", error, total_error) + CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) + CALL check("h5pcreate_f", error, total_error) + CALL h5pset_chunk_f(dcpl, 1, chunk, error) + CALL check("h5pset_chunk_f", error, total_error) + + data_dims(1) = line_length + data_dims(2) = n + ! + ! Create data with strings containing various control characters. + ! + DO i = 1, ncontrolchar + ! + ! Create the dataset, for the string with control character and write the string data to it. + ! + CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) + CALL check("h5dcreate_f", error, total_error) + CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) + CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dwrite_vl_f", error, total_error) + ! + ! Read the string back. + ! + CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dread_vl_f", error, total_error) + + DO j = 1, n + IF(data_in(j).NE.data_out(j))THEN + total_error = total_error + 1 + EXIT + ENDIF + ENDDO + + CALL h5dclose_f(dataset0, error) + CALL check("h5dclose_f", error, total_error) + ENDDO + + 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) + +END SUBROUTINE vl_test_special_char + + +SUBROUTINE setup_buffer(data_in, line_lengths, char_type) + + USE HDF5 + USE ISO_C_BINDING + + IMPLICIT NONE + + ! Creates a simple "Data_in" consisting of the letters of the alphabet, + ! one per line, with a control character. + + CHARACTER(len=10), DIMENSION(:) :: data_in + INTEGER(size_t), DIMENSION(:) :: line_lengths + INTEGER, DIMENSION(1:3) :: letters + CHARACTER(LEN=3) :: lets + CHARACTER(KIND=C_CHAR,LEN=*) :: char_type + CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp + INTEGER :: i, j, n, ff + + ! Convert the letters and special character to integers + lets = 'abc' + + READ(lets,'(3A1)') letters + READ(char_type,'(A1)') ff + n = SIZE(data_in) + j = 1 + DO i=1,n-1 + IF( j .EQ. 4 )THEN + WRITE(char_tmp,'(A1)') ff + data_in(i:i) = char_tmp + ELSE + WRITE(char_tmp,'(A1)') letters(j) + data_in(i:i) = char_tmp + ENDIF + line_lengths(i) = LEN_TRIM(data_in(i)) + j = j + 1 + IF( j .EQ. 5 ) j = 1 + END DO + WRITE(char_tmp,'(A1)') ff + data_in(n:n) = char_tmp + line_lengths(n) = 1 + +END SUBROUTINE setup_buffer + +!------------------------------------------------------------------------- +! Function: test_nbit +! +! Purpose: Tests (real, 4 byte) datatype for nbit filter +! +! Return: Success: 0 +! Failure: >0 +! +! Programmer: M. Scot Breitenfeld +! Decemeber 7, 2010 +! +! Modifications: Moved this subroutine from the 1.8 test file and +! modified it to use F2003 features. +! This routine requires 4 byte reals, so we use F2003 features to +! ensure the requirement is satisfied in a portable way. +! The need for this arises when a user specifies the default real is 8 bytes. +! MSB 7/31/12 +! +!------------------------------------------------------------------------- +! + +SUBROUTINE test_nbit(total_error ) + + USE HDF5 + USE TH5_MISC + USE ISO_C_BINDING + + IMPLICIT NONE + INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, INTENT(INOUT) :: total_error + INTEGER(hid_t) :: file + + INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) + INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) + ! orig_data[] are initialized to be within the range that can be represented by + ! dataset datatype (no precision loss during datatype conversion) + ! + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & + RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & + 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data + INTEGER(size_t) :: PRECISION, offset + INTEGER :: error + LOGICAL :: status + INTEGER(hsize_t) :: i, j + TYPE(C_PTR) :: f_ptr + + ! check to see if filter is available + CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) + IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter + total_error = -1 ! so return + RETURN + ENDIF + + CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) + CALL check("H5Fcreate_f", error, total_error) + + ! Define dataset datatype (integer), and set precision, offset + CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) + CALL CHECK(" H5Tcopy_f", error, total_error) + CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) + CALL CHECK(" H5Tset_fields_f", error, total_error) + offset = 7 + CALL H5Tset_offset_f(datatype, offset, error) + CALL CHECK(" H5Tset_offset_f", error, total_error) + PRECISION = 20 + CALL H5Tset_precision_f(datatype,PRECISION, error) + CALL CHECK(" H5Tset_precision_f", error, total_error) + + CALL H5Tset_size_f(datatype, 4_size_t, error) + CALL CHECK(" H5Tset_size_f", error, total_error) + + CALL H5Tset_ebias_f(datatype, 31_size_t, error) + CALL CHECK(" H5Tset_ebias_f", error, total_error) + + ! Create the data space + CALL H5Screate_simple_f(2, dims, space, error) + CALL CHECK(" H5Screate_simple_f", error, total_error) + + ! USE nbit filter + CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) + CALL CHECK(" H5Pcreate_f", error, total_error) + + CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) + CALL CHECK(" H5Pset_chunk_f", error, total_error) + CALL H5Pset_nbit_f(dc, error) + CALL CHECK(" H5Pset_nbit_f", error, total_error) + + ! Create the dataset + CALL H5Dcreate_f(file, "nbit_real", datatype, & + space, dataset, error, dc) + CALL CHECK(" H5Dcreate_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 1: Test nbit by setting up a chunked dataset and writing + ! to it. + !---------------------------------------------------------------------- + ! + mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) + + f_ptr = C_LOC(orig_data(1,1)) + CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dwrite_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 2: Try to read the data we just wrote. + !---------------------------------------------------------------------- + ! + f_ptr = C_LOC(new_data(1,1)) + CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dread_f", error, total_error) + + ! Check that the values read are the same as the values written + ! Assume size of long long = size of double + ! + i_loop: DO i = 1, dims(1) + j_loop: DO j = 1, dims(2) + IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN + IF( .NOT.dreal_eq( REAL(new_data(i,j),dp), REAL( orig_data(i,j), dp)) ) THEN + total_error = total_error + 1 + WRITE(*,'(" Read different values than written.")') + WRITE(*,'(" At index ", 2(1X,I0))') i, j + EXIT i_loop + END IF + ENDDO j_loop + ENDDO i_loop + + !---------------------------------------------------------------------- + ! Cleanup + !---------------------------------------------------------------------- + ! + CALL H5Tclose_f(datatype, error) + CALL CHECK(" H5Tclose_f", error, total_error) + CALL H5Pclose_f(dc, error) + CALL CHECK(" H5Pclose_f", error, total_error) + CALL H5Sclose_f(space, error) + CALL CHECK(" H5Sclose_f", error, total_error) + CALL H5Dclose_f(dataset, error) + CALL CHECK(" H5Dclose_f", error, total_error) + CALL H5Fclose_f(file, error) + CALL CHECK(" H5Fclose_f", error, 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 TH5_MISC + 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 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& + INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + 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(hsize_t) :: ih + 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", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_GREEN + CALL H5Tenum_insert_f(dtype, "GREEN", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLUE + CALL H5Tenum_insert_f(dtype, "BLUE", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_WHITE + CALL H5Tenum_insert_f(dtype, "WHITE", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLACK + CALL H5Tenum_insert_f(dtype, "BLACK", C_LOC(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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data2(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_short(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & + ih, INT(data1(ih)), ih, INT(data_double(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i8(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i8(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i16(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i16(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_r7(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_int(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_i16(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) + 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 + +END MODULE TH5T_F03 diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.f90 index 834fbde..651ca75 100644 --- a/fortran/test/tH5VL.f90 +++ b/fortran/test/tH5VL.f90 @@ -28,13 +28,12 @@ !***** MODULE TH5VL - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - USE TH5_MISC_GEN CONTAINS SUBROUTINE vl_test_integer(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -195,6 +194,8 @@ CONTAINS END SUBROUTINE vl_test_integer SUBROUTINE vl_test_real(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -327,15 +328,18 @@ CONTAINS CALL h5dread_vl_f(dset_id, vltype_id, vl_real_data_out, data_dims, len_out, & error, mem_space_id = dspace_id, file_space_id = dspace_id) CALL check("h5dread_real_f", error, total_error) - DO ih = 1, data_dims(2) - DO jh = 1, len_out(ih) - CALL VERIFY("h5dread_vl_f returned incorrect data",vl_real_data(jh,ih),vl_real_data_out(jh,ih), total_error) - ENDDO - IF (LEN(ih) .NE. len_out(ih)) THEN - total_error = total_error + 1 - WRITE(*,*) "h5dread_vl_f returned incorrect data" - ENDIF - ENDDO + do ih = 1, data_dims(2) + do jh = 1, len_out(ih) + IF( .NOT.dreal_eq( REAL(vl_real_data(jh,ih),dp), REAL(vl_real_data_out(jh,ih), dp)) ) THEN + total_error = total_error + 1 + WRITE(*,*) "h5dread_vl_f returned incorrect data" + ENDIF + enddo + if (len(ih) .ne. len_out(ih)) then + total_error = total_error + 1 + write(*,*) "h5dread_vl_f returned incorrect data" + endif + enddo ! @@ -363,6 +367,8 @@ CONTAINS END SUBROUTINE vl_test_real SUBROUTINE vl_test_string(cleanup, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.f90 index d12bb25..e73fed2 100644 --- a/fortran/test/tHDF5.f90 +++ b/fortran/test/tHDF5.f90 @@ -29,7 +29,6 @@ MODULE THDF5 USE TH5_MISC - USE TH5_MISC_GEN USE TH5A USE TH5D USE TH5E diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 deleted file mode 100644 index 7d67f30..0000000 --- a/fortran/test/tf.F90 +++ /dev/null @@ -1,412 +0,0 @@ -!****h* root/fortran/test/tf.f90 -! -! NAME -! tf.f90 -! -! FUNCTION -! Contains subroutines which are needed in all the hdf5 fortran tests -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, -! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv -! -!***** - -#include "H5config_f.inc" - -MODULE TH5_MISC - - USE, INTRINSIC :: ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - - ! generic compound datatype - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(KIND=C_CHAR) :: z - END TYPE comp_datatype - - PUBLIC :: H5_SIZEOF - INTERFACE H5_SIZEOF - MODULE PROCEDURE H5_SIZEOF_CMPD - MODULE PROCEDURE H5_SIZEOF_CHR - MODULE PROCEDURE H5_SIZEOF_I - MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP - END INTERFACE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: write_test_status -!DEC$endif - SUBROUTINE write_test_status( test_result, test_title, total_error) - - ! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, --skip -- - ! 0 , passed - ! positive, failed - - CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test - INTEGER, INTENT(INOUT) :: total_error ! Accumulated error - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' - - - error_string = failure - IF (test_result == 0) THEN - error_string = success - ELSE IF (test_result == -1) THEN - error_string = skip - ENDIF - - WRITE(*, fmt = '(A, T72, A)') test_title, error_string - - IF(test_result.GT.0) total_error = total_error + test_result - - END SUBROUTINE write_test_status - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: check -!DEC$endif - SUBROUTINE check(string,error,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: error, total_error - IF (error .LT. 0) THEN - total_error=total_error+1 - WRITE(*,*) string, " FAILED" - ENDIF - RETURN - END SUBROUTINE check - -!---------------------------------------------------------------------- -! Name: h5_fixname_f -! -! Purpose: Create a file name from the a file base name. -! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! full_name - full file name -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 13, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_fixname_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string -! INTEGER(HID_T) :: fapl_default - - INTERFACE - INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - !DEC$ATTRIBUTES reference :: full_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - CHARACTER(LEN=*), INTENT(IN) :: full_name - INTEGER(SIZE_T) :: full_namelen - END FUNCTION h5_fixname_c - END INTERFACE - - base_namelen = LEN(base_name) - full_namelen = LEN(full_name) - hdferr = h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - - END SUBROUTINE h5_fixname_f - -!---------------------------------------------------------------------- -! Name: h5_cleanup_f -! -! Purpose: Cleanups tests files -! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 19, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_cleanup_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - - INTERFACE - INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - END FUNCTION h5_cleanup_c - END INTERFACE - - base_namelen = LEN(base_name) - hdferr = h5_cleanup_c(base_name, base_namelen, fapl) - - END SUBROUTINE h5_cleanup_f - -!---------------------------------------------------------------------- -! Name: h5_exit_f -! -! Purpose: Exit application -! It is a fortran counterpart for the standard C 'exit()' routine -! Be careful not to overflow the exit value range since -! UNIX supports a very small range such as 1 byte. -! Therefore, exit(256) may end up as exit(0). -! -! Inputs: -! status - Status to return from application -! -! Outputs: -! none -! -! Programmer: Quincey Koziol -! December 14, 2004 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_exit_f(status) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_exit_f -!DEC$endif - IMPLICIT NONE - INTEGER, INTENT(IN) :: status ! Return code - - INTERFACE - SUBROUTINE h5_exit_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c - !DEC$ ENDIF - INTEGER, INTENT(IN) :: status - END SUBROUTINE h5_exit_c - END INTERFACE - - CALL h5_exit_c(status) - - END SUBROUTINE h5_exit_f - -!---------------------------------------------------------------------- -! Name: h5_env_nocleanup_f -! -! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran -! tests to determine if the output files should be removed -! -! Inputs: -! -! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files -! .false. - remove test files -! -! Programmer: M.S. Breitenfeld -! September 30, 2008 -! -!---------------------------------------------------------------------- - SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_env_nocleanup_f -!DEC$endif - IMPLICIT NONE - LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code - INTEGER :: status - - INTERFACE - SUBROUTINE h5_env_nocleanup_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c - !DEC$ ENDIF - INTEGER :: status - END SUBROUTINE h5_env_nocleanup_c - END INTERFACE - - CALL h5_env_nocleanup_c(status) - - HDF5_NOCLEANUP = .FALSE. - IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. - - END SUBROUTINE h5_env_nocleanup_f - -! --------------------------------------------------------------------------------------------------- -! H5_SIZEOF routines -! -! NOTES -! (1) The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: -! -! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a -! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. -! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows -! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger -! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and -! the variables receiving the result must be declared INTEGER*8." -! -! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or -! characters that do not have a set length (as used in tH5P_F03.f90), sigh... -! -! (2) F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. -! -! (3) Unfortunately we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different -! data types from the various tests. -! -! --------------------------------------------------------------------------------------------------- - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_cmpd -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) - IMPLICIT NONE - TYPE(comp_datatype), INTENT(in) :: a - -#ifdef H5_FORTRAN_FORTRAN_HAVE_C_SIZEOF - H5_SIZEOF_CMPD = C_SIZEOF(a) -#else - H5_SIZEOF_CMPD = SIZEOF(a) -#endif - - END FUNCTION H5_SIZEOF_CMPD - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_chr -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) - IMPLICIT NONE - CHARACTER(LEN=1), INTENT(in) :: a - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) -#else - H5_SIZEOF_CHR = SIZEOF(a) -#endif - - END FUNCTION H5_SIZEOF_CHR - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_i -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) - IMPLICIT NONE - INTEGER, INTENT(in):: a - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) -#else - H5_SIZEOF_I = SIZEOF(a) -#endif - - END FUNCTION H5_SIZEOF_I - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_sp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) - IMPLICIT NONE - REAL(sp), INTENT(in):: a - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) -#else - H5_SIZEOF_SP = SIZEOF(a) -#endif - - END FUNCTION H5_SIZEOF_SP - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_dp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) - IMPLICIT NONE - REAL(dp), INTENT(in):: a - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) -#else - H5_SIZEOF_DP = SIZEOF(a) -#endif - - END FUNCTION H5_SIZEOF_DP - -END MODULE TH5_MISC diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90 new file mode 100644 index 0000000..450daf2 --- /dev/null +++ b/fortran/test/tf.f90 @@ -0,0 +1,393 @@ +!****h* root/fortran/test/tf.f90 +! +! NAME +! tf.f90 +! +! FUNCTION +! Contains subroutines which are needed in all the hdf5 fortran tests +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! CONTAINS SUBROUTINES +! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, +! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv +! +!***** +MODULE TH5_MISC + + USE TH5_MISC_PROVISIONAL + + IMPLICIT NONE + +CONTAINS + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: dreal_eq +!DEC$endif + LOGICAL FUNCTION dreal_eq(a,b) + + ! Check if two double precision reals are equivalent + REAL(dp), INTENT (in):: a,b + REAL(dp), PARAMETER :: eps = 1.e-8 + dreal_eq = ABS(a-b) .LT. eps + + END FUNCTION dreal_eq + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_real_kind_7 +!DEC$endif + SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) + USE HDF5 + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + CHARACTER(LEN=*) :: string + REAL(real_kind_7) :: value, correct_value + INTEGER :: total_error + IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_real_kind_7 + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: write_test_status +!DEC$endif + SUBROUTINE write_test_status( test_result, test_title, total_error) + + ! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, --skip -- + ! 0 , passed + ! positive, failed + + CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test + INTEGER, INTENT(INOUT) :: total_error ! Accumulated error + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' + + + error_string = failure + IF (test_result == 0) THEN + error_string = success + ELSE IF (test_result == -1) THEN + error_string = skip + ENDIF + + WRITE(*, fmt = '(A, T72, A)') test_title, error_string + + IF(test_result.GT.0) total_error = total_error + test_result + + END SUBROUTINE write_test_status + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: check +!DEC$endif + SUBROUTINE check(string,error,total_error) + CHARACTER(LEN=*) :: string + INTEGER :: error, total_error + IF (error .LT. 0) THEN + total_error=total_error+1 + WRITE(*,*) string, " FAILED" + ENDIF + RETURN + END SUBROUTINE check + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify +!DEC$endif + SUBROUTINE VERIFY(string,value,correct_value,total_error) + CHARACTER(LEN=*) :: string + INTEGER :: value, correct_value, total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_INTEGER_HID_T +!DEC$endif + SUBROUTINE verify_INTEGER_HID_T(string,value,correct_value,total_error) + USE HDF5 + CHARACTER(LEN=*) :: string + INTEGER(HID_T) :: value, correct_value + INTEGER :: total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_INTEGER_HID_T + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verify_Fortran_INTEGER_4 +!DEC$endif + SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) + USE HDF5 + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors + CHARACTER(LEN=*) :: string + INTEGER(int_kind_8) :: value, correct_value + INTEGER :: total_error + IF (value .NE. correct_value) THEN + total_error=total_error+1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verify_Fortran_INTEGER_4 + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verifyLogical +!DEC$endif + SUBROUTINE verifyLogical(string,value,correct_value,total_error) + CHARACTER(LEN=*) :: string + LOGICAL :: value, correct_value + INTEGER :: total_error + IF (value .NEQV. correct_value) THEN + total_error = total_error + 1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verifyLogical + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: verifyString +!DEC$endif + SUBROUTINE verifyString(string, value,correct_value,total_error) + CHARACTER*(*) :: string + CHARACTER*(*) :: value, correct_value + INTEGER :: total_error + IF (TRIM(value) .NE. TRIM(correct_value)) THEN + total_error = total_error + 1 + WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string + ENDIF + RETURN + END SUBROUTINE verifyString + + +!---------------------------------------------------------------------- +! Name: h5_fixname_f +! +! Purpose: Create a file name from the a file base name. +! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! full_name - full file name +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 13, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_fixname_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string +! INTEGER(HID_T) :: fapl_default + + INTERFACE + INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + !DEC$ATTRIBUTES reference :: full_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + CHARACTER(LEN=*), INTENT(IN) :: full_name + INTEGER(SIZE_T) :: full_namelen + END FUNCTION h5_fixname_c + END INTERFACE + + base_namelen = LEN(base_name) + full_namelen = LEN(full_name) + hdferr = h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + + END SUBROUTINE h5_fixname_f + +!---------------------------------------------------------------------- +! Name: h5_cleanup_f +! +! Purpose: Cleanups tests files +! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 19, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_cleanup_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + + INTERFACE + INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + END FUNCTION h5_cleanup_c + END INTERFACE + + base_namelen = LEN(base_name) + hdferr = h5_cleanup_c(base_name, base_namelen, fapl) + + END SUBROUTINE h5_cleanup_f + +!---------------------------------------------------------------------- +! Name: h5_exit_f +! +! Purpose: Exit application +! It is a fortran counterpart for the standard C 'exit()' routine +! Be careful not to overflow the exit value range since +! UNIX supports a very small range such as 1 byte. +! Therefore, exit(256) may end up as exit(0). +! +! Inputs: +! status - Status to return from application +! +! Outputs: +! none +! +! Programmer: Quincey Koziol +! December 14, 2004 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_exit_f(status) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_exit_f +!DEC$endif + IMPLICIT NONE + INTEGER, INTENT(IN) :: status ! Return code + + INTERFACE + SUBROUTINE h5_exit_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c + !DEC$ ENDIF + INTEGER, INTENT(IN) :: status + END SUBROUTINE h5_exit_c + END INTERFACE + + CALL h5_exit_c(status) + + END SUBROUTINE h5_exit_f + +!---------------------------------------------------------------------- +! Name: h5_env_nocleanup_f +! +! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran +! tests to determine if the output files should be removed +! +! Inputs: +! +! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files +! .false. - remove test files +! +! Programmer: M.S. Breitenfeld +! September 30, 2008 +! +!---------------------------------------------------------------------- + SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_env_nocleanup_f +!DEC$endif + IMPLICIT NONE + LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code + INTEGER :: status + + INTERFACE + SUBROUTINE h5_env_nocleanup_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c + !DEC$ ENDIF + INTEGER :: status + END SUBROUTINE h5_env_nocleanup_c + END INTERFACE + + CALL h5_env_nocleanup_c(status) + + HDF5_NOCLEANUP = .FALSE. + IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. + + END SUBROUTINE h5_env_nocleanup_f +END MODULE TH5_MISC diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90 new file mode 100644 index 0000000..b3f1399 --- /dev/null +++ b/fortran/test/tf_F03.f90 @@ -0,0 +1,128 @@ +!****h* root/fortran/test/tf_F03.f90 +! +! NAME +! tf_F03.f90 +! +! FUNCTION +! Contains functions that are part of the F2003 standard, and are not F2008 compliant. +! Needed by the hdf5 fortran tests. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! CONTAINS SUBROUTINES +! H5_SIZEOF +! +! NOTES +! The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: +! +! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a +! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. +! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows +! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger +! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and +! the variables receiving the result must be declared INTEGER*8." +! +! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or +! characters that do not have a set length (as used in tH5P_F03.f90), sigh... +! +!***** +MODULE TH5_MISC_PROVISIONAL + + USE ISO_C_BINDING + IMPLICIT NONE + + INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors + + ! generic compound datatype + TYPE, BIND(C) :: comp_datatype + REAL :: a + INTEGER :: x + DOUBLE PRECISION :: y + CHARACTER(LEN=1) :: z + END TYPE comp_datatype + + PUBLIC :: H5_SIZEOF + INTERFACE H5_SIZEOF + MODULE PROCEDURE H5_SIZEOF_CMPD + MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_CHR + MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP + END INTERFACE + +CONTAINS + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_cmpd + !DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) + IMPLICIT NONE + TYPE(comp_datatype), INTENT(in) :: a + + H5_SIZEOF_CMPD = SIZEOF(a) + + END FUNCTION H5_SIZEOF_CMPD + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_chr +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) + IMPLICIT NONE + CHARACTER(LEN=1), INTENT(in):: a + + H5_SIZEOF_CHR = SIZEOF(a) + + END FUNCTION H5_SIZEOF_CHR + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_i +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) + IMPLICIT NONE + INTEGER, INTENT(in):: a + + H5_SIZEOF_I = SIZEOF(a) + + END FUNCTION H5_SIZEOF_I + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_sp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) + IMPLICIT NONE + REAL(sp), INTENT(in):: a + + H5_SIZEOF_SP = SIZEOF(a) + + END FUNCTION H5_SIZEOF_SP + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_dp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) + IMPLICIT NONE + REAL(dp), INTENT(in):: a + + H5_SIZEOF_DP = SIZEOF(a) + + END FUNCTION H5_SIZEOF_DP + +END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90 new file mode 100644 index 0000000..20c2859 --- /dev/null +++ b/fortran/test/tf_F08.f90 @@ -0,0 +1,128 @@ +!****h* root/fortran/test/tf_F08.f90 +! +! NAME +! tf_F08.f90 +! +! FUNCTION +! Contains functions that are part of the F2008 standard and needed by +! the hdf5 fortran tests. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! CONTAINS SUBROUTINES +! H5_SIZEOF +! +! NOTES +! This file contains "sizeof" functions that are F2008 standard compliant +! and replace the non-standard 'SIZEOF' functions found in the file tf_F03. +! Unfortunity we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different +! data types from the various tests. +! +! F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. +! +! This file will be build instead of tf_F03.f90 if the intrinsic fortran +! function C_SIZEOF/STORAGE_SIZE is found during configure. +! +!***** +MODULE TH5_MISC_PROVISIONAL + + USE ISO_C_BINDING + IMPLICIT NONE + + INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors + + ! generic compound datatype + TYPE, BIND(C) :: comp_datatype + REAL :: a + INTEGER :: x + DOUBLE PRECISION :: y + CHARACTER(LEN=1) :: z + END TYPE comp_datatype + + PUBLIC :: H5_SIZEOF + INTERFACE H5_SIZEOF + MODULE PROCEDURE H5_SIZEOF_CMPD + MODULE PROCEDURE H5_SIZEOF_CHR + MODULE PROCEDURE H5_SIZEOF_I + MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP + END INTERFACE + +CONTAINS + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_cmpd +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) + IMPLICIT NONE + TYPE(comp_datatype), INTENT(in) :: a + + H5_SIZEOF_CMPD = C_SIZEOF(a) + + END FUNCTION H5_SIZEOF_CMPD + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_chr +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(in) :: a + + H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) + + END FUNCTION H5_SIZEOF_CHR + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_i +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) + IMPLICIT NONE + INTEGER, INTENT(in):: a + + H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) + + END FUNCTION H5_SIZEOF_I + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_sp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) + IMPLICIT NONE + REAL(sp), INTENT(in):: a + + H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) + + END FUNCTION H5_SIZEOF_SP + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_dp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) + IMPLICIT NONE + REAL(dp), INTENT(in):: a + + H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) + + END FUNCTION H5_SIZEOF_DP + +END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90 new file mode 100644 index 0000000..11a047c --- /dev/null +++ b/fortran/test/tf_F90.f90 @@ -0,0 +1,33 @@ +!****h* root/fortran/test/tf_F90.f90 +! +! NAME +! tf_F90.f90 +! +! FUNCTION +! Module for when the compiler is not F2003 or F2008 compliant. +! Needed by tf.f90 for the test programs. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** +MODULE TH5_MISC_PROVISIONAL + IMPLICIT NONE + + INTEGER, PARAMETER :: sp = KIND(0.0) + INTEGER, PARAMETER :: dp = KIND(0.D0) + +END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 073194a..f16dfff 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -114,8 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = parallel_test$(EXEEXT) @@ -141,7 +140,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) @@ -449,21 +448,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -473,12 +465,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -520,18 +513,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/Makefile.in b/hl/Makefile.in index b5fbb46..60c9453 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -453,21 +452,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -477,12 +469,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -524,18 +517,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 831dadc..278f97b 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -106,8 +106,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -449,21 +448,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -473,12 +465,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -520,18 +513,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 67a14ca..5bad31f 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-hlc++-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -396,21 +395,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -420,12 +412,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -467,18 +460,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 043a25a..742b35c 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -166,7 +165,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -452,21 +451,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -476,12 +468,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -523,18 +516,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 4f88242..b7d7d09 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -107,8 +107,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = ptableTest$(EXEEXT) @@ -133,7 +132,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -449,21 +448,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -473,12 +465,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -520,18 +513,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index ccf2308..f0bf099 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-hlc-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -396,21 +395,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -420,12 +412,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -467,18 +460,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 6d87e82..4651579 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -453,21 +452,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -477,12 +469,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -524,18 +517,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 71e70dd..e229f12 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = run-hlfortran-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -396,21 +395,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -420,12 +412,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -467,18 +460,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 9d110a8..2af665c 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -2,41 +2,6 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- -# configure def file for shared libs on windows -if (WIN32) - if (BUILD_SHARED_LIBS) - if (MSVC) - configure_file (${HDF5_HL_F90_SRC_SOURCE_DIR}/hdf5_hl_fortrandll.def.in ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def @ONLY) - endif (MSVC) - endif (BUILD_SHARED_LIBS) -endif (WIN32) - -#----------------------------------------------------------------------------- -# Generate the H5LT and H5TB REAL APIs -#----------------------------------------------------------------------------- - -add_executable (H5HL_buildiface - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 - ) - -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5HL_buildiface - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif (BUILD_SHARED_LIBS) - set_target_properties (H5HL_buildiface - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif (WIN32 AND MSVC) -set_target_properties (H5HL_buildiface PROPERTIES - LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} -) - -#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES ( @@ -91,37 +56,14 @@ endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (HDF5_HL_F90_F_BASE_SRCS - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.F90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 -) set (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_F_BASE_SRCS} - - # generated files - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90 ) - set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) -set_source_files_properties ( - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 - PROPERTIES GENERATED TRUE -) - -set (CMD $) -add_custom_target (H5HLgen ALL - COMMAND ${CMD} -#v3.2 BYPRODUCT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 -#v3.2 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 - WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} - DEPENDS ${HDF5_HL_F90_F_BASE_SRCS} -) - add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS}) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -144,7 +86,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + set (SHARED_LINK_FLAGS "/DLL") endif (WIN32 AND MSVC) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -186,9 +128,7 @@ endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5ds.mod ${MOD_BUILD_DIR}/h5tb.mod - ${MOD_BUILD_DIR}/h5tb_const.mod ${MOD_BUILD_DIR}/h5lt.mod - ${MOD_BUILD_DIR}/h5lt_const.mod ${MOD_BUILD_DIR}/h5im.mod ) @@ -209,7 +149,7 @@ if (HDF5_EXPORTED_TARGETS) INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${install_targets} diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index af054e0..1de3fff 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -35,7 +35,7 @@ *------------------------------------------------------------------------- */ int_f -h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) +nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) { char *c_dimname = NULL; int_f ret_value = 0; @@ -61,7 +61,7 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) return ret_value; -} /* end h5dsset_scale_c() */ +} /* end nh5dsset_scale_c() */ /*------------------------------------------------------------------------- @@ -80,7 +80,7 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) *------------------------------------------------------------------------- */ int_f -h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -94,7 +94,7 @@ h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end h5dsattach_scale_c() */ +} /* end nh5dsattach_scale_c() */ /*------------------------------------------------------------------------- @@ -113,7 +113,7 @@ h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -127,7 +127,7 @@ h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end h5dsdetach_scale_c() */ +} /* end nh5dsdetach_scale_c() */ /*------------------------------------------------------------------------- @@ -146,7 +146,7 @@ h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) +nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) { int_f ret_value = 0; htri_t c_is_attached; @@ -163,7 +163,7 @@ h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) done: return ret_value; -} /* end h5dsis_attached_c() */ +} /* end nh5dsis_attached_c() */ /*------------------------------------------------------------------------- * Function: H5DSis_scale_c @@ -181,7 +181,7 @@ h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) *------------------------------------------------------------------------- */ int_f -h5dsis_scale_c( hid_t_f *did, int_f *is_scale) +nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) { int_f ret_value = 0; htri_t c_is_scale; @@ -198,7 +198,7 @@ h5dsis_scale_c( hid_t_f *did, int_f *is_scale) done: return ret_value; -} /* end h5dsis_scale_c() */ +} /* end nh5dsis_scale_c() */ /*------------------------------------------------------------------------- @@ -217,7 +217,7 @@ h5dsis_scale_c( hid_t_f *did, int_f *is_scale) *------------------------------------------------------------------------- */ int_f -h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) +nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) { char *c_label = NULL; int_f ret_value = 0; @@ -242,7 +242,7 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) return ret_value; -} /* end h5dsset_label_c() */ +} /* end nh5dsset_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_label_c @@ -260,7 +260,7 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) *------------------------------------------------------------------------- */ int_f -h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) +nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) { char *c_label = NULL; ssize_t size_c = -1; @@ -291,7 +291,7 @@ done: if(c_label) HDfree(c_label); return ret_value; -} /* end h5dsget_label_c() */ +} /* end nh5dsget_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_scale_name_c @@ -309,7 +309,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) +nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) { char *c_scale_name = NULL; ssize_t size_c = -1; @@ -338,7 +338,7 @@ done: if(c_scale_name) HDfree(c_scale_name); return ret_value; -} /* end h5dsget_scale_name_c() */ +} /* end nh5dsget_scale_name_c() */ /*------------------------------------------------------------------------- * Function: H5DSget_num_scales_c @@ -356,7 +356,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) +nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) { int_f ret_value = 0; @@ -370,4 +370,4 @@ h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) done: return ret_value; -} /* end h5dsget_num_scales_c() */ +} /* end nh5dsget_num_scales_c() */ diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90 deleted file mode 100644 index 00cf4d8..0000000 --- a/hl/fortran/src/H5DSff.F90 +++ /dev/null @@ -1,518 +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 file contains FORTRAN90 interfaces for H5DS functions -! - -MODULE h5ds - - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_CHAR - USE h5fortran_types - USE hdf5 - -CONTAINS - -!------------------------------------------------------------------------- -! Function: H5DSset_scale_f -! -! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_scale_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) - - INTERFACE - INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len) & - BIND(C,NAME='h5dsset_scale_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname ! The dimension name - INTEGER(SIZE_T), INTENT(in) :: dimname_len - END FUNCTION H5DSset_scale_c - END INTERFACE - - IF(PRESENT(dimname))THEN - dimname_len = LEN(dimname) - errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) - ELSE - errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) - ENDIF - - END SUBROUTINE H5DSset_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSattach_scale_f -! -! Purpose: Attach dimension scale dsid to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsattach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx) & - BIND(C,NAME='h5dsattach_scale_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - END FUNCTION H5DSattach_scale_c - END INTERFACE - - c_idx = idx -1 ! account for C-dimensions starting at 0 - - errcode = H5DSattach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSattach_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSdetach_scale_f -! -! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsdetach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx) & - BIND(C,NAME='h5dsdetach_scale_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - END FUNCTION H5DSdetach_scale_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSdetach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSdetach_scale_f - - -!------------------------------------------------------------------------- -! Function: H5DSis_attached_f -! -! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_attached_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with - LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to - ! dimension idx of dataset did - INTEGER :: errcode ! error code - INTEGER :: c_is_attached - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached) & - BIND(C,NAME='h5dsis_attached_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to - END FUNCTION H5DSis_attached_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) - - is_attached = .FALSE. ! default - IF(c_is_attached.GT.0)THEN - is_attached = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_attached_f - -! -! H5DSiterate_scales: Impliment in F2003 -! - -!------------------------------------------------------------------------- -! Function: H5DSis_scale_f -! -! Purpose: Determines whether dset is a Dimension Scale. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - LOGICAL , INTENT(out) :: is_scale ! logical: - ! .TRUE. if did is a Dimension Scale - INTEGER :: errcode ! error code - INTEGER :: c_is_scale - - INTERFACE - INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) & - BIND(C,NAME='h5dsis_scale_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did - INTEGER, INTENT(out) :: c_is_scale - END FUNCTION H5DSis_scale_c - END INTERFACE - - errcode = H5DSis_scale_c(did, c_is_scale) - - is_scale = .FALSE. ! default - IF(c_is_scale.GT.0)THEN - is_scale = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSset_label_f -! -! Purpose: Set label for the dimension idx of did to the value label -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_label_f( did, idx, label, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: label_len ! Length of label - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) & - BIND(C,NAME='h5dsset_label_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label - END FUNCTION H5DSset_label_c - END INTERFACE - - c_idx = idx - 1 - - label_len = LEN(label) - errcode = H5DSset_label_c(did, c_idx, label, label_len) - - END SUBROUTINE H5DSset_label_f - -!------------------------------------------------------------------------- -! Function: H5DSget_label_f -! -! Purpose: Read the label for dimension idx of did into buffer label. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer - INTEGER :: errcode ! Error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) & - BIND(C,NAME='h5dsget_label_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label - END FUNCTION H5DSget_label_c - END INTERFACE - - c_idx = idx - 1 - - errcode = H5DSget_label_c(did, c_idx, label, size) - - END SUBROUTINE H5DSget_label_f - - -!------------------------------------------------------------------------- -! Function: H5DSget_scale_name_f -! -! Purpose: Read the name of scale did into buffer name. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_scale_name_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(out) :: name ! The name - INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer - INTEGER :: errcode ! Error code - - INTERFACE - INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) & - bind(c,name='h5dsget_scale_name_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(out) :: name ! The name - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name - END FUNCTION H5DSget_scale_name_c - END INTERFACE - - errcode = H5DSget_scale_name_c(did, name, size) - - END SUBROUTINE H5DSget_scale_name_f - -!------------------------------------------------------------------------- -! Function: H5DSget_num_scales_f -! -! Purpose: Determines how many Dimension Scales are attached to dimension idx of did -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_num_scales_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) & - BIND(C,NAME='h5dsget_num_scales_c') - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - END FUNCTION H5DSget_num_scales_c - END INTERFACE - - c_idx = idx - 1 - errcode = H5DSget_num_scales_c(did, c_idx, num_scales) - - END SUBROUTINE H5DSget_num_scales_f - -END MODULE h5ds - - - - - - diff --git a/hl/fortran/src/H5DSff.f90 b/hl/fortran/src/H5DSff.f90 new file mode 100644 index 0000000..04540a6 --- /dev/null +++ b/hl/fortran/src/H5DSff.f90 @@ -0,0 +1,545 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5DS functions +! + +MODULE h5ds + + USE h5fortran_types + USE hdf5 + +CONTAINS + + +!------------------------------------------------------------------------- +! Function: H5DSset_scale_f +! +! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_scale_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) + + INTERFACE + INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len ) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_SCALE_C'::h5dsset_scale_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dimname + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(LEN=*), INTENT(in) :: dimname ! The dimension name + INTEGER(SIZE_T), INTENT(in) :: dimname_len + END FUNCTION H5DSset_scale_c + END INTERFACE + + IF(PRESENT(dimname))THEN + dimname_len = LEN(dimname) + errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) + ELSE + errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) + ENDIF + + END SUBROUTINE H5DSset_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSattach_scale_f +! +! Purpose: Attach dimension scale dsid to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsattach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx ) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSATTACH_SCALE_C':: h5dsattach_scale_c + !DEC$ENDIF + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + END FUNCTION H5DSattach_scale_c + END INTERFACE + + c_idx = idx -1 ! account for C-dimensions starting at 0 + + errcode = H5DSattach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSattach_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSdetach_scale_f +! +! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsdetach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx ) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSDETACH_SCALE_C':: h5dsdetach_scale_c + !DEC$ENDIF + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + END FUNCTION H5DSdetach_scale_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSdetach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSdetach_scale_f + + +!------------------------------------------------------------------------- +! Function: H5DSis_attached_f +! +! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_attached_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with + LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to + ! dimension idx of dataset did + INTEGER :: errcode ! error code + INTEGER :: c_is_attached + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached ) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_ATTACHED_C':: h5dsis_attached_c + !DEC$ENDIF + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to + END FUNCTION H5DSis_attached_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) + + is_attached = .FALSE. ! default + IF(c_is_attached.GT.0)THEN + is_attached = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_attached_f + +! +! H5DSiterate_scales: Impliment in F2003 +! + +!------------------------------------------------------------------------- +! Function: H5DSis_scale_f +! +! Purpose: Determines whether dset is a Dimension Scale. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the data set to query + LOGICAL , INTENT(out) :: is_scale ! logical: + ! .TRUE. if did is a Dimension Scale + INTEGER :: errcode ! error code + INTEGER :: c_is_scale + + INTERFACE + INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_SCALE_C':: h5dsis_scale_c + !DEC$ENDIF + INTEGER(hid_t), INTENT(in) :: did ! the data set to query + INTEGER, INTENT(out) :: c_is_scale + END FUNCTION H5DSis_scale_c + END INTERFACE + + errcode = H5DSis_scale_c(did, c_is_scale) + + is_scale = .FALSE. ! default + IF(c_is_scale.GT.0)THEN + is_scale = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSset_label_f +! +! Purpose: Set label for the dimension idx of did to the value label +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_label_f( did, idx, label, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: label_len ! Length of label + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_LABEL_C'::h5dsset_label_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: label + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label + END FUNCTION H5DSset_label_c + END INTERFACE + + c_idx = idx - 1 + + label_len = LEN(label) + errcode = H5DSset_label_c(did, c_idx, label, label_len) + + END SUBROUTINE H5DSset_label_f + +!------------------------------------------------------------------------- +! Function: H5DSget_label_f +! +! Purpose: Read the label for dimension idx of did into buffer label. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer + INTEGER :: errcode ! Error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_LABEL_C'::h5dsget_label_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: label + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label + END FUNCTION H5DSget_label_c + END INTERFACE + + c_idx = idx - 1 + + errcode = H5DSget_label_c(did, c_idx, label, size) + + END SUBROUTINE H5DSget_label_f + + +!------------------------------------------------------------------------- +! Function: H5DSget_scale_name_f +! +! Purpose: Read the name of scale did into buffer name. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_scale_name_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(LEN=*), INTENT(out) :: name ! The name + INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer + INTEGER :: errcode ! Error code + + INTERFACE + INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_SCALE_NAME_C'::h5dsget_scale_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(LEN=*), INTENT(out) :: name ! The name + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name + END FUNCTION H5DSget_scale_name_c + END INTERFACE + + errcode = H5DSget_scale_name_c(did, name, size) + + END SUBROUTINE H5DSget_scale_name_f + +!------------------------------------------------------------------------- +! Function: H5DSget_num_scales_f +! +! Purpose: Determines how many Dimension Scales are attached to dimension idx of did +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_num_scales_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_NUM_SCALES_C':: h5dsget_num_scales_c + !DEC$ENDIF + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + END FUNCTION H5DSget_num_scales_c + END INTERFACE + + c_idx = idx - 1 + errcode = H5DSget_num_scales_c(did, c_idx, num_scales) + + END SUBROUTINE H5DSget_num_scales_f + +END MODULE h5ds + + + + + + diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 deleted file mode 100644 index 0e85e27..0000000 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ /dev/null @@ -1,683 +0,0 @@ -!****p* Program/H5HL_buildiface -! -! NAME -! Executable: H5HL_buildiface -! -! FILE -! fortran/src/H5HL_buildiface.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5HL_gen.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of -! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard -! compliant and should always be chosen over SIZEOF. -! -! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or -! "FORTRAN_HAVE_SIZEOF". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -#include - -PROGRAM H5HL_buildiface - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - -! These values are valid REAL KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_RKIND - H5_H5CONFIG_F_RKIND -! These values are valid INTEGER KINDs (with corresponding C float) found during configure - H5_H5CONFIG_F_NUM_IKIND - H5_H5CONFIG_F_IKIND - - INTEGER :: i, j, k - INTEGER :: ji, jr, jd -#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE - REAL(KIND=C_LONG_DOUBLE) :: c_longdble -#endif - REAL(KIND=C_DOUBLE) :: c_dble - REAL(KIND=C_FLOAT) :: c_flt - INTEGER :: sizeof_var - CHARACTER(LEN=2) :: chr2 -! subroutine rank of array being passed in - CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) -! rank definitions - CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & - ' ', & - ', DIMENSION(dims(1)) ', & - ', DIMENSION(dims(1),dims(2)) ', & - ', DIMENSION(dims(1),dims(2),dims(3)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & - ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & - /) -! pointer to the buffer - CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & - /) - -! Generate Fortran H5LT* interfaces having multiple KIND interfaces. -! -! Developer's notes: -! -! Only interfaces with arrays of rank 7 and less are provided. Even-though the F2008 -! standard extended the maximum rank to 15, it was decided that they should use the -! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility -! with the Fortran 90/95 APIs codes which could never handle rank 8-15 array sizes. - - OPEN(11,FILE='H5LTff_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5LTff_gen.F90',& -'!',& -'! NAME',& -'! H5LTff_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& -'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& -'! are H5LT and H5TB APIs',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5HL_buildiface.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE H5LT" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE h5fortran_types' - WRITE(11,'(A)') ' USE H5LT_CONST' - WRITE(11,'(A)') ' IMPLICIT NONE' -!*************** -! H5LT INTERFACES -!*************** -! -! H5LTmake_dataset_f -! - WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5ltread_dataset_f - WRITE(11,'(A)') " INTERFACE h5ltread_dataset_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5ltmake_dataset_float_f - WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_float_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5ltmake_dataset_double_f - WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_double_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5ltread_dataset_float_f - WRITE(11,'(A)') " INTERFACE h5ltread_dataset_float_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5ltread_dataset_double_f - WRITE(11,'(A)') " INTERFACE h5ltread_dataset_double_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - DO k = 1, 8 - WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - -!********************** -! H5LT APIs -!********************** -! -! h5ltmake_dataset_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,type_id,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -! h5ltread_dataset_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,type_id,buf,dims,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -! h5ltmake_dataset_float_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -! h5ltread_dataset_float_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -! h5ltmake_dataset_double_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - -! h5ltread_dataset_double_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - DO j = 1, 8 - -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - ENDDO - - WRITE(11,'(A)') 'END MODULE H5LT' ! change this to be generic MSB - - CLOSE(11) - -! Generate Fortran H5TB* interfaces having multiple KIND interfaces. - - - OPEN(11,FILE='H5TBff_gen.F90') - WRITE(11,'(40(A,/))') & -'!****h* ROBODoc/H5TBff_gen.F90',& -'!',& -'! NAME',& -'! H5TBff_gen',& -'! ',& -'! PURPOSE',& -'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& -'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& -'! are H5LT and H5TB APIs',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5HL_buildiface.F90',& -'!',& -'!*****' - - WRITE(11,'(a)') "MODULE H5TB" - - WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - WRITE(11,'(A)') ' USE h5fortran_types' - WRITE(11,'(A)') ' USE H5TB_CONST' - WRITE(11,'(A)') ' IMPLICIT NONE' - -!*************** -! H5TB INTERFACES -!*************** - -! h5tbwrite_field_name_f - WRITE(11,'(A)') " INTERFACE h5tbwrite_field_name_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - k =2 - WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5tbread_field_name_f - WRITE(11,'(A)') " INTERFACE h5tbread_field_name_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - k = 2 - WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5tbwrite_field_index_f - WRITE(11,'(A)') " INTERFACE h5tbwrite_field_index_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - k = 2 - WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5tbread_field_index_f - WRITE(11,'(A)') " INTERFACE h5tbread_field_index_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - k = 2 - WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - -! h5tbinsert_field_f - WRITE(11,'(A)') " INTERFACE h5tbinsert_field_f" - DO i = 1, num_rkinds - j = rkind(i) - WRITE(chr2,'(I2)') j - k = 2 - WRITE(11,'(A)') " MODULE PROCEDURE h5tbinsert_field_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - END DO - WRITE(11,'(A)') " END INTERFACE" - - WRITE(11,'(A)') 'CONTAINS' - - !********************** - ! H5TB APIs - !********************** - - ! h5tbwrite_field_name_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - j = 2 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' - WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' namelen1 = LEN(field_name)' - WRITE(11,'(A)') & - ' errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - - ! h5tbread_field_name_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - j = 2 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' - WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' namelen1 = LEN(field_name)' - WRITE(11,'(A)') & - ' errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - - ! h5tbwrite_field_index_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - j = 2 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' - WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') & - ' errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - - ! h5tbread_field_index_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - j = 2 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' - WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' - WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' - WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' - WRITE(11,'(A)') ' INTEGER :: errcode ' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') & - ' errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - - ! h5tbinsert_field_f - DO i = 1, num_rkinds - k = rkind(i) - WRITE(chr2,'(I2)') k - j = 2 -! DLL definitions for windows - WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' - WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API - WRITE(11,'(A)') ' SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))& - &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,field_type,field_index,buf,errcode)' - WRITE(11,'(A)') ' IMPLICIT NONE' - WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: loc_id' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: dset_name' - WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' - WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: field_type' - WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(in), DIMENSION(*), TARGET :: buf' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' - WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' - WRITE(11,'(A)') ' INTEGER :: errcode' - WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - - WRITE(11,'(A)') f_ptr_line(j) - WRITE(11,'(A)') ' namelen = LEN(dset_name)' - WRITE(11,'(A)') ' namelen1 = LEN(field_name)' - WRITE(11,'(A)') & - ' errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,field_type,field_index,f_ptr)' - WRITE(11,'(A)') ' END SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) - ENDDO - - WRITE(11,'(A)') 'END MODULE H5TB' - - CLOSE(11) - -END PROGRAM H5HL_buildiface - - - diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c index 7ad50d6..6acd410 100644 --- a/hl/fortran/src/H5IMfc.c +++ b/hl/fortran/src/H5IMfc.c @@ -39,7 +39,7 @@ */ int_f -h5immake_image_8bit_c (hid_t_f *loc_id, +nh5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -100,7 +100,7 @@ done: */ int_f -h5imread_image_c (hid_t_f *loc_id, +nh5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf) @@ -153,7 +153,7 @@ done: */ int_f -h5immake_image_24bit_c (hid_t_f *loc_id, +nh5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -222,7 +222,7 @@ done: */ int_f -h5imget_image_info_c(hid_t_f *loc_id, +nh5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -307,7 +307,7 @@ done: */ int_f -h5imis_image_c(hid_t_f *loc_id, +nh5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -356,7 +356,7 @@ h5imis_image_c(hid_t_f *loc_id, */ int_f -h5immake_palette_c (hid_t_f *loc_id, +nh5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -411,7 +411,7 @@ done: */ int_f -h5imlink_palette_c (hid_t_f *loc_id, +nh5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -476,7 +476,7 @@ done: */ int_f -h5imunlink_palette_c (hid_t_f *loc_id, +nh5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -542,7 +542,7 @@ done: */ int_f -h5imget_npalettes_c(hid_t_f *loc_id, +nh5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals) @@ -604,7 +604,7 @@ done: int_f -h5imget_palette_info_c(hid_t_f *loc_id, +nh5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -671,7 +671,7 @@ done: int_f -h5imget_palette_c(hid_t_f *loc_id, +nh5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -729,7 +729,7 @@ done: */ int_f -h5imis_palette_c(hid_t_f *loc_id, +nh5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 deleted file mode 100644 index 4408dda..0000000 --- a/hl/fortran/src/H5IMff.F90 +++ /dev/null @@ -1,667 +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 file contains FORTRAN interfaces for H5IM functions -! -! NOTES -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new function here then you MUST add the function name to the -! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. -! This is needed for Windows based operating systems. -! - -MODULE h5im - USE, INTRINSIC :: ISO_C_BINDING - USE h5fortran_types - USE hdf5 -CONTAINS - -!------------------------------------------------------------------------- -! Function: h5immake_image_8bit_f -! -! Purpose: Creates and writes an image an 8 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5immake_image_8bit_f(loc_id,& - dset_name,& - width,& - height,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) & - BIND(C,NAME='h5immake_image_8bit_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - INTEGER , INTENT(in), DIMENSION(*) :: buf ! buffer - END FUNCTION h5immake_image_8bit_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) - - END SUBROUTINE h5immake_image_8bit_f - -!------------------------------------------------------------------------- -! Function: h5imread_image_f -! -! Purpose: Reads image data from disk. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - SUBROUTINE h5imread_image_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imread_image_c(loc_id,namelen,dset_name,buf) & - BIND(C,NAME='h5imread_image_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - END FUNCTION h5imread_image_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) - - END SUBROUTINE h5imread_image_f - -!------------------------------------------------------------------------- -! Function: h5immake_image_24bit_f -! -! Purpose: Creates and writes an image a 24 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5immake_image_24bit_f(loc_id,& - dset_name,& - width,& - height,& - il,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - CHARACTER(len=*), INTENT(in) :: il ! interlace - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - - INTERFACE - INTEGER FUNCTION h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) & - BIND(C,NAME='h5immake_image_24bit_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il ! interlace - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: ILEN ! name length - - END FUNCTION h5immake_image_24bit_c - END INTERFACE - - namelen = LEN(dset_name) - ILEN = LEN(il) - errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) - - END SUBROUTINE h5immake_image_24bit_f - -!------------------------------------------------------------------------- -! Function: h5imget_image_info_f -! -! Purpose: Gets information about an image dataset (dimensions, interlace mode -! and number of associated palettes). -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imget_image_info_f(loc_id,& - dset_name,& - width,& - height,& - planes,& - interlace,& - npals,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: width ! width of image - INTEGER(hsize_t), INTENT(inout) :: height ! height of image - INTEGER(hsize_t), INTENT(inout) :: planes ! color planes - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - CHARACTER(len=*), INTENT(inout) :: interlace ! interlace - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - - INTERFACE - INTEGER FUNCTION h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) & - BIND(C,NAME='h5imget_image_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: width ! width of image - INTEGER(hsize_t), INTENT(inout) :: height ! height of image - INTEGER(hsize_t), INTENT(inout) :: planes ! color planes - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace ! interlace - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - END FUNCTION h5imget_image_info_c - END INTERFACE - - namelen = LEN(dset_name) - ILEN = LEN(interlace) - errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) - - END SUBROUTINE h5imget_image_info_f - -!------------------------------------------------------------------------- -! Function: h5imis_image_f -! -! Purpose: Inquires if a dataset is an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - INTEGER FUNCTION h5imis_image_f(loc_id,& - dset_name) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imis_image_c(loc_id,namelen,dset_name) & - BIND(C,NAME='h5imis_image_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - END FUNCTION h5imis_image_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imis_image_c(loc_id,namelen,dset_name) - h5imis_image_f = errcode - - END FUNCTION h5imis_image_f - - -!------------------------------------------------------------------------- -! Function: h5immake_palette_f -! -! Purpose: Creates and writes a palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5immake_palette_f(loc_id,& - dset_name,& - pal_dims,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) & - BIND(C,NAME='h5immake_palette_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - END FUNCTION h5immake_palette_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) - - END SUBROUTINE h5immake_palette_f - -!------------------------------------------------------------------------- -! Function: h5imlink_palette_f -! -! Purpose: This function attaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: pal_name ! palette name - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - - INTERFACE - INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & - BIND(C,NAME='h5imlink_palette_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - END FUNCTION h5imlink_palette_c - END INTERFACE - - namelen = LEN(dset_name) - ILEN = LEN(pal_name) - errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) - - END SUBROUTINE h5imlink_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imunlink_palette_f -! -! Purpose: This function dettaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imunlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: pal_name ! palette name - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - - INTERFACE - INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & - BIND(C,NAME='h5imunlink_palette_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length - END FUNCTION h5imunlink_palette_c - END INTERFACE - - namelen = LEN(dset_name) - ILEN = LEN(pal_name) - errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) - - END SUBROUTINE h5imunlink_palette_f - -!------------------------------------------------------------------------- -! Function: h5imget_npalettes_f -! -! Purpose: Gets the number of palettes associated to an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imget_npalettes_f(loc_id,& - dset_name,& - npals,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,dset_name,npals) & - BIND(C,NAME='h5imget_npalettes_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5imget_npalettes_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) - - END SUBROUTINE h5imget_npalettes_f - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_info_f -! -! Purpose: Get palette information -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imget_palette_info_f(loc_id,& - dset_name,& - pal_number,& - dims,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) & - BIND(C,NAME='h5imget_palette_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5imget_palette_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) - - END SUBROUTINE h5imget_palette_info_f - -!------------------------------------------------------------------------- -! Function: h5imget_palette_f -! -! Purpose: Reads palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5imget_palette_f(loc_id,& - dset_name,& - pal_number,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) & - BIND(C,NAME='h5imget_palette_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - END FUNCTION h5imget_palette_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) - - END SUBROUTINE h5imget_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imis_palette_f -! -! Purpose: Inquires if a dataset is a palette -! -! Return: true, false, fail -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - INTEGER FUNCTION h5imis_palette_f(loc_id,& - dset_name) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5imis_palette_c(loc_id,namelen,dset_name) & - BIND(C,NAME='h5imis_palette_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - END FUNCTION h5imis_palette_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5imis_palette_c(loc_id,namelen,dset_name) - h5imis_palette_f = errcode - - END FUNCTION h5imis_palette_f - -END MODULE H5IM - - - - - diff --git a/hl/fortran/src/H5IMff.f90 b/hl/fortran/src/H5IMff.f90 new file mode 100644 index 0000000..50c6d8b --- /dev/null +++ b/hl/fortran/src/H5IMff.f90 @@ -0,0 +1,783 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5IM functions +! + +module h5im +use h5fortran_types +use hdf5 +contains + + +!------------------------------------------------------------------------- +! Function: h5immake_image_8bit_f +! +! Purpose: Creates and writes an image an 8 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5immake_image_8bit_f(loc_id,& + dset_name,& + width,& + height,& + buf,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_image_8bit_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in) :: width ! width of image + integer(hsize_t), intent(in) :: height ! height of image + integer, intent(in), dimension(*) :: buf ! buffer + integer :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + interface + integer function h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_8BIT_C'::h5immake_image_8bit_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in) :: width ! width of image + integer(hsize_t), intent(in) :: height ! height of image + integer , intent(in), dimension(*) :: buf ! buffer + end function h5immake_image_8bit_c + end interface + + namelen = len(dset_name) + errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) + +end subroutine h5immake_image_8bit_f + + + +!------------------------------------------------------------------------- +! Function: h5imread_image_f +! +! Purpose: Reads image data from disk. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + +subroutine h5imread_image_f(loc_id,& + dset_name,& + buf,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imread_image_f +!DEC$endif +! + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(inout), dimension(*) :: buf ! buffer + integer :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + interface + integer function h5imread_image_c(loc_id,namelen,dset_name,buf) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMREAD_IMAGE_C'::h5imread_image_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(inout), dimension(*) :: buf ! buffer + end function h5imread_image_c + end interface + + namelen = len(dset_name) + errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) + +end subroutine h5imread_image_f + + +!------------------------------------------------------------------------- +! Function: h5immake_image_24bit_f +! +! Purpose: Creates and writes an image a 24 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5immake_image_24bit_f(loc_id,& + dset_name,& + width,& + height,& + il,& + buf,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_image_24bit_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in) :: width ! width of image + integer(hsize_t), intent(in) :: height ! height of image + character(len=*), intent(in) :: il ! interlace + integer, intent(in), dimension(*) :: buf ! buffer + integer :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + + interface + integer function h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_24BIT_C'::h5immake_image_24bit_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: il + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in) :: width ! width of image + integer(hsize_t), intent(in) :: height ! height of image + character(len=*), intent(in) :: il ! interlace + integer, intent(in), dimension(*) :: buf ! buffer + integer(size_t) :: namelen ! length of name buffer + integer(size_t) :: ilen ! name length + + end function h5immake_image_24bit_c + end interface + + namelen = len(dset_name) + ilen = len(il) + errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) + +end subroutine h5immake_image_24bit_f + + +!------------------------------------------------------------------------- +! Function: h5imget_image_info_f +! +! Purpose: Gets information about an image dataset (dimensions, interlace mode +! and number of associated palettes). +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5imget_image_info_f(loc_id,& + dset_name,& + width,& + height,& + planes,& + interlace,& + npals,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_image_info_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(inout) :: width ! width of image + integer(hsize_t), intent(inout) :: height ! height of image + integer(hsize_t), intent(inout) :: planes ! color planes + integer(hsize_t), intent(inout) :: npals ! palettes + character(len=*), intent(inout) :: interlace ! interlace + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + + interface + integer function h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_IMAGE_INFO_C'::h5imget_image_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: interlace + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(inout) :: width ! width of image + integer(hsize_t), intent(inout) :: height ! height of image + integer(hsize_t), intent(inout) :: planes ! color planes + integer(hsize_t), intent(inout) :: npals ! palettes + character(len=*), intent(inout) :: interlace ! interlace + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + end function h5imget_image_info_c + end interface + + namelen = len(dset_name) + ilen = len(interlace) + errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) + +end subroutine h5imget_image_info_f + + +!------------------------------------------------------------------------- +! Function: h5imis_image_f +! +! Purpose: Inquires if a dataset is an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +integer function h5imis_image_f(loc_id,& + dset_name) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imis_image_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5imis_image_c(loc_id,namelen,dset_name) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_IMAGE_C'::h5imis_image_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + end function h5imis_image_c + end interface + + namelen = len(dset_name) + errcode = h5imis_image_c(loc_id,namelen,dset_name) + h5imis_image_f = errcode + +end function h5imis_image_f + + +!------------------------------------------------------------------------- +! Function: h5immake_palette_f +! +! Purpose: Creates and writes a palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5immake_palette_f(loc_id,& + dset_name,& + pal_dims,& + buf,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5immake_palette_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions + integer, intent(in), dimension(*) :: buf ! buffer + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_PALETTE_C'::h5immake_palette_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions + integer, intent(in), dimension(*) :: buf ! buffer + end function h5immake_palette_c + end interface + + namelen = len(dset_name) + errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) + +end subroutine h5immake_palette_f + + + +!------------------------------------------------------------------------- +! Function: h5imlink_palette_f +! +! Purpose: This function attaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5imlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imlink_palette_f +!DEC$endif +! + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + character(len=*), intent(in) :: pal_name ! palette name + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + + interface + integer function h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMLINK_PALETTE_C'::h5imlink_palette_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: pal_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + character(len=*), intent(in) :: pal_name ! palette name + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + end function h5imlink_palette_c + end interface + + namelen = len(dset_name) + ilen = len(pal_name) + errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) + +end subroutine h5imlink_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imunlink_palette_f +! +! Purpose: This function dettaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5imunlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imunlink_palette_f +!DEC$endif +! + + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + character(len=*), intent(in) :: pal_name ! palette name + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + + interface + integer function h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMUNLINK_PALETTE_C'::h5imunlink_palette_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: pal_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + character(len=*), intent(in) :: pal_name ! palette name + integer(size_t) :: namelen ! name length + integer(size_t) :: ilen ! name length + end function h5imunlink_palette_c + end interface + + namelen = len(dset_name) + ilen = len(pal_name) + errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) + +end subroutine h5imunlink_palette_f + + + +!------------------------------------------------------------------------- +! Function: h5imget_npalettes_f +! +! Purpose: Gets the number of palettes associated to an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5imget_npalettes_f(loc_id,& + dset_name,& + npals,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_npalettes_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(inout) :: npals ! palettes + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5imget_npalettes_c(loc_id,namelen,dset_name,npals) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_NPALETTES_C'::h5imget_npalettes_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer(hsize_t), intent(inout) :: npals ! palettes + integer(size_t) :: namelen ! name length + end function h5imget_npalettes_c + end interface + + namelen = len(dset_name) + errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) + +end subroutine h5imget_npalettes_f + + +!------------------------------------------------------------------------- +! Function: h5imget_palette_info_f +! +! Purpose: Get palette information +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +subroutine h5imget_palette_info_f(loc_id,& + dset_name,& + pal_number,& + dims,& + errcode ) + + implicit none + + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_palette_info_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(in) :: pal_number ! palette number + integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_INFO_C'::h5imget_palette_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(in) :: pal_number ! palette number + integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions + integer(size_t) :: namelen ! name length + end function h5imget_palette_info_c + end interface + + namelen = len(dset_name) + errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) + +end subroutine h5imget_palette_info_f + + + +!------------------------------------------------------------------------- +! Function: h5imget_palette_f +! +! Purpose: Reads palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + +subroutine h5imget_palette_f(loc_id,& + dset_name,& + pal_number,& + buf,& + errcode ) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imget_palette_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(in) :: pal_number ! palette number + integer, intent(inout), dimension(*) :: buf ! buffer + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_C'::h5imget_palette_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + integer, intent(in) :: pal_number ! palette number + integer, intent(inout), dimension(*) :: buf ! buffer + end function h5imget_palette_c + end interface + + namelen = len(dset_name) + errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) + +end subroutine h5imget_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imis_palette_f +! +! Purpose: Inquires if a dataset is a palette +! +! Return: true, false, fail +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +integer function h5imis_palette_f(loc_id,& + dset_name) + + implicit none + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5imis_palette_f +!DEC$endif +! + + integer(hid_t), intent(in) :: loc_id ! file or group identifier + character(len=*), intent(in) :: dset_name ! name of the dataset + integer :: errcode ! error code + integer(size_t) :: namelen ! name length + + interface + integer function h5imis_palette_c(loc_id,namelen,dset_name) + use h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_PALETTE_C'::h5imis_palette_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + integer(hid_t), intent(in) :: loc_id ! file or group identifier + integer(size_t) :: namelen ! length of name buffer + character(len=*), intent(in) :: dset_name ! name of the dataset + end function h5imis_palette_c + end interface + + namelen = len(dset_name) + errcode = h5imis_palette_c(loc_id,namelen,dset_name) + h5imis_palette_f = errcode + +end function h5imis_palette_f + + +! end +! +end module H5IM + + + + + diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 20d043e..532d9d8 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -30,110 +30,1131 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); /* * Functions from H5DSfc.c */ + +#define nh5dsset_scale_c H5_FC_FUNC_(h5dsset_scale_c, H5DSSET_SCALE_C) +#define nh5dsattach_scale_c H5_FC_FUNC_(h5dsattach_scale_c, H5DSATTACH_SCALE_C) +#define nh5dsdetach_scale_c H5_FC_FUNC_(h5dsdetach_scale_c, H5DSDETACH_SCALE_C) +#define nh5dsis_attached_c H5_FC_FUNC_(h5dsis_attached_c, H5DSIS_ATTACHED_C) +#define nh5dsis_scale_c H5_FC_FUNC_(h5dsis_scale_c, H5DSIS_SCALE_C) +#define nh5dsset_label_c H5_FC_FUNC_(h5dsset_label_c, H5DSSET_LABEL_C) +#define nh5dsget_label_c H5_FC_FUNC_(h5dsget_label_c, H5DSGET_LABEL_C) +#define nh5dsget_scale_name_c H5_FC_FUNC_(h5dsget_scale_name_c,H5DSGET_SCALE_NAME_C) +#define nh5dsget_num_scales_c H5_FC_FUNC_(h5dsget_num_scales_c,H5DSGET_NUM_SCALES_C) + + +/* + * Functions from H5LTfc.c + */ +#define nh5ltmake_dataset_c H5_FC_FUNC_(h5ltmake_dataset_c, H5LTMAKE_DATASET_C) +#define nh5ltmake_dataset_int1_c H5_FC_FUNC_(h5ltmake_dataset_int1_c, H5LTMAKE_DATASET_INT1_C) +#define nh5ltmake_dataset_int2_c H5_FC_FUNC_(h5ltmake_dataset_int2_c, H5LTMAKE_DATASET_INT2_C) +#define nh5ltmake_dataset_int3_c H5_FC_FUNC_(h5ltmake_dataset_int3_c, H5LTMAKE_DATASET_INT3_C) +#define nh5ltmake_dataset_int4_c H5_FC_FUNC_(h5ltmake_dataset_int4_c, H5LTMAKE_DATASET_INT4_C) +#define nh5ltmake_dataset_int5_c H5_FC_FUNC_(h5ltmake_dataset_int5_c, H5LTMAKE_DATASET_INT5_C) +#define nh5ltmake_dataset_int6_c H5_FC_FUNC_(h5ltmake_dataset_int6_c, H5LTMAKE_DATASET_INT6_C) +#define nh5ltmake_dataset_int7_c H5_FC_FUNC_(h5ltmake_dataset_int7_c, H5LTMAKE_DATASET_INT7_C) +#define nh5ltmake_dataset_fl1_c H5_FC_FUNC_(h5ltmake_dataset_fl1_c, H5LTMAKE_DATASET_FL1_C) +#define nh5ltmake_dataset_fl2_c H5_FC_FUNC_(h5ltmake_dataset_fl2_c, H5LTMAKE_DATASET_FL2_C) +#define nh5ltmake_dataset_fl3_c H5_FC_FUNC_(h5ltmake_dataset_fl3_c, H5LTMAKE_DATASET_FL3_C) +#define nh5ltmake_dataset_fl4_c H5_FC_FUNC_(h5ltmake_dataset_fl4_c, H5LTMAKE_DATASET_FL4_C) +#define nh5ltmake_dataset_fl5_c H5_FC_FUNC_(h5ltmake_dataset_fl5_c, H5LTMAKE_DATASET_FL5_C) +#define nh5ltmake_dataset_fl6_c H5_FC_FUNC_(h5ltmake_dataset_fl6_c, H5LTMAKE_DATASET_FL6_C) +#define nh5ltmake_dataset_fl7_c H5_FC_FUNC_(h5ltmake_dataset_fl7_c, H5LTMAKE_DATASET_FL7_C) +#define nh5ltmake_dataset_dl1_c H5_FC_FUNC_(h5ltmake_dataset_dl1_c, H5LTMAKE_DATASET_DL1_C) +#define nh5ltmake_dataset_dl2_c H5_FC_FUNC_(h5ltmake_dataset_dl2_c, H5LTMAKE_DATASET_DL2_C) +#define nh5ltmake_dataset_dl3_c H5_FC_FUNC_(h5ltmake_dataset_dl3_c, H5LTMAKE_DATASET_DL3_C) +#define nh5ltmake_dataset_dl4_c H5_FC_FUNC_(h5ltmake_dataset_dl4_c, H5LTMAKE_DATASET_DL4_C) +#define nh5ltmake_dataset_dl5_c H5_FC_FUNC_(h5ltmake_dataset_dl5_c, H5LTMAKE_DATASET_DL5_C) +#define nh5ltmake_dataset_dl6_c H5_FC_FUNC_(h5ltmake_dataset_dl6_c, H5LTMAKE_DATASET_DL6_C) +#define nh5ltmake_dataset_dl7_c H5_FC_FUNC_(h5ltmake_dataset_dl7_c, H5LTMAKE_DATASET_DL7_C) +#define nh5ltmake_dataset_nint1_c H5_FC_FUNC_(h5ltmake_dataset_nint1_c, H5LTMAKE_DATASET_NINT1_C) +#define nh5ltmake_dataset_nint2_c H5_FC_FUNC_(h5ltmake_dataset_nint2_c, H5LTMAKE_DATASET_NINT2_C) +#define nh5ltmake_dataset_nint3_c H5_FC_FUNC_(h5ltmake_dataset_nint3_c, H5LTMAKE_DATASET_NINT3_C) +#define nh5ltmake_dataset_nint4_c H5_FC_FUNC_(h5ltmake_dataset_nint4_c, H5LTMAKE_DATASET_NINT4_C) +#define nh5ltmake_dataset_nint5_c H5_FC_FUNC_(h5ltmake_dataset_nint5_c, H5LTMAKE_DATASET_NINT5_C) +#define nh5ltmake_dataset_nint6_c H5_FC_FUNC_(h5ltmake_dataset_nint6_c, H5LTMAKE_DATASET_NINT6_C) +#define nh5ltmake_dataset_nint7_c H5_FC_FUNC_(h5ltmake_dataset_nint7_c, H5LTMAKE_DATASET_NINT7_C) +#define nh5ltmake_dataset_nfl1_c H5_FC_FUNC_(h5ltmake_dataset_nfl1_c, H5LTMAKE_DATASET_NFL1_C) +#define nh5ltmake_dataset_nfl2_c H5_FC_FUNC_(h5ltmake_dataset_nfl2_c, H5LTMAKE_DATASET_NFL2_C) +#define nh5ltmake_dataset_nfl3_c H5_FC_FUNC_(h5ltmake_dataset_nfl3_c, H5LTMAKE_DATASET_NFL3_C) +#define nh5ltmake_dataset_nfl4_c H5_FC_FUNC_(h5ltmake_dataset_nfl4_c, H5LTMAKE_DATASET_NFL4_C) +#define nh5ltmake_dataset_nfl5_c H5_FC_FUNC_(h5ltmake_dataset_nfl5_c, H5LTMAKE_DATASET_NFL5_C) +#define nh5ltmake_dataset_nfl6_c H5_FC_FUNC_(h5ltmake_dataset_nfl6_c, H5LTMAKE_DATASET_NFL6_C) +#define nh5ltmake_dataset_nfl7_c H5_FC_FUNC_(h5ltmake_dataset_nfl7_c, H5LTMAKE_DATASET_NFL7_C) +#define nh5ltmake_dataset_ndl1_c H5_FC_FUNC_(h5ltmake_dataset_ndl1_c, H5LTMAKE_DATASET_NDL1_C) +#define nh5ltmake_dataset_ndl2_c H5_FC_FUNC_(h5ltmake_dataset_ndl2_c, H5LTMAKE_DATASET_NDL2_C) +#define nh5ltmake_dataset_ndl3_c H5_FC_FUNC_(h5ltmake_dataset_ndl3_c, H5LTMAKE_DATASET_NDL3_C) +#define nh5ltmake_dataset_ndl4_c H5_FC_FUNC_(h5ltmake_dataset_ndl4_c, H5LTMAKE_DATASET_NDL4_C) +#define nh5ltmake_dataset_ndl5_c H5_FC_FUNC_(h5ltmake_dataset_ndl5_c, H5LTMAKE_DATASET_NDL5_C) +#define nh5ltmake_dataset_ndl6_c H5_FC_FUNC_(h5ltmake_dataset_ndl6_c, H5LTMAKE_DATASET_NDL6_C) +#define nh5ltmake_dataset_ndl7_c H5_FC_FUNC_(h5ltmake_dataset_ndl7_c, H5LTMAKE_DATASET_NDL7_C) +#define nh5ltread_dataset_c H5_FC_FUNC_(h5ltread_dataset_c, H5LTREAD_DATASET_C) +#define nh5ltread_dataset_int1_c H5_FC_FUNC_(h5ltread_dataset_int1_c, H5LTREAD_DATASET_INT1_C) +#define nh5ltread_dataset_int2_c H5_FC_FUNC_(h5ltread_dataset_int2_c, H5LTREAD_DATASET_INT2_C) +#define nh5ltread_dataset_int3_c H5_FC_FUNC_(h5ltread_dataset_int3_c, H5LTREAD_DATASET_INT3_C) +#define nh5ltread_dataset_int4_c H5_FC_FUNC_(h5ltread_dataset_int4_c, H5LTREAD_DATASET_INT4_C) +#define nh5ltread_dataset_int5_c H5_FC_FUNC_(h5ltread_dataset_int5_c, H5LTREAD_DATASET_INT5_C) +#define nh5ltread_dataset_int6_c H5_FC_FUNC_(h5ltread_dataset_int6_c, H5LTREAD_DATASET_INT6_C) +#define nh5ltread_dataset_int7_c H5_FC_FUNC_(h5ltread_dataset_int7_c, H5LTREAD_DATASET_INT7_C) +#define nh5ltread_dataset_fl1_c H5_FC_FUNC_(h5ltread_dataset_fl1_c, H5LTREAD_DATASET_FL1_C) +#define nh5ltread_dataset_fl2_c H5_FC_FUNC_(h5ltread_dataset_fl2_c, H5LTREAD_DATASET_FL2_C) +#define nh5ltread_dataset_fl3_c H5_FC_FUNC_(h5ltread_dataset_fl3_c, H5LTREAD_DATASET_FL3_C) +#define nh5ltread_dataset_fl4_c H5_FC_FUNC_(h5ltread_dataset_fl4_c, H5LTREAD_DATASET_FL4_C) +#define nh5ltread_dataset_fl5_c H5_FC_FUNC_(h5ltread_dataset_fl5_c, H5LTREAD_DATASET_FL5_C) +#define nh5ltread_dataset_fl6_c H5_FC_FUNC_(h5ltread_dataset_fl6_c, H5LTREAD_DATASET_FL6_C) +#define nh5ltread_dataset_fl7_c H5_FC_FUNC_(h5ltread_dataset_fl7_c, H5LTREAD_DATASET_FL7_C) +#define nh5ltread_dataset_dl1_c H5_FC_FUNC_(h5ltread_dataset_dl1_c, H5LTREAD_DATASET_DL1_C) +#define nh5ltread_dataset_dl2_c H5_FC_FUNC_(h5ltread_dataset_dl2_c, H5LTREAD_DATASET_DL2_C) +#define nh5ltread_dataset_dl3_c H5_FC_FUNC_(h5ltread_dataset_dl3_c, H5LTREAD_DATASET_DL3_C) +#define nh5ltread_dataset_dl4_c H5_FC_FUNC_(h5ltread_dataset_dl4_c, H5LTREAD_DATASET_DL4_C) +#define nh5ltread_dataset_dl5_c H5_FC_FUNC_(h5ltread_dataset_dl5_c, H5LTREAD_DATASET_DL5_C) +#define nh5ltread_dataset_dl6_c H5_FC_FUNC_(h5ltread_dataset_dl6_c, H5LTREAD_DATASET_DL6_C) +#define nh5ltread_dataset_dl7_c H5_FC_FUNC_(h5ltread_dataset_dl7_c, H5LTREAD_DATASET_DL7_C) +#define nh5ltread_dataset_nint1_c H5_FC_FUNC_(h5ltread_dataset_nint1_c, H5LTREAD_DATASET_NINT1_C) +#define nh5ltread_dataset_nint2_c H5_FC_FUNC_(h5ltread_dataset_nint2_c, H5LTREAD_DATASET_NINT2_C) +#define nh5ltread_dataset_nint3_c H5_FC_FUNC_(h5ltread_dataset_nint3_c, H5LTREAD_DATASET_NINT3_C) +#define nh5ltread_dataset_nint4_c H5_FC_FUNC_(h5ltread_dataset_nint4_c, H5LTREAD_DATASET_NINT4_C) +#define nh5ltread_dataset_nint5_c H5_FC_FUNC_(h5ltread_dataset_nint5_c, H5LTREAD_DATASET_NINT5_C) +#define nh5ltread_dataset_nint6_c H5_FC_FUNC_(h5ltread_dataset_nint6_c, H5LTREAD_DATASET_NINT6_C) +#define nh5ltread_dataset_nint7_c H5_FC_FUNC_(h5ltread_dataset_nint7_c, H5LTREAD_DATASET_NINT7_C) +#define nh5ltread_dataset_nfl1_c H5_FC_FUNC_(h5ltread_dataset_nfl1_c, H5LTREAD_DATASET_NFL1_C) +#define nh5ltread_dataset_nfl2_c H5_FC_FUNC_(h5ltread_dataset_nfl2_c, H5LTREAD_DATASET_NFL2_C) +#define nh5ltread_dataset_nfl3_c H5_FC_FUNC_(h5ltread_dataset_nfl3_c, H5LTREAD_DATASET_NFL3_C) +#define nh5ltread_dataset_nfl4_c H5_FC_FUNC_(h5ltread_dataset_nfl4_c, H5LTREAD_DATASET_NFL4_C) +#define nh5ltread_dataset_nfl5_c H5_FC_FUNC_(h5ltread_dataset_nfl5_c, H5LTREAD_DATASET_NFL5_C) +#define nh5ltread_dataset_nfl6_c H5_FC_FUNC_(h5ltread_dataset_nfl6_c, H5LTREAD_DATASET_NFL6_C) +#define nh5ltread_dataset_nfl7_c H5_FC_FUNC_(h5ltread_dataset_nfl7_c, H5LTREAD_DATASET_NFL7_C) +#define nh5ltread_dataset_ndl1_c H5_FC_FUNC_(h5ltread_dataset_ndl1_c, H5LTREAD_DATASET_NDL1_C) +#define nh5ltread_dataset_ndl2_c H5_FC_FUNC_(h5ltread_dataset_ndl2_c, H5LTREAD_DATASET_NDL2_C) +#define nh5ltread_dataset_ndl3_c H5_FC_FUNC_(h5ltread_dataset_ndl3_c, H5LTREAD_DATASET_NDL3_C) +#define nh5ltread_dataset_ndl4_c H5_FC_FUNC_(h5ltread_dataset_ndl4_c, H5LTREAD_DATASET_NDL4_C) +#define nh5ltread_dataset_ndl5_c H5_FC_FUNC_(h5ltread_dataset_ndl5_c, H5LTREAD_DATASET_NDL5_C) +#define nh5ltread_dataset_ndl6_c H5_FC_FUNC_(h5ltread_dataset_ndl6_c, H5LTREAD_DATASET_NDL6_C) +#define nh5ltread_dataset_ndl7_c H5_FC_FUNC_(h5ltread_dataset_ndl7_c, H5LTREAD_DATASET_NDL7_C) +#define nh5ltmake_dataset_string_c H5_FC_FUNC_(h5ltmake_dataset_string_c, H5LTMAKE_DATASET_STRING_C) +#define nh5ltread_dataset_string_c H5_FC_FUNC_(h5ltread_dataset_string_c, H5LTREAD_DATASET_STRING_C) + +#define nh5ltset_attribute_int_c H5_FC_FUNC_(h5ltset_attribute_int_c, H5LTSET_ATTRIBUTE_INT_C) +#define nh5ltset_attribute_float_c H5_FC_FUNC_(h5ltset_attribute_float_c, H5LTSET_ATTRIBUTE_FLOAT_C) +#define nh5ltset_attribute_double_c H5_FC_FUNC_(h5ltset_attribute_double_c, H5LTSET_ATTRIBUTE_DOUBLE_C) +#define nh5ltset_attribute_string_c H5_FC_FUNC_(h5ltset_attribute_string_c, H5LTSET_ATTRIBUTE_STRING_C) + +#define nh5ltget_attribute_int_c H5_FC_FUNC_(h5ltget_attribute_int_c, H5LTGET_ATTRIBUTE_INT_C) +#define nh5ltget_attribute_float_c H5_FC_FUNC_(h5ltget_attribute_float_c, H5LTGET_ATTRIBUTE_FLOAT_C) +#define nh5ltget_attribute_double_c H5_FC_FUNC_(h5ltget_attribute_double_c, H5LTGET_ATTRIBUTE_DOUBLE_C) +#define nh5ltget_attribute_string_c H5_FC_FUNC_(h5ltget_attribute_string_c, H5LTGET_ATTRIBUTE_STRING_C) + +#define nh5ltget_dataset_ndims_c H5_FC_FUNC_(h5ltget_dataset_ndims_c, H5LTGET_DATASET_NDIMS_C) +#define nh5ltfind_dataset_c H5_FC_FUNC_(h5ltfind_dataset_c, H5LTFIND_DATASET_C) +#define nh5ltget_dataset_info_c H5_FC_FUNC_(h5ltget_dataset_info_c, H5LTGET_DATASET_INFO_C) + +#define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C) +#define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C) +#define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C) + +/*------------------------------------------------------------------------- +* Image +*------------------------------------------------------------------------- +*/ +#define nh5immake_image_8bit_c H5_FC_FUNC_(h5immake_image_8bit_c, H5IMMAKE_IMAGE_8BIT_C) +#define nh5immake_image_24bit_c H5_FC_FUNC_(h5immake_image_24bit_c, H5IMMAKE_IMAGE_24BIT_C) +#define nh5imread_image_c H5_FC_FUNC_(h5imread_image_c, H5IMREAD_IMAGE_C) +#define nh5imget_image_info_c H5_FC_FUNC_(h5imget_image_info_c, H5IMGET_IMAGE_INFO_C) +#define nh5imis_image_c H5_FC_FUNC_(h5imis_image_c, H5IMIS_IMAGE_C) +#define nh5immake_palette_c H5_FC_FUNC_(h5immake_palette_c, H5IMMAKE_PALETTE_C) +#define nh5imlink_palette_c H5_FC_FUNC_(h5imlink_palette_c, H5IMLINK_PALETTE_C) +#define nh5imunlink_palette_c H5_FC_FUNC_(h5imunlink_palette_c, H5IMUNLINK_PALETTE_C) +#define nh5imget_npalettes_c H5_FC_FUNC_(h5imget_npalettes_c, H5IMGET_NPALETTES_C) +#define nh5imget_palette_info_c H5_FC_FUNC_(h5imget_palette_info_c, H5IMGET_PALETTE_INFO_C) +#define nh5imget_palette_c H5_FC_FUNC_(h5imget_palette_c, H5IMGET_PALETTE_C) +#define nh5imis_palette_c H5_FC_FUNC_(h5imis_palette_c, H5IMIS_PALETTE_C) + +/*------------------------------------------------------------------------- +* Table +*------------------------------------------------------------------------- +*/ +#define nh5tbmake_table_c H5_FC_FUNC_(h5tbmake_table_c, H5TBMAKE_TABLE_C) +#define nh5tbwrite_field_name_c H5_FC_FUNC_(h5tbwrite_field_name_c, H5TBWRITE_FIELD_NAME_C) +#define nh5tbwrite_field_name_int_c H5_FC_FUNC_(h5tbwrite_field_name_int_c, H5TBWRITE_FIELD_NAME_INT_C) +#define nh5tbwrite_field_name_fl_c H5_FC_FUNC_(h5tbwrite_field_name_fl_c, H5TBWRITE_FIELD_NAME_FL_C) +#define nh5tbwrite_field_name_dl_c H5_FC_FUNC_(h5tbwrite_field_name_dl_c, H5TBWRITE_FIELD_NAME_DL_C) +#define nh5tbwrite_field_name_st_c H5_FC_FUNC_(h5tbwrite_field_name_st_c, H5TBWRITE_FIELD_NAME_ST_C) +#define nh5tbread_field_name_c H5_FC_FUNC_(h5tbread_field_name_c, H5TBREAD_FIELD_NAME_C) +#define nh5tbread_field_name_int_c H5_FC_FUNC_(h5tbread_field_name_int_c, H5TBREAD_FIELD_NAME_INT_C) +#define nh5tbread_field_name_fl_c H5_FC_FUNC_(h5tbread_field_name_fl_c, H5TBREAD_FIELD_NAME_FL_C) +#define nh5tbread_field_name_dl_c H5_FC_FUNC_(h5tbread_field_name_dl_c, H5TBREAD_FIELD_NAME_DL_C) +#define nh5tbread_field_name_st_c H5_FC_FUNC_(h5tbread_field_name_st_c, H5TBREAD_FIELD_NAME_ST_C) +#define nh5tbwrite_field_index_c H5_FC_FUNC_(h5tbwrite_field_index_c, H5TBWRITE_FIELD_INDEX_C) +#define nh5tbwrite_field_index_int_c H5_FC_FUNC_(h5tbwrite_field_index_int_c, H5TBWRITE_FIELD_INDEX_INT_C) +#define nh5tbwrite_field_index_fl_c H5_FC_FUNC_(h5tbwrite_field_index_fl_c, H5TBWRITE_FIELD_INDEX_FL_C) +#define nh5tbwrite_field_index_dl_c H5_FC_FUNC_(h5tbwrite_field_index_dl_c, H5TBWRITE_FIELD_INDEX_DL_C) +#define nh5tbwrite_field_index_st_c H5_FC_FUNC_(h5tbwrite_field_index_st_c, H5TBWRITE_FIELD_INDEX_ST_C) +#define nh5tbread_field_index_c H5_FC_FUNC_(h5tbread_field_index_c, H5TBREAD_FIELD_INDEX_C) +#define nh5tbread_field_index_int_c H5_FC_FUNC_(h5tbread_field_index_int_c, H5TBREAD_FIELD_INDEX_INT_C) +#define nh5tbread_field_index_fl_c H5_FC_FUNC_(h5tbread_field_index_fl_c, H5TBREAD_FIELD_INDEX_FL_C) +#define nh5tbread_field_index_dl_c H5_FC_FUNC_(h5tbread_field_index_dl_c, H5TBREAD_FIELD_INDEX_DL_C) +#define nh5tbread_field_index_st_c H5_FC_FUNC_(h5tbread_field_index_st_c, H5TBREAD_FIELD_INDEX_ST_C) +#define nh5tbinsert_field_c H5_FC_FUNC_(h5tbinsert_field_c, H5TBINSERT_FIELD_C) +#define nh5tbinsert_field_int_c H5_FC_FUNC_(h5tbinsert_field_int_c, H5TBINSERT_FIELD_INT_C) +#define nh5tbinsert_field_fl_c H5_FC_FUNC_(h5tbinsert_field_fl_c, H5TBINSERT_FIELD_FL_C) +#define nh5tbinsert_field_dl_c H5_FC_FUNC_(h5tbinsert_field_dl_c, H5TBINSERT_FIELD_DL_C) +#define nh5tbinsert_field_st_c H5_FC_FUNC_(h5tbinsert_field_st_c, H5TBINSERT_FIELD_ST_C) +#define nh5tbdelete_field_c H5_FC_FUNC_(h5tbdelete_field_c, H5TBDELETE_FIELD_C) +#define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C) +#define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C) + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); + +HDF5_HL_F90CSTUBDLL +int_f +nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); + + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_int7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_int7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_fl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_fl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_fl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_fl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_fl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + HDF5_HL_F90CSTUBDLL int_f -h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); +nh5ltread_dataset_fl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + HDF5_HL_F90CSTUBDLL int_f -h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); +nh5ltread_dataset_fl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); +nh5ltread_dataset_dl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); +nh5ltread_dataset_dl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsis_scale_c(hid_t_f *did, int_f *is_scale); +nh5ltread_dataset_dl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); +nh5ltread_dataset_dl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); +nh5ltread_dataset_dl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); +nh5ltread_dataset_dl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); +nh5ltread_dataset_dl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); -/* - * Functions from H5LTfc.c - */ +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nint1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5ltmake_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); +nh5ltread_dataset_nint2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); HDF5_HL_F90CSTUBDLL int_f -h5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf); +nh5ltread_dataset_nint3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nint4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nint5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nint6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nint7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltset_attribute_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltset_attribute_float_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltset_attribute_double_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf); HDF5_HL_F90CSTUBDLL int_f -h5ltset_attribute_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf, char *dtype, size_t_f *sizeof_val); +nh5ltset_attribute_string_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *buflen, + void *buf); HDF5_HL_F90CSTUBDLL int_f -h5ltget_attribute_c(hid_t_f *loc_id, +nh5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf, char* dtype, size_t_f *sizeof_val); + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltget_attribute_float_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5ltget_attribute_double_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + void *buf); HDF5_HL_F90CSTUBDLL int_f -h5ltget_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - _fcd buf, - size_t_f *buf_size); +nh5ltget_attribute_string_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + _fcd buf, + size_t_f *buf_size); HDF5_HL_F90CSTUBDLL int_f -h5ltget_dataset_ndims_c(hid_t_f *loc_id, +nh5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -h5ltfind_dataset_c(hid_t_f *loc_id, +nh5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -h5ltget_dataset_info_c(hid_t_f *loc_id, +nh5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -142,7 +1163,7 @@ h5ltget_dataset_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltget_attribute_ndims_c(hid_t_f *loc_id, +nh5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -150,7 +1171,7 @@ h5ltget_attribute_ndims_c(hid_t_f *loc_id, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -h5ltget_attribute_info_c(hid_t_f *loc_id, +nh5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -161,7 +1182,7 @@ h5ltget_attribute_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltmake_dataset_string_c (hid_t_f *loc_id, +nh5ltmake_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, @@ -169,14 +1190,14 @@ h5ltmake_dataset_string_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltread_dataset_string_c (hid_t_f *loc_id, +nh5ltread_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf); HDF5_HL_F90CSTUBDLL int_f -h5ltpath_valid_c(hid_t_f *loc_id, +nh5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c); @@ -185,9 +1206,10 @@ h5ltpath_valid_c(hid_t_f *loc_id, * Image *------------------------------------------------------------------------- */ + HDF5_HL_F90CSTUBDLL int_f -h5immake_image_8bit_c (hid_t_f *loc_id, +nh5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -195,14 +1217,14 @@ h5immake_image_8bit_c (hid_t_f *loc_id, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -h5imread_image_c (hid_t_f *loc_id, +nh5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -h5immake_image_24bit_c (hid_t_f *loc_id, +nh5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -212,7 +1234,7 @@ h5immake_image_24bit_c (hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -h5imget_image_info_c(hid_t_f *loc_id, +nh5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -225,14 +1247,14 @@ h5imget_image_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imis_image_c(hid_t_f *loc_id, +nh5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -h5immake_palette_c (hid_t_f *loc_id, +nh5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -240,7 +1262,7 @@ h5immake_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imlink_palette_c (hid_t_f *loc_id, +nh5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -248,7 +1270,7 @@ h5imlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imunlink_palette_c (hid_t_f *loc_id, +nh5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -256,7 +1278,7 @@ h5imunlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imget_npalettes_c(hid_t_f *loc_id, +nh5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals); @@ -264,7 +1286,7 @@ h5imget_npalettes_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imget_palette_info_c(hid_t_f *loc_id, +nh5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -272,7 +1294,7 @@ h5imget_palette_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imget_palette_c(hid_t_f *loc_id, +nh5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -280,7 +1302,7 @@ h5imget_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5imis_palette_c(hid_t_f *loc_id, +nh5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); @@ -293,7 +1315,7 @@ h5imis_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbmake_table_c(size_t_f *namelen1, +nh5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -311,7 +1333,7 @@ h5tbmake_table_c(size_t_f *namelen1, HDF5_HL_F90CSTUBDLL int_f -h5tbwrite_field_name_c(hid_t_f *loc_id, +nh5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -321,11 +1343,57 @@ h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_name_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_name_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); HDF5_HL_F90CSTUBDLL int_f -h5tbread_field_name_c(hid_t_f *loc_id, +nh5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -335,11 +1403,57 @@ h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_name_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_name_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_name_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_name_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); HDF5_HL_F90CSTUBDLL int_f -h5tbwrite_field_index_c(hid_t_f *loc_id, +nh5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -350,7 +1464,51 @@ h5tbwrite_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbread_field_index_c(hid_t_f *loc_id, +nh5tbwrite_field_index_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbwrite_field_index_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -361,7 +1519,51 @@ h5tbread_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbinsert_field_c(hid_t_f *loc_id, +nh5tbread_field_index_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_index_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_index_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbread_field_index_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf); + +HDF5_HL_F90CSTUBDLL +int_f +nh5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -372,7 +1574,47 @@ h5tbinsert_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbdelete_field_c(hid_t_f *loc_id, +nh5tbinsert_field_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbinsert_field_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbinsert_field_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbinsert_field_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf); +HDF5_HL_F90CSTUBDLL +int_f +nh5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -381,7 +1623,7 @@ h5tbdelete_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbget_table_info_c(hid_t_f *loc_id, +nh5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -389,7 +1631,7 @@ h5tbget_table_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5tbget_field_info_c(hid_t_f *loc_id, +nh5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index c955590..1e0a236 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -39,7 +39,7 @@ */ int_f -h5ltmake_dataset_c (hid_t_f *loc_id, +nh5ltmake_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -89,16 +89,1081 @@ done: return ret_value; } +int_f +nh5ltmake_dataset_int1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_int7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +int_f +nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf) +{ + return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); +} +/*------------------------------------------------------------------------- +* Function: H5LTread_dataset_c +* +* Purpose: Call H5LTmake_dataset +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: September 09, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + +int_f +nh5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + hid_t c_type_id; + char *c_name = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + if (c_name == NULL) + goto done; + + /* + * call H5LTread_dataset function. + */ + c_loc_id = (hid_t)*loc_id; + c_type_id = (hid_t)*type_id; + + ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + + return ret_value; +} + +int_f +nh5ltread_dataset_int1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_int7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_fl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_dl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nint7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +int_f +nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf, + hsize_t_f *dims) +{ + return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); +} +/*------------------------------------------------------------------------- +* Function: H5LTmake_dataset_string_c +* +* Purpose: Call H5LTmake_dataset +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: September 09, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + +int_f +nh5ltmake_dataset_string_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *buflen, + char *buf) +{ + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + char *c_name = NULL; + char *c_buf = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + if (c_name == NULL) + goto done; + + c_buf = (char *)HD5f2cstring(buf, (size_t)*buflen); + if (c_buf == NULL) + goto done; + + /* + * call H5LTmake_dataset_string function. + */ + c_loc_id = (hid_t)*loc_id; + + ret = H5LTmake_dataset_string(c_loc_id,c_name,c_buf); + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + if(c_buf!=NULL) + HDfree(c_buf); + + return ret_value; +} + + +/*------------------------------------------------------------------------- +* Function: H5LTread_dataset_string_c +* +* Purpose: Call H5LTread_dataset_string +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: September 09, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + +int_f +nh5ltread_dataset_string_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + char *buf) +{ + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + char *c_name = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + if (c_name == NULL) + goto done; + + /* + * call H5LTread_dataset_string function. + */ + c_loc_id = (hid_t)*loc_id; + + ret = H5LTread_dataset_string(c_loc_id,c_name,buf); + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + + return ret_value; +} + + + /*------------------------------------------------------------------------- -* Function: H5LTread_dataset_c +* Function: H5LTset_attribute_int_c * -* Purpose: Call H5LTmake_dataset +* Purpose: Call H5LTset_attribute_int * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: September 09, 2004 +* Date: October 05, 2004 * * Comments: * @@ -109,32 +1174,46 @@ done: */ int_f -h5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf) +nh5ltset_attribute_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; - hid_t c_type_id; char *c_name = NULL; + char *c_attrname = NULL; + size_t c_size; /* * convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); if (c_name == NULL) goto done; + c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); + if (c_attrname == NULL) + goto done; + /* - * call H5LTread_dataset function. + * call H5LTset_attribute_int function. */ c_loc_id = (hid_t)*loc_id; - c_type_id = (hid_t)*type_id; + c_size = (size_t)*size; - ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); + if (sizeof(int_f) == sizeof(int)) + ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size); + else if (sizeof(int_f) == sizeof(long)) + ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); + else if (sizeof(int_f) == sizeof(long long)) + ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size); + else + goto done; if (ret < 0) goto done; @@ -144,20 +1223,22 @@ h5ltread_dataset_c (hid_t_f *loc_id, done: if(c_name!=NULL) HDfree(c_name); + if(c_attrname!=NULL) + HDfree(c_attrname); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTmake_dataset_string_c +* Function: H5LTset_attribute_float_c * -* Purpose: Call H5LTmake_dataset +* Purpose: Call H5LTset_attribute_float * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: September 09, 2004 +* Date: October 05, 2004 * * Comments: * @@ -168,61 +1249,65 @@ done: */ int_f -h5ltmake_dataset_string_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *buflen, - char *buf) +nh5ltset_attribute_float_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; char *c_name = NULL; - char *c_buf = NULL; + char *c_attrname = NULL; + size_t c_size; /* * convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); if (c_name == NULL) - goto done; + goto done; - c_buf = (char *)HD5f2cstring(buf, (size_t)*buflen); - if (c_buf == NULL) - goto done; + c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); + if (c_attrname == NULL) + goto done; /* - * call H5LTmake_dataset_string function. + * Call H5LTset_attribute_float function. */ c_loc_id = (hid_t)*loc_id; + c_size = (size_t)*size; - ret = H5LTmake_dataset_string(c_loc_id,c_name,c_buf); + ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname,(float *)buf,c_size); if (ret < 0) - goto done; + goto done; ret_value = 0; done: if(c_name!=NULL) HDfree(c_name); - if(c_buf!=NULL) - HDfree(c_buf); + if(c_attrname!=NULL) + HDfree(c_attrname); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTread_dataset_string_c +* Function: H5LTset_attribute_double_c * -* Purpose: Call H5LTread_dataset_string +* Purpose: Call H5LTset_attribute_double * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: September 09, 2004 +* Date: October 05, 2004 * * Comments: * @@ -233,46 +1318,59 @@ done: */ int_f -h5ltread_dataset_string_c (hid_t_f *loc_id, +nh5ltset_attribute_double_c(hid_t_f *loc_id, size_t_f *namelen, - _fcd name, - char *buf) + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; char *c_name = NULL; + char *c_attrname = NULL; + size_t c_size; /* - * convert FORTRAN name to C name + * Convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); + c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); if (c_name == NULL) goto done; + c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); + if (c_attrname == NULL) + goto done; + /* - * call H5LTread_dataset_string function. + * Call H5LTset_attribute_double function. */ c_loc_id = (hid_t)*loc_id; + c_size = (size_t)*size; - ret = H5LTread_dataset_string(c_loc_id,c_name,buf); + ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf,c_size); if (ret < 0) goto done; ret_value = 0; + done: if(c_name!=NULL) HDfree(c_name); + if(c_attrname!=NULL) + HDfree(c_attrname); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_int_c +* Function: H5LTset_attribute_string_c * -* Purpose: Call H5LTset_attribute_int +* Purpose: Call H5LTset_attribute_string * * Return: Success: 0, Failure: -1 * @@ -289,13 +1387,13 @@ done: */ int_f -h5ltset_attribute_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf, char *dtype, size_t_f *sizeof_val) +nh5ltset_attribute_string_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *buflen, + void *buf) { int ret_value = -1; herr_t ret; @@ -303,7 +1401,6 @@ h5ltset_attribute_c(hid_t_f *loc_id, char *c_name = NULL; char *c_attrname = NULL; char *c_buf = NULL; - size_t c_size; /* * convert FORTRAN name to C name @@ -316,49 +1413,28 @@ h5ltset_attribute_c(hid_t_f *loc_id, if (c_attrname == NULL) goto done; + c_buf = (char *)HD5f2cstring((_fcd)buf, (size_t)*buflen); + if (c_buf == NULL) + goto done; + + /* - * call H5LTset_attribute_int function. + * call H5LTset_attribute_string function. */ c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - if( HDstrncmp(dtype,"I",1) == 0 ) { - if ((size_t)*sizeof_val == sizeof(int)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_INT, (const int *)buf); - else if ((size_t)*sizeof_val == sizeof(long)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LONG, (const long *)buf); - else if ((size_t)*sizeof_val == sizeof(long long)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LLONG, (const long long *)buf); - else - goto done; - } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - if((size_t)*sizeof_val == sizeof(float)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_FLOAT, (const float *)buf); - else if((size_t)*sizeof_val == sizeof(double)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_DOUBLE, (const double *)buf); -#if H5_SIZEOF_LONG_DOUBLE !=0 - else if((size_t)*sizeof_val == sizeof(long double)) - ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LDOUBLE, (const long double *)buf); -#endif - else - goto done; - } else if ( HDstrncmp(dtype,"C",1) == 0 ) { - - c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); - if (c_buf == NULL) - goto done; - - ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); - } + ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); + if (ret < 0) - goto done; + goto done; ret_value = 0; + done: if(c_name!=NULL) HDfree(c_name); - if(c_attrname!=NULL) + if(c_attrname!=NULL) HDfree(c_attrname); if(c_buf!=NULL) HDfree(c_buf); @@ -367,7 +1443,7 @@ done: } /*------------------------------------------------------------------------- -* Function: H5LTget_attribute_c +* Function: H5LTget_attribute_int_c * * Purpose: Call H5LTget_attribute_int * @@ -386,12 +1462,12 @@ done: */ int_f -h5ltget_attribute_c(hid_t_f *loc_id, +nh5ltget_attribute_int_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf, char *dtype, size_t_f *sizeof_val) + void *buf) { int ret_value = -1; herr_t ret; @@ -415,33 +1491,153 @@ h5ltget_attribute_c(hid_t_f *loc_id, */ c_loc_id = (hid_t)*loc_id; - if( HDstrncmp(dtype,"I",1) == 0) { - if((size_t)*sizeof_val == sizeof(int)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_INT,buf); - else if ((size_t)*sizeof_val == sizeof(long)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LONG,buf); - else if ((size_t)*sizeof_val == sizeof(long long)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LLONG,buf); - else - goto done; - } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - if((size_t)*sizeof_val == sizeof(float)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); - else if((size_t)*sizeof_val == sizeof(double)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); -#if H5_SIZEOF_LONG_DOUBLE !=0 - else if((size_t)*sizeof_val == sizeof(long double)) - ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LDOUBLE,buf); -#endif - else + if(sizeof(int_f) == sizeof(int)) + ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf); + else if (sizeof(int_f) == sizeof(long)) + ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf); + else if (sizeof(int_f) == sizeof(long long)) + ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf); + else goto done; - } - + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + if(c_attrname!=NULL) + HDfree(c_attrname); + + + return ret_value; +} + + +/*------------------------------------------------------------------------- +* Function: H5LTget_attribute_float_c +* +* Purpose: Call H5LTget_attribute_float +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: October 05, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + +int_f +nh5ltget_attribute_float_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + void *buf) +{ + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + char *c_name = NULL; + char *c_attrname = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); + if (c_name == NULL) + goto done; + + c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); + if (c_attrname == NULL) + goto done; + + /* + * call H5LTget_attribute_int function. + */ + c_loc_id = (hid_t)*loc_id; + + ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf); + + if (ret < 0) + goto done; + + ret_value = 0; + +done: + if(c_name!=NULL) + HDfree(c_name); + if(c_attrname!=NULL) + HDfree(c_attrname); + + return ret_value; +} + +/*------------------------------------------------------------------------- +* Function: H5LTget_attribute_double_c +* +* Purpose: Call H5LTget_attribute_double +* +* Return: Success: 0, Failure: -1 +* +* Programmer: pvn@ncsa.uiuc.edu +* +* Date: October 05, 2004 +* +* Comments: +* +* Modifications: +* +* +*------------------------------------------------------------------------- +*/ + +int_f +nh5ltget_attribute_double_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + void *buf) +{ + int ret_value = -1; + herr_t ret; + hid_t c_loc_id; + char *c_name = NULL; + char *c_attrname = NULL; + + /* + * convert FORTRAN name to C name + */ + c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); + if (c_name == NULL) + goto done; + + c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); + if (c_attrname == NULL) + goto done; + + /* + * call H5LTget_attribute_int function. + */ + c_loc_id = (hid_t)*loc_id; + + ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf); + if (ret < 0) goto done; ret_value = 0; + done: if(c_name!=NULL) HDfree(c_name); @@ -471,7 +1667,7 @@ done: */ int_f -h5ltget_attribute_string_c(hid_t_f *loc_id, +nh5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -546,7 +1742,7 @@ done: */ int_f -h5ltget_dataset_ndims_c(hid_t_f *loc_id, +nh5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank) @@ -606,7 +1802,7 @@ done: */ int_f -h5ltfind_dataset_c(hid_t_f *loc_id, +nh5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -654,7 +1850,7 @@ h5ltfind_dataset_c(hid_t_f *loc_id, */ int_f -h5ltget_dataset_info_c(hid_t_f *loc_id, +nh5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -733,7 +1929,7 @@ done: */ int_f -h5ltget_attribute_ndims_c(hid_t_f *loc_id, +nh5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -802,7 +1998,7 @@ done: */ int_f -h5ltget_attribute_info_c(hid_t_f *loc_id, +nh5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -891,7 +2087,7 @@ done: */ int_f -h5ltpath_valid_c(hid_t_f *loc_id, +nh5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 deleted file mode 100644 index ffc7ab5..0000000 --- a/hl/fortran/src/H5LTff.F90 +++ /dev/null @@ -1,1912 +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 file contains FORTRAN interfaces for H5LT functions -! -! NOTES -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new function here then you MUST add the function name to the -! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. -! This is needed for Windows based operating systems. -! - -#include - -MODULE H5LT_CONST - USE, INTRINSIC :: ISO_C_BINDING - USE h5fortran_types - USE hdf5 - - INTERFACE h5ltmake_dataset_f - MODULE PROCEDURE h5ltmake_dataset_f_int1 - MODULE PROCEDURE h5ltmake_dataset_f_int2 - MODULE PROCEDURE h5ltmake_dataset_f_int3 - MODULE PROCEDURE h5ltmake_dataset_f_int4 - MODULE PROCEDURE h5ltmake_dataset_f_int5 - MODULE PROCEDURE h5ltmake_dataset_f_int6 - MODULE PROCEDURE h5ltmake_dataset_f_int7 - MODULE PROCEDURE h5ltmake_dataset_f_ptr - END INTERFACE - - INTERFACE h5ltread_dataset_f - MODULE PROCEDURE h5ltread_dataset_f_int1 - MODULE PROCEDURE h5ltread_dataset_f_int2 - MODULE PROCEDURE h5ltread_dataset_f_int3 - MODULE PROCEDURE h5ltread_dataset_f_int4 - MODULE PROCEDURE h5ltread_dataset_f_int5 - MODULE PROCEDURE h5ltread_dataset_f_int6 - MODULE PROCEDURE h5ltread_dataset_f_int7 - MODULE PROCEDURE h5ltread_dataset_f_ptr - END INTERFACE - - INTERFACE h5ltmake_dataset_int_f - MODULE PROCEDURE h5ltmake_dataset_int_f_1 - MODULE PROCEDURE h5ltmake_dataset_int_f_2 - MODULE PROCEDURE h5ltmake_dataset_int_f_3 - MODULE PROCEDURE h5ltmake_dataset_int_f_4 - MODULE PROCEDURE h5ltmake_dataset_int_f_5 - MODULE PROCEDURE h5ltmake_dataset_int_f_6 - MODULE PROCEDURE h5ltmake_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_int_f - MODULE PROCEDURE h5ltread_dataset_int_f_1 - MODULE PROCEDURE h5ltread_dataset_int_f_2 - MODULE PROCEDURE h5ltread_dataset_int_f_3 - MODULE PROCEDURE h5ltread_dataset_int_f_4 - MODULE PROCEDURE h5ltread_dataset_int_f_5 - MODULE PROCEDURE h5ltread_dataset_int_f_6 - MODULE PROCEDURE h5ltread_dataset_int_f_7 - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & - BIND(C,NAME='h5ltmake_dataset_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - TYPE(C_PTR), VALUE :: buf ! data buffer - END FUNCTION h5ltmake_dataset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf) & - BIND(C,NAME='h5ltread_dataset_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - TYPE(C_PTR), VALUE :: buf ! data buffer - END FUNCTION h5ltread_dataset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype, SizeOf_buf) & - BIND(C,NAME='h5ltset_attribute_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - TYPE(C_PTR), VALUE :: buf ! data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the - ! the buffer: - ! R=Real, D=DOUBLE, I=Interger, C=Character - INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype - END FUNCTION h5ltset_attribute_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype, SizeOf_buf) & - BIND(C,NAME='h5ltget_attribute_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - TYPE(C_PTR), VALUE :: buf ! data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the - ! the buffer: - ! R=Real, D=DOUBLE, I=Interger - INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype - END FUNCTION h5ltget_attribute_c - END INTERFACE - -CONTAINS - !------------------------------------------------------------------------- - ! Make/Read dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_ptr - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: APR 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_ptr(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - TYPE(C_PTR) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_ptr - - !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_int(1-7) - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: Changed to passing C_PTR. - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int1 - - SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int2 - - SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int3 - - SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int4 - - SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int5 - - SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int6 - - SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - - END SUBROUTINE h5ltmake_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_ptr - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: Apr 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& - dset_name,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - TYPE(C_PTR) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) - - END SUBROUTINE h5ltread_dataset_f_ptr - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_int(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int2 - - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int3 - - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int4 - - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int6 - - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) - - END SUBROUTINE h5ltread_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_1 - - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_2 - - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_3 - - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_4 - - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_5 - - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_6 - - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltmake_dataset_int_f_7 - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_int_f_(1-7) - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_1 - - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_2 - - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_3 - - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_4 - - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_5 - - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_6 - - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) - - END SUBROUTINE h5ltread_dataset_int_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_string_f - ! - ! Purpose: Creates and writes a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: buflen ! buffer length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) & - BIND(C,NAME='h5ltmake_dataset_string_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - buflen = LEN(buf) - errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - - END SUBROUTINE h5ltmake_dataset_string_f - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_string_f - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) & - BIND(C,NAME='h5ltread_dataset_string_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer - END FUNCTION h5ltread_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - - END SUBROUTINE h5ltread_dataset_string_f - - !------------------------------------------------------------------------- - ! Make/Read attribute functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: May 4, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_f(loc_id,& - dset_name,& - attr_name,& - buf,& - buf_type, SizeOf_buf_type, & - size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - TYPE(C_PTR) :: buf ! data buffer - CHARACTER(LEN=*), INTENT(in) :: buf_type ! - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - CHARACTER(KIND=C_CHAR) :: buf_type_uppercase - INTEGER(size_t) :: SizeOf_buf_type - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - - buf_type_uppercase(1:1) = buf_type(1:1) - IF(buf_type_uppercase(1:1).EQ.'i')THEN - buf_type_uppercase(1:1) = 'I' - ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN - buf_type_uppercase(1:1) = 'R' - ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN - buf_type_uppercase(1:1) = 'C' - ENDIF - - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& - buf,buf_type_uppercase(1:1)//C_NULL_CHAR, SizeOf_buf_type) - - END SUBROUTINE h5ltset_attribute_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_int_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - INTEGER, DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf_type - - f_ptr = C_LOC(buf(1:1)) - -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf(1)) -#endif - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& - f_ptr,'I'//C_NULL_CHAR,SizeOf_buf_type) - - END SUBROUTINE h5ltset_attribute_int_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_float_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf_type - - f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf(1)) -#endif - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& - f_ptr,'R'//C_NULL_CHAR, SizeOf_buf_type) - - END SUBROUTINE h5ltset_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_double_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf_type - - f_ptr = C_LOC(buf(1)) - -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf(1)) -#endif - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& - f_ptr,'R'//C_NULL_CHAR,SizeOf_buf_type) - - END SUBROUTINE h5ltset_attribute_double_f - - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_string_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(LEN=*), DIMENSION(*), INTENT(in), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buflen ! data buffer length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf_type - - f_ptr = C_LOC(buf(1)(1:1)) - -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) -#endif - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buflen = LEN(buf) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,& - f_ptr,'C'//C_NULL_CHAR, SizeOf_buf_type) - - END SUBROUTINE h5ltset_attribute_string_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: Apr 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_f(loc_id,& - dset_name,& - attr_name,& - buf, buf_type, SizeOf_buf_type, & - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(out) :: errcode ! error code - CHARACTER(LEN=*), INTENT(in) :: buf_type - TYPE(C_PTR) :: buf! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - CHARACTER(KIND=C_CHAR) :: buf_type_uppercase - INTEGER(size_t) :: SizeOf_buf_type - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - - buf_type_uppercase(1:1) = buf_type(1:1) - IF(buf_type_uppercase(1:1).EQ.'i')THEN - buf_type_uppercase(1:1) = 'I' - ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN - buf_type_uppercase(1:1) = 'R' - ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN - buf_type_uppercase(1:1) = 'C' - ENDIF - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name, & - buf, buf_type_uppercase//C_NULL_CHAR, SizeOf_buf_type) - - - END SUBROUTINE h5ltget_attribute_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_int_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf - - f_ptr = C_LOC(buf(1)) - -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf = SIZEOF(buf(1)) -#endif - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf_buf) - - END SUBROUTINE h5ltget_attribute_int_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_float_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf - - f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf = SIZEOF(buf(1)) -#endif - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) - - END SUBROUTINE h5ltget_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_c_double_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*), TARGET :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - TYPE(C_PTR) :: f_ptr - INTEGER(size_t) :: SizeOf_buf - - f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 - SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf = SIZEOF(buf(1)) -#endif - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) - - END SUBROUTINE h5ltget_attribute_double_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_string_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(LEN=*), INTENT(inout) :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buf_size ! buf size - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) & - BIND(C,NAME='h5ltget_attribute_string_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: buf_size ! data buffer size - END FUNCTION h5ltget_attribute_string_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buf_size = LEN(buf) - - errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - - END SUBROUTINE h5ltget_attribute_string_f - - !------------------------------------------------------------------------- - ! Query dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_ndims_f - ! - ! Purpose: Gets the dimensionality of a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& - dset_name,& - rank,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) & - BIND(C,NAME='h5ltget_dataset_ndims_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_dataset_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - - END SUBROUTINE h5ltget_dataset_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltfind_dataset_f - ! - ! Purpose: Inquires if a dataset named dset_name exists attached - ! to the object loc_id. - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& - dset_name) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) & - BIND(C,NAME='h5ltfind_dataset_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - END FUNCTION h5ltfind_dataset_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) - h5ltfind_dataset_f = errcode - - END FUNCTION h5ltfind_dataset_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_info_f - ! - ! Purpose: Gets information about a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_info_f(loc_id,& - dset_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) & - BIND(C,NAME='h5ltget_dataset_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_dataset_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_dataset_info_f - - - !------------------------------------------------------------------------- - ! Query attribute functions - !------------------------------------------------------------------------- - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_ndims_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& - dset_name,& - attr_name,& - rank,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) & - BIND(C,NAME='h5ltget_attribute_ndims_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_attribute_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - - END SUBROUTINE h5ltget_attribute_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_info_f - ! - ! Purpose: Gets information about an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_info_f(loc_id,& - dset_name,& - attr_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) & - BIND(C,NAME='h5ltget_attribute_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_attribute_info_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_attribute_info_f - - !------------------------------------------------------------------------- - ! Function: h5ltpath_valid_f - ! - ! Purpose: Validates a path - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: February 18, 2012 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) - - IMPLICIT NONE - INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. - CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. - LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component - ! of the path resolves to a valid object - LOGICAL , INTENT(OUT) :: path_valid ! Object status - INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure - - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - INTEGER :: status - - INTERFACE - INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) & - BIND(C,NAME='h5ltpath_valid_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: path - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - END FUNCTION h5ltpath_valid_c - END INTERFACE - - ! Initialize - path_valid = .FALSE. - errcode = 0 - - check_object_valid_c = 0 - IF(check_object_valid) check_object_valid_c = 1 - - pathlen = LEN(path) - status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - - IF(status.EQ.1)THEN - path_valid = .TRUE. - ELSE IF(status.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE h5ltpath_valid_f - -END MODULE H5LT_CONST - - - - - - diff --git a/hl/fortran/src/H5LTff.f90 b/hl/fortran/src/H5LTff.f90 new file mode 100644 index 0000000..9393f7f --- /dev/null +++ b/hl/fortran/src/H5LTff.f90 @@ -0,0 +1,6490 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5LT functions +! + +MODULE h5lt + USE h5fortran_types + USE hdf5 + + INTERFACE h5ltmake_dataset_f + MODULE PROCEDURE h5ltmake_dataset_f_int1 + MODULE PROCEDURE h5ltmake_dataset_f_int2 + MODULE PROCEDURE h5ltmake_dataset_f_int3 + MODULE PROCEDURE h5ltmake_dataset_f_int4 + MODULE PROCEDURE h5ltmake_dataset_f_int5 + MODULE PROCEDURE h5ltmake_dataset_f_int6 + MODULE PROCEDURE h5ltmake_dataset_f_int7 + MODULE PROCEDURE h5ltmake_dataset_f_float1 + MODULE PROCEDURE h5ltmake_dataset_f_float2 + MODULE PROCEDURE h5ltmake_dataset_f_float3 + MODULE PROCEDURE h5ltmake_dataset_f_float4 + MODULE PROCEDURE h5ltmake_dataset_f_float5 + MODULE PROCEDURE h5ltmake_dataset_f_float6 + MODULE PROCEDURE h5ltmake_dataset_f_float7 + MODULE PROCEDURE h5ltmake_dataset_f_double1 + MODULE PROCEDURE h5ltmake_dataset_f_double2 + MODULE PROCEDURE h5ltmake_dataset_f_double3 + MODULE PROCEDURE h5ltmake_dataset_f_double4 + MODULE PROCEDURE h5ltmake_dataset_f_double5 + MODULE PROCEDURE h5ltmake_dataset_f_double6 + MODULE PROCEDURE h5ltmake_dataset_f_double7 + END INTERFACE + + INTERFACE h5ltread_dataset_f + MODULE PROCEDURE h5ltread_dataset_f_int1 + MODULE PROCEDURE h5ltread_dataset_f_int2 + MODULE PROCEDURE h5ltread_dataset_f_int3 + MODULE PROCEDURE h5ltread_dataset_f_int4 + MODULE PROCEDURE h5ltread_dataset_f_int5 + MODULE PROCEDURE h5ltread_dataset_f_int6 + MODULE PROCEDURE h5ltread_dataset_f_int7 + MODULE PROCEDURE h5ltread_dataset_f_float1 + MODULE PROCEDURE h5ltread_dataset_f_float2 + MODULE PROCEDURE h5ltread_dataset_f_float3 + MODULE PROCEDURE h5ltread_dataset_f_float4 + MODULE PROCEDURE h5ltread_dataset_f_float5 + MODULE PROCEDURE h5ltread_dataset_f_float6 + MODULE PROCEDURE h5ltread_dataset_f_float7 + MODULE PROCEDURE h5ltread_dataset_f_double1 + MODULE PROCEDURE h5ltread_dataset_f_double2 + MODULE PROCEDURE h5ltread_dataset_f_double3 + MODULE PROCEDURE h5ltread_dataset_f_double4 + MODULE PROCEDURE h5ltread_dataset_f_double5 + MODULE PROCEDURE h5ltread_dataset_f_double6 + MODULE PROCEDURE h5ltread_dataset_f_double7 + END INTERFACE + + INTERFACE h5ltmake_dataset_int_f + MODULE PROCEDURE h5ltmake_dataset_int_f_1 + MODULE PROCEDURE h5ltmake_dataset_int_f_2 + MODULE PROCEDURE h5ltmake_dataset_int_f_3 + MODULE PROCEDURE h5ltmake_dataset_int_f_4 + MODULE PROCEDURE h5ltmake_dataset_int_f_5 + MODULE PROCEDURE h5ltmake_dataset_int_f_6 + MODULE PROCEDURE h5ltmake_dataset_int_f_7 + END INTERFACE + + INTERFACE h5ltmake_dataset_float_f + MODULE PROCEDURE h5ltmake_dataset_float_f_1 + MODULE PROCEDURE h5ltmake_dataset_float_f_2 + MODULE PROCEDURE h5ltmake_dataset_float_f_3 + MODULE PROCEDURE h5ltmake_dataset_float_f_4 + MODULE PROCEDURE h5ltmake_dataset_float_f_5 + MODULE PROCEDURE h5ltmake_dataset_float_f_6 + MODULE PROCEDURE h5ltmake_dataset_float_f_7 + END INTERFACE + + INTERFACE h5ltmake_dataset_double_f + MODULE PROCEDURE h5ltmake_dataset_double_f_1 + MODULE PROCEDURE h5ltmake_dataset_double_f_2 + MODULE PROCEDURE h5ltmake_dataset_double_f_3 + MODULE PROCEDURE h5ltmake_dataset_double_f_4 + MODULE PROCEDURE h5ltmake_dataset_double_f_5 + MODULE PROCEDURE h5ltmake_dataset_double_f_6 + MODULE PROCEDURE h5ltmake_dataset_double_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_int_f + MODULE PROCEDURE h5ltread_dataset_int_f_1 + MODULE PROCEDURE h5ltread_dataset_int_f_2 + MODULE PROCEDURE h5ltread_dataset_int_f_3 + MODULE PROCEDURE h5ltread_dataset_int_f_4 + MODULE PROCEDURE h5ltread_dataset_int_f_5 + MODULE PROCEDURE h5ltread_dataset_int_f_6 + MODULE PROCEDURE h5ltread_dataset_int_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_float_f + MODULE PROCEDURE h5ltread_dataset_float_f_1 + MODULE PROCEDURE h5ltread_dataset_float_f_2 + MODULE PROCEDURE h5ltread_dataset_float_f_3 + MODULE PROCEDURE h5ltread_dataset_float_f_4 + MODULE PROCEDURE h5ltread_dataset_float_f_5 + MODULE PROCEDURE h5ltread_dataset_float_f_6 + MODULE PROCEDURE h5ltread_dataset_float_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_double_f + MODULE PROCEDURE h5ltread_dataset_double_f_1 + MODULE PROCEDURE h5ltread_dataset_double_f_2 + MODULE PROCEDURE h5ltread_dataset_double_f_3 + MODULE PROCEDURE h5ltread_dataset_double_f_4 + MODULE PROCEDURE h5ltread_dataset_double_f_5 + MODULE PROCEDURE h5ltread_dataset_double_f_6 + MODULE PROCEDURE h5ltread_dataset_double_f_7 + END INTERFACE + +CONTAINS + !------------------------------------------------------------------------- + ! Make/Read dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT1_C'::h5ltmake_dataset_int1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT2_C'::h5ltmake_dataset_int2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT3_C'::h5ltmake_dataset_int3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT4_C'::h5ltmake_dataset_int4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT5_C'::h5ltmake_dataset_int5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT6_C'::h5ltmake_dataset_int6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_int7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_int7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT7_C'::h5ltmake_dataset_int7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_int7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL1_C'::h5ltmake_dataset_fl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL2_C'::h5ltmake_dataset_fl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float4(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL4_C'::h5ltmake_dataset_fl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float5(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL5_C'::h5ltmake_dataset_fl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float6(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL6_C'::h5ltmake_dataset_fl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_float7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_float7(loc_id, dset_name, rank, dims,& + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_float7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL7_C'::h5ltmake_dataset_fl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_fl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_float7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double1 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double2 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL2_C'::h5ltmake_dataset_dl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double3 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL3_C'::h5ltmake_dataset_dl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double4 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL4_C'::h5ltmake_dataset_dl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double5 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL5_C'::h5ltmake_dataset_dl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double6 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL6_C'::h5ltmake_dataset_dl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_f_double7 + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 7, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_double7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_f_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL7_C'::h5ltmake_dataset_dl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT1_C'::h5ltread_dataset_int1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf + INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT2_C'::h5ltread_dataset_int2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT3_C'::h5ltread_dataset_int3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT4_C'::h5ltread_dataset_int4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT5_C'::h5ltread_dataset_int5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT6_C'::h5ltread_dataset_int6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_int7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT7_C'::h5ltread_dataset_int7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_int7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL1_C'::h5ltread_dataset_fl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float2 + !DEC$endif + ! + + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL2_C'::h5ltread_dataset_fl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL3_C'::h5ltread_dataset_fl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL4_C'::h5ltread_dataset_fl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL5_C'::h5ltread_dataset_fl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL6_C'::h5ltread_dataset_fl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_float7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_float7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_float7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL7_C'::h5ltread_dataset_fl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_fl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_float7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double1 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport ::h5ltread_dataset_f_double1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL1_C'::h5ltread_dataset_dl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL2_C'::h5ltread_dataset_dl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double3 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL3_C'::h5ltread_dataset_dl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double4 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL4_C'::h5ltread_dataset_dl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double5 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL5_C'::h5ltread_dataset_dl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL6_C'::h5ltread_dataset_dl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_double7 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_double7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_f_double7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL7_C'::h5ltread_dataset_dl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_dl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + + END SUBROUTINE h5ltread_dataset_f_double7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT1_C'::h5ltmake_dataset_nint1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT2_C'::h5ltmake_dataset_nint2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_2 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT3_C'::h5ltmake_dataset_nint3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT4_C'::h5ltmake_dataset_nint4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT5_C'::h5ltmake_dataset_nint5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT6_C'::h5ltmake_dataset_nint6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT7_C'::h5ltmake_dataset_nint7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nint7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) + + END SUBROUTINE h5ltmake_dataset_int_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_1 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL2_C'::h5ltmake_dataset_nfl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL3_C'::h5ltmake_dataset_nfl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_4 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL4_C'::h5ltmake_dataset_nfl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_5 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL5_C'::h5ltmake_dataset_nfl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_6 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL6_C'::h5ltmake_dataset_nfl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_float_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_float_f_7 (loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_float_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL7_C'::h5ltmake_dataset_nfl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_nfl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) + + END SUBROUTINE h5ltmake_dataset_float_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL1_C'::h5ltmake_dataset_ndl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_2 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL2_C'::h5ltmake_dataset_ndl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_3 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL3_C'::h5ltmake_dataset_ndl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_4 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_4 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL4_C'::h5ltmake_dataset_ndl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_5 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_5 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL5_C'::h5ltmake_dataset_ndl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_6 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_6 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL6_C'::h5ltmake_dataset_ndl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_double_f_7 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_double_f_7 (loc_id, dset_name, rank, dims,& + buf, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL7_C'::h5ltmake_dataset_ndl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_ndl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) + + END SUBROUTINE h5ltmake_dataset_double_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 + !DEC$endif + ! + + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT1_C'::h5ltread_dataset_nint1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT2_C'::h5ltread_dataset_nint2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT3_C'::h5ltread_dataset_nint3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT4_C'::h5ltread_dataset_nint4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT5_C'::h5ltread_dataset_nint5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT6_C'::h5ltread_dataset_nint6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_int_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT7_C'::h5ltread_dataset_nint7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nint7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) + + END SUBROUTINE h5ltread_dataset_int_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL1_C'::h5ltread_dataset_nfl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL2_C'::h5ltread_dataset_nfl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL3_C'::h5ltread_dataset_nfl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL4_C'::h5ltread_dataset_nfl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL5_C'::h5ltread_dataset_nfl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL6_C'::h5ltread_dataset_nfl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_float_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_float_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_float_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL7_C'::h5ltread_dataset_nfl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + REAL, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_nfl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) + + END SUBROUTINE h5ltread_dataset_float_f_7 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_1 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_1 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL1_C'::h5ltread_dataset_ndl1_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl1_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_1 + + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_2 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_2 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL2_C'::h5ltread_dataset_ndl2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl2_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_2 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_3 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_3 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL3_C'::h5ltread_dataset_ndl3_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl3_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_3 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_4 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_4 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL4_C'::h5ltread_dataset_ndl4_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl4_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_4 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_5 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_5 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL5_C'::h5ltread_dataset_ndl5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl5_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_6 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_6 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL6_C'::h5ltread_dataset_ndl6_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl6_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_6 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_double_f_7 + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 8, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_double_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_double_f_7 + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL7_C'::h5ltread_dataset_ndl7_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + DOUBLE PRECISION, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer + END FUNCTION h5ltread_dataset_ndl7_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) + + END SUBROUTINE h5ltread_dataset_double_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_string_f + ! + ! Purpose: Creates and writes a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltmake_dataset_string_f + !DEC$endif + ! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: buflen ! buffer length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_STRING_C'::h5ltmake_dataset_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: buflen ! length of data buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + buflen = LEN(buf) + errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) + + END SUBROUTINE h5ltmake_dataset_string_f + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_string_f + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltread_dataset_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_STRING_C'::h5ltread_dataset_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + END FUNCTION h5ltread_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) + + END SUBROUTINE h5ltread_dataset_string_f + + + + + !------------------------------------------------------------------------- + ! Make/Read attribute functions + !------------------------------------------------------------------------- + + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_int_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_int_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_INT_C'::h5ltset_attribute_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_int_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_int_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_float_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_float_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_FLOAT_C'::h5ltset_attribute_float_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_float_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_double_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_double_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_DOUBLE_C'::h5ltset_attribute_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltset_attribute_double_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) + + END SUBROUTINE h5ltset_attribute_double_f + + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_string_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltset_attribute_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buflen ! data buffer length + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_STRING_C'::h5ltset_attribute_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + INTEGER(size_t) :: buflen ! data buffer length + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(len=*), INTENT(in) :: buf ! data buffer + END FUNCTION h5ltset_attribute_string_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buflen = LEN(buf) + errcode = h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) + + END SUBROUTINE h5ltset_attribute_string_f + + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_int_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_int_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INT_C'::h5ltget_attribute_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_int_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_int_f + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_float_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_float_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_FLOAT_C'::h5ltget_attribute_float_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_float_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_double_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_double_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + DOUBLE PRECISION,INTENT(inout),DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_DOUBLE_C'::h5ltget_attribute_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer + END FUNCTION h5ltget_attribute_double_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) + + END SUBROUTINE h5ltget_attribute_double_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_string_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_string_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buf_size ! buf size + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_STRING_C'::h5ltget_attribute_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(len=*), INTENT(inout) :: buf ! data buffer + INTEGER(size_t) :: buf_size ! data buffer size + END FUNCTION h5ltget_attribute_string_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buf_size = LEN(buf) + + errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + + END SUBROUTINE h5ltget_attribute_string_f + + !------------------------------------------------------------------------- + ! Query dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_ndims_f + ! + ! Purpose: Gets the dimensionality of a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& + dset_name,& + rank,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_dataset_ndims_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_NDIMS_C'::h5ltget_dataset_ndims_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_dataset_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) + + END SUBROUTINE h5ltget_dataset_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltfind_dataset_f + ! + ! Purpose: Inquires if a dataset named dset_name exists attached + ! to the object loc_id. + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& + dset_name) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltfind_dataset_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTFIND_DATASET_C'::h5ltfind_dataset_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5ltfind_dataset_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) + h5ltfind_dataset_f = errcode + + END FUNCTION h5ltfind_dataset_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_info_f + ! + ! Purpose: Gets information about a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_info_f(loc_id,& + dset_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_dataset_info_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_INFO_C'::h5ltget_dataset_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_dataset_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_dataset_info_f + + + !------------------------------------------------------------------------- + ! Query attribute functions + !------------------------------------------------------------------------- + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_ndims_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& + dset_name,& + attr_name,& + rank,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_ndims_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_NDIMS_C'::h5ltget_attribute_ndims_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_attribute_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + + END SUBROUTINE h5ltget_attribute_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_info_f + ! + ! Purpose: Gets information about an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_info_f(loc_id,& + dset_name,& + attr_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltget_attribute_info_f + !DEC$endif + ! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INFO_C'::h5ltget_attribute_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_attribute_info_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_attribute_info_f + + !------------------------------------------------------------------------- + ! Function: h5ltpath_valid_f + ! + ! Purpose: Validates a path + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: February 18, 2012 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) + + IMPLICIT NONE + ! + !This definition is needed for Windows DLLs + !DEC$if defined(BUILD_HDF5_HL_DLL) + !DEC$attributes dllexport :: h5ltpath_valid_f + !DEC$endif + ! + INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. + CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. + LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component + ! of the path resolves to a valid object + LOGICAL , INTENT(OUT) :: path_valid ! Object status + INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure + + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + INTEGER :: status + + INTERFACE + INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTPATH_VALID_C'::h5ltpath_valid_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: path + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: path + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + END FUNCTION h5ltpath_valid_c + END INTERFACE + + ! Initialize + path_valid = .FALSE. + errcode = 0 + + check_object_valid_c = 0 + IF(check_object_valid) check_object_valid_c = 1 + + pathlen = LEN(path) + status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) + + IF(status.EQ.1)THEN + path_valid = .TRUE. + ELSE IF(status.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE h5ltpath_valid_f + ! end + ! +END MODULE H5LT + + + + + + diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 99a7800..bf058fd 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -37,7 +37,7 @@ *------------------------------------------------------------------------- */ int_f -h5tbmake_table_c(size_t_f *namelen1, +nh5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -133,7 +133,7 @@ done: HDfree(c_field_types); return ret_value; -} /* end h5tbmake_table_c() */ +} /* end nh5tbmake_table_c() */ /*------------------------------------------------------------------------- * Function: h5tbwrite_field_name_c @@ -151,7 +151,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbwrite_field_name_c(hid_t_f *loc_id, +nh5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -190,6 +190,65 @@ done: return ret_value; } +int_f +nh5tbwrite_field_name_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_name_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} /*------------------------------------------------------------------------- * Function: h5tbread_field_name_c @@ -207,7 +266,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbread_field_name_c(hid_t_f *loc_id, +nh5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -246,6 +305,66 @@ done: return ret_value; } +int_f +nh5tbread_field_name_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbread_field_name_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbread_field_name_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + +int_f +nh5tbread_field_name_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, + start, nrecords, type_size, buf); +} + /*------------------------------------------------------------------------- * Function: h5tbwrite_field_index_c * @@ -262,7 +381,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbwrite_field_index_c(hid_t_f *loc_id, +nh5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -297,6 +416,62 @@ done: return ret_value; } +int_f +nh5tbwrite_field_index_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbwrite_field_index_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + /*------------------------------------------------------------------------- * Function: h5tbread_field_index_c * @@ -313,7 +488,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbread_field_index_c(hid_t_f *loc_id, +nh5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -347,6 +522,62 @@ done: return ret_value; } +int_f +nh5tbread_field_index_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbread_field_index_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbread_field_index_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + +int_f +nh5tbread_field_index_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *field_index, + hsize_t_f *start, + hsize_t_f *nrecords, + size_t_f *type_size, + void *buf) +{ + return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, + nrecords, type_size, buf); +} + /*------------------------------------------------------------------------- * Function: h5tbinsert_field_c * @@ -363,7 +594,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbinsert_field_c(hid_t_f *loc_id, +nh5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -400,6 +631,62 @@ done: return ret_value; } +int_f +nh5tbinsert_field_int_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf) +{ + return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + field_type, position, buf); +} + +int_f +nh5tbinsert_field_fl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf) +{ + return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + field_type, position, buf); +} + +int_f +nh5tbinsert_field_dl_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf) +{ + return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + field_type, position, buf); +} + +int_f +nh5tbinsert_field_st_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *namelen1, + _fcd field_name, + hid_t_f *field_type, + int_f *position, + void *buf) +{ + return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, + field_type, position, buf); +} + /*------------------------------------------------------------------------- * Function: h5tbdelete_field_c * @@ -416,7 +703,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbdelete_field_c(hid_t_f *loc_id, +nh5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -465,7 +752,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbget_table_info_c(hid_t_f *loc_id, +nh5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -515,7 +802,7 @@ done: *------------------------------------------------------------------------- */ int_f -h5tbget_field_info_c(hid_t_f *loc_id, +nh5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 deleted file mode 100644 index 448d607..0000000 --- a/hl/fortran/src/H5TBff.F90 +++ /dev/null @@ -1,848 +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 file contains FORTRAN interfaces for H5TB functions -! -! -! NOTES -! -! _____ __ __ _____ ____ _____ _______ _ _ _______ -! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| -! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** -! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** -! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** -! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! -! If you add a new function here then you MUST add the function name to the -! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. -! This is needed for Windows based operating systems. -! -#include "H5config_f.inc" - -MODULE h5tb_CONST - - USE, INTRINSIC :: ISO_C_BINDING - USE h5fortran_types - USE hdf5 - - INTERFACE h5tbwrite_field_name_f - MODULE PROCEDURE h5tbwrite_field_name_f_int - MODULE PROCEDURE h5tbwrite_field_name_f_string - END INTERFACE - - INTERFACE h5tbread_field_name_f - MODULE PROCEDURE h5tbread_field_name_f_int - MODULE PROCEDURE h5tbread_field_name_f_string - END INTERFACE - - INTERFACE h5tbwrite_field_index_f - MODULE PROCEDURE h5tbwrite_field_index_f_int - MODULE PROCEDURE h5tbwrite_field_index_f_string - END INTERFACE - - INTERFACE h5tbread_field_index_f - MODULE PROCEDURE h5tbread_field_index_f_int - MODULE PROCEDURE h5tbread_field_index_f_string - END INTERFACE - - INTERFACE h5tbinsert_field_f - MODULE PROCEDURE h5tbinsert_field_f_int - MODULE PROCEDURE h5tbinsert_field_f_string - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_name_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - TYPE(C_PTR), VALUE :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name, & - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_name_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - TYPE(C_PTR), VALUE :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbwrite_field_index_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - TYPE(C_PTR), VALUE :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) & - BIND(C,NAME='h5tbread_field_index_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - TYPE(C_PTR), VALUE :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_c - END INTERFACE - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) & - BIND(C,NAME='h5tbinsert_field_c') - IMPORT :: C_CHAR, C_PTR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - TYPE(C_PTR), VALUE :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_c - END INTERFACE - -CONTAINS - -!------------------------------------------------------------------------- -! Function: h5tbmake_table_f -! -! Purpose: Make a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbmake_table_f(table_title,& - loc_id,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - INTEGER(hsize_t) :: i ! general purpose integer - - INTERFACE - INTEGER FUNCTION h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names,& - max_char_size_field_names,& - field_names) & - BIND(C,NAME='h5tbmake_table_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - END FUNCTION h5tbmake_table_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(table_title) - - ! Find the size of each character string in the array - DO i = 1, nfields - char_len_field_names(i) = LEN_TRIM(field_names(i)) - END DO - - max_char_size_field_names = LEN(field_names(1)) - - errcode = h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names, & - max_char_size_field_names, & - field_names) - - END SUBROUTINE h5tbmake_table_f - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_name_f_int - - - SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) ! name length - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_name_f_int - - SUBROUTINE h5tbread_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_index_f_int - - SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbwrite_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_index_f_int - - SUBROUTINE h5tbread_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,f_ptr) - - END SUBROUTINE h5tbread_field_index_f_string - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbinsert_field_f_int(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) - - END SUBROUTINE h5tbinsert_field_f_int - - SUBROUTINE h5tbinsert_field_f_string(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) - - END SUBROUTINE h5tbinsert_field_f_string - -!------------------------------------------------------------------------- -! Function: h5tbdelete_field_f -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbdelete_field_f(loc_id,& - dset_name,& - field_name,& - errcode ) - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) & - BIND(C,NAME='h5tbdelete_field_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbdelete_field_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - - END SUBROUTINE h5tbdelete_field_f - -!------------------------------------------------------------------------- -! Function: h5tbget_table_info_f -! -! Purpose: Gets the number of records and fields of a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbget_table_info_f(loc_id,& - dset_name,& - nfields,& - nrecords,& - errcode ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) & - BIND(C,NAME='h5tbget_table_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbget_table_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - - END SUBROUTINE h5tbget_table_info_f - - -!------------------------------------------------------------------------- -! Function: h5tbget_field_info_f -! -! Purpose: Get information about fields -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! Added optional parameter for returning the maximum character length -! in the field name array. March 3, 2011 -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbget_field_info_f(loc_id,& - dset_name,& - nfields,& - field_names,& - field_sizes,& - field_offsets,& - type_size,& - errcode, maxlen_out ) - - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER :: errcode ! error code - INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer - INTEGER(size_t) :: maxlen - INTEGER(size_t) :: c_maxlen_out - - INTERFACE - INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& - field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) & - BIND(C,NAME='h5tbget_field_info_c') - IMPORT :: C_CHAR - IMPORT :: HID_T, SIZE_T, HSIZE_T - IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in):: nfields ! nfields - CHARACTER(KIND=C_CHAR), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: maxlen ! maxiumum length of input field names - INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths - INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element - END FUNCTION h5tbget_field_info_c - END INTERFACE - - namelen = LEN(dset_name) - DO i = 1, nfields - namelen2(i) = LEN_TRIM(field_names(i)) - END DO - maxlen = LEN(field_names(1)) - c_maxlen_out = 0 - - errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & - field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) - - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - - END SUBROUTINE h5tbget_field_info_f - -END MODULE H5TB_CONST - - - - - - diff --git a/hl/fortran/src/H5TBff.f90 b/hl/fortran/src/H5TBff.f90 new file mode 100644 index 0000000..5846f49 --- /dev/null +++ b/hl/fortran/src/H5TBff.f90 @@ -0,0 +1,1900 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5TB functions +! + +MODULE h5tb +USE h5fortran_types +USE hdf5 + + +INTERFACE h5tbwrite_field_name_f + MODULE PROCEDURE h5tbwrite_field_name_f_int + MODULE PROCEDURE h5tbwrite_field_name_f_float + MODULE PROCEDURE h5tbwrite_field_name_f_double + MODULE PROCEDURE h5tbwrite_field_name_f_string +END INTERFACE + +INTERFACE h5tbread_field_name_f + MODULE PROCEDURE h5tbread_field_name_f_int + MODULE PROCEDURE h5tbread_field_name_f_float + MODULE PROCEDURE h5tbread_field_name_f_double + MODULE PROCEDURE h5tbread_field_name_f_string +END INTERFACE + +INTERFACE h5tbwrite_field_index_f + MODULE PROCEDURE h5tbwrite_field_index_f_int + MODULE PROCEDURE h5tbwrite_field_index_f_float + MODULE PROCEDURE h5tbwrite_field_index_f_double + MODULE PROCEDURE h5tbwrite_field_index_f_string +END INTERFACE + +INTERFACE h5tbread_field_index_f + MODULE PROCEDURE h5tbread_field_index_f_int + MODULE PROCEDURE h5tbread_field_index_f_float + MODULE PROCEDURE h5tbread_field_index_f_double + MODULE PROCEDURE h5tbread_field_index_f_string +END INTERFACE + + +INTERFACE h5tbinsert_field_f + MODULE PROCEDURE h5tbinsert_field_f_int + MODULE PROCEDURE h5tbinsert_field_f_float + MODULE PROCEDURE h5tbinsert_field_f_double + MODULE PROCEDURE h5tbinsert_field_f_string +END INTERFACE + + +CONTAINS + + +!------------------------------------------------------------------------- +! Function: h5tbmake_table_f +! +! Purpose: Make a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbmake_table_f(table_title,& + loc_id,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + IMPLICIT NONE +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbmake_table_f +!DEC$endif +! + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + INTEGER(hsize_t) :: i ! general purpose integer + + + INTERFACE + INTEGER FUNCTION h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names,& + max_char_size_field_names,& + field_names) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBMAKE_TABLE_C'::h5tbmake_table_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: table_title + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + END FUNCTION h5tbmake_table_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(table_title) + + ! Find the size of each character string in the array + DO i = 1, nfields + char_len_field_names(i) = LEN_TRIM(field_names(i)) + END DO + + max_char_size_field_names = LEN(field_names(1)) + + errcode = h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names, & + max_char_size_field_names, & + field_names) + +END SUBROUTINE h5tbmake_table_f + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_INT_C'::h5tbwrite_field_name_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_int + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_float +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_FL_C'::h5tbwrite_field_name_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_double +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_DL_C'::h5tbwrite_field_name_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_double + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_string +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_name_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_ST_C'::h5tbwrite_field_name_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_INT_C'::h5tbread_field_name_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_int + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_float +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_float(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_FL_C'::h5tbread_field_name_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_float + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_double +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_double(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_DL_C'::h5tbread_field_name_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_double + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_string +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_name_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_ST_C'::h5tbread_field_name_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_INT_C'::h5tbwrite_field_index_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_int + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_float +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_FL_C'::h5tbwrite_field_index_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_double +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_DL_C'::h5tbwrite_field_index_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_double + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_string +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbwrite_field_index_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_ST_C'::h5tbwrite_field_index_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbwrite_field_index_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport ::h5tbread_field_index_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_INT_C'::h5tbread_field_index_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_int_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_int + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_float +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_float(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_FL_C'::h5tbread_field_index_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_fl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_float + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_double +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_double(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_DL_C'::h5tbread_field_index_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_dl_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_double + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_string +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbread_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbread_field_index_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_ST_C'::h5tbread_field_index_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_st_c + END INTERFACE + + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) + +END SUBROUTINE h5tbread_field_index_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_int +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_int(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_int +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_INT_C'::h5tbinsert_field_int_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_int_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_int + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_float +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_float(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_float +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_FL_C'::h5tbinsert_field_fl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_fl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_float + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_double +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_double(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_double +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_DL_C'::h5tbinsert_field_dl_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_dl_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_double + + + + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f_string +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbinsert_field_f_string(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbinsert_field_f_string +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_ST_C'::h5tbinsert_field_st_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_st_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) + +END SUBROUTINE h5tbinsert_field_f_string + + + + +!------------------------------------------------------------------------- +! Function: h5tbdelete_field_f +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbdelete_field_f(loc_id,& + dset_name,& + field_name,& + errcode ) + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbdelete_field_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBDELETE_FIELD_C'::h5tbdelete_field_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + !DEC$ATTRIBUTES reference :: field_name + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbdelete_field_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + +END SUBROUTINE h5tbdelete_field_f + + + +!------------------------------------------------------------------------- +! Function: h5tbget_table_info_f +! +! Purpose: Gets the number of records and fields of a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbget_table_info_f(loc_id,& + dset_name,& + nfields,& + nrecords,& + errcode ) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbget_table_info_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_TABLE_INFO_C'::h5tbget_table_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbget_table_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + +END SUBROUTINE h5tbget_table_info_f + + +!------------------------------------------------------------------------- +! Function: h5tbget_field_info_f +! +! Purpose: Get information about fields +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! Added optional parameter for returning the maximum character length +! in the field name array. March 3, 2011 +! +!------------------------------------------------------------------------- + +SUBROUTINE h5tbget_field_info_f(loc_id,& + dset_name,& + nfields,& + field_names,& + field_sizes,& + field_offsets,& + type_size,& + errcode, maxlen_out ) + + IMPLICIT NONE +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5tbget_field_info_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER :: errcode ! error code + INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths + INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(size_t) :: maxlen + INTEGER(size_t) :: c_maxlen_out + + INTERFACE + INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& + field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) + + USE h5global + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_FIELD_INFO_C'::h5tbget_field_info_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: dset_name + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in):: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: maxlen ! maxiumum length of input field names + INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths + INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element + END FUNCTION h5tbget_field_info_c + END INTERFACE + + namelen = LEN(dset_name) + DO i = 1, nfields + namelen2(i) = LEN_TRIM(field_names(i)) + END DO + maxlen = LEN(field_names(1)) + c_maxlen_out = 0 + + errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & + field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) + + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + +END SUBROUTINE h5tbget_field_info_f + +END MODULE H5TB + + + + + + diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 6457f81..c8c4541 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -42,12 +42,12 @@ endif # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 +libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) @@ -60,7 +60,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ + $(RM) *.$(F9XMODEXT); \ fi install-data-local: @@ -75,31 +75,13 @@ uninstall-local: fi; \ fi -# These are the helper programs we need to build. -noinst_PROGRAMS = H5HL_buildiface - -# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. - -H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) - -H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) - -#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) - -# H5HL_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. - -H5HL_buildiface_SOURCES = H5HL_buildiface.F90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.F90 -H5LTff.lo: $(srcdir)/H5LTff.F90 -H5IMff.lo: $(srcdir)/H5IMff.F90 -H5TBff.lo: $(srcdir)/H5TBff.F90 -H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 -H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 +H5DSff.lo: $(srcdir)/H5DSff.f90 +H5LTff.lo: $(srcdir)/H5LTff.f90 +H5IMff.lo: $(srcdir)/H5IMff.f90 +H5TBff.lo: $(srcdir)/H5TBff.f90 + include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 956eda8..029e5a1 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -31,7 +31,6 @@ # # HDF5 High-Level Fortran Makefile(.in) - VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -106,7 +105,6 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5HL_buildiface$(EXEEXT) TESTS = subdir = hl/fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -115,8 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -150,8 +147,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5hl_fortran_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5F) am_libhdf5hl_fortran_la_OBJECTS = H5DSfc.lo H5LTfc.lo H5IMfc.lo \ - H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5TBff.lo H5IMff.lo \ - H5LTff_gen.lo H5TBff_gen.lo + H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo libhdf5hl_fortran_la_OBJECTS = $(am_libhdf5hl_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -161,10 +157,6 @@ libhdf5hl_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5hl_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ -PROGRAMS = $(noinst_PROGRAMS) -am_H5HL_buildiface_OBJECTS = H5HL_buildiface.$(OBJEXT) -H5HL_buildiface_OBJECTS = $(am_H5HL_buildiface_OBJECTS) -H5HL_buildiface_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -177,28 +169,10 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_FCFLAGS) $(FCFLAGS) -AM_V_PPFC = $(am__v_PPFC_@AM_V@) -am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) -am__v_PPFC_0 = @echo " PPFC " $@; -am__v_PPFC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -217,9 +191,23 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libhdf5hl_fortran_la_SOURCES) $(H5HL_buildiface_SOURCES) -DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) \ - $(H5HL_buildiface_SOURCES) +FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_@AM_V@) +am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(libhdf5hl_fortran_la_SOURCES) +DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -481,21 +469,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -505,12 +486,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -552,18 +534,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -721,23 +691,17 @@ libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVI # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 +libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F) -#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) - -# H5HL_buildiface.F90 is included in the distribution, and Automake knows -# how to compile a fortran program given its sources. -H5HL_buildiface_SOURCES = H5HL_buildiface.F90 - # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -760,7 +724,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -831,19 +795,6 @@ clean-libLTLIBRARIES: libhdf5hl_fortran.la: $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_DEPENDENCIES) $(EXTRA_libhdf5hl_fortran_la_DEPENDENCIES) $(AM_V_FCLD)$(libhdf5hl_fortran_la_LINK) -rpath $(libdir) $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_LIBADD) $(LIBS) -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -H5HL_buildiface$(EXEEXT): $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_DEPENDENCIES) $(EXTRA_H5HL_buildiface_DEPENDENCIES) - @rm -f H5HL_buildiface$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_LDADD) $(LIBS) - mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -856,15 +807,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LTfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TBfc.Plo@am__quote@ -.F90.o: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< - -.F90.obj: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.F90.lo: - $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< - .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -886,6 +828,15 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< + mostlyclean-libtool: -rm -f *.lo @@ -1122,7 +1073,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local +all-am: Makefile $(LTLIBRARIES) all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1163,7 +1114,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ - clean-noinstPROGRAMS mostlyclean-am + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1236,8 +1187,8 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ + clean-libtool clean-local cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ distclean-libtool distclean-local distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ @@ -1285,7 +1236,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ + $(RM) *.$(F9XMODEXT); \ fi install-data-local: @@ -1300,23 +1251,14 @@ uninstall-local: fi; \ fi -# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated -# with them. - -H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) - $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) - -H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.F90 -H5LTff.lo: $(srcdir)/H5LTff.F90 -H5IMff.lo: $(srcdir)/H5IMff.F90 -H5TBff.lo: $(srcdir)/H5TBff.F90 -H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 -H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 +H5DSff.lo: $(srcdir)/H5DSff.f90 +H5LTff.lo: $(srcdir)/H5LTff.f90 +H5IMff.lo: $(srcdir)/H5IMff.f90 +H5TBff.lo: $(srcdir)/H5TBff.f90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in deleted file mode 100644 index 9a1231a..0000000 --- a/hl/fortran/src/hdf5_hl_fortrandll.def.in +++ /dev/null @@ -1,88 +0,0 @@ -EXPORTS -; H5DS -H5DS_mp_H5DSSET_SCALE_F -H5DS_mp_H5DSATTACH_SCALE_F -H5DS_mp_H5DSDETACH_SCALE_F -H5DS_mp_H5DSIS_ATTACHED_F -H5DS_mp_H5DSIS_SCALE_F -H5DS_mp_H5DSSET_LABEL_F -H5DS_mp_H5DSGET_LABEL_F -H5DS_mp_H5DSGET_SCALE_NAME_F -H5DS_mp_H5DSGET_NUM_SCALES_F -; H5IM -H5IM_mp_H5IMMAKE_IMAGE_8BIT_F -H5IM_mp_H5IMREAD_IMAGE_F -H5IM_mp_H5IMMAKE_IMAGE_24BIT_F -H5IM_mp_H5IMGET_IMAGE_INFO_F -H5IM_mp_H5IMIS_IMAGE_F -H5IM_mp_H5IMMAKE_PALETTE_F -H5IM_mp_H5IMLINK_PALETTE_F -H5IM_mp_H5IMUNLINK_PALETTE_F -H5IM_mp_H5IMGET_NPALETTES_F -H5IM_mp_H5IMGET_PALETTE_INFO_F -H5IM_mp_H5IMGET_PALETTE_F -H5IM_mp_H5IMIS_PALETTE_F -; H5LT -H5LT_CONST_mp_H5LTMAKE_DATASET_F_PTR -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT1 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT2 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT3 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT4 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT5 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT6 -H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT7 -H5LT_CONST_mp_H5LTREAD_DATASET_F_PTR -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT1 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT2 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT3 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT4 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT5 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT6 -H5LT_CONST_mp_H5LTREAD_DATASET_F_INT7 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_1 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_2 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_3 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_4 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_5 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_6 -H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_7 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_1 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_2 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_3 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_4 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_5 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_6 -H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_7 -H5LT_CONST_mp_H5LTMAKE_DATASET_STRING_F -H5LT_CONST_mp_H5LTREAD_DATASET_STRING_F -H5LT_CONST_mp_H5LTSET_ATTRIBUTE_F -H5LT_CONST_mp_H5LTSET_ATTRIBUTE_INT_F -H5LT_CONST_mp_H5LTSET_ATTRIBUTE_FLOAT_F -H5LT_CONST_mp_H5LTSET_ATTRIBUTE_DOUBLE_F -H5LT_CONST_mp_H5LTSET_ATTRIBUTE_STRING_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INT_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_FLOAT_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_DOUBLE_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_STRING_F -H5LT_CONST_mp_H5LTGET_DATASET_NDIMS_F -H5LT_CONST_mp_H5LTFIND_DATASET_F -H5LT_CONST_mp_H5LTGET_DATASET_INFO_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_NDIMS_F -H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INFO_F -H5LT_CONST_mp_H5LTPATH_VALID_F -; H5TB -H5TB_CONST_mp_H5TBMAKE_TABLE_F -H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_INT -H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_STRING -H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_INT -H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_STRING -H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_INT -H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_STRING -H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_INT -H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_STRING -H5TB_CONST_mp_H5TBINSERT_FIELD_F_INT -H5TB_CONST_mp_H5TBINSERT_FIELD_F_STRING -H5TB_CONST_mp_H5TBDELETE_FIELD_F -H5TB_CONST_mp_H5TBGET_TABLE_INFO_F -H5TB_CONST_mp_H5TBGET_FIELD_INFO_F diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index a1d1386..4918e06 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #-- Adding test for hl_f90_tstds -add_executable (hl_f90_tstds tstds.F90) +add_executable (hl_f90_tstds tstds.f90) TARGET_NAMING (hl_f90_tstds STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -15,7 +15,7 @@ target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTOR set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstds-shared tstds.F90) + add_executable (hl_f90_tstds-shared tstds.f90) TARGET_NAMING (hl_f90_tstds-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -28,7 +28,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstlite -add_executable (hl_f90_tstlite tstlite.F90) +add_executable (hl_f90_tstlite tstlite.f90) TARGET_NAMING (hl_f90_tstlite STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -36,7 +36,7 @@ target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECT set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstlite-shared tstlite.F90) + add_executable (hl_f90_tstlite-shared tstlite.f90) TARGET_NAMING (hl_f90_tstlite-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -49,7 +49,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstimage -add_executable (hl_f90_tstimage tstimage.F90) +add_executable (hl_f90_tstimage tstimage.f90) TARGET_NAMING (hl_f90_tstimage STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -57,7 +57,7 @@ target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIREC set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstimage-shared tstimage.F90) + add_executable (hl_f90_tstimage-shared tstimage.f90) TARGET_NAMING (hl_f90_tstimage-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -70,7 +70,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tsttable -add_executable (hl_f90_tsttable tsttable.F90) +add_executable (hl_f90_tsttable tsttable.f90) TARGET_NAMING (hl_f90_tsttable STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -78,7 +78,7 @@ target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIREC set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tsttable-shared tsttable.F90) + add_executable (hl_f90_tsttable-shared tsttable.f90) TARGET_NAMING (hl_f90_tsttable-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index 18fdaf3..fa3a803 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -39,10 +39,10 @@ check_PROGRAMS=$(TEST_PROG) LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES=tstds.F90 -tstlite_SOURCES=tstlite.F90 -tstimage_SOURCES=tstimage.F90 -tsttable_SOURCES=tsttable.F90 +tstds_SOURCES=tstds.f90 +tstlite_SOURCES=tstlite.f90 +tstimage_SOURCES=tstimage.f90 +tsttable_SOURCES=tsttable.f90 # Temporary files. CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f1tab.h5 tstds.h5 diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index ee4b206..6725d26 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -112,8 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = tstds$(EXEEXT) tstlite$(EXEEXT) tstimage$(EXEEXT) \ @@ -150,17 +149,14 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_FCFLAGS) $(FCFLAGS) -AM_V_PPFC = $(am__v_PPFC_@AM_V@) -am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) -am__v_PPFC_0 = @echo " PPFC " $@; -am__v_PPFC_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_@AM_V@) +am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = FCLD = $(FC) FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ @@ -464,21 +460,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -488,12 +477,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -535,18 +525,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -696,10 +674,10 @@ TEST_PROG = tstds tstlite tstimage tsttable LDADD = $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES = tstds.F90 -tstlite_SOURCES = tstlite.F90 -tstimage_SOURCES = tstimage.F90 -tsttable_SOURCES = tsttable.F90 +tstds_SOURCES = tstds.f90 +tstlite_SOURCES = tstlite.f90 +tstimage_SOURCES = tstimage.f90 +tsttable_SOURCES = tsttable.f90 # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) @@ -727,7 +705,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .F90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -791,14 +769,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -.F90.o: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< -.F90.obj: - $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` -.F90.lo: - $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< mostlyclean-libtool: -rm -f *.lo diff --git a/hl/fortran/test/tstds.F90 b/hl/fortran/test/tstds.F90 deleted file mode 100644 index cbf6c38..0000000 --- a/hl/fortran/test/tstds.F90 +++ /dev/null @@ -1,353 +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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -PROGRAM test_ds - - IMPLICIT NONE - - INTEGER :: err - - CALL test_testds(err) - - IF(err.LT.0)THEN - WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" - ENDIF - -END PROGRAM test_ds - -SUBROUTINE test_testds(err) - - USE HDF5 - USE H5LT - USE H5DS - - IMPLICIT NONE - - INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset - INTEGER, PARAMETER :: DIM_DATA = 12 - INTEGER, PARAMETER :: DIM1_SIZE = 3 - INTEGER, PARAMETER :: DIM2_SIZE = 4 - INTEGER, PARAMETER :: DIM1 = 1 - INTEGER, PARAMETER :: DIM2 = 2 - INTEGER, PARAMETER :: FAILED = -1 - - CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" - CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" - - - INTEGER(hid_t) :: fid ! file ID - INTEGER(hid_t) :: did ! dataset ID - INTEGER(hid_t) :: dsid ! DS dataset ID - INTEGER :: rankds = 1 ! rank of DS dataset - INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset - INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset - REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset - INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset - INTEGER :: err - INTEGER :: num_scales - INTEGER(size_t) :: name_len - CHARACTER(LEN=80) :: name - INTEGER(size_t) :: label_len - CHARACTER(LEN=80) :: label - LOGICAL :: is_attached, is_scale - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(err) - IF(err.LT.0) RETURN - - ! create a file using default properties - CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) - IF(err.LT.0) RETURN - - ! make a dataset - CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the first dimension - CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the second dimension - CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Attaching Dimension Scale ') - - ! get the dataset id for DSET_NAME - CALL H5Dopen_f(fid, DSET_NAME, did, err) - IF(err.LT.0) RETURN - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! check attaching to a non-existent dimension; should fail - CALL H5DSattach_scale_f(did, dsid, 20, err) - IF(err.NE.-1) THEN - err = FAILED ! should fail, mark as an error - CALL write_test_status(err) - RETURN - ENDIF - - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 - CALL H5DSattach_scale_f(did, dsid, DIM1, err) - IF(err.EQ.-1) THEN - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale Attached ') - - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.EQ.-1.OR..NOT.is_attached) THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Check to see how many Dimension Scales are attached - - CALL test_begin(' Test Getting Number Dimension Scales ') - - CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) - IF(err.LT.0.OR.num_scales.NE.1)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test Detaching Dimension Scale ') - - ! Detach scale - CALL H5DSdetach_scale_f(did, dsid, DIM1, err) - IF(err.LT.0) RETURN - - ! Check to see if a dimension scale is attached, should be .false. - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - !------------------------------------------------------------------------- - ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Setting Dimension Scale ') - - CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale ') - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Get scale name; test to large character buffer - - CALL test_begin(' Test Getting Dimension Scale By Name ') - - name_len = 25 - name = '' - CALL H5DSget_scale_name_f(dsid, name, name_len, err) - IF(err.LT.0 .OR. & - name_len.NE.21 .OR. & - TRIM(name).NE."Dimension Scale Set 1" .OR. & - name(22:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test exact size character buffer - name_len = 21 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test to small character buffer - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_2_NAME dimension scale to DSET_NAME - !------------------------------------------------------------------------- - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) - CALL H5DSattach_scale_f(did, dsid, DIM2, err) - IF(err.LT.0) RETURN - - CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) - IF(err.LT.0) RETURN - - ! test sending no Dimension Scale name - - CALL H5DSset_scale_f(dsid, err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name when there is no scale name - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - CALL write_test_status(err) - - CALL test_begin(' Test Setting Dimension Scale Label ') - - CALL H5DSset_label_f(did, DIM2, "Label12", err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to small - - label_len = 5 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is exact - - label_len = 7 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to big - - label_len = 25 - label = '' - CALL H5DSget_label_f(did, DIM2, label, label_len, err) - IF(err.LT.0.OR. & - label(1:label_len).NE."Label12" .OR. & - label_len.NE.7 .OR. & - label(8:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - ! close file - CALL H5Fclose_f(fid, err) - IF(err.LT.0) RETURN - -END SUBROUTINE test_testds - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed/failed -!------------------------------------------------------------------------- -SUBROUTINE write_test_status( test_result) - -! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, failed - ! 0 , passed - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - - error_string = failure - IF (test_result .EQ. 0) THEN - error_string = success - ENDIF - - WRITE(*, fmt = '(T34, A)') error_string - -END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstds.f90 b/hl/fortran/test/tstds.f90 new file mode 100644 index 0000000..cbf6c38 --- /dev/null +++ b/hl/fortran/test/tstds.f90 @@ -0,0 +1,353 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +PROGRAM test_ds + + IMPLICIT NONE + + INTEGER :: err + + CALL test_testds(err) + + IF(err.LT.0)THEN + WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" + ENDIF + +END PROGRAM test_ds + +SUBROUTINE test_testds(err) + + USE HDF5 + USE H5LT + USE H5DS + + IMPLICIT NONE + + INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset + INTEGER, PARAMETER :: DIM_DATA = 12 + INTEGER, PARAMETER :: DIM1_SIZE = 3 + INTEGER, PARAMETER :: DIM2_SIZE = 4 + INTEGER, PARAMETER :: DIM1 = 1 + INTEGER, PARAMETER :: DIM2 = 2 + INTEGER, PARAMETER :: FAILED = -1 + + CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" + CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" + + + INTEGER(hid_t) :: fid ! file ID + INTEGER(hid_t) :: did ! dataset ID + INTEGER(hid_t) :: dsid ! DS dataset ID + INTEGER :: rankds = 1 ! rank of DS dataset + INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset + INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset + REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset + INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset + INTEGER :: err + INTEGER :: num_scales + INTEGER(size_t) :: name_len + CHARACTER(LEN=80) :: name + INTEGER(size_t) :: label_len + CHARACTER(LEN=80) :: label + LOGICAL :: is_attached, is_scale + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(err) + IF(err.LT.0) RETURN + + ! create a file using default properties + CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) + IF(err.LT.0) RETURN + + ! make a dataset + CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the first dimension + CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the second dimension + CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Attaching Dimension Scale ') + + ! get the dataset id for DSET_NAME + CALL H5Dopen_f(fid, DSET_NAME, did, err) + IF(err.LT.0) RETURN + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! check attaching to a non-existent dimension; should fail + CALL H5DSattach_scale_f(did, dsid, 20, err) + IF(err.NE.-1) THEN + err = FAILED ! should fail, mark as an error + CALL write_test_status(err) + RETURN + ENDIF + + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 + CALL H5DSattach_scale_f(did, dsid, DIM1, err) + IF(err.EQ.-1) THEN + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale Attached ') + + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.EQ.-1.OR..NOT.is_attached) THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Check to see how many Dimension Scales are attached + + CALL test_begin(' Test Getting Number Dimension Scales ') + + CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) + IF(err.LT.0.OR.num_scales.NE.1)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test Detaching Dimension Scale ') + + ! Detach scale + CALL H5DSdetach_scale_f(did, dsid, DIM1, err) + IF(err.LT.0) RETURN + + ! Check to see if a dimension scale is attached, should be .false. + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + !------------------------------------------------------------------------- + ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Setting Dimension Scale ') + + CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale ') + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Get scale name; test to large character buffer + + CALL test_begin(' Test Getting Dimension Scale By Name ') + + name_len = 25 + name = '' + CALL H5DSget_scale_name_f(dsid, name, name_len, err) + IF(err.LT.0 .OR. & + name_len.NE.21 .OR. & + TRIM(name).NE."Dimension Scale Set 1" .OR. & + name(22:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test exact size character buffer + name_len = 21 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test to small character buffer + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_2_NAME dimension scale to DSET_NAME + !------------------------------------------------------------------------- + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) + CALL H5DSattach_scale_f(did, dsid, DIM2, err) + IF(err.LT.0) RETURN + + CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) + IF(err.LT.0) RETURN + + ! test sending no Dimension Scale name + + CALL H5DSset_scale_f(dsid, err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name when there is no scale name + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + CALL write_test_status(err) + + CALL test_begin(' Test Setting Dimension Scale Label ') + + CALL H5DSset_label_f(did, DIM2, "Label12", err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to small + + label_len = 5 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is exact + + label_len = 7 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to big + + label_len = 25 + label = '' + CALL H5DSget_label_f(did, DIM2, label, label_len, err) + IF(err.LT.0.OR. & + label(1:label_len).NE."Label12" .OR. & + label_len.NE.7 .OR. & + label(8:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + ! close file + CALL H5Fclose_f(fid, err) + IF(err.LT.0) RETURN + +END SUBROUTINE test_testds + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed/failed +!------------------------------------------------------------------------- +SUBROUTINE write_test_status( test_result) + +! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, failed + ! 0 , passed + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + + error_string = failure + IF (test_result .EQ. 0) THEN + error_string = success + ENDIF + + WRITE(*, fmt = '(T34, A)') error_string + +END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstimage.F90 b/hl/fortran/test/tstimage.F90 deleted file mode 100644 index 0bff6b2..0000000 --- a/hl/fortran/test/tstimage.F90 +++ /dev/null @@ -1,339 +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 file contains the FORTRAN90 tests for H5LT -! - -program image_test - -call make_image1() - -end program image_test - - -!------------------------------------------------------------------------- -! make_image1 -!------------------------------------------------------------------------- - -subroutine make_image1() - -use h5im ! module of H5IM -use hdf5 ! module of HDF5 library - -implicit none - -character(len=8), parameter :: filename = "f1img.h5" ! file name -character(len=4), parameter :: dsetname1 = "img1" ! dataset name -character(len=4), parameter :: dsetname2 = "img2" ! dataset name -character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name -integer(hid_t) :: file_id ! file identifier -integer(hsize_t), parameter :: width = 500 ! width of image -integer(hsize_t), parameter :: height = 200 ! height of image -integer, parameter :: pal_entries = 9 ! palette number of entries -integer, dimension(width*height) :: buf1 ! data buffer -integer, dimension(width*height) :: bufr1 ! data buffer -integer, dimension(width*height*3) :: buf2 ! data buffer -integer, dimension(width*height*3) :: bufr2 ! data buffer -integer(hsize_t) :: widthr ! width of image -integer(hsize_t) :: heightr ! height of image -integer(hsize_t) :: planesr ! color planes -integer(hsize_t) :: npalsr ! palettes -character(len=15) :: interlacer ! interlace -integer :: errcode ! error flag -integer :: is_image ! error flag -integer :: i, j, n ! general purpose integers -! -! palette -! create a 9 entry palette -! -character(len=4), parameter :: pal_name = "pal1" ! dataset name -integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions -integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions -integer, dimension(pal_entries*3) :: pal_data_out ! data buffer -integer(hsize_t) :: npals ! number of palettes -integer :: pal_number ! palette number -integer :: is_palette ! is palette -integer :: space -integer, dimension(pal_entries*3) :: pal_data_in = (/& - 0,0,168,& ! dark blue - 0,0,252,& ! blue - 0,168,252,& ! ocean blue - 84,252,252,& ! light blue - 168,252,168,& ! light green - 0,252,168,& ! green - 252,252,84,& ! yellow - 252,168,0,& ! orange - 252,0,0/) ! red - - -! create an 8bit image of 9 values divided evenly by the array -! -space = width*height / pal_entries; -n = 0; j = 0; -do i = 1, width*height - buf1(i) = n - if ( j > space ) then - n = n + 1; - j = 0; - endif - if (n>pal_entries-1) n=0; - j = j +1; -end do - -! -! create a 3 byte rgb image -! -n = 0; j = 0; -do i = 1, width*height*3 - buf2(i) = n; - if (j == 3) then - n = n + 1; - j = 0; - endif - if (n>255) n=0; - j = j +1; -end do - - -! Initialize FORTRAN predefined datatypes. -! -call h5open_f(errcode) -! -! Create a new file using default properties. -! -call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! indexed image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 8bit ') - -! -! write image. -! -call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) -! -! read image. -! -call h5imread_image_f(file_id,dsetname1,bufr1,errcode) -! -! compare read and write buffers. -! -do i = 1, width*height - if ( buf1(i) /= bufr1(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr1(i), ' and ', buf1(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname1) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - -call passed() - -!------------------------------------------------------------------------- -! true color image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 24bit ') - -! -! write image. -! -call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) - -! -! read image. -! -call h5imread_image_f(file_id,dsetname2,bufr2,errcode) - -! -! compare read and write buffers. -! -do i = 1, width*height*3 - if ( buf2(i) /= bufr2(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr2(i), ' and ', buf2(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname2) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - - -call passed() - -!------------------------------------------------------------------------- -! palette -!------------------------------------------------------------------------- - -call test_begin(' Make palette ') - -! -! make palette. -! -call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) - -call passed() - - -call test_begin(' Link/Unlink palette ') - -! -! link palette. -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - - -! -! read palette. -! -pal_number = 0 -call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) - -! -! compare read and write buffers. -! -do i = 1, pal_entries*3 - if ( pal_data_in(i) /= pal_data_out(i) ) then - print *, 'read buffer differs from write buffer' - print *, pal_data_in(i), ' and ', pal_data_out(i) - stop - endif -end do - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) - -if ( npals /= 1) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - -! -! get palette info -! -pal_number = 0 -call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) - -if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then - print *, 'h5imget_palette_info_f bad value' - stop -endif - -! -! is palette -! -is_palette = h5imis_palette_f(file_id,pal_name) - -if ( is_palette /= 1 ) then - print *, 'h5imis_palette_f bad value' - stop -endif - -! -! unlink palette. -! -call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) - -if ( npals /= 0) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - - -! -! link palette again -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - -call passed() - - -!------------------------------------------------------------------------- -! end -!------------------------------------------------------------------------- - -! -! Close the file. -! -call h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -call h5close_f(errcode) - -! -! end function. -! -end subroutine make_image1 - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -subroutine test_begin(string) -character(len=*), intent(in) :: string -write(*, fmt = '(14a)', advance = 'no') string -write(*, fmt = '(40x,a)', advance = 'no') ' ' -end subroutine test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -subroutine passed() -write(*, fmt = '(6a)') 'PASSED' -end subroutine passed diff --git a/hl/fortran/test/tstimage.f90 b/hl/fortran/test/tstimage.f90 new file mode 100644 index 0000000..0bff6b2 --- /dev/null +++ b/hl/fortran/test/tstimage.f90 @@ -0,0 +1,339 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +program image_test + +call make_image1() + +end program image_test + + +!------------------------------------------------------------------------- +! make_image1 +!------------------------------------------------------------------------- + +subroutine make_image1() + +use h5im ! module of H5IM +use hdf5 ! module of HDF5 library + +implicit none + +character(len=8), parameter :: filename = "f1img.h5" ! file name +character(len=4), parameter :: dsetname1 = "img1" ! dataset name +character(len=4), parameter :: dsetname2 = "img2" ! dataset name +character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name +integer(hid_t) :: file_id ! file identifier +integer(hsize_t), parameter :: width = 500 ! width of image +integer(hsize_t), parameter :: height = 200 ! height of image +integer, parameter :: pal_entries = 9 ! palette number of entries +integer, dimension(width*height) :: buf1 ! data buffer +integer, dimension(width*height) :: bufr1 ! data buffer +integer, dimension(width*height*3) :: buf2 ! data buffer +integer, dimension(width*height*3) :: bufr2 ! data buffer +integer(hsize_t) :: widthr ! width of image +integer(hsize_t) :: heightr ! height of image +integer(hsize_t) :: planesr ! color planes +integer(hsize_t) :: npalsr ! palettes +character(len=15) :: interlacer ! interlace +integer :: errcode ! error flag +integer :: is_image ! error flag +integer :: i, j, n ! general purpose integers +! +! palette +! create a 9 entry palette +! +character(len=4), parameter :: pal_name = "pal1" ! dataset name +integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions +integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions +integer, dimension(pal_entries*3) :: pal_data_out ! data buffer +integer(hsize_t) :: npals ! number of palettes +integer :: pal_number ! palette number +integer :: is_palette ! is palette +integer :: space +integer, dimension(pal_entries*3) :: pal_data_in = (/& + 0,0,168,& ! dark blue + 0,0,252,& ! blue + 0,168,252,& ! ocean blue + 84,252,252,& ! light blue + 168,252,168,& ! light green + 0,252,168,& ! green + 252,252,84,& ! yellow + 252,168,0,& ! orange + 252,0,0/) ! red + + +! create an 8bit image of 9 values divided evenly by the array +! +space = width*height / pal_entries; +n = 0; j = 0; +do i = 1, width*height + buf1(i) = n + if ( j > space ) then + n = n + 1; + j = 0; + endif + if (n>pal_entries-1) n=0; + j = j +1; +end do + +! +! create a 3 byte rgb image +! +n = 0; j = 0; +do i = 1, width*height*3 + buf2(i) = n; + if (j == 3) then + n = n + 1; + j = 0; + endif + if (n>255) n=0; + j = j +1; +end do + + +! Initialize FORTRAN predefined datatypes. +! +call h5open_f(errcode) +! +! Create a new file using default properties. +! +call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! indexed image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 8bit ') + +! +! write image. +! +call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) +! +! read image. +! +call h5imread_image_f(file_id,dsetname1,bufr1,errcode) +! +! compare read and write buffers. +! +do i = 1, width*height + if ( buf1(i) /= bufr1(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr1(i), ' and ', buf1(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname1) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + +call passed() + +!------------------------------------------------------------------------- +! true color image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 24bit ') + +! +! write image. +! +call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) + +! +! read image. +! +call h5imread_image_f(file_id,dsetname2,bufr2,errcode) + +! +! compare read and write buffers. +! +do i = 1, width*height*3 + if ( buf2(i) /= bufr2(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr2(i), ' and ', buf2(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname2) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + + +call passed() + +!------------------------------------------------------------------------- +! palette +!------------------------------------------------------------------------- + +call test_begin(' Make palette ') + +! +! make palette. +! +call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) + +call passed() + + +call test_begin(' Link/Unlink palette ') + +! +! link palette. +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + + +! +! read palette. +! +pal_number = 0 +call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) + +! +! compare read and write buffers. +! +do i = 1, pal_entries*3 + if ( pal_data_in(i) /= pal_data_out(i) ) then + print *, 'read buffer differs from write buffer' + print *, pal_data_in(i), ' and ', pal_data_out(i) + stop + endif +end do + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) + +if ( npals /= 1) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + +! +! get palette info +! +pal_number = 0 +call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) + +if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then + print *, 'h5imget_palette_info_f bad value' + stop +endif + +! +! is palette +! +is_palette = h5imis_palette_f(file_id,pal_name) + +if ( is_palette /= 1 ) then + print *, 'h5imis_palette_f bad value' + stop +endif + +! +! unlink palette. +! +call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) + +if ( npals /= 0) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + + +! +! link palette again +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + +call passed() + + +!------------------------------------------------------------------------- +! end +!------------------------------------------------------------------------- + +! +! Close the file. +! +call h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +call h5close_f(errcode) + +! +! end function. +! +end subroutine make_image1 + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +subroutine test_begin(string) +character(len=*), intent(in) :: string +write(*, fmt = '(14a)', advance = 'no') string +write(*, fmt = '(40x,a)', advance = 'no') ' ' +end subroutine test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +subroutine passed() +write(*, fmt = '(6a)') 'PASSED' +end subroutine passed diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 deleted file mode 100644 index 0eb005b..0000000 --- a/hl/fortran/test/tstlite.F90 +++ /dev/null @@ -1,1719 +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 file contains the FORTRAN90 tests for H5LT -! -#include - -PROGRAM lite_test - - CALL test_dataset1D() - CALL test_dataset2D() - CALL test_dataset3D() - CALL test_datasetND(4) - CALL test_datasetND(5) - CALL test_datasetND(6) - CALL test_datasetND(7) - CALL test_datasets() - CALL test_attributes() - -END PROGRAM lite_test - - -!------------------------------------------------------------------------- -! test_dataset1D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset1D() - -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array -CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions -INTEGER :: rank = 1 ! Dataset rank -INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer -INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer -REAL, DIMENSION(DIM1) :: buf2 ! Data buffer -REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER :: i ! general purpose integer -TYPE(C_PTR) :: f_ptr -integer(HID_T) :: mytype - -CALL test_begin(' Make/Read datasets (1D) ') - -! -! Initialize the data array. -! -DO i = 1, DIM1 - buf1(i) = i; - buf2(i) = i; - buf3(i) = i; -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INTEGER -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer (I)' - PRINT *, bufr1(i), ' and ', buf1(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer (R)' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1)) -mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & - mytype, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) -! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -! -! read dataset. -! -f_ptr = C_LOC(bufr3(1)) -CALL h5ltread_dataset_f(file_id, dsetname3, & - h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer (D)' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset1D - -!------------------------------------------------------------------------- -! test_dataset2D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset2D() - -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - - -INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns -INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows -CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions -INTEGER :: rank = 2 ! Dataset rank -INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, n ! general purpose integers -TYPE(C_PTR) :: f_ptr - -CALL test_begin(' Make/Read datasets (2D) ') - - -! -! Initialize the data arrays. -! -n=1 -DO i = 1, DIM1*DIM2 - buf(i) = INT(n) - n = n + 1 -END DO - -DO i = 1, dims(1) - DO j = 1, dims(2) - buf2(i,j) = INT((i-1)*dims(2) + j) - buf3(i,j) = INT((i-1)*dims(2) + j) - buf4(i,j) = INT((i-1)*dims(2) + j) - END DO -END DO - - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 2D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j), ' and ', buf2(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j), ' and ', buf3(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) - -! -! read dataset. -f_ptr = C_LOC(buf4r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j), ' and ', buf4(i,j) - STOP - ENDIF - END DO -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset2D - - -!------------------------------------------------------------------------- -! test_dataset3D -!------------------------------------------------------------------------- - - -SUBROUTINE test_dataset3D() -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 6 ! columns -INTEGER, PARAMETER :: DIM2 = 4 ! rows -INTEGER, PARAMETER :: DIM3 = 2 ! layers -CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions -INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer -INTEGER :: rank = 3 ! Dataset rank -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers -INTEGER :: type_class -INTEGER(SIZE_T) :: type_size -TYPE(C_PTR) :: f_ptr -CALL test_begin(' Make/Read datasets (3D) ') - - -! -! Initialize the data array. -! -n=1 -DO i = 1, DIM1*DIM2*DIM3 - buf(i) = INT(n) - n = n + 1 -END DO - -n = 1 -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - buf2(i,j,k) = INT(n) - buf3(i,j,k) = INT(n) - buf4(i,j,k) = INT(n) - n = n + 1 - END DO - END DO -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2*DIM3 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 3D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -! -! read dataset. -! -f_ptr = C_LOC(buf4r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - -! -! compare dimensions -! -DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset3D - -!------------------------------------------------------------------------- -! test_datasetND -!------------------------------------------------------------------------- - - -SUBROUTINE test_datasetND(rank) - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - INTEGER :: rank ! Dataset rank - - INTEGER, PARAMETER :: DIM1 = 2 ! columns - INTEGER, PARAMETER :: DIM2 = 4 ! rows - INTEGER, PARAMETER :: DIM3 = 2 ! layers - INTEGER, PARAMETER :: DIM4 = 5 ! columns - INTEGER, PARAMETER :: DIM5 = 4 ! rows - INTEGER, PARAMETER :: DIM6 = 3 ! layers - INTEGER, PARAMETER :: DIM7 = 2 ! layers - CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), DIMENSION(7) :: dims - INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibuf_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibufr_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - CHARACTER(LEN=1) :: ichr1 - TYPE(C_PTR) :: f_ptr - - WRITE(ichr1,'(I1.1)') rank - CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') -! -! Initialize the data array. -! - IF(rank.EQ.4)THEN - - ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - ibuf_4(i,j,k,l) = INT(nn) - rbuf_4(i,j,k,l) = INT(nn) - dbuf_4(i,j,k,l) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - - ELSE IF(rank.EQ.5)THEN - - ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - ibuf_5(i,j,k,l,m) = INT(nn) - rbuf_5(i,j,k,l,m) = INT(nn) - dbuf_5(i,j,k,l,m) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - - ELSE IF(rank.EQ.6)THEN - - ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - ibuf_6(i,j,k,l,m,n) = INT(nn) - rbuf_6(i,j,k,l,m,n) = INT(nn) - dbuf_6(i,j,k,l,m,n) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - - ELSE IF(rank.EQ.7)THEN - - ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - DO o = 1, DIM7 - ibuf_7(i,j,k,l,m,n,o) = INT(nn) - rbuf_7(i,j,k,l,m,n,o) = INT(nn) - dbuf_7(i,j,k,l,m,n,o) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - ENDDO - - ENDIF - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - !------------------------------------------------------------------------- - ! H5T_NATIVE_INT ND buffer - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(ibuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - !------------------------------------------------------------------------- - ! H5T_NATIVE_REAL - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(rbuf_4(1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(rbufr_4(1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - !------------------------------------------------------------------------- - ! H5T_NATIVE_DOUBLE - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(dbuf_4(1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - f_ptr = C_LOC(dbufr_4(1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.5)THEN - f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.6)THEN - f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ELSE IF(rank.EQ.7)THEN - f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! DEALLOCATE RESOURCES - - IF(rank.EQ.4)THEN - DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) - ELSE IF(rank.EQ.5)THEN - DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) - ELSE IF(rank.EQ.6)THEN - DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) - ELSE IF(rank.EQ.7)THEN - DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) - ENDIF - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasetND - - - -!------------------------------------------------------------------------- -! test_datasets -!------------------------------------------------------------------------- - -SUBROUTINE test_datasets() - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER :: errcode ! Error flag - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - INTEGER :: rankr ! Dataset rank - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=8) :: buf1r ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer - INTEGER :: i, n ! general purpose integer - INTEGER :: has ! general purpose integer - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - LOGICAL :: path_valid ! status of the path - CHARACTER(LEN=6) :: chr_exact - CHARACTER(LEN=8) :: chr_lg - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - ! - ! Initialize the data array. - ! - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (integer) ') - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! real - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (float) ') - - - ! - ! write dataset. - ! - f_ptr = C_LOC(buf3(1)) - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) - - ! - ! read dataset. - ! - f_ptr = C_LOC(bufr3(1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (double) ') - - - ! - ! write dataset. - ! - !f_ptr = C_LOC(buf4(1)) - !CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) - CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) - - ! - ! read dataset. - ! - !f_ptr = C_LOC(buf4(1)) - !CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) - CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) - - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (string) ') - - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. buf1r ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', buf1r - STOP - ENDIF - - CALL passed() - - CALL test_begin(' Test h5ltpath_valid_f ') - ! - ! test function h5ltpath_valid_f - ! - chr_exact = "/"//dsetname2 ! test character buffer the exact size needed - CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - chr_lg = "/"//dsetname2 ! test character buffer larger then needed - CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dataset does not exist - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Create a dangling soft link - CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) - - ! Should pass, does not check for dangled link - CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) - IF(.NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dangled link - CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) - IF(path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL passed() - - - CALL test_begin(' Get dataset dimensions/info ') - - !------------------------------------------------------------------------- - ! h5ltget_dataset_ndims_f - !------------------------------------------------------------------------- - - CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) - IF ( rankr .NE. rank ) THEN - PRINT *, 'h5ltget_dataset_ndims_f return error' - STOP - ENDIF - - - !------------------------------------------------------------------------- - ! test h5ltfind_dataset_f function - !------------------------------------------------------------------------- - - - has = h5ltfind_dataset_f(file_id,dsetname4) - IF ( has .NE. 1 ) THEN - PRINT *, 'h5ltfind_dataset_f return error' - STOP - ENDIF - - !------------------------------------------------------------------------- - ! test h5ltget_dataset_info_f function - !------------------------------------------------------------------------- - - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT - PRINT *, 'wrong type class ' - STOP - ENDIF - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasets - - - -!------------------------------------------------------------------------- -! test_attributes -!------------------------------------------------------------------------- - -SUBROUTINE test_attributes() - - USE, INTRINSIC :: ISO_C_BINDING - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name - CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file - INTEGER(HID_T) :: file_id ! File identifier -! INTEGER(HID_T) :: file_id1 - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" - CHARACTER(LEN=8) :: bufr1 ! Data buffer - CHARACTER(LEN=10) :: bufr1_lg ! Data buffer -! CHARACTER(LEN=16) :: bufr_c ! Data buffer -! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer - REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER :: i, n ! general purpose integer - INTEGER(SIZE_T) size ! size of attribute array - INTEGER :: rankr ! rank - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER, DIMENSION(DIM1) :: buf ! Data buffer - INTEGER(SIZE_T) :: SizeOf_buf_type - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - ! - ! make a dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) - - ! - ! Initialize the data array. - ! - size = DIM1 - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes int ') - - - ! - ! write attribute. - ! - CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) - - ! - ! read attribute. - ! - CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! float - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes float ') - - - ! - ! write attribute. - ! -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf3(1)) -#endif - f_ptr = C_LOC(buf3(1)) - CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) - !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) - ! - ! read attribute. - ! -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(bufr3(1)) -#endif - - f_ptr = C_LOC(bufr3(1)) - CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) - !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(buf4(1)) -#endif - - IF(SizeOf_buf_type.LT.16)THEN ! MSB can't handle 16 byte reals - - CALL test_begin(' Set/Get attributes double ') - - ! - ! write attribute. - ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) - -! CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4, size, errcode) - - ! - ! read attribute. - ! - -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) -#else - SizeOf_buf_type = SIZEOF(bufr4(1)) -#endif - - f_ptr = C_LOC(bufr4(1)) - CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - ENDIF - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes string ') - - ! - ! write attribute. - ! - CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) - - ! - ! read attribute into a fortran character buf that is the same size as buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. bufr1 ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1 - STOP - ENDIF - - ! - ! read attribute into a fortran character buf that is larger then buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) - - ! - ! compare read and write buffers, make sure C NULL character was removed. - ! - IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN - PRINT *, 'larger read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1_lg - STOP - ENDIF - - ! - ! ** Test reading a string that was created with a C program ** - ! - -!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) -!!$ -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) -!!$ ! -!!$ ! compare read and write buffers. -!!$ ! -!!$ IF ( bufr_c .NE. buf_c ) THEN -!!$ PRINT *, 'read buffer differs from write buffer' -!!$ PRINT *, bufr1, ' and ', buf_c -!!$ STOP -!!$ ENDIF -!!$ ! -!!$ ! read attribute into a fortran character buf that is larger then buf_c. -!!$ ! -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) -!!$ -!!$ ! -!!$ ! compare read and write buffers, make sure C NULL character was removed. -!!$ ! -!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN -!!$ PRINT *, 'larger read buffer differs from write buffer' -!!$ PRINT *, buf_c, ' and ', bufr_c_lg -!!$ STOP -!!$ ENDIF - -!!$ CALL h5fclose_f(file_id1, errcode) - - CALL passed() - - !------------------------------------------------------------------------- - ! get attribute rank - !------------------------------------------------------------------------- - - CALL test_begin(' Get attribute rank/info ') - - - CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) - - IF ( rankr .NE. 1 ) THEN - PRINT *, 'h5ltget_attribute_ndims_f return error' - STOP - ENDIF - - - CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_attributes - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 new file mode 100644 index 0000000..d035b89 --- /dev/null +++ b/hl/fortran/test/tstlite.f90 @@ -0,0 +1,1628 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +PROGRAM lite_test + + CALL test_dataset1D() + CALL test_dataset2D() + CALL test_dataset3D() + CALL test_datasetND(4) + CALL test_datasetND(5) + CALL test_datasetND(6) + CALL test_datasetND(7) + CALL test_datasets() + CALL test_attributes() + +END PROGRAM lite_test + + +!------------------------------------------------------------------------- +! test_dataset1D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset1D() + +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array +CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions +INTEGER :: rank = 1 ! Dataset rank +INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer +INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer +REAL, DIMENSION(DIM1) :: buf2 ! Data buffer +REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1) :: buf3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1) :: bufr3 ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER :: i ! general purpose integer + + +CALL test_begin(' Make/Read datasets (1D) ') + +! +! Initialize the data array. +! +DO i = 1, DIM1 + buf1(i) = i; + buf2(i) = i; + buf3(i) = i; +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INTEGER +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf1(i) .NE. bufr1(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr1(i), ' and ', buf1(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset1D + +!------------------------------------------------------------------------- +! test_dataset2D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset2D() + +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + + +INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns +INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows +CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions +INTEGER :: rank = 2 ! Dataset rank +INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2) :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2) :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4r ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, n ! general purpose integers + +CALL test_begin(' Make/Read datasets (2D) ') + + +! +! Initialize the data arrays. +! +n=1 +DO i = 1, DIM1*DIM2 + buf(i) = INT(n) + n = n + 1 +END DO + +DO i = 1, dims(1) + DO j = 1, dims(2) + buf2(i,j) = INT((i-1)*dims(2) + j) + buf3(i,j) = INT((i-1)*dims(2) + j) + buf4(i,j) = INT((i-1)*dims(2) + j) + END DO +END DO + + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 2D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j), ' and ', buf2(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j), ' and ', buf3(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j), ' and ', buf4(i,j) + STOP + ENDIF + END DO +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset2D + + +!------------------------------------------------------------------------- +! test_dataset3D +!------------------------------------------------------------------------- + + +SUBROUTINE test_dataset3D() + +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 6 ! columns +INTEGER, PARAMETER :: DIM2 = 4 ! rows +INTEGER, PARAMETER :: DIM3 = 2 ! layers +CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions +INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4r ! Data buffer +INTEGER :: rank = 3 ! Dataset rank +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers +INTEGER :: type_class +INTEGER(SIZE_T) :: type_size + +CALL test_begin(' Make/Read datasets (3D) ') + + +! +! Initialize the data array. +! +n=1 +DO i = 1, DIM1*DIM2*DIM3 + buf(i) = INT(n) + n = n + 1 +END DO + +n = 1 +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + buf2(i,j,k) = INT(n) + buf3(i,j,k) = INT(n) + buf4(i,j,k) = INT(n) + n = n + 1 + END DO + END DO +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2*DIM3 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 3D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + +! +! compare dimensions +! +DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset3D + +!------------------------------------------------------------------------- +! test_datasetND +!------------------------------------------------------------------------- + + +SUBROUTINE test_datasetND(rank) + + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + INTEGER :: rank ! Dataset rank + + INTEGER, PARAMETER :: DIM1 = 2 ! columns + INTEGER, PARAMETER :: DIM2 = 4 ! rows + INTEGER, PARAMETER :: DIM3 = 2 ! layers + INTEGER, PARAMETER :: DIM4 = 5 ! columns + INTEGER, PARAMETER :: DIM5 = 4 ! rows + INTEGER, PARAMETER :: DIM6 = 3 ! layers + INTEGER, PARAMETER :: DIM7 = 2 ! layers + CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(7) :: dims + INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibuf_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibufr_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbuf_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbufr_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbuf_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbufr_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbuf_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbufr_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbuf_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbufr_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbuf_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbufr_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbuf_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbufr_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbuf_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbufr_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbuf_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbufr_7 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + CHARACTER(LEN=1) :: ichr1 + + WRITE(ichr1,'(I1.1)') rank + CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') +! +! Initialize the data array. +! + IF(rank.EQ.4)THEN + + ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + ibuf_4(i,j,k,l) = INT(nn) + rbuf_4(i,j,k,l) = INT(nn) + dbuf_4(i,j,k,l) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + + ELSE IF(rank.EQ.5)THEN + + ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + ibuf_5(i,j,k,l,m) = INT(nn) + rbuf_5(i,j,k,l,m) = INT(nn) + dbuf_5(i,j,k,l,m) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + + ELSE IF(rank.EQ.6)THEN + + ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + ibuf_6(i,j,k,l,m,n) = INT(nn) + rbuf_6(i,j,k,l,m,n) = INT(nn) + dbuf_6(i,j,k,l,m,n) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + + ELSE IF(rank.EQ.7)THEN + + ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + DO o = 1, DIM7 + ibuf_7(i,j,k,l,m,n,o) = INT(nn) + rbuf_7(i,j,k,l,m,n,o) = INT(nn) + dbuf_7(i,j,k,l,m,n,o) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + ENDDO + + ENDIF + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT ND buffer + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_5, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_5, dims(1:rank), errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_5, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_4, dims(1:rank), errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_5, dims(1:rank), errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_6, dims(1:rank), errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_7, dims(1:rank), errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_5, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_4, dims(1:rank), errcode) + ELSE IF(rank.EQ.5)THEN + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_5, dims(1:rank), errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_6, dims(1:rank), errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_7, dims(1:rank), errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! DEALLOCATE RESOURCES + + IF(rank.EQ.4)THEN + DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) + ELSE IF(rank.EQ.5)THEN + DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) + ELSE IF(rank.EQ.6)THEN + DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) + ELSE IF(rank.EQ.7)THEN + DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) + ENDIF + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasetND + + + +!------------------------------------------------------------------------- +! test_datasets +!------------------------------------------------------------------------- + +SUBROUTINE test_datasets() + + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER :: errcode ! Error flag + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + INTEGER :: rankr ! Dataset rank + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=8) :: buf1r ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1) :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer + INTEGER :: i, n ! general purpose integer + INTEGER :: has ! general purpose integer + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + LOGICAL :: path_valid ! status of the path + CHARACTER(LEN=6) :: chr_exact + CHARACTER(LEN=8) :: chr_lg + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + ! + ! Initialize the data array. + ! + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (integer) ') + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! real + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (float) ') + + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_float_f(file_id, dsetname3, rank, dims, buf3, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_float_f(file_id, dsetname3, bufr3, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (double) ') + + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (string) ') + + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. buf1r ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', buf1r + STOP + ENDIF + + CALL passed() + + CALL test_begin(' Test h5ltpath_valid_f ') + ! + ! test function h5ltpath_valid_f + ! + chr_exact = "/"//dsetname2 ! test character buffer the exact size needed + CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + chr_lg = "/"//dsetname2 ! test character buffer larger then needed + CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dataset does not exist + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Create a dangling soft link + CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) + + ! Should pass, does not check for dangled link + CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) + IF(.NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dangled link + CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) + IF(path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL passed() + + + CALL test_begin(' Get dataset dimensions/info ') + + !------------------------------------------------------------------------- + ! h5ltget_dataset_ndims_f + !------------------------------------------------------------------------- + + CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) + IF ( rankr .NE. rank ) THEN + PRINT *, 'h5ltget_dataset_ndims_f return error' + STOP + ENDIF + + + !------------------------------------------------------------------------- + ! test h5ltfind_dataset_f function + !------------------------------------------------------------------------- + + + has = h5ltfind_dataset_f(file_id,dsetname4) + IF ( has .NE. 1 ) THEN + PRINT *, 'h5ltfind_dataset_f return error' + STOP + ENDIF + + !------------------------------------------------------------------------- + ! test h5ltget_dataset_info_f function + !------------------------------------------------------------------------- + + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT + PRINT *, 'wrong type class ' + STOP + ENDIF + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasets + + + +!------------------------------------------------------------------------- +! test_attributes +!------------------------------------------------------------------------- + +SUBROUTINE test_attributes() + + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name + CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file + INTEGER(HID_T) :: file_id ! File identifier +! INTEGER(HID_T) :: file_id1 + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" + CHARACTER(LEN=8) :: bufr1 ! Data buffer + CHARACTER(LEN=10) :: bufr1_lg ! Data buffer +! CHARACTER(LEN=16) :: bufr_c ! Data buffer +! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1) :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER :: i, n ! general purpose integer + INTEGER(SIZE_T) size ! size of attribute array + INTEGER :: rankr ! rank + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER, DIMENSION(DIM1) :: buf ! Data buffer + + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + ! + ! make a dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) + + ! + ! Initialize the data array. + ! + size = DIM1 + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes int ') + + + ! + ! write attribute. + ! + CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) + + ! + ! read attribute. + ! + CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! float + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes float ') + + + ! + ! write attribute. + ! + CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) + ! + ! read attribute. + ! + CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes double ') + + ! + ! write attribute. + ! + CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4,size,errcode) + + ! + ! read attribute. + ! + CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes string ') + + ! + ! write attribute. + ! + CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) + + ! + ! read attribute into a fortran character buf that is the same size as buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. bufr1 ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1 + STOP + ENDIF + + ! + ! read attribute into a fortran character buf that is larger then buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) + + ! + ! compare read and write buffers, make sure C NULL character was removed. + ! + IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN + PRINT *, 'larger read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1_lg + STOP + ENDIF + + ! + ! ** Test reading a string that was created with a C program ** + ! + +!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) +!!$ +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) +!!$ ! +!!$ ! compare read and write buffers. +!!$ ! +!!$ IF ( bufr_c .NE. buf_c ) THEN +!!$ PRINT *, 'read buffer differs from write buffer' +!!$ PRINT *, bufr1, ' and ', buf_c +!!$ STOP +!!$ ENDIF +!!$ ! +!!$ ! read attribute into a fortran character buf that is larger then buf_c. +!!$ ! +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) +!!$ +!!$ ! +!!$ ! compare read and write buffers, make sure C NULL character was removed. +!!$ ! +!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN +!!$ PRINT *, 'larger read buffer differs from write buffer' +!!$ PRINT *, buf_c, ' and ', bufr_c_lg +!!$ STOP +!!$ ENDIF + +!!$ CALL h5fclose_f(file_id1, errcode) + + CALL passed() + + !------------------------------------------------------------------------- + ! get attribute rank + !------------------------------------------------------------------------- + + CALL test_begin(' Get attribute rank/info ') + + + CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) + + IF ( rankr .NE. 1 ) THEN + PRINT *, 'h5ltget_attribute_ndims_f return error' + STOP + ENDIF + + + CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_attributes + + + + + + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 deleted file mode 100644 index 74029a5..0000000 --- a/hl/fortran/test/tsttable.F90 +++ /dev/null @@ -1,534 +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 file contains the FORTRAN90 tests for H5LT -! -#include - -PROGRAM table_test - - CALL test_table1() - -END PROGRAM table_test - - -!------------------------------------------------------------------------- -! test_table1 -!------------------------------------------------------------------------- - -SUBROUTINE test_table1() - - USE H5TB ! module of H5TB - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields - INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords - CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset - INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types - INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size - INTEGER, PARAMETER :: compress = 0 ! compress - INTEGER :: errcode = 0 ! Error flag - INTEGER :: i ! general purpose integer - INTEGER(SIZE_T) :: type_size ! Size of the datatype - INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) - INTEGER(SIZE_T) :: offset ! Member's offset - INTEGER(HSIZE_T) :: start = 0 ! start record - INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer - INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer - REAL, DIMENSION(nrecords) :: bufr ! Data buffer - REAL, DIMENSION(nrecords) :: bufrr ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer - INTEGER(HSIZE_T) :: nfieldsr ! nfields - INTEGER(HSIZE_T) :: nrecordsr ! nrecords - CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes - INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype - INTEGER :: maxlen = 0 ! max chararter length of a field name - INTEGER :: Cs_sizeof_double = H5_SIZEOF_DOUBLE ! C's sizeof double - INTEGER :: SIZEOF_X - LOGICAL :: Exclude_double - - ! Find size of DOUBLE PRECISION -#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SIZEOF_X = storage_size(bufd(1))/storage_size(c_char_'a') -#else - SIZEOF_X = SIZEOF(bufd(1)) -#endif - - ! If Fortran DOUBLE PRECISION and C DOUBLE sizeofs don't match then disable - ! creating a DOUBLE RECISION field, and instead create a REAL field. This - ! is needed to handle when DOUBLE PRECISION is promoted via a compiler flag. - Exclude_double = .FALSE. - IF(Cs_sizeof_double.NE.SIZEOF_X)THEN - Exclude_double = .TRUE. - ENDIF - - ! - ! Initialize the data arrays. - ! - DO i = 1, nrecords - bufi(i) = i - bufr(i) = i - bufd(i) = i - END DO - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - - !------------------------------------------------------------------------- - ! make table - ! initialize the table parameters - !------------------------------------------------------------------------- - - field_names(1) = "field1" - field_names(2) = "field2a" - field_names(3) = "field3ab" - field_names(4) = "field4abc" - - ! - ! calculate total size by calculating sizes of each member - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) - type_size = 2 - CALL h5tset_size_f(type_id_c, type_size, errcode) - CALL h5tget_size_f(type_id_c, type_sizec, errcode) - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) - IF(exclude_double)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL, type_sized, errcode) - ELSE - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) - ENDIF - CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) - type_size = type_sizec + type_sizei + type_sized + type_sizer - - ! - ! type ID's - ! - field_types(1) = type_id_c - field_types(2) = H5T_NATIVE_INTEGER - IF(exclude_double)THEN - field_types(3) = H5T_NATIVE_REAL - ELSE - field_types(3) = H5T_NATIVE_DOUBLE - ENDIF - field_types(4) = H5T_NATIVE_REAL - - ! - ! offsets - ! - offset = 0 - field_offset(1) = offset - offset = offset + type_sizec ! Offset of the second memeber is 2 - field_offset(2) = offset - offset = offset + type_sizei ! Offset of the second memeber is 6 - field_offset(3) = offset - offset = offset + type_sized ! Offset of the second memeber is 14 - field_offset(4) = offset - - !------------------------------------------------------------------------- - ! make table - !------------------------------------------------------------------------- - - CALL test_begin(' Make table ') - - CALL h5tbmake_table_f(dsetname1,& - file_id,& - dsetname1,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - CALL passed() - - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by name ') - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufi,errcode) - IF(exclude_double)THEN - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufr,errcode) - ELSE - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufd,errcode) - ENDIF - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufr,errcode) - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - ! Read an invalid field, should fail - CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& - bufsr,errcode) - - IF(errcode.GE.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! Read a valid field, should pass - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufsr,errcode) - IF(errcode.LT.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufir,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - - IF(exclude_double)THEN - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - ELSE - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - ENDIF - - - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by index ') - - CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufi,errcode) - - IF(exclude_double)THEN - CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufr,errcode) - ELSE - CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufd,errcode) - ENDIF - - CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufr,errcode) - - - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufsr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufir,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - IF(exclude_double)THEN - CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - ELSE - CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - ENDIF - - CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - - !------------------------------------------------------------------------- - ! Insert field - ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) - !------------------------------------------------------------------------- - - CALL test_begin(' Insert field ') - - CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) - CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& - bufrr,errcode) - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - !------------------------------------------------------------------------- - ! Delete field - !------------------------------------------------------------------------- - - CALL test_begin(' Delete field ') - - CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) - - CALL passed() - - - !------------------------------------------------------------------------- - ! Gets the number of records and fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get table info ') - - CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) - - IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN - PRINT *, 'h5tbget_table_info_f return error' - STOP - ENDIF - - CALL passed() - - !------------------------------------------------------------------------- - ! Get information about fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get fields info ') - - CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& - field_offsetr, type_sizeout, errcode, maxlen ) - - IF ( errcode.NE.0 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') - STOP - ENDIF - - ! "field4abc" was deleted and "field5" was added. - field_names(4) = "field5" - - IF ( maxlen .NE. 8 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') - WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 - STOP - ENDIF - - DO i = 1, nfields - IF ( field_namesr(i) .NE. field_names(i)) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') - WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! end - !------------------------------------------------------------------------- - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! - ! end function. - ! -END SUBROUTINE test_table1 - - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed - - diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90 new file mode 100644 index 0000000..bb88abf --- /dev/null +++ b/hl/fortran/test/tsttable.f90 @@ -0,0 +1,466 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +PROGRAM table_test + + CALL test_table1() + + +END PROGRAM table_test + + +!------------------------------------------------------------------------- +! test_table1 +!------------------------------------------------------------------------- + +SUBROUTINE test_table1() + + USE H5TB ! module of H5TB + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields + INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords + CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset + INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types + INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size + INTEGER, PARAMETER :: compress = 0 ! compress + INTEGER :: errcode = 0 ! Error flag + INTEGER :: i ! general purpose integer + INTEGER(SIZE_T) :: type_size ! Size of the datatype + INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) + INTEGER(SIZE_T) :: offset ! Member's offset + INTEGER(HSIZE_T) :: start = 0 ! start record + INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer + INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer + REAL, DIMENSION(nrecords) :: bufr ! Data buffer + REAL, DIMENSION(nrecords) :: bufrr ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer + INTEGER(HSIZE_T) :: nfieldsr ! nfields + INTEGER(HSIZE_T) :: nrecordsr ! nrecords + CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes + INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype + INTEGER :: maxlen = 0 ! max chararter length of a field name + + + ! + ! Initialize the data arrays. + ! + DO i = 1, nrecords + bufi(i) = i + bufr(i) = i + bufd(i) = i + END DO + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + + !------------------------------------------------------------------------- + ! make table + ! initialize the table parameters + !------------------------------------------------------------------------- + + field_names(1) = "field1" + field_names(2) = "field2a" + field_names(3) = "field3ab" + field_names(4) = "field4abc" + + ! + ! calculate total size by calculating sizes of each member + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) + type_size = 2 + CALL h5tset_size_f(type_id_c, type_size, errcode) + CALL h5tget_size_f(type_id_c, type_sizec, errcode) + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) + CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) + type_size = type_sizec + type_sizei + type_sized + type_sizer + + ! + ! type ID's + ! + field_types(1) = type_id_c + field_types(2) = H5T_NATIVE_INTEGER + field_types(3) = H5T_NATIVE_DOUBLE + field_types(4) = H5T_NATIVE_REAL + + ! + ! offsets + ! + offset = 0 + field_offset(1) = offset + offset = offset + type_sizec ! Offset of the second memeber is 2 + field_offset(2) = offset + offset = offset + type_sizei ! Offset of the second memeber is 6 + field_offset(3) = offset + offset = offset + type_sized ! Offset of the second memeber is 14 + field_offset(4) = offset + + !------------------------------------------------------------------------- + ! make table + !------------------------------------------------------------------------- + + CALL test_begin(' Make table ') + + CALL h5tbmake_table_f(dsetname1,& + file_id,& + dsetname1,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + CALL passed() + + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by name ') + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufi,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufd,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufr,errcode) + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + ! Read an invalid field, should fail + CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& + bufsr,errcode) + + IF(errcode.GE.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! Read a valid field, should pass + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufsr,errcode) + IF(errcode.LT.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufir,errcode) + + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by index ') + + CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufi,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufd,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufr,errcode) + + + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufsr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufir,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + + !------------------------------------------------------------------------- + ! Insert field + ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) + !------------------------------------------------------------------------- + + CALL test_begin(' Insert field ') + + CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) + CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& + bufrr,errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + !------------------------------------------------------------------------- + ! Delete field + !------------------------------------------------------------------------- + + CALL test_begin(' Delete field ') + + CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) + + CALL passed() + + + !------------------------------------------------------------------------- + ! Gets the number of records and fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get table info ') + + CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) + + IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN + PRINT *, 'h5tbget_table_info_f return error' + STOP + ENDIF + + CALL passed() + + !------------------------------------------------------------------------- + ! Get information about fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get fields info ') + + CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& + field_offsetr, type_sizeout, errcode, maxlen ) + + IF ( errcode.NE.0 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') + STOP + ENDIF + + ! "field4abc" was deleted and "field5" was added. + field_names(4) = "field5" + + IF ( maxlen .NE. 8 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') + WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 + STOP + ENDIF + + DO i = 1, nfields + IF ( field_namesr(i) .NE. field_names(i)) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') + WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! end + !------------------------------------------------------------------------- + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! + ! end function. + ! +END SUBROUTINE test_table1 + + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed + + diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 8039d15..d5b0b1e 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -166,7 +165,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -451,21 +450,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -475,12 +467,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -522,18 +515,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 4614152..6fc324b 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -112,8 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = test_lite$(EXEEXT) test_image$(EXEEXT) \ @@ -169,7 +168,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -488,21 +487,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -512,12 +504,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -559,18 +552,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 653c273..77049d3 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -106,8 +106,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -450,21 +449,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -474,12 +466,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -521,18 +514,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 6ebf126..3da84e1 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h52giftest.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -151,7 +150,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -464,21 +463,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -488,12 +480,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -535,18 +528,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index b7ce048..cda2fee 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -63,20 +63,6 @@ dnl was required" problem when libtool is also used dnl [1] MPICH.org dnl -dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" - -AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[ - HAVE_ISO_FORTRAN_ENV="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV]) - AC_LINK_IFELSE([AC_LANG_SOURCE([ - PROGRAM main - USE, INTRINSIC :: ISO_FORTRAN_ENV - END PROGRAM - ])],[AC_MSG_RESULT([yes]) - HAVE_ISO_FORTRAN_ENV="yes"], - [AC_MSG_RESULT([no])]) -]) - dnl See if the fortran compiler supports the intrinsic function "SIZEOF" AC_DEFUN([PAC_PROG_FC_SIZEOF],[ @@ -125,56 +111,38 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) -dnl Check to see C_LONG_DOUBLE is available - -AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ - HAVE_C_LONG_DOUBLE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_LONG_DOUBLE]) - AC_LINK_IFELSE([AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - REAL(KIND=C_LONG_DOUBLE) :: d - END PROGRAM - ])], [AC_MSG_RESULT([yes]) - HAVE_C_LONG_DOUBLE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) -]) - -dnl Check if C_LONG_DOUBLE is different from C_DOUBLE +dnl Check to see if -r8 was specified to determine if we need to +dnl compile the DOUBLE PRECISION interfaces. -if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then -AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" - AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) +AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ + FORTRAN_DEFAULT_REALisDBLE="no" + AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ MODULE type_mod - USE ISO_C_BINDING INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double + MODULE PROCEDURE h5t_real + MODULE PROCEDURE h5t_dble END INTERFACE CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double + SUBROUTINE h5t_real(r) + REAL :: r + END SUBROUTINE h5t_real + SUBROUTINE h5t_dble(d) + DOUBLE PRECISION :: d + END SUBROUTINE h5t_dble END MODULE type_mod PROGRAM main - USE ISO_C_BINDING USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d + REAL :: r + DOUBLE PRECISION :: d CALL h5t(r) CALL h5t(d) END PROGRAM main - ])], [AC_MSG_RESULT([yes]) - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) + ])], [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + FORTRAN_DEFAULT_REALisDBLE="yes"]) ]) -fi dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. @@ -184,6 +152,7 @@ AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ dnl -------------------------------------------------------------------- dnl Default for FORTRAN 2003 compliant compilers dnl + HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ @@ -311,280 +280,4 @@ dnl Try link a simple MPI program. dnl Change to the C language AC_LANG_POP(Fortran) ]) - -dnl ------------------------------------------------------ -dnl Determine the available KINDs for REALs and INTEGERs -dnl ------------------------------------------------------ -dnl -dnl This is a runtime test. -dnl -AC_DEFUN([PAC_FC_AVAIL_KINDS],[ -AC_LANG_PUSH([Fortran]) -rm -f pac_fconftest.out - -AC_RUN_IFELSE([ - AC_LANG_SOURCE([ - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE='pac_fconftest.out', form='formatted') - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END - ]) -],[ - if test -s pac_fconftest.out ; then - dnl The output from the above program will be: - dnl -- LINE 1 -- valid integer kinds (comma seperated list) - dnl -- LINE 2 -- valid real kinds (comma seperated list) - dnl -- LINE 3 -- max decimal precision for reals - dnl -- LINE 4 -- number of valid integer kinds - dnl -- LINE 5 -- number of valid real kinds - - pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" - pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" - PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" - AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) - - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" - - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) - AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs]) - - AC_MSG_CHECKING([for Fortran INTEGER KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) - AC_MSG_CHECKING([for Fortran REAL KINDs]) - AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) - AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) - AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) - else - AC_MSG_RESULT([Error]) - AC_MSG_WARN([No output from test program!]) - fi - rm -f pac_fconftest.out -],[ - AC_MSG_RESULT([Error]) - AC_MSG_WARN([Failed to run program to determine available KINDs]) -],[]) - -AC_LANG_POP([Fortran]) -]) -AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) -AC_LANG_PUSH([Fortran]) -pack_int_sizeof="" -rm -f pac_fconftest.out - -for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER (KIND=$kind) a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END - ]) - ]) - AC_RUN_IFELSE([],[ - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_int_sizeof="$pack_int_sizeof $sizes," - else - AC_MSG_WARN([No output from test program!]) - fi - rm -f pac_fconftest.out - ],[ - AC_MSG_WARN([Fortran program fails to build or run!]) - ],[ - pack_int_sizeof="$2" - ]) -done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" -AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of available REAL KINDs]) -AC_LANG_PUSH([Fortran]) -pack_real_sizeof="" -rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - REAL (KIND=$kind) :: a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END - ]) - ]) - AC_RUN_IFELSE([],[ - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_real_sizeof="$pack_real_sizeof $sizes," - else - AC_MSG_WARN([No output from test program!]) - fi - rm -f pac_fconftest.out - ],[ - AC_MSG_WARN([Fortran program fails to build or run!]) - ],[ - pack_real_sizeof="$2" - ]) -done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" -AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_NATIVE_INTEGER],[ -AC_REQUIRE([PAC_FC_AVAIL_KINDS]) -AC_MSG_CHECKING([sizeof of native KINDS]) -AC_LANG_PUSH([Fortran]) -pack_int_sizeof="" -rm -f pac_fconftest.out - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER a - REAL b - DOUBLE PRECISION c - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,*) $FC_SIZEOF_A - WRITE(8,*) kind(a) - WRITE(8,*) $FC_SIZEOF_B - WRITE(8,*) kind(b) - WRITE(8,*) $FC_SIZEOF_C - WRITE(8,*) kind(c) - CLOSE(8) - END - ]) - ]) - AC_RUN_IFELSE([],[ - if test -s pac_fconftest.out ; then - PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" - else - AC_MSG_WARN([No output from test program!]) - fi - rm -f pac_fconftest.out - ],[ - AC_MSG_WARN([Fortran program fails to build or run!]) - ],[ - pack_int_sizeof="$2" - ]) -AC_MSG_RESULT([$pack_int_sizeof]) -AC_LANG_POP([Fortran]) -]) - -AC_DEFUN([PAC_FC_LDBL_DIG],[ -AC_MSG_CHECKING([maximum decimal precision for C]) -rm -f pac_Cconftest.out - AC_LANG_CONFTEST([ - AC_LANG_PROGRAM([ - #include - #include - #define CHECK_FLOAT128 $ac_cv_sizeof___float128 - #if CHECK_FLOAT128!=0 - # if $HAVE_QUADMATH!=0 - #include - # endif - # ifdef FLT128_DIG - #define C_FLT128_DIG FLT128_DIG - # else - #define C_FLT128_DIG 0 - # endif - #else - #define C_FLT128_DIG 0 - #endif - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define C_LDBL_DIG DECIMAL_DIG - #else - #define C_LDBL_DIG LDBL_DIG - #endif - ],[[ - FILE * pFile; - pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); - ]]) - ]) - AC_RUN_IFELSE([],[ - if test -s pac_Cconftest.out ; then - LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" - FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" - else - AC_MSG_WARN([No output from test program!]) - fi - rm -f pac_Cconftest.out - ],[ - AC_MSG_ERROR([C program fails to build or run!]) - ],[]) -]) - - diff --git a/src/H5config.h.in b/src/H5config.h.in index ad8dcf9..c0f4466 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -30,39 +30,6 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #undef FC_FUNC_ -/* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */ -#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE - -/* Define if we have Fortran C_LONG_DOUBLE */ -#undef FORTRAN_HAVE_C_LONG_DOUBLE - -/* Define if we have Fortran intrinsic C_SIZEOF */ -#undef FORTRAN_HAVE_C_SIZEOF - -/* Define if we have Fortran intrinsic SIZEOF */ -#undef FORTRAN_HAVE_SIZEOF - -/* Define if we have Fortran intrinsic STORAGE_SIZE */ -#undef FORTRAN_HAVE_STORAGE_SIZE - -/* Determine the size of C long double */ -#undef FORTRAN_SIZEOF_LONG_DOUBLE - -/* Define valid Fortran INTEGER KINDs */ -#undef H5CONFIG_F_IKIND - -/* Define number of valid Fortran INTEGER KINDs */ -#undef H5CONFIG_F_NUM_IKIND - -/* Define number of valid Fortran REAL KINDs */ -#undef H5CONFIG_F_NUM_RKIND - -/* Define valid Fortran REAL KINDs */ -#undef H5CONFIG_F_RKIND - -/* Define valid Fortran REAL KINDs Sizeof */ -#undef H5CONFIG_F_RKIND_SIZEOF - /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -115,9 +82,6 @@ /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP -/* Determine if __float128 is available */ -#undef HAVE_FLOAT128 - /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK @@ -148,9 +112,6 @@ /* Define if the compiler understands the __FUNCTION__ keyword */ #undef HAVE_FUNCTION -/* Determine if INTEGER*16 is available */ -#undef HAVE_Fortran_INTEGER_SIZEOF_16 - /* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ #undef HAVE_GETCONSOLESCREENBUFFERINFO @@ -251,9 +212,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H -/* Define to 1 if you have the header file. */ -#undef HAVE_QUADMATH_H - /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM @@ -460,12 +418,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Determine the maximum decimal precision in C */ -#undef PAC_C_MAX_REAL_PRECISION - -/* Define Fortran Maximum Real Decimal Precision */ -#undef PAC_FC_MAX_REAL_PRECISION - /* Width for printf() for type `long long' or `__int64', use `ll' */ #undef PRINTF_LL_WIDTH @@ -583,12 +535,6 @@ /* The size of `unsigned', as computed by sizeof. */ #undef SIZEOF_UNSIGNED -/* The size of `_Quad', as computed by sizeof. */ -#undef SIZEOF__QUAD - -/* The size of `__float128', as computed by sizeof. */ -#undef SIZEOF___FLOAT128 - /* The size of `__int64', as computed by sizeof. */ #undef SIZEOF___INT64 diff --git a/src/Makefile.in b/src/Makefile.in index 5f2ef19..8a60a77 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -114,7 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = H5config.h $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = H5config.h CONFIG_CLEAN_FILES = libhdf5.settings CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -228,7 +228,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -513,21 +513,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -537,12 +530,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -584,18 +578,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 2355543..1eed645 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -39,6 +39,7 @@ Languages: ---------- Fortran: @HDF_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HAVE_FORTRAN_2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index d3f1b86..8b36650 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -120,8 +120,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ testlibinfo.sh testlinks_env.sh test_plugin.sh CONFIG_CLEAN_VPATH_FILES = @@ -536,7 +535,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -856,21 +855,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -880,12 +872,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -927,18 +920,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 5797dfc..dc339cd 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -108,8 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = t_mpi$(EXEEXT) testphdf5$(EXEEXT) t_cache$(EXEEXT) \ @@ -171,7 +170,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -483,21 +482,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -507,12 +499,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -554,18 +547,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 0f5684d..974e6b4 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -106,8 +106,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -450,21 +449,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -474,12 +466,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -521,18 +514,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 1b50662..e128cfe 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5copy.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -144,7 +143,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -458,21 +457,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -482,12 +474,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -529,18 +522,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 7b4d121..c95967d 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5diff.sh testph5diff.sh CONFIG_CLEAN_VPATH_FILES = @BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = ph5diff$(EXEEXT) @@ -149,7 +148,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -465,21 +464,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -489,12 +481,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -536,18 +529,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 9865e3a..7371adf 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -150,7 +149,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -464,21 +463,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -488,12 +480,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -535,18 +528,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index d6e784a..0778fc2 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5importtestutil.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -144,7 +143,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -458,21 +457,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -482,12 +474,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -529,18 +522,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index c915437..ed8151f 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -110,8 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5jam.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -158,7 +157,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -470,21 +469,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -494,12 +486,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -541,18 +534,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 8fb9822..c77784e 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -109,8 +109,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5ls.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -138,7 +137,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -450,21 +449,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -474,12 +466,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -521,18 +514,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index c0b6685..6d1bfd6 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -113,8 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5repack.sh h5repack_plugin.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -193,7 +192,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -482,21 +481,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -506,12 +498,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -553,18 +546,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 6bf37f3..1bbefe9 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -111,8 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testh5stat.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -173,7 +172,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -460,21 +459,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -484,12 +476,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -531,18 +524,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index fcfb019..0b531b3 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -108,8 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -136,7 +135,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -447,21 +446,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -471,12 +463,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -518,18 +511,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 2688e8d..1b8e0eb 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -112,8 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -196,7 +195,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -485,21 +484,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -509,12 +501,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -556,18 +549,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 4804533..325bc4d 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -116,8 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc +CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -172,7 +171,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -489,21 +488,14 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ +FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -513,12 +505,13 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -560,18 +553,6 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -- cgit v0.12 From caf0e7692a2f3cf0f2d0957c30a404e6c706d3df Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 11 Aug 2015 09:35:30 -0500 Subject: [svn-r27493] Trying again to merge the F2003_v1.10 branch to the trunk. Tested: h5committest --PASSED-- --- CMakeLists.txt | 1 + MANIFEST | 174 +- Makefile.in | 27 +- c++/Makefile.in | 27 +- c++/examples/Makefile.in | 27 +- c++/src/Makefile.in | 29 +- c++/test/Makefile.in | 29 +- config/cmake/ConfigureChecks.cmake | 11 + config/cmake/H5pubconf.h.in | 12 + config/cmake/HDF518_Examples.cmake.in | 3 +- config/cmake/HDF5UseFortran.cmake | 491 + config/cmake/hdf5-config.cmake.in | 1 - config/cmake/libhdf5.settings.cmake.in | 1 - config/cmake/mccacheinit.cmake | 2 - configure | 32195 ++++++++++--------- configure.ac | 295 +- examples/Makefile.in | 27 +- fortran/Makefile.in | 27 +- fortran/doc/DevelGuide/masterindex.html | 589 - fortran/doc/DevelGuide/robo_functions.html | 39 - fortran/doc/DevelGuide/robo_modules.html | 117 - fortran/doc/DevelGuide/robo_programs.html | 39 - fortran/doc/DevelGuide/robo_sourcefiles.html | 309 - fortran/doc/DevelGuide/robo_subroutines.html | 421 - fortran/doc/DevelGuide/robodoc.css | 302 - fortran/doc/DevelGuide/src/H5Af_c.html | 41 - fortran/doc/DevelGuide/src/H5Aff_F03_f90.html | 130 - fortran/doc/DevelGuide/src/H5Aff_F90_f90.html | 56 - fortran/doc/DevelGuide/src/H5Aff_f90.html | 1102 - fortran/doc/DevelGuide/src/H5Df_c.html | 41 - fortran/doc/DevelGuide/src/H5Dff_F03_f90.html | 138 - fortran/doc/DevelGuide/src/H5Dff_F90_f90.html | 116 - fortran/doc/DevelGuide/src/H5Dff_f90.html | 506 - fortran/doc/DevelGuide/src/H5Ef_c.html | 41 - fortran/doc/DevelGuide/src/H5Eff_f90.html | 197 - fortran/doc/DevelGuide/src/H5FDmpiof_c.html | 41 - fortran/doc/DevelGuide/src/H5FDmpioff_f90.html | 253 - fortran/doc/DevelGuide/src/H5Ff_c.html | 41 - fortran/doc/DevelGuide/src/H5Fff_f90.html | 653 - fortran/doc/DevelGuide/src/H5Gf_c.html | 41 - fortran/doc/DevelGuide/src/H5Gff_f90.html | 840 - fortran/doc/DevelGuide/src/H5If_c.html | 41 - fortran/doc/DevelGuide/src/H5Iff_f90.html | 304 - fortran/doc/DevelGuide/src/H5Lf_c.html | 41 - fortran/doc/DevelGuide/src/H5Lff_F03_f90.html | 181 - fortran/doc/DevelGuide/src/H5Lff_F90_f90.html | 50 - fortran/doc/DevelGuide/src/H5Lff_f90.html | 637 - fortran/doc/DevelGuide/src/H5Of_c.html | 41 - fortran/doc/DevelGuide/src/H5Off_f90.html | 198 - fortran/doc/DevelGuide/src/H5Pf_c.html | 41 - fortran/doc/DevelGuide/src/H5Pff_F03_f90.html | 832 - fortran/doc/DevelGuide/src/H5Pff_F90_f90.html | 715 - fortran/doc/DevelGuide/src/H5Pff_f90.html | 4752 --- fortran/doc/DevelGuide/src/H5Rf_c.html | 41 - fortran/doc/DevelGuide/src/H5Rff_F03_f90.html | 492 - fortran/doc/DevelGuide/src/H5Rff_F90_f90.html | 305 - fortran/doc/DevelGuide/src/H5Rff_f90.html | 148 - fortran/doc/DevelGuide/src/H5Sf_c.html | 41 - fortran/doc/DevelGuide/src/H5Sff_f90.html | 1165 - fortran/doc/DevelGuide/src/H5Tf_c.html | 41 - fortran/doc/DevelGuide/src/H5Tff_f90.html | 2378 -- fortran/doc/DevelGuide/src/H5Zf_c.html | 41 - fortran/doc/DevelGuide/src/H5Zff_f90.html | 173 - .../src/H5_DBLE_InterfaceExclude_f90.html | 53 - .../src/H5_DBLE_InterfaceInclude_f90.html | 54 - fortran/doc/DevelGuide/src/H5_f_c.html | 41 - fortran/doc/DevelGuide/src/H5_ff_F03_f90.html | 83 - fortran/doc/DevelGuide/src/H5_ff_F90_f90.html | 48 - fortran/doc/DevelGuide/src/H5_ff_f90.html | 269 - fortran/doc/DevelGuide/src/H5f90global_f90.html | 61 - fortran/doc/DevelGuide/src/H5f90kit_c.html | 44 - fortran/doc/DevelGuide/src/H5match_types_c.html | 49 - .../doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html | 61 - fortran/doc/DevelGuide/src/H5test_kind_f90.html | 62 - fortran/doc/DevelGuide/src/HDF5_f90.html | 47 - fortran/doc/DevelGuide/src/HDF5mpio_f90.html | 45 - fortran/doc/DevelGuide/test/fflush1_f90.html | 47 - fortran/doc/DevelGuide/test/fflush2_f90.html | 47 - .../DevelGuide/test/fortranlib_test_1_8_f90.html | 44 - .../DevelGuide/test/fortranlib_test_F03_f90.html | 45 - .../doc/DevelGuide/test/fortranlib_test_f90.html | 44 - fortran/doc/DevelGuide/test/tF2003_f90.html | 53 - fortran/doc/DevelGuide/test/tH5A_1_8_f90.html | 51 - fortran/doc/DevelGuide/test/tH5A_f90.html | 47 - fortran/doc/DevelGuide/test/tH5D_f90.html | 52 - fortran/doc/DevelGuide/test/tH5E_f90.html | 51 - fortran/doc/DevelGuide/test/tH5F_f90.html | 47 - fortran/doc/DevelGuide/test/tH5G_1_8_f90.html | 49 - fortran/doc/DevelGuide/test/tH5G_f90.html | 47 - fortran/doc/DevelGuide/test/tH5I_f90.html | 47 - fortran/doc/DevelGuide/test/tH5O_f90.html | 47 - fortran/doc/DevelGuide/test/tH5P_f90.html | 47 - fortran/doc/DevelGuide/test/tH5R_f90.html | 51 - fortran/doc/DevelGuide/test/tH5S_f90.html | 54 - fortran/doc/DevelGuide/test/tH5Sselect_f90.html | 56 - fortran/doc/DevelGuide/test/tH5T_f90.html | 47 - fortran/doc/DevelGuide/test/tH5VL_f90.html | 47 - fortran/doc/DevelGuide/test/tH5Z_f90.html | 47 - fortran/doc/DevelGuide/test/t_c.html | 44 - fortran/doc/DevelGuide/test/tf_f90.html | 48 - fortran/doc/DevelGuide/toc_index.html | 552 - fortran/examples/CMakeLists.txt | 54 +- fortran/examples/Makefile.am | 12 +- fortran/examples/Makefile.in | 51 +- fortran/examples/nested_derived_type.f90 | 12 +- fortran/examples/rwdset_fortran2003.f90 | 24 +- fortran/src/CMakeLists.txt | 239 +- fortran/src/H5Af.c | 1478 +- fortran/src/H5Aff.F90 | 1873 ++ fortran/src/H5Aff.f90 | 1673 - fortran/src/H5Aff_F03.f90 | 1267 - fortran/src/H5Aff_F90.f90 | 1618 - fortran/src/H5Df.c | 1658 +- fortran/src/H5Dff.F90 | 1878 ++ fortran/src/H5Dff.f90 | 1035 - fortran/src/H5Dff_F03.f90 | 2389 -- fortran/src/H5Dff_F90.f90 | 3004 -- fortran/src/H5Ef.c | 65 +- fortran/src/H5Eff.F90 | 302 + fortran/src/H5Eff.f90 | 251 - fortran/src/H5Eff_F03.f90 | 108 - fortran/src/H5Eff_F90.f90 | 89 - fortran/src/H5FDmpiof.c | 258 - fortran/src/H5FDmpioff.f90 | 212 - fortran/src/H5Ff.c | 238 +- fortran/src/H5Fff.F90 | 871 + fortran/src/H5Fff.f90 | 834 - fortran/src/H5Fff_F03.f90 | 99 - fortran/src/H5Fff_F90.f90 | 43 - fortran/src/H5Gf.c | 393 +- fortran/src/H5Gff.F90 | 1272 + fortran/src/H5Gff.f90 | 1331 - fortran/src/H5If.c | 104 +- fortran/src/H5Iff.F90 | 345 + fortran/src/H5Iff.f90 | 352 - fortran/src/H5Lf.c | 324 +- fortran/src/H5Lff.F90 | 1478 + fortran/src/H5Lff.f90 | 1300 - fortran/src/H5Lff_F03.f90 | 242 - fortran/src/H5Lff_F90.f90 | 39 - fortran/src/H5Of.c | 86 +- fortran/src/H5Off.F90 | 1149 + fortran/src/H5Off.f90 | 775 - fortran/src/H5Off_F03.f90 | 435 - fortran/src/H5Off_F90.f90 | 39 - fortran/src/H5Pf.c | 2655 +- fortran/src/H5Pff.F90 | 7327 +++++ fortran/src/H5Pff.f90 | 6400 ---- fortran/src/H5Pff_F03.f90 | 1267 - fortran/src/H5Pff_F90.f90 | 949 - fortran/src/H5Rf.c | 338 +- fortran/src/H5Rff.F90 | 792 + fortran/src/H5Rff.f90 | 128 - fortran/src/H5Rff_F03.f90 | 719 - fortran/src/H5Rff_F90.f90 | 514 - fortran/src/H5Sf.c | 554 +- fortran/src/H5Sff.F90 | 1754 + fortran/src/H5Sff.f90 | 1875 -- fortran/src/H5Tf.c | 681 +- fortran/src/H5Tff.F90 | 3082 ++ fortran/src/H5Tff.f90 | 3105 -- fortran/src/H5Tff_F03.f90 | 223 - fortran/src/H5Tff_F90.f90 | 95 - fortran/src/H5Zf.c | 44 +- fortran/src/H5Zff.F90 | 189 + fortran/src/H5Zff.f90 | 198 - fortran/src/H5_DBLE_InterfaceExclude.f90 | 39 - fortran/src/H5_DBLE_InterfaceInclude.f90 | 1859 -- fortran/src/H5_buildiface.F90 | 1024 + fortran/src/H5_f.c | 275 +- fortran/src/H5_ff.F90 | 451 + fortran/src/H5_ff.f90 | 409 - fortran/src/H5_ff_F03.f90 | 75 - fortran/src/H5_ff_F90.f90 | 34 - fortran/src/H5config_f.inc.cmake | 84 + fortran/src/H5config_f.inc.in | 59 + fortran/src/H5f90global.F90 | 1040 + fortran/src/H5f90global.f90 | 947 - fortran/src/H5f90kit.c | 32 +- fortran/src/H5f90proto.h | 1468 +- fortran/src/H5fort_type_defines.h.in | 16 + fortran/src/H5match_types.c | 577 +- fortran/src/H5test_kind.f90 | 269 - fortran/src/H5test_kind_SIZEOF.f90 | 228 - fortran/src/H5test_kind_STORAGE_SIZE.f90 | 230 - fortran/src/HDF5.F90 | 46 + fortran/src/HDF5.f90 | 56 - fortran/src/HDF5mpio.f90 | 55 - fortran/src/Makefile.am | 157 +- fortran/src/Makefile.in | 306 +- fortran/src/hdf5_fortrandll.def.in | 272 +- fortran/test/CMakeLists.txt | 143 +- fortran/test/H5_test_buildiface.F90 | 306 + fortran/test/Makefile.am | 61 +- fortran/test/Makefile.in | 224 +- fortran/test/fflush2.f90 | 297 +- fortran/test/tH5A.f90 | 19 +- fortran/test/tH5A_1_8.f90 | 177 +- fortran/test/tH5D.f90 | 950 +- fortran/test/tH5E_F03.f90 | 19 +- fortran/test/tH5F_F03.f90 | 13 +- fortran/test/tH5G_1_8.f90 | 207 +- fortran/test/tH5I.f90 | 10 +- fortran/test/tH5L_F03.f90 | 27 +- fortran/test/tH5MISC_1_8.f90 | 53 +- fortran/test/tH5O.f90 | 56 +- fortran/test/tH5O_F03.f90 | 4 +- fortran/test/tH5P.f90 | 71 +- fortran/test/tH5P_F03.f90 | 65 +- fortran/test/tH5R.f90 | 37 +- fortran/test/tH5S.f90 | 6 +- fortran/test/tH5Sselect.f90 | 219 +- fortran/test/tH5T.f90 | 259 +- fortran/test/tH5T_F03.F90 | 3425 ++ fortran/test/tH5T_F03.f90 | 3453 -- fortran/test/tH5VL.f90 | 30 +- fortran/test/tHDF5.f90 | 1 + fortran/test/tf.F90 | 412 + fortran/test/tf.f90 | 393 - fortran/test/tf_F03.f90 | 128 - fortran/test/tf_F08.f90 | 128 - fortran/test/tf_F90.f90 | 33 - fortran/testpar/Makefile.in | 29 +- hl/Makefile.in | 27 +- hl/c++/Makefile.in | 27 +- hl/c++/examples/Makefile.in | 27 +- hl/c++/src/Makefile.in | 29 +- hl/c++/test/Makefile.in | 29 +- hl/examples/Makefile.in | 27 +- hl/fortran/Makefile.in | 27 +- hl/fortran/examples/Makefile.in | 27 +- hl/fortran/src/CMakeLists.txt | 72 +- hl/fortran/src/H5DSfc.c | 36 +- hl/fortran/src/H5DSff.F90 | 518 + hl/fortran/src/H5DSff.f90 | 545 - hl/fortran/src/H5HL_buildiface.F90 | 683 + hl/fortran/src/H5IMfc.c | 24 +- hl/fortran/src/H5IMff.F90 | 667 + hl/fortran/src/H5IMff.f90 | 783 - hl/fortran/src/H5LTf90proto.h | 1380 +- hl/fortran/src/H5LTfc.c | 1428 +- hl/fortran/src/H5LTff.F90 | 1912 ++ hl/fortran/src/H5LTff.f90 | 6490 ---- hl/fortran/src/H5TBfc.c | 307 +- hl/fortran/src/H5TBff.F90 | 848 + hl/fortran/src/H5TBff.f90 | 1900 -- hl/fortran/src/Makefile.am | 36 +- hl/fortran/src/Makefile.in | 148 +- hl/fortran/src/hdf5_hl_fortrandll.def.in | 88 + hl/fortran/test/CMakeLists.txt | 16 +- hl/fortran/test/Makefile.am | 8 +- hl/fortran/test/Makefile.in | 68 +- hl/fortran/test/tstds.F90 | 353 + hl/fortran/test/tstds.f90 | 353 - hl/fortran/test/tstimage.F90 | 339 + hl/fortran/test/tstimage.f90 | 339 - hl/fortran/test/tstlite.F90 | 1719 + hl/fortran/test/tstlite.f90 | 1628 - hl/fortran/test/tsttable.F90 | 534 + hl/fortran/test/tsttable.f90 | 466 - hl/src/Makefile.in | 29 +- hl/test/Makefile.in | 29 +- hl/tools/Makefile.in | 27 +- hl/tools/gif2h5/Makefile.in | 29 +- m4/aclocal_fc.m4 | 345 +- src/H5config.h.in | 54 + src/Makefile.in | 28 +- src/libhdf5.settings.in | 1 - test/Makefile.in | 29 +- testpar/Makefile.in | 29 +- tools/Makefile.in | 27 +- tools/h5copy/Makefile.in | 29 +- tools/h5diff/Makefile.in | 29 +- tools/h5dump/Makefile.in | 29 +- tools/h5import/Makefile.in | 29 +- tools/h5jam/Makefile.in | 29 +- tools/h5ls/Makefile.in | 29 +- tools/h5repack/Makefile.in | 29 +- tools/h5stat/Makefile.in | 29 +- tools/lib/Makefile.in | 29 +- tools/misc/Makefile.in | 29 +- tools/perform/Makefile.in | 29 +- 282 files changed, 61292 insertions(+), 103731 deletions(-) create mode 100644 config/cmake/HDF5UseFortran.cmake delete mode 100644 fortran/doc/DevelGuide/masterindex.html delete mode 100644 fortran/doc/DevelGuide/robo_functions.html delete mode 100644 fortran/doc/DevelGuide/robo_modules.html delete mode 100644 fortran/doc/DevelGuide/robo_programs.html delete mode 100644 fortran/doc/DevelGuide/robo_sourcefiles.html delete mode 100644 fortran/doc/DevelGuide/robo_subroutines.html delete mode 100644 fortran/doc/DevelGuide/robodoc.css delete mode 100644 fortran/doc/DevelGuide/src/H5Af_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Aff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Df_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Dff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Ef_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Eff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5FDmpiof_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5FDmpioff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Ff_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Fff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Gf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Gff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5If_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Iff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Lff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Of_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Off_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Pff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Rff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Sf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Sff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Tf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Tff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5Zf_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5Zff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_f_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_F90_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5_ff_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5f90global_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5f90kit_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5match_types_c.html delete mode 100644 fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html delete mode 100644 fortran/doc/DevelGuide/src/H5test_kind_f90.html delete mode 100644 fortran/doc/DevelGuide/src/HDF5_f90.html delete mode 100644 fortran/doc/DevelGuide/src/HDF5mpio_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fflush1_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fflush2_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html delete mode 100644 fortran/doc/DevelGuide/test/fortranlib_test_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tF2003_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5A_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5A_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5D_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5E_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5F_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5G_1_8_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5G_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5I_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5O_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5P_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5R_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5S_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5Sselect_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5T_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5VL_f90.html delete mode 100644 fortran/doc/DevelGuide/test/tH5Z_f90.html delete mode 100644 fortran/doc/DevelGuide/test/t_c.html delete mode 100644 fortran/doc/DevelGuide/test/tf_f90.html delete mode 100644 fortran/doc/DevelGuide/toc_index.html create mode 100644 fortran/src/H5Aff.F90 delete mode 100644 fortran/src/H5Aff.f90 delete mode 100644 fortran/src/H5Aff_F03.f90 delete mode 100644 fortran/src/H5Aff_F90.f90 create mode 100644 fortran/src/H5Dff.F90 delete mode 100644 fortran/src/H5Dff.f90 delete mode 100644 fortran/src/H5Dff_F03.f90 delete mode 100644 fortran/src/H5Dff_F90.f90 create mode 100644 fortran/src/H5Eff.F90 delete mode 100644 fortran/src/H5Eff.f90 delete mode 100644 fortran/src/H5Eff_F03.f90 delete mode 100644 fortran/src/H5Eff_F90.f90 delete mode 100644 fortran/src/H5FDmpiof.c delete mode 100644 fortran/src/H5FDmpioff.f90 create mode 100644 fortran/src/H5Fff.F90 delete mode 100644 fortran/src/H5Fff.f90 delete mode 100644 fortran/src/H5Fff_F03.f90 delete mode 100644 fortran/src/H5Fff_F90.f90 create mode 100644 fortran/src/H5Gff.F90 delete mode 100644 fortran/src/H5Gff.f90 create mode 100644 fortran/src/H5Iff.F90 delete mode 100644 fortran/src/H5Iff.f90 create mode 100644 fortran/src/H5Lff.F90 delete mode 100644 fortran/src/H5Lff.f90 delete mode 100644 fortran/src/H5Lff_F03.f90 delete mode 100644 fortran/src/H5Lff_F90.f90 create mode 100644 fortran/src/H5Off.F90 delete mode 100644 fortran/src/H5Off.f90 delete mode 100644 fortran/src/H5Off_F03.f90 delete mode 100644 fortran/src/H5Off_F90.f90 create mode 100644 fortran/src/H5Pff.F90 delete mode 100644 fortran/src/H5Pff.f90 delete mode 100644 fortran/src/H5Pff_F03.f90 delete mode 100644 fortran/src/H5Pff_F90.f90 create mode 100644 fortran/src/H5Rff.F90 delete mode 100644 fortran/src/H5Rff.f90 delete mode 100644 fortran/src/H5Rff_F03.f90 delete mode 100644 fortran/src/H5Rff_F90.f90 create mode 100644 fortran/src/H5Sff.F90 delete mode 100644 fortran/src/H5Sff.f90 create mode 100644 fortran/src/H5Tff.F90 delete mode 100644 fortran/src/H5Tff.f90 delete mode 100644 fortran/src/H5Tff_F03.f90 delete mode 100644 fortran/src/H5Tff_F90.f90 create mode 100644 fortran/src/H5Zff.F90 delete mode 100644 fortran/src/H5Zff.f90 delete mode 100644 fortran/src/H5_DBLE_InterfaceExclude.f90 delete mode 100644 fortran/src/H5_DBLE_InterfaceInclude.f90 create mode 100644 fortran/src/H5_buildiface.F90 create mode 100644 fortran/src/H5_ff.F90 delete mode 100644 fortran/src/H5_ff.f90 delete mode 100644 fortran/src/H5_ff_F03.f90 delete mode 100644 fortran/src/H5_ff_F90.f90 create mode 100644 fortran/src/H5config_f.inc.cmake create mode 100644 fortran/src/H5config_f.inc.in create mode 100644 fortran/src/H5f90global.F90 delete mode 100644 fortran/src/H5f90global.f90 create mode 100644 fortran/src/H5fort_type_defines.h.in delete mode 100644 fortran/src/H5test_kind.f90 delete mode 100644 fortran/src/H5test_kind_SIZEOF.f90 delete mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.f90 create mode 100644 fortran/src/HDF5.F90 delete mode 100644 fortran/src/HDF5.f90 delete mode 100644 fortran/src/HDF5mpio.f90 create mode 100644 fortran/test/H5_test_buildiface.F90 create mode 100644 fortran/test/tH5T_F03.F90 delete mode 100644 fortran/test/tH5T_F03.f90 create mode 100644 fortran/test/tf.F90 delete mode 100644 fortran/test/tf.f90 delete mode 100644 fortran/test/tf_F03.f90 delete mode 100644 fortran/test/tf_F08.f90 delete mode 100644 fortran/test/tf_F90.f90 create mode 100644 hl/fortran/src/H5DSff.F90 delete mode 100644 hl/fortran/src/H5DSff.f90 create mode 100644 hl/fortran/src/H5HL_buildiface.F90 create mode 100644 hl/fortran/src/H5IMff.F90 delete mode 100644 hl/fortran/src/H5IMff.f90 create mode 100644 hl/fortran/src/H5LTff.F90 delete mode 100644 hl/fortran/src/H5LTff.f90 create mode 100644 hl/fortran/src/H5TBff.F90 delete mode 100644 hl/fortran/src/H5TBff.f90 create mode 100644 hl/fortran/src/hdf5_hl_fortrandll.def.in create mode 100644 hl/fortran/test/tstds.F90 delete mode 100644 hl/fortran/test/tstds.f90 create mode 100644 hl/fortran/test/tstimage.F90 delete mode 100644 hl/fortran/test/tstimage.f90 create mode 100644 hl/fortran/test/tstlite.F90 delete mode 100644 hl/fortran/test/tstlite.f90 create mode 100644 hl/fortran/test/tsttable.F90 delete mode 100644 hl/fortran/test/tsttable.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index fda7d75..799c1da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -673,6 +673,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif (BUILD_SHARED_LIBS AND APPLE) option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) + include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) diff --git a/MANIFEST b/MANIFEST index e5c002f..3629e3c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -162,89 +162,6 @@ ./fortran/Makefile.in ./fortran/robodoc.rc -./fortran/doc/DevelGuide/toc_index.html -./fortran/doc/DevelGuide/masterindex.html -./fortran/doc/DevelGuide/robo_subroutines.html -./fortran/doc/DevelGuide/robo_sourcefiles.html -./fortran/doc/DevelGuide/robo_functions.html -./fortran/doc/DevelGuide/robo_modules.html -./fortran/doc/DevelGuide/robo_programs.html -./fortran/doc/DevelGuide/robodoc.css -./fortran/doc/DevelGuide/test/fortranlib_test_f90.html -./fortran/doc/DevelGuide/test/tH5A_f90.html -./fortran/doc/DevelGuide/test/tH5VL_f90.html -./fortran/doc/DevelGuide/test/tH5D_f90.html -./fortran/doc/DevelGuide/test/tH5E_f90.html -./fortran/doc/DevelGuide/test/tH5F_f90.html -./fortran/doc/DevelGuide/test/tH5G_f90.html -./fortran/doc/DevelGuide/test/fflush1_f90.html -./fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html -./fortran/doc/DevelGuide/test/tH5A_1_8_f90.html -./fortran/doc/DevelGuide/test/tf_f90.html -./fortran/doc/DevelGuide/test/fflush2_f90.html -./fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html -./fortran/doc/DevelGuide/test/tH5I_f90.html -./fortran/doc/DevelGuide/test/tH5G_1_8_f90.html -./fortran/doc/DevelGuide/test/tF2003_f90.html -./fortran/doc/DevelGuide/test/tH5O_f90.html -./fortran/doc/DevelGuide/test/tH5P_f90.html -./fortran/doc/DevelGuide/test/tH5R_f90.html -./fortran/doc/DevelGuide/test/tH5S_f90.html -./fortran/doc/DevelGuide/test/tH5Sselect_f90.html -./fortran/doc/DevelGuide/test/tH5T_f90.html -./fortran/doc/DevelGuide/test/t_c.html -./fortran/doc/DevelGuide/test/tH5Z_f90.html -./fortran/doc/DevelGuide/src/H5Fff_f90.html -./fortran/doc/DevelGuide/src/H5Zf_c.html -./fortran/doc/DevelGuide/src/H5Pff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Aff_F03_f90.html -./fortran/doc/DevelGuide/src/H5match_types_c.html -./fortran/doc/DevelGuide/src/H5Rff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Lff_f90.html -./fortran/doc/DevelGuide/src/H5FDmpiof_c.html -./fortran/doc/DevelGuide/src/H5_f_c.html -./fortran/doc/DevelGuide/src/H5Pff_f90.html -./fortran/doc/DevelGuide/src/H5Rff_f90.html -./fortran/doc/DevelGuide/src/H5Tff_f90.html -./fortran/doc/DevelGuide/src/H5test_kind_f90.html -./fortran/doc/DevelGuide/src/H5Aff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Zff_f90.html -./fortran/doc/DevelGuide/src/HDF5_f90.html -./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html -./fortran/doc/DevelGuide/src/H5f90kit_c.html -./fortran/doc/DevelGuide/src/H5Aff_f90.html -./fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html -./fortran/doc/DevelGuide/src/H5Eff_f90.html -./fortran/doc/DevelGuide/src/H5_ff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Gff_f90.html -./fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html -./fortran/doc/DevelGuide/src/H5Iff_f90.html -./fortran/doc/DevelGuide/src/H5Dff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Af_c.html -./fortran/doc/DevelGuide/src/H5Off_f90.html -./fortran/doc/DevelGuide/src/H5Df_c.html -./fortran/doc/DevelGuide/src/H5Sff_f90.html -./fortran/doc/DevelGuide/src/H5Ef_c.html -./fortran/doc/DevelGuide/src/HDF5mpio_f90.html -./fortran/doc/DevelGuide/src/H5Lff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Ff_c.html -./fortran/doc/DevelGuide/src/H5f90global_f90.html -./fortran/doc/DevelGuide/src/H5Gf_c.html -./fortran/doc/DevelGuide/src/H5If_c.html -./fortran/doc/DevelGuide/src/H5Pff_F03_f90.html -./fortran/doc/DevelGuide/src/H5_ff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Rff_F03_f90.html -./fortran/doc/DevelGuide/src/H5Lf_c.html -./fortran/doc/DevelGuide/src/H5Of_c.html -./fortran/doc/DevelGuide/src/H5Dff_F90_f90.html -./fortran/doc/DevelGuide/src/H5Pf_c.html -./fortran/doc/DevelGuide/src/H5FDmpioff_f90.html -./fortran/doc/DevelGuide/src/H5_ff_f90.html -./fortran/doc/DevelGuide/src/H5Rf_c.html -./fortran/doc/DevelGuide/src/H5Sf_c.html -./fortran/doc/DevelGuide/src/H5Tf_c.html -./fortran/doc/DevelGuide/src/H5Dff_f90.html -./fortran/doc/DevelGuide/src/H5Lff_F90_f90.html ./fortran/examples/Makefile.am ./fortran/examples/Makefile.in @@ -272,68 +189,44 @@ ./fortran/examples/rwdset_fortran2003.f90 ./fortran/src/H5_f.c -./fortran/src/H5_ff.f90 -./fortran/src/H5_ff_F90.f90 -./fortran/src/H5_ff_F03.f90 -./fortran/src/H5_DBLE_InterfaceInclude.f90 -./fortran/src/H5_DBLE_InterfaceExclude.f90 +./fortran/src/H5_ff.F90 ./fortran/src/H5Af.c -./fortran/src/H5Aff.f90 -./fortran/src/H5Aff_F90.f90 -./fortran/src/H5Aff_F03.f90 +./fortran/src/H5Aff.F90 ./fortran/src/H5Df.c -./fortran/src/H5Dff.f90 -./fortran/src/H5Dff_F90.f90 -./fortran/src/H5Dff_F03.f90 +./fortran/src/H5Dff.F90 ./fortran/src/H5Ef.c -./fortran/src/H5Eff.f90 -./fortran/src/H5Eff_F90.f90 -./fortran/src/H5Eff_F03.f90 -./fortran/src/H5FDmpiof.c -./fortran/src/H5FDmpioff.f90 +./fortran/src/H5Eff.F90 ./fortran/src/H5Ff.c -./fortran/src/H5Fff.f90 -./fortran/src/H5Fff_F90.f90 -./fortran/src/H5Fff_F03.f90 +./fortran/src/H5Fff.F90 ./fortran/src/H5Gf.c -./fortran/src/H5Gff.f90 +./fortran/src/H5Gff.F90 ./fortran/src/H5If.c -./fortran/src/H5Iff.f90 +./fortran/src/H5Iff.F90 ./fortran/src/H5Lf.c -./fortran/src/H5Lff.f90 -./fortran/src/H5Lff_F90.f90 -./fortran/src/H5Lff_F03.f90 +./fortran/src/H5Lff.F90 ./fortran/src/H5Of.c -./fortran/src/H5Off.f90 -./fortran/src/H5Off_F90.f90 -./fortran/src/H5Off_F03.f90 +./fortran/src/H5Off.F90 ./fortran/src/H5Pf.c -./fortran/src/H5Pff.f90 -./fortran/src/H5Pff_F90.f90 -./fortran/src/H5Pff_F03.f90 +./fortran/src/H5Pff.F90 ./fortran/src/H5Rf.c -./fortran/src/H5Rff.f90 -./fortran/src/H5Rff_F90.f90 -./fortran/src/H5Rff_F03.f90 +./fortran/src/H5Rff.F90 ./fortran/src/H5Sf.c -./fortran/src/H5Sff.f90 +./fortran/src/H5Sff.F90 ./fortran/src/H5Tf.c -./fortran/src/H5Tff.f90 -./fortran/src/H5Tff_F90.f90 -./fortran/src/H5Tff_F03.f90 +./fortran/src/H5Tff.F90 ./fortran/src/H5Zf.c -./fortran/src/H5Zff.f90 +./fortran/src/H5Zff.F90 ./fortran/src/H5f90.h -./fortran/src/H5f90global.f90 +./fortran/src/H5f90global.F90 ./fortran/src/H5f90i.h ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h -./fortran/src/H5test_kind.f90 -./fortran/src/H5test_kind_SIZEOF.f90 -./fortran/src/H5test_kind_STORAGE_SIZE.f90 +./fortran/src/H5_buildiface.F90 ./fortran/src/H5match_types.c -./fortran/src/HDF5.f90 -./fortran/src/HDF5mpio.f90 +./fortran/src/HDF5.F90 +./fortran/src/H5config_f.inc.in +./fortran/src/H5config_f.inc.cmake +./fortran/src/H5fort_type_defines.h.in ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README @@ -348,12 +241,10 @@ ./fortran/test/fortranlib_test.f90 ./fortran/test/fortranlib_test_1_8.f90 ./fortran/test/fortranlib_test_F03.f90 +./fortran/test/H5_test_buildiface.F90 ./fortran/test/t.c ./fortran/test/t.h -./fortran/test/tf.f90 -./fortran/test/tf_F90.f90 -./fortran/test/tf_F03.f90 -./fortran/test/tf_F08.f90 +./fortran/test/tf.F90 ./fortran/test/tH5A.f90 ./fortran/test/tH5A_1_8.f90 ./fortran/test/tH5D.f90 @@ -373,7 +264,7 @@ ./fortran/test/tH5R.f90 ./fortran/test/tH5S.f90 ./fortran/test/tH5Sselect.f90 -./fortran/test/tH5T_F03.f90 +./fortran/test/tH5T_F03.F90 ./fortran/test/tH5T.f90 ./fortran/test/tH5VL.f90 ./fortran/test/tH5Z.f90 @@ -2354,25 +2245,27 @@ ./hl/fortran/examples/ex_ds1.f90 ./hl/fortran/examples/exlite.f90 ./hl/fortran/examples/run-hlfortran-ex.sh.in +./hl/fortran/src/hdf5_hl_fortrandll.def.in ./hl/fortran/src/H5DSfc.c -./hl/fortran/src/H5DSff.f90 +./hl/fortran/src/H5DSff.F90 ./hl/fortran/src/H5IMcc.c ./hl/fortran/src/H5IMcc.h ./hl/fortran/src/H5IMfc.c -./hl/fortran/src/H5IMff.f90 +./hl/fortran/src/H5IMff.F90 +./hl/fortran/src/H5HL_buildiface.F90 ./hl/fortran/src/H5LTf90proto.h ./hl/fortran/src/H5LTfc.c -./hl/fortran/src/H5LTff.f90 +./hl/fortran/src/H5LTff.F90 ./hl/fortran/src/H5TBfc.c -./hl/fortran/src/H5TBff.f90 +./hl/fortran/src/H5TBff.F90 ./hl/fortran/src/Makefile.am ./hl/fortran/src/Makefile.in ./hl/fortran/test/Makefile.am ./hl/fortran/test/Makefile.in -./hl/fortran/test/tstds.f90 -./hl/fortran/test/tstimage.f90 -./hl/fortran/test/tstlite.f90 -./hl/fortran/test/tsttable.f90 +./hl/fortran/test/tstds.F90 +./hl/fortran/test/tstimage.F90 +./hl/fortran/test/tstlite.F90 +./hl/fortran/test/tsttable.F90 # hl c++ ./hl/c++/COPYING @@ -2404,6 +2297,7 @@ ./config/cmake/hdf5-config-version.cmake.in ./config/cmake/HDFCompilerFlags.cmake ./config/cmake/HDF5Macros.cmake +./config/cmake/HDF5UseFortran.cmake ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/Makefile.in b/Makefile.in index edee230..ce0c833 100644 --- a/Makefile.in +++ b/Makefile.in @@ -128,7 +128,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -288,14 +289,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -305,13 +313,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -353,6 +360,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/Makefile.in b/c++/Makefile.in index c964e95..2315cc2 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -448,14 +449,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -465,13 +473,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -513,6 +520,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 03bd135..6b0f894 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-c++-ex.sh testh5c++.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -396,14 +397,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -413,13 +421,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -461,6 +468,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 5dff737..c2daa56 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5c++ CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -174,7 +175,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -459,14 +460,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -476,13 +484,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -524,6 +531,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 8711eef..0da1d86 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = testhdf5$(EXEEXT) @@ -136,7 +137,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -450,14 +451,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -467,13 +475,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -515,6 +522,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 09f1caf..b9f18a9 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -158,6 +158,17 @@ if (NOT WINDOWS) endif (HDF5_ENABLE_DIRECT_VFD) endif (NOT WINDOWS) +#----------------------------------------------------------------------------- +# Check if C has __float128 extension +#----------------------------------------------------------------------------- + +CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) +if(${HAVE_SIZEOF___FLOAT128}) + SET(H5_HAVE_FLOAT128 1) +else (${HAVE_SIZEOF___FLOAT128}) + SET(H5_HAVE_FLOAT128 0) + SET(SIZEOF___FLOAT128 0) +endif(${HAVE_SIZEOF___FLOAT128}) #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index af9afde..37bcfbf 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -45,6 +45,18 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #define @H5_FC_FUNC_@ +/* Define Fortran Maximum Real Decimal Precision */ +#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ + +/* Define C Maximum Real Decimal Precision */ +#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ + +/* Define if we have Fortran C_LONG_DOUBLE */ +#cmakedefine H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ + +/* Determine if __float128 is available */ +#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ + /* Define to 1 if you have the `alarm' function. */ #cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index febf20a..c82fcf2 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -13,7 +13,6 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_BUILD_CONFIGURATION "Release") #set(NO_MAC_FORTRAN "true") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") #set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") ############################################################################################################### @@ -123,4 +122,4 @@ if(res GREATER 0) endif(res GREATER 0) #----------------------------------------------------------------------------- ############################################################################################################## -message(STATUS "DONE") \ No newline at end of file +message(STATUS "DONE") diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake new file mode 100644 index 0000000..b3dec14 --- /dev/null +++ b/config/cmake/HDF5UseFortran.cmake @@ -0,0 +1,491 @@ + +## Check for non-standard extenstion quadmath.h + +CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH) + +if (${C_HAVE_QUADMATH}) + set(HAVE_QUADMATH 1) +else () + set(HAVE_QUADMATH 0) +endif() + +# +# This file provides functions for HDF5 specific Fortran support. +# +#------------------------------------------------------------------------------- +ENABLE_LANGUAGE (Fortran) + +# The provided CMake Fortran macros don't provide a general compile/run function +# so this one is used. +#----------------------------------------------------------------------------- +MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) +# MSB CHECK WHY THIS CHECK? +# if (NOT DEFINED ${RUN_RESULT_VAR}) + message (STATUS "Detecting Fortran ${FUNCTION}") + if (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif (CMAKE_REQUIRED_LIBRARIES) + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 + "${CODE}" + ) + TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + RUN_OUTPUT_VARIABLE OUTPUT + ) + + + + set(${RETURN} ${OUTPUT}) + + #message ( "Test result1 ${RETURN} ") + #message ( "Test result3 ${RESULT} ") + #message ( "Test result2 ${CMAKE_MATCH_0} ") + #message ( "Test result4 ${CMAKE_MATCH_1} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result2 ${COMPILE_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result1 ${RUN_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${COMPILE_RESULT_VAR}) + if (${RUN_RESULT_VAR} MATCHES 0) + message (STATUS "Testing Fortran ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else () + message (STATUS "Testing Fortran ${FUNCTION} - Fail") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif () + endif () +# endif (NOT DEFINED ${RUN_RESULT_VAR}) +ENDMACRO (FORTRAN_RUN) + +#----------------------------------------------------------------------------- +# Check to see C_LONG_DOUBLE is available +CHECK_FORTRAN_FEATURE(c_long_double + " + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + " + FORTRAN_HAVE_C_LONG_DOUBLE +) +if (${FORTRAN_HAVE_C_LONG_DOUBLE}) + set(FORTRAN_HAVE_C_LONG_DOUBLE 1) +else () + set(FORTRAN_HAVE_C_LONG_DOUBLE 0) +endif() + +# Check to see C_LONG_DOUBLE is different from C_DOUBLE + +CHECK_FORTRAN_FEATURE(c_long_double + " + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + " + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE +) +if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) + set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) +else () + set(FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) +endif() + +## Set the sizeof function for use later in the fortran tests +if(FORTRAN_HAVE_STORAGE_SIZE) + set(FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") + set(FC_SIZEOF_B "STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") + set(FC_SIZEOF_C "STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") +elseif(FORTRAN_HAVE_C_SIZEOF) + set(FC_SIZEOF_A "SIZEOF(a)") + set(FC_SIZEOF_B "SIZEOF(b)") + set(FC_SIZEOF_C "SIZEOF(c)") +else(FORTRAN_HAVE_STORAGE_SIZE) + message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE") +endif(FORTRAN_HAVE_STORAGE_SIZE) + +#----------------------------------------------------------------------------- +# Determine the available KINDs for REALs and INTEGERs +#----------------------------------------------------------------------------- + +FORTRAN_RUN("REAL and INTEGER KINDs" + " + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 + lastkind=SELECTED_INT_KIND(1) + ! Find integer KINDs + DO ik=2,36 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 + WRITE(*,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 + WRITE(*,'(I0)') lastkind + ELSE + WRITE(*,'()') + ENDIF + ! Find real KINDs + num_rkinds = 0 + lastkind=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + DO ik=2,36 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 + WRITE(*,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(*,'(A)',ADVANCE='NO') ',' + max_decimal_prec = ik + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 + WRITE(*,'(I0)') lastkind + ELSE + WRITE(*,'()') + ENDIF + WRITE(*,'(I0)') max_decimal_prec + WRITE(*,'(I0)') num_ikinds + WRITE(*,'(I0)') num_rkinds + END + " + XX + YY + PROG_OUTPUT +) +# dnl The output from the above program will be: +# dnl -- LINE 1 -- valid integer kinds (comma seperated list) +# dnl -- LINE 2 -- valid real kinds (comma seperated list) +# dnl -- LINE 3 -- max decimal precision for reals +# dnl -- LINE 4 -- number of valid integer kinds +# dnl -- LINE 5 -- number of valid real kinds + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 pac_validIntKinds) +list(GET PROG_OUTPUT 1 pac_validRealKinds) +list(GET PROG_OUTPUT 2 H5_PAC_FC_MAX_REAL_PRECISION) + +set(PAC_FC_ALL_INTEGER_KINDS "\{${pac_validIntKinds}\}") +set(PAC_FC_ALL_REAL_KINDS "\{${pac_validRealKinds}\}") + +list(GET PROG_OUTPUT 3 NUM_IKIND) +list(GET PROG_OUTPUT 4 NUM_RKIND) + +set(H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") +set(H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") + +message ( " ........REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message ( " ........INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") + +#----------------------------------------------------------------------------- +# Determine the available KINDs for REALs and INTEGERs +#----------------------------------------------------------------------------- +# ********** +# INTEGERS +# ********** +string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}") + +foreach( KIND ${VAR_KIND} ) + set(PROG_SRC + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=${KIND}) a + WRITE(*,'(I0)') ${FC_SIZEOF_A} + END + " + ) + FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC} + XX + YY + PROG_OUTPUT1 + ) + string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") + set(pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},") +endforeach(KIND) +string(STRIP ${pack_int_sizeof} pack_int_sizeof) + + +#Remove trailing comma +string(REGEX REPLACE ",$" "" pack_int_sizeof "${pack_int_sizeof}") +#Remove spaces +string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") + +set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") + +message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +# ********** +# REALS +# ********** +string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}") + +#find the maximum kind of the real +list(LENGTH VAR_KIND LEN_VAR_KIND) +MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") +list(GET VAR_KIND ${_LEN} max_real_fortran_kind) + +foreach( KIND ${VAR_KIND} ) + set(PROG_SRC + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=${KIND}) a + WRITE(*,'(I0)') ${FC_SIZEOF_A} + END + " + ) + FORTRAN_RUN("REAL KIND SIZEOF" ${PROG_SRC} + XX + YY + PROG_OUTPUT1 + ) + string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") + set(pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},") +endforeach(KIND) +string(STRIP ${pack_real_sizeof} pack_real_sizeof) + +#Remove trailing comma +string(REGEX REPLACE ",$" "" pack_real_sizeof "${pack_real_sizeof}") +#Remove spaces +string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") + +set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") + +message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") + +#find the maximum kind of the real +list(LENGTH VAR_KIND LEN_VAR_KIND) +MATH (EXPR _LEN "${LEN_VAR_KIND} - 1") +list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof) + +set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}") +#----------------------------------------------------------------------------- +# Find sizeof of native kinds +#----------------------------------------------------------------------------- +FORTRAN_RUN("SIZEOF NATIVE KINDs" + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + WRITE(*,*) ${FC_SIZEOF_A} + WRITE(*,*) kind(a) + WRITE(*,*) ${FC_SIZEOF_B} + WRITE(*,*) kind(b) + WRITE(*,*) ${FC_SIZEOF_C} + WRITE(*,*) kind(c) + END + " + XX + YY + PROG_OUTPUT +) +# dnl The output from the above program will be: +# dnl -- LINE 1 -- sizeof INTEGER +# dnl -- LINE 2 -- kind of INTEGER +# dnl -- LINE 3 -- sizeof REAL +# dnl -- LINE 4 -- kind of REAL +# dnl -- LINE 5 -- sizeof DOUBLE PRECISION +# dnl -- LINE 6 -- kind of DOUBLE PRECISION + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) +list(GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND) +list(GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF) +list(GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND) +list(GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) +list(GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) + +set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) +#set(H5_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) + +# remove the invalid kind from the list +if(NOT(${SIZEOF___FLOAT128} EQUAL 0)) + if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) + message(WARNING " + Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!") + string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS}) + string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) + MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1") + endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) +endif(NOT(${SIZEOF___FLOAT128} EQUAL 0)) + +set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") + +string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS}) +string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) +set(H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)") + +string(REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) +string(REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) +set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") + +ENABLE_LANGUAGE (C) + +#----------------------------------------------------------------------------- +# The provided CMake C macros don't provide a general compile/run function +# so this one is used. +#----------------------------------------------------------------------------- +MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN) +# MSB CHECK WHY THIS CHECK? +# if (NOT DEFINED ${RUN_RESULT_VAR}) + message (STATUS "Detecting C ${FUNCTION}") + if (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else (CMAKE_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif (CMAKE_REQUIRED_LIBRARIES) + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + ${CODE} + ) + TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + RUN_OUTPUT_VARIABLE OUTPUT + ) + + set(${RETURN} ${OUTPUT}) + + #message ( "Test result1 ${RETURN} ") + #message ( "Test result3 ${RESULT} ") + #message ( "Test result2 ${CMAKE_MATCH_0} ") + #message ( "Test result4 ${CMAKE_MATCH_1} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${COMPILE_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message ( "Test result ${RUN_RESULT_VAR} ") + #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${COMPILE_RESULT_VAR}) + if (${RUN_RESULT_VAR} MATCHES 0) + set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}") + message (STATUS "Testing C ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the C ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else () + message (STATUS "Testing C ${FUNCTION} - Fail") + set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the C ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif () + endif() +# endif (NOT DEFINED ${RUN_RESULT_VAR}) +ENDMACRO (C_RUN) + +set(PROG_SRC + " +#include +#include +#define CHECK_FLOAT128 ${SIZEOF___FLOAT128} +#if CHECK_FLOAT128!=0 +# if ${HAVE_QUADMATH}!=0 +#include +# endif +# ifdef FLT128_DIG +#define C_FLT128_DIG FLT128_DIG +# else +#define C_FLT128_DIG 0 +# endif +#else +#define C_FLT128_DIG 0 +#endif +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define C_LDBL_DIG DECIMAL_DIG +#else +#define C_LDBL_DIG LDBL_DIG +#endif + void main() { + printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\; + } + " + ) + +C_RUN("maximum decimal precision for C" ${PROG_SRC} + XX + YY + PROG_OUTPUT +) + +# dnl The output from the above program will be: +# dnl -- LINE 1 -- long double decimal precision +# dnl -- LINE 2 -- __float128 decimal precision + +# Convert the string to a list of strings by replacing the carriage return with a semicolon +string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") + +list(GET PROG_OUTPUT 0 LDBL_DIG) +list(GET PROG_OUTPUT 1 FLT128_DIG) + +if(SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) + SET(H5_HAVE_FLOAT128 0) + SET(SIZEOF___FLOAT128 0) + set(H5_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) +else () + set(H5_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) +endif() + + +# Setting definition if there is a 16 byte fortran integer +string(FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos) +if(${pos} EQUAL -1) + set(HAVE_Fortran_INTEGER_SIZEOF_16 0) +else () + set(HAVE_Fortran_INTEGER_SIZEOF_16 1) +endif () diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 321267f..adeec55 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -22,7 +22,6 @@ set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS #----------------------------------------------------------------------------- set (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) set (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) -set (${HDF5_PACKAGE_NAME}_ENABLE_F2003 @HDF5_ENABLE_F2003@) set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@) set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 8ef67a5..ba764a4 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -38,7 +38,6 @@ Languages: ---------- Fortran: @HDF5_BUILD_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HDF5_ENABLE_F2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index af506e6..39ec124 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -16,8 +16,6 @@ set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) -set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE) - set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE) set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE) diff --git a/configure b/configure index 860f480..fe13186 100755 --- a/configure +++ b/configure @@ -199,6 +199,7 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,8 +207,7 @@ test -x / || exit 1" ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -682,7 +682,6 @@ AM_MAKEFLAGS LT_STATIC_EXEC USE_PLUGINS_CONDITIONAL_FALSE USE_PLUGINS_CONDITIONAL_TRUE -CPP OTOOL64 OTOOL LIPO @@ -699,8 +698,6 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP -EGREP -GREP SED LIBTOOL FORTRAN_SHARED_CONDITIONAL_FALSE @@ -713,7 +710,6 @@ PARALLEL TIME TR AR -PERL HL_FOR HL CXXCPP @@ -722,16 +718,26 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS -FORTRAN_DEFAULT_REALisDBLE_F_FALSE -FORTRAN_DEFAULT_REALisDBLE_F_TRUE -FORTRAN_2003_CONDITIONAL_F_FALSE -FORTRAN_2003_CONDITIONAL_F_TRUE -FORTRAN_HAVE_STORAGE_SIZE_FALSE -FORTRAN_HAVE_STORAGE_SIZE_TRUE -FORTRAN_HAVE_C_SIZEOF_FALSE -FORTRAN_HAVE_C_SIZEOF_TRUE -FORTRAN_HAVE_SIZEOF_FALSE -FORTRAN_HAVE_SIZEOF_TRUE +H5CONFIG_F_IKIND +H5CONFIG_F_NUM_IKIND +H5CONFIG_F_RKIND_SIZEOF +H5CONFIG_F_RKIND +H5CONFIG_F_NUM_RKIND +FORTRAN_SIZEOF_LONG_DOUBLE +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE +FORTRAN_HAVE_C_LONG_DOUBLE +HAVE_Fortran_INTEGER_SIZEOF_16 +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF +PAC_FORTRAN_NATIVE_DOUBLE_KIND +PAC_FORTRAN_NATIVE_REAL_SIZEOF +PAC_FORTRAN_NATIVE_REAL_KIND +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF +PAC_FORTRAN_NATIVE_INTEGER_KIND +PAC_FC_ALL_INTEGER_KINDS_SIZEOF +PAC_FC_ALL_REAL_KINDS_SIZEOF +PAC_FC_ALL_INTEGER_KINDS +PAC_FC_MAX_REAL_PRECISION +PAC_FC_ALL_REAL_KINDS FCLIBS F9XMODEXT F9XMODFLAG @@ -748,8 +754,10 @@ HSIZE_T HADDR_T R_INTEGER R_LARGE -HAVE_FORTRAN_2003 HDF5_INTERFACES +EGREP +GREP +CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -766,6 +774,7 @@ ac_ct_CC LDFLAGS CFLAGS CC +PAC_C_MAX_REAL_PRECISION UNAME_INFO enable_static enable_shared @@ -778,9 +787,7 @@ INSTRUMENT HDF5_HL CXX HDF_CXX -FC2003 FC -HDF_FORTRAN2003 HDF_FORTRAN STATIC_EXEC MPE @@ -834,6 +841,7 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +PERL target_alias host_alias build_alias @@ -880,7 +888,6 @@ enable_maintainer_mode enable_dependency_tracking enable_unsupported enable_fortran -enable_fortran2003 enable_cxx enable_hl enable_shared @@ -926,13 +933,13 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS CXX CXXFLAGS CCC -CXXCPP -CPP' +CXXCPP' # Initialize some variables set by options. @@ -1561,9 +1568,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran 90/95 interface [default=no] - --enable-fortran2003 Compile the Fortran 2003 interface, must also - specify --enable-fortran [default=no] + --enable-fortran Compile the Fortran interface [default=no] --enable-cxx Compile the C++ interface [default=no] --enable-hl Enable the high level library [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -1661,12 +1666,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1786,59 +1791,74 @@ fi } # ac_fn_c_try_compile -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - ac_retval=1 +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_fc_try_compile +} # ac_fn_c_check_type -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1846,37 +1866,29 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_c_try_cpp -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -1884,204 +1896,354 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_link") 2>&5 ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_try") 2>&5 ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + test $ac_status = 0; }; }; then : ac_retval=0 else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=$ac_status fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_cxx_try_compile +} # ac_fn_c_try_run -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_cxx_try_cpp +} # ac_fn_c_check_header_compile -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; - ac_retval=1 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" + ac_header_compiler=yes else - eval "$3=no" + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -} # ac_fn_c_check_header_compile +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## -------------------------------- ## +## Report this to help@hdfgroup.org ## +## -------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -2089,27 +2251,119 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_compile + +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_fc_try_link -# ac_fn_c_try_run LINENO -# ---------------------- +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_fc_try_run LINENO +# ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. -ac_fn_c_try_run () +ac_fn_fc_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" @@ -2145,179 +2399,133 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_run +} # ac_fn_fc_try_run -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + ac_retval=1 fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_func +} # ac_fn_cxx_try_compile -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no + ac_retval=1 fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------- ## -## Report this to help@hdfgroup.org ## -## -------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_header_mongrel +} # ac_fn_cxx_try_link -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2325,10 +2533,39 @@ $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else - eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$4 +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -2340,13 +2577,40 @@ $4 int main () { -if (sizeof ($2)) - return 0; +return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2361,18 +2625,22 @@ $4 int main () { -if (sizeof (($2))) - return 0; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -else eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -2381,347 +2649,62 @@ eval ac_res=\$$3 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_type +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; +It was created by HDF5 $as_me 1.9.227, which was +generated by GNU Autoconf 2.69. Invocation command line was - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; + $ $0 $@ - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () +exec 5>>config.log { -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ +} >&5 - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; +cat >&5 <<_ACEOF - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by HDF5 $as_me 1.9.227, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF +_ACEOF # Keep a trace of the command line. @@ -3020,6 +3003,54 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING +## -------------------------------------------------------------------------- +## Requirement #1: Check if Perl is installed. +## + PERL="" +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PERL="" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="$PATH" +fi +fi +PERL=$ac_cv_prog_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$PERL" = "xfalse"; then + as_fn_error $? "*** Perl is required for installing HDF5, but Perl could not be found!" "$LINENO" 5 +fi + + ac_config_headers="$ac_config_headers src/H5config.h" @@ -3864,7 +3895,6 @@ $as_echo "done" >&6; } ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. -## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -3872,6 +3902,7 @@ $as_echo "done" >&6; } ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -3883,9 +3914,7 @@ $as_echo "done" >&6; } MPE=no STATIC_EXEC=no HDF_FORTRAN=no - HDF_FORTRAN2003=no HDF_FORTRAN=no - HDF_FORTRAN2003=no HDF_CXX=no HDF_CXX=no HDF5_HL=yes @@ -3899,6 +3928,7 @@ $as_echo "done" >&6; } UNAME_INFO=`uname -a` + ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check ## that it actually does what it's supposed to do. Catch this early @@ -5122,1583 +5152,1236 @@ $as_echo "yes" >&6; } esac ## ---------------------------------------------------------------------- -## Check if they would like the Fortran interface compiled +## Data types and their sizes. ## - HDF5_INTERFACES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 -$as_echo_n "checking if Fortran interface enabled... " >&6; } -# Check whether --enable-fortran was given. -if test "${enable_fortran+set}" = set; then : - enableval=$enable_fortran; HDF_FORTRAN=$enableval -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -if test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" else - echo "no" + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext - -## ---------------------------------------------------------------------- -## Check if they would like the Fortran 2003 interface compiled -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5 -$as_echo_n "checking if Fortran 2003 interface enabled... " >&6; } -# Check whether --enable-fortran2003 was given. -if test "${enable_fortran2003+set}" = set; then : - enableval=$enable_fortran2003; HDF_FORTRAN2003=$enableval + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi -## ---------------------------------------------------------------------- -## Check to make sure --enable-fortran is present if --enable-fortran2003 -## was specified + done + ac_cv_prog_CPP=$CPP -if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then - echo "no" - as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5 +fi + CPP=$ac_cv_prog_CPP else - if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" - else - echo "no" - fi + ac_cv_prog_CPP=$CPP fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -if test "X$HDF_FORTRAN" = "Xyes"; then - - HDF_FORTRAN=yes - - - HDF5_INTERFACES="$HDF5_INTERFACES fortran" - - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## - - - +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## -------------------------------------------------------------------- - ## Fortran source extention - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_GREP=$GREP fi - - test -n "$FC" && break - done fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_EGREP=$EGREP fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - test -n "$ac_ct_FC" && break -done - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - ac_compiler_gnu=no + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu +rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif - end +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes +if ac_fn_c_try_run "$LINENO"; then : + else - ac_cv_prog_fc_g=no + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - end +cat >>confdefs.h <<_ACEOF +#define off_t long int _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned long +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi +cat >>confdefs.h <<_ACEOF +#define ssize_t long +_ACEOF fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : +else +cat >>confdefs.h <<_ACEOF +#define ptrdiff_t long +_ACEOF +fi - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; - test -n "$ac_ct_FC" && break -done +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif - end + ; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - ac_compiler_gnu=no + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - end +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - ac_cv_prog_fc_g=no + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 -$as_echo_n "checking what $FC does with modules... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) -cat >conftest.$ac_ext <>confdefs.h -eval $ac_compile -modfiles="" -F9XMODEXT="" + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac -for f in conftest.o module.mod MODULE.mod module.M MODULE.M; do - if test -f "$f" ; then - modfiles="$f" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if ${ac_cv_sizeof_char+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - case "$f" in - *.o) F9XMODEXT="o" ;; - *.mod) F9XMODEXT="mod" ;; - *.M) F9XMODEXT="M" ;; - esac - fi -done +else + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char=0 + fi +fi -echo $modfiles 6>&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 - else - echo yes 6>&1 - fi fi -cd .. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 -$as_echo_n "checking how $FC finds modules... " >&6; } -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - F9XMODFLAG=$flag - break - fi -done -if test -n "$F9XMODFLAG"; then - echo $F9XMODFLAG 1>&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 else - echo unknown 1>&6 -fi + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : +else + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short=0 + fi +fi -rm -rf conftest* -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } - ## Change to the Fortran 90 language - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF - program main +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +fi - end +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS -rm -rf conftest* +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 +$as_echo_n "checking size of unsigned... " >&6; } +if ${ac_cv_sizeof_unsigned+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +else + if test "$ac_cv_type_unsigned" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned=0 + fi +fi -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 +$as_echo "$ac_cv_sizeof_unsigned" >&6; } - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned +_ACEOF - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - # look for -l* and *.a constructs in the output - for ac_arg in $ac_fc_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_fc_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -cat > conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF -rm -rf conftest* -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 +$as_echo_n "checking size of __int64... " >&6; } +if ${ac_cv_sizeof___int64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : -ac_cv_fc_libs= +else + if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (__int64) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof___int64=0 + fi +fi -# Save positional arguments (if any) -ac_save_positional="$@" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 +$as_echo "$ac_cv_sizeof___int64" >&6; } -set X $ac_fc_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - if test x"$ac_exists" = xtrue; then : -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done +cat >>confdefs.h <<_ACEOF +#define SIZEOF___INT64 $ac_cv_sizeof___int64 +_ACEOF - if test x"$ac_exists" = xtrue; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if ${ac_cv_sizeof_float+:} false; then : + $as_echo_n "(cached) " >&6 else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : + else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (float) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_float=0 + fi fi + fi - ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - esac - ;; - -[LRuYz]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } - if test x"$ac_exists" = xtrue; then : -else - ac_arg="$ac_arg $ac_j" - ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" -fi - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - if test x"$ac_exists" = xtrue; then : +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if ${ac_cv_sizeof_double+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -zallextract*| -zdefaultextract) - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" + if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double +_ACEOF -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if ${ac_cv_sizeof_long_double+:} false; then : $as_echo_n "(cached) " >&6 else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - # First, try linking without a dummy main: - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +else + if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_double=0 + fi +fi -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } - ; - return 0; -} + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none -else - ac_cv_fortran_dummy_main=unknown -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break + +## Check for non-standard extenstion __FLOAT128 +HAVE_FLOAT128=0 +HAVE_QUADMATH=0 +FLT128_DIG=0 +LDBL_DIG=0 + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __float128" >&5 +$as_echo_n "checking size of __float128... " >&6; } +if ${ac_cv_sizeof___float128+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__float128))" "ac_cv_sizeof___float128" "$ac_includes_default"; then : + +else + if test "$ac_cv_type___float128" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (__float128) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof___float128=0 + fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___float128" >&5 +$as_echo "$ac_cv_sizeof___float128" >&6; } + + cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +#define SIZEOF___FLOAT128 $ac_cv_sizeof___float128 _ACEOF - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Quad" >&5 +$as_echo_n "checking size of _Quad... " >&6; } +if ${ac_cv_sizeof__Quad+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Quad))" "ac_cv_sizeof__Quad" "$ac_includes_default"; then : - fi -fi else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type__Quad" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails +as_fn_error 77 "cannot compute sizeof (_Quad) See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof__Quad=0 + fi fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Quad" >&5 +$as_echo "$ac_cv_sizeof__Quad" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define SIZEOF__QUAD $ac_cv_sizeof__Quad +_ACEOF -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} + +for ac_header in quadmath.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "quadmath.h" "ac_cv_header_quadmath_h" "$ac_includes_default" +if test "x$ac_cv_header_quadmath_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_QUADMATH_H 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 + HAVE_QUADMATH=1 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac +done - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 +$as_echo_n "checking maximum decimal precision for C... " >&6; } +rm -f pac_Cconftest.out + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif + + #include + #include + #define CHECK_FLOAT128 $ac_cv_sizeof___float128 + #if CHECK_FLOAT128!=0 + # if $HAVE_QUADMATH!=0 + #include + # endif + # ifdef FLT128_DIG + #define C_FLT128_DIG FLT128_DIG + # else + #define C_FLT128_DIG 0 + # endif + #else + #define C_FLT128_DIG 0 + #endif + #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + int main () { -return $ac_func (); + + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); + ; return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi - else - ac_cv_fc_mangling="unknown" - fi - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* -else +_ACEOF + if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program +as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + if ac_fn_c_try_run "$LINENO"; then : -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } + if test -s pac_Cconftest.out ; then + LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" + FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_Cconftest.out -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +else -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + as_fn_error $? "C program fails to build or run!" "$LINENO" 5 - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" +if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then - HAVE_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - i = sizeof(x) - END PROGRAM +$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SIZEOF_FORTRAN="yes" + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" - - HAVE_C_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM +cat >>confdefs.h <<_ACEOF +#define PAC_C_MAX_REAL_PRECISION $PAC_C_MAX_REAL_PRECISION _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - - HAVE_STORAGE_SIZE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_STORAGE_SIZE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_C_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_C_MAX_REAL_PRECISION" >&6; } +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## + HDF5_INTERFACES="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 +$as_echo_n "checking if Fortran interface enabled... " >&6; } +# Check whether --enable-fortran was given. +if test "${enable_fortran+set}" = set; then : + enableval=$enable_fortran; HDF_FORTRAN=$enableval fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - - ## Check to see if -r8 was specified to determine if we need to - ## compile the DOUBLE PRECISION interfaces. - - FORTRAN_DEFAULT_REALisDBLE="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 -$as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - MODULE type_mod - INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble - END INTERFACE - CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble - END MODULE type_mod - PROGRAM main - USE type_mod - REAL :: r - DOUBLE PRECISION :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - FORTRAN_DEFAULT_REALisDBLE="yes" + echo "no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - if test "X$HDF_FORTRAN2003" = "Xyes"; then - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - - - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr +if test "X$HDF_FORTRAN" = "Xyes"; then - ptr = C_LOC(ichr(1:1)) +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + HDF_FORTRAN=yes + HDF5_INTERFACES="$HDF5_INTERFACES fortran" - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" - fi - fi -else - FC="no" -fi + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## -## Change back to the C language -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_SIZEOF_TRUE= - FORTRAN_HAVE_SIZEOF_FALSE='#' -else - FORTRAN_HAVE_SIZEOF_TRUE='#' - FORTRAN_HAVE_SIZEOF_FALSE= -fi - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_SIZEOF_TRUE= - FORTRAN_HAVE_C_SIZEOF_FALSE='#' -else - FORTRAN_HAVE_C_SIZEOF_TRUE='#' - FORTRAN_HAVE_C_SIZEOF_FALSE= -fi - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_STORAGE_SIZE_TRUE= - FORTRAN_HAVE_STORAGE_SIZE_FALSE='#' -else - FORTRAN_HAVE_STORAGE_SIZE_TRUE='#' - FORTRAN_HAVE_STORAGE_SIZE_FALSE= -fi - if test "X$HAVE_FORTRAN_2003" = "Xyes"; then - FORTRAN_2003_CONDITIONAL_F_TRUE= - FORTRAN_2003_CONDITIONAL_F_FALSE='#' -else - FORTRAN_2003_CONDITIONAL_F_TRUE='#' - FORTRAN_2003_CONDITIONAL_F_FALSE= -fi - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - FORTRAN_DEFAULT_REALisDBLE_F_TRUE= - FORTRAN_DEFAULT_REALisDBLE_F_FALSE='#' -else - FORTRAN_DEFAULT_REALisDBLE_F_TRUE='#' - FORTRAN_DEFAULT_REALisDBLE_F_FALSE= -fi -## ---------------------------------------------------------------------- -## Check if they would like the C++ interface compiled -## -## We need to check for a C++ compiler unconditionally, since -## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -## miss even if c++ is not enabled. - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + ## -------------------------------------------------------------------- + ## Fortran source extention + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6707,7 +6390,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6717,32 +6400,32 @@ IFS=$as_save_IFS fi fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$CXX" && break + test -n "$FC" && break done fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6751,7 +6434,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" + ac_cv_prog_ac_ct_FC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6761,21 +6444,21 @@ IFS=$as_save_IFS fi fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_CXX" && break + test -n "$ac_ct_FC" && break done - if test "x$ac_ct_CXX" = x; then - CXX="g++" + if test "x$ac_ct_FC" = x; then + FC="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6783,14 +6466,13 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CXX=$ac_ct_CXX + FC=$ac_ct_FC fi fi - fi -fi + # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6813,153 +6495,136 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done +rm -f a.out -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + cat > conftest.$ac_ext <<_ACEOF + program main #ifndef __GNUC__ choke me #endif - ; - return 0; -} + end _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu +ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main - ; - return 0; -} + end _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + ac_cv_prog_fc_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi +if test $ac_compiler_gnu = yes; then + GFC=yes else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + GFC= +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + + end _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else - if test "$GXX" = yes; then - CXXFLAGS="-O2" + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" else - CXXFLAGS= + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 fi + + fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6967,389 +6632,348 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -depcc="$CXX" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + + + + ## -------------------------------------------------------------------- + ## Check for a Fortran compiler and how to include modules. + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi +done done +IFS=$as_save_IFS - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext + + test -n "$ac_ct_FC" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi fi - done - ac_cv_prog_CXXCPP=$CXXCPP -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me #endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - # Broken: fails on valid input. -continue + ac_compiler_gnu=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main + + end _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes else - # Passes both tests. -ac_preproc_ok=: -break + ac_cv_prog_fc_g=no fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi fi +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## this is checked for when AC_HEADER_STDC is done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 -$as_echo_n "checking if c++ interface enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 +$as_echo_n "checking what $FC does with modules... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; HDF_CXX=$enableval -fi +test -d conftestdir || mkdir conftestdir +cd conftestdir +rm -rf * -if test "X$HDF_CXX" = "Xyes"; then - echo "yes" - HDF5_INTERFACES="$HDF5_INTERFACES c++" +cat >conftest.$ac_ext <&1 +if test "$modfiles" = file.o; then + echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 + OLD_FCFLAGS=$FCFLAGS + FCFLAGS="$FCFLAGS -em" + eval $ac_compile + modfiles="" + for f in file.o module.mod MODULE.mod module.M MODULE.M; do + test -f $f && modfiles="$f" + done + if test "$modfiles" = "file.o"; then + FCFLAGS=$OLD_FCFLAGS + echo no 6>&1 + else + echo yes 6>&1 + fi +fi +cd .. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 -$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 +$as_echo_n "checking how $FC finds modules... " >&6; } -#include +for flag in "-I" "-M" "-p"; do + cat >conftest.$ac_ext <&5 -$as_echo "no" >&6; } + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + F9XMODFLAG=$flag + break + fi +done + +if test -n "$F9XMODFLAG"; then + echo $F9XMODFLAG 1>&6 + FCFLAGS="$F9XMODFLAG. $FCFLAGS" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" - AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" + echo unknown 1>&6 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - # Checking if C++ can handle namespaces - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 -$as_echo_n "checking if $CXX can handle namespaces... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +rm -rf conftest* +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -namespace H5 { -int fnord; -} -int main(void) { - using namespace H5; - fnord = 37; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - # Checking if C++ has offsetof extension + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 -$as_echo_n "checking if $CXX has offsetof extension... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 +$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main - #include - #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - struct index_st - { - unsigned char type; - unsigned char num; - unsigned int len; - }; - typedef struct index_st index_t; - int x,y; - x = offsetof(struct index_st, len); - y = offsetof(index_t, num) + ptr = C_LOC(ichr(1:1)) - ; - return 0; -} + + end _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h - + HAVE_F2003_REQUIREMENTS=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -7358,1452 +6982,1542 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - # if C++ can handle static cast - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 -$as_echo_n "checking if $CXX can handle static cast... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int main(void) { - float test_float; - int test_int; - test_float = 37.0; - test_int = static_cast (test_float); - return 0; -} + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 + fi -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" - AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + cat > conftest.$ac_ext <<_ACEOF + program main + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat > conftest.$ac_ext <<_ACEOF + program main -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXX="no" -fi + end +_ACEOF -## Change back to the C language -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS +rm -rf conftest* +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" -## ---------------------------------------------------------------------- -## Check if they would like the High Level library compiled -## +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; - HL="" -## name of fortran folder inside "hl", if FORTRAN compile is requested - HL_FOR="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 -$as_echo_n "checking if high level library is enabled... " >&6; } -# Check whether --enable-hl was given. -if test "${enable_hl+set}" = set; then : - enableval=$enable_hl; HDF5_HL=$enableval -else - HDF5_HL=yes -fi + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; -if test "X$HDF5_HL" = "Xyes"; then - echo "yes" - HL="hl" + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; -$as_echo "#define INCLUDE_HL 1" >>confdefs.h + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac - ## If Fortran's default real is double precision and HL is being built then configure - ## should fail due to bug HDFFV-889. - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - as_fn_error $? "Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl." "$LINENO" 5 - fi + # look for -l* and *.a constructs in the output + for ac_arg in $ac_fc_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_fc_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_fc_v"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} +fi else - echo "no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## ---------------------------------------------------------------------- -## Check if they have Perl installed on their system. We only need Perl -## if they're using a GNU compiler. -## - PERL="" -if test "X$GCC" = "Xyes"; then - for ac_prog in perl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PERL+:} false; then : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$PERL"; then - ac_cv_prog_PERL="$PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PERL="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PERL=$ac_cv_prog_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } + if test "x$FCLIBS" != "x"; then + ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +cat > conftest.$ac_ext <<_ACEOF + program main - test -n "$PERL" && break -done + end +_ACEOF -fi - -## ---------------------------------------------------------------------- -## Check which archiving tool to use. This needs to be done before -## the AM_PROG_LIBTOOL macro. -## - -if test -z "$AR"; then - for ac_prog in ar xar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +rm -rf conftest* +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" - test -n "$AR" && break -done -test -n "$AR" || AR=":" +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; -fi + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; -## Export the AR macro so that it will be placed in the libtool file -## correctly. -export AR + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi +ac_cv_fc_libs= -## ---------------------------------------------------------------------- -## Set up ${TR} which is used to process DEBUG_PKG. +# Save positional arguments (if any) +ac_save_positional="$@" -# Extract the first word of "tr", so it can be a program name with args. -set dummy tr; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TR+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $TR in - [\\/]* | ?:[\\/]*) - ac_cv_path_TR="$TR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done +set X $ac_fc_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi done -IFS=$as_save_IFS - ;; -esac -fi -TR=$ac_cv_path_TR -if test -n "$TR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 -$as_echo "$TR" >&6; } + if test x"$ac_exists" = xtrue; then : + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + if test x"$ac_exists" = xtrue; then : - - -## ---------------------------------------------------------------------- -## Check that time can be used with srcdir. This is okay on most systems, -## but seems to cause problems on Cygwin. -## The solution on Cygwin is not to record execution time for tests. -## -## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- -## and 64-bit platforms. Given how long this has been true, it seems -## unlikely to change, but we should probably re-test this periodically. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 -$as_echo_n "checking if srcdir= and time commands work together... " >&6; } - - -TIME=time -TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` - -if test "X${TIME_TEST}" = "Xbaz"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - TIME= + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi +fi + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ + |-LANG:=* | -LIST:* | -LNO:* | -link) + ;; + -lkernel32) + case $host_os in + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + esac + ;; + -[LRuYz]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + if test x"$ac_exists" = xtrue; then : -## The following variables are used to distinguish between building a -## serial and parallel library. -## -## HAVE_PARALLEL -- defined in H5config.h if we are building -## a parallel library even if configure wasn't -## able to find some header file or library that -## might be required. This is defined if the -## user explicitly states -## that a parallel library is being built by supplying -## the `--enable-parallel' configure switch. -## -## PARALLEL -- This variable is set to a non-null value if -## we're building a parallel version of the library. -## -## RUNSERIAL -- This is a command which will be prepended to -## the executable name to run the executable using -## a single process. For serial versions of the -## library this will normally be empty. For parallel -## versions it might be something like `mpiexec -n 1'. -## The value of this variable is substituted in *.in -## files. -## -## RUNPARALLEL -- This is a command which will be prepended to -## the executable name to run the executable on -## multiple processors. For the serial library the -## value will normally be the empty string. For -## parallel library it should be something like -## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -## eventually contain the number of processors on which -## to run the executable (the double dollarsigns are to -## protect the expansion until make executes the -## command). The value of this variable is -## substituted in *.in files. -## - - - - +else + ac_arg="$ac_arg $ac_j" + ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" +fi + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done -## ---------------------------------------------------------------------- -## Disable shared libraries on CYGWIN. (LK - 04/16/15) -## A number of tests run by "make check" fail on CYGWIN, so for HDF5 v1.8.15 -## we will change the default for shared libraries to disabled. + if test x"$ac_exists" = xtrue; then : +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi + ;; + -zallextract*| -zdefaultextract) + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift -case "`uname`" in - CYGWIN*) - enable_shared="no" - CHECK_WARN="Shared libraries are not currently supported on CYGWIN." - ;; +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" +fi + ;; esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" -## ---------------------------------------------------------------------- -## Fortran libraries are not currently supported on Mac. Disable them. -## (this is overridable with --enable-unsupported). -## +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } +FCLIBS="$ac_cv_fc_libs" -H5_FORTRAN_SHARED="no" -if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 -$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } - H5_FORTRAN_SHARED="yes" - ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - case "`uname`" in - Darwin*) - H5_FORTRAN_SHARED="no" - CHECK_WARN="Shared Fortran libraries not currently supported on Mac." - ;; - esac +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## Report results of check(s) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fc_dm_save_LIBS=$LIBS + LIBS="$LIBS $FCLIBS" + ac_fortran_dm_var=FC_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X${H5_FORTRAN_SHARED}" = "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 -$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} - if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 -$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 -$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} - if test "X${enable_static}" = "Xno"; then - as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 -$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} - H5_FORTRAN_SHARED="yes" - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi -fi + # First, try linking without a dummy main: + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "X$H5_FORTRAN_SHARED" = "Xyes"; then - FORTRAN_SHARED_CONDITIONAL_TRUE= - FORTRAN_SHARED_CONDITIONAL_FALSE='#' +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=none else - FORTRAN_SHARED_CONDITIONAL_TRUE='#' - FORTRAN_SHARED_CONDITIONAL_FALSE= + ac_cv_fortran_dummy_main=unknown fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define $ac_fortran_dm_var $ac_func +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -## ---------------------------------------------------------------------- -## Create libtool. If shared/static libraries are going to be enabled -## or disabled, it should happen before these macros. - - -## ---------------------------------------------------------------------- -## dlopen - This will use an improved version of libtool -## win32-dll - This will build clean dlls on win32 platforms. -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=$ac_func; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_fc_dm_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } +FC_DUMMY_MAIN=$ac_cv_fc_dummy_main +if test "$FC_DUMMY_MAIN" != unknown; then : + if test $FC_DUMMY_MAIN != none; then +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h + fi +fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + mv conftest.$ac_objext cfortran_test.$ac_objext -ltmain="$ac_aux_dir/ltmain.sh" + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success=yes; break 2 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success_extra=yes; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +case $ac_cv_fc_mangling in + "lower case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + ;; + "lower case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + ;; + "upper case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + ;; + "upper case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + ;; +esac +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi + HAVE_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + i = sizeof(x) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_SIZEOF_FORTRAN="yes" else - ac_cv_path_SED=$SED + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + HAVE_C_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_SIZEOF_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + HAVE_STORAGE_SIZE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_STORAGE_SIZE_FORTRAN="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + ## Set the sizeof function for use later in the fortran tests + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then + FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + else + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then + FC_SIZEOF_A="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(b)" + FC_SIZEOF_C="SIZEOF(c)" + else + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi + + ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + + HAVE_ISO_FORTRAN_ENV="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE, INTRINSIC :: ISO_FORTRAN_ENV + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_ISO_FORTRAN_ENV="yes" else - ac_cv_path_GREP=$GREP + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" + ## Check KIND and size of native integer +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 +rm -f pac_fconftest.out + +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + cat > conftest.$ac_ext <<_ACEOF - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE='pac_fconftest.out', form='formatted') + ! Find integer KINDs + DO ik=2,36 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + ! Find real KINDs + num_rkinds = 0 + lastkind=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + DO ik=2,36 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + max_decimal_prec = ik + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" +cat >>confdefs.h <<_ACEOF +#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION +_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" -test -z "$GREP" && GREP=grep +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND +_ACEOF +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 +$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 +$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of native KINDS" >&5 +$as_echo_n "checking sizeof of native KINDS... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +pack_int_sizeof="" +rm -f pac_fconftest.out + cat > conftest.$ac_ext <<_ACEOF + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,*) $FC_SIZEOF_A + WRITE(8,*) kind(a) + WRITE(8,*) $FC_SIZEOF_B + WRITE(8,*) kind(b) + WRITE(8,*) $FC_SIZEOF_C + WRITE(8,*) kind(c) + CLOSE(8) + END -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 +_ACEOF + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + else - lt_cv_path_LD="$LD" # Let the user override the test with a path. + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam fi -LD="$lt_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pack_int_sizeof" >&5 +$as_echo "$pack_int_sizeof" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + ## Find all available KINDs + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +rm -f pac_fconftest.out + +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld + cat > conftest.$ac_ext <<_ACEOF + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE='pac_fconftest.out', form='formatted') + ! Find integer KINDs + DO ik=2,36 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + ! Find real KINDs + num_rkinds = 0 + lastkind=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + DO ik=2,36 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + max_decimal_prec = ik + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" +cat >>confdefs.h <<_ACEOF +#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION +_ACEOF + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 +$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 +$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 +$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} + fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 + + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + ## Find all sizeofs for available KINDs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 +$as_echo_n "checking sizeof of available INTEGER KINDs... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +pack_int_sizeof="" +rm -f pac_fconftest.out + +for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do + cat > conftest.$ac_ext <<_ACEOF + + + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=$kind) a + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END + + +_ACEOF + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam fi +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available REAL KINDs" >&5 +$as_echo_n "checking sizeof of available REAL KINDs... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do + cat > conftest.$ac_ext <<_ACEOF + + + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=$kind) :: a + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END + + +_ACEOF + if test "$cross_compiling" = yes; then : + + pack_real_sizeof="" - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - test -n "$ac_ct_DUMPBIN" && break done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 1" >>confdefs.h - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi + HAVE_Fortran_INTEGER_SIZEOF_16="0" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then + +$as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h + fi -fi -test -z "$NM" && NM=nm + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then +$as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h + fi + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then +$as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then + ## See if C_LONG_DOUBLE is available + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_LONG_DOUBLE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_LONG_DOUBLE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; + FORTRAN_HAVE_C_LONG_DOUBLE="0" + if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_C_LONG_DOUBLE="1" - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; +$as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; + fi - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; + ## Is C_LONG_DOUBLE different from C_DOUBLE + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE... " >&6; } - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac + cat > conftest.$ac_ext <<_ACEOF -fi + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} + if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } +$as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h + else + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } + FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} +cat >>confdefs.h <<_ACEOF +#define FORTRAN_SIZEOF_LONG_DOUBLE "${ac_cv_sizeof_long_double}" +_ACEOF -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi + max_real_fortran_sizeof="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" + max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" + if test "$ac_cv_sizeof___float128" != 0;then + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + " >&5 +$as_echo "$as_me: WARNING: + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + " >&2;} + PAC_FC_ALL_REAL_KINDS="`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5 +$as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"$PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"$PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND +_ACEOF +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND +_ACEOF +cat >>confdefs.h <<_ACEOF +#define H5CONFIG_F_RKIND_SIZEOF $H5CONFIG_F_RKIND_SIZEOF +_ACEOF +## Change back to the C language + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' + FC="no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 +## ---------------------------------------------------------------------- +## Check if they would like the C++ interface compiled +## +## We need to check for a C++ compiler unconditionally, since +## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will +## miss even if c++ is not enabled. + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -8812,7 +8526,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -8822,28 +8536,32 @@ IFS=$as_save_IFS fi fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$CXX" && break + done fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -8852,7 +8570,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" + ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -8862,17 +8580,21 @@ IFS=$as_save_IFS fi fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) @@ -8880,529 +8602,540 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OBJDUMP=$ac_ct_OBJDUMP + CXX=$ac_ct_CXX fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" fi -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -beos*) - lt_cv_deplibs_check_method=pass_all - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" else - lt_cv_deplibs_check_method=pass_all + CXXFLAGS="-g" fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + CXXFLAGS= fi - ;; +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; +depcc="$CXX" am_compiler_list= -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext - + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi +rm -f conftest.err conftest.i conftest.$ac_ext + done - done -IFS=$as_save_IFS +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - DLLTOOL="$ac_cv_prog_DLLTOOL" + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext -test -z "$DLLTOOL" && DLLTOOL=dlltool +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ## this is checked for when AC_HEADER_STDC is done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 +$as_echo_n "checking if c++ interface enabled... " >&6; } +# Check whether --enable-cxx was given. +if test "${enable_cxx+set}" = set; then : + enableval=$enable_cxx; HDF_CXX=$enableval +fi +if test "X$HDF_CXX" = "Xyes"; then + echo "yes" + HDF5_INTERFACES="$HDF5_INTERFACES c++" + ## Change to the C++ language + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # Checking if C++ needs old style header files in includes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 +$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO +#include +int main(void) { return 0; } +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" + AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # Checking if C++ can handle namespaces + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 +$as_echo_n "checking if $CXX can handle namespaces... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +namespace H5 { +int fnord; +} -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +int main(void) { + using namespace H5; + fnord = 37; + return 0; +} -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Checking if C++ has offsetof extension -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 +$as_echo_n "checking if $CXX has offsetof extension... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + #include + #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -9415,160 +9148,124 @@ int main () { + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= else - archiver_list_spec=$lt_cv_ar_at_file + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # if C++ can handle static cast + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 +$as_echo_n "checking if $CXX can handle static cast... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void) { + float test_float; + int test_int; + test_float = 37.0; + test_int = static_cast (test_float); + return 0; +} - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" + AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + CXX="no" fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi +## Change back to the C language +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## + + HL="" +## name of fortran folder inside "hl", if FORTRAN compile is requested + HL_FOR="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 +$as_echo_n "checking if high level library is enabled... " >&6; } +# Check whether --enable-hl was given. +if test "${enable_hl+set}" = set; then : + enableval=$enable_hl; HDF5_HL=$enableval else - STRIP="$ac_cv_prog_STRIP" + HDF5_HL=yes fi -test -z "$STRIP" && STRIP=: +if test "X$HDF5_HL" = "Xyes"; then + echo "yes" + HL="hl" +$as_echo "#define INCLUDE_HL 1" >>confdefs.h +else + echo "no" +fi +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +if test -z "$AR"; then + for ac_prog in ar xar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -9577,7 +9274,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + ac_cv_prog_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9587,37 +9284,84 @@ IFS=$as_save_IFS fi fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$AR" && break +done +test -n "$AR" || AR=":" + fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 + + +## Export the AR macro so that it will be placed in the libtool file +## correctly. +export AR + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + + + +## ---------------------------------------------------------------------- +## Set up ${TR} which is used to process DEBUG_PKG. + +# Extract the first word of "tr", so it can be a program name with args. +set dummy tr; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : +if ${ac_cv_path_TR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $TR in + [\\/]* | ?:[\\/]*) + ac_cv_path_TR="$TR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" + ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9625,84 +9369,172 @@ done done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } +TR=$ac_cv_path_TR +if test -n "$TR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 +$as_echo "$TR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: +## ---------------------------------------------------------------------- +## Check that time can be used with srcdir. This is okay on most systems, +## but seems to cause problems on Cygwin. +## The solution on Cygwin is not to record execution time for tests. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 +$as_echo_n "checking if srcdir= and time commands work together... " >&6; } -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= +TIME=time +TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +if test "X${TIME_TEST}" = "Xbaz"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + TIME= fi -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac +## The following variables are used to distinguish between building a +## serial and parallel library. +## +## HAVE_PARALLEL -- defined in H5config.h if we are building +## a parallel library even if configure wasn't +## able to find some header file or library that +## might be required. This is defined if the +## user explicitly states +## that a parallel library is being built by supplying +## the `--enable-parallel' configure switch. +## +## PARALLEL -- This variable is set to a non-null value if +## we're building a parallel version of the library. +## +## RUNSERIAL -- This is a command which will be prepended to +## the executable name to run the executable using +## a single process. For serial versions of the +## library this will normally be empty. For parallel +## versions it might be something like `mpiexec -n 1'. +## The value of this variable is substituted in *.in +## files. +## +## RUNPARALLEL -- This is a command which will be prepended to +## the executable name to run the executable on +## multiple processors. For the serial library the +## value will normally be the empty string. For +## parallel library it should be something like +## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will +## eventually contain the number of processors on which +## to run the executable (the double dollarsigns are to +## protect the expansion until make executes the +## command). The value of this variable is +## substituted in *.in files. +## +## ---------------------------------------------------------------------- +## Disable shared libraries on CYGWIN. (LK - 04/16/15) +## A number of tests run by "make check" fail on CYGWIN, so for HDF5 v1.8.15 +## we will change the default for shared libraries to disabled. +case "`uname`" in + CYGWIN*) + enable_shared="no" + CHECK_WARN="Shared libraries are not currently supported on CYGWIN." + ;; +esac +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## +H5_FORTRAN_SHARED="no" +if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 +$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } + H5_FORTRAN_SHARED="yes" + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) + case "`uname`" in + Darwin*) + H5_FORTRAN_SHARED="no" + CHECK_WARN="Shared Fortran libraries not currently supported on Mac." + ;; + esac + ## Report results of check(s) + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 +$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 +$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 +$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} + if test "X${enable_static}" = "Xno"; then + as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 +$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} + H5_FORTRAN_SHARED="yes" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi +fi + if test "X$H5_FORTRAN_SHARED" = "Xyes"; then + FORTRAN_SHARED_CONDITIONAL_TRUE= + FORTRAN_SHARED_CONDITIONAL_FALSE='#' +else + FORTRAN_SHARED_CONDITIONAL_TRUE='#' + FORTRAN_SHARED_CONDITIONAL_FALSE= +fi +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. +## ---------------------------------------------------------------------- +## dlopen - This will use an improved version of libtool +## win32-dll - This will build clean dlls on win32 platforms. +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac +macro_version='2.4.2' +macro_revision='1.3337' @@ -9716,277 +9548,227 @@ esac +ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - # Check to see that the pipe works correctly. - pipe_works=no - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif -#ifdef __cplusplus -extern "C" { -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi - cat <<_LT_EOF >> conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -fi -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" +test -z "$GREP" && GREP=grep @@ -10005,387 +9787,188 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else - with_sysroot=no + with_gnu_ld=no fi - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; esac fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes + done + IFS="$lt_save_ifs" else - lt_cv_cc_needs_belf=no + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* +*) + lt_cv_prog_gnu_ld=no ;; esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld -need_locks="$enable_libtool_lock" -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" fi -done + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" done -IFS=$as_save_IFS - + : ${lt_cv_path_NM=no} fi fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -10394,7 +9977,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -10404,28 +9987,32 @@ IFS=$as_save_IFS fi fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$DUMPBIN" && break + done fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -10434,7 +10021,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -10444,17 +10031,21 @@ IFS=$as_save_IFS fi fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -10462,390 +10053,259 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DSYMUTIL=$ac_ct_DSYMUTIL + DUMPBIN=$ac_ct_DUMPBIN fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac fi -done - done -IFS=$as_save_IFS + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +test -z "$NM" && NM=nm -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - LIPO="$ac_cv_prog_LIPO" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + i=0 + teststring="ABCD" -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - OTOOL64="$ac_cv_prog_OTOOL64" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac @@ -10855,523 +10315,445 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +fi +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - + lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else - _lt_dsymutil= + reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; - esac +esac -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - done - ac_cv_prog_CPP=$CPP fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + OBJDUMP="$ac_cv_prog_OBJDUMP" fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include +test -z "$OBJDUMP" && OBJDUMP=objdump -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : -else - ac_cv_header_stdc=no -fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +beos*) + lt_cv_deplibs_check_method=pass_all + ;; -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; -fi +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; -done +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; esac -} # func_stripname_cnf - + ;; +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; -# Set options -enable_dlopen=yes +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; - enable_win32_dll=no +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi @@ -11382,30 +10764,8 @@ fi -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi -test -z "$pic_mode" && pic_mode=default @@ -11413,51 +10773,99 @@ test -z "$pic_mode" && pic_mode=default - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi +test -z "$DLLTOOL" && DLLTOOL=dlltool @@ -11468,8 +10876,37 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -11477,15 +10914,108 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -test -z "$LN_S" && LN_S="ln -s" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi +: ${AR=ar} +: ${AR_FLAGS=cru} @@ -11496,768 +11026,590 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac -# Global variables: -ofile=libtool -can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - + done +IFS=$as_save_IFS -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else - MAGIC_CMD=: + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB fi +else + RANLIB="$ac_cv_prog_RANLIB" fi - fi - ;; -esac +test -z "$RANLIB" && RANLIB=: -# Use C for the default configuration in the libtool script -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Source file extension for C test sources. -ac_ext=c -# Object file extension for compiled C test sources. -objext=o -objext=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -if test -n "$compiler"; then -lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi -fi - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; +# Allow CC to be a program name with arguments. +compiler=$CC - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac - rdos*) - lt_prog_compiler_static='-non_shared' - ;; +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi + # Check to see that the pipe works correctly. + pipe_works=no -fi + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif +#ifdef __cplusplus +extern "C" { +#endif +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + cat <<_LT_EOF >> conftest.$ac_ext +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +fi -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' fi @@ -12266,1412 +11618,1087 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - ld_shlibs=yes +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" ;; esac ;; - *) - lt_use_gnu_ld_interface=yes + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac ;; esac fi + rm -rf conftest* + ;; - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -_LT_EOF - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac ;; + esac + fi + rm -rf conftest* + ;; +esac - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; +need_locks="$enable_libtool_lock" - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS fi - - aix_libpath=$lt_cv_aix_libpath_ +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi else - if ${lt_cv_aix_libpath_+:} false; then : + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS fi - - aix_libpath=$lt_cv_aix_libpath_ +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - darwin* | rhapsody*) +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" else - whole_archive_flag_spec='' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" +else + OTOOL="$ac_cv_prog_OTOOL" +fi - else - ld_shlibs=no + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - ;; +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - *nto* | *qnx*) - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* fi - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" - *) - ld_shlibs=no - ;; - esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF +fi +done +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +# Set options +enable_dlopen=yes -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes + enable_win32_dll=no - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + done + IFS="$lt_save_ifs" ;; esac - fi - ;; -esac - - - - - - - - - - - - - - +else + enable_shared=yes +fi @@ -13681,6 +12708,28 @@ esac + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi @@ -13691,8 +12740,30 @@ esac +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi +test -z "$pic_mode" && pic_mode=default @@ -13700,6 +12771,28 @@ esac + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi @@ -13711,7 +12804,11 @@ esac +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -13742,6 +12839,7 @@ esac +test -z "$LN_S" && LN_S="ln -s" @@ -13756,45 +12854,246 @@ esac +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac +# Global variables: +ofile=libtool +can_build_shared=yes +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +with_gnu_ld="$lt_cv_prog_gnu_ld" +old_CC="$CC" +old_CFLAGS="$CFLAGS" +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + else + MAGIC_CMD=: + fi +fi + fi + ;; +esac +# Use C for the default configuration in the libtool script +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Source file extension for C test sources. +ac_ext=c +# Object file extension for compiled C test sources. +objext=o +objext=$objext +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' @@ -13802,771 +13101,522 @@ esac +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +# Allow CC to be a program name with arguments. +compiler=$CC +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +if test -n "$compiler"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } +lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +fi - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac else + # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no + rdos*) + lt_prog_compiler_static='-non_shared' + ;; - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; -fi + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +fi -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; -rdos*) - dynamic_linker=no - ;; -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi @@ -14574,177 +13624,632 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + ld_shlibs=yes + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. +_LT_EOF + fi + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -14756,107 +14261,56 @@ char dlopen (); int main () { -return dlopen (); + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi fi - ;; + aix_libpath=$lt_cv_aix_libpath_ +fi - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -14868,858 +14322,728 @@ char dlopen (); int main () { -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi fi - + aix_libpath=$lt_cv_aix_libpath_ fi - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif + darwin* | rhapsody*) -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } else - puts (dlerror ()); + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no + else + ld_shlibs=no fi -fi -rm -fr conftest* + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -#if HAVE_DLFCN_H -#include -#endif + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; -#include + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + *nto* | *qnx*) + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; + *) + ld_shlibs=no + ;; + esac - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no +with_gnu_ld=$with_gnu_ld -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CXXCPP=$CXXCPP -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 else - _lt_caught_CXX_error=yes + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no -# Source file extension for C++ test sources. -ac_ext=cpp -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - # ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - if test "$GXX" = yes; then - # Set up default GNU C++ configuration -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld @@ -15727,1270 +15051,103 @@ with_gnu_ld=$lt_cv_prog_gnu_ld - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - GXX=no - with_gnu_ld=no - wlarc= - fi - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi -fi - aix_libpath=$lt_cv_aix_libpath__CXX -fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" - fi -fi - aix_libpath=$lt_cv_aix_libpath__CXX -fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - else - ld_shlibs_CXX=no - fi - ;; - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - output_verbose_link_cmd='func_echo_all' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - GCC_CXX="$GXX" - LD_CXX="$LD" - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi @@ -17011,704 +15168,777 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - lt_prog_compiler_pic_CXX='-fPIC' + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` else case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; esac fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; -esac + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes fi - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir +fi + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* +rdos*) + dynamic_linker=no + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no -with_gnu_ld_CXX=$with_gnu_ld -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac @@ -17771,443 +16001,169 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= ;; - esac - ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; + *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -18219,270 +16175,433 @@ else int main () { - +return shl_load (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; +fi -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +fi -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; -rdos*) - dynamic_linker=no - ;; +fi -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; +fi -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +fi -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac + enable_dlopen=no fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi +#if HAVE_DLFCN_H +#include +#endif +#include +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" +#if HAVE_DLFCN_H +#include +#endif +#include +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi @@ -18499,42 +16618,35 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi @@ -18543,316 +16655,429 @@ fi - fi # test -n "$compiler" - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -archive_cmds_need_lc_FC=no -allow_undefined_flag_FC= -always_export_symbols_FC=no -archive_expsym_cmds_FC= -export_dynamic_flag_spec_FC= -hardcode_direct_FC=no -hardcode_direct_absolute_FC=no -hardcode_libdir_flag_spec_FC= -hardcode_libdir_separator_FC= -hardcode_minus_L_FC=no -hardcode_automatic_FC=no -inherit_rpath_FC=no -module_cmds_FC= -module_expsym_cmds_FC= -link_all_deplibs_FC=unknown -old_archive_cmds_FC=$old_archive_cmds -reload_flag_FC=$reload_flag -reload_cmds_FC=$reload_cmds -no_undefined_flag_FC= -whole_archive_flag_spec_FC= -enable_shared_with_static_runtimes_FC=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} -# Object file extension for compiled fc test sources. -objext=o -objext_FC=$objext -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - # ltmain only uses $CC for tagged configurations so make sure $CC is set. +CC="$lt_save_CC" + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + done + ac_cv_prog_CXXCPP=$CXXCPP -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext -# Allow CC to be a program name with arguments. -compiler=$CC + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +else + _lt_caught_CXX_error=yes +fi - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - compiler_FC=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no +# Source file extension for C++ test sources. +ac_ext=cpp - if test -n "$compiler"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + # ltmain only uses $CC for tagged configurations so make sure $CC is set. - GCC_FC="$ac_cv_fc_compiler_gnu" - LD_FC="$LD" - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_FC= -postdep_objects_FC= -predeps_FC= -postdeps_FC= -compiler_lib_search_path_FC= -cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in +# Allow CC to be a program name with arguments. +compiler=$CC - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_FC"; then - compiler_lib_search_path_FC="${prev}${p}" - else - compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_FC"; then - postdeps_FC="${prev}${p}" - else - postdeps_FC="${postdeps_FC} ${prev}${p}" - fi - fi - prev= - ;; + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_FC"; then - predep_objects_FC="$p" - else - predep_objects_FC="$predep_objects_FC $p" - fi - else - if test -z "$postdep_objects_FC"; then - postdep_objects_FC="$p" - else - postdep_objects_FC="$postdep_objects_FC $p" - fi - fi - ;; - *) ;; # Ignore the rest. + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - esac - done - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling FC test program" -fi + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS + if test "$GXX" = yes; then + # Set up default GNU C++ configuration -# PORTME: override above test on systems where it is broken -case " $postdeps_FC " in -*" -lc "*) archive_cmds_need_lc_FC=no ;; -esac - compiler_lib_search_dirs_FC= -if test -n "${compiler_lib_search_path_FC}"; then - compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld @@ -18860,1745 +17085,1293 @@ fi + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= - lt_prog_compiler_wl_FC= -lt_prog_compiler_pic_FC= -lt_prog_compiler_static_FC= + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - if test "$GCC" = yes; then - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_static_FC='-static' + else + GXX=no + with_gnu_ld=no + wlarc= + fi + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_FC='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_FC= - ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='-fPIC' - ;; - esac - ;; + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_FC=no - enable_shared=no - ;; + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' - ;; + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_FC=-Kconform_pic - fi - ;; + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - *) - lt_prog_compiler_pic_FC='-fPIC' - ;; - esac + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_FC='-Xlinker ' - if test -n "$lt_prog_compiler_pic_FC"; then - lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_FC='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' - else - lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' - fi - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_FC='${wl}-a ${wl}archive' - ;; + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_FC='-non_shared' - ;; +fi - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='--shared' - lt_prog_compiler_static_FC='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_FC='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_FC='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-qpic' - lt_prog_compiler_static_FC='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - esac - ;; - esac - ;; + aix_libpath=$lt_cv_aix_libpath__CXX +fi - newsos6) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' - ;; + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_FC='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_FC='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_FC='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_FC='-Qoption ld ';; - *) - lt_prog_compiler_wl_FC='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_FC='-Qoption ld ' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_FC='-Kconform_pic' - lt_prog_compiler_static_FC='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_can_build_shared_FC=no - ;; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ - uts4*) - lt_prog_compiler_pic_FC='-pic' - lt_prog_compiler_static_FC='-Bstatic' - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : - *) - lt_prog_compiler_can_build_shared_FC=no - ;; - esac + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_FC= - ;; - *) - lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 -$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } -lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_FC=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_FC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_FC=yes - fi - fi - $RM conftest* - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; } +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi -if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then - case $lt_prog_compiler_pic_FC in - "" | " "*) ;; - *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; - esac -else - lt_prog_compiler_pic_FC= - lt_prog_compiler_can_build_shared_FC=no fi + aix_libpath=$lt_cv_aix_libpath__CXX fi + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_FC=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_FC=yes - fi - else - lt_cv_prog_compiler_static_works_FC=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then - : -else - lt_prog_compiler_static_FC= -fi + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + else + ld_shlibs_CXX=no + fi - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* + gnu*) + ;; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; - runpath_var= - allow_undefined_flag_FC= - always_export_symbols_FC=no - archive_cmds_FC= - archive_expsym_cmds_FC= - compiler_needs_object_FC=no - enable_shared_with_static_runtimes_FC=no - export_dynamic_flag_spec_FC= - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic_FC=no - hardcode_direct_FC=no - hardcode_direct_absolute_FC=no - hardcode_libdir_flag_spec_FC= - hardcode_libdir_separator_FC= - hardcode_minus_L_FC=no - hardcode_shlibpath_var_FC=unsupported - inherit_rpath_FC=no - link_all_deplibs_FC=unknown - module_cmds_FC= - module_expsym_cmds_FC= - old_archive_from_new_cmds_FC= - old_archive_from_expsyms_cmds_FC= - thread_safe_flag_spec_FC= - whole_archive_flag_spec_FC= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_FC= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ld_shlibs_FC=yes + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_FC='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_FC= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac -_LT_EOF - fi - ;; + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; - esac - ;; + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_FC=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_FC=no - fi - ;; + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_FC='-L$libdir' - export_dynamic_flag_spec_FC='${wl}--export-all-symbols' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=no - enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_FC=no - fi - ;; + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; - haiku*) - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs_FC=yes - ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; - interix[3-9]*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' - export_dynamic_flag_spec_FC='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec_FC= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_FC=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_FC=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; esac - archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + ;; - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs_FC=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; -_LT_EOF + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi ;; - esac - ;; - sunos4*) - archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - esac + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - if test "$ld_shlibs_FC" = no; then - runpath_var= - hardcode_libdir_flag_spec_FC= - export_dynamic_flag_spec_FC= - whole_archive_flag_spec_FC= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_FC=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_FC=unsupported - fi - ;; + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac + hardcode_libdir_separator_CXX=: - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: - archive_cmds_FC='' - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - file_list_spec_FC='${wl}-f,' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_FC=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_FC=yes - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_libdir_separator_FC= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; - export_dynamic_flag_spec_FC='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_FC=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_FC='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC="/usr/lib:/lib" - fi + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -fi + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes - aix_libpath=$lt_cv_aix_libpath__FC -fi + output_verbose_link_cmd='func_echo_all' - hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_FC="-z nodefs" - archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC="/usr/lib:/lib" - fi + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -fi + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi - aix_libpath=$lt_cv_aix_libpath__FC -fi + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; - hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_FC=' ${wl}-bernotok' - allow_undefined_flag_FC=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_FC='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_FC='$convenience' - fi - archive_cmds_need_lc_FC=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; esac ;; - bsdi[45]*) - export_dynamic_flag_spec_FC=-rdynamic - ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - file_list_spec_FC='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' - enable_shared_with_static_runtimes_FC=yes - exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds_FC='chmod 644 $oldlib' - postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes_FC=yes - ;; - esac + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; - darwin* | rhapsody*) + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; - archive_cmds_need_lc_FC=no - hardcode_direct_FC=no - hardcode_automatic_FC=yes - hardcode_shlibpath_var_FC=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - compiler_needs_object_FC=yes - else - whole_archive_flag_spec_FC='' - fi - link_all_deplibs_FC=yes - allow_undefined_flag_FC="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac - else - ld_shlibs_FC=no - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no - ;; + GCC_CXX="$GXX" + LD_CXX="$LD" - dgux*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no - ;; + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac - hpux9*) - if test "$GCC" = yes; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - export_dynamic_flag_spec_FC='${wl}-E' - ;; + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - fi - ;; + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_FC=: + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - ;; - *) - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='${wl}-E' + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - ;; - esac - fi - ;; + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; - subroutine foo - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + echo "libtool.m4: error: problem compiling CXX test program" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_FC=: - inherit_rpath_FC=yes - link_all_deplibs_FC=yes - ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS - newsos6) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_FC=: - hardcode_shlibpath_var_FC=no - ;; +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; - *nto* | *qnx*) - ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - hardcode_direct_absolute_FC=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' - export_dynamic_flag_spec_FC='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-R$libdir' - ;; - *) - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_FC=no - fi + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes ;; + esac - os2*) - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - allow_undefined_flag_FC=unsupported - archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes ;; + esac - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_FC=: - ;; + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_FC='-rpath $libdir' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_separator_FC=: - ;; +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi - solaris*) - no_undefined_flag_FC=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_shlibpath_var_FC=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_FC=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_FC='$CC -r -o $output$reload_objs' - hardcode_direct_FC=no - ;; - motorola) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_FC=no - ;; - sysv4.3*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - export_dynamic_flag_spec_FC='-Bexport' - ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_FC=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_FC='${wl}-z,text' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_FC='${wl}-z,text' - allow_undefined_flag_FC='${wl}-z,nodefs' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='${wl}-R,$libdir' - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - export_dynamic_flag_spec_FC='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no - ;; - *) - ld_shlibs_FC=no - ;; - esac - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec_FC='${wl}-Blargedynsym' - ;; - esac - fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 -$as_echo "$ld_shlibs_FC" >&6; } -test "$ld_shlibs_FC" = no && can_build_shared=no -with_gnu_ld_FC=$with_gnu_ld -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_FC" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_FC=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_FC in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_FC - pic_flag=$lt_prog_compiler_pic_FC - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_FC - allow_undefined_flag_FC= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_FC=no - else - lt_cv_archive_cmds_need_lc_FC=yes - fi - allow_undefined_flag_FC=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; } - archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC - ;; - esac - fi - ;; -esac @@ -20607,752 +18380,3583 @@ esac + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' fi ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; + lt_prog_compiler_pic_CXX='-fPIC' + ;; esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +archive_cmds_need_lc_FC=no +allow_undefined_flag_FC= +always_export_symbols_FC=no +archive_expsym_cmds_FC= +export_dynamic_flag_spec_FC= +hardcode_direct_FC=no +hardcode_direct_absolute_FC=no +hardcode_libdir_flag_spec_FC= +hardcode_libdir_separator_FC= +hardcode_minus_L_FC=no +hardcode_automatic_FC=no +inherit_rpath_FC=no +module_cmds_FC= +module_expsym_cmds_FC= +link_all_deplibs_FC=unknown +old_archive_cmds_FC=$old_archive_cmds +reload_flag_FC=$reload_flag +reload_cmds_FC=$reload_cmds +no_undefined_flag_FC= +whole_archive_flag_spec_FC= +enable_shared_with_static_runtimes_FC=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +objext_FC=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + compiler_FC=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + GCC_FC="$ac_cv_fc_compiler_gnu" + LD_FC="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_FC= +postdep_objects_FC= +predeps_FC= +postdeps_FC= +compiler_lib_search_path_FC= + +cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_FC"; then + compiler_lib_search_path_FC="${prev}${p}" + else + compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_FC"; then + postdeps_FC="${prev}${p}" + else + postdeps_FC="${postdeps_FC} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_FC"; then + predep_objects_FC="$p" + else + predep_objects_FC="$predep_objects_FC $p" + fi + else + if test -z "$postdep_objects_FC"; then + postdep_objects_FC="$p" + else + postdep_objects_FC="$postdep_objects_FC $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling FC test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken + + +case " $postdeps_FC " in +*" -lc "*) archive_cmds_need_lc_FC=no ;; +esac + compiler_lib_search_dirs_FC= +if test -n "${compiler_lib_search_path_FC}"; then + compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + lt_prog_compiler_wl_FC= +lt_prog_compiler_pic_FC= +lt_prog_compiler_static_FC= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_static_FC='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_FC='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_FC= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_FC=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_FC='-Xlinker ' + if test -n "$lt_prog_compiler_pic_FC"; then + lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_FC='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + else + lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_FC='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_FC='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='--shared' + lt_prog_compiler_static_FC='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_FC='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-qpic' + lt_prog_compiler_static_FC='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_FC='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_FC='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_FC='-Qoption ld ';; + *) + lt_prog_compiler_wl_FC='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_FC='-Qoption ld ' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_FC='-Kconform_pic' + lt_prog_compiler_static_FC='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_can_build_shared_FC=no + ;; + + uts4*) + lt_prog_compiler_pic_FC='-pic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_FC=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_FC= + ;; + *) + lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_FC=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_FC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_FC=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then + case $lt_prog_compiler_pic_FC in + "" | " "*) ;; + *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; + esac +else + lt_prog_compiler_pic_FC= + lt_prog_compiler_can_build_shared_FC=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_FC=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_FC=yes + fi + else + lt_cv_prog_compiler_static_works_FC=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then + : +else + lt_prog_compiler_static_FC= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_FC=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_FC=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag_FC= + always_export_symbols_FC=no + archive_cmds_FC= + archive_expsym_cmds_FC= + compiler_needs_object_FC=no + enable_shared_with_static_runtimes_FC=no + export_dynamic_flag_spec_FC= + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic_FC=no + hardcode_direct_FC=no + hardcode_direct_absolute_FC=no + hardcode_libdir_flag_spec_FC= + hardcode_libdir_separator_FC= + hardcode_minus_L_FC=no + hardcode_shlibpath_var_FC=unsupported + inherit_rpath_FC=no + link_all_deplibs_FC=unknown + module_cmds_FC= + module_expsym_cmds_FC= + old_archive_from_new_cmds_FC= + old_archive_from_expsyms_cmds_FC= + thread_safe_flag_spec_FC= + whole_archive_flag_spec_FC= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_FC= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_FC=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_FC='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_FC= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' + ;; + m68k) + archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_FC=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_FC=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_FC='-L$libdir' + export_dynamic_flag_spec_FC='${wl}--export-all-symbols' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=no + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_FC=no + fi + ;; + + haiku*) + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_FC=yes + ;; + + interix[3-9]*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' + export_dynamic_flag_spec_FC='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec_FC= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_FC=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_FC=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs_FC=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + esac + + if test "$ld_shlibs_FC" = no; then + runpath_var= + hardcode_libdir_flag_spec_FC= + export_dynamic_flag_spec_FC= + whole_archive_flag_spec_FC= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_FC=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_FC=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_FC='' + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + file_list_spec_FC='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_FC=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_FC=yes + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_libdir_separator_FC= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_FC='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_FC=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_FC='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi + + hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_FC="-z nodefs" + archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi + + hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_FC=' ${wl}-bernotok' + allow_undefined_flag_FC=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_FC='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_FC='$convenience' + fi + archive_cmds_need_lc_FC=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' + ;; + m68k) + archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec_FC=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' + enable_shared_with_static_runtimes_FC=yes + exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes + ;; + esac + ;; -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + darwin* | rhapsody*) -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" - cat > conftest.$ac_ext <<_ACEOF - program main + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes + hardcode_shlibpath_var_FC=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + compiler_needs_object_FC=yes + else + whole_archive_flag_spec_FC='' + fi + link_all_deplibs_FC=yes + allow_undefined_flag_FC="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + else + ld_shlibs_FC=no + fi -fi + ;; - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + dgux*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=no + ;; - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no + ;; - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; + hpux9*) + if test "$GCC" = yes; then + archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + export_dynamic_flag_spec_FC='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_FC=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + ;; + *) + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='${wl}-E' -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + ;; + esac + fi + ;; -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; + subroutine foo + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_FC=: + inherit_rpath_FC=yes + link_all_deplibs_FC=yes + ;; -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; + newsos6) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_FC=: + hardcode_shlibpath_var_FC=no + ;; -rdos*) - dynamic_linker=no - ;; + *nto* | *qnx*) + ;; -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + hardcode_direct_absolute_FC=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' + export_dynamic_flag_spec_FC='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-R$libdir' + ;; + *) + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_FC=no + fi + ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; + os2*) + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + allow_undefined_flag_FC=unsupported + archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_FC=: ;; - siemens) - need_lib_prefix=no + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_FC='-rpath $libdir' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_separator_FC=: ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + + solaris*) + no_undefined_flag_FC=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_shlibpath_var_FC=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_FC=yes ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no + ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + sysv4) + case $host_vendor in + sni) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes # is this really true??? ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_FC='$CC -r -o $output$reload_objs' + hardcode_direct_FC=no + ;; + motorola) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_FC=no + ;; -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + sysv4.3*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + export_dynamic_flag_spec_FC='-Bexport' + ;; -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_FC=yes + fi + ;; -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_FC='${wl}-z,text' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + runpath_var='LD_RUN_PATH' -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi + if test "$GCC" = yes; then + archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_FC='${wl}-z,text' + allow_undefined_flag_FC='${wl}-z,nodefs' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='${wl}-R,$libdir' + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + export_dynamic_flag_spec_FC='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + if test "$GCC" = yes; then + archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + uts4*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=no + ;; + *) + ld_shlibs_FC=no + ;; + esac + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec_FC='${wl}-Blargedynsym' + ;; + esac + fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 +$as_echo "$ld_shlibs_FC" >&6; } +test "$ld_shlibs_FC" = no && can_build_shared=no +with_gnu_ld_FC=$with_gnu_ld +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_FC" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_FC=yes + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_FC in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_FC + pic_flag=$lt_prog_compiler_pic_FC + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_FC + allow_undefined_flag_FC= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_FC=no + else + lt_cv_archive_cmds_need_lc_FC=yes + fi + allow_undefined_flag_FC=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; } + archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC + ;; + esac + fi + ;; +esac @@ -21375,43 +21979,8 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_FC= -if test -n "$hardcode_libdir_flag_spec_FC" || - test -n "$runpath_var_FC" || - test "X$hardcode_automatic_FC" = "Xyes" ; then - # We can hardcode non-existent directories. - if test "$hardcode_direct_FC" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no && - test "$hardcode_minus_L_FC" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_FC=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_FC=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_FC=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 -$as_echo "$hardcode_action_FC" >&6; } -if test "$hardcode_action_FC" = relink || - test "$inherit_rpath_FC" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi @@ -21419,18 +21988,8 @@ fi - fi # test -n "$compiler" - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -21442,1066 +22001,994 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_config_commands="$ac_config_commands libtool" -# Only expand once: -## ---------------------------------------------------------------------- -## Check if we should install only statically linked executables. -## This check needs to occur after libtool is initialized because -## we check a libtool cache value and may issue a warning based -## on its result. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 -$as_echo_n "checking if we should install only statically linked executables... " >&6; } -# Check whether --enable-static_exec was given. -if test "${enable_static_exec+set}" = set; then : - enableval=$enable_static_exec; STATIC_EXEC=$enableval -fi -if test "X$STATIC_EXEC" = "Xyes"; then - echo "yes" - ## Issue a warning if -static flag is not supported. - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then - echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." - LT_STATIC_EXEC="" - else - LT_STATIC_EXEC="-all-static" - fi -else - echo "no" - LT_STATIC_EXEC="" -fi - if test "X$LT_STATIC_EXEC" = X; then - USE_PLUGINS_CONDITIONAL_TRUE= - USE_PLUGINS_CONDITIONAL_FALSE='#' -else - USE_PLUGINS_CONDITIONAL_TRUE='#' - USE_PLUGINS_CONDITIONAL_FALSE= -fi -## Fix up the INSTALL macro if it's a relative path. We want the -## full-path to the binary instead. -case "$INSTALL" in - *install-sh*) - INSTALL='\${top_srcdir}/bin/install-sh -c' - ;; -esac -## ---------------------------------------------------------------------- -## Some users have reported problems with libtool's use of '-Wl,-rpath' to -## link shared libraries in nondefault directories. Allow users to -## disable embedding the rpath information in the executables and to -## instead solely rely on the information in LD_LIBRARY_PATH. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 -$as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } -# Check whether --enable-sharedlib-rpath was given. -if test "${enable_sharedlib_rpath+set}" = set; then : - enableval=$enable_sharedlib_rpath; RPATH=$enableval -fi -case "X-$RPATH" in - X-no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - runpath_var= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_into_libs=no - ;; - X-|X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 -$as_echo "error" >&6; } - as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5 - ;; -esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } -## ---------------------------------------------------------------------- -## pmake will throw an error if variables are undefined in a Makefile. -## These errors can be changed to warnings using the -V flag. -## - AM_MAKEFLAGS="" +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no -## Don't run test if MAKE is defined but is the empty string -if test -n "${MAKE-make}"; then +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 -$as_echo_n "checking whether make will build with undefined variables... " >&6; } +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH - cat >maketest </dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, setting -V flag" >&5 -$as_echo "no, setting -V flag" >&6; } - AM_MAKEFLAGS="\-V" + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH fi + ;; - rm maketest -fi - -## ---------------------------------------------------------------------- -## Production flags? Save the value in $CONFIG_MODE so we have it for -## the record. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 -$as_echo_n "checking for production mode... " >&6; } -# Check whether --enable-production was given. -if test "${enable_production+set}" = set; then : - enableval=$enable_production; -fi - - -case "X-$enable_production" in - X-yes) - enable_production="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5 -$as_echo "production" >&6; } - CONFIG_MODE=production - H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" - ;; - X-|X-no) - enable_production="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5 -$as_echo "development" >&6; } - CONFIG_MODE=development - H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" - ;; - X-pg|X-profile) - enable_production="profile" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 -$as_echo "profile" >&6; } - CONFIG_MODE=profile - H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; - *) - enable_production="user-defined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5 -$as_echo "user-defined" >&6; } - CONFIG_MODE="$enableval" + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; -esac + esac + ;; -## ---------------------------------------------------------------------- -## Check for system libraries. "dl" stands for dynamically loaded library -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 -$as_echo_n "checking for ceil in -lm... " >&6; } -if ${ac_cv_lib_m_ceil+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ceil (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return ceil (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_ceil=yes -else - ac_cv_lib_m_ceil=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 -$as_echo "$ac_cv_lib_m_ceil" >&6; } -if test "x$ac_cv_lib_m_ceil" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; - LIBS="-lm $LIBS" +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -fi + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; - LIBS="-ldl $LIBS" + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' -fi + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; -if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - ## ...for Solaris - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - LIBS="-lsocket $LIBS" +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -fi +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_int in -lnsl" >&5 -$as_echo_n "checking for xdr_int in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_xdr_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char xdr_int (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return xdr_int (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_xdr_int=yes -else - ac_cv_lib_nsl_xdr_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_xdr_int" >&5 -$as_echo "$ac_cv_lib_nsl_xdr_int" >&6; } -if test "x$ac_cv_lib_nsl_xdr_int" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; - LIBS="-lnsl $LIBS" +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -fi +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -fi +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no -## ---------------------------------------------------------------------- -## Check for system header files. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" + cat > conftest.$ac_ext <<_ACEOF + program main - ; - return 0; -} + end _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no +if ac_fn_fc_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -else - ac_cv_header_stdc=no -fi -rm -f conftest* + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -fi + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -fi +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; -fi +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; -## Unix -for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -fi +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -done +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no -for ac_header in sys/socket.h sys/types.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -done -for ac_header in stddef.h setjmp.h features.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -for ac_header in dirent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" -if test "x$ac_cv_header_dirent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRENT_H 1 -_ACEOF -fi -done -for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF - C9x=yes -fi -done -## Darwin -for ac_header in mach/mach_time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_TIME_H 1 -_ACEOF -fi -done -## Also need to detect Darwin for pubconf -case $host_os in - darwin*) -$as_echo "#define HAVE_DARWIN 1" >>confdefs.h - ;; -esac -## Windows -case "`uname`" in - CYGWIN*) - for ac_header in io.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done - ;; - MINGW*) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 -$as_echo_n "checking for main in -lws2_32... " >&6; } -if ${ac_cv_lib_ws2_32_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ws2_32_main=yes -else - ac_cv_lib_ws2_32_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 -$as_echo "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF - LIBS="-lws2_32 $LIBS" -fi -ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main - ;; - *) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done - ;; -esac -case "$host" in - alpha*-dec*-osf*) - ## The and are needed on the DEC - ## Alpha to turn off UAC fixing. We do *not* attempt to - ## locate these files on other systems because there are too - ## many problems with including them. - for ac_header in sys/sysinfo.h sys/proc.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done - ;; - mips*-sgi*) - ## The is needed on the SGI machines to turn off - ## denormalized floating-point values going to zero. We do *not* - ## attempt to locate these files on other systems because there - ## may be problems with including them. - for ac_header in sys/fpu.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_fpu_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_FPU_H 1 -_ACEOF -fi -done - for ac_func in get_fpc_csr -do : - ac_fn_c_check_func "$LINENO" "get_fpc_csr" "ac_cv_func_get_fpc_csr" -if test "x$ac_cv_func_get_fpc_csr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GET_FPC_CSR 1 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_FC= +if test -n "$hardcode_libdir_flag_spec_FC" || + test -n "$runpath_var_FC" || + test "X$hardcode_automatic_FC" = "Xyes" ; then + # We can hardcode non-existent directories. + if test "$hardcode_direct_FC" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no && + test "$hardcode_minus_L_FC" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_FC=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_FC=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_FC=unsupported fi -done - - ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 +$as_echo "$hardcode_action_FC" >&6; } -## ---------------------------------------------------------------------- -## Some platforms require that all symbols are resolved when a library -## is linked. We can use the -no-undefined flag to tell libtool that -## it will be able to build shared libraries on these architectures, -## as it will not do so by default. -## -if test "X${enable_shared}" = "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 -$as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } - case "`uname`" in - CYGWIN*|MINGW*|AIX*) - ## Add in the -no-undefined flag to LDFLAGS for libtool. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - H5_LDFLAGS="$H5_LDFLAGS -no-undefined" - ;; - *) - ## Don't add in anything. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac +if test "$hardcode_action_FC" = relink || + test "$inherit_rpath_FC" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless fi -## ---------------------------------------------------------------------- -## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines -## that might need to be set for largefile support to behave -## correctly. This macro is defined in acsite.m4 and overrides -## the version provided by Autoconf (as of v2.65). The custom -## macro additionally adds the appropriate defines to AM_CPPFLAGS -## so that later configure checks have them visible. -## Check for _FILE_OFFSET_BITS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF - AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; -esac -rm -rf conftest* -## Check for _LARGE_FILES -if test "$ac_cv_sys_file_offset_bits" = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + + +## ---------------------------------------------------------------------- +## Check if we should install only statically linked executables. +## This check needs to occur after libtool is initialized because +## we check a libtool cache value and may issue a warning based +## on its result. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 +$as_echo_n "checking if we should install only statically linked executables... " >&6; } +# Check whether --enable-static_exec was given. +if test "${enable_static_exec+set}" = set; then : + enableval=$enable_static_exec; STATIC_EXEC=$enableval fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break + +if test "X$STATIC_EXEC" = "Xyes"; then + echo "yes" + ## Issue a warning if -static flag is not supported. + if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then + echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." + LT_STATIC_EXEC="" + else + LT_STATIC_EXEC="-all-static" + fi +else + echo "no" + LT_STATIC_EXEC="" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done + if test "X$LT_STATIC_EXEC" = X; then + USE_PLUGINS_CONDITIONAL_TRUE= + USE_PLUGINS_CONDITIONAL_FALSE='#' +else + USE_PLUGINS_CONDITIONAL_TRUE='#' + USE_PLUGINS_CONDITIONAL_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF - AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; + + + +## Fix up the INSTALL macro if it's a relative path. We want the +## full-path to the binary instead. +case "$INSTALL" in + *install-sh*) + INSTALL='\${top_srcdir}/bin/install-sh -c' + ;; esac -rm -rf conftest* + +## ---------------------------------------------------------------------- +## Some users have reported problems with libtool's use of '-Wl,-rpath' to +## link shared libraries in nondefault directories. Allow users to +## disable embedding the rpath information in the executables and to +## instead solely rely on the information in LD_LIBRARY_PATH. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 +$as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } +# Check whether --enable-sharedlib-rpath was given. +if test "${enable_sharedlib_rpath+set}" = set; then : + enableval=$enable_sharedlib_rpath; RPATH=$enableval fi + +case "X-$RPATH" in + X-no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + runpath_var= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_into_libs=no + ;; + X-|X-yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } + as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5 + ;; +esac + ## ---------------------------------------------------------------------- -## Add necessary defines for Linux Systems. +## pmake will throw an error if variables are undefined in a Makefile. +## These errors can be changed to warnings using the -V flag. ## -case "$host_cpu-$host_vendor-$host_os" in - *linux*) - ## Make available various LFS-related routines using the following - ## _LARGEFILE*_SOURCE macros. - AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" + AM_MAKEFLAGS="" - ## Add POSIX support on Linux systems, so defines - ## __USE_POSIX, which is required to get the prototype for fdopen - ## defined correctly in . - ## - ## This flag was removed from h5cc as of 2009-10-17 when it was found - ## that the flag broke compiling netCDF-4 code with h5cc, but kept in - ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - ## is used only by H5_debug_mask which is used only when debugging in - ## H5_init_library (all in H5.c). When the flag was removed this was - ## the only compile failure noted. - ## - ## This was originally defined as _POSIX_SOURCE which was updated to - ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. This was later updated to 200112L so that - ## posix_memalign() is visible for the direct VFD code on Linux - ## systems. - ## - ## POSIX feature information can be found in the gcc manual at: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" +## Don't run test if MAKE is defined but is the empty string +if test -n "${MAKE-make}"; then - ## Need to add this so that O_DIRECT is visible for the direct - ## VFD on Linux systems. - H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 +$as_echo_n "checking whether make will build with undefined variables... " >&6; } - ## Also add BSD support on Linux systems, so defines - ## __USE_BSD, which is required to get the prototype for strdup - ## defined correctly in and snprintf & vsnprintf defined - ## correctly in - ## Linking to the bsd-compat library is required as per the gcc manual: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - ## however, we do not do this since it breaks the big test on some - ## older platforms. - H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" + cat >maketest </dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, setting -V flag" >&5 +$as_echo "no, setting -V flag" >&6; } + AM_MAKEFLAGS="\-V" + fi + + rm maketest +fi + +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 +$as_echo_n "checking for production mode... " >&6; } +# Check whether --enable-production was given. +if test "${enable_production+set}" = set; then : + enableval=$enable_production; +fi + + +case "X-$enable_production" in + X-yes) + enable_production="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5 +$as_echo "production" >&6; } + CONFIG_MODE=production + H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" + ;; + X-|X-no) + enable_production="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5 +$as_echo "development" >&6; } + CONFIG_MODE=development + H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" + ;; + X-pg|X-profile) + enable_production="profile" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 +$as_echo "profile" >&6; } + CONFIG_MODE=profile + H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" + ;; + *) + enable_production="user-defined" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5 +$as_echo "user-defined" >&6; } + CONFIG_MODE="$enableval" ;; esac -## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible -## for configure checks. -## Note: Both will be restored by the end of configure. -CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" -CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" - +## ---------------------------------------------------------------------- +## Check for system libraries. "dl" stands for dynamically loaded library +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 +$as_echo_n "checking for ceil in -lm... " >&6; } +if ${ac_cv_lib_m_ceil+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ceil (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -22513,46 +23000,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext int main () { -off64_t n = 0; +return ceil (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in lseek64 fseeko64 ftello64 ftruncate64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_ceil=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&5 -$as_echo "skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&6; } + ac_cv_lib_m_ceil=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_func in fseeko ftello -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 +$as_echo "$ac_cv_lib_m_ceil" >&6; } +if test "x$ac_cv_lib_m_ceil" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_LIBM 1 _ACEOF + LIBS="-lm $LIBS" + fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -22564,186 +23053,51 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext int main () { -struct stat64 sb; +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in stat64 fstat64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64() and fstat64()" >&5 -$as_echo "skipping test for stat64() and fstat64()" >&6; } + ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## ---------------------------------------------------------------------- -## Data types and their sizes. -## -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned long +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 _ACEOF -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t long -_ACEOF + LIBS="-ldl $LIBS" fi -ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ptrdiff_t long -_ACEOF - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : +if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then + ## ...for Solaris + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - +char socket (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -22755,20 +23109,48 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - +return socket (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_int in -lnsl" >&5 +$as_echo_n "checking for xdr_int in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_xdr_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xdr_int (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -22780,44 +23162,47 @@ if ac_fn_c_try_compile "$LINENO"; then : int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif - +return xdr_int (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_xdr_int=yes else - ac_cv_c_bigendian=no + ac_cv_lib_nsl_xdr_int=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_xdr_int" >&5 +$as_echo "$ac_cv_lib_nsl_xdr_int" >&6; } +if test "x$ac_cv_lib_nsl_xdr_int" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + +fi + +## ---------------------------------------------------------------------- +## Check for system header files. +## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +#include +#include +#include +#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -22830,29 +23215,114 @@ short int ascii_mm[] = int main () { -return use_ascii (foo) == use_ebcdic (foo); + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -22864,379 +23334,617 @@ $ac_includes_default int main () { - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - +if ((struct tm *) 0) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes else - ac_cv_c_bigendian=yes + ac_cv_header_time=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + + +## Unix +for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi - fi +done + +for ac_header in sys/socket.h sys/types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +done - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac +for ac_header in stddef.h setjmp.h features.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if ${ac_cv_sizeof_char+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : +fi + +done + +for ac_header in dirent.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRENT_H 1 +_ACEOF -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_char=0 - fi fi +done + +for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + C9x=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } +done -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char +## Darwin +for ac_header in mach/mach_time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_mach_time_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MACH_MACH_TIME_H 1 _ACEOF +fi -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : +done -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi -fi +## Also need to detect Darwin for pubconf +case $host_os in + darwin*) -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +$as_echo "#define HAVE_DARWIN 1" >>confdefs.h + + ;; +esac + +## Windows +case "`uname`" in + CYGWIN*) + for ac_header in io.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short + ;; + MINGW*) + for ac_header in io.h winsock2.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +fi -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_main+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_main=yes else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi + ac_cv_lib_ws2_32_main=no fi - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + LIBS="-lws2_32 $LIBS" +fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int + ;; + *) + for ac_header in io.h winsock2.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +fi -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 -$as_echo_n "checking size of unsigned... " >&6; } -if ${ac_cv_sizeof_unsigned+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : +done -else - if test "$ac_cv_type_unsigned" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned=0 - fi -fi + ;; +esac + +case "$host" in + alpha*-dec*-osf*) + ## The and are needed on the DEC + ## Alpha to turn off UAC fixing. We do *not* attempt to + ## locate these files on other systems because there are too + ## many problems with including them. + for ac_header in sys/sysinfo.h sys/proc.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 -$as_echo "$ac_cv_sizeof_unsigned" >&6; } - +done -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned + ;; + mips*-sgi*) + ## The is needed on the SGI machines to turn off + ## denormalized floating-point values going to zero. We do *not* + ## attempt to locate these files on other systems because there + ## may be problems with including them. + for ac_header in sys/fpu.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fpu_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_FPU_H 1 _ACEOF +fi -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +done -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi + for ac_func in get_fpc_csr +do : + ac_fn_c_check_func "$LINENO" "get_fpc_csr" "ac_cv_func_get_fpc_csr" +if test "x$ac_cv_func_get_fpc_csr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GET_FPC_CSR 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - +done + ;; +esac -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +## ---------------------------------------------------------------------- +## Some platforms require that all symbols are resolved when a library +## is linked. We can use the -no-undefined flag to tell libtool that +## it will be able to build shared libraries on these architectures, +## as it will not do so by default. +## +if test "X${enable_shared}" = "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 +$as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } + case "`uname`" in + CYGWIN*|MINGW*|AIX*) + ## Add in the -no-undefined flag to LDFLAGS for libtool. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + H5_LDFLAGS="$H5_LDFLAGS -no-undefined" + ;; + *) + ## Don't add in anything. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi +## ---------------------------------------------------------------------- +## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines +## that might need to be set for largefile support to behave +## correctly. This macro is defined in acsite.m4 and overrides +## the version provided by Autoconf (as of v2.65). The custom +## macro additionally adds the appropriate defines to AM_CPPFLAGS +## so that later configure checks have them visible. -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : +## Check for _FILE_OFFSET_BITS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF + AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; +esac +rm -rf conftest* -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 -$as_echo_n "checking size of __int64... " >&6; } -if ${ac_cv_sizeof___int64+:} false; then : +## Check for _LARGE_FILES +if test "$ac_cv_sys_file_offset_bits" = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ -else - if test "$ac_cv_type___int64" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (__int64) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof___int64=0 - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 -$as_echo "$ac_cv_sizeof___int64" >&6; } - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 +#define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 -$as_echo_n "checking size of float... " >&6; } -if ${ac_cv_sizeof_float+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (float) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_float=0 - fi -fi - + AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; +esac +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -_ACEOF +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## +case "$host_cpu-$host_vendor-$host_os" in + *linux*) + ## Make available various LFS-related routines using the following + ## _LARGEFILE*_SOURCE macros. + AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 -$as_echo_n "checking size of double... " >&6; } -if ${ac_cv_sizeof_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : + ## Add POSIX support on Linux systems, so defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## + ## This flag was removed from h5cc as of 2009-10-17 when it was found + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen + ## is used only by H5_debug_mask which is used only when debugging in + ## H5_init_library (all in H5.c). When the flag was removed this was + ## the only compile failure noted. + ## + ## This was originally defined as _POSIX_SOURCE which was updated to + ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + ## functionality so clock_gettime and CLOCK_MONOTONIC are defined + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## + ## POSIX feature information can be found in the gcc manual at: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html +##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" -else - if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_double=0 - fi -fi + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } + ## Also add BSD support on Linux systems, so defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## Linking to the bsd-compat library is required as per the gcc manual: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## however, we do not do this since it breaks the big test on some + ## older platforms. + H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" + ## _BSD_SOURCE is deprecated as of glibc 2.20, in favor of _DEFAULT_SOURCE. + ## To avoid warnings, we define _DEFAULT_SOURCE in addition to _BSD_SOURCE, + ## which should work for all versions of glibc. + H5_CPPFLAGS="-D_DEFAULT_SOURCE $H5_CPPFLAGS" + ;; +esac +## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible +## for configure checks. +## Note: Both will be restored by the end of configure. +CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" +CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" -cat >>confdefs.h <<_ACEOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +off64_t n = 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + for ac_func in lseek64 fseeko64 ftello64 ftruncate64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : +fi +done else - if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&5 +$as_echo "skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&6; } fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +for ac_func in fseeko ftello +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - +done +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +#include +#include +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +struct stat64 sb; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + for ac_func in stat64 fstat64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +fi +done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64() and fstat64()" >&5 +$as_echo "skipping test for stat64() and fstat64()" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## Checkpoint the cache cat >confcache <<\_ACEOF @@ -26528,13 +27236,13 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: default ($DEBUG_PKG)" >&5 $as_echo "default ($DEBUG_PKG)" >&6; } ;; X-all) DEBUG_PKG=$all_packages - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($DEBUG_PKG)" >&5 $as_echo "all ($DEBUG_PKG)" >&6; } ;; @@ -26542,7 +27250,7 @@ $as_echo "all ($DEBUG_PKG)" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } DEBUG_PKG= - H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_PKG" >&5 @@ -30317,7 +31025,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -30457,26 +31165,7 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_HAVE_C_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_C_SIZEOF_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_C_SIZEOF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_HAVE_STORAGE_SIZE_TRUE}" && test -z "${FORTRAN_HAVE_STORAGE_SIZE_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_HAVE_STORAGE_SIZE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi + if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -30489,7 +31178,6 @@ if test -z "${USE_PLUGINS_CONDITIONAL_TRUE}" && test -z "${USE_PLUGINS_CONDITION as_fn_error $? "conditional \"USE_PLUGINS_CONDITIONAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi - if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -31579,6 +32267,7 @@ do "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "fortran/src/H5config_f.inc") CONFIG_HEADERS="$CONFIG_HEADERS fortran/src/H5config_f.inc" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -31632,6 +32321,7 @@ do "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;; "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;; + "fortran/src/H5fort_type_defines.h") CONFIG_FILES="$CONFIG_FILES fortran/src/H5fort_type_defines.h" ;; "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;; "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;; "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;; @@ -32361,6 +33051,7 @@ $as_echo X"$file" | done } ;; + "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/configure.ac b/configure.ac index 1e67f39..c37a1c4 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,17 @@ AC_PREREQ([2.69]) ## release!!! ## AC_INIT([HDF5], [1.9.227], [help@hdfgroup.org]) + +## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING +## -------------------------------------------------------------------------- +## Requirement #1: Check if Perl is installed. +## +AC_SUBST([PERL]) PERL="" +AC_CHECK_PROG([PERL], [perl],, [$PATH]) +if test "x$PERL" = "xfalse"; then + AC_MSG_ERROR([*** Perl is required for installing HDF5, but Perl could not be found!]) +fi + AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) @@ -149,7 +160,6 @@ AC_MSG_RESULT([done]) ## MPE: whether MPE option is enabled. Default no. ## STATIC_EXEC: whether static-exec is enabled. Default no. ## HDF_FORTRAN: whether Fortran is enabled. Default no. -## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. ## FC: Fortran compiler. ## HDF_CXX: whether C++ is enabled. Default no. ## CXX: C++ compiler. @@ -157,6 +167,7 @@ AC_MSG_RESULT([done]) ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -168,9 +179,7 @@ AC_SUBST([EXTERNAL_FILTERS]) AC_SUBST([MPE]) MPE=no AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no -AC_SUBST([HDF_FORTRAN2003]) HDF_FORTRAN2003=no AC_SUBST([FC]) HDF_FORTRAN=no -AC_SUBST([FC2003]) HDF_FORTRAN2003=no AC_SUBST([HDF_CXX]) HDF_CXX=no AC_SUBST([CXX]) HDF_CXX=no AC_SUBST([HDF5_HL]) HDF5_HL=yes @@ -183,6 +192,7 @@ AC_SUBST([STATIC_SHARED]) AC_SUBST([enable_shared]) AC_SUBST([enable_static]) AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` +AC_SUBST([PAC_C_MAX_REAL_PRECISION]) ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check @@ -347,13 +357,57 @@ case "X-$ALLOW_UNSUPPORTED" in esac ## ---------------------------------------------------------------------- +## Data types and their sizes. +## +AC_TYPE_OFF_T +AC_CHECK_TYPE([size_t], [], + [AC_DEFINE_UNQUOTED([size_t], [unsigned long], + [Define to `unsigned long' if does not define.])]) +AC_CHECK_TYPE([ssize_t], [], + [AC_DEFINE_UNQUOTED([ssize_t], [long], + [Define to `long' if does not define.])]) +AC_CHECK_TYPE([ptrdiff_t], [], + [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], + [Define to `long' if does not define.])]) +AC_C_BIGENDIAN +AC_CHECK_SIZEOF([char], [1]) +AC_CHECK_SIZEOF([short], [2]) +AC_CHECK_SIZEOF([int], [4]) +AC_CHECK_SIZEOF([unsigned], [4]) +AC_CHECK_SIZEOF([long], [4]) +AC_CHECK_SIZEOF([long long], [8]) +AC_CHECK_SIZEOF([__int64], [8]) +AC_CHECK_SIZEOF([float], [4]) +AC_CHECK_SIZEOF([double], [8]) +AC_CHECK_SIZEOF([long double], [8]) + +## Check for non-standard extenstion __FLOAT128 +HAVE_FLOAT128=0 +HAVE_QUADMATH=0 +FLT128_DIG=0 +LDBL_DIG=0 + +AC_CHECK_SIZEOF([__float128]) +AC_CHECK_SIZEOF([_Quad]) +AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], []) +PAC_FC_LDBL_DIG + +if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then + AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available]) + PAC_C_MAX_REAL_PRECISION=$FLT128_DIG +else + PAC_C_MAX_REAL_PRECISION=$LDBL_DIG +fi +AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C]) +AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION]) +## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--enable-fortran], - [Compile the Fortran 90/95 interface [default=no]])], + [Compile the Fortran interface [default=no]])], [HDF_FORTRAN=$enableval]) if test "X$HDF_FORTRAN" = "Xyes"; then @@ -362,35 +416,16 @@ else echo "no" fi - -## ---------------------------------------------------------------------- -## Check if they would like the Fortran 2003 interface compiled -## -AC_MSG_CHECKING([if Fortran 2003 interface enabled]) -AC_ARG_ENABLE([fortran2003], - [AS_HELP_STRING([--enable-fortran2003], - [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], - [HDF_FORTRAN2003=$enableval]) - -## ---------------------------------------------------------------------- -## Check to make sure --enable-fortran is present if --enable-fortran2003 -## was specified - -if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then - echo "no" - AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) -else - if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" - else - echo "no" - fi -fi - if test "X$HDF_FORTRAN" = "Xyes"; then +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + AC_CONFIG_HEADERS([fortran/src/H5config_f.inc], + [cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc]) + AC_SUBST([FC]) HDF_FORTRAN=yes - AC_SUBST([HAVE_FORTRAN_2003]) HDF5_INTERFACES="$HDF5_INTERFACES fortran" @@ -423,6 +458,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + PAC_PROG_FC_HAVE_F2003_REQUIREMENTS + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran]) + fi + ## -------------------------------------------------------------------- ## Define wrappers for the C compiler to use Fortran function names ## @@ -434,39 +477,138 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" PAC_PROG_FC_C_SIZEOF - + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - PAC_PROG_FC_STORAGE_SIZE + PAC_PROG_FC_STORAGE_SIZE + + ## Set the sizeof function for use later in the fortran tests + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then + FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + else + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then + FC_SIZEOF_A="SIZEOF(a)" + FC_SIZEOF_B="SIZEOF(b)" + FC_SIZEOF_C="SIZEOF(c)" + else + ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error + AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) + fi + fi - ## Check to see if -r8 was specified to determine if we need to - ## compile the DOUBLE PRECISION interfaces. - PAC_PROG_FC_DEFAULT_REALisDBLE + ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + PAC_PROG_FC_ISO_FORTRAN_ENV + ## Check KIND and size of native integer + PAC_FC_NATIVE_INTEGER + + ## Find all available KINDs + PAC_FC_AVAIL_KINDS + ## Find all sizeofs for available KINDs + PAC_FC_SIZEOF_INT_KINDS + PAC_FC_SIZEOF_REAL_KINDS + + AC_SUBST([PAC_FC_ALL_REAL_KINDS]) + AC_SUBST([PAC_FC_MAX_REAL_PRECISION]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) + AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) + AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) + AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) + AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) + AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) + AC_SUBST([H5CONFIG_F_NUM_RKIND]) + AC_SUBST([H5CONFIG_F_RKIND]) + AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) + AC_SUBST([H5CONFIG_F_NUM_IKIND]) + AC_SUBST([H5CONFIG_F_IKIND]) + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [1], [Determine if INTEGER*16 is available]) + else + HAVE_Fortran_INTEGER_SIZEOF_16="0" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) + fi - if test "X$HDF_FORTRAN2003" = "Xyes"; then + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) + fi - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + fi + + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) + fi + + ## See if C_LONG_DOUBLE is available + PAC_PROG_FC_HAVE_C_LONG_DOUBLE + + FORTRAN_HAVE_C_LONG_DOUBLE="0" + if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then + FORTRAN_HAVE_C_LONG_DOUBLE="1" + AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) + fi + + ## Is C_LONG_DOUBLE different from C_DOUBLE + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then + PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE + if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" + AC_DEFINE([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE], [1], [Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) else - HAVE_FORTRAN_2003="yes" + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" + fi + fi + + FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} + AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double]) + + + dnl get the largest sizeof for REAL kinds + + max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`" + max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`" + + dnl remove the invalid kind from the list + if test "$ac_cv_sizeof___float128" != 0;then + if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then + AC_MSG_WARN([ + Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size + !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! + ]) + PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`" + PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`" fi fi + AC_MSG_CHECKING([for Fortran interoperable KINDS with C]) + AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + + dnl count the number of real kinds + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = ( =~ tr/,//);print $count+1'`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)" + H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)" + + AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof]) + +## Change back to the C language + AC_LANG_POP(Fortran) else FC="no" fi -## Change back to the C language -AC_LANG_POP(Fortran) - -AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## @@ -530,27 +672,12 @@ if test "X$HDF5_HL" = "Xyes"; then HL="hl" AC_DEFINE([INCLUDE_HL], [1], [Define if HDF5's high-level library headers should be included in hdf5.h]) - - ## If Fortran's default real is double precision and HL is being built then configure - ## should fail due to bug HDFFV-889. - if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then - AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.]) - fi else echo "no" fi ## ---------------------------------------------------------------------- -## Check if they have Perl installed on their system. We only need Perl -## if they're using a GNU compiler. -## -AC_SUBST([PERL]) PERL="" -if test "X$GCC" = "Xyes"; then - AC_CHECK_PROGS([PERL], [perl],, [$PATH]) -fi - -## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. ## @@ -975,7 +1102,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" +##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. @@ -1016,31 +1143,6 @@ AC_TRY_COMPILE([ [AC_CHECK_FUNCS([stat64 fstat64])], [AC_MSG_RESULT([skipping test for stat64() and fstat64()])]) -## ---------------------------------------------------------------------- -## Data types and their sizes. -## -AC_TYPE_OFF_T -AC_CHECK_TYPE([size_t], [], - [AC_DEFINE_UNQUOTED([size_t], [unsigned long], - [Define to `unsigned long' if does not define.])]) -AC_CHECK_TYPE([ssize_t], [], - [AC_DEFINE_UNQUOTED([ssize_t], [long], - [Define to `long' if does not define.])]) -AC_CHECK_TYPE([ptrdiff_t], [], - [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], - [Define to `long' if does not define.])]) -AC_C_BIGENDIAN -AC_CHECK_SIZEOF([char], [1]) -AC_CHECK_SIZEOF([short], [2]) -AC_CHECK_SIZEOF([int], [4]) -AC_CHECK_SIZEOF([unsigned], [4]) -AC_CHECK_SIZEOF([long], [4]) -AC_CHECK_SIZEOF([long long], [8]) -AC_CHECK_SIZEOF([__int64], [8]) -AC_CHECK_SIZEOF([float], [4]) -AC_CHECK_SIZEOF([double], [8]) -AC_CHECK_SIZEOF([long double], [8]) - ## Checkpoint the cache AC_CACHE_SAVE @@ -1804,18 +1906,18 @@ all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([default ($DEBUG_PKG)]) ;; X-all) DEBUG_PKG=$all_packages - H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" AC_MSG_RESULT([all ($DEBUG_PKG)]) ;; X-no|X-none) AC_MSG_RESULT([none]) DEBUG_PKG= - H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" +## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" ;; *) AC_MSG_RESULT([$DEBUG_PKG]) @@ -3040,6 +3142,7 @@ AC_CONFIG_FILES([src/libhdf5.settings fortran/Makefile fortran/src/h5fc fortran/src/Makefile + fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile diff --git a/examples/Makefile.in b/examples/Makefile.in index 5d76be3..79232ae 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-c-ex.sh testh5cc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -396,14 +397,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -413,13 +421,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -461,6 +468,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 55ede05..8585623 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -452,14 +453,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -469,13 +477,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -517,6 +524,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/doc/DevelGuide/masterindex.html b/fortran/doc/DevelGuide/masterindex.html deleted file mode 100644 index 9765ea0..0000000 --- a/fortran/doc/DevelGuide/masterindex.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - - -Index - - - - -
-
- -
-

Index

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

- h5pget_double - h5pget_hyper_vector_size_f - h5pset_family_offset_f - h5pset_fapl_family_f - h5pset_meta_block_size_f -

F

fflush1.f90 -fflush2.f90 -fortran/test/fflush1.f90 -fortran/test/fflush2.f90 -fortran/test/fortranlib_test.f90 -fortran/test/fortranlib_test_1_8.f90 -fortran/test/fortranlib_test_F03.f90 -fortran/test/tc.c -fortran/test/tf.f90 -fortran/test/tH5A.f90 -fortran/test/tH5A_1_8.f90 -fortran/test/tH5D.f90 -fortran/test/tH5E.f90 -fortran/test/tH5E_F03.f90 -fortran/test/tH5F.f90 -fortran/test/tH5G.f90 -fortran/test/tH5G_1_8.f90 -fortran/test/tH5I.f90 -fortran/test/tH5L_F03.f90 -fortran/test/tH5O.f90 -fortran/test/tH5P.f90 -fortran/test/tH5P_F03.f90 -fortran/test/tH5R.f90 -fortran/test/tH5S.f90 -fortran/test/tH5Sselect.f90 -fortran/test/tH5T.f90 -fortran/test/tH5T_F03.f90 -fortran/test/tH5VL.f90 -fortran/test/tH5Z.f90 -fortranlib_test.f90 -fortranlib_test_1_8.f90 -fortranlib_test_F03.f90 -

H

H5_DBLE_InterfaceExclude.f90 -H5_DBLE_InterfaceInclude.f90 -H5_ff.f90 -H5_ff_F03.f90 -H5_ff_F90.f90 -H5A -H5A (F03) -H5A (F90) -h5aclose_f -h5acreate_by_name_f -h5acreate_f -h5adelete_by_idx_f -h5adelete_by_name_f -h5adelete_f -H5Aexists_by_name_f -H5Aexists_f -H5Af -H5Af.c -H5Aff.f90 -H5Aff_F03.f90 -H5Aff_F90.f90 -h5aget_create_plist_f -h5aget_info_by_idx_f -h5aget_info_by_name_f -h5aget_info_f -h5aget_name_by_idx_f -h5aget_name_f -h5aget_num_attrs_f -h5aget_space_f -h5aget_storage_size_f -h5aget_type_f -h5aopen_by_idx_f -H5Aopen_by_name_f -h5aopen_f -h5aopen_idx_f -h5aopen_name_f -h5aread_f -h5arename_by_name_f -h5arename_f -h5check_version_f -h5close_f -H5D -H5D (F03) -H5D (F90) -h5dclose_f -h5dcreate_anon_f -h5dcreate_f -H5Df -H5Df.c -H5Dff.f90 -H5Dff_F03.f90 -H5Dff_F90.f90 -h5dget_access_plist_f -h5dget_create_plist_f -h5dget_space_f -h5dget_space_status_f -h5dget_storage_size_f -h5dget_type_f -h5dont_atexit_f -h5dopen_f -h5dread_f -h5dset_extent -h5dvlen_get_max_len_f -h5dvlen_reclaim -H5E -H5E (F03) -H5E (F90) -h5eclear_f -H5Ef -H5Ef.c -H5Eff.f90 -H5Eff_F03.f90 -H5Eff_F90.f90 -h5eget_auto_f -h5eget_major_f -h5eget_minor_f -h5eprint_f -h5eset_auto2_f -h5eset_auto_f -H5F -H5f90global.f90 -H5f90kit -H5f90kit.c -h5fclose_f -h5fcreate_f -H5FDMPIO -H5FDmpiof -H5FDmpiof.c -H5FDmpioff.f90 -H5Ff -H5Ff.c -H5Fff.f90 -h5fflush_f -h5fget_access_plist_f -h5fget_create_plist_f -h5fget_filesize_f -h5fget_freespace_f -h5fget_name_f -h5fget_obj_count_f -h5fget_obj_ids_f -h5fis_hdf5_f -h5fmount_f -h5fopen_f -h5freopen_f -h5funmount_f -H5G -h5garbage_collect_f -h5gclose_f -H5Gcreate_anon_f -h5gcreate_f -h5get_libversion_f -H5Gf -H5Gf.c -H5Gff.f90 -h5gget_comment_f -H5Gget_create_plist_f -h5gget_info_by_idx_f -h5gget_info_by_name_f -h5gget_info_f -h5gget_linkval_f -h5gget_obj_info_idx_f -h5glink2_f -h5glink_f -H5GLOBAL -h5gmove2_f -h5gmove_f -h5gn_members_f -h5gopen_f -h5gset_comment_f -h5gunlink_f -H5I -h5idec_ref_f -H5If -H5If.c -H5Iff.f90 -h5iget_file_id_f -h5iget_name_f -h5iget_ref_f -h5iget_type_f -h5iinc_ref_f -h5iis_valid_f -h5kind_to_type -H5L -H5L (F03) -H5L (F90) -h5lcopy_f -H5Lcreate_external_f -H5Lcreate_hard_f -H5Lcreate_soft_f -h5ldelete_by_idx_f -h5ldelete_f -H5Lexists_f -H5Lf -H5Lf.c -H5Lff.f90 -H5Lff_F03.f90 -H5Lff_F90.f90 -h5lget_info_by_idx_f -h5lget_info_f -h5lget_name_by_idx_f -H5LIB -H5LIB_PROVISIONAL -H5LIB_PROVISIONAL (F90) -h5lis_registered_f -h5literate_by_name_f -h5literate_f -h5lmove_f -H5match_types -H5match_types.c -H5O -H5O (F03) -H5O (F90) -h5oclose_f -H5Of -H5Of.c -H5Off.f90 -H5Off_F03.f90 -H5Off_F90.f90 -h5offsetof -h5olink_f -h5oopen_f -h5open_by_addr_f -h5open_f -h5ovisit_f -H5P (_F90) -H5P (F03) -H5P (F90) -h5pall_filters_avail_f -h5pclose_class_f -h5pclose_f -h5pcopy_f -h5pcopy_prop_f -h5pcreate_class_f -h5pcreate_class_f -h5pcreate_f -h5pequal_f -h5pexist_f -H5Pf -H5Pf.c -H5Pff.f90 -H5Pff_F03.f90 -H5Pff_F90.f90 -h5pfill_value_defined_f -h5pget_alignment_f -h5pget_alloc_time_f -H5Pget_attr_creation_order_f -H5Pget_attr_phase_change_f -h5pget_btree_ratios_f -h5pget_buffer_f -h5pget_cache_f -h5pget_char -h5pget_char -H5Pget_char_encoding_f -H5Pget_chunk_cache_f -h5pget_chunk_f -h5pget_class_f -h5pget_class_name_f -h5pget_class_parent_f -h5pget_copy_object_f -H5Pget_create_inter_group_f -h5pget_data_transform_f -h5pget_double -h5pget_driver_f -h5pget_dxpl_mpio_f -h5pget_edc_check_f -H5Pget_est_link_info_f -h5pget_external_count_f -h5pget_external_f -h5pget_fapl_core_f -h5pget_fapl_direct_f -h5pget_fapl_family_f -h5pget_fapl_mpio_f -h5pget_fapl_mpiposix_f -h5pget_fapl_multi_f -h5pget_fclose_degree_f -h5pget_fill_time_f -h5pget_filter_by_id_f -h5pget_filter_f -h5pget_gc_references_f -h5pget_integer -h5pget_integer -h5pget_istore_k_f -h5pget_layout_f -H5Pget_link_creation_order_f -H5Pget_link_phase_change_f -H5Pget_local_heap_size_hint_f -h5pget_meta_block_size_f -h5pget_nfilters_f -h5pget_nlinks_f -h5pget_npros_f -H5Pget_obj_track_times_f -h5pget_preserve_f -h5pget_real -h5pget_real -h5pget_sec2_f -h5pget_sieve_buf_size_f -h5pget_size_f -h5pget_sizes_f -h5pget_small_data_block_size_f -h5pget_split_f -h5pget_stdio_f -h5pget_sym_k_f -h5pget_userblock_f -h5pget_version_f -h5pinsert_char -h5pinsert_char -h5pinsert_double -h5pinsert_double -h5pinsert_integer -h5pinsert_integer -h5pinsert_ptr -h5pinsert_real -h5pinsert_real -h5pisa_class_f -h5pmodify_filter_f -h5pregister_char -h5pregister_char -h5pregister_double -h5pregister_double -h5pregister_integer -h5pregister_integer -h5pregister_ptr -h5pregister_real -h5pregister_real -h5premove_f -h5premove_filter_f -h5pset(get)fill_value_f -h5pset(get)fill_value_f -h5pset_alignment_f -h5pset_alloc_time_f -H5Pset_attr_creation_order_f -H5Pset_attr_phase_change_f -h5pset_btree_ratios_f -h5pset_buffer_f -h5pset_cache_f -h5pset_char -h5pset_char -H5Pset_char_encoding_f -H5Pset_chunk_cache_f -h5pset_chunk_f -h5pset_copy_object_f -H5Pset_create_inter_group_f -h5pset_data_transform_f -h5pset_deflate_f -h5pset_double -h5pset_double -h5pset_dxpl_mpio_f -h5pset_edc_check_f -h5pset_est_link_info_f -h5pset_external_f -h5pset_fapl_core_f -h5pset_fapl_direct_f -h5pset_fapl_mpio_f -h5pset_fapl_mpiposix_f -h5pset_fapl_multi_l -h5pset_fapl_multi_s -h5pset_fapl_sec2_f -h5pset_fapl_split_f -h5pset_fapl_stdio_f -h5pset_fclose_degree_f -h5pset_fill_time_f -h5pset_filter_f -h5pset_fletcher32_f -h5pset_gc_references_f -h5pset_hyper_vector_size_f -h5pset_integer -h5pset_integer -h5pset_istore_k_f -h5pset_layout_f -H5Pset_libver_bounds_f -H5Pset_link_creation_order_f -h5pset_link_phase_change_f -H5Pset_local_heap_size_hint_f -H5Pset_nbit_f -h5pset_nlinks_f -H5Pset_obj_track_times_f -h5pset_preserve_f -h5pset_real -h5pset_real -h5pset_scaleoffset_f -H5Pset_shared_mesg_index_f -H5Pset_shared_mesg_nindexes_f -h5pset_shuffle_f -h5pset_sieve_buf_size_f -h5pset_sizes_f -h5pset_small_data_block_size_f -h5pset_sym_k_f -h5pset_szip_f -h5pset_userblock_f -h5punregister_f -H5R -H5R (F03) -H5R (F90) -h5rcreate_object_f -h5rcreate_object_f -h5rcreate_ptr_f -h5rcreate_region_f -h5rcreate_region_f -h5rdereference_object_f -h5rdereference_object_f -h5rdereference_ptr_f -h5rdereference_region_f -h5rdereference_region_f -H5Rf -H5Rf.c -H5Rff.f90 -H5Rff_F03.f90 -H5Rff_F90.f90 -h5rget_name_object_f -h5rget_name_object_f -h5rget_name_ptr_f -h5rget_name_region_f -h5rget_name_region_f -h5rget_obj_type_f -h5rget_object_type_obj_f -h5rget_region_region_f -H5S -h5sclose_f -h5scopy_f -h5screate_f -h5screate_simple_f -H5Sdecode_f -H5Sencode_f -h5sextent_copy_f -h5sextent_equal_f -H5Sf -H5Sf.c -H5Sff.f90 -h5sget_select_bounds_f -h5sget_select_elem_npoints_f -h5sget_select_elem_pointlist_f -h5sget_select_hyper_blocklist_f -h5sget_select_hyper_nblocks_f -h5sget_select_npoints_f -h5sget_select_type_f -h5sget_simple_extent_dims_f -h5sget_simple_extent_ndims_f -h5sget_simple_extent_npoints_f -h5sget_simple_extent_type_f -h5sis_simple_f -h5soffset_simple_f -h5sselect_all_f -h5sselect_elements_f -h5sselect_hyperslab_f -h5sselect_none_f -h5sselect_valid_f -h5sset_extent_none_f -h5sset_extent_simple_f -H5T -H5T (F03) -H5T (F90) -h5tarray_create_f -h5tclose_f -h5tcommit_anon_f -h5tcommit_f -h5tcommitted_f -h5tcompiler_conv_f -H5Tconvert_f -h5tcopy_f -h5tcreate_f -H5Tdecode_f -h5tenaum_insert_f -H5Tencode_f -h5tenum_create_f -h5tenum_nameof_f -h5tenum_valuof_f -h5tequal_f -H5test_kind -H5test_kind.f90 -H5test_kind_SIZEOF -H5test_kind_SIZEOF.f90 -H5Tf -H5Tf.c -H5Tff.f90 -H5Tff_F03.f90 -H5Tff_F90.f90 -h5tget_array_dims_f -h5tget_array_ndims_f -h5tget_class_f -h5tget_create_plist_f -h5tget_cset_f -h5tget_ebias_f -h5tget_fields_f -h5tget_inpad_f -h5tget_member_class_f -h5tget_member_index_f -h5tget_member_name_f -h5tget_member_offset_f -h5tget_member_type_f -h5tget_member_value_f -h5tget_native_type_f -h5tget_nmembers_f -h5tget_norm_f -h5tget_offset_f -h5tget_order_f -h5tget_pad_f -h5tget_precision_f -h5tget_sign_f -h5tget_size_f -h5tget_strpad_f -h5tget_super_f -h5tget_tag_f -h5tinsert_f -h5tis_variable_str_f -h5topen_f -h5tpack_f -h5tset_cset_f -h5tset_ebias_f -h5tset_fields_f -h5tset_inpad_f -h5tset_norm_f -h5tset_offset_f -h5tset_order_f -h5tset_pad_f -h5tset_precision_f -h5tset_sign_f -h5tset_size_f -h5tset_strpad_f -h5tset_tag_f -h5tvlen_create_f -H5Z -H5Zf -H5Zf.c -H5Zff.f90 -h5zfilter_avail_f -h5zget_filter_info_f -h5zunregister_f -HDF5 -HDF5 (mpio) -HDF5.f90 -HDF5mpio.f90 -

S

src/H5_DBLE_InterfaceExclude.f90 -src/H5_DBLE_InterfaceInclude.f90 -

T

t.c -tf.f90 -tH5A.f90 -tH5A_1_8.f90 -tH5D.f90 -tH5E.f90 -tH5E_F03.f90 -tH5F.f90 -tH5G.f90 -tH5G_1_8.f90 -tH5I.f90 -tH5L_F03.f90 -tH5O.f90 -tH5P.f90 -tH5P_F03.f90 -tH5R.f90 -tH5S.f90 -tH5Sselect.f90 -tH5T.f90 -tH5T_F03.f90 -tH5VL.f90 -tH5Z.f90 -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_functions.html b/fortran/doc/DevelGuide/robo_functions.html deleted file mode 100644 index e4f253a..0000000 --- a/fortran/doc/DevelGuide/robo_functions.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -Functions - - - - -
-
- -
-

Functions

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-

H

h5kind_to_type -h5offsetof -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_modules.html b/fortran/doc/DevelGuide/robo_modules.html deleted file mode 100644 index 8e57f38..0000000 --- a/fortran/doc/DevelGuide/robo_modules.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -Modules - - - - -
-
- - - - - diff --git a/fortran/doc/DevelGuide/robo_programs.html b/fortran/doc/DevelGuide/robo_programs.html deleted file mode 100644 index 8c35230..0000000 --- a/fortran/doc/DevelGuide/robo_programs.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -Programs - - - - -
-
- -
-

Programs

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-

H

H5test_kind -H5test_kind_SIZEOF -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robo_sourcefiles.html b/fortran/doc/DevelGuide/robo_sourcefiles.html deleted file mode 100644 index 63a8637..0000000 --- a/fortran/doc/DevelGuide/robo_sourcefiles.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - -Sourcefiles - - - - -
-
- - - - - diff --git a/fortran/doc/DevelGuide/robo_subroutines.html b/fortran/doc/DevelGuide/robo_subroutines.html deleted file mode 100644 index 0846c77..0000000 --- a/fortran/doc/DevelGuide/robo_subroutines.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - -Subroutines - - - - -
-
- -
-

Subroutines

-

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

- h5pget_double - h5pget_hyper_vector_size_f - h5pset_family_offset_f - h5pset_fapl_family_f - h5pset_meta_block_size_f -

H

h5aclose_f -h5acreate_by_name_f -h5acreate_f -h5adelete_by_idx_f -h5adelete_by_name_f -h5adelete_f -H5Aexists_by_name_f -H5Aexists_f -h5aget_create_plist_f -h5aget_info_by_idx_f -h5aget_info_by_name_f -h5aget_info_f -h5aget_name_by_idx_f -h5aget_name_f -h5aget_num_attrs_f -h5aget_space_f -h5aget_storage_size_f -h5aget_type_f -h5aopen_by_idx_f -H5Aopen_by_name_f -h5aopen_f -h5aopen_idx_f -h5aopen_name_f -h5aread_f -h5arename_by_name_f -h5arename_f -h5check_version_f -h5close_f -h5dclose_f -h5dcreate_anon_f -h5dcreate_f -h5dget_access_plist_f -h5dget_create_plist_f -h5dget_space_f -h5dget_space_status_f -h5dget_storage_size_f -h5dget_type_f -h5dont_atexit_f -h5dopen_f -h5dread_f -h5dset_extent -h5dvlen_get_max_len_f -h5dvlen_reclaim -h5eclear_f -h5eget_auto_f -h5eget_major_f -h5eget_minor_f -h5eprint_f -h5eset_auto2_f -h5eset_auto_f -h5fclose_f -h5fcreate_f -h5fflush_f -h5fget_access_plist_f -h5fget_create_plist_f -h5fget_filesize_f -h5fget_freespace_f -h5fget_name_f -h5fget_obj_count_f -h5fget_obj_ids_f -h5fis_hdf5_f -h5fmount_f -h5fopen_f -h5freopen_f -h5funmount_f -h5garbage_collect_f -h5gclose_f -H5Gcreate_anon_f -h5gcreate_f -h5get_libversion_f -h5gget_comment_f -H5Gget_create_plist_f -h5gget_info_by_idx_f -h5gget_info_by_name_f -h5gget_info_f -h5gget_linkval_f -h5gget_obj_info_idx_f -h5glink2_f -h5glink_f -h5gmove2_f -h5gmove_f -h5gn_members_f -h5gopen_f -h5gset_comment_f -h5gunlink_f -h5idec_ref_f -h5iget_file_id_f -h5iget_name_f -h5iget_ref_f -h5iget_type_f -h5iinc_ref_f -h5iis_valid_f -h5lcopy_f -H5Lcreate_external_f -H5Lcreate_hard_f -H5Lcreate_soft_f -h5ldelete_by_idx_f -h5ldelete_f -H5Lexists_f -h5lget_info_by_idx_f -h5lget_info_f -h5lget_name_by_idx_f -h5lis_registered_f -h5literate_by_name_f -h5literate_f -h5lmove_f -h5oclose_f -h5olink_f -h5oopen_f -h5open_by_addr_f -h5open_f -h5ovisit_f -h5pall_filters_avail_f -h5pclose_class_f -h5pclose_f -h5pcopy_f -h5pcopy_prop_f -h5pcreate_class_f -h5pcreate_class_f -h5pcreate_f -h5pequal_f -h5pexist_f -h5pfill_value_defined_f -h5pget_alignment_f -h5pget_alloc_time_f -H5Pget_attr_creation_order_f -H5Pget_attr_phase_change_f -h5pget_btree_ratios_f -h5pget_buffer_f -h5pget_cache_f -h5pget_char -h5pget_char -H5Pget_char_encoding_f -H5Pget_chunk_cache_f -h5pget_chunk_f -h5pget_class_f -h5pget_class_name_f -h5pget_class_parent_f -h5pget_copy_object_f -H5Pget_create_inter_group_f -h5pget_data_transform_f -h5pget_double -h5pget_driver_f -h5pget_dxpl_mpio_f -h5pget_edc_check_f -H5Pget_est_link_info_f -h5pget_external_count_f -h5pget_external_f -h5pget_fapl_core_f -h5pget_fapl_direct_f -h5pget_fapl_family_f -h5pget_fapl_mpio_f -h5pget_fapl_mpiposix_f -h5pget_fapl_multi_f -h5pget_fclose_degree_f -h5pget_fill_time_f -h5pget_filter_by_id_f -h5pget_filter_f -h5pget_gc_references_f -h5pget_integer -h5pget_integer -h5pget_istore_k_f -h5pget_layout_f -H5Pget_link_creation_order_f -H5Pget_link_phase_change_f -H5Pget_local_heap_size_hint_f -h5pget_meta_block_size_f -h5pget_nfilters_f -h5pget_nlinks_f -h5pget_npros_f -H5Pget_obj_track_times_f -h5pget_preserve_f -h5pget_real -h5pget_real -h5pget_sec2_f -h5pget_sieve_buf_size_f -h5pget_size_f -h5pget_sizes_f -h5pget_small_data_block_size_f -h5pget_split_f -h5pget_stdio_f -h5pget_sym_k_f -h5pget_userblock_f -h5pget_version_f -h5pinsert_char -h5pinsert_char -h5pinsert_double -h5pinsert_double -h5pinsert_integer -h5pinsert_integer -h5pinsert_ptr -h5pinsert_real -h5pinsert_real -h5pisa_class_f -h5pmodify_filter_f -h5pregister_char -h5pregister_char -h5pregister_double -h5pregister_double -h5pregister_integer -h5pregister_integer -h5pregister_ptr -h5pregister_real -h5pregister_real -h5premove_f -h5premove_filter_f -h5pset(get)fill_value_f -h5pset(get)fill_value_f -h5pset_alignment_f -h5pset_alloc_time_f -H5Pset_attr_creation_order_f -H5Pset_attr_phase_change_f -h5pset_btree_ratios_f -h5pset_buffer_f -h5pset_cache_f -h5pset_char -h5pset_char -H5Pset_char_encoding_f -H5Pset_chunk_cache_f -h5pset_chunk_f -h5pset_copy_object_f -H5Pset_create_inter_group_f -h5pset_data_transform_f -h5pset_deflate_f -h5pset_double -h5pset_double -h5pset_dxpl_mpio_f -h5pset_edc_check_f -h5pset_est_link_info_f -h5pset_external_f -h5pset_fapl_core_f -h5pset_fapl_direct_f -h5pset_fapl_mpio_f -h5pset_fapl_mpiposix_f -h5pset_fapl_multi_l -h5pset_fapl_multi_s -h5pset_fapl_sec2_f -h5pset_fapl_split_f -h5pset_fapl_stdio_f -h5pset_fclose_degree_f -h5pset_fill_time_f -h5pset_filter_f -h5pset_fletcher32_f -h5pset_gc_references_f -h5pset_hyper_vector_size_f -h5pset_integer -h5pset_integer -h5pset_istore_k_f -h5pset_layout_f -H5Pset_libver_bounds_f -H5Pset_link_creation_order_f -h5pset_link_phase_change_f -H5Pset_local_heap_size_hint_f -H5Pset_nbit_f -h5pset_nlinks_f -H5Pset_obj_track_times_f -h5pset_preserve_f -h5pset_real -h5pset_real -h5pset_scaleoffset_f -H5Pset_shared_mesg_index_f -H5Pset_shared_mesg_nindexes_f -h5pset_shuffle_f -h5pset_sieve_buf_size_f -h5pset_sizes_f -h5pset_small_data_block_size_f -h5pset_sym_k_f -h5pset_szip_f -h5pset_userblock_f -h5punregister_f -h5rcreate_object_f -h5rcreate_object_f -h5rcreate_ptr_f -h5rcreate_region_f -h5rcreate_region_f -h5rdereference_object_f -h5rdereference_object_f -h5rdereference_ptr_f -h5rdereference_region_f -h5rdereference_region_f -h5rget_name_object_f -h5rget_name_object_f -h5rget_name_ptr_f -h5rget_name_region_f -h5rget_name_region_f -h5rget_obj_type_f -h5rget_object_type_obj_f -h5rget_region_region_f -h5sclose_f -h5scopy_f -h5screate_f -h5screate_simple_f -H5Sdecode_f -H5Sencode_f -h5sextent_copy_f -h5sextent_equal_f -h5sget_select_bounds_f -h5sget_select_elem_npoints_f -h5sget_select_elem_pointlist_f -h5sget_select_hyper_blocklist_f -h5sget_select_hyper_nblocks_f -h5sget_select_npoints_f -h5sget_select_type_f -h5sget_simple_extent_dims_f -h5sget_simple_extent_ndims_f -h5sget_simple_extent_npoints_f -h5sget_simple_extent_type_f -h5sis_simple_f -h5soffset_simple_f -h5sselect_all_f -h5sselect_elements_f -h5sselect_hyperslab_f -h5sselect_none_f -h5sselect_valid_f -h5sset_extent_none_f -h5sset_extent_simple_f -h5tarray_create_f -h5tclose_f -h5tcommit_anon_f -h5tcommit_f -h5tcommitted_f -h5tcompiler_conv_f -H5Tconvert_f -h5tcopy_f -h5tcreate_f -H5Tdecode_f -h5tenaum_insert_f -H5Tencode_f -h5tenum_create_f -h5tenum_nameof_f -h5tenum_valuof_f -h5tequal_f -h5tget_array_dims_f -h5tget_array_ndims_f -h5tget_class_f -h5tget_create_plist_f -h5tget_cset_f -h5tget_ebias_f -h5tget_fields_f -h5tget_inpad_f -h5tget_member_class_f -h5tget_member_index_f -h5tget_member_name_f -h5tget_member_offset_f -h5tget_member_type_f -h5tget_member_value_f -h5tget_native_type_f -h5tget_nmembers_f -h5tget_norm_f -h5tget_offset_f -h5tget_order_f -h5tget_pad_f -h5tget_precision_f -h5tget_sign_f -h5tget_size_f -h5tget_strpad_f -h5tget_super_f -h5tget_tag_f -h5tinsert_f -h5tis_variable_str_f -h5topen_f -h5tpack_f -h5tset_cset_f -h5tset_ebias_f -h5tset_fields_f -h5tset_inpad_f -h5tset_norm_f -h5tset_offset_f -h5tset_order_f -h5tset_pad_f -h5tset_precision_f -h5tset_sign_f -h5tset_size_f -h5tset_strpad_f -h5tset_tag_f -h5tvlen_create_f -h5zfilter_avail_f -h5zget_filter_info_f -h5zunregister_f -

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

-
- - - diff --git a/fortran/doc/DevelGuide/robodoc.css b/fortran/doc/DevelGuide/robodoc.css deleted file mode 100644 index 207a172..0000000 --- a/fortran/doc/DevelGuide/robodoc.css +++ /dev/null @@ -1,302 +0,0 @@ -/****h* ROBODoc/ROBODoc Cascading Style Sheet - * FUNCTION - * This is the default cascading style sheet for documentation - * generated with ROBODoc. - * You can edit this file to your own liking and then use - * it with the option - * --css - * - * This style-sheet defines the following layout - * +----------------------------------------+ - * | logo | - * +----------------------------------------+ - * | extra | - * +----------------------------------------+ - * | | navi- | - * | | gation | - * | content | | - * | | | - * +----------------------------------------+ - * | footer | - * +----------------------------------------+ - * - * This style-sheet is based on a style-sheet that was automatically - * generated with the Strange Banana stylesheet generator. - * See http://www.strangebanana.com/generator.aspx - * - ****** - * $Id: html_generator.c,v 1.94 2008/06/17 11:49:27 gumpu Exp $ - */ - -body -{ - background-color: rgb(255,255,255); - color: rgb(98,84,55); - font-family: Arial, serif; - border-color: rgb(226,199,143); -} - -pre -{ - font-family: monospace; - margin: 15px; - padding: 5px; - white-space: pre; - color: #000; -} - -pre.source -{ - background-color: #ffe; - border: dashed #aa9 1px; -} - -p -{ - margin:15px; -} - -p.item_name -{ - font-weight: bolder; - margin:5px; - font-size: 120%; -} - -#content -{ - font-size: 100%; - color: rgb(0,0,0); - background-color: rgb(255,255,255); - border-left-width: 0px; - border-right-width: 0px; - border-top-width: 0px; - border-bottom-width: 0px; - border-left-style: none; - border-right-style: none; - border-top-style: none; - border-bottom-style: none; - padding: 40px 31px 14px 17px; - border-color: rgb(0,0,0); - text-align: justify; -} - -#navigation -{ - background-color: rgb(98,84,55); - color: rgb(230,221,202); - font-family: "Times New Roman", serif; - font-style: normal; - border-color: rgb(0,0,0); -} - -a.menuitem -{ - font-size: 120%; - background-color: rgb(0,0,0); - color: rgb(195,165,100); - font-variant: normal; - text-transform: none; - font-weight: normal; - padding: 1px 8px 3px 1px; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; - border-color: rgb(159,126,57); - text-align: right; -} - -#logo, #logo a -{ - font-size: 130%; - background-color: rgb(198,178,135); - color: rgb(98,84,55); - font-family: Georgia, serif; - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: bold; - padding: 20px 18px 20px 18px; - border-color: rgb(255,255,255); - text-align: right; -} - -#extra, #extra a -{ - font-size: 128%; - background-color: rgb(0,0,0); - color: rgb(230,221,202); - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: normal; - border-left-width: 0px; - border-right-width: 0px; - border-top-width: 0px; - border-bottom-width: 0px; - border-left-style: none; - border-right-style: none; - border-top-style: none; - border-bottom-style: none; - padding: 12px 12px 12px 12px; - border-color: rgb(195,165,100); - text-align: center; -} - -#content a -{ - color: rgb(159,126,57); - text-decoration: none; -} - -#content a:hover, #content a:active -{ - color: rgb(255,255,255); - background-color: rgb(159,126,57); -} - -a.indexitem -{ - display: block; -} - -h1, h2, h3, h4, h5, h6 -{ - background-color: rgb(221,221,221); - font-family: Arial, serif; - font-style: normal; - font-variant: normal; - text-transform: none; - font-weight: normal; -} - -h1 -{ - font-size: 151%; -} - -h2 -{ - font-size: 142%; -} - -h3 -{ - font-size: 133%; -} - -h4 -{ - font-size: 124%; -} - -h5 -{ - font-size: 115%; -} - -h6 -{ - font-size: 106%; -} - -#navigation a -{ - text-decoration: none; -} - -.menuitem:hover -{ - background-color: rgb(195,165,100); - color: rgb(0,0,0); -} - -#extra a -{ - text-decoration: none; -} - -#logo a -{ - text-decoration: none; -} - -#extra a:hover -{ -} - -/* layout */ -#navigation -{ - width: 22%; - position: relative; - top: 0; - right: 0; - float: right; - text-align: center; - margin-left: 10px; -} - -.menuitem {width: auto;} -#content {width: auto;} -.menuitem {display: block;} - - -div#footer -{ - background-color: rgb(198,178,135); - color: rgb(98,84,55); - clear: left; - width: 100%; - font-size: 71%; -} - -div#footer a -{ - background-color: rgb(198,178,135); - color: rgb(98,84,55); -} - -div#footer p -{ - margin:0; - padding:5px 10px -} - -span.keyword -{ - color: #00F; -} - -span.comment -{ - color: #080; -} - -span.quote -{ - color: #F00; -} - -span.squote -{ - color: #F0F; -} - -span.sign -{ - color: #008B8B; -} - -span.line_number -{ - color: #808080; -} - -@media print -{ - #navigation {display: none;} - #content {padding: 0px;} - #content a {text-decoration: underline;} -} diff --git a/fortran/doc/DevelGuide/src/H5Af_c.html b/fortran/doc/DevelGuide/src/H5Af_c.html deleted file mode 100644 index 7fcecc1..0000000 --- a/fortran/doc/DevelGuide/src/H5Af_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Af.c - - - - - -
-
- -

H5Af

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5A Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html deleted file mode 100644 index 9e503f4..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_F03_f90.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - -./src/H5Aff_F03.f90 - - - - - -
-
- -

H5A (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5A_PROVISIONAL
-
-

FILE

-
  src/fortran/src/H5Aff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions.
-  It contains the same functions as H5Aff_F90.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled.
-
-

NOTES

-
  (A) C_LOC and character strings according to the Fortran 2003 standard:
-
-  15.1.2.5 C_LOC(X)
-
-  Argument. X shall either
-
-  (1) have interoperable type and type parameters and be
-    (a) a variable that has the TARGET attribute and is interoperable,
-    (b) an allocated allocatable variable that has the TARGET attribute
-        and is not an array of zero size, or
-    (c) an associated scalar pointer, or
-  (2) be a nonpolymorphic scalar, have no length type parameters, and be
-    (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
-    (b) an allocated allocatable variable that has the TARGET attribute, or
-    (c) an associated pointer.
-
-  - When X is a character, for interoperability the standard is:
-
-  15.2.1 Interoperability of intrinsic types
-
-  ...if the type is character, interoperability also requires that the length type parameter
-  be omitted or be specified by an initialization expression whose value is one.
-
-  THEREFORE compilers that have not extended the standard  require
-
-  CHARACTER(LEN=1), TARGET :: chr
-  or
-  CHARACTER, TARGET :: chr
-
-  (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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5aread_f

- -

[ Top ] [ H5A (F03) ] [ Subroutines ]

-

NAME

-
  h5aread_f
-
-

PURPOSE

-
  Reads an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-  memtype_id    - attribute memory type identifier
-  dims          - 1D array of size 7, stores sizes of the
-                - buf array dimensions.
-
-

OUTPUTS

-
  buf           - buffer to read attribute data in
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-  dims parameter was added to make code portable;
-  Aprile 4, 2001
-
-  Changed buf intent to INOUT to be consistant
-  with how the C functions handles it. The pg
-  compiler will return 0 if a buf value is not set.
-  February, 2008
-
-

NOTES

-
  This function is overloaded to write INTEGER,
-  REAL, DOUBLE PRECISION and CHARACTER buffers
-  up to 7 dimensions.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html deleted file mode 100644 index aa01b49..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_F90_f90.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -./src/H5Aff_F90.f90 - - - - - -
-
- -

H5A (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5A_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Aff_F90.f90
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5A functions. It contains
-  the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Aff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Aff_f90.html b/fortran/doc/DevelGuide/src/H5Aff_f90.html deleted file mode 100644 index 268c1db..0000000 --- a/fortran/doc/DevelGuide/src/H5Aff_f90.html +++ /dev/null @@ -1,1102 +0,0 @@ - - - - - - - -./src/H5Aff.f90 - - - - - -
-
- -

H5A

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5A
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5A functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5aclose_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aclose_f
-
-

PURPOSE

-
  Closes the specified attribute.
-
-

INPUTS

-
  attr_id  - attribute identifier
-
-

OUTPUTS

-
  hdferr   - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aclose_f(attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5acreate_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5acreate_by_name_f
-
-

PURPOSE

-
  Creates an attribute attached to a specified object
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name, relative to loc_id, of object that attribute is to be attached to
-  attr_name     - Attribute name
-  type_id       - Attribute datatype identifier
-  space_id      - Attribute dataspace identifier
-
-

OUTPUTS

-
  attr          - an attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  acpl_id       - Attribute creation property list identifier (Currently not used.)
-  aapl_id       - Attribute access property list identifier (Currently not used.)
-  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, &
-       acpl_id, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T),   INTENT(IN)  :: loc_id
-    CHARACTER(LEN=*), INTENT(IN)  :: obj_name
-    CHARACTER(LEN=*), INTENT(IN)  :: attr_name
-    INTEGER(HID_T),   INTENT(IN)  :: type_id
-    INTEGER(HID_T),   INTENT(IN)  :: space_id
-    INTEGER(HID_T),   INTENT(OUT) :: attr
-    INTEGER,          INTENT(OUT) :: hdferr
-
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: acpl_id
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: aapl_id
-    INTEGER(HID_T),   INTENT(IN), OPTIONAL :: lapl_id
-
- -
- -

h5acreate_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5acreate_f
-
-

PURPOSE

-
  Creates a dataset as an attribute of a group, dataset, or named datatype
-
-

INPUTS

-
  loc_id        - identifier of an object (group, dataset,
-                  or named datatype) attribute is attached to
-  name          - attribute name
-  type_id       - attribute datatype identifier
-  space_id      - attribute dataspace identifier
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  acpl_id       - Attribute creation property list identifier
-  appl_id       - Attribute access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, &
-                                 hdferr, acpl_id, aapl_id )
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Attribute name
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Attribute datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier
-    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5adelete_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_by_idx_f
-
-

PURPOSE

-
  Deletes an attribute from an object according to index order
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name of object, relative to location, from which attribute is to be removed
-  idx_type      - Type of index; Possible values are:
-                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                   H5_INDEX_NAME_F          - Index on names
-                   H5_INDEX_CRT_ORDER_F     - Index on creation order
-                   H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order in which to iterate over index; Possible values are:
-                   H5_ITER_UNKNOWN_F    - Unknown order
-                   H5_ITER_INC_F        - Increasing order
-                   H5_ITER_DEC_F        - Decreasing order
-                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
-                   H5_ITER_N_F          - Number of iteration orders
-
-  n             - Offset within index
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-                                              !    H5_ITER_N_F      - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Offset within index
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5adelete_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_by_name_f
-
-

PURPOSE

-
  Removes an attribute from a specified location
-
-

INPUTS

-
  loc_id        - Identifer for object to which attribute is attached
-  obj_name      - Name of attribute to open
-  attr_name     - Attribute access property list
-  lapl_id       - Link access property list
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
-                                              ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5adelete_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5adelete_f
-
-

PURPOSE

-
  Deletes an attribute of an object (group, dataset or
-  named datatype)
-
-

INPUTS

-
  obj_id        - object identifier
-  name          - attribute name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5adelete_f(obj_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Attribute name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Aexists_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aexists_by_name_f
-
-

PURPOSE

-
  Determines whether an attribute with a given name exists on an object
-
-

INPUTS

-
  loc_id        - Location identifier
-  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_exists   - attribute exists status
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
-                                             ! absolute from the fileâs root group, or '.'
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Aexists_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aexists_f
-
-

PURPOSE

-
  Determines whether an attribute with a given name exists on an object
-
-

INPUTS

-
  obj_id        - Object identifier
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_exists   - attribute exists status
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    LOGICAL, INTENT(OUT) :: attr_exists  ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_create_plist_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_create_plist_f
-
-

PURPOSE

-
  Gets an attribute creation property list identifier
-
-

INPUTS

-
  attr_id          - Identifier of the attribute
-
-

OUTPUTS

-
  creation_prop_id - Identifier for the attribute’s creation property
-  hdferr           - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Identifier of the attribute
-    INTEGER(HID_T), INTENT(OUT) :: creation_prop_id   ! Identifier for the attributeâs creation property
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_info_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute index position
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
- OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, &
-       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-
-    INTEGER(HSIZE_T), INTENT(IN) :: n         ! Attributeâs position in index
-
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5aget_info_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_by_name_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute name
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  attr_name     - Attribute name
-
- OUTPUTS  NOTE: In C it is defined as a structure: H5A_info_t
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, &
-       f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size   ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5aget_info_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_info_f
-
-

PURPOSE

-
  Retrieves attribute information, by attribute identifier
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  NOTE: In C it is defined as a structure: H5A_info_t
-
-  corder_valid  - indicates whether the creation order data is valid for this attribute
-  corder        - is a positive integer containing the creation order of the attribute
-  cset          - indicates the character set used for the attribute’s name
-  data_size     - indicates the size, in the number of characters, of the attribute
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
-    INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset   ! Indicates the character set used for the attributeâs name
-    INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5aget_name_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_name_by_idx_f
-
-

PURPOSE

-
  Gets an attribute name, by attribute index position.
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index; Possible values are:
-                   H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                   H5_INDEX_NAME_F          - Index on names
-                   H5_INDEX_CRT_ORDER_F     - Index on creation order
-                   H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order in which to iterate over index; Possible values are:
-                   H5_ITER_UNKNOWN_F    - Unknown order
-                   H5_ITER_INC_F        - Increasing order
-                   H5_ITER_DEC_F        - Decreasing order
-                   H5_ITER_NATIVE_F     - No particular order, whatever is fastest
-                   H5_ITER_N_F          - Number of iteration orders
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
-

OUTPUTS

-
  name          - Attribute name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  size          - Size, in bytes, of attribute name
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, &
-       n, name, hdferr, size, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  from which attribute is to be removed *TEST* check NULL
-    INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are:
-                                    !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                    !    H5_INDEX_NAME_F       - Index on names
-                                    !    H5_INDEX_CRT_ORDER_F  - Index on creation order
-                                    !    H5_INDEX_N_F         - Number of indices defined
-
-    INTEGER, INTENT(IN) :: order    ! Order in which to iterate over index; Possible values are:
-                                    !    H5_ITER_UNKNOWN_F   - Unknown order
-                                    !    H5_ITER_INC_F      - Increasing order
-                                    !    H5_ITER_DEC_F       - Decreasing order
-                                    !    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
-                                    !    H5_ITER_N_F        - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n !  Attributeâs position in index
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
-                                      ! Returns attribute name size,
-                                      ! -1 if fail
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size  ! Indicates the size, in the number of characters, 
-                                                    ! of the attribute
-
- -
- -

h5aget_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_name_f
-
-

PURPOSE

-
  Gets an attribute name.
-
-

INPUTS

-
  attr_id       - attribute identifier
-  size          - size of a buffer to read name in
-
-

OUTPUTS

-
  buf           - buffer to read name in
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size
-    CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name
-    INTEGER, INTENT(OUT) :: hdferr ! Error code:
-                                   ! name length is successful, -1 if fail
-
- -
- -

h5aget_num_attrs_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_num_attrs_f
-
-

PURPOSE

-
  Determines the number of attributes attached to an object.
-
-

INPUTS

-
  obj_id        - object (group, dataset, or named datatype)
-  identifier
-
-

OUTPUTS

-
  attr_num      - number of attributes attached to the object
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    INTEGER, INTENT(OUT) :: attr_num      ! Number of attributes of the object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5aget_space_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_space_f
-
-

PURPOSE

-
  Gets a copy of the dataspace for an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  space_id      - attribite dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id   ! Attribute identifier
-    INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5aget_storage_size_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_storage_size_f
-
-

PURPOSE

-
  Returns the amount of storage required for an attribute.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  size          - attribute storage size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Attribute storage requirement
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5aget_type_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aget_type_f
-
-

PURPOSE

-
  Gets an attribute datatype.
-
-

INPUTS

-
  attr_id       - attribute identifier
-
-

OUTPUTS

-
  type_id       - attribute datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier
-    INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5aopen_by_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_by_idx_f
-
-

PURPOSE

-
  Opens an existing attribute that is attached to an object specified by location and name
-
-

INPUTS

-
  loc_id        - Location of object to which attribute is attached
-  obj_name      - Name of object to which attribute is attached, relative to location
-  idx_type      - Type of index
-  order         - Index traversal order
-  n             - Attribute’s position in index
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list
-  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object to which attribute is attached
-    INTEGER, INTENT(IN) :: idx_type           ! Type of index; Possible values are:
-                                              !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                              !    H5_INDEX_NAME_F      - Index on names
-                                              !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                              !    H5_INDEX_N_F       - Number of indices defined
-    INTEGER, INTENT(IN) :: order              ! Order in which to iterate over index; Possible values are:
-                                              !    H5_ITER_UNKNOWN_F  - Unknown order
-                                              !    H5_ITER_INC_F      - Increasing order
-                                              !    H5_ITER_DEC_F      - Decreasing order
-                                              !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-
-    INTEGER(HSIZE_T), INTENT(IN) :: n       ! Attributeâs position in index
-
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code:
-                                            ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id  ! Attribute access property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

H5Aopen_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  H5Aopen_by_name_f
-
-

PURPOSE

-
  Opens an attribute for an object by object name and attribute name.
-
-

INPUTS

-
  loc_id        - Location from which to find object to which attribute is attached
-  obj_name      - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
-  attr_name     - Attribute name
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
-  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id,
-                                             ! absolute from the fileâs root group, or '.'
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list
-                                                    ! (Currently unused; should be passed in as H5P_DEFAULT_F)
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

h5aopen_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_f
-
-

PURPOSE

-
  Opens an attribute for an object specified by object
-  identifier and attribute name
-
-

INPUTS

-
  obj_id        - Identifer for object to which attribute is attached
-  attr_name     - Name of attribute to open
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-
-

OPTIONAL PARAMETERS

-
  aapl_id       - Attribute access property list
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id    ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              !   Success:  0
-                                              !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id     ! Attribute access property list
-
- -
- -

h5aopen_idx_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_idx_f
-
-

PURPOSE

-
  Opens the attribute specified by its index.
-
-

INPUTS

-
  obj_id        - identifier of a group, dataset, or named
-                  datatype an attribute to be attached to
-  index         - index of the attribute to open (zero-based)
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
-    INTEGER, INTENT(IN) :: index            ! Attribute index
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5aopen_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5aopen_name_f
-
-

PURPOSE

-
  Opens an attribute specified by name.
-
-

INPUTS

-
  obj_id        - identifier of a group, dataset, or named
-                  datatype atttribute to be attached to
-  name          - attribute name
-
-

OUTPUTS

-
  attr_id       - attribute identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces are added for
-  called C functions (it is needed for Windows
-  port).  February 27, 2001
-
-

SOURCE

-
  SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Attribute name
-    INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5arename_by_name_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5arename_by_name_f
-
-

PURPOSE

-
  Renames an attribute
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  obj_name      - Name of object, relative to location,
-                  whose attribute is to be renamed
-  old_attr_name - Prior attribute name
-  new_attr_name - New attribute name
-  lapl_id       - Link access property list identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, &
-        hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of object, relative to location,
-                                              !  whose attribute is to be renamed
-    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
-    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

h5arename_f

- -

[ Top ] [ H5A ] [ Subroutines ]

-

NAME

-
  h5arename_f
-
-

PURPOSE

-
  Renames an attribute
-
-

INPUTS

-
  loc_id        - Location or object identifier; may be dataset or group
-  old_attr_name - Prior attribute name
-  new_attr_name - New attribute name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

HISTORY

-
  N/A
-
-

SOURCE

-
  SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Object identifier
-    CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name
-    CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Df_c.html b/fortran/doc/DevelGuide/src/H5Df_c.html deleted file mode 100644 index 1e163f2..0000000 --- a/fortran/doc/DevelGuide/src/H5Df_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Df.c - - - - - -
-
- -

H5Df

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5D Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html deleted file mode 100644 index 0bb4173..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_F03_f90.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - -./src/H5Dff_F03.f90 - - - - - -
-
- -

H5D (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5D_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions.
-  It contains the same functions as H5Dff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Dff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

NOTES

-
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
-  we only provide an interface for arrays up to and including rank 7.
-
-  (2) Unfortunately we are using a generic interface and one of the factors
-  used in determining the proper routine to select is that of the array
-  rank being passed. Therefore, we can not create just one subroutine for
-  each array type (integer, real, etc...) and use a
-  rank 1 array of assumed size to handle multiple ranks, i.e.
-  (i.e. integer, dimension(*) :: ... )
-  (i.e. real   , dimension(*) :: ... ) etc...
-
-  (3) Could not place the USE ISO_C_BINDING in the module header because it may
-  conflict with the USE ISO_C_BINDING included in the user's program. Moved
-  the statement instead to each subroutine.
-
-
-  (4) C_LOC and character strings according to the Fortran 2003 standard:
-
-  15.1.2.5 C_LOC(X)
-
-  Argument. X shall either
-
-  (A) have interoperable type and type parameters and be
-  (a) a variable that has the TARGET attribute and is interoperable,
-  (b) an allocated allocatable variable that has the TARGET attribute
-  and is not an array of zero size, or
-  (c) an associated scalar pointer, or
-  (B) be a nonpolymorphic scalar, have no length type parameters, and be
-  (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
-  (b) an allocated allocatable variable that has the TARGET attribute, or
-  (c) an associated pointer.
-
-        - When X is a character, for interoperability the standard is:
-
-  15.2.1 Interoperability of intrinsic types
-
-  ...if the type is character, interoperability also requires that the length type parameter
-  be omitted or be specified by an initialization expression whose value is one.
-
-  THEREFORE compilers that have not extended the standard require the
-  argument in C_LOC to be of the variant:
-
-  CHARACTER(LEN=1), TARGET :: chr
-  or
-  CHARACTER, TARGET :: chr
-  (B)
-                         *** 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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dvlen_reclaim

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dvlen_reclaim
-
-

PURPOSE

-
  Reclaims VL datatype memory buffers. 
-
-

INPUTS

-
  type_id  - Identifier of the datatype. 
-  space_id - Identifier of the dataspace. 
-  plist_id - Identifier of the property list used to create the buffer. 
-       buf - Pointer to the buffer to be reclaimed. 
-
-

OUTPUTS

-
  hdferr   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
 M. Scot Breitenfeld
- January 11, 2011
-
-

SOURCE

-
  SUBROUTINE H5Dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr)
-
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-
-    INTEGER(HID_T), INTENT(IN) :: type_id   ! Identifier of the datatype. 
-    INTEGER(HID_T), INTENT(IN) :: space_id  ! Identifier of the dataspace. 
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Identifier of the property list used to create the buffer. 
-    TYPE(C_PTR), INTENT(INOUT) :: buf       ! Pointer to the buffer to be reclaimed. 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html deleted file mode 100644 index afebdd8..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_F90_f90.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -./src/H5Dff_F90.f90 - - - - - -
-
- -

H5D (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5D_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5D functions. It contains
-  the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Dff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

NOTES

-
  (1) The maximum rank of an array allowed in Fortran is 7, therefore
-  we only provide an interface for arrays up to and including rank 7.
-
-  (2) Unfortunately we are using a generic interface and one of the factors
-  used in determining the proper routine to select is that of the array
-  rank being passed, therefore we can not create just one subroutine for
-  each array type (integer, real, etc...) of various ranks and then use a
-  rank 1 array of assumed size in the just one subroutine,
-  (i.e. integer, dimension(*) :: ... )
-  (i.e. real   , dimension(*) :: ... ) etc...
-
-  (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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dread_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dread_f
-
-

PURPOSE

-
  Reads raw data from the specified dataset into buf,
-  converting from file datatype and dataspace to memory
-  datatype and dataspace.
-
-

INPUTS

-
  dset_id       - dataset identifier
-  mem_type_id   - memory type identifier
-  dims          - 1-dim array of size 7; dims(k) has the size
-                  of k-th dimension of the buf array
-
-

OUTPUTS

-
  buf     - buffer to read data in
-  hdferr: - error code
-             Success:  0
-             Failure: -1
-
-

OPTIONAL PARAMETERS

-
  mem_space_id  - memory dataspace identifier
-  file_space_id - file dataspace identifier
-  xfer_prp      - trasfer property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-  dims parameter was added to make code portable;
-  n parameter was replaced with dims parameter in
-  the h5dwrite_reference_obj and h5dwrite_reference_dsetreg
-  functions.  April 2, 2001
-
-

NOTES

-
  This function is overloaded to read INTEGER,
-  REAL, DOUBLE PRECISION and CHARACTER buffers
-  up to 7 dimensions, and one dimensional buffers
-  of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Dff_f90.html b/fortran/doc/DevelGuide/src/H5Dff_f90.html deleted file mode 100644 index 5444a93..0000000 --- a/fortran/doc/DevelGuide/src/H5Dff_f90.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - - - - -./src/H5Dff.f90 - - - - - -
-
- -

H5D

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5D
-
-

FILE

-
  fortran/src/H5Dff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5D functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5dclose_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dclose_f
-
-

PURPOSE

-
  Closes a dataset.
-
-

INPUTS

-
  dset_id       - dataset identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dclose_f(dset_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5dcreate_anon_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dcreate_anon_f
-
-

PURPOSE

-
  Creates a dataset in a file without linking it into the file structure
-
-

INPUTS

-
  loc_id        - Identifier of the file or group within which to create the dataset.
-  type_id       - Identifier of the datatype to use when creating the dataset.
-  space_id      - Identifier of the dataspace to use when creating the dataset.
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  dcpl_id       - Dataset creation property list identifier.
-  dapl_id       - Dataset access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 11, 2008
-
-

SOURCE

-
  SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier.
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier.
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier.
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id  ! Dataset creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id  ! Dataset access property list identifier.
-
- -
- -

h5dcreate_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dcreate_f
-
-

PURPOSE

-
  Creates a dataset at the specified location
-
-

INPUTS

-
  loc_id        - file or group identifier
-  name          - dataset name
-  type_id       - dataset datatype identifier
-  space_id      - dataset dataspace identifier
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - Dataset creation property list
-  lcpl_id       - Link creation property list
-  dapl_id       - Dataset access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  - Explicit Fortran interfaces were added for
-    called C functions (it is needed for Windows
-    port).  February 28, 2001
-
-  - Added version's 1.8 new optional parameters
-    February, 2008
-
-

SOURCE

-
  SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
-       hdferr, dcpl_id, lcpl_id, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5dget_access_plist_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_access_plist_f
-
-

PURPOSE

-
  Returns a copy of the dataset creation property list.
-
-

INPUTS

-
  dset_id       - Dataset identifier
-
-

OUTPUTS

-
  plist_id      - Dataset access property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

SOURCE

-
SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr)
-  IMPLICIT NONE
-  INTEGER(HID_T), INTENT(IN)  :: dset_id
-  INTEGER(HID_T), INTENT(OUT) :: plist_id 
-  INTEGER       , INTENT(OUT) :: hdferr  
-
- -
- -

h5dget_create_plist_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_create_plist_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the dataset creation
-  property list for a dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  plist_id      - creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id   ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: plist_id    ! Dataset creation
-                                               ! property list identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5dget_space_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_space_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the dataspace for a
-  dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  dataspace_id  - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: dataspace_id   ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dget_space_status_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_space_status_f
-
-

PURPOSE

-
  Returns the status of data space allocation.
-
-

INPUTS

-
  dset_id       - dataset identifier
-
-

OUTPUTS

-
  flag          - status; may have one of the following values:
-                   H5D_SPACE_STS_ERROR_F
-                   H5D_SPACE_STS_NOT_ALLOCATED_F
-                   H5D_SPACE_STS_PART_ALLOCATED_F
-                   H5D_SPACE_STS_ALLOCATED_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataspace identifier
-    INTEGER, INTENT(IN)        :: flag     ! Memory buffer to fill in
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-
- -
- -

h5dget_storage_size_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_storage_size_f
-
-

PURPOSE

-
  Returns the amount of storage requires by a dataset
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  size          - datastorage size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  October 15, 2002
-
-

SOURCE

-
  SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier
-    INTEGER(HSIZE_T),  INTENT(OUT)  :: size  ! Amount of storage
-                                             ! allocated for dataset
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5dget_type_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dget_type_f
-
-

PURPOSE

-
  Returns an identifier for a copy of the datatype for a
-  dataset.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-
-

OUTPUTS

-
  datatype_id   - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-

SOURCE

-
  SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(OUT) :: datatype_id    ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dopen_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dopen_f
-
-

PURPOSE

-
  Opens an existing dataset.
-
-

INPUTS

-
  loc_id        - file or group identifier
-  name          - dataset name
-
-

OUTPUTS

-
  dset_id       - dataset identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  dapl_id       - Dataset access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  -Explicit Fortran interfaces were added for
-   called C functions (it is needed for Windows
-   port).  February 28, 2001
-
-  -Added 1.8 (optional) parameter dapl_id
-   February, 2008, M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset
-    INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list
-
- -
- -

h5dset_extent

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dset_extent (instead of obsolete name: h5dextend_f)
-
-

PURPOSE

-
  Extends a dataset with unlimited dimension.
-
-

INPUTS

-
  dataset_id    - dataset identifier
-  size          - array containing the new magnitude of
-                  each dimension
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-  Changed name from the now obsolete h5dextend_f
-  to h5dset_extent_f. Provided interface to old name
-  for backward compatability. -MSB- March 14, 2008
-
-

SOURCE

-
  SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN)  :: size
-    ! Array containing
-    ! dimensions' sizes
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5dvlen_get_max_len_f

- -

[ Top ] [ H5D ] [ Subroutines ]

-

NAME

-
  h5dvlen_get_max_len_f
-
-

PURPOSE

-
  Returns maximum length of the VL array elements
-
-

INPUTS

-
  dataset_id    - dataset identifier
-  type_id       - datatype identifier
-  space_id      - dataspace identifier
-
-

OUTPUTS

-
  size          - buffer size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 15, 2002
-
-

SOURCE

-
  SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id         ! Datatype identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id        ! Dataspace identifier
-    INTEGER(SIZE_T),  INTENT(OUT)  :: len         ! Maximum length of the element
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Ef_c.html b/fortran/doc/DevelGuide/src/H5Ef_c.html deleted file mode 100644 index 79b7914..0000000 --- a/fortran/doc/DevelGuide/src/H5Ef_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Ef.c - - - - - -
-
- -

H5Ef

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5E Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Eff_f90.html b/fortran/doc/DevelGuide/src/H5Eff_f90.html deleted file mode 100644 index 7eb95e6..0000000 --- a/fortran/doc/DevelGuide/src/H5Eff_f90.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - -./src/H5Eff.f90 - - - - - -
-
- -

H5E

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5E
-
-

FILE

-
  fortran/src/H5Eff.f90
-
-

PURPOSE

-
  This Module contains Fortran interfaces for H5E functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5eclear_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eclear_f
-
-

PURPOSE

-
  Clears the error stack for the current thread.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  estack_id     - Error Stack id
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-  Added optional error stack identifier in order to bring
-  the function in line with the h5eclear2 routine.
-  MSB, July 9, 2009
-
-

SOURCE

-
  SUBROUTINE h5eclear_f(hdferr, estack_id)
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id
-
- -
- -

h5eget_major_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eget_major_f
-
-

PURPOSE

-
  Returns a character string describing an error specified
-  by a major error number.
-
-

INPUTS

-
  error_no      - major error number
-
-

OUTPUTS

-
  name          - character string describing the error
-  namelen       - number of characters in the name buffer
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr)
-    INTEGER, INTENT(IN) :: error_no        ! Major error number
-    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Character string describing
-                                           ! the error.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters
-                                           ! in name.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5eget_minor_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eget_minor_f
-
-

PURPOSE

-
  Returns a character string describing an error specified
-  by a minor error number.
-
-

INPUTS

-
  error_no      - minor error number
-
-

OUTPUTS

-
  name          - character string describing the error
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eget_minor_f(error_no, name, hdferr)
-    INTEGER, INTENT(IN) :: error_no       ! Major error number
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
-                                          ! the error
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5eprint_f

- -

[ Top ] [ H5E ] [ Subroutines ]

-

NAME

-
  h5eprint_f
-
-

PURPOSE

-
  Prints the error stack in a default manner.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  name          - name of the file that contains print output
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  April 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5eprint_f(hdferr, name)
-    CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5FDmpiof_c.html b/fortran/doc/DevelGuide/src/H5FDmpiof_c.html deleted file mode 100644 index 74143d2..0000000 --- a/fortran/doc/DevelGuide/src/H5FDmpiof_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5FDmpiof.c - - - - - -
-
- -

H5FDmpiof

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for Parallel Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html b/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html deleted file mode 100644 index 473b5db..0000000 --- a/fortran/doc/DevelGuide/src/H5FDmpioff_f90.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - -./src/H5FDmpioff.f90 - - - - - -
-
- -

H5FDMPIO

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5FDMPIO
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5P functions needed by
-  parallel MPI programs.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_dxpl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_dxpl_mpio_f
-
-

PURPOSE

-
  Returns the data transfer mode.
-
-

INPUTS

-
  prp_id        - data transfer property list identifier
-
-

OUTPUTS

-
  data_xfer_mode- transfer mode; possible values are:
-                     H5FD_MPIO_INDEPENDENT_F
-                     H5FD_MPIO_COLLECTIVE_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are:
-                                           ! H5FD_MPIO_INDEPENDENT_F
-                                           ! H5FD_MPIO_COLLECTIVE_F
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pget_fapl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_mpio_f
-
-

PURPOSE

-
  Returns MPI communicator information.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  comm          - MPI-2 communicator
-  info          - MPI-2 info object
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(OUT) :: comm ! buffer to return communicator
-    INTEGER, INTENT(OUT) :: info ! buffer to return info object
-                                 ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5pget_fapl_mpiposix_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_mpiposix_f
-
-

PURPOSE

-
  Returns MPI communicator information.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  comm          - MPI-2 communicator
-  use_gpfs      - flag to use GPFS hints
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  May 6, 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(OUT) :: comm         ! Buffer to return communicator
-    LOGICAL, INTENT(OUT) :: use_gpfs
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pset_dxpl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_dxpl_mpio_f
-
-

PURPOSE

-
  Sets data transfer mode.
-
-

INPUTS

-
  prp_id         - data transfer property list identifier
-  data_xfer_mode - transfer mode; possible values are:
-                     H5FD_MPIO_INDEPENDENT_F
-                     H5FD_MPIO_COLLECTIVE_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are:
-                                          ! H5FD_MPIO_INDEPENDENT_F
-                                          ! H5FD_MPIO_COLLECTIVE_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_fapl_mpio_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_mpio_f
-
-

PURPOSE

-
  Stores MPI IO communicator information to the file
-  access property list.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-  comm          - MPI-2 communicator
-  info          - MPI-2 info object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  November, 2000
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5pset_fapl_mpiposix_f

- -

[ Top ] [ H5FDMPIO ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_mpiposix_f
-
-

PURPOSE

-
  Stores MPI IO communicator information to the file
-  access property list.
-
-

INPUTS

-
  prp_id        - file access property list identifier
-  comm          - MPI-2 communicator
-  use_gpfs      - logical flag to use the GPFS hints
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  May 6, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_mpiposix_f(prp_id, comm, use_gpfs, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open
-                                ! as defined in MPI_FILE_OPEN of MPI-2
-    LOGICAL, INTENT(IN) :: use_gpfs
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Ff_c.html b/fortran/doc/DevelGuide/src/H5Ff_c.html deleted file mode 100644 index c91a62d..0000000 --- a/fortran/doc/DevelGuide/src/H5Ff_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Ff.c - - - - - -
-
- -

H5Ff

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5F Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Fff_f90.html b/fortran/doc/DevelGuide/src/H5Fff_f90.html deleted file mode 100644 index b0164c9..0000000 --- a/fortran/doc/DevelGuide/src/H5Fff_f90.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - - - - -./src/H5Fff.f90 - - - - - -
-
- -

H5F

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5F
-
-

FILE

-
  H5Fff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5F functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5fclose_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fclose_f
-
-

PURPOSE

-
  Closes HDF5 file.
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fclose_f(file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fcreate_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fcreate_f
-
-

PURPOSE

-
  Creates HDF5 files.
-
-

INPUTS

-
  name          - name of the file to create
-  access_flags  - File access flags. Allowable values are:
-                   H5F_ACC_TRUNC_F
-                   H5F_ACC_EXCL_F
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - file creation property list identifier
-  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, &
-       creation_prp, access_prp)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    INTEGER, INTENT(IN) :: access_flags    ! File access flags
-    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp
-                                           ! File creation propertly
-                                           ! list identifier
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5fflush_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fflush_f
-
-

PURPOSE

-
  Flushes all buffers associated WITH a file to disk
-
-

INPUTS

-
  object_id     - identifier of object used to identify the file.
-  scope         - specifies the scope of the flushing action.
-                  Possible values are:
-                    H5F_SCOPE_GLOBAL_F
-                    H5F_SCOPE_LOCAL_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  creation_prp  - file creation property list identifier
-  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fflush_f(object_id, scope, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object
-                                            !associate with a file,
-                                            !including the file itself,
-                                            !a dataset, a group, an
-                                            !attribute, or a named
-                                            !data type
-
-    INTEGER, INTENT(IN) :: scope            !scope of the flushing
-                                            !action, possible values
-                                            !are: H5F_SCOPE_GLOBAL_F
-                                            ! which flushes the entire
-                                            !virtual file,
-                                            !and H5F_SCOPE_LOCAL_F
-                                            !which flushes only the
-                                            !specified file.
-
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5fget_access_plist_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_access_plist_f
-
-

PURPOSE

-
  Returns a file access property list identifier.
-
-

INPUTS

-
  file_id       - identifier of a file to creation property list of
-
-

OUTPUTS

-
  access_id     - access property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: access_id   ! File access property
-                                               ! list identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5fget_create_plist_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_create_plist_f
-
-

PURPOSE

-
  Returns a file creation property list identifier.
-
-

INPUTS

-
  file_id       - identifier of a file to creation property list of
-
-

OUTPUTS

-
  prop_id       - creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id    ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: prop_id   ! File creation property
-                                             ! list identifier
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5fget_filesize_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_filesize_f
-
-

PURPOSE

-
  Retrieves the file size of the HDF5 file.
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  size          - file size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  July 7, 2004
-
-

SOURCE

-
  SUBROUTINE h5fget_filesize_f(file_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id  ! file identifier
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Size of the file
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
-                                           !     -1 if fail
-
- -
- -

h5fget_freespace_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_freespace_f
-
-

PURPOSE

-
  Get amount of free space within a file
-
-

INPUTS

-
  file_id       - file identifier
-
-

OUTPUTS

-
  free_space    - amount of free space in file
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Quincey Koziol
-  October 7, 2003
-
-

SOURCE

-
  SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER(HSSIZE_T), INTENT(OUT) :: free_space
-                                          ! amount of free space in file
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fget_name_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_name_f
-
-

PURPOSE

-
  Gets the name of the file from the object identifier
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  buf           - buffer to store the read name
-  size          - actual size of the name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  July 6, 2004
-
-

SOURCE

-
  SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Object identifier
-    CHARACTER(LEN=*), INTENT(INOUT) :: buf
-                                           ! Buffer to hold file name
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Size of the file name
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
-                                           !     -1 if fail
-
- -
- -

h5fget_obj_count_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_obj_count_f
-
-

PURPOSE

-
  Gets number of the objects open within a file
-
-

INPUTS

-
  file_id       - file identifier
-  obj_type      - type of the object; possible values are:
-                    H5F_OBJ_FILE_F
-                    H5F_OBJ_DATASET_F
-                    H5F_OBJ_GROUP_F
-                    H5F_OBJ_DATATYPE_F
-                    H5F_OBJ_ALL_F
-
-

OUTPUTS

-
  obj_count     - number of open objects
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002
-
-

HISTORY

-
  Changed the type of obj_count to INTEGER(SIZE_T)
-  September 25, 2008 EIP
-
-

SOURCE

-
  SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
-    INTEGER, INTENT(IN)  :: obj_type      ! Object type
-    INTEGER(SIZE_T), INTENT(OUT) :: obj_count
-                                          ! Number of open objects
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5fget_obj_ids_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fget_obj_ids_f
-
-

PURPOSE

-
  Get list of open objects identifiers within a file
-
-

INPUTS

-
  file_id       - file identifier
-  obj_type      - type of the object; possible values are:
-                    H5F_OBJ_FILE_F
-                    H5F_OBJ_DATASET_F
-                    H5F_OBJ_GROUP_F
-                    H5F_OBJ_DATATYPE_F
-                    H5F_OBJ_ALL_F
-
-

OUTPUTS

-
  obj_ids       - array of open object identifiers
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  num_objs      - number of open objects
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002
-
-

HISTORY

-
  Added optional parameter num_objs for number of open objects
-  of the specified type and changed type of max_obj to
-  INTEGER(SIZE_T)
-  September 25, 2008 EIP
-
-

SOURCE

-
  SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER, INTENT(IN)  :: obj_type           ! Object type
-    INTEGER(SIZE_T), INTENT(IN)  :: max_objs   ! Maximum # of objects to retrieve
-    INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids
-                                               ! Array of open objects iidentifiers
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects
-
- -
- -

h5fis_hdf5_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fis_hdf5_f
-
-

PURPOSE

-
  Determines whether a file is in the HDF5 format.
-
-

INPUTS

-
  name          - name of the file to check
-
-

OUTPUTS

-
  status        - indicates if file is and HDF5 file
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fis_hdf5_f(name, status, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    LOGICAL, INTENT(OUT) :: status         ! Indicates if file
-                                           ! is an HDF5 file
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5fmount_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fmount_f
-
-

PURPOSE

-
  Mounts a file.
-
-

INPUTS

-
  loc_id        - the identifier for of file or group in
-                  which name is defined
-  name          - the name of the group onto which the file
-                  specified by child_id is to be mounted.
-  child_id      - the identifier of the file to be mounted.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  access_prp    - the identifier of the property list to be used
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
-                                           ! in which dsetname is defined
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the
-                                           ! file to be mounted
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5fopen_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5fopen_f
-
-

PURPOSE

-
  Opens HDF5 file.
-
-

INPUTS

-
  name          - name of the file to acecss
-  access_flags  - File access flags. Allowable values are:
-                   H5F_ACC_RDWR_F
-                   H5F_ACC_RDONLY_F
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  access_prp    - file access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
-    INTEGER, INTENT(IN) :: access_flags    ! File access flags
-    INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
-                                           ! File access property list
-                                           ! identifier
-
- -
- -

h5freopen_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5freopen_f
-
-

PURPOSE

-
  Reopens HDF5 file.
-
-

INPUTS

-
  file_id       - identifier of a file for which an
-                  additional identifier is required
-
-

OUTPUTS

-
  ret_file_id   - new file identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: file_id      ! File identifier
-    INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5funmount_f

- -

[ Top ] [ H5F ] [ Subroutines ]

-

NAME

-
  h5funmount_f
-
-

PURPOSE

-
  Unmounts a file.
-
-

INPUTS

-
  loc_id        - the identifier for of file or group in
-                  which name is defined
-  name          - the name of the mount point
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5funmount_f(loc_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Identifier for file or group
-                                           ! at which the specified file
-                                           ! is to be unmounted
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the mount point
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Gf_c.html b/fortran/doc/DevelGuide/src/H5Gf_c.html deleted file mode 100644 index a71f0e8..0000000 --- a/fortran/doc/DevelGuide/src/H5Gf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Gf.c - - - - - -
-
- -

H5Gf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5G Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Gff_f90.html b/fortran/doc/DevelGuide/src/H5Gff_f90.html deleted file mode 100644 index 74ec2f4..0000000 --- a/fortran/doc/DevelGuide/src/H5Gff_f90.html +++ /dev/null @@ -1,840 +0,0 @@ - - - - - - - -./src/H5Gff.f90 - - - - - -
-
- -

H5G

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5G
-
-

FILE

-
  fortran/src/H5Gff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5G functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5gclose_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gclose_f
-
-

PURPOSE

-
  Closes the specified group.
-
-

INPUTS

-
  grp_id        - group identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gclose_f(grp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Gcreate_anon_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  H5Gcreate_anon_f
-
-

PURPOSE

-
  Creates a new empty group without linking it into the file structure.
-
-

INPUTS

-
  loc_id        - Location identifier
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  gcpl_id       - Group creation property list identifier
-  gapl_id       - Group access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

SOURCE

-
  SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
-
- -
- -

h5gcreate_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gcreate_f
-
-

PURPOSE

-
  Creates a new group.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - group name at the specified location
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  size_hint     - a parameter indicating the number of bytes to
-                  reserve for the names that will appear in the group
-  lcpl_id       - Property list for link creation
-  gcpl_id       - Property list for group creation
-  gapl_id       - Property list for group access
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-  Added additional optional paramaters in 1.8
-  MSB - February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! Group identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint
-                                           ! Parameter indicating
-                                           ! the number of bytes
-                                           ! to reserve for the
-                                           ! names that will appear
-                                           ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F
-                                           ! if using any of the optional
-                                           ! parameters lcpl_id, gcpl_id, and/or gapl_id when not
-                                           ! using keywords in specifying the optional parameters
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id  ! Property list for link creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id  ! Property list for group creation
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Property list for group access
-
- -
- -

h5gget_comment_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_comment_f
-
-

PURPOSE

-
  Retrieves comment for specified object.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object at specified location
-  size          - size of the buffer required to hold comment
-
-

OUTPUTS

-
  buffer        - buffer to hold object's comment
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
-    CHARACTER(LEN=size), INTENT(OUT) :: buffer
-                                           ! Buffer to hold a comment
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

H5Gget_create_plist_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  H5Gget_create_plist_f
-
-

PURPOSE

-
  Gets a group creation property list identifier.
-
-

INPUTS

-
  grp_id        - group identifier
-
-

OUTPUTS

-
  gcpl_id       - Group creation property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: grp_id  ! Group identifier
-    INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gget_info_by_idx_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves information about a group, according to the group’s position within an index.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  group_name    - Name of group containing group for which information is to be retrieved
-  index_type    - Index type
-  order         - Order of the count in the index
-  n             - Position in the index of the group for which information is retrieved
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  mounted       - Whether group has a file mounted on it
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

HISTORY

-
  Added 'mounted' paramater
-  M. Scot Breitenfeld
-  July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, &
-       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
-    INTEGER, INTENT(IN) :: index_type ! Index type
-    INTEGER, INTENT(IN) :: order      ! Order of the count in the index
-    INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved
-
-    INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group:
-                                         !   H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                         !   H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                         !   H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks      ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder  ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
-
- -
- -

h5gget_info_by_name_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_by_name_f
-
-

PURPOSE

-
  Retrieves information about a group.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  group_name    - Name of group containing group for which information is to be retrieved
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-  mounted       - Whether group has a file mounted on it
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

HISTORY

-
  Added 'mounted' paramater
-  M. Scot Breitenfeld
-  July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, &
-       storage_type, nlinks, max_corder, hdferr, lapl_id, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved
-
-    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
-                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          !   0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted       ! Whether group has a file mounted on it
-
- -
- -

h5gget_info_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_info_f
-
-

PURPOSE

-
  Retrieves information about a group
-
-

INPUTS

-
  group_id      - Group identifier
-
-

OUTPUTS

-
  storage_type  - Type of storage for links in group
-                    H5G_STORAGE_TYPE_COMPACT: Compact storage
-                    H5G_STORAGE_TYPE_DENSE: Indexed storage
-                    H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure
-  nlinks        - Number of links in group
-  max_corder    - Current maximum creation order value for group
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  mounted       - Whether group has a file mounted on it
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 15, 2008
-
-

NOTES

-
  In C the output is defined as a structure: H5G_info_t
-
-

HISTORY

-
  - Added 'mounted' paramater
-    M. Scot Breitenfeld
-    July 16, 2008
-
-

SOURCE

-
  SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier
-
-    INTEGER, INTENT(OUT) :: storage_type  ! Type of storage for links in group:
-                                          ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
-                                          ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
-                                          ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure
-    INTEGER, INTENT(OUT) :: nlinks        ! Number of links in group
-    INTEGER, INTENT(OUT) :: max_corder    ! Current maximum creation order value for group
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    LOGICAL, INTENT(OUT), OPTIONAL :: mounted  ! Whether group has a file mounted on it
-
- -
- -

h5gget_linkval_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_linkval_f
-
-

PURPOSE

-
  Returns the name of the object that the symbolic link
-  points to.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - symbolic link to the object whose name
-                  is to be returned.
-  size          - maximum number of characters to be returned
-
-

OUTPUTS

-
  buffer        - a buffer to hold the name of the object
-  being sought
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Maximum number of buffer
-    CHARACTER(LEN=size), INTENT(OUT) :: buffer
-                                           ! Buffer to hold a name of
-                                           ! the object symbolic link
-                                           ! points to
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gget_obj_info_idx_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gget_obj_info_idx_f
-
-

PURPOSE

-
  Returns name and type of the group member identified by
-  its index.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group at the specified location
-  idx           - object index (zero-based)
-
-

OUTPUTS

-
  obj_name      - object name
-  obj_type      - object type
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, &
-       obj_name, obj_type, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER, INTENT(IN) :: idx             ! Index of member object
-    CHARACTER(LEN=*), INTENT(OUT) :: obj_name   ! Name of the object
-    INTEGER, INTENT(OUT) :: obj_type       ! Object type
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5glink2_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5glink2_f
-
-

PURPOSE

-
  Creates a link of the specified type from new_name
-  to current_name. current_name and new_name are interpreted
-  releative to current and new location identifiers.
-
-

INPUTS

-
  cur_loc_id    - location identifier
-  cur_name      - name of the existing object if link is a
-                  hard link. Can be anything for the soft link.
-  link_type     - link type; possible values are:
-                    H5G_LINK_HARD_F (0)
-                    H5G_LINK_SOFT_F (1)
-  new_loc_id    - new location identifier
-  new_name      - new name for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 25, 2002
-
-

SOURCE

-
  SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, &
-       new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: cur_name
-                                             ! Current name of an object
-    INTEGER, INTENT(IN) :: link_type         ! link type
-                                                 ! Possible values are:
-                                                 ! H5G_LINK_HARD_F (0) or
-                                                 ! H5G_LINK_SOFT_F (1)
-
-    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5glink_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5glink_f
-
-

PURPOSE

-
  Creates a link of the specified type from new_name
-  to current_name.
-
-

INPUTS

-
  loc_id        - location identifier
-  link_type     - link type; possible values are:
-                    H5G_LINK_HARD_F (0)
-                    H5G_LINK_SOFT_F (1)
-  current_name  - name of the existing object if link is a
-                  hard link. Can be anything for the soft link
-  new_name      - new name for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5glink_f(loc_id, link_type, current_name, &
-       new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    INTEGER, INTENT(IN) :: link_type       ! link type
-                                                   ! Possible values are:
-                                                   ! H5G_LINK_HARD_F (0) or
-                                                   ! H5G_LINK_SOFT_F (1)
-
-    CHARACTER(LEN=*), INTENT(IN) :: current_name
-                                                   ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gmove2_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gmove2_f
-
-

PURPOSE

-
  Renames an object within an HDF5 file.
-
-

INPUTS

-
  src_loc_id    - original location identifier
-  src_name      - object's name at specified original location
-  dst_loc_id    - original location identifier
-  dst_name      - object's new name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 25, 2002
-
-

SOURCE

-
  SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)   :: src_loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: src_name    ! Original name of an object
-    INTEGER(HID_T), INTENT(IN)   :: dst_loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: dst_name    ! New name of an object
-    INTEGER, INTENT(OUT)         :: hdferr      ! Error code
-
- -
- -

h5gmove_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gmove_f
-
-

PURPOSE

-
  Renames an object within an HDF5 file.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - object's name at specified location
-  new_name      - object's new name
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5gn_members_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gn_members_f
-
-

PURPOSE

-
  Returns the number of group members.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group at the specified location
-
-

OUTPUTS

-
  nmembers      - number of group members
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-            INTEGER, INTENT(OUT) :: nmembers       ! Number of members in the
-                                                   ! group
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gopen_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gopen_f
-
-

PURPOSE

-
  Opens an existing group.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the group to open
-
-

OUTPUTS

-
  grp_id        - group identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  gapl_id       - Group access property list identifier
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-  Added 1.8 (optional) parameter gapl_id
-  February, 2008 M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the group
-    INTEGER(HID_T), INTENT(OUT) :: grp_id  ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id  ! Group access property list identifier
-
- -
- -

h5gset_comment_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gset_comment_f
-
-

PURPOSE

-
  Sets comment for specified object.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object
-  comment       - comment to set for the object
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Current name of an object
-    CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5gunlink_f

- -

[ Top ] [ H5G ] [ Subroutines ]

-

NAME

-
  h5gunlink_f
-
-

PURPOSE

-
  Removes the specified name from the group graph and
-  decrements the link count for the object to which name
-  points
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object to unlink
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5gunlink_f(loc_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of an object
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5If_c.html b/fortran/doc/DevelGuide/src/H5If_c.html deleted file mode 100644 index 8dccce7..0000000 --- a/fortran/doc/DevelGuide/src/H5If_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5If.c - - - - - -
-
- -

H5If

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5I Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Iff_f90.html b/fortran/doc/DevelGuide/src/H5Iff_f90.html deleted file mode 100644 index 5987581..0000000 --- a/fortran/doc/DevelGuide/src/H5Iff_f90.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - -./src/H5Iff.f90 - - - - - -
-
- -

H5I

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5I
-
-

FILE

-
  fortran/src/H5Iff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5I functions.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5idec_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5idec_ref_f
-
-

PURPOSE

-
  Decrements the reference count of an ID
-
-

INPUTS

-
  obj_id        - Object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:       - Error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iget_file_id_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_file_id_f
-
-

PURPOSE

-
  Obtains file identifier from the object identifier
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  file_id       - file identifier
-  hdferr:       - error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 23, 2004
-
-

SOURCE

-
  SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: obj_id   ! Object identifier
-    INTEGER(HID_T), INTENT(OUT) :: file_id  ! File identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5iget_name_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_name_f
-
-

PURPOSE

-
  Gets a name of an object specified by its idetifier.
-
-

INPUTS

-
  obj_id    - attribute identifier
-  buf_size  - size of a buffer to read name in
-
-

OUTPUTS

-
  buf       - buffer to read name in, name will be truncated if
-              buffer is not big enough
-  name_size - name size
-  hdferr:   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id      ! Object identifier
-    INTEGER(SIZE_T), INTENT(IN) :: buf_size   ! Buffer size
-    CHARACTER(LEN=*), INTENT(OUT) :: buf      ! Buffer to hold object name
-    INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code:
-                                              !   0 if successful,
-                                              !   -1 if fail
-
- -
- -

h5iget_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_ref_f
-
-

PURPOSE

-
  Retrieves the reference count of an ID
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:         - error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iget_type_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_type_f
-
-

PURPOSE

-
  Retrieves the type of an object.
-
-

INPUTS

-
  obj_id   - object identifier
-
-

OUTPUTS

-
  type     - type of the object, possible values:
-              H5I_FILE_F
-              H5I_GROUP_F
-              H5I_DATATYPE_F
-              H5I_DATASPACE_F
-              H5I_DATASET_F
-              H5I_ATTR_F
-              H5I_BADID_F
-  hdferr:  - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 5, 2001
-
-

SOURCE

-
  SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Object identifier
-    INTEGER, INTENT(OUT) :: TYPE ! type of an object.
-                                 ! possible values are:
-                                 !   H5I_FILE_F
-                                 !   H5I_GROUP_F
-                                 !   H5I_DATATYPE_F
-                                 !   H5I_DATASPACE_F
-                                 !   H5I_DATASET_F
-                                 !   H5I_ATTR_F
-                                 !   H5I_BADID_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5iinc_ref_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iinc_ref_f
-
-

PURPOSE

-
  Increments the reference count of an ID
-
-

INPUTS

-
  obj_id        - object identifier
-
-

OUTPUTS

-
  ref_count     - Current reference count of the ID
-  hdferr:              - error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  Quincey Koziol
-  December  9, 2003
-
-

SOURCE

-
  SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
-    INTEGER, INTENT(OUT) :: ref_count    ! Current reference count of ID
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5iis_valid_f

- -

[ Top ] [ H5I ] [ Subroutines ]

-

NAME

-
  h5iget_file_id_f
-
-

PURPOSE

-
  Check if an ID is valid without producing an error message
-
-

INPUTS

-
  id           - identifier 
-
-

OUTPUTS

-
  valid        - status of id as a valid identifier
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

SOURCE

-
  SUBROUTINE h5iis_valid_f(id, valid, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: id ! Identifier 
-    LOGICAL, INTENT(OUT) :: valid     ! Status of id as a valid identifier
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lf_c.html b/fortran/doc/DevelGuide/src/H5Lf_c.html deleted file mode 100644 index 9adb759..0000000 --- a/fortran/doc/DevelGuide/src/H5Lf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Lf.c - - - - - -
-
- -

H5Lf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5L Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html deleted file mode 100644 index 6b9640b..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_F03_f90.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - -./src/H5Lff_F03.f90 - - - - - -
-
- -

H5L (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5L_PROVISIONAL
-
-

FILE

-
  src/fortran/src/H5Lff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions.
-  It contains the same functions as H5Lff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Lff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5literate_by_name_f

- -

[ Top ] [ H5L (F03) ] [ Subroutines ]

-

NAME

-
  h5literate_by_name_f
-
-

PURPOSE

-
  Iterates through links in a group.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_type    - Type of index which determines the order
-  order         - Order within index
-  idx           - Iteration position at which to start
-  op            - Callback function passing data regarding the link to the calling application
-  op_data       - User-defined pointer to data required by the application for its processing of the link
-
-

OUTPUTS

-
  idx      - Position at which an interrupted iteration may be restarted
-  hdferr   - Error code:
-               Success:  0
-               Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lapl_id  - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, idx, op, op_data, return_value, hdferr, lapl_id)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id    ! Identifier specifying subject group
-    CHARACTER(LEN=*) :: group_name          ! Name of subject group
-    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
-                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
-                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
-    INTEGER, INTENT(IN) :: order            ! Order within index:
-                                                ! H5_ITER_INC_F - Increasing order
-                                                ! H5_ITER_DEC_F - Decreasing order
-                                                ! H5_ITER_NATIVE_F - Fastest available order
-    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
-                                            ! OUT: Position at which an interrupted iteration may be restarted
-
-    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
-    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
-
-    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
-                                         !            returns non-zero, or zero if all members were
-                                         !            processed with no operator returning non-zero.
-
-                                         ! Failure:   Negative if something goes wrong within the
-                                         !            library, or the negative value returned by one
-                                         !            of the operators.
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
-
- -
- -

h5literate_f

- -

[ Top ] [ H5L (F03) ] [ Subroutines ]

-

NAME

-
  h5literate_f
-
-

PURPOSE

-
  Iterates through links in a group.
-
-

INPUTS

-
  group_id      - Identifier specifying subject group
-  index_type    - Type of index which determines the order
-  order         - Order within index
-  idx           - Iteration position at which to start
-  op            - Callback function passing data regarding the link to the calling application
-  op_data       - User-defined pointer to data required by the application for its processing of the link
-
-

OUTPUTS

-
  idx           - Position at which an interrupted iteration may be restarted
-  hdferr        - Error code:
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  July 8, 2008
-
-

SOURCE

-
  SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: group_id  ! Identifier specifying subject group
-    INTEGER, INTENT(IN) :: index_type       ! Type of index which determines the order:
-                                                ! H5_INDEX_NAME_F - Alpha-numeric index on name
-                                                ! H5_INDEX_CRT_ORDER_F - Index on creation order
-    INTEGER, INTENT(IN) :: order            ! Order within index:
-                                                ! H5_ITER_INC_F - Increasing order
-                                                ! H5_ITER_DEC_F - Decreasing order
-                                                ! H5_ITER_NATIVE_F - Fastest available order
-    INTEGER(HSIZE_T), INTENT(INOUT) :: idx  ! IN : Iteration position at which to start
-                                            ! OUT: Position at which an interrupted iteration may be restarted
-
-    TYPE(C_FUNPTR):: op      ! Callback function passing data regarding the link to the calling application
-    TYPE(C_PTR)   :: op_data ! User-defined pointer to data required by the application for its processing of the link
-
-    INTEGER, INTENT(OUT) :: return_value ! Success:   The return value of the first operator that
-                                         !            returns non-zero, or zero if all members were
-                                         !            processed with no operator returning non-zero.
-
-                                         ! Failure:   Negative if something goes wrong within the
-                                         !            library, or the negative value returned by one
-                                         !            of the operators.
-
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html deleted file mode 100644 index 6d1a9bb..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_F90_f90.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -./src/H5Lff_F90.f90 - - - - - -
-
- -

H5L (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5L_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5L functions. It contains
-  the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Lff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
- NOTE
-  Currently contains no functions.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Lff_f90.html b/fortran/doc/DevelGuide/src/H5Lff_f90.html deleted file mode 100644 index 1a209f2..0000000 --- a/fortran/doc/DevelGuide/src/H5Lff_f90.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - - -./src/H5Lff.f90 - - - - - -
-
- -

H5L

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5L
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5L functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5lcopy_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lcopy_f
-
-

PURPOSE

-
  Copies a link from one location to another.
-
-

INPUTS

-
  src_loc_id    - Location identifier of the source link
-  src_name      - Name of the link to be copied
-  dest_loc_id   - Location identifier specifying the destination of the copy
-  dest_name     - Name to be assigned to the NEW copy
-  loc_id        - Identifier of the file or group containing the object
-  name          - Name of the link to delete
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier
-  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, &
-       lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Location identifier of the source link
-    CHARACTER(LEN=*), INTENT(IN) :: src_name   ! Name of the link to be copied
-    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy
-    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Lcreate_external_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_external_f
-
-

PURPOSE

-
  Creates a soft link to an object in a different file.
-
-

INPUTS

-
  file_name     - Name of the file containing the target object. Neither the file nor the target object is
-  required to exist. May be the file the link is being created in.
-  obj_name      - Path within the target file to the target object.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither
-                                              ! the file nor the target object is required to exist.
-                                              ! May be the file the link is being created in.
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
-
- -
- -

H5Lcreate_hard_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_hard_f
-
-

PURPOSE

-
  Creates a hard link to an object.
-
-

INPUTS

-
  obj_loc_id    - The file or group identifier for the target object.
-  obj_name      - Name of the target object, which must already exist.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 27, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_loc_id  ! The file or group identifier for the target object.
-    CHARACTER(LEN=*), INTENT(IN) :: obj_name  ! Name of the target object, which must already exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link.
-
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lcpl_id         ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lapl_id         ! Link access property list identifier.
-
- -
- -

H5Lcreate_soft_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lcreate_soft_f
-
-

PURPOSE

-
  Creates a soft link to an object.
-
-

INPUTS

-
  target_path   - Path to the target object, which is not required to exist.
-  link_loc_id   - The file or group identifier for the new link.
-  link_name     - The name of the new link.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 20, 2008
-
-

SOURCE

-
  SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: target_path   ! Path to the target object, which is not required to exist.
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id     ! The file or group identifier for the new link.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name     ! The name of the new link.
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code:
-                                                  !   0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier.
-
- -
- -

h5ldelete_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5ldelete_by_idx_f
-
-

PURPOSE

-
  Removes the nth link in a group.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Type of index; Possible values are:
-                    H5_INDEX_UNKNOWN_F = -1  - Unknown index type
-                    H5_INDEX_NAME_F          - Index on names
-                    H5_INDEX_CRT_ORDER_F     - Index on creation order
-                    H5_INDEX_N_F             - Number of indices defined
-
-  order         - Order within field or index; Possible values are:
-                    H5_ITER_UNKNOWN_F   - Unknown order
-                    H5_ITER_INC_F       - Increasing order
-                    H5_ITER_DEC_F       - Decreasing order
-                    H5_ITER_NATIVE_F    - No particular order, whatever is fastest
-                    H5_ITER_N_F         - Number of iteration orders
-
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! Identifer for object to which attribute is attached
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location,
-                                               !  from which attribute is to be removed
-    INTEGER, INTENT(IN) :: index_field         ! Type of index; Possible values are:
-                                               !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                               !    H5_INDEX_NAME_F      - Index on names
-                                               !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                               !    H5_INDEX_N_F              - Number of indices defined
-    INTEGER, INTENT(IN) :: order               ! Order in which to iterate over index; Possible values are:
-                                               !    H5_ITER_UNKNOWN_F  - Unknown order
-                                               !    H5_ITER_INC_F      - Increasing order
-                                               !    H5_ITER_DEC_F      - Decreasing order
-                                               !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-                                               !    H5_ITER_N_F     - Number of iteration orders
-    INTEGER(HSIZE_T), INTENT(IN) :: n      ! Offset within index
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code:
-                                           ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id     ! Link access property list
-
- -
- -

h5ldelete_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5ldelete_f
-
-

PURPOSE

-
  Removes a link from a group.
-
-

INPUTS

-
  loc_id        - Identifier of the file or group containing the object
-  name          - Name of the link to delete
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group containing the object
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of the link to delete
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-
- -
- -

H5Lexists_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  H5Lexists_f
-
-

PURPOSE

-
  Check if a link with a particular name exists in a group.
-
-

INPUTS

-
  loc_id        - Identifier of the file or group to query.
-  name          - Link name to check
-
-

OUTPUTS

-
  link_exists   - link exists status (.TRUE.,.FALSE.)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! Identifier of the file or group to query.
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Link name to check.
-    LOGICAL, INTENT(OUT) :: link_exists   ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id
-                                          ! Link access property list identifier.
-
- -
- -

h5lget_info_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_info_by_idx_f
-
-

PURPOSE

-
  Retrieves metadata for a link in a group, according to the order within a field or index.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Index or field which determines the order
-  order         - Order within field or index
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
            NOTE: In C these are defined as a structure: H5L_info_t
-  corder_valid  - Indicates whether the creation order data is valid for this attribute
-  corder        - Is a positive integer containing the creation order of the attribute
-  cset          - Indicates the character set used for the attribute’s name 
- address        - If the link is a hard link, address specifies the file address that the link points to
- val_size       - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                  the length of the name of the pointed-to object with a null terminator.
- hdferr         - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

HISTORY

-
   Changed the link_type names to match those in C (bug 1720) from,
-   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
-   to
-   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
-   MSB January 8, 2010.  
-
-

SOURCE

-
  SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
-       link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group  
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
-    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
-                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                        !    H5_INDEX_NAME_F      - Index on names
-                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                        !    H5_INDEX_N_F             - Number of indices defined
-    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
-                                        !    H5_ITER_UNKNOWN_F  - Unknown order
-                                        !    H5_ITER_INC_F      - Increasing order
-                                        !    H5_ITER_DEC_F      - Decreasing order
-                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
-    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
-                                      !  H5L_TYPE_HARD_F      - Hard link
-                                      !  H5L_TYPE_SOFT_F      - Soft link
-                                      !  H5L_TYPE_EXTERNAL_F  - External link
-                                      !  H5L_TYPE_ERROR _F    - Error
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute 
-    INTEGER, INTENT(OUT) :: corder         ! Is a positive integer containing the creation order of the attribute
-    INTEGER, INTENT(OUT) :: cset           ! Indicates the character set used for the attributeâs name
-    INTEGER(HADDR_T), INTENT(OUT) :: address  ! If the link is a hard link, address specifies the file address that the link points to
-    INTEGER(SIZE_T), INTENT(OUT) :: val_size  ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                                              ! the length of the name of the pointed-to object with a null terminator. 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5lget_info_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_info_f
-
-

PURPOSE

-
  Returns information about a link.
-
-

INPUTS

-
  link_loc_id   - File or group identifier.
-  link_name     - Name of the link for which information is being sought
-
-

OUTPUTS

-
            NOTE: In C these are contained in the structure H5L_info_t
-
-  cset          - indicates the character set used for link’s name.
-  corder        - specifies the link’s creation order position.
-  corder_valid  - indicates whether the value in corder is valid.
-  link_type     - specifies the link class:
-                    H5L_TYPE_HARD_F     - Hard link
-                    H5L_TYPE_SOFT_F     - Soft link
-                    H5L_TYPE_EXTERNAL_F - External link
-                    H5L_TYPE_ERROR_ F   - Error
-  address       - If the link is a hard link, address specifies the file address that the link points to
-  val_size      - If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                  the length of the name of the pointed-to object with a null terminator. 
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Link access property list
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

HISTORY

-
   Changed the link_type names to match those in C (bug 1720) from,
-   H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
-   to
-   H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
-   MSB January 8, 2010.
-
-

SOURCE

-
  SUBROUTINE h5lget_info_f(link_loc_id, link_name, &
-       cset, corder, f_corder_valid, link_type, address, val_size, &
-       hdferr, lapl_id)
-    IMPLICIT NONE
-
-    INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought
-
-! OUTPUTS  NOTE: In C these are contained in the structure H5L_info_t
-    INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the linkâs name.
-    INTEGER, INTENT(OUT) :: corder ! Specifies the linkâs creation order position.
-    LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid.
-    INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
-                                      !  H5L_TYPE_HARD_F      - Hard link
-                                      !  H5L_TYPE_SOFT_F      - Soft link
-                                      !  H5L_TYPE_EXTERNAL_F  - External link
-                                      !  H5L_TYPE_ERROR _F    - Error
-    INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
-    INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., 
-                                             ! the length of the name of the pointed-to object with a null terminator. 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Link access property list
-
- -
- -

h5lget_name_by_idx_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lget_name_by_idx_f
-
-

PURPOSE

-
  Retrieves name of the nth link in a group, according to the order within a specified field or index.
-
-

INPUTS

-
  loc_id        - File or group identifier specifying location of subject group
-  group_name    - Name of subject group
-  index_field   - Index or field which determines the order
-  order         - Order within field or index
-  n             - Link for which to retrieve information
-
-

OUTPUTS

-
  name          - Buffer in which link value is returned
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - List access property list identifier.
-  size          - Maximum number of characters of link value to be returned.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 10, 2008
-
-

SOURCE

-
  SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, &
-        name, hdferr, size, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id       ! File or group identifier specifying location of subject group
-    CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group
-    INTEGER, INTENT(IN) :: index_field  ! Index or field which determines the order
-                                        !    H5_INDEX_UNKNOWN_F   - Unknown index type
-                                        !    H5_INDEX_NAME_F      - Index on names
-                                        !    H5_INDEX_CRT_ORDER_F - Index on creation order
-                                        !    H5_INDEX_N_F             - Number of indices defined
-    INTEGER, INTENT(IN) :: order        ! Order in which to iterate over index; Possible values are:
-                                        !    H5_ITER_UNKNOWN_F  - Unknown order
-                                        !    H5_ITER_INC_F      - Increasing order
-                                        !    H5_ITER_DEC_F      - Decreasing order
-                                        !    H5_ITER_NATIVE_F   - No particular order, whatever is fastest
-    INTEGER(HSIZE_T), INTENT(IN) :: n   ! Attributeâs position in index
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5lis_registered_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lis_registered_f
-
-

PURPOSE

-
  Determines whether a class of user-defined links is registered.
-
-

INPUTS

-
  link_cls_id   - User-defined link class identifier
-
-

OUTPUTS

-
  registered    - .TRUE.  - if the link class has been registered
-                  .FALSE. - if it is unregistered
-  hdferr        - Error code
-  Success:  0
-  Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 29, 2008
-
-

SOURCE

-
  SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: link_cls_id  ! User-defined link class identifier
-    LOGICAL, INTENT(OUT) :: registered  ! .TRUE. - if the link class has been registered and
-                                        ! .FALSE. - if it is unregistered
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code:
-                                        ! 0 on success and -1 on failure
-
- -
- -

h5lmove_f

- -

[ Top ] [ H5L ] [ Subroutines ]

-

NAME

-
  h5lmove_f
-
-

PURPOSE

-
  Renames a link within an HDF5 file.
-
-

INPUTS

-
  src_loc_id    - Original file or group identifier.
-  src_name      - Original link name.
-  dest_loc_id   - Destination file or group identifier.
-  dest_name     - NEW link name.
-
-

OUTPUTS

-
  hdferr        - Error code:
-                   0 on success and -1 on failure
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier to be associated WITH the NEW link.
-  lapl_id       - Link access property list identifier to be associated WITH the NEW link.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_loc_id  ! Original file or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: src_name  ! Original link name.
-    INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier.
-    CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
-                                              ! 0 on success and -1 on failure
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier
-                                                    ! to be associated WITH the NEW link.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier
-                                                    ! to be associated WITH the NEW link.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Of_c.html b/fortran/doc/DevelGuide/src/H5Of_c.html deleted file mode 100644 index e4a97e9..0000000 --- a/fortran/doc/DevelGuide/src/H5Of_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Of.c - - - - - -
-
- -

H5Of

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5O Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Off_f90.html b/fortran/doc/DevelGuide/src/H5Off_f90.html deleted file mode 100644 index 790810e..0000000 --- a/fortran/doc/DevelGuide/src/H5Off_f90.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -./src/H5Off.f90 - - - - - -
-
- -

H5O

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5O
-
-

FILE

-
  fortran/src/H5Off.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5O functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5oclose_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oclose_f
-
-

PURPOSE

-
  Closes an object in an HDF5 file.
-
-

INPUTS

-
  object_id     - Object identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  December 17, 2008
-
-

SOURCE

-
  SUBROUTINE h5oclose_f(object_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN)  :: object_id
-    INTEGER,        INTENT(OUT) :: hdferr
-
- -
- -

h5olink_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5olink_f
-
-

PURPOSE

-
  Creates a hard link to an object in an HDF5 file.
-
-

INPUTS

-
  object_id     - Object to be linked.
-  new_loc_id    - File or group identifier specifying location at which object is to be linked.
-  new_link_name - Name of link to be created, relative to new_loc_id.
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list identifier.
-  lapl_id       - Link access property list identifier.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: object_id  ! Object to be linked
-    INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier specifying
-                                             ! location at which object is to be linked.
-    CHARACTER(LEN=*), INTENT(IN) :: new_link_name ! Name of link to be created, relative to new_loc_id.
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          !   Success:  0
-                                          !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier.
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link creation property list identifier.
-
- -
- -

h5oopen_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oopen_f
-
-

PURPOSE

-
  Opens an object in an HDF5 file by location identifier and path name.
-
-

INPUTS

-
  loc_id        - File or group identifier
-  name          - Path to the object, relative to loc_id.
-
-

OUTPUTS

-
  obj_id        - Object identifier for the opened object
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  lapl_id       - Access property list identifier for the link pointing to the object
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Path to the object, relative to loc_id
-    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          !   Success:  0
-                                          !   Failure: -1
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id  ! Attribute access property list
-
- -
- -

h5open_by_addr_f

- -

[ Top ] [ H5O ] [ Subroutines ]

-

NAME

-
  h5oopen_by_addr_f 
-
-

PURPOSE

-
  Opens an object using its address within an HDF5 file. 
-
-

INPUTS

-
    loc_id - File or group identifier
-    addr   - Object’s address in the file
- OUTPUTS: 
-    obj_id - Object identifier for the opened object
-    hdferr - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  September 14, 2009
-
-

SOURCE

-
  SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    INTEGER(HADDR_T), INTENT(IN) :: addr  ! Objectâs address in the file
-    INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier for the opened object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code:
-                                          ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pf_c.html b/fortran/doc/DevelGuide/src/H5Pf_c.html deleted file mode 100644 index 6b8079a..0000000 --- a/fortran/doc/DevelGuide/src/H5Pf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Pf.c - - - - - -
-
- -

H5Pf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5P Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html deleted file mode 100644 index 51882ba..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_F03_f90.html +++ /dev/null @@ -1,832 +0,0 @@ - - - - - - - -./src/H5Pff_F03.f90 - - - - - -
-
- -

H5P (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions.
-  It contains the same functions as H5Pff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Pff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_double
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pcreate_class_f

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pcreate_class_f
-
-

PURPOSE

-
  Create a new property list class
-
-

INPUTS

-
  parent        - Property list identifier of the parent class
-                  Possible values include:
-                   H5P_ROOT_F
-                   H5P_FILE_CREATE_F
-                   H5P_FILE_ACCESS_F
-                   H5P_DATASET_CREATE_F
-                   H5P_DATASET_XFER_F
-                   H5P_FILE_MOUNT_F
-  name          - name of the class we are creating
-
-

OUTPUTS

-
  class         - porperty list class identifier
-  hdferr:       - error code
-
-  Success: 0
-  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  H5P_cls_create_func_t (create) - Callback routine called when a property list is created
-  create_data                    - User pointer to any class creation information needed
-  H5P_cls_copy_func_t   (copy)   - Callback routine called when a property list is copied
-  copy_data                      - User pointer to any class copy information needed
-  H5P_cls_close_func_t  (close)  - Callback routine called when a property list is being closed
-  close_data                     - User pointer to any class close information needed
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

HISTORY

-
  Added callback arguments
-  M. Scot Breitenfeld, July 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
-    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-    TYPE(C_PTR), OPTIONAL :: create_data, copy_data, close_data
-    TYPE(C_FUNPTR), OPTIONAL :: create, copy, close
-
- -
- -

h5pget_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_char
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
-    CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pget_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_integer
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    INTEGER,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pget_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pget_real
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
-    REAL,   INTENT(OUT), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pinsert_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_char
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pinsert_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_double
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    DOUBLE PRECISION, INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_integer
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pinsert_ptr

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_ptr
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size  ! Size of property value
-    TYPE(c_ptr),   INTENT(IN) :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pinsert_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pinsert_real
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
-    USE iso_c_binding
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    REAL,   INTENT(IN), TARGET :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_char
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_double
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class  ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size  ! size of the property value
-    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5pregister_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_integer
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class    ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Size of the property value
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pregister_ptr

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_ptr
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    TYPE(C_PTR), INTENT(IN) :: value      ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pregister_real
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
-    USE ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
-    REAL,   INTENT(IN), TARGET :: value   ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset(get)fill_value_f

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset(get)fill_value_f
-
-

PURPOSE

-
  Sets(gets) fill value for a dataset creation property list
-
-

INPUTS

-
  prp_id        - dataset creation property list identifier
-  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-
-

OUTPUTS

-
  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-  Added the recommended way of passing fillvalue
-  and that is by passing the C address, all other
-  ways are obsolete and should be avoided. June, 2008 MSB
-
-

NOTES

-
  h5pset(get)fill_value_f function is overloaded to support
-  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
-                                          ! of fillvalue datatype
-                                          ! (in memory)
-    INTEGER, INTENT(IN), TARGET :: fillvalue   ! Fillvalue
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5pset_char

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_char
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_double

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_double
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr                  ! Error code
-
- -
- -

h5pset_integer

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_integer
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of property to modify
-    INTEGER,   INTENT(IN), TARGET :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5pset_real

- -

[ Top ] [ H5P (F03) ] [ Subroutines ]

-

NAME

-
  h5pset_real
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify
-    REAL,   INTENT(IN), TARGET :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html deleted file mode 100644 index 5f8d579..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_F90_f90.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - -./src/H5Pff_F90.f90 - - - - - -
-
- -

H5P (_F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5P functions. It contains
-  the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Pff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pcreate_class_f

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pcreate_class_f
-
-

PURPOSE

-
  Create a new property list class
-
-

INPUTS

-
  parent        - Property list identifier of the parent class
-                  Possible values include:
-                    H5P_ROOT_F
-                    H5P_FILE_CREATE_F
-                    H5P_FILE_ACCESS_F
-                    H5P_DATASET_CREATE_F
-                    H5P_DATASET_XFER_F
-                    H5P_FILE_MOUNT_F
-  name          - name of the class we are creating
-
-

OUTPUTS

-
  class         - property list class identifier
-  hdferr        - error code
-                   Success: 0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: parent  ! parent property list class
-                                          ! identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! name of property tocreate
-    INTEGER(HID_T), INTENT(OUT) :: class  ! property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pget_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_char
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pget_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_double
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_double(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(OUT) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pget_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_integer
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_integer(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    INTEGER,   INTENT(OUT) :: value       ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pget_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pget_real
-
-

PURPOSE

-
  Gets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-
-

OUTPUTS

-
  value         - value of property
-  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pget_real(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    REAL,   INTENT(OUT) :: value          ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_char
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist      ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value  ! Property value
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-
- -
- -

h5pinsert_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_double
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    DOUBLE PRECISION, INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_integer
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    INTEGER,   INTENT(IN) :: value        ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pinsert_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pinsert_real
-
-

PURPOSE

-
  Registers a temporary property with a property list class.
-
-

INPUTS

-
  plist         - property list identifier
-                  permanent property within
-  name          - name of property to insert
-  size          - size of property in bytes
-  value         - initial value for the property
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to insert
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    REAL,   INTENT(IN) :: value           ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_char
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! size of the property value
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_double
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_double(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class     ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size     ! Size of the property value
-    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pregister_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_integer
-
-

PURPOSE

-
  Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_integer(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! Size of the property value
-    INTEGER,   INTENT(IN) :: value        ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pregister_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pregister_real
-
- PURPOSE       Registers a permanent property with a property list class.
-
-

INPUTS

-
  class         - property list class to register
-                  permanent property within
-  name          - name of property to register
-  size          - size of property in bytes
-  value         - default value for property in newly
-                  created property lists
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 10, 2002
-
-

SOURCE

-
  SUBROUTINE h5pregister_real(class, name, size, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! Property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to register
-    INTEGER(SIZE_T), INTENT(IN) :: size   ! size of the property value
-    REAL,   INTENT(IN) :: value           ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset(get)fill_value_f

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset(get)fill_value_f
-
-

PURPOSE

-
  Sets(gets) fill value for a dataset creation property list
-
-

INPUTS

-
  prp_id        - dataset creation property list identifier
-  type_id       - datatype identifier for fill value
-  fillvalue     - fill value
-
-

OUTPUTS

-
  type_id      - datatype identifier for fill value
-  fillvalue    - fill value
-  hdferr       - error code
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-

NOTES

-
  h5pset(get)fill_value_f function is overloaded to support
-  INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes.
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
-                                          ! of fillvalue datatype
-                                          ! (in memory)
-    INTEGER, INTENT(IN) :: fillvalue      ! Fillvalue
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_char

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_char
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr        - error code
-                   Success:  0
-                   Failure: -1
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    CHARACTER(LEN=*),   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_double

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_double
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_double(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name    ! Name of property to modify
-    DOUBLE PRECISION,   INTENT(IN) :: value ! Property value
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5pset_integer

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_integer
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_integer(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    INTEGER, INTENT(IN) :: value          ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5pset_real

- -

[ Top ] [ H5P (F90) ] [ Subroutines ]

-

NAME

-
  h5pset_real
-
-

PURPOSE

-
  Sets a property list value
-
-

INPUTS

-
  prp_id        - iproperty list identifier to modify
-  name          - name of property to modify
-  value         - value to set property to
-
-

OUTPUTS

-
  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002
-
-

SOURCE

-
  SUBROUTINE h5pset_real(prp_id, name, value, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    REAL, INTENT(IN) :: value             ! Property value
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Pff_f90.html b/fortran/doc/DevelGuide/src/H5Pff_f90.html deleted file mode 100644 index 0e9ff5c..0000000 --- a/fortran/doc/DevelGuide/src/H5Pff_f90.html +++ /dev/null @@ -1,4752 +0,0 @@ - - - - - - - -./src/H5Pff.f90 - - - - - -
-
- -

H5P (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  H5P_PROVISIONAL
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5P functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5pget_hyper_vector_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_hyper_vector_size_f 
-
-

PURPOSE

-
  Get the number of "I/O" vectors (vector size)
-
-

INPUTS

-
  plist_id     - dataset transfer property list identifier
-
-

OUTPUTS

-
  size         - vector size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Vector size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_family_offset_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_family_offset_f 
-
-

PURPOSE

-
  Sets offset for family file driver.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  offset       - file offset
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  19 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_family_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_family_f 
-
-

PURPOSE

-
  Sets the file access property list to use the family driver. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  memb_size    - size in bytes of each file member 
-  memb_plist   - identifier of the file access property 
-                 list to be used for each family member
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes,
-                                              ! of each family member
-    INTEGER(HID_T), INTENT(IN) :: memb_plist  ! Identifier of the file 
-                                              ! access property list for 
-                                              ! each member of the family
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_meta_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_meta_block_size_f 
-
-

PURPOSE

-
  Sets the minimum size of metadata block allocations 
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - metatdata block size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size    ! Block size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pall_filters_avail_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pall_filters_avail_f 
-
-

PURPOSE

-
  Checks if all filters set in the dataset creation
-  property list are available
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-
-

OUTPUTS

-
  flag         - .TRUE. if all filters are available
-                 .FALSE. otherwise
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
-                                         !  list identifier 
-    LOGICAL, INTENT(OUT) :: flag         ! .TRUE. if all filters are available
-                                         ! .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pclose_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pclose_class_f 
-
-

PURPOSE

-
  Closes an existing property list class.
-
-

INPUTS

-
  class        - Property list class identifier
-
-

OUTPUTS

-
  hdferr       - error code         
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pclose_class_f(class, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-                                        ! 0 on success and -1 on failure
-
- -
- -

h5pclose_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pclose_f 
-
-

PURPOSE

-
  Terminates access to a property list. 
-
-

INPUTS

-
  prp_id - identifier of the property list to 
-           terminate access to. 
-
-

OUTPUTS

-
  hdferr - error code          
-           Success:  0
-           Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pclose_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pcopy_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pcopy_f 
-
-

PURPOSE

-
  Copies an existing property list to create a new 
-  property list
-
-

INPUTS

-
  prp_id       - property list identifier
-
-

OUTPUTS

-
  new_prp_id   - new property list identifier
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
-
-

SOURCE

-
  SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pcopy_prop_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pcopy_prop_f 
-
-

PURPOSE

-
  Copies a property from one list or class to another.
-
-

INPUTS

-
  dst_id               - Identifier of the destination property list
-  src_id               - Identifier of the source property list 
-  name                 - name of the property to copy
-
-

OUTPUTS

-
  hdferr:              - error code
-                          Success: 0 
-                          Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dst_id  ! Destination property list 
-                                          ! identifier 
-    INTEGER(HID_T), INTENT(IN) :: src_id  ! Source property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Property name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pcreate_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pcreate_f 
-
-

PURPOSE

-
       Creates a new property as an instance of a property 
-       list class.
-
-

INPUTS

-
  class  - type of the property class to be created.
-           Possible values are:
-             H5P_FILE_CREATE_F
-             H5P_FILE_ACCESS_F
-             H5P_DATASET_CREATE_F
-             H5P_DATASET_XFER_F
-             H5P_FILE_MOUNT_F
-
-

OUTPUTS

-
  prp_id - property list identifier
-  hdferr - error code          
-            Success:  0
-            Failure: -1 
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pcreate_f(class, prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class   ! The type of the property list 
-                                          ! to be created. Possible values are: 
-                                          !  H5P_FILE_CREATE_F
-                                          !  H5P_FILE_ACCESS_F
-                                          !  H5P_DATASET_CREATE_F
-                                          !  H5P_DATASET_XFER_F
-                                          !  H5P_FILE_MOUNT_F
-    INTEGER(HID_T), INTENT(OUT) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pequal_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pequal_f 
-
-

PURPOSE

-
  Checks if two property lists are eqaul
-
-

INPUTS

-
  plist1_id    - property list identifier
-  plist2_id    - property list identifier
-
-

OUTPUTS

-
  flag         - flag, possible values
-                   .TRUE. or .FALSE.
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1, flag is set to .FALSE.   
-
-

AUTHOR

-
  Elena Pourmal
-  September 30, 2002   
-
-

SOURCE

-
  SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier 
-    INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier 
-    LOGICAL, INTENT(OUT)       :: flag      ! Flag
-    INTEGER, INTENT(OUT)       :: hdferr    ! Error code
-                                            !  0 on success and -1 on failure
-
- -
- -

h5pexist_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pexist_f 
-
-

PURPOSE

-
  Queries whether a property name exists in a property list or class. 
-
-

INPUTS

-
  prp_id       - property list identifier to query
-  name         - name of property to check for
-
-

OUTPUTS

-
  flag         - logical flag
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to modify
-    LOGICAL, INTENT(OUT) :: flag          ! .TRUE. if exists, .FALSE. otherwise
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pfill_value_defined_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pfill_value_defined_f
-
-

PURPOSE

-
  Check if fill value is defined.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  flag         - fill value status flag
-                 Possible values are:
-                   H5D_FILL_VALUE_ERROR_F
-                   H5D_FILL_VALUE_UNDEFINED_F
-                   H5D_FILL_VALUE_DEFAULT_F
-                   H5D_FILL_VALUE_USER_DEFINED_F
-  hdferr       - error code            
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002
-
-

SOURCE

-
  SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag            ! Fill value status flag
-                                            !  H5D_FILL_VALUE_ERROR_F
-                                            !  H5D_FILL_VALUE_UNDEFINED_F
-                                            !  H5D_FILL_VALUE_DEFAULT_F
-                                            !  H5D_FILL_VALUE_USER_DEFINED_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_alignment_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_alignment_f 
-
-

PURPOSE

-
  Retrieves the current settings for alignment 
-  properties from a file access property list. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  threshold    - threshold value       
-  alignment    - alignment value
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_alignment_f(prp_id, threshold,  alignment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value
-    INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pget_alloc_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_alloc_time_f
-
-

PURPOSE

-
  Get space allocation time for dataset during creation.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  flag         - allocation time flag:
-                   H5D_ALLOC_TIME_ERROR_F
-                   H5D_ALLOC_TIME_DEFAULT_F
-                   H5D_ALLOC_TIME_EARLY_F
-                   H5D_ALLOC_TIME_LATE_F
-                   H5D_ALLOC_TIME_INCR_F
-  hdferr:      - error code            
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag   ! Allocation time flag:
-                                   !  H5D_ALLOC_TIME_ERROR_F
-                                   !  H5D_ALLOC_TIME_DEFAULT_F
-                                   !  H5D_ALLOC_TIME_EARLY_F
-                                   !  H5D_ALLOC_TIME_LATE_F
-                                   !  H5D_ALLOC_TIME_INCR_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

H5Pget_attr_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_attr_creation_order_f
-
-

PURPOSE

-
  Retrieves tracking and indexing settings for attribute creation order
-
-

INPUTS

-
  ocpl_id         - Object (group or dataset) creation property list identifier
-
-

OUTPUTS

-
  crt_order_flags - Flags specifying whether to track and index attribute creation order
-  hdferr          - Error code         
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (group or dataset) creation property list identifier 
-    INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order 
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

H5Pget_attr_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_attr_phase_change_f 
-
-

PURPOSE

-
  Retrieves attribute storage phase change thresholds 
-
-

INPUTS

-
  ocpl_id         - Object (dataset or group) creation property list identifier
-
-

OUTPUTS

-
  max_compact     - Maximum number of attributes to be stored in compact storage
-                    (Default: 8)
-  min_dense       - Minimum number of attributes to be stored in dense storage
-                    (Default: 6)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
-                                          ! (Default: 8)
-    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
-                                          ! (Default: 6)
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_btree_ratios_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_btree_ratios_f
-
-

PURPOSE

-
  Gets B-tree split ratios for a dataset transfer property list
-
-

INPUTS

-
  prp_id       - the dataset transfer property list 
-                 identifier 
-
-

OUTPUTS

-
  left         - the B-tree split ratio for left-most nodes 
-  middle       - the B-tree split ratio for all other nodes
-  right        - the B-tree split ratio for right-most nodes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    REAL, INTENT(OUT) :: left   ! The B-tree split ratio for left-most nodes.
-    REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes 
-    REAL, INTENT(OUT) :: right  ! The B-tree split ratio for right-most 
-                                !  nodes and lone nodes.
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pget_buffer_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_buffer_f 
-
-

PURPOSE

-
  Gets size for conversion buffer
-
-

INPUTS

-
  plist_id     - data transfer property list identifier
-
-

OUTPUTS

-
  size         - buffer size 
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 2, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size  ! Buffer size in bytes; 
-                                           !  buffer is allocated and freed by 
-                                           !  the library.
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_cache_f 
-
-

PURPOSE

-
  Queries the meta data cache and raw data chunk cache 
-  parameters.  
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  mdc_nelmts   - number of elements (objects) in the meta 
-                 data cache 
-  rdcc_nelmts  - number of elements (objects) in the raw 
-                 data chunk cache 
-  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
-  rdcc_w0      - preemption policy (0 or 1)
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-  Bug fix: type of the rdcc_nelmts parameter should be INTEGER
-  instead of INTEGER(SIZE_T) October 10, 2003 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: mdc_nelmts   ! Number of elements (objects)
-                                         !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts  ! Number of elements (objects)
-                                                 !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes  ! Total size of the raw data 
-                                                 !  chunk cache, in bytes 
-    REAL, INTENT(OUT) :: rdcc_w0                 ! Preemption policy
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

H5Pget_char_encoding_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_char_encoding_f
-
-

PURPOSE

-
  Retrieves the character encoding used to create a string
-
-

INPUTS

-
  plist_id - Property list identifier
-
-

OUTPUTS

-
  encoding - Valid values for encoding are:
-               H5T_CSET_ASCII_F -> US ASCII
-               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
-  hdferr   - Error code                
-               Success:  0
-               Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE  h5pget_char_encoding_f(plist_id, encoding, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
-
-    INTEGER, INTENT(OUT) :: encoding       ! Valid values for encoding are:
-                                           !  H5T_CSET_ASCII_F -> US ASCII
-                                           !  H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

H5Pget_chunk_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_chunk_cache_f
-
-

PURPOSE

-
  Retrieves the maximum possible number of elements in the meta
-  data cache and the maximum possible number of elements and
-  bytes and the RDCC_W0 value in the raw data chunk cache.  Any
-  (or all) arguments may be null pointers in which case the
-  corresponding datum is not returned.  If these properties have
-  not been set on this property list, the default values for a
-  file access property list are returned.
-
-

INPUTS

-
  dapl_id            - Dataset access property list identifier.
-
-

OUTPUTS

-
  rdcc_nslots        - Number of chunk slots in the raw data chunk cache hash table. 
-  rdcc_nbytes        - Total size of the raw data chunk cache, in bytes. 
-  rdcc_w0            - Preemption policy. 
-  hdferr             - Error code              
-                        Success:  0
-                        Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dapl_id       ! Dataset access property list identifier.
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table.
-    INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. 
-    REAL, INTENT(OUT) :: rdcc_w0                ! Preemption policy.
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code:
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_chunk_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_chunk_f 
-
-

PURPOSE

-
  Retrieves the size of chunks for the raw data of a 
-  chunked layout dataset
-
-

INPUTS

-
  prp_id       - property list identifier
-  ndims        - size of dims array
-
-

OUTPUTS

-
  dims         - array with dimension sizes for each chunk
-  hdferr       - error code            
-                  Success:  number of chunk dimensions
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions to
-                                         ! to return
-    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims    
-                                         ! Array containing sizes of
-                                         ! chunk dimensions
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         !  number of chunk dimensions on success,
-                                         !  -1 on failure
-
- -
- -

h5pget_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_f 
-
-

PURPOSE

-
  Returns the property list class for a property list.
-
-

INPUTS

-
  prp_id       - property list identifier
-
-

OUTPUTS

-
  classtype    - property list class
-                 Possible values are:
-                  H5P_ROOT_F
-                  H5P_FILE_CREATE_F
-                  H5P_FILE_ACCESS_F
-                  H5PE_DATASET_CREATE_F
-                  H5P_DATASET_XFER_F
-                  H5P_FILE_MOUNT_F
-  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1 
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: classtype    ! The type of the property list 
-                                         ! to be created. Possible values are: 
-                                         !  H5P_ROOT_F
-                                         !  H5P_FILE_CREATE_F
-                                         !  H5P_FILE_ACCESS_F
-                                         !  H5PE_DATASET_CREATE_F 
-                                         !  H5P_DATASET_XFER_F
-                                         !  H5P_FILE_MOUNT_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_class_name_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_name_f 
-
-

PURPOSE

-
  Queries the name of a class.
-
-

INPUTS

-
  prp_id       - property list identifier to query
-
-

OUTPUTS

-
  name         - name of a class
-  size         - Actual length of the class name
-                   NOTE: If provided buffer "name" is smaller,
-                   than name will be truncated to fit into
-                   provided user buffer
-  hdferr:      - error code
-                  Success: 0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

HISTORY

-
 Returned the size of name as an argument      
-
-

SOURCE

-
  SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name
-    INTEGER, INTENT(OUT) :: size          ! Actual length of the class name
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_class_parent_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_class_parent_f 
-
-

PURPOSE

-
  Retrieves the parent class of a genric property class. 
-
-

INPUTS

-
  prp_id       - property list identifier to query
-
-

OUTPUTS

-
  parent_id    - identifier of the parent class
-  hdferr:      - error code          
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list 
-                                             ! identifier 
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pget_copy_object_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_copy_object_f 
-
-

PURPOSE

-
  Retrieves the properties to be used when an object is copied.
-
-

INPUTS

-
  ocp_plist_id - Object copy property list identifier
-
-

OUTPUTS

-
  copy_options - Copy option(s) to be get
-  hdferr       - Error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
-    INTEGER, INTENT(OUT) :: copy_options       ! Valid copy options returned are:
-                                               !   H5O_COPY_SHALLOW_HIERARCHY_F
-                                               !   H5O_COPY_EXPAND_SOFT_LINK_F 
-                                               !   H5O_COPY_EXPAND_EXT_LINK_F
-                                               !   H5O_COPY_EXPAND_REFERENCE_F
-                                               !   H5O_COPY_WITHOUT_ATTR_FLAG_F
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

H5Pget_create_inter_group_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_create_inter_group_f
-
-

PURPOSE

-
  Determines whether property is set to enable creating missing intermediate groups.
-
-

INPUTS

-
  lcpl_id            - Link creation property list identifier
-  crt_intermed_group - Specifying whether to create intermediate groups upon 
-                       the creation of an object
-
-

OUTPUTS

-
  hdferr             - Error code              
-                        Success:  0
-                        Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 4, 2008
-
-

HISTORY

-
 The long subroutine name (>31) on older f90 compilers causes problems
-          so the name was shortened
-
-

SOURCE

-
  SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
-    INTEGER, INTENT(IN) :: crt_intermed_group  ! Flag specifying whether to create intermediate groups
-                                               ! upon creation of an object
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pget_data_transform_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_data_transform_f 
-
-

PURPOSE

-
  Retrieves a data transform expression.
-
-

INPUTS

-
  plist_id   - Identifier of the property list or class
-
-

OUTPUTS

-
  expression - buffer to hold transform expression
-  hdferr     - Error code
-                 Success:  Actual lenght of the expression
-                           If provided buffer "expression" is 
-                           smaller, than expression will be 
-                           truncated to fit into
-                           provided user buffer
-                 Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 19, 2008
-
-

HISTORY

-
 Should hdferr return just 0 or 1 and add another arguement for the size?
-
-

SOURCE

-
SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id         ! Identifier of the property list or class
-    CHARACTER(LEN=*), INTENT(OUT) :: expression    ! Buffer to hold transform expression
-    INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression
-    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
-                                                   !  0 on success and -1 on failure
-
- -
- -

h5pget_driver_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_driver_f 
-
-

PURPOSE

-
  Returns low-lever driver identifier. 
-
-

INPUTS

-
  prp_id  - file access or data transfer property 
-            list identifier. 
-
-

OUTPUTS

-
  driver  - low-level driver identifier
-  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_edc_check_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_edc_check_f 
-
-

PURPOSE

-
  Queries error detecting  
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier 
-    INTEGER, INTENT(OUT) :: flag         ! Checksum filter flag
-                                         ! May have one of the following values:
-                                         !  H5Z_ERROR_EDC_F
-                                         !  H5Z_DISABLE_EDC_F
-                                         !  H5Z_ENABLE_EDC_F
-                                         !  H5Z_NO_EDC_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pget_est_link_info_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_est_link_info_f 
-
-

PURPOSE

-
  Queries data required to estimate required local heap or object header size.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier
-
-

OUTPUTS

-
  est_num_entries - Estimated number of links to be inserted into group
-  est_name_len    - Estimated average length of link names
-  hdferr          - Error code
-                     Success:  0
-                     Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier  
-    INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group
-    INTEGER, INTENT(OUT) :: est_name_len    ! Estimated average length of link names
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_external_count_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_external_count_f 
-
-

PURPOSE

-
  Returns the number of external files for a dataset. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  count        - number of external files for the 
-                 specified dataset
-  hdferr       - error code            
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: count        ! Number of external files for the 
-                                         ! Specified dataset
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_external_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_external_f 
-
-

PURPOSE

-
  Returns information about an external file. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  idx          - external file index 
-  name_size    - maximum size of name array
-  name         - name of the external file     
-  name         - name of external file
-  offset       - offset in bytes from the beginning of the 
-                 file to the location in the file
-                 where the data starts
-  bytes        - size of the external file data
-  hdferr       - error code            
-                  Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    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 
-                                             !  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 
-                                             !  file for the data
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_core_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_fapl_core_f 
-
-

PURPOSE

-
  Queries core file driver properties. 
-
-

INPUTS

-
  prp_id        - file access property list identifier
-
-

OUTPUTS

-
  increment     - size, in bytes, of memory increments 
-  backing_store - boolean flag indicating whether to write 
-                  the file contents to disk when the file is closed. 
-  hdferr        - error code           
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes.
-    LOGICAL, INTENT(OUT) :: backing_store   ! Flag to indicate that
-                                            ! entire file contents are flushed to a file 
-                                            ! with the same name as this core file.
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_direct_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_direct_f
-
-

PURPOSE

-
  Gets up use of the direct I/O driver.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-
-

OUTPUTS

-
  alignment    - Required memory alignment boundary
-  block_size   - File system block size
-  cbuf_size    - Copy buffer size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
-    IMPLICIT NONE  
-    INTEGER(HID_T), INTENT(IN) :: fapl_id       ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: alignment   ! Required memory alignment boundary!
-    INTEGER(SIZE_T), INTENT(OUT) :: block_size  ! File system block size
-    INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size   ! Copy buffer size
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_family_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_family_f 
-
-

PURPOSE

-
  Returns file access property list information.       
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  memb_size    - size in bytes of each file member 
-  memb_plist   - identifier of the file access property 
-                 list to be used for each family member
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes,
-                                               ! of each family member
-    INTEGER(HID_T), INTENT(OUT) :: memb_plist  ! Identifier of the file 
-                                               ! access property list for 
-                                               ! each member of the family
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pget_fapl_multi_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fapl_multi_f 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  mem_map      - mapping array
-  memb_fapl    - property list for each memory usage type
-  memb_name    - names of member file
-  relax        - flag 
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  maxlen_out   - maximum length for memb_name array element 
-
-

AUTHOR

-
  Elena Pourmal
-  24 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map
-    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl
-    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name
-    !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
-    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
-    INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out 
-    LOGICAL, INTENT(OUT) :: relax
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_fclose_degree_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_fclose_degree_f 
-
-

PURPOSE

-
  Returns the degree for the file close behavior.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-
-

OUTPUTS

-
  degree       - Possible values are:
-                  H5F_CLOSE_DEFAULT_F
-                  H5F_CLOSE_WEAK_F
-                  H5F_CLOSE_SEMI_F
-                  H5F_CLOSE_STRONG_F
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002   
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
-    INTEGER, INTENT(OUT) :: degree        ! Possible values are: 
-                                          !  H5F_CLOSE_DEFAULT_F
-                                          !  H5F_CLOSE_WEAK_F
-                                          !  H5F_CLOSE_SEMI_F
-                                          !  H5F_CLOSE_STRONG_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_fill_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_fill_time_f
-
-

PURPOSE

-
  Get fill value writing time for dataset
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

OPTIONAL PARAMETERS

-
  flag         - fill time flag:
-                  H5D_FILL_TIME_ERROR_F
-                  H5D_FILL_TIME_ALLOC_F
-                  H5D_FILL_TIME_NEVER_F
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: flag   ! Fill time flag:
-                                   !  H5D_FILL_TIME_ERROR_F
-                                   !  H5D_FILL_TIME_ALLOC_F
-                                   !  H5D_FILL_TIME_NEVER_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pget_filter_by_id_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_filter_by_id_f 
-
-

PURPOSE

-
  Returns information about a filter in a pipeline
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-
-

OUTPUTS

-
  filter_id    - filter identifier
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-  namelen      - number of characters in the name buffer
-  name         - buffer to retrieve filter name
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id   ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter_id       ! Filter identifier
-    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts     ! Number of elements in cd_values.
-    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: flags          ! Bit vector specifying certain general
-                                           ! properties of the filter.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name.
-    CHARACTER(LEN=*), INTENT(OUT) :: name  ! Name of the filter
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_filter_f 
-
-

PURPOSE

-
  Returns information about a filter in a pipeline
-
-

INPUTS

-
  prp_id        - data creation or transfer property list 
-                  identifier
-  filter_number - sequence number within the filter
-                  pipeline of the filter for which 
-                  information is sought
-
-

OUTPUTS

-
  filter_id    - filter identification number
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-  namelen      - number of characters in the name buffer
-  name         - buffer to retrieve filter name
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter
-                                         !  pipeline of the filter for which 
-                                         !  information is sought
-    INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values  ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: flags        ! Bit vector specifying certain general
-                                         !  properties of the filter.
-    INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts  ! Number of elements in cd_values.
-    INTEGER(SIZE_T), INTENT(IN) :: namelen       ! Anticipated number of characters in name.
-    CHARACTER(LEN=*), INTENT(OUT) :: name        ! Name of the filter
-    INTEGER, INTENT(OUT) :: filter_id            ! Filter identification number  
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pget_gc_references_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_gc_references_f 
-
-

PURPOSE

-
  Returns garbage collecting references setting.       
-
-

INPUTS

-
  prp_id       - file access property list identifier
-
-

OUTPUTS

-
  gc_reference - flag for stting garbage collection on 
-                 and off (1 or 0)
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting
-                                         !  references for the file
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_istore_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_istore_k_f 
-
-

PURPOSE

-
  Queries the 1/2 rank of an indexed storage B-tree. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  ik           - 1/2 rank of chunked storage B-tree
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: ik           ! 1/2 rank of chunked storage B-tree
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_layout_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_layout_f 
-
-

PURPOSE

-
  Returns the layout of the raw data for a dataset. 
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-
-

OUTPUTS

-
  layout       - type of storage layout for raw data
-                 possible values are:
-                  H5D_COMPACT_F
-                  H5D_CONTIGUOUS_F
-                  H5D_CHUNKED_F
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: layout       ! Type of storage layout for raw data
-                                         ! possible values are:
-                                         !  H5D_COMPACT_F(0)
-                                         !  H5D_CONTIGUOUS_F(1)
-                                         !  H5D_CHUNKED_F(2)
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pget_link_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_link_creation_order_f
-
-

PURPOSE

-
  Queries whether link creation order is tracked and/or indexed in a group.
-
-

INPUTS

-
  gcpl_id - Group creation property list identifier
-
-

OUTPUTS

-
  crt_order_flags - Creation order flag(s)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id   ! Group creation property list identifier
-    INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s)
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pget_link_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_link_phase_change_f
-
-

PURPOSE

-
  Queries the settings for conversion between compact and dense groups.
-
-

INPUTS

-
  gcpl_id      - Group creation property list identifier
-
-

OUTPUTS

-
  max_compact  - Maximum number of attributes to be stored in compact storage
-  min_dense    - Minimum number of attributes to be stored in dense storage
-  hdferr       - Error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 20, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
-    INTEGER, INTENT(OUT) :: max_compact   ! Maximum number of attributes to be stored in compact storage
-    INTEGER, INTENT(OUT) :: min_dense     ! Minimum number of attributes to be stored in dense storage
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pget_local_heap_size_hint_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_local_heap_size_hint_f 
-
-

PURPOSE

-
  Queries the local heap size hint for original-style groups.
-
-

INPUTS

-
  gcpl_id   - Group creation property list identifier
-
-

OUTPUTS

-
  size_hint - Hint for size of local heap
-  hdferr    - Error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id     ! Group creation property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pget_meta_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_meta_block_size_f 
-
-

PURPOSE

-
  Gets the minimum size of metadata block allocations 
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - metatdata block size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Block size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_nfilters_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_nfilters_f 
-
-

PURPOSE

-
  Returns the number of filters in the pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-
-

OUTPUTS

-
  nfilters     - number of filters in the pipeline
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: nfilters     ! The number of filters in the pipeline
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_nlinks_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_nlinks_f 
-
-

PURPOSE

-
  Gets maximum number of soft or user-defined link traversals.
-
-

INPUTS

-
  lapl_id - File access property list identifier
-  nlinks  - Maximum number of links to traverse
-
-

OUTPUTS

-
  hdferr  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 24, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lapl_id  ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_npros_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_npros_f 
-
-

PURPOSE

-
  Queries number of properties in property list or class
-
-

INPUTS

-
  prp_id       - iproperty list identifier to query
-
-

OUTPUTS

-
  nprops       - number of properties in property object
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id    ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: nprops  ! Number of properties
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pget_obj_track_times_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pget_obj_track_times_f 
-
-

PURPOSE

-
  Returns whether times are tracked for an object.
-
-

INPUTS

-
  plist_id     - property list id
-  flag         - object timestamp setting
-                 .TRUE.,.FALSE.
-
-

OUTPUTS

-
  hdferr       - error code            
-                 Success:  0
-                 Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-
-

SOURCE

-
  SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property 
-                                           ! list identifier 
-    LOGICAL, INTENT(OUT) :: flag   ! Object timestamp setting
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pget_preserve_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_preserve_f 
-
-

PURPOSE

-
  Checks status of the dataset transfer property list.
-
-

INPUTS

-
  prp_id  - property list identifier
-
-

OUTPUTS

-
  flag    - status flag
-  hdferr  - error code         
-       Success:  0
-       Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001
- 
-  Datatype of the flag parameter is changed from 
-  INTEGER to LOGICAL 
-  June 4, 2003 
-
-

SOURCE

-
  SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    LOGICAL, INTENT(OUT) ::  flag        ! TRUE/FALSE flag. Shows status of the dataset's
-                                         ! transfer property for partial writing/reading
-                                         ! compound datatype
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_sec2_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_sec2_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
- SOURCE!          SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) 
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-            INTEGER, INTENT(OUT) :: sec2   ! value indicates whether the file
-            INTEGER, INTENT(OUT) :: hdferr  ! Error code
- 0 on success and -1 on failure
-
- -
- -

h5pget_sieve_buf_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sieve_buf_size_f 
-
-

PURPOSE

-
  Gets the maximum size of the data sieve buffer
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - sieve buffer size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: size   ! Buffer size in bytes 
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pget_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_size_f 
-
-

PURPOSE

-
  Queries the size of a property value in bytes.
-
-

INPUTS

-
  prp_id       - property list identifier to query
-  name         - name of property to query
-
-

OUTPUTS

-
  size         - size of property in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id  ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to query
-    INTEGER(SIZE_T), INTENT(OUT) :: size  ! Size in bytes
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pget_sizes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sizes_f 
-
-

PURPOSE

-
  Retrieves the size of the offsets and lengths used 
-  in an HDF5 file
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  sizeof_addr  - size of an object offset in bytes 
-  sizeof_size  - size of an object length in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object
-                                                ! offset in bytes 
-    INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object
-                                                ! length in bytes 
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pget_small_data_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_small_data_block_size_f 
-
-

PURPOSE

-
  Gets the minimum size of "small" raw data block
-
-

INPUTS

-
  plist_id     - file access property list identifier
-
-

OUTPUTS

-
  size         - small raw data block size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) :: size   ! Small raw data block size
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pget_split_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pget_split_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
!          SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,&
-!                                     raw_ext, raw_plist, hdferr)
-!            IMPLICIT NONE
-!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-!            INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta
-                                                         ! file extension to be copied to the
-                                                         ! meta_ext buffer
-
-!            CHARACTER(LEN=*), INTENT(OUT) :: meta_ext  !Name of the extension for
-                                                      !the metafile filename
-!            INTEGER(HID_T), INTENT(OUT) :: meta_plist  ! Identifier of the meta file
-                                                      ! access property list
-!            INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw
-                                                         ! file extension to be copied to the
-                                                         ! raw_ext buffer
-!            CHARACTER(LEN=*), INTENT(OUT) :: raw_ext  !Name extension for the raw file filename
-!            INTEGER(HID_T), INTENT(OUT) :: raw_plist  !Identifier of the raw file
-                                                     !access property list
-!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pget_stdio_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_stdio_f 
-
-

PURPOSE

-
  NOT AVAILABLE
-
-

INPUTS

-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
!          SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr)
-!
-!            IMPLICIT NONE
-!            INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-!            INTEGER, INTENT(OUT) :: io   ! value indicates that the file
-                                         !access property list is set to
-                                         !the stdio driver
-!            INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pget_sym_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_sym_k_f 
-
-

PURPOSE

-
  Retrieves the size of the symbol table B-tree 1/2 rank
-  and the symbol table leaf node 1/2 size. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  ik           - symbol table tree 1/2 rank
-  lk           - symbol table node 1/2 size
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: ik           ! Symbol table tree rank
-    INTEGER, INTENT(OUT) :: lk           ! Symbol table node size
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pget_userblock_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_userblock_f 
-
-

PURPOSE

-
  Gets user block size.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-
-

OUTPUTS

-
  block_size   - size of the user block in bytes
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id         ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(OUT) ::  block_size ! Size of the 
-                                                 ! user-block in bytes 
-    INTEGER, INTENT(OUT) :: hdferr               ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pget_version_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pget_version_f 
-
-

PURPOSE

-
  Retrieves the version information of various objects 
-  for a file creation property list
-
-

INPUTS

-
  prp_id       - file createion property list identifier
-
-

OUTPUTS

-
  boot         - super block version number
-  freelist     - global freelist version number
-  stab         - symbol table version number
-  shhdr        - shared object header version number
-  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pget_version_f(prp_id, boot, freelist, &
-       stab, shhdr, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id        ! Property list identifier 
-    INTEGER, DIMENSION(:), INTENT(OUT) :: boot  ! Array to put boot
-                                                ! block version number
-    INTEGER, DIMENSION(:), INTENT(OUT) :: freelist  ! Array to put global
-                                                    ! Freelist version number
-
-    INTEGER, DIMENSION(:), INTENT(OUT) :: stab  ! Array to put symbol
-                                                ! table version number
-    INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared
-                                                ! object header version number
-    INTEGER, INTENT(OUT) :: hdferr              ! Error code
-                                                ! 0 on success and -1 on failure
-
- -
- -

h5pisa_class_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pisa_class_f 
-
-

PURPOSE

-
  Determines whether a property list is a member of a class. 
-
-

INPUTS

-
  plist        - property list identifier 
-  pclass       - identifier of the property class
-
-

OUTPUTS

-
  flag         - .TRUE. if a member, .FALSE. otherwise
-  hdferr:      - error code           
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist     ! Property list identifier 
-    INTEGER(HID_T), INTENT(IN) :: pclass    ! Class identifier
-    LOGICAL, INTENT(OUT) :: flag            ! logical flag
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pmodify_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pmodify_filter_f 
-
-

PURPOSE

-
  Adds a filter to the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be modified
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter        ! Filter to be modified
-    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
-                                         !  properties of the filter
-    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values
-    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5premove_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5premove_f 
-
-

PURPOSE

-
  Removes a property from a property list. 
-
-

INPUTS

-
  plid         - Property list identofoer
-  name         - name of the property to remove
-
-

OUTPUTS

-
  hdferr:      - error code
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5premove_f(plid, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plid   ! Property list identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         !  0 on success and -1 on failure
-
- -
- -

h5premove_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5premove_filter_f 
-
-

PURPOSE

-
  Delete one or more filters from the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be removed
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Quincey Koziol
-  January 27 2004
-
-

SOURCE

-
  SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list
-                                         ! identifier
-    INTEGER, INTENT(IN) :: filter        ! Filter to be removed
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_alignment_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_alignment_f 
-
-

PURPOSE

-
  Sets alignment properties of a file access property list. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  threshold    - threshold value       
-  alignment    - alignment value
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_alignment_f(prp_id, threshold,  alignment, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id      ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value
-    INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_alloc_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_alloc_time_f
-
-

PURPOSE

-
  Set space allocation time for dataset during creation.
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-  flag         - allocation time flag:
-                   H5D_ALLOC_TIME_ERROR_F
-                   H5D_ALLOC_TIME_DEFAULT_F
-                   H5D_ALLOC_TIME_EARLY_F
-                   H5D_ALLOC_TIME_LATE_F
-                   H5D_ALLOC_TIME_INCR_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: flag             ! Allocation time flag:
-                                            !  H5D_ALLOC_TIME_ERROR_F
-                                            !  H5D_ALLOC_TIME_DEFAULT_F
-                                            !  H5D_ALLOC_TIME_EARLY_F
-                                            !  H5D_ALLOC_TIME_LATE_F
-                                            !  H5D_ALLOC_TIME_INCR_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pset_attr_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_attr_creation_order_f 
-
-

PURPOSE

-
  Sets tracking and indexing of attribute creation order
-
-

INPUTS

-
  ocpl_id         - Object creation property list identifier
-  crt_order_flags - Flags specifying whether to track and index attribute creation order
-
-

OUTPUTS

-
  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id   ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(IN) :: crt_order_flags  ! Flags specifying whether to track and index attribute creation order
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

H5Pset_attr_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_attr_phase_change_f 
-
-

PURPOSE

-
  Sets attribute storage phase change thresholds.
-
-

INPUTS

-
  ocpl_id - Object (dataset or group) creation property list identifier
-
-

OUTPUTS

-
  max_compact     - Maximum number of attributes to be stored in compact storage
-                    (Default: 8)
-  min_dense       - Minimum number of attributes to be stored in dense storage
-                    (Default: 6)
-  hdferr          - Error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier
-    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
-                                          !(Default: 8)
-    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
-                                          ! (Default: 6)
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_btree_ratios_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_btree_ratios_f 
-
-

PURPOSE

-
  Sets B-tree split ratios for a dataset transfer 
-  property list. 
-
-

INPUTS

-
  prp_id       - the dataset transfer property list 
-                 identifier 
-  left         - the B-tree split ratio for left-most nodes 
-  middle       - the B-tree split ratio for all other nodes
-  right        - the B-tree split ratio for right-most nodes
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
-    REAL, INTENT(IN) :: left   ! The B-tree split ratio for left-most nodes.
-    REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes 
-    REAL, INTENT(IN) :: right  ! The B-tree split ratio for right-most 
-                               !  nodes and lone nodes. 
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5pset_buffer_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_buffer_f 
-
-

PURPOSE

-
  Sets sixe for conversion buffer
-
-

INPUTS

-
  plist_id     - data transfer property list identifier
-  size         - buffer size 
-
-

OUTPUTS

-
  hdferr:      - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 2, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Buffer size in bytes; 
-                                           ! buffer is allocated and freed by 
-                                           ! the library.
-    INTEGER, INTENT(OUT)       :: hdferr   ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_cache_f 
-
-

PURPOSE

-
  Sets the meta data cache and raw data chunk 
-  cache parameters
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  mdc_nelmts   - number of elements (objects) in the meta 
-                 data cache 
-  rdcc_nelmts  - number of elements (objects) in the raw 
-                 data chunk cache 
-  rdcc_nbytes  - total size of the raw data chunk cache, in bytes 
-  rdcc_w0      - preemption policy (0 or 1)
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: mdc_nelmts    ! Number of elements (objects)
-                                         !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects)
-                                               !  in the meta data cache
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data 
-                                               !  chunk cache, in bytes 
-    REAL, INTENT(IN) :: rdcc_w0                ! Preemption policy
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               !  0 on success and -1 on failure
-
- -
- -

H5Pset_char_encoding_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_char_encoding_f
-
-

PURPOSE

-
  Sets the character encoding used to encode a string.
-
-

INPUTS

-
  plist_id - Property list identifier
-  encoding - Valid values for encoding are:
-               H5T_CSET_ASCII_F -> US ASCII
-               H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
-
-

OUTPUTS

-
  hdferr   - Error code                
-               Success:  0
-               Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier
-    INTEGER, INTENT(IN) :: encoding        ! String encoding character set:
-                                           !   H5T_CSET_ASCII_F -> US ASCII
-                                           !   H5T_CSET_UTF8_F  -> UTF-8 Unicode encoding
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_chunk_cache_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_chunk_cache_f
-
-

PURPOSE

-
  Set the number of objects in the meta data cache and the
-  maximum number of chunks and bytes in the raw data chunk cache.
-  Once set, these values will override the values in the file access
-  property list.  Each of these values can be individually unset
-  (or not set at all) by passing the macros:
-    H5D_CHUNK_CACHE_NSLOTS_DFLT_F,
-    H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or
-    H5D_CHUNK_CACHE_W0_DFLT_F
-    as appropriate.
-
-  The RDCC_W0 value should be between 0 and 1 inclusive and
-  indicates how much chunks that have been fully read or fully
-  written are favored for preemption.  A value of zero means
-  fully read or written chunks are treated no differently than
-  other chunks (the preemption is strictly LRU) while a value
-  of one means fully read chunks are always preempted before
-  other chunks.
-
-

INPUTS

-
  dapl_id          - Dataset access property list identifier.
-  rdcc_nslots      - The number of chunk slots in the raw data chunk cache for this dataset.
-  rdcc_nbytes      - The total size of the raw data chunk cache for this dataset.
-  rdcc_w0          - The chunk preemption policy for this dataset.
-
-

OUTPUTS

-
  hdferr           - Error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 13, 2009
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dapl_id      ! Dataset access property list identifier.
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data 
-                                               ! chunk cache for this dataset.
-    INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache 
-                                               ! for this dataset.
-    REAL, INTENT(IN) :: rdcc_w0                ! The chunk preemption policy for this dataset.
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_chunk_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_chunk_f 
-
-

PURPOSE

-
  Sets the size of the chunks used to store 
-  a chunked layout dataset. 
-
-

INPUTS

-
  prp_id  - datatset creation property list identifier
-  ndims   - number of dimensions for each chunk
-  dims    - array with dimension sizes for each chunk
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
   Explicit Fortran interfaces were added for 
-   called C functions (it is needed for Windows
-   port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ndims         ! Number of chunk dimensions
-    INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims    
-                                         ! Array containing sizes of
-                                         ! chunk dimensions
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_copy_object_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_copy_object_f 
-
-

PURPOSE

-
  Sets properties to be used when an object is copied.
-
-

INPUTS

-
  ocp_plist_id - Object copy property list identifier
-  copy_options - Copy option(s) to be set
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 3, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier
-    INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are:
-                                        !   H5O_COPY_SHALLOW_HIERARCHY_F
-                                        !   H5O_COPY_EXPAND_SOFT_LINK_F
-                                        !   H5O_COPY_EXPAND_EXT_LINK_F
-                                        !   H5O_COPY_EXPAND_REFERENCE_F
-                                        !   H5O_COPY_WITHOUT_ATTR_FLAG_F
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-                                        ! 0 on success and -1 on failure
-
- -
- -

H5Pset_create_inter_group_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_create_inter_group_f
-
-

PURPOSE

-
  Specifies in property list whether to create missing intermediate groups.
-
-

INPUTS

-
  lcpl_id            - Link creation property list identifier
-  crt_intermed_group - crt_intermed_group specifying whether 
-                       to create intermediate groups upon the creation 
-                       of an object
-
-

OUTPUTS

-
  hdferr             - Error code              
-                         Success:  0
-                         Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-
-

HISTORY

-
 The long subroutine name (>31) on older f90 compilers causes problems
-          so had to shorten the name
-
-

SOURCE

-
  SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lcpl_id      ! Link creation property list identifier
-    INTEGER, INTENT(IN) :: crt_intermed_group  ! specifying whether to create intermediate groups
-                                               ! upon the creation of an object
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pset_data_transform_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_data_transform_f 
-
-

PURPOSE

-
  Sets a data transform expression.
-
-

INPUTS

-
  plist_id   - Identifier of the property list or class 
-  expression - Buffer to hold transform expression
-
-

OUTPUTS

-
  hdferr     - error code
-                 Success:  0
-                 Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 19, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id     ! Identifier of the property list or class
-    CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_deflate_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_deflate_f 
-
-

PURPOSE

-
   Sets compression method and compression level. 
-
-

INPUTS

-
   prp_id  - property list identifier
-   level   - compression level
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
       Elena Pourmal
-               August 12, 1999
-
-

HISTORY

-
       Explicit Fortran interfaces were added for 
-                       called C functions (it is needed for Windows
-                       port).  March 14, 2001
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: level         ! Compression level 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_edc_check_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_edc_check_f 
-
-

PURPOSE

-
  Enables/disables error detecting  
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-  flag         - EDC flag; possible values:
-                   H5Z_DISABLE_EDC_F
-                   H5Z_ENABLE_EDC_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: flag          ! Checksum filter flag
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_est_link_info_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_est_link_info_f 
-
-

PURPOSE

-
  Sets estimated number of links and length of link names in a group.
-
-

INPUTS

-
 gcpl_id         - Group creation property list identifier  
- est_num_entries - Estimated number of links to be inserted into group
- est_name_len    - Estimated average length of link names
-
-

OUTPUTS

-
  hdferr         - Error code
-                    Success:  0
-                    Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! Group creation property list identifier  
-    INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group
-    INTEGER, INTENT(IN) :: est_name_len    ! Estimated average length of link names
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_external_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_external_f 
-
-

PURPOSE

-
  Adds an external file to the list of external files. 
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-  name         - name of external file
-  offset       - offset in bytes from the beginning of the 
-                 file to the location in the file
-                 where the data starts
-  bytes        - size of the external file data. 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  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 
-                                          !  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 
-                                          !  file for the data
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_core_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_core_f 
-
-

PURPOSE

-
  Modifies the file access property list to use the 
-  H5FD_CORE driver. 
-
-

INPUTS

-
  prp_id           - file access property list identifier
-  increment        - size, in bytes, of memory increments 
-  backing_store    - boolean flag indicating whether to write 
-                     the file contents to disk when the file is closed. 
-
-

OUTPUTS

-
  hdferr           - error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes.
-    LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that
-                                         ! entire file contents are flushed to a file 
-                                         ! with the same name as this core file.
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_direct_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_direct_f
-
-

PURPOSE

-
  Sets up use of the direct I/O driver.
-
-

INPUTS

-
  fapl_id      - File access property list identifier
-  alignment    - Required memory alignment boundary
-  block_size   - File system block size
-  cbuf_size    - Copy buffer size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
-    IMPLICIT NONE  
-    INTEGER(HID_T), INTENT(IN) :: fapl_id     ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: alignment  ! Required memory alignment boundary!
-    INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size
-    INTEGER(SIZE_T), INTENT(IN) :: cbuf_size  ! Copy buffer size
-    INTEGER, INTENT(OUT) :: hdferr            ! Error code
-                                              ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_multi_l

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_multi_l 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  mem_map      - mapping array
-  memb_fapl    - property list for each memory usage type
-  memb_name    - names of member file
-  relax        - flag 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  20 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map ! Mapping array
-    INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl ! Property list for each memory usage type
-    CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name ! Names of member file
-    REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr 
-    LOGICAL, INTENT(IN) :: relax     ! Flag
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_multi_s

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_multi_s 
-
-

PURPOSE

-
  Sets up use of the multi-file driver. 
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  relax        - flag 
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  31 March 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier 
-    LOGICAL, INTENT(IN) :: relax
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_sec2_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_sec2_f 
-
-

PURPOSE

-
  Sets the sec2 driver. 
-
-

INPUTS

-
  prp_id  - file access property list identifier
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_split_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_fapl_split_f 
-
-

PURPOSE

-
  Emulates the old split file driver. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  meta_ext     - name of the extension for the metafile 
-                 filename
-  meta_plist   - identifier of the meta file access property 
-                 list
-  raw_ext      - name extension for the raw file filename
-  raw_plist    - identifier of the raw file access property list
-
-

OUTPUTS

-
  hdferr       - error code            
-                   Success:  0
-                   Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id     ! Property list identifier 
-    CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for
-                                             !  the metafile filename
-    INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file
-                                             !  access property list
-    CHARACTER(LEN=*), INTENT(IN) :: raw_ext  ! Name extension for the raw file filename
-    INTEGER(HID_T), INTENT(IN) :: raw_plist  ! Identifier of the raw file 
-                                             !  access property list
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

h5pset_fapl_stdio_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fapl_stdio_f 
-
-

PURPOSE

-
  Sets the standard I/O driver. 
-
-

INPUTS

-
  prp_id  - file access property list identifier
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_fclose_degree_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fclose_degree_f 
-
-

PURPOSE

-
  Sets the degree for the file close behavior.
-
-

INPUTS

-
  fapl_id      - file access property list identifier
-  degree       - Possible values are:
-                   H5F_CLOSE_DEFAULT_F
-                   H5F_CLOSE_WEAK_F
-                   H5F_CLOSE_SEMI_F
-                   H5F_CLOSE_STRONG_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002   
-
-

SOURCE

-
  SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier 
-    INTEGER, INTENT(IN) :: degree         ! Possible values are: 
-                                          !  H5F_CLOSE_DEFAULT_F
-                                          !  H5F_CLOSE_WEAK_F
-                                          !  H5F_CLOSE_SEMI_F
-                                          !  H5F_CLOSE_STRONG_F
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

h5pset_fill_time_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fill_time_f
-
-

PURPOSE

-
  Set fill value writing time for dataset
-
-

INPUTS

-
  plist_id     - dataset creation property list identifier
-  flag         - fill time flag:
-                   H5D_FILL_TIME_ERROR_F
-                   H5D_FILL_TIME_ALLOC_F
-                   H5D_FILL_TIME_NEVER_F
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 4, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id  ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: flag             ! Fill time flag:
-                                            !  H5D_FILL_TIME_ERROR_F
-                                            !  H5D_FILL_TIME_ALLOC_F
-                                            !  H5D_FILL_TIME_NEVER_F
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-                                            ! 0 on success and -1 on failure
-
- -
- -

h5pset_filter_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_filter_f 
-
-

PURPOSE

-
  Adds a filter to the filter pipeline. 
-
-

INPUTS

-
  prp_id       - data creation or transfer property list 
-                 identifier
-  filter       - filter to be added to the pipeline 
-  flags        - bit vector specifying certain general
-                 properties of the filter
-  cd_nelmts    - number of elements in cd_values
-  cd_values    - auxiliary data for the filter
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  February, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values,  hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: filter        ! Filter to be added to the pipeline.
-    INTEGER, INTENT(IN) :: flags         ! Bit vector specifying certain general
-                                       !  properties of the filter.
-    INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts       ! Number of elements in cd_values.
-    INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter.
-    INTEGER, INTENT(OUT) :: hdferr                 ! Error code
-                                                 ! 0 on success and -1 on failure
-
- -
- -

h5pset_fletcher32_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_fletcher32_f 
-
-

PURPOSE

-
  Sets Fletcher32 checksum of EDC for a dataset creation 
-  property list.
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 13, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_gc_references_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_gc_references_f 
-
-

PURPOSE

-
  Sets garbage collecting references flag. 
-
-

INPUTS

-
  prp_id       - file access property list identifier
-  gc_reference - flag for stting garbage collection on 
-                 and off (1 or 0)
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: gc_reference  ! The flag for garbage collecting
-                                         !  references for the file
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_hyper_vector_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_hyper_vector_size_f 
-
-

PURPOSE

-
  Set the number of "I/O" vectors (vector size)
-
-

INPUTS

-
  plist_id     - dataset transfer property list identifier
-  size         - vector size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Vector size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_istore_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_istore_k_f 
-
-

PURPOSE

-
  Sets the size of the parameter used to control the 
-  B-trees for indexing chunked datasets
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  ik           - 1/2 rank of chunked storage B-tree
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ik            ! 1/2 rank of chunked storage B-tree
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_layout_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_layout_f 
-
-

PURPOSE

-
  Sets the type of storage used store the raw data 
-  for a dataset. 
-
-

INPUTS

-
  prp_id       - data creation property list identifier
-  layout       - type of storage layout for raw data
-                 possible values are:
-                   H5D_COMPACT_F
-                   H5D_CONTIGUOUS_F
-                   H5D_CHUNKED_F
-
-

OUTPUTS

-
  hdferr      - error code             
-                 Success:  0
-                 Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: layout        ! Type of storage layout for raw data
-                                         ! possible values are:
-                                         !   H5D_COMPACT_F
-                                         !   H5D_CONTIGUOUS_F
-                                         !   H5D_CHUNKED_F
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

H5Pset_libver_bounds_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
             H5Pset_libver_bounds_f
-
-

PURPOSE

-
    Sets bounds on library versions, and indirectly format versions, to be used when creating objects.
-
-

INPUTS

-
  fapl_id - File access property list identifier
-  low     - The earliest version of the library that will be used for writing objects.
-  high    - The latest version of the library that will be used for writing objects.
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
-    INTEGER, INTENT(IN) :: low   ! The earliest version of the library that will be used for writing objects.
-                                 ! Currently, low must be one of two pre-defined values:
-                                 !            HDF_LIBVER_EARLIEST_F
-                                 !            HDF_LIBVER_LATEST_F
-    INTEGER, INTENT(IN) :: high  ! The latest version of the library that will be used for writing objects.
-                                 ! Currently, low must set to the pre-defined value:
-                                 !            HDF_LIBVER_LATEST_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-                                    ! 0 on success and -1 on failure
-
- -
- -

H5Pset_link_creation_order_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_link_creation_order_f 
-
-

PURPOSE

-
    Sets creation order tracking and indexing for links in a group.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier
-  crt_order_flags - Creation order flag(s)
-
-

OUTPUTS

-
  hdferr           - Error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id  ! File access property list identifier
-    INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s)
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_link_phase_change_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_link_phase_change_f
-
-

PURPOSE

-
  Sets the parameters for conversion between compact and dense groups.
-
-

INPUTS

-
  gcpl_id         - Group creation property list identifier  
-  max_compact     - Maximum number of attributes to be stored in compact storage
-  min_dense       - Minimum number of attributes to be stored in dense storage
-
-

OUTPUTS

-
  hdferr          - error code         
-                     Success:  0
-                     Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier
-    INTEGER, INTENT(IN) :: max_compact    ! Maximum number of attributes to be stored in compact storage
-    INTEGER, INTENT(IN) :: min_dense      ! Minimum number of attributes to be stored in dense storage
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pset_local_heap_size_hint_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_local_heap_size_hint_f 
-
-

PURPOSE

-
  Sets the local heap size hint for original-style groups.
-
-

INPUTS

-
  gcpl_id   - Group creation property list identifier
-  size_hint - Hint for size of local heap
-
-

OUTPUTS

-
  hdferr    - Error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: gcpl_id    ! Group creation property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-                                             ! 0 on success and -1 on failure
-
- -
- -

H5Pset_nbit_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_nbit_f 
-
-

PURPOSE

-
  Sets up the use of the N-Bit filter.
-
-

INPUTS

-
  plist_id - Dataset creation property list identifier.
-
-

OUTPUTS

-
  hdferr   - Error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_nbit_f(plist_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_nlinks_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_nlinks_f 
-
-

PURPOSE

-
  Sets maximum number of soft or user-defined link traversals.
-
-

INPUTS

-
  lapl_id - File access property list identifier
-   nlinks - Maximum number of links to traverse
-
-

OUTPUTS

-
  hdferr  - Error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 24, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier
-    INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code   
-                                          ! 0 on success and -1 on failure
-
- -
- -

H5Pset_obj_track_times_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_obj_track_times_f 
-
-

PURPOSE

-
  Set whether the birth, access, modification & change times for
-  an object are stored.
-
-  Birth time is the time the object was created.  Access time is
-  the last time that metadata or raw data was read from this
-  object.  Modification time is the last time the data for
-  this object was changed (either writing raw data to a dataset
-  or inserting/modifying/deleting a link in a group).  Change
-  time is the last time the metadata for this object was written
-  (adding/modifying/deleting an attribute on an object, extending
-  the size of a dataset, etc).
-
-   If these times are not tracked, they will be reported as
-   12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX
-   epoch) when queried.
-
-

INPUTS

-
  plist_id     - property list id
-  flag         - object timestamp setting
-                 .TRUE.,.FALSE.
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 22, 2008
-       
-
-

SOURCE

-
  SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property
-                                           ! list identifier
-    LOGICAL, INTENT(IN) :: flag    ! Object timestamp setting
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-                                   ! 0 on success and -1 on failure
-
- -
- -

h5pset_preserve_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
   h5pset_preserve_f 
-
-

PURPOSE

-
  Sets the dataset transfer property list status to 
-  TRUE or FALSE for initializing compound datatype
-  members during write/read operations.
-
-

INPUTS

-
  prp_id       - property list identifier
-  flag         - status flag
-
-

OUTPUTS

-
  hdferr       - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-                       
-  Datatype of the flag parameter is changed from 
-  INTEGER to LOGICAL June 4, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    LOGICAL, INTENT(IN) ::  flag         ! TRUE/FALSE flag to set the dataset
-                                         ! transfer property for partila writing/reading
-                                         ! compound datatype
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_scaleoffset_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_scaleoffset_f 
-
-

PURPOSE

-
  Sets up the use of the Scale-Offset filter.
-
-

INPUTS

-
  plist_id     - Dataset creation property list identifier.
-  scale_type   - Flag indicating compression method.
-  scale_factor - Parameter related to scale.
-
-

OUTPUTS

-
  hdferr        - Error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 21, 2008
-
-

HISTORY

-

SOURCE

-
  SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier
-    INTEGER, INTENT(IN) :: scale_type      ! Flag indicating compression method.
-    INTEGER, INTENT(IN) :: scale_factor    ! Parameter related to scale.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_shared_mesg_index_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_shared_mesg_index_f
-
-

PURPOSE

-
  Configures the specified shared object header message index
-
-

INPUTS

-
  fcpl_id         - File creation property list identifier.
-  index_num       - Index being configured.
-  mesg_type_flags - Types of messages that should be stored in this index.
-  min_mesg_size   - Minimum message size.
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: fcpl_id  ! file creation property list
-    INTEGER, INTENT(IN) :: index_num       ! Index being configured.
-    INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index.
-    INTEGER, INTENT(IN) :: min_mesg_size   ! Minimum message size.
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

H5Pset_shared_mesg_nindexes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  H5Pset_shared_mesg_nindexes_f 
-
-

PURPOSE

-
  Sets number of shared object header message indexes 
-
-

INPUTS

-
  plist_id - file creation property list
-  nindexes - Number of shared object header message indexes to be available in files created with this property list
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  January, 2008
-
-

SOURCE

-
  SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list
-    INTEGER, INTENT(IN) :: nindexes  ! Number of shared object header message indexes 
-                                     !  available in files created WITH this property list
-    INTEGER, INTENT(OUT) :: hdferr   ! Error code
-                                     ! 0 on success and -1 on failure
-
- -
- -

h5pset_shuffle_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_shuffle_f 
-
-

PURPOSE

-
  Sets shuffling filter
-
-

INPUTS

-
  prp_id       - dataset creation property list identifier
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_shuffle_f(prp_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_sieve_buf_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sieve_buf_size_f 
-
-

PURPOSE

-
  Sets the maximum size of the data sieve buffer
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - sieve buffer size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: size    ! Buffer size in bytes; 
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_sizes_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sizes_f 
-
-

PURPOSE

-
  Sets the byte size of the offsets and lengths used 
-  to address objects in an HDF5 file.
-
-

INPUTS

-
  prp_id       - file creation property list identifier
-  sizeof_addr  - size of an object offset in bytes 
-  sizeof_size  - size of an object length in bytes
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier 
-    INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object 
-                                               !  offset in bytes 
-    INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object 
-                                               !  length in bytes 
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-                                               ! 0 on success and -1 on failure
-
- -
- -

h5pset_small_data_block_size_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_small_data_block_size_f 
-
-

PURPOSE

-
  Sets the minimum size of "small" raw data block
-
-

INPUTS

-
  plist_id     - file access property list identifier
-  size         - small raw data block size
-
-

OUTPUTS

-
  hdferr       - error code            
-                  Success:  0
-                  Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002      
-
-

SOURCE

-
  SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size   ! Small raw data block size
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-                                           ! 0 on success and -1 on failure
-
- -
- -

h5pset_sym_k_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_sym_k_f 
-
-

PURPOSE

-
  Sets the size of parameters used to control the 
-
-

INPUTS

-
  prp_id  - file creation property list identifier
-  ik      - symbol table tree rank
-  lk      - symbol table node size
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-               
-
-

SOURCE

-
  SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER, INTENT(IN) :: ik            ! Symbol table tree rank 
-    INTEGER, INTENT(IN) :: lk            ! Symbol table node size 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_szip_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_szip_f 
-
-

PURPOSE

-
  Sets up use of szip compression
-
-

INPUTS

-
  prp_id           - dataset creation property list identifier
-  options_mask     - A bit-mask conveying the desired SZIP options.
-                     Current valid values in Fortran are:
-                        H5_SZIP_EC_OM_F
-                        H5_SZIP_NN_OM_F
-  pixels_per_block - szip parameters
-
-

OUTPUTS

-
  hdferr           - error code                
-                       Success:  0
-                       Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  April 10 2003
-
-

SOURCE

-
  SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) 
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property 
-                                         ! list identifier 
-    INTEGER, INTENT(IN) :: options_mask  ! A bit-mask conveying the desired
-                                         ! SZIP options
-                                         ! Current valid values in Fortran are:
-                                         !    H5_SZIP_EC_OM_F
-                                         !    H5_SZIP_NN_OM_F
-    INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements 
-                                            ! in each data block
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5pset_userblock_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5pset_userblock_f 
-
-

PURPOSE

-
   Sets user block size
-
-

INPUTS

-
   prp_id - file creation property list to modify
-   size   - size of the user-block in bytes
-
-

OUTPUTS

-
  hdferr  - error code         
-             Success:  0
-             Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999      
-
-

HISTORY

-
  Explicit Fortran interfaces were added for 
-  called C functions (it is needed for Windows
-  port).  March 14, 2001 
-
-

SOURCE

-
  SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
-    INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes 
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5punregister_f

- -

[ Top ] [ Subroutines ]

-

NAME

-
  h5punregister_f 
-
-

PURPOSE

-
  Removes a property from a property list class. 
-
-

INPUTS

-
  class        - Property list class identifier
-  name         - name of the property to remove
-
-

OUTPUTS

-
  hdferr:      - error code
-                  Success: 0 
-                  Failure: -1   
-
-

AUTHOR

-
  Elena Pourmal
-  October 9, 2002      
-
-

SOURCE

-
  SUBROUTINE h5punregister_f(class, name, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: class  ! property list class identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-                                         ! 0 on success and -1 on failure
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rf_c.html b/fortran/doc/DevelGuide/src/H5Rf_c.html deleted file mode 100644 index bba197e..0000000 --- a/fortran/doc/DevelGuide/src/H5Rf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Rf.c - - - - - -
-
- -

H5Rf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5R Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html deleted file mode 100644 index 3202540..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_F03_f90.html +++ /dev/null @@ -1,492 +0,0 @@ - - - - - - - -./src/H5Rff_F03.f90 - - - - - -
-
- -

H5R (F03)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Rff_F03.f90
-
-

PURPOSE

-
  This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions.
-  It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the
-  Fortran 2003 functions and the interface listings. This file will be compiled
-  instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rcreate_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_object_f
-
-

PURPOSE

-
  Creates reference to the object
-
-

INPUTS

-
  loc_id    - location identifier
-  name      - name of the object at the specified location
-
-

OUTPUTS

-
  ref       - reference to the specified object
-  hdferr:   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
-                                           ! by loc_id identifier
-    TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref   ! Object reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rcreate_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_ptr_f
-
-

PURPOSE

-
  Creates a reference.
-
-

INPUTS

-
  loc_id     - location identifier
-  name       - name of the dataset at the specified location
-  ref_type   - type of reference:
-                H5R_OBJECT
-                H5T_STD_REF_DSETREG
-
-

OUTPUTS

-
  ref        - reference created by the function call.
-  hdferr     - error code
-                  Success:  0
-                  Failure: -1
- OPTIONAL
-  space_id   - dataspace identifier that describes selected region
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 20, 2008
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f
-  subroutine where the output is a pointer.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id     ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name     ! Name of the dataset at location specified
-                                             ! by loc_id identifier
-    INTEGER, INTENT(IN) :: ref_type          ! type of reference
-    TYPE(C_PTR), INTENT(INOUT) :: ref        ! Reference created by the function call
-    INTEGER, INTENT(OUT) :: hdferr           ! Error code
-    INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier
-
- -
- -

h5rcreate_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rcreate_region_f
-
-

PURPOSE

-
  Creates reference to the dataset region
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the dataset at the specified location
-  space_id      - dataspace identifier that describes selected region
-
-

OUTPUTS

-
  ref           - reference to the dataset region
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
-                                           ! by loc_id identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(INOUT), TARGET :: ref ! Dataset region reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rdereference_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_object_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced
-
-

INPUTS

-
  dset_id  - identifier of the dataset containing
-             reference
-  ref      - reference to open
-
-

OUTPUTS

-
  obj_id   - object_identifier
-  hdferr:  - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id          ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id     ! Object identifier
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5rdereference_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_ptr_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced.
-
-

INPUTS

-
  obj_id     - valid identifier for the file containing the
-               referenced object or any object in that file.
-  ref_type   - the reference type of ref.
-  ref        - Reference to open.
-
-

OUTPUTS

-
  ref_obj_id - identifier of referenced object
-  hdferr     - error code
-                Success:  0
-                Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 20, 2008
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f
-  subroutine using pointers.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id  ! Valid identifier for the file containing the
-                                          !  referenced object or any object in that file.
-    INTEGER, INTENT(IN) :: ref_type       ! The reference type of ref.
-    TYPE(C_PTR), INTENT(IN) :: ref        ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
-                                          ! Identifier of referenced object
-    INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5rdereference_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rdereference_region_f
-
-

PURPOSE

-
  Opens the dataset region
-
-

INPUTS

-
  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
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id   ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref   ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: ref_obj_id  ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rget_name_object_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_object_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size     - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
- SOURCES
- or for the group that dataset is in.
- returning 0 (zero) if no name is associated
- with the identifier
-
- -
- -

h5rget_name_ptr_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_ptr_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
   size   - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

SOURCE

-
  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
-
- -
- -

h5rget_name_region_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_name_region_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size    - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

SOURCE

-
  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
-
- -
- -

h5rget_obj_type_f

- -

[ Top ] [ H5R (F03) ] [ Subroutines ]

-

NAME

-
  h5rget_obj_type_f
-
-

PURPOSE

-
  Retrieves the type of object that an object reference points to.
-
-

INPUTS

-
  loc_id   - Identifier for the dataset containing the reference or
-             for the group that dataset is in.
-  ref_type - Type of reference to query.
-  ref      - Reference to query.
-
-

OUTPUTS

-
  obj_type - Type of referenced object. 
-               H5G_UNKNOWN_F (-1)
-               H5G_LINK_F      0
-               H5G_GROUP_F     1
-               H5G_DATASET_F   2
-               H5G_TYPE_F      3
-              
-  hdferr   - error code
-               Success:  0
-               Failure: -1
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Decemeber 17, 2008
-
-

SOURCE

-
  SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr)
-    USE, INTRINSIC :: ISO_C_BINDING
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id
-    INTEGER, INTENT(IN) :: ref_type
-    TYPE(C_PTR), INTENT(IN) :: ref
-    INTEGER, INTENT(OUT) :: obj_type
-    INTEGER, INTENT(OUT) :: hdferr
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html b/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html deleted file mode 100644 index 7d20d0c..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_F90_f90.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - -./src/H5Rff_F90.f90 - - - - - -
-
- -

H5R (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R_PROVISIONAL
-
-

FILE

-
  fortran/src/H5Rff_F90.f90
-
-

PURPOSE

-
  This file contains Fortran 90 interfaces for H5R functions. It contains
-  the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions
-  and the interface listings. This file will be compiled instead of H5Rff_F03.f90
-  if Fortran 2003 functions are not enabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rcreate_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rcreate_object_f
-
-

PURPOSE

-
  Creates reference to the object
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the object at the specified location
-
-

OUTPUTS

-
  ref           - reference to the specified object
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object at location specified
-                                           ! by loc_id identifier
-    TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rcreate_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rcreate_region_f
-
-

PURPOSE

-
  Creates reference to the dataset region
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the dataset at the specified location
-  space_id      - dataspace identifier that describes selected region
-
-

OUTPUTS

-
  ref           - reference to the dataset region
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rcreate_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id   ! Location identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset at location specified
-                                           ! by loc_id identifier
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5rdereference_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rdereference_object_f
-
-

PURPOSE

-
  Opens the HDF5 object referenced
-
-

INPUTS

-
  dset_id  - identifier of the dataset containing reference
-  ref      - reference to open
-
-

OUTPUTS

-
  obj_id   - object_identifier
-  hdferr   - error code
-              Success:  0
-              Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Object identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rdereference_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rdereference_region_f
-
-

PURPOSE

-
  Opens the dataset region
-
-

INPUTS

-
  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
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rdereference_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference
-    INTEGER(HID_T), INTENT(OUT) :: obj_id   ! Dataspace identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5rget_name_object_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rget_name_object_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size    - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
- SOURCES
- or for the group that dataset is in.
- returning 0 (zero) if no name is associated with the identifier
-
- -
- -

h5rget_name_region_f

- -

[ Top ] [ H5R (F90) ] [ Subroutines ]

-

NAME

-
  h5rget_name_region_f
-
-

PURPOSE

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

OPTIONAL PARAMETERS

-
  size          - The size of the name buffer.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 28, 2008
-
-

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
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Rff_f90.html b/fortran/doc/DevelGuide/src/H5Rff_f90.html deleted file mode 100644 index 2b60b08..0000000 --- a/fortran/doc/DevelGuide/src/H5Rff_f90.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - -./src/H5Rff.f90 - - - - - -
-
- -

H5R

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5R
-
-

FILE

-
  fortran/src/H5Rff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5R functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5rget_object_type_obj_f

- -

[ Top ] [ H5R ] [ Subroutines ]

-

NAME

-
  h5rget_object_type_obj_f
-
-

PURPOSE

-
  Retrieves the type of object that an object reference points to.
-
-

INPUTS

-
  dset_id       - identifier of the dataset containing
-                  reference to the objects
-  ref           - reference to open
-
-

OUTPUTS

-
  obj_type      - object_type, possible values:
-                    H5G_UNKNOWN_F     (-1)
-                    H5G_GROUP_F        0
-                    H5G_DATASET_F      1
-                    H5G_TYPE_F         2
-                    H5G_LINK_F         3
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rget_object_type_f
-  subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
-    TYPE(hobj_ref_t_f), INTENT(IN) :: ref   ! Object reference
-    INTEGER, INTENT(OUT) :: obj_type     ! Object type
-                                         !  H5G_UNKNOWN_F     (-1)
-                                         !  H5G_GROUP_F        0
-                                         !  H5G_DATASET_F      1
-                                         !  H5G_TYPE_F         2
-                                         !  H5G_LINK_F         3
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code
-
- -
- -

h5rget_region_region_f

- -

[ Top ] [ H5R ] [ Subroutines ]

-

NAME

-
  h5rget_region_region_f
-
-

PURPOSE

-
  Retrieves a dataspace with the specified region selected
-
-

INPUTS

-
  dset_id       - identifier of the dataset containing
-                  reference to the regions
-  ref           - reference to open
-
-

OUTPUTS

-
  space_id      - dataspace identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

NOTES

-
  This is a module procedure for the h5rget_region_f subroutine.
-
-

SOURCE

-
  SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dset_id      ! Dataset identifier
-    TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference
-    INTEGER(HID_T), INTENT(OUT) :: space_id    ! Space identifier
-    INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Sf_c.html b/fortran/doc/DevelGuide/src/H5Sf_c.html deleted file mode 100644 index ebdedf7..0000000 --- a/fortran/doc/DevelGuide/src/H5Sf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Sf.c - - - - - -
-
- -

H5Sf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5S Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Sff_f90.html b/fortran/doc/DevelGuide/src/H5Sff_f90.html deleted file mode 100644 index c26b191..0000000 --- a/fortran/doc/DevelGuide/src/H5Sff_f90.html +++ /dev/null @@ -1,1165 +0,0 @@ - - - - - - - -./src/H5Sff.f90 - - - - - -
-
- -

H5S

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5S
-
-

FILE

-
  fortran/src/H5Sff.f90
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5S functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5sclose_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sclose_f
-
-

PURPOSE

-
  Releases and terminates access to a dataspace.
-
-

INPUTS

-
  space_id    - identifier of dataspace to release
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sclose_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5scopy_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5scopy_f
-
-

PURPOSE

-
  Creates an exact copy of a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  new_space_id  - identifier of dataspace's copy
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HID_T), INTENT(OUT) :: new_space_id
-                                             ! Identifier of dataspace's copy
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5screate_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5screate_f
-
-

PURPOSE

-
  Creates a new dataspace of a specified type.
-
-

INPUTS

-
  classtype   - the type of the dataspace to be created
-
-

OUTPUTS

-
  space_id    - dataspace identifier
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5screate_f(classtype, space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: classtype     ! The type of the dataspace
-                                                 ! to be created.
-                                                 ! Possible values are:
-                                                 !  H5S_SCALAR_F (0)
-                                                 !  H5S_SIMPLE_F(1)
-                                                 !  H5S_NULL_F(2)
-            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5screate_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5screate_simple_f
-
-

PURPOSE

-
  Creates a new simple data space and opens it for access      .
-
-

INPUTS

-
  rank        - number of dimensions
-  dims        - an array of the size of each dimension
-
-

OUTPUTS

-
  space_id    - dataspace identifier
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  maxdims     - an array of the maximum size of each dimension
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims)
-
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: rank             ! Number of dataspace dimensions
-            INTEGER(HSIZE_T), INTENT(IN) :: dims(rank)
-                                                    ! Array with the dimension
-                                                    ! sizes
-            INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-            INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank)
-                                                    ! Array with the maximum
-                                                    ! dimension sizes
-
- -
- -

H5Sdecode_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  H5Sdecode_f
-
-

PURPOSE

-
  Decode a binary object description of data space and return a new object handle.
-
-

INPUTS

-
  buf   -  Buffer for the data space object to be decoded.
-  obj_id        - Object ID
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 26, 2008
-
-

SOURCE

-
  SUBROUTINE h5sdecode_f(buf, obj_id, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
-    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

H5Sencode_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  H5Sencode_f
-
-

PURPOSE

-
  Encode a data space object description into a binary buffer.
-
-

INPUTS

-
  obj_id        - Identifier of the object to be encoded.
-  buf   - Buffer for the object to be encoded into.
-  nalloc        - The size of the allocated buffer.
-
-

OUTPUTS

-
  nalloc        - The size of the buffer needed.
-  hdferr      - Returns 0 if successful and -1 if fails.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  March 26, 2008
-
-

SOURCE

-
  SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
-    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
-    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5sextent_copy_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sextent_copy_f
-
-

PURPOSE

-
  Copies the extent of a dataspace.
-
-

INPUTS

-
  dest_space_id         - the identifier for the dataspace to which
-  the extent is copied
-  source_space_id       - the identifier for the dataspace from
-  which the extent is copied
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

NOTES

-

SOURCE

-
          SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: dest_space_id  ! Identifier of destination
-                                                         ! dataspace
-            INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source
-                                                          ! dataspace
-            INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5sextent_equal_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sextent_equal_f
-
-

PURPOSE

-
  Determines whether two dataspace extents are equal.
-
-

INPUTS

-
  space1_id     - First dataspace identifier.
-  space2_id     - Second dataspace identifier.
-
-

OUTPUTS

-
  Equal         - .TRUE. if equal, .FALSE. if unequal.
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 2, 2008
-
-

SOURCE

-
  SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier.
-    INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier.
-    LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal.
-    INTEGER, INTENT(OUT) :: hdferr                ! Error code
-
- -
- -

h5sget_select_bounds_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_bounds_f
-
-

PURPOSE

-
  Gets the bounding box containing the current selection.
-
-

INPUTS

-
  space_id    - dataspace identifier
-
-

OUTPUTS

-
  start       - starting coordinates of bounding box
-  end         - ending coordinates of bounding box
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
  SUBROUTINE  h5sget_select_bounds_f(space_id, start, END, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start
-                                           ! Starting coordinates of the bounding box.
-    INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END
-                                           !Ending coordinates of the bounding box,
-                                           !i.e., the coordinates of the diagonally
-                                           !opposite corner
-    INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sget_select_elem_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_elem_npoints_f
-
-

PURPOSE

-
  Gets the number of element points in the current selection
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  num_points    - number of element points in the current
-                  dataspace selection
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: num_points
-                                             !number of element points
-                                             !in the current dataspace
-                                             !selection
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_elem_pointlist_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_elem_pointlist_f
-
-

PURPOSE

-
  Gets the list of element points currently selected.
-
-

INPUTS

-
  space_id    - dataspace identifier
-  startpoint  - element point to start with
-  num_points  - number of elemnt points to get
-
-

OUTPUTS

-
  buf         - buffer with element points selected
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, &
-                                                    num_points, buf, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(IN) :: startpoint
-                                             !Element point to start with.
-            INTEGER(HSIZE_T), INTENT(IN) :: num_points
-                                             !Number of element points to get
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
-                                             !List of element points selected
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_hyper_blocklist_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_hyper_blocklist_f
-
-

PURPOSE

-
  Gets the list of hyperslab blocks currently selected.
-
-

INPUTS

-
  space_id    - dataspace identifier
-  startblock  - hyperslab block to start with
-  num_blocks  - number of blocks to get
-
-

OUTPUTS

-
  buf         - buffer to hold block list
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, &
-                                                    num_blocks, buf, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(IN) :: startblock
-                                             !Hyperslab block to start with.
-            INTEGER(HSIZE_T), INTENT(IN) :: num_blocks
-                                             !number of hyperslab blocks
-                                             !to get in the current dataspace
-                                             !selection
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf
-                                             !List of hyperslab blocks selected
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_hyper_nblocks_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_hyper_nblocks_f
-
-

PURPOSE

-
  Get number of hyperslab blocks.
-
-

INPUTS

-
  space_id    - dataspace identifier
-
-

OUTPUTS

-
  num_blocks  - number of hyperslab blocks in the current
-                hyperslab selection
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks
-                                             !number of hyperslab blocks
-                                             !in the current dataspace
-                                             !selection
-            INTEGER, INTENT(OUT) :: hdferr   ! Error code
-
- -
- -

h5sget_select_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_npoints_f
-
-

PURPOSE

-
  Determines the number of elements in a dataspace selection.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  npoints       - number of points in the dataspace selection
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER(HSSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in the
-                                                       ! selection
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_select_type_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_select_type_f
-
-

PURPOSE

-
  Retrieve the type of selection
-
-

INPUTS

-
  space_id      - dataspace iidentifier with selection
-
-

OUTPUTS

-
  type          - flag, valid values are:
-                    H5S_SEL_ERROR_F
-                    H5S_SEL_NONE_F
-                    H5S_SEL_POINTS_F
-                    H5S_SEL_HYPERSLABS_F
-                    H5S_SEL_ALL_F
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  October 7, 2002
-
-

SOURCE

-
          SUBROUTINE h5sget_select_type_f(space_id, type, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to
-            INTEGER, INTENT(OUT) :: type        ! Selection type
-                                                !  H5S_SEL_ERROR_F
-                                                !  H5S_SEL_NONE_F
-                                                !  H5S_SEL_POINTS_F
-                                                !  H5S_SEL_HYPERSLABS_F
-                                                !  H5S_SEL_ALL_F
-            INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5sget_simple_extent_dims_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_dims_f
-
-

PURPOSE

-
  Retrieves dataspace dimension size and maximum size.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  dims          - array to store size of each dimension
-  maxdims       - array to store maximum size of each
-  dimension
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims
-                                                   ! Array to store dimension sizes
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims
-                                                   ! Array to store max dimension
-                                                   ! sizes
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code: -1 on failure,
-                                                   ! number of dimensions on
-                                                   ! on success
-
- -
- -

h5sget_simple_extent_ndims_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_ndims_f
-
-

PURPOSE

-
  Determines the dimensionality of a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  rank          - number of dataspace dimensions
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: rank               ! Number of dimensions
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_simple_extent_npoints_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_npoints_f
-
-

PURPOSE

-
  Determines the number of elements in a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  npoints       - number of elements in the dataspace
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id     ! Dataspace identifier
-            INTEGER(HSIZE_T), INTENT(OUT) :: npoints  ! Number of elements in
-                                                       ! dataspace
-            INTEGER, INTENT(OUT) :: hdferr             ! Error code
-
- -
- -

h5sget_simple_extent_type_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sget_simple_extent_type_f
-
-

PURPOSE

-
  Determine the current class of a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  classtype     - class type, possible values are:
-  H5S_NO_CLASS_F (-1)
-  H5S_SCALAR_F (0)
-  H5S_SIMPLE_F (1)
-  H5S_NULL_F   (2)
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: classtype      ! Class type , possible values
-                                                   ! are:
-                                                   !  H5S_NO_CLASS_F (-1)
-                                                   !  H5S_SCALAR_F (0)
-                                                   !  H5S_SIMPLE_F (1)
-                                                   !  H5S_NULL_F   (2)
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sis_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sis_simple_f
-
-

PURPOSE

-
  Determines whether a dataspace is a simple dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  status        - flag to indicate if dataspace
-  is simple or not
-  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sis_simple_f(space_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if dataspace
-                                                ! is simple or not ( TRUE or
-                                                ! FALSE)
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5soffset_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5soffset_simple_f
-
-

PURPOSE

-
  Sets the offset of a simple dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-  offset        - the offset at which to position the
-  selection
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  NONE
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) ::  offset
-                                                   ! The offset at which to position
-                                                   ! the selection
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- -

h5sselect_all_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_all_f
-
-

PURPOSE

-
  Selects the entire dataspace.
-
-

INPUTS

-
  space_id    - Identifier for the dataspace in which
-                selection being made
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_all_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sselect_elements_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_elements_f
-
-

PURPOSE

-
  Selects elements to be included in the selection for
-  a dataspace
-
-

INPUTS

-
  space_id      - dataspace identifier
-  operator      - flag, valid values are:
-                   H5S_SELECT_SET_F 
-                   H5S_SELECT_APPEND_F 
-                   H5S_SELECT_PREPEND_F
-  rank          - number of dataspace dimensions
-  num_elements  - number of elements to be selected
-  coord         - 2D (rank x num_elements) array with the
-                  elements coordinates ( 1-based); in C the
-                  array is stored in 2D as (num_element x rank)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
  SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, &
-       num_elements, coord, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T),   INTENT(IN)                                :: space_id
-    INTEGER,          INTENT(IN)                                :: OPERATOR
-    INTEGER,          INTENT(IN)                                :: rank
-    INTEGER(SIZE_T),  INTENT(IN)                                :: num_elements
-    INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord
-    INTEGER,          INTENT(OUT)                               :: hdferr 
-
- -
- -

h5sselect_hyperslab_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_hyperslab_f
-
-

PURPOSE

-
  Selects a hyperslab region to add to the current selected
-  region
-
-

INPUTS

-
  space_id      - dataspace identifier
-  operator      - flag, valid values are:
-  H5S_SELECT_SET_F (0)
-  H5S_SELECT_OR_F (1)
-  start         - array with hyperslab offsets
-  count         - number of blocks included in the
-  hyperslab
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  stride        - array with hyperslab strides
-  block         - array with hyperslab block sizes
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, &
-                                           hdferr, stride, block)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(IN) :: operator     ! Flag, valid values are:
-                                                ! H5S_SELECT_SET_F (0)
-                                                ! H5S_SELECT_OR_F (1)
-                                                !
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start
-                                          ! Starting coordinates of the hyperslab
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count
-                                          ! Number of blocks to select
-                                          ! from dataspace
-            INTEGER, INTENT(OUT) :: hdferr     ! Error code
-            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride
-                                          ! Array of how many elements to move
-                                          ! in each direction
-            INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block
-                                          ! Sizes of element block
-
- -
- -

h5sselect_none_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_none_f
-
-

PURPOSE

-
  Resets the selection region to include no elements.
-
-

INPUTS

-
  space_id    - the identifier for the dataspace in which
-                the selection is being reset.
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_none_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sselect_valid_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sselect_valid_f
-
-

PURPOSE

-
  Verifies that the selection is within the extent of
-  the dataspace.
-
-

INPUTS

-
  space_id      - identifier for the dataspace for which
-  selection is verified
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sselect_valid_f(space_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            LOGICAL, INTENT(OUT) :: status          ! TRUE if the selection is
-                                                    ! contained within the extent,
-                                                    ! FALSE otherwise.
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sset_extent_none_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sset_extent_none_f
-
-

PURPOSE

-
  Removes the extent from a dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sset_extent_none_f(space_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id  ! Dataspace identifier
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5sset_extent_simple_f

- -

[ Top ] [ H5S ] [ Subroutines ]

-

NAME

-
  h5sset_extent_simple_f
-
-

PURPOSE

-
  Sets or resets the size of an existing dataspace.
-
-

INPUTS

-
  space_id      - dataspace identifier
-  rank          - dataspace number of dimensions
-  current_size          - array with the new sizes of dimensions
-  maximum_size          - array with the new maximum sizes of
-  dimensions
-
-

OUTPUTS

-
  hdferr      - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 6, 2001
-
-

SOURCE

-
          SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, &
-                                            maximum_size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
-            INTEGER, INTENT(IN) :: rank            ! Dataspace rank
-            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size
-                                                   ! Array with the new sizes
-                                                   ! of dimensions
-            INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size
-                                                   ! Array with the new maximum
-                                                   ! sizes of dimensions
-                                                   ! sizes
-            INTEGER, INTENT(OUT) :: hdferr         ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Tf_c.html b/fortran/doc/DevelGuide/src/H5Tf_c.html deleted file mode 100644 index b36c2a5..0000000 --- a/fortran/doc/DevelGuide/src/H5Tf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Tf.c - - - - - -
-
- -

H5Tf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5T Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Tff_f90.html b/fortran/doc/DevelGuide/src/H5Tff_f90.html deleted file mode 100644 index 3b7dfe8..0000000 --- a/fortran/doc/DevelGuide/src/H5Tff_f90.html +++ /dev/null @@ -1,2378 +0,0 @@ - - - - - - - -./src/H5Tff.f90 - - - - - -
-
- -

H5T

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5T
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5T functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5tarray_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tarray_create_f
-
-

PURPOSE

-
  Creates an array datatype object.
-
-

INPUTS

-
  base_id       - datatype identifier for the array
-                  base datatype
-  rank          - rank of the array
-  dims          - array dimension sizes
-
-

OUTPUTS

-
  type_id       - array datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype
-            INTEGER, INTENT(IN) ::  rank ! Rank of the array
-            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension
-            INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tclose_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tclose_f
-
-

PURPOSE

-
  Releases a datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tclose_f(type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tcommit_anon_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommit_anon_f
-
-

PURPOSE

-
  Commits a transient datatype to a file,
-  creating a new named datatype,
-  but does not link it into the file structure.
-
-

INPUTS

-
  loc_id        - A file or group identifier specifying the file
-                  in which the new named datatype is to be created.
-  dtype_id      - A datatype identifier.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  tcpl_id       - A datatype creation property list identifier.
-                  (H5P_DEFAULT_F for the default property list.)
-  tapl_id       - A datatype access property list identifier.
-                  should always be passed as the value H5P_DEFAULT_F.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 25, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! A file or group identifier specifying
-                                          ! the file in which the new named datatype
-                                          ! is to be created.
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property
-                                                    ! list identifier.
-                                                    ! (H5P_DEFAULT_F for the default property list.)
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier.
-                                                    ! should always be passed as the value H5P_DEFAULT_F.
-
- -
- -

h5tcommit_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommit_f
-
-

PURPOSE

-
  Commits a transient datatype to a file, creating a
-  new named datatype.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - name of the datatype to be stored
-                  at the specified location
-  type_id       - identifier of a datatype to be stored
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  lcpl_id       - Link creation property list
-  tcpl_id       - Datatype creation property list
-  tapl_id       - Datatype access property list
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
        - Explicit Fortran interfaces were added for
-          called C functions (it is needed for Windows
-          port).  March 7, 2001
-
-        - Added optional parameters introduced in version 1.8
-          M. Scot Breitenfeld
-
-

SOURCE

-
  SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, &
-       lcpl_id, tcpl_id, tapl_id  )
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name
-                                  ! Datatype name within file or group
-    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr          ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list
-
- -
- -

h5tcommitted_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcommitted_f
-
-

PURPOSE

-
  Determines whether a datatype is a named type or a transient type.
-
-

INPUTS

-
  dtype_id      - A datatype identifier.
-
-

OUTPUTS

-
  committed     - .TRUE., if the datatype has been committed
-                  .FALSE., if the datatype has not been committed.
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  February 25, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! A datatype identifier
-    LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed
-                                      !.FALSE., if the datatype has not been committed.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
-!  Success:  0
-!  Failure: -1
-
- -
- -

h5tcompiler_conv_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcompiler_conv_f
-
-

PURPOSE

-
  Check whether the library’s default conversion is hard conversion.R
-
-

INPUTS

-
  src_id        - Identifier for the source datatype.
-  dst_id        - Identifier for the destination datatype.
-
-

OUTPUTS

-
  flag          - TRUE for compiler conversion, FALSE for library conversion
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype.
-    INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype.
-    LOGICAL, INTENT(OUT) :: flag  ! .TRUE. for compiler conversion, .FALSE. for library conversion
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code:
-                                    ! 0 on success and -1 on failure
-
- -
- -

h5tcopy_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcopy_f
-
-

PURPOSE

-
  Creates a copy of exisiting datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  new_type_id   - identifier of datatype's copy
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: new_type_id
-                                 ! Identifier of datatype's copy
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tcreate_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tcreate_f
-
-

PURPOSE

-
  Creates a new dataype
-
-

INPUTS

-
  class         - datatype class, possible values are:
-                    H5T_COMPOUND_F
-                    H5T_ENUM_F
-                    H5T_OPAQUE_F
-  size          - datattype size
-
-

OUTPUTS

-
  type_id       - datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tcreate_f(class, size, type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER, INTENT(IN) :: class ! Datatype class can be one of
-                                         ! H5T_COMPOUND_F
-                                         ! H5T_ENUM_F
-                                         ! H5T_OPAQUE_F
-            INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the datatype
-            INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Tdecode_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  H5Tdecode_f
-
-

PURPOSE

-
  Decode a binary object description of data type and return a new object handle.
-
-

INPUTS

-
  buf           -  Buffer for the data space object to be decoded.
-  obj_id        - Object ID
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tdecode_f(buf, obj_id, hdferr)
-    IMPLICIT NONE
-    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
-    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5tenaum_insert_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenaum_insert_f
-
-

PURPOSE

-
  Inserts a new enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_insert_f(type_id,  name, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of  the new member
-            INTEGER, INTENT(IN) :: value !value of the new member
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

H5Tencode_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  H5Tencode_f
-
-

PURPOSE

-
  Encode a data type object description into a binary buffer.
-
-

INPUTS

-
  obj_id        - Identifier of the object to be encoded.
-  buf           - Buffer for the object to be encoded into.
-  nalloc        - The size of the allocated buffer.
-
-

OUTPUTS

-
  nalloc        - The size of the buffer needed.
-  hdferr        - Returns 0 if successful and -1 if fails.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
-    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
-    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
-    INTEGER, INTENT(OUT) :: hdferr     ! Error code
-
- -
- -

h5tenum_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_create_f
-
-

PURPOSE

-
  Creates a new enumeration datatype.
-
-

INPUTS

-
  parent_id     - datatype identifier for base datatype
-
-

OUTPUTS

-
  new_type_id   - datatype identifier for the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: parent_id  ! Datatype identifier for
-                                                     ! the  base datatype
-            INTEGER(HID_T), INTENT(OUT) :: new_type_id
-                                                     !datatype identifier for the
-                                                     ! new enumeration datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tenum_nameof_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_nameof_f
-
-

PURPOSE

-
  Returns the symbol name corresponding to a specified
-  member of an enumeration datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  value         - value of the enumeration datatype
-  namelen       - name buffer size
-
-

OUTPUTS

-
  name          - buffer to hold symbol name
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
- NOTE
-   According to the standard: Because an INTENT(OUT) variable is considered undefined 
-   on entry to the procedure, any default initialization specified for its type will 
-   be applied. So we need to blank out the "name" to be portable and eliminate any 
-   characters the "name' may contain upon entry, depending on compiler implementation.
-
-

SOURCE

-
  SUBROUTINE h5tenum_nameof_f(type_id,  value, namelen, name, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(OUT) :: name  !Name of the  enumeration datatype.
-            INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name
-            INTEGER, INTENT(IN) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tenum_valuof_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tenum_valuof_f
-
-

PURPOSE

-
  Returns the value corresponding to a specified
-  member of an enumeration datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  name          - symbol name
-
-

OUTPUTS

-
  value         - value of the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tenum_valueof_f(type_id,  name, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tequal_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tequal_f
-
-

PURPOSE

-
  Determines whether two datatype identifiers refer
-  to the same datatype.
-
-

INPUTS

-
  type1_id      - datatype identifier
-  type2_id      - datatype identifier
-
-

OUTPUTS

-
  flag          - TRUE/FALSE flag to indicate
-                  if two datatypes are equal
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier
-            INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier
-            LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two
-                                         ! datatypes are equal
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_array_dims_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_array_dims_f
-
-

PURPOSE

-
  Returns sizes of array dimensions.
-
-

INPUTS

-
  type_id       - array datatype identifier
-
-

OUTPUTS

-
  dims          - buffer to store array datatype dimensions
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
-            INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) ::  dims !buffer to store array datatype
-                                                                ! dimensions
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_array_ndims_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_array_ndims_f
-
-

PURPOSE

-
  Returns the rank of an array datatype.
-
-

INPUTS

-
  type_id       - array datatype identifier
-
-

OUTPUTS

-
  ndims         - number of array dimensions
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
-            INTEGER, INTENT(OUT) ::  ndims ! number of array dimensions
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_class_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_class_f
-
-

PURPOSE

-
  Returns the datatype class identifier.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  class         - class, possible values are:
-                   H5T_NO_CLASS_F (-1)
-                   H5T_INTEGER_F  (0)
-                   H5T_FLOAT_F (1)
-                   H5T_TIME_F  (2)
-                   H5T_STRING_F (3)
-                   H5T_BITFIELD_F (4)
-                   H5T_OPAQUE_F (5)
-                   H5T_COMPOUND_F (6)
-                   H5T_REFERENCE_F (7)
-                   H5T_ENUM_F (8)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_class_f(type_id, class, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: class
-                           ! Datatype class, possible values are:
-                                          ! H5T_NO_CLASS_F (-1)
-                                          ! H5T_INTEGER_F  (0)
-                                          ! H5T_FLOAT_F (1)
-                                          ! H5T_TIME_F  (2)
-                                          ! H5T_STRING_F (3)
-                                          ! H5T_BITFIELD_F (4)
-                                          ! H5T_OPAQUE_F (5)
-                                          ! H5T_COMPOUND_F (6)
-                                          ! H5T_REFERENCE_F (7)
-                                          ! H5T_ENUM_F (8)
-          INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_create_plist_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_create_plist_f
-
-

PURPOSE

-
  Returns a copy of a datatype creation property list.
-
-

INPUTS

-
  dtype_id      - Datatype identifier
-
-

OUTPUTS

-
  dtpl_id       - Datatype property list identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  April 9, 2008
-
-

SOURCE

-
  SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER(HID_T), INTENT(OUT) :: dtpl_id  ! Datatype property list identifier.
-    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
-                                         ! 0 on success and -1 on failure
-
- -
- -

h5tget_cset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_cset_f
-
-

PURPOSE

-
  Retrieves the character set type of a string datatype.
-
-

INPUTS

-
  type_id  - Datatype identifier
-
-

OUTPUTS

-
  cset     - Character set type of a string datatype
-              Possible values are:
-              H5T_CSET_ASCII_F = 0
-              H5T_CSET_UTF8_F
-  hdferr   - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_cset_f(type_id, cset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: cset   ! character set type of a string datatype
-                                           !  Possible values are:
-                                           !  H5T_CSET_ASCII_F = 0
-                                           !  H5T_CSET_UTF8_F
-            INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5tget_ebias_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_ebias_f
-
-

PURPOSE

-
  Retrieves the exponent bias of a floating-point type.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  ebias         - datatype exponent bias
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_fields_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_fields_f
-
-

PURPOSE

-
  Retrieves floating point datatype bit field information.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  spos          - sign bit-position
-  epos          - exponent bit-position
-  esize         - size of exponent in bits
-  mpos          - mantissa position
-  msize         - size of mantissa in bits
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: spos   ! sign bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: epos   ! exponent bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: esize  ! size of exponent in bits
-            INTEGER(SIZE_T), INTENT(OUT) :: mpos   ! mantissa bit-position
-            INTEGER(SIZE_T), INTENT(OUT) :: msize  ! size of mantissa in bits
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_inpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_inpad_f
-
-

PURPOSE

-
  Retrieves the internal padding type for unused bits
-  in floating-point datatypes.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  padtype       - padding type for unused bits
-                  Possible values of padding type are:
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits
-                                            ! in floating-point datatypes.
-                                            ! Possible values of padding type are:
-                                            ! H5T__PAD_ZERO_F = 0
-                                            ! H5T__PAD_ONE_F = 1
-                                            ! H5T__PAD_BACKGROUND_F = 2
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_class_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_class_f
-
-

PURPOSE

-
  Returns datatype class of compound datatype member.
-
-

INPUTS

-
  type_id       - datartpe identifier
-  member_no     - index of compound datatype member
-
-

OUTPUTS

-
  class         - class type for compound dadtype member
-                  Valid classes:
-                    H5T_NO_CLASS_F (error)
-                    H5T_INTEGER_F
-                    H5T_FLOAT_F
-                    H5T_TIME_F
-                    H5T_STRING_F
-                    H5T_BITFIELD_F
-                    H5T_OPAQUE_F
-                    H5T_COMPOUND_F
-                    H5T_REFERENCE_F
-                    H5T_ENUM_F
-                    H5T_VLEN_F
-                    H5T_ARRAY_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  April 6, 2005
-
-

SOURCE

-
  SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            INTEGER, INTENT(IN)       :: member_no  ! Member number
-            INTEGER, INTENT(OUT)     :: class      ! Member class
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5tget_member_index_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_index_f
-
-

PURPOSE

-
  Retrieves the index of a compound or enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-  name          - name of the field or member whose index to
-  to be retrieved from the datatype.
-
-

OUTPUTS

-
  index         - 0-based index of the filed or member (0 to N-1)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  September 26, 2002
-
-

SOURCE

-
  SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name   ! Field or member name
-            INTEGER, INTENT(OUT) :: index          ! Field or member index
-            INTEGER, INTENT(OUT) :: hdferr          ! Error code
-
- -
- -

h5tget_member_name_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_name_f
-
-

PURPOSE

-
  Retrieves the name of a field of a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  index         - filed index (0-based)
-
-

OUTPUTS

-
  member_name   - buffer to hold member's name
-  namelen       - name length
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_name_f(type_id, index, member_name,  namelen, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve
-            CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of
-                                                         !a compound datatype
-            INTEGER, INTENT(OUT) :: namelen ! Length of the name
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_offset_f
-
-

PURPOSE

-
  Retrieves the offset of a field of a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  member_no     - number of the field
-
-

OUTPUTS

-
  offset        - byte offset of the requested field
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: member_no !Number of the field
-                                                       !whose offset is requested
-            INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_type_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_type_f
-
-

PURPOSE

-
  Returns the datatype of the specified member.
-
-

INPUTS

-
  type_id       - compound datatype identifier
-  field_idx     - field index (0-based)
-
-

OUTPUTS

-
  datatype      - idnetifier of the member's datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_type_f(type_id,  field_idx, datatype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve
-            INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of
-                                                    !the datatype of the field
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_member_value_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_member_value_f
-
-

PURPOSE

-
  Returns the value of an enumeration datatype member.
-
-

INPUTS

-
  type_id       - datatype identifier
-  member_no     - number of the enumeration datatype member
-
-

OUTPUTS

-
  value         - value of the enumeration datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_member_value_f(type_id,  member_no, value, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member
-            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_native_type_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_native_type_f
-
-

PURPOSE

-
  Returns the native datatype of a specified datatype.
-
-

INPUTS

-
  dtype_id      - Datatype identifier for the dataset datatype.
-  
-  direction     - Direction of search:
-                  H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent */
-                  H5T_DIR_ASCEND      = 1,    /*in inscendent order             */
-                  H5T_DIR_DESCEND     = 2     /*in descendent order             */
-  * NOTE: In C it is defined as a structure: H5T_direction_t
-
-

OUTPUTS

-
  native_dtype_id - The native datatype identifier for the specified dataset datatype
-  hdferr          - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  June 18, 2008
-
-

SOURCE

-
  SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
-    INTEGER, INTENT(IN) :: direction  ! Direction of search:
-                                      ! H5T_DIR_ASCEND_F      = 1  in inscendent order
-                                      ! H5T_DIR_DESCEND_F     = 2  in descendent order
-    INTEGER(HID_T), INTENT(OUT) :: native_dtype_id  ! The native datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
-                                      ! 0 on success and -1 on failure
-
- -
- -

h5tget_nmembers_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_nmembers_f
-
-

PURPOSE

-
  Retrieves the number of fields in a compound datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  num_members   - number of members
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_norm_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_norm_f
-
-

PURPOSE

-
  Retrieves mantissa normalization of a floating-point
-  datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  norm          - normalization types, valid values are:
-                    H5T_NORM_IMPLIED_F(0)
-                    H5T_NORM_MSBSET_F(1)
-                    H5T_NORM_NONE_F(2)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_norm_f(type_id, norm, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype
-                                         !Valid normalization types are:
-                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
-                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
-                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
-                                         !Mantissa is not normalize
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_offset_f
-
-

PURPOSE

-
  Retrieves the bit offset of the first significant bit.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  offset        - offset value
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_offset_f(type_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the
-                                           ! first significant bit
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_order_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_order_f
-
-

PURPOSE

-
  Returns the byte order of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  order         - byte order for the datatype, possible
-                  values are:
-                    H5T_ORDER_LE_F
-                    H5T_ORDER_BE_F
-                    H5T_ORDER_VAX_F (not implemented yet)
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_order_f(type_id, order, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-    INTEGER, INTENT(OUT) :: order
-                                    ! Datatype byte order, possible values are:
-                                    ! H5T_ORDER_LE_F
-                                    ! H5T_ORDER_BE_F
-                                    ! H5T_ORDER_VAX_F
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- -

h5tget_pad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_pad_f
-
-

PURPOSE

-
  Retrieves the padding type of the least and
-  most          -significant bit padding.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  lsbpad        - least-significant bit padding type
-  msbpad        - most-significant bit padding type
-                  Possible values of padding type are:
-                    H5T_PAD_ERROR_F      = -1
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-                    H5T_PAD_NPAD_F      = 3
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: lsbpad ! padding type of the
-                                           ! least significant bit
-            INTEGER, INTENT(OUT) :: msbpad ! padding type of the
-                                           ! most significant bit
-                                           ! Possible values of padding type are:
-                                           ! H5T__PAD_ZERO_F = 0
-                                           ! H5T__PAD_ONE_F = 1
-                                           ! H5T__PAD_BACKGROUND_F = 2
-                                           ! H5T_PAD_ERROR_F      = -1
-                                           ! H5T_PAD_NPAD_F      = 3
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_precision_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_precision_f
-
-

PURPOSE

-
  Returns the precision of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  precision     - precision of the datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_precision_f(type_id, precision, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_sign_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_sign_f
-
-

PURPOSE

-
  Retrieves the sign type for an integer type.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  sign          - sign type
-                  Possible values are:
-                    - Unsigned integer type 
-                        H5T_SGN_NONE_F = 0
-                    - Two's complement signed integer type
-                        H5T_SGN_2_F = 1
-                    - error value: H5T_SGN_ERROR_F=-1
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_sign_f(type_id, sign, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: sign ! sign type for an integer type
-                                         !possible values are:
-                                         !Unsigned integer type H5T_SGN_NONE_F = 0
-                                         !Two's complement signed integer type
-                                         !H5T_SGN_2_F = 1
-                                         !or error value: H5T_SGN_ERROR_F=-1
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_size_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_size_f
-
-

PURPOSE

-
  Returns the size of a datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  size          - datatype size
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_size_f(type_id, size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_strpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_strpad_f
-
-

PURPOSE

-
  Retrieves the storage mechanism for a string datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  strpad        - storage method for a string datatype
-                  Possible values are:
-                    H5T_STR_NULLTERM_F,
-                    H5T_STR_NULLPAD_F,
-                    H5T_STR_SPACEPAD_F
-                    H5T_STR_ERROR_F
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: strpad
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_super_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_super_f
-
-

PURPOSE

-
  Returns the base datatype from which a datatype is derived.
-
-

INPUTS

-
  type_id       - datatype identifier
-
-

OUTPUTS

-
  base_type_id          - identifier of the base type
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype
-                                           ! from which datatype (type_id) was derived
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tget_tag_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tget_tag_f
-
-

PURPOSE

-
  Gets the tag associated with an opaque datatype.
-
-

INPUTS

-
  type_id       - identifier for opaque datatype
-
-

OUTPUTS

-
  tag           - unique ASCII string associated with opaque
-                  datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(OUT) :: tag  ! Unique ASCII string with which
-                                                  !  the opaque datatype is to be tagged
-            INTEGER, INTENT(OUT) :: taglen        ! Length of tag
-            INTEGER(SIZE_T)      :: tag_size      ! Declared character length of tab 
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tinsert_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tinsert_f
-
-

PURPOSE

-
  Adds a new member to a compound datatype.
-
-

INPUTS

-
  type_id       - compound dattype identifier
-  name          - name of the field to insert
-  offset        - start of the member in an instance of
-                  the compound datatype
-  field_id      - datatype identifier of the field to insert
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tinsert_f(type_id,  name, offset, field_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert
-            INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of
-                                                   !the compound datatype
-            INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member
-
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tis_variable_str_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tis_variable_str_f
-
-

PURPOSE

-
  Determines whether a dattype is a variable string.
-
-

INPUTS

-
  type_id       - datartpe identifier
-
-

OUTPUTS

-
  status        - flag to indicate if datatype
-                  is a variable string
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
-            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if datatype
-                                                ! is a variable string or not ( TRUE or
-                                                ! FALSE)
-            INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5topen_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5topen_f
-
-

PURPOSE

-
  Opens named datatype.
-
-

INPUTS

-
  loc_id        - location identifier
-  name          - a datatype name
-
-

OUTPUTS

-
  type_id       - datatype identifier
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

OPTIONAL PARAMETERS

-
  tapl_id       - datatype access property list identifier.
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-  Added optional parameter 'tapl_id' for compatability
-  with H5Topen2. April 9, 2009.
-
-

SOURCE

-
  SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
-    CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group
-    INTEGER(HID_T), INTENT(OUT) :: type_id  ! Datatype identifier
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier
-
- -
- -

h5tpack_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tpack_f
-
-

PURPOSE

-
  Recursively removes padding from within a compound datatype.
-
-

INPUTS

-
  type_id       - compound datatype identifier
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tpack_f(type_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_cset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_cset_f
-
-

PURPOSE

-
  Sets character set to be used.
-
-

INPUTS

-
  type_id       - datatype identifier
-  cset          - character set type of a string datatype
-                    Possible values are:
-                     H5T_CSET_ASCII_F = 0
-                     H5T_CSET_UTF8_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_cset_f(type_id, cset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: cset !character set type of a string datatype
-                                           ! Possible values of padding type are:
-                                           ! H5T_CSET_ASCII_F = 0
-                                           ! H5T_CSET_UTF8_F
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_ebias_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_ebias_f
-
-

PURPOSE

-
  Sets the exponent bias of a floating-point type.
-
-

INPUTS

-
  type_id       - datatype identifier
-  ebias         - datatype exponent bias
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_fields_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_fields_f
-
-

PURPOSE

-
  Sets locations and sizes of floating point bit fields.
-
-

INPUTS

-
  type_id       - datatype identifier
-  spos          - sign bit-position
-  epos          - exponent bit-position
-  esize         - size of exponent in bits
-  mpos          - mantissa position
-  msize         - size of mantissa in bits
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: spos   ! sign bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: epos   ! exponent bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: esize  ! size of exponent in bits
-            INTEGER(SIZE_T), INTENT(IN) :: mpos   ! mantissa bit-position
-            INTEGER(SIZE_T), INTENT(IN) :: msize  ! size of mantissa in bits
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_inpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_inpad_f
-
-

PURPOSE

-
  Fills unused internal floating point bits.
-
-

INPUTS

-
  type_id       - datatype identifier
-  padtype       - padding type for unused bits
-                  Possible values of padding type are:
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: padtype ! padding type for unused bits
-                                           ! in floating-point datatypes.
-                                           ! Possible values of padding type are:
-                                           ! H5T__PAD_ZERO_F = 0
-                                           ! H5T__PAD_ONE_F = 1
-                                           ! H5T__PAD_BACKGROUND_F = 2
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_norm_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_norm_f
-
-

PURPOSE

-
  Sets the mantissa normalization of a floating-point datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  norm          - normalization types, valid values are:
-                    H5T_NORM_IMPLIED_F(0)
-                    H5T_NORM_MSBSET_F(1)
-                    H5T_NORM_NONE_F(2)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_norm_f(type_id, norm, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype
-                                         !Valid normalization types are:
-                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
-                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
-                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
-                                         !Mantissa is not normalize
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_offset_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_offset_f
-
-

PURPOSE

-
  Sets the bit offset of the first significant bit.
-
-

INPUTS

-
  type_id       - datatype identifier
-  offset        - offset value
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_offset_f(type_id, offset, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the
-                                           ! first significant bit
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_order_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_order_f
-
-

PURPOSE

-
  Sets the byte ordering of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  order         - datatype byte order Possible values are:
-                    H5T_ORDER_LE_F
-                    H5T_ORDER_BE_F
-                    H5T_ORDER_VAX_F (not implemented yet)
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_order_f(type_id, order, hdferr)
-    IMPLICIT NONE
-    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-    INTEGER, INTENT(IN) :: order   ! Datatype byte order, possible values
-                                   ! are:
-                                   ! H5T_ORDER_LE_F
-                                   ! H5T_ORDER_BE_F
-                                   ! H5T_ORDER_VAX_F
-    INTEGER, INTENT(OUT) :: hdferr ! Error code
-
- -
- -

h5tset_pad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_pad_f
-
-

PURPOSE

-
  Sets the least and most-significant bits padding types.
-
-

INPUTS

-
  type_id       - datatype identifier
-  lsbpad        - least-significant bit padding type
-  msbpad        - most-significant bit padding type
-                  Possible values of padding type are:
-                    H5T_PAD_ERROR_F      = -1
-                    H5T_PAD_ZERO_F = 0
-                    H5T_PAD_ONE_F = 1
-                    H5T_PAD_BACKGROUND_F = 2
-                    H5T_PAD_NPAD_F      = 3
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: lsbpad ! padding type of the
-                                           ! least significant bit
-            INTEGER, INTENT(IN) :: msbpad ! padding type of the
-                                           ! most significant bit
-                                           ! Possible values of padding type are:
-                                           ! H5T_PAD_ZERO_F = 0
-                                           ! H5T_PAD_ONE_F = 1
-                                           ! H5T_PAD_BACKGROUND_F = 2
-                                           ! H5T_PAD_ERROR_F      = -1
-                                           ! H5T_PAD_NPAD_F      = 3
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_precision_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_precision_f
-
-

PURPOSE

-
  Sets the precision of an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  precision     - datatype precision
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_precision_f(type_id, precision, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_sign_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_sign_f
-
-

PURPOSE

-
  Sets the sign proprety for an integer type.
-
-

INPUTS

-
  type_id       - datatype identifier
-  sign          - sign type
-                  Possible values are:
-                    - Unsigned integer type 
-                        H5T_SGN_NONE_F = 0
-                    - Two's complement signed integer type
-                        H5T_SGN_2_F = 1
-                    - error value: H5T_SGN_ERROR_F=-1
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_sign_f(type_id, sign, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: sign !sign type for an integer type
-                                         !possible values are:
-                                         !Unsigned integer type H5T_SGN_NONE_F = 0
-                                         !Two's complement signed integer type
-                                         !H5T_SGN_2_F = 1
-                                         !or error value: H5T_SGN_ERROR_F=-1
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_size_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_size_f
-
-

PURPOSE

-
  Sets the total size for an atomic datatype.
-
-

INPUTS

-
  type_id       - datatype identifier
-  size          - size of the datatype
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_size_f(type_id, size, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_strpad_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_strpad_f
-
-

PURPOSE

-
  Defines the storage mechanism for character strings.
-
-

INPUTS

-
  type_id       - datatype identifier
-  strpad        - storage method for a string datatype
-                  Possible values are:
-                    H5T_STR_NULLTERM_F,
-                    H5T_STR_NULLPAD_F,
-                    H5T_STR_SPACEPAD_F
-                    H5T_STR_ERROR_F
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tset_tag_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tset_tag_f
-
-

PURPOSE

-
  Tags an opaque datatype.
-
-

INPUTS

-
  type_id       - identifier for opaque datatype
-  tag           - unique ASCII string with which the opaque
-                  datatype is to be tagged.
-
-

OUTPUTS

-
  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  March 7, 2001
-
-

SOURCE

-
  SUBROUTINE h5tset_tag_f(type_id, tag, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
-            CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which
-                                                !the opaque datatype is to be tagged
-            INTEGER, INTENT(OUT) :: hdferr        ! Error code
-
- -
- -

h5tvlen_create_f

- -

[ Top ] [ H5T ] [ Subroutines ]

-

NAME

-
  h5tvlen_create_f
-
-

PURPOSE

-
  Creates a new variable-length datatype.
-
-

INPUTS

-
  type_id       - identifier iof base datatype
-
-

OUTPUTS

-
  vltype_id     - identifier for VL datatype
-  hdferr        - Returns 0 if successful and -1 if fails
-
-

AUTHOR

-
  Elena Pourmal
-  Wednesday, October 23, 2002
-
-

NOTES

-
  Only basic Fortran base datatypes are supported
-
-

SOURCE

-
  SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr)
-            IMPLICIT NONE
-            INTEGER(HID_T), INTENT(IN)  :: type_id    ! Datatype identifier
-            INTEGER(HID_T), INTENT(OUT) :: vltype_id  ! VL datatype identifier
-            INTEGER, INTENT(OUT) :: hdferr            ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Zf_c.html b/fortran/doc/DevelGuide/src/H5Zf_c.html deleted file mode 100644 index 2973548..0000000 --- a/fortran/doc/DevelGuide/src/H5Zf_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5Zf.c - - - - - -
-
- -

H5Zf

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   This file contains C stubs for H5Z Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5Zff_f90.html b/fortran/doc/DevelGuide/src/H5Zff_f90.html deleted file mode 100644 index 8ccd0ae..0000000 --- a/fortran/doc/DevelGuide/src/H5Zff_f90.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - -./src/H5Zff.f90 - - - - - -
-
- -

H5Z

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5Z
-
-

PURPOSE

-
  This file contains Fortran interfaces for H5Z functions. It includes
-  all the functions that are independent on whether the Fortran 2003 functions
-  are enabled or disabled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5zfilter_avail_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zfilter_avail_f
-
-

PURPOSE

-
  Queries if filter is available
-
-

INPUTS

-
  filter        - filter
-
-

OUTPUTS

-
  status        - status; .TRUE. if filter is available,
-                  .FALSE. otherwise
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5zfilter_avail_f(filter, status, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
-                                        !   H5Z_FILTER_DEFLATE_F
-                                        !   H5Z_FILTER_SZIP_F
-                                        !   H5Z_FILTER_NBIT_F
-                                        !   H5Z_FILTER_SCALEOFFSET_F
-                                        !   H5Z_FILTER_SHUFFLE_F
-                                        !   H5Z_FILTER_FLETCHER32_F
-    LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if filter
-                                        ! is availble  not ( TRUE or
-                                        ! FALSE)
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5zget_filter_info_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zget_filter_info_f
-
-

PURPOSE

-
  Queries if filter has its encoder and/or decoder
-  available
-
-

INPUTS

-
  filter        - filter
-
-

OUTPUTS

-
  config_flags  - Bit vector possibly containing the
-                  following values:
-                     H5Z_FILTER_ENCODE_ENABLED_F
-                     H5Z_FILTER_DECODE_ENABLED_F
-  hdferr:       - error code
-                   Success:  0
-                   Failure: -1
-
-

AUTHOR

-
  Nat Furrer and James Laird
-  June 16, 2004
-
-

SOURCE

-
  SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter      ! Filter; may be one of the following:
-                                        !   H5Z_FILTER_DEFLATE_F
-                                        !   H5Z_FILTER_SZIP_F
-                                        !   H5Z_FILTER_NBIT_F
-                                        !   H5Z_FILTER_SCALEOFFSET_F
-                                        !   H5Z_FILTER_SHUFFLE_F
-                                        !   H5Z_FILTER_FLETCHER32_F
-    INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter
-                                        ! has its encoder and/or decoder
-                                        ! available
-    INTEGER, INTENT(OUT) :: hdferr      ! Error code
-
- -
- -

h5zunregister_f

- -

[ Top ] [ H5Z ] [ Subroutines ]

-

NAME

-
  h5zunregister_f
-
-

PURPOSE

-
  Unregisters specified filetr
-
-

INPUTS

-
  filter - filter; may have one of the following values:
-            H5Z_FILTER_DEFLATE_F
-            H5Z_FILTER_SZIP_F
-            H5Z_FILTER_NBIT_F
-            H5Z_FILTER_SCALEOFFSET_F
-            H5Z_FILTER_SHUFFLE_F
-            H5Z_FILTER_FLETCHER32_F
-
-

OUTPUTS

-
  hdferr - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  March 12, 2003
-
-

SOURCE

-
  SUBROUTINE h5zunregister_f(filter, hdferr)
-    IMPLICIT NONE
-    INTEGER, INTENT(IN)  :: filter
-    INTEGER, INTENT(OUT) :: hdferr  ! Error code
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html deleted file mode 100644 index 4e51e7f..0000000 --- a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceExclude_f90.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -./src/H5_DBLE_InterfaceExclude.f90 - - - - - -
-
- -

src/H5_DBLE_InterfaceExclude.f90

- -

[ Top ] [ Modules ]

-

NAME

-
   H5_DBLE_INTERFACE
-
-

FUNCTION

-
   This module is used for when the default REAL is of type DOUBLE PRECISION.
-   We do not include the double precision interfaces if the defaut REAL is
-   DOUBLE PRECISION since this would lead to a non-unique conflict with the
-   generic interfaces declared as REAL and those declared as DOUBLE PRECISION.
-
-

NOTES

-
   Empty module.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html b/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html deleted file mode 100644 index 5a71d52..0000000 --- a/fortran/doc/DevelGuide/src/H5_DBLE_InterfaceInclude_f90.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -./src/H5_DBLE_InterfaceInclude.f90 - - - - - -
-
- -

src/H5_DBLE_InterfaceInclude.f90

- -

[ Top ] [ Modules ]

-

NAME

-
   H5_DBLE_INTERFACE
-
-

FUNCTION

-
   This module is used for when the default REAL is not of the type DOUBLE PRECISION.
-   We only do not include the double precision interfaces if the defaut REAL is
-   DOUBLE PRECISION since this would lead to a non-unique conflict with the
-   generic interfaces declared as REAL. Otherwise it is okay to include the interfaces.
-
-

NOTES

-
   This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines
-   from the HDF function catagory H5A, H5D and H5P.
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_f_c.html b/fortran/doc/DevelGuide/src/H5_f_c.html deleted file mode 100644 index 2bdbce1..0000000 --- a/fortran/doc/DevelGuide/src/H5_f_c.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -./src/H5_f.c - - - - - -
-
- -

fortran/src/H5_f.c

- -

[ Top ] [ Modules ]

-

FUNCTION

-
   This file contains C stubs for H5 Fortran APIs
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html deleted file mode 100644 index 17f07c1..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_F03_f90.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -./src/H5_ff_F03.f90 - - - - - -
-
- -

H5LIB_PROVISIONAL

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB_PROVISIONAL
-
-

PURPOSE

-
  This file contains helper functions for Fortran 2003 features and is
-  only compiled when Fortran 2003 features are enabled, otherwise
-  the file H5_ff_F90.f90 is compiled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5offsetof

- -

[ Top ] [ H5LIB_PROVISIONAL ] [ Functions ]

-

NAME

-
  h5offsetof
-
-

PURPOSE

-
  Computes the offset in memory
-
-

INPUTS

-
  start - starting pointer address
-  end   - ending pointer address
-
-

OUTPUTS

-
  offset - offset
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 25, 2008
-
-

SOURCE

-
  FUNCTION h5offsetof(start,end) RESULT(offset)
-    USE, INTRINSIC :: ISO_C_BINDING
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER(SIZE_T) :: offset
-    TYPE(C_PTR), VALUE, INTENT(IN) :: start, end
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html b/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html deleted file mode 100644 index c310ef2..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_F90_f90.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -./src/H5_ff_F90.f90 - - - - - -
-
- -

H5LIB_PROVISIONAL (F90)

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB_PROVISIONAL
-
-

FILE

-
  fortran/src/H5_ff_F90.f90
-
-

PURPOSE

-
  This file is a dummy module for when Fortran 2003 features are not enabled.
-  It is compiled in place of H5_ff_F03.f90 and is empty.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5_ff_f90.html b/fortran/doc/DevelGuide/src/H5_ff_f90.html deleted file mode 100644 index 021c7c5..0000000 --- a/fortran/doc/DevelGuide/src/H5_ff_f90.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - -./src/H5_ff.f90 - - - - - -
-
- -

H5LIB

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5LIB
-
-

PURPOSE

-
  This module provides fortran specific helper functions for the HDF library
-
-

USES

-
  H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003
-                      only features. If Fortran 2003 functions are enabled then
-                      H5_ff_F03.f90 is compiled, else H5_ff_F90.f90,
-                      which is just a place holder blank module, is compiled.
-
-

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.
-  This is needed for Windows based operating systems.
-
- -
- -

h5check_version_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5check_version_f
-
-

PURPOSE

-
  Verifies that library versions are consistent.
-
-

INPUTS

-
  majnum               - major version of the library
-  minum                - minor version of the library
-  relnum               - release version of the library
-
-

OUTPUTS

-
  error                - error code
-                          Success:  0
-                          Failure:  application aborts
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: majnum, minnum, relnum
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5close_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5close_f
-
-

PURPOSE

-
  Closes the HDF5 library and Fortran90 interface.
-
-

OUTPUTS

-
  error - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5close_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5dont_atexit_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5dont_atexit_f
-
-

PURPOSE

-
  Instructs library not to install atexit cleanup routine.
-
-

OUTPUTS

-
  error  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5dont_atexit_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5garbage_collect_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5garbage_collect_f
-
-

PURPOSE

-
  Garbage collects on all free-lists of all types.
-
-

OUTPUTS

-
  error  - error code
-             Success:  0
-             Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5garbage_collect_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- -

h5get_libversion_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5get_libversion_f
-
-

PURPOSE

-
  Returns the HDF5 LIbrary release number
-
-

OUTPUTS

-
  majnum               - major version of the library
-  minum                - minor version of the library
-  relnum               - release version of the library
-  error                - error code
-                           Success:  0
-                           Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  September 24, 2002
-
-

SOURCE

-
  SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error
-
- -
- -

h5kind_to_type

- -

[ Top ] [ H5LIB ] [ Functions ]

-

NAME

-
  h5kind_to_type
-
-

PURPOSE

-
  Converts the KIND to the correct HDF type
-
-

INPUTS

-
  kind    - Fortran KIND parameter
-  flag    - whether KIND is of type INTEGER or REAL:
-              H5_INTEGER_KIND - integer
-              H5_REAL_KIND    - real
-
-

OUTPUTS

-
  h5_type - returns the type
-
-

AUTHOR

-
  M. Scot Breitenfeld
-  Augest 25, 2008
-
-

SOURCE

-
  INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(IN) :: kind
-    INTEGER, INTENT(IN) :: flag
-
- -
- -

h5open_f

- -

[ Top ] [ H5LIB ] [ Subroutines ]

-

NAME

-
  h5open_f
-
-

PURPOSE

-
  Initializes the HDF5 library and Fortran90 interface.
-
-

OUTPUTS

-
  error - error code
-            Success:  0
-            Failure: -1
-
-

AUTHOR

-
  Elena Pourmal
-  August 12, 1999
-
-

HISTORY

-
  Explicit Fortran interfaces were added for
-  called C functions (it is needed for Windows
-  port).  February 28, 2001
-
-

SOURCE

-
  SUBROUTINE h5open_f(error)
-    USE H5GLOBAL
-    IMPLICIT NONE
-    INTEGER, INTENT(OUT) :: error
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5f90global_f90.html b/fortran/doc/DevelGuide/src/H5f90global_f90.html deleted file mode 100644 index 587b6d0..0000000 --- a/fortran/doc/DevelGuide/src/H5f90global_f90.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - -./src/H5f90global.f90 - - - - - -
-
- -

H5GLOBAL

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE H5GLOBAL
-
-

FILE

-
  src/fortran/H5f90global.f90
-
-

PURPOSE

-
  This module is used to pass C stubs for H5 Fortran APIs. The C stubs are
-  packed into arrays in H5_f.c and these arrays are then passed to Fortran.
-  This module then uses EQUIVALENCE to assign elements of the arrays to
-  Fortran equivalent C stubs.
-
-

NOTES

-
  The size of the C arrays in H5_f.c has to match the values of the variables
-  declared as PARAMETER, hence if the size of an array in H5_f.c is changed
-  then the PARAMETER of that corresponding array in Fortran must also be changed.
-
-

USES

-
  H5FORTRAN_TYPES       - This module is generated at run time. See
-
-

AUTHOR

-
  Elena Pourmal
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5f90kit_c.html b/fortran/doc/DevelGuide/src/H5f90kit_c.html deleted file mode 100644 index 1329a87..0000000 --- a/fortran/doc/DevelGuide/src/H5f90kit_c.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./src/H5f90kit.c - - - - - -
-
- -

H5f90kit

- -

[ Top ] [ Modules ]

-

PURPOSE

-
   Routines from HDF4 to deal with C-FORTRAN issues:
-
-   HD5f2cstring   -- convert a Fortran string to a C string
-   HD5packFstring -- convert a C string into a Fortran string
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5match_types_c.html b/fortran/doc/DevelGuide/src/H5match_types_c.html deleted file mode 100644 index 083319a..0000000 --- a/fortran/doc/DevelGuide/src/H5match_types_c.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -./src/H5match_types.c - - - - - -
-
- -

H5match_types

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5match_types
-
-

FILE

-
  fortran/src/H5match_types.c
-
-

PURPOSE

-
  C Program to match C types to Fortran types.
-  Creates the files H5f90i_gen.h for the C code and
-  H5fortran_types.f90 for the Fortran code.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html deleted file mode 100644 index 3494db0..0000000 --- a/fortran/doc/DevelGuide/src/H5test_kind_SIZEOF_f90.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - -./src/H5test_kind_SIZEOF.f90 - - - - - -
-
- -

H5test_kind_SIZEOF

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5test_kind
-
-

FILE

-
  fortran/src/H5test_kind_SIZEOF.f90
-
-

PURPOSE

-
  This stand alone program is used at build time to generate the program
-  H5fortran_detect.f90. It cycles through all the available KIND parameters for
-  integers and reals. The appropriate program and subroutines are then generated
-  depending on which of the KIND values are found.
-
-

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.
-
-  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
-  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
-
-

AUTHOR

-
  M. Scot Breitenfeld
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/H5test_kind_f90.html b/fortran/doc/DevelGuide/src/H5test_kind_f90.html deleted file mode 100644 index c08e488..0000000 --- a/fortran/doc/DevelGuide/src/H5test_kind_f90.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - -./src/H5test_kind.f90 - - - - - -
-
- -

H5test_kind

- -

[ Top ] [ Procedures ]

-

NAME

-
  Executable: H5test_kind
-
-

FILE

-
  fortran/src/H5test_kind.f90
-
-

PURPOSE

-
  This stand alone program is used at build time to generate the program
-  H5fortran_detect.f90. It cycles through all the available KIND parameters for
-  integers and reals. The appropriate program and subroutines are then generated
-  depending on which of the KIND values are found.
-
-

NOTES

-
  This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only
-  used when the Fortran intrinsic function SIZEOF is not available. It generates
-  code that does not make use of SIZEOF in H5fortran_detect.f90 which is less
-  portable in comparison to using SIZEOF.
-
-  The availability of SIZEOF is checked at configure time and the TRUE/FALSE
-  condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
-
-

AUTHOR

-
  Elena Pourma
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/HDF5_f90.html b/fortran/doc/DevelGuide/src/HDF5_f90.html deleted file mode 100644 index 1490c7c..0000000 --- a/fortran/doc/DevelGuide/src/HDF5_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./src/HDF5.f90 - - - - - -
-
- -

HDF5

- -

[ Top ] [ Modules ]

-

NAME

-
  MODULE HDF5
-
-

FILE

-
  src/fortran/src/HDF5.f90
-
-

PURPOSE

-
  This is the main module used for linking to the Fortran HDF library.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/src/HDF5mpio_f90.html b/fortran/doc/DevelGuide/src/HDF5mpio_f90.html deleted file mode 100644 index 9ef5f32..0000000 --- a/fortran/doc/DevelGuide/src/HDF5mpio_f90.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -./src/HDF5mpio.f90 - - - - - -
-
- -

HDF5 (mpio)

- -

[ Top ] [ Modules ]

-

NAME

-
  HDF5
-
-

PURPOSE

-
  This is the main module used for linking to the Fortran parallel HDF library.
-  This file replaces HDF5.f90 when compiling the parallel library.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fflush1_f90.html b/fortran/doc/DevelGuide/test/fflush1_f90.html deleted file mode 100644 index eaab841..0000000 --- a/fortran/doc/DevelGuide/test/fflush1_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/fflush1.f90 - - - - - -
-
- -

fortran/test/fflush1.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  FFLUSH1EXAMPLE
-
-

FUNCTION

-
  This is the first half of a two-part test that makes sure
-  that a file can be read after an application crashes as long
-  as the file was flushed first.  We simulate by exit the 
-  the program using stop statement
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fflush2_f90.html b/fortran/doc/DevelGuide/test/fflush2_f90.html deleted file mode 100644 index 23b7797..0000000 --- a/fortran/doc/DevelGuide/test/fflush2_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/fflush2.f90 - - - - - -
-
- -

fortran/test/fflush2.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fflush2.f90
-
-

FUNCTION

-
  This is the second half of a two-part test that makes sure
-  that a file can be read after an application crashes as long
-  as the file was flushed first.  This half tries to read the
-  file created by the first half.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html deleted file mode 100644 index 3ce387d..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_1_8_f90.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/fortranlib_test_1_8.f90 - - - - - -
-
- -

fortran/test/fortranlib_test_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's introduced in 1.8 release.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html deleted file mode 100644 index 1a0c7be..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_F03_f90.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -./test/fortranlib_test_F03.f90 - - - - - -
-
- -

fortran/test/fortranlib_test_F03.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test_F03.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's requiring Fortran 2003
-  compliance.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/fortranlib_test_f90.html b/fortran/doc/DevelGuide/test/fortranlib_test_f90.html deleted file mode 100644 index 29fb2f1..0000000 --- a/fortran/doc/DevelGuide/test/fortranlib_test_f90.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/fortranlib_test.f90 - - - - - -
-
- -

fortran/test/fortranlib_test.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  fortranlib_test.f90
-
-

FUNCTION

-
  Basic testing of Fortran API's functionality.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tF2003_f90.html b/fortran/doc/DevelGuide/test/tF2003_f90.html deleted file mode 100644 index 8101411..0000000 --- a/fortran/doc/DevelGuide/test/tF2003_f90.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -./test/tF2003.f90 - - - - - -
-
- -

fortran/test/tF2003.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tF2003.f90
-
-

FUNCTION

-
  Test FORTRAN HDF5 APIs which are dependent on the FORTRAN 2003
-  features. Tests H5L, H5P, H5T APIs. 
-
-

USES

-
  liter_cb_mod, test_genprop_cls_cb1_mod
-
-

CONTAINS SUBROUTINES

-
  test_iter_group, test_create, test_genprop_class_callback,
-  test_array_compound_atomic, test_array_compound_array,
-  test_array_bkg 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html deleted file mode 100644 index c217d99..0000000 --- a/fortran/doc/DevelGuide/test/tH5A_1_8_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5A_1_8.f90 - - - - - -
-
- -

fortran/test/tH5A_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5A_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5A APIs introduced in 1.8.
-
-

CONTAINS SUBROUTINES

-
  attribute_test_1_8, test_attr_corder_create_compact, test_attr_null_space,
-  test_attr_create_by_name, test_attr_info_by_idx, attr_info_by_idx_check,
-  test_attr_shared_rename, test_attr_delete_by_idx, test_attr_shared_delete,
-  test_attr_dense_open, test_attr_dense_verify, test_attr_corder_create_basic,
-  test_attr_basic_write, test_attr_many, attr_open_check, 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5A_f90.html b/fortran/doc/DevelGuide/test/tH5A_f90.html deleted file mode 100644 index 87c5a45..0000000 --- a/fortran/doc/DevelGuide/test/tH5A_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5A.f90 - - - - - -
-
- -

fortran/test/tH5A.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5A.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5A APIs.
-
-

CONTAINS SUBROUTINES

-
  attribute_test 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5D_f90.html b/fortran/doc/DevelGuide/test/tH5D_f90.html deleted file mode 100644 index c840425..0000000 --- a/fortran/doc/DevelGuide/test/tH5D_f90.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -./test/tH5D.f90 - - - - - -
-
- -

fortran/test/tH5D.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5D.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5D APIs.
-
-

NOTES

-
  Tests the H5D APIs functionalities of:
-   h5dcreate_f, h5dopen_f, h5dclose_f, h5dget_space_f, h5dget_type_f,
-   h5dread_f, and h5dwrite_f
-
-

CONTAINS SUBROUTINES

-
  datasettest, extenddsettest
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5E_f90.html b/fortran/doc/DevelGuide/test/tH5E_f90.html deleted file mode 100644 index 6a1ef56..0000000 --- a/fortran/doc/DevelGuide/test/tH5E_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5E.f90 - - - - - -
-
- -

fortran/test/tH5E.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5E.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5E APIs.
-
-

NOTES

-
  Tests the H5D APIs functionalities of:
-   h5eprint_f
-
-

CONTAINS SUBROUTINES

-
  error_report_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5F_f90.html b/fortran/doc/DevelGuide/test/tH5F_f90.html deleted file mode 100644 index d1aff59..0000000 --- a/fortran/doc/DevelGuide/test/tH5F_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5F.f90 - - - - - -
-
- -

fortran/test/tH5F.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5F.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5F APIs.
-
-

CONTAINS SUBROUTINES

-
  mountingtest, reopentest, plisttest, file_close, file_space
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html b/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html deleted file mode 100644 index 81fdd3c..0000000 --- a/fortran/doc/DevelGuide/test/tH5G_1_8_f90.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -./test/tH5G_1_8.f90 - - - - - -
-
- -

fortran/test/tH5G_1_8.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5G_1_8.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5G APIs introduced in 1.8.
-
-

CONTAINS SUBROUTINES

-
  group_test, group_info, timestamps, mklinks, test_move_preserves, lifecycle
-  cklinks, delete_by_idx, link_info_by_idx_check, test_lcpl, objcopy, 
-  lapl_nlinks
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5G_f90.html b/fortran/doc/DevelGuide/test/tH5G_f90.html deleted file mode 100644 index 6c60a3c..0000000 --- a/fortran/doc/DevelGuide/test/tH5G_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5G.f90 - - - - - -
-
- -

fortran/test/tH5G.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5G.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5G APIs.
-
-

CONTAINS SUBROUTINES

-
  group_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5I_f90.html b/fortran/doc/DevelGuide/test/tH5I_f90.html deleted file mode 100644 index 52e21fc..0000000 --- a/fortran/doc/DevelGuide/test/tH5I_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5I.f90 - - - - - -
-
- -

fortran/test/tH5I.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5I.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5I APIs.
-
-

CONTAINS SUBROUTINES

-
  identifier_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5O_f90.html b/fortran/doc/DevelGuide/test/tH5O_f90.html deleted file mode 100644 index a128da5..0000000 --- a/fortran/doc/DevelGuide/test/tH5O_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5O.f90 - - - - - -
-
- -

fortran/test/tH5O.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5O.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5O APIs.
-
-

CONTAINS SUBROUTINES

-
  test_h5o, test_h5o_link, test_h5o_plist
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5P_f90.html b/fortran/doc/DevelGuide/test/tH5P_f90.html deleted file mode 100644 index edc0787..0000000 --- a/fortran/doc/DevelGuide/test/tH5P_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5P.f90 - - - - - -
-
- -

fortran/test/tH5P.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5P.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5P APIs.
-
-

CONTAINS SUBROUTINES

-
  external_test, multi_file_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5R_f90.html b/fortran/doc/DevelGuide/test/tH5R_f90.html deleted file mode 100644 index fd44062..0000000 --- a/fortran/doc/DevelGuide/test/tH5R_f90.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -./test/tH5R.f90 - - - - - -
-
- -

fortran/test/tH5R.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5R.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5R, Reference Interface, APIs.
-
-

NOTES

-
  Tests h5rcreate_f, h5rdereference_f, h5rget_name_f 
-  and H5Rget_object_type functions
-
-

CONTAINS SUBROUTINES

-
  refobjtest, refregtest
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5S_f90.html b/fortran/doc/DevelGuide/test/tH5S_f90.html deleted file mode 100644 index 5879d28..0000000 --- a/fortran/doc/DevelGuide/test/tH5S_f90.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -./test/tH5S.f90 - - - - - -
-
- -

fortran/test/tH5S.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5S.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5S, Dataspace Interface, APIs.
-
-

NOTES

-
  Tests the following functionalities:
-   h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f,
-   h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f
-   h5sget_simple_extent_npoints_f, h5sget_simple_extent_type_f,
-   h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f
-
-

CONTAINS SUBROUTINES

-
  dataspace_basic_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5Sselect_f90.html b/fortran/doc/DevelGuide/test/tH5Sselect_f90.html deleted file mode 100644 index e8eaa73..0000000 --- a/fortran/doc/DevelGuide/test/tH5Sselect_f90.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -./test/tH5Sselect.f90 - - - - - -
-
- -

fortran/test/tH5Sselect.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5Sselect.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5S, Selection-related Dataspace Interface, APIs.
-
-

NOTES

-
  Tests the following functionalities:
-    h5sget_select_npoints_f, h5sselect_elements_f, h5sselect_all_f,
-    h5sselect_none_f, h5sselect_valid_f, h5sselect_hyperslab_f,
-    h5sget_select_bounds_f, h5sget_select_elem_pointlist_f,
-    h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f,
-    h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f   
-
-

CONTAINS SUBROUTINES

-
  test_select_hyperslab, test_select_element, test_basic_select,
-  test_select_point, test_select_combine, test_select_bounds
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5T_f90.html b/fortran/doc/DevelGuide/test/tH5T_f90.html deleted file mode 100644 index 35006b3..0000000 --- a/fortran/doc/DevelGuide/test/tH5T_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5T.f90 - - - - - -
-
- -

fortran/test/tH5T.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5T.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5T APIs.
-
-

CONTAINS SUBROUTINES

-
  compoundtest, basic_data_type_test, enumtest, test_derived_flt
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5VL_f90.html b/fortran/doc/DevelGuide/test/tH5VL_f90.html deleted file mode 100644 index a34a01d..0000000 --- a/fortran/doc/DevelGuide/test/tH5VL_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5VL.f90 - - - - - -
-
- -

fortran/test/tH5VL.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5VL.f90
-
-

FUNCTION

-
  Basic testing of Fortran Variable_length datatypes APIs.
-
-

CONTAINS SUBROUTINES

-
  vl_test_integer, vl_test_real, vl_test_string 
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tH5Z_f90.html b/fortran/doc/DevelGuide/test/tH5Z_f90.html deleted file mode 100644 index 94325b9..0000000 --- a/fortran/doc/DevelGuide/test/tH5Z_f90.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -./test/tH5Z.f90 - - - - - -
-
- -

fortran/test/tH5Z.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tH5Z.f90
-
-

FUNCTION

-
  Basic testing of Fortran H5Z szip APIs.
-
-

CONTAINS SUBROUTINES

-
  filters_test, szip_test
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/t_c.html b/fortran/doc/DevelGuide/test/t_c.html deleted file mode 100644 index c9512a7..0000000 --- a/fortran/doc/DevelGuide/test/t_c.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -./test/t.c - - - - - -
-
- -

fortran/test/tc.c

- -

[ Top ] [ Modules ]

-

NAME

-
   tc.c
-
-

FUNCTION

-
   This file contains C routines needed for the test programs.
-
- -
- - - diff --git a/fortran/doc/DevelGuide/test/tf_f90.html b/fortran/doc/DevelGuide/test/tf_f90.html deleted file mode 100644 index e3c51f4..0000000 --- a/fortran/doc/DevelGuide/test/tf_f90.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -./test/tf.f90 - - - - - -
-
- -

fortran/test/tf.f90

- -

[ Top ] [ Modules ]

-

NAME

-
  tf.f90
-
-

FUNCTION

-
  Contains subroutines which are needed in all the hdf5 fortran tests
-
-

CONTAINS SUBROUTINES

-
  write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f,
-  h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f
-
- -
- - - diff --git a/fortran/doc/DevelGuide/toc_index.html b/fortran/doc/DevelGuide/toc_index.html deleted file mode 100644 index 94a2792..0000000 --- a/fortran/doc/DevelGuide/toc_index.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - -Table of Contents - - - - -
-
- -
-

TABLE OF CONTENTS

- -
- - - diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index fabc5cd..f2dc896 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -69,38 +69,36 @@ foreach (example ${examples}) endif (BUILD_SHARED_LIBS) endforeach (example ${examples}) -if (HDF5_ENABLE_F2003) - foreach (example ${F2003_examples}) - add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} STATIC) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") - target_link_libraries (f03_ex_${example} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} +foreach (example ${F2003_examples}) + add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example} STATIC) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") + target_link_libraries (f03_ex_${example} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} + ) + target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set_target_properties (f03_ex_${example} PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/fortran03 + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + ) + if (BUILD_SHARED_LIBS) + add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example}-shared SHARED) + TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") + target_link_libraries (f03_ex_${example}-shared + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} ) - target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (f03_ex_${example} PROPERTIES + target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (f03_ex_${example}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - if (BUILD_SHARED_LIBS) - add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example}-shared SHARED) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") - target_link_libraries (f03_ex_${example}-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (f03_ex_${example}-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared - ) - endif (BUILD_SHARED_LIBS) - endforeach (example ${F2003_examples}) -endif (HDF5_ENABLE_F2003) + endif (BUILD_SHARED_LIBS) +endforeach (example ${F2003_examples}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index caaa08c..cdd9317 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -46,12 +46,10 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \ # Add attention tests for Fortran 2003 features -if FORTRAN_2003_CONDITIONAL_F - EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ - compound_fortran2003 compound_complex_fortran2003 - INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ - compound_fortran2003.f90 compound_complex_fortran2003.f90 -endif +EXAMPLE_PROG += rwdset_fortran2003 nested_derived_type \ + compound_fortran2003 compound_complex_fortran2003 +INSTALL_FILES += rwdset_fortran2003.f90 nested_derived_type.f90 \ + compound_fortran2003.f90 compound_complex_fortran2003.f90 TEST_SCRIPT=testh5fc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -103,12 +101,10 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 -if FORTRAN_2003_CONDITIONAL_F rwdset_fortran2003: rwdset_fortran2003.f90 nested_derived_type: nested_derived_type.f90 compound_fortran2003: compound_fortran2003.f90 compound_complex_fortran2003: compound_complex_fortran2003.f90 -endif include $(top_srcdir)/config/examples.am include $(top_srcdir)/config/conclude.am diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index c894b75..f97fdc8 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -104,14 +104,6 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ $(srcdir)/run-fortran-ex.sh.in $(srcdir)/testh5fc.sh.in \ $(top_srcdir)/bin/test-driver - -# Add attention tests for Fortran 2003 features -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_1 = rwdset_fortran2003 nested_derived_type \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003 compound_complex_fortran2003 - -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = rwdset_fortran2003.f90 nested_derived_type.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ compound_fortran2003.f90 compound_complex_fortran2003.f90 - TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -120,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-fortran-ex.sh testh5fc.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -404,14 +397,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -421,13 +421,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -469,6 +468,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -619,17 +630,21 @@ INSTALL_SCRIPT_FILES = run-fortran-ex.sh # be run. # We don't tell automake about these programs so that it doesn't try to # compile them with the regular fortran compiler. + +# Add attention tests for Fortran 2003 features 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) + rwdset_fortran2003 nested_derived_type compound_fortran2003 \ + compound_complex_fortran2003 # List files to be installed here 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) + rwdset_fortran2003.f90 nested_derived_type.f90 \ + compound_fortran2003.f90 compound_complex_fortran2003.f90 TEST_SCRIPT = testh5fc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -1067,10 +1082,10 @@ refregexample: refregexample.f90 mountexample: mountexample.f90 compound: compound.f90 ph5example: ph5example.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@rwdset_fortran2003: rwdset_fortran2003.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@nested_derived_type: nested_derived_type.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_fortran2003: compound_fortran2003.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@compound_complex_fortran2003: compound_complex_fortran2003.f90 +rwdset_fortran2003: rwdset_fortran2003.f90 +nested_derived_type: nested_derived_type.f90 +compound_fortran2003: compound_fortran2003.f90 +compound_complex_fortran2003: compound_complex_fortran2003.f90 # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90 index f806110..65e7e75 100644 --- a/fortran/examples/nested_derived_type.f90 +++ b/fortran/examples/nested_derived_type.f90 @@ -23,13 +23,13 @@ PROGRAM main IMPLICIT NONE ! KIND parameters - INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(Fortran_INTEGER_1) ! This should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(Fortran_INTEGER_2) ! This should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! This should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(Fortran_INTEGER_8) ! This should map to INTEGER*8 on most modern processors + INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(2) ! This should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(4) ! This should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(9) ! This should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_k16 = SELECTED_INT_KIND(18) ! This should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(Fortran_REAL_4) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(Fortran_REAL_8) ! This should map to REAL*8 on most modern processors + INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(6,37) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(15,307) ! This should map to REAL*8 on most modern processors ! FILES diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90 index d65db9e..682676f 100644 --- a/fortran/examples/rwdset_fortran2003.f90 +++ b/fortran/examples/rwdset_fortran2003.f90 @@ -28,13 +28,13 @@ PROGRAM RWDSET_FORTRAN2003 IMPLICIT NONE - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors - 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 :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !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(6,37) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(15,307) !should map to REAL*8 on most modern processors CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name @@ -148,12 +148,12 @@ PROGRAM RWDSET_FORTRAN2003 CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) ! memory type - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_1): ',data_out_i8a - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_4): ',data_out_i4 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_8): ',data_out_i8 - WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(Fortran_INTEGER_16): ',data_out_i16 - WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(Fortran_REAL_7): ',data_out_r7 - WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(Fortran_REAL_15): ',data_out_r15 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(2): ',data_out_i8a + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(4): ',data_out_i4 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(9): ',data_out_i8 + WRITE(*,'(A,4i8)' )'SELECTED_INT_KIND(18): ',data_out_i16 + WRITE(*,'(A,4(1x,f9.4))' )'SELECTED_REAL_KIND(6,37): ',data_out_r7 + WRITE(*,'(A,4(1x,f16.10))' )'SELECTED_REAL_KIND(15,307): ',data_out_r15 ! ! Close the dataset. ! diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index bb171d4..8f63b3c 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -19,100 +19,47 @@ if (WIN32) endif (BUILD_SHARED_LIBS) endif (WIN32) +# configure for Fortran preprocessor + +# Define Parallel variable for passing to H5config_f.inc.cmake +set (CMAKE_H5_HAVE_PARALLEL 0) +if (H5_HAVE_PARALLEL) + set (CMAKE_H5_HAVE_PARALLEL 1) +endif (H5_HAVE_PARALLEL) + +set (CMAKE_H5_HAVE_FLOAT128 0) +if (HAVE_FLOAT128) + set (CMAKE_H5_HAVE_FLOAT128 1) +endif(HAVE_FLOAT128) + +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) + #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind(_SIZEOF,_STORAGE_SIZE).f90 used to generate H5fortran_detect.f90 -# H5fortran_detect.f90 used to generate H5fort_type_defines.h -# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90 +# H5_buildiface.F90 used to generate various KIND interfaces +# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- -if (FORTRAN_HAVE_STORAGE_SIZE) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 - ) - if (BUILD_SHARED_LIBS) - add_executable (H5test_FortranHavekind-shared - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 - ) - endif (BUILD_SHARED_LIBS) - set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") -else (FORTRAN_HAVE_STORAGE_SIZE) - if (FORTRAN_HAVE_SIZEOF) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 - ) - if (BUILD_SHARED_LIBS) - add_executable (H5test_FortranHavekind-shared - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 - ) - endif (BUILD_SHARED_LIBS) - set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") - else (FORTRAN_HAVE_SIZEOF) - add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 - ) - if (BUILD_SHARED_LIBS) - add_executable (H5test_FortranHavekind-shared - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 - ) - endif (BUILD_SHARED_LIBS) - endif (FORTRAN_HAVE_SIZEOF) -endif (FORTRAN_HAVE_STORAGE_SIZE) -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind-shared - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif (WIN32 AND MSVC) -set_target_properties (H5test_FortranHavekind PROPERTIES - LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static -) -if (BUILD_SHARED_LIBS) - set_target_properties (H5test_FortranHavekind-shared PROPERTIES - LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + +add_executable (H5_buildiface + ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90 ) -endif (BUILD_SHARED_LIBS) -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 - COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5test_FortranHavekind -) -#----------------------------------------------------------------------------- -add_executable (H5fortran_detect - ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 -) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect + set_target_properties (H5_buildiface PROPERTIES COMPILE_FLAGS "/MT" ) endif (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect + set_target_properties (H5_buildiface PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) endif (WIN32 AND MSVC) -set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) - -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5fortran_detect +set_target_properties (H5_buildiface PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) @@ -124,7 +71,7 @@ add_executable (H5match_types set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 COMMAND ${CMD} WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types @@ -152,12 +99,6 @@ set (f90CStub_C_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c ) -if (H5_HAVE_PARALLEL) - set (f90CStub_C_SRCS - ${f90CStub_C_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c - ) -endif (H5_HAVE_PARALLEL) set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS @@ -193,79 +134,51 @@ if (BUILD_SHARED_LIBS) set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS) -#----------------------------------------------------------------------------- -# Fortran 2003 standard -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_F2003) - # F2003 features are enabled - set (F_STATUS "_F03") -else (HDF5_ENABLE_F2003) - # F2003 features are not enabled - set (F_STATUS "_F90") -endif (HDF5_ENABLE_F2003) - -#----------------------------------------------------------------------------- -# Fortran Real Size -#----------------------------------------------------------------------------- -if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - # default real is 4 bytes, so include double signatures - set (F_DBLE "Include") -else (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) - # default real is 8 bytes, so exclude double signatures - set (F_DBLE "Exclude") -endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) +set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE) #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (f90_F_SRCS +set (f90_F_BASE_SRCS # generated files - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 # normal distribution - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff${F_STATUS}.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.f90 - ${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 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff${F_STATUS}.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff${F_STATUS}.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 +) + +set (f90_F_SRCS + ${f90_F_BASE_SRCS} + + # generated file + ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + + # normal distribution + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 +) + +set (CMD $) +add_custom_target (H5gen ALL + COMMAND ${CMD} +#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS ${f90_F_BASE_SRCS} ) -#----------------------------------------------------------------------------- -# Add H5FDMPIO if parallel -#----------------------------------------------------------------------------- -if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - set (f90_F_SRCS - ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 - ) -else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - set (f90_F_SRCS - ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 - ) -endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- @@ -326,15 +239,15 @@ endif (BUILD_SHARED_LIBS) # Add file(s) to CMake Install #----------------------------------------------------------------------------- install ( - FILES - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h + FILES + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 - DESTINATION + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT + COMPONENT fortheaders ) @@ -370,17 +283,7 @@ set (mod_files ${MOD_BUILD_DIR}/h5s.mod ${MOD_BUILD_DIR}/h5t.mod ${MOD_BUILD_DIR}/h5z.mod - ${MOD_BUILD_DIR}/h5a_provisional.mod - ${MOD_BUILD_DIR}/h5d_provisional.mod - ${MOD_BUILD_DIR}/h5e_provisional.mod - ${MOD_BUILD_DIR}/h5f_provisional.mod - ${MOD_BUILD_DIR}/h5l_provisional.mod - ${MOD_BUILD_DIR}/h5lib_provisional.mod - ${MOD_BUILD_DIR}/h5o_provisional.mod - ${MOD_BUILD_DIR}/h5p_provisional.mod - ${MOD_BUILD_DIR}/h5r_provisional.mod - ${MOD_BUILD_DIR}/h5t_provisional.mod - ${MOD_BUILD_DIR}/h5_dble_interface.mod + ${MOD_BUILD_DIR}/h5_gen.mod ) install ( FILES diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index bc2e9f1..8f012cf 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -1,6 +1,6 @@ /****h* H5Af/H5Af * PURPOSE - * This file contains C stubs for H5A Fortran APIs + * This file contains C stubs for H5A Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,942 +26,31 @@ /****if* H5Af/h5acreate_c * NAME - * h5acreate_c + * h5acreate_c * PURPOSE - * Call H5Acreate2 to create an attribute + * Call H5Acreate2 to create an attribute * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * type_id - datatype identifier - * space_id - dataspace identifier - * crt_pr - identifier of creation property list + * obj_id - object identifier + * name - name of the attribute + * namelen - name length + * type_id - datatype identifier + * space_id - dataspace identifier + * crt_pr - identifier of creation property list * OUTPUTS - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, - hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id) -/*******/ -{ - char *c_name = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; /* Return value */ - - /* - * Convert FORTRAN name to C name - */ - if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL); - - /* - * Call H5Acreate2 function. - */ - if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0) - HGOTO_DONE(FAIL); - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} - -/****if* H5Af/h5aopen_name_c - * NAME - * h5aopen_name_c - * PURPOSE - * Call H5Aopen to open an attribute - * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * OUTPUTS - * attr_id - dataset identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) -/*******/ -{ - char *c_name = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; /* Return value */ - - /* - * Convert FORTRAN name to C name - */ - if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) - HGOTO_DONE(FAIL); - - /* - * Call H5Aopen function. - */ - if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_name, H5P_DEFAULT)) < 0) - HGOTO_DONE(FAIL); - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} - -/****if* H5Af/h5awritec_c - * NAME - * h5awritec_c - * PURPOSE - * Call h5awrite_c to write a character attribute - * INPUTS - * attr_id - dataset identifier - * mem_type_id - memory datatype identifier - * buf - character data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday , August 12, 1999 - * HISTORY - * dims paramete added. - * April 4, 2001 - * SOURCE -*/ -int_f -nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - - - -/****if* H5Af/h5awrite_c - * NAME - * h5awrite_c - * PURPOSE - * Call H5Awrite to write a attribute - * INPUTS - * attr_id - attribute identifier - * mem_type_id - memory datatype identifier - * buf - data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims parameter added - * April 4, 2001 - * Added nh5awrite_integer(real,double)_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - /* - * Call h5awrite_c function. - */ - return nh5awrite_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED *dims) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Awrite function. - */ - if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - - -/****if* H5Af/h5areadc_c - * NAME - * h5areadc_c - * PURPOSE - * Call h5aread_c to read character attribute - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * OUTPUTS - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims parameter added. - * April 4, 2001 - * Added nh5areadc_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - -int_f -nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} -int_f -nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); -} - - - -/****if* H5Af/h5aread_c - * NAME - * h5aread_c - * PURPOSE - * Call H5Aread to read an attribute - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * OUTPUTS - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * dims paramete added. - * April 4, 2001 - * Added nh5aread_integer(real,double)_s,1-7 functions to eliminate - * complains about wrong parameters types in h5awrite_c function - * called by Fortran routines. - * October 9, 2006 EIP - * SOURCE -*/ -int_f -nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aread function. - */ - if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -int_f -nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - -int_f -nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void H5_ATTR_UNUSED * dims) -/******/ -{ - /* - * Call h5aread_c function. - */ - return nh5aread_c(attr_id, mem_type_id, buf, dims); -} - - -/****if* H5Af/h5aclose_c - * NAME - * h5aclose_c - * PURPOSE - * Call H5Aclose to close an attribute - * INPUTS - * attr_id - identifier of an attribute to be closed - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ - -int_f -nh5aclose_c ( hid_t_f *attr_id ) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if (H5Aclose((hid_t)*attr_id) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5adelete_c - * NAME - * h5adelete_c - * PURPOSE - * Call H5Adelete to delete an attribute - * INPUTS - * obj_id - object identifier - * name - name of the attribute - * namelen - name length - * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) -/******/ +h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, + hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id) +/*******/ { char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ @@ -969,147 +58,85 @@ nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) /* * Convert FORTRAN name to C name */ - if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) + if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL); /* - * Call H5Adelete function. + * Call H5Acreate2 function. */ - if(H5Adelete((hid_t)*obj_id, c_name) < 0) - HGOTO_DONE(FAIL); + if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0) + HGOTO_DONE(FAIL); done: if(c_name) HDfree(c_name); - return ret_value; } - -/****if* H5Af/h5aopen_idx_c +/****if* H5Af/h5adelete_c * NAME - * h5aopen_idx_c + * h5adelete_c * PURPOSE - * Call H5Aopen_by_idx to open an attribute + * Call H5Adelete to delete an attribute * INPUTS - * obj_id - object identifier - * idx - attribute index ( zero based) - * OUTPUTS - * attr_id - attribute identifier + * obj_id - object identifier + * name - name of the attribute + * namelen - name length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) +h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) /******/ { - int_f ret_value = 0; /* Return value */ + char *c_name = NULL; /* Buffer to hold C string */ + int_f ret_value = 0; /* Return value */ /* - * Call H5Aopen_by_idx function. + * Convert FORTRAN name to C name */ - if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) HGOTO_DONE(FAIL); -done: - return ret_value; -} - - -/****if* H5Af/h5aget_space_c - * NAME - * h5aget_space_c - * PURPOSE - * Call H5Aget_space to get attribute's dataspace - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * space_id - dataspace identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - /* - * Call H5Aget_space function. + * Call H5Adelete function. */ - if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0) + if(H5Adelete((hid_t)*obj_id, c_name) < 0) HGOTO_DONE(FAIL); done: - return ret_value; -} - -/****if* H5Af/h5aget_type_c - * NAME - * h5aget_type_c - * PURPOSE - * Call H5Aget_space to get attribute's datatype - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * type_id - datatype identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aget_type function. - */ - if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); + if(c_name) + HDfree(c_name); -done: - return ret_value; + return ret_value; } /****if* H5Af/h5aget_num_attrs_c * NAME - * h5aget_num_attrs_c + * h5aget_num_attrs_c * PURPOSE - * Call H5Oget_info to determine number of - * attributes of an object + * Call H5Oget_info to determine number of + * attributes of an object * INPUTS - * obj_id - object identifier - * attr_num - number of attributes + * obj_id - object identifier + * attr_num - number of attributes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) +h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) /******/ { H5O_info_t oinfo; /* Object info */ @@ -1130,25 +157,25 @@ done: /****if* H5Af/h5aget_name_c * NAME - * h5aget_name_c + * h5aget_name_c * PURPOSE - * Call H5Aget_name to get attribute's name + * Call H5Aget_name to get attribute's name * INPUTS - * attr_id - attribute identifier - * bufsize - size of the buffer + * attr_id - attribute identifier + * bufsize - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 12, 1999 + * Thursday, August 12, 1999 * HISTORY * * SOURCE */ int_f -nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) +h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) /******/ { size_t c_bufsize; @@ -1179,99 +206,36 @@ done: return ret_value; } -/****if* H5Af/h5aget_storage_size_c - * NAME - * h5aget_storage_size_c - * PURPOSE - * Call H5Aget_storage_size - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * size - attributes storage requirements - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*size = (hsize_t_f)H5Aget_storage_size((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5aget_create_plist_c - * NAME - * h5aget_create_plist_c - * PURPOSE - * Call H5Aget_create_plist - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * creation_prop_id - Identifier for the attribute’s creation property - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*creation_prop_id = (hid_t_f)H5Aget_create_plist((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} /****if* H5Af/h5arename_by_name_c * NAME - * h5arename_by_name_c + * h5arename_by_name_c * PURPOSE - * Calls H5Arename_by_name + * Calls H5Arename_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object, relative to location, - * whose attribute is to be renamed - * obj_name_len - Object name length - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length - * lapl_id - Link access property list identifier + * loc_id - Object identifier + * obj_name - Name of object, relative to location, + * whose attribute is to be renamed + * obj_name_len - Object name length + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length + * lapl_id - Link access property list identifier * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ) @@ -1306,27 +270,27 @@ done: /****if* H5Af/h5aopen_c * NAME - * h5aopen_c + * h5aopen_c * PURPOSE - * Call H5Aopen to open an attribute + * Call H5Aopen to open an attribute * INPUTS - * obj_id - Identifer for object to which attribute is attached + * obj_id - Identifer for object to which attribute is attached * attr_name - Attribute access property list - * attr_namelen - size of attr_name - * aapl_id - Link access property list + * attr_namelen - size of attr_name + * aapl_id - Link access property list * OUTPUTS - * attr_id - dataset identifier + * attr_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) +h5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id) /******/ { char *c_attr_name = NULL; /* Buffer to hold C string */ @@ -1351,30 +315,30 @@ done: } /****if* H5Af/h5adelete_by_name_c * NAME - * h5adelete_by_name_c + * h5adelete_by_name_c * PURPOSE - * Call h5adelete_by_name to remove an attribute from a specified location + * Call h5adelete_by_name to remove an attribute from a specified location * INPUTS - * loc_id - identifer for object to which attribute is attached - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - identifer for object to which attribute is attached + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) +h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id) /******/ { char *c_obj_name = NULL; /* Buffer to hold C string */ @@ -1404,30 +368,30 @@ done: } /****if* H5Af/h5adelete_by_idx_c * NAME - * h5adelete_by_idx_c + * h5adelete_by_idx_c * PURPOSE - * Call h5adelete_by_idx + * Call h5adelete_by_idx * INPUTS - * loc_id - Location or object identifier; may be dataset or group - * obj_name - object identifier - * obj_namelen - name length - * attr_name - name of the attribute - * attr_namelen - name length - * lapl_id - link access property list + * loc_id - Location or object identifier; may be dataset or group + * obj_name - object identifier + * obj_namelen - name length + * attr_name - name of the attribute + * attr_namelen - name length + * lapl_id - link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -1454,50 +418,50 @@ done: } /****if* H5Af/h5aget_name_by_idx_c * NAME - * h5aget_name_by_idx_c + * h5aget_name_by_idx_c * PURPOSE - * Call h5aget_name_by_idx + * Call h5aget_name_by_idx * INPUTS * * - * loc_id - Identifer for object to which attribute is attached - * obj_name - Name of object, relative to location, - * from which attribute is to be removed *TEST* check NULL - * idx_type - Type of index; Possible values are: + * loc_id - Identifer for object to which attribute is attached + * obj_name - Name of object, relative to location, + * from which attribute is to be removed *TEST* check NULL + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * attr_id - Attribute identifier - * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value + * n - Attribute’s position in index + * attr_id - Attribute identifier + * size - Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value * - * lapl_id - Link access property list - * hdferr - Error code: - * Returns attribute name size, -1 if fail + * lapl_id - Link access property list + * hdferr - Error code: + * Returns attribute name size, -1 if fail * * OUTPUTS - * name - Attribute name + * name - Attribute name * * RETURNS - * Size of buffer on success, -1 on failure + * Size of buffer on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id) /******/ @@ -1545,42 +509,42 @@ done: /****if* H5Af/h5aopen_by_idx_c * NAME - * h5aopen_by_idx_c + * h5aopen_by_idx_c * PURPOSE - * Call H5Aopen_by_idx + * Call H5Aopen_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * aapl_id - Attribute access property list - * lapl_id - Link access property list + * n - Attribute’s position in index + * aapl_id - Attribute access property list + * lapl_id - Link access property list * OUTPUTS - * attr_id - attribute identifer + * attr_id - attribute identifer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) /******/ { @@ -1608,29 +572,29 @@ done: /****if* H5Af/h5aget_info_c * NAME - * h5aget_info_c + * h5aget_info_c * PURPOSE - * Call H5Aget_info + * Call H5Aget_info * INPUTS - * loc_id - Object identifier + * loc_id - Object identifier * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) /******/ { @@ -1660,46 +624,46 @@ done: /****if* H5Af/h5aget_info_by_idx_c * NAME - * h5aget_info_by_idx_c + * h5aget_info_by_idx_c * PURPOSE - * Call H5Aget_info_by_idx + * Call H5Aget_info_by_idx * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * idx_type - Type of index; Possible values are: + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * idx_type - Type of index; Possible values are: * H5_INDEX_UNKNOWN - Unknown index type * H5_INDEX_NAME - Index on names * H5_INDEX_CRT_ORDER - Index on creation order * H5_INDEX_N - Number of indices defined * - * order - Order in which to iterate over index; Possible values are: + * order - Order in which to iterate over index; Possible values are: * H5_ITER_UNKNOWN - Unknown order * H5_ITER_INC - Increasing order * H5_ITER_DEC - Decreasing order * H5_ITER_NATIVE - No particular order, whatever is fastest * H5_ITER_N - Number of iteration orders * - * n - Attribute’s position in index - * lapl_id - Link access property list + * n - Attribute’s position in index + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -1739,34 +703,34 @@ done: /****if* H5Af/h5aget_info_by_name_c * NAME - * h5aget_info_by_name_c + * h5aget_info_by_name_c * PURPOSE - * Call H5Aget_info_by_name + * Call H5Aget_info_by_name * INPUTS - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ) @@ -1810,38 +774,38 @@ done: /****if* H5Af/h5acreate_by_name_c * NAME - * h5acreate_by_name_c + * h5acreate_by_name_c * PURPOSE - * Call h5acreate_by_name + * Call h5acreate_by_name * INPUTS * - * loc_id - Object identifier - * obj_name - Name of object to which attribute is attached - * obj_namelen - name length - * attr_name - Attribute name - * attr_namelen - attribute name length - * type_id - Attribute datatype identifier - * space_id - Attribute dataspace identifier - * acpl_id - Attribute creation property list identifier (Currently not used.) - * aapl_id - Attribute access property list identifier (Currently not used.) - * lapl_id - Link access property list + * loc_id - Object identifier + * obj_name - Name of object to which attribute is attached + * obj_namelen - name length + * attr_name - Attribute name + * attr_namelen - attribute name length + * type_id - Attribute datatype identifier + * space_id - Attribute dataspace identifier + * acpl_id - Attribute creation property list identifier (Currently not used.) + * aapl_id - Attribute access property list identifier (Currently not used.) + * lapl_id - Link access property list * * OUTPUTS * - * attr - an attribute identifier + * attr - an attribute identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ) @@ -1876,27 +840,27 @@ done: /****if* H5Af/h5aexists_c * NAME - * h5aexists_c + * h5aexists_c * PURPOSE * CAll h5aexists * INPUTS * - * obj_id - Object identifier - * attr_name - Attribute name + * obj_id - Object identifier + * attr_name - Attribute name * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) +h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -1922,29 +886,29 @@ done: /****if* H5Af/h5aexists_by_name_c * NAME - * h5aexists_by_name_c + * h5aexists_by_name_c * PURPOSE * CAll H5Aexists_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * lapl_id - Link access property list identifier + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * attr_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists) /******/ { @@ -1976,30 +940,30 @@ done: /****if* H5Af/h5aopen_by_name_c * NAME - * h5aopen_by_name_c + * h5aopen_by_name_c * PURPOSE - * Call H5Aopen_by_name + * Call H5Aopen_by_name * INPUTS * - * loc_id - Location identifier - * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) + * loc_id - Location identifier + * obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) * attr_name - Attribute name - * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) - * lapl_id - Link access property list identifier + * aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) + * lapl_id - Link access property list identifier * OUTPUTS * - * attr_id - attribute identifier + * attr_id - attribute identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id) /******/ { @@ -2031,29 +995,29 @@ nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd /****if* H5Af/h5arename_c * NAME - * h5arename_c + * h5arename_c * PURPOSE - * Calls H5Arename + * Calls H5Arename * INPUTS - * loc_id - Object identifier - * old_attr_name - Prior attribute name - * old_attr_name_len - Prior attribute name length - * new_attr_name - New attribute name - * new_attr_name_len - New attribute name length + * loc_id - Object identifier + * old_attr_name - Prior attribute name + * old_attr_name_len - Prior attribute name length + * new_attr_name - New attribute name + * new_attr_name_len - New attribute name length * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5arename_c( hid_t_f *loc_id, +h5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen) /******/ diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 new file mode 100644 index 0000000..132bf41 --- /dev/null +++ b/fortran/src/H5Aff.F90 @@ -0,0 +1,1873 @@ +!****h* ROBODoc/H5A +! +! NAME +! MODULE H5A +! +! PURPOSE +! This file contains Fortran interfaces for H5A functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! 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 +! +! (A) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (1) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (2) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! (B) +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5A 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. +! +!***** + +#include + +MODULE H5A + + USE, INTRINSIC :: ISO_C_BINDING + + USE H5GLOBAL + + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_char_scalar + ! This is the preferred way to call h5awrite + ! by passing an address + MODULE PROCEDURE h5awrite_ptr + END INTERFACE + + INTERFACE h5aread_f + MODULE PROCEDURE h5aread_char_scalar + ! This is the preferred way to call h5aread + ! by passing an address + MODULE PROCEDURE h5aread_ptr + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Awrite routine + INTERFACE + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5awrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Aread routine + INTERFACE + INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5aread_f_c + END INTERFACE + +CONTAINS + +! +!****s* H5A/h5acreate_f +! +! NAME +! h5acreate_f +! +! PURPOSE +! Creates a dataset as an attribute of a group, dataset, or named datatype +! +! INPUTS +! loc_id - identifier of an object (group, dataset, +! or named datatype) attribute is attached to +! name - attribute name +! type_id - attribute datatype identifier +! space_id - attribute dataspace identifier +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier +! appl_id - Attribute access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & + hdferr, acpl_id, aapl_id ) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + INTERFACE + INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & + space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN), VALUE :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN), VALUE :: type_id + INTEGER(HID_T), INTENT(IN), VALUE :: space_id + INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default + END FUNCTION H5Acreate2 + END INTERFACE + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + IF (PRESENT(acpl_id)) acpl_id_default = acpl_id + IF (PRESENT(aapl_id)) aapl_id_default = aapl_id + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & + acpl_id_default, aapl_id_default) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE h5acreate_f + +! +!****s* H5A/h5aopen_name_f +! +! NAME +! h5aopen_name_f +! +! PURPOSE +! Opens an attribute specified by name. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype atttribute to be attached to +! name - attribute name +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + +! H5Aopen_name is deprecated + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen(obj_id, name, aapl_id) BIND(C,NAME='H5Aopen') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN), VALUE :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id + END FUNCTION H5Aopen + END INTERFACE + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = H5Aopen(obj_id, c_name, H5P_DEFAULT_F) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_name_f +! +!****s* H5A/H5Aopen_idx_f +! +! NAME +! H5Aopen_idx_f +! +! PURPOSE +! Opens the attribute specified by its index. +! +! INPUTS +! obj_id - identifier of a group, dataset, or named +! datatype an attribute to be attached to +! index - index of the attribute to open (zero-based) +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(IN) :: index ! Attribute index + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** +! H5Aopen_idx is deprecated in favor of the function H5Aopen_by_idx. + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen_by_idx(obj_id, index) BIND(C,NAME='H5Aopen_by_idx') + IMPORT :: HID_T + IMPORT :: C_INT + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(C_INT), INTENT(IN) :: index + END FUNCTION H5Aopen_by_idx + END INTERFACE + + attr_id = H5Aopen_by_idx(obj_id, INT(index, C_INT)) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aopen_idx_f +! +!****s* H5A/H5Aget_space_f +! +! NAME +! H5Aget_space_f +! +! PURPOSE +! Gets a copy of the dataspace for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! space_id - attribite dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_space + END INTERFACE + + space_id = H5Aget_space(attr_id) + + hdferr = 0 + IF(space_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_space_f +! +!****s* H5A/H5Aget_type_f +! +! NAME +! H5Aget_type_f +! +! PURPOSE +! Gets an attribute datatype. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! type_id - attribute datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_type + END INTERFACE + + type_id = H5Aget_type(attr_id) + + hdferr = 0 + IF(type_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_type_f +! +!****s* H5A/H5Aget_name_f +! +! NAME +! H5Aget_name_f +! +! PURPOSE +! Gets an attribute name. +! +! INPUTS +! attr_id - attribute identifier +! size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! +! SOURCE + SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! name length is successful, -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) & + BIND(C,NAME='h5aget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5aget_name_c + END INTERFACE + + hdferr = h5aget_name_c(attr_id, size, buf) + END SUBROUTINE h5aget_name_f +! +!****s* H5A/H5Aget_name_by_idx_f +! +! NAME +! H5Aget_name_by_idx_f +! +! PURPOSE +! Gets an attribute name, by attribute index position. +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS +! name - Attribute name +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! size - Size, in bytes, of attribute name +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & + n, name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed *TEST* check NULL + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! Returns attribute name size, + ! -1 if fail + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, + ! of the attribute +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) BIND(C,NAME='h5aget_name_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(SIZE_T) :: size_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5aget_name_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5aget_name_by_idx_f +! +!****s* H5A/H5Aget_num_attrs_f +! +! NAME +! H5Aget_num_attrs_f +! +! PURPOSE +! Determines the number of attributes attached to an object. +! +! INPUTS +! obj_id - object (group, dataset, or named datatype) +! identifier +! OUTPUTS +! attr_num - number of attributes attached to the object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: attr_num + END FUNCTION h5aget_num_attrs_c + END INTERFACE + + hdferr = h5aget_num_attrs_c(obj_id, attr_num) + END SUBROUTINE h5aget_num_attrs_f + +! +!****s* H5A/H5Adelete_f +! +! NAME +! H5Adelete_f +! +! PURPOSE +! Deletes an attribute of an object (group, dataset or +! named datatype) +! +! INPUTS +! obj_id - object identifier +! name - attribute name +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! SOURCE + SUBROUTINE H5Adelete_f(obj_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + END FUNCTION H5Adelete_c + END INTERFACE + + namelen = LEN(name) + hdferr = H5Adelete_c(obj_id, name, namelen) + END SUBROUTINE H5Adelete_f + +! +!****s* H5A/H5Aclose_f +! +! NAME +! H5Aclose_f +! +! PURPOSE +! Closes the specified attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! SOURCE + + SUBROUTINE H5Aclose_f(attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aclose + END INTERFACE + + hdferr = INT(H5Aclose(attr_id)) + END SUBROUTINE H5Aclose_f + +! +!****s* H5A/H5Aget_storage_size_f +! +! NAME +! H5Aget_storage_size_f +! +! PURPOSE +! Returns the amount of storage required for an attribute. +! +! INPUTS +! attr_id - attribute identifier +! OUTPUTS +! size - attribute storage size +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') + IMPORT :: HID_T, HSIZE_T + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_storage_size + END INTERFACE + + size = H5Aget_storage_size(attr_id) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_storage_size_f + +! +!****s* H5A/H5Aget_create_plist_f +! +! NAME +! H5Aget_create_plist_f +! +! PURPOSE +! Gets an attribute creation property list identifier +! +! INPUTS +! attr_id - Identifier of the attribute +! OUTPUTS +! creation_prop_id - Identifier for the attribute’s creation property +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute + INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_create_plist + END INTERFACE + + creation_prop_id = H5Aget_create_plist(attr_id) + + hdferr = 0 + IF(creation_prop_id.LT.0) hdferr = -1 + + END SUBROUTINE H5Aget_create_plist_f + +! +!****s* H5A/H5Arename_by_name_f +! +! NAME +! H5Arename_by_name_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, +! whose attribute is to be renamed +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! lapl_id - Link access property list identifier +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! whose attribute is to be renamed + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) BIND(C,NAME='h5arename_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(SIZE_T) :: obj_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION H5Arename_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default=lapl_id + + hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + + END SUBROUTINE H5Arename_by_name_f + +! +!****s* H5A/H5Aopen_f +! +! NAME +! H5Aopen_f +! +! PURPOSE +! Opens an attribute for an object specified by object +! identifier and attribute name +! +! INPUTS +! obj_id - Identifer for object to which attribute is attached +! attr_name - Name of attribute to open +! OUTPUTS +! attr_id - attribute identifier + +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! Success: 0 + ! Failure: -1 + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list +!***** + INTEGER(HID_T) :: aapl_id_default + + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) & + BIND(C,NAME='h5aopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: aapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + + hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_f + +! +!****s* H5A/H5Adelete_by_idx_f +! +! NAME +! H5Adelete_by_idx_f +! +! PURPOSE +! Deletes an attribute from an object according to index order +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name of object, relative to location, from which attribute is to be removed +! idx_type - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order in which to iterate over index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Offset within index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) & + BIND(C,NAME='h5adelete_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + obj_namelen = LEN(obj_name) + hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + + END SUBROUTINE H5Adelete_by_idx_f + +! +!****s* H5A/H5Adelete_by_name_f +! +! NAME +! H5Adelete_by_name_f +! +! PURPOSE +! Removes an attribute from a specified location +! +! INPUTS +! loc_id - Identifer for object to which attribute is attached +! obj_name - Name of attribute to open +! attr_name - Attribute access property list +! lapl_id - Link access property list +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, + ! from which attribute is to be removed + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) & + BIND(C,NAME='h5adelete_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + + END SUBROUTINE H5Adelete_by_name_f + +! +!****s* H5A/H5Aopen_by_idx_f +! +! NAME +! H5Aopen_by_idx_f +! +! PURPOSE +! Opens an existing attribute that is attached to an object specified by location and name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + END FUNCTION H5Aopen_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_by_idx_f + +! +!****s* H5A/H5Aget_info_f +! +! NAME +! H5Aget_info_f +! +! PURPOSE +! Retrieves attribute information, by attribute identifier +! +! INPUTS +! attr_id - attribute identifier +! +! OUTPUTS +! NOTE: In C it is defined as a structure: H5A_info_t +! +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! SOURCE + SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id + + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + END FUNCTION H5Aget_info_c + END INTERFACE + + hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + + END SUBROUTINE H5Aget_info_f + +! +!****s* H5A/H5Aget_info_by_idx_f +! +! NAME +! H5Aget_info_by_idx_f +! +! PURPOSE +! Retrieves attribute information, by attribute index position +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! idx_type - Type of index +! order - Index traversal order +! n - Attribute’s position in index +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Aget_info_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(present(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE H5Aget_info_by_idx_f + +! +!****s* H5A/H5Aget_info_by_name_f +! +! NAME +! H5Aget_info_by_name_f +! +! PURPOSE +! Retrieves attribute information, by attribute name +! +! INPUTS +! loc_id - Location of object to which attribute is attached +! obj_name - Name of object to which attribute is attached, relative to location +! attr_name - Attribute name +! +! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t +! corder_valid - indicates whether the creation order data is valid for this attribute +! corder - is a positive integer containing the creation order of the attribute +! cset - indicates the character set used for the attribute’s name +! data_size - indicates the size, in the number of characters, of the attribute +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & + f_corder_valid, corder, cset, data_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + + + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) BIND(C,NAME='h5aget_info_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + END FUNCTION H5Aget_info_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE H5Aget_info_by_name_f + +! +!****s* H5A/H5Acreate_by_name_f +! +! NAME +! H5Acreate_by_name_f +! +! PURPOSE +! Creates an attribute attached to a specified object +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! obj_name - Name, relative to loc_id, of object that attribute is to be attached to +! attr_name - Attribute name +! type_id - Attribute datatype identifier +! space_id - Attribute dataspace identifier +! +! OUTPUTS +! attr - an attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! acpl_id - Attribute creation property list identifier (Currently not used.) +! aapl_id - Attribute access property list identifier (Currently not used.) +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & + acpl_id, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: attr + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id + INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) & + BIND(C,NAME='h5acreate_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr + + END FUNCTION H5Acreate_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(acpl_id)) acpl_id_default = acpl_id + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + END SUBROUTINE H5Acreate_by_name_f + +! +!****s* H5A/H5Aexists_f +! +! NAME +! H5Aexists_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! obj_id - Object identifier +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(HID_T) :: attr_exists_c + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) BIND(C,NAME='h5aexists_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: attr_exists_c + END FUNCTION H5Aexists_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE H5Aexists_f + +! +!****s* H5A/H5Aexists_by_name_f +! +! NAME +! H5Aexists_by_name_f +! +! PURPOSE +! Determines whether an attribute with a given name exists on an object +! +! INPUTS +! loc_id - Location identifier +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_exists - attribute exists status +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! SOURCE + SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER :: attr_exists_c + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + lapl_id_default, attr_exists_c) BIND(C,NAME='h5aexists_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: attr_exists_c + END FUNCTION H5Aexists_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + END SUBROUTINE H5Aexists_by_name_f +! +!****s* H5A/H5Aopen_by_name_f +! +! NAME +! H5Aopen_by_name_f +! +! PURPOSE +! Opens an attribute for an object by object name and attribute name. +! +! INPUTS +! loc_id - Location from which to find object to which attribute is attached +! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +! attr_name - Attribute name +! +! OUTPUTS +! attr_id - attribute identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! SOURCE + SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, + ! absolute from the file’s root group, or '.' + CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name + INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list + ! (Currently unused; should be passed in as H5P_DEFAULT_F) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) BIND(C,NAME='h5aopen_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + + END SUBROUTINE H5Aopen_by_name_f + +! +!****s* H5A/H5Arename_f +! +! NAME +! H5Arename_f +! +! PURPOSE +! Renames an attribute +! +! INPUTS +! loc_id - Location or object identifier; may be dataset or group +! old_attr_name - Prior attribute name +! new_attr_name - New attribute name +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! HISTORY +! N/A +! +! + +! SOURCE + SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) BIND(C,NAME='h5arename_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + END FUNCTION H5Arename_c + END INTERFACE + + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + hdferr = H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + + END SUBROUTINE H5Arename_f + + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + + END SUBROUTINE H5Awrite_char_scalar + + SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_scalar_fix + + +!****s* H5A (F03)/H5Awrite_f_F03 +! +! NAME +! H5Awrite_f_F03 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran2003 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Awrite_ptr + + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) + + END SUBROUTINE H5Aread_char_scalar + + SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_scalar_fix + +!****s* H5A (F03)/H5Aread_f_F03 +! +! NAME +! H5Aread_f_F03 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! Fortran2003 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Aread_ptr + +END MODULE H5A + + diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 deleted file mode 100644 index 25f7fa7..0000000 --- a/fortran/src/H5Aff.f90 +++ /dev/null @@ -1,1673 +0,0 @@ -!****h* ROBODoc/H5A -! -! NAME -! MODULE H5A -! -! PURPOSE -! This file contains Fortran interfaces for H5A functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5A 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 H5A - - USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! - -CONTAINS - -! -!****s* H5A/h5acreate_f -! -! NAME -! h5acreate_f -! -! PURPOSE -! Creates a dataset as an attribute of a group, dataset, or named datatype -! -! INPUTS -! loc_id - identifier of an object (group, dataset, -! or named datatype) attribute is attached to -! name - attribute name -! type_id - attribute datatype identifier -! space_id - attribute dataspace identifier -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier -! appl_id - Attribute access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & - hdferr, acpl_id, aapl_id ) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: namelen - INTERFACE - INTEGER FUNCTION h5acreate_c(loc_id, name, namelen, type_id, & - space_id, acpl_id_default, aapl_id_default, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_C'::h5acreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5acreate_c - END INTERFACE - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - namelen = LEN(name) - IF (PRESENT(acpl_id)) acpl_id_default = acpl_id - IF (PRESENT(aapl_id)) aapl_id_default = aapl_id - - hdferr = h5acreate_c(loc_id, name, namelen, type_id, space_id, & - acpl_id_default, aapl_id_default, attr_id) - - END SUBROUTINE h5acreate_f - - -! -!****s* H5A/h5aopen_name_f -! -! NAME -! h5aopen_name_f -! -! PURPOSE -! Opens an attribute specified by name. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype atttribute to be attached to -! name - attribute name -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5aopen_name_c(obj_id, name, namelen, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_NAME_C'::h5aopen_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_name_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5aopen_name_c(obj_id, name, namelen, attr_id) - END SUBROUTINE h5aopen_name_f -! -!****s* H5A/h5aopen_idx_f -! -! NAME -! h5aopen_idx_f -! -! PURPOSE -! Opens the attribute specified by its index. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype an attribute to be attached to -! index - index of the attribute to open (zero-based) -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(IN) :: index ! Attribute index - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aopen_idx_c(obj_id, index, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_IDX_C'::h5aopen_idx_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: index - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_idx_c - END INTERFACE - - hdferr = h5aopen_idx_c(obj_id, index, attr_id) - END SUBROUTINE h5aopen_idx_f -! -!****s* H5A/h5aget_space_f -! -! NAME -! h5aget_space_f -! -! PURPOSE -! Gets a copy of the dataspace for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! space_id - attribite dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5aget_space_f(attr_id, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5aget_space_c(attr_id, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_SPACE_C'::h5aget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5aget_space_c - END INTERFACE - - hdferr = h5aget_space_c(attr_id, space_id) - END SUBROUTINE h5aget_space_f -! -!****s* H5A/h5aget_type_f -! -! NAME -! h5aget_type_f -! -! PURPOSE -! Gets an attribute datatype. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! type_id - attribute datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5aget_type_c(attr_id, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_TYPE_C'::h5aget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5aget_type_c - END INTERFACE - - hdferr = h5aget_type_c(attr_id, type_id) - END SUBROUTINE h5aget_type_f -! -!****s* H5A/h5aget_name_f -! -! NAME -! h5aget_name_f -! -! PURPOSE -! Gets an attribute name. -! -! INPUTS -! attr_id - attribute identifier -! size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE - SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! name length is successful, -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_C'::h5aget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5aget_name_c - END INTERFACE - - hdferr = h5aget_name_c(attr_id, size, buf) - END SUBROUTINE h5aget_name_f - -! -!****s* H5A/h5aget_name_by_idx_f -! -! NAME -! h5aget_name_by_idx_f -! -! PURPOSE -! Gets an attribute name, by attribute index position. -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS -! name - Attribute name -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! size - Size, in bytes, of attribute name -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & - n, name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed *TEST* check NULL - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! Returns attribute name size, - ! -1 if fail - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, - ! of the attribute -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T) :: size_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_name_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5aget_name_by_idx_f -! -!****s* H5A/h5aget_num_attrs_f -! -! NAME -! h5aget_num_attrs_f -! -! PURPOSE -! Determines the number of attributes attached to an object. -! -! INPUTS -! obj_id - object (group, dataset, or named datatype) -! identifier -! OUTPUTS -! attr_num - number of attributes attached to the object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NUM_ATTRS_C'::h5aget_num_attrs_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: attr_num - END FUNCTION h5aget_num_attrs_c - END INTERFACE - - hdferr = h5aget_num_attrs_c(obj_id, attr_num) - END SUBROUTINE h5aget_num_attrs_f - -! -!****s* H5A/h5adelete_f -! -! NAME -! h5adelete_f -! -! PURPOSE -! Deletes an attribute of an object (group, dataset or -! named datatype) -! -! INPUTS -! obj_id - object identifier -! name - attribute name -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE - SUBROUTINE h5adelete_f(obj_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5adelete_c(obj_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_C'::h5adelete_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - END FUNCTION h5adelete_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5adelete_c(obj_id, name, namelen) - END SUBROUTINE h5adelete_f - -! -!****s* H5A/h5aclose_f -! -! NAME -! h5aclose_f -! -! PURPOSE -! Closes the specified attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! SOURCE - SUBROUTINE h5aclose_f(attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aclose_c(attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACLOSE_C'::h5aclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - END FUNCTION h5aclose_c - END INTERFACE - - hdferr = h5aclose_c(attr_id) - END SUBROUTINE h5aclose_f - -! -!****s* H5A/h5aget_storage_size_f -! -! NAME -! h5aget_storage_size_f -! -! PURPOSE -! Returns the amount of storage required for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! size - attribute storage size -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_storage_size_f(attr_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5aget_storage_size_c(attr_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_STORAGE_SIZE_C'::h5aget_storage_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5aget_storage_size_c - END INTERFACE - - hdferr = h5aget_storage_size_c(attr_id, size) - END SUBROUTINE h5aget_storage_size_f - -! -!****s* H5A/h5aget_create_plist_f -! -! NAME -! h5aget_create_plist_f -! -! PURPOSE -! Gets an attribute creation property list identifier -! -! INPUTS -! attr_id - Identifier of the attribute -! OUTPUTS -! creation_prop_id - Identifier for the attribute’s creation property -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_create_plist_f(attr_id, creation_prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5aget_create_plist_c(attr_id, creation_prop_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_CREATE_PLIST_C'::h5aget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id - END FUNCTION h5aget_create_plist_c - END INTERFACE - - hdferr = h5aget_create_plist_c(attr_id, creation_prop_id) - END SUBROUTINE h5aget_create_plist_f - -! -!****s* H5A/h5arename_by_name_f -! -! NAME -! h5arename_by_name_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, -! whose attribute is to be renamed -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! lapl_id - Link access property list identifier -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! whose attribute is to be renamed - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION h5arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::h5arename_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5arename_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - - hdferr = h5arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - - END SUBROUTINE h5arename_by_name_f - -! -!****s* H5A/h5aopen_f -! -! NAME -! h5aopen_f -! -! PURPOSE -! Opens an attribute for an object specified by object -! identifier and attribute name -! -! INPUTS -! obj_id - Identifer for object to which attribute is attached -! attr_name - Name of attribute to open -! OUTPUTS -! attr_id - attribute identifier - -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! Success: 0 - ! Failure: -1 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list -!***** - INTEGER(HID_T) :: aapl_id_default - - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::h5aopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - - hdferr = h5aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - - END SUBROUTINE h5aopen_f - -! -!****s* H5A/h5adelete_by_idx_f -! -! NAME -! h5adelete_by_idx_f -! -! PURPOSE -! Deletes an attribute from an object according to index order -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, from which attribute is to be removed -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Offset within index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::h5adelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5adelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - obj_namelen = LEN(obj_name) - hdferr = h5adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - - END SUBROUTINE h5adelete_by_idx_f - -! -!****s* H5A/h5adelete_by_name_f -! -! NAME -! h5adelete_by_name_f -! -! PURPOSE -! Removes an attribute from a specified location -! -! INPUTS -! loc_id - Identifer for object to which attribute is attached -! obj_name - Name of attribute to open -! attr_name - Attribute access property list -! lapl_id - Link access property list -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::h5adelete_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5adelete_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - - END SUBROUTINE h5adelete_by_name_f - -! -!****s* H5A/h5aopen_by_idx_f -! -! NAME -! h5aopen_by_idx_f -! -! PURPOSE -! Opens an existing attribute that is attached to an object specified by location and name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::h5aopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - END FUNCTION h5aopen_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE h5aopen_by_idx_f - -! -!****s* H5A/h5aget_info_f -! -! NAME -! h5aget_info_f -! -! PURPOSE -! Retrieves attribute information, by attribute identifier -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! NOTE: In C it is defined as a structure: H5A_info_t -! -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! SOURCE - SUBROUTINE h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::h5aget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION h5aget_info_c - END INTERFACE - - hdferr = h5aget_info_c(attr_id, corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - - END SUBROUTINE h5aget_info_f - -! -!****s* H5A/h5aget_info_by_idx_f -! -! NAME -! h5aget_info_by_idx_f -! -! PURPOSE -! Retrieves attribute information, by attribute index position -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::h5aget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER, INTENT(IN) :: idx_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_info_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(present(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5aget_info_by_idx_f - -! -!****s* H5A/h5aget_info_by_name_f -! -! NAME -! h5aget_info_by_name_f -! -! PURPOSE -! Retrieves attribute information, by attribute name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! attr_name - Attribute name -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5aget_info_by_name_f(loc_id, obj_name, attr_name, & - f_corder_valid, corder, cset, data_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::h5aget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - END FUNCTION h5aget_info_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5aget_info_by_name_f - -! -!****s* H5A/h5acreate_by_name_f -! -! NAME -! h5acreate_by_name_f -! -! PURPOSE -! Creates an attribute attached to a specified object -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name, relative to loc_id, of object that attribute is to be attached to -! attr_name - Attribute name -! type_id - Attribute datatype identifier -! space_id - Attribute dataspace identifier -! -! OUTPUTS -! attr - an attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier (Currently not used.) -! aapl_id - Attribute access property list identifier (Currently not used.) -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE h5acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & - acpl_id, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT) :: attr - INTEGER, INTENT(OUT) :: hdferr - - INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id - INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::h5acreate_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr - - END FUNCTION h5acreate_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(acpl_id)) acpl_id_default = acpl_id - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - END SUBROUTINE h5acreate_by_name_f - -! -!****s* H5A/H5Aexists_f -! -! NAME -! H5Aexists_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! obj_id - Object identifier -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE h5aexists_f(obj_id, attr_name, attr_exists, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T) :: attr_exists_c - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::h5aexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: attr_exists_c - END FUNCTION h5aexists_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - hdferr = h5aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE h5aexists_f - -! -!****s* H5A/H5Aexists_by_name_f -! -! NAME -! H5Aexists_by_name_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! loc_id - Location identifier -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE - SUBROUTINE h5aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER :: attr_exists_c - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::h5aexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: attr_exists_c - END FUNCTION h5aexists_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - END SUBROUTINE h5aexists_by_name_f -! -!****s* H5A/H5Aopen_by_name_f -! -! NAME -! H5Aopen_by_name_f -! -! PURPOSE -! Opens an attribute for an object by object name and attribute name. -! -! INPUTS -! loc_id - Location from which to find object to which attribute is attached -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE - SUBROUTINE h5aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - ! (Currently unused; should be passed in as H5P_DEFAULT_F) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::h5aopen_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION h5aopen_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - - END SUBROUTINE h5aopen_by_name_f - -! -!****s* H5A/h5arename_f -! -! NAME -! h5arename_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! HISTORY -! N/A -! -! - -! SOURCE - SUBROUTINE h5arename_f(loc_id, old_attr_name, new_attr_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION h5arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::h5arename_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - - END FUNCTION h5arename_c - END INTERFACE - - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - hdferr = h5arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - - END SUBROUTINE h5arename_f - -END MODULE H5A - - diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90 deleted file mode 100644 index 5278280..0000000 --- a/fortran/src/H5Aff_F03.f90 +++ /dev/null @@ -1,1267 +0,0 @@ -!****h* ROBODoc/H5A (F03) -! NAME -! H5A_PROVISIONAL -! -! FILE -! src/fortran/src/H5Aff_F03.f90 -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions. -! It contains the same functions as H5Aff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 -! -! (A) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (1) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (2) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! (B) -! *** IMPORTANT *** -! If you add a new H5A 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 H5A_PROVISIONAL - - USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - ! This is the preferred way to call h5awrite - ! by passing an address - MODULE PROCEDURE h5awrite_ptr - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - - ! This is the preferred way to call h5aread - ! by passing an address - MODULE PROCEDURE h5aread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Awrite routine - - INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5awrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Aread routine - - INTERFACE - INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5aread_f_c - END INTERFACE - -CONTAINS - -!****s* H5A (F03)/h5awrite_f_F90 -! -! NAME -! h5awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_scalar - - SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_integer_1 - - - SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_2 - - SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_3 - - - SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_4 - - - SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_5 - - - SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_integer_6 - - - SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_integer_7 - - - SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_scalar - - SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_real_1 - - - SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_real_2 - - - SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_3 - - - SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_4 - - - SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_5 - - - SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_6 - - - SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5awrite_real_7 - - SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL h5awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE h5awrite_char_scalar - - SUBROUTINE h5awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_scalar_fix - - SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_1 - - SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_2 - - SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_3 - - SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_4 - - SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_5 - - - SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_6 - - SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5awrite_char_7 - -!****s* H5A (F03)/h5awrite_f_F03 -! -! NAME -! h5awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5awrite_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE h5awrite_ptr - -!****s* H5A (F03)/h5aread_f_F90 -! -! NAME -! h5aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! dims - Array to hold corresponding dimension sizes of data buffer buf; -! dim(k) has value of the k-th dimension of buffer buf; -! values are ignored if buf is a scalar -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, dims, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_scalar - - SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_1 - - - SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_2 - - - SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_3 - - - SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_4 - - - SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_5 - - - SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_6 - - - SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_integer_7 - - - SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_scalar - - SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_1 - - - SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_2 - - - SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_3 - - - SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_4 - - - SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_5 - - - SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_6 - - - SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE h5aread_real_7 - - SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - CALL h5aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) - - END SUBROUTINE h5aread_char_scalar - - SUBROUTINE h5aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_scalar_fix - - SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_1 - - - SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_2 - - - SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_3 - - SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_4 - - SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_5 - - - SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_6 - - - SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE h5aread_char_7 - - -!****s* H5A (F03)/h5aread_f_F03 -! -! NAME -! h5aread_f_F03 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran2003 Interface: -!! SUBROUTINE h5aread_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5aread_ptr(attr_id, mem_type_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5aread_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE h5aread_ptr - -END MODULE H5A_PROVISIONAL - - diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90 deleted file mode 100644 index 974b023..0000000 --- a/fortran/src/H5Aff_F90.f90 +++ /dev/null @@ -1,1618 +0,0 @@ -!****h* ROBODoc/H5A (F90) -! -! NAME -! H5A_PROVISIONAL -! -! FILE -! fortran/src/H5Aff_F90.f90 -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5A functions. It contains -! the same functions as H5Aff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Aff_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. * -! 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 H5A 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 H5A_PROVISIONAL - - USE H5GLOBAL - ! - !On Windows there are no big (integer*8) integers, so overloading - !for bug #670 does not work. I have to use DEC compilation directives to make - !Windows DEC Visual Fortran and OSF compilers happy and do right things. - ! 05/01/02 EP - ! - INTERFACE h5awrite_f - - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - END INTERFACE - -CONTAINS - - SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_S_C'::h5awrite_integer_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN)::buf - END FUNCTION h5awrite_integer_s_c - END INTERFACE - - hdferr = h5awrite_integer_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_scalar - - SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awrite_integer_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_1_C'::h5awrite_integer_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_integer_1_c - END INTERFACE - - hdferr = h5awrite_integer_1_c(attr_id, memtype_id, buf, dims) - - END SUBROUTINE h5awrite_integer_1 - - - SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) , & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_2_C'::h5awrite_integer_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_integer_2_c - END INTERFACE - - hdferr = h5awrite_integer_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_2 - - - SUBROUTINE h5awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_3_C'::h5awrite_integer_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_integer_3_c - END INTERFACE - - hdferr = h5awrite_integer_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_3 - - - SUBROUTINE h5awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_4_C'::h5awrite_integer_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_integer_4_c - END INTERFACE - - hdferr = h5awrite_integer_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_4 - - - SUBROUTINE h5awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_5_C'::h5awrite_integer_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_integer_5_c - END INTERFACE - - hdferr = h5awrite_integer_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_5 - - - SUBROUTINE h5awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_6_C'::h5awrite_integer_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_integer_6_c - END INTERFACE - - hdferr = h5awrite_integer_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_6 - - - SUBROUTINE h5awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_integer_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_INTEGER_7_C'::h5awrite_integer_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_integer_7_c - END INTERFACE - - hdferr = h5awrite_integer_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_7 - - - SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_S_C'::h5awrite_real_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN)::buf - END FUNCTION h5awrite_real_s_c - END INTERFACE - - hdferr = h5awrite_real_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_scalar - - SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_1_C'::h5awrite_real_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_real_1_c - END INTERFACE - - hdferr = h5awrite_real_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_1 - - - SUBROUTINE h5awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_2_C'::h5awrite_real_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_real_2_c - END INTERFACE - - hdferr = h5awrite_real_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_2 - - - SUBROUTINE h5awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_3_C'::h5awrite_real_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_real_3_c - END INTERFACE - - hdferr = h5awrite_real_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_3 - - - SUBROUTINE h5awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_4_C'::h5awrite_real_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_real_4_c - END INTERFACE - - hdferr = h5awrite_real_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_4 - - - SUBROUTINE h5awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_5_C'::h5awrite_real_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_real_5_c - END INTERFACE - - hdferr = h5awrite_real_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_5 - - - SUBROUTINE h5awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_6_C'::h5awrite_real_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_real_6_c - END INTERFACE - - hdferr = h5awrite_real_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_6 - - - SUBROUTINE h5awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_real_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_real_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_REAL_7_C'::h5awrite_real_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_real_7_c - END INTERFACE - - hdferr = h5awrite_real_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_7 - - SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*),INTENT(IN) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_S_C'::h5awritec_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN)::buf - END FUNCTION h5awritec_s_c - END INTERFACE - - hdferr = h5awritec_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_scalar - - SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_1_C'::h5awritec_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1))::buf - END FUNCTION h5awritec_1_c - END INTERFACE - - hdferr = h5awritec_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_1 - - - SUBROUTINE h5awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awritec_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_2_C'::h5awritec_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awritec_2_c - END INTERFACE - - hdferr = h5awritec_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_2 - - - SUBROUTINE h5awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_3_C'::h5awritec_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awritec_3_c - END INTERFACE - - hdferr = h5awritec_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_3 - - - SUBROUTINE h5awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_4_C'::h5awritec_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awritec_4_c - END INTERFACE - - hdferr = h5awritec_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_4 - - - SUBROUTINE h5awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_5_C'::h5awritec_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awritec_5_c - END INTERFACE - - hdferr = h5awritec_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_5 - - - SUBROUTINE h5awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_6_C'::h5awritec_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awritec_6_c - END INTERFACE - - hdferr = h5awritec_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_6 - - - SUBROUTINE h5awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! INTEGER, EXTERNAL :: h5awritec_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awritec_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITEC_7_C'::h5awritec_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awritec_7_c - END INTERFACE - - hdferr = h5awritec_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_7 - -! -! NAME -! h5aread_f -! -! PURPOSE -! Reads an attribute. -! -! INPUTS -! attr_id - attribute identifier -! memtype_id - attribute memory type identifier -! dims - 1D array of size 7, stores sizes of the -! - buf array dimensions. -! OUTPUTS -! buf - buffer to read attribute data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! April 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! - - SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_S_C'::h5aread_integer_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT)::buf - END FUNCTION h5aread_integer_s_c - END INTERFACE - hdferr = h5aread_integer_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_scalar - - SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_1_C'::h5aread_integer_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_integer_1_c - END INTERFACE - - hdferr = h5aread_integer_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_1 - - - SUBROUTINE h5aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT),DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_2_C'::h5aread_integer_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_integer_2_c - END INTERFACE - - hdferr = h5aread_integer_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_2 - - - SUBROUTINE h5aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_3_C'::h5aread_integer_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_integer_3_c - END INTERFACE - - hdferr = h5aread_integer_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_3 - - - SUBROUTINE h5aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_4_C'::h5aread_integer_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_integer_4_c - END INTERFACE - - hdferr = h5aread_integer_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_4 - - - SUBROUTINE h5aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_5_C'::h5aread_integer_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_integer_5_c - END INTERFACE - - hdferr = h5aread_integer_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_5 - - - SUBROUTINE h5aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_6_C'::h5aread_integer_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_integer_6_c - END INTERFACE - - hdferr = h5aread_integer_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_6 - - - SUBROUTINE h5aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_integer_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_integer_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_INTEGER_7_C'::h5aread_integer_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_integer_7_c - END INTERFACE - - hdferr = h5aread_integer_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_7 - - - SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_S_C'::h5aread_real_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT)::buf - END FUNCTION h5aread_real_s_c - END INTERFACE - - hdferr = h5aread_real_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_scalar - - SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_1_C'::h5aread_real_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_real_1_c - END INTERFACE - - hdferr = h5aread_real_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_1 - - - SUBROUTINE h5aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_2_C'::h5aread_real_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_real_2_c - END INTERFACE - - hdferr = h5aread_real_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_2 - - - SUBROUTINE h5aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_3_C'::h5aread_real_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_real_3_c - END INTERFACE - - hdferr = h5aread_real_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_3 - - - SUBROUTINE h5aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_4_C'::h5aread_real_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_real_4_c - END INTERFACE - - hdferr = h5aread_real_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_4 - - - SUBROUTINE h5aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_5_C'::h5aread_real_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_real_5_c - END INTERFACE - - hdferr = h5aread_real_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_5 - - - SUBROUTINE h5aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_6_C'::h5aread_real_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_real_6_c - END INTERFACE - - hdferr = h5aread_real_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_6 - - - SUBROUTINE h5aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_real_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_real_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_REAL_7_C'::h5aread_real_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_real_7_c - END INTERFACE - - hdferr = h5aread_real_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_7 - - SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_S_C'::h5areadc_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT) :: buf - END FUNCTION h5areadc_s_c - END INTERFACE - - hdferr = h5areadc_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_scalar - - SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_1_C'::h5areadc_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5areadc_1_c - END INTERFACE - - hdferr = h5areadc_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_1 - - - SUBROUTINE h5aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_2_C'::h5areadc_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5areadc_2_c - END INTERFACE - - hdferr = h5areadc_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_2 - - - SUBROUTINE h5aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_3_C'::h5areadc_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5areadc_3_c - END INTERFACE - - hdferr = h5areadc_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_3 - - - SUBROUTINE h5aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_4_C'::h5areadc_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5areadc_4_c - END INTERFACE - - hdferr = h5areadc_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_4 - - - SUBROUTINE h5aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_5_C'::h5areadc_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5areadc_5_c - END INTERFACE - - hdferr = h5areadc_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_5 - - - SUBROUTINE h5aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_6_C'::h5areadc_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5areadc_6_c - END INTERFACE - - hdferr = h5areadc_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_6 - - - SUBROUTINE h5aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5areadc_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5areadc_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREADC_7_C'::h5areadc_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5areadc_7_c - END INTERFACE - - hdferr = h5areadc_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_7 - -END MODULE H5A_PROVISIONAL - - diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 0d32dac..57b4d4d 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -1,6 +1,6 @@ /****h* H5Df/H5Df * PURPOSE - * This file contains C stubs for H5D Fortran APIs + * This file contains C stubs for H5D Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -48,7 +48,7 @@ * SOURCE */ int_f -nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -84,1161 +84,118 @@ DONE: * PURPOSE * Call H5Dopen2 to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * dapl_id - Dataset access property list + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * dapl_id - Dataset access property list * OUTPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, August 4, 1999 - * HISTORY - * Added 1.8 parameter: dapl_id - * SOURCE -*/ -int_f -nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) -/******/ -{ - char *c_name = NULL; - hid_t c_dset_id; - int ret_value = -1; - - /* - * Convert FORTRAN name to C name - */ - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - goto DONE; - - /* - * Call H5Dopen2 function. - */ - if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0) - goto DONE; - - *dset_id = (hid_t_f)c_dset_id; - ret_value = 0; - -DONE: - if(c_name) - HDfree(c_name); - return ret_value; -} - - -/****if* H5Df/h5dwritec_c - * NAME - * h5dwritec_c - * PURPOSE - * Call h5dwrite_c to write a dataset of characters - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function is added to accomodate oveloaded h5dwrite_f - * with the dims argument being of INTEGER(HSIZE_T) type - - * SOURCE -*/ -int_f -nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dwrite_c function. - */ - ret_value = nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -/****if* H5Df/h5dwrite_c - * NAME - * h5dwrite_c - * PURPOSE - * Call H5Dwrite to write a dataset - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function is added to accomodate oveloaded h5dwrite_f - * with the dims argument being of INTEGER(HSIZE_T) type - * - * Added nh5dwrite_integer(real,double)_s,1-7_c functions to eliminate - * complains about wrong parameter types in h5dwrite_c function - * called by Fortran rouitnes - * October 10, 2006 EIP - * - * SOURCE -*/ -int_f -nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -int_f -nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dwrite_c function. - */ - return nh5dwrite_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - - -/****if* H5Df/h5dwrite_ref_obj_c - * NAME - * h5dwrite_ref_obj_c - * PURPOSE - * Call H5Dwrite to write a dataset of object references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success,e-1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argumnet being of INTEGER(HSIZE_T) type. - * SOURCE -*/ -int_f -nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hobj_ref_t *buf_c; - unsigned int i, n; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer and copy references from Fortran. - */ - n = (unsigned int)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) - HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); - } - else return ret_value; - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/****if* H5Df/h5dwrite_ref_reg_c - * NAME - * h5dwrite_ref_reg_c - * PURPOSE - * Call H5Dwrite to write a dataset of dataset region references - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer with references to the objects. - * n - number of references to be stored. - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Tuesday, May 14, 2002 - * HISTORY - * This function was added to accomodate h5dwrite_f with the - * dims argument being of INTEGER(HSIZE_T) type - * SOURCE -*/ -int_f -nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c = NULL; - unsigned int i, n; - - n = (unsigned int)*dims; - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer and copy references from Fortran. - */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); - if ( buf_c != NULL ) { - for (i = 0; i < n; i++) { - HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); - buf = buf + REF_REG_BUF_LEN_F; - } - } - else return ret_value; - - - /* - * Call H5Dwrite function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - - - -/****if* H5Df/h5dreadc_c - * NAME - * h5dreadc_c - * PURPOSE - * Call h5dread_c to read a dataset of characters - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * OUTPUTS - * buf - character data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, May 15, 2002 - * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. - * SOURCE -*/ -int_f -nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -int_f -nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims) - -{ - int ret_value = -1; - - /* - * Call h5dread_c function. - */ - ret_value = nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, _fcdtocp(buf), dims); - - return ret_value; -} - -/****if* H5Df/h5dread_c - * NAME - * h5dread_c - * PURPOSE - * Call H5Draed to read a dataset - * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * OUTPUTS - * buf - data buffer - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, May 15, 2002 - * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. - * - * Added nh5dread_integer(real,double)_s,1-7_c functions to eliminate - * complains about wrong parameter types in h5dwrite_c function - * called by Fortran rouitnes - * October 10, 2006 EIP - * - * SOURCE -*/ -int_f -nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f H5_ATTR_UNUSED *dims) -/******/ -{ - int ret_value = -1; - herr_t ret; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Call H5Dread function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Wednesday, August 4, 1999 + * HISTORY + * Added 1.8 parameter: dapl_id + * SOURCE +*/ int_f -nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) - +h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id) +/******/ { - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + char *c_name = NULL; + hid_t c_dset_id; + int ret_value = -1; -{ /* - * Call h5dread_c function. + * Convert FORTRAN name to C name */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} - -int_f -nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) + goto DONE; -{ /* - * Call h5dread_c function. + * Call H5Dopen2 function. */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); -} + if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0) + goto DONE; -int_f -nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims) + *dset_id = (hid_t_f)c_dset_id; + ret_value = 0; -{ - /* - * Call h5dread_c function. - */ - return nh5dread_c(dset_id, mem_type_id, mem_space_id, file_space_id, xfer_prp, buf, dims); +DONE: + if(c_name) + HDfree(c_name); + return ret_value; } -/****if* H5Df/h5dread_ref_obj_c +/****if* H5Df/h5dwrite_ref_reg_c * NAME - * h5dread_ref_obj_c + * h5dwrite_ref_reg_c * PURPOSE - * Call H5Dread to read a dataset of object references + * Call H5Dwrite to write a dataset of dataset region references * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer to store references to the objects. - * n - number of references to be stored. + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer with references to the objects. + * n - number of references to be stored. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, May 15, 2002 + * Tuesday, May 14, 2002 * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * This function was added to accomodate h5dwrite_f with the + * dims argument being of INTEGER(HSIZE_T) type * SOURCE */ int_f -nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims) +h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims) /******/ { - int ret_value = -1; - herr_t ret = -1; - hid_t c_dset_id; - hid_t c_mem_type_id; - hid_t c_mem_space_id; - hid_t c_file_space_id; - hid_t c_xfer_prp; - hobj_ref_t *buf_c = NULL; - hsize_t i,n; - - /* - * Define transfer property - */ - c_xfer_prp = (hid_t)*xfer_prp; - - /* - * Allocate temporary buffer. - */ - n = (hsize_t)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n); - if ( buf_c != NULL ) { - /* - * Call H5Dread function. - */ - c_dset_id = (hid_t)*dset_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_mem_space_id = (hid_t)*mem_space_id; - c_file_space_id = (hid_t)*file_space_id; - ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - if (ret >=0) { - for (i = 0; i < n; i++) - HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t)); - } - if ( buf_c != NULL ) HDfree(buf_c); - } - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; + int ret_value = -1; + herr_t ret; + hid_t c_dset_id; + hid_t c_mem_type_id; + hid_t c_mem_space_id; + hid_t c_file_space_id; + hid_t c_xfer_prp; + hdset_reg_ref_t *buf_c = NULL; + unsigned int i, n; + + n = (unsigned int)*dims; + /* + * Define transfer property + */ + c_xfer_prp = (hid_t)*xfer_prp; + + /* + * Allocate temporary buffer and copy references from Fortran. + */ + buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); + if ( buf_c != NULL ) { + for (i = 0; i < n; i++) { + HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); + buf = buf + REF_REG_BUF_LEN_F; + } + } + else return ret_value; + + + /* + * Call H5Dwrite function. + */ + c_dset_id = (hid_t)*dset_id; + c_mem_type_id = (hid_t)*mem_type_id; + c_mem_space_id = (hid_t)*mem_space_id; + c_file_space_id = (hid_t)*file_space_id; + ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); + HDfree(buf_c); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; } /****if* H5Df/h5dread_ref_reg_c @@ -1247,25 +204,25 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i * PURPOSE * Call H5Dread to read a dataset of dataset region references * INPUTS - * dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * mem_space_id - memory dataspace identifier - * file_space_id - memory dataspace identifier - * xfer_pr - identifier of transfer property list - * buf - data buffer to store references to the objects. - * n - number of references to be stored. + * dset_id - dataset identifier + * mem_type_id - memory datatype identifier + * mem_space_id - memory dataspace identifier + * file_space_id - memory dataspace identifier + * xfer_pr - identifier of transfer property list + * buf - data buffer to store references to the objects. + * n - number of references to be stored. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, May 15, 2002 + * Wednesday, May 15, 2002 * HISTORY - * This function was added to accomodate h5dread_f subroutine - * with the dims parameter being of INTEGER(HSIZE_T_F) size. + * This function was added to accomodate h5dread_f subroutine + * with the dims parameter being of INTEGER(HSIZE_T_F) size. * SOURCE */ int_f -nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) +h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims) /******/ { int ret_value = -1; @@ -1317,19 +274,19 @@ nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i * PURPOSE * Call H5Dclose to close a dataset * INPUTS - * dset_id - identifier of the dataset to be closed + * dset_id - identifier of the dataset to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -nh5dclose_c ( hid_t_f *dset_id ) +h5dclose_c ( hid_t_f *dset_id ) /******/ { int ret_value = 0; @@ -1345,21 +302,21 @@ nh5dclose_c ( hid_t_f *dset_id ) * PURPOSE * Call H5Dget_space to obtain dataspace of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * space_id - identifier of the dataset's dataspace + * space_id - identifier of the dataset's dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) +h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) /******/ { int ret_value = -1; @@ -1380,21 +337,21 @@ nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id) * PURPOSE * Call H5Dget_type to obtain datatype of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * type_id - identifier of the dataset's datatype + * type_id - identifier of the dataset's datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) +h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) /******/ { int ret_value = -1; @@ -1416,23 +373,23 @@ nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id) * h5dget_create_plist_c * PURPOSE * Call H5Dget_create_plist to obtain creation property list - * of a dataset + * of a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * plist_id - identifier of he dataset creation property list + * plist_id - identifier of he dataset creation property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * HISTORY * * SOURCE */ int_f -nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) +h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -1456,24 +413,24 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) * PURPOSE * Call H5Dset_extent to extend dataset with unlimited dimensions * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * dims - array with the dimension sizes + * dims - array with the dimension sizes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, August 19, 1999 + * Thursday, August 19, 1999 * * HISTORY - * Changed name from the now obsolete h5dextend - * to h5dset_extent in order to match new fortran interface. + * Changed name from the now obsolete h5dextend + * to h5dset_extent in order to match new fortran interface. * -MSB- March 14, 2008 * SOURCE */ int_f -nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) +h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) /******/ { hid_t c_space_id; @@ -1503,28 +460,28 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims) return ret_value; } -/****if* H5Df/nh5dget_storage_size_c +/****if* H5Df/h5dget_storage_size_c * NAME - * nh5dget_storage_size_c + * h5dget_storage_size_c * PURPOSE * Call H5Dget_storage_size to return the amount of storage - * required for a dataset + * required for a dataset * INPUTS - * dset_id - identifier of the dataset + * dset_id - identifier of the dataset * OUTPUTS - * size - the amount of storage required for a dataset + * size - the amount of storage required for a dataset * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE */ int_f -nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) +h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -1539,29 +496,29 @@ nh5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size) return ret_value; } -/****if* H5Df/nh5dvlen_get_max_len_c +/****if* H5Df/h5dvlen_get_max_len_c * NAME - * nh5dvlen_get_max_len_c + * h5dvlen_get_max_len_c * PURPOSE * Get the maximum size of the VL dataset element * INPUTS - * dset_id - identifier of the dataset - * type_id - datatype identifier - * space_id - dataspace identifier + * dset_id - identifier of the dataset + * type_id - datatype identifier + * space_id - dataspace identifier * OUTPUTS - * len - maximum length of the VL dataset element + * len - maximum length of the VL dataset element * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, October 22, 2002 + * Tuesday, October 22, 2002 * HISTORY * * SOURCE */ int_f -nh5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) +h5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len) /******/ { int ret_value = -1; @@ -1597,34 +554,34 @@ DONE: HDfree(c_buf); return ret_value; } -/****if* H5Df/nh5dwrite_vl_integer_c +/****if* H5Df/h5dwrite_vl_integer_c * NAME - * nh5dwrite_vl_integer_c + * h5dwrite_vl_integer_c * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE */ int_f -nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1670,35 +627,35 @@ DONE: return ret_value; } -/****if* H5Df/nh5dread_vl_integer_c +/****if* H5Df/h5dread_vl_integer_c * NAME - * nh5dread_vl_integer_c + * h5dread_vl_integer_c * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 24, 2002 + * Wednesday, October 24, 2002 * HISTORY * * SOURCE */ int_f -nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1742,33 +699,33 @@ DONE: return ret_value; } -/****if* H5Df/nh5dwrite_vl_string_c +/****if* H5Df/h5dwrite_vl_string_c * NAME - * nh5dwrite_vl_string_c + * h5dwrite_vl_string_c * PURPOSE * Write variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 28, 2002 + * Monday, October 28, 2002 * HISTORY * * SOURCE */ int_f -nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1829,33 +786,33 @@ DONE: HDfree(tmp); return ret_value; } -/****if* H5Df/nh5dread_vl_string_c +/****if* H5Df/h5dread_vl_string_c * NAME - * nh5dread_vl_string_c + * h5dread_vl_string_c * PURPOSE * Read variable length strings from Fortran program * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = number of strings of size max_len - * Output: buf - data buffer - * len - array of strings lengths + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = number of strings of size max_len + * Output: buf - data buffer + * len - array of strings lengths * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, November 1, 2002 + * Friday, November 1, 2002 * HISTORY * * SOURCE */ int_f -nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1912,34 +869,34 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa return ret_value; } -/****if* H5Df/nh5dwrite_vl_real_c +/****if* H5Df/h5dwrite_vl_real_c * NAME - * nh5dwrite_vl_real_c + * h5dwrite_vl_real_c * PURPOSE * Write variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * buf - data buffer - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type - * len - array element lenghts + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * buf - data buffer + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE */ int_f -nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +h5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -1985,35 +942,35 @@ DONE: return ret_value; } -/****if* H5Df/nh5dread_vl_real_c +/****if* H5Df/h5dread_vl_real_c * NAME - * nh5dread_vl_real_c + * h5dread_vl_real_c * PURPOSE * Read variable length dataset * INPUTS - * dset_id - identifier of the dataset - * mem_type_id - datatype identifier - * mem_space_id - dataspace identifier - * file_space_id - file dataspace identifier - * xfer - file transfer property - * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dset_id - identifier of the dataset + * mem_type_id - datatype identifier + * mem_space_id - dataspace identifier + * file_space_id - file dataspace identifier + * xfer - file transfer property + * dims - one-demnsional array of size 2 + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS - * buf - data buffer - * len - array element lenghts + * buf - data buffer + * len - array element lenghts * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, November 11, 2002 + * Monday, November 11, 2002 * HISTORY * * SOURCE */ int_f -nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) +h5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len) /******/ { int ret_value = -1; @@ -2058,39 +1015,6 @@ DONE: return ret_value; } -/****if* H5Df/h5dfillc_c - * NAME - * h5dfillc_c - * PURPOSE - * Call h5fill_c to fill memory buffer with a fill value - * INPUTS - * fill_value - fill value - * fill_type_id - fill value datatype identifier - * space_id - memory space selection identifier - * buf - memory buffer to fill - * mem_type_id - memory buffer dtatype identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, March 12, 2003 - * HISTORY - * - * SOURCE -*/ -int_f -nh5dfillc_c (_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id) -/******/ -{ - int ret_value = -1; - - /* - * Call h5dfill_c function. - */ - ret_value = h5dfill_c(_fcdtocp(fill_value), fill_type_id, space_id, _fcdtocp(buf), mem_type_id); - - return ret_value; -} /****if* H5Df/h5dfill_c * NAME * h5dfill_c @@ -2135,98 +1059,26 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b return ret_value; } -int_f -nh5dfill_integer_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -nh5dfill_real_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -int_f -nh5dfill_double_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id) - -{ - int ret_value = -1; - herr_t ret; - hid_t c_fill_type_id; - hid_t c_mem_type_id; - hid_t c_space_id; - - c_fill_type_id = (hid_t)*fill_type_id; - c_mem_type_id = (hid_t)*mem_type_id; - c_space_id = (hid_t)*space_id; - - /* - * Call H5Dfill function. - */ - ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - /****if* H5Df/h5dget_space_status_c * NAME * h5dget_space_status_c * PURPOSE * Call H5Dget_space_status to request dataspace allocation status * INPUTS - * dset_id - dataset identifier + * dset_id - dataset identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) +h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) /******/ { int ret_value = -1; @@ -2256,21 +1108,21 @@ nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag) * loc_id - Identifier of the file or group within which to create the dataset. * type_id - Identifier of the datatype to use when creating the dataset. * space_id - Identifier of the dataspace to use when creating the dataset. - * dcpl_id - Dataset creation property list identifier. - * dapl_id - Dataset access property list identifier. + * dcpl_id - Dataset creation property list identifier. + * dapl_id - Dataset access property list identifier. * OUTPUTS * - * dset_id - dataset identifier + * dset_id - dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * SOURCE */ int_f -nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id) /******/ { @@ -2355,8 +1207,8 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, * file_space_id - file dataspace identifier * xfer - file transfer property * dims - one-demnsional array of size 2 - * dims[0] = MAXLENGTH - * dims[1] = number of elements of VL type + * dims[0] = MAXLENGTH + * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer * len - array element lenghts @@ -2396,9 +1248,9 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, ret_value = 0; return ret_value; } -/****if* H5Df/nh5dget_access_plist_c +/****if* H5Df/h5dget_access_plist_c * NAME - * nh5dget_access_plist_c + * h5dget_access_plist_c * PURPOSE * Call H5Dget_access_plist * INPUTS @@ -2414,7 +1266,7 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, * SOURCE */ int_f -nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) +h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) /******/ { int ret_value = -1; @@ -2430,22 +1282,22 @@ nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id) return ret_value; } -/****if* H5Df/nh5dvlen_reclaim_c +/****if* H5Df/h5dvlen_reclaim_c * NAME * h5dvlen_reclaim_c * PURPOSE * Call H5Dvlen_reclaim * INPUTS - * type_id - Identifier of the datatype. - * space_id - Identifier of the dataspace. - * plist_id - Identifier of the property list used to create the buffer. - * buf - Pointer to the buffer to be reclaimed. + * type_id - Identifier of the datatype. + * space_id - Identifier of the dataspace. + * plist_id - Identifier of the property list used to create the buffer. + * buf - Pointer to the buffer to be reclaimed. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January 15, 2011 + * January 15, 2011 * * SOURCE */ diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 new file mode 100644 index 0000000..afdb5ba --- /dev/null +++ b/fortran/src/H5Dff.F90 @@ -0,0 +1,1878 @@ +!****h* ROBODoc/H5D +! +! NAME +! MODULE H5D +! +! FILE +! fortran/src/H5Dff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5D 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 +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed. Therefore, we can not create just one subroutine for +! each array type (integer, real, etc...) and use a +! rank 1 array of assumed size to handle multiple ranks, i.e. +! (i.e. integer, dimension(*) :: ... ) +! (i.e. real , dimension(*) :: ... ) etc... +! +! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may +! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved +! the statement instead to each subroutine. +! +! +! (4) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (A) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (B) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (b) an allocated allocatable variable that has the TARGET attribute, or +! (c) an associated pointer. +! +! - When X is a character, for interoperability the standard is: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require the +! argument in C_LOC to be of the variant: +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5D 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. +! +!***** + +#include + +MODULE H5D + + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + + INTERFACE h5dextend_f + MODULE PROCEDURE h5dset_extent_f + END INTERFACE + + INTERFACE h5dread_vl_f + MODULE PROCEDURE h5dread_vl_integer + MODULE PROCEDURE h5dread_vl_real + MODULE PROCEDURE h5dread_vl_string + END INTERFACE + + INTERFACE h5dwrite_vl_f + MODULE PROCEDURE h5dwrite_vl_integer + MODULE PROCEDURE h5dwrite_vl_real + MODULE PROCEDURE h5dwrite_vl_string + END INTERFACE + + INTERFACE h5dwrite_f + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_char_scalar + ! This is the preferred way to call h5dwrite + ! by passing an address + MODULE PROCEDURE h5dwrite_ptr + END INTERFACE + + INTERFACE h5dread_f + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_char_scalar + ! This is the preferred way to call h5dread + ! by passing an address + MODULE PROCEDURE h5dread_ptr + + END INTERFACE + + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dwrite routine + + INTERFACE + INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & + mem_space_id_default , & + file_space_id_default, & + xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dwrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dread routine + + INTERFACE + INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dread_f_c + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_c_float + MODULE PROCEDURE h5dfill_c_double +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + MODULE PROCEDURE h5dfill_c_long_double +#endif + MODULE PROCEDURE h5dfill_char + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dfill routine + + INTERFACE + INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + TYPE(C_PTR), VALUE :: f_ptr_fill_value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + TYPE(C_PTR), VALUE :: f_ptr_buf + INTEGER(HID_T) :: mem_type_id + END FUNCTION h5dfill_c + END INTERFACE + +CONTAINS + +! +!****s* H5D/h5dcreate_f +! +! NAME +! h5dcreate_f +! +! PURPOSE +! Creates a dataset at the specified location +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! type_id - dataset datatype identifier +! space_id - dataset dataspace identifier +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! creation_prp - Dataset creation property list +! lcpl_id - Link creation property list +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! - Added version's 1.8 new optional parameters +! February, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & + hdferr, dcpl_id, lcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER :: namelen ! Name length + + INTERFACE + INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & + space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) & + BIND(C,NAME='h5dcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & + lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_f + +! +!****s* H5D/h5dopen_f +! +! NAME +! h5dopen_f +! +! PURPOSE +! Opens an existing dataset. +! +! INPUTS +! loc_id - file or group identifier +! name - dataset name +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dapl_id - Dataset access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! -Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! -Added 1.8 (optional) parameter dapl_id +! February, 2008, M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list +!***** + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: dapl_id_default + + INTERFACE + INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) & + BIND(C,NAME='h5dopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dopen_c + END INTERFACE + + dapl_id_default = H5P_DEFAULT_F + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + + END SUBROUTINE h5dopen_f + +! +!****s* H5D/h5dclose_f +! +! NAME +! h5dclose_f +! +! PURPOSE +! Closes a dataset. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dclose_f(dset_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dclose_c(dset_id) & + BIND(C,NAME='h5dclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + END FUNCTION h5dclose_c + END INTERFACE + + hdferr = h5dclose_c(dset_id) + + END SUBROUTINE h5dclose_f + +! +!****s* H5D/h5dget_type_f +! +! NAME +! h5dget_type_f +! +! PURPOSE +! Returns an identifier for a copy of the datatype for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! datatype_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! +! SOURCE + SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_type_c(dataset_id, datatype_id) & + BIND(C,NAME='h5dget_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: datatype_id + END FUNCTION h5dget_type_c + END INTERFACE + + hdferr = h5dget_type_c (dataset_id, datatype_id) + END SUBROUTINE h5dget_type_f + +! +!****s* H5D/h5dset_extent +! +! NAME +! h5dset_extent (instead of obsolete name: h5dextend_f) +! +! PURPOSE +! Extends a dataset with unlimited dimension. +! +! INPUTS +! dataset_id - dataset identifier +! size - array containing the new magnitude of +! each dimension +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Changed name from the now obsolete h5dextend_f +! to h5dset_extent_f. Provided interface to old name +! for backward compatability. -MSB- March 14, 2008 +! +! SOURCE + SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + ! Array containing + ! dimensions' sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dset_extent_c(dataset_id, size) & + BIND(C,NAME='h5dset_extent_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + END FUNCTION h5dset_extent_c + END INTERFACE + + hdferr = H5Dset_extent_c(dataset_id, size) + END SUBROUTINE h5dset_extent_f + +!****s* H5D/h5dget_create_plist_f +! +! NAME +! h5dget_create_plist_f +! +! PURPOSE +! Returns an identifier for a copy of the dataset creation +! property list for a dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! plist_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! SOURCE + SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation + ! property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) & + BIND(C,NAME='h5dget_create_plist_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_create_plist_c + END INTERFACE + + hdferr = h5dget_create_plist_c(dataset_id, plist_id) + END SUBROUTINE h5dget_create_plist_f + +! +!****s* H5D/h5dget_storage_size_f +! +! NAME +! h5dget_storage_size_f +! +! PURPOSE +! Returns the amount of storage requires by a dataset +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! size - datastorage size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! SOURCE + SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage + ! allocated for dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) & + BIND(C,NAME='h5dget_storage_size_c') + IMPORT :: HID_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5dget_storage_size_c + END INTERFACE + + hdferr = h5dget_storage_size_c(dataset_id, size) + END SUBROUTINE h5dget_storage_size_f + +! +!****s* H5D/h5dvlen_get_max_len_f +! +! NAME +! h5dvlen_get_max_len_f +! +! PURPOSE +! Returns maximum length of the VL array elements +! +! INPUTS +! dataset_id - dataset identifier +! type_id - datatype identifier +! space_id - dataspace identifier +! OUTPUTS +! size - buffer size +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! October 15, 2002 +! +! SOURCE + SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) & + BIND(C,NAME='h5dvlen_get_max_len_c') + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(SIZE_T), INTENT(OUT) :: len + END FUNCTION h5dvlen_get_max_len_c + END INTERFACE + + hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + END SUBROUTINE h5dvlen_get_max_len_f + +! +!****s* H5D/h5dget_space_status_f +! +! NAME +! h5dget_space_status_f +! +! PURPOSE +! Returns the status of data space allocation. +! +! INPUTS +! dset_id - dataset identifier +! OUTPUTS +! flag - status; may have one of the following values: +! H5D_SPACE_STS_ERROR_F +! H5D_SPACE_STS_NOT_ALLOCATED_F +! H5D_SPACE_STS_PART_ALLOCATED_F +! H5D_SPACE_STS_ALLOCATED_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + !***** + INTERFACE + INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) & + BIND(C,NAME='h5dget_space_status_c') + IMPORT :: HID_T + INTEGER(HID_T) :: dset_id + INTEGER :: flag + END FUNCTION h5dget_space_status_c + END INTERFACE + + hdferr = h5dget_space_status_c(dset_id, flag) + END SUBROUTINE h5dget_space_status_f + +! +!****s* H5D/h5dcreate_anon_f +! +! NAME +! h5dcreate_anon_f +! +! PURPOSE +! Creates a dataset in a file without linking it into the file structure +! +! INPUTS +! loc_id - Identifier of the file or group within which to create the dataset. +! type_id - Identifier of the datatype to use when creating the dataset. +! space_id - Identifier of the dataspace to use when creating the dataset. +! OUTPUTS +! dset_id - dataset identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! dcpl_id - Dataset creation property list identifier. +! dapl_id - Dataset access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 11, 2008 +! +! SOURCE + SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. + INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. +!***** + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) & + BIND(C,NAME='h5dcreate_anon_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_anon_c + END INTERFACE + + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_anon_f + + SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dwrite_vl_integer_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_integer_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_integer + + SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dread_vl_integer_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_integer_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_integer + + SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store + ! the length of each + ! element + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dwrite_vl_real_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_real_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_real + + SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! -1 if failed, 0 otherwise + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) & + BIND(C,NAME='h5dread_vl_real_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_real_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_real + + SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + ! xfer_prp_default, tmp_buf, dims, str_len) + xfer_prp_default, buf, dims, str_len) & + BIND(C,NAME='h5dwrite_vl_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf + END FUNCTION + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + + END SUBROUTINE h5dwrite_vl_string + + SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & + hdferr, mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store + ! the length of each + ! element + CHARACTER(LEN=*), INTENT(OUT), & + DIMENSION(dims(2)) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, str_len) & + BIND(C,NAME='h5dread_vl_string_c') + IMPORT :: c_char + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len + CHARACTER(KIND=C_CHAR), DIMENSION(dims(2)) :: buf + END FUNCTION h5dread_vl_string_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + RETURN + END SUBROUTINE h5dread_vl_string + +! +!****s* H5D/h5dget_offset_f +! +! NAME +! h5dget_offset_f +! +! PURPOSE +! Returns dataset address in file. +! +! INPUTS +! dataset_id - Dataset identifier. +! OUTPUTS +! offset - The offset in bytes. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! April 16, 2015 +! +! SOURCE + SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER(HADDR_T) FUNCTION h5dget_offset(dset_id) BIND(C,NAME='H5Dget_offset') + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN), VALUE :: dset_id + END FUNCTION h5dget_offset + END INTERFACE + + offset = h5dget_offset(dset_id) + + hdferr = 0 + IF(offset .LT. 0) hdferr = -1 + + END SUBROUTINE h5dget_offset_f + +! +!****s* H5D/h5dget_space_f +! +! NAME +! h5dget_space_f +! +! PURPOSE +! Returns an identifier for a copy of the dataspace for a +! dataset. +! +! INPUTS +! dataset_id - dataset identifier +! OUTPUTS +! dataspace_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) BIND(C,NAME='h5dget_space_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + END FUNCTION h5dget_space_c + END INTERFACE + + hdferr = h5dget_space_c(dataset_id, dataspace_id) + END SUBROUTINE h5dget_space_f + +!****s* H5D/h5dget_access_plist_f +! +! NAME +! h5dget_access_plist_f +! +! PURPOSE +! Returns a copy of the dataset creation property list. +! +! INPUTS +! dset_id - Dataset identifier +! +! OUTPUTS +! plist_id - Dataset access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! SOURCE + SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER , INTENT(OUT) :: hdferr + !***** + INTERFACE + INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) BIND(C,NAME='h5dget_access_plist_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_access_plist_c + END INTERFACE + + hdferr = h5dget_access_plist_c(dset_id, plist_id) + + END SUBROUTINE h5dget_access_plist_f + + + SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + TYPE(C_PTR) :: f_ptr + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) & + BIND(C,NAME='h5dwrite_ref_reg_c') + IMPORT :: HID_T, HSIZE_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_scalar_fix + + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hobj_ref_t_f), INTENT(INOUT) , & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) & + BIND(C,NAME='h5dread_ref_reg_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dread_reference_dsetreg + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) + + END SUBROUTINE h5dread_char_scalar_fix + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dwrite_ptr + +!****s* H5D (F03)/h5dread_f_F03 +! +! NAME +! h5dread_f_F03 +! +! PURPOSE +! Reads raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset read from. +! mem_type_id - Identifier of the memory datatype. +! +! Outputs: +! buf - Buffer to receive data read from file. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(INOUT) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + END SUBROUTINE h5dread_ptr + +! +! NAME +! h5dfill_integer +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! + + SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_c_float +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_FLOAT), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_valuer) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_float + + !---------------------------------------------------------------------- + ! Name: h5dfill_c_double + ! + ! Purpose: Fills dataspace elements with a fill value in a memory buffer. + ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes + ! of the fillvalues and buffers are supported. Buffer and fillvalue + ! are assumed to have the same datatype. + ! Only one-dimesional buffers are supported. + ! + ! Inputs: + ! fill_value - fill value + ! space_id - memory space selection identifier + ! buf - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_c_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_double + +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_c_long_double +#endif +! +! NAME +! h5dfill_char +! +! PURPOSE +! Fills dataspace elements with a fill value in a memory buffer. +! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes +! of the fillvalues and buffers are supported. Buffer and fillvalue +! are assumed to have the same datatype. +! Only one-dimesional buffers are supported. +! +! Inputs: +! fill_value - fill value +! space_id - memory space selection identifier +! buf - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_char +! +!****s* H5D (F03)/h5dvlen_reclaim_f +! NAME +! h5dvlen_reclaim_f +! +! PURPOSE +! Reclaims VL datatype memory buffers. +! +! Inputs: +! +! type_id - Identifier of the datatype. +! space_id - Identifier of the dataspace. +! plist_id - Identifier of the property list used to create the buffer. +! buf - Pointer to the buffer to be reclaimed. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! January 11, 2011 +! +! Fortran2003 Interface: + SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: plist_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T) :: type_id + INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: plist_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dvlen_reclaim_c + END INTERFACE + + hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) + + END SUBROUTINE H5Dvlen_reclaim_f + + +END MODULE H5D + + diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 deleted file mode 100644 index 3ad868c..0000000 --- a/fortran/src/H5Dff.f90 +++ /dev/null @@ -1,1035 +0,0 @@ -!****h* ROBODoc/H5D -! -! NAME -! MODULE H5D -! -! FILE -! fortran/src/H5Dff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5D functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 H5D 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 H5D - USE H5GLOBAL - - INTERFACE h5dextend_f - MODULE PROCEDURE h5dset_extent_f - END INTERFACE - - INTERFACE h5dread_vl_f - MODULE PROCEDURE h5dread_vl_integer - MODULE PROCEDURE h5dread_vl_real - MODULE PROCEDURE h5dread_vl_string - END INTERFACE - - INTERFACE h5dwrite_vl_f - MODULE PROCEDURE h5dwrite_vl_integer - MODULE PROCEDURE h5dwrite_vl_real - MODULE PROCEDURE h5dwrite_vl_string - END INTERFACE - -CONTAINS - -! -!****s* H5D/h5dcreate_f -! -! NAME -! h5dcreate_f -! -! PURPOSE -! Creates a dataset at the specified location -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! type_id - dataset datatype identifier -! space_id - dataset dataspace identifier -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! creation_prp - Dataset creation property list -! lcpl_id - Link creation property list -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! - Added version's 1.8 new optional parameters -! February, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & - hdferr, dcpl_id, lcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER :: namelen ! Name length - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & - space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & - lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_f - -! -!****s* H5D/h5dopen_f -! -! NAME -! h5dopen_f -! -! PURPOSE -! Opens an existing dataset. -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! -Added 1.8 (optional) parameter dapl_id -! February, 2008, M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list -!***** - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: dapl_id_default - - INTERFACE - INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dopen_c - END INTERFACE - - dapl_id_default = H5P_DEFAULT_F - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - - END SUBROUTINE h5dopen_f - -! -!****s* H5D/h5dclose_f -! -! NAME -! h5dclose_f -! -! PURPOSE -! Closes a dataset. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dclose_f(dset_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dclose_c(dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - END FUNCTION h5dclose_c - END INTERFACE - - hdferr = h5dclose_c(dset_id) - - END SUBROUTINE h5dclose_f - -! -!****s* H5D/h5dget_type_f -! -! NAME -! h5dget_type_f -! -! PURPOSE -! Returns an identifier for a copy of the datatype for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! datatype_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! -! SOURCE - SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: datatype_id - END FUNCTION h5dget_type_c - END INTERFACE - - hdferr = h5dget_type_c (dataset_id, datatype_id) - END SUBROUTINE h5dget_type_f - -! -!****s* H5D/h5dset_extent -! -! NAME -! h5dset_extent (instead of obsolete name: h5dextend_f) -! -! PURPOSE -! Extends a dataset with unlimited dimension. -! -! INPUTS -! dataset_id - dataset identifier -! size - array containing the new magnitude of -! each dimension -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Changed name from the now obsolete h5dextend_f -! to h5dset_extent_f. Provided interface to old name -! for backward compatability. -MSB- March 14, 2008 -! -! SOURCE - SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dset_extent_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - END FUNCTION h5dset_extent_c - END INTERFACE - - hdferr = H5Dset_extent_c(dataset_id, size) - END SUBROUTINE h5dset_extent_f - -!****s* H5D/h5dget_create_plist_f -! -! NAME -! h5dget_create_plist_f -! -! PURPOSE -! Returns an identifier for a copy of the dataset creation -! property list for a dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! plist_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! SOURCE - SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation - ! property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_create_plist_c - END INTERFACE - - hdferr = h5dget_create_plist_c(dataset_id, plist_id) - END SUBROUTINE h5dget_create_plist_f - -! -!****s* H5D/h5dget_storage_size_f -! -! NAME -! h5dget_storage_size_f -! -! PURPOSE -! Returns the amount of storage requires by a dataset -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! size - datastorage size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! SOURCE - SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage - ! allocated for dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5dget_storage_size_c - END INTERFACE - - hdferr = h5dget_storage_size_c(dataset_id, size) - END SUBROUTINE h5dget_storage_size_f - -! -!****s* H5D/h5dvlen_get_max_len_f -! -! NAME -! h5dvlen_get_max_len_f -! -! PURPOSE -! Returns maximum length of the VL array elements -! -! INPUTS -! dataset_id - dataset identifier -! type_id - datatype identifier -! space_id - dataspace identifier -! OUTPUTS -! size - buffer size -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! -! SOURCE - SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(SIZE_T), INTENT(OUT) :: len - END FUNCTION h5dvlen_get_max_len_c - END INTERFACE - - hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - END SUBROUTINE h5dvlen_get_max_len_f - -! -!****s* H5D/h5dget_space_status_f -! -! NAME -! h5dget_space_status_f -! -! PURPOSE -! Returns the status of data space allocation. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! flag - status; may have one of the following values: -! H5D_SPACE_STS_ERROR_F -! H5D_SPACE_STS_NOT_ALLOCATED_F -! H5D_SPACE_STS_PART_ALLOCATED_F -! H5D_SPACE_STS_ALLOCATED_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - !***** - INTERFACE - INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c - !DEC$ENDIF - INTEGER(HID_T) :: dset_id - INTEGER :: flag - END FUNCTION h5dget_space_status_c - END INTERFACE - - hdferr = h5dget_space_status_c(dset_id, flag) - END SUBROUTINE h5dget_space_status_f - -! -!****s* H5D/h5dcreate_anon_f -! -! NAME -! h5dcreate_anon_f -! -! PURPOSE -! Creates a dataset in a file without linking it into the file structure -! -! INPUTS -! loc_id - Identifier of the file or group within which to create the dataset. -! type_id - Identifier of the datatype to use when creating the dataset. -! space_id - Identifier of the dataspace to use when creating the dataset. -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dcpl_id - Dataset creation property list identifier. -! dapl_id - Dataset access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 11, 2008 -! -! SOURCE - SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. -!***** - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_anon_c - END INTERFACE - - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_anon_f - - SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_integer_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_integer - - SUBROUTINE h5dread_vl_integer(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_integer_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_integer - - SUBROUTINE h5dwrite_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_real_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_real - - SUBROUTINE h5dread_vl_real(dset_id, mem_type_id, buf, dims, len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_real_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_real - - SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - ! xfer_prp_default, tmp_buf, dims, str_len) - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - - END SUBROUTINE h5dwrite_vl_string - - SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & - hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store - ! the length of each - ! element - CHARACTER(LEN=*), INTENT(OUT), & - DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION h5dread_vl_string_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - RETURN - END SUBROUTINE h5dread_vl_string - -! -!****s* H5D/h5dget_space_f -! -! NAME -! h5dget_space_f -! -! PURPOSE -! Returns an identifier for a copy of the dataspace for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! dataspace_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: dataspace_id - END FUNCTION h5dget_space_c - END INTERFACE - - hdferr = h5dget_space_c(dataset_id, dataspace_id) -END SUBROUTINE h5dget_space_f - -!****s* H5D/h5dget_access_plist_f -! -! NAME -! h5dget_access_plist_f -! -! PURPOSE -! Returns a copy of the dataset creation property list. -! -! INPUTS -! dset_id - Dataset identifier -! -! OUTPUTS -! plist_id - Dataset access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! SOURCE -SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_access_plist_c - END INTERFACE - - hdferr = h5dget_access_plist_c(dset_id, plist_id) - -END SUBROUTINE h5dget_access_plist_f - -END MODULE H5D - - diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90 deleted file mode 100644 index 7026ae3..0000000 --- a/fortran/src/H5Dff_F03.f90 +++ /dev/null @@ -1,2389 +0,0 @@ -!****h* ROBODoc/H5D (F03) -! -! NAME -! H5D_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5D functions. -! It contains the same functions as H5Dff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Dff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed. Therefore, we can not create just one subroutine for -! each array type (integer, real, etc...) and use a -! rank 1 array of assumed size to handle multiple ranks, i.e. -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may -! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved -! the statement instead to each subroutine. -! -! -! (4) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (A) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (B) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (b) an allocated allocatable variable that has the TARGET attribute, or -! (c) an associated pointer. -! -! - When X is a character, for interoperability the standard is: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require the -! argument in C_LOC to be of the variant: -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5D_PROVISIONAL - USE H5GLOBAL - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - ! This is the preferred way to call h5dwrite - ! by passing an address - MODULE PROCEDURE h5dwrite_ptr - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - - ! This is the preferred way to call h5dread - ! by passing an address - MODULE PROCEDURE h5dread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dwrite routine - - INTERFACE - INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & - mem_space_id_default , & - file_space_id_default, & - xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dwrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dread routine - - INTERFACE - INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dread_f_c - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dfill routine - - INTERFACE - INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - TYPE(C_PTR), VALUE :: f_ptr_fill_value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - TYPE(C_PTR), VALUE :: f_ptr_buf - INTEGER(HID_T) :: mem_type_id - END FUNCTION h5dfill_c - END INTERFACE - -CONTAINS - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)),TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_7 - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_scalar_fix - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_7 - - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_scalar - - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) - - END SUBROUTINE h5dread_char_scalar_fix - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_7 - -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dwrite_ptr -!****s* H5D (F03)/h5dread_f_F03 -! -! NAME -! h5dread_f_F03 -! -! PURPOSE -! Reads raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset read from. -! mem_type_id - Identifier of the memory datatype. -! -! Outputs: -! buf - Buffer to receive data read from file. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** - SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - END SUBROUTINE h5dread_ptr - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_valuer) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_real - -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_char -! -!****s* H5D (F03)/h5dvlen_reclaim_f -! NAME -! h5dvlen_reclaim_f -! -! PURPOSE -! Reclaims VL datatype memory buffers. -! -! Inputs: -! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January 11, 2011 -! -! Fortran2003 Interface: - SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(IN) :: plist_id - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - INTEGER(HID_T) :: type_id - INTEGER(HID_T) :: space_id - INTEGER(HID_T) :: plist_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dvlen_reclaim_c - END INTERFACE - - hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) - - END SUBROUTINE H5Dvlen_reclaim_f - -END MODULE H5D_PROVISIONAL - - diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90 deleted file mode 100644 index 66cfe62..0000000 --- a/fortran/src/H5Dff_F90.f90 +++ /dev/null @@ -1,3004 +0,0 @@ -!****h* ROBODoc/H5D (F90) -! -! NAME -! -! H5D_PROVISIONAL -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5D functions. It contains -! the same functions as H5Dff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Dff_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. * -! 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 -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed, therefore we can not create just one subroutine for -! each array type (integer, real, etc...) of various ranks and then use a -! rank 1 array of assumed size in the just one subroutine, -! (i.e. integer, dimension(*) :: ... ) -! (i.e. real , dimension(*) :: ... ) etc... -! -! (3) -! *** IMPORTANT *** -! If you add a new H5D 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 H5D_PROVISIONAL - USE H5GLOBAL - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -CONTAINS - -!****s* H5D/h5dread_f -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! INPUTS -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! of k-th dimension of the buf array -! OUTPUTS -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) types. -!***** - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hobj_ref_t_f), INTENT(INOUT) , & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dread_ref_obj_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_OBJ_C'::h5dread_ref_obj_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(HADDR_T), DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_obj_c - END INTERFACE - - ALLOCATE(ref_buf(dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DO j = 1, dims(1) - buf(j)%ref = ref_buf(j) - ENDDO - DEALLOCATE(ref_buf) - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - END SUBROUTINE h5dread_reference_dsetreg - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_S_C'::h5dread_integer_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: buf - END FUNCTION h5dread_integer_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_1_C'::h5dread_integer_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_integer_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_2_C'::h5dread_integer_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_integer_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_3_C'::h5dread_integer_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_integer_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_4_C'::h5dread_integer_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT), DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_integer_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_5_C'::h5dread_integer_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_integer_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - - INTERFACE - INTEGER FUNCTION h5dread_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_6_C'::h5dread_integer_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_integer_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_INTEGER_7_C'::h5dread_integer_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_integer_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_S_C'::h5dreadc_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5dreadc_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_1_C'::h5dreadc_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dreadc_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - - INTERFACE - INTEGER FUNCTION h5dreadc_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_2_C'::h5dreadc_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dreadc_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_3_C'::h5dreadc_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dreadc_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_4_C'::h5dreadc_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dreadc_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_5_C'::h5dreadc_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dreadc_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_6_C'::h5dreadc_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dreadc_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dreadc_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREADC_7_C'::h5dreadc_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dreadc_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dreadc_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_S_C'::h5dread_real_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(OUT) :: buf - END FUNCTION h5dread_real_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_real_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_1_C'::h5dread_real_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_real_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_2_C'::h5dread_real_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_real_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_3_C'::h5dread_real_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_real_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_4_C'::h5dread_real_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf - END FUNCTION h5dread_real_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_5_C'::h5dread_real_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_real_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_6_C'::h5dread_real_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_real_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REAL_7_C'::h5dread_real_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_real_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_real_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_real_7 - - SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dwrite_ref_obj_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_OBJ_C'::h5dwrite_ref_obj_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HADDR_T), DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_obj_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - ALLOCATE(ref_buf(dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - ref_buf(j) = buf(j)%ref - ENDDO - ENDIF - hdferr = h5dwrite_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims(1)) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the bufffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN) :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_S_C'::h5dwrite_integer_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN) :: buf - END FUNCTION h5dwrite_integer_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_1_C'::h5dwrite_integer_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_integer_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_2_C'::h5dwrite_integer_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_integer_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - hdferr = h5dwrite_integer_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_3_C'::h5dwrite_integer_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_integer_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_4_C'::h5dwrite_integer_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_integer_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_5_C'::h5dwrite_integer_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_integer_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_6_C'::h5dwrite_integer_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_integer_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_integer_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_INTEGER_7_C'::h5dwrite_integer_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_integer_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_integer_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims) - - END SUBROUTINE h5dwrite_integer_7 - - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_S_C'::h5dwritec_s_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN) :: buf - END FUNCTION h5dwritec_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_1_C'::h5dwritec_1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwritec_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_2_C'::h5dwritec_2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwritec_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_3_C'::h5dwritec_3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwritec_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_4_C'::h5dwritec_4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwritec_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_5_C'::h5dwritec_5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwritec_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_6_C'::h5dwritec_6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwritec_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwritec_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITEC_7_C'::h5dwritec_7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwritec_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwritec_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_char_7 - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_S_C'::h5dwrite_real_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN) :: buf - END FUNCTION h5dwrite_real_s_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_scalar - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_1_C'::h5dwrite_real_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_real_1_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_2_C'::h5dwrite_real_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_real_2_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_3_C'::h5dwrite_real_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_real_3_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_4_C'::h5dwrite_real_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_real_4_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_5_C'::h5dwrite_real_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_real_5_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_6_C'::h5dwrite_real_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_real_6_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_real_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REAL_7_C'::h5dwrite_real_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_real_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_real_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_integer_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_integer_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_INTEGER_C'::h5dfill_integer_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_integer_c - END INTERFACE - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_integer_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - IMPLICIT NONE - REAL, INTENT(IN) :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_real_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_real_c(fill_valuer, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_REAL_C'::h5dfill_real_c - !DEC$ENDIF - REAL, INTENT(IN) :: fill_valuer ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_real_c - END INTERFACE - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_real_c(fill_valuer, fill_type_id, space_id, & - buf, mem_type_id) - END SUBROUTINE h5dfill_real - -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! INPUTS -! fill_value - fill value -! space_id - memory space selection identifier -! buf - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - - SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - CHARACTER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfillc_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfillc_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILLC_C'::h5dfillc_c - !DEC$ENDIF - CHARACTER, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfillc_c - END INTERFACE - fill_type_id = H5T_NATIVE_CHARACTER - mem_type_id = H5T_NATIVE_CHARACTER - - hdferr = h5dfillc_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - END SUBROUTINE h5dfill_char - - -END MODULE H5D_PROVISIONAL diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index f5c0c45..4b1d4c9 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -1,6 +1,6 @@ /****h* H5Ef/H5Ef * PURPOSE - * This file contains C stubs for H5E Fortran APIs + * This file contains C stubs for H5E Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -42,7 +42,7 @@ * SOURCE */ int_f -nh5eclear_c(hid_t_f *estack_id ) +h5eclear_c(hid_t_f *estack_id ) /******/ { int_f ret_value = 0; @@ -78,7 +78,7 @@ done: * SOURCE */ int_f -nh5eprint_c1(_fcd name, int_f* namelen) +h5eprint_c1(_fcd name, int_f* namelen) /******/ { FILE *file = NULL; @@ -124,7 +124,7 @@ done: * SOURCE */ int_f -nh5eprint_c2(void) +h5eprint_c2(void) /******/ { int_f ret_value = 0; @@ -159,7 +159,7 @@ done: * SOURCE */ int_f -nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) +h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -207,7 +207,7 @@ done: * SOURCE */ int_f -nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) +h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen) /******/ { char *c_name = NULL; @@ -235,62 +235,25 @@ done: return ret_value; } -/****if* H5Ef/h5eset_auto_c - * NAME - * h5eset_auto_c - * PURPOSE - * Call H5Eset_auto to turn automatic error printing on or off. - * INPUTS - * printflag - flag to turn automatic error printing on or off. - * OUTPUTS - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 - * HISTORY - * Major bug fix: Function never disabled printing. - * SOURCE -*/ -int_f -nh5eset_auto_c(int_f* printflag) -/******/ -{ - herr_t status = -1; - int_f ret_value = 0; - - if(*printflag == 1) - status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr); - else if(*printflag == 0) - status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - if(status < 0) - HGOTO_DONE(FAIL) - -done: - return ret_value; -} - - /****if* H5Ef/h5eset_auto2_c * NAME - * h5eset_auto2_c + * h5eset_auto2_c * PURPOSE - * Calls H5Eset_auto2 + * Calls H5Eset_auto2 * INPUTS - * estack_id - Error stack identifier. - * func - Function to be called upon an error condition. - * client_data - Data passed to the error function. + * estack_id - Error stack identifier. + * func - Function to be called upon an error condition. + * client_data - Data passed to the error function. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * July 22, 2009 + * July 22, 2009 * SOURCE */ /* int_f */ -/* nh5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ +/* h5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */ /* /\******\/ */ /* { */ /* int ret_val = -1; */ diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 new file mode 100644 index 0000000..a2efe61 --- /dev/null +++ b/fortran/src/H5Eff.F90 @@ -0,0 +1,302 @@ +!****h* ROBODoc/H5E +! +! NAME +! MODULE H5E +! +! FILE +! fortran/src/H5Eff.f90 +! +! PURPOSE +! This Module contains Fortran interfaces for H5E functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! 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' in the fortran/src directory. +! This is needed for Windows based operating systems. +! +!***** + +MODULE H5E + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR + USE H5GLOBAL + + !Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTON = 1 + + !Turn off automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 + +CONTAINS + +!****s* H5E/h5eclear_f +! +! NAME +! h5eclear_f +! +! PURPOSE +! Clears the error stack for the current thread. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! estack_id - Error Stack id +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! Added optional error stack identifier in order to bring +! the function in line with the h5eclear2 routine. +! MSB, July 9, 2009 +! +! SOURCE + SUBROUTINE h5eclear_f(hdferr, estack_id) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id +!***** + INTEGER(HID_T) :: estack_id_default + + INTERFACE + INTEGER FUNCTION h5eclear_c(estack_id_default) BIND(C,NAME='h5eclear_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T) :: estack_id_default + END FUNCTION h5eclear_c + END INTERFACE + + estack_id_default = H5E_DEFAULT_F + IF(PRESENT(estack_id)) estack_id_default = estack_id + + hdferr = h5eclear_c(estack_id_default) + END SUBROUTINE h5eclear_f + +!****s* H5E/h5eprint_f +! +! NAME +! h5eprint_f +! +! PURPOSE +! Prints the error stack in a default manner. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! name - name of the file that contains print output +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eprint_f(hdferr, name) + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5eprint_c1(name, namelen) BIND(C,NAME='h5eprint_c1') + IMPORT :: C_CHAR + IMPLICIT NONE + INTEGER :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + END FUNCTION h5eprint_c1 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5eprint_c2() BIND(C,NAME='h5eprint_c2') + END FUNCTION h5eprint_c2 + END INTERFACE + namelen = LEN(NAME) + IF (PRESENT(name)) THEN + hdferr = h5eprint_c1(name, namelen) + ELSE + hdferr = h5eprint_c2() + ENDIF + END SUBROUTINE h5eprint_f +!****s* H5E/h5eget_major_f +! +! NAME +! h5eget_major_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a major error number. +! +! INPUTS +! error_no - major error number +! +! OUTPUTS +! name - character string describing the error +! namelen - number of characters in the name buffer +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters + ! in name. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) BIND(C,NAME='h5eget_major_c') + IMPORT :: C_CHAR + IMPORT :: SIZE_T + IMPLICIT NONE + INTEGER :: error_no + CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + END FUNCTION h5eget_major_c + END INTERFACE + + hdferr = h5eget_major_c(error_no, name, namelen) + END SUBROUTINE h5eget_major_f +!****s* H5E/h5eget_minor_f +! +! NAME +! h5eget_minor_f +! +! PURPOSE +! Returns a character string describing an error specified +! by a minor error number. +! +! INPUTS +! error_no - minor error number +! +! OUTPUTS +! name - character string describing the error +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). April 6, 2001 +! +! SOURCE + SUBROUTINE h5eget_minor_f(error_no, name, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5eget_minor_c(error_no, name) BIND(C,NAME='h5eget_minor_c') + IMPORT :: C_CHAR + INTEGER :: error_no + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + END FUNCTION h5eget_minor_c + END INTERFACE + + hdferr = h5eget_minor_c(error_no, name) + END SUBROUTINE h5eget_minor_f + +!****s* H5E/h5eset_auto_f +! +! NAME +! h5eset_auto_f +! +! PURPOSE +! Returns settings for automatic error stack traversal function and its data. +! +! Inputs: +! printflag - Flag to turn automatic error printing on or off; +! possible values are: +! printon (1) +! printoff(0) +! estack_id - Error stack identifier. +! func - Function to be called upon an error condition. +! client_data - Data passed to the error function +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 10, 2009 +! +! Fortran2003 Interface: + SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) + USE, INTRINSIC :: ISO_C_BINDING + INTEGER , INTENT(IN) :: printflag + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id + TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func + TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data +!***** + INTEGER(HID_T) :: estack_id_default + TYPE(C_FUNPTR) :: func_default + TYPE(C_PTR) :: client_data_default + INTERFACE + INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & + BIND(C, NAME='h5eset_auto2_c') + IMPORT :: c_ptr, c_funptr + IMPORT :: HID_T + INTEGER :: printflag + INTEGER(HID_T) :: estack_id + TYPE(C_FUNPTR), VALUE :: func + TYPE(C_PTR), VALUE :: client_data + END FUNCTION h5eset_auto2_c + END INTERFACE + + estack_id_default = -1 + func_default = C_NULL_FUNPTR + client_data_default = C_NULL_PTR + + IF(PRESENT(estack_id)) estack_id_default = estack_id + IF(PRESENT(func)) func_default = func + IF(PRESENT(client_data)) client_data_default = client_data + + hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) + END SUBROUTINE h5eset_auto_f + +END MODULE H5E + diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 deleted file mode 100644 index 7b56376..0000000 --- a/fortran/src/H5Eff.f90 +++ /dev/null @@ -1,251 +0,0 @@ -!****h* ROBODoc/H5E -! -! NAME -! MODULE H5E -! -! FILE -! fortran/src/H5Eff.f90 -! -! PURPOSE -! This Module contains Fortran interfaces for H5E functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! 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 H5E function to the module 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 H5E - - USE H5GLOBAL - - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 - -CONTAINS - -!****s* H5E/h5eclear_f -! -! NAME -! h5eclear_f -! -! PURPOSE -! Clears the error stack for the current thread. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! estack_id - Error Stack id -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! Added optional error stack identifier in order to bring -! the function in line with the h5eclear2 routine. -! MSB, July 9, 2009 -! -! SOURCE - SUBROUTINE h5eclear_f(hdferr, estack_id) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id -!***** - INTEGER(HID_T) :: estack_id_default - - INTERFACE - INTEGER FUNCTION h5eclear_c(estack_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c - !DEC$ENDIF - INTEGER(HID_T) :: estack_id_default - END FUNCTION h5eclear_c - END INTERFACE - - estack_id_default = H5E_DEFAULT_F - IF(PRESENT(estack_id)) estack_id_default = estack_id - - hdferr = h5eclear_c(estack_id_default) - END SUBROUTINE h5eclear_f - -!****s* H5E/h5eprint_f -! -! NAME -! h5eprint_f -! -! PURPOSE -! Prints the error stack in a default manner. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! name - name of the file that contains print output -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: namelen - CHARACTER(LEN=*),INTENT(IN) :: name - END FUNCTION h5eprint_c1 - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5eprint_c2() - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 - !DEC$ENDIF - END FUNCTION h5eprint_c2 - END INTERFACE - namelen = LEN(NAME) - IF (PRESENT(name)) THEN - hdferr = h5eprint_c1(name, namelen) - ELSE - hdferr = h5eprint_c2() - ENDIF - END SUBROUTINE h5eprint_f -!****s* H5E/h5eget_major_f -! -! NAME -! h5eget_major_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a major error number. -! -! INPUTS -! error_no - major error number -! -! OUTPUTS -! name - character string describing the error -! namelen - number of characters in the name buffer -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters - ! in name. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - END FUNCTION h5eget_major_c - END INTERFACE - - hdferr = h5eget_major_c(error_no, name, namelen) - END SUBROUTINE h5eget_major_f -!****s* H5E/h5eget_minor_f -! -! NAME -! h5eget_minor_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a minor error number. -! -! INPUTS -! error_no - minor error number -! -! OUTPUTS -! name - character string describing the error -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eget_minor_f(error_no, name, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - END FUNCTION h5eget_minor_c - END INTERFACE - - hdferr = h5eget_minor_c(error_no, name) - END SUBROUTINE h5eget_minor_f - -END MODULE H5E - diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90 deleted file mode 100644 index ff8d11c..0000000 --- a/fortran/src/H5Eff_F03.f90 +++ /dev/null @@ -1,108 +0,0 @@ -!****h* ROBODoc/H5E (F03) -! -! NAME -! H5E_PROVISIONAL -! -! FILE -! src/fortran/src/H5Eff_F03.f90 -! -! PURPOSE -! -! This file contains Fortran 90 and Fortran 2003 interfaces for H5E functions. -! It contains the same functions as H5Eff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Eff_F90.f90 if Fortran 2003 functions are enabled. -! -! -! 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 H5E function to the module 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 H5E_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Returns settings for automatic error stack traversal function and its data. -! -! Inputs: -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! estack_id - Error stack identifier. -! func - Function to be called upon an error condition. -! client_data - Data passed to the error function -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 10, 2009 -! -! Fortran2003 Interface: - SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) - USE, INTRINSIC :: ISO_C_BINDING - INTEGER , INTENT(IN) :: printflag - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id - TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func - TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data -!***** - INTEGER(HID_T) :: estack_id_default - TYPE(C_FUNPTR) :: func_default - TYPE(C_PTR) :: client_data_default - INTERFACE - INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & - BIND(C, NAME='h5eset_auto2_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER :: printflag - INTEGER(HID_T) :: estack_id -!!$ TYPE(C_FUNPTR) :: func -!!$ TYPE(C_PTR), VALUE :: client_data - TYPE(C_FUNPTR), VALUE :: func - TYPE(C_PTR), VALUE :: client_data - END FUNCTION h5eset_auto2_c - END INTERFACE - - estack_id_default = -1 - func_default = C_NULL_FUNPTR - client_data_default = C_NULL_PTR - - IF(PRESENT(estack_id)) estack_id_default = estack_id - IF(PRESENT(func)) func_default = func - IF(PRESENT(client_data)) client_data_default = client_data - - hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) - END SUBROUTINE h5eset_auto_f - -END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90 deleted file mode 100644 index 158ec12..0000000 --- a/fortran/src/H5Eff_F90.f90 +++ /dev/null @@ -1,89 +0,0 @@ -!****h* ROBODoc/H5E (F90) -! -! NAME -! MODULE H5E_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5E functions. It contains -! the same functions as H5Eff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Eff_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. * -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5E_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Turns automatic error printing on or off. -! -! INPUTS -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE - SUBROUTINE h5eset_auto_f(printflag, hdferr) - INTEGER, INTENT(IN) :: printflag ! flag to turn automatic error - ! printing on or off - ! possible values are: - ! printon (1) - ! printoff(0) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5eset_auto_c(printflag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ESET_AUTO_C'::h5eset_auto_c - !DEC$ENDIF - INTEGER :: printflag - END FUNCTION h5eset_auto_c - END INTERFACE - - hdferr = h5eset_auto_c(printflag) - END SUBROUTINE h5eset_auto_f - - -END MODULE H5E_PROVISIONAL diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c deleted file mode 100644 index bbdb170..0000000 --- a/fortran/src/H5FDmpiof.c +++ /dev/null @@ -1,258 +0,0 @@ -/****h* H5FDmpiof/H5FDmpiof - * - * PURPOSE - * This file contains C stubs for Parallel Fortran APIs - * - * 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. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - ****** -*/ - -#include "H5f90.h" -#include -#include "H5public.h" - - -/* Support for C to Fortran translation in MPI */ -#ifndef H5_HAVE_MPI_MULTI_LANG_Comm -#define MPI_Comm_c2f(comm) (int_f)(comm) -#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) -#endif /*MPI Comm*/ -#ifndef H5_HAVE_MPI_MULTI_LANG_Info -#define MPI_Info_c2f(info) (int_f)(info) -#define MPI_Info_f2c(info) (MPI_Info)(info) -#endif /*MPI Info*/ - -/****if* H5FDmpiof/h5pset_fapl_mpio_c - * NAME - * h5pset_fapl_mpio_c - * PURPOSE - * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user - * supplied communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - MPI communicator - * info - MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - c_comm = MPI_Comm_f2c(*comm); - c_info = MPI_Info_f2c(*info); - - /* - * Call H5Pset_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} -/****if* H5FDmpiof/h5pget_fapl_mpio_c - * NAME - * h5pget_fapl_mpio_c - * PURPOSE - * Call H5Pget_fapl_mpio to retrieve communicator and info object - * INPUTS - * prp_id - property list identifier - * comm - buffer to return MPI communicator - * info - buffer to return MPI info object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - MPI_Comm c_comm; - MPI_Info c_info; - - /* - * Call H5Pget_mpi function. - */ - c_prp_id = *prp_id; - ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); - if (ret < 0) return ret_value; - *comm = (int_f) MPI_Comm_c2f(c_comm); - *info = (int_f) MPI_Info_c2f(c_info); - ret_value = 0; - return ret_value; -} -/****if* H5FDmpiof/h5pset_dxpl_mpio_c - * NAME - * h5pset_dxpl_mpio_c - * PURPOSE - * Call H5Pset_dxpl_mpio to set transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, October 26, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; -/* - switch (*data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT_F: - c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; - break; - - case H5FD_MPIO_COLLECTIVE_F: - c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; - break; - default: - return ret_value; - } -*/ - c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; - /* - * Call H5Pset_dxpl_mpio function. - */ - c_prp_id = *prp_id; - ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/****if* H5FDmpiof/h5pget_dxpl_mpio_c - * NAME - * h5pget_dxpl_mpio_c - * PURPOSE - * Call H5Pget_dxpl_mpio to get transfer mode of the dataset - * trasfer property list - * INPUTS - * prp_id - property list identifier - * data_xfer_mode - buffer to retrieve transfer mode - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, June 15, 2000 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) -/******/ -{ - int ret_value = -1; - hid_t c_prp_id; - herr_t ret; - H5FD_mpio_xfer_t c_data_xfer_mode; - - /* - * Call H5Pget_xfer function. - */ - c_prp_id = *prp_id; - ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); - if (ret < 0) return ret_value; - *data_xfer_mode = (int_f)c_data_xfer_mode; -/* - switch (c_data_xfer_mode) { - - case H5FD_MPIO_INDEPENDENT: - *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; - break; - - case H5FD_MPIO_COLLECTIVE: - *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; - break; - - default: - return ret_value; - } -*/ - ret_value = 0; - return ret_value; -} - -/****if* H5Pf/h5pget_mpio_actual_io_mode_c - * NAME - * h5pget_mpio_actual_io_mode_c - * PURPOSE - * Calls H5Pget_mpio_actual_io_mode - * - * INPUTS - * dxpl_id - Dataset transfer property list identifier. - * OUTPUTS - * actual_io_mode - The type of I/O performed by this process. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * July 27, 2012 - * SOURCE -*/ -int_f -nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) -/******/ -{ - int ret_value = -1; - H5D_mpio_actual_io_mode_t c_actual_io_mode; - - /* - * Call H5Pget_mpio_actual_io_mode_f function. - */ - if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) - return ret_value; /* error occurred */ - - *actual_io_mode =(int_f)c_actual_io_mode; - - ret_value = 0; - return ret_value; -} diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90 deleted file mode 100644 index 50a77d9..0000000 --- a/fortran/src/H5FDmpioff.f90 +++ /dev/null @@ -1,212 +0,0 @@ -!****h* ROBODoc/H5FDMPIO -! -! NAME -! MODULE H5FDMPIO -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions needed by -! parallel MPI programs. -! -! 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 H5P 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 H5FDMPIO - USE H5GLOBAL -CONTAINS - -!****s* H5FDMPIO/h5pset_fapl_mpio_f -! -! NAME -! h5pset_fapl_mpio_f -! -! PURPOSE -! Stores MPI IO communicator information to the file -! access property list. -! -! INPUTS -! prp_id - file access property list identifier -! comm - MPI-2 communicator -! info - MPI-2 info object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_fapl_mpio_c - hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pset_fapl_mpio_f - -!****s* H5FDMPIO/h5pget_fapl_mpio_f -! -! NAME -! h5pget_fapl_mpio_f -! -! PURPOSE -! Returns MPI communicator information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! comm - MPI-2 communicator -! info - MPI-2 info object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_fapl_mpio_c - hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pget_fapl_mpio_f - -!****s* H5FDMPIO/h5pset_dxpl_mpio_f -! -! NAME -! h5pset_dxpl_mpio_f -! -! PURPOSE -! Sets data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! data_xfer_mode - transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pset_dxpl_mpio_c - hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pset_dxpl_mpio_f - -!****s* H5FDMPIO/h5pget_dxpl_mpio_f -! -! NAME -! h5pget_dxpl_mpio_f -! -! PURPOSE -! Returns the data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! OUTPUTS -! data_xfer_mode- transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE - SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER, EXTERNAL :: h5pget_dxpl_mpio_c - hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pget_dxpl_mpio_f - -!****s* H5P/h5pget_mpio_actual_io_mode_f -! NAME -! h5pget_mpio_actual_io_mode_f -! -! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. -! -! INPUTS -! dxpl_id - Dataset transfer property list identifier. -! OUTPUTS -! actual_io_mode - The type of I/O performed by this process. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 27, 2012 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - END FUNCTION h5pget_mpio_actual_io_mode_c - END INTERFACE - - actual_io_mode = -1 - - hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - - END SUBROUTINE h5pget_mpio_actual_io_mode_f - -END MODULE H5FDMPIO diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 1696672..c1cdb91 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -1,6 +1,6 @@ /****h* H5Ff/H5Ff * PURPOSE - * This file contains C stubs for H5F Fortran APIs + * This file contains C stubs for H5F Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,26 +26,26 @@ /****if* H5Ff/h5fcreate_c * NAME - * h5fcreate_c + * h5fcreate_c * PURPOSE - * Call H5Fcreate to create the file + * Call H5Fcreate to create the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * crt_pr - identifier of creation property list - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * crt_pr - identifier of creation property list + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * SOURCE */ int_f -nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) +h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -95,23 +95,23 @@ nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, h /****if* H5Ff/h5fflush_c * NAME - * h5fflush_c + * h5fflush_c * PURPOSE - * Call H5Fflush to flush the object + * Call H5Fflush to flush the object * INPUTS - * object_id - identifier of either a file, a dataset, - * a group, an attribute or a named data type - * scope - integer to specify the flushing action, either + * object_id - identifier of either a file, a dataset, + * a group, an attribute or a named data type + * scope - integer to specify the flushing action, either * H5F_SCOPE_GLOBAL or H5F_SCOPE_LOCAL * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 5, 1999 + * Friday, November 5, 1999 * SOURCE */ int_f -nh5fflush_c (hid_t_f *object_id, int_f *scope) +h5fflush_c (hid_t_f *object_id, int_f *scope) /******/ { int ret_value = -1; @@ -136,24 +136,24 @@ nh5fflush_c (hid_t_f *object_id, int_f *scope) /****if* H5Ff/h5fmount_c * NAME - * h5fmount_c + * h5fmount_c * PURPOSE - * Call H5Fmount to mount the file + * Call H5Fmount to mount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length - * file_id - file identifier for the file to be mounted - * acc_prp - identifier of access property list + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length + * file_id - file identifier for the file to be mounted + * acc_prp - identifier of access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * HISTORY */ int_f -nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) +h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp) /******/ { int ret_value = -1; @@ -194,22 +194,22 @@ nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, h /****if* H5Ff/h5funmount_c * NAME - * h5funmount_c + * h5funmount_c * PURPOSE - * Call H5Funmount to unmount the file + * Call H5Funmount to unmount the file * INPUTS - * loc_id - Identifier for file or group - * dsetname - name of dataset - * namelen - dsetname length + * loc_id - Identifier for file or group + * dsetname - name of dataset + * namelen - dsetname length * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, October 25, 1999 + * Monday, October 25, 1999 * SOURCE */ int_f -nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) +h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /******/ { int ret_value = -1; @@ -242,25 +242,25 @@ nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen) /****if* H5Ff/h5fopen_c * NAME - * h5fopen_c + * h5fopen_c * PURPOSE - * Call H5Fopen to open the file + * Call H5Fopen to open the file * INPUTS - * name - name of the file - * namelen - name length - * access_flags - file access flags - * acc_prp - identifier of access property list + * name - name of the file + * namelen - name length + * access_flags - file access flags + * acc_prp - identifier of access property list * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * SOURCE */ int_f -nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) +h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id) /******/ { int ret_value = -1; @@ -305,22 +305,22 @@ nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hi /****if* H5Ff/h5freopen_c * NAME - * h5freopen_c + * h5freopen_c * PURPOSE - * Call H5Freopen to open the file + * Call H5Freopen to open the file * INPUTS - * file_id1 - file identifier + * file_id1 - file identifier * OUTPUTS - * file_id2 - file identifier + * file_id2 - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f -nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) +h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /******/ { int ret_value = -1; @@ -338,22 +338,22 @@ nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2) /****if* H5Ff/h5fget_create_plist_c * NAME - * h5fget_create_plist_c + * h5fget_create_plist_c * PURPOSE - * Call H5Fget_create_plist to get the file creation property list + * Call H5Fget_create_plist to get the file creation property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * prop_id - creation property list identifier + * prop_id - creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal, Xiangyang Su - * Wednesday, November 3, 1999 + * Wednesday, November 3, 1999 * SOURCE */ int_f -nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) +h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /******/ { int ret_value = -1; @@ -371,24 +371,24 @@ nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id) /****if* H5Ff/h5fget_access_plist_c * NAME - * h5fget_access_plist_c + * h5fget_access_plist_c * PURPOSE - * Call H5Fget_access_plist to get the file access property list + * Call H5Fget_access_plist to get the file access property list * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * access_id - access property list identifier + * access_id - access property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * * SOURCE */ int_f -nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) +h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /******/ { int ret_value = -1; @@ -406,26 +406,26 @@ nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id) /****if* H5Ff/h5fis_hdf5_c * NAME - * h5fis_hdf5_c + * h5fis_hdf5_c * PURPOSE - * Call H5Fis_hdf5 to determone if the file is an HDF5 file + * Call H5Fis_hdf5 to determone if the file is an HDF5 file * INPUTS - * name - name of the file - * namelen - name length + * name - name of the file + * namelen - name length * OUTPUTS - * flag - 0 if file is not HDF5 file , positive if a file - * is an HDF5 file, and negative on failure. + * flag - 0 if file is not HDF5 file , positive if a file + * is an HDF5 file, and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 3, 1999 + * Tuesday, August 3, 1999 * HISTORY * * SOURCE */ int_f -nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) +h5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) /******/ { int ret_value = -1; @@ -452,23 +452,23 @@ nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag) } /****if* H5Ff/h5fclose_c * NAME - * h5fclose_c + * h5fclose_c * PURPOSE - * Call H5Fclose to close the file + * Call H5Fclose to close the file * INPUTS - * file_id - identifier of the file to be closed + * file_id - identifier of the file to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, July 26, 1999 + * Monday, July 26, 1999 * HISTORY * * SOURCE */ int_f -nh5fclose_c ( hid_t_f *file_id ) +h5fclose_c ( hid_t_f *file_id ) /******/ { int ret_value = 0; @@ -480,27 +480,27 @@ nh5fclose_c ( hid_t_f *file_id ) } /****if* H5Ff/h5fget_obj_count_c * NAME - * h5fget_obj_count_c + * h5fget_obj_count_c * PURPOSE - * Call H5Fget_obj_count to get number of open objects within a file + * Call H5Fget_obj_count to get number of open objects within a file * INPUTS - * file_id - identifier of the file to be closed - * obj_type - type of the object + * file_id - identifier of the file to be closed + * obj_type - type of the object * RETURNS - * obj_count - number of objects - * 0 on success, -1 on failure + * obj_count - number of objects + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * HISTORY * - * Changed type of obj_count to size_t_f - * Thursday, September 25, 2008 + * Changed type of obj_count to size_t_f + * Thursday, September 25, 2008 * SOURCE */ int_f -nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) +h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) /******/ { int ret_value = 0; @@ -525,7 +525,7 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * obj_type - type of the object * RETURNS * obj_ids - iarray of open objects identifiers - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Monday, September 30, 2002 @@ -538,7 +538,7 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count) * SOURCE */ int_f -nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, +h5fget_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) /******/ { @@ -569,22 +569,22 @@ nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, /****if* H5Ff/h5fget_freespace_c * NAME - * h5fget_freespace_c + * h5fget_freespace_c * PURPOSE - * Call H5Fget_freespace to get amount of free space within a file + * Call H5Fget_freespace to get amount of free space within a file * INPUTS - * file_id - identifier of the file to query + * file_id - identifier of the file to query * RETURNS - * free_space - amount of free space in file - * 0 on success, -1 on failure + * free_space - amount of free space in file + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, October 7, 2003 + * Tuesday, October 7, 2003 * SOURCE */ int_f -nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) +h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /******/ { int ret_value = 0; @@ -599,24 +599,24 @@ nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space) /****if* H5Ff/h5fget_name_c * NAME - * h5fget_name_c + * h5fget_name_c * PURPOSE - * Call H5Fget_name to get file's name + * Call H5Fget_name to get file's name * INPUTS - * obj_id - object identifier - * buflen -size of the buffer + * obj_id - object identifier + * buflen -size of the buffer * OUTPUTS - * buf - buffer to hold the name - * size - size of the file's name + * buf - buffer to hold the name + * size - size of the file's name * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, July 6, 2004 + * Tuesday, July 6, 2004 * SOURCE */ int_f -nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) +h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /******/ { char *c_buf = NULL; /* Buffer to hold C string */ @@ -648,22 +648,22 @@ done: /****if* H5Ff/h5fget_filesize_c * NAME - * h5fget_filesize_c + * h5fget_filesize_c * PURPOSE - * Call H5Fget_filesize to get file size + * Call H5Fget_filesize to get file size * INPUTS - * file_id - file identifier + * file_id - file identifier * OUTPUTS - * size - size of the file + * size - size of the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, July 7, 2004 + * Wednesday, July 7, 2004 * SOURCE */ int_f -nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) +h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size) /******/ { hsize_t size_c; diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 new file mode 100644 index 0000000..c69ad82 --- /dev/null +++ b/fortran/src/H5Fff.F90 @@ -0,0 +1,871 @@ +!****h* ROBODoc/H5F +! +! NAME +! MODULE H5F +! +! FILE +! H5Fff.f90 +! +! PURPOSE +! This file contains Fortran 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! 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. +! +!***** + +MODULE H5F + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR + USE H5GLOBAL + IMPLICIT NONE + +CONTAINS +!****s* H5F/h5fcreate_f +! +! NAME +! h5fcreate_f +! +! PURPOSE +! Creates HDF5 files. +! +! INPUTS +! name - name of the file to create +! access_flags - File access flags. Allowable values are: +! H5F_ACC_TRUNC_F +! H5F_ACC_EXCL_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & + creation_prp, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp + ! File creation propertly + ! list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: creation_prp_default + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) BIND(C,NAME='h5fcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER(HID_T), INTENT(IN) :: creation_prp_default + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fcreate_c + END INTERFACE + + creation_prp_default = H5P_DEFAULT_F + access_prp_default = H5P_DEFAULT_F + + IF (PRESENT(creation_prp)) creation_prp_default = creation_prp + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + + END SUBROUTINE h5fcreate_f +!****s* H5F/h5fflush_f +! +! NAME +! h5fflush_f +! +! PURPOSE +! Flushes all buffers associated WITH a file to disk +! +! INPUTS +! object_id - identifier of object used to identify the file. +! scope - specifies the scope of the flushing action. +! Possible values are: +! H5F_SCOPE_GLOBAL_F +! H5F_SCOPE_LOCAL_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! creation_prp - file creation property list identifier +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fflush_f(object_id, scope, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object + !associate with a file, + !including the file itself, + !a dataset, a group, an + !attribute, or a named + !data type + + INTEGER, INTENT(IN) :: scope !scope of the flushing + !action, possible values + !are: H5F_SCOPE_GLOBAL_F + ! which flushes the entire + !virtual file, + !and H5F_SCOPE_LOCAL_F + !which flushes only the + !specified file. + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fflush_c(object_id, scope) BIND(C,NAME='h5fflush_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: scope + END FUNCTION h5fflush_c + END INTERFACE + + hdferr = h5fflush_c(object_id, scope) + + END SUBROUTINE h5fflush_f +!****s* H5F/h5fmount_f +! +! NAME +! h5fmount_f +! +! PURPOSE +! Mounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the group onto which the file +! specified by child_id is to be mounted. +! child_id - the identifier of the file to be mounted. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - the identifier of the property list to be used +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! in which dsetname is defined + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the + ! file to be mounted + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & + child_id, access_prp_default) BIND(C,NAME='h5fmount_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fmount_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) + + END SUBROUTINE h5fmount_f + +!****s* H5F/h5funmount_f +! +! NAME +! h5funmount_f +! +! PURPOSE +! Unmounts a file. +! +! INPUTS +! loc_id - the identifier for of file or group in +! which name is defined +! name - the name of the mount point +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5funmount_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group + ! at which the specified file + ! is to be unmounted + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) BIND(C,NAME='h5funmount_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5funmount_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5funmount_c(loc_id, name, namelen) + + END SUBROUTINE h5funmount_f +!****s* H5F/h5fopen_f +! +! NAME +! h5fopen_f +! +! PURPOSE +! Opens HDF5 file. +! +! INPUTS +! name - name of the file to acecss +! access_flags - File access flags. Allowable values are: +! H5F_ACC_RDWR_F +! H5F_ACC_RDONLY_F +! OUTPUTS +! file_id - file identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! access_prp - file access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + INTEGER, INTENT(IN) :: access_flags ! File access flags + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) BIND(C,NAME='h5fopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5fopen_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + END SUBROUTINE h5fopen_f +!****s* H5F/h5freopen_f +! +! NAME +! h5freopen_f +! +! PURPOSE +! Reopens HDF5 file. +! +! INPUTS +! file_id - identifier of a file for which an +! additional identifier is required +! OUTPUTS +! ret_file_id - new file identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) BIND(C,NAME='h5freopen_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: ret_file_id + END FUNCTION h5freopen_c + END INTERFACE + + hdferr = h5freopen_c(file_id, ret_file_id) + + END SUBROUTINE h5freopen_f +!****s* H5F/h5fget_create_plist_f +! +! NAME +! h5fget_create_plist_f +! +! PURPOSE +! Returns a file creation property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! prop_id - creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) BIND(C,NAME='h5fget_create_plist_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: prop_id + END FUNCTION h5fget_create_plist_c + END INTERFACE + + hdferr = h5fget_create_plist_c(file_id, prop_id) + + END SUBROUTINE h5fget_create_plist_f +!****s* H5F/h5fget_access_plist_f +! +! NAME +! h5fget_access_plist_f +! +! PURPOSE +! Returns a file access property list identifier. +! +! INPUTS +! file_id - identifier of a file to creation property list of +! OUTPUTS +! access_id - access property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property + ! list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) BIND(C,NAME='h5fget_access_plist_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: access_id + END FUNCTION h5fget_access_plist_c + END INTERFACE + + hdferr = h5fget_access_plist_c(file_id, access_id) + + END SUBROUTINE h5fget_access_plist_f + +!****s* H5F/h5fis_hdf5_f +! +! NAME +! h5fis_hdf5_f +! +! PURPOSE +! Determines whether a file is in the HDF5 format. +! +! INPUTS +! name - name of the file to check +! OUTPUTS +! status - indicates if file is and HDF5 file +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fis_hdf5_f(name, status, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file + LOGICAL, INTENT(OUT) :: status ! Indicates if file + ! is an HDF5 file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: flag ! "TRUE/FALSE" flag from C routine + ! to define status value. + + INTERFACE + INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) BIND(C,NAME='h5fis_hdf5_c') + IMPORT :: C_CHAR + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER :: flag + END FUNCTION h5fis_hdf5_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5fis_hdf5_c(name, namelen, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5fis_hdf5_f +!****s* H5F/h5fclose_f +! +! NAME +! h5fclose_f +! +! PURPOSE +! Closes HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + SUBROUTINE h5fclose_f(file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fclose_c(file_id) BIND(C,NAME='h5fclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + END FUNCTION h5fclose_c + END INTERFACE + + hdferr = h5fclose_c(file_id) + + END SUBROUTINE h5fclose_f + +!****s* H5F/h5fget_obj_count_f +! +! NAME +! h5fget_obj_count_f +! +! PURPOSE +! Gets number of the objects open within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_count - number of open objects +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Changed the type of obj_count to INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) BIND(C,NAME='h5fget_obj_count_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + END FUNCTION h5fget_obj_count_c + END INTERFACE + + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) + + END SUBROUTINE h5fget_obj_count_f + +!****s* H5F/h5fget_obj_ids_f +! +! NAME +! h5fget_obj_ids_f +! +! PURPOSE +! Get list of open objects identifiers within a file +! +! INPUTS +! file_id - file identifier +! obj_type - type of the object; possible values are: +! H5F_OBJ_FILE_F +! H5F_OBJ_DATASET_F +! H5F_OBJ_GROUP_F +! H5F_OBJ_DATATYPE_F +! H5F_OBJ_ALL_F +! OUTPUTS +! obj_ids - array of open object identifiers +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! num_objs - number of open objects +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! HISTORY +! Added optional parameter num_objs for number of open objects +! of the specified type and changed type of max_obj to +! INTEGER(SIZE_T) +! September 25, 2008 EIP +! +! SOURCE + SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + ! Array of open objects iidentifiers + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects +!***** + INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type + + INTERFACE + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) & + BIND(C,NAME='h5fget_obj_ids_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(IN) :: max_objs + INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids + INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs + END FUNCTION h5fget_obj_ids_c + END INTERFACE + + hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + IF (PRESENT(num_objs)) num_objs= c_num_objs + + END SUBROUTINE h5fget_obj_ids_f +!****s* H5F/h5fget_freespace_f +! +! NAME +! h5fget_freespace_f +! +! PURPOSE +! Get amount of free space within a file +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! free_space - amount of free space in file +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Quincey Koziol +! October 7, 2003 +! +! SOURCE + SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + ! amount of free space in file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) & + BIND(C,NAME='h5fget_freespace_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + END FUNCTION h5fget_freespace_c + END INTERFACE + + hdferr = h5fget_freespace_c(file_id, free_space) + + END SUBROUTINE h5fget_freespace_f +!****s* H5F/h5fget_name_f +! +! NAME +! h5fget_name_f +! +! PURPOSE +! Gets the name of the file from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! buf - buffer to store the read name +! size - actual size of the name +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! July 6, 2004 +! +! SOURCE + SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(INOUT) :: buf + ! Buffer to hold file name + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTEGER(SIZE_T) :: buflen + + INTERFACE + INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) & + BIND(C,NAME='h5fget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER(SIZE_T) :: buflen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5fget_name_c + END INTERFACE + buflen = LEN_TRIM(buf) + hdferr = h5fget_name_c(obj_id, size, buf, buflen) + END SUBROUTINE h5fget_name_f +!****s* H5F/h5fget_filesize_f +! +! NAME +! h5fget_filesize_f +! +! PURPOSE +! Retrieves the file size of the HDF5 file. +! +! INPUTS +! file_id - file identifier +! OUTPUTS +! size - file size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! July 7, 2004 +! +! SOURCE + SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5fget_filesize_c(file_id, size) & + BIND(C,NAME='h5fget_filesize_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5fget_filesize_c + END INTERFACE + hdferr = h5fget_filesize_c(file_id, size) + END SUBROUTINE h5fget_filesize_f + +!****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 PARAMETERS +! buf_size - Returns the size in bytes of the buffer required to store the file image, +! no data will be copied. +! +! AUTHOR +! M. Scot Breitenfeld +! November 26, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: file_id + TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size +!***** + + INTEGER(SIZE_T) :: buf_size_default + + INTERFACE + INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') + IMPORT :: C_PTR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + 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 diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 deleted file mode 100644 index faa1967..0000000 --- a/fortran/src/H5Fff.f90 +++ /dev/null @@ -1,834 +0,0 @@ -!****h* ROBODoc/H5F -! -! NAME -! MODULE H5F -! -! FILE -! H5Fff.f90 -! -! PURPOSE -! This file contains Fortran 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 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. -! -!***** - -MODULE H5F - USE H5GLOBAL - -CONTAINS -!****s* H5F/h5fcreate_f -! -! NAME -! h5fcreate_f -! -! PURPOSE -! Creates HDF5 files. -! -! INPUTS -! name - name of the file to create -! access_flags - File access flags. Allowable values are: -! H5F_ACC_TRUNC_F -! H5F_ACC_EXCL_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & - creation_prp, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp - ! File creation propertly - ! list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: creation_prp_default - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(OUT) :: file_id - INTEGER(HID_T), INTENT(IN) :: creation_prp_default - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fcreate_c - END INTERFACE - - creation_prp_default = H5P_DEFAULT_F - access_prp_default = H5P_DEFAULT_F - - IF (PRESENT(creation_prp)) creation_prp_default = creation_prp - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - - END SUBROUTINE h5fcreate_f -!****s* H5F/h5fflush_f -! -! NAME -! h5fflush_f -! -! PURPOSE -! Flushes all buffers associated WITH a file to disk -! -! INPUTS -! object_id - identifier of object used to identify the file. -! scope - specifies the scope of the flushing action. -! Possible values are: -! H5F_SCOPE_GLOBAL_F -! H5F_SCOPE_LOCAL_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fflush_f(object_id, scope, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object - !associate with a file, - !including the file itself, - !a dataset, a group, an - !attribute, or a named - !data type - - INTEGER, INTENT(IN) :: scope !scope of the flushing - !action, possible values - !are: H5F_SCOPE_GLOBAL_F - ! which flushes the entire - !virtual file, - !and H5F_SCOPE_LOCAL_F - !which flushes only the - !specified file. - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fflush_c(object_id, scope) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: scope - END FUNCTION h5fflush_c - END INTERFACE - - hdferr = h5fflush_c(object_id, scope) - - END SUBROUTINE h5fflush_f -!****s* H5F/h5fmount_f -! -! NAME -! h5fmount_f -! -! PURPOSE -! Mounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the group onto which the file -! specified by child_id is to be mounted. -! child_id - the identifier of the file to be mounted. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - the identifier of the property list to be used -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! in which dsetname is defined - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the - ! file to be mounted - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & - child_id, access_prp_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN) :: child_id - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fmount_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) - - END SUBROUTINE h5fmount_f - -!****s* H5F/h5funmount_f -! -! NAME -! h5funmount_f -! -! PURPOSE -! Unmounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the mount point -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5funmount_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! at which the specified file - ! is to be unmounted - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5funmount_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5funmount_c(loc_id, name, namelen) - - END SUBROUTINE h5funmount_f -!****s* H5F/h5fopen_f -! -! NAME -! h5fopen_f -! -! PURPOSE -! Opens HDF5 file. -! -! INPUTS -! name - name of the file to acecss -! access_flags - File access flags. Allowable values are: -! H5F_ACC_RDWR_F -! H5F_ACC_RDONLY_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5fopen_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - END SUBROUTINE h5fopen_f -!****s* H5F/h5freopen_f -! -! NAME -! h5freopen_f -! -! PURPOSE -! Reopens HDF5 file. -! -! INPUTS -! file_id - identifier of a file for which an -! additional identifier is required -! OUTPUTS -! ret_file_id - new file identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: ret_file_id - END FUNCTION h5freopen_c - END INTERFACE - - hdferr = h5freopen_c(file_id, ret_file_id) - - END SUBROUTINE h5freopen_f -!****s* H5F/h5fget_create_plist_f -! -! NAME -! h5fget_create_plist_f -! -! PURPOSE -! Returns a file creation property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! prop_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: prop_id - END FUNCTION h5fget_create_plist_c - END INTERFACE - - hdferr = h5fget_create_plist_c(file_id, prop_id) - - END SUBROUTINE h5fget_create_plist_f -!****s* H5F/h5fget_access_plist_f -! -! NAME -! h5fget_access_plist_f -! -! PURPOSE -! Returns a file access property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! access_id - access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: access_id - END FUNCTION h5fget_access_plist_c - END INTERFACE - - hdferr = h5fget_access_plist_c(file_id, access_id) - - END SUBROUTINE h5fget_access_plist_f - -!****s* H5F/h5fis_hdf5_f -! -! NAME -! h5fis_hdf5_f -! -! PURPOSE -! Determines whether a file is in the HDF5 format. -! -! INPUTS -! name - name of the file to check -! OUTPUTS -! status - indicates if file is and HDF5 file -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fis_hdf5_f(name, status, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - LOGICAL, INTENT(OUT) :: status ! Indicates if file - ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: flag ! "TRUE/FALSE" flag from C routine - ! to define status value. - - INTERFACE - INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER :: flag - END FUNCTION h5fis_hdf5_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5fis_hdf5_c(name, namelen, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5fis_hdf5_f -!****s* H5F/h5fclose_f -! -! NAME -! h5fclose_f -! -! PURPOSE -! Closes HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - SUBROUTINE h5fclose_f(file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fclose_c(file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - END FUNCTION h5fclose_c - END INTERFACE - - hdferr = h5fclose_c(file_id) - - END SUBROUTINE h5fclose_f - -!****s* H5F/h5fget_obj_count_f -! -! NAME -! h5fget_obj_count_f -! -! PURPOSE -! Gets number of the objects open within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_count - number of open objects -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Changed the type of obj_count to INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - END FUNCTION h5fget_obj_count_c - END INTERFACE - - hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) - - END SUBROUTINE h5fget_obj_count_f - -!****s* H5F/h5fget_obj_ids_f -! -! NAME -! h5fget_obj_ids_f -! -! PURPOSE -! Get list of open objects identifiers within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_ids - array of open object identifiers -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! num_objs - number of open objects -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Added optional parameter num_objs for number of open objects -! of the specified type and changed type of max_obj to -! INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE - SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - ! Array of open objects iidentifiers - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects -!***** - INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type - - INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type - INTEGER(SIZE_T), INTENT(IN) :: max_objs - INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs - END FUNCTION h5fget_obj_ids_c - END INTERFACE - - hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - IF (PRESENT(num_objs)) num_objs= c_num_objs - - END SUBROUTINE h5fget_obj_ids_f -!****s* H5F/h5fget_freespace_f -! -! NAME -! h5fget_freespace_f -! -! PURPOSE -! Get amount of free space within a file -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! free_space - amount of free space in file -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Quincey Koziol -! October 7, 2003 -! -! SOURCE - SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - ! amount of free space in file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - END FUNCTION h5fget_freespace_c - END INTERFACE - - hdferr = h5fget_freespace_c(file_id, free_space) - - END SUBROUTINE h5fget_freespace_f -!****s* H5F/h5fget_name_f -! -! NAME -! h5fget_name_f -! -! PURPOSE -! Gets the name of the file from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! buf - buffer to store the read name -! size - actual size of the name -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! July 6, 2004 -! -! SOURCE - SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(INOUT) :: buf - ! Buffer to hold file name - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTEGER(SIZE_T) :: buflen - - INTERFACE - INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(SIZE_T), INTENT(OUT) :: size - INTEGER(SIZE_T) :: buflen - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5fget_name_c - END INTERFACE - buflen = LEN_TRIM(buf) - hdferr = h5fget_name_c(obj_id, size, buf, buflen) - END SUBROUTINE h5fget_name_f -!****s* H5F/h5fget_filesize_f -! -! NAME -! h5fget_filesize_f -! -! PURPOSE -! Retrieves the file size of the HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! size - file size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! July 7, 2004 -! -! SOURCE - SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5fget_filesize_c(file_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5fget_filesize_c - END INTERFACE - hdferr = h5fget_filesize_c(file_id, size) - END SUBROUTINE h5fget_filesize_f - - -END MODULE H5F diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90 deleted file mode 100644 index 8544870..0000000 --- a/fortran/src/H5Fff_F03.f90 +++ /dev/null @@ -1,99 +0,0 @@ -!****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 PARAMETERS -! buf_size - Returns the size in bytes of the buffer required to store the file image, -! no data will be copied. -! -! 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 , INTENT(OUT) :: hdferr - INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size -!***** - - INTEGER(SIZE_T) :: buf_size_default - - INTERFACE - INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - USE H5GLOBAL - 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/src/H5Fff_F90.f90 b/fortran/src/H5Fff_F90.f90 deleted file mode 100644 index b6e659b..0000000 --- a/fortran/src/H5Fff_F90.f90 +++ /dev/null @@ -1,43 +0,0 @@ -!****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. * -! 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 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. -! -!***** - - -MODULE H5F_PROVISIONAL - - USE H5GLOBAL - IMPLICIT NONE - -END MODULE H5F_PROVISIONAL diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 7f755b3..b9c44bb 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -1,6 +1,6 @@ /****h* H5Gf/H5Gf * PURPOSE - * This file contains C stubs for H5G Fortran APIs + * This file contains C stubs for H5G Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,30 +26,29 @@ /****if* H5Gf/h5gcreate_c * NAME - * h5gcreate_c + * h5gcreate_c * PURPOSE - * Call H5Gcreate to create a group + * Call H5Gcreate to create a group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * size_hint - length of names in the group + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * size_hint - length of names in the group * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * HISTORY - * - * Changed to call H5Gcreate2 because H5Gcreate flip-flops and - * H5Gcreate1 can be compiled out of the library - * QAK - 2007/08/23 + * Changed to call H5Gcreate2 because H5Gcreate flip-flops and + * H5Gcreate1 can be compiled out of the library + * QAK - 2007/08/23 * SOURCE */ int_f -nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, +h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id ) /******/ { @@ -98,26 +97,26 @@ DONE: /****if* H5Gf/h5gopen_c * NAME - * h5gopen_c + * h5gopen_c * PURPOSE - * Call H5Gopen to open a dataset + * Call H5Gopen to open a dataset * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * gapl_id - Group access property list identifier + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * gapl_id - Group access property list identifier * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * * SOURCE */ int_f -nh5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) +h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { char *c_name = NULL; @@ -148,28 +147,28 @@ DONE: /****if* H5Gf/h5gget_obj_info_idx_c * NAME - * h5gget_obj_info_idx_c + * h5gget_obj_info_idx_c * PURPOSE - * Call H5Gget_obj_info to return name and the type of group - * member + * Call H5Gget_obj_info to return name and the type of group + * member * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length - * idx - index of the group member + * loc_id - file or group identifier + * name - name of the group + * namelen - name length + * idx - index of the group member * OUTPUTS - * obj_name - buffer to store member's name - * obj_namelen - length of the buffer - * obj_type - type of the object + * obj_name - buffer to store member's name + * obj_namelen - length of the buffer + * obj_type - type of the object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, +h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type) /******/ { @@ -207,7 +206,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, goto DONE; /* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't - * work on non-hard links - QAK + * work on non-hard links - QAK */ *obj_type = oinfo.type; @@ -231,24 +230,24 @@ DONE: /****if* H5Gf/h5gn_members_c * NAME - * h5gn_members_c + * h5gn_members_c * PURPOSE - * Call H5Gget_info_by_name to find number of objects in the group + * Call H5Gget_info_by_name to find number of objects in the group * INPUTS - * loc_id - file or group identifier - * name - name of the group - * namelen - name length + * loc_id - file or group identifier + * name - name of the group + * namelen - name length * OUTPUTS - * nmemebers - number of members + * nmemebers - number of members * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) +h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) /******/ { char *c_name = NULL; @@ -276,21 +275,21 @@ DONE: /****if* H5Gf/h5gclose_c * NAME - * h5gclose_c + * h5gclose_c * PURPOSE - * Call H5Gclose to close the group + * Call H5Gclose to close the group * INPUTS - * grp_id - identifier of the group to be closed + * grp_id - identifier of the group to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 5, 1999 + * Wednesday, August 5, 1999 * SOURCE */ int_f -nh5gclose_c(hid_t_f *grp_id) +h5gclose_c(hid_t_f *grp_id) /******/ { int ret_value = 0; @@ -303,19 +302,19 @@ nh5gclose_c(hid_t_f *grp_id) /****if* H5Gf/h5glink_c * NAME - * h5glink_c + * h5glink_c * PURPOSE - * Call H5Glink to link the specified type + * Call H5Glink to link the specified type * INPUTS - * loc_id - identifier of file or group - * link_type - link type - * current_name - name of the existing object for hard link, - * anything for the soft link - * current_namelen - current name lenghth - * new_name - new name for the object - * new_namelen - new_name lenghth + * loc_id - identifier of file or group + * link_type - link type + * current_name - name of the existing object for hard link, + * anything for the soft link + * current_namelen - current name lenghth + * new_name - new name for the object + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -323,7 +322,7 @@ nh5gclose_c(hid_t_f *grp_id) */ int_f -nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, +h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen) /******/ { @@ -385,32 +384,32 @@ DONE: /****if* H5Gf/h5glink2_c * NAME - * h5glink2_c + * h5glink2_c * PURPOSE - * Call H5Glink2 to link the specified type + * Call H5Glink2 to link the specified type * INPUTS - * cur_loc_id - identifier of file or group - * cur_name - name of the existing object for hard link releative - * to cur_loc_id location, - * anything for the soft link - * current_namelen - current name lenghth - * link_type - link type - * new_loc_id - location identifier - * new_name - new name for the object releative to the new_loc_id - * location - * new_namelen - new_name lenghth + * cur_loc_id - identifier of file or group + * cur_name - name of the existing object for hard link releative + * to cur_loc_id location, + * anything for the soft link + * current_namelen - current name lenghth + * link_type - link type + * new_loc_id - location identifier + * new_name - new name for the object releative to the new_loc_id + * location + * new_namelen - new_name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, September 25, 2002 + * Wednesday, September 25, 2002 * HISTORY * * SOURCE */ int_f -nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, +h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen) /******/ { @@ -470,14 +469,14 @@ DONE: /****if* H5Gf/h5gunlink_c * NAME - * h5gunlink_c + * h5gunlink_c * PURPOSE - * Call H5Gunlink to remove the specified name + * Call H5Gunlink to remove the specified name * INPUTS - * loc_id - identifier of file or group - * name - name of the object to unlink + * loc_id - identifier of file or group + * name - name of the object to unlink * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -485,7 +484,7 @@ DONE: */ int_f -nh5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) +h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) /******/ { char *c_name = NULL; @@ -512,17 +511,17 @@ DONE: /****if* H5Gf/h5gmove_c * NAME - * h5gmove_c + * h5gmove_c * PURPOSE - * Call H5Gmove to rename an object within an HDF5 file + * Call H5Gmove to rename an object within an HDF5 file * INPUTS - * loc_id - identifier of file or group - * src_name - name of the original object - * src_namelen - original name lenghth - * dst_name - new name for the object - * dst_namelen - new name lenghth + * loc_id - identifier of file or group + * src_name - name of the original object + * src_namelen - original name lenghth + * dst_name - new name for the object + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -530,7 +529,7 @@ DONE: */ int_f -nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) +h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -562,18 +561,18 @@ DONE: /****if* H5Gf/h5gmove2_c * NAME - * h5gmove2_c + * h5gmove2_c * PURPOSE - * Call H5Gmove2 to rename an object within an HDF5 file + * Call H5Gmove2 to rename an object within an HDF5 file * INPUTS - * src_loc_id - identifier of file or group - * src_name - name of the original object relative to src_loc_id - * src_namelen - original name lenghth - * dst_loc_id - new location identifier - * dst_name - new name for the object relative to dst_loc_id - * dst_namelen - new name lenghth + * src_loc_id - identifier of file or group + * src_name - name of the original object relative to src_loc_id + * src_namelen - original name lenghth + * dst_loc_id - new location identifier + * dst_name - new name for the object relative to dst_loc_id + * dst_namelen - new name lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, September 25, 2002 @@ -582,7 +581,7 @@ DONE: */ int_f -nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) +h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen) /******/ { char *c_src_name = NULL, *c_dst_name = NULL; @@ -614,18 +613,18 @@ DONE: /****if* H5Gf/h5gget_linkval_c * NAME - * h5gget_linkval_c + * h5gget_linkval_c * PURPOSE - * Call H5Gget_linkval to return the name of object + * Call H5Gget_linkval to return the name of object * INPUTS - * loc_id - identifier of file or group - * name - name of the object that symbolic link points to - * namelen - the name lenghth - * size - lenghth of retrurned value + * loc_id - identifier of file or group + * name - name of the object that symbolic link points to + * namelen - the name lenghth + * size - lenghth of retrurned value * OUTPUTS - * value - name to be returned + * value - name to be returned * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen * Friday, August 6, 1999 @@ -633,7 +632,7 @@ DONE: */ int_f -nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, +h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value) /******/ { @@ -678,26 +677,26 @@ DONE: /****if* H5Gf/h5gset_comment_c * NAME - * h5gset_comment_c + * h5gset_comment_c * PURPOSE - * Call H5Oset_comment_by_name to set comments for the specified object + * Call H5Oset_comment_by_name to set comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * comment - the new comment - * commentlen - new comment lenghth + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * comment - the new comment + * commentlen - new comment lenghth * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * HISTORY - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f -nh5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, +h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen) /******/ { @@ -729,24 +728,24 @@ DONE: /****if* H5Gf/h5gget_comment_c * NAME - * h5gget_comment_c + * h5gget_comment_c * PURPOSE - * Call H5Oget_comment_by_name to retrieve comments for the specified object + * Call H5Oget_comment_by_name to retrieve comments for the specified object * INPUTS - * loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset - * namelen - the name lenghth - * bufsize - at most bufsize characters - * comment - the new comment + * loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset + * namelen - the name lenghth + * bufsize - at most bufsize characters + * comment - the new comment * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Mingshi Chen - * Friday, August 6, 1999 + * Friday, August 6, 1999 * SOURCE */ int_f -nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, +h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment) /******/ { @@ -791,26 +790,26 @@ DONE: /****if* H5Gf/h5gcreate_anon_c * NAME - * h5gcreate_anon_c + * h5gcreate_anon_c * PURPOSE - * Call H5Gcreate_anon + * Call H5Gcreate_anon * INPUTS * - * loc_id - Location identifier - * gcpl_id - Group creation property list identifier - * gapl_id - Group access property list identifier + * loc_id - Location identifier + * gcpl_id - Group creation property list identifier + * gapl_id - Group access property list identifier * * OUTPUTS - * grp_id - group identifier + * grp_id - group identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 * SOURCE */ int_f -nh5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) +h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id) /******/ { @@ -825,24 +824,24 @@ done: /****if* H5Gf/h5gget_create_plist_c * NAME - * h5gget_create_plist_c + * h5gget_create_plist_c * PURPOSE - * Call H5Gget_create_plist + * Call H5Gget_create_plist * INPUTS * - * grp_id - group identifier + * grp_id - group identifier * * OUTPUTS - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 15, 2008 * SOURCE */ int_f -nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) +h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -857,36 +856,36 @@ done: /****if* H5Gf/h5gget_info_c * NAME - * h5gget_info_c + * h5gget_info_c * PURPOSE - * Call H5Gget_info + * Call H5Gget_info * INPUTS - * group_id - Group identifier + * group_id - Group identifier * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 15, 2008 + * February 15, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) +h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ { @@ -914,43 +913,43 @@ done: /****if* H5Gf/h5gget_info_by_idx_c * NAME - * h5gget_info_by_idx_c + * h5gget_info_by_idx_c * PURPOSE - * Call H5Gget_info_by_idx + * Call H5Gget_info_by_idx * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * index_type - Index type - * order - Order of the count in the index - * n - Position in the index of the group for which information is retrieved - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * index_type - Index type + * order - Order of the count in the index + * n - Position in the index of the group for which information is retrieved + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' parameter + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ @@ -987,40 +986,40 @@ nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, /****if* H5Gf/h5gget_info_by_name_c * NAME - * h5gget_info_by_name_c + * h5gget_info_by_name_c * PURPOSE - * Call H5Gget_info_by_name + * Call H5Gget_info_by_name * INPUTS * - * loc_id - File or group identifier - * group_name - Name of group containing group for which information is to be retrieved - * group_namelen - name length - * lapl_id - Link access property list + * loc_id - File or group identifier + * group_name - Name of group containing group for which information is to be retrieved + * group_namelen - name length + * lapl_id - Link access property list * OUTPUTS * - * storage_type - Type of storage for links in group: + * storage_type - Type of storage for links in group: * H5G_STORAGE_TYPE_COMPACT: Compact storage * H5G_STORAGE_TYPE_DENSE: Indexed storage * H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure * - * nlinks - Number of links in group - * max_corder - Current maximum creation order value for group - * mounted - Whether group has a file mounted on it (0 = false, 1 = true) + * nlinks - Number of links in group + * max_corder - Current maximum creation order value for group + * mounted - Whether group has a file mounted on it (0 = false, 1 = true) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * - * - Added 'mounted' paramater - * M. Scot Breitenfeld - * July 16, 2008 + * - Added 'mounted' paramater + * M. Scot Breitenfeld + * July 16, 2008 * SOURCE */ int_f -nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted) /******/ { diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 new file mode 100644 index 0000000..2e002b5 --- /dev/null +++ b/fortran/src/H5Gff.F90 @@ -0,0 +1,1272 @@ +!****h* ROBODoc/H5G +! +! NAME +! MODULE H5G +! +! FILE +! fortran/src/H5Gff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5G 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5G 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 H5G + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR + USE H5GLOBAL + +CONTAINS + +!****s* H5G/h5gcreate_f +! +! NAME +! h5gcreate_f +! +! PURPOSE +! Creates a new group. +! +! INPUTS +! loc_id - location identifier +! name - group name at the specified location +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! size_hint - a parameter indicating the number of bytes to +! reserve for the names that will appear in the group +! lcpl_id - Property list for link creation +! gcpl_id - Property list for group creation +! gapl_id - Property list for group access +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added additional optional paramaters in 1.8 +! MSB - February 27, 2008 +! +! SOURCE + SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint + ! Parameter indicating + ! the number of bytes + ! to reserve for the + ! names that will appear + ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F + ! if using any of the optional + ! parameters lcpl_id, gcpl_id, and/or gapl_id when not + ! using keywords in specifying the optional parameters + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTEGER :: namelen ! Length of the name character string + INTEGER(SIZE_T) :: size_hint_default + + INTERFACE + INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & + size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) & + BIND(C,NAME='h5gcreate_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T) :: size_hint_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + END FUNCTION h5gcreate_c + END INTERFACE + + size_hint_default = OBJECT_NAMELEN_DEFAULT_F + IF (PRESENT(size_hint)) size_hint_default = size_hint + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + gcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + + hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & + lcpl_id_default, gcpl_id_default, gapl_id_default) + + END SUBROUTINE h5gcreate_f + +!!$! +!!$!****s* H5G/ +!!$! +!!$! NAME +!!$! h5gcreate2_f +!!$! +!!$! PURPOSE +!!$! Creates a new group. +!!$! +!!$! INPUTS +!!$! loc_id - location identifier +!!$! name - group name at the specified location +!!$! OUTPUTS +!!$! grp_id - group identifier +!!$! hdferr: - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! +!!$! lcpl_id - Property list for link creation +!!$! gcpl_id - Property list for group creation +!!$! gapl_id - Property list for group access +!!$! +!!$! AUTHOR M. Scot Breitenfeld +!!$! February 27, 2008 +!!$! +!!$! HISTORY +!!$! +!!$! NOTES Needed to switch the first 2 arguments to avoid conflect +!!$! with h5gcreate1_f +!!$! +!!$ +!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & +!!$ lcpl_id, gcpl_id, gapl_id) +!!$ IMPLICIT NONE +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of the group +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier +!!$ +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!!$ +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT ! Dummy argument to pass to c call +!!$ INTEGER :: namelen ! Length of the name character string +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & +!!$ OBJECT_NAME +! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c +!!$ !DEC$ENDIF +!!$ !DEC$ATTRIBUTES reference :: name +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name +!!$ INTEGER :: namelen +!!$ INTEGER(SIZE_T) :: OBJECT_NAME +! LEN_DEFAULT +!!$ INTEGER(HID_T) :: lcpl_id_default +!!$ INTEGER(HID_T) :: gcpl_id_default +!!$ INTEGER(HID_T) :: gapl_id_default +!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id +!!$ END FUNCTION h5gcreate_c +!!$ END INTERFACE +!!$ +!!$ namelen = LEN(name) +!!$ OBJECT_NAME +! LEN_DEFAULT = OBJECT_NAME +! LEN_DEFAULT_F +!!$ +!!$ lcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id +!!$ gcpl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id +!!$ gapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id +!!$ +!!$ +!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME +! LEN_DEFAULT, grp_id, & +!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) +!!$ +!!$ END SUBROUTINE h5gcreate2_f + +! +!****s* H5G/h5gopen_f +! +! NAME +! h5gopen_f +! +! PURPOSE +! Opens an existing group. +! +! INPUTS +! loc_id - location identifier +! name - name of the group to open +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gapl_id - Group access property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! Added 1.8 (optional) parameter gapl_id +! February, 2008 M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier +!***** + INTEGER(HID_T) :: gapl_id_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) & + BIND(C,NAME='h5gopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: gapl_id_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + END FUNCTION h5gopen_c + END INTERFACE + + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + + END SUBROUTINE h5gopen_f +! +!****s* H5G/h5gclose_f +! +! NAME +! h5gclose_f +! +! PURPOSE +! Closes the specified group. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gclose_f(grp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gclose_c(grp_id) BIND(C,NAME='h5gclose_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: grp_id + END FUNCTION h5gclose_c + END INTERFACE + + hdferr = h5gclose_c(grp_id) + + END SUBROUTINE h5gclose_f +! +!****s* H5G/h5gget_obj_info_idx_f +! +! NAME +! h5gget_obj_info_idx_f +! +! PURPOSE +! Returns name and type of the group member identified by +! its index. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! idx - object index (zero-based) +! OUTPUTS +! obj_name - object name +! obj_type - object type +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & + obj_name, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(IN) :: idx ! Index of member object + CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object + INTEGER, INTENT(OUT) :: obj_type ! Object type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: obj_namelen ! Length of the obj_name character string + + INTERFACE + INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & + namelen, idx, & + obj_name, obj_namelen, obj_type) BIND(C,NAME='h5gget_obj_info_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: idx + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: obj_name + INTEGER :: obj_namelen + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5gget_obj_info_idx_c + END INTERFACE + + namelen = LEN(name) + obj_namelen = LEN(obj_name) + hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & + obj_name, obj_namelen, obj_type) + END SUBROUTINE h5gget_obj_info_idx_f + +! +!****s* H5G/h5gn_members_f +! +! NAME +! h5gn_members_f +! +! PURPOSE +! Returns the number of group members. +! +! INPUTS +! loc_id - location identifier +! name - name of the group at the specified location +! OUTPUTS +! nmembers - number of group members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group + INTEGER, INTENT(OUT) :: nmembers ! Number of members in the + ! group + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) & + BIND(C,NAME='h5gn_members_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(OUT) :: nmembers + END FUNCTION h5gn_members_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) + + END SUBROUTINE h5gn_members_f +! +!****s* H5G/h5glink_f +! +! NAME +! h5glink_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. +! +! INPUTS +! loc_id - location identifier +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! current_name - name of the existing object if link is a +! hard link. Can be anything for the soft link +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5glink_f(loc_id, link_type, current_name, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + CHARACTER(LEN=*), INTENT(IN) :: current_name + ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: current_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) & + BIND(C,NAME='h5glink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: current_name + INTEGER :: current_namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5glink_c + END INTERFACE + + current_namelen = LEN(current_name) + new_namelen = LEN(new_name) + hdferr = h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + END SUBROUTINE h5glink_f + +! +!****s* H5G/h5glink2_f +! +! NAME +! h5glink2_f +! +! PURPOSE +! Creates a link of the specified type from new_name +! to current_name. current_name and new_name are interpreted +! releative to current and new location identifiers. +! +! INPUTS +! cur_loc_id - location identifier +! cur_name - name of the existing object if link is a +! hard link. Can be anything for the soft link. +! link_type - link type; possible values are: +! H5G_LINK_HARD_F (0) +! H5G_LINK_SOFT_F (1) +! new_loc_id - new location identifier +! new_name - new name for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & + new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: cur_name + ! Current name of an object + INTEGER, INTENT(IN) :: link_type ! link type + ! Possible values are: + ! H5G_LINK_HARD_F (0) or + ! H5G_LINK_SOFT_F (1) + + INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTEGER :: cur_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & + link_type, new_loc_id, & + new_name, new_namelen) BIND(C,NAME='h5glink2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: cur_loc_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: cur_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name + INTEGER :: cur_namelen + INTEGER :: new_namelen + END FUNCTION h5glink2_c + END INTERFACE + + cur_namelen = LEN(cur_name) + new_namelen = LEN(new_name) + hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & + new_loc_id, new_name, new_namelen) + END SUBROUTINE h5glink2_f + +! +!****s* H5G/h5gunlink_f +! +! NAME +! h5gunlink_f +! +! PURPOSE +! Removes the specified name from the group graph and +! decrements the link count for the object to which name +! points +! +! INPUTS +! loc_id - location identifier +! name - name of the object to unlink +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gunlink_f(loc_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the name character string + + INTERFACE + INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) BIND(C,NAME='h5gunlink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5gunlink_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gunlink_c(loc_id, name, namelen) + END SUBROUTINE h5gunlink_f + +! +!****s* H5G/h5gmove_f +! +! NAME +! h5gmove_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! loc_id - location identifier +! name - object's name at specified location +! new_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) BIND(C,NAME='h5gmove_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5gmove_c + END INTERFACE + + namelen = LEN(name) + new_namelen = LEN(new_name) + hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + END SUBROUTINE h5gmove_f +! +!****s* H5G/h5gmove2_f +! +! NAME +! h5gmove2_f +! +! PURPOSE +! Renames an object within an HDF5 file. +! +! INPUTS +! src_loc_id - original location identifier +! src_name - object's name at specified original location +! dst_loc_id - original location identifier +! dst_name - object's new name +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! September 25, 2002 +! +! SOURCE + SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object + INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: src_namelen ! Length of the current_name string + INTEGER :: dst_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & + dst_loc_id, dst_name, dst_namelen) BIND(C,NAME='h5gmove2_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: src_loc_id + INTEGER(HID_T), INTENT(IN) :: dst_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name + INTEGER :: src_namelen + INTEGER :: dst_namelen + END FUNCTION h5gmove2_c + END INTERFACE + + src_namelen = LEN(src_name) + dst_namelen = LEN(dst_name) + hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) + END SUBROUTINE h5gmove2_f +! +!****s* H5G/h5gget_linkval_f +! +! NAME +! h5gget_linkval_f +! +! PURPOSE +! Returns the name of the object that the symbolic link +! points to. +! +! INPUTS +! loc_id - location identifier +! name - symbolic link to the object whose name +! is to be returned. +! size - maximum number of characters to be returned +! OUTPUTS +! buffer - a buffer to hold the name of the object +! being sought +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a name of + ! the object symbolic link + ! points to + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_linkval_c') + IMPORT :: C_CHAR, SIZE_T + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer + END FUNCTION h5gget_linkval_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) + END SUBROUTINE h5gget_linkval_f + +! +!****s* H5G/h5gset_comment_f +! +! NAME +! h5gset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object +! comment - comment to set for the object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Lenghth of the current_name string + INTEGER :: commentlen ! Lenghth of the comment string + + INTERFACE + INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & + comment, commentlen) BIND(C,NAME='h5gset_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment + INTEGER :: commentlen + END FUNCTION h5gset_comment_c + END INTERFACE + + namelen = LEN(name) + commentlen = LEN(comment) + hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) + END SUBROUTINE h5gset_comment_f +! +!****s* H5G/h5gget_comment_f +! +! NAME +! h5gget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! INPUTS +! loc_id - location identifier +! name - name of the object at specified location +! size - size of the buffer required to hold comment +! OUTPUTS +! buffer - buffer to hold object's comment +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object + INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a comment + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer + END FUNCTION h5gget_comment_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) + + END SUBROUTINE h5gget_comment_f +! +!****s* H5G/H5Gcreate_anon_f +! +! NAME +! H5Gcreate_anon_f +! +! PURPOSE +! Creates a new empty group without linking it into the file structure. +! +! INPUTS +! loc_id - Location identifier +! OUTPUTS +! grp_id - group identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! gcpl_id - Group creation property list identifier +! gapl_id - Group access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access +!***** + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTERFACE + INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) & + BIND(C,NAME='h5gcreate_anon_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation + INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access + INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + END FUNCTION h5gcreate_anon_c + END INTERFACE + + gcpl_id_default = H5P_DEFAULT_F + gapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + + END SUBROUTINE h5Gcreate_anon_f +! +!****s* H5G/H5Gget_create_plist_f +! +! NAME +! H5Gget_create_plist_f +! +! PURPOSE +! Gets a group creation property list identifier. +! +! INPUTS +! grp_id - group identifier +! OUTPUTS +! gcpl_id - Group creation property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! SOURCE + SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) BIND(C,NAME='h5gget_create_plist_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER(HID_T), INTENT(OUT) :: gcpl_id + END FUNCTION h5gget_create_plist_c + END INTERFACE + + hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) + + END SUBROUTINE h5gget_create_plist_f + +! +!****s* H5G/h5gget_info_f +! +! NAME +! h5gget_info_f +! +! PURPOSE +! Retrieves information about a group +! +! INPUTS +! group_id - Group identifier +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! mounted - Whether group has a file mounted on it +! +! AUTHOR +! M. Scot Breitenfeld +! February 15, 2008 +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! HISTORY +! +! - Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + + INTERFACE + INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) & + BIND(C,NAME='h5gget_info_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER :: mounted_c + END FUNCTION h5gget_info_c + END INTERFACE + + hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_f +! +!****s* H5G/h5gget_info_by_idx_f +! +! NAME +! h5gget_info_by_idx_f +! +! PURPOSE +! Retrieves information about a group, according to the group’s position within an index. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! index_type - Index type +! order - Order of the count in the index +! n - Position in the index of the group for which information is retrieved +! +! OUTPUTS +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + INTEGER, INTENT(IN) :: index_type ! Index type + INTEGER, INTENT(IN) :: order ! Order of the count in the index + INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_idx_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & + index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_idx_f +! +!****s* H5G/h5gget_info_by_name_f +! +! NAME +! h5gget_info_by_name_f +! +! PURPOSE +! Retrieves information about a group. +! +! INPUTS +! loc_id - File or group identifier +! group_name - Name of group containing group for which information is to be retrieved +! +! OUTPUTS +! +! storage_type - Type of storage for links in group +! H5G_STORAGE_TYPE_COMPACT: Compact storage +! H5G_STORAGE_TYPE_DENSE: Indexed storage +! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure +! nlinks - Number of links in group +! max_corder - Current maximum creation order value for group +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! mounted - Whether group has a file mounted on it +! +! NOTES +! In C the output is defined as a structure: H5G_info_t +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! HISTORY +! Added 'mounted' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! SOURCE + SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & + storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved + + INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: + ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage + ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage + ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure + INTEGER, INTENT(OUT) :: nlinks ! Number of links in group + INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it +!***** + INTEGER :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) BIND(C,NAME='h5gget_info_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_name_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_name_f + +END MODULE H5G diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90 deleted file mode 100644 index d4d7496..0000000 --- a/fortran/src/H5Gff.f90 +++ /dev/null @@ -1,1331 +0,0 @@ -!****h* ROBODoc/H5G -! -! NAME -! MODULE H5G -! -! FILE -! fortran/src/H5Gff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5G 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 H5G 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 H5G - USE H5GLOBAL - -! PRIVATE :: h5gcreate1_f -! PRIVATE :: h5gcreate2_f - -! INTERFACE h5gcreate_f -! MODULE PROCEDURE h5gcreate1_f -! MODULE PROCEDURE h5gcreate2_f -! END INTERFACE - -CONTAINS - -!****s* H5G/h5gcreate_f -! -! NAME -! h5gcreate_f -! -! PURPOSE -! Creates a new group. -! -! INPUTS -! loc_id - location identifier -! name - group name at the specified location -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! size_hint - a parameter indicating the number of bytes to -! reserve for the names that will appear in the group -! lcpl_id - Property list for link creation -! gcpl_id - Property list for group creation -! gapl_id - Property list for group access -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added additional optional paramaters in 1.8 -! MSB - February 27, 2008 -! -! SOURCE - SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint - ! Parameter indicating - ! the number of bytes - ! to reserve for the - ! names that will appear - ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F - ! if using any of the optional - ! parameters lcpl_id, gcpl_id, and/or gapl_id when not - ! using keywords in specifying the optional parameters - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTEGER :: namelen ! Length of the name character string - INTEGER(SIZE_T) :: size_hint_default - - INTERFACE - INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & - size_hint_default, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T) :: size_hint_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - END FUNCTION h5gcreate_c - END INTERFACE - - size_hint_default = OBJECT_NAMELEN_DEFAULT_F - IF (PRESENT(size_hint)) size_hint_default = size_hint - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - gcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - - hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & - lcpl_id_default, gcpl_id_default, gapl_id_default) - - END SUBROUTINE h5gcreate_f - -!!$! -!!$!****s* H5G/ -!!$! -!!$! NAME -!!$! h5gcreate2_f -!!$! -!!$! PURPOSE -!!$! Creates a new group. -!!$! -!!$! INPUTS -!!$! loc_id - location identifier -!!$! name - group name at the specified location -!!$! OUTPUTS -!!$! grp_id - group identifier -!!$! hdferr: - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! -!!$! lcpl_id - Property list for link creation -!!$! gcpl_id - Property list for group creation -!!$! gapl_id - Property list for group access -!!$! -!!$! AUTHOR M. Scot Breitenfeld -!!$! February 27, 2008 -!!$! -!!$! HISTORY -!!$! -!!$! NOTES Needed to switch the first 2 arguments to avoid conflect -!!$! with h5gcreate1_f -!!$! -!!$ -!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & -!!$ lcpl_id, gcpl_id, gapl_id) -!!$ IMPLICIT NONE -!!$ CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier -!!$ -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!!$ -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT ! Dummy argument to pass to c call -!!$ INTEGER :: namelen ! Length of the name character string -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & -!!$ OBJECT_NAME -! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c -!!$ !DEC$ENDIF -!!$ !DEC$ATTRIBUTES reference :: name -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(LEN=*), INTENT(IN) :: name -!!$ INTEGER :: namelen -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id -!!$ END FUNCTION h5gcreate_c -!!$ END INTERFACE -!!$ -!!$ namelen = LEN(name) -!!$ OBJECT_NAME -! LEN_DEFAULT = OBJECT_NAME -! LEN_DEFAULT_F -!!$ -!!$ lcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id -!!$ gcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id -!!$ gapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id -!!$ -!!$ -!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME -! LEN_DEFAULT, grp_id, & -!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ -!!$ END SUBROUTINE h5gcreate2_f - -! -!****s* H5G/h5gopen_f -! -! NAME -! h5gopen_f -! -! PURPOSE -! Opens an existing group. -! -! INPUTS -! loc_id - location identifier -! name - name of the group to open -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gapl_id - Group access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added 1.8 (optional) parameter gapl_id -! February, 2008 M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier -!***** - INTEGER(HID_T) :: gapl_id_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: gapl_id_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - END FUNCTION h5gopen_c - END INTERFACE - - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - - END SUBROUTINE h5gopen_f -! -!****s* H5G/h5gclose_f -! -! NAME -! h5gclose_f -! -! PURPOSE -! Closes the specified group. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gclose_f(grp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gclose_c(grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - END FUNCTION h5gclose_c - END INTERFACE - - hdferr = h5gclose_c(grp_id) - - END SUBROUTINE h5gclose_f -! -!****s* H5G/h5gget_obj_info_idx_f -! -! NAME -! h5gget_obj_info_idx_f -! -! PURPOSE -! Returns name and type of the group member identified by -! its index. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! idx - object index (zero-based) -! OUTPUTS -! obj_name - object name -! obj_type - object type -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & - obj_name, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(IN) :: idx ! Index of member object - CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object - INTEGER, INTENT(OUT) :: obj_type ! Object type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: obj_namelen ! Length of the obj_name character string - - INTERFACE - INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & - namelen, idx, & - obj_name, obj_namelen, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: idx - CHARACTER(LEN=*), INTENT(OUT) :: obj_name - INTEGER :: obj_namelen - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5gget_obj_info_idx_c - END INTERFACE - - namelen = LEN(name) - obj_namelen = LEN(obj_name) - hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & - obj_name, obj_namelen, obj_type) - END SUBROUTINE h5gget_obj_info_idx_f - -! -!****s* H5G/h5gn_members_f -! -! NAME -! h5gn_members_f -! -! PURPOSE -! Returns the number of group members. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! OUTPUTS -! nmembers - number of group members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(OUT) :: nmembers ! Number of members in the - ! group - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(OUT) :: nmembers - END FUNCTION h5gn_members_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) - - END SUBROUTINE h5gn_members_f -! -!****s* H5G/h5glink_f -! -! NAME -! h5glink_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. -! -! INPUTS -! loc_id - location identifier -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! current_name - name of the existing object if link is a -! hard link. Can be anything for the soft link -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5glink_f(loc_id, link_type, current_name, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - CHARACTER(LEN=*), INTENT(IN) :: current_name - ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: current_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: current_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: current_name - INTEGER :: current_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5glink_c - END INTERFACE - - current_namelen = LEN(current_name) - new_namelen = LEN(new_name) - hdferr = h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - END SUBROUTINE h5glink_f - -! -!****s* H5G/h5glink2_f -! -! NAME -! h5glink2_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. current_name and new_name are interpreted -! releative to current and new location identifiers. -! -! INPUTS -! cur_loc_id - location identifier -! cur_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! new_loc_id - new location identifier -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & - new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: cur_name - ! Current name of an object - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) - - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTEGER :: cur_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & - link_type, new_loc_id, & - new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: cur_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: cur_loc_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: cur_name - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: cur_namelen - INTEGER :: new_namelen - END FUNCTION h5glink2_c - END INTERFACE - - cur_namelen = LEN(cur_name) - new_namelen = LEN(new_name) - hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & - new_loc_id, new_name, new_namelen) - END SUBROUTINE h5glink2_f - -! -!****s* H5G/h5gunlink_f -! -! NAME -! h5gunlink_f -! -! PURPOSE -! Removes the specified name from the group graph and -! decrements the link count for the object to which name -! points -! -! INPUTS -! loc_id - location identifier -! name - name of the object to unlink -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gunlink_f(loc_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the name character string - - INTERFACE - INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5gunlink_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gunlink_c(loc_id, name, namelen) - END SUBROUTINE h5gunlink_f - -! -!****s* H5G/h5gmove_f -! -! NAME -! h5gmove_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! loc_id - location identifier -! name - object's name at specified location -! new_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5gmove_c - END INTERFACE - - namelen = LEN(name) - new_namelen = LEN(new_name) - hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - END SUBROUTINE h5gmove_f -! -!****s* H5G/h5gmove2_f -! -! NAME -! h5gmove2_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! src_loc_id - original location identifier -! src_name - object's name at specified original location -! dst_loc_id - original location identifier -! dst_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE - SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object - INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: src_namelen ! Length of the current_name string - INTEGER :: dst_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & - dst_loc_id, dst_name, dst_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name - !DEC$ATTRIBUTES reference :: dst_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - INTEGER(HID_T), INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER :: src_namelen - INTEGER :: dst_namelen - END FUNCTION h5gmove2_c - END INTERFACE - - src_namelen = LEN(src_name) - dst_namelen = LEN(dst_name) - hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) - END SUBROUTINE h5gmove2_f -! -!****s* H5G/h5gget_linkval_f -! -! NAME -! h5gget_linkval_f -! -! PURPOSE -! Returns the name of the object that the symbolic link -! points to. -! -! INPUTS -! loc_id - location identifier -! name - symbolic link to the object whose name -! is to be returned. -! size - maximum number of characters to be returned -! OUTPUTS -! buffer - a buffer to hold the name of the object -! being sought -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a name of - ! the object symbolic link - ! points to - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_linkval_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) - END SUBROUTINE h5gget_linkval_f - -! -!****s* H5G/h5gset_comment_f -! -! NAME -! h5gset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object -! comment - comment to set for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Lenghth of the current_name string - INTEGER :: commentlen ! Lenghth of the comment string - - INTERFACE - INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & - comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER :: commentlen - END FUNCTION h5gset_comment_c - END INTERFACE - - namelen = LEN(name) - commentlen = LEN(comment) - hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) - END SUBROUTINE h5gset_comment_f -! -!****s* H5G/h5gget_comment_f -! -! NAME -! h5gget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object at specified location -! size - size of the buffer required to hold comment -! OUTPUTS -! buffer - buffer to hold object's comment -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a comment - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_comment_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) - - END SUBROUTINE h5gget_comment_f -! -!****s* H5G/H5Gcreate_anon_f -! -! NAME -! H5Gcreate_anon_f -! -! PURPOSE -! Creates a new empty group without linking it into the file structure. -! -! INPUTS -! loc_id - Location identifier -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gcpl_id - Group creation property list identifier -! gapl_id - Group access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTERFACE - INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation - INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - END FUNCTION h5gcreate_anon_c - END INTERFACE - - gcpl_id_default = H5P_DEFAULT_F - gapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - - END SUBROUTINE h5Gcreate_anon_f -! -!****s* H5G/H5Gget_create_plist_f -! -! NAME -! H5Gget_create_plist_f -! -! PURPOSE -! Gets a group creation property list identifier. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! gcpl_id - Group creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE - SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - INTEGER(HID_T), INTENT(OUT) :: gcpl_id - END FUNCTION h5gget_create_plist_c - END INTERFACE - - hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) - - END SUBROUTINE h5gget_create_plist_f - -! -!****s* H5G/h5gget_info_f -! -! NAME -! h5gget_info_f -! -! PURPOSE -! Retrieves information about a group -! -! INPUTS -! group_id - Group identifier -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! mounted - Whether group has a file mounted on it -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! HISTORY -! -! - Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - - INTERFACE - INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - INTEGER :: mounted_c - END FUNCTION h5gget_info_c - END INTERFACE - - hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_f -! -!****s* H5G/h5gget_info_by_idx_f -! -! NAME -! h5gget_info_by_idx_f -! -! PURPOSE -! Retrieves information about a group, according to the group’s position within an index. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! index_type - Index type -! order - Order of the count in the index -! n - Position in the index of the group for which information is retrieved -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - INTEGER, INTENT(IN) :: index_type ! Index type - INTEGER, INTENT(IN) :: order ! Order of the count in the index - INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c - !DEC$ENDIF - - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_idx_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & - index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_idx_f -! -!****s* H5G/h5gget_info_by_name_f -! -! NAME -! h5gget_info_by_name_f -! -! PURPOSE -! Retrieves information about a group. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! -! OUTPUTS -! -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! SOURCE - SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & - storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** - INTEGER :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_name_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_name_f - -END MODULE H5G diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index 55868dd..fdab0b6 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -1,6 +1,6 @@ /****h* H5If/H5If * PURPOSE - * This file contains C stubs for H5I Fortran APIs + * This file contains C stubs for H5I Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,15 +25,15 @@ /****if* H5If/h5iget_type_c * NAME - * h5iget_type_c + * h5iget_type_c * PURPOSE - * Call H5Iget_type to get the type of an object + * Call H5Iget_type to get the type of an object * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * type - object type + * type - object type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su * Thursday, March 24, 2000 @@ -42,7 +42,7 @@ * SOURCE */ int_f -nh5iget_type_c (hid_t_f *obj_id, int_f *type) +h5iget_type_c (hid_t_f *obj_id, int_f *type) /******/ { int ret_value = -1; @@ -61,29 +61,29 @@ nh5iget_type_c (hid_t_f *obj_id, int_f *type) } /****if* H5If/h5iget_name_c * NAME - * h5iget_name_c + * h5iget_name_c * PURPOSE - * Call H5Iget_name to get object's name + * Call H5Iget_name to get object's name * INPUTS - * obj_id - object identifier - * buf_size - size of the buffer + * obj_id - object identifier + * buf_size - size of the buffer * OUTPUTS - * buf - buffer to hold the name + * buf - buffer to hold the name * RETURNS - * length of the name on success, -1 on failure + * length of the name on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * - * Changed the size of c_buf_size to c_buf_size + 1, which - * fixes the problem of truncating the string by 1 if the - * exact size of the string (buf_size) is passed in. + * Changed the size of c_buf_size to c_buf_size + 1, which + * fixes the problem of truncating the string by 1 if the + * exact size of the string (buf_size) is passed in. * M. Scot Breitenfeld, April 21, 2008 * SOURCE */ int_f -nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) +h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size) /******/ { int ret_value = -1; @@ -120,22 +120,22 @@ DONE: /****if* H5If/h5iinc_ref_c * NAME - * h5iinc_ref_c + * h5iinc_ref_c * PURPOSE - * Call H5Iinc_ref to increment object's reference count + * Call H5Iinc_ref to increment object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 * SOURCE */ int_f -nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -156,22 +156,22 @@ done: /****if* H5If/h5idec_ref_c * NAME - * h5idec_ref_c + * h5idec_ref_c * PURPOSE - * Call H5Idec_ref to decrement object's reference count + * Call H5Idec_ref to decrement object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol - * Tuesday, December 9, 2003 + * Tuesday, December 9, 2003 * SOURCE */ int_f -nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -192,15 +192,15 @@ done: /****if* H5If/h5iget_ref_c * NAME - * h5iget_ref_c + * h5iget_ref_c * PURPOSE - * Call H5Iget_ref to retrieve object's reference count + * Call H5Iget_ref to retrieve object's reference count * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * ref_count - Reference count of ID + * ref_count - Reference count of ID * RETURNS - * current reference count on success, -1 on failure + * current reference count on success, -1 on failure * AUTHOR * Quincey Koziol * Tuesday, December 9, 2003 @@ -208,7 +208,7 @@ done: * SOURCE */ int_f -nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) +h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) /******/ { int ret_value; @@ -229,15 +229,15 @@ done: /****if* H5If/h5iget_file_id_c * NAME - * h5iget_file_id_c + * h5iget_file_id_c * PURPOSE - * Call H5Iget_file_id to obtain file identifier from object identifier + * Call H5Iget_file_id to obtain file identifier from object identifier * INPUTS - * obj_id - object identifier + * obj_id - object identifier * OUTPUTS - * file_id - file identifier + * file_id - file identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Tuesday, August 24, 2004 @@ -245,7 +245,7 @@ done: * SOURCE */ int_f -nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) +h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) /******/ { int ret_value; @@ -266,17 +266,17 @@ done: } /*---------------------------------------------------------------------------- - * Name: h5iis_valid_c - * Purpose: Calls H5Iis_valid - * Inputs: obj_id - object identifier - * Outputs: 0 = false, 1 = true - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, August 24, 2004 - * Modifications: + * Name: h5iis_valid_c + * Purpose: Calls H5Iis_valid + * Inputs: obj_id - object identifier + * Outputs: 0 = false, 1 = true + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Tuesday, August 24, 2004 + * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) +h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid) { int ret_value; htri_t c_ret_value; diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 new file mode 100644 index 0000000..c91a8aa --- /dev/null +++ b/fortran/src/H5Iff.F90 @@ -0,0 +1,345 @@ +!****h* ROBODoc/H5I +! +! NAME +! MODULE H5I +! +! FILE +! fortran/src/H5Iff.F90 +! +! PURPOSE +! This file contains Fortran interfaces for H5I 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5I 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 H5I + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR + USE H5GLOBAL + +CONTAINS + +!****s* H5I/h5iget_type_f +! +! NAME +! h5iget_type_f +! +! PURPOSE +! Retrieves the type of an object. +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! type - type of the object, possible values: +! H5I_FILE_F +! H5I_GROUP_F +! H5I_DATATYPE_F +! H5I_DATASPACE_F +! H5I_DATASET_F +! H5I_ATTR_F +! H5I_BADID_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 5, 2001 +! +! SOURCE + SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: TYPE ! type of an object. + ! possible values are: + ! H5I_FILE_F + ! H5I_GROUP_F + ! H5I_DATATYPE_F + ! H5I_DATASPACE_F + ! H5I_DATASET_F + ! H5I_ATTR_F + ! H5I_BADID_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5iget_type_c + END INTERFACE + hdferr = h5iget_type_c(obj_id, TYPE) + END SUBROUTINE h5iget_type_f + +!****s* H5I/h5iget_name_f +! +! NAME +! h5iget_name_f +! +! PURPOSE +! Gets a name of an object specified by its idetifier. +! +! INPUTS +! obj_id - attribute identifier +! buf_size - size of a buffer to read name in +! OUTPUTS +! buf - buffer to read name in, name will be truncated if +! buffer is not big enough +! name_size - name size +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! SOURCE + SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name + INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 if successful, + ! -1 if fail +!***** + INTERFACE + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(IN) :: buf_size + INTEGER(SIZE_T), INTENT(OUT) :: name_size + END FUNCTION h5iget_name_c + END INTERFACE + + hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) + END SUBROUTINE h5iget_name_f + +!****s* H5I/h5iinc_ref_f +! +! NAME +! h5iinc_ref_f +! +! PURPOSE +! Increments the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iinc_ref_c + END INTERFACE + hdferr = h5iinc_ref_c(obj_id, ref_count) + END SUBROUTINE h5iinc_ref_f + +!****s* H5I/h5idec_ref_f +! +! NAME +! h5idec_ref_f +! +! PURPOSE +! Decrements the reference count of an ID +! +! INPUTS +! obj_id - Object identifier +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - Error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5idec_ref_c + END INTERFACE + hdferr = h5idec_ref_c(obj_id, ref_count) + END SUBROUTINE h5idec_ref_f + +!****s* H5I/h5iget_ref_f +! NAME +! h5iget_ref_f +! +! PURPOSE +! Retrieves the reference count of an ID +! +! INPUTS +! obj_id - object identifier +! +! OUTPUTS +! ref_count - Current reference count of the ID +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Quincey Koziol +! December 9, 2003 +! +! SOURCE + SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iget_ref_c + END INTERFACE + hdferr = h5iget_ref_c(obj_id, ref_count) + END SUBROUTINE h5iget_ref_f +! +!****s* H5I/h5iget_file_id_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Obtains file identifier from the object identifier +! +! INPUTS +! obj_id - object identifier +! OUTPUTS +! file_id - file identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 23, 2004 +! SOURCE + SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5iget_file_id_c + END INTERFACE + hdferr = h5iget_file_id_c(obj_id, file_id) + END SUBROUTINE h5iget_file_id_f +! +!****s* H5I/h5iis_valid_f +! NAME +! h5iget_file_id_f +! +! PURPOSE +! Check if an ID is valid without producing an error message +! +! INPUTS +! id - identifier +! OUTPUTS +! valid - status of id as a valid identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! SOURCE + SUBROUTINE h5iis_valid_f(id, valid, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_valid ! 0 = .false, 1 = .true. + + INTERFACE + INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER :: c_valid + END FUNCTION h5iis_valid_c + END INTERFACE + + hdferr = h5iis_valid_c(id, c_valid) + + valid = .FALSE. ! Default + IF(c_valid.EQ.1) valid = .TRUE. + + END SUBROUTINE h5iis_valid_f +END MODULE H5I + diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 deleted file mode 100644 index 7c9a843..0000000 --- a/fortran/src/H5Iff.f90 +++ /dev/null @@ -1,352 +0,0 @@ -!****h* ROBODoc/H5I -! -! NAME -! MODULE H5I -! -! FILE -! fortran/src/H5Iff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5I 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 H5I 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 H5I - - USE H5GLOBAL - -CONTAINS - -!****s* H5I/h5iget_type_f -! -! NAME -! h5iget_type_f -! -! PURPOSE -! Retrieves the type of an object. -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! type - type of the object, possible values: -! H5I_FILE_F -! H5I_GROUP_F -! H5I_DATATYPE_F -! H5I_DATASPACE_F -! H5I_DATASET_F -! H5I_ATTR_F -! H5I_BADID_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE - SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: TYPE ! type of an object. - ! possible values are: - ! H5I_FILE_F - ! H5I_GROUP_F - ! H5I_DATATYPE_F - ! H5I_DATASPACE_F - ! H5I_DATASET_F - ! H5I_ATTR_F - ! H5I_BADID_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: TYPE - END FUNCTION h5iget_type_c - END INTERFACE - hdferr = h5iget_type_c(obj_id, TYPE) - END SUBROUTINE h5iget_type_f - -!****s* H5I/h5iget_name_f -! -! NAME -! h5iget_name_f -! -! PURPOSE -! Gets a name of an object specified by its idetifier. -! -! INPUTS -! obj_id - attribute identifier -! buf_size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in, name will be truncated if -! buffer is not big enough -! name_size - name size -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! SOURCE - SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name - INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 if successful, - ! -1 if fail -!***** - INTERFACE - INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(IN) :: buf_size - INTEGER(SIZE_T), INTENT(OUT) :: name_size - END FUNCTION h5iget_name_c - END INTERFACE - - hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) - END SUBROUTINE h5iget_name_f - -!****s* H5I/h5iinc_ref_f -! -! NAME -! h5iinc_ref_f -! -! PURPOSE -! Increments the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iinc_ref_c - END INTERFACE - hdferr = h5iinc_ref_c(obj_id, ref_count) - END SUBROUTINE h5iinc_ref_f - -!****s* H5I/h5idec_ref_f -! -! NAME -! h5idec_ref_f -! -! PURPOSE -! Decrements the reference count of an ID -! -! INPUTS -! obj_id - Object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5idec_ref_c - END INTERFACE - hdferr = h5idec_ref_c(obj_id, ref_count) - END SUBROUTINE h5idec_ref_f - -!****s* H5I/h5iget_ref_f -! NAME -! h5iget_ref_f -! -! PURPOSE -! Retrieves the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE - SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iget_ref_c - END INTERFACE - hdferr = h5iget_ref_c(obj_id, ref_count) - END SUBROUTINE h5iget_ref_f -! -!****s* H5I/h5iget_file_id_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Obtains file identifier from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! file_id - file identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 23, 2004 -! SOURCE - SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5iget_file_id_c - END INTERFACE - hdferr = h5iget_file_id_c(obj_id, file_id) - END SUBROUTINE h5iget_file_id_f -! -!****s* H5I/h5iis_valid_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Check if an ID is valid without producing an error message -! -! INPUTS -! id - identifier -! OUTPUTS -! valid - status of id as a valid identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! SOURCE - SUBROUTINE h5iis_valid_f(id, valid, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_valid ! 0 = .false, 1 = .true. - - INTERFACE - INTEGER FUNCTION h5iis_valid_c(id, c_valid) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - INTEGER :: c_valid - END FUNCTION h5iis_valid_c - END INTERFACE - - hdferr = h5iis_valid_c(id, c_valid) - - valid = .FALSE. ! Default - IF(c_valid.EQ.1) valid = .TRUE. - - END SUBROUTINE h5iis_valid_f -END MODULE H5I - diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 6523ab4..0d3aac2 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -1,6 +1,6 @@ /****h* H5Lf/H5Lf * PURPOSE - * This file contains C stubs for H5L Fortran APIs + * This file contains C stubs for H5L Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,34 +26,34 @@ /****if* H5Lf/h5lcopy_c * NAME - * h5lcopy_c + * h5lcopy_c * PURPOSE - * Call H5Lcopy + * Call H5Lcopy * INPUTS * - * src_loc_id - Location identifier of the source link - * src_name - Name of the link to be copied - * src_namelen - length of the name - * dest_loc_id - Location identifier specifying the destination of the copy - * dest_name - Name to be assigned to the NEW copy - * dest_namelen - Length of the name - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lcpl_id - Link creation property list identifier - * lapl_id - Link access property list identifier + * src_loc_id - Location identifier of the source link + * src_name - Name of the link to be copied + * src_namelen - length of the name + * dest_loc_id - Location identifier specifying the destination of the copy + * dest_name - Name to be assigned to the NEW copy + * dest_namelen - Length of the name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lcpl_id - Link creation property list identifier + * lapl_id - Link access property list identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -88,21 +88,21 @@ done: /****if* H5Lf/h5lcreate_external_c * NAME - * h5lcreate_external_c + * h5lcreate_external_c * PURPOSE - * Call H5Lcreate_external_c + * Call H5Lcreate_external_c * INPUTS * - * file_name - Name of the file containing the target object. Neither the file nor the target object is - * required to exist. May be the file the link is being created in. - * obj_name - Path within the target file to the target object. + * file_name - Name of the file containing the target object. Neither the file nor the target object is + * required to exist. May be the file the link is being created in. + * obj_name - Path within the target file to the target object. * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 29, 2008 @@ -110,7 +110,7 @@ done: */ int_f -nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -150,27 +150,27 @@ done: /****if* H5Lf/h5ldelete_c * NAME - * h5ldelete_c + * h5ldelete_c * PURPOSE - * Call H5Ldelete + * Call H5Ldelete * INPUTS * * - * loc_id - Identifier of the file or group containing the object - * name - Name of the link to delete - * lapl_id - Link access property list identifier - * namelen - length of name + * loc_id - Identifier of the file or group containing the object + * name - Name of the link to delete + * lapl_id - Link access property list identifier + * namelen - length of name * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * SOURCE */ int_f -nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) +h5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) /******/ { char *c_name = NULL; @@ -197,28 +197,28 @@ done: /****if* H5Lf/h5lcreate_soft_c * NAME - * h5lcreate_soft_c + * h5lcreate_soft_c * PURPOSE - * Call H5Lcreate_soft + * Call H5Lcreate_soft * INPUTS * * - * target_path - Path to the target object, which is not required to exist. - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * target_path - Path to the target object, which is not required to exist. + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * SOURCE */ int_f -nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -253,29 +253,29 @@ nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, /****if* H5Lf/h5lcreate_hard_c * NAME - * h5lcreate_hard_c + * h5lcreate_hard_c * PURPOSE - * Call H5Lcreate_hard + * Call H5Lcreate_hard * INPUTS * - * obj_loc_id - The file or group identifier for the target object. - * obj_name - Name of the target object, which must already exist. - * obj_namelen - Name length - * link_loc_id - The file or group identifier for the new link. - * link_name - The name of the new link. - * link_namelen- Name length - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * obj_loc_id - The file or group identifier for the target object. + * obj_name - Name of the target object, which must already exist. + * obj_namelen - Name length + * link_loc_id - The file or group identifier for the new link. + * link_name - The name of the new link. + * link_namelen- Name length + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 27, 2008 * SOURCE */ int_f -nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -310,41 +310,41 @@ nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, /****if* H5Lf/h5ldelete_by_idx_c * NAME - * h5ldelete_by_idx_c + * h5ldelete_by_idx_c * PURPOSE - * Calls h5ldelete_by_idx + * Calls h5ldelete_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * group_namelen - Name length - * index_field - Type of index; Possible values are: + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * group_namelen - Name length + * index_field - Type of index; Possible values are: * H5_INDEX_UNKNOWN_F = -1 - Unknown index type * H5_INDEX_NAME_F - Index on names * H5_INDEX_CRT_ORDER_F - Index on creation order * H5_INDEX_N_F - Number of indices defined - * order - Order within field or index; Possible values are: + * order - Order within field or index; Possible values are: * H5_ITER_UNKNOWN_F - Unknown order * H5_ITER_INC_F - Increasing order * H5_ITER_DEC_F - Decreasing order * H5_ITER_NATIVE_F - No particular order, whatever is fastest * H5_ITER_N_F - Number of iteration orders - * n - Link for which to retrieve information - * lapl_id - Link access property list + * n - Link for which to retrieve information + * lapl_id - Link access property list * * OUTPUTS * N/A * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -376,28 +376,28 @@ done: /****if* H5Lf/h5lexists_c * NAME - * h5lexists_c + * h5lexists_c * PURPOSE - * Calls H5Lexists + * Calls H5Lexists * INPUTS * - * loc_id - Identifier of the file or group to query. - * name - Link name to check - * lapl_id - Link access property list identifier. + * loc_id - Identifier of the file or group to query. + * name - Link name to check + * lapl_id - Link access property list identifier. * OUTPUTS * - * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. + * link_exists_c - returns a positive value, for TRUE, or 0 (zero), for FALSE. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 29, 2008 + * February 29, 2008 * HISTORY * * SOURCE */ int_f -nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) +h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -423,40 +423,40 @@ done: /****if* H5Lf/h5lget_info_c * NAME - * h5lget_info_c + * h5lget_info_c * PURPOSE - * Call H5Lget_info + * Call H5Lget_info * INPUTS * * link_loc_id - File or group identifier. - * link_name - Name of the link for which information is being sought - * link_namelen - Name length - * lapl_id - Link access property list + * link_name - Name of the link for which information is being sought + * link_namelen - Name length + * lapl_id - Link access property list * OUTPUTS * * - * cset - indicates the character set used for link’s name. - * corder - specifies the link’s creation order position. - * corder_valid - indicates whether the value in corder is valid. - * link_type - specifies the link class: + * cset - indicates the character set used for link’s name. + * corder - specifies the link’s creation order position. + * corder_valid - indicates whether the value in corder is valid. + * link_type - specifies the link class: * H5L_LINK_HARD_F - Hard link * H5L_LINK_SOFT_F - Soft link * H5L_LINK_EXTERNAL_F - External link * H5L_LINK_ERROR_F - Error - * address - If the link is a hard link, address specifies the file address that the link points to - * val_size - If the link is a symbolic link, val_size will be the length of the link value + * address - If the link is a hard link, address specifies the file address that the link points to + * val_size - If the link is a symbolic link, val_size will be the length of the link value * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) @@ -496,36 +496,36 @@ done: /****if* H5Lf/h5lget_info_by_idx_c * NAME - * h5lget_info_by_idx_c + * h5lget_info_by_idx_c * PURPOSE - * Call H5Lget_info_by_idx + * Call H5Lget_info_by_idx * INPUTS * * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - *group_namelen - Name length + * group_name - Name of subject group + * group_namelen - Name length * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * lapl_id - Link access property list + * order - Order within field or index + * n - Link for which to retrieve information + * lapl_id - Link access property list * OUTPUTS * - * corder_valid - Indicates whether the the creation order data is valid for this attribute - * corder - Is a positive integer containing the creation order of the attribute - * cset - Indicates the character set used for the attribute’s name - * data_size - indicates the size, in the number of characters, of the attribute + * corder_valid - Indicates whether the the creation order data is valid for this attribute + * corder - Is a positive integer containing the creation order of the attribute + * cset - Indicates the character set used for the attribute’s name + * data_size - indicates the size, in the number of characters, of the attribute * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) /******/ @@ -570,7 +570,7 @@ done: * NAME * H5Lis_registered_c * PURPOSE - * Call H5Lis_registered + * Call H5Lis_registered * INPUTS * * link_cls_id - User-defined link class identifier @@ -578,17 +578,17 @@ done: * NONE * * RETURNS - * Returns a positive value if the link class has been registered - * and zero if it is unregistered. Otherwise returns a negative value + * Returns a positive value if the link class has been registered + * and zero if it is unregistered. Otherwise returns a negative value * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * N/A * SOURCE */ int_f -nh5lis_registered_c(int_f *link_cls_id) +h5lis_registered_c(int_f *link_cls_id) /******/ { int_f ret_value; /* Return value */ @@ -621,29 +621,29 @@ nh5lis_registered_c(int_f *link_cls_id) /****if* H5Lf/h5lmove_c * NAME - * h5lmove_c + * h5lmove_c * PURPOSE - * Call H5Lmove + * Call H5Lmove * INPUTS * - * src_loc_id - Original file or group identifier. - * src_name - Original link name. - * src_namelen - name length - * dest_loc_id - Destination file or group identifier. - * dest_name - NEW link name. - * dest_namelen - name length + * src_loc_id - Original file or group identifier. + * src_name - Original link name. + * src_namelen - name length + * dest_loc_id - Destination file or group identifier. + * dest_name - NEW link name. + * dest_namelen - name length * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * SOURCE */ int_f -nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -682,17 +682,17 @@ done: * Call H5Lget_name_by_idx * INPUTS * - * loc_id - File or group identifier specifying location of subject group - * group_name - Name of subject group - * index_field - Index or field which determines the order - * order - Order within field or index - * n - Link for which to retrieve information - * size - Maximum number of characters of link value to be returned. - * lapl_id - Link access property list + * loc_id - File or group identifier specifying location of subject group + * group_name - Name of subject group + * index_field - Index or field which determines the order + * order - Order within field or index + * n - Link for which to retrieve information + * size - Maximum number of characters of link value to be returned. + * lapl_id - Link access property list * OUTPUTS * - * name - Buffer in which link value is returned - * size - The size of the link name on success + * name - Buffer in which link value is returned + * size - The size of the link name on success * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -701,7 +701,7 @@ done: * SOURCE */ int_f -nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ @@ -774,7 +774,7 @@ done: /* * SOURCE */ /* *\/ */ /* int_f */ -/* nh5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ +/* h5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ /* size_t_f *size, _fcd linkval_buff, */ /* hid_t_f *lapl_id) */ /* { */ @@ -842,7 +842,7 @@ done: /* int_f */ -/* nh5lregistered_c(int_f *version, int_f *class_id, */ +/* h5lregistered_c(int_f *version, int_f *class_id, */ /* _fcd comment, size_t_f *comment_len, */ /* _fcd create_func, size_t_f *create_func_len, */ /* _fcd move_func, size_t_f *move_func_len, */ @@ -916,29 +916,29 @@ done: /****if* H5Lf/h5lget_val_c * NAME - * h5lget_val_c + * h5lget_val_c * PURPOSE - * Call H5Lget_val + * Call H5Lget_val * INPUTS * - * link_loc_id - File or group identifier. - * link_name - Link whose value is to be returned. - * link_name_len - length of link_name - * size - Maximum number of characters of link value to be returned. - * lapl_id - List access property list identifier + * link_loc_id - File or group identifier. + * link_name - Link whose value is to be returned. + * link_name_len - length of link_name + * size - Maximum number of characters of link value to be returned. + * lapl_id - List access property list identifier * OUTPUTS * - * linkval_buff - The buffer to hold the returned link value. + * linkval_buff - The buffer to hold the returned link value. * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 11, 2008 + * April 11, 2008 * SOURCE */ int_f -nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) /******/ { @@ -971,16 +971,16 @@ done: * Calls H5Literate * INPUTS * - * group_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * group_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -1018,19 +1018,19 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, * Call H5Literate_by_name * INPUTS * - * loc_id - Identifier specifying subject group - * name - Name of subject group - * namelen - Name length - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link - * lapl_id - List access property list identifier + * loc_id - Identifier specifying subject group + * name - Name of subject group + * namelen - Name length + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link + * lapl_id - List access property list identifier * * OUTPUTS * - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 new file mode 100644 index 0000000..bc91072 --- /dev/null +++ b/fortran/src/H5Lff.F90 @@ -0,0 +1,1478 @@ +!****h* ROBODoc/H5L +! +! NAME +! MODULE H5L +! +! PURPOSE +! This file contains Fortran interfaces for H5L 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5L 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 H5L + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT + USE H5GLOBAL + + IMPLICIT NONE + +!****t* H5L (F03)/h5l_info_t +! +! Fortran2003 Derived Type: +! + TYPE, bind(c) :: union_t + INTEGER(haddr_t) :: address + INTEGER(size_t) :: val_size + END TYPE union_t + + TYPE, bind(c) :: h5l_info_t + INTEGER(c_int) :: type ! H5L_type_t type +! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + INTEGER(c_int64_t) :: corder ! int64_t corder; + INTEGER(c_int) :: cset ! H5T_cset_t cset; + TYPE(union_t) :: u + END TYPE h5l_info_t + +!***** + +!type specifies the link class. Valid values include the following: +! H5L_TYPE_HARD Hard link +! H5L_TYPE_SOFT Soft link +! H5L_TYPE_EXTERNAL External link +! H5L_TYPE_ERROR Error +!cset specifies the character set in which the link name is encoded. Valid values include the following: +! H5T_CSET_ASCII US ASCII +! H5T_CSET_UTF8 UTF-8 Unicode encoding + +CONTAINS + +! +!****s* H5L/h5lcopy_f +! +! NAME +! h5lcopy_f +! +! PURPOSE +! Copies a link from one location to another. +! +! INPUTS +! src_loc_id - Location identifier of the source link +! src_name - Name of the link to be copied +! dest_loc_id - Location identifier specifying the destination of the copy +! dest_name - Name to be assigned to the NEW copy +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & + lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTERFACE + INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) BIND(C,name='h5lcopy_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + END FUNCTION h5lcopy_c + END INTERFACE + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcopy_f + +! +!****s* H5L/h5ldelete_f +! +! NAME +! h5ldelete_f +! +! PURPOSE +! Removes a link from a group. +! +! INPUTS +! loc_id - Identifier of the file or group containing the object +! name - Name of the link to delete +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! SOURCE + SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) BIND(C,name='h5ldelete_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + END FUNCTION h5ldelete_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) + + END SUBROUTINE h5ldelete_f + +! +!****s* H5L/H5Lcreate_soft_f +! +! NAME +! H5Lcreate_soft_f +! +! PURPOSE +! Creates a soft link to an object. +! +! INPUTS +! target_path - Path to the target object, which is not required to exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: target_path_len + INTEGER(SIZE_T) :: link_name_len + + INTERFACE + INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & + link_loc_id, & + link_name,link_name_len, & + lcpl_id_default, lapl_id_default ) BIND(C,NAME='h5lcreate_soft_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: target_path + INTEGER(SIZE_T) :: target_path_len + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: link_name_len + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_soft_c + END INTERFACE + + target_path_len = LEN(target_path) + link_name_len = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_soft_c(target_path, target_path_len,& + link_loc_id, & + link_name, link_name_len, & + lcpl_id_default, lapl_id_default ) + + END SUBROUTINE h5lcreate_soft_f + +! +!****s* H5L/H5Lcreate_hard_f +! +! NAME +! H5Lcreate_hard_f +! +! PURPOSE +! Creates a hard link to an object. +! +! INPUTS +! +! obj_loc_id - The file or group identifier for the target object. +! obj_name - Name of the target object, which must already exist. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! +! SOURCE + SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_hard_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_hard_c + END INTERFACE + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_hard_f + +! +!****s* H5L/H5Lcreate_external_f +! +! NAME +! H5Lcreate_external_f +! +! PURPOSE +! Creates a soft link to an object in a different file. +! +! INPUTS +! +! file_name - Name of the file containing the target object. Neither the file nor the target object is +! required to exist. May be the file the link is being created in. +! obj_name - Path within the target file to the target object. +! link_loc_id - The file or group identifier for the new link. +! link_name - The name of the new link. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 27, 2008 +! SOURCE + SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither + ! the file nor the target object is required to exist. + ! May be the file the link is being created in. + CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_external_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: file_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_external_c + END INTERFACE + file_namelen = LEN(file_name) + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lcreate_external_f + +! +!****s* H5L/h5ldelete_by_idx_f +! +! NAME +! h5ldelete_by_idx_f +! +! PURPOSE +! Removes the nth link in a group. +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Type of index; Possible values are: +! H5_INDEX_UNKNOWN_F = -1 - Unknown index type +! H5_INDEX_NAME_F - Index on names +! H5_INDEX_CRT_ORDER_F - Index on creation order +! H5_INDEX_N_F - Number of indices defined +! +! order - Order within field or index; Possible values are: +! H5_ITER_UNKNOWN_F - Unknown order +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - No particular order, whatever is fastest +! H5_ITER_N_F - Number of iteration orders +! +! n - Link for which to retrieve information +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! SOURCE + SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, + ! from which attribute is to be removed + INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) & + BIND(C,NAME='h5ldelete_by_idx_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + END FUNCTION h5ldelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + group_namelen = LEN(group_name) + hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) + + END SUBROUTINE h5ldelete_by_idx_f + +! +!****s* H5L/H5Lexists_f +! +! NAME +! H5Lexists_f +! +! PURPOSE +! Check if a link with a particular name exists in a group. +! +! INPUTS +! loc_id - Identifier of the file or group to query. +! name - Link name to check +! +! OUTPUTS +! link_exists - link exists status (.TRUE.,.FALSE.) +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. + CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. + LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + ! Link access property list identifier. +!***** + INTEGER :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) & + BIND(C,NAME='h5lexists_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lexists_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) + + link_exists = .FALSE. + IF(link_exists_c.GT.0) link_exists = .TRUE. + + END SUBROUTINE h5lexists_f + +! +!****s* H5L/h5lget_info_f +! +! NAME +! h5lget_info_f +! +! PURPOSE +! Returns information about a link. +! +! INPUTS +! link_loc_id - File or group identifier. +! link_name - Name of the link for which information is being sought +! +! OUTPUTS +! NOTE: In C these are contained in the structure H5L_info_t +! +! cset - indicates the character set used for link’s name. +! corder - specifies the link’s creation order position. +! corder_valid - indicates whether the value in corder is valid. +! link_type - specifies the link class: +! H5L_TYPE_HARD_F - Hard link +! H5L_TYPE_SOFT_F - Soft link +! H5L_TYPE_EXTERNAL_F - External link +! H5L_TYPE_ERROR_ F - Error +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_f(link_loc_id, link_name, & + cset, corder, f_corder_valid, link_type, address, val_size, & + hdferr, lapl_id) + IMPLICIT NONE + + INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought + +! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. + INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, address, val_size, & + lapl_id_default) BIND(C,NAME='h5lget_info_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: link_type + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: link_namelen + INTEGER :: corder_valid + END FUNCTION h5lget_info_c + END INTERFACE + + link_namelen = LEN(link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, & + address, val_size, & + lapl_id_default) + + f_corder_valid =.FALSE. + IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_f + +! +!****s* H5L/h5lget_info_by_idx_f +! +! NAME +! h5lget_info_by_idx_f +! +! PURPOSE +! Retrieves metadata for a link in a group, according to the order within a field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! NOTE: In C these are defined as a structure: H5L_info_t +! corder_valid - Indicates whether the creation order data is valid for this attribute +! corder - Is a positive integer containing the creation order of the attribute +! cset - Indicates the character set used for the attribute’s name +! address - If the link is a hard link, address specifies the file address that the link points to +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! HISTORY +! Changed the link_type names to match those in C (bug 1720) from, +! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F +! to +! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F +! MSB January 8, 2010. +! +! SOURCE + SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: + ! H5L_TYPE_HARD_F - Hard link + ! H5L_TYPE_SOFT_F - Soft link + ! H5L_TYPE_EXTERNAL_F - External link + ! H5L_TYPE_ERROR _F - Error + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute + INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) & + BIND(C,NAME='h5lget_info_by_idx_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: link_type + INTEGER :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_info_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + END SUBROUTINE h5lget_info_by_idx_f + +! +!****s* H5L/h5lis_registered_f +! +! NAME +! h5lis_registered_f +! +! PURPOSE +! Determines whether a class of user-defined links is registered. +! +! INPUTS +! link_cls_id - User-defined link class identifier +! +! OUTPUTS +! registered - .TRUE. - if the link class has been registered +! .FALSE. - if it is unregistered +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 29, 2008 +! +! SOURCE + SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and + ! .FALSE. - if it is unregistered + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') + IMPLICIT NONE + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + END FUNCTION h5lis_registered_c + END INTERFACE + + hdferr = h5lis_registered_c(link_cls_id) + + IF(hdferr.GT.0)THEN + registered = .TRUE. + ELSE IF(hdferr.EQ.0)THEN + registered = .FALSE. + ENDIF + + END SUBROUTINE h5lis_registered_f + +! +!****s* H5L/h5lmove_f +! +! NAME +! h5lmove_f +! +! PURPOSE +! Renames a link within an HDF5 file. +! +! INPUTS +! src_loc_id - Original file or group identifier. +! src_name - Original link name. +! dest_loc_id - Destination file or group identifier. +! dest_name - NEW link name. +! +! OUTPUTS +! hdferr - Error code: +! 0 on success and -1 on failure +! +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. +! lapl_id - Link access property list identifier to be associated WITH the NEW link. +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! SOURCE + SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. + INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. + CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier + ! to be associated WITH the NEW link. + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier + ! to be associated WITH the NEW link. +!***** + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lmove_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_loc_id + + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(SIZE_T) :: src_namelen + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lmove_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5lmove_f + +! +!****s* H5L/h5lget_name_by_idx_f +! +! NAME +! h5lget_name_by_idx_f +! +! PURPOSE +! Retrieves name of the nth link in a group, according to the order within a specified field or index. +! +! INPUTS +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_field - Index or field which determines the order +! order - Order within field or index +! n - Link for which to retrieve information +! +! OUTPUTS +! name - Buffer in which link value is returned +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! lapl_id - List access property list identifier. +! size - Maximum number of characters of link value to be returned. +! +! AUTHOR +! M. Scot Breitenfeld +! March 10, 2008 +! +! SOURCE + SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & + name, hdferr, size, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group + INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order + ! H5_INDEX_UNKNOWN_F - Unknown index type + ! H5_INDEX_NAME_F - Index on names + ! H5_INDEX_CRT_ORDER_F - Index on creation order + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: + ! H5_ITER_UNKNOWN_F - Unknown order + ! H5_ITER_INC_F - Increasing order + ! H5_ITER_DEC_F - Decreasing order + ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) BIND(C,NAME='h5lget_name_by_idx_c') + IMPORT :: c_char + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) :: group_namelen + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(SIZE_T) :: size_default + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_name_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5lget_name_by_idx_f + + +! HAS PROBLEM WITH void pointer in C +!!$! +!!$!****s* H5L/ +!!$! +!!$! NAME +!!$! h5lget_val_by_idx_f +!!$! +!!$! PURPOSE +!!$! Returns the link value of a link, according to the order of +!!$! an index. For symbolic links, this is the path to which the +!!$! link points, including the null terminator. For user-defined +!!$! links, it is the link buffer. +!!$! INPUTS +!!$! loc_id - File or group identifier specifying location of subject group +!!$! group_name - Name of subject group +!!$! index_field - Index or field which determines the order +!!$! order - Order within field or index +!!$! n - Link for which to retrieve information +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t +!!$! corder_valid - indicates whether the creation order data is valid for this attribute +!!$! corder - is a positive integer containing the creation order of the attribute +!!$! cset - indicates the character set used for the attribute’s name +!!$! data_size - indicates the size, in the number of characters, of the attribute +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & +!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group +!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group +!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order +!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type +!!$ ! H5_INDEX_NAME_F - Index on names +!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order +!!$ ! H5_INDEX_N_F - Number of indices defined +!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: +!!$ ! H5_ITER_UNKNOWN_F - Unknown order +!!$ ! H5_ITER_INC_F - Increasing order +!!$ ! H5_ITER_DEC_F - Decreasing order +!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index +!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute +!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute +!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: corder_valid +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name +!!$ INTEGER(SIZE_T) :: group_namelen +!!$ INTEGER, INTENT(IN) :: index_field +!!$ INTEGER, INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ INTEGER :: corder_valid +!!$ INTEGER, INTENT(OUT) :: corder +!!$ INTEGER, INTENT(OUT) :: cset +!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION h5lget_val_by_idx_c +!!$ END INTERFACE +!!$ +!!$ group_namelen = LEN(group_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ +!!$ f_corder_valid =.FALSE. +!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. +!!$ +!!$ END SUBROUTINE h5lget_val_by_idx_f + +!!$! +!!$!****s* H5L/h5lget_val_f +!!$! +!!$! NAME +!!$! h5lget_val_f +!!$! +!!$! PURPOSE +!!$! Returns the value of a symbolic link. +!!$! +!!$! INPUTS +!!$! link_loc_id - File or group identifier. +!!$! link_name - Link whose value is to be returned. +!!$! size - Maximum number of characters of link value to be returned. +!!$! +!!$! OUTPUTS +!!$! linkval_buff - The buffer to hold the returned link value. +!!$! hdferr - error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! lapl_id - List access property list identifier. +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! March 3, 2008 +!!$! SOURCE +!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & +!!$ hdferr, lapl_id) +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER :: corder_valid +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c +!!$ !DEC$ENDIF +!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name ! Link whose value is to be returned. +!!$ INTEGER :: link_namelen +!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. +!!$ +!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. +!!$ +!!$ INTEGER :: link_namelen +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$ END FUNCTION h5lget_val_c +!!$ END INTERFACE +!!$ +!!$ link_namelen = LEN(link_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ +!!$ END SUBROUTINE h5lget_val_f + +!!$! +!!$!****s* H5L/H5Lregistered_f +!!$! +!!$! NAME +!!$! H5Lregistered_f +!!$! +!!$! PURPOSE +!!$! Registers user-defined link class or changes behavior of existing class. +!!$! +!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: +!!$! version - Version number of this struct +!!$! class_id - Link class identifier +!!$! comment - Comment for debugging +!!$! create_func - Callback during link creation +!!$! move_func - Callback after moving link +!!$! copy_func - Callback after copying link +!!$! trav_func - The main traversal function +!!$! del_func - Callback for link deletion +!!$! query_func - Callback for queries +!!$! +!!$! OUTPUTS +!!$! hdferr - Error code +!!$! Success: 0 +!!$! Failure: -1 +!!$! OPTIONAL PARAMETERS +!!$! None +!!$! +!!$! AUTHOR +!!$! M. Scot Breitenfeld +!!$! February 29, 2008 +!!$! +!!$! HISTORY N/A +!!$! +!!$! +!!$! SOURCE +!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & +!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) +!!$ IMPLICIT NONE +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func,query_func_len) +!!$ USE H5GLOBAL +!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) +!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c +!!$ !DEC$ENDIF +!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct +!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment ! Comment for debugging +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: create_func ! Callback during link creation +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: move_func ! Callback after moving link +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: copy_func ! Callback after copying link +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: trav_func ! The main traversal function +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: del_func ! Callback for link deletion +!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: query_func ! Callback for queries +!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: +!!$ ! 0 on success and -1 on failure +!!$ INTEGER :: comment_len +!!$ INTEGER :: create_func_len +!!$ INTEGER :: move_func_len +!!$ INTEGER :: copy_func_len +!!$ INTEGER :: trav_func_len +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ END FUNCTION H5Lregistered_c +!!$ END INTERFACE +!!$ +!!$ comment_len = LEN(comment) +!!$ create_func_len = LEN(create_func) +!!$ move_func_len = LEN(move_func) +!!$ copy_func_len = LEN(copy_func) +!!$ trav_func_len = LEN(trav_func) +!!$ del_func_len = LEN(del_func) +!!$ query_func_len = LEN(query_func) +!!$ +!!$ hdferr = H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func, query_func_len) +!!$ +!!$ END SUBROUTINE H5Lregistered_f + +!****s* H5L (F03)/h5literate_f +! +! NAME +! h5literate_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! group_id - Identifier specifying subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! July 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: group_id + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & + BIND(C, NAME='h5literate_c') + IMPORT :: c_ptr, c_funptr + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5literate_c + END INTERFACE + + return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_f + +!****s* H5L (F03)/h5literate_by_name_f +! +! NAME +! h5literate_by_name_f +! +! PURPOSE +! Iterates through links in a group. +! +! Inputs: +! loc_id - File or group identifier specifying location of subject group +! group_name - Name of subject group +! index_type - Type of index which determines the order: +! H5_INDEX_NAME_F - Alpha-numeric index on name +! H5_INDEX_CRT_ORDER_F - Index on creation order +! order - Order within index: +! H5_ITER_INC_F - Increasing order +! H5_ITER_DEC_F - Decreasing order +! H5_ITER_NATIVE_F - Fastest available order +! idx - IN: Iteration position at which to start +! op - Callback function passing data regarding the link to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the link +! +! Outputs: +! idx - OUT: Position at which an interrupted iteration may be restarted +! return_value - Success: The return value of the first operator that +! returns non-zero, or zero if all members were +! processed with no operator returning non-zero. +! +! Failure: Negative if something goes wrong within the +! library, or the negative value returned by one +! of the operators. +! +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 18, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & + idx, op, op_data, return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& + idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + END FUNCTION + END INTERFACE + + namelen = LEN(group_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_by_name_f + +END MODULE H5L diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 deleted file mode 100644 index 4660e52..0000000 --- a/fortran/src/H5Lff.f90 +++ /dev/null @@ -1,1300 +0,0 @@ -!****h* ROBODoc/H5L -! -! NAME -! MODULE H5L -! -! PURPOSE -! This file contains Fortran interfaces for H5L functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 H5L 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 H5L - - USE H5GLOBAL - -CONTAINS - -! -!****s* H5L/h5lcopy_f -! -! NAME -! h5lcopy_f -! -! PURPOSE -! Copies a link from one location to another. -! -! INPUTS -! src_loc_id - Location identifier of the source link -! src_name - Name of the link to be copied -! dest_loc_id - Location identifier specifying the destination of the copy -! dest_name - Name to be assigned to the NEW copy -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & - lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTERFACE - INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCOPY_C'::h5lcopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dest_name - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - END FUNCTION h5lcopy_c - END INTERFACE - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcopy_f - -! -!****s* H5L/h5ldelete_f -! -! NAME -! h5ldelete_f -! -! PURPOSE -! Removes a link from a group. -! -! INPUTS -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE - SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_C'::h5ldelete_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - END FUNCTION h5ldelete_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) - - END SUBROUTINE h5ldelete_f - -! -!****s* H5L/H5Lcreate_soft_f -! -! NAME -! H5Lcreate_soft_f -! -! PURPOSE -! Creates a soft link to an object. -! -! INPUTS -! target_path - Path to the target object, which is not required to exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: target_path_len - INTEGER(SIZE_T) :: link_name_len - - INTERFACE - INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & - link_loc_id, & - link_name,link_name_len, & - lcpl_id_default, lapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_SOFT_C'::h5lcreate_soft_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: target_path, link_name - CHARACTER(LEN=*), INTENT(IN) :: target_path - INTEGER(SIZE_T) :: target_path_len - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: link_name_len - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_soft_c - END INTERFACE - - target_path_len = LEN(target_path) - link_name_len = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_soft_c(target_path, target_path_len,& - link_loc_id, & - link_name, link_name_len, & - lcpl_id_default, lapl_id_default ) - - END SUBROUTINE h5lcreate_soft_f - -! -!****s* H5L/H5Lcreate_hard_f -! -! NAME -! H5Lcreate_hard_f -! -! PURPOSE -! Creates a hard link to an object. -! -! INPUTS -! -! obj_loc_id - The file or group identifier for the target object. -! obj_name - Name of the target object, which must already exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE - SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_HARD_C'::h5lcreate_hard_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, link_name - INTEGER(HID_T), INTENT(IN) :: obj_loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_hard_c - END INTERFACE - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_hard_f - -! -!****s* H5L/H5Lcreate_external_f -! -! NAME -! H5Lcreate_external_f -! -! PURPOSE -! Creates a soft link to an object in a different file. -! -! INPUTS -! -! file_name - Name of the file containing the target object. Neither the file nor the target object is -! required to exist. May be the file the link is being created in. -! obj_name - Path within the target file to the target object. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! SOURCE - SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither - ! the file nor the target object is required to exist. - ! May be the file the link is being created in. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_EXTERNAL_C'::h5lcreate_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: file_name, obj_name, link_name - CHARACTER(LEN=*), INTENT(IN) :: file_name - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_external_c - END INTERFACE - file_namelen = LEN(file_name) - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lcreate_external_f - -! -!****s* H5L/h5ldelete_by_idx_f -! -! NAME -! h5ldelete_by_idx_f -! -! PURPOSE -! Removes the nth link in a group. -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order within field or index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Link for which to retrieve information -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! SOURCE - SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_BY_IDX_C'::h5ldelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - END FUNCTION h5ldelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - group_namelen = LEN(group_name) - hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - - END SUBROUTINE h5ldelete_by_idx_f - -! -!****s* H5L/H5Lexists_f -! -! NAME -! H5Lexists_f -! -! PURPOSE -! Check if a link with a particular name exists in a group. -! -! INPUTS -! loc_id - Identifier of the file or group to query. -! name - Link name to check -! -! OUTPUTS -! link_exists - link exists status (.TRUE.,.FALSE.) -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. - CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. - LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id - ! Link access property list identifier. -!***** - INTEGER :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LEXISTS_C'::h5lexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lexists_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - - link_exists = .FALSE. - IF(link_exists_c.GT.0) link_exists = .TRUE. - - END SUBROUTINE h5lexists_f - -! -!****s* H5L/h5lget_info_f -! -! NAME -! h5lget_info_f -! -! PURPOSE -! Returns information about a link. -! -! INPUTS -! link_loc_id - File or group identifier. -! link_name - Name of the link for which information is being sought -! -! OUTPUTS -! NOTE: In C these are contained in the structure H5L_info_t -! -! cset - indicates the character set used for link’s name. -! corder - specifies the link’s creation order position. -! corder_valid - indicates whether the value in corder is valid. -! link_type - specifies the link class: -! H5L_TYPE_HARD_F - Hard link -! H5L_TYPE_SOFT_F - Soft link -! H5L_TYPE_EXTERNAL_F - External link -! H5L_TYPE_ERROR_ F - Error -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_f(link_loc_id, link_name, & - cset, corder, f_corder_valid, link_type, address, val_size, & - hdferr, lapl_id) - IMPLICIT NONE - - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought - -! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. - INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, address, val_size, & - lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_C'::h5lget_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: link_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: link_type - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: link_namelen - INTEGER :: corder_valid - END FUNCTION h5lget_info_c - END INTERFACE - - link_namelen = LEN(link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, & - address, val_size, & - lapl_id_default) - - f_corder_valid =.FALSE. - IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_f - -! -!****s* H5L/h5lget_info_by_idx_f -! -! NAME -! h5lget_info_by_idx_f -! -! PURPOSE -! Retrieves metadata for a link in a group, according to the order within a field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! NOTE: In C these are defined as a structure: H5L_info_t -! corder_valid - Indicates whether the creation order data is valid for this attribute -! corder - Is a positive integer containing the creation order of the attribute -! cset - Indicates the character set used for the attribute’s name -! address - If the link is a hard link, address specifies the file address that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE - SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_BY_IDX_C'::h5lget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER, INTENT(OUT) :: link_type - INTEGER :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_info_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - END SUBROUTINE h5lget_info_by_idx_f - -! -!****s* H5L/h5lis_registered_f -! -! NAME -! h5lis_registered_f -! -! PURPOSE -! Determines whether a class of user-defined links is registered. -! -! INPUTS -! link_cls_id - User-defined link class identifier -! -! OUTPUTS -! registered - .TRUE. - if the link class has been registered -! .FALSE. - if it is unregistered -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE - SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and - ! .FALSE. - if it is unregistered - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5lis_registered_c(link_cls_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LIS_REGISTERED_C'::h5lis_registered_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - END FUNCTION h5lis_registered_c - END INTERFACE - - hdferr = h5lis_registered_c(link_cls_id) - - IF(hdferr.GT.0)THEN - registered = .TRUE. - ELSE IF(hdferr.EQ.0)THEN - registered = .FALSE. - ENDIF - - END SUBROUTINE h5lis_registered_f - -! -!****s* H5L/h5lmove_f -! -! NAME -! h5lmove_f -! -! PURPOSE -! Renames a link within an HDF5 file. -! -! INPUTS -! src_loc_id - Original file or group identifier. -! src_name - Original link name. -! dest_loc_id - Destination file or group identifier. -! dest_name - NEW link name. -! -! OUTPUTS -! hdferr - Error code: -! 0 on success and -1 on failure -! -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. -! lapl_id - Link access property list identifier to be associated WITH the NEW link. -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! SOURCE - SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - ! to be associated WITH the NEW link. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - ! to be associated WITH the NEW link. -!***** - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LMOVE_C'::h5lmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(SIZE_T) :: src_namelen - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dest_name - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lmove_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5lmove_f - -! -!****s* H5L/h5lget_name_by_idx_f -! -! NAME -! h5lget_name_by_idx_f -! -! PURPOSE -! Retrieves name of the nth link in a group, according to the order within a specified field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! name - Buffer in which link value is returned -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - List access property list identifier. -! size - Maximum number of characters of link value to be returned. -! -! AUTHOR -! M. Scot Breitenfeld -! March 10, 2008 -! -! SOURCE - SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & - name, hdferr, size, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id - - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) :: group_namelen - INTEGER, INTENT(IN) :: index_field - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_name_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5lget_name_by_idx_f - - -! HAS PROBLEM WITH void pointer in C -!!$! -!!$!****s* H5L/ -!!$! -!!$! NAME -!!$! h5lget_val_by_idx_f -!!$! -!!$! PURPOSE -!!$! Returns the link value of a link, according to the order of -!!$! an index. For symbolic links, this is the path to which the -!!$! link points, including the null terminator. For user-defined -!!$! links, it is the link buffer. -!!$! INPUTS -!!$! loc_id - File or group identifier specifying location of subject group -!!$! group_name - Name of subject group -!!$! index_field - Index or field which determines the order -!!$! order - Order within field or index -!!$! n - Link for which to retrieve information -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t -!!$! corder_valid - indicates whether the creation order data is valid for this attribute -!!$! corder - is a positive integer containing the creation order of the attribute -!!$! cset - indicates the character set used for the attribute’s name -!!$! data_size - indicates the size, in the number of characters, of the attribute -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & -!!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group -!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order -!!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute -!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute -!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: corder_valid -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER, INTENT(IN) :: index_field -!!$ INTEGER, INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ INTEGER :: corder_valid -!!$ INTEGER, INTENT(OUT) :: corder -!!$ INTEGER, INTENT(OUT) :: cset -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION h5lget_val_by_idx_c -!!$ END INTERFACE -!!$ -!!$ group_namelen = LEN(group_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ -!!$ f_corder_valid =.FALSE. -!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. -!!$ -!!$ END SUBROUTINE h5lget_val_by_idx_f - -!!$! -!!$!****s* H5L/h5lget_val_f -!!$! -!!$! NAME -!!$! h5lget_val_f -!!$! -!!$! PURPOSE -!!$! Returns the value of a symbolic link. -!!$! -!!$! INPUTS -!!$! link_loc_id - File or group identifier. -!!$! link_name - Link whose value is to be returned. -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS -!!$! linkval_buff - The buffer to hold the returned link value. -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! SOURCE -!!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & -!!$ hdferr, lapl_id) -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER :: corder_valid -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c -!!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER :: link_namelen -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ END FUNCTION h5lget_val_c -!!$ END INTERFACE -!!$ -!!$ link_namelen = LEN(link_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ -!!$ END SUBROUTINE h5lget_val_f - -!!$! -!!$!****s* H5L/H5Lregistered_f -!!$! -!!$! NAME -!!$! H5Lregistered_f -!!$! -!!$! PURPOSE -!!$! Registers user-defined link class or changes behavior of existing class. -!!$! -!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: -!!$! version - Version number of this struct -!!$! class_id - Link class identifier -!!$! comment - Comment for debugging -!!$! create_func - Callback during link creation -!!$! move_func - Callback after moving link -!!$! copy_func - Callback after copying link -!!$! trav_func - The main traversal function -!!$! del_func - Callback for link deletion -!!$! query_func - Callback for queries -!!$! -!!$! OUTPUTS -!!$! hdferr - Error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! None -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! February 29, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE -!!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & -!!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) -!!$ IMPLICIT NONE -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func,query_func_len) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c -!!$ !DEC$ENDIF -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len -!!$ INTEGER :: move_func_len -!!$ INTEGER :: copy_func_len -!!$ INTEGER :: trav_func_len -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ END FUNCTION H5Lregistered_c -!!$ END INTERFACE -!!$ -!!$ comment_len = LEN(comment) -!!$ create_func_len = LEN(create_func) -!!$ move_func_len = LEN(move_func) -!!$ copy_func_len = LEN(copy_func) -!!$ trav_func_len = LEN(trav_func) -!!$ del_func_len = LEN(del_func) -!!$ query_func_len = LEN(query_func) -!!$ -!!$ hdferr = H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func, query_func_len) -!!$ -!!$ END SUBROUTINE H5Lregistered_f - -END MODULE H5L diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90 deleted file mode 100644 index fa95717..0000000 --- a/fortran/src/H5Lff_F03.f90 +++ /dev/null @@ -1,242 +0,0 @@ -!****h* ROBODoc/H5L (F03) -! -! NAME -! H5L_PROVISIONAL -! -! FILE -! src/fortran/src/H5Lff_F03.f90 -! -! PURPOSE -! -! This file contains Fortran 90 and Fortran 2003 interfaces for H5L functions. -! It contains the same functions as H5Lff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Lff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5A 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 H5L_PROVISIONAL - - USE H5GLOBAL - USE ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! - TYPE, bind(c) :: union_t - INTEGER(haddr_t) :: address - INTEGER(size_t) :: val_size - END TYPE union_t - - TYPE, bind(c) :: h5l_info_t - INTEGER(c_int) :: type ! H5L_type_t type -! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid - INTEGER(c_int64_t) :: corder ! int64_t corder; - INTEGER(c_int) :: cset ! H5T_cset_t cset; - TYPE(union_t) :: u - END TYPE h5l_info_t - -!***** - -!type specifies the link class. Valid values include the following: -! H5L_TYPE_HARD Hard link -! H5L_TYPE_SOFT Soft link -! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error -!cset specifies the character set in which the link name is encoded. Valid values include the following: -! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding - -CONTAINS - -!****s* H5L (F03)/h5literate_f -! -! NAME -! h5literate_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! group_id - Identifier specifying subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: group_id - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & - BIND(C, NAME='h5literate_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5literate_c - END INTERFACE - - return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_f - -!****s* H5L (F03)/h5literate_by_name_f -! -! NAME -! h5literate_by_name_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alpha-numeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 18, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & - idx, op, op_data, return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& - idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - END FUNCTION - END INTERFACE - - namelen = LEN(group_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_by_name_f - -END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90 deleted file mode 100644 index dd62b7b..0000000 --- a/fortran/src/H5Lff_F90.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* ROBODoc/H5L (F90) -! -! NAME -! MODULE H5L_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5L functions. It contains -! the same functions as H5Lff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Lff_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5L_PROVISIONAL - -END MODULE H5L_PROVISIONAL diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index ae344a5..4801f7d 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -1,6 +1,6 @@ /****h* H5Of/H5Of * PURPOSE - * This file contains C stubs for H5O Fortran APIs + * This file contains C stubs for H5O Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -109,12 +109,12 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * PURPOSE * Calls H5Olink * INPUTS - * object_id - Object to be linked. - * new_loc_id - File or group identifier specifying location at which object is to be linked. - * name - Name of link to be created, relative to new_loc_id. - * namelen - Length of buffer for link to be created. - * lcpl_id - Link creation property list identifier. - * lapl_id - Link access property list identifier. + * object_id - Object to be linked. + * new_loc_id - File or group identifier specifying location at which object is to be linked. + * name - Name of link to be created, relative to new_loc_id. + * namelen - Length of buffer for link to be created. + * lcpl_id - Link creation property list identifier. + * lapl_id - Link access property list identifier. * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -123,7 +123,7 @@ fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { * SOURCE */ int_f -nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -169,7 +169,7 @@ nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namele * SOURCE */ int_f -nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) +h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -194,20 +194,20 @@ nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid } /****if* H5Of/h5oclose_c * NAME - * h5oclose_c + * h5oclose_c * PURPOSE - * Call H5Oclose + * Call H5Oclose * INPUTS - * object_id - Object identifier + * object_id - Object identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * December 17, 2008 + * December 17, 2008 * SOURCE */ int_f -nh5oclose_c ( hid_t_f *object_id ) +h5oclose_c ( hid_t_f *object_id ) /******/ { int_f ret_value=0; /* Return value */ @@ -225,15 +225,15 @@ nh5oclose_c ( hid_t_f *object_id ) * PURPOSE * Calls H5Ovisit * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -266,20 +266,20 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, * Calls H5open_by_addr * INPUTS * loc_id - File or group identifier - * addr - Object’s address in the file + * addr - Object’s address in the file * * OUTPUTS * obj_id - Dataset identifier * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * September 14, 2009 * SOURCE */ int_f -nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) +h5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -458,7 +458,7 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info) * SOURCE */ int_f -nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ) /******/ @@ -499,15 +499,15 @@ nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, * PURPOSE * Calls H5Ovisit_by_name * INPUTS - * object_id - Identifier specifying subject group - * index_type - Type of index which determines the order - * order - Order within index - * idx - Iteration position at which to start - * op - Callback function passing data regarding the link to the calling application - * op_data - User-defined pointer to data required by the application for its processing of the link + * object_id - Identifier specifying subject group + * index_type - Type of index which determines the order + * order - Order within index + * idx - Iteration position at which to start + * op - Callback function passing data regarding the link to the calling application + * op_data - User-defined pointer to data required by the application for its processing of the link * * OUTPUTS - * idx - Position at which an interrupted iteration may be restarted + * idx - Position at which an interrupted iteration may be restarted * * RETURNS * >0 on success, 0< on failure @@ -560,7 +560,7 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f * SOURCE */ int_f -nh5odecr_refcount_c (hid_t_f *object_id) +h5odecr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -594,7 +594,7 @@ nh5odecr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) +h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -633,7 +633,7 @@ nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *la * SOURCE */ int_f -nh5oincr_refcount_c (hid_t_f *object_id) +h5oincr_refcount_c (hid_t_f *object_id) /******/ { int_f ret_value = 0; /* Return value */ @@ -665,7 +665,7 @@ nh5oincr_refcount_c (hid_t_f *object_id) * SOURCE */ int_f -nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) +h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -697,7 +697,7 @@ nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * INPUTS * object_id - Identifier of the target object. * name - Name of the object whose comment is to be set or reset, - * specified as a path relative to loc_id. + * specified as a path relative to loc_id. * namelen - Length of the name. * comment - The new comment. * commentlen - Length of the comment. @@ -710,7 +710,7 @@ nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen) * SOURCE */ int_f -nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) +h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -755,7 +755,7 @@ nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _f * n - Object to open. * lapl_id - Link access property list. * OUTPUTS - * obj_id - An object identifier for the opened object. + * obj_id - An object identifier for the opened object. * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -764,7 +764,7 @@ nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _f * SOURCE */ int_f -nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id) /******/ { @@ -813,7 +813,7 @@ nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * SOURCE */ int_f -nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) +h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize) /******/ { char *c_comment = NULL; /* Buffer to hold C string */ @@ -869,7 +869,7 @@ nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hss * SOURCE */ int_f -nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id) /******/ { diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 new file mode 100644 index 0000000..da940df --- /dev/null +++ b/fortran/src/H5Off.F90 @@ -0,0 +1,1149 @@ +!****h* ROBODoc/H5O +! +! NAME +! MODULE H5O +! +! FILE +! fortran/src/H5Off.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5O 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5O 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 H5O + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_LONG, C_INT, C_LOC + USE H5GLOBAL + IMPLICIT NONE + +!****t* H5T (F03)/h5o_info_t +! +! Fortran2003 Derived Type: +! + TYPE, BIND(C) :: space_t + INTEGER(hsize_t) :: total ! Total space for storing object header in file + INTEGER(hsize_t) :: meta ! Space within header for object header metadata information + INTEGER(hsize_t) :: mesg ! Space within header for actual message information + INTEGER(hsize_t) :: free ! Free space within object header + END TYPE space_t + + TYPE, BIND(C) :: mesg_t + INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header + END TYPE mesg_t + + TYPE, BIND(C) :: hdr_t + INTEGER :: version ! Version number of header format in file + INTEGER :: nmesgs ! Number of object header messages + INTEGER :: nchunks ! Number of object header chunks + INTEGER :: flags ! Object header status flags + TYPE(space_t) :: space + TYPE(mesg_t) :: mesg + END TYPE hdr_t + + ! Extra metadata storage for obj & attributes + TYPE, BIND(C) :: H5_ih_info_t + INTEGER(hsize_t) :: index_size ! btree and/or list + INTEGER(hsize_t) :: heap_size + END TYPE H5_ih_info_t + + TYPE, BIND(C) :: meta_size_t + TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets + TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes + ENDTYPE meta_size_t + + TYPE, BIND(C) :: h5o_info_t + INTEGER(C_LONG) :: fileno ! File number that object is located in + INTEGER(haddr_t) :: addr ! Object address in file + INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) + INTEGER :: rc ! Reference count of object + + INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- + INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array + INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran + INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) + + INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + + TYPE(hdr_t) :: hdr + + TYPE(meta_size_t) :: meta_size + END TYPE h5o_info_t + +!***** + +CONTAINS + +!****s* H5O/h5olink_f +! +! NAME +! h5olink_f +! +! PURPOSE +! Creates a hard link to an object in an HDF5 file. +! +! Inputs: +! object_id - Object to be linked. +! new_loc_id - File or group identifier specifying location at which object is to be linked. +! new_link_name - Name of link to be created, relative to new_loc_id. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lcpl_id - Link creation property list identifier. +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! April 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + INTEGER(HID_T) , INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + + INTEGER(SIZE_T) :: new_link_namelen + + INTERFACE + INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) BIND(C,NAME='h5olink_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: new_link_name + INTEGER(SIZE_T) :: new_link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + END FUNCTION h5olink_c + END INTERFACE + + new_link_namelen = LEN(new_link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + + END SUBROUTINE h5olink_f + +!****s* H5O/h5oopen_f +! +! NAME +! h5oopen_f +! +! PURPOSE +! Opens an object in an HDF5 file by location identifier and path name. +! +! Inputs: +! loc_id - File or group identifier. +! name - Path to the object, relative to loc_id. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Access property list identifier for the link pointing to the object. +! +! AUTHOR +! M. Scot Breitenfeld +! April 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) BIND(C,NAME='h5oopen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + + END SUBROUTINE h5oopen_f +! +!****s* H5O/h5oclose_f +! +! NAME +! h5oclose_f +! +! PURPOSE +! Closes an object in an HDF5 file. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! December 17, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5oclose_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oclose_c(object_id) BIND(C,NAME='h5oclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + END FUNCTION h5oclose_c + END INTERFACE + + hdferr = h5oclose_c(object_id) + END SUBROUTINE h5oclose_f + +! +!****s* H5O/h5open_by_addr_f +! NAME +! h5oopen_by_addr_f +! +! PURPOSE +! Opens an object using its address within an HDF5 file. +! +! Inputs: +! loc_id - File or group identifier. +! addr - Object’s address in the file. +! +! Outputs: +! obj_id - Object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! September 14, 2009 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) BIND(C,NAME='h5oopen_by_addr_c') + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_by_addr_c + END INTERFACE + + hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) + + END SUBROUTINE h5oopen_by_addr_f +! +!****s* H5O/h5ocopy_f +! NAME +! h5ocopy_f +! +! PURPOSE +! Copies an object in an HDF5 file. +! +! Inputs: +! src_loc_id - Object identifier indicating the location of the source object to be copied. +! src_name - Name of the source object to be copied. +! dst_loc_id - Location identifier specifying the destination. +! dst_name - Name to be assigned to the new copy. +! +! Optional parameters: +! ocpypl_id - Object copy property list. +! lcpl_id - Link creation property list for the new hard link. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 14, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id +!***** + + INTEGER(SIZE_T) :: src_name_len, dst_name_len + INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default + + INTERFACE + INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) & + BIND(C,NAME='h5ocopy_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(HID_T) , INTENT(IN) :: dst_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dst_name + INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default + INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default + INTEGER(SIZE_T) :: src_name_len, dst_name_len + + END FUNCTION h5ocopy_c + END INTERFACE + + src_name_len = LEN(src_name) + dst_name_len = LEN(dst_name) + + ocpypl_id_default = H5P_DEFAULT_F + IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + + END SUBROUTINE h5ocopy_f + +!****s* H5O/h5odecr_refcount_f +! NAME +! h5odecr_refcount_f +! +! PURPOSE +! Decrements an object reference count. +! +! Inputs: +! object_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5odecr_refcount_f(object_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5odecr_refcount_c(object_id) BIND(C,NAME='h5odecr_refcount_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + END FUNCTION h5odecr_refcount_c + END INTERFACE + + hdferr = h5odecr_refcount_c(object_id) + + END SUBROUTINE h5odecr_refcount_f + +!****s* H5O/h5oexists_by_name_f +! NAME +! h5oexists_by_name_f +! +! PURPOSE +! Determines whether a link resolves to an actual object. +! +! Inputs: +! loc_id - Identifier of the file or group to query. +! name - The name of the link to check. +! +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! Outputs: +! link_exists - Existing link resolves to an object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL , INTENT(OUT) :: link_exists + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + + INTEGER(size_t) :: namelen + INTEGER :: status + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) & + BIND(C,NAME='h5oexists_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + + END FUNCTION h5oexists_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) + + link_exists = .FALSE. + IF(status.EQ.1)THEN + link_exists = .TRUE. + ENDIF + + hdferr = 0 + IF(status.LT.0)THEN + hdferr = -1 + ENDIF + + END SUBROUTINE h5oexists_by_name_f + +!****s* H5O/h5oget_comment_f +! NAME +! h5oget_comment_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! obj_id - Identifier for the target object. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*) , INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(HSSIZE_T) :: bufsize_default + + INTERFACE + INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) & + BIND(C,NAME='h5oget_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize + END FUNCTION h5oget_comment_c + END INTERFACE + + commentsize_default = LEN(comment) + + hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_f + +!****s* H5O/h5oget_comment_by_name_f +! NAME +! h5oget_comment_by_name_f +! +! PURPOSE +! Retrieves comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be retrieved, +! specified as a path relative to loc_id. +! +! Optional parameters: +! bufsize - Size of the comment buffer. +! +! Outputs: +! comment - The comment. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 6, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: commentsize_default + INTEGER(SIZE_T) :: name_size + INTEGER(SIZE_T) :: bufsize_default + INTEGER(HID_T) :: lapl_id_default + INTERFACE + INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id) BIND(C,NAME='h5oget_comment_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: name_size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oget_comment_by_name_c + END INTERFACE + + commentsize_default = LEN(comment) + name_size = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + END SUBROUTINE h5oget_comment_by_name_f + +!****s* H5O/h5oincr_refcount_f +! NAME +! h5oincr_refcount_f +! +! PURPOSE +! Increments an object reference count. +! +! Inputs: +! obj_id - Object identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5oincr_refcount_c(obj_id) BIND(C,NAME='h5oincr_refcount_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + END FUNCTION h5oincr_refcount_c + END INTERFACE + + hdferr = h5oincr_refcount_c(obj_id) + + END SUBROUTINE h5oincr_refcount_f + +!****s* H5O/h5oopen_by_idx_f +! +! NAME +! h5oopen_by_idx_f +! +! PURPOSE +! Open the nth object in a group. +! +! Inputs: +! loc_id - A file or group identifier. +! group_name - Name of group, relative to loc_id, in which object is located. +! index_type - Type of index by which objects are ordered. +! order - Order of iteration within index, NOTE: zero-based. +! n - Object to open. +! +! Outputs: +! obj_id - An object identifier for the opened object. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! May 17, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & + hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) & + BIND(C,NAME='h5oopen_by_idx_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: group_namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + + END FUNCTION h5oopen_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + + END SUBROUTINE H5Oopen_by_idx_f + +!****s* H5O/h5oset_comment_f +! NAME +! h5oset_comment_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! obj_id - Identifier of the target object. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: commentlen + + INTERFACE + INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) BIND(C,NAME='h5oset_comment_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + + END FUNCTION h5oset_comment_c + END INTERFACE + + commentlen = LEN(comment) + + hdferr = h5oset_comment_c(obj_id, comment, commentlen) + + END SUBROUTINE h5oset_comment_f + +!****s* H5O/h5oset_comment_by_name_f +! NAME +! h5oset_comment_by_name_f +! +! PURPOSE +! Sets comment for specified object. +! +! Inputs: +! loc_id - Identifier of a file, group, dataset, or named datatype. +! name - Name of the object whose comment is to be set or reset, +! specified as a path relative to loc_id. +! comment - The new comment. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! May 15, 2012 +! +! Fortran90 Interface: + SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: commentlen + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) & + BIND(C,NAME='h5oset_comment_by_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oset_comment_by_name_c + END INTERFACE + + commentlen = LEN(comment) + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) + + END SUBROUTINE h5oset_comment_by_name_f + +!****s* H5O (F03)/h5ovisit_f_F03 +! +! NAME +! h5ovisit_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! object_id - Identifier of the object at which the recursive iteration begins. +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + + TYPE(C_FUNPTR):: op + TYPE(C_PTR) :: op_data + INTEGER, INTENT(OUT) :: return_value + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & + BIND(C, NAME='h5ovisit_c') + IMPORT :: C_FUNPTR, C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5ovisit_c + END INTERFACE + + return_value = h5ovisit_c(object_id, index_type, order, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_f + +!****s* H5O (F03)/h5oget_info_by_name_f_F03 +! +! NAME +! h5oget_info_by_name_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by location and relative name. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! name - Name of group, relative to loc_id. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. +! +! AUTHOR +! M. Scot Breitenfeld +! December 1, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & + BIND(C, NAME='h5oget_info_by_name_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR),VALUE :: object_info + + END FUNCTION h5oget_info_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + + hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_name_f + +!****s* H5O (F03)/h5oget_info_f_F03 +! +! NAME +! h5oget_info_f +! +! PURPOSE +! Retrieves the metadata for an object specified by an identifier. +! +! Inputs: +! object_id - Identifier for target object. +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr +!***** + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_c(object_id, object_info) & + BIND(C, NAME='h5oget_info_c') + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + TYPE(C_PTR), VALUE :: object_info + END FUNCTION h5oget_info_c + END INTERFACE + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_c(object_id, ptr) + + END SUBROUTINE H5Oget_info_f + +!****s* H5O (F03)/h5oget_info_by_idx_f_F03 +! +! NAME +! h5oget_info_by_idx_f +! +! PURPOSE +! Retrieves the metadata for an object, identifying the object by an index position. +! +! Inputs: +! loc_id - File or group identifier specifying location of group +! in which object is located. +! group_name - Name of group in which object is located. +! index_field - Index or field that determines the order. +! order - Order within field or index. +! n - Object for which information is to be returned +! +! Outputs: +! object_info - Buffer in which to return object information. +! hdferr - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! lapl_id - Link access property list. (Not currently used.) +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & + index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T, SIZE_T, HSIZE_T + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR), VALUE :: object_info + + END FUNCTION h5oget_info_by_idx_c + END INTERFACE + + namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) + + END SUBROUTINE H5Oget_info_by_idx_f + + +!****s* H5O (F03)/h5ovisit_by_name_f_F03 +! +! NAME +! h5ovisit_by_name_f +! +! PURPOSE +! Recursively visits all objects starting from a specified object. +! +! Inputs: +! loc_id - Identifier of a file or group. +! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration +! index_type - Type of index; valid values include: +! H5_INDEX_NAME_F +! H5_INDEX_CRT_ORDER_F +! order - Order in which index is traversed; valid values include: +! H5_ITER_DEC_F +! H5_ITER_INC_F +! H5_ITER_NATIVE_F +! op - Callback function passing data regarding the group to the calling application +! op_data - User-defined pointer to data required by the application for its processing of the group +! +! Outputs: +! return_value - Returns the return value of the first operator that returns a positive value, or +! zero if all members were processed with no operator returning non-zero. +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! lapl_id - Link access property list identifier. +! +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & + return_value, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: object_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + + TYPE(C_FUNPTR) :: op + TYPE(C_PTR) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') + IMPORT :: C_CHAR, C_PTR, C_FUNPTR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name + INTEGER(SIZE_T) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + TYPE(C_FUNPTR) , VALUE :: op + TYPE(C_PTR) , VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5ovisit_by_name_c + END INTERFACE + + namelen = LEN(object_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_by_name_f + +END MODULE H5O + diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 deleted file mode 100644 index 8a40079..0000000 --- a/fortran/src/H5Off.f90 +++ /dev/null @@ -1,775 +0,0 @@ -!****h* ROBODoc/H5O -! -! NAME -! MODULE H5O -! -! FILE -! fortran/src/H5Off.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5O functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5O 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 H5O - - USE H5GLOBAL - -CONTAINS - -!****s* H5O/h5olink_f -! -! NAME -! h5olink_f -! -! PURPOSE -! Creates a hard link to an object in an HDF5 file. -! -! Inputs: -! object_id - Object to be linked. -! new_loc_id - File or group identifier specifying location at which object is to be linked. -! new_link_name - Name of link to be created, relative to new_loc_id. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! April 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - INTEGER(HID_T) , INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - - INTEGER(SIZE_T) :: new_link_namelen - - INTERFACE - INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: new_link_name - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER(SIZE_T) :: new_link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - END FUNCTION h5olink_c - END INTERFACE - - new_link_namelen = LEN(new_link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - - END SUBROUTINE h5olink_f - -!****s* H5O/h5oopen_f -! -! NAME -! h5oopen_f -! -! PURPOSE -! Opens an object in an HDF5 file by location identifier and path name. -! -! Inputs: -! loc_id - File or group identifier. -! name - Path to the object, relative to loc_id. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Access property list identifier for the link pointing to the object. -! -! AUTHOR -! M. Scot Breitenfeld -! April 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - - END SUBROUTINE h5oopen_f -! -!****s* H5O/h5oclose_f -! -! NAME -! h5oclose_f -! -! PURPOSE -! Closes an object in an HDF5 file. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! December 17, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5oclose_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oclose_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - END FUNCTION h5oclose_c - END INTERFACE - - hdferr = h5oclose_c(object_id) - END SUBROUTINE h5oclose_f - -! -!****s* H5O/h5open_by_addr_f -! NAME -! h5oopen_by_addr_f -! -! PURPOSE -! Opens an object using its address within an HDF5 file. -! -! Inputs: -! loc_id - File or group identifier. -! addr - Object’s address in the file. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! September 14, 2009 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_by_addr_c - END INTERFACE - - hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) - - END SUBROUTINE h5oopen_by_addr_f -! -!****s* H5O/h5ocopy_f -! NAME -! h5ocopy_f -! -! PURPOSE -! Copies an object in an HDF5 file. -! -! Inputs: -! src_loc_id - Object identifier indicating the location of the source object to be copied. -! src_name - Name of the source object to be copied. -! dst_loc_id - Location identifier specifying the destination. -! dst_name - Name to be assigned to the new copy. -! -! Optional parameters: -! ocpypl_id - Object copy property list. -! lcpl_id - Link creation property list for the new hard link. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 14, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id -!***** - - INTEGER(SIZE_T) :: src_name_len, dst_name_len - INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default - - INTERFACE - INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dst_name - INTEGER(HID_T) , INTENT(IN) :: src_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(HID_T) , INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER(HID_T) , INTENT(IN) :: ocpypl_id_default - INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default - INTEGER(SIZE_T) :: src_name_len, dst_name_len - - END FUNCTION h5ocopy_c - END INTERFACE - - src_name_len = LEN(src_name) - dst_name_len = LEN(dst_name) - - ocpypl_id_default = H5P_DEFAULT_F - IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - - END SUBROUTINE h5ocopy_f - -!****s* H5O/h5odecr_refcount_f -! NAME -! h5odecr_refcount_f -! -! PURPOSE -! Decrements an object reference count. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5odecr_refcount_f(object_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5odecr_refcount_c(object_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: object_id - END FUNCTION h5odecr_refcount_c - END INTERFACE - - hdferr = h5odecr_refcount_c(object_id) - - END SUBROUTINE h5odecr_refcount_f - -!****s* H5O/h5oexists_by_name_f -! NAME -! h5oexists_by_name_f -! -! PURPOSE -! Determines whether a link resolves to an actual object. -! -! Inputs: -! loc_id - Identifier of the file or group to query. -! name - The name of the link to check. -! -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! Outputs: -! link_exists - Existing link resolves to an object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - LOGICAL , INTENT(OUT) :: link_exists - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - - INTEGER(size_t) :: namelen - INTEGER :: status - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - - END FUNCTION h5oexists_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) - - link_exists = .FALSE. - IF(status.EQ.1)THEN - link_exists = .TRUE. - ENDIF - - hdferr = 0 - IF(status.LT.0)THEN - hdferr = -1 - ENDIF - - END SUBROUTINE h5oexists_by_name_f - -!****s* H5O/h5oget_comment_f -! NAME -! h5oget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! obj_id - Identifier for the target object. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*) , INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(HSSIZE_T) :: bufsize_default - - INTERFACE - INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize - END FUNCTION h5oget_comment_c - END INTERFACE - - commentsize_default = LEN(comment) - - hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_f - -!****s* H5O/h5oget_comment_by_name_f -! NAME -! h5oget_comment_by_name_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be retrieved, -! specified as a path relative to loc_id. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 6, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: commentsize_default - INTEGER(SIZE_T) :: name_size - INTEGER(SIZE_T) :: bufsize_default - INTEGER(HID_T) :: lapl_id_default - INTERFACE - INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment, name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oget_comment_by_name_c - END INTERFACE - - commentsize_default = LEN(comment) - name_size = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - END SUBROUTINE h5oget_comment_by_name_f - -!****s* H5O/h5oincr_refcount_f -! NAME -! h5oincr_refcount_f -! -! PURPOSE -! Increments an object reference count. -! -! Inputs: -! obj_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5oincr_refcount_c(obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: obj_id - END FUNCTION h5oincr_refcount_c - END INTERFACE - - hdferr = h5oincr_refcount_c(obj_id) - - END SUBROUTINE h5oincr_refcount_f - -!****s* H5O/h5oopen_by_idx_f -! -! NAME -! h5oopen_by_idx_f -! -! PURPOSE -! Open the nth object in a group. -! -! Inputs: -! loc_id - A file or group identifier. -! group_name - Name of group, relative to loc_id, in which object is located. -! index_type - Type of index by which objects are ordered. -! order - Order of iteration within index, NOTE: zero-based. -! n - Object to open. -! -! Outputs: -! obj_id - An object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! May 17, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & - hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: group_namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - - END FUNCTION h5oopen_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - - END SUBROUTINE H5Oopen_by_idx_f - -!****s* H5O/h5oset_comment_f -! NAME -! h5oset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! obj_id - Identifier of the target object. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: commentlen - - INTERFACE - INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - - END FUNCTION h5oset_comment_c - END INTERFACE - - commentlen = LEN(comment) - - hdferr = h5oset_comment_c(obj_id, comment, commentlen) - - END SUBROUTINE h5oset_comment_f - -!****s* H5O/h5oset_comment_by_name_f -! NAME -! h5oset_comment_by_name_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be set or reset, -! specified as a path relative to loc_id. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: - SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: commentlen - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, comment - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oset_comment_by_name_c - END INTERFACE - - commentlen = LEN(comment) - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) - - END SUBROUTINE h5oset_comment_by_name_f - -END MODULE H5O - diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90 deleted file mode 100644 index 36b6246..0000000 --- a/fortran/src/H5Off_F03.f90 +++ /dev/null @@ -1,435 +0,0 @@ -!****h* ROBODoc/H5O (F03) -! -! NAME -! H5O_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5O functions. -! It contains the same functions as H5Off_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Off_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5P 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 H5O_PROVISIONAL - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5T (F03)/h5o_info_t -! -! Fortran2003 Derived Type: -! - TYPE, BIND(C) :: space_t - INTEGER(hsize_t) :: total ! Total space for storing object header in file - INTEGER(hsize_t) :: meta ! Space within header for object header metadata information - INTEGER(hsize_t) :: mesg ! Space within header for actual message information - INTEGER(hsize_t) :: free ! Free space within object header - END TYPE space_t - - TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header - INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header - END TYPE mesg_t - - TYPE, BIND(C) :: hdr_t - INTEGER :: version ! Version number of header format in file - INTEGER :: nmesgs ! Number of object header messages - INTEGER :: nchunks ! Number of object header chunks - INTEGER :: flags ! Object header status flags - TYPE(space_t) :: space - TYPE(mesg_t) :: mesg - END TYPE hdr_t - - ! Extra metadata storage for obj & attributes - TYPE, BIND(C) :: H5_ih_info_t - INTEGER(hsize_t) :: index_size ! btree and/or list - INTEGER(hsize_t) :: heap_size - END TYPE H5_ih_info_t - - TYPE, BIND(C) :: meta_size_t - TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets - TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes - ENDTYPE meta_size_t - - TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - INTEGER(haddr_t) :: addr ! Object address in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER :: rc ! Reference count of object - - INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- - INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array - INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran - INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) - - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object - - TYPE(hdr_t) :: hdr - - TYPE(meta_size_t) :: meta_size - END TYPE h5o_info_t - -!***** - -CONTAINS - -!****s* H5O (F03)/h5ovisit_f_F03 -! -! NAME -! h5ovisit_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! object_id - Identifier of the object at which the recursive iteration begins. -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - - TYPE(C_FUNPTR):: op - TYPE(C_PTR) :: op_data - INTEGER, INTENT(OUT) :: return_value - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & - BIND(C, NAME='h5ovisit_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5ovisit_c - END INTERFACE - - return_value = h5ovisit_c(object_id, index_type, order, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_f - -!****s* H5O (F03)/h5oget_info_by_name_f_F03 -! -! NAME -! h5oget_info_by_name_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by location and relative name. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! name - Name of group, relative to loc_id. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & - BIND(C, NAME='h5oget_info_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR),VALUE :: object_info - - END FUNCTION h5oget_info_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - - hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_name_f - -!****s* H5O (F03)/h5oget_info_f_F03 -! -! NAME -! h5oget_info_f -! -! PURPOSE -! Retrieves the metadata for an object specified by an identifier. -! -! Inputs: -! object_id - Identifier for target object. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr -!***** - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_c(object_id, object_info) & - BIND(C, NAME='h5oget_info_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: object_id - TYPE(C_PTR), VALUE :: object_info - END FUNCTION h5oget_info_c - END INTERFACE - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_c(object_id, ptr) - - END SUBROUTINE H5Oget_info_f - -!****s* H5O (F03)/h5oget_info_by_idx_f_F03 -! -! NAME -! h5oget_info_by_idx_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by an index position. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! group_name - Name of group in which object is located. -! index_field - Index or field that determines the order. -! order - Order within field or index. -! n - Object for which information is to be returned -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. (Not currently used.) -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & - index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR), VALUE :: object_info - - END FUNCTION h5oget_info_by_idx_c - END INTERFACE - - namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) - - END SUBROUTINE H5Oget_info_by_idx_f - - -!****s* H5O (F03)/h5ovisit_by_name_f_F03 -! -! NAME -! h5ovisit_by_name_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & - return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - - TYPE(C_FUNPTR) :: op - TYPE(C_PTR) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name - INTEGER(SIZE_T) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - TYPE(C_FUNPTR) , VALUE :: op - TYPE(C_PTR) , VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5ovisit_by_name_c - END INTERFACE - - namelen = LEN(object_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_by_name_f - -END MODULE H5O_PROVISIONAL - diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90 deleted file mode 100644 index 5688c5d..0000000 --- a/fortran/src/H5Off_F90.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* ROBODoc/H5O (F90) -! -! NAME -! MODULE H5O_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5O functions. It contains -! the same functions as H5Off_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Off_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5O_PROVISIONAL - -END MODULE H5O_PROVISIONAL diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index fe2f21a..9735f48 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1,6 +1,6 @@ /****h* H5Pf/H5Pf * PURPOSE - * This file contains C stubs for H5P Fortran APIs + * This file contains C stubs for H5P Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -23,18 +23,35 @@ #include "H5f90.h" #include "H5Eprivate.h" +#include "H5public.h" + +#ifdef H5_HAVE_PARALLEL + +#include +/* Support for C to Fortran translation in MPI */ +#ifndef H5_HAVE_MPI_MULTI_LANG_Comm +#define MPI_Comm_c2f(comm) (int_f)(comm) +#define MPI_Comm_f2c(comm) (MPI_Comm)(comm) +#endif /*MPI Comm*/ + +#ifndef H5_HAVE_MPI_MULTI_LANG_Info +#define MPI_Info_c2f(info) (int_f)(info) +#define MPI_Info_f2c(info) (MPI_Info)(info) +#endif /*MPI Info*/ + +#endif /*H5_HAVE_PARALLEL*/ /****if* H5Pf/h5pcreate_c * NAME - * h5pcreate_c + * h5pcreate_c * PURPOSE - * Call H5Pcreate to create a property list + * Call H5Pcreate to create a property list * INPUTS - * cls - property list class identifier + * cls - property list class identifier * OUTPUTS - * prp_id - identifier of the created property list + * prp_id - identifier of the created property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, October 9, 2002 @@ -43,7 +60,7 @@ */ int_f -nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) +h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ) /******/ { hid_t c_prp_id; @@ -61,22 +78,22 @@ done: /****if* H5Pf/h5pclose_c * NAME - * h5pclose_c + * h5pclose_c * PURPOSE - * Call H5Pclose to close property lis + * Call H5Pclose to close property lis * INPUTS - * prp_id - identifier of the property list to be closed + * prp_id - identifier of the property list to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ int_f -nh5pclose_c ( hid_t_f *prp_id ) +h5pclose_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -90,23 +107,23 @@ nh5pclose_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pcopy_c * NAME - * h5pcopy_c + * h5pcopy_c * PURPOSE - * Call H5Pcopy to copy property list + * Call H5Pcopy to copy property list * INPUTS - * prp_id - identifier of the property list to be copied + * prp_id - identifier of the property list to be copied * OUTPUTS - * new_prp_id - identifier of the new property list + * new_prp_id - identifier of the new property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * * SOURCE */ int_f -nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) +h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id) /******/ { hid_t c_new_prp_id; @@ -124,24 +141,24 @@ done: /****if* H5Pf/h5pequal_c * NAME - * h5pequal_c + * h5pequal_c * PURPOSE - * Call H5Pequal to check if two property lists are equal + * Call H5Pequal to check if two property lists are equal * INPUTS - * plist1_id - property list identifier - * plist2_id - property list identifier + * plist1_id - property list identifier + * plist2_id - property list identifier * OUTPUTS - * c_flag - flag to indicate that lists are eqaul + * c_flag - flag to indicate that lists are eqaul * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, September 30, 2002 + * Monday, September 30, 2002 * * SOURCE */ int_f -nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) +h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag) /******/ { htri_t c_c_flag; @@ -176,7 +193,7 @@ done: */ int_f -nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) +h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) /******/ { hid_t c_classtype; @@ -193,15 +210,15 @@ done: /****if* H5Pf/h5pset_preserve_c * NAME - * h5pset_preserve_c + * h5pset_preserve_c * PURPOSE - * Call H5Pset_preserve to set transfer property for compound - * datatype + * Call H5Pset_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier - * flag - TRUE/FALSE flag + * prp_id - property list identifier + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -209,7 +226,7 @@ done: */ int_f -nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) +h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -227,16 +244,16 @@ nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pget_preserve_c * NAME - * h5pget_preserve_c + * h5pget_preserve_c * PURPOSE - * Call H5Pget_preserve to set transfer property for compound - * datatype + * Call H5Pget_preserve to set transfer property for compound + * datatype * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -244,7 +261,7 @@ nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag) */ int_f -nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) +h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = 0; @@ -260,22 +277,22 @@ nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag) /****if* H5Pf/h5pset_deflate_c * NAME - * h5pset_deflate_c + * h5pset_deflate_c * PURPOSE - * Call H5Pset_deflate to set deflate level + * Call H5Pset_deflate to set deflate level * INPUTS - * prp_id - property list identifier - * level - level of deflation + * prp_id - property list identifier + * level - level of deflation * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * SOURCE */ int_f -nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level) +h5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /******/ { int ret_value = 0; @@ -294,24 +311,24 @@ nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level) /****if* H5Pf/h5pset_chunk_c * NAME - * h5pset_chunk_c + * h5pset_chunk_c * PURPOSE - * Call H5Pset_chunk to set the sizes of chunks for a chunked - * layout dataset + * Call H5Pset_chunk to set the sizes of chunks for a chunked + * layout dataset * INPUTS - * prp_id - property list identifier - * rank - number of dimensions of each chunk - * dims - array of the size of each chunk + * prp_id - property list identifier + * rank - number of dimensions of each chunk + * dims - array of the size of each chunk * RETURNS - * 0 on success, -1 on failure - * Saturday, August 14, 1999 + * 0 on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE */ int_f -nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) +h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -338,24 +355,24 @@ DONE: /****if* H5Pf/h5pget_chunk_c * NAME - * h5pget_chunk_c + * h5pget_chunk_c * PURPOSE - * Call H5Pget_chunk to get the sizes of chunks for a chunked - * layout dataset for at list max_rank number of dimensions + * Call H5Pget_chunk to get the sizes of chunks for a chunked + * layout dataset for at list max_rank number of dimensions * INPUTS - * prp_id - property list identifier - * max rank - maximum number of dimensions to return - * dims - array of the size of each chunk + * prp_id - property list identifier + * max rank - maximum number of dimensions to return + * dims - array of the size of each chunk * RETURNS - * number of chunk's dimnesion on success, -1 on failure - * Saturday, August 14, 1999 + * number of chunk's dimnesion on success, -1 on failure + * Saturday, August 14, 1999 * AUTHOR * Elena Pourmal * SOURCE */ int_f -nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) +h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) /******/ { int ret_value = -1; @@ -377,36 +394,6 @@ nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ) return ret_value; } -/****if* H5Pf/h5pset_fill_valuec_c - * NAME - * h5pset_fill_valuec_c - * PURPOSE - * Call h5pset_fill_value_c to a character fill value - * INPUTS - * prp_id - property list identifier - * type_id - datatype identifier (fill value is of type type_id) - * fillvalue - character value - * RETURNS - * 0 on success, -1 on failure - * Saturday, August 14, 1999 - * AUTHOR - * Elena Pourmal - * SOURCE -*/ -int_f -nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) -/******/ -{ - int ret_value = -1; - - /* - * Call h5pset_fill_value_c function. - */ - ret_value = h5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); - - return ret_value; -} - /****if* H5Pf/h5pset_fill_value_c * NAME * h5pset_fill_value_c @@ -444,68 +431,6 @@ h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } -int_f -nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -/******/ -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pset_fill_value_c function. - */ - return h5pset_fill_value_c(prp_id, type_id, fillvalue); -} - -/****if* H5Pf/h5pget_fill_valuec_c - * NAME - * h5pget_fill_valuec_c - * PURPOSE - * Call h5pget_fill_value_c to a character fill value - * INPUTS - * prp_id - property list identifier - * type_id - datatype identifier (fill value is of type type_id) - * fillvalue - character value - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Saturday, August 14, 1999 - * HISTORY - * Fixed wrong call to C wrapper, was nh5pset_fill_value_c, changed - * to nh5pget_fill_value_c. MSB - 7/21/2014 - * - * SOURCE -*/ -int_f -nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue) -/******/ -{ - int ret_value = -1; - - /* - * Call h5pget_fill_value_c function. - */ - ret_value = h5pget_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue)); - - return ret_value; -} - /****if* H5Pf/h5pget_fill_value_c * NAME * h5pget_fill_value_c @@ -543,57 +468,30 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) return ret_value; } -int_f -nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - -int_f -nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue) -{ - /* - * Call h5pget_fill_value_c function. - */ - return h5pget_fill_value_c(prp_id, type_id, fillvalue); -} - /****if* H5Pf/h5pget_version_c * NAME - * h5pget_version_c + * h5pget_version_c * PURPOSE - * Call H5Pget_version to get the version information - * of various objects for a file creation property list + * Call H5Pget_version to get the version information + * of various objects for a file creation property list * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * boot - array to put boot block version number - * freelist - array to put global freelist version number - * stab - array to put symbol table version number - * shhdr - array to put shared object header version number + * boot - array to put boot block version number + * freelist - array to put global freelist version number + * stab - array to put symbol table version number + * shhdr - array to put shared object header version number * 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 - * Removed extra length parameters EP 7/6/00 + * Removed extra length parameters EP 7/6/00 * SOURCE */ int_f -nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) +h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr) /******/ { int ret_value = -1; @@ -630,22 +528,22 @@ nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, /****if* H5Pf/h5pget_userblock_c * NAME - * h5pget_userblock_c + * h5pget_userblock_c * PURPOSE - * Call H5Pget_userblock to get the size of a user block in - * a file creation property list + * Call H5Pget_userblock to get the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * Outputs size - Size of the user-block in bytes + * prp_id - property list identifier + * Outputs size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f -nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -668,22 +566,22 @@ nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pset_userblock_c * NAME - * h5pset_userblock_c + * h5pset_userblock_c * PURPOSE - * Call H5Pset_userblock to set the size of a user block in - * a file creation property list + * Call H5Pset_userblock to set the size of a user block in + * a file creation property list * INPUTS - * prp_id - property list identifier - * size - Size of the user-block in bytes + * prp_id - property list identifier + * size - Size of the user-block in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, February 23, 2000 + * Wednesday, February 23, 2000 * SOURCE */ int_f -nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) +h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /******/ { int ret_value = -1; @@ -705,25 +603,25 @@ nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size) /****if* H5Pf/h5pget_sizes_c * NAME - * h5pget_sizes_c + * h5pget_sizes_c * PURPOSE - * Call H5Pget_sizes to get the size of the offsets - * and lengths used in an HDF5 file + * Call H5Pget_sizes to get the size of the offsets + * and lengths used in an HDF5 file * INPUTS - * prp_id - property list identifier - * Outputs sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * Outputs sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 - * Deleted extra length parameters. EP 6/7/00 + * Deleted extra length parameters. EP 6/7/00 * SOURCE */ int_f -nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -748,24 +646,24 @@ nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size /****if* H5Pf/h5pset_sizes_c * NAME - * h5pset_sizes_c + * h5pset_sizes_c * PURPOSE - * Call H5Pset_sizes to set the size of the offsets + * Call H5Pset_sizes to set the size of the offsets * INPUTS - * prp_id - property list identifier - * sizeof_addr - Size of an object offset in bytes - * sizeof_size - Size of an object length in bytes + * prp_id - property list identifier + * sizeof_addr - Size of an object offset in bytes + * sizeof_size - Size of an object length in bytes * 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 * * SOURCE */ int_f -nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) +h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size) /******/ { int ret_value = -1; @@ -788,23 +686,23 @@ nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size /****if* H5Pf/h5pset_sym_k_c * NAME - * h5pset_sym_k_c + * h5pset_sym_k_c * PURPOSE - * Call H5Pset_sym_k to set the size of parameters used - * to control the symbol table node + * Call H5Pset_sym_k to set the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank - * lk - Symbol table node size + * prp_id - property list identifier + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * SOURCE */ int_f -nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -828,26 +726,26 @@ nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pget_sym_k_c * NAME - * h5pget_sym_k_c + * h5pget_sym_k_c * PURPOSE - * Call H5Pget_sym_k to get the size of parameters used - * to control the symbol table node + * Call H5Pget_sym_k to get the size of parameters used + * to control the symbol table node * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank - * lk - Symbol table node size + * ik - Symbol table tree rank + * lk - Symbol table node size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) +h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /******/ { int ret_value = -1; @@ -870,24 +768,24 @@ nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk) /****if* H5Pf/h5pset_istore_k_c * NAME - * h5pset_istore_k_c + * h5pset_istore_k_c * PURPOSE - * Call H5Pset_istore_k to set the size of the parameter - * used to control the B-trees for indexing chunked datasets + * Call H5Pset_istore_k to set the size of the parameter + * used to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier - * ik - Symbol table tree rank + * prp_id - property list identifier + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) +h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -909,25 +807,25 @@ nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_istore_k_c * NAME - * h5pget_istore_k_c + * h5pget_istore_k_c * PURPOSE - * Call H5Pget_istore_k to get the size of parameters used - * to control the B-trees for indexing chunked datasets + * Call H5Pget_istore_k to get the size of parameters used + * to control the B-trees for indexing chunked datasets * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * ik - Symbol table tree rank + * ik - Symbol table tree rank * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) +h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /******/ { int ret_value = -1; @@ -948,24 +846,24 @@ nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik) /****if* H5Pf/h5pget_driver_c * NAME - * h5pget_driver_c + * h5pget_driver_c * PURPOSE - * Call H5Pget_driver to get low-level file driver identifier + * Call H5Pget_driver to get low-level file driver identifier * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * driver - low-level file driver identifier + * driver - low-level file driver identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) +h5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver) /******/ { int ret_value = -1; @@ -986,23 +884,23 @@ DONE: /****if* H5Pf/h5pset_fapl_stdio_c * NAME - * h5pset_fapl_stdio_c + * h5pset_fapl_stdio_c * PURPOSE - * Call H5Pset_stdio to set the low level file driver to - * use the functions declared in the stdio.h + * Call H5Pset_stdio to set the low level file driver to + * use the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 7, 2001 + * March 7, 2001 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_stdio_c (hid_t_f *prp_id) +h5pset_fapl_stdio_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -1020,26 +918,26 @@ nh5pset_fapl_stdio_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_stdio_c * NAME - * h5pget_fapl_stdio_c + * h5pget_fapl_stdio_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the stdio.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the stdio.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * io - value indicates whether the file driver uses - * the functions declared in the stdio.h + * io - value indicates whether the file driver uses + * the functions declared in the stdio.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) +h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /******/ { int ret_value = -1; @@ -1060,23 +958,23 @@ nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io) /****if* H5Pf/h5pset_fapl_sec2_c * NAME - * h5pset_fapl_sec2_c + * h5pset_fapl_sec2_c * PURPOSE - * Call H5Pset_fapl_sec2 to set the low level file driver to - * use the functions declared in the unistd.h + * Call H5Pset_fapl_sec2 to set the low level file driver to + * use the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_sec2_c (hid_t_f *prp_id) +h5pset_fapl_sec2_c (hid_t_f *prp_id) /******/ { int ret_value = -1; @@ -1095,26 +993,26 @@ nh5pset_fapl_sec2_c (hid_t_f *prp_id) #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_sec2_c * NAME - * h5pget_fapl_sec2_c + * h5pget_fapl_sec2_c * PURPOSE - * Call H5Pget_fapl_stdio to determine whther the low level file driver - * uses the functions declared in the unistd.h + * Call H5Pget_fapl_stdio to determine whther the low level file driver + * uses the functions declared in the unistd.h * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * sec2 - value indicates whether the file driver uses - * the functions declared in the unistd.h + * sec2 - value indicates whether the file driver uses + * the functions declared in the unistd.h * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) +h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /******/ { int ret_value = -1; @@ -1134,25 +1032,25 @@ nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2) /****if* H5Pf/h5pset_alignment_c * NAME - * h5pset_alignment_c + * h5pset_alignment_c * PURPOSE - * Call H5Pset_alignment to set alignment properties of - * a file access property list + * Call H5Pset_alignment to set alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1173,25 +1071,25 @@ nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment /****if* H5Pf/h5pget_alignment_c * NAME - * h5pget_alignment_c + * h5pget_alignment_c * PURPOSE - * Call H5Pget_alignment to get alignment properties of - * a file access property list + * Call H5Pget_alignment to get alignment properties of + * a file access property list * INPUTS - * prp_id - property list identifier - * threshold - Threshold value - * alignment - Alignment value + * prp_id - property list identifier + * threshold - Threshold value + * alignment - Alignment value * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) +h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment) /******/ { int ret_value = -1; @@ -1213,26 +1111,26 @@ nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment /****if* H5Pf/h5pset_fapl_core_c * NAME - * h5pset_fapl_core_c + * h5pset_fapl_core_c * PURPOSE - * Call H5Pset_fapl_core to set the low-level file driver - * to use malloc() and free() + * Call H5Pset_fapl_core to set the low-level file driver + * to use malloc() and free() * INPUTS - * prp_id - property list identifier - * increment - File block size in bytes - * flag - Boolean flag indicating whether to write the - * file contents to disk when the file is closed. + * prp_id - property list identifier + * increment - File block size in bytes + * flag - Boolean flag indicating whether to write the + * file contents to disk when the file is closed. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1255,24 +1153,24 @@ nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pget_fapl_core_c * NAME - * h5pget_fapl_core_c + * h5pget_fapl_core_c * PURPOSE - * Call H5Pget_fapl_core to determine whether the file access - * property list is set to the core drive + * Call H5Pget_fapl_core to determine whether the file access + * property list is set to the core drive * INPUTS - * prp_id - property list identifier - * Outputs increment - File block size in bytes + * prp_id - property list identifier + * Outputs increment - File block size in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) +h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /******/ { int ret_value = -1; @@ -1295,26 +1193,26 @@ nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag) /****if* H5Pf/h5pset_fapl_family_c * NAME - * h5pset_fapl_family_c + * h5pset_fapl_family_c * PURPOSE - * Call H5Pset_fapl_family to set the file access properties list - * to the family driver + * Call H5Pset_fapl_family to set the file access properties list + * to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) +h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ) /******/ { int ret_value = -1; @@ -1336,26 +1234,26 @@ nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist /****if* H5Pf/h5pget_fapl_family_c * NAME - * h5pget_fapl_family_c + * h5pget_fapl_family_c * PURPOSE - * Call H5Pget_fapl_family to determine whether the file access - * property list is set to the family driver + * Call H5Pget_fapl_family to determine whether the file access + * property list is set to the family driver * INPUTS - * prp_id - property list identifier - * memb_size - Logical size, in bytes, of each family member. - * memb_plist - Identifier of the file access property list - * for each member of the family + * prp_id - property list identifier + * memb_size - Logical size, in bytes, of each family member. + * memb_plist - Identifier of the file access property list + * for each member of the family * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) +h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist) /******/ { int ret_value = -1; @@ -1378,29 +1276,29 @@ nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist /****if* H5Pf/h5pset_cache_c * NAME - * h5pset_cache_c + * h5pset_cache_c * PURPOSE - * Call H5Pset_cache to set he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pset_cache to set he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * prp_id - property list identifier + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 - * instead of double + * Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00 + * instead of double * SOURCE */ int_f -nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) +h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 ) /******/ { int ret_value = -1; @@ -1427,32 +1325,32 @@ nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size /****if* H5Pf/h5pget_cache_c * NAME - * h5pget_cache_c + * h5pget_cache_c * PURPOSE - * Call H5Pget_cache to get he number of elements in - * the meta data cache and the total number of bytes in - * the raw data chunk cache + * Call H5Pget_cache to get he number of elements in + * the meta data cache and the total number of bytes in + * the raw data chunk cache * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * mdc_nelmts - Number of elements (objects) in the - * meta data cache - * rdcc_nelmts - Number of elements in the raw data chunk - * rdcc_nbytes - Total size of the raw data chunk cache, in bytes - * rdcc_w0 - Preemption policy + * mdc_nelmts - Number of elements (objects) in the + * meta data cache + * rdcc_nelmts - Number of elements in the raw data chunk + * rdcc_nbytes - Total size of the raw data chunk cache, in bytes + * rdcc_w0 - Preemption policy * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed type of the rdcc_w0 parameter to be real_f instead of double - * Changed type of the rdcc_nelmts parameter to be int_f. + * Changed type of the rdcc_w0 parameter to be real_f instead of double + * Changed type of the rdcc_nelmts parameter to be int_f. * EIP October 10, 2003 * SOURCE */ int_f -nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) +h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0) /******/ { int ret_value = -1; @@ -1479,29 +1377,29 @@ nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_ /****if* H5Pf/h5pset_fapl_split_c * NAME - * h5pset_fapl_split_c + * h5pset_fapl_split_c * PURPOSE - * Call H5Pset_fapl_split to set he low-level driver to split meta data - * from raw data + * Call H5Pset_fapl_split to set he low-level driver to split meta data + * from raw data * INPUTS - * prp_id - property list identifier - * meta_len - Length of meta_ext - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_len - Length of raw _ext - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * prp_id - property list identifier + * meta_len - Length of meta_ext + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_len - Length of raw _ext + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9, 2001 + * March 9, 2001 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) +h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1540,32 +1438,32 @@ DONE: #ifdef NO_SUCH_F90_FUNCTION /****if* H5Pf/h5pget_fapl_split_c * NAME - * h5pget_fapl_split_c + * h5pget_fapl_split_c * PURPOSE - * Call H5Pget_fapl_split to determine whether the file access - * property list is set to the split driver + * Call H5Pget_fapl_split to determine whether the file access + * property list is set to the split driver * INPUTS - * prp_id - property list identifier - * meta_ext_size - Number of characters of the meta file extension - * to be copied to the meta_ext buffer - * raw_ext_size - Number of characters of the raw file extension - * to be copied to the raw_ext buffer + * prp_id - property list identifier + * meta_ext_size - Number of characters of the meta file extension + * to be copied to the meta_ext buffer + * raw_ext_size - Number of characters of the raw file extension + * to be copied to the raw_ext buffer *OUTPUT - * meta_ext - Name of the extension for the metafile filename. - * meta_plist - Identifier of the meta file access property list - * raw_ext - Name of the extension for the raw file filename. - * raw_plist - Identifier of the raw file access property list + * meta_ext - Name of the extension for the metafile filename. + * meta_plist - Identifier of the meta file access property list + * raw_ext - Name of the extension for the raw file filename. + * raw_plist - Identifier of the raw file access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 9 , 2001 + * March 9 , 2001 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) +h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist) /******/ { int ret_value = -1; @@ -1603,25 +1501,25 @@ nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, h /****if* H5Pf/h5pset_gc_references_c * NAME - * h5pset_gc_references_c + * h5pset_gc_references_c * PURPOSE - * Call H5Pset_gc_references to set garbage - * collecting references flag + * Call H5Pset_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1643,25 +1541,25 @@ nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pget_gc_references_c * NAME - * h5pget_gc_references_c + * h5pget_gc_references_c * PURPOSE - * Call H5Pget_gc_references to set garbage - * collecting references flag + * Call H5Pget_gc_references to set garbage + * collecting references flag * INPUTS - * prp_id - property list identifier - * Outputs gc_reference - flag for garbage collecting references - * for the file + * prp_id - property list identifier + * Outputs gc_reference - flag for garbage collecting references + * for the file * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) +h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /******/ { int ret_value = -1; @@ -1681,24 +1579,24 @@ nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references) /****if* H5Pf/h5pset_layout_c * NAME - * h5pset_layout_c + * h5pset_layout_c * PURPOSE - * Call H5Pset_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pset_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier - * layout - Type of storage layout for raw data. + * prp_id - property list identifier + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pset_layout_c (hid_t_f *prp_id, int_f* layout) +h5pset_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1719,25 +1617,25 @@ nh5pset_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pget_layout_c * NAME - * h5pget_layout_c + * h5pget_layout_c * PURPOSE - * Call H5Pget_layout to the type of storage used - * store the raw data for a dataset + * Call H5Pget_layout to the type of storage used + * store the raw data for a dataset * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * layout - Type of storage layout for raw data. + * layout - Type of storage layout for raw data. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_layout_c (hid_t_f *prp_id, int_f* layout) +h5pget_layout_c (hid_t_f *prp_id, int_f* layout) /******/ { int ret_value = -1; @@ -1756,27 +1654,27 @@ nh5pget_layout_c (hid_t_f *prp_id, int_f* layout) /****if* H5Pf/h5pset_filter_c * NAME - * h5pset_filter_c + * h5pset_filter_c * PURPOSE - * Call H5Pset_filter to add a filter to the filter pipeline. + * Call H5Pset_filter to add a filter to the filter pipeline. * INPUTS - * prp_id - property list identifier - * filter - Filter to be added to the pipeline. - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be added to the pipeline. + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * 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 * * SOURCE */ int_f -nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int ret_value = -1; @@ -1824,7 +1722,7 @@ DONE: * SOURCE */ int_f -nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) +h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) /******/ { int ret_value = -1; @@ -1844,30 +1742,30 @@ nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters) } /*---------------------------------------------------------------------------- - * Name: h5pget_filter_c - * Purpose: Call H5Pget_filter2 to get information about a filter - * in a pipeline - * Inputs: prp_id - property list identifier - * filter_number - Sequence number within the filter - * pipeline of the filter for which - * information is sought. - * namelen - Anticipated number of characters in name. - *Outputs: flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter - * filter_id - filter identification number - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su - * Friday, February 25, 2000 - * Modifications: - * Since cd_nelmts has IN/OUT attributes, fixed the input and - * returned value of cd_nelmnts to satisfy this specification. + * Name: h5pget_filter_c + * Purpose: Call H5Pget_filter2 to get information about a filter + * in a pipeline + * Inputs: prp_id - property list identifier + * filter_number - Sequence number within the filter + * pipeline of the filter for which + * information is sought. + * namelen - Anticipated number of characters in name. + * Outputs: flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter + * filter_id - filter identification number + * Returns: 0 on success, -1 on failure + * Programmer: Xiangyang Su + * Friday, February 25, 2000 + * Modifications: + * Since cd_nelmts has IN/OUT attributes, fixed the input and + * returned value of cd_nelmnts to satisfy this specification. * MSB January 27, 2009 *---------------------------------------------------------------------------*/ 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) +h5pget_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) /******/ { unsigned int c_flags; @@ -1921,7 +1819,7 @@ DONE: * 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. + * 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 @@ -1934,7 +1832,7 @@ DONE: * SOURCE */ int_f -nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes) +h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes) /******/ { int ret_value = -1; @@ -1967,25 +1865,25 @@ DONE: /****if* H5Pf/h5pget_external_count_c * NAME - * h5pget_external_count_c + * h5pget_external_count_c * PURPOSE - * Call H5Pget_external_count to get the number of external - * files for the specified dataset. + * Call H5Pget_external_count to get the number of external + * files for the specified dataset. * INPUTS - * prp_id - property list identifier + * prp_id - property list identifier * OUTPUTS - * count - number of external files + * count - number of external files * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY * * SOURCE */ int_f -nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) +h5pget_external_count_c (hid_t_f *prp_id, int_f* count) /******/ { int ret_value = -1; @@ -2008,14 +1906,14 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) * PURPOSE * 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. + * prp_id - property list identifier + * name_size - length of name + * idx - External file index. * 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. - * bytes - Number of bytes reserved in the file for the data. + * 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. + * bytes - Number of bytes reserved in the file for the data. * RETURNS * on success, -1 on failure * AUTHOR @@ -2027,7 +1925,7 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count) * SOURCE */ 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) +h5pget_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; @@ -2071,27 +1969,27 @@ DONE: /****if* H5Pf/h5pset_btree_ratios_c * NAME - * h5pset_btree_ratios_c + * h5pset_btree_ratios_c * PURPOSE - * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a - * dataset transfer property list. + * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a + * dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f -nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2116,27 +2014,27 @@ nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri /****if* H5Pf/h5pget_btree_ratios_c * NAME - * h5pget_btree_ratios_c + * h5pget_btree_ratios_c * PURPOSE - * Call H5Pget_btree_ratios to Gets B-tree split ratios - * for a dataset transfer property list. + * Call H5Pget_btree_ratios to Gets B-tree split ratios + * for a dataset transfer property list. * INPUTS - * prp_id - property list identifier - * left - The B-tree split ratio for left-most nodes. - * middle - The B-tree split ratio for all other nodes - * right - The B-tree split ratio for right-most nodes - * and lone nodes. + * prp_id - property list identifier + * left - The B-tree split ratio for left-most nodes. + * middle - The B-tree split ratio for all other nodes + * right - The B-tree split ratio for right-most nodes + * and lone nodes. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, February 25, 2000 + * Friday, February 25, 2000 * HISTORY - * Changed the type of the last three parameters from double to real_f + * Changed the type of the last three parameters from double to real_f * SOURCE */ int_f -nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) +h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right) /******/ { int ret_value = -1; @@ -2158,30 +2056,30 @@ nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* ri } /****if* H5Pf/h5pget_fclose_degree_c * NAME - * h5pget_fclose_degree_c + * h5pget_fclose_degree_c * PURPOSE - * Call H5Pget_fclose_degree to determine file close behavior + * Call H5Pget_fclose_degree to determine file close behavior * INPUTS - * fapl_id - file access identifier + * fapl_id - file access identifier * OUTPUTS * - * degree - possible values are: + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2198,28 +2096,28 @@ nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_fclose_degree_c * NAME - * h5pset_fclose_degree_c + * h5pset_fclose_degree_c * PURPOSE - * Call H5Pset_fclose_degree to set file close behavior + * Call H5Pset_fclose_degree to set file close behavior * INPUTS - * fapl_id - file access identifier - * degree - possible values are: + * fapl_id - file access identifier + * degree - possible values are: * H5F_CLOSE_DEFAULT * H5F_CLOSE_WEAK * H5F_CLOSE_SEMI * H5F_CLOSE_STRONG * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) +h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /******/ { int ret_value = -1; @@ -2236,26 +2134,26 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) /****if* H5Pf/h5pset_buffer_c * NAME - * h5pset_buffer_c + * h5pset_buffer_c * PURPOSE - * Call H5Pset_buffer to set size of conversion buffer + * Call H5Pset_buffer to set size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier - * size - size of the buffer + * prp_id - t`dataset trasfer property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2270,25 +2168,25 @@ nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /****if* H5Pf/h5pget_buffer_c * NAME - * h5pget_buffer_c + * h5pget_buffer_c * PURPOSE - * Call H5Pget_buffer to get size of conversion buffer + * Call H5Pget_buffer to get size of conversion buffer * INPUTS - * prp_id - t`dataset trasfer property list identifier + * prp_id - t`dataset trasfer property list identifier * OUTPUTS - * size - size of conversion buffer + * size - size of conversion buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 2, 2002 + * Wednesday, October 2, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = -1; @@ -2304,25 +2202,25 @@ nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pfill_value_defined_c * NAME - * h5pfill_value_defined_c + * h5pfill_value_defined_c * PURPOSE - * Call H5Pfill_value_defined to check if fill value is defined + * Call H5Pfill_value_defined to check if fill value is defined * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value status flag + * flag - fill value status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) +h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2337,26 +2235,26 @@ nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_alloc_time_c * NAME - * h5pget_alloc_time_c + * h5pget_alloc_time_c * PURPOSE - * Call H5Pget_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pget_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - allocation time flag + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2371,25 +2269,25 @@ nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_alloc_time_c * NAME - * h5pset_alloc_time_c + * h5pset_alloc_time_c * PURPOSE - * Call H5Pset_alloc_time to get space allocation - * time for dataset during creation + * Call H5Pset_alloc_time to get space allocation + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - allocation time flag + * prp_id - dataset creation property list identifier + * flag - allocation time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) +h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2404,26 +2302,26 @@ nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fill_time_c * NAME - * h5pget_fill_time_c + * h5pget_fill_time_c * PURPOSE - * Call H5Pget_fill_time to get fill value writing - * time for dataset during creation + * Call H5Pget_fill_time to get fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * flag - fill value writing time flag + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) +h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2438,25 +2336,25 @@ nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_fill_time_c * NAME - * h5pset_fill_time_c + * h5pset_fill_time_c * PURPOSE - * Call H5Pset_fill_time to set fill value writing - * time for dataset during creation + * Call H5Pset_fill_time to set fill value writing + * time for dataset during creation * INPUTS - * prp_id - dataset creation property list identifier - * flag - fill value writing time flag + * prp_id - dataset creation property list identifier + * flag - fill value writing time flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Friday, October 4, 2002 + * Friday, October 4, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) +h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) /******/ { int ret_value = -1; @@ -2471,26 +2369,26 @@ nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pset_meta_block_size_c * NAME - * h5pset_meta_block_size_c + * h5pset_meta_block_size_c * PURPOSE - * Call H5Pset_meta_block_size to set size of metadata block + * Call H5Pset_meta_block_size to set size of metadata block * INPUTS - * prp_id - file access property list identifier - * size - size of the metadata block + * prp_id - file access property list identifier + * size - size of the metadata block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2504,26 +2402,26 @@ nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_meta_block_size_c * NAME - * h5pget_meta_block_size_c + * h5pget_meta_block_size_c * PURPOSE - * Call H5Pget_meta_block_size to get size of metadata block + * Call H5Pget_meta_block_size to get size of metadata block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the metadata block + * size - size of the metadata block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2537,26 +2435,26 @@ nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_sieve_buf_size_c * NAME - * h5pset_sieve_buf_size_c + * h5pset_sieve_buf_size_c * PURPOSE - * Call H5Pset_sieve_buf_size to set size of datasieve buffer + * Call H5Pset_sieve_buf_size to set size of datasieve buffer * INPUTS - * prp_id - file access property list identifier - * size - size of the buffer + * prp_id - file access property list identifier + * size - size of the buffer * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2570,26 +2468,26 @@ nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_sieve_buf_size_c * NAME - * h5pget_sieve_buf_size_c + * h5pget_sieve_buf_size_c * PURPOSE - * Call H5Pget_sieve_buf_size to get size of datasieve buffer + * Call H5Pget_sieve_buf_size to get size of datasieve buffer * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the buffer + * size - size of the buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2603,26 +2501,26 @@ nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pset_small_data_block_size_c * NAME - * h5pset_small_data_block_size_c + * h5pset_small_data_block_size_c * PURPOSE - * Call H5Pset_small_data_block_size to set size of raw small data block + * Call H5Pset_small_data_block_size to set size of raw small data block * INPUTS - * prp_id - file access property list identifier - * size - size of the block + * prp_id - file access property list identifier + * size - size of the block * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2636,26 +2534,26 @@ nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pget_small_data_block_size_c * NAME - * h5pget_small_data_block_size_c + * h5pget_small_data_block_size_c * PURPOSE - * Call H5Pget_small_data_block_size to get size of raw small data block + * Call H5Pget_small_data_block_size to get size of raw small data block * INPUTS - * prp_id - file access property list identifier + * prp_id - file access property list identifier * OUTPUTS * - * size - size of the block + * size - size of the block * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) +h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) /******/ { int ret_value = 0; @@ -2669,26 +2567,26 @@ nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size) } /****if* H5Pf/h5pset_hyper_vector_size_c * NAME - * h5pset_hyper_vector_size_c + * h5pset_hyper_vector_size_c * PURPOSE - * Call H5Pset_hyper_vector_size to set size of the hyper vector + * Call H5Pset_hyper_vector_size to set size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier - * size - size of the vector + * prp_id - dataset transfer property list identifier + * size - size of the vector * OUTPUTS * NONE * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2702,26 +2600,26 @@ nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) } /****if* H5Pf/h5pget_hyper_vector_size_c * NAME - * h5pget_hyper_vector_size_c + * h5pget_hyper_vector_size_c * PURPOSE - * Call H5Pget_hyper_vector_size to get size of the hyper vector + * Call H5Pget_hyper_vector_size to get size of the hyper vector * INPUTS - * prp_id - dataset transfer property list identifier + * prp_id - dataset transfer property list identifier * OUTPUTS * - * size - size of the vector + * size - size of the vector * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) +h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) /******/ { int ret_value = 0; @@ -2733,36 +2631,6 @@ nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) *size = (size_t_f)c_size; return ret_value; } -/****if* H5Pf/h5pcreate_class_c - * NAME - * h5pcreate_class_c - * PURPOSE - * Call H5Pcreate_class to create a new property class - * INPUTS - * parent - property list class identifier - * name - name of the new class - * name_len - lenght of the "name" buffer - * OUTPUTS - * cls - new class identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * - * HISTORY - * SOURCE -*/ -int_f -nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls) -/******/ -{ - int ret_value = -1; - - ret_value = h5pcreate_class_c(parent, name, name_len, cls, NULL, NULL, NULL, NULL, NULL, NULL); - return ret_value; -} - /****if* H5Pf/h5pcreate_class_c * NAME @@ -2814,18 +2682,17 @@ DONE: return ret_value; } - -/****if* H5Pf/h5pregisterc_c +/****if* H5Pf/h5pregister_c * NAME - * h5pregisterc_c + * h5pregister_c * PURPOSE - * Call h5pregister_c to registers a permanent property + * Call H5Pregister2 to registers a permanent property * INPUTS * class - property list class identifier * name - name of the new property * name_len - length of the "name" buffer * size - property size - * value - property value of character type + * value - property value * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -2836,54 +2703,21 @@ DONE: * SOURCE */ int_f -nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len) +h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value) /******/ { - int ret_value = -1; + char* c_name = NULL; + int_f ret_value = -1; + + if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len))) + goto DONE; /* - * Call h5pregister_c function + * Call H5Pregister2 function. */ - ret_value = h5pregister_c(cls, name, name_len, size, _fcdtocp(value)); - return ret_value; -} - -/****if* H5Pf/h5pregister_c - * NAME - * h5pregister_c - * PURPOSE - * Call H5Pregister2 to registers a permanent property - * INPUTS - * class - property list class identifier - * name - name of the new property - * name_len - length of the "name" buffer - * size - property size - * value - property value - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value) -/******/ -{ - char* c_name = NULL; - int_f ret_value = -1; - - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len))) - goto DONE; - - /* - * Call H5Pregister2 function. - */ - if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - goto DONE; - ret_value = 0; + if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + goto DONE; + ret_value = 0; DONE: if(c_name != NULL) @@ -2891,66 +2725,6 @@ DONE: return ret_value; } -int_f -nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -int_f -nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -int_f -nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pregister_c function - */ - return h5pregister_c(cls, name, name_len, size, value); -} - -/****if* H5Pf/h5pinsertc_c - * NAME - * h5pinsertc_c - * PURPOSE - * Call h5pinsert_c to register a temporary property - * INPUTS - * plist - property list identifier - * name - name of the new property - * name_len - length of the "name" buffer - * size - property size - * value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f H5_ATTR_UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pinsert_c function - */ - ret_value = h5pinsert_c(plist, name, name_len, size, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pinsert_c * NAME * h5pinsert_c @@ -2994,54 +2768,27 @@ DONE: return ret_value; } -int_f -nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - -int_f -nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - -int_f -nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value) -{ - /* - * Call h5pinsert_c function - */ - return h5pinsert_c(plist, name, name_len, size, value); -} - /****if* H5Pf/h5pexist_c * NAME - * h5pexist_c + * h5pexist_c * PURPOSE - * Call H5Pexist to querie whether a property name exists - * in a property list or class + * Call H5Pexist to querie whether a property name exists + * in a property list or class * INPUTS - * plist - property list or property class identifier - * name - name of the new property - * name_len - length of the "name" buffer + * plist - property list or property class identifier + * name - name of the new property + * name_len - length of the "name" buffer * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3065,24 +2812,24 @@ DONE: } /****if* H5Pf/h5pisa_class_c * NAME - * h5pisa_class_c + * h5pisa_class_c * PURPOSE - * Call H5Pisa_class to querie whether a property is a - * member of a class + * Call H5Pisa_class to querie whether a property is a + * member of a class * INPUTS - * plist - property list identifier - * cls - property class identifier + * plist - property list identifier + * cls - property class identifier * RETURNS - * nonnegative on success, -1 on failure + * nonnegative on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls) +h5pisa_class_c(hid_t_f *plist, hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -3102,26 +2849,26 @@ nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls) } /****if* H5Pf/h5pget_size_c * NAME - * h5pget_size_c + * h5pget_size_c * PURPOSE - * Call H5Pget_size to querie the size of the property + * Call H5Pget_size to querie the size of the property * INPUTS - * plist - property list to query - * name - name of the property - * name_len - length of the "name" buffer + * plist - property list to query + * name - name of the property + * name_len - length of the "name" buffer * OUTPUTS - * size - size of the property in bytes + * size - size of the property in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) +h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) /******/ { int_f ret_value = -1; @@ -3146,24 +2893,24 @@ DONE: } /****if* H5Pf/h5pget_nprops_c * NAME - * h5pget_nprops_c + * h5pget_nprops_c * PURPOSE - * Call H5Pget_nporps to get number of the properties in the list + * Call H5Pget_nporps to get number of the properties in the list * INPUTS - * plist - property list to query + * plist - property list to query * OUTPUTS - * nprops - number of properties in the list + * nprops - number of properties in the list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) +h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) /******/ { int_f ret_value = -1; @@ -3183,25 +2930,25 @@ nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops) } /****if* H5Pf/h5pget_class_parent_c * NAME - * h5pget_class_parent_c + * h5pget_class_parent_c * PURPOSE - * Call H5Pget_class_parent to get the parent class of - * a genereic property class + * Call H5Pget_class_parent to get the parent class of + * a genereic property class * INPUTS - * prp_id - property list to query + * prp_id - property list to query * OUTPUTS - * parent_id - parent classs identifier + * parent_id - parent classs identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) +h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) /******/ { int_f ret_value = -1; @@ -3222,26 +2969,26 @@ nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id) } /****if* H5Pf/h5pcopy_prop_c * NAME - * h5pcopy_prop_c + * h5pcopy_prop_c * PURPOSE - * Call H5Pcopy_prop to copy a property from one list or - * class to another + * Call H5Pcopy_prop to copy a property from one list or + * class to another * INPUTS - * dst_id - identifier of destination property list - * src_id - identifier of source property list - * name - name of the property - * name_len - length of the "name" buffer + * dst_id - identifier of destination property list + * src_id - identifier of source property list + * name - name of the property + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) +h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3265,24 +3012,24 @@ DONE: } /****if* H5Pf/h5premove_c * NAME - * h5premove_c + * h5premove_c * PURPOSE - * Call H5Premove to remove a property from a list + * Call H5Premove to remove a property from a list * INPUTS - * plid - identifier of property list - * name - name of the property to remove - * name_len - length of the "name" buffer + * plid - identifier of property list + * name - name of the property to remove + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * October 11, 2002 + * October 11, 2002 * HISTORY * * SOURCE */ int_f -nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) +h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3305,15 +3052,15 @@ DONE: } /****if* H5Pf/h5punregister_c * NAME - * h5punregister_c + * h5punregister_c * PURPOSE - * Call H5Punregister to remove a property from a property class + * Call H5Punregister to remove a property from a property class * INPUTS - * cls - identifier of property class - * name - name of the property to unregister - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - name of the property to unregister + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3322,7 +3069,7 @@ DONE: * SOURCE */ int_f -nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3345,13 +3092,13 @@ DONE: } /****if* H5Pf/h5pclose_class_c * NAME - * h5pclose_class_c + * h5pclose_class_c * PURPOSE - * Call H5Pclose_class to close property class + * Call H5Pclose_class to close property class * INPUTS - * class - identifier of property class to close + * class - identifier of property class to close * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3360,7 +3107,7 @@ DONE: * SOURCE */ int_f -nh5pclose_class_c(hid_t_f *cls) +h5pclose_class_c(hid_t_f *cls) /******/ { int_f ret_value = -1; @@ -3377,15 +3124,15 @@ nh5pclose_class_c(hid_t_f *cls) /****if* H5Pf/h5pget_class_name_c * NAME - * h5pget_class_name_c + * h5pget_class_name_c * PURPOSE - * Call H5Pget_class_name to get property class name + * Call H5Pget_class_name to get property class name * INPUTS - * cls - identifier of property class - * name - buffer to retrieve name in - * name_len - length of the "name" buffer + * cls - identifier of property class + * name - buffer to retrieve name in + * name_len - length of the "name" buffer * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * October 11, 2002 @@ -3394,7 +3141,7 @@ nh5pclose_class_c(hid_t_f *cls) * SOURCE */ int_f -nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) +h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) /******/ { int_f ret_value = -1; @@ -3417,38 +3164,6 @@ DONE: return ret_value; } -/****if* H5Pf/h5psetc_c - * NAME - * h5psetc_c - * PURPOSE - * Call h5setc_c to set property with the character string value - * INPUTS - * plist - property list identifier - * name - name of property - * name_len - length of the "name" buffer - * value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pset_c function - */ - ret_value = h5pset_c(plist, name, name_len, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pset_c * NAME * h5pset_c @@ -3489,64 +3204,6 @@ DONE: return ret_value; } -int_f -nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} - -int_f -nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} - -int_f -nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pset_c function - */ - return h5pset_c(plist, name, name_len, value); -} -/****if* H5Pf/h5pgetc_c - * NAME - * h5pgetc_c - * PURPOSE - * Call h5set_c to set property with the character string value - * INPUTS - * plist - property list identifier - * name - name of property - * name_len - length of the "name" buffer - * Output: value - property value of character type - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * October 11, 2002 - * HISTORY - * - * SOURCE -*/ -int_f -nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR_UNUSED *value_len) -/******/ -{ - int_f ret_value = -1; - - /* - * Call h5pget_c function - */ - ret_value = h5pget_c(plist, name, name_len, _fcdtocp(value)); - return ret_value; -} - /****if* H5Pf/h5pget_c * NAME * h5pget_c @@ -3556,7 +3213,7 @@ nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f H5_ATTR * plist - property list class identifier * name - name of the new property * name_len - length of the "name" buffer - * Output: + * Output: * value - property value * RETURNS * 0 on success, -1 on failure @@ -3588,54 +3245,26 @@ DONE: return ret_value; } -int_f -nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - -int_f -nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - -int_f -nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) -{ - /* - * Call h5pget_c function - */ - return h5pget_c(plist, name, name_len, value); -} - - /****if* H5Pf/h5pset_shuffle_c * NAME - * h5pset_shuffle_c + * h5pset_shuffle_c * PURPOSE - * Call H5Pset_shuffle + * Call H5Pset_shuffle * INPUTS - * prp_id - property list identifier - * type_size - size of the datatype in bytes + * prp_id - property list identifier + * type_size - size of the datatype in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -nh5pset_shuffle_c ( hid_t_f *prp_id ) +h5pset_shuffle_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3649,23 +3278,23 @@ nh5pset_shuffle_c ( hid_t_f *prp_id ) } /****if* H5Pf/h5pset_fletcher32_c * NAME - * h5pset_fletcher32_c + * h5pset_fletcher32_c * PURPOSE - * Call H5Pset_fletcher32 to enable EDC + * Call H5Pset_fletcher32 to enable EDC * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -nh5pset_fletcher32_c ( hid_t_f *prp_id ) +h5pset_fletcher32_c ( hid_t_f *prp_id ) /******/ { int_f ret_value = 0; @@ -3680,24 +3309,24 @@ nh5pset_fletcher32_c ( hid_t_f *prp_id ) /****if* H5Pf/h5pset_edc_check_c * NAME - * h5pset_edc_check_c + * h5pset_edc_check_c * PURPOSE - * Call H5Pset_edc_check to enable EDC + * Call H5Pset_edc_check to enable EDC * INPUTS - * prp_id - dataset transfer property list identifier - * flag - EDC flag + * prp_id - dataset transfer property list identifier + * flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3714,24 +3343,24 @@ nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /****if* H5Pf/h5pget_edc_check_c * NAME - * h5pget_edc_check_c + * h5pget_edc_check_c * PURPOSE - * Call H5Pget_edc_check to query EDC + * Call H5Pget_edc_check to query EDC * INPUTS - * prp_id - dataset transfer property list identifier - * Outouts: flag - EDC flag + * prp_id - dataset transfer property list identifier + * Outouts: flag - EDC flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, March 13, 2003 + * Thursday, March 13, 2003 * HISTORY * * SOURCE */ int_f -nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) +h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) /******/ { int_f ret_value = 0; @@ -3746,24 +3375,24 @@ nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ) } /****if* H5Pf/h5pset_family_offset_c * NAME - * h5pset_family_offset_c + * h5pset_family_offset_c * PURPOSE - * Call H5Pset_family_offset to set and offset for family driver + * Call H5Pset_family_offset to set and offset for family driver * INPUTS - * prp_id - property list identifier - * offset - offset in bytes + * prp_id - property list identifier + * offset - offset in bytes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, 19 March 2003 + * Wednesday, 19 March 2003 * HISTORY * * SOURCE */ int_f -nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) +h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /******/ { int_f ret_value = 0; @@ -3780,30 +3409,30 @@ nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) /****if* H5Pf/h5pset_fapl_multi_c * NAME - * h5pset_fapl_multi_c + * h5pset_fapl_multi_c * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * mem_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * lenmax - lenght of the name a sdeclared in Fortran - * flag - flag allowing partila access when one of the files is missing + * prp_id - file_creation property list identifier + * mem_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * lenmax - lenght of the name a sdeclared in Fortran + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE */ int_f -/*nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ -nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) +/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ +h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) /******/ { int_f ret_value = -1; @@ -3821,13 +3450,13 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f c_lenmax = (int)*lenmax; relax = (hbool_t)*flag; /* - * Check that we got correct values from Fortran for memb_addr array + * Check that we got correct values from Fortran for memb_addr array */ for (i=0; i < H5FD_MEM_NTYPES; i++) { if(memb_addr[i] >= 1.0f) return ret_value; } /* - * Take care of names array + * Take care of names array */ tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES)); @@ -3841,7 +3470,7 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f tmp_p = tmp_p + c_lenmax; } /* - * Take care of othe arguments + * Take care of othe arguments */ tmp_max_addr = (long double)(HADDR_MAX); c_prp_id = (hid_t)*prp_id; @@ -3852,7 +3481,7 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr)); } /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax); @@ -3868,23 +3497,23 @@ DONE: /****if* H5Pf/h5pset_fapl_multi_sc * NAME - * h5pset_fapl_multi_sc + * h5pset_fapl_multi_sc * PURPOSE - * Call H5Pset_fapl_multi to set multi file dirver + * Call H5Pset_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier + * prp_id - file_creation property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * March 31 2003 + * March 31 2003 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) +h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) /******/ { int_f ret_value = -1; @@ -3895,7 +3524,7 @@ nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) relax = (hbool_t)*flag; c_prp_id = (hid_t)*prp_id; /* - * Call H5Pset_fapl_multi function + * Call H5Pset_fapl_multi function */ status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax); @@ -3905,30 +3534,30 @@ nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) } /****if* H5Pf/h5pget_fapl_multi_c * NAME - * h5pget_fapl_multi_c + * h5pget_fapl_multi_c * PURPOSE - * Call H5Pget_fapl_multi to set multi file dirver + * Call H5Pget_fapl_multi to set multi file dirver * INPUTS - * prp_id - file_creation property list identifier - * lenmax - lenght of the name a sdeclared in Fortran + * prp_id - file_creation property list identifier + * lenmax - lenght of the name a sdeclared in Fortran * OUTPUTS - * memb_map - memory mapping array - * memb_fapl - property list for each memory usage type - * memb_name - array with members names - * len - array with the lenght of each name - * flag - flag allowing partila access when one of the files is missing + * memb_map - memory mapping array + * memb_fapl - property list for each memory usage type + * memb_name - array with members names + * len - array with the lenght of each name + * flag - flag allowing partila access when one of the files is missing * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday 24, March 2003 + * Monday 24, March 2003 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) +h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out) /******/ { int_f ret_value = -1; @@ -3947,14 +3576,14 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f c_prp_id = (hid_t)*prp_id; /* - * Call H5Pget_fapl_multi function + * Call H5Pget_fapl_multi function */ status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax); if ( status < 0 ) return ret_value; /* - * Take care of names array + * Take care of names array */ tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1); tmp_p = tmp; @@ -3969,7 +3598,7 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /* - * Take care of other arguments + * Take care of other arguments */ for (i=0; i < H5FD_MEM_NTYPES; i++) { @@ -3989,25 +3618,25 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES)); /****if* H5Pf/h5pset_szip_c * NAME - * h5pset_szip_c + * h5pset_szip_c * PURPOSE - * Call H5Pset_szip to set szip compression + * Call H5Pset_szip to set szip compression * INPUTS - * prp_id - dataset creation property list identifier - * options_mask - * pixels_per_block -szip compression parameters + * prp_id - dataset creation property list identifier + * options_mask + * pixels_per_block -szip compression parameters * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 8 2003 + * April 8 2003 * HISTORY * * SOURCE */ int_f -nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) +h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) /******/ { int_f ret_value = -1; @@ -4020,7 +3649,7 @@ nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) c_options_mask = (unsigned)*options_mask; c_pixels_per_block = (unsigned)*pixels_per_block; /* - * Call H5Pset_szip function + * Call H5Pset_szip function */ status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block); @@ -4030,25 +3659,25 @@ nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block) } /****if* H5Pf/h5pall_filters_avail_c * NAME - * h5pall_filters_avail_c + * h5pall_filters_avail_c * PURPOSE - * Call H5Pall_filters_avail + * Call H5Pall_filters_avail * INPUTS - * prp_id - dataset creation property list identifier + * prp_id - dataset creation property list identifier * OUTPUTS - * status - logical flag + * status - logical flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE */ int_f -nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) +h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /******/ { int_f ret_value = -1; @@ -4058,7 +3687,7 @@ nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) c_prp_id = (hid_t)*prp_id; /* - * Call H5Pall_filters_avail function + * Call H5Pall_filters_avail function */ c_status = H5Pall_filters_avail(c_prp_id); @@ -4071,31 +3700,31 @@ nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status) /****if* H5Pf/h5pget_filter_by_id_c * NAME - * h5pget_filter_by_id_c + * h5pget_filter_by_id_c * PURPOSE - * Call H5Pget_filter_by_id2 to get information about a filter - * in a pipeline + * Call H5Pget_filter_by_id2 to get information about a filter + * in a pipeline * INPUTS - * prp_id - property list identifier - * filter_id - filter id - * namelen - Anticipated number of characters in name. + * prp_id - property list identifier + * filter_id - filter id + * namelen - Anticipated number of characters in name. *OUTPUT - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_value - * cd_values - Auxiliary data for the filter. - * name - Name of the filter + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_value + * cd_values - Auxiliary data for the filter. + * name - Name of the filter * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena POurmal - * April 10, 2003 + * April 10, 2003 * HISTORY * * SOURCE */ 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) +h5pget_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) /******/ { unsigned int c_flags; @@ -4138,27 +3767,27 @@ DONE: /****if* H5Pf/h5pmodify_filter_c * NAME - * h5pmodify_filter_c + * h5pmodify_filter_c * PURPOSE - * Call H5Pmodify_filter to modify a filter + * Call H5Pmodify_filter to modify a filter * INPUTS - * prp_id - property list identifier - * filter - Filter to be modified - * flags - Bit vector specifying certain general - * properties of the filter. - * cd_nelmts - Number of elements in cd_values. - * cd_values - Auxiliary data for the filter. + * prp_id - property list identifier + * filter - Filter to be modified + * flags - Bit vector specifying certain general + * properties of the filter. + * cd_nelmts - Number of elements in cd_values. + * cd_values - Auxiliary data for the filter. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * April 10 2003 + * April 10 2003 * HISTORY * * SOURCE */ int_f -nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) +h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ) /******/ { int_f ret_value = -1; @@ -4190,23 +3819,23 @@ DONE: /****if* H5Pf/h5premove_filter_c * NAME - * h5premove_filter_c + * h5premove_filter_c * PURPOSE - * Call H5Premove_filter to delete one or more filters + * Call H5Premove_filter to delete one or more filters * INPUTS - * prp_id - property list identifier - * filter - Filter to be deleted + * prp_id - property list identifier + * filter - Filter to be deleted * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Quincey Koziol - * January 27 2004 + * January 27 2004 * HISTORY * * SOURCE */ int_f -nh5premove_filter_c (hid_t_f *prp_id, int_f* filter) +h5premove_filter_c (hid_t_f *prp_id, int_f* filter) /******/ { int_f ret_value = -1; @@ -4228,25 +3857,25 @@ DONE: /****if* H5Pf/h5pget_attr_phase_change_c * NAME - * h5pget_attr_phase_change_c + * h5pget_attr_phase_change_c * PURPOSE - * Calls H5Pget_attr_phase_change + * Calls H5Pget_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4269,24 +3898,24 @@ nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den /****if* H5Pf/h5pset_attr_creation_order_c * NAME - * h5pset_attr_creation_order_c + * h5pset_attr_creation_order_c * PURPOSE - * Calls H5Ppset_attr_creation_order + * Calls H5Ppset_attr_creation_order * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order + * ocpl_id - Object (dataset or group) creation property list identifier + * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) +h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -4306,29 +3935,29 @@ nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pset_shared_mesg_nindexes_c * NAME - * h5pset_shared_mesg_nindexes_c + * h5pset_shared_mesg_nindexes_c * PURPOSE - * Calls h5pset_shared_mesg_nindexes + * Calls h5pset_shared_mesg_nindexes * * INPUTS * - * plist_id - file creation property list - * nindexes - Number of shared object header message indexes - * available in files created WITH this property list + * plist_id - file creation property list + * nindexes - Number of shared object header message indexes + * available in files created WITH this property list * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) +h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /******/ { int ret_value = -1; @@ -4349,30 +3978,30 @@ nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ) /****if* H5Pf/h5pset_shared_mesg_index_c * NAME - * h5pset_shared_mesg_index_c + * h5pset_shared_mesg_index_c * PURPOSE - * Calls H5Pset_shared_mesg_index + * Calls H5Pset_shared_mesg_index * * INPUTS * - * fcpl_id - File creation property list identifier. - * index_num - Index being configured. - * mesg_type_flags - Types of messages that should be stored in this index. - * min_mesg_size - Minimum message size. + * fcpl_id - File creation property list identifier. + * index_num - Index being configured. + * mesg_type_flags - Types of messages that should be stored in this index. + * min_mesg_size - Minimum message size. * * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * January, 2008 + * January, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) +h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size) /******/ { int ret_value = -1; @@ -4389,28 +4018,28 @@ nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type /****if* H5Pf/h5pget_attr_creation_order_c * NAME - * h5pget_attr_creation_order_c + * h5pget_attr_creation_order_c * PURPOSE - * Calls H5Pget_attr_creation_order + * Calls H5Pget_attr_creation_order * * INPUTS * - * ocpl_id - Object (group or dataset) creation property list identifier + * ocpl_id - Object (group or dataset) creation property list identifier * OUTPUTS * - * crt_order_flags - Flags specifying whether to track and index attribute creation order + * crt_order_flags - Flags specifying whether to track and index attribute creation order * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February, 2008 + * February, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) +h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4431,29 +4060,29 @@ nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) } /****if* H5Pf/h5pset_libver_bounds_c * NAME - * h5pset_libver_bounds_c + * h5pset_libver_bounds_c * PURPOSE - * Calls H5Pset_libver_bounds + * Calls H5Pset_libver_bounds * * INPUTS * - * fapl_id - File access property list identifier - * low - The earliest version of the library that will be used for writing objects. - * high - The latest version of the library that will be used for writing objects. + * fapl_id - File access property list identifier + * low - The earliest version of the library that will be used for writing objects. + * high - The latest version of the library that will be used for writing objects. * OUTPUTS * * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) +h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /******/ { int ret_value = -1; @@ -4471,26 +4100,26 @@ nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) /****if* H5Pf/h5pset_link_creation_order_c * NAME - * h5pset_link_creation_order_c + * h5pset_link_creation_order_c * PURPOSE - * Calls H5Pset_link_creation_order + * Calls H5Pset_link_creation_order * * INPUTS - * gcpl_id - Group creation property list identifier - * crt_order_flags - Creation order flag(s) + * gcpl_id - Group creation property list identifier + * crt_order_flags - Creation order flag(s) * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 18, 2008 + * February 18, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) +h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /******/ { int ret_value = -1; @@ -4507,25 +4136,25 @@ nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) /****if* H5Pf/h5pget_link_phase_change_c * NAME - * h5pget_link_phase_change_c + * h5pget_link_phase_change_c * PURPOSE - * Calls H5Pget_link_phase_change + * Calls H5Pget_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * Outputs max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * gcpl_id - Group creation property list identifier + * Outputs max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 20, 2008 + * February 20, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -4547,27 +4176,27 @@ nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den /****if* H5Pf/h5pget_obj_track_times_c * NAME - * h5pget_obj_track_times_c + * h5pget_obj_track_times_c * PURPOSE - * Call H5Pget_obj_track_times + * Call H5Pget_obj_track_times * * INPUTS - * plist_id - property list id + * plist_id - property list id * OUTPUTS * - * flag - TRUE/FALSE flag + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4589,25 +4218,25 @@ nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_obj_track_times_c * NAME - * h5pset_obj_track_times_c + * h5pset_obj_track_times_c * PURPOSE - * Call H5Pset_obj_track_times + * Call H5Pset_obj_track_times * * INPUTS - * plist_id - property list id - * flag - TRUE/FALSE flag + * plist_id - property list id + * flag - TRUE/FALSE flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) +h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { int ret_value = -1; @@ -4629,28 +4258,28 @@ nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /****if* H5Pf/h5pset_create_inter_group_c * NAME - * h5pset_create_inter_group_c + * h5pset_create_inter_group_c * PURPOSE - * Calls H5Pset_create_intermediate_group + * Calls H5Pset_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - crt_intermed_group specifying whether - * to create intermediate groups upon the - * creation of an object + * crt_intermed_group - crt_intermed_group specifying whether + * to create intermediate groups upon the + * creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * February 22, 2008 + * February 22, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -4668,28 +4297,28 @@ nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /****if* H5Pf/h5pget_link_creation_order_c * NAME - * h5pget_link_creation_order_c + * h5pget_link_creation_order_c * PURPOSE - * Calls H5Pget_link_creation_order + * Calls H5Pget_link_creation_order * * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * OUTPUTS * - * crt_order_flags - Creation order flag(s) + * crt_order_flags - Creation order flag(s) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) +h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /******/ { int ret_value = -1; @@ -4711,30 +4340,30 @@ nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) /****if* H5Pf/h5pset_char_encoding_c * NAME - * h5pset_char_encoding_c + * h5pset_char_encoding_c * PURPOSE * Calls H5Pset_char_encoding * * INPUTS * - * plist_id - Property list identifier - * encoding - String encoding character set: + * plist_id - Property list identifier + * encoding - String encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * OUTPUTS * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4753,30 +4382,30 @@ nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pget_char_encoding_c * NAME - * h5pget_char_encoding_c + * h5pget_char_encoding_c * PURPOSE * Calls H5Pget_char_encoding * * INPUTS * - * plist_id - Property list identifier + * plist_id - Property list identifier * OUTPUTS * - * encoding - Encoding character set: + * encoding - Encoding character set: * H5T_CSET_ASCII_F -> US ASCII * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) +h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /******/ { int ret_value = -1; @@ -4796,30 +4425,30 @@ nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding) /****if* H5Pf/h5pset_copy_object_c * NAME - * h5pset_copy_object_c + * h5pset_copy_object_c * PURPOSE * Calls H5Pset_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier - * copy_options - Copy option(s) to be set + * ocp_plist_id - Object copy property list identifier + * copy_options - Copy option(s) to be set * * OUTPUTS * * NONE * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4836,29 +4465,29 @@ nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_copy_object_c * NAME - * h5pget_copy_object_c + * h5pget_copy_object_c * PURPOSE * Calls H5Pget_copy_object * * INPUTS * - * ocp_plist_id - Object copy property list identifier + * ocp_plist_id - Object copy property list identifier * * OUTPUTS * - * copy_options - Copy option(s) to be get + * copy_options - Copy option(s) to be get * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 3, 2008 + * March 3, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) +h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /******/ { int ret_value = -1; @@ -4878,31 +4507,31 @@ nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) /****if* H5Pf/h5pget_data_transform_c * NAME - * h5pget_data_transform_c + * h5pget_data_transform_c * PURPOSE - * Calls H5Pget_data_transform + * Calls H5Pget_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression_len - buffer size transorm expression * - * Output: - * expression - buffer to hold transform expression + * Output: + * expression - buffer to hold transform expression * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) +h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size) /******/ { char *c_expression = NULL; /* Buffer to hold C string */ @@ -4940,31 +4569,31 @@ done: /****if* H5Pf/h5pset_data_transform_c * NAME - * h5pset_data_transform_c + * h5pset_data_transform_c * PURPOSE - * Calls H5Pset_data_transform + * Calls H5Pset_data_transform * INPUTS * - * prp_id - property list identifier to query - * expression - buffer to hold transform expression - * expression_len - buffer size transorm expression + * prp_id - property list identifier to query + * expression - buffer to hold transform expression + * expression_len - buffer size transorm expression * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 19, 2008 + * March 19, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) +h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len) /******/ { char* c_expression = NULL; /* Buffer to hold C string */ @@ -4991,29 +4620,29 @@ done: /****if* H5Pf/h5pget_local_heap_size_hint_c * NAME - * h5pget_local_heap_size_hint_c + * h5pget_local_heap_size_hint_c * PURPOSE - * Calls H5Pget_local_heap_size_hint + * Calls H5Pget_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * size_hint - Hint for size of local heap + * Output: + * size_hint - Hint for size of local heap * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -5032,30 +4661,30 @@ nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pget_est_link_info_c * NAME - * h5pget_est_link_info_c + * h5pget_est_link_info_c * PURPOSE - * Calls H5Pget_est_link_info + * Calls H5Pget_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * - * Output: - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * Output: + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -5077,30 +4706,30 @@ nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam /****if* H5Pf/h5pset_local_heap_size_hint_c * NAME - * h5pset_local_heap_size_hint_c + * h5pset_local_heap_size_hint_c * PURPOSE - * Calls H5Pset_local_heap_size_hint + * Calls H5Pset_local_heap_size_hint * INPUTS * - * gcpl_id - Group creation property list identifier - * size_hint - Hint for size of local heap + * gcpl_id - Group creation property list identifier + * size_hint - Hint for size of local heap * - * Output: + * Output: * * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) +h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /******/ { int_f ret_value = -1; /* Return value */ @@ -5117,30 +4746,30 @@ nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) /****if* H5Pf/h5pset_est_link_info_c * NAME - * h5pset_est_link_info_c + * h5pset_est_link_info_c * PURPOSE - * Calls H5Pset_est_link_info + * Calls H5Pset_est_link_info * INPUTS * - * gcpl_id - Group creation property list identifier - * est_num_entries - Estimated number of links to be inserted into group - * est_name_len - Estimated average length of link names + * gcpl_id - Group creation property list identifier + * est_num_entries - Estimated number of links to be inserted into group + * est_name_len - Estimated average length of link names * - * Output: + * Output: * RETURNS * - * Success: 0 + * Success: 0 * Failure: -1 * * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) +h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len) /******/ { int_f ret_value = -1; /* Return value */ @@ -5157,26 +4786,26 @@ nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_nam /****if* H5Pf/h5pset_link_phase_change_c * NAME - * h5pset_link_phase_change_c + * h5pset_link_phase_change_c * PURPOSE - * Calls H5Pset_link_phase_change + * Calls H5Pset_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage - * Outputs + * gcpl_id - Group creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage + * Outputs * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) +h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -5194,28 +4823,28 @@ nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den /****if* H5Pf/h5pset_fapl_direct_c * NAME - * h5pset_fapl_direct_c + * h5pset_fapl_direct_c * PURPOSE - * Calls H5Pset_fapl_direct + * Calls H5Pset_fapl_direct * * INPUTS * - * fapl_id - File access property list identifier - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size - * Outputs + * fapl_id - File access property list identifier + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size + * Outputs * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) +h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -5236,29 +4865,29 @@ nh5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED * /****if* H5Pf/h5pget_fapl_direct_c * NAME - * h5pget_fapl_direct_c + * h5pget_fapl_direct_c * PURPOSE - * Calls H5Pget_fapl_direct + * Calls H5Pget_fapl_direct * * INPUTS * - * fapl_id - File access property list identifier + * fapl_id - File access property list identifier * OUTPUTS * - * alignment - Required memory alignment boundary - * block_size - File system block size - * cbuf_size - Copy buffer size + * alignment - Required memory alignment boundary + * block_size - File system block size + * cbuf_size - Copy buffer size * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) +h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ { int ret_value = -1; @@ -5285,27 +4914,27 @@ nh5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED * /****if* H5Pf/h5pset_attr_phase_change_c * NAME - * h5pset_attr_phase_change_c + * h5pset_attr_phase_change_c * PURPOSE - * Calls H5Pset_attr_phase_change + * Calls H5Pset_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier - * max_compact - Maximum number of attributes to be stored in compact storage - * min_dense - Minimum number of attributes to be stored in dense storage + * ocpl_id - Object (dataset or group) creation property list identifier + * max_compact - Maximum number of attributes to be stored in compact storage + * min_dense - Minimum number of attributes to be stored in dense storage * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) +h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ) /******/ { int ret_value = -1; @@ -5322,25 +4951,25 @@ nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_den /****if* H5Pf/h5pset_nbit_c * NAME - * h5pset_nbit_c + * h5pset_nbit_c * PURPOSE - * Calls H5Pset_nbit + * Calls H5Pset_nbit * * INPUTS - * plist_id - Dataset creation property list identifier + * plist_id - Dataset creation property list identifier * OUTPUTS * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 21, 2008 + * March 21, 2008 * HISTORY * * SOURCE */ int_f -nh5pset_nbit_c(hid_t_f *plist_id ) +h5pset_nbit_c(hid_t_f *plist_id ) /******/ { int ret_value = -1; @@ -5373,7 +5002,7 @@ nh5pset_nbit_c(hid_t_f *plist_id ) * SOURCE */ int_f -nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) +h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ) /******/ { int ret_value = -1; @@ -5408,7 +5037,7 @@ nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor * SOURCE */ int_f -nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5425,29 +5054,29 @@ nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_nlinks * NAME - * h5pget_nlinks + * h5pget_nlinks * PURPOSE - * Calls H5Pget_nlinks + * Calls H5Pget_nlinks * * INPUTS * - * lapl_id - File access property list identifier + * lapl_id - File access property list identifier * * OUTPUTS * - * nlinks - Maximum number of links to traverse + * nlinks - Maximum number of links to traverse * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 24, 2008 + * March 24, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) +h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /******/ { int ret_value = -1; @@ -5466,26 +5095,26 @@ nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) /****if* H5Pf/h5pget_create_inter_group_c * NAME - * h5pget_create_inter_group_c + * h5pget_create_inter_group_c * PURPOSE - * Calls H5Pget_create_intermediate_group + * Calls H5Pget_create_intermediate_group * * INPUTS * * lcpl_id - Link creation property list identifier - * crt_intermed_group - Specifying whether to create intermediate groups upon - * the creation of an object + * crt_intermed_group - Specifying whether to create intermediate groups upon + * the creation of an object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE */ int_f -nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) +h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) /******/ { int ret_value = -1; @@ -5505,22 +5134,22 @@ nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) } /*---------------------------------------------------------------------------- - * Name: h5pset_chunk_cache_c - * Purpose: Calls H5Pset_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pset_chunk_cache_c + * Purpose: Calls H5Pset_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; @@ -5535,23 +5164,23 @@ nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb } /*---------------------------------------------------------------------------- - * Name: h5pget_chunk_cache_c - * Purpose: Calls H5Pget_chunk_cache - * - * Inputs: dapl_id - Link creation property list identifier - * Outputs: - * rdcc_nslots - - * rdcc_nbytes - - * rdcc_w0 - - * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * April 13, 2009 - * Modifications: + * Name: h5pget_chunk_cache_c + * Purpose: Calls H5Pget_chunk_cache + * + * Inputs: dapl_id - Link creation property list identifier + * Outputs: + * rdcc_nslots - + * rdcc_nbytes - + * rdcc_w0 - + * + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * April 13, 2009 + * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) +h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0) { int ret_value = -1; size_t c_rdcc_nslots; @@ -5572,18 +5201,18 @@ nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb } /*---------------------------------------------------------------------------- - * Name: h5pset_file_image_c - * Purpose: Calls H5Pset_file_image + * Name: h5pset_file_image_c + * Purpose: Calls H5Pset_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5601,19 +5230,19 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len) } /*---------------------------------------------------------------------------- - * Name: h5pget_file_image_c - * Purpose: Calls H5Pget_file_image + * Name: h5pget_file_image_c + * Purpose: Calls H5Pget_file_image * - * Inputs: + * Inputs: * fapl_id - File access property list identifier - * Outputs: + * Outputs: * buf_ptr - Pointer to the initial file image, - * or NULL if no initial file image is desired + * or NULL if no initial file image is desired * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired * - * Returns: 0 on success, -1 on failure - * Programmer: M. Scot Breitenfeld - * February 19, 2012 + * Returns: 0 on success, -1 on failure + * Programmer: M. Scot Breitenfeld + * February 19, 2012 *---------------------------------------------------------------------------*/ int_f @@ -5640,3 +5269,225 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) return ret_value; } + +#ifdef H5_HAVE_PARALLEL +/****if* H5Pf/h5pset_fapl_mpio_c + * NAME + * h5pset_fapl_mpio_c + * PURPOSE + * Call H5Pset_fapl_mpio to set mode for parallel I/O and the user + * supplied communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - MPI communicator + * info - MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + c_comm = MPI_Comm_f2c(*comm); + c_info = MPI_Info_f2c(*info); + + /* + * Call H5Pset_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} +/****if* H5Pf/h5pget_fapl_mpio_c + * NAME + * h5pget_fapl_mpio_c + * PURPOSE + * Call H5Pget_fapl_mpio to retrieve communicator and info object + * INPUTS + * prp_id - property list identifier + * comm - buffer to return MPI communicator + * info - buffer to return MPI info object + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + MPI_Comm c_comm; + MPI_Info c_info; + + /* + * Call H5Pget_mpi function. + */ + c_prp_id = *prp_id; + ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info); + if (ret < 0) return ret_value; + *comm = (int_f) MPI_Comm_c2f(c_comm); + *info = (int_f) MPI_Info_c2f(c_info); + ret_value = 0; + return ret_value; +} +/****if* H5Pf/h5pset_dxpl_mpio_c + * NAME + * h5pset_dxpl_mpio_c + * PURPOSE + * Call H5Pset_dxpl_mpio to set transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, October 26, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; +/* + switch (*data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT_F: + c_data_xfer_mode = H5FD_MPIO_INDEPENDENT; + break; + + case H5FD_MPIO_COLLECTIVE_F: + c_data_xfer_mode = H5FD_MPIO_COLLECTIVE; + break; + default: + return ret_value; + } +*/ + c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode; + /* + * Call H5Pset_dxpl_mpio function. + */ + c_prp_id = *prp_id; + ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode); + if (ret < 0) return ret_value; + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_dxpl_mpio_c + * NAME + * h5pget_dxpl_mpio_c + * PURPOSE + * Call H5Pget_dxpl_mpio to get transfer mode of the dataset + * trasfer property list + * INPUTS + * prp_id - property list identifier + * data_xfer_mode - buffer to retrieve transfer mode + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal + * Thursday, June 15, 2000 + * HISTORY + * + * SOURCE +*/ +int_f +h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode) +/******/ +{ + int ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5FD_mpio_xfer_t c_data_xfer_mode; + + /* + * Call H5Pget_xfer function. + */ + c_prp_id = *prp_id; + ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode); + if (ret < 0) return ret_value; + *data_xfer_mode = (int_f)c_data_xfer_mode; +/* + switch (c_data_xfer_mode) { + + case H5FD_MPIO_INDEPENDENT: + *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F; + break; + + case H5FD_MPIO_COLLECTIVE: + *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F; + break; + + default: + return ret_value; + } +*/ + ret_value = 0; + return ret_value; +} + +/****if* H5Pf/h5pget_mpio_actual_io_mode_c + * NAME + * h5pget_mpio_actual_io_mode_c + * PURPOSE + * Calls H5Pget_mpio_actual_io_mode + * + * INPUTS + * dxpl_id - Dataset transfer property list identifier. + * OUTPUTS + * actual_io_mode - The type of I/O performed by this process. + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * July 27, 2012 + * SOURCE +*/ +int_f +h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode) +/******/ +{ + int ret_value = -1; + H5D_mpio_actual_io_mode_t c_actual_io_mode; + + /* + * Call H5Pget_mpio_actual_io_mode_f function. + */ + if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 ) + return ret_value; /* error occurred */ + + *actual_io_mode =(int_f)c_actual_io_mode; + + ret_value = 0; + return ret_value; +} +#endif /*H5_HAVE_PARALLEL*/ diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 new file mode 100644 index 0000000..97f907b --- /dev/null +++ b/fortran/src/H5Pff.F90 @@ -0,0 +1,7327 @@ +!****h* ROBODoc/H5Pff +! +! NAME +! H5P +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. *S +! 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 +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5P 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. +!***** + +#include + +MODULE H5P + + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + + INTERFACE h5pset_fapl_multi_f + MODULE PROCEDURE h5pset_fapl_multi_l + MODULE PROCEDURE h5pset_fapl_multi_s + END INTERFACE + + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_fill_value_ptr + + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_fill_value_ptr + + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_ptr + + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_ptr + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + ! Recommended procedure: + MODULE PROCEDURE h5pregister_ptr + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_char + ! Recommended procedure: + MODULE PROCEDURE h5pinsert_ptr + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pget_fill_value_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR), VALUE :: fillvalue + END FUNCTION h5pget_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pset_fill_value_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR), VALUE :: fillvalue + END FUNCTION h5pset_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pset_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value + END FUNCTION h5pset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pget_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value + END FUNCTION h5pget_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & + BIND(C, NAME='h5pregister_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pregister_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & + BIND(C, NAME='h5pinsert_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pinsert_c + END INTERFACE + +CONTAINS + +!****s* H5P/h5pcreate_f +! NAME +! h5pcreate_f +! +! PURPOSE +! Creates a new property as an instance of a property +! list class. +! +! INPUTS +! class - type of the property class to be created. +! Possible values are: +! H5P_OBJECT_CREATE_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_ACCESS_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! H5P_GROUP_CREATE_F +! H5P_GROUP_ACCESS_F +! H5P_DATATYPE_CREATE_F +! H5P_DATATYPE_ACCESS_F +! H5P_STRING_CREATE_F +! H5P_ATTRIBUTE_CREATE _F +! H5P_OBJECT_COPY_F +! H5P_LINK_CREATE_F +! H5P_LINK_ACCESS_F +! +! OUTPUTS +! prp_id - property list identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcreate_f(class, prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pcreate_c(class, prp_id) & + BIND(C,NAME='h5pcreate_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + END FUNCTION h5pcreate_c + END INTERFACE + + hdferr = h5pcreate_c(class, prp_id) + END SUBROUTINE h5pcreate_f + +!****s* H5P/h5pset_preserve_f +! NAME +! h5pset_preserve_f +! +! PURPOSE +! Sets the dataset transfer property list status to +! TRUE or FALSE for initializing compound datatype +! members during write/read operations. +! +! INPUTS +! prp_id - property list identifier +! flag - status flag +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset + ! transfer property for partila writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + + INTERFACE + INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) & + BIND(C,NAME='h5pset_preserve_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pset_preserve_c + END INTERFACE + flag_c = 0 + IF(flag) flag_c = 1 + hdferr = h5pset_preserve_c(prp_id, flag_c) + END SUBROUTINE h5pset_preserve_f + +!****s* H5P/h5pget_preserve_f +! NAME +! h5pget_preserve_f +! +! PURPOSE +! Checks status of the dataset transfer property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! flag - status flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's + ! transfer property for partial writing/reading + ! compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag_c + + INTERFACE + INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) & + BIND(C,NAME='h5pget_preserve_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pget_preserve_c + END INTERFACE + + hdferr = h5pget_preserve_c(prp_id, flag_c) + flag = .FALSE. + IF(flag_c .EQ. 1) flag = .TRUE. + END SUBROUTINE h5pget_preserve_f + +!****s* H5P/h5pget_class_f +! NAME +! h5pget_class_f +! +! PURPOSE +! Returns the property list class for a property list. +! +! INPUTS +! prp_id - property list identifier +! +! OUTPUTS +! classtype - property list class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list + ! to be created. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_c(prp_id, classtype) & + BIND(C,NAME='h5pget_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype + END FUNCTION h5pget_class_c + END INTERFACE + + hdferr = h5pget_class_c(prp_id, classtype) + END SUBROUTINE h5pget_class_f + +!****s* H5P/h5pcopy_f +! NAME +! h5pcopy_f +! +! PURPOSE +! Copies an existing property list to create a new +! property list +! +! INPUTS +! prp_id - property list identifier +! OUTPUTS +! new_prp_id - new property list identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) & + BIND(C,NAME='h5pcopy_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: new_prp_id + END FUNCTION h5pcopy_c + END INTERFACE + + hdferr = h5pcopy_c(prp_id, new_prp_id) + END SUBROUTINE h5pcopy_f + +!****s* H5P/h5pclose_f +! NAME +! h5pclose_f +! +! PURPOSE +! Terminates access to a property list. +! +! INPUTS +! prp_id - identifier of the property list to +! terminate access to. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pclose_c(prp_id) & + BIND(C,NAME='h5pclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pclose_c + END INTERFACE + + hdferr = h5pclose_c(prp_id) + END SUBROUTINE h5pclose_f + +!****s* H5P/h5pset_chunk_f +! NAME +! h5pset_chunk_f +! +! PURPOSE +! Sets the size of the chunks used to store +! a chunked layout dataset. +! +! INPUTS +! prp_id - datatset creation property list identifier +! ndims - number of dimensions for each chunk +! dims - array with dimension sizes for each chunk +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) & + BIND(C,NAME='h5pset_chunk_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + END FUNCTION h5pset_chunk_c + END INTERFACE + + hdferr = h5pset_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pset_chunk_f + +!****s* H5P/h5pget_chunk_f +! NAME +! h5pget_chunk_f +! +! PURPOSE +! Retrieves the size of chunks for the raw data of a +! chunked layout dataset +! +! INPUTS +! prp_id - property list identifier +! ndims - size of dims array +! OUTPUTS +! dims - array with dimension sizes for each chunk +! hdferr - error code +! Success: number of chunk dimensions +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to + ! to return + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims + ! Array containing sizes of + ! chunk dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! number of chunk dimensions on success, + ! -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) & + BIND(C,NAME='h5pget_chunk_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: ndims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5pget_chunk_c + END INTERFACE + + hdferr = h5pget_chunk_c(prp_id, ndims, dims) + END SUBROUTINE h5pget_chunk_f + +!****s* H5P/h5pset_deflate_f +! NAME +! h5pset_deflate_f +! +! PURPOSE +! Sets compression method and compression level. +! +! INPUTS +! prp_id - property list identifier +! level - compression level +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: level ! Compression level + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_deflate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_deflate_c(prp_id, level) & + BIND(C,NAME='h5pset_deflate_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: level + END FUNCTION h5pset_deflate_c + END INTERFACE + hdferr = h5pset_deflate_c(prp_id, level) + + END SUBROUTINE h5pset_deflate_f + +!****s* H5P/h5pget_version_f +! NAME +! h5pget_version_f +! +! PURPOSE +! Retrieves the version information of various objects +! for a file creation property list +! +! INPUTS +! prp_id - file createion property list identifier +! OUTPUTS +! boot - super block version number +! freelist - global freelist version number +! stab - symbol table version number +! shhdr - shared object header version number +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & + stab, shhdr, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot + ! block version number + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global + ! Freelist version number + + INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol + ! table version number + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared + ! object header version number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) & + BIND(C,NAME='h5pget_version_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(OUT) :: boot + INTEGER, DIMENSION(*), INTENT(OUT) :: freelist + INTEGER, DIMENSION(*), INTENT(OUT) :: stab + INTEGER, DIMENSION(*), INTENT(OUT) :: shhdr + END FUNCTION h5pget_version_c + END INTERFACE + + hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + END SUBROUTINE h5pget_version_f + +!****s* H5P/h5pset_userblock_f +! NAME +! h5pset_userblock_f +! +! PURPOSE +! Sets user block size +! +! INPUTS +! prp_id - file creation property list to modify +! size - size of the user-block in bytes +! +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_userblock_c(prp_id, size) & + BIND(C,NAME='h5pset_userblock_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_userblock_c + END INTERFACE + + hdferr = h5pset_userblock_c(prp_id, size) + END SUBROUTINE h5pset_userblock_f + +!****s* H5P/h5pget_userblock_f +! NAME +! h5pget_userblock_f +! +! PURPOSE +! Gets user block size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! block_size - size of the user block in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the + ! user-block in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) & + BIND(C,NAME='h5pget_userblock_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: block_size + END FUNCTION h5pget_userblock_c + END INTERFACE + hdferr = h5pget_userblock_c(prp_id, block_size) + END SUBROUTINE h5pget_userblock_f + +!****s* H5P/h5pset_sizes_f +! NAME +! h5pset_sizes_f +! +! PURPOSE +! Sets the byte size of the offsets and lengths used +! to address objects in an HDF5 file. +! +! INPUTS +! prp_id - file creation property list identifier +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) & + BIND(C,NAME='h5pset_sizes_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size + END FUNCTION h5pset_sizes_c + END INTERFACE + + hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pset_sizes_f + +!****s* H5P/h5pget_sizes_f +! NAME +! h5pget_sizes_f +! +! PURPOSE +! Retrieves the size of the offsets and lengths used +! in an HDF5 file +! +! INPUTS +! prp_id - file creation property list identifier +! OUTPUTS +! +! sizeof_addr - size of an object offset in bytes +! sizeof_size - size of an object length in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object + ! length in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) & + BIND(C,NAME='h5pget_sizes_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size + END FUNCTION h5pget_sizes_c + END INTERFACE + + hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + END SUBROUTINE h5pget_sizes_f + +!****s* H5P/h5pset_sym_k_f +! NAME +! h5pset_sym_k_f +! +! PURPOSE +! Sets the size of parameters used to control the +!symbol table nodes +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - symbol table tree rank +! lk - symbol table node size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! Symbol table tree rank + INTEGER, INTENT(IN) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) & + BIND(C,NAME='h5pset_sym_k_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(IN) :: lk + END FUNCTION h5pset_sym_k_c + END INTERFACE + + hdferr = h5pset_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pset_sym_k_f +!****s* H5P/h5pget_sym_k_f +! NAME +! h5pget_sym_k_f +! +! PURPOSE +! Retrieves the size of the symbol table B-tree 1/2 rank +! and the symbol table leaf node 1/2 size. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - symbol table tree 1/2 rank +! lk - symbol table node 1/2 size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank + INTEGER, INTENT(OUT) :: lk ! Symbol table node size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) & + BIND(C,NAME='h5pget_sym_k_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: lk + END FUNCTION h5pget_sym_k_c + END INTERFACE + + hdferr = h5pget_sym_k_c(prp_id, ik, lk) + END SUBROUTINE h5pget_sym_k_f +!****s* H5P/h5pset_istore_k_f +! NAME +! h5pset_istore_k_f +! +! PURPOSE +! Sets the size of the parameter used to control the +! B-trees for indexing chunked datasets +! +! INPUTS +! +! prp_id - file creation property list identifier +! ik - 1/2 rank of chunked storage B-tree +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) & + BIND(C,NAME='h5pset_istore_k_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + END FUNCTION h5pset_istore_k_c + END INTERFACE + + hdferr = h5pset_istore_k_c(prp_id, ik) + END SUBROUTINE h5pset_istore_k_f + +!****s* H5P/h5pget_istore_k_f +! NAME +! h5pget_istore_k_f +! +! PURPOSE +! Queries the 1/2 rank of an indexed storage B-tree. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! ik - 1/2 rank of chunked storage B-tree +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) & + BIND(C,NAME='h5pget_istore_k_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + END FUNCTION h5pget_istore_k_c + END INTERFACE + + hdferr = h5pget_istore_k_c(prp_id, ik) + END SUBROUTINE h5pget_istore_k_f + +!****s* H5P/h5pget_driver_f +! NAME +! h5pget_driver_f +! +! PURPOSE +! Returns low-lever driver identifier. +! +! INPUTS +! +! prp_id - file access or data transfer property +! list identifier. +! OUTPUTS +! +! driver - low-level driver identifier +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_driver_c(prp_id, driver) & + BIND(C,NAME='h5pget_driver_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: driver + END FUNCTION h5pget_driver_c + END INTERFACE + + hdferr = h5pget_driver_c(prp_id, driver) + END SUBROUTINE h5pget_driver_f + +!****s* H5P/h5pset_fapl_stdio_f +! NAME +! h5pset_fapl_stdio_f +! +! PURPOSE +! Sets the standard I/O driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) & + BIND(C,NAME='h5pset_fapl_stdio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fapl_stdio_c + END INTERFACE + + hdferr = h5pset_fapl_stdio_c(prp_id) + END SUBROUTINE h5pset_fapl_stdio_f + +!****s* H5P/h5pget_stdio_f +! NAME +! h5pget_stdio_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) +! +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: io ! value indicates that the file + !access property list is set to + !the stdio driver +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_stdio_c +! hdferr = h5pget_stdio_c(prp_id, io) +! END SUBROUTINE h5pget_stdio_f + +!****s* H5P/h5pset_fapl_sec2_f +! NAME +! h5pset_fapl_sec2_f +! +! PURPOSE +! Sets the sec2 driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) & + BIND(C,NAME='h5pset_fapl_sec2_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + END FUNCTION h5pset_fapl_sec2_c + END INTERFACE + + hdferr = h5pset_fapl_sec2_c(prp_id) + END SUBROUTINE h5pset_fapl_sec2_f + +!****s* H5P/h5pget_sec2_f +! NAME +! h5pget_sec2_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file + !driver uses the functions declared + !in the unistd.h file +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! INTEGER, EXTERNAL :: h5pget_sec2_c +! hdferr = h5pget_sec2_c(prp_id, sec2) +! END SUBROUTINE h5pget_sec2_f + +!****s* H5P/h5pset_alignment_f +! NAME +! h5pset_alignment_f +! +! PURPOSE +! Sets alignment properties of a file access property list. +! +! INPUTS +! +! prp_id - file access property list identifier +! threshold - threshold value +! alignment - alignment value +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) & + BIND(C,NAME='h5pset_alignment_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: threshold + INTEGER(HSIZE_T), INTENT(IN) :: alignment + END FUNCTION h5pset_alignment_c + END INTERFACE + + hdferr = h5pset_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pset_alignment_f + +!****s* H5P/h5pget_alignment_f +! NAME +! h5pget_alignment_f +! +! PURPOSE +! Retrieves the current settings for alignment +! properties from a file access property list. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! threshold - threshold value +! alignment - alignment value +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value + INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) & + BIND(C,NAME='h5pget_alignment_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: threshold + INTEGER(HSIZE_T), INTENT(OUT) :: alignment + END FUNCTION h5pget_alignment_c + END INTERFACE + + hdferr = h5pget_alignment_c(prp_id, threshold, alignment) + END SUBROUTINE h5pget_alignment_f + +!****s* H5P/h5pset_fapl_core_f +! NAME +! h5pset_fapl_core_f +! +! PURPOSE +! Modifies the file access property list to use the +! H5FD_CORE driver. +! +! INPUTS +! prp_id - file access property list identifier +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. + LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + INTERFACE + INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) & + BIND(C,NAME='h5pset_fapl_core_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pset_fapl_core_c + END INTERFACE + backing_store_flag = 0 + IF(backing_store) backing_store_flag = 1 + hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + END SUBROUTINE h5pset_fapl_core_f + +!****s* H5P/h5pget_fapl_core_f +! NAME +! h5pget_fapl_core_f +! +! PURPOSE +! Queries core file driver properties. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. + LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that + ! entire file contents are flushed to a file + ! with the same name as this core file. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: backing_store_flag + + INTERFACE + INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) & + BIND(C,NAME='h5pget_fapl_core_c') + IMPORT :: HID_T,SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pget_fapl_core_c + END INTERFACE + + hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + backing_store =.FALSE. + IF (backing_store_flag .EQ. 1) backing_store =.TRUE. + END SUBROUTINE h5pget_fapl_core_f + +!****s* H5P/ h5pset_fapl_family_f +! NAME +! h5pset_fapl_family_f +! +! PURPOSE +! Sets the file access property list to use the family driver. +! +! INPUTS +! prp_id - file access property list identifier +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) & + BIND(C,NAME='h5pset_fapl_family_c') + IMPORT :: HID_T,HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: memb_size + INTEGER(HID_T), INTENT(IN) :: memb_plist + END FUNCTION h5pset_fapl_family_c + END INTERFACE + + hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pset_fapl_family_f + +!****s* H5P/h5pget_fapl_family_f +! NAME +! h5pget_fapl_family_f +! +! PURPOSE +! Returns file access property list information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property +! list to be used for each family member +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, + ! of each family member + INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file + ! access property list for + ! each member of the family + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) & + BIND(C,NAME='h5pget_fapl_family_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size + INTEGER(HID_T), INTENT(OUT) :: memb_plist + END FUNCTION h5pget_fapl_family_c + END INTERFACE + + hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + END SUBROUTINE h5pget_fapl_family_f + +!****s* H5P/h5pset_cache_f +! NAME +! h5pset_cache_f +! +! PURPOSE +! Sets the meta data cache and raw data chunk +! cache parameters +! +! INPUTS +! +! prp_id - file access property list identifier +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & + BIND(C,NAME='h5pset_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_cache_c + END INTERFACE + + hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pset_cache_f + +!****s* H5P/h5pget_cache_f +! NAME +! h5pget_cache_f +! +! PURPOSE +! Queries the meta data cache and raw data chunk cache +! parameters. +! +! INPUTS +! prp_id - file access property list identifier +! +! OUTPUTS +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! rdcc_w0 - preemption policy (0 or 1) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Bug fix: type of the rdcc_nelmts parameter should be INTEGER +! instead of INTEGER(SIZE_T) October 10, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) + ! in the meta data cache + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & + BIND(C,NAME='h5pget_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_cache_c + END INTERFACE + + hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) + END SUBROUTINE h5pget_cache_f + +!****s* H5P/h5pset_fapl_split_f +! NAME +! h5pset_fapl_split_f +! +! PURPOSE +! Emulates the old split file driver. +! +! INPUTS +! +! prp_id - file access property list identifier +! meta_ext - name of the extension for the metafile +! filename +! meta_plist - identifier of the meta file access property +! list +! raw_ext - name extension for the raw file filename +! raw_plist - identifier of the raw file access property list +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for + ! the metafile filename + INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file + ! access property list + CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename + INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file + ! access property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: meta_len, raw_len + INTERFACE + INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) & + BIND(C,NAME='h5pset_fapl_split_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: meta_ext + INTEGER(HID_T), INTENT(IN) :: meta_plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: raw_ext + INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER :: meta_len, raw_len + END FUNCTION h5pset_fapl_split_c + END INTERFACE + + meta_len = LEN(meta_ext) + raw_len = LEN(raw_ext) + hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + END SUBROUTINE h5pset_fapl_split_f + +!****s* H5P/h5pget_split_f +! NAME +! h5pget_split_f +! +! PURPOSE +! NOT AVAILABLE +! +! INPUTS +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! SOURCE +! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& +! raw_ext, raw_plist, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier +! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta + ! file extension to be copied to the + ! meta_ext buffer + +! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for + !the metafile filename +! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file + ! access property list +! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw + ! file extension to be copied to the + ! raw_ext buffer +! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename +! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file + !access property list +! INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_split_c +! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & +! raw_ext_size, raw_ext, raw_plist ) +! END SUBROUTINE h5pget_split_f + +!****s* H5P/h5pset_gc_references_f +! NAME +! h5pset_gc_references_f +! +! PURPOSE +! Sets garbage collecting references flag. +! +! INPUTS +! +! prp_id - file access property list identifier +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) & + BIND(C,NAME='h5pset_gc_references_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: gc_reference + END FUNCTION h5pset_gc_references_c + END INTERFACE + + hdferr = h5pset_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pset_gc_references_f + +!****s* H5P/h5pget_gc_references_f +! NAME +! h5pget_gc_references_f +! +! PURPOSE +! Returns garbage collecting references setting. +! +! INPUTS +! +! prp_id - file access property list identifier +! OUTPUTS +! +! gc_reference - flag for stting garbage collection on +! and off (1 or 0) +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting + ! references for the file + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) & + BIND(C,NAME='h5pget_gc_references_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: gc_reference + END FUNCTION h5pget_gc_references_c + END INTERFACE + + hdferr = h5pget_gc_references_c(prp_id, gc_reference) + END SUBROUTINE h5pget_gc_references_f + +!****s* H5P/h5pset_layout_f +! NAME +! h5pset_layout_f +! +! PURPOSE +! Sets the type of storage used store the raw data +! for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F + ! H5D_CONTIGUOUS_F + ! H5D_CHUNKED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_layout_c(prp_id, layout) & + BIND(C,NAME='h5pset_layout_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: layout + END FUNCTION h5pset_layout_c + END INTERFACE + + hdferr = h5pset_layout_c(prp_id, layout) + END SUBROUTINE h5pset_layout_f + +!****s* H5P/h5pget_layout_f +! NAME +! h5pget_layout_f +! +! PURPOSE +! Returns the layout of the raw data for a dataset. +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! layout - type of storage layout for raw data +! possible values are: +! H5D_COMPACT_F +! H5D_CONTIGUOUS_F +! H5D_CHUNKED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data + ! possible values are: + ! H5D_COMPACT_F(0) + ! H5D_CONTIGUOUS_F(1) + ! H5D_CHUNKED_F(2) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_layout_c(prp_id, layout) & + BIND(C,NAME='h5pget_layout_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: layout + END FUNCTION h5pget_layout_c + END INTERFACE + + hdferr = h5pget_layout_c(prp_id, layout) + END SUBROUTINE h5pget_layout_f + +!****s* H5P/h5pset_filter_f +! NAME +! h5pset_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be added to the pipeline +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! February, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & + BIND(C,NAME='h5pset_filter_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pset_filter_c + END INTERFACE + + hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pset_filter_f + +!****s* H5P/h5pget_nfilters_f +! NAME +! h5pget_nfilters_f +! +! PURPOSE +! Returns the number of filters in the pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! nfilters - number of filters in the pipeline +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) & + BIND(C,NAME='h5pget_nfilters_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: nfilters + END FUNCTION h5pget_nfilters_c + END INTERFACE + + hdferr = h5pget_nfilters_c(prp_id, nfilters) + END SUBROUTINE h5pget_nfilters_f + +!****s* H5P/h5pget_filter_f +! NAME +! h5pget_filter_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter_number - sequence number within the filter +! pipeline of the filter for which +! information is sought +! OUTPUTS +! +! filter_id - filter identification number +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter + ! pipeline of the filter for which + ! information is sought + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: filter_id ! Filter identification number + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + +! INTEGER, EXTERNAL :: h5pget_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) & + BIND(C,NAME='h5pget_filter_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_number + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: filter_id + END FUNCTION h5pget_filter_c + END INTERFACE + + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + END SUBROUTINE h5pget_filter_f + +!****s* H5P/h5pset_external_f +! NAME +! h5pset_external_f +! +! PURPOSE +! Adds an external file to the list of external files. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data. +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file + 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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) & + BIND(C,NAME='h5pset_external_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, OFF_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(OFF_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: bytes + END FUNCTION h5pset_external_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) + END SUBROUTINE h5pset_external_f + +!****s* H5P/h5pget_external_count_f +! NAME +! h5pget_external_count_f +! +! PURPOSE +! Returns the number of external files for a dataset. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! count - number of external files for the +! specified dataset +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: count ! Number of external files for the + ! Specified dataset + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_external_count_c(prp_id, count) & + BIND(C,NAME='h5pget_external_count_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: count + END FUNCTION h5pget_external_count_c + END INTERFACE + + hdferr = h5pget_external_count_c(prp_id, count) + END SUBROUTINE h5pget_external_count_f + +!****s* H5P/h5pget_external_f +! NAME +! h5pget_external_f +! +! PURPOSE +! Returns information about an external file. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! +! idx - external file index +! name_size - maximum size of name array +! name - name of the external file +! name - name of external file +! offset - offset in bytes from the beginning of the +! file to the location in the file +! where the data starts +! bytes - size of the external file data +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + 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(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 + ! file for the data + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) & + BIND(C,NAME='h5pget_external_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T, OFF_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: idx + INTEGER(SIZE_T), INTENT(IN) :: name_size + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(OFF_T), INTENT(OUT) :: offset + INTEGER(HSIZE_T), INTENT(OUT) :: bytes + END FUNCTION h5pget_external_c + END INTERFACE + + hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + END SUBROUTINE h5pget_external_f + +!****s* H5P/h5pset_btree_ratios_f +! NAME +! h5pset_btree_ratios_f +! +! PURPOSE +! Sets B-tree split ratios for a dataset transfer +! property list. +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) & + BIND(C,NAME='h5pset_btree_ratios_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(IN) :: left + REAL, INTENT(IN) :: middle + REAL, INTENT(IN) :: right + END FUNCTION h5pset_btree_ratios_c + END INTERFACE + + hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pset_btree_ratios_f + +!****s* H5P/h5pget_btree_ratios_f +! NAME +! h5pget_btree_ratios_f +! +! PURPOSE +! Gets B-tree split ratios for a dataset transfer property list +! +! INPUTS +! +! prp_id - the dataset transfer property list +! identifier +! OUTPUTS +! +! left - the B-tree split ratio for left-most nodes +! middle - the B-tree split ratio for all other nodes +! right - the B-tree split ratio for right-most nodes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Fortran90 Interface: + SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. + REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) & + BIND(C,NAME='h5pget_btree_ratios_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(OUT) :: left + REAL, INTENT(OUT) :: middle + REAL, INTENT(OUT) :: right + END FUNCTION h5pget_btree_ratios_c + END INTERFACE + + hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) + END SUBROUTINE h5pget_btree_ratios_f + +!****s* H5P/h5pget_fclose_degree_f +! NAME +! h5pget_fclose_degree_f +! +! PURPOSE +! Returns the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(OUT) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) & + BIND(C,NAME='h5pget_fclose_degree_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: degree + END FUNCTION h5pget_fclose_degree_c + END INTERFACE + + hdferr = h5pget_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pget_fclose_degree_f + +!****s* H5P/h5pset_fclose_degree_f +! NAME +! h5pset_fclose_degree_f +! +! PURPOSE +! Sets the degree for the file close behavior. +! +! INPUTS +! +! fapl_id - file access property list identifier +! degree - Possible values are: +! H5F_CLOSE_DEFAULT_F +! H5F_CLOSE_WEAK_F +! H5F_CLOSE_SEMI_F +! H5F_CLOSE_STRONG_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(IN) :: degree ! Possible values are: + ! H5F_CLOSE_DEFAULT_F + ! H5F_CLOSE_WEAK_F + ! H5F_CLOSE_SEMI_F + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) & + BIND(C,NAME='h5pset_fclose_degree_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: degree + END FUNCTION h5pset_fclose_degree_c + END INTERFACE + + hdferr = h5pset_fclose_degree_c(fapl_id, degree) + END SUBROUTINE h5pset_fclose_degree_f + +!****s* H5P/h5pequal_f +! NAME +! h5pequal_f +! +! PURPOSE +! Checks if two property lists are eqaul +! +! INPUTS +! +! plist1_id - property list identifier +! plist2_id - property list identifier +! OUTPUTS +! +! flag - flag, possible values +! .TRUE. or .FALSE. +! hdferr: - error code +! Success: 0 +! Failure: -1, flag is set to .FALSE. +! +! AUTHOR +! Elena Pourmal +! September 30, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier + LOGICAL, INTENT(OUT) :: flag ! Flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) & + BIND(C,NAME='h5pequal_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist1_id + INTEGER(HID_T), INTENT(IN) :: plist2_id + INTEGER, INTENT(OUT) :: c_flag + END FUNCTION h5pequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + IF (c_flag .GT. 0) flag = .TRUE. + END SUBROUTINE h5pequal_f + +!****s* H5P/h5pset_buffer_f +! NAME +! h5pset_buffer_f +! +! PURPOSE +! Sets sixe for conversion buffer +! +! INPUTS +! plist_id - data transfer property list identifier +! size - buffer size +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) & + BIND(C,NAME='h5pset_buffer_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_buffer_c + END INTERFACE + + hdferr = h5pset_buffer_c(plist_id, size) + END SUBROUTINE h5pset_buffer_f + +!****s* H5P/h5pget_buffer_f +! NAME +! h5pget_buffer_f +! +! PURPOSE +! Gets size for conversion buffer +! +! INPUTS +! +! plist_id - data transfer property list identifier +! OUTPUTS +! +! size - buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 2, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by + ! the library. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) & + BIND(C,NAME='h5pget_buffer_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_buffer_c + END INTERFACE + + hdferr = h5pget_buffer_c(plist_id, size) + END SUBROUTINE h5pget_buffer_f + +!****s* H5P/h5pfill_value_defined_f +! NAME +! h5pfill_value_defined_f +! +! PURPOSE +! Check if fill value is defined. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - fill value status flag +! Possible values are: +! H5D_FILL_VALUE_ERROR_F +! H5D_FILL_VALUE_UNDEFINED_F +! H5D_FILL_VALUE_DEFAULT_F +! H5D_FILL_VALUE_USER_DEFINED_F +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill value status flag + ! H5D_FILL_VALUE_ERROR_F + ! H5D_FILL_VALUE_UNDEFINED_F + ! H5D_FILL_VALUE_DEFAULT_F + ! H5D_FILL_VALUE_USER_DEFINED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) & + BIND(C,NAME='h5pfill_value_defined_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pfill_value_defined_c + END INTERFACE + + hdferr = h5pfill_value_defined_c(plist_id, flag) + END SUBROUTINE h5pfill_value_defined_f + +!****s* H5P/h5pset_alloc_time_f +! NAME +! h5pset_alloc_time_f +! +! PURPOSE +! Set space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) & + BIND(C,NAME='h5pset_alloc_time_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_alloc_time_c + END INTERFACE + + hdferr = h5pset_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pset_alloc_time_f + +!****s* H5P/h5pget_alloc_time_f +! NAME +! h5pget_alloc_time_f +! +! PURPOSE +! Get space allocation time for dataset during creation. +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! flag - allocation time flag: +! H5D_ALLOC_TIME_ERROR_F +! H5D_ALLOC_TIME_DEFAULT_F +! H5D_ALLOC_TIME_EARLY_F +! H5D_ALLOC_TIME_LATE_F +! H5D_ALLOC_TIME_INCR_F +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Allocation time flag: + ! H5D_ALLOC_TIME_ERROR_F + ! H5D_ALLOC_TIME_DEFAULT_F + ! H5D_ALLOC_TIME_EARLY_F + ! H5D_ALLOC_TIME_LATE_F + ! H5D_ALLOC_TIME_INCR_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) & + BIND(C,NAME='h5pget_alloc_time_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_alloc_time_c + END INTERFACE + + hdferr = h5pget_alloc_time_c(plist_id, flag) + END SUBROUTINE h5pget_alloc_time_f + +!****s* H5P/h5pset_fill_time_f +! NAME +! h5pset_fill_time_f +! +! PURPOSE +! Set fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(IN) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) & + BIND(C,NAME='h5pset_fill_time_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fill_time_c + END INTERFACE + + hdferr = h5pset_fill_time_c(plist_id, flag) + END SUBROUTINE h5pset_fill_time_f + +!****s* H5P/h5pget_fill_time_f +! NAME +! h5pget_fill_time_f +! +! PURPOSE +! Get fill value writing time for dataset +! +! INPUTS +! +! plist_id - dataset creation property list identifier +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! OPTIONAL PARAMETERS +! +! flag - fill time flag: +! H5D_FILL_TIME_ERROR_F +! H5D_FILL_TIME_ALLOC_F +! H5D_FILL_TIME_NEVER_F +! AUTHOR +! Elena Pourmal +! October 4, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier + INTEGER, INTENT(OUT) :: flag ! Fill time flag: + ! H5D_FILL_TIME_ERROR_F + ! H5D_FILL_TIME_ALLOC_F + ! H5D_FILL_TIME_NEVER_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) & + BIND(C,NAME='h5pget_fill_time_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fill_time_c + END INTERFACE + + hdferr = h5pget_fill_time_c(plist_id, flag) + END SUBROUTINE h5pget_fill_time_f + +!****s* H5P/ h5pset_meta_block_size_f +! NAME +! h5pset_meta_block_size_f +! +! PURPOSE +! Sets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! size - metatdata block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) & + BIND(C,NAME='h5pset_meta_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_meta_block_size_c + END INTERFACE + + hdferr = h5pset_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pset_meta_block_size_f + +!****s* H5P/h5pget_meta_block_size_f +! NAME +! h5pget_meta_block_size_f +! +! PURPOSE +! Gets the minimum size of metadata block allocations +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - metatdata block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) & + BIND(C,NAME='h5pget_meta_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_meta_block_size_c + END INTERFACE + + hdferr = h5pget_meta_block_size_c(plist_id, size) + END SUBROUTINE h5pget_meta_block_size_f + +!****s* H5P/h5pset_sieve_buf_size_f +! NAME +! h5pset_sieve_buf_size_f +! +! PURPOSE +! Sets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! size - sieve buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) & + BIND(C,NAME='h5pset_sieve_buf_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_sieve_buf_size_c + END INTERFACE + + hdferr = h5pset_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pset_sieve_buf_size_f + +!****s* H5P/h5pget_sieve_buf_size_f +! NAME +! h5pget_sieve_buf_size_f +! +! PURPOSE +! Gets the maximum size of the data sieve buffer +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - sieve buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) & + BIND(C,NAME='h5pget_sieve_buf_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_sieve_buf_size_c + END INTERFACE + + hdferr = h5pget_sieve_buf_size_c(plist_id, size) + END SUBROUTINE h5pget_sieve_buf_size_f + +!****s* H5P/h5pset_small_data_block_size_f +! NAME +! h5pset_small_data_block_size_f +! +! PURPOSE +! Sets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! size - small raw data block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) & + BIND(C,NAME='h5pset_small_data_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_small_data_block_size_c + END INTERFACE + + hdferr = h5pset_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pset_small_data_block_size_f + +!****s* H5P/h5pget_small_data_block_size_f +! NAME +! h5pget_small_data_block_size_f +! +! PURPOSE +! Gets the minimum size of "small" raw data block +! +! INPUTS +! +! plist_id - file access property list identifier +! OUTPUTS +! +! size - small raw data block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) & + BIND(C,NAME='h5pget_small_data_block_size_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_small_data_block_size_c + END INTERFACE + + hdferr = h5pget_small_data_block_size_c(plist_id, size) + END SUBROUTINE h5pget_small_data_block_size_f + +!****s* H5P/h5pset_hyper_vector_size_f +! NAME +! h5pset_hyper_vector_size_f +! +! PURPOSE +! Set the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! size - vector size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) & + BIND(C,NAME='h5pset_hyper_vector_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_hyper_vector_size_c + END INTERFACE + + hdferr = h5pset_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pset_hyper_vector_size_f + +!****s* H5P/ h5pget_hyper_vector_size_f +! NAME +! h5pget_hyper_vector_size_f +! +! PURPOSE +! Get the number of "I/O" vectors (vector size) +! +! INPUTS +! +! plist_id - dataset transfer property list identifier +! OUTPUTS +! +! size - vector size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) & + BIND(C,NAME='h5pget_hyper_vector_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_hyper_vector_size_c + END INTERFACE + + hdferr = h5pget_hyper_vector_size_c(plist_id, size) + END SUBROUTINE h5pget_hyper_vector_size_f + +!****s* H5P/h5pexist_f +! NAME +! h5pexist_f +! +! PURPOSE +! Queries whether a property name exists in a property list or class. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to check for +! OUTPUTS +! +! flag - logical flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) & + BIND(C,NAME='h5pexist_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pexist_c + END INTERFACE + flag = .FALSE. + name_len = LEN(name) + hdferr = h5pexist_c(prp_id, name , name_len) + IF (hdferr > 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pexist_f + +!****s* H5P/h5pget_size_f +! +! NAME +! h5pget_size_f +! +! PURPOSE +! Queries the size of a property value in bytes. +! +! INPUTS +! +! prp_id - property list identifier to query +! name - name of property to query +! OUTPUTS +! +! size - size of property in bytes +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query + INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) & + BIND(C,NAME='h5pget_size_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_size_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pget_size_c(prp_id, name , name_len, size) + END SUBROUTINE h5pget_size_f + +!****s* H5P/h5pget_npros_f +! NAME +! h5pget_npros_f +! +! PURPOSE +! Queries number of properties in property list or class +! +! INPUTS +! +! prp_id - iproperty list identifier to query +! OUTPUTS +! +! nprops - number of properties in property object +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) & + BIND(C,NAME='h5pget_nprops_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: nprops + END FUNCTION h5pget_nprops_c + END INTERFACE + hdferr = h5pget_nprops_c(prp_id, nprops) + END SUBROUTINE h5pget_nprops_f + +!****s* H5P/h5pget_class_name_f +! NAME +! h5pget_class_name_f +! +! PURPOSE +! Queries the name of a class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! name - name of a class +! size - Actual length of the class name +! NOTE: If provided buffer "name" is smaller, +! than name will be truncated to fit into +! provided user buffer. +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Returned the size of name as an argument +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name + INTEGER, INTENT(OUT) :: size ! Actual length of the class name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) & + BIND(C,NAME='h5pget_class_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pget_class_name_c + END INTERFACE + + name_len = LEN(name) + size = h5pget_class_name_c(prp_id, name, name_len) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE h5pget_class_name_f + +!****s* H5P/h5pget_class_parent_f +! NAME +! h5pget_class_parent_f +! +! PURPOSE +! Retrieves the parent class of a genric property class. +! +! INPUTS +! +! prp_id - property list identifier to query +! OUTPUTS +! +! parent_id - identifier of the parent class +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list + ! identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) & + BIND(C,NAME='h5pget_class_parent_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: parent_id + END FUNCTION h5pget_class_parent_c + END INTERFACE + hdferr = h5pget_class_parent_c(prp_id, parent_id) + END SUBROUTINE h5pget_class_parent_f + +!****s* H5P/h5pisa_class_f +! NAME +! h5pisa_class_f +! +! PURPOSE +! Determines whether a property list is a member of a class. +! +! INPUTS +! +! plist - property list identifier +! pclass - identifier of the property class +! OUTPUTS +! +! flag - .TRUE. if a member, .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier + LOGICAL, INTENT(OUT) :: flag ! logical flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pisa_class_c(plist, pclass) & + BIND(C,NAME='h5pisa_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist + INTEGER(HID_T), INTENT(IN) :: pclass + END FUNCTION h5pisa_class_c + END INTERFACE + flag = .FALSE. + hdferr = h5pisa_class_c(plist, pclass) + IF (hdferr .GT. 0) THEN + flag = .TRUE. + hdferr = 0 + ENDIF + END SUBROUTINE h5pisa_class_f + +!****s* H5P/h5pcopy_prop_f +! NAME +! h5pcopy_prop_f +! +! PURPOSE +! Copies a property from one list or class to another. +! +! INPUTS +! +! dst_id - Identifier of the destination property list +! src_id - Identifier of the source property list +! name - name of the property to copy +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list + ! identifier + INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Property name + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) & + BIND(C,NAME='h5pcopy_prop_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER(HID_T), INTENT(IN) :: src_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pcopy_prop_c + END INTERFACE + name_len = LEN(name) + hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) + END SUBROUTINE h5pcopy_prop_f + +!****s* H5P/h5premove_f +! NAME +! h5premove_f +! +! PURPOSE +! Removes a property from a property list. + +! +! INPUTS +! +! plid - Property list identofoer +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5premove_f(plid, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5premove_c(plid, name, name_len) & + BIND(C,NAME='h5premove_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plid + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5premove_c + END INTERFACE + name_len = LEN(name) + hdferr = h5premove_c(plid, name , name_len) + END SUBROUTINE h5premove_f + +!****s* H5P/h5punregister_f +! NAME +! h5punregister_f +! +! PURPOSE +! Removes a property from a property list class. +! +! INPUTS +! +! class - Property list class identifier +! name - name of the property to remove +! OUTPUTS +! +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5punregister_f(class, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5punregister_c(class, name, name_len) & + BIND(C,NAME='h5punregister_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5punregister_c + END INTERFACE + name_len = LEN(name) + hdferr = h5punregister_c(class, name , name_len) + END SUBROUTINE h5punregister_f + +!****s* H5P/h5pclose_class_f +! NAME +! h5pclose_class_f +! +! PURPOSE +! Closes an existing property list class. +! +! INPUTS +! +! class - Property list class identifier +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5pclose_class_f(class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pclose_class_c(class) & + BIND(C,NAME='h5pclose_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class + END FUNCTION h5pclose_class_c + END INTERFACE + hdferr = h5pclose_class_c(class) + END SUBROUTINE h5pclose_class_f + +!****s* H5P/h5pset_shuffle_f +! NAME +! h5pset_shuffle_f +! +! PURPOSE +! Sets shuffling filter +! +! INPUTS +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_shuffle_c(prp_id) & + BIND(C,NAME='h5pset_shuffle_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_shuffle_c + END INTERFACE + hdferr = h5pset_shuffle_c(prp_id) + + END SUBROUTINE h5pset_shuffle_f + +!****s* H5P/h5pset_edc_check_f +! NAME +! h5pset_edc_check_f +! +! PURPOSE +! Enables/disables error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! flag - EDC flag; possible values: +! H5Z_DISABLE_EDC_F +! H5Z_ENABLE_EDC_F +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: flag ! Checksum filter flag + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) & + BIND(C,NAME='h5pset_edc_check_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_edc_check_c + END INTERFACE + hdferr = h5pset_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pset_edc_check_f + +!****s* H5P/h5pget_edc_check_f +! NAME +! h5pget_edc_check_f +! +! PURPOSE +! Queries error detecting +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier + INTEGER, INTENT(OUT) :: flag ! Checksum filter flag + ! May have one of the following values: + ! H5Z_ERROR_EDC_F + ! H5Z_DISABLE_EDC_F + ! H5Z_ENABLE_EDC_F + ! H5Z_NO_EDC_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) & + BIND(C,NAME='h5pget_edc_check_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_edc_check_c + END INTERFACE + hdferr = h5pget_edc_check_c(prp_id, flag) + + END SUBROUTINE h5pget_edc_check_f + +!****s* H5P/h5pset_fletcher32_f +! NAME +! h5pset_fletcher32_f +! +! PURPOSE +! Sets Fletcher32 checksum of EDC for a dataset creation +! property list. +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 13, 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fletcher32_c(prp_id) & + BIND(C,NAME='h5pset_fletcher32_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fletcher32_c + END INTERFACE + hdferr = h5pset_fletcher32_c(prp_id) + + END SUBROUTINE h5pset_fletcher32_f + +!****s* H5P/ h5pset_family_offset_f +! NAME +! h5pset_family_offset_f +! +! PURPOSE +! Sets offset for family file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! offset - file offset +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 19 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) & + BIND(C,NAME='h5pset_family_offset_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: offset + END FUNCTION h5pset_family_offset_c + END INTERFACE + hdferr = h5pset_family_offset_c(prp_id, offset) + + END SUBROUTINE h5pset_family_offset_f + +!****s* H5P/h5pset_fapl_multi_l +! NAME +! h5pset_fapl_multi_l +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 20 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: flag = 0 + INTEGER :: i + + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag) & + BIND(C,NAME='h5pset_fapl_multi_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + IF(relax) flag = 1 + hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) + + END SUBROUTINE h5pset_fapl_multi_l +!****s* H5P/h5pset_fapl_multi_s +! NAME +! h5pset_fapl_multi_s +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! relax - flag +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! 31 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag + + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) & + BIND(C,NAME='h5pset_fapl_multi_sc') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_sc + END INTERFACE + flag = 0 + IF (relax) flag = 1 + hdferr = h5pset_fapl_multi_sc(prp_id, flag) + + END SUBROUTINE h5pset_fapl_multi_s +!****s* H5P/h5pget_fapl_multi_f +! NAME +! h5pget_fapl_multi_f +! +! PURPOSE +! Sets up use of the multi-file driver. +! +! INPUTS +! +! prp_id - file creation property list identifier +! OUTPUTS +! +! mem_map - mapping array +! memb_fapl - property list for each memory usage type +! memb_name - names of member file +! relax - flag +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! OPTIONAL PARAMETERS +! maxlen_out - maximum length for memb_name array element +! +! AUTHOR +! Elena Pourmal +! 24 March 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out + LOGICAL, INTENT(OUT) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER :: flag + INTEGER :: i +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag, c_maxlen_out) & + BIND(C,NAME='h5pget_fapl_multi_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + + relax = .TRUE. + IF(flag .EQ. 0) relax = .FALSE. + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + END SUBROUTINE h5pget_fapl_multi_f +!****s* H5P/h5pset_szip_f +! NAME +! h5pset_szip_f +! +! PURPOSE +! Sets up use of szip compression +! +! INPUTS +! +! prp_id - dataset creation property list identifier +! options_mask - A bit-mask conveying the desired SZIP options. +! Current valid values in Fortran are: +! H5_SZIP_EC_OM_F +! H5_SZIP_NN_OM_F +! pixels_per_block - szip parameters +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired + ! SZIP options + ! Current valid values in Fortran are: + ! H5_SZIP_EC_OM_F + ! H5_SZIP_NN_OM_F + INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements + ! in each data block + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) & + BIND(C,NAME='h5pset_szip_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: options_mask + INTEGER, INTENT(IN) :: pixels_per_block + END FUNCTION h5pset_szip_c + END INTERFACE + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + + END SUBROUTINE h5pset_szip_f + +!****s* H5P/h5pall_filters_avail_f +! NAME +! h5pall_filters_avail_f +! +! PURPOSE +! Checks if all filters set in the dataset creation +! property list are available +! +! INPUTS +! +! prp_id - data creation property list identifier +! OUTPUTS +! +! flag - .TRUE. if all filters are available +! .FALSE. otherwise +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available + ! .FALSE. otherwise + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status + + INTERFACE + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) & + BIND(C,NAME='h5pall_filters_avail_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pall_filters_avail_c + END INTERFACE + flag = .TRUE. + hdferr = h5pall_filters_avail_c(prp_id, status) + IF (status .EQ. 0 ) flag = .FALSE. + + END SUBROUTINE h5pall_filters_avail_f + +!****s* H5P/h5pget_filter_by_id_f +! NAME +! h5pget_filter_by_id_f +! +! PURPOSE +! Returns information about a filter in a pipeline +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! OUTPUTS +! +! filter_id - filter identifier +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! namelen - number of characters in the name buffer +! name - buffer to retrieve filter name +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter_id ! Filter identifier + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. + INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general + ! properties of the filter. + INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. + CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) & + BIND(C,NAME='h5pget_filter_by_id_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_id + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + END FUNCTION h5pget_filter_by_id_c + END INTERFACE + + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + END SUBROUTINE h5pget_filter_by_id_f + +!****s* H5P/h5pmodify_filter_f +! NAME +! h5pmodify_filter_f +! +! PURPOSE +! Adds a filter to the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be modified +! flags - bit vector specifying certain general +! properties of the filter +! cd_nelmts - number of elements in cd_values +! cd_values - auxiliary data for the filter +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! April 10 2003 +! +! Fortran90 Interface: + SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: filter ! Filter to be modified + INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general + ! properties of the filter + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & + BIND(C,NAME='h5pmodify_filter_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + END FUNCTION h5pmodify_filter_c + END INTERFACE + + hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) + END SUBROUTINE h5pmodify_filter_f + +!****s* H5P/h5premove_filter_f +! NAME +! h5premove_filter_f +! +! PURPOSE +! Delete one or more filters from the filter pipeline. +! +! INPUTS +! +! prp_id - data creation or transfer property list +! identifier +! filter - filter to be removed +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Quincey Koziol +! January 27 2004 +! +! Fortran90 Interface: + SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list + ! identifier + INTEGER, INTENT(IN) :: filter ! Filter to be removed + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) & + BIND(C,NAME='h5premove_filter_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + END FUNCTION h5premove_filter_c + END INTERFACE + + hdferr = h5premove_filter_c(prp_id, filter) + END SUBROUTINE h5premove_filter_f + +!****s* H5P/H5Pget_attr_phase_change_f +! NAME +! H5Pget_attr_phase_change_f +! +! PURPOSE +! Retrieves attribute storage phase change thresholds +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + ! (Default: 8) + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pget_attr_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_attr_phase_change_c + END INTERFACE + + hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_attr_phase_change_f + +!****s* H5P/H5Pset_attr_creation_order_f +! NAME +! H5Pset_attr_creation_order_f +! +! PURPOSE +! Sets tracking and indexing of attribute creation order +! +! INPUTS +! +! ocpl_id - Object creation property list identifier +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) & + BIND(C,NAME='h5pset_attr_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5Pset_attr_creation_order_c + END INTERFACE + + hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + END SUBROUTINE h5pset_attr_creation_order_f + +!****s* H5P/H5Pset_shared_mesg_nindexes_f +! NAME +! H5Pset_shared_mesg_nindexes_f +! +! PURPOSE +! Sets number of shared object header message indexes +! +! INPUTS +! +! plist_id - file creation property list +! nindexes - Number of shared object header message indexes to be available in files created with this property list +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list + INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes + ! available in files created WITH this property list + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) & + BIND(C,NAME='h5pset_shared_mesg_nindexes_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: nindexes + + END FUNCTION H5pset_shared_mesg_nindexes_c + END INTERFACE + + hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + + END SUBROUTINE h5pset_shared_mesg_nindexes_f + +!****s* H5P/H5Pset_shared_mesg_index_f +! NAME +! H5Pset_shared_mesg_index_f +! +! PURPOSE +! Configures the specified shared object header message index +! +! INPUTS +! +! fcpl_id - File creation property list identifier. +! index_num - Index being configured. +! mesg_type_flags - Types of messages that should be stored in this index. +! min_mesg_size - Minimum message size. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list + INTEGER, INTENT(IN) :: index_num ! Index being configured. + INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. + INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) & + BIND(C,NAME='h5pset_shared_mesg_index_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER, INTENT(IN) :: index_num + INTEGER, INTENT(IN) :: mesg_type_flags + INTEGER, INTENT(IN) :: min_mesg_size + END FUNCTION H5pset_shared_mesg_index_c + END INTERFACE + + hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + END SUBROUTINE h5pset_shared_mesg_index_f + +!****s* H5P/H5Pget_attr_creation_order_f +! NAME +! H5Pget_attr_creation_order_f +! +! PURPOSE +! Retrieves tracking and indexing settings for attribute creation order +! +! INPUTS +! +! ocpl_id - Object (group or dataset) creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Flags specifying whether to track and index attribute creation order +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) & + BIND(C,NAME='h5pget_attr_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + END FUNCTION H5pget_attr_creation_order_c + END INTERFACE + + hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + END SUBROUTINE h5pget_attr_creation_order_f + +!****s* H5P/H5Pset_libver_bounds_f +! NAME +! H5Pset_libver_bounds_f +! +! PURPOSE +! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. +! +! INPUTS +! +! fapl_id - File access property list identifier +! low - The earliest version of the library that will be used for writing objects. +! high - The latest version of the library that will be used for writing objects. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. + ! Currently, low must be one of two pre-defined values: + ! HDF_LIBVER_EARLIEST_F + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. + ! Currently, low must set to the pre-defined value: + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) & + BIND(C,NAME='h5pset_libver_bounds_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: low + INTEGER, INTENT(IN) :: high + + END FUNCTION H5pset_libver_bounds_c + END INTERFACE + + hdferr = h5pset_libver_bounds_c(fapl_id, low, high) + + END SUBROUTINE h5pset_libver_bounds_f + +!****s* H5P/H5Pset_link_creation_order_f +! NAME +! H5Pset_link_creation_order_f +! +! PURPOSE +! Sets creation order tracking and indexing for links in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! crt_order_flags - Creation order flag(s) +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 18, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier + INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) & + BIND(C,NAME='h5pset_link_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5pset_link_creation_order_c + END INTERFACE + + hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pset_link_creation_order_f + +!****s* H5P/H5Pget_link_phase_change_f +! NAME +! H5Pget_link_phase_change_f +! +! PURPOSE +! Queries the settings for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 20, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pget_link_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_link_phase_change_c + END INTERFACE + + hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pget_link_phase_change_f + +!****s* H5P/H5Pget_obj_track_times_f +! NAME +! H5Pget_obj_track_times_f +! +! PURPOSE +! Returns whether times are tracked for an object. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) & + BIND(C,NAME='h5pget_obj_track_times_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pget_obj_track_times_c + END INTERFACE + flag = .TRUE. + hdferr = h5pget_obj_track_times_c(plist_id, status) + IF(status.EQ.0) flag = .FALSE. + + END SUBROUTINE h5pget_obj_track_times_f + +!****s* H5P/H5Pset_obj_track_times_f +! NAME +! H5Pset_obj_track_times_f +! +! PURPOSE +! Set whether the birth, access, modification & change times for +! an object are stored. +! +! Birth time is the time the object was created. Access time is +! the last time that metadata or raw data was read from this +! object. Modification time is the last time the data for +! this object was changed (either writing raw data to a dataset +! or inserting/modifying/deleting a link in a group). Change +! time is the last time the metadata for this object was written +! (adding/modifying/deleting an attribute on an object, extending +! the size of a dataset, etc). +! +! If these times are not tracked, they will be reported as +! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX +! epoch) when queried. +! +! INPUTS +! +! plist_id - property list id +! flag - object timestamp setting +! .TRUE.,.FALSE. +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier + LOGICAL, INTENT(IN) :: flag ! Object timestamp setting + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) & + BIND(C,NAME='h5pset_obj_track_times_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(IN) :: status + END FUNCTION h5pset_obj_track_times_c + END INTERFACE + + status = 0 + IF(flag) status = 1 + + hdferr = h5pset_obj_track_times_c(plist_id, status) + + END SUBROUTINE h5pset_obj_track_times_f + +!****s* H5P/H5Pset_create_inter_group_f +! NAME +! H5Pset_create_inter_group_f +! +! PURPOSE +! Specifies in property list whether to create missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - crt_intermed_group specifying whether +! to create intermediate groups upon the creation +! of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 22, 2008 +! +! HISTORY +! The long subroutine name (>31) on older f90 compilers causes problems +! so had to shorten the name +! Fortran90 Interface: + SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups + ! upon the creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) & + BIND(C,NAME='h5pset_create_inter_group_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pset_create_inter_group_c + END INTERFACE + + hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pset_create_inter_group_f + +!****s* H5P/H5Pget_link_creation_order_f +! NAME +! H5Pget_link_creation_order_f +! +! PURPOSE +! Queries whether link creation order is tracked and/or indexed in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! +! OUTPUTS +! +! crt_order_flags - Creation order flag(s) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) & + BIND(C,NAME='h5pget_link_creation_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_link_creation_order_c + END INTERFACE + + hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + END SUBROUTINE h5pget_link_creation_order_f + +!****s* H5P/H5Pset_char_encoding_f +! NAME +! H5Pset_char_encoding_f +! +! PURPOSE +! Sets the character encoding used to encode a string. +! +! INPUTS +! +! plist_id - Property list identifier +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! +! OUTPUTS +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + INTEGER, INTENT(IN) :: encoding ! String encoding character set: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) & + BIND(C,NAME='h5pset_char_encoding_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: encoding + + END FUNCTION H5pset_char_encoding_c + END INTERFACE + + hdferr = h5pset_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pset_char_encoding_f + +!****s* H5P/H5Pget_char_encoding_f +! NAME +! H5Pget_char_encoding_f +! +! PURPOSE +! Retrieves the character encoding used to create a string +! +! INPUTS +! +! plist_id - Property list identifier +! +! OUTPUTS +! +! encoding - Valid values for encoding are: +! H5T_CSET_ASCII_F -> US ASCII +! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + + INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: + ! H5T_CSET_ASCII_F -> US ASCII + ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) & + BIND(C,NAME='h5pget_char_encoding_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: encoding + + END FUNCTION H5pget_char_encoding_c + END INTERFACE + + hdferr = h5pget_char_encoding_c(plist_id, encoding) + + END SUBROUTINE h5pget_char_encoding_f + +!****s* H5P/h5pset_copy_object_f +! NAME +! h5pset_copy_object_f +! +! PURPOSE +! Sets properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! copy_options - Copy option(s) to be set +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) & + BIND(C,NAME='h5pset_copy_object_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(IN) :: copy_options + END FUNCTION h5pset_copy_object_c + END INTERFACE + hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pset_copy_object_f + +!****s* H5P/h5pget_copy_object_f +! NAME +! h5pget_copy_object_f +! +! PURPOSE +! Retrieves the properties to be used when an object is copied. +! +! INPUTS +! +! ocp_plist_id - Object copy property list identifier +! OUTPUTS +! +! copy_options - Copy option(s) to be get +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 3, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier + INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: + ! H5O_COPY_SHALLOW_HIERARCHY_F + ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_EXT_LINK_F + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) & + BIND(C,NAME='h5pget_copy_object_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(OUT) :: copy_options + END FUNCTION h5pget_copy_object_c + END INTERFACE + hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) + END SUBROUTINE h5pget_copy_object_f + +!****s* H5P/h5pget_data_transform_f +! NAME +! h5pget_data_transform_f +! +! PURPOSE +! Retrieves a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! OUTPUTS +! +! expression - buffer to hold transform expression +! hdferr - Error code +! Success: Actual lenght of the expression +! If provided buffer "expression" is +! smaller, than expression will be +! truncated to fit into +! provided user buffer +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! HISTORY +! +! Should hdferr return just 0 or 1 and add another arguement for the size? +! Fortran90 Interface: +SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) & + BIND(C,NAME='h5pget_data_transform_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: expression + INTEGER(SIZE_T) :: size_default + INTEGER :: expression_len + END FUNCTION h5pget_data_transform_c + END INTERFACE + + size_default = 0 + expression_len = LEN(expression) + + hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + + IF(present(size)) size = size_default + + END SUBROUTINE h5pget_data_transform_f + +!****s* H5P/h5pset_data_transform_f +! NAME +! h5pset_data_transform_f +! +! PURPOSE +! Sets a data transform expression. +! +! INPUTS +! +! plist_id - Identifier of the property list or class +! expression - Buffer to hold transform expression +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 19, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class + CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: expression_len + + INTERFACE + INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) & + BIND(C,NAME='h5pset_data_transform_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: expression + INTEGER :: expression_len + END FUNCTION h5pset_data_transform_c + END INTERFACE + + expression_len = LEN(expression) + hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) + + END SUBROUTINE h5pset_data_transform_f + +!****s* H5P/H5Pget_local_heap_size_hint_f +! NAME +! H5Pget_local_heap_size_hint_f +! +! PURPOSE +! Queries the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! size_hint - Hint for size of local heap +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) & + BIND(C,NAME='h5pget_local_heap_size_hint_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(OUT) :: size_hint + END FUNCTION H5Pget_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pget_local_heap_size_hint_f + +!****s* H5P/H5Pget_est_link_info_f +! NAME +! H5Pget_est_link_info_f +! +! PURPOSE +! Queries data required to estimate required local heap or object header size. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! OUTPUTS +! +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & + BIND(C,NAME='h5pget_est_link_info_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: est_num_entries + INTEGER, INTENT(OUT) :: est_name_len + END FUNCTION h5pget_est_link_info_c + END INTERFACE + + hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pget_est_link_info_f + +!****s* H5P/H5Pset_local_heap_size_hint_f +! NAME +! H5Pset_local_heap_size_hint_f +! +! PURPOSE +! Sets the local heap size hint for original-style groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! size_hint - Hint for size of local heap +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) & + BIND(C,NAME='h5pset_local_heap_size_hint_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(IN) :: size_hint + END FUNCTION h5pset_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) + + END SUBROUTINE h5pset_local_heap_size_hint_f + +!****s* H5P/h5pset_est_link_info_f +! NAME +! h5pset_est_link_info_f +! +! PURPOSE +! Sets estimated number of links and length of link names in a group. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! est_num_entries - Estimated number of links to be inserted into group +! est_name_len - Estimated average length of link names +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group + INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & + BIND(C,NAME='h5pset_est_link_info_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: est_num_entries + INTEGER, INTENT(IN) :: est_name_len + END FUNCTION h5pset_est_link_info_c + END INTERFACE + + hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + END SUBROUTINE h5pset_est_link_info_f + +!****s* H5P/h5pset_link_phase_change_f +! NAME +! h5pset_link_phase_change_f +! +! PURPOSE +! Sets the parameters for conversion between compact and dense groups. +! +! INPUTS +! +! gcpl_id - Group creation property list identifier +! max_compact - Maximum number of attributes to be stored in compact storage +! min_dense - Minimum number of attributes to be stored in dense storage +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pset_link_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + END FUNCTION h5pset_link_phase_change_c + END INTERFACE + + hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + END SUBROUTINE h5pset_link_phase_change_f + +!****s* H5P/h5pset_fapl_direct_f +! NAME +! h5pset_fapl_direct_f +! +! PURPOSE +! Sets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & + BIND(C,NAME='h5pset_fapl_direct_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(IN) :: alignment + INTEGER(SIZE_T), INTENT(IN) :: block_size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size + END FUNCTION h5pset_fapl_direct_c + END INTERFACE + + hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pset_fapl_direct_f + +!****s* H5P/h5pget_fapl_direct_f +! NAME +! h5pget_fapl_direct_f +! +! PURPOSE +! Gets up use of the direct I/O driver. +! +! INPUTS +! +! fapl_id - File access property list identifier +! OUTPUTS +! +! alignment - Required memory alignment boundary +! block_size - File system block size +! cbuf_size - Copy buffer size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! + INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & + BIND(C,NAME='h5pget_fapl_direct_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(OUT) :: alignment + INTEGER(SIZE_T), INTENT(OUT) :: block_size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size + END FUNCTION h5pget_fapl_direct_c + END INTERFACE + + hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pget_fapl_direct_f + +!****s* H5P/H5Pset_attr_phase_change_f +! NAME +! H5Pset_attr_phase_change_f +! +! PURPOSE +! Sets attribute storage phase change thresholds. +! +! INPUTS +! +! ocpl_id - Object (dataset or group) creation property list identifier +! OUTPUTS +! +! max_compact - Maximum number of attributes to be stored in compact storage +! (Default: 8) +! min_dense - Minimum number of attributes to be stored in dense storage +! (Default: 6) +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! January, 2008 +! +! Fortran90 Interface: +SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier + INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage + !(Default: 8) + INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage + ! (Default: 6) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) & + BIND(C,NAME='h5pset_attr_phase_change_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_attr_phase_change_c + END INTERFACE + + hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + + + END SUBROUTINE h5pset_attr_phase_change_f + +!****s* H5P/H5Pset_nbit_f +! NAME +! H5Pset_nbit_f +! +! PURPOSE +! Sets up the use of the N-Bit filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_nbit_f(plist_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION H5Pset_nbit_c(plist_id) & + BIND(C,NAME='h5pset_nbit_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + END FUNCTION H5Pset_nbit_c + END INTERFACE + + hdferr = H5Pset_nbit_c(plist_id) + + END SUBROUTINE h5pset_nbit_f + +!****s* H5P/h5pset_scaleoffset_f +! NAME +! h5pset_scaleoffset_f +! +! PURPOSE +! Sets up the use of the scale-offset filter. +! +! Inputs: +! plist_id - Dataset creation property list identifier. +! scale_type - Flag indicating compression method. Valid values: +! H5Z_SO_FLOAT_DSCALE_F +! H5Z_SO_FLOAT_ESCALE_F +! H5Z_SO_INT_F +! +! scale_factor - Parameter related to scale. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 21, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER , INTENT(IN) :: scale_type + INTEGER , INTENT(IN) :: scale_factor + INTEGER , INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) & + BIND(C,NAME='h5pset_scaleoffset_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: scale_type + INTEGER, INTENT(IN) :: scale_factor + END FUNCTION h5pset_scaleoffset_c + END INTERFACE + + hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) + + END SUBROUTINE h5pset_scaleoffset_f + +!****s* H5P/h5pset_nlinks_f +! NAME +! h5pset_nlinks_f +! +! PURPOSE +! Sets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! HISTORY +! +! +! Fortran90 Interface: + SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) & + BIND(C,NAME='h5pset_nlinks_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(IN) :: nlinks + END FUNCTION h5pset_nlinks_c + END INTERFACE + + hdferr = h5pset_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pset_nlinks_f + +!****s* H5P/h5pget_nlinks_f +! NAME +! h5pget_nlinks_f +! +! PURPOSE +! Gets maximum number of soft or user-defined link traversals. +! +! INPUTS +! +! lapl_id - File access property list identifier +! nlinks - Maximum number of links to traverse +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! March 24, 2008 +! +! Fortran90 Interface: + SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) & + BIND(C,NAME='h5pget_nlinks_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(OUT) :: nlinks + END FUNCTION h5pget_nlinks_c + END INTERFACE + + hdferr = h5pget_nlinks_c(lapl_id, nlinks) + + END SUBROUTINE h5pget_nlinks_f + +!****s* H5P/H5Pget_create_inter_group_f +! NAME +! H5Pget_create_inter_group_f +! +! PURPOSE +! Determines whether property is set to enable creating missing intermediate groups. +! +! INPUTS +! +! lcpl_id - Link creation property list identifier +! crt_intermed_group - Specifying whether to create intermediate groups upon +! the creation of an object +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 4, 2008 +! +! HISTORY +! +! The long subroutine name (>31) on older f90 compilers causes problems +! so the name was shortened +! Fortran90 Interface: + SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier + INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups + ! upon creation of an object + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) & + BIND(C,NAME='h5pget_create_inter_group_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pget_create_inter_group_c + END INTERFACE + + hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + + END SUBROUTINE h5pget_create_inter_group_f + +!****s* H5P/H5Pset_chunk_cache_f +! NAME +! H5Pset_chunk_cache_f +! +! PURPOSE +! Set the number of objects in the meta data cache and the +! maximum number of chunks and bytes in the raw data chunk cache. +! Once set, these values will override the values in the file access +! property list. Each of these values can be individually unset +! (or not set at all) by passing the macros: +! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, +! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or +! H5D_CHUNK_CACHE_W0_DFLT_F +! as appropriate. +! +! The RDCC_W0 value should be between 0 and 1 inclusive and +! indicates how much chunks that have been fully read or fully +! written are favored for preemption. A value of zero means +! fully read or written chunks are treated no differently than +! other chunks (the preemption is strictly LRU) while a value +! of one means fully read chunks are always preempted before +! other chunks. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. +! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. +! rdcc_w0 - The chunk preemption policy for this dataset. +! OUTPUTS +! +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data + ! chunk cache for this dataset. + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache + ! for this dataset. + REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + + INTERFACE + INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & + BIND(C,NAME='h5pset_chunk_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + END FUNCTION h5pset_chunk_cache_c + END INTERFACE + + hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pset_chunk_cache_f + +!****s* H5P/H5Pget_chunk_cache_f +! NAME +! H5Pget_chunk_cache_f +! +! PURPOSE +! Retrieves the maximum possible number of elements in the meta +! data cache and the maximum possible number of elements and +! bytes and the RDCC_W0 value in the raw data chunk cache. Any +! (or all) arguments may be null pointers in which case the +! corresponding datum is not returned. If these properties have +! not been set on this property list, the default values for a +! file access property list are returned. +! +! INPUTS +! +! dapl_id - Dataset access property list identifier. +! OUTPUTS +! +! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. +! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. +! rdcc_w0 - Preemption policy. +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! April 13, 2009 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. + REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & + BIND(C,NAME='h5pget_chunk_cache_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + END FUNCTION h5pget_chunk_cache_c + END INTERFACE + + hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + END SUBROUTINE h5pget_chunk_cache_f + +! +!****s* H5P (F03)/h5pset_fill_value_f_F90 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! IMPLICIT NONE +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_integer +! +!****s* H5P (F03)/h5pget_fill_value_f_F90 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(VOID) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_integer + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr ! C address + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(fillvalue) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + f_ptr = C_LOC(chr(1)(1:1)) + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + DO i = 1, chr_len + fillvalue(i:i) = chr(i) + ENDDO + DEALLOCATE(chr) + + END SUBROUTINE h5pget_fill_value_char +! +!****s* H5P (F03)/h5pset_fill_value_f_F03 +! +! NAME +! h5pset_fill_value_f +! +! PURPOSE +! Sets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! fillvalue - Fillvalue +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pset(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(IN) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pset_fill_value_ptr + +! +!****s* H5P (F03)/h5pget_fill_value_f_F03 +! +! NAME +! h5pget_fill_value_f +! +! PURPOSE +! Gets fill value for a dataset creation property list +! +! Inputs: +! prp_id - Property list identifier +! type_id - Datatype identifier of fill value datatype (in memory) +! +! Outputs: +! fillvalue - Fillvalue +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 14, 2001 +! +! Added the recommended way of passing fillvalue +! and that is by passing the C address, all other +! ways are obsolete and should be avoided. June, 2008 MSB +! +! NOTES +! h5pget(get)fill_value_f function is overloaded to support +! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: type_id +!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of + ! of fillvalue datatype + ! (in memory) + TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pget_fill_value_ptr + +! +!****s* H5P (F03)/h5pset_f_F90 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_integer + + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pset_char +! +!****s* H5P (F03)/h5pget_f_F90 +! +! NAME +! h5pget_f +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + INTEGER, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pget_integer + + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + TYPE(C_PTR) :: f_ptr + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DO i = 1, chr_len + value(i:i) = chr(i) + ENDDO + + DEALLOCATE(chr) + + END SUBROUTINE h5pget_char + +! +!****s* H5P (F03)/h5pset_f_F03 +! +! NAME +! h5pset_f +! +! PURPOSE +! Sets a property list value +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to modify +! value - Pointer to value to set the property to +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pset_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pset_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pset_ptr +! +!****s* H5P (F03)/h5pget_f_F03 +! +! NAME +! h5pget_f (F03) +! +! PURPOSE +! Queries the value of a property. +! +! Inputs: +! prp_id - Property list identifier to modify +! name - Name of property to get +! value - Pointer to a location to which to copy the value of of the property +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pget_f(plid, name, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: plid +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! TYPE(C_PTR) , INTENT(OUT) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + TYPE(C_PTR), INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, value) + + END SUBROUTINE h5pget_ptr +! +!****s* H5P (F03)/h5pregister_f_F90 +! +! NAME +! h5pregister +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_integer + + + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + DEALLOCATE(chr) + END SUBROUTINE h5pregister_char +! +!****s* H5P (F03)/h5pregister_f_F03 +! +! NAME +! h5pregister (F03) +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! Inputs: +! class - Property list class identifier +! name - Name of property to register +! size - Size of the property value +! value - Pointer to value to set the property to +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran2003 Interface: +!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: class +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + TYPE(C_PTR), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, value) + END SUBROUTINE h5pregister_ptr + +! +!****s* H5P (F03)/h5pinsert_f_F90 +! +! NAME +! h5pinsert (f90) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Property value, supported types are: +! INTEGER +! REAL +! DOUBLE PRECISION +! CHARACTER(LEN=*) +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value + INTEGER, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + END SUBROUTINE h5pinsert_integer + + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + CHARACTER(LEN=*), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(c_ptr) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + DEALLOCATE(chr) + + END SUBROUTINE h5pinsert_char + +! +!****s* H5P (F03)/h5pinsert_f_F03 +! +! NAME +! h5pinsert (f03) +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! Inputs: +! plist - Property list class identifier +! name - Name of property to insert +! size - Size of the property value +! value - Pointer to new value pointer for the property being modified +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 24, 2008 +! +! Fortran90 Interface: +!! SUBROUTINE h5pinsert_f +!! INTEGER(HID_T) , INTENT(IN) :: plist +!! CHARACTER(LEN=*), INTENT(IN) :: name +!! INTEGER(SIZE_T) , INTENT(IN) :: size +!! TYPE(C_PTR) , INTENT(IN) :: value +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert + INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value + TYPE(c_ptr), INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_ptr +! +!****s* H5P (F03)/h5pcreate_class_f_F03 +! +! NAME +! h5pcreate_class_f +! +! PURPOSE +! Create a new property list class +! +! Inputs: +! parent - Parent property list class identifier +! Possible values include: +! H5P_ROOT_F +! H5P_FILE_CREATE_F +! H5P_FILE_ACCESS_F +! H5P_DATASET_CREATE_F +! H5P_DATASET_XFER_F +! H5P_FILE_MOUNT_F +! name - Name of property to create +! +! Outputs: +! class - Property list class identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! H5P_cls_create_func_t (create) - Callback routine called when a property list is created +! create_data - User pointer to any class creation information needed +! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied +! copy_data - User pointer to any class copy information needed +! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed +! close_data - User pointer to any class close information needed +! +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! HISTORY +! Added callback arguments +! M. Scot Breitenfeld, July 3, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, & + copy, copy_data, CLOSE, close_data) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: class + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data + TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close +!***** + INTEGER :: name_len + TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default + TYPE(C_FUNPTR) :: create_default, copy_default, close_default + INTERFACE + INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & + create, create_data, copy, copy_data, close, close_data) & + BIND(C, NAME='h5pcreate_class_c') + IMPORT :: c_char, c_ptr, c_funptr + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + TYPE(C_PTR), VALUE :: create_data, copy_data, close_data + TYPE(C_FUNPTR), VALUE :: create, copy, close + END FUNCTION h5pcreate_class_c + END INTERFACE + name_len = LEN(name) + + create_default = c_null_funptr !fix:scot + create_data_default = c_null_ptr + copy_default = c_null_funptr !fix:scot + copy_data_default = c_null_ptr + close_default = c_null_funptr !fix:scot + close_data_default = c_null_ptr + + IF(PRESENT(create)) create_default = create + IF(PRESENT(create_data)) create_data_default = create_data + IF(PRESENT(copy)) copy_default = copy + IF(PRESENT(copy_data)) copy_data_default = copy_data + IF(PRESENT(close)) close_default = close + IF(PRESENT(close_data)) close_data_default = close_data + + hdferr = h5pcreate_class_c(parent, name , name_len, class, & + create_default, create_data_default, & + copy_default, copy_data_default, & + close_default, close_data_default) + + END SUBROUTINE h5pcreate_class_f + +! +!****s* H5P (F03)/h5pset_file_image_f_F03 +! +! NAME +! h5pset_file_image_f +! +! PURPOSE +! Sets an initial file image in a memory buffer. +! +! Inputs: +! fapl_id - File access property list identifier +! buf_ptr - Pointer to the initial file image, +! or C_NULL_PTR if no initial file image is desired +! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(IN) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & + BIND(C, NAME='h5pset_file_image_c') + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + END FUNCTION h5pset_file_image_c + END INTERFACE + + hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) + + END SUBROUTINE h5pset_file_image_f +! +!****s* H5P (F03)/h5pget_file_image_f_F03 +! +! NAME +! h5pget_file_image_f +! +! PURPOSE +! Retrieves a copy of the file image designated as the initial content and structure of a file. +! +! Inputs: +! fapl_id - File access property list identifier. +! +! Outputs: +! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type +! c_loc. If buf_ptr is not C_NULL_PTR, on successful +! return, buf_ptr shall contain a C pointer to a copy +! of the initial image provided in the last call to +! H5Pset_file_image_f for the supplied fapl_id, or +! buf_ptr shall contain a C_NULL_PTR if there is no +! initial image set. +! +! buf_len_ptr - Contains the value of the buffer parameter for +! the initial image in the supplied fapl_id. The value +! will be 0 if no initial image is set. +! +! +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 19, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + INTEGER , INTENT(OUT) :: hdferr + +!***** + INTERFACE + INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & + BIND(C, NAME='h5pget_file_image_c') + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + END FUNCTION h5pget_file_image_c + END INTERFACE + + hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) + + END SUBROUTINE h5pget_file_image_f + +! ********************************************************************* +! Fortran interfaces for H5P functions needed by parallel MPI programs. +! ********************************************************************* + +#ifdef H5_HAVE_PARALLEL +!****s* H5P/h5pset_fapl_mpio_f +! +! NAME +! h5pset_fapl_mpio_f +! +! PURPOSE +! Stores MPI IO communicator information to the file +! access property list. +! +! INPUTS +! prp_id - file access property list identifier +! comm - MPI-2 communicator +! info - MPI-2 info object +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5pset_fapl_mpio_c(prp_id, comm, info) & + BIND(C,NAME='h5pset_fapl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: comm + INTEGER , INTENT(IN) :: info + END FUNCTION h5pset_fapl_mpio_c + END INTERFACE + + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + + END SUBROUTINE h5pset_fapl_mpio_f + +!****s* H5P/h5pget_fapl_mpio_f +! +! NAME +! h5pget_fapl_mpio_f +! +! PURPOSE +! Returns MPI communicator information. +! +! INPUTS +! prp_id - file access property list identifier +! OUTPUTS +! comm - MPI-2 communicator +! info - MPI-2 info object +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: comm ! buffer to return communicator + INTEGER, INTENT(OUT) :: info ! buffer to return info object + ! as defined in MPI_FILE_OPEN of MPI-2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5pget_fapl_mpio_c(prp_id, comm, info) & + BIND(C,NAME='h5pget_fapl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(OUT) :: comm + INTEGER , INTENT(OUT) :: info + END FUNCTION h5pget_fapl_mpio_c + END INTERFACE + + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + + END SUBROUTINE h5pget_fapl_mpio_f + +!****s* H5P/h5pset_dxpl_mpio_f +! +! NAME +! h5pset_dxpl_mpio_f +! +! PURPOSE +! Sets data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! data_xfer_mode - transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) & + BIND(C,NAME='h5pset_dxpl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(IN) :: data_xfer_mode + END FUNCTION h5pset_dxpl_mpio_c + END INTERFACE + + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pset_dxpl_mpio_f + +!****s* H5P/h5pget_dxpl_mpio_f +! +! NAME +! h5pget_dxpl_mpio_f +! +! PURPOSE +! Returns the data transfer mode. +! +! INPUTS +! prp_id - data transfer property list identifier +! OUTPUTS +! data_xfer_mode- transfer mode; possible values are: +! H5FD_MPIO_INDEPENDENT_F +! H5FD_MPIO_COLLECTIVE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! November, 2000 +! +! SOURCE + SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: + ! H5FD_MPIO_INDEPENDENT_F + ! H5FD_MPIO_COLLECTIVE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) & + BIND(C,NAME='h5pget_dxpl_mpio_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER , INTENT(OUT) :: data_xfer_mode + END FUNCTION h5pget_dxpl_mpio_c + END INTERFACE + + hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pget_dxpl_mpio_f + +!****s* H5P/h5pget_mpio_actual_io_mode_f +! NAME +! h5pget_mpio_actual_io_mode_f +! +! PURPOSE +! Retrieves the type of I/O that HDF5 actually performed on the last +! parallel I/O call. This is not necessarily the type of I/O requested. +! +! INPUTS +! dxpl_id - Dataset transfer property list identifier. +! OUTPUTS +! actual_io_mode - The type of I/O performed by this process. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! July 27, 2012 +! +! HISTORY +! +! Fortran90 Interface: + SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) & + BIND(C,NAME='h5pget_mpio_actual_io_mode_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + END FUNCTION h5pget_mpio_actual_io_mode_c + END INTERFACE + + actual_io_mode = -1 + + hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + + END SUBROUTINE h5pget_mpio_actual_io_mode_f +#endif + +END MODULE H5P + + + diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 deleted file mode 100644 index 3409f15..0000000 --- a/fortran/src/H5Pff.f90 +++ /dev/null @@ -1,6400 +0,0 @@ -!****h* ROBODoc/H5P (F90) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! 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 H5P 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 H5P - - USE H5GLOBAL - - INTERFACE h5pset_fapl_multi_f - MODULE PROCEDURE h5pset_fapl_multi_l - MODULE PROCEDURE h5pset_fapl_multi_s - END INTERFACE - -CONTAINS - -!****s* H5P/h5pcreate_f -! NAME -! h5pcreate_f -! -! PURPOSE -! Creates a new property as an instance of a property -! list class. -! -! INPUTS -! class - type of the property class to be created. -! Possible values are: -! H5P_OBJECT_CREATE_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_ACCESS_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! H5P_GROUP_CREATE_F -! H5P_GROUP_ACCESS_F -! H5P_DATATYPE_CREATE_F -! H5P_DATATYPE_ACCESS_F -! H5P_STRING_CREATE_F -! H5P_ATTRIBUTE_CREATE _F -! H5P_OBJECT_COPY_F -! H5P_LINK_CREATE_F -! H5P_LINK_ACCESS_F -! -! OUTPUTS -! prp_id - property list identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcreate_f(class, prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - INTEGER , INTENT(OUT) :: hdferr -!***** -! INTEGER, EXTERNAL :: h5pcreate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcreate_c(class, prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - END FUNCTION h5pcreate_c - END INTERFACE - - hdferr = h5pcreate_c(class, prp_id) - END SUBROUTINE h5pcreate_f - -!****s* H5P/h5pset_preserve_f -! NAME -! h5pset_preserve_f -! -! PURPOSE -! Sets the dataset transfer property list status to -! TRUE or FALSE for initializing compound datatype -! members during write/read operations. -! -! INPUTS -! prp_id - property list identifier -! flag - status flag -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset - ! transfer property for partila writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - -! INTEGER, EXTERNAL :: h5pset_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pset_preserve_c - END INTERFACE - flag_c = 0 - IF(flag) flag_c = 1 - hdferr = h5pset_preserve_c(prp_id, flag_c) - END SUBROUTINE h5pset_preserve_f - -!****s* H5P/h5pget_preserve_f -! NAME -! h5pget_preserve_f -! -! PURPOSE -! Checks status of the dataset transfer property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! flag - status flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's - ! transfer property for partial writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag_c - -! INTEGER, EXTERNAL :: h5pget_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pget_preserve_c - END INTERFACE - - hdferr = h5pget_preserve_c(prp_id, flag_c) - flag = .FALSE. - IF(flag_c .EQ. 1) flag = .TRUE. - END SUBROUTINE h5pget_preserve_f - -!****s* H5P/h5pget_class_f -! NAME -! h5pget_class_f -! -! PURPOSE -! Returns the property list class for a property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! classtype - property list class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list - ! to be created. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_c(prp_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: classtype - END FUNCTION h5pget_class_c - END INTERFACE - - hdferr = h5pget_class_c(prp_id, classtype) - END SUBROUTINE h5pget_class_f - -!****s* H5P/h5pcopy_f -! NAME -! h5pcopy_f -! -! PURPOSE -! Copies an existing property list to create a new -! property list -! -! INPUTS -! prp_id - property list identifier -! OUTPUTS -! new_prp_id - new property list identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pcopy_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: new_prp_id - END FUNCTION h5pcopy_c - END INTERFACE - - hdferr = h5pcopy_c(prp_id, new_prp_id) - END SUBROUTINE h5pcopy_f - -!****s* H5P/h5pclose_f -! NAME -! h5pclose_f -! -! PURPOSE -! Terminates access to a property list. -! -! INPUTS -! prp_id - identifier of the property list to -! terminate access to. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pclose_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pclose_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pclose_c - END INTERFACE - - hdferr = h5pclose_c(prp_id) - END SUBROUTINE h5pclose_f - -!****s* H5P/h5pset_chunk_f -! NAME -! h5pset_chunk_f -! -! PURPOSE -! Sets the size of the chunks used to store -! a chunked layout dataset. -! -! INPUTS -! prp_id - datatset creation property list identifier -! ndims - number of dimensions for each chunk -! dims - array with dimension sizes for each chunk -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ndims - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - END FUNCTION h5pset_chunk_c - END INTERFACE - - hdferr = h5pset_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pset_chunk_f - -!****s* H5P/h5pget_chunk_f -! NAME -! h5pget_chunk_f -! -! PURPOSE -! Retrieves the size of chunks for the raw data of a -! chunked layout dataset -! -! INPUTS -! prp_id - property list identifier -! ndims - size of dims array -! OUTPUTS -! dims - array with dimension sizes for each chunk -! hdferr - error code -! Success: number of chunk dimensions -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to - ! to return - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! number of chunk dimensions on success, - ! -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: ndims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5pget_chunk_c - END INTERFACE - - hdferr = h5pget_chunk_c(prp_id, ndims, dims) - END SUBROUTINE h5pget_chunk_f - -!****s* H5P/h5pset_deflate_f -! NAME -! h5pset_deflate_f -! -! PURPOSE -! Sets compression method and compression level. -! -! INPUTS -! prp_id - property list identifier -! level - compression level -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_deflate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_deflate_c(prp_id, level) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: level - END FUNCTION h5pset_deflate_c - END INTERFACE - hdferr = h5pset_deflate_c(prp_id, level) - - END SUBROUTINE h5pset_deflate_f - -!****s* H5P/h5pget_version_f -! NAME -! h5pget_version_f -! -! PURPOSE -! Retrieves the version information of various objects -! for a file creation property list -! -! INPUTS -! prp_id - file createion property list identifier -! OUTPUTS -! boot - super block version number -! freelist - global freelist version number -! stab - symbol table version number -! shhdr - shared object header version number -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & - stab, shhdr, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot - ! block version number - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global - ! Freelist version number - - INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol - ! table version number - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared - ! object header version number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_version_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(:), INTENT(OUT) :: boot - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist - INTEGER, DIMENSION(:), INTENT(OUT) :: stab - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr - END FUNCTION h5pget_version_c - END INTERFACE - - hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - END SUBROUTINE h5pget_version_f - -!****s* H5P/h5pset_userblock_f -! NAME -! h5pset_userblock_f -! -! PURPOSE -! Sets user block size -! -! INPUTS -! prp_id - file creation property list to modify -! size - size of the user-block in bytes -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_userblock_c(prp_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_userblock_c - END INTERFACE - - hdferr = h5pset_userblock_c(prp_id, size) - END SUBROUTINE h5pset_userblock_f - -!****s* H5P/h5pget_userblock_f -! NAME -! h5pget_userblock_f -! -! PURPOSE -! Gets user block size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! block_size - size of the user block in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the - ! user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: block_size - END FUNCTION h5pget_userblock_c - END INTERFACE - hdferr = h5pget_userblock_c(prp_id, block_size) - END SUBROUTINE h5pget_userblock_f - -!****s* H5P/h5pset_sizes_f -! NAME -! h5pset_sizes_f -! -! PURPOSE -! Sets the byte size of the offsets and lengths used -! to address objects in an HDF5 file. -! -! INPUTS -! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pset_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size - END FUNCTION h5pset_sizes_c - END INTERFACE - - hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pset_sizes_f - -!****s* H5P/h5pget_sizes_f -! NAME -! h5pget_sizes_f -! -! PURPOSE -! Retrieves the size of the offsets and lengths used -! in an HDF5 file -! -! INPUTS -! prp_id - file creation property list identifier -! OUTPUTS -! -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size - END FUNCTION h5pget_sizes_c - END INTERFACE - - hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - END SUBROUTINE h5pget_sizes_f - -!****s* H5P/h5pset_sym_k_f -! NAME -! h5pset_sym_k_f -! -! PURPOSE -! Sets the size of parameters used to control the -!symbol table nodes -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - symbol table tree rank -! lk - symbol table node size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - INTEGER, INTENT(IN) :: lk - END FUNCTION h5pset_sym_k_c - END INTERFACE - - hdferr = h5pset_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pset_sym_k_f -!****s* H5P/h5pget_sym_k_f -! NAME -! h5pget_sym_k_f -! -! PURPOSE -! Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - symbol table tree 1/2 rank -! lk - symbol table node 1/2 size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank - INTEGER, INTENT(OUT) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - INTEGER, INTENT(OUT) :: lk - END FUNCTION h5pget_sym_k_c - END INTERFACE - - hdferr = h5pget_sym_k_c(prp_id, ik, lk) - END SUBROUTINE h5pget_sym_k_f -!****s* H5P/h5pset_istore_k_f -! NAME -! h5pset_istore_k_f -! -! PURPOSE -! Sets the size of the parameter used to control the -! B-trees for indexing chunked datasets -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - 1/2 rank of chunked storage B-tree -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - END FUNCTION h5pset_istore_k_c - END INTERFACE - - hdferr = h5pset_istore_k_c(prp_id, ik) - END SUBROUTINE h5pset_istore_k_f - -!****s* H5P/h5pget_istore_k_f -! NAME -! h5pget_istore_k_f -! -! PURPOSE -! Queries the 1/2 rank of an indexed storage B-tree. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - 1/2 rank of chunked storage B-tree -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - END FUNCTION h5pget_istore_k_c - END INTERFACE - - hdferr = h5pget_istore_k_c(prp_id, ik) - END SUBROUTINE h5pget_istore_k_f - -!****s* H5P/h5pget_driver_f -! NAME -! h5pget_driver_f -! -! PURPOSE -! Returns low-lever driver identifier. -! -! INPUTS -! -! prp_id - file access or data transfer property -! list identifier. -! OUTPUTS -! -! driver - low-level driver identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_driver_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_driver_c(prp_id, driver) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: driver - END FUNCTION h5pget_driver_c - END INTERFACE - - hdferr = h5pget_driver_c(prp_id, driver) - END SUBROUTINE h5pget_driver_f - -!****s* H5P/h5pset_fapl_stdio_f -! NAME -! h5pset_fapl_stdio_f -! -! PURPOSE -! Sets the standard I/O driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_stdio_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fapl_stdio_c - END INTERFACE - - hdferr = h5pset_fapl_stdio_c(prp_id) - END SUBROUTINE h5pset_fapl_stdio_f - -!****s* H5P/h5pget_stdio_f -! NAME -! h5pget_stdio_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) -! -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: io ! value indicates that the file - !access property list is set to - !the stdio driver -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_stdio_c -! hdferr = h5pget_stdio_c(prp_id, io) -! END SUBROUTINE h5pget_stdio_f - -!****s* H5P/h5pset_fapl_sec2_f -! NAME -! h5pset_fapl_sec2_f -! -! PURPOSE -! Sets the sec2 driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_sec2_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - END FUNCTION h5pset_fapl_sec2_c - END INTERFACE - - hdferr = h5pset_fapl_sec2_c(prp_id) - END SUBROUTINE h5pset_fapl_sec2_f - -!****s* H5P/h5pget_sec2_f -! NAME -! h5pget_sec2_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file - !driver uses the functions declared - !in the unistd.h file -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sec2_c -! hdferr = h5pget_sec2_c(prp_id, sec2) -! END SUBROUTINE h5pget_sec2_f - -!****s* H5P/h5pset_alignment_f -! NAME -! h5pset_alignment_f -! -! PURPOSE -! Sets alignment properties of a file access property list. -! -! INPUTS -! -! prp_id - file access property list identifier -! threshold - threshold value -! alignment - alignment value -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: threshold - INTEGER(HSIZE_T), INTENT(IN) :: alignment - END FUNCTION h5pset_alignment_c - END INTERFACE - - hdferr = h5pset_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pset_alignment_f - -!****s* H5P/h5pget_alignment_f -! NAME -! h5pget_alignment_f -! -! PURPOSE -! Retrieves the current settings for alignment -! properties from a file access property list. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! threshold - threshold value -! alignment - alignment value -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: threshold - INTEGER(HSIZE_T), INTENT(OUT) :: alignment - END FUNCTION h5pget_alignment_c - END INTERFACE - - hdferr = h5pget_alignment_c(prp_id, threshold, alignment) - END SUBROUTINE h5pget_alignment_f - -!****s* H5P/h5pset_fapl_core_f -! NAME -! h5pset_fapl_core_f -! -! PURPOSE -! Modifies the file access property list to use the -! H5FD_CORE driver. -! -! INPUTS -! prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. - LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - -! INTEGER, EXTERNAL :: h5pset_fapl_core_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pset_fapl_core_c - END INTERFACE - backing_store_flag = 0 - IF(backing_store) backing_store_flag = 1 - hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - END SUBROUTINE h5pset_fapl_core_f - -!****s* H5P/h5pget_fapl_core_f -! NAME -! h5pget_fapl_core_f -! -! PURPOSE -! Queries core file driver properties. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. - LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: backing_store_flag - - INTERFACE - INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pget_fapl_core_c - END INTERFACE - - hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - backing_store =.FALSE. - IF (backing_store_flag .EQ. 1) backing_store =.TRUE. - END SUBROUTINE h5pget_fapl_core_f - -!****s* H5P/ h5pset_fapl_family_f -! NAME -! h5pset_fapl_family_f -! -! PURPOSE -! Sets the file access property list to use the family driver. -! -! INPUTS -! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: memb_size - INTEGER(HID_T), INTENT(IN) :: memb_plist - END FUNCTION h5pset_fapl_family_c - END INTERFACE - - hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pset_fapl_family_f - -!****s* H5P/h5pget_fapl_family_f -! NAME -! h5pget_fapl_family_f -! -! PURPOSE -! Returns file access property list information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size - INTEGER(HID_T), INTENT(OUT) :: memb_plist - END FUNCTION h5pget_fapl_family_c - END INTERFACE - - hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - END SUBROUTINE h5pget_fapl_family_f - -!****s* H5P/h5pset_cache_f -! NAME -! h5pset_cache_f -! -! PURPOSE -! Sets the meta data cache and raw data chunk -! cache parameters -! -! INPUTS -! -! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_cache_c - END INTERFACE - - hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pset_cache_f - -!****s* H5P/h5pget_cache_f -! NAME -! h5pget_cache_f -! -! PURPOSE -! Queries the meta data cache and raw data chunk cache -! parameters. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_cache_c - END INTERFACE - - hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) - END SUBROUTINE h5pget_cache_f - -!****s* H5P/h5pset_fapl_split_f -! NAME -! h5pset_fapl_split_f -! -! PURPOSE -! Emulates the old split file driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile -! filename -! meta_plist - identifier of the meta file access property -! list -! raw_ext - name extension for the raw file filename -! raw_plist - identifier of the raw file access property list -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for - ! the metafile filename - INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file - ! access property list - CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file - ! access property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: meta_len, raw_len - -! INTEGER, EXTERNAL :: h5pset_fapl_split_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: meta_ext - !DEC$ATTRIBUTES reference :: raw_ext - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: meta_ext - INTEGER(HID_T), INTENT(IN) :: meta_plist - CHARACTER(LEN=*), INTENT(IN) :: raw_ext - INTEGER(HID_T), INTENT(IN) :: raw_plist - INTEGER :: meta_len, raw_len - END FUNCTION h5pset_fapl_split_c - END INTERFACE - - meta_len = LEN(meta_ext) - raw_len = LEN(raw_ext) - hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - END SUBROUTINE h5pset_fapl_split_f - -!****s* H5P/h5pget_split_f -! NAME -! h5pget_split_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& -! raw_ext, raw_plist, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta - ! file extension to be copied to the - ! meta_ext buffer - -! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for - !the metafile filename -! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file - ! access property list -! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw - ! file extension to be copied to the - ! raw_ext buffer -! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename -! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file - !access property list -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_split_c -! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & -! raw_ext_size, raw_ext, raw_plist ) -! END SUBROUTINE h5pget_split_f - -!****s* H5P/h5pset_gc_references_f -! NAME -! h5pset_gc_references_f -! -! PURPOSE -! Sets garbage collecting references flag. -! -! INPUTS -! -! prp_id - file access property list identifier -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: gc_reference - END FUNCTION h5pset_gc_references_c - END INTERFACE - - hdferr = h5pset_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pset_gc_references_f - -!****s* H5P/h5pget_gc_references_f -! NAME -! h5pget_gc_references_f -! -! PURPOSE -! Returns garbage collecting references setting. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! gc_reference - flag for stting garbage collection on -! and off (1 or 0) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: gc_reference - END FUNCTION h5pget_gc_references_c - END INTERFACE - - hdferr = h5pget_gc_references_c(prp_id, gc_reference) - END SUBROUTINE h5pget_gc_references_f - -!****s* H5P/h5pset_layout_f -! NAME -! h5pset_layout_f -! -! PURPOSE -! Sets the type of storage used store the raw data -! for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F - ! H5D_CONTIGUOUS_F - ! H5D_CHUNKED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: layout - END FUNCTION h5pset_layout_c - END INTERFACE - - hdferr = h5pset_layout_c(prp_id, layout) - END SUBROUTINE h5pset_layout_f - -!****s* H5P/h5pget_layout_f -! NAME -! h5pget_layout_f -! -! PURPOSE -! Returns the layout of the raw data for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F(0) - ! H5D_CONTIGUOUS_F(1) - ! H5D_CHUNKED_F(2) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: layout - END FUNCTION h5pget_layout_c - END INTERFACE - - hdferr = h5pget_layout_c(prp_id, layout) - END SUBROUTINE h5pget_layout_f - -!****s* H5P/h5pset_filter_f -! NAME -! h5pset_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be added to the pipeline -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! February, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pset_filter_c - END INTERFACE - - hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pset_filter_f - -!****s* H5P/h5pget_nfilters_f -! NAME -! h5pget_nfilters_f -! -! PURPOSE -! Returns the number of filters in the pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! nfilters - number of filters in the pipeline -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_nfilters_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: nfilters - END FUNCTION h5pget_nfilters_c - END INTERFACE - - hdferr = h5pget_nfilters_c(prp_id, nfilters) - END SUBROUTINE h5pget_nfilters_f - -!****s* H5P/h5pget_filter_f -! NAME -! h5pget_filter_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter_number - sequence number within the filter -! pipeline of the filter for which -! information is sought -! OUTPUTS -! -! filter_id - filter identification number -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter - ! pipeline of the filter for which - ! information is sought - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! Filter identification number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_number - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER, INTENT(OUT) :: filter_id - END FUNCTION h5pget_filter_c - END INTERFACE - - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - END SUBROUTINE h5pget_filter_f - -!****s* H5P/h5pset_external_f -! NAME -! h5pset_external_f -! -! PURPOSE -! Adds an external file to the list of external files. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file - 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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(OFF_T), INTENT(IN) :: offset - INTEGER(HSIZE_T), INTENT(IN) :: bytes - END FUNCTION h5pset_external_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) - END SUBROUTINE h5pset_external_f - -!****s* H5P/h5pget_external_count_f -! NAME -! h5pget_external_count_f -! -! PURPOSE -! Returns the number of external files for a dataset. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! count - number of external files for the -! specified dataset -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count ! Number of external files for the - ! Specified dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_external_count_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_count_c(prp_id, count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: count - END FUNCTION h5pget_external_count_c - END INTERFACE - - hdferr = h5pget_external_count_c(prp_id, count) - END SUBROUTINE h5pget_external_count_f - -!****s* H5P/h5pget_external_f -! NAME -! h5pget_external_f -! -! PURPOSE -! Returns information about an external file. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! idx - external file index -! name_size - maximum size of name array -! name - name of the external file -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - 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(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 - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_external_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: idx - INTEGER(SIZE_T), INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(OFF_T), INTENT(OUT) :: offset - INTEGER(HSIZE_T), INTENT(OUT) :: bytes - END FUNCTION h5pget_external_c - END INTERFACE - - hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - END SUBROUTINE h5pget_external_f - -!****s* H5P/h5pset_btree_ratios_f -! NAME -! h5pset_btree_ratios_f -! -! PURPOSE -! Sets B-tree split ratios for a dataset transfer -! property list. -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(IN) :: left - REAL, INTENT(IN) :: middle - REAL, INTENT(IN) :: right - END FUNCTION h5pset_btree_ratios_c - END INTERFACE - - hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pset_btree_ratios_f - -!****s* H5P/h5pget_btree_ratios_f -! NAME -! h5pget_btree_ratios_f -! -! PURPOSE -! Gets B-tree split ratios for a dataset transfer property list -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! OUTPUTS -! -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: - SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(OUT) :: left - REAL, INTENT(OUT) :: middle - REAL, INTENT(OUT) :: right - END FUNCTION h5pget_btree_ratios_c - END INTERFACE - - hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) - END SUBROUTINE h5pget_btree_ratios_f - -!****s* H5P/h5pget_fclose_degree_f -! NAME -! h5pget_fclose_degree_f -! -! PURPOSE -! Returns the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(OUT) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_fclose_degree_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(OUT) :: degree - END FUNCTION h5pget_fclose_degree_c - END INTERFACE - - hdferr = h5pget_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pget_fclose_degree_f - -!****s* H5P/h5pset_fclose_degree_f -! NAME -! h5pset_fclose_degree_f -! -! PURPOSE -! Sets the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - file access property list identifier -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(IN) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: degree - END FUNCTION h5pset_fclose_degree_c - END INTERFACE - - hdferr = h5pset_fclose_degree_c(fapl_id, degree) - END SUBROUTINE h5pset_fclose_degree_f - -!****s* H5P/h5pequal_f -! NAME -! h5pequal_f -! -! PURPOSE -! Checks if two property lists are eqaul -! -! INPUTS -! -! plist1_id - property list identifier -! plist2_id - property list identifier -! OUTPUTS -! -! flag - flag, possible values -! .TRUE. or .FALSE. -! hdferr: - error code -! Success: 0 -! Failure: -1, flag is set to .FALSE. -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! Flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist1_id - INTEGER(HID_T), INTENT(IN) :: plist2_id - INTEGER, INTENT(OUT) :: c_flag - END FUNCTION h5pequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) - IF (c_flag .GT. 0) flag = .TRUE. - END SUBROUTINE h5pequal_f - -!****s* H5P/h5pset_buffer_f -! NAME -! h5pset_buffer_f -! -! PURPOSE -! Sets sixe for conversion buffer -! -! INPUTS -! plist_id - data transfer property list identifier -! size - buffer size -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_buffer_c - END INTERFACE - - hdferr = h5pset_buffer_c(plist_id, size) - END SUBROUTINE h5pset_buffer_f - -!****s* H5P/h5pget_buffer_f -! NAME -! h5pget_buffer_f -! -! PURPOSE -! Gets size for conversion buffer -! -! INPUTS -! -! plist_id - data transfer property list identifier -! OUTPUTS -! -! size - buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_buffer_c - END INTERFACE - - hdferr = h5pget_buffer_c(plist_id, size) - END SUBROUTINE h5pget_buffer_f - -!****s* H5P/h5pfill_value_defined_f -! NAME -! h5pfill_value_defined_f -! -! PURPOSE -! Check if fill value is defined. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - fill value status flag -! Possible values are: -! H5D_FILL_VALUE_ERROR_F -! H5D_FILL_VALUE_UNDEFINED_F -! H5D_FILL_VALUE_DEFAULT_F -! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill value status flag - ! H5D_FILL_VALUE_ERROR_F - ! H5D_FILL_VALUE_UNDEFINED_F - ! H5D_FILL_VALUE_DEFAULT_F - ! H5D_FILL_VALUE_USER_DEFINED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pfill_value_defined_c - END INTERFACE - - hdferr = h5pfill_value_defined_c(plist_id, flag) - END SUBROUTINE h5pfill_value_defined_f - -!****s* H5P/h5pset_alloc_time_f -! NAME -! h5pset_alloc_time_f -! -! PURPOSE -! Set space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_alloc_time_c - END INTERFACE - - hdferr = h5pset_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pset_alloc_time_f - -!****s* H5P/h5pget_alloc_time_f -! NAME -! h5pget_alloc_time_f -! -! PURPOSE -! Get space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_alloc_time_c - END INTERFACE - - hdferr = h5pget_alloc_time_c(plist_id, flag) - END SUBROUTINE h5pget_alloc_time_f - -!****s* H5P/h5pset_fill_time_f -! NAME -! h5pset_fill_time_f -! -! PURPOSE -! Set fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fill_time_c - END INTERFACE - - hdferr = h5pset_fill_time_c(plist_id, flag) - END SUBROUTINE h5pset_fill_time_f - -!****s* H5P/h5pget_fill_time_f -! NAME -! h5pget_fill_time_f -! -! PURPOSE -! Get fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fill_time_c - END INTERFACE - - hdferr = h5pget_fill_time_c(plist_id, flag) - END SUBROUTINE h5pget_fill_time_f - -!****s* H5P/ h5pset_meta_block_size_f -! NAME -! h5pset_meta_block_size_f -! -! PURPOSE -! Sets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! size - metatdata block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_meta_block_size_c - END INTERFACE - - hdferr = h5pset_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pset_meta_block_size_f - -!****s* H5P/h5pget_meta_block_size_f -! NAME -! h5pget_meta_block_size_f -! -! PURPOSE -! Gets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - metatdata block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_meta_block_size_c - END INTERFACE - - hdferr = h5pget_meta_block_size_c(plist_id, size) - END SUBROUTINE h5pget_meta_block_size_f - -!****s* H5P/h5pset_sieve_buf_size_f -! NAME -! h5pset_sieve_buf_size_f -! -! PURPOSE -! Sets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! size - sieve buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_sieve_buf_size_c - END INTERFACE - - hdferr = h5pset_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pset_sieve_buf_size_f - -!****s* H5P/h5pget_sieve_buf_size_f -! NAME -! h5pget_sieve_buf_size_f -! -! PURPOSE -! Gets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - sieve buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_sieve_buf_size_c - END INTERFACE - - hdferr = h5pget_sieve_buf_size_c(plist_id, size) - END SUBROUTINE h5pget_sieve_buf_size_f - -!****s* H5P/h5pset_small_data_block_size_f -! NAME -! h5pset_small_data_block_size_f -! -! PURPOSE -! Sets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! size - small raw data block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_small_data_block_size_c - END INTERFACE - - hdferr = h5pset_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pset_small_data_block_size_f - -!****s* H5P/h5pget_small_data_block_size_f -! NAME -! h5pget_small_data_block_size_f -! -! PURPOSE -! Gets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - small raw data block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_small_data_block_size_c - END INTERFACE - - hdferr = h5pget_small_data_block_size_c(plist_id, size) - END SUBROUTINE h5pget_small_data_block_size_f - -!****s* H5P/h5pset_hyper_vector_size_f -! NAME -! h5pset_hyper_vector_size_f -! -! PURPOSE -! Set the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! size - vector size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_hyper_vector_size_c - END INTERFACE - - hdferr = h5pset_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pset_hyper_vector_size_f - -!****s* H5P/ h5pget_hyper_vector_size_f -! NAME -! h5pget_hyper_vector_size_f -! -! PURPOSE -! Get the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! OUTPUTS -! -! size - vector size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_hyper_vector_size_c - END INTERFACE - - hdferr = h5pget_hyper_vector_size_c(plist_id, size) - END SUBROUTINE h5pget_hyper_vector_size_f - -!****s* H5P/h5pexist_f -! NAME -! h5pexist_f -! -! PURPOSE -! Queries whether a property name exists in a property list or class. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to check for -! OUTPUTS -! -! flag - logical flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pexist_c - END INTERFACE - flag = .FALSE. - name_len = LEN(name) - hdferr = h5pexist_c(prp_id, name , name_len) - IF (hdferr > 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pexist_f - -!****s* H5P/h5pget_size_f -! -! NAME -! h5pget_size_f -! -! PURPOSE -! Queries the size of a property value in bytes. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to query -! OUTPUTS -! -! size - size of property in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_size_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pget_size_c(prp_id, name , name_len, size) - END SUBROUTINE h5pget_size_f - -!****s* H5P/h5pget_npros_f -! NAME -! h5pget_npros_f -! -! PURPOSE -! Queries number of properties in property list or class -! -! INPUTS -! -! prp_id - iproperty list identifier to query -! OUTPUTS -! -! nprops - number of properties in property object -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: nprops - END FUNCTION h5pget_nprops_c - END INTERFACE - hdferr = h5pget_nprops_c(prp_id, nprops) - END SUBROUTINE h5pget_nprops_f - -!****s* H5P/h5pget_class_name_f -! NAME -! h5pget_class_name_f -! -! PURPOSE -! Queries the name of a class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! name - name of a class -! size - Actual length of the class name -! NOTE: If provided buffer "name" is smaller, -! than name will be truncated to fit into -! provided user buffer. -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Returned the size of name as an argument -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name - INTEGER, INTENT(OUT) :: size ! Actual length of the class name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pget_class_name_c - END INTERFACE - - name_len = LEN(name) - size = h5pget_class_name_c(prp_id, name, name_len) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE h5pget_class_name_f - -!****s* H5P/h5pget_class_parent_f -! NAME -! h5pget_class_parent_f -! -! PURPOSE -! Retrieves the parent class of a genric property class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! parent_id - identifier of the parent class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: parent_id - END FUNCTION h5pget_class_parent_c - END INTERFACE - hdferr = h5pget_class_parent_c(prp_id, parent_id) - END SUBROUTINE h5pget_class_parent_f - -!****s* H5P/h5pisa_class_f -! NAME -! h5pisa_class_f -! -! PURPOSE -! Determines whether a property list is a member of a class. -! -! INPUTS -! -! plist - property list identifier -! pclass - identifier of the property class -! OUTPUTS -! -! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier - LOGICAL, INTENT(OUT) :: flag ! logical flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pisa_class_c(plist, pclass) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist - INTEGER(HID_T), INTENT(IN) :: pclass - END FUNCTION h5pisa_class_c - END INTERFACE - flag = .FALSE. - hdferr = h5pisa_class_c(plist, pclass) - IF (hdferr .GT. 0) THEN - flag = .TRUE. - hdferr = 0 - ENDIF - END SUBROUTINE h5pisa_class_f - -!****s* H5P/h5pcopy_prop_f -! NAME -! h5pcopy_prop_f -! -! PURPOSE -! Copies a property from one list or class to another. -! -! INPUTS -! -! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list -! name - name of the property to copy -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Property name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER(HID_T), INTENT(IN) :: src_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pcopy_prop_c - END INTERFACE - name_len = LEN(name) - hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) - END SUBROUTINE h5pcopy_prop_f - -!****s* H5P/h5premove_f -! NAME -! h5premove_f -! -! PURPOSE -! Removes a property from a property list. - -! -! INPUTS -! -! plid - Property list identofoer -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5premove_f(plid, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5premove_c(plid, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plid - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5premove_c - END INTERFACE - name_len = LEN(name) - hdferr = h5premove_c(plid, name , name_len) - END SUBROUTINE h5premove_f - -!****s* H5P/h5punregister_f -! NAME -! h5punregister_f -! -! PURPOSE -! Removes a property from a property list class. -! -! INPUTS -! -! class - Property list class identifier -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5punregister_f(class, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5punregister_c(class, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5punregister_c - END INTERFACE - name_len = LEN(name) - hdferr = h5punregister_c(class, name , name_len) - END SUBROUTINE h5punregister_f - -!****s* H5P/h5pclose_class_f -! NAME -! h5pclose_class_f -! -! PURPOSE -! Closes an existing property list class. -! -! INPUTS -! -! class - Property list class identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5pclose_class_f(class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pclose_class_c(class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - END FUNCTION h5pclose_class_c - END INTERFACE - hdferr = h5pclose_class_c(class) - END SUBROUTINE h5pclose_class_f - -!****s* H5P/h5pset_shuffle_f -! NAME -! h5pset_shuffle_f -! -! PURPOSE -! Sets shuffling filter -! -! INPUTS -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_shuffle_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shuffle_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_shuffle_c - END INTERFACE - hdferr = h5pset_shuffle_c(prp_id) - - END SUBROUTINE h5pset_shuffle_f - -!****s* H5P/h5pset_edc_check_f -! NAME -! h5pset_edc_check_f -! -! PURPOSE -! Enables/disables error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! flag - EDC flag; possible values: -! H5Z_DISABLE_EDC_F -! H5Z_ENABLE_EDC_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: flag ! Checksum filter flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_edc_check_c - END INTERFACE - hdferr = h5pset_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pset_edc_check_f - -!****s* H5P/h5pget_edc_check_f -! NAME -! h5pget_edc_check_f -! -! PURPOSE -! Queries error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier - INTEGER, INTENT(OUT) :: flag ! Checksum filter flag - ! May have one of the following values: - ! H5Z_ERROR_EDC_F - ! H5Z_DISABLE_EDC_F - ! H5Z_ENABLE_EDC_F - ! H5Z_NO_EDC_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_edc_check_c - END INTERFACE - hdferr = h5pget_edc_check_c(prp_id, flag) - - END SUBROUTINE h5pget_edc_check_f - -!****s* H5P/h5pset_fletcher32_f -! NAME -! h5pset_fletcher32_f -! -! PURPOSE -! Sets Fletcher32 checksum of EDC for a dataset creation -! property list. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_fletcher32_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fletcher32_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fletcher32_c - END INTERFACE - hdferr = h5pset_fletcher32_c(prp_id) - - END SUBROUTINE h5pset_fletcher32_f - -!****s* H5P/ h5pset_family_offset_f -! NAME -! h5pset_family_offset_f -! -! PURPOSE -! Sets offset for family file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! offset - file offset -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 19 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_family_offset_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset - END FUNCTION h5pset_family_offset_c - END INTERFACE - hdferr = h5pset_family_offset_c(prp_id, offset) - - END SUBROUTINE h5pset_family_offset_f - -!****s* H5P/h5pset_fapl_multi_l -! NAME -! h5pset_fapl_multi_l -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 20 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: flag = 0 - INTEGER :: i - - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - IF(relax) flag = 1 - hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) - - END SUBROUTINE h5pset_fapl_multi_l -!****s* H5P/h5pset_fapl_multi_s -! NAME -! h5pset_fapl_multi_s -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 31 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag - -! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_sc - END INTERFACE - flag = 0 - IF (relax) flag = 1 - hdferr = h5pset_fapl_multi_sc(prp_id, flag) - - END SUBROUTINE h5pset_fapl_multi_s -!****s* H5P/h5pget_fapl_multi_f -! NAME -! h5pget_fapl_multi_f -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! maxlen_out - maximum length for memb_name array element -! -! AUTHOR -! Elena Pourmal -! 24 March 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out - LOGICAL, INTENT(OUT) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER :: flag - INTEGER :: i -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag, c_maxlen_out) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name - REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) - - relax = .TRUE. - IF(flag .EQ. 0) relax = .FALSE. - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - END SUBROUTINE h5pget_fapl_multi_f -!****s* H5P/h5pset_szip_f -! NAME -! h5pset_szip_f -! -! PURPOSE -! Sets up use of szip compression -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! options_mask - A bit-mask conveying the desired SZIP options. -! Current valid values in Fortran are: -! H5_SZIP_EC_OM_F -! H5_SZIP_NN_OM_F -! pixels_per_block - szip parameters -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired - ! SZIP options - ! Current valid values in Fortran are: - ! H5_SZIP_EC_OM_F - ! H5_SZIP_NN_OM_F - INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements - ! in each data block - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_szip_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: options_mask - INTEGER, INTENT(IN) :: pixels_per_block - END FUNCTION h5pset_szip_c - END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) - - END SUBROUTINE h5pset_szip_f - -!****s* H5P/h5pall_filters_avail_f -! NAME -! h5pall_filters_avail_f -! -! PURPOSE -! Checks if all filters set in the dataset creation -! property list are available -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! flag - .TRUE. if all filters are available -! .FALSE. otherwise -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available - ! .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status - -! INTEGER, EXTERNAL :: h5pall_filters_avail_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pall_filters_avail_c - END INTERFACE - flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) - IF (status .EQ. 0 ) flag = .FALSE. - - END SUBROUTINE h5pall_filters_avail_f - -!****s* H5P/h5pget_filter_by_id_f -! NAME -! h5pget_filter_by_id_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! filter_id - filter identifier -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_id ! Filter identifier - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - -! INTEGER, EXTERNAL :: h5pget_filter_by_id_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts - INTEGER(SIZE_T), INTENT(IN) :: namelen - CHARACTER(LEN=*), INTENT(OUT) :: name - END FUNCTION h5pget_filter_by_id_c - END INTERFACE - - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - END SUBROUTINE h5pget_filter_by_id_f - -!****s* H5P/h5pmodify_filter_f -! NAME -! h5pmodify_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be modified -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: - SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be modified - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pmodify_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values - END FUNCTION h5pmodify_filter_c - END INTERFACE - - hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) - END SUBROUTINE h5pmodify_filter_f - -!****s* H5P/h5premove_filter_f -! NAME -! h5premove_filter_f -! -! PURPOSE -! Delete one or more filters from the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be removed -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Quincey Koziol -! January 27 2004 -! -! Fortran90 Interface: - SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list - ! identifier - INTEGER, INTENT(IN) :: filter ! Filter to be removed - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5premove_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5premove_filter_c(prp_id, filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - END FUNCTION h5premove_filter_c - END INTERFACE - - hdferr = h5premove_filter_c(prp_id, filter) - END SUBROUTINE h5premove_filter_f - -!****s* H5P/H5Pget_attr_phase_change_f -! NAME -! H5Pget_attr_phase_change_f -! -! PURPOSE -! Retrieves attribute storage phase change thresholds -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - ! (Default: 8) - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_attr_phase_change_c - END INTERFACE - - hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_attr_phase_change_f - -!****s* H5P/H5Pset_attr_creation_order_f -! NAME -! H5Pset_attr_creation_order_f -! -! PURPOSE -! Sets tracking and indexing of attribute creation order -! -! INPUTS -! -! ocpl_id - Object creation property list identifier -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5Pset_attr_creation_order_c - END INTERFACE - - hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - END SUBROUTINE h5pset_attr_creation_order_f - -!****s* H5P/H5Pset_shared_mesg_nindexes_f -! NAME -! H5Pset_shared_mesg_nindexes_f -! -! PURPOSE -! Sets number of shared object header message indexes -! -! INPUTS -! -! plist_id - file creation property list -! nindexes - Number of shared object header message indexes to be available in files created with this property list -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes - ! available in files created WITH this property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: nindexes - - END FUNCTION H5pset_shared_mesg_nindexes_c - END INTERFACE - - hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - - END SUBROUTINE h5pset_shared_mesg_nindexes_f - -!****s* H5P/H5Pset_shared_mesg_index_f -! NAME -! H5Pset_shared_mesg_index_f -! -! PURPOSE -! Configures the specified shared object header message index -! -! INPUTS -! -! fcpl_id - File creation property list identifier. -! index_num - Index being configured. -! mesg_type_flags - Types of messages that should be stored in this index. -! min_mesg_size - Minimum message size. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list - INTEGER, INTENT(IN) :: index_num ! Index being configured. - INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. - INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: fcpl_id - INTEGER, INTENT(IN) :: index_num - INTEGER, INTENT(IN) :: mesg_type_flags - INTEGER, INTENT(IN) :: min_mesg_size - - END FUNCTION H5pset_shared_mesg_index_c - END INTERFACE - - hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - END SUBROUTINE h5pset_shared_mesg_index_f - -!****s* H5P/H5Pget_attr_creation_order_f -! NAME -! H5Pget_attr_creation_order_f -! -! PURPOSE -! Retrieves tracking and indexing settings for attribute creation order -! -! INPUTS -! -! ocpl_id - Object (group or dataset) creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_attr_creation_order_c - END INTERFACE - - hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - END SUBROUTINE h5pget_attr_creation_order_f - -!****s* H5P/H5Pset_libver_bounds_f -! NAME -! H5Pset_libver_bounds_f -! -! PURPOSE -! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. -! -! INPUTS -! -! fapl_id - File access property list identifier -! low - The earliest version of the library that will be used for writing objects. -! high - The latest version of the library that will be used for writing objects. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. - ! Currently, low must be one of two pre-defined values: - ! HDF_LIBVER_EARLIEST_F - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - ! Currently, low must set to the pre-defined value: - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: low - INTEGER, INTENT(IN) :: high - - END FUNCTION H5pset_libver_bounds_c - END INTERFACE - - hdferr = h5pset_libver_bounds_c(fapl_id, low, high) - - END SUBROUTINE h5pset_libver_bounds_f - -!****s* H5P/H5Pset_link_creation_order_f -! NAME -! H5Pset_link_creation_order_f -! -! PURPOSE -! Sets creation order tracking and indexing for links in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! crt_order_flags - Creation order flag(s) -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5pset_link_creation_order_c - END INTERFACE - - hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pset_link_creation_order_f - -!****s* H5P/H5Pget_link_phase_change_f -! NAME -! H5Pget_link_phase_change_f -! -! PURPOSE -! Queries the settings for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_link_phase_change_c - END INTERFACE - - hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pget_link_phase_change_f - -!****s* H5P/H5Pget_obj_track_times_f -! NAME -! H5Pget_obj_track_times_f -! -! PURPOSE -! Returns whether times are tracked for an object. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pget_obj_track_times_c - END INTERFACE - flag = .TRUE. - hdferr = h5pget_obj_track_times_c(plist_id, status) - IF(status.EQ.0) flag = .FALSE. - - END SUBROUTINE h5pget_obj_track_times_f - -!****s* H5P/H5Pset_obj_track_times_f -! NAME -! H5Pset_obj_track_times_f -! -! PURPOSE -! Set whether the birth, access, modification & change times for -! an object are stored. -! -! Birth time is the time the object was created. Access time is -! the last time that metadata or raw data was read from this -! object. Modification time is the last time the data for -! this object was changed (either writing raw data to a dataset -! or inserting/modifying/deleting a link in a group). Change -! time is the last time the metadata for this object was written -! (adding/modifying/deleting an attribute on an object, extending -! the size of a dataset, etc). -! -! If these times are not tracked, they will be reported as -! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX -! epoch) when queried. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(IN) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(IN) :: status - END FUNCTION h5pset_obj_track_times_c - END INTERFACE - - status = 0 - IF(flag) status = 1 - - hdferr = h5pset_obj_track_times_c(plist_id, status) - - END SUBROUTINE h5pset_obj_track_times_f - -!****s* H5P/H5Pset_create_inter_group_f -! NAME -! H5Pset_create_inter_group_f -! -! PURPOSE -! Specifies in property list whether to create missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation -! of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! HISTORY -! The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name -! Fortran90 Interface: - SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups - ! upon the creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pset_create_inter_group_c - END INTERFACE - - hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pset_create_inter_group_f - -!****s* H5P/H5Pget_link_creation_order_f -! NAME -! H5Pget_link_creation_order_f -! -! PURPOSE -! Queries whether link creation order is tracked and/or indexed in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Creation order flag(s) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_link_creation_order_c - END INTERFACE - - hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - END SUBROUTINE h5pget_link_creation_order_f - -!****s* H5P/H5Pset_char_encoding_f -! NAME -! H5Pset_char_encoding_f -! -! PURPOSE -! Sets the character encoding used to encode a string. -! -! INPUTS -! -! plist_id - Property list identifier -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - INTEGER, INTENT(IN) :: encoding ! String encoding character set: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: encoding - - END FUNCTION H5pset_char_encoding_c - END INTERFACE - - hdferr = h5pset_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pset_char_encoding_f - -!****s* H5P/H5Pget_char_encoding_f -! NAME -! H5Pget_char_encoding_f -! -! PURPOSE -! Retrieves the character encoding used to create a string -! -! INPUTS -! -! plist_id - Property list identifier -! -! OUTPUTS -! -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - - INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: encoding - - END FUNCTION H5pget_char_encoding_c - END INTERFACE - - hdferr = h5pget_char_encoding_c(plist_id, encoding) - - END SUBROUTINE h5pget_char_encoding_f - -!****s* H5P/h5pset_copy_object_f -! NAME -! h5pset_copy_object_f -! -! PURPOSE -! Sets properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! copy_options - Copy option(s) to be set -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(IN) :: copy_options - END FUNCTION h5pset_copy_object_c - END INTERFACE - hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pset_copy_object_f - -!****s* H5P/h5pget_copy_object_f -! NAME -! h5pget_copy_object_f -! -! PURPOSE -! Retrieves the properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! OUTPUTS -! -! copy_options - Copy option(s) to be get -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(OUT) :: copy_options - END FUNCTION h5pget_copy_object_c - END INTERFACE - hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) - END SUBROUTINE h5pget_copy_object_f - -!****s* H5P/h5pget_data_transform_f -! NAME -! h5pget_data_transform_f -! -! PURPOSE -! Retrieves a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! OUTPUTS -! -! expression - buffer to hold transform expression -! hdferr - Error code -! Success: Actual lenght of the expression -! If provided buffer "expression" is -! smaller, than expression will be -! truncated to fit into -! provided user buffer -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! HISTORY -! -! Should hdferr return just 0 or 1 and add another arguement for the size? -! Fortran90 Interface: -SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - INTEGER(SIZE_T) :: size_default - - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(OUT) :: expression - INTEGER(SIZE_T) :: size_default - INTEGER :: expression_len - END FUNCTION h5pget_data_transform_c - END INTERFACE - - size_default = 0 - expression_len = LEN(expression) - - hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - - IF(present(size)) size = size_default - - END SUBROUTINE h5pget_data_transform_f - -!****s* H5P/h5pset_data_transform_f -! NAME -! h5pset_data_transform_f -! -! PURPOSE -! Sets a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! expression - Buffer to hold transform expression -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: expression_len - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(IN) :: expression - INTEGER :: expression_len - END FUNCTION h5pset_data_transform_c - END INTERFACE - - expression_len = LEN(expression) - hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) - - END SUBROUTINE h5pset_data_transform_f - -!****s* H5P/H5Pget_local_heap_size_hint_f -! NAME -! H5Pget_local_heap_size_hint_f -! -! PURPOSE -! Queries the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! size_hint - Hint for size of local heap -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(OUT) :: size_hint - END FUNCTION H5Pget_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pget_local_heap_size_hint_f - -!****s* H5P/H5Pget_est_link_info_f -! NAME -! H5Pget_est_link_info_f -! -! PURPOSE -! Queries data required to estimate required local heap or object header size. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: est_num_entries - INTEGER, INTENT(OUT) :: est_name_len - END FUNCTION h5pget_est_link_info_c - END INTERFACE - - hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pget_est_link_info_f - -!****s* H5P/H5Pset_local_heap_size_hint_f -! NAME -! H5Pset_local_heap_size_hint_f -! -! PURPOSE -! Sets the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! size_hint - Hint for size of local heap -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(IN) :: size_hint - END FUNCTION h5pset_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) - - END SUBROUTINE h5pset_local_heap_size_hint_f - -!****s* H5P/h5pset_est_link_info_f -! NAME -! h5pset_est_link_info_f -! -! PURPOSE -! Sets estimated number of links and length of link names in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: est_num_entries - INTEGER, INTENT(IN) :: est_name_len - END FUNCTION h5pset_est_link_info_c - END INTERFACE - - hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - END SUBROUTINE h5pset_est_link_info_f - -!****s* H5P/h5pset_link_phase_change_f -! NAME -! h5pset_link_phase_change_f -! -! PURPOSE -! Sets the parameters for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_link_phase_change_c - END INTERFACE - - hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - END SUBROUTINE h5pset_link_phase_change_f - -!****s* H5P/h5pset_fapl_direct_f -! NAME -! h5pset_fapl_direct_f -! -! PURPOSE -! Sets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(IN) :: alignment - INTEGER(SIZE_T), INTENT(IN) :: block_size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size - END FUNCTION h5pset_fapl_direct_c - END INTERFACE - - hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pset_fapl_direct_f - -!****s* H5P/h5pget_fapl_direct_f -! NAME -! h5pget_fapl_direct_f -! -! PURPOSE -! Gets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER(SIZE_T), INTENT(OUT) :: alignment - INTEGER(SIZE_T), INTENT(OUT) :: block_size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size - END FUNCTION h5pget_fapl_direct_c - END INTERFACE - - hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - END SUBROUTINE h5pget_fapl_direct_f - -!****s* H5P/H5Pset_attr_phase_change_f -! NAME -! H5Pset_attr_phase_change_f -! -! PURPOSE -! Sets attribute storage phase change thresholds. -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: -SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - !(Default: 8) - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_attr_phase_change_c - END INTERFACE - - hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - - - END SUBROUTINE h5pset_attr_phase_change_f - -!****s* H5P/H5Pset_nbit_f -! NAME -! H5Pset_nbit_f -! -! PURPOSE -! Sets up the use of the N-Bit filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_nbit_f(plist_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION H5Pset_nbit_c(plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - END FUNCTION H5Pset_nbit_c - END INTERFACE - - hdferr = H5Pset_nbit_c(plist_id) - - END SUBROUTINE h5pset_nbit_f - -!****s* H5P/h5pset_scaleoffset_f -! NAME -! h5pset_scaleoffset_f -! -! PURPOSE -! Sets up the use of the scale-offset filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! scale_type - Flag indicating compression method. Valid values: -! H5Z_SO_FLOAT_DSCALE_F -! H5Z_SO_FLOAT_ESCALE_F -! H5Z_SO_INT_F -! -! scale_factor - Parameter related to scale. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER , INTENT(IN) :: scale_type - INTEGER , INTENT(IN) :: scale_factor - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: scale_type - INTEGER, INTENT(IN) :: scale_factor - END FUNCTION h5pset_scaleoffset_c - END INTERFACE - - hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) - - END SUBROUTINE h5pset_scaleoffset_f - -!****s* H5P/h5pset_nlinks_f -! NAME -! h5pset_nlinks_f -! -! PURPOSE -! Sets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: - SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(IN) :: nlinks - END FUNCTION h5pset_nlinks_c - END INTERFACE - - hdferr = h5pset_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pset_nlinks_f - -!****s* H5P/h5pget_nlinks_f -! NAME -! h5pget_nlinks_f -! -! PURPOSE -! Gets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! Fortran90 Interface: - SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(OUT) :: nlinks - END FUNCTION h5pget_nlinks_c - END INTERFACE - - hdferr = h5pget_nlinks_c(lapl_id, nlinks) - - END SUBROUTINE h5pget_nlinks_f - -!****s* H5P/H5Pget_create_inter_group_f -! NAME -! H5Pget_create_inter_group_f -! -! PURPOSE -! Determines whether property is set to enable creating missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon -! the creation of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 4, 2008 -! -! HISTORY -! -! The long subroutine name (>31) on older f90 compilers causes problems -! so the name was shortened -! Fortran90 Interface: - SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups - ! upon creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pget_create_inter_group_c - END INTERFACE - - hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - - END SUBROUTINE h5pget_create_inter_group_f - -!****s* H5P/H5Pset_chunk_cache_f -! NAME -! H5Pset_chunk_cache_f -! -! PURPOSE -! Set the number of objects in the meta data cache and the -! maximum number of chunks and bytes in the raw data chunk cache. -! Once set, these values will override the values in the file access -! property list. Each of these values can be individually unset -! (or not set at all) by passing the macros: -! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, -! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or -! H5D_CHUNK_CACHE_W0_DFLT_F -! as appropriate. -! -! The RDCC_W0 value should be between 0 and 1 inclusive and -! indicates how much chunks that have been fully read or fully -! written are favored for preemption. A value of zero means -! fully read or written chunks are treated no differently than -! other chunks (the preemption is strictly LRU) while a value -! of one means fully read chunks are always preempted before -! other chunks. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. -! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. -! rdcc_w0 - The chunk preemption policy for this dataset. -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data - ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache - ! for this dataset. - REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - - INTERFACE - INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes - REAL, INTENT(IN) :: rdcc_w0 - END FUNCTION h5pset_chunk_cache_c - END INTERFACE - - hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pset_chunk_cache_f - -!****s* H5P/H5Pget_chunk_cache_f -! NAME -! H5Pget_chunk_cache_f -! -! PURPOSE -! Retrieves the maximum possible number of elements in the meta -! data cache and the maximum possible number of elements and -! bytes and the RDCC_W0 value in the raw data chunk cache. Any -! (or all) arguments may be null pointers in which case the -! corresponding datum is not returned. If these properties have -! not been set on this property list, the default values for a -! file access property list are returned. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! OUTPUTS -! -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: - SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dapl_id - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes - REAL, INTENT(OUT) :: rdcc_w0 - END FUNCTION h5pget_chunk_cache_c - END INTERFACE - - hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - END SUBROUTINE h5pget_chunk_cache_f - -END MODULE H5P - - - diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90 deleted file mode 100644 index 01d1d98..0000000 --- a/fortran/src/H5Pff_F03.f90 +++ /dev/null @@ -1,1267 +0,0 @@ -!****h* ROBODoc/H5P (F03) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5P functions. -! It contains the same functions as H5Pff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Pff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5P 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 H5P_PROVISIONAL - - USE H5GLOBAL - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_fill_value_ptr - - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_fill_value_ptr - - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_ptr - - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_ptr - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - ! Recommended procedure: - MODULE PROCEDURE h5pregister_ptr - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - ! Recommended procedure: - MODULE PROCEDURE h5pinsert_ptr - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pget_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pget_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pset_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pset_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pset_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pget_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pget_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & - BIND(C, NAME='h5pregister_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pregister_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & - BIND(C, NAME='h5pinsert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pinsert_c - END INTERFACE - -CONTAINS - -! -!****s* H5P (F03)/h5pset_fill_value_f_F90 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! IMPLICIT NONE -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_integer -! -!****s* H5P (F03)/h5pget_fill_value_f_F90 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr ! C address - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(fillvalue) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - f_ptr = C_LOC(chr(1)(1:1)) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - DO i = 1, chr_len - fillvalue(i:i) = chr(i) - ENDDO - DEALLOCATE(chr) - - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F03)/h5pset_fill_value_f_F03 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pset_fill_value_ptr - -! -!****s* H5P (F03)/h5pget_fill_value_f_F03 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pget_fill_value_ptr - -! -!****s* H5P (F03)/h5pset_f_F90 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_integer - - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_real - - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pset_char -! -!****s* H5P (F03)/h5pget_f_F90 -! -! NAME -! h5pget_f -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pget_integer - - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_real - - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - TYPE(C_PTR) :: f_ptr - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DO i = 1, chr_len - value(i:i) = chr(i) - ENDDO - - DEALLOCATE(chr) - - END SUBROUTINE h5pget_char - - -! -!****s* H5P (F03)/h5pset_f_F03 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Pointer to value to set the property to -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pset_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pset_ptr -! -!****s* H5P (F03)/h5pget_f_F03 -! -! NAME -! h5pget_f (F03) -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Pointer to a location to which to copy the value of of the property -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, value) - - END SUBROUTINE h5pget_ptr - - -! -!****s* H5P (F03)/h5pregister_f_F90 -! -! NAME -! h5pregister -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_integer - - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_real - - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - DEALLOCATE(chr) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F03)/h5pregister_f_F03 -! -! NAME -! h5pregister (F03) -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Pointer to value to set the property to -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, value) - END SUBROUTINE h5pregister_ptr - -! -!****s* H5P (F03)/h5pinsert_f_F90 -! -! NAME -! h5pinsert (f90) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_integer - - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_real - - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(c_ptr) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - DEALLOCATE(chr) - - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F03)/h5pinsert_f_F03 -! -! NAME -! h5pinsert (f03) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Pointer to new value pointer for the property being modified -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - TYPE(c_ptr), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_ptr -! -!****s* H5P (F03)/h5pcreate_class_f_F03 -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! Inputs: -! parent - Parent property list class identifier -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - Name of property to create -! -! Outputs: -! class - Property list class identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! H5P_cls_create_func_t (create) - Callback routine called when a property list is created -! create_data - User pointer to any class creation information needed -! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied -! copy_data - User pointer to any class copy information needed -! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed -! close_data - User pointer to any class close information needed -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Added callback arguments -! M. Scot Breitenfeld, July 3, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: class - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data - TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close -!***** - INTEGER :: name_len - TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default - TYPE(C_FUNPTR) :: create_default, copy_default, close_default - INTERFACE - INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & - create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - TYPE(C_PTR), VALUE :: create_data, copy_data, close_data - TYPE(C_FUNPTR), VALUE :: create, copy, close - END FUNCTION h5pcreate_class_c - END INTERFACE - name_len = LEN(name) - - create_default = c_null_funptr !fix:scot - create_data_default = c_null_ptr - copy_default = c_null_funptr !fix:scot - copy_data_default = c_null_ptr - close_default = c_null_funptr !fix:scot - close_data_default = c_null_ptr - - IF(PRESENT(create)) create_default = create - IF(PRESENT(create_data)) create_data_default = create_data - IF(PRESENT(copy)) copy_default = copy - IF(PRESENT(copy_data)) copy_data_default = copy_data - IF(PRESENT(close)) close_default = close - IF(PRESENT(close_data)) close_data_default = close_data - - hdferr = h5pcreate_class_c(parent, name , name_len, class, & - create_default, create_data_default, & - copy_default, copy_data_default, & - close_default, close_data_default) - - END SUBROUTINE h5pcreate_class_f - -! -!****s* H5P (F03)/h5pset_file_image_f_F03 -! -! NAME -! h5pset_file_image_f -! -! PURPOSE -! Sets an initial file image in a memory buffer. -! -! Inputs: -! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, -! or C_NULL_PTR if no initial file image is desired -! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(IN) :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & - BIND(C, NAME='h5pset_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - END FUNCTION h5pset_file_image_c - END INTERFACE - - hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) - - END SUBROUTINE h5pset_file_image_f -! -!****s* H5P (F03)/h5pget_file_image_f_F03 -! -! NAME -! h5pget_file_image_f -! -! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. -! -! Inputs: -! fapl_id - File access property list identifier. -! -! Outputs: -! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type -! c_loc. If buf_ptr is not C_NULL_PTR, on successful -! return, buf_ptr shall contain a C pointer to a copy -! of the initial image provided in the last call to -! H5Pset_file_image_f for the supplied fapl_id, or -! buf_ptr shall contain a C_NULL_PTR if there is no -! initial image set. -! -! buf_len_ptr - Contains the value of the buffer parameter for -! the initial image in the supplied fapl_id. The value -! will be 0 if no initial image is set. -! -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - INTEGER , INTENT(OUT) :: hdferr - -!***** - INTERFACE - INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & - BIND(C, NAME='h5pget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - END FUNCTION h5pget_file_image_c - END INTERFACE - - hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) - - END SUBROUTINE h5pget_file_image_f - -END MODULE H5P_PROVISIONAL - diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90 deleted file mode 100644 index b5ea13d..0000000 --- a/fortran/src/H5Pff_F90.f90 +++ /dev/null @@ -1,949 +0,0 @@ -!****h* ROBODoc/H5P (_F90) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! -! This file contains Fortran 90 interfaces for H5P functions. It contains -! the same functions as H5Pff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Pff_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. * -! 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 H5P 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 H5P_PROVISIONAL - - USE H5GLOBAL - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - END INTERFACE - -CONTAINS -! -!****s* H5P (F90)/h5pset(get)fill_value_f -! -! NAME -! h5pset(get)fill_value_f -! -! PURPOSE -! Sets(gets) fill value for a dataset creation property list -! -! INPUTS -! prp_id - dataset creation property list identifier -! type_id - datatype identifier for fill value -! fillvalue - fill value -! OUTPUTS -! type_id - datatype identifier for fill value -! fillvalue - fill value -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! SOURCE - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_INTEGER_C'::h5pset_fill_value_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_integer_c - END INTERFACE - - hdferr = h5pset_fill_value_integer_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_integer - - - SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_INTEGER_C'::h5pget_fill_value_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: fillvalue - END FUNCTION h5pget_fill_value_integer_c - END INTERFACE - - hdferr = h5pget_fill_value_integer_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_real_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_REAL_C'::h5pset_fill_value_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - REAL, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_real_c - END INTERFACE - - hdferr = h5pset_fill_value_real_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - REAL, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_real_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_REAL_C'::h5pget_fill_value_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - REAL :: fillvalue - END FUNCTION h5pget_fill_value_real_c - END INTERFACE - - hdferr = h5pget_fill_value_real_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_valuec_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUEC_C'::h5pset_fill_valuec_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_valuec_c - END INTERFACE - - hdferr = h5pset_fill_valuec_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_valuec_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUEC_C'::h5pget_fill_valuec_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: fillvalue - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER :: fillvalue - END FUNCTION h5pget_fill_valuec_c - END INTERFACE - - hdferr = h5pget_fill_valuec_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F90)/h5pset_integer -! -! NAME -! h5pset_integer -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_integer_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_INTEGER_C'::h5pset_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER, INTENT(IN) :: value - END FUNCTION h5pset_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_integer_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_integer - -! -!****s* H5P (F90)/h5pset_real -! -! NAME -! h5pset_real -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_real_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_REAL_C'::h5pset_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - REAL, INTENT(IN) :: value - END FUNCTION h5pset_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_real_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_real - -!****s* H5P (F90)/h5pset_char -! -! NAME -! h5pset_char -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5psetc_c(prp_id, name, name_len, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSETC_C'::h5psetc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5psetc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5psetc_c(prp_id, name , name_len, value, value_len) - END SUBROUTINE h5pset_char - -!****s* H5P (F90)/h5pget_integer -! -! NAME -! h5pget_integer -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_integer_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_INTEGER_C'::h5pget_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER, INTENT(OUT) :: value - END FUNCTION h5pget_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_integer_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_integer - -! -!****s* H5P (F90)/h5pget_real -! -! NAME -! h5pget_real -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_real_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_REAL_C'::h5pget_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - REAL, INTENT(OUT) :: value - END FUNCTION h5pget_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_real_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_real - -! -!****s* H5P (F90)/h5pget_char -! -! NAME -! h5pget_char -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pgetc_c(prp_id, name, name_len, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGETC_C'::h5pgetc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - CHARACTER(LEN=*), INTENT(OUT) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pgetc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pgetc_c(prp_id, name , name_len, value, value_len) - END SUBROUTINE h5pget_char - -! -!****s* H5P (F90)/h5pregister_integer -! -! NAME -! h5pregister_integer -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_integer_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_INTEGER_C'::h5pregister_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER, INTENT(IN) :: value - END FUNCTION h5pregister_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_integer_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_integer - -!****s* H5P (F90)/h5pregister_real -! -! NAME -! -! h5pregister_real -! -! PURPOSE Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_real_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_REAL_C'::h5pregister_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - REAL, INTENT(IN) :: value - END FUNCTION h5pregister_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_real_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_real - -! -!****s* H5P (F90)/h5pregister_char -! -! NAME -! h5pregister_char -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pregisterc_c(class, name, name_len, size, value, & - value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTERC_C'::h5pregisterc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pregisterc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pregisterc_c(class, name , name_len, size, value, value_len) - END SUBROUTINE h5pregister_char -! -!****s* H5P (F90)/h5pinsert_integer -! -! NAME -! h5pinsert_integer -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_integer_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_INTEGER_C'::h5pinsert_integer_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER, INTENT(IN) :: value - END FUNCTION h5pinsert_integer_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_integer_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_integer - -! -!****s* H5P (F90)/h5pinsert_real -! -! NAME -! h5pinsert_real -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - REAL, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_real_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_REAL_C'::h5pinsert_real_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - REAL, INTENT(IN) :: value - END FUNCTION h5pinsert_real_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_real_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_real - - -! -!****s* H5P (F90)/h5pinsert_char -! -! NAME -! h5pinsert_char -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE -SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - INTEGER :: value_len - - INTERFACE - INTEGER FUNCTION h5pinsertc_c(plist, name, name_len, size, value, value_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERTC_C'::h5pinsertc_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: value - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(IN) :: value - INTEGER, INTENT(IN) :: value_len - END FUNCTION h5pinsertc_c - END INTERFACE - - name_len = LEN(name) - value_len = LEN(value) - hdferr = h5pinsertc_c(plist, name , name_len, size, value, value_len) - END SUBROUTINE h5pinsert_char - -! -!****s* H5P (F90)/h5pcreate_class_f -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! INPUTS -! parent - Property list identifier of the parent class -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - name of the class we are creating -! OUTPUTS -! class - property list class identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent ! parent property list class - ! identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property tocreate - INTEGER(HID_T), INTENT(OUT) :: class ! property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pcreate_class_f90_c(parent, name, name_len, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_CLASS_F90_C'::h5pcreate_class_f90_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - END FUNCTION h5pcreate_class_f90_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pcreate_class_f90_c(parent, name, name_len, class) - - END SUBROUTINE h5pcreate_class_f - -END MODULE H5P_PROVISIONAL - diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 068f24e..9cd9950 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -1,6 +1,6 @@ /****h* H5Rf/H5Rf * PURPOSE - * This file contains C stubs for H5R Fortran APIs + * This file contains C stubs for H5R Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -24,68 +24,21 @@ #include "H5f90.h" #include "H5Eprivate.h" -/****if* H5Rf/h5rcreate_object_c - * NAME - * h5rcreate_object_c - * PURPOSE - * Call H5Rcreate to create a reference to an object - * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * OUTPUTS - * ref - reference to the object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * SOURCE -*/ -int_f -nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) -/******/ -{ - char *c_name = NULL; - hobj_ref_t ref_c; - int_f ret_value = 0; - - /* - * Convert FORTRAN name to C name - */ - if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rcreate function. - */ - if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0) - HGOTO_DONE(FAIL) - - /* Copy the reference created */ - *ref = (haddr_t_f)ref_c; - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} /* nh5rcreate_object_c() */ - /****if* H5Rf/h5rcreate_region_c * NAME - * h5rcreate_region_c + * h5rcreate_region_c * PURPOSE - * Call H5Rcreate to create a reference to dataset region - * region + * Call H5Rcreate to create a reference to dataset region + * region * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * space_id - dataset space identifier + * loc_id - file or group identifier + * name - name of the dataset + * namelen - name length + * space_id - dataset space identifier * OUTPUTS - * ref - reference to the dataset region + * ref - reference to the dataset region * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -94,7 +47,7 @@ done: * SOURCE */ int_f -nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) +h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) /******/ { char *c_name = NULL; @@ -120,7 +73,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* end nh5rcreate_region_c() */ +} /* end h5rcreate_region_c() */ /****if* H5Rf/h5rcreate_ptr_c * NAME @@ -165,89 +118,6 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r return ret_value; } -/****if* H5Rf/h5rdereference_region_c - * NAME - * h5rdereference_region_c - * PURPOSE - * Call H5Rdereference to dereference to dataset region - * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region - * OUTPUTS - * obj_id - dereferenced dataset identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) -/******/ -{ - hdset_reg_ref_t ref_c; - hid_t c_obj_id; - int_f ret_value = 0; - - /* Copy the reference to dereference */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end nh5rdereference_region_c() */ - -/****if* H5Rf/h5rdereference_object_c - * NAME - * h5rdereference_object_c - * PURPOSE - * Call H5Rdereference to dereference an object - * INPUTS - * dset_id - dataset identifier - * ref - reference to an object - * OUTPUTS - * obj_id - dereferenced object identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) -/******/ -{ - hid_t c_obj_id; - hobj_ref_t ref_c = (hobj_ref_t)*ref; - int_f ret_value = 0; - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_OBJECT, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end nh5rdereference_object_c() */ - /****if* H5Rf/h5rdereference_ptr_c * NAME * h5rdereference_ptr_c @@ -255,7 +125,7 @@ done: * Call H5Rdereference * INPUTS * obj_id - Valid identifier for the file containing the - * referenced object or any object in that file. + * referenced object or any object in that file. * ref_typ - The reference type of ref. * ref - Object reference * OUTPUTS @@ -292,8 +162,8 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -306,7 +176,7 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * SOURCE */ int_f -nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) +h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; @@ -327,7 +197,7 @@ nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_region_c() */ +} /* end h5rget_region_region_c() */ /****if* H5Rf/h5rget_region_ptr_c * NAME @@ -335,8 +205,8 @@ done: * PURPOSE * Call H5Rget_region to dereference dataspace region * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS * space_id - dereferenced dataset dataspace identifier * RETURNS @@ -366,22 +236,22 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_ptr_c() */ +} /* end h5rget_region_ptr_c() */ /****if* H5Rf/h5rget_object_type_obj_c * NAME - * h5rget_object_type_obj_c + * h5rget_object_type_obj_c * PURPOSE - * Call H5Rget_object_type to retrieve the type of the object reference points - * to + * Call H5Rget_object_type to retrieve the type of the object reference points + * to * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region + * dset_id - dataset identifier + * ref - reference to the dataset region * OUTPUTS - * obj_type - type of dereferenced object + * obj_type - type of dereferenced object * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, December 1, 1999 @@ -390,7 +260,7 @@ done: * SOURCE */ int_f -nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) +h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) /******/ { H5O_type_t c_obj_type; @@ -408,125 +278,7 @@ nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) done: return ret_value; -} /* end nh5rget_object_type_obj_c() */ - -/****if* H5Rf/h5rget_name_object_c - * NAME - * h5rget_name_object_c - * PURPOSE - * Call H5Rget_name for an object - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hobj_ref_t ref_c = (hobj_ref_t)*ref; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * Convert C name to FORTRAN and place it in the given buffer - */ - HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1); - *size_default = (size_t_f)c_size; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} /* end nh5rget_name_object_c() */ - -/****if* H5Rf/h5rget_name_region_c - * NAME - * h5rget_name_region_c - * PURPOSE - * Call H5Rget_name for a dataset region - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hdset_reg_ref_t ref_c; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - /* Copy the reference to query */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * Convert C name to FORTRAN and place it in the given buffer - */ - HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1); - *size_default = (size_t_f)c_size; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} +} /* end h5rget_object_type_obj_c() */ /****if* H5Rf/h5rget_name_ptr_c * NAME @@ -535,13 +287,13 @@ done: * Call H5Rget_name * INPUTS * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref_type - Type of reference. - * ref - An object or dataset region reference. + * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. + * ref_type - Type of reference. + * ref - An object or dataset region reference. * * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. + * name - A name associated with the referenced object or dataset region. + * size - The size of the name buffer. * * RETURNS * 0 on success, -1 on failure @@ -589,24 +341,24 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_ /****if* H5Rf/h5rget_obj_type_c * NAME - * h5rget_obj_type_c + * h5rget_obj_type_c * PURPOSE - * Call H5Rget_obj_type + * Call H5Rget_obj_type * INPUTS - * loc_id - Identifier for the dataset containing the reference or - * for the group that dataset is in. - * ref_type - Type of reference to query. - * ref - Reference to query. + * loc_id - Identifier for the dataset containing the reference or + * for the group that dataset is in. + * ref_type - Type of reference to query. + * ref - Reference to query. * * OUTPUTS - * obj_type - Type of referenced object. These are defined in H5Opublic.h, - * enum H5O_type_t + * obj_type - Type of referenced object. These are defined in H5Opublic.h, + * enum H5O_type_t * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * M. Scot Breitenfeld - * December 17, 2008 + * M. Scot Breitenfeld + * December 17, 2008 * * SOURCE */ diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 new file mode 100644 index 0000000..a90bd9a --- /dev/null +++ b/fortran/src/H5Rff.F90 @@ -0,0 +1,792 @@ +!****h* ROBODoc/H5R +! +! NAME +! MODULE H5R +! +! FILE +! fortran/src/H5Rff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5R 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 +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5R 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 H5R + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR + USE H5GLOBAL + + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! + ! TYPE hobj_ref_t_f + ! INTEGER ref(REF_OBJ_BUF_LEN) + ! END TYPE + ! + ! TYPE hdset_reg_ref_t_f + ! INTEGER ref(REF_REG_BUF_LEN) + ! END TYPE + ! + + INTERFACE h5rget_object_type_f + + MODULE PROCEDURE h5rget_object_type_obj_f + + END INTERFACE + + TYPE :: hdset_reg_ref_t_f03 + INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref + END TYPE hdset_reg_ref_t_f03 + + INTERFACE h5rget_region_f + + MODULE PROCEDURE h5rget_region_region_f ! obsolete + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + + END INTERFACE + + + INTERFACE h5rcreate_f + + MODULE PROCEDURE h5rcreate_object_f ! obsolete + MODULE PROCEDURE h5rcreate_region_f ! obsolete + MODULE PROCEDURE h5rcreate_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rdereference_f + + MODULE PROCEDURE h5rdereference_object_f ! obsolete + MODULE PROCEDURE h5rdereference_region_f ! obsolete + MODULE PROCEDURE h5rdereference_ptr_f ! F2003 + + END INTERFACE + + INTERFACE h5rget_name_f + + MODULE PROCEDURE h5rget_name_object_f ! obsolete + MODULE PROCEDURE h5rget_name_region_f ! obsolete + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 + + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & + BIND(C, NAME='h5rget_name_ptr_c') + IMPORT :: c_char, c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: name_len + INTEGER(SIZE_T) :: size_default + END FUNCTION h5rget_name_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & + BIND(C, NAME='h5rdereference_ptr_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + END FUNCTION h5rdereference_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & + BIND(C, NAME='h5rcreate_ptr_c') + IMPORT :: c_ptr, c_char + IMPORT :: HID_T + IMPLICIT NONE + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: ref_type + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & + BIND(C, NAME='h5rget_region_ptr_c') + IMPORT :: c_ptr + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_ptr_c + END INTERFACE + + +CONTAINS + +!****s* H5R/h5rget_object_type_obj_f +! +! NAME +! h5rget_object_type_obj_f +! +! PURPOSE +! Retrieves the type of object that an object reference points to. +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the objects +! ref - reference to open +! OUTPUTS +! obj_type - object_type, possible values: +! H5G_UNKNOWN_F +! H5G_GROUP_F +! H5G_DATASET_F +! H5G_TYPE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_object_type_f +! subroutine. +! SOURCE + SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference + INTEGER, INTENT(OUT) :: obj_type ! Object type + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) BIND(C, NAME='h5rget_object_type_obj_c') + IMPORT :: HID_T, HADDR_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T) :: ref_f + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5rget_object_type_obj_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) + + END SUBROUTINE h5rget_object_type_obj_f + + +!****s* H5R/h5rget_region_region_f +! +! NAME +! h5rget_region_region_f +! +! PURPOSE +! Retrieves a dataspace with the specified region selected +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) BIND(C, NAME='h5rget_region_region_c') + IMPORT :: HID_T, REF_REG_BUF_LEN + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) + + END SUBROUTINE h5rget_region_region_f + +!****s* H5R/h5rget_region_ptr_f +! +! NAME +! h5rget_region_ptr_f +! +! PURPOSE +! Retrieves a dataspace with the specified region +! selected using pointer +! +! INPUTS +! dset_id - identifier of the dataset containing +! reference to the regions +! ref - reference to open +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! August 4, 2012 +! +! NOTES +! This is a module procedure for the h5rget_region_f subroutine. +! +! SOURCE + SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference + INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + + END SUBROUTINE h5rget_region_ptr_f + + +!****s* H5R (F03)/h5rcreate_object_f +! +! NAME +! h5rcreate_object_f +! +! PURPOSE +! Creates reference to the object +! +! Inputs: +! loc_id - location identifier +! name - name of the object at the specified location +! Outputs: +! ref - reference to the specified object +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! Signature: + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified + ! by loc_id identifier + TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + namelen = LEN(name) + + hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) + + END SUBROUTINE h5rcreate_object_f + +!****s* H5R (F90)/h5rcreate_region_f +! +! NAME +! h5rcreate_region_f +! +! PURPOSE +! Creates reference to the dataset region +! +! INPUTS +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region +! OUTPUTS +! ref - reference to the dataset region +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rcreate_f subroutine. +! +! SOURCE + SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) BIND(C,NAME='h5rcreate_region_c') + IMPORT :: HID_T, REF_REG_BUF_LEN + IMPORT :: C_CHAR + IMPLICIT NONE + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + END SUBROUTINE h5rcreate_region_f + +!****s* H5R (F03)/h5rcreate_ptr_f +! +! NAME +! h5rcreate_ptr_f +! +! PURPOSE +! Creates a reference. +! +! Inputs: +! loc_id - location identifier +! name - name of the dataset at the specified location +! ref_type - type of reference: +! H5R_OBJECT +! H5T_STD_REF_DSETREG +! Outputs: +! ref - reference created by the function call. +! hdferr - returns 0 if successful and -1 if fails. +! OPTIONAL +! space_id - dataspace identifier that describes selected region +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rcreate_f +! subroutine where the output is a pointer. +! +! Signature: + SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified + ! by loc_id identifier + INTEGER, INTENT(IN) :: ref_type ! type of reference + TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: space_id_c + + namelen = LEN(name) + space_id_c = -1 + IF(PRESENT(space_id)) space_id_c = space_id + hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) + + END SUBROUTINE h5rcreate_ptr_f +!****s* H5R (F03)/h5rdereference_object_f +! +! NAME +! h5rdereference_object_f +! +! PURPOSE +! Opens the HDF5 object referenced +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference +! ref - reference to open +! Outputs: +! obj_id - object_identifier +! hdferr - returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_object_f +!****s* H5R (F03)/h5rdereference_region_f +! +! NAME +! h5rdereference_region_f +! +! PURPOSE +! Opens the dataset region +! +! Inputs: +! dset_id - identifier of the dataset containing +! reference to teh regions +! ref - reference to open +! Outputs: +! obj_id - dataspace identifier +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! NOTES +! This is a module procedure for the h5rdereference_f subroutine. +! +! Signature: + SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) + + END SUBROUTINE h5rdereference_region_f + +!****s* H5R (F03)/h5rdereference_ptr_f +! +! NAME +! h5rdereference_ptr_f +! +! PURPOSE +! Opens the HDF5 object referenced. +! +! Inputs: +! obj_id - valid identifier for the file containing the +! referenced object or any object in that file. +! ref_type - the reference type of ref. +! ref - Reference to open. +! Outputs: +! ref_obj_id - identifier of referenced object +! hdferr - returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! June 20, 2008 +! +! NOTES +! This is a module procedure for the h5rdereference_f +! subroutine using pointers. +! +! Signature: + SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the + ! referenced object or any object in that file. + INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. + TYPE(C_PTR), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + ! Identifier of referenced object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) + + END SUBROUTINE h5rdereference_ptr_f +! +!****s* H5R (F03)/h5rget_name_object_f +! +! NAME +! h5rget_name_object_f +! +! PURPOSE +! Retrieves a name of a referenced object. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + 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 +!****s* H5R (F03)/h5rget_name_region_f +! +! NAME +! h5rget_name_region_f +! +! PURPOSE +! Retrieves a name of a dataset region. +! +! Inputs: +! 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 - Returns 0 if successful and -1 if fails. +! +! Optional parameters: +! 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: + 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 + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_region_f + + !****s* H5R (F03)/h5rget_name_ptr_f + ! + ! NAME + ! h5rget_name_ptr_f + ! + ! PURPOSE + ! Retrieves a name of a referenced object. + ! + ! Inputs: + ! 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 - Returns 0 if successful and -1 if fails. + ! + ! Optional parameters: + ! 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: + 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 + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size +!***** + INTEGER(SIZE_T) :: size_default + INTEGER(SIZE_T) :: name_len + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + END SUBROUTINE h5rget_name_ptr_f + + !****s* H5R (F03)/h5rget_obj_type_f + ! + ! NAME + ! h5rget_obj_type_f + ! + ! PURPOSE + ! Retrieves the type of object that an object reference points to. + ! + ! Inputs: + ! loc_id - Identifier for the dataset containing the reference or + ! for the group that dataset is in. + ! ref_type - Type of reference to query. + ! ref - Reference to query. + ! + ! Outputs: + ! obj_type - Type of referenced object. + ! H5G_UNKNOWN_F + ! H5G_GROUP_F + ! H5G_DATASET_F + ! H5G_TYPE_F + ! + ! hdferr - Returns 0 if successful and -1 if fails. + ! + ! AUTHOR + ! M. Scot Breitenfeld + ! Decemeber 17, 2008 + ! + ! Signature: + SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr + !***** + + INTERFACE + INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & + BIND(C, NAME='h5rget_obj_type_c') + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), VALUE :: ref + INTEGER :: obj_type + END FUNCTION h5rget_obj_type_c + END INTERFACE + + hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) + + END SUBROUTINE h5rget_obj_type_f + +END MODULE H5R diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 deleted file mode 100644 index 77a1ff8..0000000 --- a/fortran/src/H5Rff.f90 +++ /dev/null @@ -1,128 +0,0 @@ -!****h* ROBODoc/H5R -! -! NAME -! MODULE H5R -! -! FILE -! fortran/src/H5Rff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5R functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5R 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 H5R - USE H5GLOBAL - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - - INTERFACE h5rget_object_type_f - - MODULE PROCEDURE h5rget_object_type_obj_f - - END INTERFACE - -CONTAINS - -!****s* H5R/h5rget_object_type_obj_f -! -! NAME -! h5rget_object_type_obj_f -! -! PURPOSE -! Retrieves the type of object that an object reference points to. -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the objects -! ref - reference to open -! OUTPUTS -! obj_type - object_type, possible values: -! H5G_UNKNOWN_F -! H5G_GROUP_F -! H5G_DATASET_F -! H5G_TYPE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_object_type_f -! subroutine. -! SOURCE - SUBROUTINE h5rget_object_type_obj_f(dset_id, ref, obj_type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER, INTENT(OUT) :: obj_type ! Object type - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_OBJECT_TYPE_OBJ_C':: h5rget_object_type_obj_c - !DEC$ENDIF - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5rget_object_type_obj_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) - - END SUBROUTINE h5rget_object_type_obj_f - -END MODULE H5R diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90 deleted file mode 100644 index 8f40607..0000000 --- a/fortran/src/H5Rff_F03.f90 +++ /dev/null @@ -1,719 +0,0 @@ -!****h* ROBODoc/H5R (F03) -! -! NAME -! MODULE H5R_PROVISIONAL -! -! FILE -! fortran/src/H5Rff_F03.f90 -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5R functions. -! It contains the same functions as H5Rff_DEPRECIATE.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Rff_DEPRECIATE.f90 if Fortran 2003 functions are enabled. -! -! 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 H5R 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 H5R_PROVISIONAL - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - - TYPE :: hdset_reg_ref_t_f03 - INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref - END TYPE hdset_reg_ref_t_f03 - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 - - END INTERFACE - - - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f ! obsolete - MODULE PROCEDURE h5rcreate_region_f ! obsolete - MODULE PROCEDURE h5rcreate_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f ! obsolete - MODULE PROCEDURE h5rdereference_region_f ! obsolete - MODULE PROCEDURE h5rdereference_ptr_f ! F2003 - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f ! obsolete - MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & - BIND(C, NAME='h5rget_name_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: name_len - INTEGER(SIZE_T) :: size_default - END FUNCTION h5rget_name_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & - BIND(C, NAME='h5rdereference_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - END FUNCTION h5rdereference_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & - BIND(C, NAME='h5rcreate_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: ref_type - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & - BIND(C, NAME='h5rget_region_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: dset_id - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_ptr_c - END INTERFACE - -CONTAINS - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - -!****s* H5R/h5rget_region_ptr_f -! -! NAME -! h5rget_region_ptr_f -! -! PURPOSE -! Retrieves a dataspace with the specified region -! selected using pointer -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! August 4, 2012 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) - - END SUBROUTINE h5rget_region_ptr_f - - -!****s* H5R (F03)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! Inputs: -! loc_id - location identifier -! name - name of the object at the specified location -! Outputs: -! ref - reference to the specified object -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! Signature: - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - namelen = LEN(name) - - hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f - -!****s* H5R (F03)/h5rcreate_ptr_f -! -! NAME -! h5rcreate_ptr_f -! -! PURPOSE -! Creates a reference. -! -! Inputs: -! loc_id - location identifier -! name - name of the dataset at the specified location -! ref_type - type of reference: -! H5R_OBJECT -! H5T_STD_REF_DSETREG -! Outputs: -! ref - reference created by the function call. -! hdferr - returns 0 if successful and -1 if fails. -! OPTIONAL -! space_id - dataspace identifier that describes selected region -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rcreate_f -! subroutine where the output is a pointer. -! -! Signature: - SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER, INTENT(IN) :: ref_type ! type of reference - TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: space_id_c - - namelen = LEN(name) - space_id_c = -1 - IF(PRESENT(space_id)) space_id_c = space_id - hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) - - END SUBROUTINE h5rcreate_ptr_f -!****s* H5R (F03)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference -! ref - reference to open -! Outputs: -! obj_id - object_identifier -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F03)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to teh regions -! ref - reference to open -! Outputs: -! obj_id - dataspace identifier -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: - SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) - - END SUBROUTINE h5rdereference_region_f - -!****s* H5R (F03)/h5rdereference_ptr_f -! -! NAME -! h5rdereference_ptr_f -! -! PURPOSE -! Opens the HDF5 object referenced. -! -! Inputs: -! obj_id - valid identifier for the file containing the -! referenced object or any object in that file. -! ref_type - the reference type of ref. -! ref - Reference to open. -! Outputs: -! ref_obj_id - identifier of referenced object -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rdereference_f -! subroutine using pointers. -! -! Signature: - SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the - ! referenced object or any object in that file. - INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. - TYPE(C_PTR), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) - - END SUBROUTINE h5rdereference_ptr_f -! -!****s* H5R (F03)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - 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 -!****s* H5R (F03)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! Inputs: -! 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 - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! 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: - 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 - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - - !****s* H5R (F03)/h5rget_name_ptr_f - ! - ! NAME - ! h5rget_name_ptr_f - ! - ! PURPOSE - ! Retrieves a name of a referenced object. - ! - ! Inputs: - ! 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 - Returns 0 if successful and -1 if fails. - ! - ! Optional parameters: - ! 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: - 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 - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(OUT) :: hdferr - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size -!***** - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_ptr_f - - !****s* H5R (F03)/h5rget_obj_type_f - ! - ! NAME - ! h5rget_obj_type_f - ! - ! PURPOSE - ! Retrieves the type of object that an object reference points to. - ! - ! Inputs: - ! loc_id - Identifier for the dataset containing the reference or - ! for the group that dataset is in. - ! ref_type - Type of reference to query. - ! ref - Reference to query. - ! - ! Outputs: - ! obj_type - Type of referenced object. - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - ! - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! Decemeber 17, 2008 - ! - ! Signature: - SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - INTEGER, INTENT(OUT) :: obj_type - INTEGER, INTENT(OUT) :: hdferr - !***** - - INTERFACE - INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & - BIND(C, NAME='h5rget_obj_type_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), VALUE :: ref - INTEGER :: obj_type - END FUNCTION h5rget_obj_type_c - END INTERFACE - - hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) - - END SUBROUTINE h5rget_obj_type_f - -END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90 deleted file mode 100644 index ac45857..0000000 --- a/fortran/src/H5Rff_F90.f90 +++ /dev/null @@ -1,514 +0,0 @@ -!****h* ROBODoc/H5R (F90) -! -! NAME -! MODULE H5R_PROVISIONAL -! -! FILE -! fortran/src/H5Rff_F90.f90 -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5R functions. It contains -! the same functions as H5Rff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Rff_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. * -! 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 H5R 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 H5R_PROVISIONAL - USE H5GLOBAL - -! If you change the value of these parameters, do not forget to change corresponding -! values in the H5f90.h file. -! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 -! -! TYPE hobj_ref_t_f -! INTEGER ref(REF_OBJ_BUF_LEN) -! END TYPE -! -! TYPE hdset_reg_ref_t_f -! INTEGER ref(REF_REG_BUF_LEN) -! END TYPE -! - INTERFACE h5rcreate_f - - MODULE PROCEDURE h5rcreate_object_f - MODULE PROCEDURE h5rcreate_region_f - - END INTERFACE - - INTERFACE h5rdereference_f - - MODULE PROCEDURE h5rdereference_object_f - MODULE PROCEDURE h5rdereference_region_f - - END INTERFACE - - INTERFACE h5rget_name_f - - MODULE PROCEDURE h5rget_name_object_f - MODULE PROCEDURE h5rget_name_region_f - - END INTERFACE - - INTERFACE h5rget_region_f - - MODULE PROCEDURE h5rget_region_region_f - - END INTERFACE - - -CONTAINS - - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) - - END SUBROUTINE h5rget_region_region_f - - - -!****s* H5R (F90)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! INPUTS -! loc_id - location identifier -! name - name of the object at the specified location -! OUTPUTS -! ref - reference to the specified object -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_object_c(ref_f, loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_OBJECT_C':: h5rcreate_object_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5rcreate_object_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_object_c(ref_f, loc_id, name, namelen ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE - SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - END SUBROUTINE h5rcreate_region_f -!****s* H5R (F90)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! INPUTS -! dset_id - identifier of the dataset containing reference -! ref - reference to open -! OUTPUTS -! obj_id - object_identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! SOURCE - SUBROUTINE h5rdereference_object_f(dset_id, ref, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rdereference_object_c(dset_id, ref_f, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_OBJECT_C':: h5rdereference_object_c - !DEC$ENDIF - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5rdereference_object_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rdereference_object_c(dset_id, ref_f, obj_id ) - - END SUBROUTINE h5rdereference_object_f -!****s* H5R (F90)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! INPUTS -! 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 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! SOURCE - SUBROUTINE h5rdereference_region_f(dset_id, ref, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rdereference_region_c(dset_id, ref_f, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RDEREFERENCE_REGION_C':: h5rdereference_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id -! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5rdereference_region_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rdereference_region_c(dset_id, ref_f, obj_id ) - - END SUBROUTINE h5rdereference_region_f -!****s* H5R (F90)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! INPUTS -! 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 -! -! OPTIONAL PARAMETERS -! 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 -! -! SOURCES - SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) - IMPLICIT NONE - 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, - ! 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(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTEGER(SIZE_T) :: size_default - INTEGER(SIZE_T) :: name_len - - INTERFACE - INTEGER FUNCTION h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_OBJECT_C':: h5rget_name_object_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(HADDR_T) :: ref_f - - INTEGER(SIZE_T) :: name_len - END FUNCTION h5rget_name_object_c - END INTERFACE - - name_len=LEN(name) - - ref_f = ref%ref - hdferr = h5rget_name_object_c(loc_id, ref_f, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_object_f - -!****s* H5R (F90)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! INPUTS -! 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 -! -! OPTIONAL PARAMETERS -! 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 -! -! SOURCE - SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) - IMPLICIT NONE - 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 - INTEGER(SIZE_T) :: name_len - - INTERFACE - INTEGER FUNCTION h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_NAME_REGION_C':: h5rget_name_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER :: ref_f(REF_REG_BUF_LEN) - - INTEGER(SIZE_T) :: name_len - END FUNCTION h5rget_name_region_c - END INTERFACE - - name_len=LEN(name) - - ref_f = ref%ref - hdferr = h5rget_name_region_c(loc_id, ref_f, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - END SUBROUTINE h5rget_name_region_f - -END MODULE H5R_PROVISIONAL diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 6947d64..67427a7 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -1,6 +1,6 @@ /****h* H5Sf/H5Sf * PURPOSE - * This file contains C stubs for H5S Fortran APIs + * This file contains C stubs for H5S Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -26,27 +26,27 @@ /****if* H5Sf/h5screate_simple_c * NAME - * h5screate_simple_c + * h5screate_simple_c * PURPOSE - * Call H5Screate_simple to create a dataspace + * Call H5Screate_simple to create a dataspace * INPUTS - * rank - number of dimensions of dataspace - * dims - array of the size of each dimension + * rank - number of dimensions of dataspace + * dims - array of the size of each dimension maxdims - an array of the maximum size of each dimension * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) +h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -75,23 +75,23 @@ done: /****if* H5Sf/h5sclose_c * NAME - * h5sclose_c + * h5sclose_c * PURPOSE - * Call H5Sclose to close the dataspace + * Call H5Sclose to close the dataspace * INPUTS - * space_id - identifier of the dataspace to be closed + * space_id - identifier of the dataspace to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 4, 1999 + * Wednesday, August 4, 1999 * HISTORY * * SOURCE */ int_f -nh5sclose_c ( hid_t_f *space_id ) +h5sclose_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -104,25 +104,25 @@ nh5sclose_c ( hid_t_f *space_id ) /****if* H5Sf/h5screate_c * NAME - * h5screate_c + * h5screate_c * PURPOSE - * Call H5Screate to create a dataspace + * Call H5Screate to create a dataspace * INPUTS - * classtype - type of the dataspace class + * classtype - type of the dataspace class * OUTPUTS - * space_id - identifier of the created dataspace + * space_id - identifier of the created dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -nh5screate_c ( int_f *classtype, hid_t_f *space_id ) +h5screate_c ( int_f *classtype, hid_t_f *space_id ) /******/ { H5S_class_t c_classtype; @@ -138,25 +138,25 @@ nh5screate_c ( int_f *classtype, hid_t_f *space_id ) /****if* H5Sf/h5scopy_c * NAME - * h5scopy_c + * h5scopy_c * PURPOSE - * Call H5Scopy to copy dataspace + * Call H5Scopy to copy dataspace * INPUTS - * space_id - identifier of the dataspace to be copied + * space_id - identifier of the dataspace to be copied * OUTPUTS - * new_space_id - identifier of the new datspace + * new_space_id - identifier of the new datspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) +h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /******/ { int ret_value = 0; @@ -173,28 +173,28 @@ nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) /****if* H5Sf/h5sget_select_hyper_nblocks_c * NAME - * h5sget_select_hyper_nblocks_c + * h5sget_select_hyper_nblocks_c * PURPOSE - * Call H5SH5Sget_select_hyper_nblocks to - * get the the number of hyperslab blocks in - * the current dataspace selection if successful + * Call H5SH5Sget_select_hyper_nblocks to + * get the the number of hyperslab blocks in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, November 12, 1999 + * Friday, November 12, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) +h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /******/ { int ret_value = 0; @@ -211,28 +211,28 @@ nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) /****if* H5Sf/h5sget_select_elem_npoints_c * NAME - * h5sget_select_elem_npoints_c + * h5sget_select_elem_npoints_c * PURPOSE - * Call H5Sget_select_elem_npoints to - * get the the number of element points in - * the current dataspace selection if successful + * Call H5Sget_select_elem_npoints to + * get the the number of element points in + * the current dataspace selection if successful * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * num_points - number of element points in - * the current dataspace selection + * num_points - number of element points in + * the current dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) +h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /******/ { int ret_value = 0; @@ -249,36 +249,36 @@ nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) /****if* H5Sf/h5sget_select_hyper_blocklist_c * NAME - * h5sget_select_hyper_blocklist_c + * h5sget_select_hyper_blocklist_c * PURPOSE - * Call H5Sget_select_hyper_blocklist to - * get a list of the hyperslab blocks currently selected - * Starting with the startblock-th block in the - * list of blocks, num_blocks blocks are put into the user's - * buffer. If the user's buffer fills up before numblocks - * blocks are inserted, the buffer - * will contain only as many blocks as fit. + * Call H5Sget_select_hyper_blocklist to + * get a list of the hyperslab blocks currently selected + * Starting with the startblock-th block in the + * list of blocks, num_blocks blocks are put into the user's + * buffer. If the user's buffer fills up before numblocks + * blocks are inserted, the buffer + * will contain only as many blocks as fit. * INPUTS - * space_id - identifier of the dataspace - * startblock - Hyperslab block to start with - * num_blocks - number of hyperslab blocks in - * the current dataspace selection + * space_id - identifier of the dataspace + * startblock - Hyperslab block to start with + * num_blocks - number of hyperslab blocks in + * the current dataspace selection * OUTPUTS - * buf - List of hyperslab blocks selected + * buf - List of hyperslab blocks selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Monday, November 15, 1999 + * Monday, November 15, 1999 * HISTORY * - * Transpose dimension arrays because of C-FORTRAN storage order - * M. Scot Breitenfeld + * Transpose dimension arrays because of C-FORTRAN storage order + * M. Scot Breitenfeld * SOURCE */ int_f -nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, +h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, hsize_t_f *num_blocks, hsize_t_f *buf) /******/ { @@ -327,31 +327,31 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, /****if* H5Sf/h5sget_select_bounds_c * NAME - * h5sget_select_bounds_c + * h5sget_select_bounds_c * PURPOSE - * Call H5Sget_select_bounds to retrieve the coordinates - * of the bounding box containing the current selection - * and places them into user-supplied buffers + * Call H5Sget_select_bounds to retrieve the coordinates + * of the bounding box containing the current selection + * and places them into user-supplied buffers * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * start - Starting coordinates of the bounding box - * end - Ending coordinates of the bounding box, - * i.e., the coordinates of the diagonally opposite corne + * start - Starting coordinates of the bounding box + * end - Ending coordinates of the bounding box, + * i.e., the coordinates of the diagonally opposite corne * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY - * swapped array bounds to account for C and Fortran reversed - * matrix notation. - * M. Scot Breitenfeld + * swapped array bounds to account for C and Fortran reversed + * matrix notation. + * M. Scot Breitenfeld * SOURCE */ int_f -nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) +h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) /******/ { hid_t c_space_id; @@ -379,34 +379,34 @@ done: /****if* H5Sf/h5sget_select_elem_pointlist_c * NAME - * h5sget_select_elem_pointlist_c + * h5sget_select_elem_pointlist_c * PURPOSE - * Call H5Sget_select_elem_pointlist - * get a list of element points in the - * current dataspace selectin. - * Starting with the startpoint-th point in the - * list of points, numpoints points are put into the user's - * buffer. If the user's buffer fills up before numpoints - * points are inserted, the buffer - * will contain only as many points as fit. + * Call H5Sget_select_elem_pointlist + * get a list of element points in the + * current dataspace selectin. + * Starting with the startpoint-th point in the + * list of points, numpoints points are put into the user's + * buffer. If the user's buffer fills up before numpoints + * points are inserted, the buffer + * will contain only as many points as fit. * INPUTS - * space_id - identifier of the dataspace - * startpoint - Element point to start with - * numpoints - Number of element points to get + * space_id - identifier of the dataspace + * startpoint - Element point to start with + * numpoints - Number of element points to get * OUTPUTS - * buf - List of element points selected + * buf - List of element points selected * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Wednesday, November 17, 1999 + * Wednesday, November 17, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, +h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf) /******/ { @@ -451,23 +451,23 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, /****if* H5Sf/h5sselect_all_c * NAME - * h5sselect_all_c + * h5sselect_all_c * PURPOSE - * Call H5Sselect_all to select entire dataspace + * Call H5Sselect_all to select entire dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -nh5sselect_all_c ( hid_t_f *space_id ) +h5sselect_all_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -480,23 +480,23 @@ nh5sselect_all_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_none_c * NAME - * h5sselect_none_c + * h5sselect_none_c * PURPOSE - * Call H5Sselect_none to reset the selection region + * Call H5Sselect_none to reset the selection region * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -nh5sselect_none_c ( hid_t_f *space_id ) +h5sselect_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -509,27 +509,27 @@ nh5sselect_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_valid_c * NAME - * h5sselect_valid_c + * h5sselect_valid_c * PURPOSE - * Call H5Sselect_valid to verify that selection - * is within dataspace extent. + * Call H5Sselect_valid to verify that selection + * is within dataspace extent. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not valid selection, 1 if is valid selection, - * and negative on failure. + * flag - 0 if not valid selection, 1 if is valid selection, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, August 10, 1999 + * Tuesday, August 10, 1999 * HISTORY * * SOURCE */ int_f -nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) +h5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -545,26 +545,26 @@ nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sget_simple_extent_npoints_c * NAME - * h5sget_simple_extent_npoints_c + * h5sget_simple_extent_npoints_c * PURPOSE - * Call H5Sget_simple_extent_npoints to determine the number - * of elements in a dataspace + * Call H5Sget_simple_extent_npoints to determine the number + * of elements in a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace + * npoints - number of points in a dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) +h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /******/ { int ret_value = 0; @@ -580,26 +580,26 @@ nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) /****if* H5Sf/h5sget_select_npoints_c * NAME - * h5sget_select_npoints_c + * h5sget_select_npoints_c * PURPOSE - * Call H5Sget_select_npoints to determine the number - * of elements in a dataspace selection + * Call H5Sget_select_npoints to determine the number + * of elements in a dataspace selection * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * npoints - number of points in a dataspace selection + * npoints - number of points in a dataspace selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) +h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /******/ { int ret_value = 0; @@ -615,26 +615,26 @@ nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) /****if* H5Sf/h5sget_simple_extent_ndims_c * NAME - * h5sget_simple_extent_ndims_c + * h5sget_simple_extent_ndims_c * PURPOSE - * Call H5Sget_simple_extent_ndims to determine the number - * dimensions + * Call H5Sget_simple_extent_ndims to determine the number + * dimensions * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * rank - number of dataspace dimensions + * rank - number of dataspace dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) +h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /******/ { int ret_value = 0; @@ -650,27 +650,27 @@ nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) /****if* H5Sf/h5sget_simple_extent_type_c * NAME - * h5sget_simple_extent_type_c + * h5sget_simple_extent_type_c * PURPOSE - * Call H5Sget_simple_extent_type to determine the class type - * of a dataspace + * Call H5Sget_simple_extent_type to determine the class type + * of a dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * classtype - class type; possible values are: + * classtype - class type; possible values are: * H5S_SCALAR_F (0), H5S_SIMPLE_F (1), H5S_NULL_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) +h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /******/ { int ret_value = 0; @@ -691,25 +691,25 @@ nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) /****if* H5Sf/h5soffset_simple_c * NAME - * h5soffset_simple_c + * h5soffset_simple_c * PURPOSE - * Call H5Soffset_simple to set the offset of a simple - * dataspace + * Call H5Soffset_simple to set the offset of a simple + * dataspace * INPUTS - * space_id - identifier of the dataspace - * offset - offset array + * space_id - identifier of the dataspace + * offset - offset array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) +h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) /******/ { hid_t c_space_id; @@ -738,27 +738,27 @@ done: /****if* H5Sf/h5sset_extent_simple_c * NAME - * h5sset_extent_simple_c + * h5sset_extent_simple_c * PURPOSE - * Call H5Sset_extent_simple to set or reset size of - * existing dataspace + * Call H5Sset_extent_simple to set or reset size of + * existing dataspace * INPUTS - * space_id - identifier of the dataspace - * rank - dataspace rank - * current_size - array with the new dimension sizes - * maximum_size - aray with maximum sizes of dimensions + * space_id - identifier of the dataspace + * rank - dataspace rank + * current_size - array with the new dimension sizes + * maximum_size - aray with maximum sizes of dimensions * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) +h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) /******/ { hsize_t c_current_size[H5S_MAX_RANK]; @@ -784,27 +784,27 @@ done: /****if* H5Sf/h5sget_simple_extent_dims_c * NAME - * h5sget_simple_extent_dims_c + * h5sget_simple_extent_dims_c * PURPOSE - * Call H5Sget_simple_extent_dims to retrieve sizes of an - * existing dataspace + * Call H5Sget_simple_extent_dims to retrieve sizes of an + * existing dataspace * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * dims - array with the dimension sizes - * maxdims - aray with maximum sizes of dimensions + * dims - array with the dimension sizes + * maxdims - aray with maximum sizes of dimensions * RETURNS - * number of dataspace dimensions (rank) on success, -1 on failure + * number of dataspace dimensions (rank) on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) +h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) /******/ { hid_t c_space_id; @@ -838,27 +838,27 @@ done: /****if* H5Sf/h5sis_simple_c * NAME - * h5sis_simple_c + * h5sis_simple_c * PURPOSE - * Call H5Sis_simple to detrmine if the dataspace - * is simple. + * Call H5Sis_simple to detrmine if the dataspace + * is simple. * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not simple, 1 if is simple, - * and negative on failure. + * flag - 0 if not simple, 1 if is simple, + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) +h5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /******/ { int ret_value = 0; @@ -875,24 +875,24 @@ nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) /****if* H5Sf/h5sextent_copy_c * NAME - * h5sextent_copy_c + * h5sextent_copy_c * PURPOSE - * Call H5Sextent_copy to copy an extent of dataspace + * Call H5Sextent_copy to copy an extent of dataspace * INPUTS - * dest_space_id - identifier of the destination dataspace - * source_space_id - identifier of the source dataspace + * dest_space_id - identifier of the destination dataspace + * source_space_id - identifier of the source dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) +h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /******/ { int ret_value = 0; @@ -908,23 +908,23 @@ nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) /****if* H5Sf/h5sset_extent_none_c * NAME - * h5sset_extent_none_c + * h5sset_extent_none_c * PURPOSE - * Call H5Sset_extent_none to remove extent from a dataspace + * Call H5Sset_extent_none to remove extent from a dataspace * INPUTS - * space_id - dataspace identifier + * space_id - dataspace identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sset_extent_none_c ( hid_t_f *space_id ) +h5sset_extent_none_c ( hid_t_f *space_id ) /******/ { int ret_value = 0; @@ -939,30 +939,30 @@ nh5sset_extent_none_c ( hid_t_f *space_id ) /****if* H5Sf/h5sselect_hyperslab_c * NAME - * h5sselect_hyperslab_c + * h5sselect_hyperslab_c * PURPOSE - * Call H5Sselect_hyperslab to select a hyperslab + * Call H5Sselect_hyperslab to select a hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) and H5S_SELECT_OR_F (1) - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) +h5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) /******/ { hsize_t c_start[H5S_MAX_RANK]; @@ -1000,30 +1000,30 @@ done: #ifdef NEW_HYPERSLAB_API /****if* H5Sf/h5scombine_hyperslab_c * NAME - * h5scombine_hyperslab_c + * h5scombine_hyperslab_c * PURPOSE - * Call H5Scombine_hyperslab + * Call H5Scombine_hyperslab * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * start - offset of start of hyperslab - * count - number of blocks included in the hyperslab - * stride - hyperslab stride (interval between blocks) - * block - size of block in the hyperslab + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * start - offset of start of hyperslab + * count - number of blocks included in the hyperslab + * stride - hyperslab stride (interval between blocks) + * block - size of block in the hyperslab * OUTPUTS - * hyper_id - identifier for the new dataspace + * hyper_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) +h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) /******/ { int ret_value = -1; @@ -1082,27 +1082,27 @@ DONE: } /****if* H5Sf/h5scombine_select_c * NAME - * h5scombine_select_c + * h5scombine_select_c * PURPOSE - * Call H5Scombine_ select + * Call H5Scombine_ select * INPUTS - * space1_id - identifier of the first dataspace - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * OUTPUTS - * ds_id - identifier for the new dataspace + * ds_id - identifier for the new dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) +h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) /******/ { int ret_value = -1; @@ -1123,25 +1123,25 @@ nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t } /****if* H5Sf/h5sselect_select_c * NAME - * h5sselect_select_c + * h5sselect_select_c * PURPOSE - * Call H5Sselect_ select + * Call H5Sselect_ select * INPUTS - * space1_id - identifier of the first dataspace to modify - * operator - defines how the new selection is combined - * space2_id - identifier of the second dataspace + * space1_id - identifier of the first dataspace to modify + * operator - defines how the new selection is combined + * space2_id - identifier of the second dataspace * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) +h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) /******/ { int ret_value = -1; @@ -1160,24 +1160,24 @@ nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) #endif /*NEW_HYPERSLAB_API*/ /****if* H5Sf/h5sget_select_type_c * NAME - * h5sget_select_type_c + * h5sget_select_type_c * PURPOSE - * Call H5Sget_select_type + * Call H5Sget_select_type * INPUTS - * space_id - identifier of the dataspace + * space_id - identifier of the dataspace * OUTPUTS - * type - type of selection + * type - type of selection * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Monday, October 7, 2002 + * Monday, October 7, 2002 * HISTORY * * SOURCE */ int_f -nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) +h5sget_select_type_c ( hid_t_f *space_id , int_f *type) /******/ { int ret_value = -1; @@ -1195,28 +1195,28 @@ nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) /****if* H5Sf/h5sselect_elements_c * NAME - * h5sselect_elements_c + * h5sselect_elements_c * PURPOSE - * Call H5Sselect_elements to select elements of a dataspace + * Call H5Sselect_elements to select elements of a dataspace * INPUTS - * space_id - identifier of the dataspace - * operator - defines how the new selection is combined - * with the previous one; current values are + * space_id - identifier of the dataspace + * operator - defines how the new selection is combined + * with the previous one; current values are * H5S_SELECT_SET_F (0) - * nelements - number of elements in the selection - * coord - arrays with the elements coordinates + * nelements - number of elements in the selection + * coord - arrays with the elements coordinates * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, August 11, 1999 + * Wednesday, August 11, 1999 * HISTORY * * SOURCE */ int_f -nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) +h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) /******/ { int ret_value = -1; @@ -1251,28 +1251,28 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi /****if* H5Sf/h5sdecode_c * NAME - * h5sdecode_c + * h5sdecode_c * PURPOSE - * Call H5Sdecode + * Call H5Sdecode * INPUTS * * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE */ int_f -nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) +h5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -1297,26 +1297,26 @@ nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) /****if* H5Sf/h5sencode_c * NAME - * h5sencode_c + * h5sencode_c * PURPOSE - * Call H5Sencode + * Call H5Sencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 26, 2008 + * March 26, 2008 * HISTORY * * SOURCE */ int_f -nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -1366,28 +1366,28 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /****if* H5Sf/h5sextent_equal_c * NAME - * h5sextent_equal_c + * h5sextent_equal_c * PURPOSE - * Call H5Sextent_equal + * Call H5Sextent_equal * INPUTS * * space1_id - First dataspace identifier. - * space2_id - Second dataspace identifier. + * space2_id - Second dataspace identifier. * OUTPUTS * - * equal - TRUE if equal, FALSE if unequal. + * equal - TRUE if equal, FALSE if unequal. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * April 4, 2008 + * April 4, 2008 * HISTORY * * SOURCE */ int_f -nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) +h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 new file mode 100644 index 0000000..aeb3314 --- /dev/null +++ b/fortran/src/H5Sff.F90 @@ -0,0 +1,1754 @@ +!****h* ROBODoc/H5S +! +! NAME +! MODULE H5S +! +! FILE +! fortran/src/H5Sff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5S 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 +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5S 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 H5S + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR + USE H5GLOBAL + +CONTAINS +! +!****s* H5S/h5screate_simple_f +! +! NAME +! h5screate_simple_f +! +! PURPOSE +! Creates a new simple data space and opens it for access . +! +! INPUTS +! rank - number of dimensions +! dims - an array of the size of each dimension +! OUTPUTS +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! maxdims - an array of the maximum size of each dimension +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) + + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims + + INTERFACE + INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) BIND(C,NAME='h5screate_simple_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_simple_c + END INTERFACE + + ALLOCATE (f_maxdims(rank), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + IF (PRESENT(maxdims)) THEN + f_maxdims = maxdims + ELSE + f_maxdims = dims + ENDIF + hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) + DEALLOCATE(f_maxdims) + + END SUBROUTINE h5screate_simple_f + +! +!****s* H5S/h5sclose_f +! +! NAME +! h5sclose_f +! +! PURPOSE +! Releases and terminates access to a dataspace. +! +! INPUTS +! space_id - identifier of dataspace to release +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sclose_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sclose_c(space_id) BIND(C,NAME='h5sclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sclose_c + END INTERFACE + + hdferr = h5sclose_c(space_id) + + END SUBROUTINE h5sclose_f + +! +!****s* H5S/h5screate_f +! +! NAME +! h5screate_f +! +! PURPOSE +! Creates a new dataspace of a specified type. +! +! INPUTS +! classtype - The type of the dataspace to be created +! Possible values are: +! H5S_SCALAR_F +! H5S_SIMPLE_F +! H5S_NULL_F +! OUTPUTS +! space_id - Dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5screate_f(classtype, space_id, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5screate_c(classtype, space_id) BIND(C,NAME='h5screate_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_c + END INTERFACE + + hdferr = h5screate_c(classtype, space_id) + + END SUBROUTINE h5screate_f + +! +!****s* H5S/h5scopy_f +! +! NAME +! h5scopy_f +! +! PURPOSE +! Creates an exact copy of a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! new_space_id - identifier of dataspace's copy +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: new_space_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) BIND(C,NAME='h5scopy_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT):: new_space_id + END FUNCTION h5scopy_c + END INTERFACE + + hdferr = h5scopy_c(space_id, new_space_id) + + END SUBROUTINE h5scopy_f + +! +!****s* H5S/h5sget_select_hyper_nblocks_f +! +! NAME +! h5sget_select_hyper_nblocks_f +! +! PURPOSE +! Get number of hyperslab blocks. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_blocks - number of hyperslab blocks in the current +! hyperslab selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) & + BIND(C,NAME='h5sget_select_hyper_nblocks_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + END FUNCTION h5sget_select_hyper_nblocks_c + END INTERFACE + + hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + + END SUBROUTINE h5sget_select_hyper_nblocks_f + +! +!****s* H5S/h5sget_select_hyper_blocklist_f +! +! NAME +! h5sget_select_hyper_blocklist_f +! +! PURPOSE +! Gets the list of hyperslab blocks currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startblock - hyperslab block to start with +! num_blocks - number of blocks to get +! OUTPUTS +! buf - buffer to hold block list +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & + num_blocks, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) BIND(C,NAME='h5sget_select_hyper_blocklist_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_hyper_blocklist_c + END INTERFACE + + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, num_blocks, buf ) + + END SUBROUTINE h5sget_select_hyper_blocklist_f + +! +!****s* H5S/h5sget_select_bounds_f +! +! NAME +! h5sget_select_bounds_f +! +! PURPOSE +! Gets the bounding box containing the current selection. +! +! INPUTS +! space_id - dataspace identifier +! +! OUTPUTS +! start - starting coordinates of bounding box +! end - ending coordinates of bounding box +! i.e., the coordinates of the diagonally opposite corner +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, end) & + BIND(C,NAME='h5sget_select_bounds_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + END FUNCTION h5sget_select_bounds_c + END INTERFACE + + hdferr = h5sget_select_bounds_c(space_id, start, END) + + END SUBROUTINE h5sget_select_bounds_f + +! +!****s* H5S/h5sget_select_elem_npoints_f +! +! NAME +! h5sget_select_elem_npoints_f +! +! PURPOSE +! Gets the number of element points in the current selection +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! num_points - number of element points in the current +! dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) BIND(C,NAME='h5sget_select_elem_npoints_c') + IMPORT :: HID_T, HSSIZE_T + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + END FUNCTION h5sget_select_elem_npoints_c + END INTERFACE + + hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + + END SUBROUTINE h5sget_select_elem_npoints_f + +! +!****s* H5S/h5sget_select_elem_pointlist_f +! +! NAME +! h5sget_select_elem_pointlist_f +! +! PURPOSE +! Gets the list of element points currently selected. +! +! INPUTS +! space_id - dataspace identifier +! startpoint - element point to start with +! num_points - number of elemnt points to get +! OUTPUTS +! buf - buffer with element points selected +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & + num_points, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) BIND(C,NAME='h5sget_select_elem_pointlist_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_elem_pointlist_c + END INTERFACE + + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + + END SUBROUTINE h5sget_select_elem_pointlist_f + +! +!****s* H5S/h5sselect_elements_f +! +! NAME +! h5sselect_elements_f +! +! PURPOSE +! Selects elements to be included in the selection for +! a dataspace +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F +! H5S_SELECT_APPEND_F +! H5S_SELECT_PREPEND_F +! rank - number of dataspace dimensions +! num_elements - number of elements to be selected +! coord - 2D (rank x num_elements) array with the +! elements coordinates ( 1-based); in C the +! array is stored in 2D as (num_element x rank) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & + num_elements, coord, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER, INTENT(IN) :: rank + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord + INTEGER :: error, i + + INTERFACE + INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& + num_elements,c_c_coord) BIND(C,NAME='h5sselect_elements_c') + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord + END FUNCTION h5sselect_elements_c + END INTERFACE + + ALLOCATE(c_coord(rank,num_elements), STAT = error) + IF (error.NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + DO i = 1, rank + c_coord(i,:) = coord(rank-i+1, :) - 1 + ENDDO + hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) + +! ALLOCATE(c_coord(num_elements,rank), stat = error) +! IF (error.NE. 0) THEN +! hdferr = -1 +! RETURN +! ENDIF +! +! c_coord = TRANSPOSE(coord) +! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) + + + DEALLOCATE(c_coord) + + END SUBROUTINE h5sselect_elements_f + +! +!****s* H5S/h5sselect_all_f +! +! NAME +! h5sselect_all_f +! +! PURPOSE +! Selects the entire dataspace. +! +! INPUTS +! space_id - Identifier for the dataspace in which +! selection being made +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_all_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sselect_all_c(space_id) BIND(C,NAME='h5sselect_all_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_all_c + END INTERFACE + + hdferr = h5sselect_all_c(space_id) + + END SUBROUTINE h5sselect_all_f + +! +!****s* H5S/h5sselect_none_f +! +! NAME +! h5sselect_none_f +! +! PURPOSE +! Resets the selection region to include no elements. +! +! INPUTS +! space_id - the identifier for the dataspace in which +! the selection is being reset. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sselect_none_c(space_id) BIND(C,NAME='h5sselect_none_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_none_c + END INTERFACE + + hdferr = h5sselect_none_c(space_id) + + END SUBROUTINE h5sselect_none_f + +! +!****s* H5S/h5sselect_valid_f +! +! NAME +! h5sselect_valid_f +! +! PURPOSE +! Verifies that the selection is within the extent of +! the dataspace. +! +! INPUTS +! space_id - identifier for the dataspace for which +! selection is verified +! OUTPUTS +! status - TRUE if the selection is contained within +! the extent, FALSE otherwise. +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine + + INTERFACE + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) BIND(C,NAME='h5sselect_valid_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sselect_valid_c + END INTERFACE + + hdferr = h5sselect_valid_c(space_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sselect_valid_f + +! +!****s* H5S/h5sget_simple_extent_npoints_f +! +! NAME +! h5sget_simple_extent_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of elements in the dataspace +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) BIND(C,NAME='h5sget_simple_extent_npoints_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_simple_extent_npoints_c + END INTERFACE + + hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) + + END SUBROUTINE h5sget_simple_extent_npoints_f + +! +!****s* H5S/h5sget_select_npoints_f +! +! NAME +! h5sget_select_npoints_f +! +! PURPOSE +! Determines the number of elements in a dataspace selection. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! npoints - number of points in the dataspace selection +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! SOURCE + SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) BIND(C,NAME='h5sget_select_npoints_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_select_npoints_c + END INTERFACE + + hdferr = h5sget_select_npoints_c(space_id, npoints) + + END SUBROUTINE h5sget_select_npoints_f + +! +!****s* H5S/h5sget_simple_extent_ndims_f +! +! NAME +! h5sget_simple_extent_ndims_f +! +! PURPOSE +! Determines the dimensionality of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! rank - number of dataspace dimensions +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) BIND(C,NAME='h5sget_simple_extent_ndims_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + END FUNCTION h5sget_simple_extent_ndims_c + END INTERFACE + + hdferr = h5sget_simple_extent_ndims_c(space_id, rank) + + END SUBROUTINE h5sget_simple_extent_ndims_f +! +!****s* H5S/h5sget_simple_extent_dims_f +! +! NAME +! h5sget_simple_extent_dims_f +! +! PURPOSE +! Retrieves dataspace dimension size and maximum size. +! +! INPUTS +! space_id - dataspace identifier +! +! OUTPUTS +! dims - array to store size of each dimension +! maxdims - array to store maximum size of each dimension +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) BIND(C,NAME='h5sget_simple_extent_dims_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + END FUNCTION h5sget_simple_extent_dims_c + END INTERFACE + + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) + + END SUBROUTINE h5sget_simple_extent_dims_f + +! +!****s* H5S/h5sget_simple_extent_type_f +! +! NAME +! h5sget_simple_extent_type_f +! +! PURPOSE +! Determine the current class of a dataspace +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! classtype - class type, possible values are: +! H5S_NO_CLASS_F +! H5S_SCALAR_F +! H5S_SIMPLE_F +! H5S_NULL_F +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) BIND(C,NAME='h5sget_simple_extent_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + END FUNCTION h5sget_simple_extent_type_c + END INTERFACE + + hdferr = h5sget_simple_extent_type_c(space_id, classtype) + + END SUBROUTINE h5sget_simple_extent_type_f + ! +!****s* H5S/h5sset_extent_simple_f +! +! NAME +! h5sset_extent_simple_f +! +! PURPOSE +! Sets or resets the size of an existing dataspace. +! +! INPUTS +! space_id - dataspace identifier +! rank - dataspace number of dimensions +! current_size - array with the new sizes of dimensions +! maximum_size - array with the new maximum sizes of +! dimensions +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & + maximum_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & + current_size, maximum_size) BIND(C,NAME='h5sset_extent_simple_c') + IMPORT :: HID_T, HSIZE_T + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + END FUNCTION h5sset_extent_simple_c + END INTERFACE + + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & + maximum_size) + + END SUBROUTINE h5sset_extent_simple_f +! +!****s* H5S/h5sis_simple_f +! +! NAME +! h5sis_simple_f +! +! PURPOSE +! Determines whether a dataspace is a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! status - flag to indicate if dataspace +! is simple or not (TRUE or FALSE) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sis_simple_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5sis_simple_c(space_id, flag) BIND(C,NAME='h5sis_simple_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sis_simple_c + END INTERFACE + + hdferr = h5sis_simple_c(space_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5sis_simple_f + +! +!****s* H5S/h5soffset_simple_f +! +! NAME +! h5soffset_simple_f +! +! PURPOSE +! Sets the offset of a simple dataspace. +! +! INPUTS +! space_id - dataspace identifier +! offset - the offset at which to position the +! selection +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) BIND(C,NAME='h5soffset_simple_c') + IMPORT :: HID_T, HSSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + END FUNCTION h5soffset_simple_c + END INTERFACE + + hdferr = h5soffset_simple_c(space_id, offset) + + END SUBROUTINE h5soffset_simple_f + +! +!****s* H5S/h5sextent_copy_f +! +! NAME +! h5sextent_copy_f +! +! PURPOSE +! Copies the extent of a dataspace. +! +! INPUTS +! dest_space_id - the identifier for the dataspace to which +! the extent is copied +! source_space_id - the identifier for the dataspace from +! which the extent is copied +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! NONE +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! NOTES +! + +! SOURCE + SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) BIND(C,NAME='h5sextent_copy_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + END FUNCTION h5sextent_copy_c + END INTERFACE + + hdferr = h5sextent_copy_c(dest_space_id, source_space_id) + + END SUBROUTINE h5sextent_copy_f + +! +!****s* H5S/h5sset_extent_none_f +! +! NAME +! h5sset_extent_none_f +! +! PURPOSE +! Removes the extent from a dataspace. +! +! INPUTS +! space_id - dataspace identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sset_extent_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_none_c(space_id) BIND(C,NAME='h5sset_extent_none_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sset_extent_none_c + END INTERFACE + + hdferr = h5sset_extent_none_c(space_id) + + END SUBROUTINE h5sset_extent_none_f +! +!****s* H5S/h5sselect_hyperslab_f +! +! NAME +! h5sselect_hyperslab_f +! +! PURPOSE +! Selects a hyperslab region to add to the current selected +! region +! +! INPUTS +! space_id - dataspace identifier +! operator - flag, valid values are: +! H5S_SELECT_SET_F +! H5S_SELECT_OR_F +! start - array with hyperslab offsets +! count - number of blocks included in the hyperslab +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! stride - array with hyperslab strides +! block - array with hyperslab block sizes +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 6, 2001 +! +! SOURCE + SUBROUTINE h5sselect_hyperslab_f(space_id, OPERATOR, start, count, & + hdferr, stride, BLOCK) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: BLOCK +!***** + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block + INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride + INTEGER :: rank + INTEGER :: error1, error2 + + INTERFACE + INTEGER FUNCTION h5sselect_hyperslab_c(space_id, OPERATOR, & + start, count, stride, BLOCK) BIND(C,NAME='h5sselect_hyperslab_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: BLOCK + END FUNCTION h5sselect_hyperslab_c + END INTERFACE + + IF (PRESENT(stride).AND. PRESENT(BLOCK)) THEN + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + stride, BLOCK) + RETURN + ENDIF + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! + CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IF( hdferr .EQ. -1) RETURN + ! + IF (PRESENT(stride).AND. .NOT.PRESENT(BLOCK)) THEN + ALLOCATE(def_block(rank), stat=error1) + IF (error1.NE.0) THEN + hdferr = -1 + RETURN + ENDIF + def_block = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + stride, def_block) + DEALLOCATE(def_block) + RETURN + ENDIF + + IF (.NOT.PRESENT(stride).AND. PRESENT(BLOCK)) THEN + ALLOCATE(def_stride(rank), stat=error2) + IF (error2.NE.0) THEN + hdferr = -1 + RETURN + ENDIF + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + def_stride, BLOCK) + DEALLOCATE(def_stride) + RETURN + ENDIF + ALLOCATE(def_block(rank), stat=error1) + ALLOCATE(def_stride(rank), stat=error2) + IF ((error1.NE.0) .OR. (error2.NE.0)) THEN + hdferr = -1 + RETURN + ENDIF + def_block = 1 + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, OPERATOR, start, count, & + def_stride, def_block) + DEALLOCATE(def_block) + DEALLOCATE(def_stride) + + END SUBROUTINE h5sselect_hyperslab_f +! !$! +! !$!****s* H5S/h5scombine_hyperslab_f +! !$! +! !$! NAME +! !$! h5scombine_hyperslab_f +! !$! +! !$! PURPOSE +! !$! Combine a hyperslab selection with the current +! !$! selection for a dataspace +! !$! +! !$! INPUTS +! !$! space_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! start - array with hyperslab offsets +! !$! count - number of blocks included in the +! !$! hyperslab +! !$! OUTPUTS +! !$! hyper_id - identifier for the new hyperslab +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS +! !$! stride - array with hyperslab strides +! !$! block - array with hyperslab block sizes +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES +! !$! Commented out until 1.6 ? 10/08/2002 +! !$! +! !$! SOURCE +! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & +! hyper_id, hdferr, stride, block) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start + ! Starting coordinates of the hyperslab +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count + ! Number of blocks to select + ! from dataspace +! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride + ! Array of how many elements to move + ! in each direction +! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block + ! Sizes of element block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block +! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride +! INTEGER :: rank +! INTEGER :: error1, error2 + +! INTERFACE +! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & +! start, count, stride, block, hyper_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start +! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride +! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block +! INTEGER(HID_T), INTENT(OUT) :: hyper_id +! END FUNCTION h5scombine_hyperslab_c +! END INTERFACE + +! if (present(stride).and. present(block)) then +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, block, hyper_id) +! return +! endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! +! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) +! if( hdferr .EQ. -1) return + ! +! if (present(stride).and. .not.present(block)) then +! allocate(def_block(rank), stat=error1) +! if (error1.NE.0) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, def_block, hyper_id) +! deallocate(def_block) +! return +! endif + +! if (.not.present(stride).and. present(block)) then +! allocate(def_stride(rank), stat=error2) +! if (error2.NE.0) then +! hdferr = -1 +! return +! endif +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, block, hyper_id) +! deallocate(def_stride) +! return +! endif +! allocate(def_block(rank), stat=error1) +! allocate(def_stride(rank), stat=error2) +! if ((error1.NE.0) .OR. (error2.NE.0)) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, def_block, hyper_id) +! deallocate(def_block) +! deallocate(def_stride) + +! END SUBROUTINE h5scombine_hyperslab_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5scombine_select_f +! !$! +! !$! PURPOSE +! !$! Combine two hyperslab selections with an operation +! !$! and return a dataspace with resulting selection. +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to use +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! OUTPUTS +! !$! ds_id - idataspace identifier with the new selection +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTES commented out until 1.6 release(?) 10/08/2002 +! !$! + +! ! SOURCE +! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & +! ds_id, hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! +! INTERFACE +! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & +! space2_id, ds_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(IN) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! INTEGER(HID_T), INTENT(OUT) :: ds_id +! END FUNCTION h5scombine_select_c +! END INTERFACE + +! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & +! ds_id) +! return + +! END SUBROUTINE h5scombine_select_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5sselect_select_f +! !$! +! !$! PURPOSE +! !$! Refine a hyperslab selection with an operation +! !$! using second hyperslab +! !$! +! !$! INPUTS +! !$! space1_id - dataspace of selection to modify +! !$! operator - flag, valid values are: +! !$! H5S_SELECT_NOOP_F +! !$! H5S_SELECT_SET_F +! !$! H5S_SELECT_OR_F +! !$! H5S_SELECT_AND_F +! !$! H5S_SELECT_XOR_F +! !$! H5S_SELECT_NOTB_F +! !$! H5S_SELECT_NOTA_F +! !$! H5S_SELECT_APPEND_F +! !$! H5S_SELECT_PREPEND_F +! !$! space2_id - dataspace of selection to use +! !$! +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! OPTIONAL PARAMETERS - NONE +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! October 7, 2002 +! !$! +! !$! HISTORY +! !$! +! !$! +! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP +! !$! + +! ! SOURCE +! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & +! hdferr) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to + ! modify +! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier +! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_NOOP_F + ! H5S_SELECT_SET_F + ! H5S_SELECT_OR_F + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F + ! +! INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTERFACE +! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & +! space2_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(INOUT) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! END FUNCTION h5sselect_select_c +! END INTERFACE + +! hdferr = h5sselect_select_c(space1_id, operator, space2_id) +! return + +! END SUBROUTINE h5sselect_select_f + +! +!****s* H5S/h5sget_select_type_f +! +! NAME +! h5sget_select_type_f +! +! PURPOSE +! Retrieve the type of selection +! +! INPUTS +! space_id - dataspace identifier with selection +! OUTPUTS +! type - selection type flag, valid values are: +! H5S_SEL_ERROR_F +! H5S_SEL_NONE_F +! H5S_SEL_POINTS_F +! H5S_SEL_HYPERSLABS_F +! H5S_SEL_ALL_F +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! SOURCE + SUBROUTINE h5sget_select_type_f(space_id, TYPE, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(INOUT) :: space_id + INTEGER, INTENT(OUT) :: TYPE + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_type_c(space_id, TYPE) BIND(C,NAME='h5sget_select_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5sget_select_type_c + END INTERFACE + + hdferr = h5sget_select_type_c(space_id, TYPE) + RETURN + + END SUBROUTINE h5sget_select_type_f + +! +!****s* H5S/H5Sdecode_f +! +! NAME +! H5Sdecode_f +! +! PURPOSE +! Decode a binary object description of data space and return a new object handle. +! +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5sdecode_c(buf, obj_id) BIND(C,NAME='h5sdecode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5sdecode_c + END INTERFACE + + hdferr = h5sdecode_c(buf, obj_id) + + END SUBROUTINE h5sdecode_f + +! +!****s* H5S/H5Sencode_f +! +! NAME +! H5Sencode_f +! +! PURPOSE +! Encode a data space object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! March 26, 2008 +! SOURCE + SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5sencode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5sencode_c + END INTERFACE + + hdferr = h5sencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5sencode_f + +!****s* H5S/h5sextent_equal_f +! +! NAME +! h5sextent_equal_f +! +! PURPOSE +! Determines whether two dataspace extents are equal. +! +! INPUTS +! space1_id - First dataspace identifier. +! space2_id - Second dataspace identifier. +! OUTPUTS +! Equal - .TRUE. if equal, .FALSE. if unequal. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! April 2, 2008 +! +! SOURCE + SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + LOGICAL, INTENT(OUT) :: Equal + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(HID_T) :: c_equal + + INTERFACE + INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) BIND(C,NAME='h5sextent_equal_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + INTEGER(HID_T) :: c_equal + END FUNCTION h5sextent_equal_c + END INTERFACE + + hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) + equal = .FALSE. + IF(c_equal.GT.0) equal = .TRUE. + + END SUBROUTINE h5sextent_equal_f + +END MODULE H5S diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 deleted file mode 100644 index c493d46..0000000 --- a/fortran/src/H5Sff.f90 +++ /dev/null @@ -1,1875 +0,0 @@ -!****h* ROBODoc/H5S -! -! NAME -! MODULE H5S -! -! FILE -! fortran/src/H5Sff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5S functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5S 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 H5S - USE H5GLOBAL - -CONTAINS - -! -!****s* H5S/h5screate_simple_f -! -! NAME -! h5screate_simple_f -! -! PURPOSE -! Creates a new simple data space and opens it for access . -! -! INPUTS -! rank - number of dimensions -! dims - an array of the size of each dimension -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! maxdims - an array of the maximum size of each dimension -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) - - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - ! Array with the dimension - ! sizes - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) - ! Array with the maximum - ! dimension sizes -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims - - INTERFACE - INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_simple_c - END INTERFACE - - allocate (f_maxdims(rank), stat=hdferr) - if (hdferr .NE. 0) then - hdferr = -1 - return - endif - if (present(maxdims)) then - f_maxdims = maxdims - else - f_maxdims = dims - endif - hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) - deallocate(f_maxdims) - - END SUBROUTINE h5screate_simple_f - -! -!****s* H5S/h5sclose_f -! -! NAME -! h5sclose_f -! -! PURPOSE -! Releases and terminates access to a dataspace. -! -! INPUTS -! space_id - identifier of dataspace to release -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sclose_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sclose_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sclose_c - END INTERFACE - - hdferr = h5sclose_c(space_id) - - END SUBROUTINE h5sclose_f - -! -!****s* H5S/h5screate_f -! -! NAME -! h5screate_f -! -! PURPOSE -! Creates a new dataspace of a specified type. -! -! INPUTS -! classtype - the type of the dataspace to be created -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5screate_f(classtype, space_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype ! The type of the dataspace - ! to be created. - ! Possible values are: - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F(1) - ! H5S_NULL_F(2) - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5screate_c(classtype, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_c - END INTERFACE - - hdferr = h5screate_c(classtype, space_id) - - END SUBROUTINE h5screate_f - -! -!****s* H5S/h5scopy_f -! -! NAME -! h5scopy_f -! -! PURPOSE -! Creates an exact copy of a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! new_space_id - identifier of dataspace's copy -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: new_space_id - ! Identifier of dataspace's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT):: new_space_id - END FUNCTION h5scopy_c - END INTERFACE - - hdferr = h5scopy_c(space_id, new_space_id) - - END SUBROUTINE h5scopy_f - -! -!****s* H5S/h5sget_select_hyper_nblocks_f -! -! NAME -! h5sget_select_hyper_nblocks_f -! -! PURPOSE -! Get number of hyperslab blocks. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_blocks - number of hyperslab blocks in the current -! hyperslab selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - !number of hyperslab blocks - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - END FUNCTION h5sget_select_hyper_nblocks_c - END INTERFACE - - hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - - END SUBROUTINE h5sget_select_hyper_nblocks_f - -! -!****s* H5S/h5sget_select_hyper_blocklist_f -! -! NAME -! h5sget_select_hyper_blocklist_f -! -! PURPOSE -! Gets the list of hyperslab blocks currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startblock - hyperslab block to start with -! num_blocks - number of blocks to get -! OUTPUTS -! buf - buffer to hold block list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & - num_blocks, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startblock - !Hyperslab block to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - !number of hyperslab blocks - !to get in the current dataspace - !selection - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of hyperslab blocks selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_hyper_blocklist_c - END INTERFACE - - - hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - - END SUBROUTINE h5sget_select_hyper_blocklist_f - -! -!****s* H5S/h5sget_select_bounds_f -! -! NAME -! h5sget_select_bounds_f -! -! PURPOSE -! Gets the bounding box containing the current selection. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! start - starting coordinates of bounding box -! end - ending coordinates of bounding box -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - ! Starting coordinates of the bounding box. - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - !Ending coordinates of the bounding box, - !i.e., the coordinates of the diagonally - !opposite corner - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - END FUNCTION h5sget_select_bounds_c - END INTERFACE - - hdferr = h5sget_select_bounds_c(space_id, start, END) - - END SUBROUTINE h5sget_select_bounds_f - -! -!****s* H5S/h5sget_select_elem_npoints_f -! -! NAME -! h5sget_select_elem_npoints_f -! -! PURPOSE -! Gets the number of element points in the current selection -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_points - number of element points in the current -! dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - !number of element points - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - END FUNCTION h5sget_select_elem_npoints_c - END INTERFACE - - hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - - END SUBROUTINE h5sget_select_elem_npoints_f - -! -!****s* H5S/h5sget_select_elem_pointlist_f -! -! NAME -! h5sget_select_elem_pointlist_f -! -! PURPOSE -! Gets the list of element points currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startpoint - element point to start with -! num_points - number of elemnt points to get -! OUTPUTS -! buf - buffer with element points selected -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & - num_points, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - !Element point to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_points - !Number of element points to get - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of element points selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_elem_pointlist_c - END INTERFACE - - hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - - END SUBROUTINE h5sget_select_elem_pointlist_f - -! -!****s* H5S/h5sselect_elements_f -! -! NAME -! h5sselect_elements_f -! -! PURPOSE -! Selects elements to be included in the selection for -! a dataspace -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! rank - number of dataspace dimensions -! num_elements - number of elements to be selected -! coord - 2D (rank x num_elements) array with the -! elements coordinates ( 1-based); in C the -! array is stored in 2D as (num_element x rank) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & - num_elements, coord, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER, INTENT(IN) :: rank - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord - INTEGER :: error, i - - INTERFACE - INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& - num_elements,c_c_coord) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord - END FUNCTION h5sselect_elements_c - END INTERFACE - - ALLOCATE(c_coord(rank,num_elements), STAT = error) - IF (error.NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - DO i = 1, rank - c_coord(i,:) = coord(rank-i+1, :) - 1 - ENDDO - hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) - -! ALLOCATE(c_coord(num_elements,rank), stat = error) -! IF (error.NE. 0) THEN -! hdferr = -1 -! RETURN -! ENDIF -! -! c_coord = TRANSPOSE(coord) -! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) - - - DEALLOCATE(c_coord) - - END SUBROUTINE h5sselect_elements_f - -! -!****s* H5S/h5sselect_all_f -! -! NAME -! h5sselect_all_f -! -! PURPOSE -! Selects the entire dataspace. -! -! INPUTS -! space_id - Identifier for the dataspace in which -! selection being made -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_all_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_all_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_all_c - END INTERFACE - - hdferr = h5sselect_all_c(space_id) - - END SUBROUTINE h5sselect_all_f - -! -!****s* H5S/h5sselect_none_f -! -! NAME -! h5sselect_none_f -! -! PURPOSE -! Resets the selection region to include no elements. -! -! INPUTS -! space_id - the identifier for the dataspace in which -! the selection is being reset. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_none_c - END INTERFACE - - hdferr = h5sselect_none_c(space_id) - - END SUBROUTINE h5sselect_none_f - -! -!****s* H5S/h5sselect_valid_f -! -! NAME -! h5sselect_valid_f -! -! PURPOSE -! Verifies that the selection is within the extent of -! the dataspace. -! -! INPUTS -! space_id - identifier for the dataspace for which -! selection is verified -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is - ! contained within the extent, - ! FALSE otherwise. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine - - INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sselect_valid_c - END INTERFACE - - hdferr = h5sselect_valid_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sselect_valid_f - -! -!****s* H5S/h5sget_simple_extent_npoints_f -! -! NAME -! h5sget_simple_extent_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of elements in the dataspace -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_simple_extent_npoints_c - END INTERFACE - - hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - - END SUBROUTINE h5sget_simple_extent_npoints_f - -! -!****s* H5S/h5sget_select_npoints_f -! -! NAME -! h5sget_select_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace selection. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of points in the dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE - SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the - ! selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_select_npoints_c - END INTERFACE - - hdferr = h5sget_select_npoints_c(space_id, npoints) - - END SUBROUTINE h5sget_select_npoints_f - -! -!****s* H5S/h5sget_simple_extent_ndims_f -! -! NAME -! h5sget_simple_extent_ndims_f -! -! PURPOSE -! Determines the dimensionality of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! rank - number of dataspace dimensions -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: rank ! Number of dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - END FUNCTION h5sget_simple_extent_ndims_c - END INTERFACE - - hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - - END SUBROUTINE h5sget_simple_extent_ndims_f -! -!****s* H5S/h5sget_simple_extent_dims_f -! -! NAME -! h5sget_simple_extent_dims_f -! -! PURPOSE -! Retrieves dataspace dimension size and maximum size. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! dims - array to store size of each dimension -! maxdims - array to store maximum size of each -! dimension -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - ! Array to store dimension sizes - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - ! Array to store max dimension - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, - ! number of dimensions on - ! on success -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - END FUNCTION h5sget_simple_extent_dims_c - END INTERFACE - - hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - - END SUBROUTINE h5sget_simple_extent_dims_f - -! -!****s* H5S/h5sget_simple_extent_type_f -! -! NAME -! h5sget_simple_extent_type_f -! -! PURPOSE -! Determine the current class of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! classtype - class type, possible values are: -! H5S_NO_CLASS_F (-1) -! H5S_SCALAR_F (0) -! H5S_SIMPLE_F (1) -! H5S_NULL_F (2) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: classtype ! Class type , possible values - ! are: - ! H5S_NO_CLASS_F (-1) - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F (1) - ! H5S_NULL_F (2) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - END FUNCTION h5sget_simple_extent_type_c - END INTERFACE - - hdferr = h5sget_simple_extent_type_c(space_id, classtype) - - END SUBROUTINE h5sget_simple_extent_type_f -! -!****s* H5S/h5sset_extent_simple_f -! -! NAME -! h5sset_extent_simple_f -! -! PURPOSE -! Sets or resets the size of an existing dataspace. -! -! INPUTS -! space_id - dataspace identifier -! rank - dataspace number of dimensions -! current_size - array with the new sizes of dimensions -! maximum_size - array with the new maximum sizes of -! dimensions -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: rank ! Dataspace rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - ! Array with the new sizes - ! of dimensions - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - ! Array with the new maximum - ! sizes of dimensions - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - END FUNCTION h5sset_extent_simple_c - END INTERFACE - - hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & - maximum_size) - - END SUBROUTINE h5sset_extent_simple_f -! -!****s* H5S/h5sis_simple_f -! -! NAME -! h5sis_simple_f -! -! PURPOSE -! Determines whether a dataspace is a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! status - flag to indicate if dataspace -! is simple or not -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sis_simple_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace - ! is simple or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sis_simple_c - END INTERFACE - - hdferr = h5sis_simple_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5sis_simple_f - -! -!****s* H5S/h5soffset_simple_f -! -! NAME -! h5soffset_simple_f -! -! PURPOSE -! Sets the offset of a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! offset - the offset at which to position the -! selection -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - ! The offset at which to position - ! the selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - END FUNCTION h5soffset_simple_c - END INTERFACE - - hdferr = h5soffset_simple_c(space_id, offset) - - END SUBROUTINE h5soffset_simple_f - -! -!****s* H5S/h5sextent_copy_f -! -! NAME -! h5sextent_copy_f -! -! PURPOSE -! Copies the extent of a dataspace. -! -! INPUTS -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from -! which the extent is copied -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE - SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination - ! dataspace - INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - END FUNCTION h5sextent_copy_c - END INTERFACE - - hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - - END SUBROUTINE h5sextent_copy_f - -! -!****s* H5S/h5sset_extent_none_f -! -! NAME -! h5sset_extent_none_f -! -! PURPOSE -! Removes the extent from a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sset_extent_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sset_extent_none_c - END INTERFACE - - hdferr = h5sset_extent_none_c(space_id) - - END SUBROUTINE h5sset_extent_none_f - -! -!****s* H5S/h5sselect_hyperslab_f -! -! NAME -! h5sselect_hyperslab_f -! -! PURPOSE -! Selects a hyperslab region to add to the current selected -! region -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F (0) -! H5S_SELECT_OR_F (1) -! start - array with hyperslab offsets -! count - number of blocks included in the -! hyperslab -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! stride - array with hyperslab strides -! block - array with hyperslab block sizes -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE - SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & - hdferr, stride, block) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_SET_F (0) - ! H5S_SELECT_OR_F (1) - ! - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction - INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -!***** - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block - INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride - INTEGER :: rank - INTEGER :: error1, error2 - - INTERFACE - INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & - start, count, stride, block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_hyperslab_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: operator - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block - END FUNCTION h5sselect_hyperslab_c - END INTERFACE - - if (present(stride).and. present(block)) then - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, block) - return - endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! - CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - if( hdferr .EQ. -1) return - ! - if (present(stride).and. .not.present(block)) then - allocate(def_block(rank), stat=error1) - if (error1.NE.0) then - hdferr = -1 - return - endif - def_block = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, def_block) - deallocate(def_block) - return - endif - - if (.not.present(stride).and. present(block)) then - allocate(def_stride(rank), stat=error2) - if (error2.NE.0) then - hdferr = -1 - return - endif - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, block) - deallocate(def_stride) - return - endif - allocate(def_block(rank), stat=error1) - allocate(def_stride(rank), stat=error2) - if ((error1.NE.0) .OR. (error2.NE.0)) then - hdferr = -1 - return - endif - def_block = 1 - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, def_block) - deallocate(def_block) - deallocate(def_stride) - - END SUBROUTINE h5sselect_hyperslab_f -! !$! -! !$!****s* H5S/h5scombine_hyperslab_f -! !$! -! !$! NAME -! !$! h5scombine_hyperslab_f -! !$! -! !$! PURPOSE -! !$! Combine a hyperslab selection with the current -! !$! selection for a dataspace -! !$! -! !$! INPUTS -! !$! space_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! start - array with hyperslab offsets -! !$! count - number of blocks included in the -! !$! hyperslab -! !$! OUTPUTS -! !$! hyper_id - identifier for the new hyperslab -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS -! !$! stride - array with hyperslab strides -! !$! block - array with hyperslab block sizes -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES -! !$! Commented out until 1.6 ? 10/08/2002 -! !$! -! !$! SOURCE -! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & -! hyper_id, hdferr, stride, block) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace -! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride -! INTEGER :: rank -! INTEGER :: error1, error2 - -! INTERFACE -! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & -! start, count, stride, block, hyper_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block -! INTEGER(HID_T), INTENT(OUT) :: hyper_id -! END FUNCTION h5scombine_hyperslab_c -! END INTERFACE - -! if (present(stride).and. present(block)) then -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, block, hyper_id) -! return -! endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! -! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) -! if( hdferr .EQ. -1) return - ! -! if (present(stride).and. .not.present(block)) then -! allocate(def_block(rank), stat=error1) -! if (error1.NE.0) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, def_block, hyper_id) -! deallocate(def_block) -! return -! endif - -! if (.not.present(stride).and. present(block)) then -! allocate(def_stride(rank), stat=error2) -! if (error2.NE.0) then -! hdferr = -1 -! return -! endif -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, block, hyper_id) -! deallocate(def_stride) -! return -! endif -! allocate(def_block(rank), stat=error1) -! allocate(def_stride(rank), stat=error2) -! if ((error1.NE.0) .OR. (error2.NE.0)) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, def_block, hyper_id) -! deallocate(def_block) -! deallocate(def_stride) - -! END SUBROUTINE h5scombine_hyperslab_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5scombine_select_f -! !$! -! !$! PURPOSE -! !$! Combine two hyperslab selections with an operation -! !$! and return a dataspace with resulting selection. -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! OUTPUTS -! !$! ds_id - idataspace identifier with the new selection -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES commented out until 1.6 release(?) 10/08/2002 -! !$! - -! ! SOURCE -! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & -! ds_id, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! -! INTERFACE -! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & -! space2_id, ds_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HID_T), INTENT(OUT) :: ds_id -! END FUNCTION h5scombine_select_c -! END INTERFACE - -! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & -! ds_id) -! return - -! END SUBROUTINE h5scombine_select_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5sselect_select_f -! !$! -! !$! PURPOSE -! !$! Refine a hyperslab selection with an operation -! !$! using second hyperslab -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to modify -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP -! !$! - -! ! SOURCE -! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, & -! hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to - ! modify -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F - ! -! INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTERFACE -! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & -! space2_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(INOUT) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! END FUNCTION h5sselect_select_c -! END INTERFACE - -! hdferr = h5sselect_select_c(space1_id, operator, space2_id) -! return - -! END SUBROUTINE h5sselect_select_f - -! -!****s* H5S/h5sget_select_type_f -! -! NAME -! h5sget_select_type_f -! -! PURPOSE -! Retrieve the type of selection -! -! INPUTS -! space_id - dataspace iidentifier with selection -! OUTPUTS -! type - flag, valid values are: -! H5S_SEL_ERROR_F -! H5S_SEL_NONE_F -! H5S_SEL_POINTS_F -! H5S_SEL_HYPERSLABS_F -! H5S_SEL_ALL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! SOURCE - SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to - INTEGER, INTENT(OUT) :: type ! Selection type - ! H5S_SEL_ERROR_F - ! H5S_SEL_NONE_F - ! H5S_SEL_POINTS_F - ! H5S_SEL_HYPERSLABS_F - ! H5S_SEL_ALL_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_type_c(space_id, type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: type - END FUNCTION h5sget_select_type_c - END INTERFACE - - hdferr = h5sget_select_type_c(space_id, type) - return - - END SUBROUTINE h5sget_select_type_f - -! -!****s* H5S/H5Sdecode_f -! -! NAME -! H5Sdecode_f -! -! PURPOSE -! Decode a binary object description of data space and return a new object handle. -! -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5sdecode_c - END INTERFACE - - hdferr = h5sdecode_c(buf, obj_id) - - END SUBROUTINE h5sdecode_f - -! -!****s* H5S/H5Sencode_f -! -! NAME -! H5Sencode_f -! -! PURPOSE -! Encode a data space object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE - SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5sencode_c - END INTERFACE - - hdferr = h5sencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5sencode_f - -!****s* H5S/h5sextent_equal_f -! -! NAME -! h5sextent_equal_f -! -! PURPOSE -! Determines whether two dataspace extents are equal. -! -! INPUTS -! space1_id - First dataspace identifier. -! space2_id - Second dataspace identifier. -! OUTPUTS -! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! April 2, 2008 -! -! SOURCE - SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. - INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. - LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T) :: c_equal - - INTERFACE - INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space1_id - INTEGER(HID_T), INTENT(IN) :: space2_id - INTEGER(HID_T) :: c_equal - END FUNCTION h5sextent_equal_c - END INTERFACE - - hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - - - equal = .FALSE. - IF(c_equal.GT.0) equal = .TRUE. - - - END SUBROUTINE h5sextent_equal_f - -END MODULE H5S diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 7e1aa42..b6389258 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -1,6 +1,6 @@ /****h* H5Tf/H5Tf * PURPOSE - * This file contains C stubs for H5T Fortran APIs + * This file contains C stubs for H5T Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -23,30 +23,29 @@ #include "H5f90.h" - /****if* H5Tf/h5topen_c * NAME * h5topen_c * PURPOSE * Call H5Topen2 to open a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * tapl_id - datatype access property list identifier + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * tapl_id - datatype access property list identifier * OUTPUTS - * type_id - dataset identifier + * type_id - dataset identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) +h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id) /******/ { char *c_name = NULL; @@ -75,25 +74,24 @@ done: return ret_value; } - /****if* H5Tf/h5tcommit_c * NAME * h5tcommit_c * PURPOSE * Call H5Tcommit2 to commit a datatype * INPUTS - * loc_id - file or group identifier - * name - name of the datatype within file or group - * namelen - name length - * type_id - dataset identifier - * lcpl_id - Link creation property list - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * name - name of the datatype within file or group + * namelen - name length + * type_id - dataset identifier + * lcpl_id - Link creation property list + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * - Added passing optional parameters for version 1.8 @@ -101,7 +99,7 @@ done: * SOURCE */ int_f -nh5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, +h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -130,19 +128,19 @@ done: * PURPOSE * Call H5Tclose to close the datatype * INPUTS - * type_id - identifier of the datatype to be closed + * type_id - identifier of the datatype to be closed * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tclose_c ( hid_t_f *type_id ) +h5tclose_c ( hid_t_f *type_id ) /******/ { int ret_value = 0; @@ -153,28 +151,27 @@ nh5tclose_c ( hid_t_f *type_id ) return ret_value; } - /****if* H5Tf/h5tcopy_c * NAME * h5tcopy_c * PURPOSE * Call H5Tcopy to copy a datatype * INPUTS - * type_id - identifier of the datatype to be copied + * type_id - identifier of the datatype to be copied * OUTPUTS - * new_type_id - identifier of the new datatype + * new_type_id - identifier of the new datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) +h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -194,22 +191,22 @@ nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) * PURPOSE * Call H5Tequal to copy a datatype * INPUTS - * type1_id - datatype identifier - * type2_id - datatype identifier + * type1_id - datatype identifier + * type2_id - datatype identifier * OUTPUTS - * c_flag - flag; indicates if two datatypes are equal or not. + * c_flag - flag; indicates if two datatypes are equal or not. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Tuesday, February 22, 2000 + * Tuesday, February 22, 2000 * HISTORY * * SOURCE */ int_f -nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) +h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -257,7 +254,7 @@ nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag) */ int_f -nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) +h5tget_class_c ( hid_t_f *type_id , int_f *classtype) /******/ { int ret_value = 0; @@ -293,24 +290,24 @@ nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) * PURPOSE * Call H5Tget_order to determine byte order * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * order; possible values are: + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tget_order_c ( hid_t_f *type_id , int_f *order) +h5tget_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = -1; @@ -337,23 +334,23 @@ nh5tget_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tset_order to set byte order * INPUTS - * type_id - identifier of the dataspace - * order; possible values are: + * type_id - identifier of the dataspace + * order; possible values are: * H5T_ORDER_LE_F (0) * H5T_ORDER_BE_F (1) * H5T_ORDER_VAX_F (2) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tset_order_c ( hid_t_f *type_id , int_f *order) +h5tset_order_c ( hid_t_f *type_id , int_f *order) /******/ { int ret_value = 0; @@ -378,21 +375,21 @@ nh5tset_order_c ( hid_t_f *type_id , int_f *order) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) +h5tget_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -413,21 +410,21 @@ nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_size to get size of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * size (in bytes) + * size (in bytes) * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * HISTORY * * SOURCE */ int_f -nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) +h5tset_size_c ( hid_t_f *type_id , size_t_f *size) /******/ { int ret_value = -1; @@ -449,21 +446,21 @@ nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) * PURPOSE * Call H5Tget_precision to get precision of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * precision - number of significant bits + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) +h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -484,20 +481,20 @@ nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) * PURPOSE * Call H5Tset_precision to set precision of the datatype * INPUTS - * type_id - identifier of the dataspace - * precision - number of significant bits + * type_id - identifier of the dataspace + * precision - number of significant bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) +h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) /******/ { int ret_value = -1; @@ -518,23 +515,23 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) * h5tget_offset_c * PURPOSE * Call H5Tget_offset to get bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * offset - bit offset of the first significant bit + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) +h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -555,22 +552,22 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tset_offset_c * PURPOSE * Call H5Tset_offset to set bit offset of the first - * significant bit of the datatype + * significant bit of the datatype * INPUTS - * type_id - identifier of the dataspace - * offset - bit offset of the first significant bit + * type_id - identifier of the dataspace + * offset - bit offset of the first significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Tuesday, January 25, 2000 + * Tuesday, January 25, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) +h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) /******/ { int ret_value = -1; @@ -591,25 +588,25 @@ nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) * h5tget_pad_c * PURPOSE * Call H5Tget_pad to get the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) +h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) /******/ { int ret_value = -1; @@ -631,27 +628,27 @@ nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) * NAME * h5tset_pad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_pad to set the padding type of the least and - * most-significant bit padding + * most-significant bit padding * * INPUTS - * type_id - identifier of the dataspace - * lsbpad - padding type of the least significant bit - * msbpad - padding type of the least significant bit + * type_id - identifier of the dataspace + * lsbpad - padding type of the least significant bit + * msbpad - padding type of the least significant bit * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) +h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) /******/ { int ret_value = -1; @@ -674,21 +671,21 @@ nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) * PURPOSE * Call H5Tget_sign to get sign type for an integer type * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * sign - sign type for an integer type + * sign - sign type for an integer type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) +h5tget_sign_c ( hid_t_f *type_id , int_f *sign) /******/ { int ret_value = -1; @@ -709,20 +706,20 @@ nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) * PURPOSE * Call H5Tset_sign to set sign type for an integer type * INPUTS - * type_id - identifier of the dataspace - * sign - sign type for an integer typ + * type_id - identifier of the dataspace + * sign - sign type for an integer typ * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) +h5tset_sign_c ( hid_t_f *type_id , int_f* sign) /******/ { int ret_value = -1; @@ -744,26 +741,26 @@ nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) * h5tget_fields_c * PURPOSE * Call H5Tget_fields to get floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, January 27, 2000 + * Thursday, January 27, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -788,25 +785,25 @@ nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* * h5tset_fields_c * PURPOSE * Call H5Tset_fields to set floating point datatype - * bit field information + * bit field information * INPUTS - * type_id - identifier of the dataspace - * epos - exponent bit-position - * esize - size of exponent in bits - * mpos - mantissa bit-position - * msize - size of mantissa in bits + * type_id - identifier of the dataspace + * epos - exponent bit-position + * esize - size of exponent in bits + * mpos - mantissa bit-position + * msize - size of mantissa in bits * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) +h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize) /******/ { int ret_value = -1; @@ -832,23 +829,23 @@ nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* e * h5tget_ebias_c * PURPOSE * Call H5Tget_ebias to get exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * ebias - exponent bias of a floating-point type of the datatype + * ebias - exponent bias of a floating-point type of the datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -869,22 +866,22 @@ nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tset_ebias_c * PURPOSE * Call H5Tset_ebias to set exponent bias of a - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * ebias - exponent bias of a floating-point type of the datatyp + * type_id - identifier of the dataspace + * ebias - exponent bias of a floating-point type of the datatyp * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) +h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /******/ { int ret_value = -1; @@ -906,23 +903,23 @@ nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) * h5tget_norm_c * PURPOSE * Call H5Tget_norm to get mantissa normalization - * of a floating-point datatype + * of a floating-point datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * norm - mantissa normalization of a floating-point type + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) +h5tget_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -943,22 +940,22 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) * h5tset_norm_c * PURPOSE * Call H5Tset_norm to set mantissa normalization of - * floating-point type of the datatype + * floating-point type of the datatype * INPUTS - * type_id - identifier of the dataspace - * norm - mantissa normalization of a floating-point type + * type_id - identifier of the dataspace + * norm - mantissa normalization of a floating-point type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Friday, January 27, 2000 + * Friday, January 27, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) +h5tset_norm_c ( hid_t_f *type_id , int_f *norm) /******/ { int ret_value = -1; @@ -980,25 +977,25 @@ nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) * h5tget_inpad_c * PURPOSE * Call H5Tget_inpad to get the padding type for - * unused bits in floating-point datatypes + * unused bits in floating-point datatypes * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * padtype - padding type for - * unused bits in floating-point datatype + * padtype - padding type for + * unused bits in floating-point datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) +h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) /******/ { int ret_value = -1; @@ -1018,27 +1015,27 @@ nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) * NAME * h5tset_inpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_inpad to set the padding type - * unused bits in floating-point datatype + * unused bits in floating-point datatype * * INPUTS - * type_id - identifier of the dataspace - * padtype - padding type for unused bits - * in floating-point datatypes + * type_id - identifier of the dataspace + * padtype - padding type for unused bits + * in floating-point datatypes * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) +h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) /******/ { int ret_value = -1; @@ -1060,24 +1057,24 @@ nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) * h5tget_cset_c * PURPOSE * Call H5Tget_cset to get character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * cset - character set type of a string datatype + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) +h5tget_cset_c ( hid_t_f *type_id , int_f * cset) /******/ { int ret_value = -1; @@ -1097,26 +1094,26 @@ nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) * NAME * h5tset_cset_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_cset to set character set - * type of a string datatype + * type of a string datatype * * INPUTS - * type_id - identifier of the dataspace - * cset - character set type of a string datatype + * type_id - identifier of the dataspace + * cset - character set type of a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) +h5tset_cset_c ( hid_t_f *type_id, int_f * cset) /******/ { int ret_value = -1; @@ -1138,22 +1135,22 @@ nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) * h5tget_strpad_c * PURPOSE * Call H5Tget_strpad to get string padding method - * for a string datatype + * for a string datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * strpad - string padding method for a string datatype + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) +h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) /******/ { int ret_value = -1; @@ -1173,26 +1170,26 @@ nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) * NAME * h5tset_strpad_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_strpad to set string padding method - * for a string datatype + * for a string datatype * * INPUTS - * type_id - identifier of the dataspace - * strpad - string padding method for a string datatype + * type_id - identifier of the dataspace + * strpad - string padding method for a string datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) +h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) /******/ { int ret_value = -1; @@ -1214,23 +1211,23 @@ nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) * h5tget_nmembers_c * PURPOSE * Call H5Tget_nmembers to get number of fields - * in a compound datatype + * in a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * num_members - number of fields in a compound datatype + * num_members - number of fields in a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) +h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) /******/ { int ret_value = -1; @@ -1249,24 +1246,24 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) * h5tget_member_name_c * PURPOSE * Call H5Tget_member_name to get name - * of a compound datatype + * of a compound datatype * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * member_name - name of a field of a compound datatype + * member_name - name of a field of a compound datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY - * Elena Pourmal - * Added namelen parameter to return length of the name to Fortran user + * Elena Pourmal + * Added namelen parameter to return length of the name to Fortran user * SOURCE */ int_f -nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) +h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen) /******/ { int ret_value = -1; @@ -1290,15 +1287,15 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n * h5tget_member_index_c * PURPOSE * Call H5Tget_member_index to get an index of - * the specified datatype filed or member. + * the specified datatype filed or member. * INPUTS - * type_id - datatype identifier - * name - name of the datatype within file or group - * namelen - name length + * type_id - datatype identifier + * name - name of the datatype within file or group + * namelen - name length * OUTPUTS - * index - 0-based index + * index - 0-based index * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, September 26, 2002 @@ -1307,7 +1304,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n * SOURCE */ int_f -nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) +h5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) /******/ { int ret_value = -1; @@ -1341,26 +1338,26 @@ DONE: * h5tget_member_offset_c * PURPOSE * Call H5Tget_member_offset to get byte offset of the - * beginning of a field within a compound datatype with - * respect to the beginning of the compound data type datum + * beginning of a field within a compound datatype with + * respect to the beginning of the compound data type datum * INPUTS - * type_id - identifier of the dataspace - * member_no - Number of the field whose offset is requested + * type_id - identifier of the dataspace + * member_no - Number of the field whose offset is requested * OUTPUTS - * offset - byte offset of the the beginning of the field of - * a compound datatype + * offset - byte offset of the the beginning of the field of + * a compound datatype * RETURNS - * always 0 + * always 0 * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) +h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) /******/ { int ret_value = -1; @@ -1377,23 +1374,23 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) * h5tget_array_dims_c * PURPOSE * Call H5Tget_array_dims2 to get - * dimensions of array datatype + * dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * dims - dimensions(sizes of dimensions) of the array + * dims - dimensions(sizes of dimensions) of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) +h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1420,23 +1417,23 @@ DONE: * h5tget_array_ndims_c * PURPOSE * Call H5Tget_array_ndims to get number - * of dimensions of array datatype + * of dimensions of array datatype * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * ndims - number of dimensions of the array + * ndims - number of dimensions of the array * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) +h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) /******/ { int ret_value = -1; @@ -1457,23 +1454,23 @@ nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) * h5tget_super_c * PURPOSE * Call H5Tget_super to get base datatype from which - * datatype was derived + * datatype was derived * INPUTS - * type_id - identifier of the array datatype + * type_id - identifier of the array datatype * OUTPUTS - * base_type_id - base datatype identifier + * base_type_id - base datatype identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) +h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) /******/ { int ret_value = -1; @@ -1495,14 +1492,14 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) * h5tget_member_type_c * PURPOSE * Call H5Tget_member_type to get the identifier of a copy of - * the datatype of the field + * the datatype of the field * INPUTS - * type_id - identifier of the datatype - * field_idx - Field index (0-based) of the field type to retrieve + * type_id - identifier of the datatype + * field_idx - Field index (0-based) of the field type to retrieve * OUTPUTS - * datatype - identifier of a copy of the datatype of the field + * datatype - identifier of a copy of the datatype of the field * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Thursday, February 3, 2000 @@ -1512,7 +1509,7 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) */ int_f -nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) +h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /******/ { int ret_value = -1; @@ -1531,10 +1528,10 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) * PURPOSE * Call H5Tcreate to create a datatype * INPUTS - * cls - class type - * size - size of the class memeber + * cls - class type + * size - size of the class memeber * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, February 17, 2000 @@ -1544,7 +1541,7 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) */ int_f -nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) +h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) /******/ { int ret_value = -1; @@ -1583,7 +1580,7 @@ nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) */ int_f -nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) +h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id) /******/ { int ret_value = -1; @@ -1622,7 +1619,7 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_ */ int_f -nh5tpack_c(hid_t_f * type_id) +h5tpack_c(hid_t_f * type_id) /******/ { int ret_value = -1; @@ -1643,12 +1640,12 @@ nh5tpack_c(hid_t_f * type_id) * PURPOSE * Call H5Tarray_create2 to create array datatype * INPUTS - * base_id - identifier of array base datatype - * rank - array's rank - * dims - Size of new member array - * type_id - identifier of the array datatype + * base_id - identifier of array base datatype + * rank - array's rank + * dims - Size of new member array + * type_id - identifier of the array datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Thursday, November 16, 2000 @@ -1657,7 +1654,7 @@ nh5tpack_c(hid_t_f * type_id) * SOURCE */ int_f -nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) +h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id) /******/ { hsize_t c_dims[H5S_MAX_RANK]; @@ -1692,7 +1689,7 @@ DONE: * parent_id - Datatype identifier for the base datatype * OUTPUTS * new_type_id - datatype identifier for the new - * enumeration datatype + * enumeration datatype * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -1704,7 +1701,7 @@ DONE: */ int_f -nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) +h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; @@ -1740,7 +1737,7 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) */ int_f -nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1767,24 +1764,24 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tenum_nameof_c * PURPOSE * Call H5Tenum_nameof to find the symbol name that corresponds to - * the specified value of the enumeration datatype type + * the specified value of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * namelen - length of the name - * value - value of the enumeration datatype - * Output: name - Name of the enumeration datatype + * type_id - identifier of the datatype + * namelen - length of the name + * value - value of the enumeration datatype + * Output: name - Name of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) +h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) /******/ { int ret_value = -1; @@ -1811,24 +1808,24 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) * h5tenum_valueof_c * PURPOSE * Call H5Tenum_valueof to find the value of that corresponds to - * the specified name of the enumeration datatype type + * the specified name of the enumeration datatype type * INPUTS - * type_id - identifier of the datatype - * name - Name of the enumeration datatype - * namelen - length of name - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * name - Name of the enumeration datatype + * namelen - length of name + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) +h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; @@ -1851,23 +1848,23 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) * h5tget_member_value_c * PURPOSE * Call H5Tget_member_value to get the value of an - * enumeration datatype member + * enumeration datatype member * INPUTS - * type_id - identifier of the datatype - * member_no - Number of the enumeration datatype member. - * Output: value - value of the enumeration datatype + * type_id - identifier of the datatype + * member_no - Number of the enumeration datatype member. + * Output: value - value of the enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE */ int_f -nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) +h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) /******/ { int ret_value = -1; @@ -1886,25 +1883,25 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) * NAME * h5tset_tag_c * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * PURPOSE * Call H5Tset_tag to set an opaque datatype tag * INPUTS - * type_id - identifier of the dataspace - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * namelen - length of tag + * type_id - identifier of the dataspace + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * namelen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Wednesday, January 26, 2000 + * Wednesday, January 26, 2000 * HISTORY * * SOURCE */ int_f -nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) +h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) /******/ { int ret_value = -1; @@ -1929,11 +1926,11 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * INPUTS * type_id - identifier of the datatype * OUTPUTS - * tag - Unique ASCII string with which the opaque - * datatype is to be tagged - * taglen - length of tag + * tag - Unique ASCII string with which the opaque + * datatype is to be tagged + * taglen - length of tag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU * Wednesday, January 26, 2000 @@ -1942,7 +1939,7 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) * SOURCE */ int_f -nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) +h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) /******/ { int ret_value = -1; @@ -1965,20 +1962,20 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) * PURPOSE * Call H5Tvlen_create to create VL dtatype * INPUTS - * type_id - identifier of the base datatype + * type_id - identifier of the base datatype * OUTPUTS - * vltype_id - identifier of the VL datatype + * vltype_id - identifier of the VL datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, October 23, 2002 + * Wednesday, October 23, 2002 * HISTORY * * SOURCE */ int_f -nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) +h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) /******/ { int ret_value = -1; @@ -1997,24 +1994,24 @@ nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) * h5tis_variable_str_c * PURPOSE * Call H5Tis_variable_str to detrmine if the datatype - * is a variable string. + * is a variable string. * INPUTS - * type_id - identifier of the dataspace + * type_id - identifier of the dataspace * OUTPUTS - * flag - 0 if not VL str, 1 if is not - * and negative on failure. + * flag - 0 if not VL str, 1 if is not + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12 , 2003 + * Wednesday, March 12 , 2003 * HISTORY * * SOURCE */ int_f -nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) +h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) /******/ { int ret_value = 0; @@ -2034,13 +2031,13 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) * Call H5Tget_member_class to detrmine ithe class of the compound * datatype member * INPUTS - * type_id - identifier of the dataspace - * member_no - member's index + * type_id - identifier of the dataspace + * member_no - member's index * OUTPUTS - * class - member's class - * and negative on failure. + * class - member's class + * and negative on failure. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal * Wednesday, April 6, 2005 @@ -2050,7 +2047,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) */ int_f -nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) +h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) /******/ { int ret_value = 0; @@ -2073,12 +2070,12 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * PURPOSE * Call H5Tcommit_anon * INPUTS - * loc_id - file or group identifier - * dtype_id - dataset identifier - * tcpl_id - Datatype creation property list - * tapl_id - Datatype access property list + * loc_id - file or group identifier + * dtype_id - dataset identifier + * tcpl_id - Datatype creation property list + * tapl_id - Datatype access property list * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * February 25, 2008 @@ -2087,7 +2084,7 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) * SOURCE */ int_f -nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, +h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id) /******/ { @@ -2108,10 +2105,10 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * h5tcommitted_c * PURPOSE * Call H5Tcommitted - * dtype_id - dataset identifier + * dtype_id - dataset identifier * RETURNS - * a positive value, for TRUE, if the datatype has been committed, - * or 0 (zero), for FALSE, if the datatype has not been committed. + * a positive value, for TRUE, if the datatype has been committed, + * or 0 (zero), for FALSE, if the datatype has not been committed. * Otherwise returns a negative value. * AUTHOR * M. Scot Breitenfeld @@ -2121,7 +2118,7 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, * SOURCE */ int_f -nh5tcommitted_c(hid_t_f *dtype_id) +h5tcommitted_c(hid_t_f *dtype_id) /******/ { int_f ret_value; @@ -2144,10 +2141,10 @@ nh5tcommitted_c(hid_t_f *dtype_id) * buf - Buffer for the data space object to be decoded. * OUTPUTS * - * obj_id - Object_id (non-negative) + * obj_id - Object_id (non-negative) * * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2157,7 +2154,7 @@ nh5tcommitted_c(hid_t_f *dtype_id) */ int_f -nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) +h5tdecode_c ( _fcd buf, hid_t_f *obj_id ) /******/ { int ret_value = -1; @@ -2187,11 +2184,11 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) * Call H5Tencode * INPUTS * - * obj_id - Identifier of the object to be encoded. + * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. - * nalloc - The size of the allocated buffer. + * nalloc - The size of the allocated buffer. * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2201,7 +2198,7 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) */ int_f -nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /******/ { int ret_value = -1; @@ -2256,11 +2253,11 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) * PURPOSE * Call H5Tget_create_plist * INPUTS - * dtype_id - Datatype identifier + * dtype_id - Datatype identifier * OUTPUTS - * dtpl_id - Datatype property list identifier + * dtpl_id - Datatype property list identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * April 9, 2008 @@ -2270,7 +2267,7 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) */ int_f -nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) +h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) /******/ { int_f ret_value=-1; /* Return value */ @@ -2289,12 +2286,12 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) * Call H5Tcompiler_conv * INPUTS * - * src_id - Identifier for the source datatype. - * dst_id - Identifier for the destination datatype. + * src_id - Identifier for the source datatype. + * dst_id - Identifier for the destination datatype. * OUTPUTS - * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion + * c_flag - flag; TRUE for compiler conversion, FALSE for library conversion * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M.Scot Breitenfeld * April 9, 2008 @@ -2304,7 +2301,7 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) */ int_f -nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) +h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) /******/ { int ret_value = -1; @@ -2323,12 +2320,12 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) * Call H5Tget_native_type * INPUTS * - * dtype_id - Datatype identifier for the dataset datatype. - * direction - Direction of search. + * dtype_id - Datatype identifier for the dataset datatype. + * direction - Direction of search. * OUTPUTS - * native_dtype_id - The native datatype identifier for the specified dataset datatype + * native_dtype_id - The native datatype identifier for the specified dataset datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld * June 18, 2008 @@ -2338,7 +2335,7 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) */ int_f -nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) +h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id) /******/ { int ret_value = -1; diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 new file mode 100644 index 0000000..6b8f896 --- /dev/null +++ b/fortran/src/H5Tff.F90 @@ -0,0 +1,3082 @@ +!****h* ROBODoc/H5T +! +! NAME +! MODULE H5T +! +! PURPOSE +! This file contains Fortran interfaces for H5T 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 +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then 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 H5T + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR + USE H5GLOBAL + IMPLICIT NONE + +!****t* H5T/hvl_t +! Fortran2003 Derived Type: + TYPE hvl_t + INTEGER(size_t) :: len ! Length of VL data (in base type units) + TYPE(C_PTR) :: p ! Pointer to VL data + END TYPE hvl_t + +!***** + + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + +CONTAINS + +! +!****s* H5T/h5topen_f +! +! NAME +! h5topen_f +! +! PURPOSE +! Opens named datatype. +! +! INPUTS +! loc_id - location identifier +! name - a datatype name +! OUTPUTS +! type_id - datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tapl_id - datatype access property list identifier. +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! Added optional parameter 'tapl_id' for compatability +! with H5Topen2. April 9, 2009. +! +! SOURCE + SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) BIND(C,NAME='h5topen_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5topen_c + END INTERFACE + + namelen = LEN(name) + + tapl_id_default = H5P_DEFAULT_F + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + END SUBROUTINE h5topen_f +! +!****s* H5T/h5tcommit_f +! +! NAME +! h5tcommit_f +! +! PURPOSE +! Commits a transient datatype to a file, creating a +! new named datatype. +! +! INPUTS +! loc_id - location identifier +! name - name of the datatype to be stored +! at the specified location +! type_id - identifier of a datatype to be stored +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! lcpl_id - Link creation property list +! tcpl_id - Datatype creation property list +! tapl_id - Datatype access property list +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! - Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! - Added optional parameters introduced in version 1.8 +! M. Scot Breitenfeld +! +! SOURCE + SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & + lcpl_id, tcpl_id, tapl_id ) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name + ! Datatype name within file or group + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list +!***** + + INTEGER :: namelen ! Name length + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) BIND(C,NAME='h5tcommit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF (PRESENT(tapl_id)) tapl_id_default = tapl_id + + namelen = LEN(name) + + hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_f +! +!****s* H5T/h5tcopy_f +! +! NAME +! h5tcopy_f +! +! PURPOSE +! Creates a copy of exisiting datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! new_type_id - identifier of datatype's copy +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) BIND(C,NAME='h5tcopy_c') + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tcopy_c + END INTERFACE + + hdferr = h5tcopy_c(type_id, new_type_id) + END SUBROUTINE h5tcopy_f +! +!****s* H5T/h5tequal_f +! +! NAME +! h5tequal_f +! +! PURPOSE +! Determines whether two datatype identifiers refer +! to the same datatype. +! +! INPUTS +! type1_id - datatype identifier +! type2_id - datatype identifier +! OUTPUTS +! flag - TRUE/FALSE flag to indicate +! if two datatypes are equal +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: c_flag + INTERFACE + INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) BIND(C,NAME='h5tequal_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER :: c_flag + END FUNCTION h5tequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5tequal_c(type1_id, type2_id, c_flag) + IF(c_flag .GT. 0) flag = .TRUE. + END SUBROUTINE h5tequal_f +! +!****s* H5T/h5tclose_f +! +! NAME +! h5tclose_f +! +! PURPOSE +! Releases a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tclose_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tclose_c(type_id) BIND(C,NAME='h5tclose_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tclose_c + END INTERFACE + + hdferr = h5tclose_c(type_id) + END SUBROUTINE h5tclose_f +! +!****s* H5T/h5tget_class_f +! +! NAME +! h5tget_class_f +! +! PURPOSE +! Returns the datatype class identifier. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! class - Class, possible values are: +! H5T_NO_CLASS_F (-1) +! H5T_INTEGER_F (0) +! H5T_FLOAT_F (1) +! H5T_TIME_F (2) +! H5T_STRING_F (3) +! H5T_BITFIELD_F (4) +! H5T_OPAQUE_F (5) +! H5T_COMPOUND_F (6) +! H5T_REFERENCE_F (7) +! H5T_ENUM_F (8) +! H5T_VLEN_F (9) +! H5T_ARRAY_F (10) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_class_f(type_id, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_class_c(type_id, class) BIND(C,NAME='h5tget_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_class_c + END INTERFACE + + hdferr = h5tget_class_c(type_id, class) + END SUBROUTINE h5tget_class_f +! +!****s* H5T/h5tget_size_f +! +! NAME +! h5tget_size_f +! +! PURPOSE +! Returns the size of a datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! size - datatype size +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_size_c(type_id, size) BIND(C,NAME='h5tget_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5tget_size_c + END INTERFACE + + hdferr = h5tget_size_c(type_id, size) + END SUBROUTINE h5tget_size_f + +! +!****s* H5T/h5tset_size_f +! +! NAME +! h5tset_size_f +! +! PURPOSE +! Sets the total size for an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! size - size of the datatype +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! +! SOURCE + SUBROUTINE h5tset_size_f(type_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_size_c(type_id, size) BIND(C,NAME='h5tset_size_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5tset_size_c + END INTERFACE + + hdferr = h5tset_size_c(type_id, size) + END SUBROUTINE h5tset_size_f + +! +!****s* H5T/h5tget_order_f +! +! NAME +! h5tget_order_f +! +! PURPOSE +! Returns the byte order of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! order - byte order for the datatype, possible +! values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: order + ! Datatype byte order, possible values are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_order_c(type_id, order) BIND(C,NAME='h5tget_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: order + END FUNCTION h5tget_order_c + END INTERFACE + + hdferr = h5tget_order_c(type_id, order) + END SUBROUTINE h5tget_order_f +! +!****s* H5T/h5tset_order_f +! +! NAME +! h5tset_order_f +! +! PURPOSE +! Sets the byte ordering of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! order - datatype byte order Possible values are: +! H5T_ORDER_LE_F +! H5T_ORDER_BE_F +! H5T_ORDER_VAX_F (not implemented yet) +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values + ! are: + ! H5T_ORDER_LE_F + ! H5T_ORDER_BE_F + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_order_c(type_id, order) BIND(C,NAME='h5tset_order_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: order + END FUNCTION h5tset_order_c + END INTERFACE + + hdferr = h5tset_order_c(type_id, order) + END SUBROUTINE h5tset_order_f + +! +!****s* H5T/h5tget_precision_f +! +! NAME +! h5tget_precision_f +! +! PURPOSE +! Returns the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! precision - precision of the datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_precision_f(type_id, PRECISION, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_precision_c(type_id, PRECISION) BIND(C,NAME='h5tget_precision_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: PRECISION + END FUNCTION h5tget_precision_c + END INTERFACE + + hdferr = h5tget_precision_c(type_id, PRECISION) + END SUBROUTINE h5tget_precision_f + +! +!****s* H5T/h5tset_precision_f +! +! NAME +! h5tset_precision_f +! +! PURPOSE +! Sets the precision of an atomic datatype. +! +! INPUTS +! type_id - datatype identifier +! precision - datatype precision +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_precision_f(type_id, PRECISION, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: PRECISION + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_precision_c (type_id, PRECISION) BIND(C,NAME='h5tset_precision_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: PRECISION + END FUNCTION h5tset_precision_c + END INTERFACE + + hdferr = h5tset_precision_c(type_id, PRECISION) + END SUBROUTINE h5tset_precision_f + +! +!****s* H5T/h5tget_offset_f +! +! NAME +! h5tget_offset_f +! +! PURPOSE +! Retrieves the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! offset - offset value +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_offset_c(type_id, offset) BIND(C,NAME='h5tget_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_offset_c + END INTERFACE + + hdferr = h5tget_offset_c(type_id, offset) + END SUBROUTINE h5tget_offset_f + +! +!****s* H5T/h5tset_offset_f +! +! NAME +! h5tset_offset_f +! +! PURPOSE +! Sets the bit offset of the first significant bit. +! +! INPUTS +! type_id - datatype identifier +! offset - offset value +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_offset_c(type_id, offset) BIND(C,NAME='h5tset_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + END FUNCTION h5tset_offset_c + END INTERFACE + + hdferr = h5tset_offset_c(type_id, offset) + END SUBROUTINE h5tset_offset_f + +! +!****s* H5T/h5tget_pad_f +! +! NAME +! h5tget_pad_f +! +! PURPOSE +! Retrieves the padding type of the least and +! most -significant bit padding. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F +! H5T_PAD_NPAD_F +! hdferr - Returns 0 if successful and -1 if fails + +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tget_pad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + END FUNCTION h5tget_pad_c + END INTERFACE + + hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tget_pad_f + +! +!****s* H5T/h5tset_pad_f +! +! NAME +! h5tset_pad_f +! +! PURPOSE +! Sets the least and most-significant bits padding types. +! +! INPUTS +! type_id - datatype identifier +! lsbpad - least-significant bit padding type +! msbpad - most-significant bit padding type +! Possible values of padding type are: +! H5T_PAD_ERROR_F = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tset_pad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + END FUNCTION h5tset_pad_c + END INTERFACE + + hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) + END SUBROUTINE h5tset_pad_f + +! +!****s* H5T/h5tget_sign_f +! +! NAME +! h5tget_sign_f +! +! PURPOSE +! Retrieves the sign type for an integer type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tget_sign_c(type_id, sign) BIND(C,NAME='h5tget_sign_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + END FUNCTION h5tget_sign_c + END INTERFACE + + hdferr = h5tget_sign_c(type_id, sign) + END SUBROUTINE h5tget_sign_f + +! +!****s* H5T/h5tset_sign_f +! +! NAME +! h5tset_sign_f +! +! PURPOSE +! Sets the sign proprety for an integer type. +! +! INPUTS +! type_id - datatype identifier +! sign - sign type +! Possible values are: +! - Unsigned integer type +! H5T_SGN_NONE_F = 0 +! - Two's complement signed integer type +! H5T_SGN_2_F = 1 +! - error value: H5T_SGN_ERROR_F=-1 +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_sign_c(type_id, sign) BIND(C,NAME='h5tset_sign_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + END FUNCTION h5tset_sign_c + END INTERFACE + + hdferr = h5tset_sign_c(type_id, sign) + END SUBROUTINE h5tset_sign_f + +! +!****s* H5T/h5tget_fields_f +! +! NAME +! h5tget_fields_f +! +! PURPOSE +! Retrieves floating point datatype bit field information. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) & + BIND(C,NAME='h5tget_fields_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + END FUNCTION h5tget_fields_c + END INTERFACE + + hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tget_fields_f + +! +!****s* H5T/h5tset_fields_f +! +! NAME +! h5tset_fields_f +! +! PURPOSE +! Sets locations and sizes of floating point bit fields. +! +! INPUTS +! type_id - datatype identifier +! spos - sign bit-position +! epos - exponent bit-position +! esize - size of exponent in bits +! mpos - mantissa position +! msize - size of mantissa in bits +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) & + BIND(C,NAME='h5tset_fields_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + END FUNCTION h5tset_fields_c + END INTERFACE + + hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + END SUBROUTINE h5tset_fields_f + +! +!****s* H5T/h5tget_ebias_f +! +! NAME +! h5tget_ebias_f +! +! PURPOSE +! Retrieves the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! ebias - datatype exponent bias +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) BIND(C,NAME='h5tget_ebias_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + END FUNCTION h5tget_ebias_c + END INTERFACE + + hdferr = h5tget_ebias_c(type_id, ebias) + END SUBROUTINE h5tget_ebias_f + +! +!****s* H5T/h5tset_ebias_f +! +! NAME +! h5tset_ebias_f +! +! PURPOSE +! Sets the exponent bias of a floating-point type. +! +! INPUTS +! type_id - datatype identifier +! ebias - datatype exponent bias +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) BIND(C,NAME='h5tset_ebias_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + END FUNCTION h5tset_ebias_c + END INTERFACE + + hdferr = h5tset_ebias_c(type_id, ebias) + END SUBROUTINE h5tset_ebias_f + +! +!****s* H5T/h5tget_norm_f +! +! NAME +! h5tget_norm_f +! +! PURPOSE +! Retrieves mantissa normalization of a floating-point +! datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F +! H5T_NORM_MSBSET_F +! H5T_NORM_NONE_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tget_norm_c(type_id, norm) BIND(C,NAME='h5tget_norm_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + END FUNCTION h5tget_norm_c + END INTERFACE + + hdferr = h5tget_norm_c(type_id, norm) + END SUBROUTINE h5tget_norm_f + +! +!****s* H5T/h5tset_norm_f +! +! NAME +! h5tset_norm_f +! +! PURPOSE +! Sets the mantissa normalization of a floating-point datatype. +! +! INPUTS +! type_id - datatype identifier +! norm - normalization types, valid values are: +! H5T_NORM_IMPLIED_F +! H5T_NORM_MSBSET_F +! H5T_NORM_NONE_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_norm_c(type_id, norm) BIND(C,NAME='h5tset_norm_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + END FUNCTION h5tset_norm_c + END INTERFACE + + hdferr = h5tset_norm_c(type_id, norm) + END SUBROUTINE h5tset_norm_f + +! +!****s* H5T/h5tget_inpad_f +! +! NAME +! h5tget_inpad_f +! +! PURPOSE +! Retrieves the internal padding type for unused bits +! in floating-point datatypes. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) BIND(C,NAME='h5tget_inpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + END FUNCTION h5tget_inpad_c + END INTERFACE + + hdferr = h5tget_inpad_c(type_id, padtype) + END SUBROUTINE h5tget_inpad_f + +! +!****s* H5T/h5tset_inpad_f +! +! NAME +! h5tset_inpad_f +! +! PURPOSE +! Fills unused internal floating point bits. +! +! INPUTS +! type_id - datatype identifier +! padtype - padding type for unused bits +! Possible values of padding type are: +! H5T_PAD_ZERO_F +! H5T_PAD_ONE_F +! H5T_PAD_BACKGROUND_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) BIND(C,NAME='h5tset_inpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + END FUNCTION h5tset_inpad_c + END INTERFACE + + hdferr = h5tset_inpad_c(type_id, padtype) + END SUBROUTINE h5tset_inpad_f + +! +!****s* H5T/h5tget_cset_f +! +! NAME +! h5tget_cset_f +! +! PURPOSE +! Retrieves the character set type of a string datatype. +! +! INPUTS +! type_id - Datatype identifier +! OUTPUTS +! cset - Character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F +! H5T_CSET_UTF8_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_cset_c(type_id, cset) BIND(C,NAME='h5tget_cset_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + END FUNCTION h5tget_cset_c + END INTERFACE + + hdferr = h5tget_cset_c(type_id, cset) + END SUBROUTINE h5tget_cset_f + +! +!****s* H5T/h5tset_cset_f +! +! NAME +! h5tset_cset_f +! +! PURPOSE +! Sets character set to be used. +! +! INPUTS +! type_id - datatype identifier +! cset - character set type of a string datatype +! Possible values are: +! H5T_CSET_ASCII_F +! H5T_CSET_UTF8_F +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_cset_c(type_id, cset) BIND(C,NAME='h5tset_cset_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + END FUNCTION h5tset_cset_c + END INTERFACE + + hdferr = h5tset_cset_c(type_id, cset) + END SUBROUTINE h5tset_cset_f +! +!****s* H5T/h5tget_strpad_f +! +! NAME +! h5tget_strpad_f +! +! PURPOSE +! Retrieves the storage mechanism for a string datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F +! H5T_STR_ERROR_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) BIND(C,NAME='h5tget_strpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + END FUNCTION h5tget_strpad_c + END INTERFACE + + hdferr = h5tget_strpad_c(type_id, strpad) + END SUBROUTINE h5tget_strpad_f + +! +!****s* H5T/h5tset_strpad_f +! +! NAME +! h5tset_strpad_f +! +! PURPOSE +! Defines the storage mechanism for character strings. +! +! INPUTS +! type_id - datatype identifier +! strpad - storage method for a string datatype +! Possible values are: +! H5T_STR_NULLTERM_F, +! H5T_STR_NULLPAD_F, +! H5T_STR_SPACEPAD_F, +! H5T_STR_ERROR_F. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) BIND(C,NAME='h5tset_strpad_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + END FUNCTION h5tset_strpad_c + END INTERFACE + + hdferr = h5tset_strpad_c(type_id, strpad) + END SUBROUTINE h5tset_strpad_f + +! +!****s* H5T/h5tget_nmembers_f +! +! NAME +! h5tget_nmembers_f +! +! PURPOSE +! Retrieves the number of fields in a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! num_members - number of members +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) BIND(C,NAME='h5tget_nmembers_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + END FUNCTION h5tget_nmembers_c + END INTERFACE + + hdferr = h5tget_nmembers_c(type_id, num_members) + END SUBROUTINE h5tget_nmembers_f + +! +!****s* H5T/h5tget_member_name_f +! +! NAME +! h5tget_member_name_f +! +! PURPOSE +! Retrieves the name of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! index - filed index (0-based) +! OUTPUTS +! member_name - buffer to hold member's name +! namelen - name length +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(LEN=*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) BIND(C,NAME='h5tget_member_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + END FUNCTION h5tget_member_name_c + END INTERFACE + + hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) + END SUBROUTINE h5tget_member_name_f + +! +!****s* H5T/h5tget_member_offset_f +! +! NAME +! h5tget_member_offset_f +! +! PURPOSE +! Retrieves the offset of a field of a compound datatype. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the field +! OUTPUTS +! offset - byte offset of the requested field +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) BIND(C,NAME='h5tget_member_offset_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_member_offset_c + END INTERFACE + + hdferr = h5tget_member_offset_c(type_id, member_no, offset ) + END SUBROUTINE h5tget_member_offset_f +! +!****s* H5T/h5tget_member_index_f +! +! NAME +! h5tget_member_index_f +! +! PURPOSE +! Retrieves the index of a compound or enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! name - name of the field or member whose index to +! to be retrieved from the datatype. +! OUTPUTS +! index - 0-based index of the filed or member (0 to N-1) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 26, 2002 +! +! SOURCE + SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: index + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen ! Name length + + INTERFACE + INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) BIND(C,NAME='h5tget_member_index_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: index + END FUNCTION h5tget_member_index_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tget_member_index_c(type_id, name, namelen, index) + END SUBROUTINE h5tget_member_index_f + + +! !$! +! !$!****s* H5T/h5tget_member_dim_f +! !$! +! !$! NAME +! !$! h5tget_member_dim_f +! !$! +! !$! PURPOSE +! !$! This function is not supported in hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! +! !$! SOURCE +! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) +! !$! +! !$! IMPLICIT NONE +! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier +! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of +! !$! !field_dims, perm) +! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field +! !$! +! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the +! !$! !dimensions of the field +! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the +! !$! !permutation vector of the field +! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !$!*****! +! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c +! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) +! !$! +! !$! END SUBROUTINE h5tget_member_dims_f + + +!****s* H5T/h5tget_array_dims_f +! +! NAME +! h5tget_array_dims_f +! +! PURPOSE +! Returns sizes of array dimensions. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! dims - buffer to store array datatype dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) BIND(C,NAME='h5tget_array_dims_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5tget_array_dims_c + END INTERFACE + + hdferr = h5tget_array_dims_c(type_id, dims) + + END SUBROUTINE h5tget_array_dims_f + +! +!****s* H5T/h5tget_array_ndims_f +! +! NAME +! h5tget_array_ndims_f +! +! PURPOSE +! Returns the rank of an array datatype. +! +! INPUTS +! type_id - array datatype identifier +! OUTPUTS +! ndims - number of array dimensions +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) BIND(C,NAME='h5tget_array_ndims_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + END FUNCTION h5tget_array_ndims_c + END INTERFACE + + hdferr = h5tget_array_ndims_c(type_id, ndims) + + END SUBROUTINE h5tget_array_ndims_f + +! +!****s* H5T/h5tget_super_f +! +! NAME +! h5tget_super_f +! +! PURPOSE +! Returns the base datatype from which a datatype is derived. +! +! INPUTS +! type_id - datatype identifier +! OUTPUTS +! base_type_id - identifier of the base type +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) BIND(C,NAME='h5tget_super_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + END FUNCTION h5tget_super_c + END INTERFACE + + hdferr = h5tget_super_c(type_id, base_type_id) + + END SUBROUTINE h5tget_super_f + +! +!****s* H5T/h5tget_member_type_f +! +! NAME +! h5tget_member_type_f +! +! PURPOSE +! Returns the datatype of the specified member. +! +! INPUTS +! type_id - compound datatype identifier +! field_idx - field index (0-based) +! +! OUTPUTS +! datatype - identifier of the member's datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) & + BIND(C,NAME='h5tget_member_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + END FUNCTION h5tget_member_type_c + END INTERFACE + + hdferr = h5tget_member_type_c(type_id, field_idx , datatype) + END SUBROUTINE h5tget_member_type_f + +! +!****s* H5T/h5tcreate_f +! +! NAME +! h5tcreate_f +! +! PURPOSE +! Creates a new datatype. +! +! INPUTS +! class - Datatype class can be one of: +! H5T_COMPOUND_F +! H5T_ENUM_F +! H5T_OPAQUE_F +! H5T_STRING_F +! +! size - Size of the datatype. +! OUTPUTS +! type_id - Datatype identifier. +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) + IMPLICIT NONE + INTEGER , INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T) , INTENT(OUT) :: type_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tcreate_c(class, size, type_id) BIND(C,NAME='h5tcreate_c') + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tcreate_c + END INTERFACE + + hdferr = h5tcreate_c(class, size, type_id) + END SUBROUTINE h5tcreate_f + +! +!****s* H5T/h5tinsert_f +! +! NAME +! h5tinsert_f +! +! PURPOSE +! Adds a new member to a compound datatype. +! +! INPUTS +! type_id - compound datatype identifier +! name - name of the field to insert +! offset - start of the member in an instance of +! the compound datatype +! field_id - datatype identifier of the field to insert +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) BIND(C,NAME='h5tinsert_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER :: namelen + END FUNCTION h5tinsert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) + END SUBROUTINE h5tinsert_f + +! +!****s* H5T/h5tpack_f +! +! NAME +! h5tpack_f +! +! PURPOSE +! Recursively removes padding from within a compound datatype. +! +! INPUTS +! type_id - compound datatype identifier +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tpack_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tpack_c(type_id) BIND(C,NAME='h5tpack_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tpack_c + END INTERFACE + + hdferr = h5tpack_c(type_id) + END SUBROUTINE h5tpack_f + +! !$! +! !$!****s* H5T/h5tinsert_array_f +! !$! +! !$! NAME +! !$! h5tinsert_array_f +! !$! +! !$! PURPOSE +! !$! This function is not available on hdf5-1.4.* +! !$! +! !$! INPUTS +! !$! OUTPUTS +! !$! hdferr: - error code +! !$! Success: 0 +! !$! Failure: -1 +! !$! +! !$! AUTHOR +! !$! Elena Pourmal +! !$! August 12, 1999 +! !$! +! !$! HISTORY +! !$! Explicit Fortran interfaces were added for +! !$! called C functions (it is needed for Windows +! !$! port). March 7, 2001 +! !$! SOURCE +! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) +! IMPLICIT NONE +! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype +! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member +! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member +! !within compound datatype +! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. +! !Valid values are 0 (zero) through 4 (four) +! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array +! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member +! INTEGER, INTENT(OUT) :: hdferr ! Error code +! !*****! +! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm +! !Pointer to buffer to store +! !the permutation vector of the field +! INTEGER :: namelen, sizeofperm +! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 +! namelen = LEN(name) +! if (present(perm)) then +! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) +! else +! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) +! end if +! +! END SUBROUTINE h5tinsert_array_f + +! +!****s* H5T/h5tarray_create_f +! +! NAME +! h5tarray_create_f +! +! PURPOSE +! Creates an array datatype object. +! +! INPUTS +! base_id - datatype identifier for the array +! base datatype +! rank - rank of the array +! dims - array dimension sizes +! OUTPUTS +! type_id - array datatype identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) BIND(C,NAME='h5tarray_create_c') + IMPORT :: HID_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tarray_create_c + END INTERFACE + + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) + + END SUBROUTINE h5tarray_create_f + +! +!****s* H5T/h5tenum_create_f +! +! NAME +! h5tenum_create_f +! +! PURPOSE +! Creates a new enumeration datatype. +! +! INPUTS +! parent_id - datatype identifier for base datatype +! OUTPUTS +! new_type_id - datatype identifier for the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) BIND(C,NAME='h5tenum_create_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tenum_create_c + END INTERFACE + + hdferr = h5tenum_create_c(parent_id, new_type_id) + END SUBROUTINE h5tenum_create_f +! +!****s* H5T/h5tenum_nameof_f +! +! NAME +! h5tenum_nameof_f +! +! PURPOSE +! Returns the symbol name corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! value - value of the enumeration datatype +! namelen - name buffer size +! OUTPUTS +! name - buffer to hold symbol name +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! NOTE +! According to the standard: Because an INTENT(OUT) variable is considered undefined +! on entry to the procedure, any default initialization specified for its type will +! be applied. So we need to blank out the "name" to be portable and eliminate any +! characters the "name' may contain upon entry, depending on compiler implementation. +! SOURCE + SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) BIND(C,NAME='h5tenum_nameof_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + END FUNCTION h5tenum_nameof_c + END INTERFACE + + name(1:LEN(name)) = ' ' + + hdferr = h5tenum_nameof_c(type_id, value, name, namelen) + END SUBROUTINE h5tenum_nameof_f +! +!****s* H5T/h5tenum_valuof_f +! +! NAME +! h5tenum_valuof_f +! +! PURPOSE +! Returns the value corresponding to a specified +! member of an enumeration datatype. +! +! INPUTS +! type_id - datatype identifier +! name - symbol name +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! +! SOURCE + SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) & + BIND(C,NAME='h5tenum_valueof_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tenum_valueof_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_valueof_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_valueof_f + +! +!****s* H5T/h5tget_member_value_f +! +! NAME +! h5tget_member_value_f +! +! PURPOSE +! Returns the value of an enumeration datatype member. +! +! INPUTS +! type_id - datatype identifier +! member_no - number of the enumeration datatype member +! OUTPUTS +! value - value of the enumeration datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) & + BIND(C,NAME='h5tget_member_value_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tget_member_value_c + END INTERFACE + + hdferr = h5tget_member_value_c(type_id, member_no, value) + END SUBROUTINE h5tget_member_value_f + +! +!****s* H5T/h5tset_tag_f +! +! NAME +! h5tset_tag_f +! +! PURPOSE +! Tags an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! tag - unique ASCII string with which the opaque +! datatype is to be tagged. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: tag + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: taglen + + INTERFACE + INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) BIND(C,NAME='h5tset_tag_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: tag + INTEGER :: taglen + END FUNCTION h5tset_tag_c + END INTERFACE + + taglen = LEN(tag) + hdferr = h5tset_tag_c(type_id, tag, taglen) + END SUBROUTINE h5tset_tag_f + +! +!****s* H5T/h5tget_tag_f +! +! NAME +! h5tget_tag_f +! +! PURPOSE +! Gets the tag associated with an opaque datatype. +! +! INPUTS +! type_id - identifier for opaque datatype +! OUTPUTS +! tag - unique ASCII string associated with opaque +! datatype +! taglen - Length of tag +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: tag + INTEGER, INTENT(OUT) :: taglen + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER(SIZE_T):: tag_size ! Declared character length of tab + INTERFACE + INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) & + BIND(C,NAME='h5tget_tag_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: tag + INTEGER(SIZE_T), INTENT(IN) :: tag_size + INTEGER, INTENT(OUT) :: taglen + END FUNCTION h5tget_tag_c + END INTERFACE + + tag_size = LEN(tag) + hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) + END SUBROUTINE h5tget_tag_f + +! +!****s* H5T/h5tvlen_create_f +! +! NAME +! h5tvlen_create_f +! +! PURPOSE +! Creates a new variable-length datatype. +! +! INPUTS +! type_id - identifier iof base datatype +! OUTPUTS +! vltype_id - identifier for VL datatype +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! Wednesday, October 23, 2002 +! +! NOTES +! Only basic Fortran base datatypes are supported +! +! SOURCE + SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) BIND(C,NAME='h5tvlen_create_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + END FUNCTION h5tvlen_create_c + END INTERFACE + + hdferr = h5tvlen_create_c(type_id, vltype_id) + END SUBROUTINE h5tvlen_create_f + +! +!****s* H5T/h5tis_variable_str_f +! +! NAME +! h5tis_variable_str_f +! +! PURPOSE +! Determines whether a dattype is a variable string. +! +! INPUTS +! type_id - datartpe identifier +! OUTPUTS +! status - flag to indicate if datatype +! is a variable string ( TRUE or FALSE) +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) & + BIND(C,NAME='h5tis_variable_str_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: flag + END FUNCTION h5tis_variable_str_c + END INTERFACE + + hdferr = h5tis_variable_str_c(type_id, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5tis_variable_str_f + +! +!****s* H5T/h5tget_member_class_f +! +! NAME +! h5tget_member_class_f +! +! PURPOSE +! Returns datatype class of compound datatype member. +! +! INPUTS +! type_id - datartpe identifier +! member_no - index of compound datatype member +! OUTPUTS +! class - class type for compound dadtype member +! Valid classes: +! H5T_NO_CLASS_F (error) +! H5T_INTEGER_F +! H5T_FLOAT_F +! H5T_TIME_F +! H5T_STRING_F +! H5T_BITFIELD_F +! H5T_OPAQUE_F +! H5T_COMPOUND_F +! H5T_REFERENCE_F +! H5T_ENUM_F +! H5T_VLEN_F +! H5T_ARRAY_F +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! April 6, 2005 +! +! SOURCE + SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) & + BIND(C,NAME='h5tget_member_class_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_member_class_c + END INTERFACE + + hdferr = h5tget_member_class_c(type_id, member_no, class) + + END SUBROUTINE h5tget_member_class_f + +! +!****s* H5T/h5tcommit_anon_f +! +! NAME +! h5tcommit_anon_f +! +! PURPOSE +! Commits a transient datatype to a file, +! creating a new named datatype, +! but does not link it into the file structure. +! +! INPUTS +! loc_id - A file or group identifier specifying the file +! in which the new named datatype is to be created. +! dtype_id - A datatype identifier. +! +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! OPTIONAL PARAMETERS +! tcpl_id - A datatype creation property list identifier. +! (H5P_DEFAULT_F for the default property list.) +! tapl_id - A datatype access property list identifier. +! should always be passed as the value H5P_DEFAULT_F. +! +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id +!***** + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default) BIND(C,NAME='h5tcommit_anon_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_anon_c + END INTERFACE + + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default ) + + END SUBROUTINE h5tcommit_anon_f + +! +!****s* H5T/h5tcommitted_f +! +! NAME +! h5tcommitted_f +! +! PURPOSE +! Determines whether a datatype is a named type or a transient type. +! +! INPUTS +! dtype_id - A datatype identifier. +! +! OUTPUTS +! committed - .TRUE., if the datatype has been committed +! .FALSE., if the datatype has not been committed. +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! February 25, 2008 +! +! SOURCE + SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + LOGICAL, INTENT(OUT) :: committed + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tcommitted_c(dtype_id) BIND(C,NAME='h5tcommitted_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + END FUNCTION h5tcommitted_c + END INTERFACE + + hdferr = h5tcommitted_c(dtype_id) + + IF(hdferr.GT.0)THEN + committed = .TRUE. + hdferr = 0 + ELSE IF(hdferr.EQ.0)THEN + committed = .FALSE. + hdferr = 0 + ELSE + hdferr = -1 + ENDIF + + END SUBROUTINE h5tcommitted_f + +! +!****s* H5T/H5Tdecode_f +! +! NAME +! H5Tdecode_f +! +! PURPOSE +! Decode a binary object description of data type and return a new object handle. +! INPUTS +! buf - Buffer for the data space object to be decoded. +! obj_id - Object ID +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tdecode_c(buf, obj_id) BIND(C,NAME='h5tdecode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5tdecode_c + END INTERFACE + + hdferr = h5tdecode_c(buf, obj_id) + + END SUBROUTINE h5tdecode_f + +! +!****s* H5T/H5Tencode_f +! +! NAME +! H5Tencode_f +! +! PURPOSE +! Encode a data type object description into a binary buffer. +! +! INPUTS +! obj_id - Identifier of the object to be encoded. +! buf - Buffer for the object to be encoded into. +! nalloc - The size of the allocated buffer. +! OUTPUTS +! nalloc - The size of the buffer needed. +! hdferr - Returns 0 if successful and -1 if fails. +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5tencode_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5tencode_c + END INTERFACE + + hdferr = h5tencode_c(buf, obj_id, nalloc) + + END SUBROUTINE h5tencode_f + +! +!****s* H5T/h5tget_create_plist_f +! +! NAME +! h5tget_create_plist_f +! +! PURPOSE +! Returns a copy of a datatype creation property list. +! +! INPUTS +! dtype_id - Datatype identifier +! OUTPUTS +! dtpl_id - Datatype property list identifier +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! +! SOURCE + SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) BIND(C,NAME='h5tget_create_plist_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + END FUNCTION h5tget_create_plist_c + END INTERFACE + + hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) + END SUBROUTINE h5tget_create_plist_f + +! +!****s* H5T/h5tcompiler_conv_f +! +! NAME +! h5tcompiler_conv_f +! +! PURPOSE +! Check whether the library’s default conversion is hard conversion.R +! +! INPUTS +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! OUTPUTS +! flag - TRUE for compiler conversion, FALSE for library conversion +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! April 9, 2008 +! SOURCE + SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) BIND(C,NAME='h5tcompiler_conv_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER :: c_flag + END FUNCTION h5tcompiler_conv_c + END INTERFACE + + hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) + + flag = .FALSE. + IF(c_flag .GT. 0) flag = .TRUE. + + END SUBROUTINE h5tcompiler_conv_f + +! +!****s* H5T/h5tget_native_type_f +! +! NAME +! h5tget_native_type_f +! +! PURPOSE +! Returns the native datatype of a specified datatype. +! +! INPUTS +! dtype_id - Datatype identifier for the dataset datatype. +! +! direction - Direction of search: +! H5T_DIR_DEFAULT, default direction is inscendent, +! H5T_DIR_ASCEND , in inscendent order, +! H5T_DIR_DESCEND, in descendent order. +! +! * NOTE: In C it is defined as a structure: H5T_direction_t +! +! OUTPUTS +! native_dtype_id - The native datatype identifier for the specified dataset datatype +! hdferr - Returns 0 if successful and -1 if fails +! AUTHOR +! M. Scot Breitenfeld +! June 18, 2008 +! SOURCE + SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) BIND(C,NAME='h5tget_native_type_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + END FUNCTION h5tget_native_type_c + END INTERFACE + + hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) + END SUBROUTINE h5tget_native_type_f + +!****s* H5T/H5Tconvert_f_F03 +! +! NAME +! H5Tconvert_f +! +! PURPOSE +! Converts data from between specified datatypes. +! +! Inputs: +! src_id - Identifier for the source datatype. +! dst_id - Identifier for the destination datatype. +! nelmts - Size of array buf. +! buf - Array containing pre-conversion values. +! background - Optional background buffer. +! plist_id - Dataset transfer property list identifier. +! +! Outputs: +! buf - Array containing post-conversion values. +! hdferr - error code: +! 0 on success and -1 on failure +! AUTHOR +! M. Scot Breitenfeld +! Decemember 8, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id +!***** + INTEGER(HID_T) :: plist_id_default + TYPE(C_PTR) :: background_default + + INTERFACE + INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & + BIND(C, NAME='h5tconvert_c') + IMPORT :: c_ptr + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , VALUE :: buf + TYPE(C_PTR) , VALUE :: background + INTEGER(HID_T) , INTENT(IN) :: plist_id + END FUNCTION h5tconvert_c + END INTERFACE + + plist_id_default = H5P_DEFAULT_F + IF(PRESENT(plist_id)) plist_id_default = plist_id + + background_default = C_NULL_PTR + IF(PRESENT(background)) background_default = background + + hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) + + END SUBROUTINE h5tconvert_f +! +!****s* H5T/h5tenum_insert_f90 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) BIND(C,NAME='h5tenum_insert_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* H5T/h5tenum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 + +END MODULE H5T diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 deleted file mode 100644 index 4b4c0b6..0000000 --- a/fortran/src/H5Tff.f90 +++ /dev/null @@ -1,3105 +0,0 @@ -!****h* ROBODoc/H5T -! -! NAME -! MODULE H5T -! -! PURPOSE -! This file contains Fortran interfaces for H5T functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5T - - USE H5GLOBAL - -CONTAINS - -! -!****s* H5T/h5topen_f -! -! NAME -! h5topen_f -! -! PURPOSE -! Opens named datatype. -! -! INPUTS -! loc_id - location identifier -! name - a datatype name -! OUTPUTS -! type_id - datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tapl_id - datatype access property list identifier. -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! Added optional parameter 'tapl_id' for compatability -! with H5Topen2. April 9, 2009. -! -! SOURCE - SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group - INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5topen_c - END INTERFACE - - namelen = LEN(name) - - tapl_id_default = H5P_DEFAULT_F - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - END SUBROUTINE h5topen_f -! -!****s* H5T/h5tcommit_f -! -! NAME -! h5tcommit_f -! -! PURPOSE -! Commits a transient datatype to a file, creating a -! new named datatype. -! -! INPUTS -! loc_id - location identifier -! name - name of the datatype to be stored -! at the specified location -! type_id - identifier of a datatype to be stored -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list -! tcpl_id - Datatype creation property list -! tapl_id - Datatype access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! - Added optional parameters introduced in version 1.8 -! M. Scot Breitenfeld -! -! SOURCE - SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & - lcpl_id, tcpl_id, tapl_id ) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name - ! Datatype name within file or group - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list -!***** - - INTEGER :: namelen ! Name length - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF (PRESENT(tapl_id)) tapl_id_default = tapl_id - - namelen = LEN(name) - - hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_f -! -!****s* H5T/h5tcopy_f -! -! NAME -! h5tcopy_f -! -! PURPOSE -! Creates a copy of exisiting datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! new_type_id - identifier of datatype's copy -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: new_type_id - ! Identifier of datatype's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tcopy_c - END INTERFACE - - hdferr = h5tcopy_c(type_id, new_type_id) - END SUBROUTINE h5tcopy_f -! -!****s* H5T/h5tequal_f -! -! NAME -! h5tequal_f -! -! PURPOSE -! Determines whether two datatype identifiers refer -! to the same datatype. -! -! INPUTS -! type1_id - datatype identifier -! type2_id - datatype identifier -! OUTPUTS -! flag - TRUE/FALSE flag to indicate -! if two datatypes are equal -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two - ! datatypes are equal - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_flag - INTERFACE - INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - INTEGER :: c_flag - END FUNCTION h5tequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5tequal_c(type1_id, type2_id, c_flag) - if(c_flag .gt. 0) flag = .TRUE. - END SUBROUTINE h5tequal_f -! -!****s* H5T/h5tclose_f -! -! NAME -! h5tclose_f -! -! PURPOSE -! Releases a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tclose_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tclose_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tclose_c - END INTERFACE - - hdferr = h5tclose_c(type_id) - END SUBROUTINE h5tclose_f -! -!****s* H5T/h5tget_class_f -! -! NAME -! h5tget_class_f -! -! PURPOSE -! Returns the datatype class identifier. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! class - Class, possible values are: -! H5T_NO_CLASS_F (-1) -! H5T_INTEGER_F (0) -! H5T_FLOAT_F (1) -! H5T_TIME_F (2) -! H5T_STRING_F (3) -! H5T_BITFIELD_F (4) -! H5T_OPAQUE_F (5) -! H5T_COMPOUND_F (6) -! H5T_REFERENCE_F (7) -! H5T_ENUM_F (8) -! H5T_VLEN_F (9) -! H5T_ARRAY_F (10) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_class_f(type_id, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - INTEGER, INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tget_class_c(type_id, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_class_c - END INTERFACE - - hdferr = h5tget_class_c(type_id, class) - END SUBROUTINE h5tget_class_f -! -!****s* H5T/h5tget_size_f -! -! NAME -! h5tget_size_f -! -! PURPOSE -! Returns the size of a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! size - datatype size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5tget_size_c - END INTERFACE - - hdferr = h5tget_size_c(type_id, size) - END SUBROUTINE h5tget_size_f - -! -!****s* H5T/h5tset_size_f -! -! NAME -! h5tset_size_f -! -! PURPOSE -! Sets the total size for an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! size - size of the datatype -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! -! SOURCE - SUBROUTINE h5tset_size_f(type_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5tset_size_c - END INTERFACE - - hdferr = h5tset_size_c(type_id, size) - END SUBROUTINE h5tset_size_f - -! -!****s* H5T/h5tget_order_f -! -! NAME -! h5tget_order_f -! -! PURPOSE -! Returns the byte order of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! order - byte order for the datatype, possible -! values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: order - ! Datatype byte order, possible values are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: order - END FUNCTION h5tget_order_c - END INTERFACE - - hdferr = h5tget_order_c(type_id, order) - END SUBROUTINE h5tget_order_f -! -!****s* H5T/h5tset_order_f -! -! NAME -! h5tset_order_f -! -! PURPOSE -! Sets the byte ordering of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! order - datatype byte order Possible values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values - ! are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: order - END FUNCTION h5tset_order_c - END INTERFACE - - hdferr = h5tset_order_c(type_id, order) - END SUBROUTINE h5tset_order_f - -! -!****s* H5T/h5tget_precision_f -! -! NAME -! h5tget_precision_f -! -! PURPOSE -! Returns the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! precision - precision of the datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision - END FUNCTION h5tget_precision_c - END INTERFACE - - hdferr = h5tget_precision_c(type_id, precision) - END SUBROUTINE h5tget_precision_f - -! -!****s* H5T/h5tset_precision_f -! -! NAME -! h5tset_precision_f -! -! PURPOSE -! Sets the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! precision - datatype precision -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: precision - END FUNCTION h5tset_precision_c - END INTERFACE - - hdferr = h5tset_precision_c(type_id, precision) - END SUBROUTINE h5tset_precision_f - -! -!****s* H5T/h5tget_offset_f -! -! NAME -! h5tget_offset_f -! -! PURPOSE -! Retrieves the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! offset - offset value -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_offset_c - END INTERFACE - - hdferr = h5tget_offset_c(type_id, offset) - END SUBROUTINE h5tget_offset_f - -! -!****s* H5T/h5tset_offset_f -! -! NAME -! h5tset_offset_f -! -! PURPOSE -! Sets the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! offset - offset value -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - END FUNCTION h5tset_offset_c - END INTERFACE - - hdferr = h5tset_offset_c(type_id, offset) - END SUBROUTINE h5tset_offset_f - -! -!****s* H5T/h5tget_pad_f -! -! NAME -! h5tget_pad_f -! -! PURPOSE -! Retrieves the padding type of the least and -! most -significant bit padding. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! hdferr - Returns 0 if successful and -1 if fails - -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(OUT) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - END FUNCTION h5tget_pad_c - END INTERFACE - - hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tget_pad_f - -! -!****s* H5T/h5tset_pad_f -! -! NAME -! h5tset_pad_f -! -! PURPOSE -! Sets the least and most-significant bits padding types. -! -! INPUTS -! type_id - datatype identifier -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(IN) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T_PAD_ZERO_F = 0 - ! H5T_PAD_ONE_F = 1 - ! H5T_PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: type_id - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - END FUNCTION h5tset_pad_c - END INTERFACE - - hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) - END SUBROUTINE h5tset_pad_f - -! -!****s* H5T/h5tget_sign_f -! -! NAME -! h5tget_sign_f -! -! PURPOSE -! Retrieves the sign type for an integer type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: sign ! sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - END FUNCTION h5tget_sign_c - END INTERFACE - - hdferr = h5tget_sign_c(type_id, sign) - END SUBROUTINE h5tget_sign_f - -! -!****s* H5T/h5tset_sign_f -! -! NAME -! h5tset_sign_f -! -! PURPOSE -! Sets the sign proprety for an integer type. -! -! INPUTS -! type_id - datatype identifier -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: sign !sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - END FUNCTION h5tset_sign_c - END INTERFACE - - hdferr = h5tset_sign_c(type_id, sign) - END SUBROUTINE h5tset_sign_f - -! -!****s* H5T/h5tget_fields_f -! -! NAME -! h5tget_fields_f -! -! PURPOSE -! Retrieves floating point datatype bit field information. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - END FUNCTION h5tget_fields_c - END INTERFACE - - hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tget_fields_f - -! -!****s* H5T/h5tset_fields_f -! -! NAME -! h5tset_fields_f -! -! PURPOSE -! Sets locations and sizes of floating point bit fields. -! -! INPUTS -! type_id - datatype identifier -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - END FUNCTION h5tset_fields_c - END INTERFACE - - hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - END SUBROUTINE h5tset_fields_f - -! -!****s* H5T/h5tget_ebias_f -! -! NAME -! h5tget_ebias_f -! -! PURPOSE -! Retrieves the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! ebias - datatype exponent bias -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - END FUNCTION h5tget_ebias_c - END INTERFACE - - hdferr = h5tget_ebias_c(type_id, ebias) - END SUBROUTINE h5tget_ebias_f - -! -!****s* H5T/h5tset_ebias_f -! -! NAME -! h5tset_ebias_f -! -! PURPOSE -! Sets the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! ebias - datatype exponent bias -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - END FUNCTION h5tset_ebias_c - END INTERFACE - - hdferr = h5tset_ebias_c(type_id, ebias) - END SUBROUTINE h5tset_ebias_f - -! -!****s* H5T/h5tget_norm_f -! -! NAME -! h5tget_norm_f -! -! PURPOSE -! Retrieves mantissa normalization of a floating-point -! datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - END FUNCTION h5tget_norm_c - END INTERFACE - - hdferr = h5tget_norm_c(type_id, norm) - END SUBROUTINE h5tget_norm_f - -! -!****s* H5T/h5tset_norm_f -! -! NAME -! h5tset_norm_f -! -! PURPOSE -! Sets the mantissa normalization of a floating-point datatype. -! -! INPUTS -! type_id - datatype identifier -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - END FUNCTION h5tset_norm_c - END INTERFACE - - hdferr = h5tset_norm_c(type_id, norm) - END SUBROUTINE h5tset_norm_f - -! -!****s* H5T/h5tget_inpad_f -! -! NAME -! h5tget_inpad_f -! -! PURPOSE -! Retrieves the internal padding type for unused bits -! in floating-point datatypes. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - END FUNCTION h5tget_inpad_c - END INTERFACE - - hdferr = h5tget_inpad_c(type_id, padtype) - END SUBROUTINE h5tget_inpad_f - -! -!****s* H5T/h5tset_inpad_f -! -! NAME -! h5tset_inpad_f -! -! PURPOSE -! Fills unused internal floating point bits. -! -! INPUTS -! type_id - datatype identifier -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - END FUNCTION h5tset_inpad_c - END INTERFACE - - hdferr = h5tset_inpad_c(type_id, padtype) - END SUBROUTINE h5tset_inpad_f - -! -!****s* H5T/h5tget_cset_f -! -! NAME -! h5tget_cset_f -! -! PURPOSE -! Retrieves the character set type of a string datatype. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! cset - Character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F = 0 -! H5T_CSET_UTF8_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype - ! Possible values are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - END FUNCTION h5tget_cset_c - END INTERFACE - - hdferr = h5tget_cset_c(type_id, cset) - END SUBROUTINE h5tget_cset_f - -! -!****s* H5T/h5tset_cset_f -! -! NAME -! h5tset_cset_f -! -! PURPOSE -! Sets character set to be used. -! -! INPUTS -! type_id - datatype identifier -! cset - character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F = 0 -! H5T_CSET_UTF8_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: cset !character set type of a string datatype - ! Possible values of padding type are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - END FUNCTION h5tset_cset_c - END INTERFACE - - hdferr = h5tset_cset_c(type_id, cset) - END SUBROUTINE h5tset_cset_f - -! -!****s* H5T/h5tget_strpad_f -! -! NAME -! h5tget_strpad_f -! -! PURPOSE -! Retrieves the storage mechanism for a string datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: strpad - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - END FUNCTION h5tget_strpad_c - END INTERFACE - - hdferr = h5tget_strpad_c(type_id, strpad) - END SUBROUTINE h5tget_strpad_f - -! -!****s* H5T/h5tset_strpad_f -! -! NAME -! h5tset_strpad_f -! -! PURPOSE -! Defines the storage mechanism for character strings. -! -! INPUTS -! type_id - datatype identifier -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - END FUNCTION h5tset_strpad_c - END INTERFACE - - hdferr = h5tset_strpad_c(type_id, strpad) - END SUBROUTINE h5tset_strpad_f - -! -!****s* H5T/h5tget_nmembers_f -! -! NAME -! h5tget_nmembers_f -! -! PURPOSE -! Retrieves the number of fields in a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! num_members - number of members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - END FUNCTION h5tget_nmembers_c - END INTERFACE - - hdferr = h5tget_nmembers_c(type_id, num_members) - END SUBROUTINE h5tget_nmembers_f - -! -!****s* H5T/h5tget_member_name_f -! -! NAME -! h5tget_member_name_f -! -! PURPOSE -! Retrieves the name of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! index - filed index (0-based) -! OUTPUTS -! member_name - buffer to hold member's name -! namelen - name length -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve - CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of - !a compound datatype - INTEGER, INTENT(OUT) :: namelen ! Length of the name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: member_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(LEN=*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) - END SUBROUTINE h5tget_member_name_f - -! -!****s* H5T/h5tget_member_offset_f -! -! NAME -! h5tget_member_offset_f -! -! PURPOSE -! Retrieves the offset of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the field -! OUTPUTS -! offset - byte offset of the requested field -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the field - !whose offset is requested - INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_member_offset_c - END INTERFACE - - hdferr = h5tget_member_offset_c(type_id, member_no, offset ) - END SUBROUTINE h5tget_member_offset_f -! -!****s* H5T/h5tget_member_index_f -! -! NAME -! h5tget_member_index_f -! -! PURPOSE -! Retrieves the index of a compound or enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! name - name of the field or member whose index to -! to be retrieved from the datatype. -! OUTPUTS -! index - 0-based index of the filed or member (0 to N-1) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! SOURCE - SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name - INTEGER, INTENT(OUT) :: index ! Field or member index - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index - END FUNCTION h5tget_member_index_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tget_member_index_c(type_id, name, namelen, index) - END SUBROUTINE h5tget_member_index_f - - -! !$! -! !$!****s* H5T/h5tget_member_dim_f -! !$! -! !$! NAME -! !$! h5tget_member_dim_f -! !$! -! !$! PURPOSE -! !$! This function is not supported in hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! -! !$! SOURCE -! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) -! !$! -! !$! IMPLICIT NONE -! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier -! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of -! !$! !field_dims, perm) -! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field -! !$! -! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the -! !$! !dimensions of the field -! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the -! !$! !permutation vector of the field -! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !$!*****! -! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c -! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) -! !$! -! !$! END SUBROUTINE h5tget_member_dims_f - - -!****s* H5T/h5tget_array_dims_f -! -! NAME -! h5tget_array_dims_f -! -! PURPOSE -! Returns sizes of array dimensions. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! dims - buffer to store array datatype dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype - ! dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5tget_array_dims_c - END INTERFACE - - hdferr = h5tget_array_dims_c(type_id, dims) - - END SUBROUTINE h5tget_array_dims_f - -! -!****s* H5T/h5tget_array_ndims_f -! -! NAME -! h5tget_array_ndims_f -! -! PURPOSE -! Returns the rank of an array datatype. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! ndims - number of array dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER, INTENT(OUT) :: ndims ! number of array dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - END FUNCTION h5tget_array_ndims_c - END INTERFACE - - hdferr = h5tget_array_ndims_c(type_id, ndims) - - END SUBROUTINE h5tget_array_ndims_f - -! -!****s* H5T/h5tget_super_f -! -! NAME -! h5tget_super_f -! -! PURPOSE -! Returns the base datatype from which a datatype is derived. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! base_type_id - identifier of the base type -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype - ! from which datatype (type_id) was derived - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - END FUNCTION h5tget_super_c - END INTERFACE - - hdferr = h5tget_super_c(type_id, base_type_id) - - END SUBROUTINE h5tget_super_f - -! -!****s* H5T/h5tget_member_type_f -! -! NAME -! h5tget_member_type_f -! -! PURPOSE -! Returns the datatype of the specified member. -! -! INPUTS -! type_id - compound datatype identifier -! field_idx - field index (0-based) -! -! OUTPUTS -! datatype - idnetifier of the member's datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve - INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of - !the datatype of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - END FUNCTION h5tget_member_type_c - END INTERFACE - - hdferr = h5tget_member_type_c(type_id, field_idx , datatype) - END SUBROUTINE h5tget_member_type_f - -! -!****s* H5T/h5tcreate_f -! -! NAME -! h5tcreate_f -! -! PURPOSE -! Creates a new datatype. -! -! INPUTS -! class - Datatype class can be one of: -! H5T_COMPOUND_F -! H5T_ENUM_F -! H5T_OPAQUE_F -! H5T_STRING_F -! -! size - Size of the datatype. -! OUTPUTS -! type_id - Datatype identifier. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) - IMPLICIT NONE - INTEGER , INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T) , INTENT(OUT) :: type_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5tcreate_c(class, size, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tcreate_c - END INTERFACE - - hdferr = h5tcreate_c(class, size, type_id) - END SUBROUTINE h5tcreate_f - -! -!****s* H5T/h5tinsert_f -! -! NAME -! h5tinsert_f -! -! PURPOSE -! Adds a new member to a compound datatype. -! -! INPUTS -! type_id - compound dattype identifier -! name - name of the field to insert -! offset - start of the member in an instance of -! the compound datatype -! field_id - datatype identifier of the field to insert -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert - INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of - !the compound datatype - INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER :: namelen - END FUNCTION h5tinsert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) - END SUBROUTINE h5tinsert_f - -! -!****s* H5T/h5tpack_f -! -! NAME -! h5tpack_f -! -! PURPOSE -! Recursively removes padding from within a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tpack_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tpack_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tpack_c - END INTERFACE - - hdferr = h5tpack_c(type_id) - END SUBROUTINE h5tpack_f - -! !$! -! !$!****s* H5T/h5tinsert_array_f -! !$! -! !$! NAME -! !$! h5tinsert_array_f -! !$! -! !$! PURPOSE -! !$! This function is not available on hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! SOURCE -! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype -! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member -! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member -! !within compound datatype -! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. -! !Valid values are 0 (zero) through 4 (four) -! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array -! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !*****! -! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm -! !Pointer to buffer to store -! !the permutation vector of the field -! INTEGER :: namelen, sizeofperm -! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 -! namelen = LEN(name) -! if (present(perm)) then -! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) -! else -! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) -! end if -! -! END SUBROUTINE h5tinsert_array_f - -! -!****s* H5T/h5tarray_create_f -! -! NAME -! h5tarray_create_f -! -! PURPOSE -! Creates an array datatype object. -! -! INPUTS -! base_id - datatype identifier for the array -! base datatype -! rank - rank of the array -! dims - array dimension sizes -! OUTPUTS -! type_id - array datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype - INTEGER, INTENT(IN) :: rank ! Rank of the array - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension - INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tarray_create_c - END INTERFACE - - hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - - END SUBROUTINE h5tarray_create_f - -! -!****s* H5T/h5tenum_create_f -! -! NAME -! h5tenum_create_f -! -! PURPOSE -! Creates a new enumeration datatype. -! -! INPUTS -! parent_id - datatype identifier for base datatype -! OUTPUTS -! new_type_id - datatype identifier for the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for - ! the base datatype - INTEGER(HID_T), INTENT(OUT) :: new_type_id - !datatype identifier for the - ! new enumeration datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tenum_create_c - END INTERFACE - - hdferr = h5tenum_create_c(parent_id, new_type_id) - END SUBROUTINE h5tenum_create_f -! -!****s* H5T/h5tenum_nameof_f -! -! NAME -! h5tenum_nameof_f -! -! PURPOSE -! Returns the symbol name corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! value - value of the enumeration datatype -! namelen - name buffer size -! OUTPUTS -! name - buffer to hold symbol name -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! NOTE -! According to the standard: Because an INTENT(OUT) variable is considered undefined -! on entry to the procedure, any default initialization specified for its type will -! be applied. So we need to blank out the "name" to be portable and eliminate any -! characters the "name' may contain upon entry, depending on compiler implementation. -! SOURCE - SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. - INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name - INTEGER, INTENT(IN) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - END FUNCTION h5tenum_nameof_c - END INTERFACE - - name(1:LEN(name)) = ' ' - - hdferr = h5tenum_nameof_c(type_id, value, name, namelen) - END SUBROUTINE h5tenum_nameof_f - -! -!****s* H5T/h5tenum_valuof_f -! -! NAME -! h5tenum_valuof_f -! -! PURPOSE -! Returns the value corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! name - symbol name -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE - SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tenum_valueof_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_valueof_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_valueof_f - -! -!****s* H5T/h5tget_member_value_f -! -! NAME -! h5tget_member_value_f -! -! PURPOSE -! Returns the value of an enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the enumeration datatype member -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - END FUNCTION - END INTERFACE - - hdferr = h5tget_member_value_c(type_id, member_no, value) - END SUBROUTINE h5tget_member_value_f - -! -!****s* H5T/h5tset_tag_f -! -! NAME -! h5tset_tag_f -! -! PURPOSE -! Tags an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! tag - unique ASCII string with which the opaque -! datatype is to be tagged. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which - !the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: taglen - - INTERFACE - INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: tag - INTEGER :: taglen - END FUNCTION h5tset_tag_c - END INTERFACE - - taglen = LEN(tag) - hdferr = h5tset_tag_c(type_id, tag, taglen) - END SUBROUTINE h5tset_tag_f - -! -!****s* H5T/h5tget_tag_f -! -! NAME -! h5tget_tag_f -! -! PURPOSE -! Gets the tag associated with an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! OUTPUTS -! tag - unique ASCII string associated with opaque -! datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which - ! the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: taglen ! Length of tag - INTEGER(SIZE_T) :: tag_size ! Declared character length of tab - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER(SIZE_T), INTENT(IN) :: tag_size - INTEGER, INTENT(OUT) :: taglen - END FUNCTION h5tget_tag_c - END INTERFACE - - tag_size = LEN(tag) - - hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) - END SUBROUTINE h5tget_tag_f - -! -!****s* H5T/h5tvlen_create_f -! -! NAME -! h5tvlen_create_f -! -! PURPOSE -! Creates a new variable-length datatype. -! -! INPUTS -! type_id - identifier iof base datatype -! OUTPUTS -! vltype_id - identifier for VL datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! Wednesday, October 23, 2002 -! -! NOTES -! Only basic Fortran base datatypes are supported -! -! SOURCE - SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - END FUNCTION h5tvlen_create_c - END INTERFACE - - hdferr = h5tvlen_create_c(type_id, vltype_id) - END SUBROUTINE h5tvlen_create_f - -! -!****s* H5T/h5tis_variable_str_f -! -! NAME -! h5tis_variable_str_f -! -! PURPOSE -! Determines whether a dattype is a variable string. -! -! INPUTS -! type_id - datartpe identifier -! OUTPUTS -! status - flag to indicate if datatype -! is a variable string -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype - ! is a variable string or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: flag - END FUNCTION h5tis_variable_str_c - END INTERFACE - - hdferr = h5tis_variable_str_c(type_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5tis_variable_str_f - -! -!****s* H5T/h5tget_member_class_f -! -! NAME -! h5tget_member_class_f -! -! PURPOSE -! Returns datatype class of compound datatype member. -! -! INPUTS -! type_id - datartpe identifier -! member_no - index of compound datatype member -! OUTPUTS -! class - class type for compound dadtype member -! Valid classes: -! H5T_NO_CLASS_F (error) -! H5T_INTEGER_F -! H5T_FLOAT_F -! H5T_TIME_F -! H5T_STRING_F -! H5T_BITFIELD_F -! H5T_OPAQUE_F -! H5T_COMPOUND_F -! H5T_REFERENCE_F -! H5T_ENUM_F -! H5T_VLEN_F -! H5T_ARRAY_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! April 6, 2005 -! -! SOURCE - SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no ! Member number - INTEGER, INTENT(OUT) :: class ! Member class - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_member_class_c - END INTERFACE - - hdferr = h5tget_member_class_c(type_id, member_no, class) - - END SUBROUTINE h5tget_member_class_f - -! -!****s* H5T/h5tcommit_anon_f -! -! NAME -! h5tcommit_anon_f -! -! PURPOSE -! Commits a transient datatype to a file, -! creating a new named datatype, -! but does not link it into the file structure. -! -! INPUTS -! loc_id - A file or group identifier specifying the file -! in which the new named datatype is to be created. -! dtype_id - A datatype identifier. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tcpl_id - A datatype creation property list identifier. -! (H5P_DEFAULT_F for the default property list.) -! tapl_id - A datatype access property list identifier. -! should always be passed as the value H5P_DEFAULT_F. -! -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying - ! the file in which the new named datatype - ! is to be created. - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property - ! list identifier. - ! (H5P_DEFAULT_F for the default property list.) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. - ! should always be passed as the value H5P_DEFAULT_F. -!***** - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_anon_c - END INTERFACE - - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default ) - - END SUBROUTINE h5tcommit_anon_f - -! -!****s* H5T/h5tcommitted_f -! -! NAME -! h5tcommitted_f -! -! PURPOSE -! Determines whether a datatype is a named type or a transient type. -! -! INPUTS -! dtype_id - A datatype identifier. -! -! OUTPUTS -! committed - .TRUE., if the datatype has been committed -! .FALSE., if the datatype has not been committed. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE - SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier - LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed - !.FALSE., if the datatype has not been committed. - INTEGER, INTENT(OUT) :: hdferr ! Error code: -! Success: 0 -! Failure: -1 -!***** - INTERFACE - INTEGER FUNCTION h5tcommitted_c(dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - END FUNCTION h5tcommitted_c - END INTERFACE - - hdferr = h5tcommitted_c(dtype_id) - - IF(hdferr.GT.0)THEN - committed = .TRUE. - hdferr = 0 - ELSE IF(hdferr.EQ.0)THEN - committed = .FALSE. - hdferr = 0 - ELSE - hdferr = -1 - ENDIF - - - END SUBROUTINE h5tcommitted_f - -! -!****s* H5T/H5Tdecode_f -! -! NAME -! H5Tdecode_f -! -! PURPOSE -! Decode a binary object description of data type and return a new object handle. -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5tdecode_c - END INTERFACE - - hdferr = h5tdecode_c(buf, obj_id) - - END SUBROUTINE h5tdecode_f - -! -!****s* H5T/H5Tencode_f -! -! NAME -! H5Tencode_f -! -! PURPOSE -! Encode a data type object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5tencode_c - END INTERFACE - - hdferr = h5tencode_c(buf, obj_id, nalloc) - - END SUBROUTINE h5tencode_f - -! -!****s* H5T/h5tget_create_plist_f -! -! NAME -! h5tget_create_plist_f -! -! PURPOSE -! Returns a copy of a datatype creation property list. -! -! INPUTS -! dtype_id - Datatype identifier -! OUTPUTS -! dtpl_id - Datatype property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE - SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T), INTENT(OUT) :: dtpl_id - END FUNCTION h5tget_create_plist_c - END INTERFACE - - hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) - END SUBROUTINE h5tget_create_plist_f - -! -!****s* H5T/h5tcompiler_conv_f -! -! NAME -! h5tcompiler_conv_f -! -! PURPOSE -! Check whether the library’s default conversion is hard conversion.R -! -! INPUTS -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! OUTPUTS -! flag - TRUE for compiler conversion, FALSE for library conversion -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. - INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. - LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: src_id - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER :: c_flag - END FUNCTION h5tcompiler_conv_c - END INTERFACE - - hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) - - flag = .FALSE. - IF(c_flag .GT. 0) flag = .TRUE. - - END SUBROUTINE h5tcompiler_conv_f - -! -!****s* H5T/h5tget_native_type_f -! -! NAME -! h5tget_native_type_f -! -! PURPOSE -! Returns the native datatype of a specified datatype. -! -! INPUTS -! dtype_id - Datatype identifier for the dataset datatype. -! -! direction - Direction of search: -! H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ -! H5T_DIR_ASCEND = 1, /*in inscendent order */ -! H5T_DIR_DESCEND = 2 /*in descendent order */ -! * NOTE: In C it is defined as a structure: H5T_direction_t -! -! OUTPUTS -! native_dtype_id - The native datatype identifier for the specified dataset datatype -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! June 18, 2008 -! SOURCE - SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(IN) :: direction ! Direction of search: - ! H5T_DIR_ASCEND_F = 1 in inscendent order - ! H5T_DIR_DESCEND_F = 2 in descendent order - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id - END FUNCTION h5tget_native_type_c - END INTERFACE - - hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) - END SUBROUTINE h5tget_native_type_f - -END MODULE H5T diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90 deleted file mode 100644 index 2c9f212..0000000 --- a/fortran/src/H5Tff_F03.f90 +++ /dev/null @@ -1,223 +0,0 @@ -!****h* ROBODoc/H5T (F03) -! -! NAME -! H5T_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 and Fortran 2003 interfaces for H5T functions. -! It contains the same functions as H5Tff_F90.f90 but includes the -! Fortran 2003 functions and the interface listings. This file will be compiled -! instead of H5Tff_F90.f90 if Fortran 2003 functions are enabled. -! -! 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 H5T_PROVISIONAL - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -!****t* H5T (F03)/hvl_t -! Fortran2003 Derived Type: - TYPE hvl_t - INTEGER(size_t) :: len ! Length of VL data (in base type units) - TYPE(C_PTR) :: p ! Pointer to VL data - END TYPE hvl_t - -!***** - - INTERFACE h5tenum_insert_f - MODULE PROCEDURE h5tenum_insert_f03 - MODULE PROCEDURE h5tenum_insert_f90 - END INTERFACE - -CONTAINS - -!****s* H5T (F03)/H5Tconvert_f_F03 -! -! NAME -! H5Tconvert_f -! -! PURPOSE -! Converts data from between specified datatypes. -! -! Inputs: -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! nelmts - Size of array buf. -! buf - Array containing pre-conversion values. -! background - Optional background buffer. -! plist_id - Dataset transfer property list identifier. -! -! Outputs: -! buf - Array containing post-conversion values. -! hdferr - error code: -! 0 on success and -1 on failure -! AUTHOR -! M. Scot Breitenfeld -! Decemember 8, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr - TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id -!***** - INTEGER(HID_T) :: plist_id_default - TYPE(C_PTR) :: background_default - - INTERFACE - INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & - BIND(C, NAME='h5tconvert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , VALUE :: buf - TYPE(C_PTR) , VALUE :: background - INTEGER(HID_T) , INTENT(IN) :: plist_id - END FUNCTION h5tconvert_c - END INTERFACE - - plist_id_default = H5P_DEFAULT_F - IF(PRESENT(plist_id)) plist_id_default = plist_id - - background_default = C_NULL_PTR - IF(PRESENT(background)) background_default = background - - hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) - - END SUBROUTINE h5tconvert_f -! -!****s* (F03) H5T/h5tenum_insert_f90 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value ! value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* (F03) H5T/h5tenum_insert_f03 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Pointer to the value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 6, 2015 -! -! HISTORY -! F2003 implementation of function -! SOURCE - SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & - BIND(C, NAME='h5tenum_insert_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 - -END MODULE H5T_PROVISIONAL - diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90 deleted file mode 100644 index 380fbec..0000000 --- a/fortran/src/H5Tff_F90.f90 +++ /dev/null @@ -1,95 +0,0 @@ -!****h* ROBODoc/H5T (F90) -! -! NAME -! MODULE H5T_PROVISIONAL -! -! PURPOSE -! This file contains Fortran 90 interfaces for H5T functions. It contains -! the same functions as H5Tff_F03.f90 but excludes the Fortran 2003 functions -! and the interface listings. This file will be compiled instead of H5Tff_F03.f90 -! if Fortran 2003 functions are not enabled. -! -! NOTE -! Currently contains no 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! *** IMPORTANT *** -! If you add a new H5D 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 H5T_PROVISIONAL - - USE H5GLOBAL - -CONTAINS - -! -!****s* H5T/h5tenum_insert_f -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER, INTENT(OUT) :: hdferr -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f - -END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index 169e018..a8cf1c2 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -1,6 +1,6 @@ /****h* H5Zf/H5Zf * PURPOSE - * This file contains C stubs for H5Z Fortran APIs + * This file contains C stubs for H5Z Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -25,22 +25,22 @@ /****if* H5Zf/h5zunregister_c * NAME - * h5zunregister_c + * h5zunregister_c * PURPOSE - * Call H5Zunregister to unregister filter + * Call H5Zunregister to unregister filter * INPUTS - * filter identifier + * filter identifier * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -nh5zunregister_c (int_f *filter) +h5zunregister_c (int_f *filter) /******/ { int ret_value = -1; @@ -58,25 +58,25 @@ nh5zunregister_c (int_f *filter) } /****if* H5Zf/h5zfiletr_avail_c * NAME - * h5zfiletr_avail_c + * h5zfiletr_avail_c * PURPOSE - * Call H5Zfilter_avail to find if filter is available + * Call H5Zfilter_avail to find if filter is available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Wednesday, March 12, 2003 + * Wednesday, March 12, 2003 * HISTORY * * SOURCE */ int_f -nh5zfilter_avail_c ( int_f *filter , int_f *flag ) +h5zfilter_avail_c ( int_f *filter , int_f *flag ) /******/ { int ret_value = 0; @@ -92,26 +92,26 @@ nh5zfilter_avail_c ( int_f *filter , int_f *flag ) /****if* H5Zf/h5zget_filter_info_c * NAME - * h5zget_filter_info_c + * h5zget_filter_info_c * PURPOSE - * Call H5Zget_filter_info to find if filter has its encoder - * and/or its decoder available + * Call H5Zget_filter_info to find if filter has its encoder + * and/or its decoder available * INPUTS - * filter - filter identifier + * filter - filter identifier * OUTPUTS - * flag - status flag + * flag - status flag * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Nat Furrer and James Laird - * Wednesday, June 16, 2004 + * Wednesday, June 16, 2004 * HISTORY * * SOURCE */ int_f -nh5zget_filter_info_c ( int_f *filter , int_f *flag ) +h5zget_filter_info_c ( int_f *filter , int_f *flag ) /******/ { int ret_value = 0; diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 new file mode 100644 index 0000000..0259959 --- /dev/null +++ b/fortran/src/H5Zff.F90 @@ -0,0 +1,189 @@ +!****h* ROBODoc/H5Z +! +! NAME +! MODULE H5Z +! +! PURPOSE +! This file contains Fortran interfaces for H5Z 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! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new H5Z 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 H5Z + + USE H5GLOBAL + +CONTAINS + +!****s* H5Z/h5zunregister_f +! +! NAME +! h5zunregister_f +! +! PURPOSE +! Unregisters specified filetr +! +! INPUTS +! filter - Filter; may have one of the following values: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! +! OUTPUTS +! hdferr - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zunregister_f(filter, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5zunregister_c(filter) BIND(C,NAME='h5zunregister_c') + INTEGER, INTENT(IN) :: filter + END FUNCTION h5zunregister_c + END INTERFACE + hdferr = h5zunregister_c(filter) + END SUBROUTINE h5zunregister_f + +!****s* H5Z/h5zfilter_avail_f +! NAME +! h5zfilter_avail_f +! +! PURPOSE +! Queries if filter is available +! +! INPUTS +! filter - Filter; may be one of the following: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_F +! OUTPUTS +! status - Flag; .TRUE. if filter is available, +! .FALSE. otherwise +! hdferr: - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) BIND(C,NAME='h5zfilter_avail_c') + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER :: flag + END FUNCTION h5zfilter_avail_c + END INTERFACE + + hdferr = h5zfilter_avail_c(filter, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + END SUBROUTINE h5zfilter_avail_f + +!****s* H5Z/h5zget_filter_info_f +! +! NAME +! h5zget_filter_info_f +! +! PURPOSE +! Queries if filter has its encoder and/or decoder +! available +! +! INPUTS +! filter - Filter; may be one of the following: +! H5Z_FILTER_DEFLATE_F +! H5Z_FILTER_SZIP_F +! H5Z_FILTER_NBIT_F +! H5Z_FILTER_SCALEOFFSET_F +! H5Z_FILTER_SHUFFLE_F +! H5Z_FILTER_FLETCHER32_Ffilter +! OUTPUTS +! config_flags - Flag, indicates if filter has its encoder +! and/or decoder available, possibly containing the +! following values: +! H5Z_FILTER_ENCODE_ENABLED_F +! H5Z_FILTER_DECODE_ENABLED_F +! hdferr: - Error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Nat Furrer and James Laird +! June 16, 2004 +! SOURCE + SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) BIND(C,NAME='h5zget_filter_info_c') + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + END FUNCTION h5zget_filter_info_c + END INTERFACE + + hdferr = h5zget_filter_info_c(filter, config_flags) + + END SUBROUTINE h5zget_filter_info_f + +END MODULE H5Z + + + + + diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 deleted file mode 100644 index 7b67b5b..0000000 --- a/fortran/src/H5Zff.f90 +++ /dev/null @@ -1,198 +0,0 @@ -!****h* ROBODoc/H5Z -! -! NAME -! MODULE H5Z -! -! PURPOSE -! This file contains Fortran interfaces for H5Z functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! 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 H5Z 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 H5Z - - USE H5GLOBAL - -CONTAINS - -!****s* H5Z/h5zunregister_f -! -! NAME -! h5zunregister_f -! -! PURPOSE -! Unregisters specified filetr -! -! INPUTS -! filter - filter; may have one of the following values: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zunregister_f(filter, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5zunregister_c (filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - END FUNCTION h5zunregister_c - END INTERFACE - hdferr = h5zunregister_c (filter) - END SUBROUTINE h5zunregister_f - -!****s* H5Z/h5zfilter_avail_f -! NAME -! h5zfilter_avail_f -! -! PURPOSE -! Queries if filter is available -! -! INPUTS -! filter - filter -! OUTPUTS -! status - status; .TRUE. if filter is available, -! .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter - ! is availble not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5zfilter_avail_c(filter, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER :: flag - END FUNCTION h5zfilter_avail_c - END INTERFACE - - hdferr = h5zfilter_avail_c(filter, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - END SUBROUTINE h5zfilter_avail_f -!****s* H5Z/h5zget_filter_info_f -! -! NAME -! h5zget_filter_info_f -! -! PURPOSE -! Queries if filter has its encoder and/or decoder -! available -! -! INPUTS -! filter - filter -! OUTPUTS -! config_flags - Bit vector possibly containing the -! following values: -! H5Z_FILTER_ENCODE_ENABLED_F -! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Nat Furrer and James Laird -! June 16, 2004 -! SOURCE - SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter ! Filter; may be one of the following: - ! H5Z_FILTER_DEFLATE_F - ! H5Z_FILTER_SZIP_F - ! H5Z_FILTER_NBIT_F - ! H5Z_FILTER_SCALEOFFSET_F - ! H5Z_FILTER_SHUFFLE_F - ! H5Z_FILTER_FLETCHER32_F - INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter - ! has its encoder and/or decoder - ! available - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: config_flags - END FUNCTION h5zget_filter_info_c - END INTERFACE - - hdferr = h5zget_filter_info_c(filter, config_flags) - - END SUBROUTINE h5zget_filter_info_f - -END MODULE H5Z - - - - - diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90 deleted file mode 100644 index 2a3e26f..0000000 --- a/fortran/src/H5_DBLE_InterfaceExclude.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is of type DOUBLE PRECISION. -! We do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. -! -! NOTES -! Empty module. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90 deleted file mode 100644 index 11e0a85..0000000 --- a/fortran/src/H5_DBLE_InterfaceInclude.f90 +++ /dev/null @@ -1,1859 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is not of the type DOUBLE PRECISION. -! We only do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. -! -! NOTES -! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines -! from the HDF function catagory H5A, H5D and H5P. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - USE H5GLOBAL - - ! - ! ----- H5A ---- - ! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_double_scalar - MODULE PROCEDURE h5awrite_double_1 - MODULE PROCEDURE h5awrite_double_2 - MODULE PROCEDURE h5awrite_double_3 - MODULE PROCEDURE h5awrite_double_4 - MODULE PROCEDURE h5awrite_double_5 - MODULE PROCEDURE h5awrite_double_6 - MODULE PROCEDURE h5awrite_double_7 - END INTERFACE - - INTERFACE h5aread_f - MODULE PROCEDURE h5aread_double_scalar - MODULE PROCEDURE h5aread_double_1 - MODULE PROCEDURE h5aread_double_2 - MODULE PROCEDURE h5aread_double_3 - MODULE PROCEDURE h5aread_double_4 - MODULE PROCEDURE h5aread_double_5 - MODULE PROCEDURE h5aread_double_6 - MODULE PROCEDURE h5aread_double_7 - END INTERFACE - ! - ! ----- H5D ---- - ! - INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_double_scalar - MODULE PROCEDURE h5dwrite_double_1 - MODULE PROCEDURE h5dwrite_double_2 - MODULE PROCEDURE h5dwrite_double_3 - MODULE PROCEDURE h5dwrite_double_4 - MODULE PROCEDURE h5dwrite_double_5 - MODULE PROCEDURE h5dwrite_double_6 - MODULE PROCEDURE h5dwrite_double_7 - END INTERFACE - - INTERFACE h5dread_f - MODULE PROCEDURE h5dread_double_scalar - MODULE PROCEDURE h5dread_double_1 - MODULE PROCEDURE h5dread_double_2 - MODULE PROCEDURE h5dread_double_3 - MODULE PROCEDURE h5dread_double_4 - MODULE PROCEDURE h5dread_double_5 - MODULE PROCEDURE h5dread_double_6 - MODULE PROCEDURE h5dread_double_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_double - END INTERFACE - - ! - ! ----- H5P ---- - ! - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_double - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_double - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_double - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_double - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_double - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_double - END INTERFACE - -CONTAINS - - ! - ! ----- H5A ---- - ! - SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_double_s_c - END INTERFACE - - hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar - - SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_double_1_c - END INTERFACE - - hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_1 - - - SUBROUTINE h5awrite_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_double_2_c - END INTERFACE - - hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_2 - - - SUBROUTINE h5awrite_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_double_3_c - END INTERFACE - - hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_3 - - - SUBROUTINE h5awrite_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_double_4_c - END INTERFACE - - hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_4 - - - SUBROUTINE h5awrite_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_double_5_c - END INTERFACE - - hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_5 - - - SUBROUTINE h5awrite_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_double_6_c - END INTERFACE - - hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_6 - - - SUBROUTINE h5awrite_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_double_7_c - END INTERFACE - - hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_7 - - - SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT)::buf - END FUNCTION h5aread_double_s_c - END INTERFACE - - hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar - - SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_double_1_c - END INTERFACE - - hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_1 - - - SUBROUTINE h5aread_double_2(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_double_2_c - END INTERFACE - - hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_2 - - - SUBROUTINE h5aread_double_3(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_double_3_c - END INTERFACE - - hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_3 - - - SUBROUTINE h5aread_double_4(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_double_4_c - END INTERFACE - - hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_4 - - - SUBROUTINE h5aread_double_5(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_double_5_c - END INTERFACE - - hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_5 - - - SUBROUTINE h5aread_double_6(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_double_6_c - END INTERFACE - - hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_6 - - - SUBROUTINE h5aread_double_7(attr_id, memtype_id, buf, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c - !DEC$ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_double_7_c - END INTERFACE - - hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_7 - - - ! - ! ----- H5D ---- - ! - SUBROUTINE h5dwrite_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf - END FUNCTION h5dwrite_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_scalar - - SUBROUTINE h5dwrite_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_1 - - SUBROUTINE h5dwrite_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_2 - - SUBROUTINE h5dwrite_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_3 - - SUBROUTINE h5dwrite_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_4 - - SUBROUTINE h5dwrite_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_5 - - SUBROUTINE h5dwrite_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_6 - - SUBROUTINE h5dwrite_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_7 - - SUBROUTINE h5dread_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(OUT) :: buf - END FUNCTION h5dread_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_scalar - - SUBROUTINE h5dread_double_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_1 - - SUBROUTINE h5dread_double_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_2 - - SUBROUTINE h5dread_double_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_3 - - SUBROUTINE h5dread_double_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_4 - - SUBROUTINE h5dread_double_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_5 - - SUBROUTINE h5dread_double_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_6 - - SUBROUTINE h5dread_double_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_7 - - !---------------------------------------------------------------------- - ! Name: h5dfill_double - ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes - ! of the fillvalues and buffers are supported. Buffer and fillvalue - ! are assumed to have the same datatype. - ! Only one-dimesional buffers are supported. - ! - ! Inputs: - ! fill_value - fill value - ! space_id - memory space selection identifier - ! buf - data buffer iin memory ro apply selection to - ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - - SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_double_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c - !DEC$ENDIF - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_double_c - END INTERFACE - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - - END SUBROUTINE h5dfill_double - - ! - ! -- H5P --- - ! - - SUBROUTINE h5pset_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_double_c - END INTERFACE - - hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_double - - SUBROUTINE h5pget_fill_value_double(prp_id, type_id, fillvalue, & - hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION :: fillvalue - END FUNCTION h5pget_fill_value_double_c - END INTERFACE - - hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_double - -! -!****s* H5P (F90)/h5pset_double -! -! NAME -! h5pset_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pset_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_double - -!****s* H5P (F90)/h5pget_double -! -! NAME -! h5pget_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_double(prp_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - DOUBLE PRECISION, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(OUT) :: value - END FUNCTION h5pget_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_double - -! -!****s* H5P (F90)/h5pregister_double -! -! NAME -! h5pregister_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_double(class, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pregister_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_double_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_double - -!****s* H5P (F90)/h5pinsert_double -! -! NAME -! -! h5pinsert_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_double(plist, name, size, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pinsert_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_double_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_double - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 new file mode 100644 index 0000000..9a42cbf --- /dev/null +++ b/fortran/src/H5_buildiface.F90 @@ -0,0 +1,1024 @@ +!****p* Program/H5_buildiface +! +! NAME +! Executable: H5_buildiface +! +! FILE +! fortran/src/H5_buildiface.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the module +! H5_gen (H5_gen.F90). It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5_gen.F90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM H5_buildiface + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C integer) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + CHARACTER(LEN=42), DIMENSION(1:8), PARAMETER :: fchr_ptr_line=(/ & + ' f_ptr = C_LOC(buf(1:1)) ', & + ' f_ptr = C_LOC(buf(1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1))' & + /) + +! (a) Generate Fortran H5* interfaces having multiple KIND interfaces. +! +! DEVELOPER'S NOTES: +! +! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 +! standard extended the maximum rank to 15, it was decided that user's should use the +! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility +! with the Fortran 90/95 APIs codes which could never handle ranks greater than 7. + + OPEN(11,FILE='H5_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5_gen.F90',& +'!',& +'! NAME',& +'! H5_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5_buildiface.F90 to handle all the',& +'! detected KINDs for APIs being passed INTEGERs, REALs and CHARACTERs. Currently ',& +'! these are H5A, H5D and H5P APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5_buildiface.F90',& +'!',& +'!*****' + + WRITE(11,'(A)') "MODULE H5_GEN" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE H5GLOBAL' + + WRITE(11,'(A)') ' USE H5A' + WRITE(11,'(A)') ' USE H5D' + WRITE(11,'(A)') ' USE H5P' + WRITE(11,'(A)') ' IMPLICIT NONE' +!*************** +! H5A INTERFACES +!*************** +! +! H5Awrite_f +! + WRITE(11,'(A)') " INTERFACE h5awrite_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_ckind_rank"//chr_rank(k) + ENDDO + WRITE(11,'(A)') " END INTERFACE" + +! H5Aread_f + WRITE(11,'(A)') " INTERFACE h5aread_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5aread_ckind_rank"//chr_rank(k) + ENDDO + WRITE(11,'(A)') " END INTERFACE" +!*************** +! H5D INTERFACES +!*************** +! +! H5Dwrite_f + WRITE(11,'(A)') " INTERFACE h5dwrite_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_ckind_rank"//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Dread_f + WRITE(11,'(A)') " INTERFACE h5dread_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_rkind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + DO k = 2, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5dread_ckind_rank"//chr_rank(k) + ENDDO + WRITE(11,'(A)') " END INTERFACE" + +!*************** +! H5P INTERFACES +!*************** +! +! H5Pset_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_fill_value_f + WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pset_f + WRITE(11,'(A)') " INTERFACE h5pset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pget_f + WRITE(11,'(A)') " INTERFACE h5pget_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pregister_f + WRITE(11,'(A)') " INTERFACE h5pregister_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! H5Pinsert_f + WRITE(11,'(A)') " INTERFACE h5pinsert_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +!********************** +! H5A APIs +!********************** +! +! H5Awrite_f + +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! buf - Data buffer; may be a scalar or an array +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO j = 2, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5awrite_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5awrite_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*) , INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ckind_rank'//chr_rank(j) + ENDDO + +! +! H5Aread_f + +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! dims - Array to hold corresponding dimension sizes of data buffer buf; +! dim(k) has value of the k-th dimension of buffer buf; +! values are ignored if buf is a scalar +! +! Outputs: +! buf - Data buffer; may be a scalar or an array +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces are added for +! called C functions (it is needed for Windows +! port). February 27, 2001 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! with how the C functions handles it. The pg +! compiler will return 0 if a buf value is not set. +! February, 2008 +! +! NOTES +! This function is overloaded to write INTEGER, +! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! INTEGER(HID_T) , INTENT(IN) :: attr_id +!! INTEGER(HID_T) , INTENT(IN) :: memtype_id +!! TYPE , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5aread_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5aread_ckind_rank'//chr_rank(j)//'(attr_id, memtype_id, buf, dims, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: attr_id' + WRITE(11,'(A)') ' INTEGER(HID_T) , INTENT(IN) :: memtype_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T) , INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5aread_ckind_rank'//chr_rank(j) + ENDDO + +!********************** +! H5D APIs +!********************** +! +! h5dread_f + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer property list identifier +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + + ENDDO + ENDDO + + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + + ENDDO + ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dread_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dread_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dread_ckind_rank'//chr_rank(j) + ENDDO +! +! h5dwrite_f + +!****s* H5D (F03)/h5dwrite_f_F03 +! +! NAME +! h5dwrite_f_F03 +! +! PURPOSE +! Writes raw data from a dataset into a buffer. +! +! Inputs: +! dset_id - Identifier of the dataset to write to. +! mem_type_id - Identifier of the memory datatype. +! buf - Buffer with data to be written to the file. +! +! Outputs: +! hdferr - Returns 0 if successful and -1 if fails +! +! Optional parameters: +! mem_space_id - Identifier of the memory dataspace. +! file_space_id - Identifier of the dataset's dataspace in the file. +! xfer_prp - Identifier of a transfer property list for this I/O operation. +! +! AUTHOR +! M. Scot Breitenfeld +! September 17, 2011 +! +! Fortran2003 Interface: +!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & +!! mem_space_id, file_space_id, xfer_prp) +!! INTEGER(HID_T), INTENT(IN) :: dset_id +!! INTEGER(HID_T), INTENT(IN) :: mem_type_id +!! TYPE(C_PTR) , INTENT(IN) :: buf +!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id +!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp +!***** + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + DO j = 2, 8 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5dwrite_ckind_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &' + WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)' + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id' + WRITE(11,'(A)') ' INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims' + WRITE(11,'(A)') ' CHARACTER(LEN=*),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id' + WRITE(11,'(A)') ' INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp' + WRITE(11,'(A)') ' INTEGER(HID_T) :: xfer_prp_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: mem_space_id_default' + WRITE(11,'(A)') ' INTEGER(HID_T) :: file_space_id_default' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' xfer_prp_default = H5P_DEFAULT_F' + WRITE(11,'(A)') ' mem_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' file_space_id_default = H5S_ALL_F' + WRITE(11,'(A)') ' IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp' + WRITE(11,'(A)') ' IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id' + WRITE(11,'(A)') ' IF(PRESENT(file_space_id)) file_space_id_default = file_space_id' + WRITE(11,'(A)') fchr_ptr_line(j) + WRITE(11,'(A)') ' hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &' + WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j) + ENDDO + +!********************** +! H5P APIs +!********************** +! +! H5Pset_fill_value_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pset_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_fill_value_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, type_id, fillvalue, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: fillvalue' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' + WRITE(11,'(A)') ' hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_fill_value_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pset_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + + WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pget_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pget_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2))& + &//'(prp_id, name, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(OUT), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pget_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pregister_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') 'SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2))& + &//'(class, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: class' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = C_LOC(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pregister_c(class, name, name_len, size, f_ptr)' + WRITE(11,'(A)') 'END SUBROUTINE h5pregister_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! H5Pinsert_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2))& + &//'(plist, name, size, value, hdferr)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: plist' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: name' + WRITE(11,'(A)') ' INTEGER(SIZE_T), INTENT(IN) :: size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: value' + WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr' + WRITE(11,'(A)') ' INTEGER :: name_len' + WRITE(11,'(A)') ' TYPE(c_ptr) :: f_ptr' + WRITE(11,'(A)') ' f_ptr = c_loc(value)' + WRITE(11,'(A)') ' name_len = LEN(name)' + WRITE(11,'(A)') ' hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5pinsert_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + + WRITE(11,'(A)') 'END MODULE H5_gen' + + CLOSE(11) + +END PROGRAM H5_buildiface + + + diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 1641989..e527dce 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -1,6 +1,6 @@ /****ih* H5_f/H5_f * PURPOSE - * This file contains C stubs for H5 Fortran APIs + * This file contains C stubs for H5 Fortran APIs * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -22,7 +22,7 @@ */ #include "H5f90.h" - +#include "H5fort_type_defines.h" /****if* H5_f/h5init_types_c * NAME * h5init_types_c @@ -30,17 +30,17 @@ * Initialize predefined datatypes in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the types array defined in the + * H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the floatingtypes array defined in the + * H5f90global.F90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the integertypes array defined in the + * H5f90global.F90 * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -49,14 +49,14 @@ * SOURCE */ int_f -nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) +h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes ) /******/ { int ret_value = -1; hid_t c_type_id; size_t tmp_val; -/* Fortran INTEGER is may not be the same as C in; do all checking to find +/* Fortran INTEGER may not be the same as C; do all checking to find an appropriate size */ if (sizeof(int_f) == sizeof(int)) { @@ -92,6 +92,12 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; }/*end else */ #endif +#ifdef H5_HAVE_FLOAT128 + else if(sizeof(double_f)==sizeof(__float128)) { + if ((types[2] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[2], 128) < 0) return ret_value; + }/*end else */ +#endif /* if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value; @@ -126,7 +132,11 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; } /*end if */ else if (sizeof(int_1_f) == sizeof(long long)) { - if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + } /*end if */ + else { + if ((types[6] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[6], 128) < 0) return ret_value; } /*end else */ /* * FIND H5T_NATIVE_INTEGER_2 @@ -143,6 +153,10 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype else if (sizeof(int_2_f) == sizeof(long long)) { if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[7] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[7], 128) < 0) return ret_value; + } /*end else */ /* * FIND H5T_NATIVE_INTEGER_4 */ @@ -158,6 +172,10 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype else if (sizeof(int_4_f) == sizeof(long long)) { if ((types[8] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[8] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[8], 128) < 0) return ret_value; + } /*end else */ /* * FIND H5T_NATIVE_INTEGER_8 */ @@ -173,47 +191,65 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype else if (sizeof(int_8_f) == sizeof(long long)) { if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ + else { + if ((types[9] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[9], 128) < 0) return ret_value; + } /*end else */ + /* - * FIND H5T_NATIVE_REAL_4 + * FIND H5T_NATIVE_REAL_C_FLOAT */ - if (sizeof(real_4_f) == sizeof(float)) { + if (sizeof(real_C_FLOAT_f) == sizeof(float)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_4_f) == sizeof(double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_4_f) == sizeof(long double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(long double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_8 + * FIND H5T_NATIVE_REAL_C_DOUBLE */ - if (sizeof(real_8_f) == sizeof(float)) { + if (sizeof(real_C_DOUBLE_f) == sizeof(float)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_8_f) == sizeof(double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_8_f) == sizeof(long double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(long double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_16 + * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE */ - if (sizeof(real_16_f) == sizeof(float)) { +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 + if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_16_f) == sizeof(double)) { + else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ -#if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_16_f) == sizeof(long double)) { +# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 + else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) { + if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) { if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; - } /*end else */ + } + else { + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 128) < 0) return ret_value; + } + } +# else + if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[12], 64) < 0) return ret_value; +# endif +#else + if ((types[12] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; #endif /* * FIND H5T_NATIVE_B_8 @@ -221,7 +257,38 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0) return ret_value; if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0) return ret_value; if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value; - if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; + if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; + +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + /* + * FIND H5T_NATIVE_INTEGER_16 + */ + if (sizeof(int_16_f) == sizeof(char)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(short)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(int)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value; + } /*end if */ + else if (sizeof(int_16_f) == sizeof(long long)) { + if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; + } /*end else */ + else { + if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[17], 128) < 0) return ret_value; + } /*end else */ +#else + if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[17], 128) < 0) return ret_value; +#endif + + /* + * FIND H5T_NATIVE_FLOAT_128 + */ + if ((types[18] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value; + if ( H5Tset_precision (types[18], 128) < 0) return ret_value; if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value; if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value; @@ -272,35 +339,35 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype * Closes predefined datatype in Fortran * INPUTS * types - array with the predefined Native Fortran - * type, its element and length must be the - * same as the types array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the types array defined in the + * H5f90global.F90 * lentypes - length of the types array, which must be the - * same as the length of types array defined - * in the H5f90global.f90 + * same as the length of types array defined + * in the H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran - * type, its element and length must be the - * same as the floatingtypes array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the floatingtypes array defined in the + * H5f90global.F90 * floatinglen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * same as the length of floatingtypes array defined + * in the H5f90global.F90 * integertypes - array with the predefined Integer Fortran - * type, its element and length must be the - * same as the integertypes array defined in the - * H5f90global.f90 + * type, its element and length must be the + * same as the integertypes array defined in the + * H5f90global.F90 * integerlen - length of the floatingtypes array, which must be the - * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * same as the length of floatingtypes array defined + * in the H5f90global.F90 * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, August 3, 1999 + * Elena Pourmal + * Tuesday, August 3, 1999 * SOURCE */ int_f -nh5close_types_c( hid_t_f * types, int_f *lentypes, +h5close_types_c( hid_t_f * types, int_f *lentypes, hid_t_f * floatingtypes, int_f* floatinglen, hid_t_f * integertypes, int_f * integerlen ) /******/ @@ -310,16 +377,16 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes, int i; for (i = 0; i < *lentypes; i++) { - c_type_id = types[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = types[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *floatinglen; i++) { - c_type_id = floatingtypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = floatingtypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *integerlen; i++) { - c_type_id = integertypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = integertypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } ret_value = 0; return ret_value; @@ -368,7 +435,7 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes, * SOURCE */ int_f -nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, +h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, @@ -524,11 +591,11 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[6] = (int_f)H5O_COPY_ALL; /* All object copying flags (for internal checking) */ /* Flags for shared message indexes. - * Pass these flags in using the mesg_type_flags parameter in + * Pass these flags in using the mesg_type_flags parameter in * H5P_set_shared_mesg_index. * (Developers: These flags correspond to object header message type IDs, - * but we need to assign each kind of message to a different bit so that - * one index can hold multiple types.) + * but we need to assign each kind of message to a different bit so that + * one index can hold multiple types.) */ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */ @@ -547,7 +614,7 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS; /* Maximum shared message values. Number of indexes is 8 to allow room to add - * new types of messages. + * new types of messages. */ h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES; h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE; @@ -689,7 +756,7 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* - * H5 Generic flags introduced in version 1.8 -MSB- + * H5 Generic flags introduced in version 1.8 */ /* H5_index_t enum struct */ @@ -713,7 +780,7 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, } int_f -nh5init1_flags_c(int_f *h5lib_flags) +h5init1_flags_c(int_f *h5lib_flags) /******/ { int ret_value = -1; @@ -727,19 +794,19 @@ nh5init1_flags_c(int_f *h5lib_flags) /****if* H5_f/h5open_c * NAME - * h5open_c + * h5open_c * PURPOSE - * Calls H5open call to initialize C HDF5 library + * Calls H5open call to initialize C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 + * Elena Pourmal + * Friday, November 17, 2000 * * SOURCE */ int_f -nh5open_c(void) +h5open_c(void) /******/ { int ret_value = -1; @@ -750,17 +817,17 @@ nh5open_c(void) } /****if* H5_f/h5close_c * NAME - * h5close_c + * h5close_c * PURPOSE - * Calls H5close call to close C HDF5 library + * Calls H5close call to close C HDF5 library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal + * Elena Pourmal * SOURCE */ int_f -nh5close_c(void) +h5close_c(void) /******/ { int ret_value = -1; @@ -772,28 +839,28 @@ nh5close_c(void) /****if* H5_f/h5get_libversion_c * NAME - * h5get_libversion_c + * h5get_libversion_c * PURPOSE - * Calls H5get_libversion function + * Calls H5get_libversion function * to retrieve library version info. * INPUTS * - * None + * None * OUTPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE * */ int_f -nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) +h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { @@ -811,27 +878,27 @@ nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5check_version_c * NAME - * h5check_version_c + * h5check_version_c * PURPOSE - * Calls H5check_version function + * Calls H5check_version function * to verify library version info. * INPUTS * - * majnum - the major version of the library - * minnum - the minor version of the library - * relnum - the release version of the library + * majnum - the major version of the library + * minnum - the minor version of the library + * relnum - the release version of the library * OUTPUTS * - * None + * None * RETURNS - * 0 on success, aborts on failure + * 0 on success, aborts on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) +h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /******/ { int ret_value = -1; @@ -849,18 +916,18 @@ nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum) /****if* H5_f/h5garbage_collect_c * NAME - * h5garbage_collect_c + * h5garbage_collect_c * PURPOSE - * Calls H5garbage_collect to collect on all free-lists of all types + * Calls H5garbage_collect to collect on all free-lists of all types * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -nh5garbage_collect_c(void) +h5garbage_collect_c(void) /******/ { int ret_value = -1; @@ -872,18 +939,18 @@ nh5garbage_collect_c(void) /****if* H5_f/h5dont_atexit_c * NAME - * h5dont_atexit_c + * h5dont_atexit_c * PURPOSE - * Calls H5dont_atexit not to install atexit cleanup routine + * Calls H5dont_atexit not to install atexit cleanup routine * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR - * Elena Pourmal - * Tuesday, September 24, 2002 + * Elena Pourmal + * Tuesday, September 24, 2002 * SOURCE */ int_f -nh5dont_atexit_c(void) +h5dont_atexit_c(void) /******/ { int ret_value = -1; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 new file mode 100644 index 0000000..39e23a7 --- /dev/null +++ b/fortran/src/H5_ff.F90 @@ -0,0 +1,451 @@ +!****h* ROBODoc/H5LIB +! +! NAME +! MODULE H5LIB +! +! PURPOSE +! This module provides fortran specific helper functions for the HDF library +! +! 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 +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new 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. +! +!***** + +#include + +MODULE H5LIB + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T + USE H5GLOBAL + IMPLICIT NONE + +CONTAINS +!****s* H5LIB/h5open_f +! +! NAME +! h5open_f +! +! PURPOSE +! Initializes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5open_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5open_f(error) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1, error_2, error_3 + + INTERFACE + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) & + BIND(C,NAME='h5init_types_c') + IMPORT :: HID_T + IMPORT :: PREDEF_TYPES_LEN, FLOATING_TYPES_LEN, INTEGER_TYPES_LEN + IMPLICIT NONE + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types + END FUNCTION h5init_types_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & + i_H5D_size_flags,& + i_H5E_flags, & + i_H5E_hid_flags, & + i_H5F_flags, & + i_H5FD_flags, & + i_H5FD_hid_flags, & + i_H5G_flags, & + i_H5I_flags, & + i_H5L_flags, & + i_H5O_flags, & + i_H5P_flags, & + i_H5P_flags_int, & + i_H5R_flags, & + i_H5S_flags, & + i_H5S_hsize_flags, & + i_H5T_flags, & + i_H5Z_flags, & + i_H5generic_flags) & + BIND(C,NAME='h5init_flags_c') + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, & + H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, & + H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, & + H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, & + H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, & + H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & + H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN + IMPLICIT NONE + INTEGER i_H5D_flags(H5D_FLAGS_LEN) + INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) + INTEGER i_H5E_flags(H5E_FLAGS_LEN) + INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) + INTEGER i_H5F_flags(H5F_FLAGS_LEN) + INTEGER i_H5G_flags(H5G_FLAGS_LEN) + INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) + INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + INTEGER i_H5I_flags(H5I_FLAGS_LEN) + INTEGER i_H5L_flags(H5L_FLAGS_LEN) + INTEGER i_H5O_flags(H5O_FLAGS_LEN) + INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) + INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) + INTEGER i_H5R_flags(H5R_FLAGS_LEN) + INTEGER i_H5S_flags(H5S_FLAGS_LEN) + INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + INTEGER i_H5T_flags(H5T_FLAGS_LEN) + INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) + INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) + END FUNCTION h5init_flags_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) & + BIND(C,NAME='h5init1_flags_c') + IMPORT :: H5LIB_FLAGS_LEN + IMPLICIT NONE + INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) + END FUNCTION h5init1_flags_c + END INTERFACE + error_1 = h5init_types_c(predef_types, floating_types, integer_types) + error_2 = h5init_flags_c(H5D_flags, & + H5D_size_flags, & + H5E_flags, & + H5E_hid_flags, & + H5F_flags, & + H5FD_flags, & + H5FD_hid_flags, & + H5G_flags, & + H5I_flags, & + H5L_flags, & + H5O_flags, & + H5P_flags, & + H5P_flags_int, & + H5R_flags, & + H5S_flags, & + H5S_hsize_flags, & + H5T_flags, & + H5Z_flags, & + H5generic_flags) + error_3 = h5init1_flags_c(H5LIB_flags ) + error = error_1 + error_2 + error_3 + END SUBROUTINE h5open_f + +!****s* H5LIB/h5close_f +! +! NAME +! h5close_f +! +! PURPOSE +! Closes HDF5 Fortran interface. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! Removed call to h5close_c since this may cause a problem for an +! application that uses HDF5 library outside HDF5 Fortran APIs. +! October 13, 2011 +! Fortran90 Interface: + SUBROUTINE h5close_f(error) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1 + INTERFACE + INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & + f_types, F_TYPES_LEN, & + i_types, I_TYPES_LEN ) & + BIND(C,NAME='h5close_types_c') + IMPORT :: HID_T + INTEGER P_TYPES_LEN + INTEGER F_TYPES_LEN + INTEGER I_TYPES_LEN + INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types + END FUNCTION h5close_types_c + END INTERFACE + error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & + floating_types, FLOATING_TYPES_LEN, & + integer_types, INTEGER_TYPES_LEN ) + error = error_1 + + END SUBROUTINE h5close_f + +!****s* H5LIB/h5get_libversion_f +! +! NAME +! h5get_libversion_f +! +! PURPOSE +! Returns the HDF5 LIbrary release number +! +! Outputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error +!***** + INTERFACE + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) & + BIND(C,NAME='h5get_libversion_c') + IMPLICIT NONE + INTEGER, INTENT(OUT) :: majnum, minnum, relnum + END FUNCTION h5get_libversion_c + END INTERFACE + + error = h5get_libversion_c(majnum, minnum, relnum) + + END SUBROUTINE h5get_libversion_f + +!****s* H5LIB/h5check_version_f +! +! NAME +! h5check_version_f +! +! PURPOSE +! Verifies that library versions are consistent. +! +! Inputs: +! majnum - major version of the library +! minum - minor version of the library +! relnum - release version of the library +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) + IMPLICIT NONE + INTEGER, INTENT(IN) :: majnum, minnum, relnum + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) & + BIND(C,NAME='h5check_version_c') + IMPLICIT NONE + INTEGER, INTENT(IN) :: majnum, minnum, relnum + END FUNCTION h5check_version_c + END INTERFACE + + error = h5check_version_c(majnum, minnum, relnum) + + END SUBROUTINE h5check_version_f +!****s* H5LIB/h5garbage_collect_f +! +! NAME +! h5garbage_collect_f +! +! PURPOSE +! Garbage collects on all free-lists of all types. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5garbage_collect_f(error) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5garbage_collect_c() & + BIND(C,NAME='h5garbage_collect_c') + END FUNCTION h5garbage_collect_c + END INTERFACE + + error = h5garbage_collect_c() + + END SUBROUTINE h5garbage_collect_f +!****s* H5LIB/h5dont_atexit_f +! +! NAME +! h5dont_atexit_f +! +! PURPOSE +! Instructs library not to install atexit cleanup routine. +! +! Outputs: +! error - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! September 24, 2002 +! +! Fortran90 Interface: + SUBROUTINE h5dont_atexit_f(error) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5dont_atexit_c() & + BIND(C,NAME='h5dont_atexit_c') + END FUNCTION h5dont_atexit_c + END INTERFACE + + error = h5dont_atexit_c() + + END SUBROUTINE h5dont_atexit_f + +!****f* H5LIB/h5kind_to_type +! +! NAME +! h5kind_to_type +! +! PURPOSE +! Converts the KIND to the correct HDF type +! +! Inputs: +! kind - Fortran KIND parameter +! flag - Whether KIND is of type INTEGER or REAL: +! H5_INTEGER_KIND - integer +! H5_REAL_KIND - real +! Outputs: +! h5_type - Returns the type +! +! AUTHOR +! M. Scot Breitenfeld +! August 25, 2008 +! +! Fortran90 Interface: + INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + IMPLICIT NONE + INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: flag +!***** + IF(flag.EQ.H5_INTEGER_KIND)THEN + IF(kind.EQ.Fortran_INTEGER_1)THEN + h5_type = H5T_NATIVE_INTEGER_1 + ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + h5_type = H5T_NATIVE_INTEGER_2 + ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + h5_type = H5T_NATIVE_INTEGER_4 + ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + h5_type = H5T_NATIVE_INTEGER_8 +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN + h5_type = H5T_NATIVE_INTEGER_16 +#endif + ENDIF + ELSE IF(flag.EQ.H5_REAL_KIND)THEN + IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN + h5_type = H5T_NATIVE_REAL_C_FLOAT + ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_DOUBLE +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 + ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE +#endif +#if H5_PAC_FC_MAX_REAL_PRECISION > 28 +#if H5_HAVE_FLOAT128 == 1 + ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN + h5_type = H5T_NATIVE_FLOAT_128 +#endif +#endif + ELSE + h5_type = -1 + ENDIF + ENDIF + + END FUNCTION h5kind_to_type + +!****f* H5LIB_PROVISIONAL/h5offsetof +! +! NAME +! h5offsetof +! +! PURPOSE +! Computes the offset in memory +! +! Inputs: +! start - starting pointer address +! end - ending pointer address +! +! Outputs: +! offset - offset of a member within the derived type +! +! AUTHOR +! M. Scot Breitenfeld +! Augest 25, 2008 +! +! ACKNOWLEDGEMENTS +! Joe Krahn +! +! Fortran2003 Interface: + FUNCTION h5offsetof(start,end) RESULT(offset) + IMPLICIT NONE + INTEGER(SIZE_T) :: offset + TYPE(C_PTR), VALUE, INTENT(IN) :: start, end +!***** + INTEGER(C_INTPTR_T) :: int_address_start, int_address_end + int_address_start = TRANSFER(start, int_address_start) + int_address_end = TRANSFER(end , int_address_end ) + + offset = int_address_end - int_address_start + + END FUNCTION h5offsetof + +END MODULE H5LIB diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 deleted file mode 100644 index 49e64a3..0000000 --- a/fortran/src/H5_ff.f90 +++ /dev/null @@ -1,409 +0,0 @@ -!****h* ROBODoc/H5LIB -! -! NAME -! MODULE H5LIB -! -! PURPOSE -! This module provides fortran specific helper functions for the HDF library -! -! USES -! H5LIB_PROVISIONAL - This module provides helper functions for Fortran 2003 -! only features. If Fortran 2003 functions are enabled then -! H5_ff_F03.f90 is compiled, else H5_ff_F90.f90, -! which is just a place holder blank module, is compiled. -! 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 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 H5LIB - - USE H5LIB_PROVISIONAL ! helper functions for Fortran 2003 features: - ! pre-Fortran 2003 - empty module - ! Forttran 2003 - contains functions - USE H5GLOBAL - -CONTAINS -!****s* H5LIB/h5open_f -! -! NAME -! h5open_f -! -! PURPOSE -! Initializes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5open_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5open_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1, error_2, error_3 - - INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) - USE H5GLOBAL - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c - !DEC$ENDIF - END FUNCTION h5init_types_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & - i_H5D_size_flags,& - i_H5E_flags, & - i_H5E_hid_flags, & - i_H5F_flags, & - i_H5FD_flags, & - i_H5FD_hid_flags, & - i_H5G_flags, & - i_H5I_flags, & - i_H5L_flags, & - i_H5O_flags, & - i_H5P_flags, & - i_H5P_flags_int, & - i_H5R_flags, & - i_H5S_flags, & - i_H5S_hsize_flags, & - i_H5T_flags, & - i_H5Z_flags, & - i_H5generic_flags) - USE H5GLOBAL - INTEGER i_H5D_flags(H5D_FLAGS_LEN) - INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) - INTEGER i_H5E_flags(H5E_FLAGS_LEN) - INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) - INTEGER i_H5F_flags(H5F_FLAGS_LEN) - INTEGER i_H5G_flags(H5G_FLAGS_LEN) - INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) - INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - INTEGER i_H5I_flags(H5I_FLAGS_LEN) - INTEGER i_H5L_flags(H5L_FLAGS_LEN) - INTEGER i_H5O_flags(H5O_FLAGS_LEN) - INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) - INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) - INTEGER i_H5R_flags(H5R_FLAGS_LEN) - INTEGER i_H5S_flags(H5S_FLAGS_LEN) - INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - INTEGER i_H5T_flags(H5T_FLAGS_LEN) - INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) - INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c - !DEC$ENDIF - END FUNCTION h5init_flags_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) - USE H5GLOBAL - INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c - !DEC$ENDIF - END FUNCTION h5init1_flags_c - END INTERFACE - error_1 = h5init_types_c(predef_types, floating_types, integer_types) - error_2 = h5init_flags_c(H5D_flags, & - H5D_size_flags, & - H5E_flags, & - H5E_hid_flags, & - H5F_flags, & - H5FD_flags, & - H5FD_hid_flags, & - H5G_flags, & - H5I_flags, & - H5L_flags, & - H5O_flags, & - H5P_flags, & - H5P_flags_int, & - H5R_flags, & - H5S_flags, & - H5S_hsize_flags, & - H5T_flags, & - H5Z_flags, & - H5generic_flags) - error_3 = h5init1_flags_c(H5LIB_flags ) - error = error_1 + error_2 + error_3 - END SUBROUTINE h5open_f - -!****s* H5LIB/h5close_f -! -! NAME -! h5close_f -! -! PURPOSE -! Closes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5close_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: - SUBROUTINE h5close_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1 - INTERFACE - INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & - f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) - USE H5GLOBAL - INTEGER P_TYPES_LEN - INTEGER F_TYPES_LEN - INTEGER I_TYPES_LEN - INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c - !DEC$ENDIF - END FUNCTION h5close_types_c - END INTERFACE - error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & - floating_types, FLOATING_TYPES_LEN, & - integer_types, INTEGER_TYPES_LEN ) - error = error_1 - - END SUBROUTINE h5close_f - -!****s* H5LIB/h5get_libversion_f -! -! NAME -! h5get_libversion_f -! -! PURPOSE -! Returns the HDF5 LIbrary release number -! -! Outputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error -!***** - INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c - !DEC$ENDIF - INTEGER, INTENT(OUT) :: majnum, minnum, relnum - END FUNCTION h5get_libversion_c - END INTERFACE - - error = h5get_libversion_c(majnum, minnum, relnum) - - END SUBROUTINE h5get_libversion_f - -!****s* H5LIB/h5check_version_f -! -! NAME -! h5check_version_f -! -! PURPOSE -! Verifies that library versions are consistent. -! -! Inputs: -! majnum - major version of the library -! minum - minor version of the library -! relnum - release version of the library -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: majnum, minnum, relnum - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: majnum, minnum, relnum - END FUNCTION h5check_version_c - END INTERFACE - - error = h5check_version_c(majnum, minnum, relnum) - - END SUBROUTINE h5check_version_f -!****s* H5LIB/h5garbage_collect_f -! -! NAME -! h5garbage_collect_f -! -! PURPOSE -! Garbage collects on all free-lists of all types. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5garbage_collect_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5garbage_collect_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c - !DEC$ENDIF - END FUNCTION h5garbage_collect_c - END INTERFACE - - error = h5garbage_collect_c() - - END SUBROUTINE h5garbage_collect_f -!****s* H5LIB/h5dont_atexit_f -! -! NAME -! h5dont_atexit_f -! -! PURPOSE -! Instructs library not to install atexit cleanup routine. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: - SUBROUTINE h5dont_atexit_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5dont_atexit_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c - !DEC$ENDIF - END FUNCTION h5dont_atexit_c - END INTERFACE - - error = h5dont_atexit_c() - - END SUBROUTINE h5dont_atexit_f - -!****f* H5LIB/h5kind_to_type -! -! NAME -! h5kind_to_type -! -! PURPOSE -! Converts the KIND to the correct HDF type -! -! Inputs: -! kind - Fortran KIND parameter -! flag - Whether KIND is of type INTEGER or REAL: -! H5_INTEGER_KIND - integer -! H5_REAL_KIND - real -! Outputs: -! h5_type - Returns the type -! -! AUTHOR -! M. Scot Breitenfeld -! August 25, 2008 -! -! Fortran90 Interface: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: kind - INTEGER, INTENT(IN) :: flag -!***** - IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN - h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN - h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN - h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN - h5_type = H5T_NATIVE_INTEGER_8 - ENDIF - ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_4)THEN - h5_type = H5T_NATIVE_REAL_4 - ELSE IF(kind.EQ.Fortran_REAL_8)THEN - h5_type = H5T_NATIVE_REAL_8 - ELSE IF(kind.EQ.Fortran_REAL_16)THEN - h5_type = H5T_NATIVE_REAL_16 - ENDIF - ENDIF - - END FUNCTION h5kind_to_type - -END MODULE H5LIB diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90 deleted file mode 100644 index d418ed5..0000000 --- a/fortran/src/H5_ff_F03.f90 +++ /dev/null @@ -1,75 +0,0 @@ -!****h* ROBODoc/H5LIB_PROVISIONAL -! -! NAME -! MODULE H5LIB_PROVISIONAL -! -! PURPOSE -! This file contains helper functions for Fortran 2003 features and is -! only compiled when Fortran 2003 features are enabled, otherwise -! the file H5_ff_F90.f90 is compiled. -! -! 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 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 H5LIB_PROVISIONAL - -CONTAINS -!****f* H5LIB_PROVISIONAL/h5offsetof -! -! NAME -! h5offsetof -! -! PURPOSE -! Computes the offset in memory -! -! Inputs: -! start - starting pointer address -! end - ending pointer address -! -! Outputs: -! offset - offset of a member within the derived type -! -! AUTHOR -! M. Scot Breitenfeld -! Augest 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: - FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - IMPLICIT NONE - INTEGER(SIZE_T) :: offset - TYPE(C_PTR), VALUE, INTENT(IN) :: start, end -!***** - INTEGER(C_INTPTR_T) :: int_address_start, int_address_end - int_address_start = TRANSFER(start, int_address_start) - int_address_end = TRANSFER(end , int_address_end ) - - offset = int_address_end - int_address_start - - END FUNCTION h5offsetof - -END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5_ff_F90.f90 b/fortran/src/H5_ff_F90.f90 deleted file mode 100644 index a5d303a..0000000 --- a/fortran/src/H5_ff_F90.f90 +++ /dev/null @@ -1,34 +0,0 @@ -!****h* ROBODoc/H5LIB_PROVISIONAL (F90) -! -! NAME -! MODULE H5LIB_PROVISIONAL -! -! FILE -! fortran/src/H5_ff_F90.f90 -! -! PURPOSE -! This file is a dummy module for when Fortran 2003 features are not enabled. -! It is compiled in place of H5_ff_F03.f90 and is empty. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE H5LIB_PROVISIONAL - - -END MODULE H5LIB_PROVISIONAL diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake new file mode 100644 index 0000000..cc36889 --- /dev/null +++ b/fortran/src/H5config_f.inc.cmake @@ -0,0 +1,84 @@ +! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure + +! Define if we have parallel support +#define H5_HAVE_PARALLEL @CMAKE_H5_HAVE_PARALLEL@ + +#if H5_HAVE_PARALLEL==0 +#undef H5_HAVE_PARALLEL +#endif + +! Define if the intrinsic function STORAGE_SIZE exists +#define H5_FORTRAN_HAVE_STORAGE_SIZE @FORTRAN_HAVE_STORAGE_SIZE@ + +#if H5_FORTRAN_HAVE_STORAGE_SIZE==0 +#undef H5_FORTRAN_HAVE_STORAGE_SIZE +#endif + +! Define if the intrinsic function SIZEOF exists +#define H5_FORTRAN_HAVE_SIZEOF @FORTRAN_HAVE_SIZEOF@ + +#if H5_FORTRAN_HAVE_SIZEOF==0 +#undef H5_FORTRAN_HAVE_SIZEOF +#endif + +! Define if the intrinsic function C_SIZEOF exists +#define H5_FORTRAN_HAVE_C_SIZEOF @FORTRAN_HAVE_C_SIZEOF@ + +#if H5_FORTRAN_HAVE_C_SIZEOF==0 +#undef H5_FORTRAN_HAVE_C_SIZEOF +#endif + +! Define if the intrinsic C_LONG_DOUBLE exists +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ + +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 +#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#endif + +! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ + +! Define if the intrinsic module ISO_FORTRAN_ENV exists +#define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@ + + +! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ + +#if H5_SIZEOF_DOUBLE==0 +#undef H5_SIZEOF_DOUBLE +#endif + +! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + +#if H5_SIZEOF_LONG_DOUBLE==0 +#undef H5_SIZEOF_LONG_DOUBLE +#endif + +! Define the maximum decimal precision for reals +#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ + +! If C has quad precision +#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ + +! Define if INTEGER*16 is available +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ + +! Maximum decimal precision for C +#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ + +! number of valid REAL KINDs +#define H5_H5CONFIG_F_NUM_RKIND @H5CONFIG_F_NUM_RKIND@ + +! valid REAL KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_RKIND @H5CONFIG_F_RKIND@ + +! valid REAL KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_RKIND_SIZEOF @H5CONFIG_F_RKIND_SIZEOF@ + +! number of valid INTEGER KINDs +#define H5_H5CONFIG_F_NUM_IKIND @H5CONFIG_F_NUM_IKIND@ + +! valid INTEGER KINDs (need to have a matching C counter-part) +#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in new file mode 100644 index 0000000..64c3a0c --- /dev/null +++ b/fortran/src/H5config_f.inc.in @@ -0,0 +1,59 @@ +! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure + +! The script to replace the defines in H5config_f.inc.in is +! located in configure.ac in the Fortran section. + +! Define if we have parallel support +#undef HAVE_PARALLEL + +! Define if the intrinsic function STORAGE_SIZE exists +#undef FORTRAN_HAVE_STORAGE_SIZE + +! Define if the intrinsic function SIZEOF exists +#undef FORTRAN_HAVE_SIZEOF + +! Define if the intrinsic function C_SIZEOF exists +#undef FORTRAN_HAVE_C_SIZEOF + +! Define if the intrinsic function C_LONG_DOUBLE exists +#undef FORTRAN_HAVE_C_LONG_DOUBLE + +! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE +#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE + +! Define if the intrinsic module ISO_FORTRAN_ENV exists +#undef HAVE_ISO_FORTRAN_ENV + +! Define the size of C's long double +#undef SIZEOF_DOUBLE + +! Define the size of C's long double +#undef SIZEOF_LONG_DOUBLE + +! Define the maximum decimal precision for reals +#undef PAC_FC_MAX_REAL_PRECISION + +! If C has quad precision +#undef HAVE_FLOAT128 + +! Define if INTEGER*16 is available +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + +! Maximum decimal precision for C +#undef PAC_C_MAX_REAL_PRECISION + +! number of valid REAL KINDs +#undef H5CONFIG_F_NUM_RKIND + +! valid REAL KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_RKIND + +! valid REAL KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_RKIND_SIZEOF + +! number of valid INTEGER KINDs +#undef H5CONFIG_F_NUM_IKIND + +! valid INTEGER KINDs (need to have a matching C counter-part) +#undef H5CONFIG_F_IKIND + diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 new file mode 100644 index 0000000..c88327c --- /dev/null +++ b/fortran/src/H5f90global.F90 @@ -0,0 +1,1040 @@ +!****h* ROBODoc/H5GLOBAL +! +! NAME +! MODULE H5GLOBAL +! +! FILE +! src/fortran/H5f90global.f90 +! +! PURPOSE +! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are +! packed into arrays in H5_f.c and these arrays are then passed to Fortran. +! This module then uses EQUIVALENCE to assign elements of the arrays to +! Fortran equivalent C stubs. +! +! NOTES +! The size of the C arrays in H5_f.c has to match the values of the variables +! declared as PARAMETER, hence if the size of an array in H5_f.c is changed +! then the PARAMETER of that corresponding array in Fortran must also be changed. +! +! USES +! H5FORTRAN_TYPES - This module is generated at run time. See +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourmal +! +!***** + +MODULE H5GLOBAL + USE H5FORTRAN_TYPES + + IMPLICIT NONE + + ! Definitions for reference datatypes. + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + + ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. + ! The flag is used to tell the function whether the kind input variable + ! is for a REAL or INTEGER data type. + + INTEGER, PARAMETER :: H5_REAL_KIND = 1 + INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 + + TYPE :: hobj_ref_t_f + INTEGER(HADDR_T) ref + END TYPE hobj_ref_t_f + + TYPE :: hdset_reg_ref_t_f + INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref + END TYPE hdset_reg_ref_t_f + + INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 19 ! Do not forget to change this + ! value when new predefined + ! datatypes are added + + ! Do not forget to change the following line when new predefined + ! floating data types are added + INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 + + ! Do not forget to change the following line when new predefined + ! integer data types are added + INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & + H5T_NATIVE_INTEGER_2, & + H5T_NATIVE_INTEGER_4, & + H5T_NATIVE_INTEGER_8, & + H5T_NATIVE_REAL_C_FLOAT, & + H5T_NATIVE_REAL_C_DOUBLE, & + H5T_NATIVE_REAL_C_LONG_DOUBLE, & + H5T_NATIVE_INTEGER, & + H5T_NATIVE_REAL, & + H5T_NATIVE_DOUBLE, & + H5T_NATIVE_CHARACTER , & + H5T_STD_REF_OBJ, & + H5T_STD_REF_DSETREG, & + H5T_IEEE_F32BE, & + H5T_IEEE_F32LE, & + H5T_IEEE_F64BE, & + H5T_IEEE_F64LE, & + H5T_STD_I8BE, & + H5T_STD_I8LE, & + H5T_STD_I16BE, & + H5T_STD_I16LE, & + H5T_STD_I32BE, & + H5T_STD_I32LE, & + H5T_STD_I64BE, & + H5T_STD_I64LE, & + H5T_STD_U8BE, & + H5T_STD_U8LE, & + H5T_STD_U16BE, & + H5T_STD_U16LE, & + H5T_STD_U32BE + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_16 ! NEED IFDEF -MSB- + INTEGER(HID_T) :: H5T_NATIVE_FLOAT_128 ! NEED IFDEF -MSB- + +! NOTE: Splitting the line since the Fortran 95 standard limits the number of +! continuation lines to 39; the F03/F08 standard limits the number +! to 255 lines. + + INTEGER(HID_T) :: H5T_STD_U32LE, & + H5T_STD_U64BE, & + H5T_STD_U64LE, & + H5T_STRING, & + H5T_STD_B8BE, & + H5T_STD_B8LE, & + H5T_STD_B16BE, & + H5T_STD_B16LE, & + H5T_STD_B32BE, & + H5T_STD_B32LE, & + H5T_STD_B64BE, & + H5T_STD_B64LE, & + H5T_NATIVE_B8, & + H5T_NATIVE_B16, & + H5T_NATIVE_B32, & + H5T_NATIVE_B64, & + H5T_FORTRAN_S1, & + H5T_C_S1 + + + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types + EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) + EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) + EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) + EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) + EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) + EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) + EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) + EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) + EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) + EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_C_FLOAT) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_C_DOUBLE) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_C_LONG_DOUBLE) + EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) + EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) + EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) + EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) + EQUIVALENCE (predef_types(18), H5T_NATIVE_INTEGER_16) ! ADDED NEW TYPE -MSB- + EQUIVALENCE (predef_types(19), H5T_NATIVE_FLOAT_128) ! ADDED NEW TYPE -MSB- + + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types + EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) + EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) + EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) + EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) + + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types + EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) + EQUIVALENCE (integer_types(2), H5T_STD_I8LE) + EQUIVALENCE (integer_types(3), H5T_STD_I16BE) + EQUIVALENCE (integer_types(4), H5T_STD_I16LE) + EQUIVALENCE (integer_types(5), H5T_STD_I32BE) + EQUIVALENCE (integer_types(6), H5T_STD_I32LE) + EQUIVALENCE (integer_types(7), H5T_STD_I64BE) + EQUIVALENCE (integer_types(8), H5T_STD_I64LE) + EQUIVALENCE (integer_types(9), H5T_STD_U8BE) + EQUIVALENCE (integer_types(10), H5T_STD_U8LE) + EQUIVALENCE (integer_types(11), H5T_STD_U16BE) + EQUIVALENCE (integer_types(12), H5T_STD_U16LE) + EQUIVALENCE (integer_types(13), H5T_STD_U32BE) + EQUIVALENCE (integer_types(14), H5T_STD_U32LE) + EQUIVALENCE (integer_types(15), H5T_STD_U64BE) + EQUIVALENCE (integer_types(16), H5T_STD_U64LE) + EQUIVALENCE (integer_types(17), H5T_STRING) + EQUIVALENCE (integer_types(18), H5T_STD_B8BE) + EQUIVALENCE (integer_types(19), H5T_STD_B8LE) + EQUIVALENCE (integer_types(20), H5T_STD_B16BE) + EQUIVALENCE (integer_types(21), H5T_STD_B16LE) + EQUIVALENCE (integer_types(22), H5T_STD_B32BE) + EQUIVALENCE (integer_types(23), H5T_STD_B32LE) + EQUIVALENCE (integer_types(24), H5T_STD_B64BE) + EQUIVALENCE (integer_types(25), H5T_STD_B64LE) + EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) + EQUIVALENCE (integer_types(27), H5T_C_S1) + + + ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & + ! H5T_NATIVE_REAL, & + ! H5T_NATIVE_DOUBLE, & + ! H5T_NATIVE_CHARACTER, & + ! H5T_STD_REF_OBJ, & + ! H5T_STD_REF_DSETREG + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ + !DEC$endif + COMMON /PREDEFINED_TYPES/ predef_types + + ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & + ! H5T_IEEE_F32LE, & + ! H5T_IEEE_F64BE, & + ! H5T_IEEE_F64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ + !DEC$endif + COMMON /FLOATING_TYPES/ floating_types + ! + ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & + ! H5T_STD_I8LE, & + ! H5T_STD_I16BE, & + ! H5T_STD_I16LE, & + ! H5T_STD_I32BE, & + ! H5T_STD_I32LE, & + ! H5T_STD_I64BE, & + ! H5T_STD_I64LE, & + ! H5T_STD_U8BE, & + ! H5T_STD_U8LE, & + ! H5T_STD_U16BE, & + ! H5T_STD_U16LE, & + ! H5T_STD_U32BE, & + ! H5T_STD_U32LE, & + ! H5T_STD_U64BE, & + ! H5T_STD_U64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ + !DEC$endif + COMMON /INTEGER_TYPES/ integer_types + ! + ! Fortran flags + ! + ! + ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) + ! + ! H5F flags declaration + ! + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 + INTEGER :: H5F_flags(H5F_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ + !DEC$endif + COMMON /H5F_FLAGS/ H5F_flags + + INTEGER :: H5F_ACC_RDWR_F + INTEGER :: H5F_ACC_RDONLY_F + INTEGER :: H5F_ACC_TRUNC_F + INTEGER :: H5F_ACC_EXCL_F + INTEGER :: H5F_ACC_DEBUG_F + INTEGER :: H5F_SCOPE_LOCAL_F + INTEGER :: H5F_SCOPE_GLOBAL_F + INTEGER :: H5F_CLOSE_DEFAULT_F + INTEGER :: H5F_CLOSE_WEAK_F + INTEGER :: H5F_CLOSE_SEMI_F + INTEGER :: H5F_CLOSE_STRONG_F + INTEGER :: H5F_OBJ_FILE_F + INTEGER :: H5F_OBJ_DATASET_F + INTEGER :: H5F_OBJ_GROUP_F + INTEGER :: H5F_OBJ_DATATYPE_F + INTEGER :: H5F_OBJ_ALL_F + INTEGER :: H5F_LIBVER_EARLIEST_F + INTEGER :: H5F_LIBVER_LATEST_F + INTEGER :: H5F_UNLIMITED_F + + EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) + EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) + EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) + EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) + EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) + EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) + EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) + EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) + EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) + EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) + EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) + EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) + EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) + EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) + EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) + EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) + EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) + EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) + EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) + ! + ! H5generic flags declaration + ! + INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 + INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ + !DEC$endif + COMMON /H5generic_FLAGS/ H5generic_flags + + INTEGER :: H5_INDEX_UNKNOWN_F + INTEGER :: H5_INDEX_NAME_F + INTEGER :: H5_INDEX_CRT_ORDER_F + INTEGER :: H5_INDEX_N_F + INTEGER :: H5_ITER_UNKNOWN_F + INTEGER :: H5_ITER_INC_F + INTEGER :: H5_ITER_DEC_F + INTEGER :: H5_ITER_NATIVE_F + INTEGER :: H5_ITER_N_F + + EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) + EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) + EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) + EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) + EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) + EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) + EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) + ! + ! H5G flags declaration + ! + INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 + INTEGER :: H5G_flags(H5G_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ + !DEC$endif + COMMON /H5G_FLAGS/ H5G_flags + + INTEGER :: H5G_UNKNOWN_F + INTEGER :: H5G_GROUP_F + INTEGER :: H5G_DATASET_F + INTEGER :: H5G_TYPE_F + INTEGER :: H5G_LINK_F + INTEGER :: H5G_UDLINK_F + INTEGER :: H5G_SAME_LOC_F + INTEGER :: H5G_LINK_ERROR_F + INTEGER :: H5G_LINK_HARD_F + INTEGER :: H5G_LINK_SOFT_F + INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F + INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F + INTEGER :: H5G_STORAGE_TYPE_COMPACT_F + INTEGER :: H5G_STORAGE_TYPE_DENSE_F + + EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type + EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group + EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type + EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) + EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) + EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) + EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) + + EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) + EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) + EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) + EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) + ! + ! H5D flags declaration + ! + + INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 + INTEGER :: H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 + INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ + !DEC$endif + COMMON /H5D_FLAGS/ H5D_flags + COMMON /H5D_SIZE_FLAGS/ H5D_size_flags + + INTEGER :: H5D_COMPACT_F + INTEGER :: H5D_CONTIGUOUS_F + INTEGER :: H5D_CHUNKED_F + + INTEGER :: H5D_ALLOC_TIME_ERROR_F + INTEGER :: H5D_ALLOC_TIME_DEFAULT_F + INTEGER :: H5D_ALLOC_TIME_EARLY_F + INTEGER :: H5D_ALLOC_TIME_LATE_F + INTEGER :: H5D_ALLOC_TIME_INCR_F + + INTEGER :: H5D_SPACE_STS_ERROR_F + INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_ALLOCATED_F + + INTEGER :: H5D_FILL_TIME_ERROR_F + INTEGER :: H5D_FILL_TIME_ALLOC_F + INTEGER :: H5D_FILL_TIME_NEVER_F + + INTEGER :: H5D_FILL_VALUE_ERROR_F + INTEGER :: H5D_FILL_VALUE_UNDEFINED_F + INTEGER :: H5D_FILL_VALUE_DEFAULT_F + INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F + +! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 +! characters for variable names in Fortran. +! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 +! characters for variable names in Fortran. + + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F + INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F + INTEGER :: H5D_MPIO_NO_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F + INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_MIXED_F + INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F + + EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) + EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) + EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) + + EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) + EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) + EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) + EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) + + EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) + EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) + EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) + EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) + + EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) + EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) + + EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) + EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) + EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) + EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) + + EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) + EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) + EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) + EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) + + EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) + EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) + + ! + ! H5E flags declaration + ! + INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 + INTEGER :: H5E_flags(H5E_FLAGS_LEN) + INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 + INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ + !DEC$endif + COMMON /H5E_FLAGS/ H5E_flags + COMMON /H5E_HID_FLAGS/ H5E_hid_flags + + INTEGER(HID_T) :: H5E_DEFAULT_F + INTEGER :: H5E_MAJOR_F + INTEGER :: H5E_MINOR_F + INTEGER :: H5E_WALK_UPWARD_F + INTEGER :: H5E_WALK_DOWNWARD_F + + EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) + EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) + EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) + EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) + EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) + + ! + ! H5FD flags declaration + ! + INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 + INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ + !DEC$endif + COMMON /H5FD_FLAGS/ H5FD_flags + + INTEGER :: H5FD_MPIO_INDEPENDENT_F + INTEGER :: H5FD_MPIO_COLLECTIVE_F + INTEGER :: H5FD_MEM_NOLIST_F + INTEGER :: H5FD_MEM_DEFAULT_F + INTEGER :: H5FD_MEM_SUPER_F + INTEGER :: H5FD_MEM_BTREE_F + INTEGER :: H5FD_MEM_DRAW_F + INTEGER :: H5FD_MEM_GHEAP_F + INTEGER :: H5FD_MEM_LHEAP_F + INTEGER :: H5FD_MEM_OHDR_F + INTEGER :: H5FD_MEM_NTYPES_F + + EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) + EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) + EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) + EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) + EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) + EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) + EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) + EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) + EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) + EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) + EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) + ! + ! H5FD file drivers flags declaration + ! + INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 + INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ + !DEC$endif + COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags + + INTEGER(HID_T) :: H5FD_CORE_F + INTEGER(HID_T) :: H5FD_FAMILY_F + INTEGER(HID_T) :: H5FD_LOG_F + INTEGER(HID_T) :: H5FD_MPIO_F + INTEGER(HID_T) :: H5FD_MULTI_F + INTEGER(HID_T) :: H5FD_SEC2_F + INTEGER(HID_T) :: H5FD_STDIO_F + + EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) + EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) + EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) + EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) + EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) + EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) + EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) + + ! + ! H5I flags declaration + ! + INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 + INTEGER :: H5I_flags(H5I_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ + !DEC$endif + COMMON /H5I_FLAGS/ H5I_flags + + INTEGER :: H5I_FILE_F + INTEGER :: H5I_GROUP_F + INTEGER :: H5I_DATATYPE_F + INTEGER :: H5I_DATASPACE_F + INTEGER :: H5I_DATASET_F + INTEGER :: H5I_ATTR_F + INTEGER :: H5I_BADID_F + + EQUIVALENCE(H5I_flags(1), H5I_FILE_F) + EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) + EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) + EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) + EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) + EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) + EQUIVALENCE(H5I_flags(7), H5I_BADID_F) + ! + ! H5L flags declaration + ! + INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 + INTEGER :: H5L_flags(H5L_FLAGS_LEN) + + INTEGER :: H5L_TYPE_ERROR_F + INTEGER :: H5L_TYPE_HARD_F + INTEGER :: H5L_TYPE_SOFT_F + INTEGER :: H5L_TYPE_EXTERNAL_F + INTEGER :: H5L_SAME_LOC_F + INTEGER :: H5L_LINK_CLASS_T_VERS_F + + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ + !DEC$endif + COMMON /H5L_FLAGS/ H5L_flags + + EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) + EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) + EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) + EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) + EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) + EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) + ! + ! H5O flags declaration + ! + INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 + INTEGER :: H5o_flags(H5O_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ + !DEC$endif + COMMON /H5O_FLAGS/ H5O_flags + + INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO + INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE + INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER + INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE + INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F + INTEGER :: H5O_COPY_ALL_F + INTEGER :: H5O_SHMESG_NONE_FLAG_F + INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F + INTEGER :: H5O_SHMESG_DTYPE_FLAG_F + INTEGER :: H5O_SHMESG_FILL_FLAG_F + INTEGER :: H5O_SHMESG_PLINE_FLAG_F + INTEGER :: H5O_SHMESG_ATTR_FLAG_F + INTEGER :: H5O_SHMESG_ALL_FLAG_F + INTEGER :: H5O_HDR_CHUNK0_SIZE_F + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE + INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** + INTEGER :: H5O_HDR_STORE_TIMES_F + INTEGER :: H5O_HDR_ALL_FLAGS_F + INTEGER :: H5O_SHMESG_MAX_NINDEXES_F + INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F + INTEGER :: H5O_TYPE_UNKNOWN_F + INTEGER :: H5O_TYPE_GROUP_F + INTEGER :: H5O_TYPE_DATASET_F + INTEGER :: H5O_TYPE_NAMED_DATATYPE_F + INTEGER :: H5O_TYPE_NTYPES_F + + EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) + EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) + EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) + EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) + EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) + EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) + EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) + EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) + EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) + EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) + EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) + EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) + EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) + EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) + EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) + EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) + EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) + EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) + EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) + EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) + EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) + EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) + EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) + EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) + EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) + + ! + ! H5P flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 + INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ + !DEC$endif + COMMON /H5P_FLAGS/ H5P_flags + + INTEGER(HID_T) :: H5P_FILE_CREATE_F + INTEGER(HID_T) :: H5P_FILE_ACCESS_F + INTEGER(HID_T) :: H5P_DATASET_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_XFER_F + INTEGER(HID_T) :: H5P_FILE_MOUNT_F + INTEGER(HID_T) :: H5P_DEFAULT_F + INTEGER(HID_T) :: H5P_ROOT_F + INTEGER(HID_T) :: H5P_OBJECT_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_ACCESS_F + INTEGER(HID_T) :: H5P_GROUP_CREATE_F + INTEGER(HID_T) :: H5P_GROUP_ACCESS_F + INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F + INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F + INTEGER(HID_T) :: H5P_STRING_CREATE_F + INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F + INTEGER(HID_T) :: H5P_OBJECT_COPY_F + INTEGER(HID_T) :: H5P_LINK_CREATE_F + INTEGER(HID_T) :: H5P_LINK_ACCESS_F + + EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) + EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) + EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) + EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) + EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) + EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) + EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) + EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) + EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) + EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) + EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) + EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) + EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) + EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) + EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) + EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) + EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) + EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) + + ! + ! H5P integers flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 + INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ + !DEC$endif + COMMON /H5P_FLAGS_INT/ H5P_flags_int + INTEGER :: H5P_CRT_ORDER_INDEXED_F + INTEGER :: H5P_CRT_ORDER_TRACKED_F + EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) + EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) + ! + ! H5R flags declaration + ! + INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 + INTEGER :: H5R_flags(H5R_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ + !DEC$endif + COMMON /H5R_FLAGS/ H5R_flags + + INTEGER :: H5R_OBJECT_F + INTEGER :: H5R_DATASET_REGION_F + + EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) + EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) + + ! + ! H5S flags declaration + ! + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 + INTEGER :: H5S_flags(H5S_FLAGS_LEN) + INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 + INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ + !DEC$endif + COMMON /H5S_FLAGS/ H5S_flags + COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags + + INTEGER(HSIZE_T) :: H5S_UNLIMITED_F + + INTEGER :: H5S_SCALAR_F + INTEGER :: H5S_SIMPLE_F + INTEGER :: H5S_NULL_F + + INTEGER :: H5S_ALL_F + + INTEGER :: H5S_SELECT_NOOP_F + INTEGER :: H5S_SELECT_SET_F + INTEGER :: H5S_SELECT_OR_F + INTEGER :: H5S_SELECT_AND_F + INTEGER :: H5S_SELECT_XOR_F + INTEGER :: H5S_SELECT_NOTB_F + INTEGER :: H5S_SELECT_NOTA_F + INTEGER :: H5S_SELECT_APPEND_F + INTEGER :: H5S_SELECT_PREPEND_F + INTEGER :: H5S_SELECT_INVALID_F + + INTEGER :: H5S_SEL_ERROR_F + INTEGER :: H5S_SEL_NONE_F + INTEGER :: H5S_SEL_POINTS_F + INTEGER :: H5S_SEL_HYPERSLABS_F + INTEGER :: H5S_SEL_ALL_F + + EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) + EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) + EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) + EQUIVALENCE(H5S_flags(3), H5S_NULL_F) + EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) + EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) + EQUIVALENCE(H5S_flags(6), H5S_ALL_F) + + EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) + EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) + EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) + EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) + EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) + + + EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) + EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) + EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) + EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) + EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) + + ! + ! H5T flags declaration + ! + INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 + INTEGER :: H5T_flags(H5T_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ + !DEC$endif + COMMON /H5T_FLAGS/ H5T_flags + + INTEGER :: H5T_NO_CLASS_F + INTEGER :: H5T_INTEGER_F + INTEGER :: H5T_FLOAT_F + INTEGER :: H5T_TIME_F + INTEGER :: H5T_STRING_F + INTEGER :: H5T_BITFIELD_F + INTEGER :: H5T_OPAQUE_F + INTEGER :: H5T_COMPOUND_F + INTEGER :: H5T_REFERENCE_F + INTEGER :: H5T_ENUM_F + INTEGER :: H5T_VLEN_F + INTEGER :: H5T_ARRAY_F + INTEGER :: H5T_ORDER_LE_F + INTEGER :: H5T_ORDER_BE_F + INTEGER :: H5T_ORDER_VAX_F + INTEGER :: H5T_ORDER_NONE_F + INTEGER :: H5T_ORDER_MIXED_F + INTEGER :: H5T_PAD_ZERO_F + INTEGER :: H5T_PAD_ONE_F + INTEGER :: H5T_PAD_BACKGROUND_F + INTEGER :: H5T_PAD_ERROR_F + INTEGER :: H5T_SGN_NONE_F + INTEGER :: H5T_SGN_2_F + INTEGER :: H5T_SGN_ERROR_F + INTEGER :: H5T_NORM_IMPLIED_F + INTEGER :: H5T_NORM_MSBSET_F + INTEGER :: H5T_NORM_NONE_F + INTEGER :: H5T_CSET_ASCII_F + INTEGER :: H5T_CSET_UTF8_F + INTEGER :: H5T_STR_NULLTERM_F + INTEGER :: H5T_STR_NULLPAD_F + INTEGER :: H5T_STR_SPACEPAD_F + INTEGER :: H5T_STR_ERROR_F + INTEGER :: H5T_DIR_ASCEND_F + INTEGER :: H5T_DIR_DESCEND_F + + EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) + EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) + EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) + EQUIVALENCE(H5T_flags(4), H5T_TIME_F) + EQUIVALENCE(H5T_flags(5), H5T_STRING_F) + EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) + EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) + EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) + EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) + EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) + EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) + EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) + EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) + EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) + EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) + EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) + EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) + EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) + EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) + EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) + EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) + EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) + EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) + EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) + EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) + EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) + EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) + EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) + EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) + EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) + EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) + EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) + EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) + EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) + EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) + ! + ! H5Z flags declaration + ! + INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 + INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ + !DEC$endif + COMMON /H5Z_FLAGS/ H5Z_flags + + INTEGER :: H5Z_FILTER_ERROR_F + INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ALL_F + INTEGER :: H5Z_FILTER_DEFLATE_F + INTEGER :: H5Z_FILTER_SHUFFLE_F + INTEGER :: H5Z_FILTER_FLETCHER32_F + INTEGER :: H5Z_FILTER_SZIP_F + INTEGER :: H5Z_ERROR_EDC_F + INTEGER :: H5Z_DISABLE_EDC_F + INTEGER :: H5Z_ENABLE_EDC_F + INTEGER :: H5Z_NO_EDC_F + INTEGER :: H5Z_FLAG_OPTIONAL_F + INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F + INTEGER :: H5Z_FILTER_DECODE_ENABLED_F + INTEGER :: H5Z_FILTER_NBIT_F + INTEGER :: H5Z_FILTER_SCALEOFFSET_F + INTEGER :: H5Z_SO_FLOAT_DSCALE_F + INTEGER :: H5Z_SO_FLOAT_ESCALE_F + INTEGER :: H5Z_SO_INT_F + INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F + + EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) + EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) + EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) + EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) + EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) + EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) + EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) + EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) + EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) + EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) + EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) + EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) + EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) + EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) + EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) + EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) + EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) + EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) + + ! + ! H5 Library flags declaration + ! + INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 + INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ + !DEC$endif + COMMON /H5LIB_FLAGS/ H5LIB_flags + INTEGER :: H5_SZIP_EC_OM_F + INTEGER :: H5_SZIP_NN_OM_F + ! + EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) + EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) + + + ! General H5 flags declarations + ! +!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 +!!$ INTEGER H5_flags(H5_FLAGS_LEN) +!!$!DEC$if defined(BUILD_HDF5_DLL) +!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ +!!$!DEC$endif +!!$ COMMON /H5_FLAGS/ H5_flags +!!$ +!!$ INTEGER :: _F +!!$ INTEGER :: H5F_SCOPE_LOCAL_F +!!$ +!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) +!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) + +CONTAINS + + ! Copy a c string to a Fortran string + + SUBROUTINE H5_Fortran_string_c2f(c_string, f_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string + CHARACTER(LEN=*), INTENT(OUT) :: f_string + INTEGER(SIZE_T) :: c_len, f_len + + ! Find the length of the C string by located the null terminator + c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) + ! Find the length of the Fortran string + f_len = LEN(f_string) + + ! CASE (1): C string is equal to or larger then Fortran character buffer, + ! so fill the entire Fortran buffer. + IF(c_len.GE.f_len)THEN ! + f_string(1:f_len) = c_string(1:f_len) + + ! CASE (2): C string is smaller then Fortran character buffer, + ! so copy C string and blank pad remaining characters. + ELSE + f_string(1:c_len) = c_string(1:c_len) + f_string(c_len+1:f_len) =' ' + ENDIF + END SUBROUTINE H5_Fortran_string_c2f + + SUBROUTINE H5_Fortran_string_f2c(f_string, c_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: f_string + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(OUT) :: c_string + INTEGER(SIZE_T) :: c_len, f_len + + c_string = TRIM(f_string)//C_NULL_CHAR + + END SUBROUTINE H5_Fortran_string_f2c + + +! Copy Fortran string to C charater array, assuming the C array is one-char +! longer for the terminating null char. +! fstring : the Fortran input string +! cstring : the C output string (with memory already allocated) +!!$subroutine MPIR_Fortran_string_f2c(fstring, cstring) +!!$ implicit none +!!$ character(len=*), intent(in) :: fstring +!!$ character(kind=c_char), intent(out) :: cstring(:) +!!$ integer :: i, j +!!$ logical :: met_non_blank +!!$ +!!$ ! Trim the leading and trailing blank characters +!!$ j = 1 +!!$ met_non_blank = .false. +!!$ do i = 1, len_trim(fstring) +!!$ if (met_non_blank) then +!!$ cstring(j) = fstring(i:i) +!!$ j = j + 1 +!!$ else if (fstring(i:i) /= ' ') then +!!$ met_non_blank = .true. +!!$ cstring(j) = fstring(i:i) +!!$ j = j + 1 +!!$ end if +!!$ end do +!!$ +!!$ cstring(j) = C_NULL_CHAR +!!$end subroutine MPIR_Fortran_string_f2c +!!$ +!!$! Copy C charater array to Fortran string +!!$subroutine MPIR_Fortran_string_c2f(cstring, fstring) +!!$ implicit none +!!$ character(kind=c_char), intent(in) :: cstring(:) +!!$ character(len=*), intent(out) :: fstring +!!$ integer :: i, j, length +!!$ +!!$ i = 1 +!!$ do while (cstring(i) /= C_NULL_CHAR) +!!$ fstring(i:i) = cstring(i) +!!$ i = i + 1 +!!$ end do +!!$ +!!$ ! Zero out the trailing characters +!!$ length = len(fstring) +!!$ do j = i, length +!!$ fstring(j:j) = ' ' +!!$ end do +!!$end subroutine MPIR_Fortran_string_c2f + +END MODULE H5GLOBAL + diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 deleted file mode 100644 index 0e371f5..0000000 --- a/fortran/src/H5f90global.f90 +++ /dev/null @@ -1,947 +0,0 @@ -!****h* ROBODoc/H5GLOBAL -! -! NAME -! MODULE H5GLOBAL -! -! FILE -! src/fortran/H5f90global.f90 -! -! PURPOSE -! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are -! packed into arrays in H5_f.c and these arrays are then passed to Fortran. -! This module then uses EQUIVALENCE to assign elements of the arrays to -! Fortran equivalent C stubs. -! -! NOTES -! The size of the C arrays in H5_f.c has to match the values of the variables -! declared as PARAMETER, hence if the size of an array in H5_f.c is changed -! then the PARAMETER of that corresponding array in Fortran must also be changed. -! -! USES -! H5FORTRAN_TYPES - This module is generated at run time. See -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourmal -! -!***** - -MODULE H5GLOBAL - USE H5FORTRAN_TYPES - - IMPLICIT NONE - - ! Definitions for reference datatypes. - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - - ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. - ! The flag is used to tell the function whether the kind input variable - ! is for a REAL or INTEGER data type. - - INTEGER, PARAMETER :: H5_REAL_KIND = 1 - INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 - - TYPE :: hobj_ref_t_f - INTEGER(HADDR_T) ref - END TYPE hobj_ref_t_f - - TYPE :: hdset_reg_ref_t_f - INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref - END TYPE hdset_reg_ref_t_f - - INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this - ! value when new predefined - ! datatypes are added - - ! Do not forget to change the following line when new predefined - ! floating data types are added - INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 - - ! Do not forget to change the following line when new predefined - ! integer data types are added - INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 - - INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & - H5T_NATIVE_INTEGER_2, & - H5T_NATIVE_INTEGER_4, & - H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_4, & - H5T_NATIVE_REAL_8, & - H5T_NATIVE_REAL_16, & - H5T_NATIVE_INTEGER, & - H5T_NATIVE_REAL, & - H5T_NATIVE_DOUBLE, & - H5T_NATIVE_CHARACTER , & - H5T_STD_REF_OBJ, & - H5T_STD_REF_DSETREG, & - H5T_IEEE_F32BE, & - H5T_IEEE_F32LE, & - H5T_IEEE_F64BE, & - H5T_IEEE_F64LE, & - H5T_STD_I8BE, & - H5T_STD_I8LE, & - H5T_STD_I16BE, & - H5T_STD_I16LE, & - H5T_STD_I32BE, & - H5T_STD_I32LE, & - H5T_STD_I64BE, & - H5T_STD_I64LE, & - H5T_STD_U8BE, & - H5T_STD_U8LE, & - H5T_STD_U16BE, & - H5T_STD_U16LE, & - H5T_STD_U32BE - -! NOTE: Splitting the line since the Fortran 95 standard limits the number of -! continuation lines to 39; the F03/F08 standard limits the number -! to 255 lines. - - INTEGER(HID_T) :: H5T_STD_U32LE, & - H5T_STD_U64BE, & - H5T_STD_U64LE, & - H5T_STRING, & - H5T_STD_B8BE, & - H5T_STD_B8LE, & - H5T_STD_B16BE, & - H5T_STD_B16LE, & - H5T_STD_B32BE, & - H5T_STD_B32LE, & - H5T_STD_B64BE, & - H5T_STD_B64LE, & - H5T_NATIVE_B8, & - H5T_NATIVE_B16, & - H5T_NATIVE_B32, & - H5T_NATIVE_B64, & - H5T_FORTRAN_S1, & - H5T_C_S1 - - - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types - EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) - EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) - EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) - EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) - EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) - EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) - EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) - EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) - EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) - EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) - EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) - EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) - EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) - EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) - - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types - EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) - EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) - EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) - EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) - - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types - EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) - EQUIVALENCE (integer_types(2), H5T_STD_I8LE) - EQUIVALENCE (integer_types(3), H5T_STD_I16BE) - EQUIVALENCE (integer_types(4), H5T_STD_I16LE) - EQUIVALENCE (integer_types(5), H5T_STD_I32BE) - EQUIVALENCE (integer_types(6), H5T_STD_I32LE) - EQUIVALENCE (integer_types(7), H5T_STD_I64BE) - EQUIVALENCE (integer_types(8), H5T_STD_I64LE) - EQUIVALENCE (integer_types(9), H5T_STD_U8BE) - EQUIVALENCE (integer_types(10), H5T_STD_U8LE) - EQUIVALENCE (integer_types(11), H5T_STD_U16BE) - EQUIVALENCE (integer_types(12), H5T_STD_U16LE) - EQUIVALENCE (integer_types(13), H5T_STD_U32BE) - EQUIVALENCE (integer_types(14), H5T_STD_U32LE) - EQUIVALENCE (integer_types(15), H5T_STD_U64BE) - EQUIVALENCE (integer_types(16), H5T_STD_U64LE) - EQUIVALENCE (integer_types(17), H5T_STRING) - EQUIVALENCE (integer_types(18), H5T_STD_B8BE) - EQUIVALENCE (integer_types(19), H5T_STD_B8LE) - EQUIVALENCE (integer_types(20), H5T_STD_B16BE) - EQUIVALENCE (integer_types(21), H5T_STD_B16LE) - EQUIVALENCE (integer_types(22), H5T_STD_B32BE) - EQUIVALENCE (integer_types(23), H5T_STD_B32LE) - EQUIVALENCE (integer_types(24), H5T_STD_B64BE) - EQUIVALENCE (integer_types(25), H5T_STD_B64LE) - EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) - EQUIVALENCE (integer_types(27), H5T_C_S1) - - - ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & - ! H5T_NATIVE_REAL, & - ! H5T_NATIVE_DOUBLE, & - ! H5T_NATIVE_CHARACTER, & - ! H5T_STD_REF_OBJ, & - ! H5T_STD_REF_DSETREG - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ - !DEC$endif - COMMON /PREDEFINED_TYPES/ predef_types - - ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & - ! H5T_IEEE_F32LE, & - ! H5T_IEEE_F64BE, & - ! H5T_IEEE_F64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ - !DEC$endif - COMMON /FLOATING_TYPES/ floating_types - ! - ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & - ! H5T_STD_I8LE, & - ! H5T_STD_I16BE, & - ! H5T_STD_I16LE, & - ! H5T_STD_I32BE, & - ! H5T_STD_I32LE, & - ! H5T_STD_I64BE, & - ! H5T_STD_I64LE, & - ! H5T_STD_U8BE, & - ! H5T_STD_U8LE, & - ! H5T_STD_U16BE, & - ! H5T_STD_U16LE, & - ! H5T_STD_U32BE, & - ! H5T_STD_U32LE, & - ! H5T_STD_U64BE, & - ! H5T_STD_U64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ - !DEC$endif - COMMON /INTEGER_TYPES/ integer_types - ! - ! Fortran flags - ! - ! - ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) - ! - ! NOTE: H5F_ACC_DEBUG is deprecated (nonfunctional) but retained for - ! backward compatibility since it's in the public API. - ! - ! H5F flags declaration - ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 - INTEGER :: H5F_flags(H5F_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ - !DEC$endif - COMMON /H5F_FLAGS/ H5F_flags - - INTEGER :: H5F_ACC_RDWR_F - INTEGER :: H5F_ACC_RDONLY_F - INTEGER :: H5F_ACC_TRUNC_F - INTEGER :: H5F_ACC_EXCL_F - INTEGER :: H5F_ACC_DEBUG_F - INTEGER :: H5F_SCOPE_LOCAL_F - INTEGER :: H5F_SCOPE_GLOBAL_F - INTEGER :: H5F_CLOSE_DEFAULT_F - INTEGER :: H5F_CLOSE_WEAK_F - INTEGER :: H5F_CLOSE_SEMI_F - INTEGER :: H5F_CLOSE_STRONG_F - INTEGER :: H5F_OBJ_FILE_F - INTEGER :: H5F_OBJ_DATASET_F - INTEGER :: H5F_OBJ_GROUP_F - INTEGER :: H5F_OBJ_DATATYPE_F - INTEGER :: H5F_OBJ_ALL_F - INTEGER :: H5F_LIBVER_EARLIEST_F - INTEGER :: H5F_LIBVER_LATEST_F - INTEGER :: H5F_UNLIMITED_F - - EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) - EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) - EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) - EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) - EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) - EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) - EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) - EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) - EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) - EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) - EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) - EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) - EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) - EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) - EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) - EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) - EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) - EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) - EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) - ! - ! H5generic flags declaration - ! - INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 - INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ - !DEC$endif - COMMON /H5generic_FLAGS/ H5generic_flags - - INTEGER :: H5_INDEX_UNKNOWN_F - INTEGER :: H5_INDEX_NAME_F - INTEGER :: H5_INDEX_CRT_ORDER_F - INTEGER :: H5_INDEX_N_F - INTEGER :: H5_ITER_UNKNOWN_F - INTEGER :: H5_ITER_INC_F - INTEGER :: H5_ITER_DEC_F - INTEGER :: H5_ITER_NATIVE_F - INTEGER :: H5_ITER_N_F - - EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) - EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) - EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) - EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) - EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) - EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) - EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) - ! - ! H5G flags declaration - ! - INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 - INTEGER :: H5G_flags(H5G_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ - !DEC$endif - COMMON /H5G_FLAGS/ H5G_flags - - INTEGER :: H5G_UNKNOWN_F - INTEGER :: H5G_GROUP_F - INTEGER :: H5G_DATASET_F - INTEGER :: H5G_TYPE_F - INTEGER :: H5G_LINK_F - INTEGER :: H5G_UDLINK_F - INTEGER :: H5G_SAME_LOC_F - INTEGER :: H5G_LINK_ERROR_F - INTEGER :: H5G_LINK_HARD_F - INTEGER :: H5G_LINK_SOFT_F - INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F - INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F - INTEGER :: H5G_STORAGE_TYPE_COMPACT_F - INTEGER :: H5G_STORAGE_TYPE_DENSE_F - - EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type - EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group - EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type - EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) - EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) - EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) - EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) - - EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) - EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) - EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) - EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) - ! - ! H5D flags declaration - ! - - INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 - INTEGER :: H5D_flags(H5D_FLAGS_LEN) - INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 - INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ - !DEC$endif - COMMON /H5D_FLAGS/ H5D_flags - COMMON /H5D_SIZE_FLAGS/ H5D_size_flags - - INTEGER :: H5D_COMPACT_F - INTEGER :: H5D_CONTIGUOUS_F - INTEGER :: H5D_CHUNKED_F - - INTEGER :: H5D_ALLOC_TIME_ERROR_F - INTEGER :: H5D_ALLOC_TIME_DEFAULT_F - INTEGER :: H5D_ALLOC_TIME_EARLY_F - INTEGER :: H5D_ALLOC_TIME_LATE_F - INTEGER :: H5D_ALLOC_TIME_INCR_F - - INTEGER :: H5D_SPACE_STS_ERROR_F - INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_ALLOCATED_F - - INTEGER :: H5D_FILL_TIME_ERROR_F - INTEGER :: H5D_FILL_TIME_ALLOC_F - INTEGER :: H5D_FILL_TIME_NEVER_F - - INTEGER :: H5D_FILL_VALUE_ERROR_F - INTEGER :: H5D_FILL_VALUE_UNDEFINED_F - INTEGER :: H5D_FILL_VALUE_DEFAULT_F - INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F - -! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 -! characters for variable names in Fortran. -! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 -! characters for variable names in Fortran. - - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F - INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F - INTEGER :: H5D_MPIO_NO_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F - INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_MIXED_F - INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F - - EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) - EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) - EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) - - EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) - EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) - EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) - EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) - - EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) - EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) - EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) - EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) - - EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) - EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) - - EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) - EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) - EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) - EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) - - EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) - EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) - EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) - EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) - - EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) - EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) - - ! - ! H5E flags declaration - ! - INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 - INTEGER :: H5E_flags(H5E_FLAGS_LEN) - INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 - INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ - !DEC$endif - COMMON /H5E_FLAGS/ H5E_flags - COMMON /H5E_HID_FLAGS/ H5E_hid_flags - - INTEGER(HID_T) :: H5E_DEFAULT_F - INTEGER :: H5E_MAJOR_F - INTEGER :: H5E_MINOR_F - INTEGER :: H5E_WALK_UPWARD_F - INTEGER :: H5E_WALK_DOWNWARD_F - - EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) - EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) - EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) - EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) - EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) - - ! - ! H5FD flags declaration - ! - INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 - INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ - !DEC$endif - COMMON /H5FD_FLAGS/ H5FD_flags - - INTEGER :: H5FD_MPIO_INDEPENDENT_F - INTEGER :: H5FD_MPIO_COLLECTIVE_F - INTEGER :: H5FD_MEM_NOLIST_F - INTEGER :: H5FD_MEM_DEFAULT_F - INTEGER :: H5FD_MEM_SUPER_F - INTEGER :: H5FD_MEM_BTREE_F - INTEGER :: H5FD_MEM_DRAW_F - INTEGER :: H5FD_MEM_GHEAP_F - INTEGER :: H5FD_MEM_LHEAP_F - INTEGER :: H5FD_MEM_OHDR_F - INTEGER :: H5FD_MEM_NTYPES_F - - EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) - EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) - EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) - EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) - EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) - EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) - EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) - EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) - EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) - EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) - EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) - ! - ! H5FD file drivers flags declaration - ! - INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 - INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ - !DEC$endif - COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags - - INTEGER(HID_T) :: H5FD_CORE_F - INTEGER(HID_T) :: H5FD_FAMILY_F - INTEGER(HID_T) :: H5FD_LOG_F - INTEGER(HID_T) :: H5FD_MPIO_F - INTEGER(HID_T) :: H5FD_MULTI_F - INTEGER(HID_T) :: H5FD_SEC2_F - INTEGER(HID_T) :: H5FD_STDIO_F - - EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) - EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) - EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) - EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) - EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) - EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) - EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) - - ! - ! H5I flags declaration - ! - INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 - INTEGER :: H5I_flags(H5I_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ - !DEC$endif - COMMON /H5I_FLAGS/ H5I_flags - - INTEGER :: H5I_FILE_F - INTEGER :: H5I_GROUP_F - INTEGER :: H5I_DATATYPE_F - INTEGER :: H5I_DATASPACE_F - INTEGER :: H5I_DATASET_F - INTEGER :: H5I_ATTR_F - INTEGER :: H5I_BADID_F - - EQUIVALENCE(H5I_flags(1), H5I_FILE_F) - EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) - EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) - EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) - EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) - EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) - EQUIVALENCE(H5I_flags(7), H5I_BADID_F) - ! - ! H5L flags declaration - ! - INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 - INTEGER :: H5L_flags(H5L_FLAGS_LEN) - - INTEGER :: H5L_TYPE_ERROR_F - INTEGER :: H5L_TYPE_HARD_F - INTEGER :: H5L_TYPE_SOFT_F - INTEGER :: H5L_TYPE_EXTERNAL_F - INTEGER :: H5L_SAME_LOC_F - INTEGER :: H5L_LINK_CLASS_T_VERS_F - - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ - !DEC$endif - COMMON /H5L_FLAGS/ H5L_flags - - EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) - EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) - EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) - EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) - EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) - EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) - ! - ! H5O flags declaration - ! - INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 - INTEGER :: H5o_flags(H5O_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ - !DEC$endif - COMMON /H5O_FLAGS/ H5O_flags - - INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO - INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE - INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER - INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE - INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F - INTEGER :: H5O_COPY_ALL_F - INTEGER :: H5O_SHMESG_NONE_FLAG_F - INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F - INTEGER :: H5O_SHMESG_DTYPE_FLAG_F - INTEGER :: H5O_SHMESG_FILL_FLAG_F - INTEGER :: H5O_SHMESG_PLINE_FLAG_F - INTEGER :: H5O_SHMESG_ATTR_FLAG_F - INTEGER :: H5O_SHMESG_ALL_FLAG_F - INTEGER :: H5O_HDR_CHUNK0_SIZE_F - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE - INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** - INTEGER :: H5O_HDR_STORE_TIMES_F - INTEGER :: H5O_HDR_ALL_FLAGS_F - INTEGER :: H5O_SHMESG_MAX_NINDEXES_F - INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F - INTEGER :: H5O_TYPE_UNKNOWN_F - INTEGER :: H5O_TYPE_GROUP_F - INTEGER :: H5O_TYPE_DATASET_F - INTEGER :: H5O_TYPE_NAMED_DATATYPE_F - INTEGER :: H5O_TYPE_NTYPES_F - - EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) - EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) - EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) - EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) - EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) - EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) - EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) - EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) - EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) - EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) - EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) - EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) - EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) - EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) - EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) - EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) - EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) - EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) - EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) - EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) - EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) - EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) - EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) - EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) - EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) - - ! - ! H5P flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 - INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ - !DEC$endif - COMMON /H5P_FLAGS/ H5P_flags - - INTEGER(HID_T) :: H5P_FILE_CREATE_F - INTEGER(HID_T) :: H5P_FILE_ACCESS_F - INTEGER(HID_T) :: H5P_DATASET_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_XFER_F - INTEGER(HID_T) :: H5P_FILE_MOUNT_F - INTEGER(HID_T) :: H5P_DEFAULT_F - INTEGER(HID_T) :: H5P_ROOT_F - INTEGER(HID_T) :: H5P_OBJECT_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_ACCESS_F - INTEGER(HID_T) :: H5P_GROUP_CREATE_F - INTEGER(HID_T) :: H5P_GROUP_ACCESS_F - INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F - INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F - INTEGER(HID_T) :: H5P_STRING_CREATE_F - INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F - INTEGER(HID_T) :: H5P_OBJECT_COPY_F - INTEGER(HID_T) :: H5P_LINK_CREATE_F - INTEGER(HID_T) :: H5P_LINK_ACCESS_F - - EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) - EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) - EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) - EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) - EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) - EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) - EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) - EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) - EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) - EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) - EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) - EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) - EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) - EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) - EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) - EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) - EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) - EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) - - ! - ! H5P integers flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 - INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ - !DEC$endif - COMMON /H5P_FLAGS_INT/ H5P_flags_int - INTEGER :: H5P_CRT_ORDER_INDEXED_F - INTEGER :: H5P_CRT_ORDER_TRACKED_F - EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) - EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) - ! - ! H5R flags declaration - ! - INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 - INTEGER :: H5R_flags(H5R_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ - !DEC$endif - COMMON /H5R_FLAGS/ H5R_flags - - INTEGER :: H5R_OBJECT_F - INTEGER :: H5R_DATASET_REGION_F - - EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) - EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) - - ! - ! H5S flags declaration - ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 - INTEGER :: H5S_flags(H5S_FLAGS_LEN) - INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 - INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ - !DEC$endif - COMMON /H5S_FLAGS/ H5S_flags - COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags - - INTEGER(HSIZE_T) :: H5S_UNLIMITED_F - - INTEGER :: H5S_SCALAR_F - INTEGER :: H5S_SIMPLE_F - INTEGER :: H5S_NULL_F - - INTEGER :: H5S_ALL_F - - INTEGER :: H5S_SELECT_NOOP_F - INTEGER :: H5S_SELECT_SET_F - INTEGER :: H5S_SELECT_OR_F - INTEGER :: H5S_SELECT_AND_F - INTEGER :: H5S_SELECT_XOR_F - INTEGER :: H5S_SELECT_NOTB_F - INTEGER :: H5S_SELECT_NOTA_F - INTEGER :: H5S_SELECT_APPEND_F - INTEGER :: H5S_SELECT_PREPEND_F - INTEGER :: H5S_SELECT_INVALID_F - - INTEGER :: H5S_SEL_ERROR_F - INTEGER :: H5S_SEL_NONE_F - INTEGER :: H5S_SEL_POINTS_F - INTEGER :: H5S_SEL_HYPERSLABS_F - INTEGER :: H5S_SEL_ALL_F - - EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) - EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) - EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) - EQUIVALENCE(H5S_flags(3), H5S_NULL_F) - EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) - EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) - EQUIVALENCE(H5S_flags(6), H5S_ALL_F) - - EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) - EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) - EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) - - - EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) - EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) - EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) - EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) - EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) - - ! - ! H5T flags declaration - ! - INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 - INTEGER :: H5T_flags(H5T_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ - !DEC$endif - COMMON /H5T_FLAGS/ H5T_flags - - INTEGER :: H5T_NO_CLASS_F - INTEGER :: H5T_INTEGER_F - INTEGER :: H5T_FLOAT_F - INTEGER :: H5T_TIME_F - INTEGER :: H5T_STRING_F - INTEGER :: H5T_BITFIELD_F - INTEGER :: H5T_OPAQUE_F - INTEGER :: H5T_COMPOUND_F - INTEGER :: H5T_REFERENCE_F - INTEGER :: H5T_ENUM_F - INTEGER :: H5T_VLEN_F - INTEGER :: H5T_ARRAY_F - INTEGER :: H5T_ORDER_LE_F - INTEGER :: H5T_ORDER_BE_F - INTEGER :: H5T_ORDER_VAX_F - INTEGER :: H5T_ORDER_NONE_F - INTEGER :: H5T_ORDER_MIXED_F - INTEGER :: H5T_PAD_ZERO_F - INTEGER :: H5T_PAD_ONE_F - INTEGER :: H5T_PAD_BACKGROUND_F - INTEGER :: H5T_PAD_ERROR_F - INTEGER :: H5T_SGN_NONE_F - INTEGER :: H5T_SGN_2_F - INTEGER :: H5T_SGN_ERROR_F - INTEGER :: H5T_NORM_IMPLIED_F - INTEGER :: H5T_NORM_MSBSET_F - INTEGER :: H5T_NORM_NONE_F - INTEGER :: H5T_CSET_ASCII_F - INTEGER :: H5T_CSET_UTF8_F - INTEGER :: H5T_STR_NULLTERM_F - INTEGER :: H5T_STR_NULLPAD_F - INTEGER :: H5T_STR_SPACEPAD_F - INTEGER :: H5T_STR_ERROR_F - INTEGER :: H5T_DIR_ASCEND_F - INTEGER :: H5T_DIR_DESCEND_F - - EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) - EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) - EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) - EQUIVALENCE(H5T_flags(4), H5T_TIME_F) - EQUIVALENCE(H5T_flags(5), H5T_STRING_F) - EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) - EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) - EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) - EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) - EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) - EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) - EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) - EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) - EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) - EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) - EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) - EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) - EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) - EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) - EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) - EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) - EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) - EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) - EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) - EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) - EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) - EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) - EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) - EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) - EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) - EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) - EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) - EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) - EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) - EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) - ! - ! H5Z flags declaration - ! - INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 - INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ - !DEC$endif - COMMON /H5Z_FLAGS/ H5Z_flags - - INTEGER :: H5Z_FILTER_ERROR_F - INTEGER :: H5Z_FILTER_NONE_F - INTEGER :: H5Z_FILTER_ALL_F - INTEGER :: H5Z_FILTER_DEFLATE_F - INTEGER :: H5Z_FILTER_SHUFFLE_F - INTEGER :: H5Z_FILTER_FLETCHER32_F - INTEGER :: H5Z_FILTER_SZIP_F - INTEGER :: H5Z_ERROR_EDC_F - INTEGER :: H5Z_DISABLE_EDC_F - INTEGER :: H5Z_ENABLE_EDC_F - INTEGER :: H5Z_NO_EDC_F - INTEGER :: H5Z_FLAG_OPTIONAL_F - INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F - INTEGER :: H5Z_FILTER_DECODE_ENABLED_F - INTEGER :: H5Z_FILTER_NBIT_F - INTEGER :: H5Z_FILTER_SCALEOFFSET_F - INTEGER :: H5Z_SO_FLOAT_DSCALE_F - INTEGER :: H5Z_SO_FLOAT_ESCALE_F - INTEGER :: H5Z_SO_INT_F - INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F - - EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) - EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) - EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) - EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) - EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) - EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) - EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) - EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) - EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) - EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) - EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) - EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) - EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) - EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) - EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) - EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) - EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) - EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) - - ! - ! H5 Library flags declaration - ! - INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 - INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ - !DEC$endif - COMMON /H5LIB_FLAGS/ H5LIB_flags - INTEGER :: H5_SZIP_EC_OM_F - INTEGER :: H5_SZIP_NN_OM_F - ! - EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) - EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) - - - ! General H5 flags declarations - ! -!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 -!!$ INTEGER H5_flags(H5_FLAGS_LEN) -!!$!DEC$if defined(BUILD_HDF5_DLL) -!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ -!!$!DEC$endif -!!$ COMMON /H5_FLAGS/ H5_flags -!!$ -!!$ INTEGER :: _F -!!$ INTEGER :: H5F_SCOPE_LOCAL_F -!!$ -!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) -!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) - -END MODULE H5GLOBAL - diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index 0bc721f..c6c874f 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -1,6 +1,6 @@ /****h* H5f90kit/H5f90kit * PURPOSE - * Routines from HDF4 to deal with C-FORTRAN issues: + * Routines from HDF4 to deal with C-FORTRAN issues: * * HD5f2cstring -- convert a Fortran string to a C string * HD5packFstring -- convert a C string into a Fortran string @@ -31,16 +31,16 @@ /****if* H5f90kit/HDf2cstring * NAME * HD5f2cstring -- convert a Fortran string to a C string - * char * HDf2cstring(fdesc, len) + * char * HDf2cstring(fdesc, len) * INPUTS * _fcd fdesc; IN: Fortran string descriptor - * int len; IN: length of Fortran string + * int len; IN: length of Fortran string * RETURNS - * Pointer to the C string if success, else NULL + * Pointer to the C string if success, else NULL * PURPOSE - * Chop off trailing blanks off of a Fortran string and - * move it into a newly allocated C string. It is up - * to the user to free this string. + * Chop off trailing blanks off of a Fortran string and + * move it into a newly allocated C string. It is up + * to the user to free this string. * SOURCE */ char * @@ -72,21 +72,21 @@ HD5f2cstring(_fcd fdesc, size_t len) /****if* H5f90kit/HD5packFstring * NAME * HD5packFstring -- convert a C string into a Fortran string - * int HD5packFstring(src, dest, len) + * int HD5packFstring(src, dest, len) * INPUTS - * char * src; IN: source string - * int len; IN: length of string + * char * src; IN: source string + * int len; IN: length of string * OUTPUTS - * char * dest; OUT: destination + * char * dest; OUT: destination * RETURNS * SUCCEED / FAIL * PURPOSE - * given a NULL terminated C string 'src' convert it to - * a space padded Fortran string 'dest' of length 'len' + * given a NULL terminated C string 'src' convert it to + * a space padded Fortran string 'dest' of length 'len' * - * This is very similar to HDc2fstr except that function does - * it in place and this one copies. We should probably only - * support one of these. + * This is very similar to HDc2fstr except that function does + * it in place and this one copies. We should probably only + * support one of these. * SOURCE */ void diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 6bde877..b26e985 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -18,6 +18,7 @@ #define _H5f90proto_H #include "H5public.h" +#include "H5f90.h" H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len); @@ -80,1236 +81,505 @@ typedef struct H5O_info_t_f { /* * Functions from H5Ff.c */ -#define nh5fcreate_c H5_FC_FUNC_(h5fcreate_c, H5FCREATE_C) -#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C) -#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C) -#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C) -#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C) -#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C) -#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C) -#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C) -#define nh5fget_create_plist_c H5_FC_FUNC_(h5fget_create_plist_c, H5FGET_CREATE_PLIST_C) -#define nh5fget_access_plist_c H5_FC_FUNC_(h5fget_access_plist_c, H5FGET_ACCESS_PLIST_C) -#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_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C) -#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C) - -H5_FCDLL int_f nh5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); -H5_FCDLL int_f nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag); -H5_FCDLL int_f nh5fclose_c (hid_t_f *file_id); -H5_FCDLL int_f nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); -H5_FCDLL int_f nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen); -H5_FCDLL int_f nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2); -H5_FCDLL int_f nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id); -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 h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id); +H5_FCDLL int_f h5fis_hdf5_c(_fcd name, int_f *namelen, int_f *flag); +H5_FCDLL int_f h5fclose_c(hid_t_f *file_id); +H5_FCDLL int_f h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp); +H5_FCDLL int_f h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen); +H5_FCDLL int_f h5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2); +H5_FCDLL int_f h5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id); +H5_FCDLL int_f h5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id); +H5_FCDLL int_f h5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count); +H5_FCDLL int_f h5fget_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 h5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space); H5_FCDLL int_f h5fget_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); +H5_FCDLL int_f h5fflush_c(hid_t_f *obj_id, int_f *scope); +H5_FCDLL int_f h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen); +H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size); /* * Functions from H5Sf.c */ -#define nh5screate_simple_c H5_FC_FUNC_(h5screate_simple_c, H5SCREATE_SIMPLE_C) -#define nh5sclose_c H5_FC_FUNC_(h5sclose_c, H5SCLOSE_C) -#define nh5screate_c H5_FC_FUNC_(h5screate_c, H5SCREATE_C) -#define nh5scopy_c H5_FC_FUNC_(h5scopy_c, H5SCOPY_C) -#define nh5sget_select_hyper_nblocks_c H5_FC_FUNC_(h5sget_select_hyper_nblocks_c, H5SGET_SELECT_HYPER_NBLOCKS_C) -#define nh5sget_select_hyper_blocklist_c H5_FC_FUNC_(h5sget_select_hyper_blocklist_c, H5SGET_SELECT_HYPER_BLOCKLIST_C) -#define nh5sget_select_elem_npoints_c H5_FC_FUNC_(h5sget_select_elem_npoints_c, H5SGET_SELECT_ELEM_NPOINTS_C) -#define nh5sget_select_elem_pointlist_c H5_FC_FUNC_(h5sget_select_elem_pointlist_c, H5SGET_SELECT_ELEM_POINTLIST_C) -#define nh5sget_select_bounds_c H5_FC_FUNC_(h5sget_select_bounds_c, H5SGET_SELECT_BOUNDS_C) -#define nh5sselect_all_c H5_FC_FUNC_(h5sselect_all_c, H5SSELECT_ALL_C) -#define nh5sselect_none_c H5_FC_FUNC_(h5sselect_none_c, H5SSELECT_NONE_C) -#define nh5sselect_valid_c H5_FC_FUNC_(h5sselect_valid_c, H5SSELECT_VALID_C) -#define nh5sget_simple_extent_npoints_c H5_FC_FUNC_(h5sget_simple_extent_npoints_c, H5SGET_SIMPLE_EXTENT_NPOINTS_C) -#define nh5sget_select_npoints_c H5_FC_FUNC_(h5sget_select_npoints_c, H5SGET_SELECT_NPOINTS_C) -#define nh5sget_simple_extent_ndims_c H5_FC_FUNC_(h5sget_simple_extent_ndims_c, H5SGET_SIMPLE_EXTENT_NDIMS_C) -#define nh5sget_simple_extent_type_c H5_FC_FUNC_(h5sget_simple_extent_type_c, H5SGET_SIMPLE_EXTENT_TYPE_C) -#define nh5soffset_simple_c H5_FC_FUNC_(h5soffset_simple_c, H5SOFFSET_SIMPLE_C) -#define nh5sset_extent_simple_c H5_FC_FUNC_(h5sset_extent_simple_c, H5SSET_EXTENT_SIMPLE_C) -#define nh5sis_simple_c H5_FC_FUNC_(h5sis_simple_c, H5SIS_SIMPLE_C) -#define nh5sextent_class_c H5_FC_FUNC_(h5sextent_class_c, H5SEXTENT_CLASS_C) -#define nh5sget_simple_extent_dims_c H5_FC_FUNC_(h5sget_simple_extent_dims_c, H5SGET_SIMPLE_EXTENT_DIMS_C) -#define nh5sextent_copy_c H5_FC_FUNC_(h5sextent_copy_c, H5SEXTENT_COPY_C) -#define nh5sset_extent_none_c H5_FC_FUNC_(h5sset_extent_none_c, H5SSET_EXTENT_NONE_C) -#define nh5sselect_hyperslab_c H5_FC_FUNC_(h5sselect_hyperslab_c, H5SSELECT_HYPERSLAB_C) -#define nh5scombine_hyperslab_c H5_FC_FUNC_(h5scombine_hyperslab_c, H5SCOMBINE_HYPERSLAB_C) -#define nh5scombine_select_c H5_FC_FUNC_(h5scombine_select_c, H5SCOMBINE_SELECT_C) -#define nh5sselect_select_c H5_FC_FUNC_(h5sselect_select_c, H5SSELECT_SELECT_C) -#define nh5sget_select_type_c H5_FC_FUNC_(h5sget_select_type_c, H5SGET_SELECT_TYPE_C) -#define nh5sselect_elements_c H5_FC_FUNC_(h5sselect_elements_c, H5SSELECT_ELEMENTS_C) -#define nh5sdecode_c H5_FC_FUNC_(h5sdecode_c, H5SDECODE_C) -#define nh5sencode_c H5_FC_FUNC_(h5sencode_c, H5SENCODE_C) -#define nh5sextent_equal_c H5_FC_FUNC_(h5sextent_equal_c, H5SEXTENT_EQUAL_C) - -H5_FCDLL int_f nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); -H5_FCDLL int_f nh5sclose_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5screate_c ( int_f *classtype, hid_t_f *space_id ); -H5_FCDLL int_f nh5scopy_c ( hid_t_f *space_id , hid_t_f *new_space_id); -H5_FCDLL int_f nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); -H5_FCDLL int_f nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); -H5_FCDLL int_f nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); -H5_FCDLL int_f nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); -H5_FCDLL int_f nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); -H5_FCDLL int_f nh5sselect_all_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ); -H5_FCDLL int_f nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ); -H5_FCDLL int_f nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ); -H5_FCDLL int_f nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset); -H5_FCDLL int_f nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); -H5_FCDLL int_f nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ); -H5_FCDLL int_f nh5sextent_class_c ( hid_t_f *space_id , int_f *classtype); -H5_FCDLL int_f nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); -H5_FCDLL int_f nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id); -H5_FCDLL int_f nh5sset_extent_none_c ( hid_t_f *space_id ); -H5_FCDLL int_f nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); -H5_FCDLL int_f nh5sget_select_type_c ( hid_t_f *space_id , int_f *op); -H5_FCDLL int_f nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); -H5_FCDLL int_f nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); -H5_FCDLL int_f nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); -H5_FCDLL int_f nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); -H5_FCDLL int_f nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); +H5_FCDLL int_f h5screate_simple_c( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ); +H5_FCDLL int_f h5sclose_c( hid_t_f *space_id ); +H5_FCDLL int_f h5screate_c( int_f *classtype, hid_t_f *space_id ); +H5_FCDLL int_f h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id); +H5_FCDLL int_f h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks); +H5_FCDLL int_f h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf); +H5_FCDLL int_f h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end); +H5_FCDLL int_f h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points); +H5_FCDLL int_f h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf); +H5_FCDLL int_f h5sselect_all_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_none_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_valid_c( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sget_simple_extent_npoints_c( hid_t_f *space_id , hsize_t_f *npoints ); +H5_FCDLL int_f h5sget_select_npoints_c( hid_t_f *space_id , hssize_t_f *npoints ); +H5_FCDLL int_f h5sget_simple_extent_ndims_c( hid_t_f *space_id , int_f *ndims ); +H5_FCDLL int_f h5sget_simple_extent_type_c( hid_t_f *space_id , int_f *classtype); +H5_FCDLL int_f h5soffset_simple_c( hid_t_f *space_id , hssize_t_f *offset); +H5_FCDLL int_f h5sset_extent_simple_c( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size); +H5_FCDLL int_f h5sis_simple_c( hid_t_f *space_id , int_f *flag ); +H5_FCDLL int_f h5sget_simple_extent_dims_c( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims); +H5_FCDLL int_f h5sextent_copy_c( hid_t_f *dest_space_id , hid_t_f *source_space_id); +H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id ); +H5_FCDLL int_f h5sselect_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block); +H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op); +H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord); +H5_FCDLL int_f h5scombine_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id); +H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id); +H5_FCDLL int_f h5sselect_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id); +H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal); /* * Functions from H5Df.c */ -#define nh5dcreate_c H5_FC_FUNC_(h5dcreate_c, H5DCREATE_C) -#define nh5dclose_c H5_FC_FUNC_(h5dclose_c, H5DCLOSE_C) -#define nh5dopen_c H5_FC_FUNC_(h5dopen_c, H5DOPEN_C) -#define nh5dwrite_c H5_FC_FUNC_(h5dwrite_c, H5DWRITE_C) -#define nh5dwrite_integer_s_c H5_FC_FUNC_(h5dwrite_integer_s_c, H5DWRITE_INTEGER_S_C) -#define nh5dwrite_integer_1_c H5_FC_FUNC_(h5dwrite_integer_1_c, H5DWRITE_INTEGER_1_C) -#define nh5dwrite_integer_2_c H5_FC_FUNC_(h5dwrite_integer_2_c, H5DWRITE_INTEGER_2_C) -#define nh5dwrite_integer_3_c H5_FC_FUNC_(h5dwrite_integer_3_c, H5DWRITE_INTEGER_3_C) -#define nh5dwrite_integer_4_c H5_FC_FUNC_(h5dwrite_integer_4_c, H5DWRITE_INTEGER_4_C) -#define nh5dwrite_integer_5_c H5_FC_FUNC_(h5dwrite_integer_5_c, H5DWRITE_INTEGER_5_C) -#define nh5dwrite_integer_6_c H5_FC_FUNC_(h5dwrite_integer_6_c, H5DWRITE_INTEGER_6_C) -#define nh5dwrite_integer_7_c H5_FC_FUNC_(h5dwrite_integer_7_c, H5DWRITE_INTEGER_7_C) -#define nh5dwrite_real_s_c H5_FC_FUNC_(h5dwrite_real_s_c, H5DWRITE_REAL_S_C) -#define nh5dwrite_real_1_c H5_FC_FUNC_(h5dwrite_real_1_c, H5DWRITE_REAL_1_C) -#define nh5dwrite_real_2_c H5_FC_FUNC_(h5dwrite_real_2_c, H5DWRITE_REAL_2_C) -#define nh5dwrite_real_3_c H5_FC_FUNC_(h5dwrite_real_3_c, H5DWRITE_REAL_3_C) -#define nh5dwrite_real_4_c H5_FC_FUNC_(h5dwrite_real_4_c, H5DWRITE_REAL_4_C) -#define nh5dwrite_real_5_c H5_FC_FUNC_(h5dwrite_real_5_c, H5DWRITE_REAL_5_C) -#define nh5dwrite_real_6_c H5_FC_FUNC_(h5dwrite_real_6_c, H5DWRITE_REAL_6_C) -#define nh5dwrite_real_7_c H5_FC_FUNC_(h5dwrite_real_7_c, H5DWRITE_REAL_7_C) -#define nh5dwrite_double_s_c H5_FC_FUNC_(h5dwrite_double_s_c, H5DWRITE_DOUBLE_S_C) -#define nh5dwrite_double_1_c H5_FC_FUNC_(h5dwrite_double_1_c, H5DWRITE_DOUBLE_1_C) -#define nh5dwrite_double_2_c H5_FC_FUNC_(h5dwrite_double_2_c, H5DWRITE_DOUBLE_2_C) -#define nh5dwrite_double_3_c H5_FC_FUNC_(h5dwrite_double_3_c, H5DWRITE_DOUBLE_3_C) -#define nh5dwrite_double_4_c H5_FC_FUNC_(h5dwrite_double_4_c, H5DWRITE_DOUBLE_4_C) -#define nh5dwrite_double_5_c H5_FC_FUNC_(h5dwrite_double_5_c, H5DWRITE_DOUBLE_5_C) -#define nh5dwrite_double_6_c H5_FC_FUNC_(h5dwrite_double_6_c, H5DWRITE_DOUBLE_6_C) -#define nh5dwrite_double_7_c H5_FC_FUNC_(h5dwrite_double_7_c, H5DWRITE_DOUBLE_7_C) -#define nh5dwrite_ref_obj_c H5_FC_FUNC_(h5dwrite_ref_obj_c, H5DWRITE_REF_OBJ_C) -#define nh5dwrite_ref_reg_c H5_FC_FUNC_(h5dwrite_ref_reg_c, H5DWRITE_REF_REG_C) -#define nh5dwritec_c H5_FC_FUNC_(h5dwritec_c, H5DWRITEC_C) -#define nh5dwritec_s_c H5_FC_FUNC_(h5dwritec_s_c, H5DWRITEC_S_C) -#define nh5dwritec_1_c H5_FC_FUNC_(h5dwritec_1_c, H5DWRITEC_1_C) -#define nh5dwritec_2_c H5_FC_FUNC_(h5dwritec_2_c, H5DWRITEC_2_C) -#define nh5dwritec_3_c H5_FC_FUNC_(h5dwritec_3_c, H5DWRITEC_3_C) -#define nh5dwritec_4_c H5_FC_FUNC_(h5dwritec_4_c, H5DWRITEC_4_C) -#define nh5dwritec_5_c H5_FC_FUNC_(h5dwritec_5_c, H5DWRITEC_5_C) -#define nh5dwritec_6_c H5_FC_FUNC_(h5dwritec_6_c, H5DWRITEC_6_C) -#define nh5dwritec_7_c H5_FC_FUNC_(h5dwritec_7_c, H5DWRITEC_7_C) -#define nh5dread_c H5_FC_FUNC_(h5dread_c, H5DREAD_C) -#define nh5dread_integer_s_c H5_FC_FUNC_(h5dread_integer_s_c, H5DREAD_INTEGER_S_C) -#define nh5dread_integer_1_c H5_FC_FUNC_(h5dread_integer_1_c, H5DREAD_INTEGER_1_C) -#define nh5dread_integer_2_c H5_FC_FUNC_(h5dread_integer_2_c, H5DREAD_INTEGER_2_C) -#define nh5dread_integer_3_c H5_FC_FUNC_(h5dread_integer_3_c, H5DREAD_INTEGER_3_C) -#define nh5dread_integer_4_c H5_FC_FUNC_(h5dread_integer_4_c, H5DREAD_INTEGER_4_C) -#define nh5dread_integer_5_c H5_FC_FUNC_(h5dread_integer_5_c, H5DREAD_INTEGER_5_C) -#define nh5dread_integer_6_c H5_FC_FUNC_(h5dread_integer_6_c, H5DREAD_INTEGER_6_C) -#define nh5dread_integer_7_c H5_FC_FUNC_(h5dread_integer_7_c, H5DREAD_INTEGER_7_C) -#define nh5dread_real_s_c H5_FC_FUNC_(h5dread_real_s_c, H5DREAD_REAL_S_C) -#define nh5dread_real_1_c H5_FC_FUNC_(h5dread_real_1_c, H5DREAD_REAL_1_C) -#define nh5dread_real_2_c H5_FC_FUNC_(h5dread_real_2_c, H5DREAD_REAL_2_C) -#define nh5dread_real_3_c H5_FC_FUNC_(h5dread_real_3_c, H5DREAD_REAL_3_C) -#define nh5dread_real_4_c H5_FC_FUNC_(h5dread_real_4_c, H5DREAD_REAL_4_C) -#define nh5dread_real_5_c H5_FC_FUNC_(h5dread_real_5_c, H5DREAD_REAL_5_C) -#define nh5dread_real_6_c H5_FC_FUNC_(h5dread_real_6_c, H5DREAD_REAL_6_C) -#define nh5dread_real_7_c H5_FC_FUNC_(h5dread_real_7_c, H5DREAD_REAL_7_C) -#define nh5dread_double_s_c H5_FC_FUNC_(h5dread_double_s_c, H5DREAD_DOUBLE_S_C) -#define nh5dread_double_1_c H5_FC_FUNC_(h5dread_double_1_c, H5DREAD_DOUBLE_1_C) -#define nh5dread_double_2_c H5_FC_FUNC_(h5dread_double_2_c, H5DREAD_DOUBLE_2_C) -#define nh5dread_double_3_c H5_FC_FUNC_(h5dread_double_3_c, H5DREAD_DOUBLE_3_C) -#define nh5dread_double_4_c H5_FC_FUNC_(h5dread_double_4_c, H5DREAD_DOUBLE_4_C) -#define nh5dread_double_5_c H5_FC_FUNC_(h5dread_double_5_c, H5DREAD_DOUBLE_5_C) -#define nh5dread_double_6_c H5_FC_FUNC_(h5dread_double_6_c, H5DREAD_DOUBLE_6_C) -#define nh5dread_double_7_c H5_FC_FUNC_(h5dread_double_7_c, H5DREAD_DOUBLE_7_C) -#define nh5dread_c_b H5_FC_FUNC_(h5dread_c_b, H5DREAD_C_B) -#define nh5dread_ref_reg_c H5_FC_FUNC_(h5dread_ref_reg_c, H5DREAD_REF_REG_C) -#define nh5dread_ref_obj_c H5_FC_FUNC_(h5dread_ref_obj_c, H5DREAD_REF_OBJ_C) -#define nh5dreadc_c H5_FC_FUNC_(h5dreadc_c, H5DREADC_C) -#define nh5dreadc_s_c H5_FC_FUNC_(h5dreadc_s_c, H5DREADC_S_C) -#define nh5dreadc_1_c H5_FC_FUNC_(h5dreadc_1_c, H5DREADC_1_C) -#define nh5dreadc_2_c H5_FC_FUNC_(h5dreadc_2_c, H5DREADC_2_C) -#define nh5dreadc_3_c H5_FC_FUNC_(h5dreadc_3_c, H5DREADC_3_C) -#define nh5dreadc_4_c H5_FC_FUNC_(h5dreadc_4_c, H5DREADC_4_C) -#define nh5dreadc_5_c H5_FC_FUNC_(h5dreadc_5_c, H5DREADC_5_C) -#define nh5dreadc_6_c H5_FC_FUNC_(h5dreadc_6_c, H5DREADC_6_C) -#define nh5dreadc_7_c H5_FC_FUNC_(h5dreadc_7_c, H5DREADC_7_C) -#define nh5dreadc_c_b H5_FC_FUNC_(h5dreadc_c_b, H5DREADC_C_B) -#define nh5dget_space_c H5_FC_FUNC_(h5dget_space_c, H5DGET_SPACE_C) -#define nh5dget_type_c H5_FC_FUNC_(h5dget_type_c, H5DGET_TYPE_C) -#define nh5dget_create_plist_c H5_FC_FUNC_(h5dget_create_plist_c, H5DGET_CREATE_PLIST_C) -#define nh5dset_extent_c H5_FC_FUNC_(h5dset_extent_c, H5DSET_EXTENT_C) -#define nh5dget_storage_size_c H5_FC_FUNC_(h5dget_storage_size_c, H5DGET_STORAGE_SIZE_C) -#define nh5dvlen_get_max_len_c H5_FC_FUNC_(h5dvlen_get_max_len_c, H5DVLEN_GET_MAX_LEN_C) -#define nh5dwrite_vl_integer_c H5_FC_FUNC_(h5dwrite_vl_integer_c, H5DWRITE_VL_INTEGER_C) -#define nh5dread_vl_integer_c H5_FC_FUNC_(h5dread_vl_integer_c, H5DREAD_VL_INTEGER_C) -#define nh5dwrite_vl_real_c H5_FC_FUNC_(h5dwrite_vl_real_c, H5DWRITE_VL_REAL_C) -#define nh5dread_vl_real_c H5_FC_FUNC_(h5dread_vl_real_c, H5DREAD_VL_REAL_C) -#define nh5dwrite_vl_string_c H5_FC_FUNC_(h5dwrite_vl_string_c, H5DWRITE_VL_STRING_C) -#define nh5dread_vl_string_c H5_FC_FUNC_(h5dread_vl_string_c, H5DREAD_VL_STRING_C) -#define nh5dfillc_c H5_FC_FUNC_(h5dfillc_c, H5DFILLC_C) -#define nh5dfill_integer_c H5_FC_FUNC_(h5dfill_integer_c, H5DFILL_INTEGER_C) -#define nh5dfill_real_c H5_FC_FUNC_(h5dfill_real_c, H5DFILL_REAL_C) -#define nh5dfill_double_c H5_FC_FUNC_(h5dfill_double_c, H5DFILL_DOUBLE_C) -#define nh5dget_space_status_c H5_FC_FUNC_(h5dget_space_status_c, H5DGET_SPACE_STATUS_C) -#define nh5dcreate_anon_c H5_FC_FUNC_(h5dcreate_anon_c, H5DCREATE_ANON_C) -#define nh5dget_access_plist_c H5_FC_FUNC_(h5dget_access_plist_c, H5DGET_ACCESS_PLIST_C) - -H5_FCDLL int_f nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f nh5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f nh5dclose_c ( hid_t_f *dset_id ); -H5_FCDLL int_f nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dwrite_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dwrite_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dwritec_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dwritec_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dread_integer_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_integer_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dread_real_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_real_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dread_double_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_double_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); -H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); - -H5_FCDLL int_f nh5dreadc_s_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_1_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_2_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_3_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_4_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_5_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_6_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dreadc_7_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims); -H5_FCDLL int_f nh5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id); - - -H5_FCDLL int_f nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id); -H5_FCDLL int_f nh5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id); -H5_FCDLL int_f nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id); -H5_FCDLL int_f nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims); -H5_FCDLL int_f nh5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); -H5_FCDLL int_f nh5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); -H5_FCDLL int_f nh5dfillc_c(_fcd fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, _fcd buf, hid_t_f *mem_type_id); +H5_FCDLL int_f h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id); +H5_FCDLL int_f h5dclose_c( hid_t_f *dset_id ); + +H5_FCDLL int_f h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims); +H5_FCDLL int_f h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len); +H5_FCDLL int_f h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims); +H5_FCDLL int_f h5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id); +H5_FCDLL int_f h5dget_space_c( hid_t_f *dset_id , hid_t_f *space_id); +H5_FCDLL int_f h5dget_type_c( hid_t_f *dset_id , hid_t_f *type_id); +H5_FCDLL int_f h5dget_create_plist_c( hid_t_f *dset_id , hid_t_f *plist_id); +H5_FCDLL int_f h5dset_extent_c( hid_t_f *dset_id , hsize_t_f *dims); +H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len); +H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size); H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_integer_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_real_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dfill_double_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id); -H5_FCDLL int_f nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag); -H5_FCDLL int_f nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, +H5_FCDLL int_f h5dget_space_status_c( hid_t_f *dset_id, int_f *flag); +H5_FCDLL int_f h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id); -H5_FCDLL int_f h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, +H5_FCDLL int_f h5dread_f_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf); -H5_FCDLL int_f h5dvlen_reclaim_c (hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); +H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf); + /* * Functions from H5Gf.c */ -#define nh5gcreate_c H5_FC_FUNC_(h5gcreate_c, H5GCREATE_C) -#define nh5gclose_c H5_FC_FUNC_(h5gclose_c, H5GCLOSE_C) -#define nh5gopen_c H5_FC_FUNC_(h5gopen_c, H5GOPEN_C) -#define nh5gget_obj_info_idx_c H5_FC_FUNC_(h5gget_obj_info_idx_c, H5GGET_OBJ_INFO_IDX_C) -#define nh5gn_members_c H5_FC_FUNC_(h5gn_members_c, H5GN_MEMBERS_C) -#define nh5glink_c H5_FC_FUNC_(h5glink_c, H5GLINK_C) -#define nh5glink2_c H5_FC_FUNC_(h5glink2_c, H5GLINK2_C) -#define nh5gunlink_c H5_FC_FUNC_(h5gunlink_c, H5GUNLINK_C) -#define nh5gmove_c H5_FC_FUNC_(h5gmove_c, H5GMOVE_C) -#define nh5gmove2_c H5_FC_FUNC_(h5gmove2_c, H5GMOVE2_C) -#define nh5gget_linkval_c H5_FC_FUNC_(h5gget_linkval_c, H5GGET_LINKVAL_C) -#define nh5gset_comment_c H5_FC_FUNC_(h5gset_comment_c, H5GSET_COMMENT_C) -#define nh5gget_comment_c H5_FC_FUNC_(h5gget_comment_c, H5GGET_COMMENT_C) -#define nh5gcreate_anon_c H5_FC_FUNC_(h5gcreate_anon_c, H5GCREATE_ANON_C) -#define nh5gget_create_plist_c H5_FC_FUNC_(h5gget_create_plist_c, H5GGET_CREATE_PLIST_C) -#define nh5gget_info_c H5_FC_FUNC_(h5gget_info_c, H5GGET_INFO_C) -#define nh5gget_info_by_idx_c H5_FC_FUNC_(h5gget_info_by_idx_c, H5GGET_INFO_BY_IDX_C) -#define nh5gget_info_by_name_c H5_FC_FUNC_(h5gget_info_by_name_c, H5GGET_INFO_BY_NAME_C) - - -H5_FCDLL int_f nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, +H5_FCDLL int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id); -H5_FCDLL int_f nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f nh5gclose_c ( hid_t_f *grp_id ); -H5_FCDLL int_f nh5gget_obj_info_idx_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); -H5_FCDLL int_f nh5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); -H5_FCDLL int_f nh5glink_c (hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f nh5glink2_c (hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); -H5_FCDLL int_f nh5gunlink_c (hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f nh5gmove_c (hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f nh5gmove2_c (hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); -H5_FCDLL int_f nh5gget_linkval_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); -H5_FCDLL int_f nh5gset_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); -H5_FCDLL int_f nh5gget_comment_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); -H5_FCDLL int_f nh5gcreate_anon_c (hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); -H5_FCDLL int_f nh5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); -H5_FCDLL int_f nh5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f nh5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gclose_c( hid_t_f *grp_id ); +H5_FCDLL int_f h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type); +H5_FCDLL int_f h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers); +H5_FCDLL int_f h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen); +H5_FCDLL int_f h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen); +H5_FCDLL int_f h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value ); +H5_FCDLL int_f h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen); +H5_FCDLL int_f h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment); +H5_FCDLL int_f h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id); +H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id ); +H5_FCDLL int_f h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); +H5_FCDLL int_f h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); -H5_FCDLL int_f nh5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, +H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted); /* * Functions from H5Af.c */ -#define nh5acreate_c H5_FC_FUNC_(h5acreate_c, H5ACREATE_C) -#define nh5aclose_c H5_FC_FUNC_(h5aclose_c, H5ACLOSE_C) -#define nh5aopen_name_c H5_FC_FUNC_(h5aopen_name_c, H5AOPEN_NAME_C) -#define nh5awrite_c H5_FC_FUNC_(h5awrite_c, H5AWRITE_C) -#define nh5awrite_integer_s_c H5_FC_FUNC_(h5awrite_integer_s_c, H5AWRITE_INTEGER_S_C) -#define nh5awrite_integer_1_c H5_FC_FUNC_(h5awrite_integer_1_c, H5AWRITE_INTEGER_1_C) -#define nh5awrite_integer_2_c H5_FC_FUNC_(h5awrite_integer_2_c, H5AWRITE_INTEGER_2_C) -#define nh5awrite_integer_3_c H5_FC_FUNC_(h5awrite_integer_3_c, H5AWRITE_INTEGER_3_C) -#define nh5awrite_integer_4_c H5_FC_FUNC_(h5awrite_integer_4_c, H5AWRITE_INTEGER_4_C) -#define nh5awrite_integer_5_c H5_FC_FUNC_(h5awrite_integer_5_c, H5AWRITE_INTEGER_5_C) -#define nh5awrite_integer_6_c H5_FC_FUNC_(h5awrite_integer_6_c, H5AWRITE_INTEGER_6_C) -#define nh5awrite_integer_7_c H5_FC_FUNC_(h5awrite_integer_7_c, H5AWRITE_INTEGER_7_C) -#define nh5awrite_real_s_c H5_FC_FUNC_(h5awrite_real_s_c, H5AWRITE_REAL_S_C) -#define nh5awrite_real_1_c H5_FC_FUNC_(h5awrite_real_1_c, H5AWRITE_REAL_1_C) -#define nh5awrite_real_2_c H5_FC_FUNC_(h5awrite_real_2_c, H5AWRITE_REAL_2_C) -#define nh5awrite_real_3_c H5_FC_FUNC_(h5awrite_real_3_c, H5AWRITE_REAL_3_C) -#define nh5awrite_real_4_c H5_FC_FUNC_(h5awrite_real_4_c, H5AWRITE_REAL_4_C) -#define nh5awrite_real_5_c H5_FC_FUNC_(h5awrite_real_5_c, H5AWRITE_REAL_5_C) -#define nh5awrite_real_6_c H5_FC_FUNC_(h5awrite_real_6_c, H5AWRITE_REAL_6_C) -#define nh5awrite_real_7_c H5_FC_FUNC_(h5awrite_real_7_c, H5AWRITE_REAL_7_C) -#define nh5awrite_double_s_c H5_FC_FUNC_(h5awrite_double_s_c, H5AWRITE_DOUBLE_S_C) -#define nh5awrite_double_1_c H5_FC_FUNC_(h5awrite_double_1_c, H5AWRITE_DOUBLE_1_C) -#define nh5awrite_double_2_c H5_FC_FUNC_(h5awrite_double_2_c, H5AWRITE_DOUBLE_2_C) -#define nh5awrite_double_3_c H5_FC_FUNC_(h5awrite_double_3_c, H5AWRITE_DOUBLE_3_C) -#define nh5awrite_double_4_c H5_FC_FUNC_(h5awrite_double_4_c, H5AWRITE_DOUBLE_4_C) -#define nh5awrite_double_5_c H5_FC_FUNC_(h5awrite_double_5_c, H5AWRITE_DOUBLE_5_C) -#define nh5awrite_double_6_c H5_FC_FUNC_(h5awrite_double_6_c, H5AWRITE_DOUBLE_6_C) -#define nh5awrite_double_7_c H5_FC_FUNC_(h5awrite_double_7_c, H5AWRITE_DOUBLE_7_C) -#define nh5awritec_c H5_FC_FUNC_(h5awritec_c, H5AWRITEC_C) -#define nh5awritec_s_c H5_FC_FUNC_(h5awritec_s_c, H5AWRITEC_S_C) -#define nh5awritec_1_c H5_FC_FUNC_(h5awritec_1_c, H5AWRITEC_1_C) -#define nh5awritec_2_c H5_FC_FUNC_(h5awritec_2_c, H5AWRITEC_2_C) -#define nh5awritec_3_c H5_FC_FUNC_(h5awritec_3_c, H5AWRITEC_3_C) -#define nh5awritec_4_c H5_FC_FUNC_(h5awritec_4_c, H5AWRITEC_4_C) -#define nh5awritec_5_c H5_FC_FUNC_(h5awritec_5_c, H5AWRITEC_5_C) -#define nh5awritec_6_c H5_FC_FUNC_(h5awritec_6_c, H5AWRITEC_6_C) -#define nh5awritec_7_c H5_FC_FUNC_(h5awritec_7_c, H5AWRITEC_7_C) -#define nh5aread_c H5_FC_FUNC_(h5aread_c, H5AREAD_C) -#define nh5aread_integer_s_c H5_FC_FUNC_(h5aread_integer_s_c, H5AREAD_INTEGER_S_C) -#define nh5aread_integer_1_c H5_FC_FUNC_(h5aread_integer_1_c, H5AREAD_INTEGER_1_C) -#define nh5aread_integer_2_c H5_FC_FUNC_(h5aread_integer_2_c, H5AREAD_INTEGER_2_C) -#define nh5aread_integer_3_c H5_FC_FUNC_(h5aread_integer_3_c, H5AREAD_INTEGER_3_C) -#define nh5aread_integer_4_c H5_FC_FUNC_(h5aread_integer_4_c, H5AREAD_INTEGER_4_C) -#define nh5aread_integer_5_c H5_FC_FUNC_(h5aread_integer_5_c, H5AREAD_INTEGER_5_C) -#define nh5aread_integer_6_c H5_FC_FUNC_(h5aread_integer_6_c, H5AREAD_INTEGER_6_C) -#define nh5aread_integer_7_c H5_FC_FUNC_(h5aread_integer_7_c, H5AREAD_INTEGER_7_C) -#define nh5aread_real_s_c H5_FC_FUNC_(h5aread_real_s_c, H5AREAD_REAL_S_C) -#define nh5aread_real_1_c H5_FC_FUNC_(h5aread_real_1_c, H5AREAD_REAL_1_C) -#define nh5aread_real_2_c H5_FC_FUNC_(h5aread_real_2_c, H5AREAD_REAL_2_C) -#define nh5aread_real_3_c H5_FC_FUNC_(h5aread_real_3_c, H5AREAD_REAL_3_C) -#define nh5aread_real_4_c H5_FC_FUNC_(h5aread_real_4_c, H5AREAD_REAL_4_C) -#define nh5aread_real_5_c H5_FC_FUNC_(h5aread_real_5_c, H5AREAD_REAL_5_C) -#define nh5aread_real_6_c H5_FC_FUNC_(h5aread_real_6_c, H5AREAD_REAL_6_C) -#define nh5aread_real_7_c H5_FC_FUNC_(h5aread_real_7_c, H5AREAD_REAL_7_C) -#define nh5aread_double_s_c H5_FC_FUNC_(h5aread_double_s_c, H5AREAD_DOUBLE_S_C) -#define nh5aread_double_1_c H5_FC_FUNC_(h5aread_double_1_c, H5AREAD_DOUBLE_1_C) -#define nh5aread_double_2_c H5_FC_FUNC_(h5aread_double_2_c, H5AREAD_DOUBLE_2_C) -#define nh5aread_double_3_c H5_FC_FUNC_(h5aread_double_3_c, H5AREAD_DOUBLE_3_C) -#define nh5aread_double_4_c H5_FC_FUNC_(h5aread_double_4_c, H5AREAD_DOUBLE_4_C) -#define nh5aread_double_5_c H5_FC_FUNC_(h5aread_double_5_c, H5AREAD_DOUBLE_5_C) -#define nh5aread_double_6_c H5_FC_FUNC_(h5aread_double_6_c, H5AREAD_DOUBLE_6_C) -#define nh5aread_double_7_c H5_FC_FUNC_(h5aread_double_7_c, H5AREAD_DOUBLE_7_C) -#define nh5areadc_c H5_FC_FUNC_(h5areadc_c, H5AREADC_C) -#define nh5areadc_s_c H5_FC_FUNC_(h5areadc_s_c, H5AREADC_S_C) -#define nh5areadc_1_c H5_FC_FUNC_(h5areadc_1_c, H5AREADC_1_C) -#define nh5areadc_2_c H5_FC_FUNC_(h5areadc_2_c, H5AREADC_2_C) -#define nh5areadc_3_c H5_FC_FUNC_(h5areadc_3_c, H5AREADC_3_C) -#define nh5areadc_4_c H5_FC_FUNC_(h5areadc_4_c, H5AREADC_4_C) -#define nh5areadc_5_c H5_FC_FUNC_(h5areadc_5_c, H5AREADC_5_C) -#define nh5areadc_6_c H5_FC_FUNC_(h5areadc_6_c, H5AREADC_6_C) -#define nh5areadc_7_c H5_FC_FUNC_(h5areadc_7_c, H5AREADC_7_C) -#define nh5aget_name_c H5_FC_FUNC_(h5aget_name_c, H5AGET_NAME_C) -#define nh5aopen_idx_c H5_FC_FUNC_(h5aopen_idx_c, H5AOPEN_IDX_C) -#define nh5aget_space_c H5_FC_FUNC_(h5aget_space_c, H5AGET_SPACE_C) -#define nh5aget_type_c H5_FC_FUNC_(h5aget_type_c, H5AGET_TYPE_C) -#define nh5aget_num_attrs_c H5_FC_FUNC_(h5aget_num_attrs_c, H5AGET_NUM_ATTRS_C) -#define nh5adelete_c H5_FC_FUNC_(h5adelete_c, H5ADELETE_C) -#define nh5aget_storage_size_c H5_FC_FUNC_(h5aget_storage_size_c, H5AGET_STORAGE_SIZE_C) -#define nh5arename_by_name_c H5_FC_FUNC_(h5arename_by_name_c, H5ARENAME_BY_NAME_C) -#define nh5aopen_c H5_FC_FUNC_(h5aopen_c, H5AOPEN_C) -#define nh5adelete_by_name_c H5_FC_FUNC_(h5adelete_by_name_c,H5ADELETE_BY_NAME_C) -#define nh5adelete_by_idx_c H5_FC_FUNC_(h5adelete_by_idx_c,H5ADELETE_BY_IDX_C) -#define nh5aget_name_by_idx_c H5_FC_FUNC_(h5aget_name_by_idx_c,H5AGET_NAME_BY_IDX_C) -#define nh5aget_create_plist_c H5_FC_FUNC_(h5aget_create_plist_c,H5AGET_CREATE_PLIST_C) -#define nh5aopen_by_idx_c H5_FC_FUNC_(h5aopen_by_idx_c,H5AOPEN_BY_IDX_C) -#define nh5aget_info_c H5_FC_FUNC_(h5aget_info_c,H5AGET_INFO_C) -#define nh5aget_info_by_idx_c H5_FC_FUNC_(h5aget_info_by_idx_c,H5AGET_INFO_BY_IDX_C) -#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) -#define nh5aget_info_by_name_c H5_FC_FUNC_(h5aget_info_by_name_c,H5AGET_INFO_BY_NAME_C) -#define nh5acreate_by_name_c H5_FC_FUNC_(h5acreate_by_name_c,H5ACREATE_BY_NAME_C) -#define nh5aexists_c H5_FC_FUNC_(h5aexists_c,H5AEXISTS_C) -#define nh5aexists_by_name_c H5_FC_FUNC_(h5aexists_by_name_c,H5AEXISTS_BY_NAME_C) -#define nh5aopen_by_name_c H5_FC_FUNC_(h5aopen_by_name_c,H5AOPEN_BY_NAME_C) -#define nh5arename_c H5_FC_FUNC_(h5arename_c,H5ARENAME_C) -H5_FCDLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); -H5_FCDLL int_f nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); -H5_FCDLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awritec_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5awrite_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5areadc_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_FCDLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_integer_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_real_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_s_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_1_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_2_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_3_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_4_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_5_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_6_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f nh5aread_double_7_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_FCDLL int_f h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); -H5_FCDLL int_f nh5aclose_c ( hid_t_f *attr_id ); -H5_FCDLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); -H5_FCDLL int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id); -H5_FCDLL int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id); -H5_FCDLL int_f nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num); -H5_FCDLL int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); -H5_FCDLL int_f nh5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size ); -H5_FCDLL int_f nh5arename_by_name_c ( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); +H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num); +H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); +H5_FCDLL int_f h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5aopen_c ( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_c( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, _fcd name, size_t_f *size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id ); -H5_FCDLL int_f nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aopen_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder, +H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size ); -H5_FCDLL int_f nh5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id ); -H5_FCDLL int_f nh5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); -H5_FCDLL int_f nh5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists); +H5_FCDLL int_f h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists); -H5_FCDLL int_f nh5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, +H5_FCDLL int_f h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id); -H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id, +H5_FCDLL int_f h5arename_c( hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen); /* * Functions form H5Tf.c file */ -#define nh5topen_c H5_FC_FUNC_(h5topen_c, H5TOPEN_C) -#define nh5tcommit_c H5_FC_FUNC_(h5tcommit_c, H5TCOMMIT_C) -#define nh5tcommitted_c H5_FC_FUNC_(h5tcommitted_c, H5TCOMMITTED_C) -#define nh5tclose_c H5_FC_FUNC_(h5tclose_c, H5TCLOSE_C) -#define nh5tcopy_c H5_FC_FUNC_(h5tcopy_c, H5TCOPY_C) -#define nh5tequal_c H5_FC_FUNC_(h5tequal_c, H5TEQUAL_C) -#define nh5tget_class_c H5_FC_FUNC_(h5tget_class_c, H5TGET_CLASS_C) -#define nh5tget_order_c H5_FC_FUNC_(h5tget_order_c, H5TGET_ORDER_C) -#define nh5tset_order_c H5_FC_FUNC_(h5tset_order_c, H5TSET_ORDER_C) -#define nh5tget_size_c H5_FC_FUNC_(h5tget_size_c, H5TGET_SIZE_C) -#define nh5tset_size_c H5_FC_FUNC_(h5tset_size_c, H5TSET_SIZE_C) -#define nh5tget_precision_c H5_FC_FUNC_(h5tget_precision_c, H5TGET_PRECISION_C) -#define nh5tset_precision_c H5_FC_FUNC_(h5tset_precision_c, H5TSET_PRECISION_C) -#define nh5tget_offset_c H5_FC_FUNC_(h5tget_offset_c, H5TGET_OFFSET_C) -#define nh5tset_offset_c H5_FC_FUNC_(h5tset_offset_c, H5TSET_OFFSET_C) -#define nh5tget_pad_c H5_FC_FUNC_(h5tget_pad_c, H5TGET_PAD_C) -#define nh5tset_pad_c H5_FC_FUNC_(h5tset_pad_c, H5TSET_PAD_C) -#define nh5tget_sign_c H5_FC_FUNC_(h5tget_sign_c, H5TGET_SIGN_C) -#define nh5tset_sign_c H5_FC_FUNC_(h5tset_sign_c, H5TSET_SIGN_C) -#define nh5tget_fields_c H5_FC_FUNC_(h5tget_fields_c, H5TGET_FIELDS_C) -#define nh5tset_fields_c H5_FC_FUNC_(h5tset_fields_c, H5TSET_FIELDS_C) -#define nh5tget_ebias_c H5_FC_FUNC_(h5tget_ebias_c, H5TGET_EBIAS_C) -#define nh5tset_ebias_c H5_FC_FUNC_(h5tset_ebias_c, H5TSET_EBIAS_C) -#define nh5tget_norm_c H5_FC_FUNC_(h5tget_norm_c, H5TGET_NORM_C) -#define nh5tset_norm_c H5_FC_FUNC_(h5tset_norm_c, H5TSET_NORM_C) -#define nh5tget_inpad_c H5_FC_FUNC_(h5tget_inpad_c, H5TGET_INPAD_C) -#define nh5tset_inpad_c H5_FC_FUNC_(h5tset_inpad_c, H5TSET_INPAD_C) -#define nh5tget_cset_c H5_FC_FUNC_(h5tget_cset_c, H5TGET_CSET_C) -#define nh5tset_cset_c H5_FC_FUNC_(h5tset_cset_c, H5TSET_CSET_C) -#define nh5tget_strpad_c H5_FC_FUNC_(h5tget_strpad_c, H5TGET_STRPAD_C) -#define nh5tset_strpad_c H5_FC_FUNC_(h5tset_strpad_c, H5TSET_STRPAD_C) -#define nh5tget_nmembers_c H5_FC_FUNC_(h5tget_nmembers_c, H5TGET_NMEMBERS_C) -#define nh5tget_member_name_c H5_FC_FUNC_(h5tget_member_name_c, H5TGET_MEMBER_NAME_C) -#define nh5tget_member_offset_c H5_FC_FUNC_(h5tget_member_offset_c, H5TGET_MEMBER_OFFSET_C) -#define nh5tget_member_dims_c H5_FC_FUNC_(h5tget_member_dims_c, H5TGET_MEMBER_DIMS_C) -#define nh5tget_member_type_c H5_FC_FUNC_(h5tget_member_type_c, H5TGET_MEMBER_TYPE_C) -#define nh5tget_member_index_c H5_FC_FUNC_(h5tget_member_index_c, H5TGET_MEMBER_INDEX_C) -#define nh5tinsert_c H5_FC_FUNC_(h5tinsert_c, H5TINSERT_C) -#define nh5tcreate_c H5_FC_FUNC_(h5tcreate_c, H5TCREATE_C) -#define nh5tpack_c H5_FC_FUNC_(h5tpack_c, H5TPACK_C) -#define nh5tinsert_array_c H5_FC_FUNC_(h5tinsert_array_c, H5TINSERT_ARRAY_C) -#define nh5tinsert_array_c2 H5_FC_FUNC_(h5tinsert_array_c2, H5TINSERT_ARRAY_C2) -#define nh5tenum_create_c H5_FC_FUNC_(h5tenum_create_c, H5TENUM_CREATE_C) -#define nh5tenum_insert_c H5_FC_FUNC_(h5tenum_insert_c, H5TENUM_INSERT_C) -#define nh5tenum_nameof_c H5_FC_FUNC_(h5tenum_nameof_c, H5TENUM_NAMEOF_C) -#define nh5tenum_valueof_c H5_FC_FUNC_(h5tenum_valueof_c, H5TENUM_VALUEOF_C) -#define nh5tget_member_value_c H5_FC_FUNC_(h5tget_member_value_c, H5TGET_MEMBER_VALUE_C) -#define nh5tset_tag_c H5_FC_FUNC_(h5tset_tag_c, H5TSET_TAG_C) -#define nh5tget_tag_c H5_FC_FUNC_(h5tget_tag_c, H5TGET_TAG_C) -#define nh5tarray_create_c H5_FC_FUNC_(h5tarray_create_c, H5TARRAY_CREATE_C) -#define nh5tget_array_ndims_c H5_FC_FUNC_(h5tget_array_ndims_c, H5TGET_ARRAY_NDIMS_C) -#define nh5tget_array_dims_c H5_FC_FUNC_(h5tget_array_dims_c, H5TGET_ARRAY_DIMS_C) -#define nh5tget_super_c H5_FC_FUNC_(h5tget_super_c, H5TGET_SUPER_C) -#define nh5tvlen_create_c H5_FC_FUNC_(h5tvlen_create_c, H5TVLEN_CREATE_C) -#define nh5tis_variable_str_c H5_FC_FUNC_(h5tis_variable_str_c, H5TIS_VARIABLE_STR_C) -#define nh5tget_member_class_c H5_FC_FUNC_(h5tget_member_class_c, H5TGET_MEMBER_CLASS_C) -#define nh5tcommit_anon_c H5_FC_FUNC_(h5tcommit_anon_c, H5TCOMMIT_ANON_C) -#define nh5tdecode_c H5_FC_FUNC_(h5tdecode_c, H5TDECODE_C) -#define nh5tencode_c H5_FC_FUNC_(h5tencode_c, H5TENCODE_C) -#define nh5tget_create_plist_c H5_FC_FUNC_(h5tget_create_plist_c, H5TGET_CREATE_PLIST_C) -#define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C) -#define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C ) -H5_FCDLL int_f nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); -H5_FCDLL int_f nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); -H5_FCDLL int_f nh5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f nh5tclose_c ( hid_t_f *type_id ); -H5_FCDLL int_f nh5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); -H5_FCDLL int_f nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id); -H5_FCDLL int_f nh5tget_class_c ( hid_t_f *type_id , int_f *classtype); -H5_FCDLL int_f nh5tget_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f nh5tset_order_c ( hid_t_f *type_id , int_f *order); -H5_FCDLL int_f nh5tget_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f nh5tset_size_c ( hid_t_f *type_id , size_t_f *size); -H5_FCDLL int_f nh5tcommitted_c (hid_t_f *dtype_id); -H5_FCDLL int_f nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision); -H5_FCDLL int_f nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset); -H5_FCDLL int_f nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); -H5_FCDLL int_f nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); -H5_FCDLL int_f nh5tget_sign_c ( hid_t_f *type_id , int_f* sign); -H5_FCDLL int_f nh5tset_sign_c ( hid_t_f *type_id , int_f *sign); -H5_FCDLL int_f nh5tget_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); -H5_FCDLL int_f nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias); -H5_FCDLL int_f nh5tget_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f nh5tset_norm_c ( hid_t_f *type_id , int_f *norm); -H5_FCDLL int_f nh5tget_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype); -H5_FCDLL int_f nh5tget_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f nh5tset_cset_c ( hid_t_f *type_id, int_f * cset); -H5_FCDLL int_f nh5tget_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad); -H5_FCDLL int_f nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members); -H5_FCDLL int_f nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); -H5_FCDLL int_f nh5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); -H5_FCDLL int_f nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); -H5_FCDLL int_f nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); -H5_FCDLL int_f nh5tget_member_index_c ( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); -H5_FCDLL int_f nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); -H5_FCDLL int_f nh5tpack_c(hid_t_f * type_id); -H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); -H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); -H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); -H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id); +H5_FCDLL int_f h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id ); +H5_FCDLL int_f h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f h5tclose_c( hid_t_f *type_id ); +H5_FCDLL int_f h5tequal_c( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag); +H5_FCDLL int_f h5tcopy_c( hid_t_f *type_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tget_class_c( hid_t_f *type_id , int_f *classtype); +H5_FCDLL int_f h5tget_order_c( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tset_order_c( hid_t_f *type_id , int_f *order); +H5_FCDLL int_f h5tget_size_c( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tset_size_c( hid_t_f *type_id , size_t_f *size); +H5_FCDLL int_f h5tcommitted_c(hid_t_f *dtype_id); +H5_FCDLL int_f h5tget_precision_c( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tset_precision_c( hid_t_f *type_id , size_t_f *precision); +H5_FCDLL int_f h5tget_offset_c( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tset_offset_c( hid_t_f *type_id , size_t_f *offset); +H5_FCDLL int_f h5tget_pad_c( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad); +H5_FCDLL int_f h5tset_pad_c( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad ); +H5_FCDLL int_f h5tget_sign_c( hid_t_f *type_id , int_f* sign); +H5_FCDLL int_f h5tset_sign_c( hid_t_f *type_id , int_f *sign); +H5_FCDLL int_f h5tget_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tset_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize); +H5_FCDLL int_f h5tget_ebias_c( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tset_ebias_c( hid_t_f *type_id , size_t_f *ebias); +H5_FCDLL int_f h5tget_norm_c( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tset_norm_c( hid_t_f *type_id , int_f *norm); +H5_FCDLL int_f h5tget_inpad_c( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tset_inpad_c( hid_t_f *type_id, int_f * padtype); +H5_FCDLL int_f h5tget_cset_c( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tset_cset_c( hid_t_f *type_id, int_f * cset); +H5_FCDLL int_f h5tget_strpad_c( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tset_strpad_c( hid_t_f *type_id, int_f * strpad); +H5_FCDLL int_f h5tget_nmembers_c( hid_t_f *type_id , int_f * num_members); +H5_FCDLL int_f h5tget_member_name_c( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen); +H5_FCDLL int_f h5tget_member_dims_c( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm ); +H5_FCDLL int_f h5tget_member_offset_c( hid_t_f *type_id ,int_f* member_no, size_t_f* offset); +H5_FCDLL int_f h5tget_member_type_c( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype); +H5_FCDLL int_f h5tget_member_index_c( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx); +H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id); +H5_FCDLL int_f h5tpack_c(hid_t_f * type_id); +H5_FCDLL int_f h5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm ); +H5_FCDLL int_f h5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); +H5_FCDLL int_f h5tenum_create_c( hid_t_f *parent_id , hid_t_f *new_type_id); +H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); -H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); -H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); -H5_FCDLL int_f nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); -H5_FCDLL int_f nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); -H5_FCDLL int_f nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); -H5_FCDLL int_f nh5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims); -H5_FCDLL int_f nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims); -H5_FCDLL int_f nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id); -H5_FCDLL int_f nh5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id); -H5_FCDLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); -H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ); -H5_FCDLL int_f nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); -H5_FCDLL int_f nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ); -H5_FCDLL int_f nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); -H5_FCDLL int_f nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id); -H5_FCDLL int_f nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); -H5_FCDLL int_f nh5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); +H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); +H5_FCDLL int_f h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); +H5_FCDLL int_f h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen); +H5_FCDLL int_f h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen); +H5_FCDLL int_f h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id); +H5_FCDLL int_f h5tget_array_dims_c( hid_t_f *type_id , hsize_t_f * dims); +H5_FCDLL int_f h5tget_array_ndims_c( hid_t_f *type_id , int_f * ndims); +H5_FCDLL int_f h5tget_super_c( hid_t_f *type_id , hid_t_f *base_type_id); +H5_FCDLL int_f h5tvlen_create_c( hid_t_f *type_id , hid_t_f *vltype_id); +H5_FCDLL int_f h5tis_variable_str_c( hid_t_f *type_id , int_f *flag ); +H5_FCDLL int_f h5tget_member_class_c( hid_t_f *type_id , int_f *member_no, int_f *cls ); +H5_FCDLL int_f h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id); +H5_FCDLL int_f h5tdecode_c( _fcd buf, hid_t_f *obj_id ); +H5_FCDLL int_f h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ); +H5_FCDLL int_f h5tget_create_plist_c( hid_t_f *dtype_id, hid_t_f *dtpl_id); +H5_FCDLL int_f h5tcompiler_conv_c( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag); +H5_FCDLL int_f h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id); H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id); - /* * Functions from H5Of.c */ -#define nh5olink_c H5_FC_FUNC_(h5olink_c, H5OLINK_C) -#define nh5oopen_c H5_FC_FUNC_(h5oopen_c, H5OOPEN_C) -#define nh5oclose_c H5_FC_FUNC_(h5oclose_c, H5OCLOSE_C) -#define nh5oopen_by_addr_c H5_FC_FUNC_(h5oopen_by_addr_c, H5OOPEN_BY_ADDR_C) -#define nh5ocopy_c H5_FC_FUNC_(h5ocopy_c, H5OCOPY_C) -#define nh5odecr_refcount_c H5_FC_FUNC_(h5odecr_refcount_c, H5ODECR_REFCOUNT_C) -#define nh5oincr_refcount_c H5_FC_FUNC_(h5oincr_refcount_c, H5OINCR_REFCOUNT_C) -#define nh5oexists_by_name_c H5_FC_FUNC_(h5oexists_by_name_c, H5OEXISTS_BY_NAME_C) -#define nh5oset_comment_c H5_FC_FUNC_(h5oset_comment_c, H5OSET_COMMENT_C) -#define nh5oset_comment_by_name_c H5_FC_FUNC_(h5oset_comment_by_name_c, H5OSET_COMMENT_BY_NAME_C) -#define nh5oopen_by_idx_c H5_FC_FUNC_(h5oopen_by_idx_c, H5OOPEN_BY_IDX_C) -#define nh5oget_comment_c H5_FC_FUNC_(h5oget_comment_c, H5OGET_COMMENT_C) -#define nh5oget_comment_by_name_c H5_FC_FUNC_(h5oget_comment_by_name_c, H5OGET_COMMENT_BY_NAME_C) - -H5_FCDLL int_f nh5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); -H5_FCDLL int_f nh5oclose_c (hid_t_f *object_id ); -H5_FCDLL int_f nh5oopen_by_addr_c (hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); -H5_FCDLL int_f nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, +H5_FCDLL int_f h5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id); +H5_FCDLL int_f h5oclose_c(hid_t_f *object_id ); +H5_FCDLL int_f h5oopen_by_addr_c(hid_t_f *loc_id, haddr_t_f *addr, hid_t_f *obj_id); +H5_FCDLL int_f h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f h5ovisit_c (hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); +H5_FCDLL int_f h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data); H5_FCDLL int_f h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order, H5O_iterate_t op, void *op_data, hid_t_f *lapl_id ); -H5_FCDLL int_f h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, +H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info); +H5_FCDLL int_f h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, +H5_FCDLL int_f h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, H5O_info_t_f *object_info); -H5_FCDLL int_f nh5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, +H5_FCDLL int_f h5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id ); -H5_FCDLL int_f nh5odecr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f nh5oincr_refcount_c (hid_t_f *object_id); -H5_FCDLL int_f nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen); -H5_FCDLL int_f nh5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5odecr_refcount_c(hid_t_f *object_id); +H5_FCDLL int_f h5oincr_refcount_c(hid_t_f *object_id); +H5_FCDLL int_f h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen); +H5_FCDLL int_f h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id); +H5_FCDLL int_f h5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); -H5_FCDLL int_f nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, +H5_FCDLL int_f h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize); +H5_FCDLL int_f h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id); /* * Functions from H5Pf.c */ -#define nh5pcreate_c H5_FC_FUNC_(h5pcreate_c, H5PCREATE_C) -#define nh5pclose_c H5_FC_FUNC_(h5pclose_c, H5PCLOSE_C) -#define nh5pcopy_c H5_FC_FUNC_(h5pcopy_c, H5PCOPY_C) -#define nh5pcreate_class_f90_c H5_FC_FUNC_(h5pcreate_class_f90_c, H5PCREATE_CLASS_F90_C) -#define nh5pequal_c H5_FC_FUNC_(h5pequal_c, H5PEQUAL_C) -#define nh5pget_class_c H5_FC_FUNC_(h5pget_class_c, H5PGET_CLASS_C) -#define nh5pset_deflate_c H5_FC_FUNC_(h5pset_deflate_c, H5PSET_DEFLATE_C) -#define nh5pset_preserve_c H5_FC_FUNC_(h5pset_preserve_c, H5PSET_PRESERVE_C) -#define nh5pget_preserve_c H5_FC_FUNC_(h5pget_preserve_c, H5PGET_PRESERVE_C) -#define nh5pset_chunk_c H5_FC_FUNC_(h5pset_chunk_c, H5PSET_CHUNK_C) -#define nh5pget_chunk_c H5_FC_FUNC_(h5pget_chunk_c, H5PGET_CHUNK_C) -#define nh5pset_fill_valuec_c H5_FC_FUNC_(h5pset_fill_valuec_c, H5PSET_FILL_VALUEC_C) -#define nh5pset_fill_value_integer_c H5_FC_FUNC_(h5pset_fill_value_integer_c, H5PSET_FILL_VALUE_INTEGER_C) -#define nh5pset_fill_value_real_c H5_FC_FUNC_(h5pset_fill_value_real_c, H5PSET_FILL_VALUE_REAL_C) -#define nh5pset_fill_value_double_c H5_FC_FUNC_(h5pset_fill_value_double_c, H5PSET_FILL_VALUE_DOUBLE_C) -#define nh5pget_fill_valuec_c H5_FC_FUNC_(h5pget_fill_valuec_c, H5PGET_FILL_VALUEC_C) -#define nh5pget_fill_value_integer_c H5_FC_FUNC_(h5pget_fill_value_integer_c, H5PGET_FILL_VALUE_INTEGER_C) -#define nh5pget_fill_value_real_c H5_FC_FUNC_(h5pget_fill_value_real_c, H5PGET_FILL_VALUE_REAL_C) -#define nh5pget_fill_value_double_c H5_FC_FUNC_(h5pget_fill_value_double_c, H5PGET_FILL_VALUE_DOUBLE_C) -#define nh5pget_version_c H5_FC_FUNC_(h5pget_version_c, H5PGET_VERSION_C) -#define nh5pget_userblock_c H5_FC_FUNC_(h5pget_userblock_c, H5PGET_USERBLOCK_C) -#define nh5pset_userblock_c H5_FC_FUNC_(h5pset_userblock_c, H5PSET_USERBLOCK_C) -#define nh5pset_sizes_c H5_FC_FUNC_(h5pset_sizes_c, H5PSET_SIZES_C) -#define nh5pget_sizes_c H5_FC_FUNC_(h5pget_sizes_c, H5PGET_SIZES_C) -#define nh5pget_sym_k_c H5_FC_FUNC_(h5pget_sym_k_c, H5PGET_SYM_K_C) -#define nh5pset_sym_k_c H5_FC_FUNC_(h5pset_sym_k_c, H5PSET_SYM_K_C) -#define nh5pget_istore_k_c H5_FC_FUNC_(h5pget_istore_k_c, H5PGET_ISTORE_K_C) -#define nh5pset_istore_k_c H5_FC_FUNC_(h5pset_istore_k_c, H5PSET_ISTORE_K_C) -#define nh5pget_driver_c H5_FC_FUNC_(h5pget_driver_c, H5PGET_DRIVER_C) -#define nh5pset_fapl_stdio_c H5_FC_FUNC_(h5pset_fapl_stdio_c, H5PSET_FAPL_STDIO_C) -#define nh5pget_fapl_stdio_c H5_FC_FUNC_(h5pget_fapl_stdio_c, H5PGET_FAPL_STDIO_C) -#define nh5pset_fapl_sec2_c H5_FC_FUNC_(h5pset_fapl_sec2_c, H5PSET_FAPL_SEC2_C) -#define nh5pget_fapl_sec2_c H5_FC_FUNC_(h5pget_fapl_sec2_c, H5PGET_FAPL_SEC2_C) -#define nh5pset_alignment_c H5_FC_FUNC_(h5pset_alignment_c, H5PSET_ALIGNMENT_C) -#define nh5pget_alignment_c H5_FC_FUNC_(h5pget_alignment_c, H5PGET_ALIGNMENT_C) -#define nh5pset_fapl_core_c H5_FC_FUNC_(h5pset_fapl_core_c, H5PSET_FAPL_CORE_C) -#define nh5pget_fapl_core_c H5_FC_FUNC_(h5pget_fapl_core_c, H5PGET_FAPL_CORE_C) -#define nh5pset_fapl_family_c H5_FC_FUNC_(h5pset_fapl_family_c, H5PSET_FAPL_FAMILY_C) -#define nh5pget_fapl_family_c H5_FC_FUNC_(h5pget_fapl_family_c, H5PGET_FAPL_FAMILY_C) -#define nh5pset_cache_c H5_FC_FUNC_(h5pset_cache_c, H5PSET_CACHE_C) -#define nh5pget_cache_c H5_FC_FUNC_(h5pget_cache_c, H5PGET_CACHE_C) -#define nh5pset_fapl_split_c H5_FC_FUNC_(h5pset_fapl_split_c, H5PSET_FAPL_SPLIT_C) -#define nh5pget_fapl_split_c H5_FC_FUNC_(h5pget_fapl_split_c, H5PGET_FAPL_SPLIT_C) -#define nh5pset_gc_references_c H5_FC_FUNC_(h5pset_gc_references_c, H5PSET_GC_REFERENCES_C) -#define nh5pget_gc_references_c H5_FC_FUNC_(h5pget_gc_references_c, H5PGET_GC_REFERENCES_C) -#define nh5pset_layout_c H5_FC_FUNC_(h5pset_layout_c, H5PSET_LAYOUT_C) -#define nh5pget_layout_c H5_FC_FUNC_(h5pget_layout_c, H5PGET_LAYOUT_C) -#define nh5pset_filter_c H5_FC_FUNC_(h5pset_filter_c, H5PSET_FILTER_C) -#define nh5premove_filter_c H5_FC_FUNC_(h5premove_filter_c, H5PREMOVE_FILTER_C) -#define nh5pmodify_filter_c H5_FC_FUNC_(h5pmodify_filter_c, H5PMODIFY_FILTER_C) -#define nh5pget_nfilters_c H5_FC_FUNC_(h5pget_nfilters_c, H5PGET_NFILTERS_C) -#define nh5pget_filter_c H5_FC_FUNC_(h5pget_filter_c, H5PGET_FILTER_C) -#define nh5pget_filter_by_id_c H5_FC_FUNC_(h5pget_filter_by_id_c, H5PGET_FILTER_BY_ID_C) -#define nh5pset_external_c H5_FC_FUNC_(h5pset_external_c, H5PSET_EXTERNAL_C) -#define nh5pget_external_count_c H5_FC_FUNC_(h5pget_external_count_c, H5PGET_EXTERNAL_COUNT_C) -#define nh5pget_external_c H5_FC_FUNC_(h5pget_external_c, H5PGET_EXTERNAL_C) -#define nh5pget_btree_ratios_c H5_FC_FUNC_(h5pget_btree_ratios_c, H5PGET_BTREE_RATIOS_C) -#define nh5pset_btree_ratios_c H5_FC_FUNC_(h5pset_btree_ratios_c, H5PSET_BTREE_RATIOS_C) -#define nh5pset_fapl_mpio_c H5_FC_FUNC_(h5pset_fapl_mpio_c, H5PSET_FAPL_MPIO_C) -#define nh5pget_fapl_mpio_c H5_FC_FUNC_(h5pget_fapl_mpio_c, H5PGET_FAPL_MPIO_C) -#define nh5pset_dxpl_mpio_c H5_FC_FUNC_(h5pset_dxpl_mpio_c, H5PSET_DXPL_MPIO_C) -#define nh5pget_dxpl_mpio_c H5_FC_FUNC_(h5pget_dxpl_mpio_c, H5PGET_DXPL_MPIO_C) -#define nh5pget_fclose_degree_c H5_FC_FUNC_(h5pget_fclose_degree_c, H5PGET_FCLOSE_DEGREE_C) -#define nh5pset_fclose_degree_c H5_FC_FUNC_(h5pset_fclose_degree_c, H5PSET_FCLOSE_DEGREE_C) -#define nh5pset_buffer_c H5_FC_FUNC_(h5pset_buffer_c, H5PSET_BUFFER_C) -#define nh5pget_buffer_c H5_FC_FUNC_(h5pget_buffer_c, H5PGET_BUFFER_C) -#define nh5pfill_value_defined_c H5_FC_FUNC_(h5pfill_value_defined_c, H5PFILL_VALUE_DEFINED_C) -#define nh5pset_alloc_time_c H5_FC_FUNC_(h5pset_alloc_time_c, H5PSET_ALLOC_TIME_C) -#define nh5pget_alloc_time_c H5_FC_FUNC_(h5pget_alloc_time_c, H5PGET_ALLOC_TIME_C) -#define nh5pset_fill_time_c H5_FC_FUNC_(h5pset_fill_time_c, H5PSET_FILL_TIME_C) -#define nh5pget_fill_time_c H5_FC_FUNC_(h5pget_fill_time_c, H5PGET_FILL_TIME_C) -#define nh5pset_meta_block_size_c H5_FC_FUNC_(h5pset_meta_block_size_c, H5PSET_META_BLOCK_SIZE_C) -#define nh5pget_meta_block_size_c H5_FC_FUNC_(h5pget_meta_block_size_c, H5PGET_META_BLOCK_SIZE_C) -#define nh5pset_sieve_buf_size_c H5_FC_FUNC_(h5pset_sieve_buf_size_c, H5PSET_SIEVE_BUF_SIZE_C) -#define nh5pget_sieve_buf_size_c H5_FC_FUNC_(h5pget_sieve_buf_size_c, H5PGET_SIEVE_BUF_SIZE_C) -#define nh5pset_hyper_vector_size_c H5_FC_FUNC_(h5pset_hyper_vector_size_c, H5PSET_HYPER_VECTOR_SIZE_C) -#define nh5pget_hyper_vector_size_c H5_FC_FUNC_(h5pget_hyper_vector_size_c, H5PGET_HYPER_VECTOR_SIZE_C) -#define nh5pset_small_data_block_size_c H5_FC_FUNC_(h5pset_small_data_block_size_c, H5PSET_SMALL_DATA_BLOCK_SIZE_C) -#define nh5pget_small_data_block_size_c H5_FC_FUNC_(h5pget_small_data_block_size_c, H5PGET_SMALL_DATA_BLOCK_SIZE_C) -#define nh5pregister_integer_c H5_FC_FUNC_(h5pregister_integer_c, H5PREGISTER_INTEGER_C) -#define nh5pregister_real_c H5_FC_FUNC_(h5pregister_real_c, H5PREGISTER_REAL_C) -#define nh5pregister_double_c H5_FC_FUNC_(h5pregister_double_c, H5PREGISTER_DOUBLE_C) -#define nh5pregisterc_c H5_FC_FUNC_(h5pregisterc_c, H5PREGISTERC_C) -#define nh5pinsert_integer_c H5_FC_FUNC_(h5pinsert_integer_c, H5PINSERT_INTEGER_C) -#define nh5pinsert_real_c H5_FC_FUNC_(h5pinsert_real_c, H5PINSERT_REAL_C) -#define nh5pinsert_double_c H5_FC_FUNC_(h5pinsert_double_c, H5PINSERT_DOUBLE_C) -#define nh5pinsertc_c H5_FC_FUNC_(h5pinsertc_c, H5PINSERTC_C) -#define nh5pset_integer_c H5_FC_FUNC_(h5pset_integer_c, H5PSET_INTEGER_C) -#define nh5pset_real_c H5_FC_FUNC_(h5pset_real_c, H5PSET_REAL_C) -#define nh5pset_double_c H5_FC_FUNC_(h5pset_double_c, H5PSET_DOUBLE_C) -#define nh5psetc_c H5_FC_FUNC_(h5psetc_c, H5PSETC_C) -#define nh5pget_integer_c H5_FC_FUNC_(h5pget_integer_c, H5PGET_INTEGER_C) -#define nh5pget_real_c H5_FC_FUNC_(h5pget_real_c, H5PGET_REAL_C) -#define nh5pget_double_c H5_FC_FUNC_(h5pget_double_c, H5PGET_DOUBLE_C) -#define nh5pgetc_c H5_FC_FUNC_(h5pgetc_c, H5PGETC_C) -#define nh5pexist_c H5_FC_FUNC_(h5pexist_c, H5PEXIST_C) -#define nh5pget_size_c H5_FC_FUNC_(h5pget_size_c, H5PGET_SIZE_C) -#define nh5pget_nprops_c H5_FC_FUNC_(h5pget_nprops_c, H5PGET_NPROPS_C) -#define nh5pget_class_parent_c H5_FC_FUNC_(h5pget_class_parent_c, H5PGET_CLASS_PARENT_C) -#define nh5pisa_class_c H5_FC_FUNC_(h5pisa_class_c, H5PISA_CLASS_C) -#define nh5pcopy_prop_c H5_FC_FUNC_(h5pcopy_prop_c, H5PCOPY_PROP_C) -#define nh5premove_c H5_FC_FUNC_(h5premove_c, H5PREMOVE_C) -#define nh5punregister_c H5_FC_FUNC_(h5punregister_c, H5PUNREGISTER_C) -#define nh5pclose_class_c H5_FC_FUNC_(h5pclose_class_c, H5PCLOSE_CLASS_C) -#define nh5pget_class_name_c H5_FC_FUNC_(h5pget_class_name_c, H5PGET_CLASS_NAME_C) -#define nh5pset_shuffle_c H5_FC_FUNC_(h5pset_shuffle_c, H5PSET_SHUFFLE_C) -#define nh5pset_fletcher32_c H5_FC_FUNC_(h5pset_fletcher32_c, H5PSET_FLETCHER32_C) -#define nh5pset_edc_check_c H5_FC_FUNC_(h5pset_edc_check_c, H5PSET_EDC_CHECK_C) -#define nh5pget_edc_check_c H5_FC_FUNC_(h5pget_edc_check_c, H5PGET_EDC_CHECK_C) -#define nh5pset_family_offset_c H5_FC_FUNC_(h5pset_family_offset_c, H5PSET_FAMILY_OFFSET_C) -#define nh5pget_fapl_multi_c H5_FC_FUNC_(h5pget_fapl_multi_c, H5PGET_FAPL_MULTI_C) -#define nh5pset_fapl_multi_c H5_FC_FUNC_(h5pset_fapl_multi_c, H5PSET_FAPL_MULTI_C) -#define nh5pset_fapl_multi_sc H5_FC_FUNC_(h5pset_fapl_multi_sc, H5PSET_FAPL_MULTI_SC) -#define nh5pset_szip_c H5_FC_FUNC_(h5pset_szip_c, H5PSET_SZIP_C) -#define nh5pall_filters_avail_c H5_FC_FUNC_(h5pall_filters_avail_c, H5PALL_FILTERS_AVAIL_C) -#define nh5pget_attr_phase_change_c H5_FC_FUNC_(h5pget_attr_phase_change_c, H5PGET_ATTR_PHASE_CHANGE_C) -#define nh5pset_attr_creation_order_c H5_FC_FUNC_(h5pset_attr_creation_order_c, H5PSET_ATTR_CREATION_ORDER_C) -#define nh5pset_shared_mesg_nindexes_c H5_FC_FUNC_(h5pset_shared_mesg_nindexes_c, H5PSET_SHARED_MESG_NINDEXES_C) -#define nh5pset_shared_mesg_index_c H5_FC_FUNC_(h5pset_shared_mesg_index_c,H5PSET_SHARED_MESG_INDEX_C) -#define nh5pget_attr_creation_order_c H5_FC_FUNC_(h5pget_attr_creation_order_c,H5PGET_ATTR_CREATION_ORDER_C) -#define nh5pset_libver_bounds_c H5_FC_FUNC_(h5pset_libver_bounds_c,H5PSET_LIBVER_BOUNDS_C) -#define nh5pset_link_creation_order_c H5_FC_FUNC_(h5pset_link_creation_order_c, H5PSET_LINK_CREATION_ORDER_C) -#define nh5pget_link_phase_change_c H5_FC_FUNC_(h5pget_link_phase_change_c, H5PGET_LINK_PHASE_CHANGE_C) -#define nh5pget_obj_track_times_c H5_FC_FUNC_(h5pget_obj_track_times_c, H5PGET_OBJ_TRACK_TIMES_C) -#define nh5pset_obj_track_times_c H5_FC_FUNC_(h5pset_obj_track_times_c, H5PSET_OBJ_TRACK_TIMES_C) -#define nh5pset_create_inter_group_c H5_FC_FUNC_(h5pset_create_inter_group_c,H5PSET_CREATE_INTER_GROUP_C) -#define nh5pget_create_inter_group_c H5_FC_FUNC_(h5pget_create_inter_group_c,H5PGET_CREATE_INTER_GROUP_C) -#define nh5pget_link_creation_order_c H5_FC_FUNC_(h5pget_link_creation_order_c,H5PGET_LINK_CREATION_ORDER_C) -#define nh5pset_char_encoding_c H5_FC_FUNC_(h5pset_char_encoding_c, H5PSET_CHAR_ENCODING_C) -#define nh5pget_char_encoding_c H5_FC_FUNC_(h5pget_char_encoding_c, H5PGET_CHAR_ENCODING_C) -#define nh5pset_copy_object_c H5_FC_FUNC_(h5pset_copy_object_c, H5PSET_COPY_OBJECT_C) -#define nh5pget_copy_object_c H5_FC_FUNC_(h5pget_copy_object_c, H5PGET_COPY_OBJECT_C) -#define nh5pget_data_transform_c H5_FC_FUNC_(h5pget_data_transform_c, H5PGET_DATA_TRANSFORM_C) -#define nh5pset_data_transform_c H5_FC_FUNC_(h5pset_data_transform_c, H5PSET_DATA_TRANSFORM_C) -#define nh5pget_local_heap_size_hint_c H5_FC_FUNC_(h5pget_local_heap_size_hint_c, H5PGET_LOCAL_HEAP_SIZE_HINT_C) -#define nh5pget_est_link_info_c H5_FC_FUNC_(h5pget_est_link_info_c,H5PGET_EST_LINK_INFO_C) -#define nh5pset_est_link_info_c H5_FC_FUNC_(h5pset_est_link_info_c,H5PSET_EST_LINK_INFO_C) -#define nh5pset_local_heap_size_hint_c H5_FC_FUNC_(h5pset_local_heap_size_hint_c, H5PSET_LOCAL_HEAP_SIZE_HINT_C) -#define nh5pset_link_phase_change_c H5_FC_FUNC_(h5pset_link_phase_change_c, H5PSET_LINK_PHASE_CHANGE_C) -#define nh5pset_fapl_direct_c H5_FC_FUNC_(h5pset_fapl_direct_c, H5PSET_FAPL_DIRECT_C) -#define nh5pget_fapl_direct_c H5_FC_FUNC_(h5pget_fapl_direct_c, H5PGET_FAPL_DIRECT_C) -#define nh5pset_attr_phase_change_c H5_FC_FUNC_(h5pset_attr_phase_change_c, H5PSET_ATTR_PHASE_CHANGE_C) -#define nh5pset_nbit_c H5_FC_FUNC_(h5pset_nbit_c, H5PSET_NBIT_C) -#define nh5pset_scaleoffset_c H5_FC_FUNC_(h5pset_scaleoffset_c, H5PSET_SCALEOFFSET_C) -#define nh5pset_nlinks_c H5_FC_FUNC_(h5pset_nlinks_c, H5PSET_NLINKS_C) -#define nh5pget_nlinks_c H5_FC_FUNC_(h5pget_nlinks_c, H5PGET_NLINKS_C) -#define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C) -#define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C) -#define nh5pget_mpio_actual_io_mode_c H5_FC_FUNC_(h5pget_mpio_actual_io_mode_c, H5PGET_MPIO_ACTUAL_IO_MODE_C) - -H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); -H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id ); -H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); -H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); -H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); -H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level); -H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); -H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); -H5_FCDLL int_f h5pset_file_image_c (hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); -H5_FCDLL int_f h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f h5pget_file_image_c (hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); -H5_FCDLL int_f nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue); -H5_FCDLL int_f h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); -H5_FCDLL int_f nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); -H5_FCDLL int_f nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size); -H5_FCDLL int_f nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); -H5_FCDLL int_f nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk); -H5_FCDLL int_f nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik); -H5_FCDLL int_f nh5pget_driver_c (hid_t_f *prp_id, hid_t_f*driver); -H5_FCDLL int_f nh5pset_fapl_stdio_c (hid_t_f *prp_id); -H5_FCDLL int_f nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io); -H5_FCDLL int_f nh5pset_fapl_sec2_c (hid_t_f *prp_id); -H5_FCDLL int_f nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2); -H5_FCDLL int_f nh5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f nh5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); -H5_FCDLL int_f nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f nh5pget_fapl_family_c (hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); -H5_FCDLL int_f nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -H5_FCDLL int_f nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); -H5_FCDLL int_f nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); -H5_FCDLL int_f nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); -H5_FCDLL int_f nh5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f nh5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); -H5_FCDLL int_f nh5pset_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f nh5pget_layout_c (hid_t_f *prp_id, int_f* layout); -H5_FCDLL int_f nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -H5_FCDLL int_f nh5premove_filter_c (hid_t_f *prp_id, int_f* filter); -H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); -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, 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, 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); -H5_FCDLL int_f nh5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); -H5_FCDLL int_f nh5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f nh5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); -H5_FCDLL int_f nh5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f nh5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); -H5_FCDLL int_f nh5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pget_alloc_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pset_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pget_fill_time_c(hid_t_f *plist, int_f *flag); -H5_FCDLL int_f nh5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); -H5_FCDLL int_f nh5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); -H5_FCDLL int_f nh5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pcreate_c( hid_t_f *cls, hid_t_f *prp_id ); +H5_FCDLL int_f h5pclose_c( hid_t_f *prp_id ); +H5_FCDLL int_f h5pcopy_c( hid_t_f *prp_id , hid_t_f *new_prp_id); +H5_FCDLL int_f h5pequal_c( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); +H5_FCDLL int_f h5pget_class_c( hid_t_f *prp_id , hid_t_f *classtype); +H5_FCDLL int_f h5pset_deflate_c( hid_t_f *prp_id , int_f *level); +H5_FCDLL int_f h5pset_chunk_c( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pget_chunk_c( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); +H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len); +H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue); +H5_FCDLL int_f h5pset_preserve_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_preserve_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr); +H5_FCDLL int_f h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f * size); +H5_FCDLL int_f h5pget_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size); +H5_FCDLL int_f h5pset_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pget_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk); +H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f* ik); +H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f*driver); +H5_FCDLL int_f h5pset_fapl_stdio_c(hid_t_f *prp_id); +#ifdef NO_SUCH_F90_FUNCTION +H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f* io); +#endif +H5_FCDLL int_f h5pset_fapl_sec2_c(hid_t_f *prp_id); +#ifdef NO_SUCH_F90_FUNCTION +H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f* sec2); +#endif +H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment); +H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag); +H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist ); +H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0); +#ifdef NO_SUCH_F90_FUNCTION +H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist); +#endif +H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist); +H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references); +H5_FCDLL int_f h5pset_layout_c(hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pget_layout_c(hid_t_f *prp_id, int_f* layout); +H5_FCDLL int_f h5pset_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5premove_filter_c(hid_t_f *prp_id, int_f* filter); +H5_FCDLL int_f h5pmodify_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values ); +H5_FCDLL int_f h5pget_nfilters_c(hid_t_f *prp_id, int_f* nfilters); +H5_FCDLL int_f h5pget_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 h5pget_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 h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes); +H5_FCDLL int_f h5pget_external_count_c(hid_t_f *prp_id, int_f* count); +H5_FCDLL int_f h5pget_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 h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); +H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right); +H5_FCDLL int_f h5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f h5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree); +H5_FCDLL int_f h5pget_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_buffer_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pget_alloc_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pset_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pget_fill_time_c(hid_t_f *plist, int_f *flag); +H5_FCDLL int_f h5pset_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pget_meta_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pget_sieve_buf_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size); +H5_FCDLL int_f h5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); +H5_FCDLL int_f h5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size); H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, void *close_data); -H5_FCDLL int_f nh5pcreate_class_f90_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls); H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value); -H5_FCDLL int_f nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f *value_len); H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pset_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5psetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); H5_FCDLL int_f h5pget_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_double_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_integer_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pget_real_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value); -H5_FCDLL int_f nh5pgetc_c(hid_t_f *prp_id, _fcd name, int_f *name_len, _fcd value, int_f *value_len); -H5_FCDLL int_f nh5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); -H5_FCDLL int_f nh5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); -H5_FCDLL int_f nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); -H5_FCDLL int_f nh5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); -H5_FCDLL int_f nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pclose_class_c(hid_t_f * cls); -H5_FCDLL int_f nh5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); -H5_FCDLL int_f nh5pset_shuffle_c ( hid_t_f *prp_id); -H5_FCDLL int_f nh5pset_fletcher32_c ( hid_t_f *prp_id ); -H5_FCDLL int_f nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag ); -H5_FCDLL int_f nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset); -H5_FCDLL int_f nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); -H5_FCDLL int_f nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); -H5_FCDLL int_f nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); -H5_FCDLL int_f nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); -H5_FCDLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); -H5_FCDLL int_f nh5pget_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); -H5_FCDLL int_f nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); -H5_FCDLL int_f nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); -H5_FCDLL int_f nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); -H5_FCDLL int_f nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); -H5_FCDLL int_f nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); -H5_FCDLL int_f nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); -H5_FCDLL int_f nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); -H5_FCDLL int_f nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); -H5_FCDLL int_f nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); -H5_FCDLL int_f nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); -H5_FCDLL int_f nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); -H5_FCDLL int_f nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); -H5_FCDLL int_f nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); -H5_FCDLL int_f nh5pset_attr_phase_change_c (hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); -H5_FCDLL int_f nh5pset_nbit_c(hid_t_f *plist_id ); -H5_FCDLL int_f nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); -H5_FCDLL int_f nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); -H5_FCDLL int_f nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -H5_FCDLL int_f nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); -H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); +H5_FCDLL int_f h5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pget_size_c(hid_t_f *prp_id, _fcd name, int_f *name_len, size_t_f *size); +H5_FCDLL int_f h5pget_nprops_c(hid_t_f *prp_id, size_t_f *nprops); +H5_FCDLL int_f h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id); +H5_FCDLL int_f h5pisa_class_c(hid_t_f *plist, hid_t_f *pclass); +H5_FCDLL int_f h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len); +H5_FCDLL int_f h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pclose_class_c(hid_t_f * cls); +H5_FCDLL int_f h5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len); +H5_FCDLL int_f h5pset_shuffle_c( hid_t_f *prp_id); +H5_FCDLL int_f h5pset_fletcher32_c( hid_t_f *prp_id ); +H5_FCDLL int_f h5pset_edc_check_c( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pget_edc_check_c( hid_t_f *prp_id, int_f *flag ); +H5_FCDLL int_f h5pset_family_offset_c( hid_t_f *prp_id , hsize_t_f *offset); +H5_FCDLL int_f h5pget_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out); +H5_FCDLL int_f h5pset_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag); +H5_FCDLL int_f h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pset_szip_c( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); +H5_FCDLL int_f h5pall_filters_avail_c( hid_t_f *prp_id , int_f *status); +H5_FCDLL int_f h5pfill_value_defined_c( hid_t_f *prp_id , int_f *flag); +H5_FCDLL int_f h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags ); +H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); +H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); +H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); +H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag); +H5_FCDLL int_f h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group); +H5_FCDLL int_f h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); +H5_FCDLL int_f h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding); +H5_FCDLL int_f h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options); +H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size); +H5_FCDLL int_f h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len); +H5_FCDLL int_f h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint); +H5_FCDLL int_f h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len); +H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size ); +H5_FCDLL int_f h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense ); +H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id ); +H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor ); +H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks); +H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0); +#ifdef H5_HAVE_PARALLEL +H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode); +H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info); +H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode); +#endif /* * Functions frome H5Rf.c */ -#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C) -#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C) -#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C) -#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C) -#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C) -#define nh5rget_object_type_obj_c H5_FC_FUNC_(h5rget_object_type_obj_c, H5RGET_OBJECT_TYPE_OBJ_C) -#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C) -#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C) - - -H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); -H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); -H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); -H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); -H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); +H5_FCDLL int_f h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); +H5_FCDLL int_f h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); -H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* * Functions from H5If.c */ -#define nh5iget_type_c H5_FC_FUNC_(h5iget_type_c, H5IGET_TYPE_C) -#define nh5iget_name_c H5_FC_FUNC_(h5iget_name_c, H5IGET_NAME_C) -#define nh5iinc_ref_c H5_FC_FUNC_(h5iinc_ref_c, H5IINC_REF_C) -#define nh5idec_ref_c H5_FC_FUNC_(h5idec_ref_c, H5IDEC_REF_C) -#define nh5iget_ref_c H5_FC_FUNC_(h5iget_ref_c, H5IGET_REF_C) -#define nh5iget_file_id_c H5_FC_FUNC_(h5iget_file_id_c, H5IGET_FILE_ID_C) -#define nh5iis_valid_c H5_FC_FUNC_(h5iis_valid_c, H5IIS_VALID_C) - -H5_FCDLL int_f nh5iget_type_c(hid_t_f *obj_id, int_f *type); -H5_FCDLL int_f nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); -H5_FCDLL int_f nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); -H5_FCDLL int_f nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); -H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); +H5_FCDLL int_f h5iget_type_c(hid_t_f *obj_id, int_f *type); +H5_FCDLL int_f h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size); +H5_FCDLL int_f h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_FCDLL int_f h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); +H5_FCDLL int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid); /* * Functions from H5Ef.c */ -#define nh5eclear_c H5_FC_FUNC_(h5eclear_c, H5ECLEAR_C) -#define nh5eprint_c1 H5_FC_FUNC_(h5eprint_c1, H5EPRINT_C1) -#define nh5eprint_c2 H5_FC_FUNC_(h5eprint_c2, H5EPRINT_C2) -#define nh5eget_major_c H5_FC_FUNC_(h5eget_major_c, H5EGET_MAJOR_C) -#define nh5eget_minor_c H5_FC_FUNC_(h5eget_minor_c, H5EGET_MINOR_C) -#define nh5eset_auto_c H5_FC_FUNC_(h5eset_auto_c, H5ESET_AUTO_C) -#define nprocess_buffer H5_FC_FUNC_(process_buffer, PROCESS_BUFFER) - -H5_FCDLL int_f nh5eclear_c(hid_t_f *estack_id); -H5_FCDLL int_f nh5eprint_c1(_fcd name, int_f* namelen); -H5_FCDLL int_f nh5eprint_c2(void); -H5_FCDLL int_f nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); -H5_FCDLL int_f nh5eset_auto_c(int_f* printflag); +H5_FCDLL int_f h5eclear_c(hid_t_f *estack_id); +H5_FCDLL int_f h5eprint_c1(_fcd name, int_f* namelen); +H5_FCDLL int_f h5eprint_c2(void); +H5_FCDLL int_f h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen); +H5_FCDLL int_f h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen); H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data); -H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer); /* * Functions from H5f.c */ -#define nh5open_c H5_FC_FUNC_(h5open_c, H5OPEN_C) -#define nh5close_c H5_FC_FUNC_(h5close_c, H5CLOSE_C) -#define nh5init_types_c H5_FC_FUNC_(h5init_types_c, H5INIT_TYPES_C) -#define nh5close_types_c H5_FC_FUNC_(h5close_types_c, H5CLOSE_TYPES_C) -#define nh5init_flags_c H5_FC_FUNC_(h5init_flags_c, H5INIT_FLAGS_C) -#define nh5init1_flags_c H5_FC_FUNC_(h5init1_flags_c, H5INIT1_FLAGS_C) -#define nh5get_libversion_c H5_FC_FUNC_(h5get_libversion_c, H5GET_LIBVERSION_C) -#define nh5check_version_c H5_FC_FUNC_(h5check_version_c, H5CHECK_VERSION_C) -#define nh5garbage_collect_c H5_FC_FUNC_(h5garbage_collect_c, H5GARBAGE_COLLECT_C) -#define nh5dont_atexit_c H5_FC_FUNC_(h5dont_atexit_c, H5DONT_ATEXIT_C) - - -H5_FCDLL int_f nh5open_c(void); -H5_FCDLL int_f nh5close_c(void); -H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); -H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); -H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, +H5_FCDLL int_f h5open_c(void); +H5_FCDLL int_f h5close_c(void); +H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); +H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); +H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags); -H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags); -H5_FCDLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); -H5_FCDLL int_f nh5garbage_collect_c(void); -H5_FCDLL int_f nh5dont_atexit_c(void); +H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags); +H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); +H5_FCDLL int_f h5garbage_collect_c(void); +H5_FCDLL int_f h5dont_atexit_c(void); /* * Functions from H5Zf.c */ -#define nh5zunregister_c H5_FC_FUNC_(h5zunregister_c, H5ZUNREGISTER_C) -#define nh5zfilter_avail_c H5_FC_FUNC_(h5zfilter_avail_c, H5ZFILTER_AVAIL_C) -#define nh5zget_filter_info_c H5_FC_FUNC_(h5zget_filter_info_c, H5ZGET_FILTER_INFO_C) - - -H5_FCDLL int_f nh5zunregister_c (int_f *filter); -H5_FCDLL int_f nh5zfilter_avail_c (int_f *filter, int_f *flag); -H5_FCDLL int_f nh5zget_filter_info_c (int_f *filter, int_f *flag); - +H5_FCDLL int_f h5zunregister_c(int_f *filter); +H5_FCDLL int_f h5zfilter_avail_c(int_f *filter, int_f *flag); +H5_FCDLL int_f h5zget_filter_info_c(int_f *filter, int_f *flag); /* * Functions from H5Lf.c */ -#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C) -#define nh5lcreate_external_c H5_FC_FUNC_(h5lcreate_external_c, H5LCREATE_EXTERNAL_C) -#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C) -#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C) -#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C) -#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C) -#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C) -#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C) -#define nh5lget_info_by_idx_c H5_FC_FUNC_(h5lget_info_by_idx_c, H5LGET_INFO_BY_IDX_C) -#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C) -#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C) -#define nh5lget_name_by_idx_c H5_FC_FUNC_(h5lget_name_by_idx_c, H5LGET_NAME_BY_IDX_C) -#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C) -H5_FCDLL int_f nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); +H5_FCDLL int_f h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); -H5_FCDLL int_f nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); +H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lis_registered_c(int_f *link_cls_id); -H5_FCDLL int_f nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id); +H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +H5_FCDLL int_f h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) ; H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data ); diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in new file mode 100644 index 0000000..0e14e86 --- /dev/null +++ b/fortran/src/H5fort_type_defines.h.in @@ -0,0 +1,16 @@ +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ +#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@ +#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ +#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@ +#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ +#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index c4b7f73..37509a0 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -9,7 +9,7 @@ * PURPOSE * C Program to match C types to Fortran types. * Creates the files H5f90i_gen.h for the C code and - * H5fortran_types.f90 for the Fortran code. + * H5fortran_types.F90 for the Fortran code. * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -31,6 +31,7 @@ */ #include +#include #include #include "H5public.h" @@ -45,12 +46,13 @@ FILE * c_header; FILE * fort_header; #define CFILE "H5f90i_gen.h" -#define FFILE "H5fortran_types.f90" +#define FFILE "H5fortran_types.F90" /* Prototypes for the write routines */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); -void writeTypedefDefault(const char* c_typedef, unsigned int size); -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind); +void writeTypedef(const char* c_typedef, const char* c_type, int size); +void writeTypedefDefault(const char* c_typedef, int size); +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind); +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); static void initCfile(void) @@ -100,6 +102,7 @@ initFfile(void) !\n!\n\ ! This file is automatically generated and contains HDF5 Fortran90 type definitions.\n!\n\ MODULE H5FORTRAN_TYPES\n\ + USE ISO_C_BINDING\n\ !\n\ ! HDF5 integers\n\ !\n"); @@ -119,253 +122,198 @@ endFfile(void) } /* Define a c_int_x type in the C header */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size) +void writeTypedef(const char* c_typedef, const char* c_type, int size) { fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type); } /* Call this function if there is no matching C type for sizes > 1 */ -void writeTypedefDefault(const char* c_typedef, unsigned int size) +void writeTypedefDefault(const char* c_typedef, int size) { assert(size %2 == 0); - fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); + fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u;\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); } /* Create matching Fortran and C types by writing to both files */ -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind) +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind) { fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } - +void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind) +{ + fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); + fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); +} int main(void) { - int FoundIntSize[4]; - unsigned FoundIntSizeKind[4]; - int FoundRealSize[3]; - unsigned FoundRealSizeKind[3]; - int i,j,flag; - char chrA[20],chrB[20]; - int H5_C_HAS_REAL_NATIVE_16; + int FoundIntSize[10]; + int FoundIntSizeKind[10]; + int FoundRealSize[10]; + int FoundRealSizeKind[10]; + int i, j,flag; + char chrA[32],chrB[32]; + + int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; + int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF; + int RealKinds[] = H5_FORTRAN_REAL_KINDS; + int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF; + char Real_C_TYPES[10][32]; + + int H5_FORTRAN_NUM_INTEGER_KINDS; + int H5_FORTRAN_NUM_REAL_KINDS; + int found_long_double = 0; /* Open target files */ c_header = fopen(CFILE, "w"); fort_header = fopen(FFILE, "w"); - /* Default is C has 16 byte float */ - H5_C_HAS_REAL_NATIVE_16 = 1; - /* Write copyright, boilerplate to both files */ initCfile(); initFfile(); - /* First, define c_int_x */ - -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - if(sizeof(long long) == 1) - writeTypedef("int", "long long", 1); - else if(sizeof(long) == 1) - writeTypedef("int", "long", 1); - else if(sizeof(int) == 1) - writeTypedef("int", "int", 1); - else if(sizeof(short) == 1) - writeTypedef("int", "short", 1); - else - writeTypedef("int", "char", 1); - /* Actually, char is not necessarily one byte. - * But if char isn't, then nothing is, so this - * is as close as we can get. */ - if(sizeof(size_t) == 1) - writeTypedef("size_t", "size_t", 1); - if(sizeof(hsize_t) == 1) - writeTypedef("hsize_t", "hsize_t", 1); -#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - if(sizeof(long long) == 2) - writeTypedef("int", "long long", 2); - else if(sizeof(long) == 2) - writeTypedef("int", "long", 2); - else if(sizeof(int) == 2) - writeTypedef("int", "int", 2); - else if(sizeof(short) == 2) - writeTypedef("int", "short", 2); - else - writeTypedefDefault("int",2); - - if(sizeof(size_t) == 2) - writeTypedef("size_t", "size_t", 2); - if(sizeof(hsize_t) == 2) - writeTypedef("hsize_t", "hsize_t", 2); -#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - if(sizeof(long long) == 4) - writeTypedef("int", "long long", 4); - else if(sizeof(long) == 4) - writeTypedef("int", "long", 4); - else if(sizeof(int) == 4) - writeTypedef("int", "int", 4); - else if(sizeof(short) == 4) - writeTypedef("int", "short", 4); - else - writeTypedefDefault("int",4); - - if(sizeof(size_t) == 4) - writeTypedef("size_t", "size_t", 4); - if(sizeof(hsize_t) == 4) - writeTypedef("hsize_t", "hsize_t", 4); - -#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - if(sizeof(long long) == 8) - writeTypedef("int", "long long", 8); - else if(sizeof(long) == 8) - writeTypedef("int", "long", 8); - else if(sizeof(int) == 8) - writeTypedef("int", "int", 8); - else if(sizeof(short) == 8) - writeTypedef("int", "short", 8); - else - writeTypedefDefault("int",8); - - if(sizeof(size_t) == 8) - writeTypedef("size_t", "size_t", 8); - if(sizeof(hsize_t) == 8) - writeTypedef("hsize_t", "hsize_t", 8); - -#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/ - - /* Define c_float_x */ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND - if(sizeof(long double) == 4) - writeTypedef("float", "long double", 4); - else if(sizeof(double) == 4) - writeTypedef("float", "double", 4); - else if(sizeof(float) == 4) - writeTypedef("float", "float", 4); - else - { printf("Fortran REAL is 4 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_4_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND - if(sizeof(long double) == 8) - writeTypedef("float", "long double", 8); - else if(sizeof(double) == 8) - writeTypedef("float", "double", 8); - else if(sizeof(float) == 8) - writeTypedef("float", "float", 8); - else - { printf("Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_8_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND - if(sizeof(long double) == 16) - writeTypedef("float", "long double", 16); - else if(sizeof(double) == 16) - writeTypedef("float", "double", 16); - else if(sizeof(float) == 16) - writeTypedef("float", "float", 16); - else /*C has no 16 byte float so disable it in Fortran*/ - { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf(" Disabling Fortran 16 byte REALs\n"); - H5_C_HAS_REAL_NATIVE_16 = 0; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_16_KIND*/ + /* (a) define c_int_x */ + + H5_FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds)/sizeof(IntKinds[0])); + H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds)/sizeof(RealKinds[0])); + + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(sizeof(long long) == IntKinds_SizeOf[i]) + writeTypedef("int", "long long", IntKinds[i]); + else if(sizeof(long) == IntKinds[i]) + writeTypedef("int", "long", IntKinds[i]); + else if(sizeof(int) == IntKinds_SizeOf[i]) + writeTypedef("int", "int", IntKinds[i]); + else if(sizeof(short) == IntKinds_SizeOf[i]) + writeTypedef("int", "short", IntKinds[i]); + else + if(IntKinds_SizeOf[i] == 1) { + writeTypedef("int", "char", IntKinds[i]); + /* Actually, char is not necessarily one byte. + * But if char isn't, then nothing is, so this + * is as close as we can get. */ + } else { + writeTypedefDefault("int",IntKinds[i]); + } + if(sizeof(size_t) == IntKinds_SizeOf[i]) + writeTypedef("size_t", "size_t", IntKinds[i]); + if(sizeof(hsize_t) == IntKinds_SizeOf[i]) + writeTypedef("hsize_t", "hsize_t", IntKinds[i]); + } + + /* (b) Define c_float_x */ + + for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { + if (sizeof(float) == RealKinds_SizeOf[i]) { + writeTypedef("float", "float", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT"); + } + else if(sizeof(double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_DOUBLE"); + } +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0 + else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); + found_long_double = 1; + } +# ifdef H5_HAVE_FLOAT128 + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeTypedef("float", "__float128", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# else + else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# endif +#else /* There is no C_LONG_DOUBLE intrinsic */ +# ifdef H5_HAVE_FLOAT128 + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == RealKinds_SizeOf[i] ) { + writeTypedef("float", "__float128", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# else + else if(sizeof(long double) == RealKinds_SizeOf[i] ) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } +# endif +#endif + else { + printf("\n **** HDF5 WARNING ****\n"); + printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]); + printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",RealKinds[i]); + + RealKinds_SizeOf[i] = -1; + RealKinds[i] = -1; + } + } /* Now begin defining fortran types. */ fprintf(c_header, "\n"); + /* haddr_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8 - writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4 - writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2 - writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1 - writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for haddr_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) { + writeToFiles("int","HADDR_T", "haddr_t_f", H5_SIZEOF_HADDR_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for haddr_t */ + return -1; + } /* hsize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hsize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) { + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", H5_SIZEOF_HSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hsize_t */ + return -1; + } /* hssize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hssize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) { + writeToFiles("int","HSSIZE_T", "hssize_t_f", H5_SIZEOF_HSSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hssize_t */ + return -1; + } /* off_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8 - writeToFiles("int","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("int","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("int","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("int","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 + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) { + writeToFiles("int","OFF_T", "off_t_f", H5_SIZEOF_OFF_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for off_t */ + return -1; + } /* size_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8 - writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4 - writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2 - writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1 - writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for size_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) { + writeToFiles("size_t","SIZE_T", "size_t_f", H5_SIZEOF_SIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for size_t */ + return -1; + } /* int */ -#if defined H5_FORTRAN_HAS_NATIVE_8_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND); -#else - /* Error: couldn't find a size for int */ - return -1; -#endif + writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_SIZEOF, H5_FORTRAN_NATIVE_INTEGER_KIND); /* int_1, int_2, int_4, int_8 */ @@ -374,29 +322,20 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundIntSize[0] = -1; - FoundIntSize[1] = -2; - FoundIntSize[2] = -4; - FoundIntSize[3] = -8; -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - FoundIntSize[0] = 1; - FoundIntSizeKind[0] = H5_FORTRAN_HAS_INTEGER_1_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - FoundIntSize[1] = 2; - FoundIntSizeKind[1] = H5_FORTRAN_HAS_INTEGER_2_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - FoundIntSize[2] = 4; - FoundIntSizeKind[2] = H5_FORTRAN_HAS_INTEGER_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - FoundIntSize[3] = 8; - FoundIntSizeKind[3] = H5_FORTRAN_HAS_INTEGER_8_KIND ; -#endif + FoundIntSize[0] = -1; + FoundIntSize[1] = -1; + FoundIntSize[2] = -1; + FoundIntSize[3] = -1; + FoundIntSize[4] = -1; + + for(i=0;i 0) /* Found the integer type */ { sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]); @@ -443,129 +382,77 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundRealSize[0] = -4; - FoundRealSize[1] = -8; - FoundRealSize[2] = -16; - -#if defined H5_FORTRAN_HAS_REAL_4_KIND - FoundRealSize[0] = 4; - FoundRealSizeKind[0] = H5_FORTRAN_HAS_REAL_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_REAL_8_KIND - FoundRealSize[1] = 8; - FoundRealSizeKind[1] = H5_FORTRAN_HAS_REAL_8_KIND; -#endif - -#if defined H5_FORTRAN_HAS_REAL_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - FoundRealSize[2] = 16; - FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND; - } -#endif - - for(i=0;i<3;i++) { - if( FoundRealSize[i] > 0) /* Found the real type */ - { - sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]); - sprintf(chrB, "real_%d_f", FoundRealSize[i]); - writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); - } - else /* Did not find the real type */ - { - flag = 0; /* flag indicating if found the next highest */ - for(j=i+1;j<3;j++) /* search for next highest */ - { - if( FoundRealSize[j] > 0) /* Found the next highest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) { - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - flag = 1; - } - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ -/* } */ - flag = 1; - break; - } - } - if(flag == 0) /* No higher one found, so find next lowest */ - { - for(j=1;j>-1;j--) /* Search for next lowest */ - { - if( FoundRealSize[j] > 0) /* Found the next lowest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ -/* } */ - flag = 1; - break; - } - } - } - if(flag == 0) /* No higher or lower one found, indicating an error */ - return -1; - } + FoundRealSize[0] = -1; + FoundRealSize[1] = -1; + FoundRealSize[2] = -1; + FoundRealSize[3] = -1; + FoundRealSize[4] = -1; + + for(i=0;i 0) { + FoundRealSize[i] = (int)RealKinds[i]; + FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i]; + sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]); + sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); + writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); } + } /* hid_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2 - writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1 - writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#else - /* Error: couldn't find a size for hid_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) { + writeToFiles("int","HID_T", "hid_t_f", H5_SIZEOF_HID_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hid_t */ + return -1; + } /* real_f */ -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND); + if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else { + /* No exact match, choose the next highest */ + if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else { + /* Error: couldn't find a size for real_f */ + printf("Error: couldn't find a size for real_f \n"); + return -1; } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND - writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND - writeToFiles("float", "Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); -#else - /* Error: couldn't find a size for real_f */ - return -1; -#endif + } /* double_f */ -#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND); - } else { -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); - } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ - writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); + if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT"); +#ifdef H5_HAVE_FLOAT128 + /* Don't select a higher precision than Fortran can support */ + else if(sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); } #else - /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ - return -1; + else if(sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) { + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128"); } #endif - -#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND - writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND); -#else - /* Error: couldn't find a size for real_f */ + else { + /* Error: couldn't find a size for double_f */ + printf("Error: couldn't find a size for double_f \n"); return -1; -#endif + } /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03' * in order to be interoperable with C's structure, the C buffer size @@ -574,12 +461,12 @@ int main(void) fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 ); - /* Close files */ endCfile(); endFfile(); fclose(c_header); fclose(fort_header); + return 0; } diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 deleted file mode 100644 index 1a1a0ec..0000000 --- a/fortran/src/H5test_kind.f90 +++ /dev/null @@ -1,269 +0,0 @@ -!****p* Program/H5test_kind -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only -! used when the Fortran intrinsic function SIZEOF is not available. It generates -! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less -! portable in comparison to using SIZEOF. -! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourma -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - j = SELECTED_INT_KIND(18) - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind.f90',& -'!',& -'! NOTES',& -'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be not available at',& -'! configure time',& -'!',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.f90',& -'!',& -'!*****' - -! Generate a program - - WRITE(*,*) "PROGRAM int_kind" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM int_kind" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: b=0" - WRITE(*,*)" INTEGER :: a(8)=0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: b_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1))" - WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" - WRITE(*,*)" IF (b_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (b_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER(",j,") :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL(KIND=",j,") :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 deleted file mode 100644 index 468086a..0000000 --- a/fortran/src/H5test_kind_SIZEOF.f90 +++ /dev/null @@ -1,228 +0,0 @@ -!****p* Program/H5test_kind_SIZEOF -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_SIZEOF.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! 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 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". -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_SIZEOF.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" - WRITE(*,*) "USE H5test_kind_SIZEOF_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" - -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.f90 b/fortran/src/H5test_kind_STORAGE_SIZE.f90 deleted file mode 100644 index 89c904c..0000000 --- a/fortran/src/H5test_kind_STORAGE_SIZE.f90 +++ /dev/null @@ -1,230 +0,0 @@ -!****p* Program/H5test_kind_STORAGE_SIZE -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_STORAGE_SIZE.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when -! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code -! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard -! compliant. This program is the preferred method. -! -! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_STORAGE_SIZE.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! 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. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_C_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" - WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" - -END PROGRAM test_kind - - - diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 new file mode 100644 index 0000000..64f5be6 --- /dev/null +++ b/fortran/src/HDF5.F90 @@ -0,0 +1,46 @@ +!****h* ROBODoc/HDF5 +! +! NAME +! MODULE HDF5 +! +! FILE +! src/fortran/src/HDF5.f90 +! +! PURPOSE +! This is the main module used for linking to the Fortran HDF library. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5G + USE H5E + USE H5I + USE H5L + USE H5S + USE H5D + USE H5A + USE H5T + USE H5O + USE H5P + USE H5R + USE H5Z + USE H5_gen + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 deleted file mode 100644 index 75af333..0000000 --- a/fortran/src/HDF5.f90 +++ /dev/null @@ -1,56 +0,0 @@ -!****h* ROBODoc/HDF5 -! -! NAME -! MODULE HDF5 -! -! FILE -! src/fortran/src/HDF5.f90 -! -! PURPOSE -! This is the main module used for linking to the Fortran HDF library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5F_PROVISIONAL - USE H5G - USE H5E - USE H5E_PROVISIONAL - USE H5I - USE H5L - USE H5L_PROVISIONAL - USE H5S - USE H5D - USE H5D_PROVISIONAL - USE H5A - USE H5A_PROVISIONAL - USE H5T - USE H5T_PROVISIONAL - USE H5O - USE H5O_PROVISIONAL - USE H5P - USE H5P_PROVISIONAL - USE H5R - USE H5R_PROVISIONAL - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90 deleted file mode 100644 index b8fb645..0000000 --- a/fortran/src/HDF5mpio.f90 +++ /dev/null @@ -1,55 +0,0 @@ -!****h* ROBODoc/HDF5 (mpio) -! -! NAME -! HDF5 -! -! PURPOSE -! This is the main module used for linking to the Fortran parallel HDF library. -! This file replaces HDF5.f90 when compiling the parallel library. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5F_PROVISIONAL - USE H5G - USE H5E - USE H5E_PROVISIONAL - USE H5I - USE H5L - USE H5L_PROVISIONAL - USE H5S - USE H5D - USE H5D_PROVISIONAL - USE H5A - USE H5A_PROVISIONAL - USE H5T - USE H5T_PROVISIONAL - USE H5O - USE H5O_PROVISIONAL - USE H5P - USE H5P_PROVISIONAL - USE H5FDMPIO - USE H5R - USE H5R_PROVISIONAL - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index a4b3843..734f46e 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,42 +42,13 @@ else AM_LDFLAGS+=-static endif -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled -if BUILD_PARALLEL_CONDITIONAL - PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 -else - PARALLEL_COND_SRC = HDF5.f90 -endif - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -if FORTRAN_2003_CONDITIONAL_F - F_STATUS = _F03 -else - F_STATUS = _F90 -endif - -# Condition for including/excluding the DBLE interfaces for when the -# default REAL is of type DOUBLE PRECISION. -# We do not include the double precision interfaces if the defaut REAL is -# DOUBLE PRECISION since this would lead to a non-unique conflict with the -# generic interfaces declared as REAL. -if FORTRAN_DEFAULT_REALisDBLE_F - F_DBLE = Exclude -else - F_DBLE = Include -endif - # Source files for the library. -libhdf5_fortran_la_SOURCES=H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES=H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 H5_gen.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 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) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 # HDF5 Fortran library depends on HDF5 Library. libhdf5_fortran_la_LIBADD=$(LIBHDF5) @@ -86,11 +57,10 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES=h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 +MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -136,55 +106,35 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5test_kind is compiled and run to produce H5fortran_detect.f90. -# H5fortran_detect is compiled and run to produce H5fort_type_defines.h. -# H5match_types.c then includes this file and can be compiled into +# H5_buildiface is compiled and run to produce H5_gen.F90. +# H5match_types.c then includes H5fort_type_defines.h and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.f90, which are included in the Fortran library. +# and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind +noinst_PROGRAMS = H5match_types H5_buildiface # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5fort_type_defines.h is created by running H5fortran_detect. -# Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h - -H5match_types.$(OBJEXT): H5fort_type_defines.h - -# Automake knows how to build fortran programs if we tell it the source -# files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 +# H5_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if -# intrinsic function SIZEOF is available. +H5_gen.F90: H5_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_buildiface$(EXEEXT) -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 - -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5_buildiface.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -if FORTRAN_HAVE_STORAGE_SIZE - H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 -else -if FORTRAN_HAVE_SIZEOF - H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 -else - H5test_kind_SOURCES = H5test_kind.f90 -endif -endif +H5_buildiface_SOURCES = H5_buildiface.F90 # Mark this directory as part of the Fortran API FORTRAN_API=yes @@ -193,51 +143,28 @@ FORTRAN_API=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -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 -H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo -H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -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 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 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: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +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_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo include $(top_srcdir)/config/conclude.am diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index aba85ec..9a1ce4f 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -99,16 +99,16 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/lt_vers.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ - $(srcdir)/h5fc.in $(top_srcdir)/bin/depcomp \ + $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \ + $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \ + $(srcdir)/H5fort_type_defines.h.in $(top_srcdir)/bin/depcomp \ $(top_srcdir)/bin/test-driver README # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ - H5test_kind$(EXEEXT) +noinst_PROGRAMS = H5match_types$(EXEEXT) H5_buildiface$(EXEEXT) TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -117,8 +117,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = h5fc +CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc +CONFIG_CLEAN_FILES = h5fc H5fort_type_defines.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -150,30 +150,12 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) -am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 \ - H5Dff.f90 H5Eff.f90 H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 \ - H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ - H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c 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 HDF5.f90 H5FDmpiof.c HDF5mpio.f90 \ - H5FDmpioff.f90 -@BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo -@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ - H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_DBLE_Interface$(F_DBLE).lo \ - H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo \ - H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo \ - H5Zf.lo H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo \ - 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) + H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ + H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ + H5_gen.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 HDF5.lo 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@) @@ -184,19 +166,12 @@ libhdf5_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) -am_H5fortran_detect_OBJECTS = H5fortran_detect.$(OBJEXT) -H5fortran_detect_OBJECTS = $(am_H5fortran_detect_OBJECTS) -H5fortran_detect_LDADD = $(LDADD) +am_H5_buildiface_OBJECTS = H5_buildiface.$(OBJEXT) +H5_buildiface_OBJECTS = $(am_H5_buildiface_OBJECTS) +H5_buildiface_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) -am__H5test_kind_SOURCES_DIST = H5test_kind.f90 H5test_kind_SIZEOF.f90 \ - H5test_kind_STORAGE_SIZE.f90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind_SIZEOF.$(OBJEXT) -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_H5test_kind_OBJECTS = H5test_kind_STORAGE_SIZE.$(OBJEXT) -H5test_kind_OBJECTS = $(am_H5test_kind_OBJECTS) -H5test_kind_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -213,6 +188,24 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -238,25 +231,17 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = -SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ - H5match_types.c $(H5test_kind_SOURCES) -DIST_SOURCES = $(am__libhdf5_fortran_la_SOURCES_DIST) \ - $(H5fortran_detect_SOURCES) H5match_types.c \ - $(am__H5test_kind_SOURCES_DIST) +SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ + H5match_types.c +DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \ + H5match_types.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)H5config_f.inc.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -513,14 +498,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -530,13 +522,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -578,6 +569,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -733,34 +736,14 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 - -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 -@FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -@FORTRAN_2003_CONDITIONAL_F_TRUE@F_STATUS = _F03 -@FORTRAN_DEFAULT_REALisDBLE_F_FALSE@F_DBLE = Include - -# Condition for including/excluding the DBLE interfaces for when the -# default REAL is of type DOUBLE PRECISION. -# We do not include the double precision interfaces if the defaut REAL is -# DOUBLE PRECISION since this would lead to a non-unique conflict with the -# generic interfaces declared as REAL. -@FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. -libhdf5_fortran_la_SOURCES = H5f90global.f90 \ - H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES = H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 H5_gen.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 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) + H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90 # HDF5 Fortran library depends on HDF5 Library. @@ -770,12 +753,10 @@ libhdf5_fortran_la_LIBADD = $(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES = h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 - +MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h @BUILD_PARALLEL_CONDITIONAL_FALSE@H5FC_NAME = h5fc # Custom rule for installing h5fc, since it will be named h5pfc if hdf5 @@ -784,18 +765,12 @@ MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# Automake knows how to build fortran programs if we tell it the source -# files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.f90 -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 - -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5_buildiface.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 +H5_buildiface_SOURCES = H5_buildiface.F90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -819,11 +794,11 @@ TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: $(BUILT_SOURCES) +all: $(BUILT_SOURCES) H5config_f.inc $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -855,8 +830,21 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + +H5config_f.inc: stamp-h2 + @test -f $@ || rm -f stamp-h2 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 + +stamp-h2: $(srcdir)/H5config_f.inc.in $(top_builddir)/config.status + @rm -f stamp-h2 + cd $(top_builddir) && $(SHELL) ./config.status fortran/src/H5config_f.inc + +distclean-hdr: + -rm -f H5config_f.inc stamp-h2 h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +H5fort_type_defines.h: $(top_builddir)/config.status $(srcdir)/H5fort_type_defines.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -905,18 +893,14 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -H5fortran_detect$(EXEEXT): $(H5fortran_detect_OBJECTS) $(H5fortran_detect_DEPENDENCIES) $(EXTRA_H5fortran_detect_DEPENDENCIES) - @rm -f H5fortran_detect$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5fortran_detect_OBJECTS) $(H5fortran_detect_LDADD) $(LIBS) +H5_buildiface$(EXEEXT): $(H5_buildiface_OBJECTS) $(H5_buildiface_DEPENDENCIES) $(EXTRA_H5_buildiface_DEPENDENCIES) + @rm -f H5_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5_buildiface_OBJECTS) $(H5_buildiface_LDADD) $(LIBS) H5match_types$(EXEEXT): $(H5match_types_OBJECTS) $(H5match_types_DEPENDENCIES) $(EXTRA_H5match_types_DEPENDENCIES) @rm -f H5match_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(H5match_types_OBJECTS) $(H5match_types_LDADD) $(LIBS) -H5test_kind$(EXEEXT): $(H5test_kind_OBJECTS) $(H5test_kind_DEPENDENCIES) $(EXTRA_H5test_kind_DEPENDENCIES) - @rm -f H5test_kind$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5test_kind_OBJECTS) $(H5test_kind_LDADD) $(LIBS) - mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -926,7 +910,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Af.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Df.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ef.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpiof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5If.Plo@am__quote@ @@ -941,6 +924,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5f90kit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5match_types.Po@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1208,7 +1200,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) H5config_f.inc all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1259,7 +1251,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-local distclean-tags + distclean-hdr distclean-local distclean-tags dvi: dvi-am @@ -1328,14 +1320,14 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + distclean-hdr distclean-libtool distclean-local distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ @@ -1401,72 +1393,42 @@ install-exec-local: #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) -# H5fort_type_defines.h is created by running H5fortran_detect. -# Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h - -H5match_types.$(OBJEXT): H5fort_type_defines.h - -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if -# intrinsic function SIZEOF is available. +# H5_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 +H5_gen.F90: H5_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -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 -H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo -H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -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 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 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: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.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 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 +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5_buildiface.lo: $(srcdir)/H5_buildiface.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +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_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ + H5Dff.lo \ + H5Eff.lo \ + H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ + H5Off.lo H5Pff.lo H5Rff.lo \ + H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 48fb343..7b218ca 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -7,99 +7,13 @@ H5LIB_mp_H5CHECK_VERSION_F H5LIB_mp_H5GARBAGE_COLLECT_F H5LIB_mp_H5DONT_ATEXIT_F H5LIB_mp_H5KIND_TO_TYPE -@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF -; H5_DBLE_INTERFACE -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5AWRITE_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5DFILL_DOUBLE -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5DREAD_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_SCALAR -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_1 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_2 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_3 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_4 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_5 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_6 -H5_DBLE_INTERFACE_mp_H5DWRITE_DOUBLE_7 -H5_DBLE_INTERFACE_mp_H5PGET_DOUBLE -H5_DBLE_INTERFACE_mp_H5PSET_DOUBLE -H5_DBLE_INTERFACE_mp_H5PSET_FILL_VALUE_DOUBLE -H5_DBLE_INTERFACE_mp_H5PGET_FILL_VALUE_DOUBLE -H5_DBLE_INTERFACE_mp_H5PINSERT_DOUBLE -H5_DBLE_INTERFACE_mp_H5PREGISTER_DOUBLE +H5LIB_mp_H5OFFSETOF ; H5A +H5A_mp_H5AWRITE_CHAR_SCALAR +H5A_mp_H5AREAD_CHAR_SCALAR H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F H5A_mp_H5AOPEN_IDX_F -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_1 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_2 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_3 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_4 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_5 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_6 -H5A_PROVISIONAL_mp_H5AWRITE_INTEGER_7 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_REAL_1 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_2 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_3 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_4 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_5 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_6 -H5A_PROVISIONAL_mp_H5AWRITE_REAL_7 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_SCALAR -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_1 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_2 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_3 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_4 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_5 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_6 -H5A_PROVISIONAL_mp_H5AWRITE_CHAR_7 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_1 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_2 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_3 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_4 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_5 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_6 -H5A_PROVISIONAL_mp_H5AREAD_INTEGER_7 -H5A_PROVISIONAL_mp_H5AREAD_REAL_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_REAL_1 -H5A_PROVISIONAL_mp_H5AREAD_REAL_2 -H5A_PROVISIONAL_mp_H5AREAD_REAL_3 -H5A_PROVISIONAL_mp_H5AREAD_REAL_4 -H5A_PROVISIONAL_mp_H5AREAD_REAL_5 -H5A_PROVISIONAL_mp_H5AREAD_REAL_6 -H5A_PROVISIONAL_mp_H5AREAD_REAL_7 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_SCALAR -H5A_PROVISIONAL_mp_H5AREAD_CHAR_1 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_2 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_3 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_4 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_5 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_6 -H5A_PROVISIONAL_mp_H5AREAD_CHAR_7 H5A_mp_H5AGET_SPACE_F H5A_mp_H5AGET_TYPE_F H5A_mp_H5AGET_NAME_F @@ -122,64 +36,16 @@ H5A_mp_H5AEXISTS_F H5A_mp_H5AEXISTS_BY_NAME_F H5A_mp_H5AOPEN_BY_NAME_F H5A_mp_H5ARENAME_F -@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR -@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR ; H5D H5D_mp_H5DCREATE_F H5D_mp_H5DOPEN_F H5D_mp_H5DCLOSE_F -H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_OBJ -H5D_PROVISIONAL_mp_H5DWRITE_REFERENCE_DSETREG -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_1 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_2 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_3 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_4 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_5 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_6 -H5D_PROVISIONAL_mp_H5DWRITE_INTEGER_7 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_1 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_2 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_3 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_4 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_5 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_6 -H5D_PROVISIONAL_mp_H5DWRITE_CHAR_7 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_SCALAR -H5D_PROVISIONAL_mp_H5DWRITE_REAL_1 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_2 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_3 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_4 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_5 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_6 -H5D_PROVISIONAL_mp_H5DWRITE_REAL_7 -H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_OBJ -H5D_PROVISIONAL_mp_H5DREAD_REFERENCE_DSETREG -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_1 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_2 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_3 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_4 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_5 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_6 -H5D_PROVISIONAL_mp_H5DREAD_INTEGER_7 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_CHAR_1 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_2 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_3 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_4 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_5 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_6 -H5D_PROVISIONAL_mp_H5DREAD_CHAR_7 -H5D_PROVISIONAL_mp_H5DREAD_REAL_SCALAR -H5D_PROVISIONAL_mp_H5DREAD_REAL_1 -H5D_PROVISIONAL_mp_H5DREAD_REAL_2 -H5D_PROVISIONAL_mp_H5DREAD_REAL_3 -H5D_PROVISIONAL_mp_H5DREAD_REAL_4 -H5D_PROVISIONAL_mp_H5DREAD_REAL_5 -H5D_PROVISIONAL_mp_H5DREAD_REAL_6 -H5D_PROVISIONAL_mp_H5DREAD_REAL_7 +H5D_mp_H5DWRITE_REFERENCE_OBJ +H5D_mp_H5DWRITE_REFERENCE_DSETREG +H5D_mp_H5DWRITE_CHAR_SCALAR +H5D_mp_H5DREAD_REFERENCE_OBJ +H5D_mp_H5DREAD_REFERENCE_DSETREG +H5D_mp_H5DREAD_CHAR_SCALAR H5D_mp_H5DGET_SPACE_F H5D_mp_H5DGET_TYPE_F H5D_mp_H5DSET_EXTENT_F @@ -192,9 +58,8 @@ H5D_mp_H5DWRITE_VL_REAL H5D_mp_H5DREAD_VL_REAL H5D_mp_H5DWRITE_VL_STRING H5D_mp_H5DREAD_VL_STRING -H5D_PROVISIONAL_mp_H5DFILL_INTEGER -H5D_PROVISIONAL_mp_H5DFILL_REAL -H5D_PROVISIONAL_mp_H5DFILL_CHAR +H5D_mp_H5DFILL_CHAR +H5D_mp_H5DFILL_INTEGER H5D_mp_H5DGET_SPACE_STATUS_F H5D_mp_H5DCREATE_ANON_F H5D_mp_H5DGET_SPACE_F @@ -204,15 +69,15 @@ H5D_mp_H5DGET_CREATE_PLIST_F H5D_mp_H5DGET_STORAGE_SIZE_F H5D_mp_H5DVLEN_GET_MAX_LEN_F H5D_mp_H5DGET_ACCESS_PLIST_F -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR -@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F +H5D_mp_H5DWRITE_PTR +H5D_mp_H5DREAD_PTR +H5D_mp_H5DVLEN_RECLAIM_F ; H5E H5E_mp_H5ECLEAR_F H5E_mp_H5EPRINT_F H5E_mp_H5EGET_MAJOR_F H5E_mp_H5EGET_MINOR_F -H5E_PROVISIONAL_mp_H5ESET_AUTO_F +H5E_mp_H5ESET_AUTO_F ; H5F H5F_mp_H5FCREATE_F H5F_mp_H5FFLUSH_F @@ -229,7 +94,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 +H5F_mp_H5FGET_FILE_IMAGE_F ; H5G H5G_mp_H5GOPEN_F H5G_mp_H5GCREATE_F @@ -291,8 +156,8 @@ H5L_mp_H5LGET_INFO_BY_IDX_F H5L_mp_H5LIS_REGISTERED_F H5L_mp_H5LMOVE_F H5L_mp_H5LGET_NAME_BY_IDX_F -@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F -@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F +H5L_mp_H5LITERATE_F +H5L_mp_H5LITERATE_BY_NAME_F ; H5O H5O_mp_H5OCLOSE_F H5O_mp_H5OCOPY_F @@ -307,11 +172,11 @@ H5O_mp_H5OOPEN_BY_IDX_F H5O_mp_H5OOPEN_F H5O_mp_H5OSET_COMMENT_F H5O_mp_H5OSET_COMMENT_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F -@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F +H5O_mp_H5OGET_INFO_BY_IDX_F +H5O_mp_H5OGET_INFO_BY_NAME_F +H5O_mp_H5OGET_INFO_F +H5O_mp_H5OVISIT_BY_NAME_F +H5O_mp_H5OVISIT_F ; H5P H5P_mp_H5PCREATE_F H5P_mp_H5PSET_PRESERVE_F @@ -322,12 +187,10 @@ H5P_mp_H5PCLOSE_F H5P_mp_H5PSET_CHUNK_F H5P_mp_H5PGET_CHUNK_F H5P_mp_H5PSET_DEFLATE_F -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_INTEGER -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_INTEGER -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_REAL -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_REAL -H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_CHAR -H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_CHAR +H5P_mp_H5PSET_FILL_VALUE_CHAR +H5P_mp_H5PGET_FILL_VALUE_CHAR +H5P_mp_H5PSET_FILL_VALUE_INTEGER +H5P_mp_H5PGET_FILL_VALUE_INTEGER H5P_mp_H5PGET_VERSION_F H5P_mp_H5PSET_USERBLOCK_F H5P_mp_H5PGET_USERBLOCK_F @@ -379,12 +242,10 @@ H5P_mp_H5PSET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PGET_SMALL_DATA_BLOCK_SIZE_F H5P_mp_H5PSET_HYPER_VECTOR_SIZE_F H5P_mp_H5PGET_HYPER_VECTOR_SIZE_F -H5P_PROVISIONAL_mp_H5PSET_INTEGER -H5P_PROVISIONAL_mp_H5PSET_REAL -H5P_PROVISIONAL_mp_H5PSET_CHAR -H5P_PROVISIONAL_mp_H5PGET_INTEGER -H5P_PROVISIONAL_mp_H5PGET_REAL -H5P_PROVISIONAL_mp_H5PGET_CHAR +H5P_mp_H5PSET_CHAR +H5P_mp_H5PSET_INTEGER +H5P_mp_H5PGET_CHAR +H5P_mp_H5PGET_INTEGER H5P_mp_H5PEXIST_F H5P_mp_H5PGET_SIZE_F H5P_mp_H5PGET_NPROPS_F @@ -395,13 +256,11 @@ H5P_mp_H5PCOPY_PROP_F H5P_mp_H5PREMOVE_F H5P_mp_H5PUNREGISTER_F H5P_mp_H5PCLOSE_CLASS_F -H5P_PROVISIONAL_mp_H5PCREATE_CLASS_F -H5P_PROVISIONAL_mp_H5PREGISTER_INTEGER -H5P_PROVISIONAL_mp_H5PREGISTER_REAL -H5P_PROVISIONAL_mp_H5PREGISTER_CHAR -H5P_PROVISIONAL_mp_H5PINSERT_INTEGER -H5P_PROVISIONAL_mp_H5PINSERT_REAL -H5P_PROVISIONAL_mp_H5PINSERT_CHAR +H5P_mp_H5PCREATE_CLASS_F +H5P_mp_H5PREGISTER_INTEGER +H5P_mp_H5PREGISTER_CHAR +H5P_mp_H5PINSERT_CHAR +H5P_mp_H5PINSERT_INTEGER H5P_mp_H5PSET_SHUFFLE_F H5P_mp_H5PSET_EDC_CHECK_F H5P_mp_H5PGET_EDC_CHECK_F @@ -448,28 +307,34 @@ H5P_mp_H5PGET_NLINKS_F H5P_mp_H5PGET_CREATE_INTER_GROUP_F H5P_mp_H5PSET_CHUNK_CACHE_F H5P_mp_H5PGET_CHUNK_CACHE_F -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILE_IMAGE_F -@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILE_IMAGE_F +H5P_mp_H5PSET_FILL_VALUE_PTR +H5P_mp_H5PGET_FILL_VALUE_PTR +H5P_mp_H5PSET_PTR +H5P_mp_H5PGET_PTR +H5P_mp_H5PREGISTER_PTR +H5P_mp_H5PINSERT_PTR +H5P_mp_H5PGET_FILE_IMAGE_F +H5P_mp_H5PSET_FILE_IMAGE_F +; Parallel +@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PSET_DXPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_DXPL_MPIO_F +@H5_NOPAREXP@H5P_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F ; H5R -H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F -H5R_PROVISIONAL_mp_H5RCREATE_REGION_F -H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F -H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F -H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F +H5R_mp_H5RCREATE_OBJECT_F +H5R_mp_H5RCREATE_REGION_F +H5R_mp_H5RDEREFERENCE_OBJECT_F +H5R_mp_H5RDEREFERENCE_REGION_F +H5R_mp_H5RGET_REGION_REGION_F H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F -H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F -H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F -@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F +H5R_mp_H5RGET_NAME_OBJECT_F +H5R_mp_H5RGET_NAME_REGION_F +H5R_mp_H5RGET_REGION_PTR_F +H5R_mp_H5RCREATE_PTR_F +H5R_mp_H5RDEREFERENCE_PTR_F +H5R_mp_H5RGET_NAME_PTR_F +H5R_mp_H5RGET_OBJ_TYPE_F ; H5S H5S_mp_H5SCREATE_SIMPLE_F H5S_mp_H5SCLOSE_F @@ -558,17 +423,10 @@ H5T_mp_H5TENCODE_F H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F -@H5_F03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F90 -@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F03 +H5T_mp_H5TCONVERT_F +H5T_mp_H5TENUM_INSERT_F90 +H5T_mp_H5TENUM_INSERT_F03 ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F H5Z_mp_H5ZGET_FILTER_INFO_F -; Parallel -@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_DXPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F -@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index a2711c0..19d4975 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -39,26 +39,11 @@ if (BUILD_SHARED_LIBS) ) endif (BUILD_SHARED_LIBS) -# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then -# fall back to F2003. If F2003 not supported then use F90 for the tests. - -set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) -if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90) - if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F08.f90 tf.f90) - endif (BUILD_SHARED_LIBS) -elseif (HDF5_ENABLE_F2003) - add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F03.f90 tf.f90) - if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F03.f90 tf.f90) - endif (BUILD_SHARED_LIBS) -else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) - add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F90.f90 tf.f90) - if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F90.f90 tf.f90) - endif (BUILD_SHARED_LIBS) -endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) +set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran) +add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +if (BUILD_SHARED_LIBS) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +endif (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} @@ -108,6 +93,40 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- +# Setup the Fortran auto-detection utilities +# H5_test_buildiface.F90 used to generate various KIND test interfaces +#----------------------------------------------------------------------------- + +add_executable (H5_test_buildiface + ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90 + ) + +if (WIN32 AND MSVC) + if (BUILD_SHARED_LIBS) + set_target_properties (H5_test_buildiface + PROPERTIES + COMPILE_FLAGS "/MT" + ) + endif (BUILD_SHARED_LIBS) + set_target_properties (H5_test_buildiface + PROPERTIES + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) +endif (WIN32 AND MSVC) +set_target_properties (H5_test_buildiface PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) + +set (CMD $) +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + COMMAND ${CMD} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5_test_buildiface +) + +#----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- @@ -234,62 +253,60 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for fortranlib_test_F03 -if (HDF5_ENABLE_F2003) - add_executable (fortranlib_test_F03 +add_executable (fortranlib_test_F03 + fortranlib_test_F03.f90 + tH5E_F03.f90 + tH5F_F03.f90 + tH5L_F03.f90 + tH5O_F03.f90 + tH5P_F03.f90 + tH5T_F03.F90 + tHDF5_F03.f90 +) +TARGET_NAMING (fortranlib_test_F03 STATIC) +TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") +target_link_libraries (fortranlib_test_F03 + ${HDF5_F90_TEST_LIB_TARGET} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} +) +if (WIN32 AND MSVC) + target_link_libraries (fortranlib_test_F03 "ws2_32.lib") +endif (WIN32 AND MSVC) +target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set_target_properties (fortranlib_test_F03 PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static +) +if (BUILD_SHARED_LIBS) + add_executable (fortranlib_test_F03-shared fortranlib_test_F03.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 - tH5T_F03.f90 + tH5T_F03.F90 tHDF5_F03.f90 ) - TARGET_NAMING (fortranlib_test_F03 STATIC) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") - target_link_libraries (fortranlib_test_F03 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + TARGET_NAMING (fortranlib_test_F03-shared SHARED) + TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") + target_link_libraries (fortranlib_test_F03-shared + ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_F90_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} ) if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03 "ws2_32.lib") + target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") endif (WIN32 AND MSVC) - target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (fortranlib_test_F03 PROPERTIES + target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set_target_properties (fortranlib_test_F03-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static - ) - if (BUILD_SHARED_LIBS) - add_executable (fortranlib_test_F03-shared - fortranlib_test_F03.f90 - tH5E_F03.f90 - tH5F_F03.f90 - tH5L_F03.f90 - tH5O_F03.f90 - tH5P_F03.f90 - tH5T_F03.f90 - tHDF5_F03.f90 - ) - TARGET_NAMING (fortranlib_test_F03-shared SHARED) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") - target_link_libraries (fortranlib_test_F03-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") - endif (WIN32 AND MSVC) - target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (fortranlib_test_F03-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared - ) - endif (BUILD_SHARED_LIBS) -endif (HDF5_ENABLE_F2003) + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared +) +endif (BUILD_SHARED_LIBS) #-- Adding test for fflush1 add_executable (fflush1 fflush1.f90) diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 new file mode 100644 index 0000000..30687df --- /dev/null +++ b/fortran/test/H5_test_buildiface.F90 @@ -0,0 +1,306 @@ +!****p* Program/H5_buildiface +! +! NAME +! Executable: H5_buildiface +! +! FILE +! fortran/src/H5_buildiface.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM H5_test_buildiface + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C integer) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + +! Generate Fortran Check routines for the tests KIND interfaces. + + OPEN(11,FILE='tf_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/TH5_MISC_gen.F90',& +'!',& +'! NAME',& +'! TH5_MISC_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5_test_buildiface.F90 to handle checking ',& +'! in the tests all the detected KINDs.',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5_test_buildiface.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE TH5_MISC_gen" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + +! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs + + WRITE(11,'(A)') ' INTERFACE verify' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2)) + END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " MODULE PROCEDURE verify_character" + WRITE(11,'(A)') " MODULE PROCEDURE verify_logical" + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') ' INTERFACE check_real_eq' + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2)) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +! *************************** +! VALIDATE INTEGERS +! *************************** + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NE. correct_value) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT INTEGER VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_integer_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE REALS +! *************************** + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (.NOT.real_eq_kind_'//TRIM(ADJUSTL(chr2))//'( value, correct_value) ) THEN' + WRITE(11,'(A)') ' total_error=total_error+1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2)) + + +! *********************************** +! TEST IF TWO REAL NUMBERS ARE EQUAL +! *********************************** + +! [1] The test performed is +! +! ABS( x - y ) < ( ULP * SPACING( MAX(ABS(x),ABS(y)) ) ) +! +! The numbers are considered equal if true +! +! The intrinsic function SPACING(x) returns the absolute spacing of numbers +! near the value of x, +! +! { EXPONENT(x)-DIGITS(x) +! { 2.0 for x /= 0 +! SPACING(x) = { +! { +! { TINY(x) for x == 0 +! +! The ULP optional argument scales the comparison: +! +! Unit of data precision. The acronym stands for "unit in +! the last place," the smallest possible increment or decrement +! that can be made using a machine's floating point arithmetic. +! A 0.5 ulp maximum error is the best you could hope for, since +! this corresponds to always rounding to the nearest representable +! floating-point number. Value must be positive - if a negative +! value is supplied, the absolute value is used. +! If not specified, the default value is 1. +! +! James Van Buskirk and James Giles suggested this method for floating +! point comparisons in the comp.lang.fortran newsgroup. +! +! Reference: [1] Paul van Delst, paul.vandelst@ssec.wisc.edu + + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: real_eq_kind_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') '!DEC$endif' + WRITE(11,'(A)') ' LOGICAL FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2))//'(a,b,ulp)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT (in):: a,b' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//') :: Rel' + WRITE(11,'(A)') ' INTEGER, OPTIONAL, INTENT( IN ) :: ulp' + WRITE(11,'(A)') ' IF ( PRESENT( ulp ) ) Rel = REAL( ABS(ulp), '//TRIM(ADJUSTL(chr2))//')' + WRITE(11,'(A)') ' Rel = 1.0_'//TRIM(ADJUSTL(chr2)) + WRITE(11,'(A)') ' real_eq_kind_'//TRIM(ADJUSTL(chr2))//' = ABS( a - b ) < ( Rel * SPACING( MAX(ABS(a),ABS(b)) ) )' + WRITE(11,'(A)') ' END FUNCTION real_eq_kind_'//TRIM(ADJUSTL(chr2)) + ENDDO + +! *************************** +! VALIDATE CHARACTER STRINGS +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER*(*) :: string' + WRITE(11,'(A)') ' CHARACTER*(*) :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (TRIM(value) .NE. TRIM(correct_value)) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + WRITE(11,'(A)') ' END SUBROUTINE verify_character' + +! *************************** +! VALIDATE LOGICAL +! *************************** + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_logical' + WRITE(11,'(A)') '!DEC$endif' +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE verify_logical(string,value,correct_value,total_error)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' + WRITE(11,'(A)') ' LOGICAL :: value, correct_value' + WRITE(11,'(A)') ' INTEGER :: total_error' + WRITE(11,'(A)') ' IF (value .NEQV. correct_value) THEN' + WRITE(11,'(A)') ' total_error = total_error + 1' + WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' + WRITE(11,'(A)') ' ENDIF' + + WRITE(11,'(A)') ' END SUBROUTINE verify_logical' + + WRITE(11,'(A)') "END MODULE TH5_MISC_gen" + + CLOSE(11) + +END PROGRAM H5_test_buildiface + + + diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 735ab7a..608b1e9 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -36,40 +36,12 @@ else AM_LDFLAGS+=-static endif -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -if FORTRAN_2003_CONDITIONAL_F - ff_PREFIX = F03 -else - ff_PREFIX = F90 -endif - # Our main targets, the tests themselves -TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 - -if FORTRAN_2003_CONDITIONAL_F - TEST_PROG += fortranlib_test_F03 -endif +TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 check_PROGRAMS=$(TEST_PROG) -if FORTRAN_HAVE_STORAGE_SIZE -if FORTRAN_HAVE_C_SIZEOF - libh5test_fortran_la_SOURCES = tf_F08.f90 -else - libh5test_fortran_la_SOURCES = tf_F03.f90 -endif -else -if FORTRAN_2003_CONDITIONAL_F - libh5test_fortran_la_SOURCES = tf_F03.f90 -else - libh5test_fortran_la_SOURCES = tf_F90.f90 -endif -endif - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -libh5test_fortran_la_SOURCES += tf.f90 t.c +libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -79,13 +51,11 @@ fortranlib_test_CFLAGS=$(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ fortranlib_test_1_8.f90 -if FORTRAN_2003_CONDITIONAL_F - fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 -endif +fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES=fflush1.f90 @@ -106,13 +76,32 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) tf_gen.F90; \ fi # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) FORTRAN_API=yes +# helper program we need to build. +noinst_PROGRAMS = H5_test_buildiface + +# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated +# with them. + +tf_gen.F90: H5_test_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) + +# H5_test_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. + +H5_test_buildiface_SOURCES = H5_test_buildiface.F90 + +# The build of the H5_test_buildiface does depend on any libraries, so set it +# to nothing. + +H5_test_buildiface_LDADD = + # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 4ec1ad5..4e9bbd6 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -14,6 +14,7 @@ @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -87,9 +88,9 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__append_2 = fortranlib_test_F03 -check_PROGRAMS = $(am__EXEEXT_2) -TESTS = $(am__EXEEXT_2) +check_PROGRAMS = $(am__EXEEXT_1) +noinst_PROGRAMS = H5_test_buildiface$(EXEEXT) +TESTS = $(am__EXEEXT_1) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ @@ -97,34 +98,25 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_fortran_la_LIBADD = -am__libh5test_fortran_la_SOURCES_DIST = tf_F90.f90 tf.f90 t.c \ - tf_F03.f90 tf_F08.f90 -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F90.lo \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo +am_libh5test_fortran_la_OBJECTS = tf_gen.lo tf.lo t.lo libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -@FORTRAN_2003_CONDITIONAL_F_TRUE@am__EXEEXT_1 = \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03$(EXEEXT) -am__EXEEXT_2 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ - fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) $(am__EXEEXT_1) +am__EXEEXT_1 = fortranlib_test$(EXEEXT) fflush1$(EXEEXT) \ + fflush2$(EXEEXT) fortranlib_test_1_8$(EXEEXT) \ + fortranlib_test_F03$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_H5_test_buildiface_OBJECTS = H5_test_buildiface.$(OBJEXT) +H5_test_buildiface_OBJECTS = $(am_H5_test_buildiface_OBJECTS) +H5_test_buildiface_DEPENDENCIES = am_fflush1_OBJECTS = fflush1.$(OBJEXT) fflush1_OBJECTS = $(am_fflush1_OBJECTS) fflush1_LDADD = $(LDADD) @@ -159,18 +151,10 @@ fortranlib_test_1_8_OBJECTS = $(am_fortranlib_test_1_8_OBJECTS) fortranlib_test_1_8_LDADD = $(LDADD) fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ $(LIBH5F) $(LIBHDF5) -am__fortranlib_test_F03_SOURCES_DIST = tH5E_F03.f90 tH5F_F03.f90 \ - tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 \ - tHDF5_F03.f90 fortranlib_test_F03.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = \ -@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) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5T_F03.$(OBJEXT) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tHDF5_F03.$(OBJEXT) \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ fortranlib_test_F03.$(OBJEXT) +am_fortranlib_test_F03_OBJECTS = tH5E_F03.$(OBJEXT) tH5F_F03.$(OBJEXT) \ + tH5L_F03.$(OBJEXT) tH5O_F03.$(OBJEXT) tH5P_F03.$(OBJEXT) \ + tH5T_F03.$(OBJEXT) tHDF5_F03.$(OBJEXT) \ + fortranlib_test_F03.$(OBJEXT) fortranlib_test_F03_OBJECTS = $(am_fortranlib_test_F03_OBJECTS) fortranlib_test_F03_LDADD = $(LDADD) fortranlib_test_F03_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \ @@ -187,10 +171,28 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -216,21 +218,14 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = -SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \ +SOURCES = $(libh5test_fortran_la_SOURCES) \ + $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ + $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ + $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) +DIST_SOURCES = $(libh5test_fortran_la_SOURCES) \ + $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ $(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES) -DIST_SOURCES = $(am__libh5test_fortran_la_SOURCES_DIST) \ - $(fflush1_SOURCES) $(fflush2_SOURCES) \ - $(fortranlib_test_SOURCES) $(fortranlib_test_1_8_SOURCES) \ - $(am__fortranlib_test_F03_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -522,14 +517,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -539,13 +541,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -587,6 +588,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -732,39 +745,10 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.raw # The Fortran test library noinst_LTLIBRARIES = libh5test_fortran.la -@FORTRAN_2003_CONDITIONAL_F_FALSE@ff_PREFIX = F90 - -# Check if the compiler supports the Fortran 2003 standard -# which should include the intrinsic module iso_c_binding -@FORTRAN_2003_CONDITIONAL_F_TRUE@ff_PREFIX = F03 # Our main targets, the tests themselves -TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ - $(am__append_2) - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F90.f90 \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ -@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ -@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c - -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F08.f90 \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ -@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c +TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 +libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. @@ -773,11 +757,11 @@ fortranlib_test_CFLAGS = $(AM_CFLAGS) fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90\ +fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ fortranlib_test_1_8.f90 -@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ -@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90 tHDF5_F03.f90 fortranlib_test_F03.f90 +fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ + tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 fflush1_SOURCES = fflush1.f90 fflush2_SOURCES = fflush2.f90 @@ -790,6 +774,14 @@ MOSTLYCLEANFILES = *.tmp # from tests in conclude.am) FORTRAN_API = yes +# H5_test_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. +H5_test_buildiface_SOURCES = H5_test_buildiface.F90 + +# The build of the H5_test_buildiface does depend on any libraries, so set it +# to nothing. +H5_test_buildiface_LDADD = + # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -812,7 +804,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -868,6 +860,19 @@ clean-checkPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +H5_test_buildiface$(EXEEXT): $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_DEPENDENCIES) $(EXTRA_H5_test_buildiface_DEPENDENCIES) + @rm -f H5_test_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5_test_buildiface_OBJECTS) $(H5_test_buildiface_LDADD) $(LIBS) + fflush1$(EXEEXT): $(fflush1_OBJECTS) $(fflush1_DEPENDENCIES) $(EXTRA_fflush1_DEPENDENCIES) @rm -f fflush1$(EXEEXT) $(AM_V_FCLD)$(FCLINK) $(fflush1_OBJECTS) $(fflush1_LDADD) $(LIBS) @@ -896,6 +901,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t.Plo@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1288,7 +1302,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: install: install-am install-exec: install-exec-am @@ -1327,7 +1341,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1400,19 +1414,19 @@ uninstall-am: .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - clean-local clean-noinstLTLIBRARIES cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic maintainer-clean-local mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am + clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-local \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-local mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am # @@ -1453,9 +1467,15 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) tf_gen.F90; \ fi +# H5_test_buildiface.F90 generates all the test APIs that have a KIND type associated +# with them. + +tf_gen.F90: H5_test_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5_test_buildiface$(EXEEXT) + # fflush2 depends on files created by fflush1 fflush2.chkexe_: fflush1.chkexe_ diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90 index 04ce439..4230832 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.f90 @@ -27,152 +27,151 @@ ! !***** - PROGRAM FFLUSH2EXAMPLE - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" - CHARACTER(LEN=80) :: fix_filename - - ! - !data space rank and dimensions - ! - INTEGER, PARAMETER :: NX = 4 - INTEGER, PARAMETER :: NY = 5 - - ! - ! File identifiers - ! - INTEGER(HID_T) :: file_id - - ! - ! Group identifier - ! - INTEGER(HID_T) :: gid - - ! - ! dataset identifier - ! - INTEGER(HID_T) :: dset_id - - - ! - ! data type identifier - ! - INTEGER(HID_T) :: dtype_id - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !general purpose integer - ! - INTEGER :: i, j, total_error = 0 - - ! - !data buffers - ! - INTEGER, DIMENSION(NX,NY) :: data_out - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - data_dims(1) = NX - data_dims(2) = NY - - ! - !Initialize FORTRAN predifined datatypes - ! - CALL h5open_f(error) - CALL check("h5open_f",error,total_error) - - ! - !Open the file. - ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) - if (error .ne. 0) then - write(*,*) "Cannot modify filename" - CALL h5_exit_f (1) - endif - CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error,total_error) - - ! - !Open the dataset - ! - CALL h5dopen_f(file_id, "/D", dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's data type. - ! - CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f",error,total_error) - - ! - !Read the dataset. - ! - CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) - CALL check("h5dread_f",error,total_error) - - ! - !Print the dataset. - ! - do i = 1, NX - write(*,*) (data_out(i,j), j = 1, NY) - end do -! -!result of the print statement -! -! 0, 1, 2, 3, 4 -! 1, 2, 3, 4, 5 -! 2, 3, 4, 5, 6 -! 3, 4, 5, 6, 7 - - ! - !Open the group. - ! - CALL h5gopen_f(file_id, "G", gid, error) - CALL check("h5gopen_f",error,total_error) - - ! - !In case error happens, exit. - ! - IF (error == -1) CALL h5_exit_f (1) - ! - !Close the datatype - ! - CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the group. - ! - CALL h5gclose_f(gid, error) - CALL check("h5gclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !Close FORTRAN predifined datatypes - ! - CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL h5close_f(error) - CALL check("h5close_types_f",error,total_error) - - ! if errors detected, exit with non-zero code. - IF (total_error .ne. 0) CALL h5_exit_f (1) - - END PROGRAM FFLUSH2EXAMPLE +PROGRAM FFLUSH2EXAMPLE + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" + CHARACTER(LEN=80) :: fix_filename + + ! + !data space rank and dimensions + ! + INTEGER, PARAMETER :: NX = 4 + INTEGER, PARAMETER :: NY = 5 + + ! + ! File identifiers + ! + INTEGER(HID_T) :: file_id + + ! + ! Group identifier + ! + INTEGER(HID_T) :: gid + + ! + ! dataset identifier + ! + INTEGER(HID_T) :: dset_id + + + ! + ! data type identifier + ! + INTEGER(HID_T) :: dtype_id + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !general purpose integer + ! + INTEGER :: i, j, total_error = 0 + + ! + !data buffers + ! + INTEGER, DIMENSION(NX,NY) :: data_out + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + data_dims(1) = NX + data_dims(2) = NY + + ! + !Initialize FORTRAN predifined datatypes + ! + CALL h5open_f(error) + CALL check("h5open_f",error,total_error) + + ! + !Open the file. + ! + CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + IF (error .NE. 0) THEN + WRITE(*,*) "Cannot modify filename" + CALL h5_exit_f (1) + ENDIF + CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error,total_error) + + ! + !Open the dataset + ! + CALL h5dopen_f(file_id, "/D", dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's data type. + ! + CALL h5dget_type_f(dset_id, dtype_id, error) + CALL check("h5dget_type_f",error,total_error) + ! + !Read the dataset. + ! + CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) + CALL check("h5dread_f",error,total_error) + + ! + !Print the dataset. + ! + DO i = 1, NX + WRITE(*,*) (data_out(i,j), j = 1, NY) + END DO + ! + !result of the print statement + ! + ! 0, 1, 2, 3, 4 + ! 1, 2, 3, 4, 5 + ! 2, 3, 4, 5, 6 + ! 3, 4, 5, 6, 7 + + ! + !Open the group. + ! + CALL h5gopen_f(file_id, "G", gid, error) + CALL check("h5gopen_f",error,total_error) + + ! + !In case error happens, exit. + ! + IF (error == -1) CALL h5_exit_f (1) + ! + !Close the datatype + ! + CALL h5tclose_f(dtype_id, error) + CALL check("h5tclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the group. + ! + CALL h5gclose_f(gid, error) + CALL check("h5gclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !Close FORTRAN predifined datatypes + ! + CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL h5close_f(error) + CALL check("h5close_types_f",error,total_error) + + ! if errors detected, exit with non-zero code. + IF (total_error .ne. 0) CALL h5_exit_f (1) + +END PROGRAM FFLUSH2EXAMPLE diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90 index e3b3b2a..5b814fa 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.f90 @@ -29,6 +29,10 @@ !***** MODULE TH5A + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE attribute_test(cleanup, total_error) @@ -36,9 +40,6 @@ CONTAINS ! h5acreate_f, h5awrite_f, h5aclose_f,h5aread_f, h5aopen_name_f, ! h5aget_name_f,h5aget_space_f, h5aget_type_f, ! - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -309,7 +310,7 @@ CONTAINS ! CALL h5aget_storage_size_f(attr_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) -! CALL VERIFY("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) +! CALL verify("h5aget_storage_size_f",attr_storage,*SizeOf(attr_storage),total_error) CALL h5aget_storage_size_f(attr2_id, attr_storage, error) CALL check("h5aget_storage_size_f",error,total_error) ! CALL verify("h5aget_storage_size_f",attr_storage,1,total_error) @@ -517,21 +518,15 @@ CONTAINS data_dims(1) = 1 CALL h5aread_f(attr3_id, H5T_NATIVE_DOUBLE, aread_double_data, data_dims, error) CALL check("h5aread_f",error,total_error) + CALL VERIFY("Read back double attrbute is wrong", aread_double_data(1),3.459_Fortran_DOUBLE,total_error) - IF( .NOT.dreal_eq( REAL(aread_double_data(1),dp), 3.459_dp) )THEN - WRITE(*,*) "Read back double attrbute is wrong", aread_double_data(1) - total_error = total_error + 1 - ENDIF ! !read the real attribute data back to memory ! data_dims(1) = 1 CALL h5aread_f(attr4_id, H5T_NATIVE_REAL, aread_real_data, data_dims, error) CALL check("h5aread_f",error,total_error) - IF( .NOT.dreal_eq( REAL(aread_real_data(1),dp), 4.0_dp) )THEN - WRITE(*,*) "Read back real attrbute is wrong", aread_real_data(1) - total_error = total_error + 1 - ENDIF + CALL VERIFY("Read back real attrbute is wrong", aread_real_data(1),4.0,total_error) ! !read the Integer attribute data back to memory ! diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90 index 8e20100..c70e288 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.f90 @@ -32,6 +32,10 @@ !***** MODULE TH5A_1_8 + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE attribute_test_1_8(cleanup, total_error) @@ -41,8 +45,6 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) ! H5Pset_shared_mesg_index_f ! - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -199,8 +201,6 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Needed for get_info_by_name - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE @@ -350,7 +350,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) @@ -363,7 +363,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) ! Verify creation order of attribute - CALL verifyLogical("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) END DO @@ -389,8 +389,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) !** Tests storing attribute with "null" dataspace !** !*************************************************************** - USE HDF5 - USE TH5_MISC + IMPLICIT NONE @@ -473,22 +472,22 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL H5Sextent_equal_f(attr_sid, null_sid, equal, error) CALL check("H5Sextent_equal_f",error,total_error) - CALL Verifylogical("H5Sextent_equal_f",equal,.TRUE.,total_error) + CALL verify("H5Sextent_equal_f",equal,.TRUE.,total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_storage_size_f",INT(storage_size),0,total_error) + CALL verify("h5aget_storage_size_f",INT(storage_size),0,total_error) CALL h5aget_info_f(attr, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f", error, total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f.corder",corder,0,total_error) + CALL verify("h5aget_info_f.corder",corder,0,total_error) - CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) CALL h5aclose_f(attr,error) CALL check("h5aclose_f",error,total_error) @@ -520,9 +519,6 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(SIZE_T), PARAMETER :: NAME_BUF_SIZE = 7 @@ -735,9 +731,6 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL :: new_format @@ -859,24 +852,24 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, 0_hsize_t, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,hsize_t), & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_info_by_idx_f",error,minusone,total_error) CALL h5aget_name_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & hzero, tmpname, error, size, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("h5aget_name_by_idx_f",error,minusone,total_error) + CALL verify("h5aget_name_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form @@ -941,9 +934,6 @@ END SUBROUTINE test_attr_info_by_idx SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER :: error, total_error @@ -974,7 +964,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing creation order @@ -983,12 +973,12 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, & n, tmpname, error, NAME_BUF_SIZE) CALL check("h5aget_name_by_idx_f",error,total_error) - CALL VERIFY("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) + CALL verify("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error) IF(attrname.NE.tmpname)THEN error = -1 ENDIF - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ! Don't test "native" order if there is no creation order index, since ! * there's not a good way to easily predict the attribute's order in the name @@ -999,13 +989,13 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) ! Verify the information for new attribute, in native creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! Verify the name for new link, in increasing native order CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, & @@ -1015,14 +1005,14 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) WRITE(*,*) "ERROR: attribute name size wrong!" error = -1 ENDIF - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) END IF CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & @@ -1033,41 +1023,41 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, 0_HSIZE_T, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 2) call by passing an integer with the INT(,hsize_t) declaration CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) ! 3) call by passing a variable with the attribute hsize_t CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,0,total_error) + CALL verify("h5aget_info_by_idx_f",corder,0,total_error) !EP CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_NAME_F, H5_ITER_DEC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) - CALL VERIFY("h5aget_info_by_idx_f",corder,INT(n),total_error) + CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) END SUBROUTINE attr_info_by_idx_check @@ -1082,9 +1072,6 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -1371,7 +1358,7 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! Check size of file !filesize = h5_get_file_size(FILENAME); - !VERIFY(filesize, empty_filesize, "h5_get_file_size"); + !verify(filesize, empty_filesize, "h5_get_file_size"); ENDDO ! Close dataspaces @@ -1392,9 +1379,6 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -1518,7 +1502,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deleting non-existant attribute !EP CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, 0_HSIZE_T,error, lapl_id=H5P_DEFAULT_F) CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, hzero,error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ! Create attributes, up to limit of compact form DO u = 0, max_compact - 1 @@ -1546,7 +1530,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for out of bound deletions CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO @@ -1584,10 +1568,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL VERIFY("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) + CALL verify("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1604,7 +1588,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ENDDO ! Delete last attribute @@ -1655,7 +1639,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDDO ! Check for out of bound deletion CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Work on all the datasets @@ -1684,10 +1668,10 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) f_corder_valid, corder, cset, data_size, error) IF(new_format)THEN IF(order.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Aget_info_by_idx_f",corder,u + 1,total_error) + CALL verify("H5Aget_info_by_idx_f",corder,u + 1,total_error) ENDIF ELSE - CALL VERIFY("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) + CALL verify("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) ENDIF ! Verify the name for first attribute in appropriate order @@ -1705,7 +1689,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) attrname = 'attr '//chr2 ENDIF IF(TRIM(attrname).NE.TRIM(tmpname)) error = -1 - CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error) + CALL verify("h5aget_name_by_idx_f",error,0,total_error) ENDDO @@ -1716,7 +1700,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Check for deletion on empty attribute storage again CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) - CALL VERIFY("H5Adelete_by_idx_f",error,minusone,total_error) + CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO ! Close Datasets @@ -1753,9 +1737,6 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2030,9 +2011,6 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) !** !*************************************************************** - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2169,7 +2147,7 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) ! Check size of file ! filesize = h5_get_file_size(FILENAME); - ! VERIFY(filesize, empty_filesize, "h5_get_file_size") + ! verify(filesize, empty_filesize, "h5_get_file_size") END SUBROUTINE test_attr_dense_open @@ -2182,9 +2160,6 @@ END SUBROUTINE test_attr_dense_open SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -2227,7 +2202,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_F", error, total_error) - CALL VERIFY("H5Aread_F", value, u, total_error) + CALL verify("H5Aread_F", value, u, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2259,7 +2234,7 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) data_dims(1) = 1 CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_f", error, total_error) - CALL VERIFY("H5Aread_f", value, u, total_error) + CALL verify("H5Aread_f", value, u, total_error) ! Close attribute @@ -2278,9 +2253,6 @@ END SUBROUTINE test_attr_dense_verify SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl @@ -2314,14 +2286,14 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Get creation order indexing on object CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Setting invalid combination of a attribute order creation order indexing on should fail CALL H5Pset_attr_creation_order_f(dcpl, H5P_CRT_ORDER_INDEXED_F, error) - CALL VERIFY("H5Pset_attr_creation_order_f",error , minusone, total_error) + CALL verify("H5Pset_attr_creation_order_f",error , minusone, total_error) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) ! Set attribute creation order tracking & indexing for object CALL h5pset_attr_creation_order_f(dcpl, IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), error) @@ -2329,7 +2301,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error) ! Create dataspace for dataset @@ -2374,7 +2346,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) ! Query the attribute creation properties CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) - CALL VERIFY("H5Pget_attr_creation_order_f",crt_order_flags , & + CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error ) ! Close property list @@ -2401,9 +2373,6 @@ END SUBROUTINE test_attr_corder_create_basic SUBROUTINE test_attr_basic_write(fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl @@ -2512,7 +2481,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL h5aget_storage_size_f(attr, attr_size, error) CALL check("h5aget_storage_size_f",error,total_error) -!EP CALL VERIFY("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) +!EP CALL verify("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) ! Read attribute information immediately, without closing attribute @@ -2521,7 +2490,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) ! Verify values read in DO i = 1, ATTR1_DIM1 - CALL VERIFY('h5aread_f',attr_data1(i),read_data1(i), total_error) + CALL verify('h5aread_f',attr_data1(i),read_data1(i), total_error) ENDDO ! CLOSE attribute @@ -2570,7 +2539,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) size = 18 CALL H5Aget_name_f(attr, size, chr_exact_size, error) CALL check('H5Aget_name_f',error,total_error) - CALL VerifyString('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) + CALL verify('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) ! Close attribute CALL h5aclose_f(attr, error) @@ -2599,9 +2568,6 @@ END SUBROUTINE test_attr_basic_write SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: new_format @@ -2656,19 +2622,19 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) WRITE(chr5,'(I5.5)') u attrname = 'attr '//chr5 CALL H5Aexists_f( gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.FALSE.,total_error ) + CALL verify("H5Aexists",exists,.FALSE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error, lapl_id = H5P_DEFAULT_F) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.FALSE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.FALSE.,total_error ) CALL h5acreate_f(gid, attrname, H5T_NATIVE_INTEGER, sid, aid, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) + CALL verify("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) attr_data1(1) = u data_dims(1) = 1 @@ -2680,10 +2646,10 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) CALL check("h5aclose_f",error,total_error) CALL H5Aexists_f(gid, attrname, exists, error) - CALL VerifyLogical("H5Aexists",exists,.TRUE.,total_error ) + CALL verify("H5Aexists",exists,.TRUE.,total_error ) CALL H5Aexists_by_name_f(fid, GROUP1_NAME, attrname, exists, error) - CALL VerifyLogical("H5Aexists_by_name_f",exists,.TRUE.,total_error ) + CALL verify("H5Aexists_by_name_f",exists,.TRUE.,total_error ) ENDDO @@ -2717,9 +2683,6 @@ END SUBROUTINE test_attr_many SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fid CHARACTER(LEN=*), INTENT(IN) :: dsetname @@ -2757,13 +2720,13 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check that the object's attributes are correct - CALL VERIFY("h5aget_info_f.corder",corder,u,total_error) - CALL Verifylogical("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f.corder",corder,u,total_error) + CALL verify("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) ! Close attribute @@ -2778,12 +2741,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f",corder,u,total_error) - CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f",corder,u,total_error) + CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) @@ -2800,12 +2763,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_info_f",error,total_error) ! Check the attribute's information - CALL VERIFY("h5aget_info_f",corder,u,total_error) - CALL Verifylogical("h5aget_info_f",f_corder_valid,.TRUE.,total_error) - CALL VERIFY("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("h5aget_info_f",corder,u,total_error) + CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) CALL h5aget_storage_size_f(attr_id, storage_size, error) CALL check("h5aget_storage_size_f",error,total_error) - CALL VERIFY("h5aget_info_f", INT(data_size), INT(storage_size), total_error) + CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) ! Close attribute CALL h5aclose_f(attr_id, error) diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90 index c0eb8f9..b5febb3 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.f90 @@ -36,503 +36,477 @@ ! MODULE TH5D -CONTAINS - SUBROUTINE datasettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name - CHARACTER(LEN=80) :: fix_filename - CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id ! Dataset identifier - INTEGER(HID_T) :: null_dset ! Null dataset identifier - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - INTEGER(HID_T) :: null_dspace ! Null dataspace identifier - INTEGER(HID_T) :: dtype_id ! Datatype identifier - - - 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 :: i, j !general purpose integers - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim - INTEGER :: null_dset_data = 1 ! null data - INTEGER :: flag ! Space allocation status - - ! - ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f", error, total_error) - - - ! - ! Create the dataspace. - ! - CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) - ! - ! Create null dataspace. - ! - CALL h5screate_f(H5S_NULL_F, null_dspace, 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) - ! - ! Create the null dataset. - ! - CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, & - null_dset, 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) - ! - ! Write null dataset. Nothing can be written. - ! - null_data_dim(1) = 1 - CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) - CALL h5dclose_f(null_dset, 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) - CALL h5sclose_f(null_dspace, error) - CALL check("h5sclose_f", error, total_error) - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_error) - - ! - ! Open the existing file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN - ! - ! Open the existing dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) - CALL h5dopen_f(file_id, null_dsetname, null_dset, error) - CALL check("h5dopen_f", error, total_error) - - ! Test whether space has been allocated for a dataset - CALL h5dget_space_status_f(dset_id, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) - - CALL h5dget_space_status_f(null_dset, flag, error) - CALL check("h5dget_space_status_f",error, total_error) - CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) - ! - ! Read the null dataset. Nothing should be read. - ! - CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" - END IF - end do - end do - - ! - ! Check if no change to null_dset_data - ! - IF (null_dset_data .NE. 1) THEN - write(*, *) "null dataset test error occured" +CONTAINS + SUBROUTINE datasettest(cleanup, total_error) + + IMPLICIT NONE + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name + CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name + CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id ! Dataset identifier + INTEGER(HID_T) :: null_dset ! Null dataset identifier + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + INTEGER(HID_T) :: null_dspace ! Null dataspace identifier + INTEGER(HID_T) :: dtype_id ! Datatype identifier + + 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 :: i, j !general purpose integers + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim + INTEGER :: null_dset_data = 1 ! null data + INTEGER :: flag ! Space allocation status + + ! + ! 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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f", error, total_error) + ! + ! Create the dataspace. + ! + CALL h5screate_simple_f(rank, dims, dspace_id, error) + CALL check("h5screate_simple_f", error, total_error) + ! + ! Create null dataspace. + ! + CALL h5screate_f(H5S_NULL_F, null_dspace, 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) + ! + ! Create the null dataset. + ! + CALL h5dcreate_f(file_id, null_dsetname, H5T_NATIVE_INTEGER, null_dspace, null_dset, 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) + ! + ! Write null dataset. Nothing can be written. + ! + null_data_dim(1) = 1 + CALL h5dwrite_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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) + CALL h5dclose_f(null_dset, 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) + CALL h5sclose_f(null_dspace, error) + CALL check("h5sclose_f", error, total_error) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f", error, total_error) + ! + ! Open the existing file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) + CALL check("h5fopen_f", error, total_error) + ! + ! Open the existing dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f", error, total_error) + CALL h5dopen_f(file_id, null_dsetname, null_dset, error) + CALL check("h5dopen_f", error, total_error) + + ! Test whether space has been allocated for a dataset + CALL h5dget_space_status_f(dset_id, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) + + CALL h5dget_space_status_f(null_dset, flag, error) + CALL check("h5dget_space_status_f",error, total_error) + CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, 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) + ! + ! Read the null dataset. Nothing should be read. + ! + CALL h5dread_f(null_dset, H5T_NATIVE_INTEGER, null_dset_data, null_data_dim, 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 written" END IF - - ! - ! End access to the dataset and release resources used by it. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) - CALL h5dclose_f(null_dset, 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) - if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL check("h5_cleanup_f", error, total_error) - - RETURN - END SUBROUTINE datasettest - + END DO + END DO + ! + ! Check if no change to null_dset_data + ! + IF (null_dset_data .NE. 1) THEN + WRITE(*, *) "null dataset test error occured" + END IF + ! + ! End access to the dataset and release resources used by it. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f", error, total_error) + CALL h5dclose_f(null_dset, 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) + IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) + + RETURN + END SUBROUTINE datasettest + ! !the following subroutine tests h5dextend_f functionality ! - SUBROUTINE extenddsettest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - LOGICAL, INTENT(IN) :: cleanup - INTEGER, INTENT(OUT) :: total_error - - ! - !the dataset is stored in file "extf.h5" - ! - CHARACTER(LEN=4), PARAMETER :: filename = "extf" - CHARACTER(LEN=80) :: fix_filename - - ! - !dataset name is "ExtendibleArray" - ! - CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" - - ! - !dataset rank is 2 - ! - 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 creatation property identifier - - ! - !dataset dimensions at creation time - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) - - ! - !data dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) - - ! - !Maximum dimensions - ! - INTEGER(HSIZE_T), DIMENSION(2) :: maxdims - - ! - !data arrays for reading and writing - ! - INTEGER, DIMENSION(10,3) :: data_in, data_out - - ! - !Size of data in the file - ! - INTEGER(HSIZE_T), DIMENSION(2) :: size - - ! - !general purpose integer - ! - INTEGER :: i, j - INTEGER(HSIZE_T) :: ih, jh - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !Variables used in reading data back - ! - INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr - INTEGER :: rankr - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - - ! - !data initialization - ! - do i = 1, 10 - do j = 1, 3 - data_in(i,j) = 2 - end do - end do - - ! - !Initialize FORTRAN predifined datatypes - ! + SUBROUTINE extenddsettest(cleanup, total_error) + + IMPLICIT NONE + + LOGICAL, INTENT(IN) :: cleanup + INTEGER, INTENT(OUT) :: total_error + + ! + !the dataset is stored in file "extf.h5" + ! + CHARACTER(LEN=4), PARAMETER :: filename = "extf" + CHARACTER(LEN=80) :: fix_filename + + ! + !dataset name is "ExtendibleArray" + ! + CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" + + ! + !dataset rank is 2 + ! + 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 creatation property identifier + + ! + !dataset dimensions at creation time + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) + + ! + !data dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) + + ! + !Maximum dimensions + ! + INTEGER(HSIZE_T), DIMENSION(2) :: maxdims + + ! + !data arrays for reading and writing + ! + INTEGER, DIMENSION(10,3) :: data_in, data_out + + ! + !Size of data in the file + ! + INTEGER(HSIZE_T), DIMENSION(2) :: size + + ! + !general purpose integer + ! + INTEGER :: i, j + INTEGER(HSIZE_T) :: ih, jh + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !Variables used in reading data back + ! + INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr + INTEGER :: rankr + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + + ! + !data initialization + ! + DO i = 1, 10 + DO j = 1, 3 + data_in(i,j) = 2 + END DO + END DO + + ! + !Initialize FORTRAN predifined datatypes + ! ! CALL h5init_types_f(error) ! CALL check("h5init_types_f",error,total_error) - ! - !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error,total_error) - - - ! - !Create the data space with unlimited dimensions. - ! - maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) - - CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Modify dataset creation properties, i.e. enable chunking - ! - CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) - CALL check("h5pcreat_f",error,total_error) - - CALL h5pset_chunk_f(crp_list, RANK, dims1, error) - CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) - - ! - !Extend the dataset. This call assures that dataset is 3 x 3. - ! - size(1) = 3 - size(2) = 3 - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - - ! - !Extend the dataset. Dataset becomes 10 x 3. - ! - size(1) = 10; - size(2) = 3; - CALL h5dextend_f(dset_id, size, error) - CALL check("h5dextend_f",error,total_error) - - ! - !Write the data of size 10X3 to the extended dataset. - ! - data_dims(1) = 10 - data_dims(2) = 3 - CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) - CALL check("h5dwrite_f",error,total_error) - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !read the data back - ! - !Open the file. - ! - CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("hfopen_f",error,total_error) - - ! - !Open the dataset. - ! - CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's dataspace handle. - ! - CALL h5dget_space_f(dset_id, dataspace, error) - CALL check("h5dget_space_f",error,total_error) - - ! - !Get dataspace's rank. - ! - CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) - CALL check("h5sget_simple_extent_ndims_f",error,total_error) - IF (rankr .NE. RANK) then - write(*,*) "dataset rank error occured" - stop - END IF - - ! - !Get dataspace's dimensinons. - ! - CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) - CALL check("h5sget_simple_extent_dims_f",error,total_error) - IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN - write(*,*) "dataset dimensions error occured" - stop + ! + !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 h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error,total_error) + + ! + !Create the data space with unlimited dimensions. + ! + maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) + + CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Modify dataset creation properties, i.e. enable chunking + ! + CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) + CALL check("h5pcreat_f",error,total_error) + + CALL h5pset_chunk_f(crp_list, RANK, dims1, error) + CALL check("h5pset_chunk_f",error,total_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 check("h5dcreate_f",error,total_error) + + ! + !Extend the dataset. This call assures that dataset is 3 x 3. + ! + SIZE(1) = 3 + SIZE(2) = 3 + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + + ! + !Extend the dataset. Dataset becomes 10 x 3. + ! + SIZE(1) = 10; + SIZE(2) = 3; + CALL h5dextend_f(dset_id, size, error) + CALL check("h5dextend_f",error,total_error) + + ! + !Write the data of size 10X3 to the extended dataset. + ! + data_dims(1) = 10 + data_dims(2) = 3 + CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) + CALL check("h5dwrite_f",error,total_error) + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !read the data back + ! + !Open the file. + ! + CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("hfopen_f",error,total_error) + + ! + !Open the dataset. + ! + CALL h5dopen_f(file_id, dsetname, dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's dataspace handle. + ! + CALL h5dget_space_f(dset_id, dataspace, error) + CALL check("h5dget_space_f",error,total_error) + + ! + !Get dataspace's rank. + ! + CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error) + CALL check("h5sget_simple_extent_ndims_f",error,total_error) + IF (rankr .NE. RANK) THEN + WRITE(*,*) "dataset rank error occured" + STOP + END IF + + ! + !Get dataspace's dimensinons. + ! + CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error) + CALL check("h5sget_simple_extent_dims_f",error,total_error) + IF ((dimsr(1) .NE. dims1(1)) .OR. (dimsr(2) .NE. dims1(2))) THEN + WRITE(*,*) "dataset dimensions error occured" + STOP + END IF + + ! + !Get creation property list. + ! + CALL h5dget_create_plist_f(dset_id, crp_list, error) + CALL check("h5dget_create_plist_f",error,total_error) + + + ! + !create memory dataspace. + ! + CALL h5screate_simple_f(rankr, dimsr, memspace, error) + CALL check("h5screate_simple_f",error,total_error) + + ! + !Read data + ! + CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, memspace, dataspace) + CALL check("h5dread_f",error,total_error) + + + ! + !Compare the data. + ! + DO ih = 1, dims1(1) + DO jh = 1, dims1(2) + IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN + WRITE(*, *) "extend dataset test error occured" + WRITE(*, *) "read value is not the same as the written values" END IF - - ! - !Get creation property list. - ! - CALL h5dget_create_plist_f(dset_id, crp_list, error) - CALL check("h5dget_create_plist_f",error,total_error) - - - ! - !create memory dataspace. - ! - CALL h5screate_simple_f(rankr, dimsr, memspace, error) - CALL check("h5screate_simple_f",error,total_error) - - ! - !Read data - ! - CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, & - memspace, dataspace) - CALL check("h5dread_f",error,total_error) - - - ! - !Compare the data. - ! - do ih = 1, dims1(1) - do jh = 1, dims1(2) - IF (data_out(ih,jh) .NE. data_in(ih, jh)) THEN - write(*, *) "extend dataset test error occured" - write(*, *) "read value is not the same as the written values" - END IF - end do - end do - - ! - !Close the dataspace for the dataset. - ! - CALL h5sclose_f(dataspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the memspace for the dataset. - ! - CALL h5sclose_f(memspace, error) - CALL check("h5sclose_f",error,total_error) - - ! - !Close the property list. - ! - CALL h5pclose_f(crp_list, error) - CALL check("h5pclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the file. - ! - 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 extenddsettest + END DO + END DO + + ! + !Close the dataspace for the dataset. + ! + CALL h5sclose_f(dataspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the memspace for the dataset. + ! + CALL h5sclose_f(memspace, error) + CALL check("h5sclose_f",error,total_error) + + ! + !Close the property list. + ! + CALL h5pclose_f(crp_list, error) + CALL check("h5pclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the file. + ! + 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 extenddsettest END MODULE TH5D diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.f90 index a7d45f2..63e70a3 100644 --- a/fortran/test/tH5E_F03.f90 +++ b/fortran/test/tH5E_F03.f90 @@ -36,6 +36,9 @@ ! ***************************************** MODULE test_my_hdf5_error_handler + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -49,8 +52,6 @@ CONTAINS ! This error function handle works with only version 2 error stack - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -74,8 +75,6 @@ CONTAINS ! This error function handle works with only version 2 error stack - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE ! estack_id is always passed from C as: H5E_DEFAULT @@ -102,8 +101,6 @@ CONTAINS SUBROUTINE test_error(total_error) - USE HDF5 - USE TH5_MISC USE ISO_C_BINDING USE test_my_hdf5_error_handler @@ -147,15 +144,15 @@ SUBROUTINE test_error(total_error) ! Create the erring dataset CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL VERIFY("h5dcreate_f", error, -1, total_error) + CALL verify("h5dcreate_f", error, -1, total_error) -!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) -!!$ CALL VERIFY("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) +!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(1),10, total_error) +!!$ CALL verify("H5Eset_auto_f",my_hdf5_error_handler_data(2),20, total_error) !!$ ! Test enabling and disabling default printing !!$ !!$ CALL H5Eget_auto_f(H5E_DEFAULT_F, func1, f_ptr1, error) -!!$ CALL VERIFY("H5Eget_auto_f", error, 0, total_error) +!!$ CALL verify("H5Eget_auto_f", error, 0, total_error) ! PRINT*,c_associated(f_ptr1) @@ -187,7 +184,7 @@ SUBROUTINE test_error(total_error) CALL H5Eset_auto_f(1, error, H5E_DEFAULT_F, func, f_ptr) CALL h5dcreate_f(FAKE_ID,"a_dataset",H5T_NATIVE_INTEGER, space, dataset, error) - CALL VERIFY("h5dcreate_f", error, -1, total_error) + CALL verify("h5dcreate_f", error, -1, total_error) ! turn on automatic printing with h5eprint_f which prints an error stack in the default manner. diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90 index c878a59..9e23d19 100644 --- a/fortran/test/tH5F_F03.f90 +++ b/fortran/test/tH5F_F03.f90 @@ -38,16 +38,17 @@ MODULE TH5F_F03 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + CONTAINS SUBROUTINE test_get_file_image(total_error) ! ! Tests the wrapper for h5fget_file_image ! - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error ! returns error @@ -128,8 +129,8 @@ SUBROUTINE test_get_file_image(total_error) 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) + 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)) diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90 index ab75163..ddc3736 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.f90 @@ -31,11 +31,13 @@ MODULE TH5G_1_8 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE group_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -139,9 +141,6 @@ END SUBROUTINE group_test SUBROUTINE group_info(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -269,7 +268,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Check for out of bound query by index on empty group, should fail CALL H5Gget_info_by_idx_f(group_id, ".", H5_INDEX_NAME_F, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error) - CALL VERIFY("H5Gget_info_by_idx_f", error, -1, total_error) + CALL verify("H5Gget_info_by_idx_f", error, -1, total_error) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 @@ -287,29 +286,29 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, 0, total_error) - CALL verifyLogical("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error, mounted=mounted) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) - CALL verifyLogical("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name", error, total_error) ! Check (new/empty) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, 0, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, 0, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) ! Create objects in new group created DO v = 0, u @@ -331,27 +330,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f",max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f",max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve group's information IF(order.NE.H5_ITER_NATIVE_F)THEN @@ -359,17 +358,17 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(u,HSIZE_T), & storage_type, nlinks, max_corder, error,lapl_id=H5P_DEFAULT_F, mounted=mounted) CALL check("H5Gget_info_by_idx_f", error, total_error) - CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) ELSE CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error, mounted=mounted) - CALL verifyLogical("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) + CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) CALL check("H5Gget_info_by_idx_f", error, total_error) ENDIF ! Check (new) group's information - CALL VERIFY("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_idx_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_idx_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_idx_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_idx_f", nlinks, u+1, total_error) ENDIF ! Close group created CALL H5Gclose_f(group_id2, error) @@ -380,27 +379,27 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(group_id, ".", storage_type, nlinks, max_corder, error, H5P_DEFAULT_F) CALL check("H5Gget_info_by_name_f", error, total_error) ! Check main group's information - CALL VERIFY("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_by_name_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_by_name_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) ! Create soft link in another group, to objects in main group valname = CORDER_GROUP_NAME//objname @@ -412,9 +411,9 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Gget_info_f", error, total_error) ! Check soft link group's information - CALL VERIFY("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) - CALL VERIFY("H5Gget_info_f", max_corder, u+1, total_error) - CALL VERIFY("H5Gget_info_f", nlinks, u+1, total_error) + CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) + CALL verify("H5Gget_info_f", max_corder, u+1, total_error) + CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ENDDO ! Close the groups @@ -456,9 +455,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE timestamps(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -491,7 +487,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL VerifyLogical("H5Pget_obj_track_times",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times",track_times,.TRUE.,total_error) ! Set a non-default object timestamp setting CALL H5Pset_obj_track_times_f(gcpl_id, .FALSE., error) @@ -502,7 +498,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) ! Check default timestamp information - CALL VerifyLogical("H5Pget_obj_track_times",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times",track_times,.FALSE.,total_error) ! Create file !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -533,10 +529,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) ! Query the object information for each group ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -593,10 +589,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) + CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) CALL H5Pget_obj_track_times_f(gcpl_id2, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - CALL VerifyLogical("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) + CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) !!$ !!$ Query the object information for each group !!$ if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR @@ -653,9 +649,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE mklinks(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -711,12 +704,12 @@ SUBROUTINE group_info(cleanup, fapl, total_error) error, H5P_DEFAULT_F) CALL check("H5Lget_info_f",error,total_error) -! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) +! CALL verify("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error) - CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) + CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error) + CALL verify("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error) ! should be '/d1' + NULL character = 4 - CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) + CALL verify("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) ! Create a symbolic link to something that doesn't exist @@ -749,9 +742,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) SUBROUTINE test_move_preserves(fapl_id, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl_id @@ -798,14 +788,14 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) + CALL verify("H5Pget_link_creation_order_f",crt_order_flags,0, total_error) CALL H5Pset_link_creation_order_f(fcpl_id, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_link_creation_order_f", error, total_error) CALL H5Pget_link_creation_order_f(fcpl_id, crt_order_flags, error) CALL check("H5Pget_link_creation_order_f",error, total_error) - CALL VERIFY("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) + CALL verify("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) ! Create file ! (with creation order tracking for the root group) @@ -835,10 +825,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR old_cset = cset - CALL VERIFY("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) - CALL VerifyLogical("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) + CALL verify("H5Lget_info_f",old_cset,H5T_CSET_UTF8_F,total_error) + CALL verify("H5Lget_info_f",f_corder_valid,.TRUE.,total_error) old_corder = corder; - CALL VERIFY("H5Lget_info_f",old_corder,0,total_error) + CALL verify("H5Lget_info_f",old_corder,0,total_error) ! old_modification_time = oinfo.mtime; @@ -956,10 +946,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! SUBROUTINE lifecycle(cleanup, fapl2, total_error) - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl2 @@ -1105,10 +1091,6 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) SUBROUTINE cklinks(fapl, total_error) -! USE ISO_C_BINDING - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1146,10 +1128,10 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Lexists_f(file,"d1",Lexists, error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) CALL H5Lexists_f(file,"grp1/hard",Lexists, error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) ! Cleanup CALL H5Fclose_f(file,error) @@ -1176,9 +1158,6 @@ END SUBROUTINE cklinks ! SUBROUTINE delete_by_idx(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1294,7 +1273,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! Check for deletion on empty group CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) - CALL VERIFY("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL verify("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Create several links, up to limit of compact form DO u = 0, max_compact-1 ! Make name for link @@ -1319,7 +1298,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) - CALL VERIFY("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) + CALL verify("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) ! Delete links from compact group @@ -1340,21 +1319,21 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Iget_type_f(grp, id_type, error) CALL check("H5Iget_type_f", error, total_error) - CALL VERIFY("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) + CALL verify("H5Iget_type_f", id_type, H5I_GROUP_F, total_error) CALL H5Gclose_f(grp, error) CALL check("H5Gclose_f", error, total_error) - CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) + CALL verify("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error) - CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) + CALL verify("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error) IF(iorder.EQ.H5_ITER_INC_F)THEN - CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, u+1, total_error) ELSE - CALL VERIFY("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) + CALL verify("H5Lget_info_by_idx_f", corder, (max_compact - (u + 2)), total_error) ENDIF - CALL VERIFY("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) + CALL verify("H5Lget_info_by_idx_f",cset, H5T_CSET_ASCII_F, total_error) @@ -1371,7 +1350,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ ENDIF !!$ objname = 'fill '//chr2 !!$ PRINT*,objname, tmpname -!!$ CALL verifyString("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) +!!$ CALL verify("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) ENDDO ! Close the group @@ -1418,9 +1397,6 @@ END SUBROUTINE delete_by_idx SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: group_id @@ -1455,14 +1431,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", corder, 0, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) ! Verify the link information for new link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, address, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) - CALL VERIFY("H5Lget_info_by_idx_f", corder, n, total_error) + CALL verify("H5Lget_info_by_idx_f", corder, n, total_error) ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN @@ -1481,21 +1457,21 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_small, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname_small)), tmpname_small(1:LEN(tmpname_small)), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! try it with the correct size CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname, error, size=size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:LEN(tmpname)), tmpname(1:LEN(tmpname)), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_big, error, size_tmp) CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error) - CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", & + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", & linkname(1:7), tmpname_big(1:7), total_error) - CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) + CALL verify("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error) ! Try with a buffer set to small @@ -1522,9 +1498,6 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & SUBROUTINE test_lcpl(cleanup, fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1591,7 +1564,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- - CALL VERIFY("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) + CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) ! Create and commit a datatype with the default LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) @@ -1652,10 +1625,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & DO i = 1, 2 tmp1 = INT(dimsout(i)) tmp2 = INT(extend_dim(i)) - CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) tmp1 = INT(maxdimsout(i)) tmp2 = INT(dims(i)) - CALL VERIFY("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) + CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) ENDDO ! close data set @@ -1722,7 +1695,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Pget_char_encoding_f(lcpl_id, encoding, error) CALL check("H5Pget_char_encoding_f", error, total_error) - CALL VERIFY("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) + CALL verify("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "dataset2", & @@ -1744,7 +1717,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Lexists_f(file_id,"/dataset2_link",Lexists, error) CALL check("H5Lexists",error, total_error) - CALL verifylogical("H5Lexists", Lexists,.TRUE.,total_error) + CALL verify("H5Lexists", Lexists,.TRUE.,total_error) ! Check that its character encoding is ASCII CALL H5Lget_info_f(file_id, "/dataset2_link", & @@ -1834,9 +1807,6 @@ END SUBROUTINE test_lcpl SUBROUTINE objcopy(fapl, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl @@ -1867,7 +1837,7 @@ SUBROUTINE objcopy(fapl, total_error) ! Verify object copy flags CALL H5Pget_copy_object_f(pid, cpy_flags, error) CALL check("H5Pget_copy_object_f",error, total_error) - CALL VERIFY("H5Pget_copy_object_f", cpy_flags, flag, total_error) + CALL verify("H5Pget_copy_object_f", cpy_flags, flag, total_error) !!$ !!$ CALL test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, @@ -1898,9 +1868,6 @@ END SUBROUTINE objcopy SUBROUTINE lapl_nlinks( fapl, total_error) - USE HDF5 - USE TH5_MISC - IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error @@ -1972,7 +1939,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) - CALL VERIFY("H5Pset_nlinks_f",INT(nlinks), 20, total_error) + CALL verify("H5Pset_nlinks_f",INT(nlinks), 20, total_error) ! Open object through what is normally too many soft links using @@ -1984,7 +1951,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft17", total_error) + CALL verify("h5iget_name_f", TRIM(objname),"/soft17", total_error) ! Create group using soft link CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) @@ -2006,12 +1973,12 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pget_nlinks_f",error,total_error) - CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 4, total_error) + CALL verify("H5Pget_nlinks_f", INT(nlinks), 4, total_error) ! Try opening through what is now too many soft links CALL H5Oopen_f(fid,"soft5",gid,error,plist) - CALL VERIFY("H5Oopen_f", error, -1, total_error) ! should fail + CALL verify("H5Oopen_f", error, -1, total_error) ! should fail ! Open object through lesser soft link CALL H5Oopen_f(fid,"soft4",gid,error,plist) @@ -2020,7 +1987,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) - CALL VerifyString("h5iget_name_f", TRIM(objname),"/soft4", total_error) + CALL verify("h5iget_name_f", TRIM(objname),"/soft4", total_error) ! Test other functions that should use a LAPL nlinks = 20 diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90 index 088b4eb..97c48c6 100644 --- a/fortran/test/tH5I.f90 +++ b/fortran/test/tH5I.f90 @@ -27,6 +27,10 @@ ! !***** MODULE TH5I + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -34,8 +38,6 @@ CONTAINS ! This subroutine tests following functionalities: h5iget_type_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -88,7 +90,7 @@ CONTAINS dtype = -1 CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL VerifyLogical("H5Iis_valid_f", tri_ret, .FALSE., total_error) + CALL verify("H5Iis_valid_f", tri_ret, .FALSE., total_error) ! Create a datatype id CALL H5Tcopy_f(H5T_NATIVE_INTEGER,dtype,error) @@ -97,7 +99,7 @@ CONTAINS ! Check that the ID is valid CALL H5Iis_valid_f(dtype, tri_ret, error) CALL check("H5Iis_valid_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", tri_ret, .TRUE., total_error) + CALL verify("H5Tequal_f", tri_ret, .TRUE., total_error) CALL H5Tclose_f(dtype, error) CALL check("H5Tclose_f", error, total_error) diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.f90 index 795f1e2..40afdbc 100644 --- a/fortran/test/tH5L_F03.f90 +++ b/fortran/test/tH5L_F03.f90 @@ -32,8 +32,10 @@ !***** MODULE liter_cb_mod - USE HDF5 - USE ISO_C_BINDING + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE TYPE iter_enum @@ -45,7 +47,7 @@ MODULE liter_cb_mod ! Custom group iteration callback data TYPE, bind(c) :: iter_info - CHARACTER(LEN=1), DIMENSION(1:10) :: name ! The name of the object + CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object INTEGER(c_int) :: TYPE ! The TYPE of the object INTEGER(c_int) :: command ! The TYPE of RETURN value END TYPE iter_info @@ -60,8 +62,6 @@ CONTAINS INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C) - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), VALUE :: group @@ -123,9 +123,6 @@ CONTAINS !*************************************************************** SUBROUTINE test_iter_group(total_error) - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING USE liter_cb_mod IMPLICIT NONE @@ -251,11 +248,11 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT ! Verify return value from iterator gets propagated correctly - CALL VERIFY("H5Literate", ret_value, 2, total_error) + CALL verify("H5Literate", ret_value, 2, total_error) ! Increment the number of times "2" is returned i = i + 1 ! Verify that the index is the correct value - CALL VERIFY("H5Literate", INT(idx), INT(i), total_error) + CALL verify("H5Literate", INT(idx), INT(i), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"ERROR: Group iteration function walked too far!" ENDIF @@ -264,14 +261,14 @@ SUBROUTINE test_iter_group(total_error) DO j = 1, 10 ichr10(j:j) = info%name(j)(1:1) ENDDO - CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.52)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIXME- scot END DO ! put check if did not walk far enough -scot FIXME IF(i .NE. (NDATASETS + 2)) THEN - CALL VERIFY("H5Literate_f", i, INT(NDATASETS + 2), total_error) + CALL verify("H5Literate_f", i, INT(NDATASETS + 2), total_error) PRINT*,"ERROR: Group iteration function didn't perform multiple iterations correctly" ENDIF @@ -288,13 +285,13 @@ SUBROUTINE test_iter_group(total_error) CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT - CALL VERIFY("H5Literate_f", ret_value, 1, total_error) + CALL verify("H5Literate_f", ret_value, 1, total_error) ! Increment the number of times "1" is returned i = i + 1 ! Verify that the index is the correct value - CALL VERIFY("H5Literate_f", INT(idx), INT(i+10), total_error) + CALL verify("H5Literate_f", INT(idx), INT(i+10), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"Group iteration function walked too far!" @@ -304,7 +301,7 @@ SUBROUTINE test_iter_group(total_error) ichr10(j:j) = info%name(j)(1:1) ENDDO ! Verify that the correct name is retrieved - CALL verifystring("H5Literate_f", ichr10, lnames(INT(idx)), total_error) + CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.42)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIX- scot ENDDO diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90 index efaf594..ba3f095 100644 --- a/fortran/test/tH5MISC_1_8.f90 +++ b/fortran/test/tH5MISC_1_8.f90 @@ -25,11 +25,13 @@ !***** MODULE TH5MISC_1_8 + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE dtransform(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -57,22 +59,22 @@ SUBROUTINE dtransform(cleanup, total_error) CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f, ptrgetTest, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to small CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_small, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:7), ptrgetTest_small, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size),15, total_error) ! check case when receiving buffer to big CALL H5Pget_data_transform_f(dxpl_id_c_to_f, ptrgetTest_big, error, size=size) CALL check("dtransform.H5Pget_data_transform_f", error, total_error) - CALL VerifyString("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) - CALL VERIFY("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) + CALL verify("dtransform.H5Pget_data_transform_f", c_to_f(1:15), ptrgetTest_big(1:15), total_error) + CALL verify("dtransform.H5Pget_data_transform_f", INT(size), 15, total_error) CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) @@ -92,9 +94,6 @@ END SUBROUTINE dtransform SUBROUTINE test_genprop_basic_class(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -117,7 +116,7 @@ SUBROUTINE test_genprop_basic_class(total_error) cid1 = 456 CALL H5Pget_class_name_f(cid1, name, size, error) - CALL VERIFY("H5Pget_class_name", error, -1, error) + CALL verify("H5Pget_class_name", error, -1, error) ! Create a new generic class, derived from the root of the class hierarchy CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error) @@ -126,8 +125,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name CALL H5Pget_class_name_f(cid1, name, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", name, CLASS1_NAME, error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", name, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -136,8 +135,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name smaller buffer CALL H5Pget_class_name_f(cid1, name_small, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", name_small(1:4), CLASS1_NAME(1:4), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',name_small(1:4), 'CLASS1_NAME=',CLASS1_NAME(1:4) total_error = total_error + 1 @@ -146,8 +145,8 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Check class name bigger buffer CALL H5Pget_class_name_f(cid1, name_big, size, error) CALL check("H5Pget_class_name", error, total_error) - CALL VERIFY("H5Pget_class_name", size,7,error) - CALL verifystring("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) + CALL verify("H5Pget_class_name", size,7,error) + CALL verify("H5Pget_class_name", TRIM(name_big), TRIM(CLASS1_NAME), error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',TRIM(name_small), 'CLASS1_NAME=',TRIM(CLASS1_NAME) total_error = total_error + 1 @@ -160,13 +159,13 @@ SUBROUTINE test_genprop_basic_class(total_error) ! Verify class parent correct CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) + CALL verify("H5Pequal_f", flag, .TRUE., total_error) ! Make certain false postives aren't being returned CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .FALSE., total_error) + CALL verify("H5Pequal_f", flag, .FALSE., total_error) ! Close parent class CALL H5Pclose_class_f(cid2, error) @@ -187,8 +186,6 @@ SUBROUTINE test_h5s_encode(total_error) !** !*************************************************************** - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -241,7 +238,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Try decoding bogus buffer CALL H5Sdecode_f(sbuf, decoded_sid1, error) - CALL VERIFY("H5Sdecode", error, -1, total_error) + CALL verify("H5Sdecode", error, -1, total_error) CALL H5Sencode_f(sid1, sbuf, sbuf_size, error) CALL check("H5Sencode", error, total_error) @@ -254,7 +251,7 @@ SUBROUTINE test_h5s_encode(total_error) ! Verify the decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & + CALL verify("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & total_error) ! @@ -297,16 +294,16 @@ SUBROUTINE test_h5s_encode(total_error) CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error) CALL check("H5Sget_simple_extent_type_f", error, total_error) - CALL VERIFY("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) + CALL verify("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) ! Verify decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) - CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) + CALL verify("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) CALL H5Sget_simple_extent_ndims_f(decoded_sid3, rank, error) CALL CHECK("H5Sget_simple_extent_ndims_f", error, total_error) - CALL VERIFY("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) + CALL verify("H5Sget_simple_extent_ndims_f", rank, 0, total_error ) CALL h5sclose_f(sid3, error) CALL check("h5sclose_f", error, total_error) @@ -335,8 +332,6 @@ END SUBROUTINE test_h5s_encode SUBROUTINE test_scaleoffset(cleanup, total_error ) - USE HDF5 - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90 index 99d4c22..51e1d64 100644 --- a/fortran/test/tH5O.f90 +++ b/fortran/test/tH5O.f90 @@ -28,11 +28,13 @@ !***** MODULE TH5O + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE test_h5o(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -57,9 +59,6 @@ END SUBROUTINE test_h5o SUBROUTINE test_h5o_link(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -157,7 +156,7 @@ SUBROUTINE test_h5o_link(total_error) CALL H5Tcommitted_f(type_id, committed, error) CALL check("H5Tcommitted_f",error,total_error) - CALL verifyLogical("H5Tcommitted_f", committed, .TRUE., total_error) + CALL verify("H5Tcommitted_f", committed, .TRUE., total_error) ! Create a dataset with no name using the committed datatype CALL H5Dcreate_anon_f(file_id, type_id, space_id, dset_id, error ) ! using no optional parameters @@ -181,7 +180,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL VERIFY("H5Dread_f",wdata(i,j),rdata(i,j),total_error) + CALL verify("H5Dread_f",wdata(i,j),rdata(i,j),total_error) wdata(i,j) = i*j ENDDO ENDDO @@ -229,7 +228,7 @@ SUBROUTINE test_h5o_link(total_error) ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 - CALL VERIFY("H5Dread",wdata(i,j),rdata(i,j),total_error) + CALL verify("H5Dread",wdata(i,j),rdata(i,j),total_error) ENDDO ENDDO ! Close open IDs @@ -464,7 +463,7 @@ SUBROUTINE test_h5o_link(total_error) nlinks = 0 CALL h5pget_nlinks_f(plist, nlinks, error) CALL check("h5pget_nlinks_f",error,total_error) - CALL VERIFY("h5pget_nlinks_f", INT(nlinks), 2, total_error) + CALL verify("h5pget_nlinks_f", INT(nlinks), 2, total_error) ! See if the link exists CALL h5oexists_by_name_f(file_id,"/G1_LINK", link_exists, error, plist) @@ -578,9 +577,6 @@ END SUBROUTINE test_h5o_link SUBROUTINE test_h5o_plist(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -631,18 +627,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Create a group, dataset, and committed datatype within the file, ! using the respective type of creation property lists. @@ -700,18 +696,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) @@ -757,18 +753,18 @@ SUBROUTINE test_h5o_plist(total_error) ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) CALL H5Pget_attr_phase_change_f(tcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) - CALL VERIFY("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) + CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) ! Close current objects CALL h5pclose_f(gcpl,error) diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.f90 index 8e014f4..834308b 100644 --- a/fortran/test/tH5O_F03.f90 +++ b/fortran/test/tH5O_F03.f90 @@ -31,7 +31,7 @@ MODULE visit_cb USE HDF5 - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -53,7 +53,7 @@ MODULE visit_cb ! ! Object visit structs TYPE, bind(c) :: obj_visit_t - CHARACTER(LEN=1), DIMENSION(1:180) :: path ! Path to object + CHARACTER(KIND=C_CHAR), DIMENSION(1:180) :: path ! Path to object INTEGER :: type_obj ! type of object END TYPE obj_visit_t diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index 7dcc580..39d8c1e 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -27,6 +27,9 @@ ! !***** MODULE TH5P + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS @@ -36,8 +39,6 @@ SUBROUTINE external_test(cleanup, total_error) ! h5pset_external_f, h5pget_external_count_f, ! h5pget_external_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -153,8 +154,6 @@ SUBROUTINE external_test(cleanup, total_error) END SUBROUTINE external_test SUBROUTINE multi_file_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -421,10 +420,7 @@ END SUBROUTINE multi_file_test ! April 16, 2009 !------------------------------------------------------------------------- ! -SUBROUTINE test_chunk_cache(cleanup, total_error) - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC +SUBROUTINE test_chunk_cache(cleanup, total_error) IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -470,19 +466,16 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Pget_cache_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl1, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_1), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_1), INT(nbytes_4), total_error) - - IF( .NOT.dreal_eq( REAL(w0_1,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", nslots_1, nslots_4, total_error) + CALL verify("H5Pget_chunk_cache_f", nbytes_1, nbytes_4, total_error) + CALL verify("H5Pget_chunk_cache_f", w0_1, w0_4, total_error) ! 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) CALL check("H5Pget_nlinks_f", error, total_error) - CALL VERIFY("H5Pget_nlinks_f", INT(nlinks), 134, total_error) + CALL verify("H5Pget_nlinks_f", INT(nlinks), 134, total_error) CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl_local, error) @@ -529,11 +522,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -561,11 +552,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -581,11 +570,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) @@ -601,11 +588,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) ! Don't close dapl2, we will use it in the next section ! Modify cache values on fapl_local @@ -638,11 +623,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_2,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) ! Test H5D_CHUNK_CACHE_NSLOTS_DEFAULT and H5D_CHUNK_CACHE_W0_DEFAULT nslots_2 = H5D_CHUNK_CACHE_NSLOTS_DFLT_F @@ -663,11 +646,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) CALL check("H5Pget_chunk_cache_f", error, total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) - CALL VERIFY("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) - IF( .NOT.dreal_eq( REAL(w0_3,dp), REAL( w0_4, dp)) ) THEN - CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error) - ENDIF + CALL verify("H5Pget_chunk_cache_f", INT(nslots_3), INT(nslots_4), total_error) + CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) + CALL verify("H5Pget_chunk_cache_f", w0_3, w0_4, total_error) ! Close diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90 index 56f9679..ec9fef2 100644 --- a/fortran/test/tH5P_F03.f90 +++ b/fortran/test/tH5P_F03.f90 @@ -52,8 +52,6 @@ CONTAINS INTEGER FUNCTION test_genprop_cls_cb1_f(list_id, create_data ) bind(C) - USE HDF5 - USE ISO_C_BINDING IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: list_id @@ -71,6 +69,11 @@ END MODULE test_genprop_cls_cb1_mod MODULE TH5P_F03 + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + CONTAINS !------------------------------------------------------------------------- @@ -92,9 +95,6 @@ CONTAINS SUBROUTINE test_create(total_error) - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -187,18 +187,12 @@ SUBROUTINE test_create(total_error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_DOUBLE, dpfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - IF(.NOT.dreal_eq( REAL(dpfill,dp), 1.0_dp))THEN - PRINT*,"***ERROR: Returned wrong fill value (double)" - total_error = total_error + 1 - ENDIF + CALL VERIFY("***ERROR: Returned wrong fill value (double)", dpfill, 1.0_dp, total_error) CALL H5Pset_fill_value_f(dcpl, H5T_NATIVE_REAL, 2.0, error) CALL check("H5Pset_fill_value_f",error, total_error) CALL h5pget_fill_value_f(dcpl, H5T_NATIVE_REAL, rfill, error) CALL check("H5Pget_fill_value_f",error, total_error) - IF(.NOT.dreal_eq( REAL(rfill,dp), REAL(2.0,dp)))THEN - PRINT*,"***ERROR: Returned wrong fill value (real)" - total_error = total_error + 1 - ENDIF + CALL VERIFY("***ERROR: Returned wrong fill value (real)", rfill, 2.0, total_error) ! For the actual compound type CALL H5Pset_fill_value_f(dcpl, comp_type_id, f_ptr, error) @@ -234,10 +228,10 @@ SUBROUTINE test_create(total_error) CALL H5Pget_fill_value_f(dcpl, comp_type_id, f_ptr, error) CALL check("H5Pget_fill_value_f", error, total_error) + CALL verify("***ERROR: Returned wrong fill value", rd_c%a, fill_ctype%a, total_error) + CALL verify("***ERROR: Returned wrong fill value", rd_c%y, fill_ctype%y, total_error) - IF( .NOT.dreal_eq( REAL(rd_c%a,dp), REAL(fill_ctype%a, dp)) .OR. & - .NOT.dreal_eq( REAL(rd_c%y,dp), REAL(fill_ctype%y, dp)) .OR. & - rd_c%x .NE. fill_ctype%x .OR. & + IF( rd_c%x .NE. fill_ctype%x .OR. & rd_c%z .NE. fill_ctype%z )THEN PRINT*,"***ERROR: Returned wrong fill value" @@ -269,9 +263,6 @@ SUBROUTINE test_genprop_class_callback(total_error) ! ! - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING USE test_genprop_cls_cb1_mod IMPLICIT NONE @@ -330,7 +321,7 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check the number of properties in class CALL h5pget_nprops_f(cid1, nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Initialize class callback structs @@ -350,12 +341,12 @@ SUBROUTINE test_genprop_class_callback(total_error) ! Check that the list's class is correct CALL H5Pequal_f(cid2, cid1, flag, error) CALL check("H5Pequal_f", error, total_error) - CALL verifylogical("H5Pequal_f", flag, .TRUE., total_error) + CALL verify("H5Pequal_f", flag, .TRUE., total_error) ! Check the class name CALL H5Pget_class_name_f(cid2, CLASS1_NAME_BUF, CLASS1_NAME_SIZE, error) CALL check("H5Pget_class_name_f", error, total_error) - CALL verifystring("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) + CALL verify("H5Pget_class_name_f", CLASS1_NAME_BUF, CLASS1_NAME, error) IF(error.NE.0)THEN WRITE(*,*) 'Class names do not match! name=',CLASS1_NAME_BUF, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 @@ -365,42 +356,42 @@ SUBROUTINE test_genprop_class_callback(total_error) CALL check("h5pclose_class_f", error, total_error) ! Verify that the creation callback occurred - CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 1, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid1, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%count, 1, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%id, lid1, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid1,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Create another property list from the class CALL h5pcreate_f(cid1, lid2, error) CALL check("h5pcreate_f", error, total_error) ! Verify that the creation callback occurred - CALL VERIFY("h5pcreate_f", crt_cb_struct%count, 2, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", crt_cb_struct%id, lid2, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%count, 2, total_error) + CALL verify("h5pcreate_f", crt_cb_struct%id, lid2, total_error) ! Check the number of properties in list CALL h5pget_nprops_f(lid2,nprops, error) CALL check("h5pget_nprops_f", error, total_error) - CALL VERIFY("h5pget_nprops_f", INT(nprops), 4, total_error) + CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) ! Close first list CALL h5pclose_f(lid1, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 1, total_error) - CALL VERIFY_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid1, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%count, 1, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%id, lid1, total_error) ! Close second list CALL h5pclose_f(lid2, error); CALL check("h5pclose_f", error, total_error) ! Verify that the close callback occurred - CALL VERIFY("h5pcreate_f", cls_cb_struct%count, 2, total_error) - CALL verify_INTEGER_HID_T("h5pcreate_f", cls_cb_struct%id, lid2, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%count, 2, total_error) + CALL verify("h5pcreate_f", cls_cb_struct%id, lid2, total_error) ! Close class CALL h5pclose_class_f(cid1, error) @@ -423,8 +414,6 @@ END SUBROUTINE test_genprop_class_callback SUBROUTINE test_h5p_file_image(total_error) - USE HDF5 - USE TH5_MISC USE, INTRINSIC :: iso_c_binding IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -475,11 +464,11 @@ SUBROUTINE test_h5p_file_image(total_error) CALL check("h5pget_file_image_f", error, total_error) ! Check that sizes are the same, and that the buffers are identical but separate - CALL VERIFY("h5pget_file_image_f", INT(temp_size), INT(size), total_error) + CALL verify("h5pget_file_image_f", INT(temp_size), INT(size), total_error) ! Verify the image data is correct DO i = 1, count - CALL VERIFY("h5pget_file_image_f", temp(i), buffer(i), total_error) + CALL verify("h5pget_file_image_f", temp(i), buffer(i), total_error) ENDDO END SUBROUTINE test_h5p_file_image @@ -499,10 +488,6 @@ END SUBROUTINE test_h5p_file_image ! SUBROUTINE external_test_offset(cleanup,total_error) - USE ISO_C_BINDING - USE TH5_MISC - USE HDF5 ! This module contains all necessary modules - IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index bd6264f..ef392b4 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -33,11 +33,13 @@ ! MODULE TH5R + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE refobjtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -125,7 +127,6 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "MyType", type_id, error) CALL check("h5tcommit_f",error,total_error) - ! ! Close dataspaces, groups and integer dataset ! @@ -164,22 +165,22 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7, total_error) - CALL VerifyString("H5Rget_name_f", buf, "/GROUP1", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7, total_error) + CALL verify("H5Rget_name_f", buf, "/GROUP1", total_error) ! with buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1", total_error) ! getting path to dataset in /Group1 CALL H5Rget_name_f(dsetr_id, ref(2), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),14,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),14,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/GROUP1/GROUP2", total_error) ! !Close the dataset @@ -233,7 +234,6 @@ SUBROUTINE refobjtest(cleanup, 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 @@ -244,9 +244,6 @@ END SUBROUTINE refobjtest ! and h5rdereference_f functionalities ! SUBROUTINE refregtest(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC -! use iso_c_binding ! NOTE: if this is uncommented, then need to move subroutine into another file. IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -408,23 +405,23 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(1), buf, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", buf, "/MATRIX", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", buf, "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer bigger then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_big, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_big), "/MATRIX", total_error) ! Get name of the dataset the first region reference points to using H5Rget_name_f ! buffer smaller then needed CALL H5Rget_name_f(dsetr_id, ref_out(1), buf_small, error, buf_size ) CALL check("H5Rget_name_f", error, total_error) - CALL VERIFY("H5Rget_name_f", INT(buf_size),7,total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) + CALL verify("H5Rget_name_f", INT(buf_size),7,total_error) + CALL verify("H5Rget_name_f", TRIM(buf_small), "/MAT", total_error) ! ! Dereference the first reference. ! @@ -436,7 +433,7 @@ SUBROUTINE refregtest(cleanup, total_error) ! Get name of the dataset the second region reference points to using H5Rget_name_f CALL H5Rget_name_f(dsetr_id, ref_out(2), buf, error) ! no optional size CALL check("H5Rget_name_f", error, total_error) - CALL VerifyString("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) + CALL verify("H5Rget_name_f", TRIM(buf), "/MATRIX", total_error) ! ! Read selected data from the dataset. ! diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.f90 index eaaf29a..7223772 100644 --- a/fortran/test/tH5S.f90 +++ b/fortran/test/tH5S.f90 @@ -35,12 +35,14 @@ !***** MODULE TH5S + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE dataspace_basic_test(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.f90 index 7d07308..aeb80e9 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.f90 @@ -38,13 +38,14 @@ !***** MODULE TH5SSELECT + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE test_select_hyperslab(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error @@ -699,8 +700,6 @@ CONTAINS SUBROUTINE test_basic_select(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1036,8 +1035,6 @@ CONTAINS !*************************************************************** SUBROUTINE test_select_point(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1140,9 +1137,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1171,9 +1168,9 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(1,i)), INT(coord1(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(2,i)), INT(coord1(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord1(3,i)), INT(coord1(3,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid1, npoints, error) @@ -1202,8 +1199,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO !!$ @@ -1238,8 +1235,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(1,i)), INT(coord2(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord2(2,i)), INT(coord2(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1284,8 +1281,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(0,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1311,8 +1308,8 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL h5sget_select_elem_pointlist_f(sid2, INT(POINT1_NPOINTS,hsize_t), INT(POINT1_NPOINTS,hsize_t),temp_coord3,error) CALL check("h5sget_select_elem_pointlist_f", error, total_error) DO i= 1, POINT1_NPOINTS - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) - CALL VERIFY("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(1,i)), INT(coord3(1,i)), total_error) + CALL verify("h5sget_select_elem_pointlist_f", INT(temp_coord3(2,i)), INT(coord3(2,i)), total_error) ENDDO CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1363,8 +1360,6 @@ END SUBROUTINE test_select_point !*************************************************************** SUBROUTINE test_select_combine(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1400,7 +1395,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(all_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Copy base dataspace and set selection to "none" CALL h5scopy_f(base_id, none_id, error) @@ -1411,7 +1406,7 @@ SUBROUTINE test_select_combine(total_error) CALL H5Sget_select_type_f(none_id, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_NONE_F), total_error) ! Copy "all" selection & space CALL H5Scopy_f(all_id, space1, error) @@ -1429,7 +1424,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that it's still "all" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT(H5S_SEL_ALL_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1451,12 +1446,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same at the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) @@ -1464,10 +1459,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1490,12 +1485,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined @@ -1507,19 +1502,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)), 10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)), 10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1542,12 +1537,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is an inversion of the original block CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there are two blocks CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 2, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1559,19 +1554,19 @@ SUBROUTINE test_select_combine(total_error) ! No guarantee is implied as the order in which blocks are listed. ! So this will ONLY work for square domains iblock(1:2) = (/5,5/) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) -!!$ CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(5,1,1)), 6, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(6,1,1)), 1, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(7,1,1)),10, total_error) +!!$ CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(8,1,1)),10, total_error) ! Otherwise make sure the "area" of the block is correct area = (ABS(INT(blocks(1,1,1)-blocks(3,1,1)))+1)*(ABS(INT(blocks(2,1,1)-blocks(4,1,1)))+1) area = area + (ABS(INT(blocks(5,1,1)-blocks(7,1,1)))+1)*(ABS(INT(blocks(6,1,1)-blocks(8,1,1)))+1) - CALL VERIFY("h5sget_select_hyper_blocklist_f", area, 80, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", area, 80, total_error) ! Close temporary dataspace @@ -1594,7 +1589,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1617,13 +1612,13 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list @@ -1631,10 +1626,10 @@ SUBROUTINE test_select_combine(total_error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1657,7 +1652,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1680,23 +1675,23 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is only one block CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined blocks = -1 ! Reset block list CALL h5sget_select_hyper_blocklist_f(space1, INT(0, hsize_t), INT(nblocks,hsize_t), blocks, error) CALL check("h5sget_select_hyper_blocklist_f", error, total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1719,7 +1714,7 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the "none" selection CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_NONE_F), total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1741,12 +1736,12 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the new selection is the same as the original hyperslab CALL H5Sget_select_type_f(space1, sel_type, error) CALL check("H5Sget_select_type_f", error, total_error) - CALL VERIFY("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) + CALL verify("H5Sget_select_type_f", INT(sel_type), INT( H5S_SEL_HYPERSLABS_F), total_error) ! Verify that there is ONLY one BLOCK CALL h5sget_select_hyper_nblocks_f(space1, nblocks, error) CALL check("h5sget_select_hyper_nblocks_f", error, total_error) - CALL VERIFY("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) + CALL verify("h5sget_select_hyper_nblocks_f", INT(nblocks), 1, total_error) ! Retrieve the block defined @@ -1757,10 +1752,10 @@ SUBROUTINE test_select_combine(total_error) ! Verify that the correct block is defined - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) - CALL VERIFY("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(1,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(2,1,1)), 1, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(3,1,1)), 5, total_error) + CALL verify("h5sget_select_hyper_blocklist_f", INT(blocks(4,1,1)), 4, total_error) ! Close temporary dataspace CALL h5sclose_f(space1, error) @@ -1785,8 +1780,6 @@ END SUBROUTINE test_select_combine !*************************************************************** SUBROUTINE test_select_bounds(total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error @@ -1817,10 +1810,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) ! Set offset for selection offset(1:2) = 1 @@ -1831,10 +1824,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(1)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(1)), SPACE11_DIM1, total_error) - CALL verify("h5sget_select_bounds_f", INT(high_bounds(2)), SPACE11_DIM2, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1, hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2, hsize_t), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1847,7 +1840,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for 'none' selection, should fail CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set point selection @@ -1863,10 +1856,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-4), total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-4), total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL VERIFY("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-4,hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-4,hsize_t), total_error) ! Set bad offset for selection @@ -1876,7 +1869,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/2,-2/) @@ -1887,10 +1880,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 5, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), INT(SPACE11_DIM1-2), total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), INT(SPACE11_DIM2-6), total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 5_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), INT(SPACE11_DIM1-2,hsize_t), total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), INT(SPACE11_DIM2-6,hsize_t), total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1911,10 +1904,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 37, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 37, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 37_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 37_hsize_t, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1923,7 +1916,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1934,10 +1927,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 42, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 35, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 42_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 35_hsize_t, total_error) ! Reset offset for selection offset(1:2) = 0 @@ -1958,10 +1951,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 3, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 50, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 50, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 3_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 50_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 50_hsize_t, total_error) ! Set bad offset for selection offset(1:2) = (/5,-5/) @@ -1970,7 +1963,7 @@ SUBROUTINE test_select_bounds(total_error) ! Get bounds for hyperslab selection with negative offset CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) - CALL VERIFY("h5sget_select_bounds_f", error, -1, total_error) + CALL verify("h5sget_select_bounds_f", error, -1, total_error) ! Set valid offset for selection offset(1:2) = (/5,-2/) @@ -1981,10 +1974,10 @@ SUBROUTINE test_select_bounds(total_error) CALL h5sget_select_bounds_f(sid, low_bounds, high_bounds, error) CALL check("h5sget_select_bounds_f", error, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(1)), 8, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(low_bounds(2)), 1, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(1)), 55, total_error) - CALL VERIFY("h5sget_select_bounds_f", INT(high_bounds(2)), 48, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(1), 8_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", low_bounds(2), 1_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(1), 55_hsize_t, total_error) + CALL verify("h5sget_select_bounds_f", high_bounds(2), 48_hsize_t, total_error) ! Reset offset for selection offset(1:2) = 0 diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 7822c16..efbceea 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -29,6 +29,10 @@ MODULE TH5T + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + CONTAINS SUBROUTINE compoundtest(cleanup, total_error) @@ -47,8 +51,6 @@ CONTAINS ! h5tget_class_f, h5tget_member_name_f, h5tget_member_offset_f, h5tget_member_type_f, ! h5tequal_f, h5tinsert_array_f, h5tcommit_f, h5tencode_f, h5tdecode_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -155,7 +157,6 @@ CONTAINS CALL h5tclose_f(fixed_str2,error) CALL check("h5tclose_f", error, total_error) - data_dims(1) = dimsize ! ! Initialize data buffer. @@ -178,47 +179,47 @@ CONTAINS ! during write/read to/from dataset with compound datatype. ! CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) - CALL check("h5pcreate_f", error, total_error) + CALL check("h5pcreate_f", error, total_error) CALL h5pset_preserve_f(plist_id, flag, error) - CALL check("h5pset_preserve_f", error, total_error) + CALL check("h5pset_preserve_f", error, total_error) ! ! Create a new file using default properties. ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + 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 check("h5fcreate_f", error, total_error) ! ! Create the dataspace. ! CALL h5screate_simple_f(rank, dims, dspace_id, error) - CALL check("h5screate_simple_f", error, total_error) + CALL check("h5screate_simple_f", error, total_error) ! ! Create compound datatype. ! ! First calculate total size by calculating sizes of each member ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt5_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt5_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt5_id, type_sizec, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) !write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized type_size = type_sizec + type_sizei + type_sized + type_sizer CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtype_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) ! ! Insert memebers ! @@ -226,19 +227,19 @@ CONTAINS ! offset = 0 CALL h5tinsert_f(dtype_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! INTEGER member ! offset = offset + type_sizec ! Offset of the second memeber is 2 CALL h5tinsert_f(dtype_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! DOUBLE PRECISION member ! offset = offset + type_sizei ! Offset of the third memeber is 6 CALL h5tinsert_f(dtype_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! REAL member ! @@ -250,123 +251,122 @@ CONTAINS ! CALL h5dcreate_f(file_id, dsetname, dtype_id, dspace_id, & dset_id, error) - CALL check("h5dcreate_f", error, total_error) + CALL check("h5dcreate_f", error, total_error) ! ! Create memory types. We have to create a compound datatype ! for each member we want to write. ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizec, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt5_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt2_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt2_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Write data by fields in the datatype. Fields order is not important. ! CALL h5dwrite_f(dset_id, dt4_id, real_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt1_id, char_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_error) + CALL check("h5dwrite_f", error, total_error) CALL h5dwrite_f(dset_id, dt2_id, int_member, data_dims, error, xfer_prp = plist_id) - CALL check("h5dwrite_f", error, total_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) + 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) + CALL check("h5sclose_f", error, total_error) ! ! Terminate access to the datatype ! CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) - + CALL check("h5tclose_f", error, total_error) ! ! Create and store compound datatype with the character and ! array members. ! type_size = type_sizec + elements*type_sizer ! Size of compound datatype CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dtarray_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dtarray_id, "char_field", offset, H5T_NATIVE_CHARACTER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) offset = type_sizec CALL h5tarray_create_f(H5T_NATIVE_REAL, array_dims_range, array_dims, arrayt_id, error) - CALL check("h5tarray_create_f", error, total_error) + CALL check("h5tarray_create_f", error, total_error) CALL h5tinsert_f(dtarray_id,"array_field", offset, arrayt_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) CALL h5tcommit_f(file_id, "Compound_with_array_member", dtarray_id, error) - CALL check("h5tcommit_f", error, total_error) + CALL check("h5tcommit_f", error, total_error) CALL h5tclose_f(arrayt_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dtarray_id, error) - CALL check("h5tclose_f", error, total_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 check("h5fclose_f", error, total_error) ! ! Open the file. ! CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error) - CALL check("h5fopen_f", error, total_error) + CALL check("h5fopen_f", error, total_error) ! ! Open the dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) - CALL check("h5dopen_f", error, total_error) + CALL check("h5dopen_f", error, total_error) ! ! Get datatype of the open dataset. ! Check it class, number of members, and member's names. ! CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f", error, total_error) + CALL check("h5dget_type_f", error, total_error) CALL h5tget_class_f(dtype_id, class, error) - CALL check("h5dget_class_f", error, total_error) + CALL check("h5dget_class_f", error, total_error) if (class .ne. H5T_COMPOUND_F) then write(*,*) " Wrong class type returned" total_error = total_error + 1 endif CALL h5tget_nmembers_f(dtype_id, num_members, error) - CALL check("h5dget_nmembers_f", error, total_error) + CALL check("h5dget_nmembers_f", error, total_error) if (num_members .ne. COMP_NUM_MEMBERS ) then write(*,*) " Wrong number of members returned" total_error = total_error + 1 @@ -377,11 +377,11 @@ CONTAINS ! do i = 1, num_members CALL h5tget_member_name_f(dtype_id, i-1, member_name, len, error) - CALL check("h5tget_member_name_f", error, total_error) + CALL check("h5tget_member_name_f", error, total_error) CALL h5tget_member_offset_f(dtype_id, i-1, offset_out, error) - CALL check("h5tget_member_offset_f", error, total_error) + CALL check("h5tget_member_offset_f", error, total_error) CALL h5tget_member_index_f(dtype_id, member_name(1:len), member_index, error) - CALL check("h5tget_member_index_f", error, total_error) + CALL check("h5tget_member_index_f", error, total_error) if(member_index .ne. i-1) then write(*,*) "Index returned is incorrect" write(*,*) member_index, i-1 @@ -394,16 +394,16 @@ CONTAINS write(*,*) "Offset of the char member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, dt5_id, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, dt5_id, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for character member" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_STRING_F) then write(*,*) "Wrong class returned for character member" total_error = total_error + 1 @@ -413,16 +413,16 @@ CONTAINS write(*,*) "Offset of the integer member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_INTEGER, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for integer memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_INTEGER_F) then write(*,*) "Wrong class returned for INTEGER member" total_error = total_error + 1 @@ -432,16 +432,16 @@ CONTAINS write(*,*) "Offset of the double precision member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_DOUBLE, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for double precision memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for double precision member" total_error = total_error + 1 @@ -451,16 +451,16 @@ CONTAINS write(*,*) "Offset of the real member is incorrect" total_error = total_error + 1 endif - CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) - CALL check("h5tget_member_type_f", error, total_error) - CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) - CALL check("h5tequal_f", error, total_error) + CALL h5tget_member_type_f(dtype_id, i-1, membtype_id, error) + CALL check("h5tget_member_type_f", error, total_error) + CALL h5tequal_f(membtype_id, H5T_NATIVE_REAL, flag, error) + CALL check("h5tequal_f", error, total_error) if(.not. flag) then write(*,*) "Wrong member type returned for real memebr" total_error = total_error + 1 endif - CALL h5tget_member_class_f(dtype_id, i-1, class, error) - CALL check("h5tget_member_class_f",error, total_error) + CALL h5tget_member_class_f(dtype_id, i-1, class, error) + CALL check("h5tget_member_class_f",error, total_error) if (class .ne. H5T_FLOAT_F) then write(*,*) "Wrong class returned for real member" total_error = total_error + 1 @@ -476,22 +476,22 @@ CONTAINS ! Create memory datatype to read character member of the compound datatype. ! CALL h5tcopy_f(H5T_NATIVE_CHARACTER, dt2_id, error) - CALL check("h5tcopy_f", error, total_error) + CALL check("h5tcopy_f", error, total_error) sizechar = 2 CALL h5tset_size_f(dt2_id, sizechar, error) - CALL check("h5tset_size_f", error, total_error) + CALL check("h5tset_size_f", error, total_error) CALL h5tget_size_f(dt2_id, type_size, error) - CALL check("h5tget_size_f", error, total_error) + CALL check("h5tget_size_f", error, total_error) CALL h5tcreate_f(H5T_COMPOUND_F, type_size, dt1_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt1_id, "char_field", offset, dt2_id, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (char_member_out(i) .ne. char_member(i)) then write(*,*) " Wrong character data is read back " @@ -500,15 +500,15 @@ CONTAINS enddo ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizei, dt5_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt5_id, "integer_field", offset, H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt5_id, int_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) + CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (int_member_out(i) .ne. int_member(i)) then write(*,*) " Wrong integer data is read back " @@ -518,39 +518,33 @@ CONTAINS ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sized, dt3_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt3_id, "double_field", offset, H5T_NATIVE_DOUBLE, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) - do i = 1, dimsize - IF( .NOT.dreal_eq( REAL(double_member_out(i),dp), REAL( double_member(i), dp)) ) THEN - write(*,*) " Wrong double precision data is read back " - total_error = total_error + 1 - endif - enddo + CALL check("h5dread_f", error, total_error) + DO i = 1, dimsize + CALL VERIFY("h5dread_f:Wrong double precision data is read back", double_member_out(i), double_member(i), total_error) + ENDDO ! ! CALL h5tcreate_f(H5T_COMPOUND_F, type_sizer, dt4_id, error) - CALL check("h5tcreate_f", error, total_error) + CALL check("h5tcreate_f", error, total_error) offset = 0 CALL h5tinsert_f(dt4_id, "real_field", offset, H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) + CALL check("h5tinsert_f", error, total_error) ! ! Read part of the dataset ! CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error) - CALL check("h5dread_f", error, total_error) - DO i = 1, dimsize - IF( .NOT.dreal_eq( REAL(real_member_out(i),dp), REAL( real_member(i), dp)) ) THEN - WRITE(*,*) " Wrong real precision data is read back " - total_error = total_error + 1 - ENDIF - ENDDO + CALL check("h5dread_f", error, total_error) + DO i = 1, dimsize + CALL VERIFY("h5dread_f:Wrong double precision data is read back", real_member_out(i), real_member(i), total_error) + ENDDO ! ! *----------------------------------------------------------------------- ! * Test encoding and decoding compound datatypes @@ -565,7 +559,7 @@ CONTAINS ! Try decoding bogus buffer CALL H5Tdecode_f(cmpd_buf, decoded_tid1, error) - CALL VERIFY("H5Tdecode_f", error, -1, total_error) + CALL verify("H5Tdecode_f", error, -1, total_error) CALL H5Tencode_f(dtype_id, cmpd_buf, cmpd_buf_size, error) CALL check("H5Tencode_f", error, total_error) @@ -578,27 +572,27 @@ CONTAINS CALL H5Tequal_f(decoded_tid1, dtype_id, flag, error) CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) ! ! Close all open objects. ! CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f", error, total_error) + CALL check("h5dclose_f", error, total_error) CALL h5tclose_f(dt1_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt2_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt3_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt5_id, error) - CALL check("h5tclose_f", error, total_error) + CALL check("h5tclose_f", error, total_error) CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f", error, total_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) + IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL check("h5_cleanup_f", error, total_error) RETURN END SUBROUTINE compoundtest @@ -614,9 +608,6 @@ CONTAINS ! H5tset_norm_f, H5tget_inpad_f, H5tset_inpad_f, H5tget_cset_f, ! H5tset_cset_f, H5tget_strpad_f, H5tset_strpad_f - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - IMPLICIT NONE INTEGER, INTENT(OUT) :: total_error @@ -902,7 +893,7 @@ CONTAINS CALL check("H5Tget_order_f",error, total_error) CALL H5Tget_order_f(H5T_NATIVE_INTEGER, order2, error) CALL check("H5Tget_order_f",error, total_error) - CALL VERIFY("H5Tget_native_type_f",order1, order2, total_error) + CALL verify("H5Tget_native_type_f",order1, order2, total_error) ! this test depends on whether -i8 was specified @@ -910,11 +901,11 @@ CONTAINS !!$ CALL check("H5Tget_size_f",error, total_error) !!$ CALL H5Tget_size_f(H5T_STD_I32BE, type_size2, error) !!$ CALL check("H5Tget_size_f",error, total_error) -!!$ CALL VERIFY("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) +!!$ CALL verify("H5Tget_native_type_f", INT(type_size1), INT(type_size2), total_error) CALL H5Tget_class_f(native_type, class, error) CALL check("H5Tget_class_f",error, total_error) - CALL VERIFY("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) + CALL verify("H5Tget_native_type_f", INT(class), INT(H5T_ENUM_F), total_error) CALL h5dclose_f(dset_id,error) CALL check("h5dclose_f", error, total_error) @@ -972,8 +963,6 @@ CONTAINS SUBROUTINE test_derived_flt(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -1060,24 +1049,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.44 .OR. epos.NE.34 .OR. esize.NE.10 .OR. mpos.NE.3 .OR. msize.NE.31)THEN - CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) + CALL verify("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid1, precision1, error) CALL check("H5Tget_precision_f", error, total_error) - CALL VERIFY("H5Tget_precision_f", INT(precision1), 42, total_error) + CALL verify("H5Tget_precision_f", INT(precision1), 42, total_error) CALL H5Tget_offset_f(tid1, offset1, error) CALL check("H5Tget_offset_f", error, total_error) - CALL VERIFY("H5Tget_offset_f", INT(offset1), 3, total_error) + CALL verify("H5Tget_offset_f", INT(offset1), 3, total_error) CALL H5Tget_size_f(tid1, size1, error) CALL check("H5Tget_size_f", error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size1), 7, total_error) + CALL verify("H5Tget_size_f", INT(size1), 7, total_error) CALL H5Tget_ebias_f(tid1, ebias1, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL VERIFY("H5Tget_ebias_f", INT(ebias1), 511, total_error) + CALL verify("H5Tget_ebias_f", INT(ebias1), 511, total_error) !-------------------------------------------------------------------------- ! * 2nd floating-point type @@ -1121,24 +1110,24 @@ SUBROUTINE test_derived_flt(cleanup, total_error) CALL check("H5Tget_fields_f", error, total_error) IF(spos.NE.23 .OR. epos.NE.16 .OR. esize.NE.7 .OR. mpos.NE.0 .OR. msize.NE.16)THEN - CALL VERIFY("H5Tget_fields_f", -1, 0, total_error) + CALL verify("H5Tget_fields_f", -1, 0, total_error) ENDIF CALL H5Tget_precision_f(tid2, precision2, error) CALL check("H5Tget_precision_f", error, total_error) - CALL VERIFY("H5Tget_precision_f", INT(precision2), 24, total_error) + CALL verify("H5Tget_precision_f", INT(precision2), 24, total_error) CALL H5Tget_offset_f(tid2, offset2, error) CALL check("H5Tget_offset_f", error, total_error) - CALL VERIFY("H5Tget_offset_f", INT(offset2), 0, total_error) + CALL verify("H5Tget_offset_f", INT(offset2), 0, total_error) CALL H5Tget_size_f(tid2, size2, error) CALL check("H5Tget_size_f", error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size2), 3, total_error) + CALL verify("H5Tget_size_f", INT(size2), 3, total_error) CALL H5Tget_ebias_f(tid2, ebias2, error) CALL check("H5Tget_ebias_f", error, total_error) - CALL VERIFY("H5Tget_ebias_f", INT(ebias2), 63, total_error) + CALL verify("H5Tget_ebias_f", INT(ebias2), 63, total_error) CALL h5tclose_f(tid1, error) CALL check("h5tclose_f", error, total_error) diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 new file mode 100644 index 0000000..d50b76d --- /dev/null +++ b/fortran/test/tH5T_F03.F90 @@ -0,0 +1,3425 @@ +!****h* root/fortran/test/tH5T_F03.f90 +! +! NAME +! tH5T_F03.f90 +! +! FUNCTION +! Test FORTRAN HDF5 H5T 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! +! CONTAINS SUBROUTINES +! test_array_compound_atomic, test_array_compound_array, +! test_array_bkg, test_h5kind_to_type +! +!***** + +! ***************************************** +! *** H 5 T T E S T S +! ***************************************** + +!*************************************************************** +!** +!** test_array_compound_atomic(): Test basic array datatype code. +!** Tests 1-D array of compound datatypes (with no array fields) +!** +!*************************************************************** +! +#include + +MODULE TH5T_F03 + + USE HDF5 + USE TH5_MISC + USE TH5_MISC_GEN + USE ISO_C_BINDING + +CONTAINS + +SUBROUTINE test_array_compound_atomic(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + ! 1-D dataset WITH fixed dimensions + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" + + TYPE s1_t + INTEGER :: i + REAL :: f + END TYPE s1_t + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write + TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + INTEGER(hid_t) :: sid1 ! Dataspace ID + INTEGER(hid_t) :: tid1 ! Array Datatype ID + INTEGER(hid_t) :: tid2 ! Compound Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER :: ndims ! Array rank for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER :: i,j ! counting variables + + INTEGER :: error ! Generic RETURN value + INTEGER :: namelen + LOGICAL :: flag + + TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work + + ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + wdata(i,j)%i = i * 10 + j + wdata(i,j)%f = i * 2.5 + j + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Insert float field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write dataset to disk + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2, error) + CALL check("h5tclose_f", error, total_error) + + ! Read dataset from disk + + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',wdata(i,j)%f, rdata(i,j)%f, total_error) + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + +END SUBROUTINE test_array_compound_atomic +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_compound_array(): Test basic array datatype code. +!!$!** Tests 1-D array of compound datatypes (with array fields) +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_compound_array(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + ! 1-D array datatype + INTEGER, PARAMETER :: ARRAY1_RANK= 1 + INTEGER, PARAMETER :: ARRAY1_DIM1= 3 + INTEGER, PARAMETER :: ARRAY2_DIM1= 5 + + INTEGER, PARAMETER :: SPACE1_RANK = 1 + INTEGER, PARAMETER :: SPACE1_DIM1 = 4 + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" + + TYPE st_t_struct ! Typedef for compound datatype + INTEGER :: i + REAL, DIMENSION(1:ARRAY2_DIM1) :: f + CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c + END TYPE st_t_struct + ! Information to write + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata + ! Information read in + TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata + + + INTEGER(hid_t) :: fid1 ! HDF5 File IDs + INTEGER(hid_t) :: dataset ! Dataset ID + integer(hid_t) :: sid1 ! Dataspace ID + integer(hid_t) :: tid1 ! Array Datatype ID + integer(hid_t) :: tid2 ! Compound Datatype ID + integer(hid_t) :: tid3 ! Nested Array Datatype ID + integer(hid_t) :: tid4 ! Nested Array Datatype ID + + INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) + INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) + + INTEGER ndims ! Array rank for reading + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + + INTEGER :: nmemb ! Number of compound members + CHARACTER(LEN=20) :: mname ! Name of compound field + INTEGER(size_t) :: off ! Offset of compound field + INTEGER(hid_t) :: mtid ! Datatype ID for field + INTEGER(hid_t) :: mtid2 ! Datatype ID for field + + INTEGER :: mclass ! Datatype class for field + INTEGER :: i,j,k ! counting variables + + INTEGER :: error + CHARACTER(LEN=2) :: ichr2 + INTEGER :: namelen + LOGICAL :: flag + INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier + INTEGER(SIZE_T) :: attrlen ! Length of the attribute string + + TYPE(c_ptr) :: f_ptr + + ! Initialize array data to write + DO i = 1, SPACE1_DIM1 + DO j = 1, array1_DIM1 + wdata(i,j)%i = i*10+j + DO k = 1, ARRAY2_DIM1 + wdata(i,j)%f(k) = 10*i+j+.5 + WRITE(ichr2,'(I2.2)') k + wdata(i,j)%c(k) = ichr2 + ENDDO + ENDDO + ENDDO + + ! Create file + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create dataspace for datasets + CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) + CALL check("h5screate_simple_f", error, total_error) + + ! Create a compound datatype to refer to + ! + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) + CALL check("h5tcreate_f", error, total_error) + + ! Insert integer field + CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) + CALL check("h5tinsert_f", error, total_error) + + ! Create an array of floats datatype + CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) + CALL check("h5tarray_create_f", error, total_error) + ! Insert float array field + + CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) + CALL check("h5tinsert_f", error, total_error) + + ! + ! Create datatype for the String attribute. + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) + CALL check("h5tcopy_f",error,total_error) + + attrlen = LEN(wdata(1,1)%c(1)) + CALL h5tset_size_f(atype_id, attrlen, error) + CALL check("h5tset_size_f",error,total_error) + + ! Create an array of character datatype + CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) + 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)(1:1))), tid4, error) + CALL check("h5tinsert2_f", error, total_error) + + ! Close array of floats field datatype + CALL h5tclose_f(tid3,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5tclose_f(tid4,error) + CALL check("h5tclose_f", error, total_error) + + ! Create an array datatype to refer to + CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) + CALL check("h5tarray_create_f", error, total_error) + + ! Close compound datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Create a dataset + CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + + ! Write dataset to disk + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dataset, tid1, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close disk dataspace + CALL h5sclose_f(sid1,error) + CALL check("h5sclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + + ! Re-open file + CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) + CALL check("h5fopen_f", error, total_error) + + ! Open the dataset + + CALL h5dopen_f(fid1, "Dataset1", dataset, error) + CALL check("h5dopen_f", error, total_error) + + ! Get the datatype + CALL h5dget_type_f(dataset, tid1, error) + CALL check("h5dget_type_f", error, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(tid1, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + + ! Get the array dimensions + ALLOCATE(rdims1(1:ndims)) + CALL h5tget_array_dims_f(tid1, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) + ENDDO + + ! Get the compound datatype + CALL h5tget_super_f(tid1, tid2, error) + CALL check("h5tget_super_f", error, total_error) + + ! Check the number of members + CALL h5tget_nmembers_f(tid2, nmemb, error) + CALL check("h5tget_nmembers_f", error, total_error) + CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) + + ! Check the 1st field's name + CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"i", total_error) + + ! Check the 1st field's offset + + CALL H5Tget_member_offset_f(tid2, 0, off, error) + CALL check("H5Tget_member_offset_f", error, total_error) + CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) + + ! Check the 1st field's datatype + CALL H5Tget_member_type_f(tid2, 0, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Check the 2nd field's name + CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"f", total_error) + + ! Check the 2nd field's offset + CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) + + ! Check the 2nd field's datatype + CALL H5Tget_member_type_f(tid2, 1, mtid, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 2nd field's class + CALL H5Tget_class_f(mtid, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the 3rd field's name + CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) + CALL check("H5Tget_member_name_f", error, total_error) + CALL verify("H5Tget_member_name_f",mname(1:namelen),"c", total_error) + + ! Check the 3rd field's offset + 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)(1:1)))), total_error) + + ! Check the 3rd field's datatype + CALL H5Tget_member_type_f(tid2, 2, mtid2, error) + CALL check("H5Tget_member_type_f", error, total_error) + + ! Get the 3rd field's class + CALL H5Tget_class_f(mtid2, mclass, error) + CALL check("H5Tget_class_f", error, total_error) + CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) + + ! Check the array rank + CALL h5tget_array_ndims_f(mtid2, ndims, error) + CALL check("h5tget_array_ndims_f", error, total_error) + CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) + + ! Get the array dimensions + CALL h5tget_array_dims_f(mtid2, rdims1, error) + CALL check("h5tget_array_dims_f", error, total_error) + + ! Check the array dimensions + DO i = 1, ndims + CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) + ENDDO + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + ! Check the nested array's datatype + CALL H5Tget_super_f(mtid2, tid3, error) + CALL check("H5Tget_super_f", error, total_error) + + CALL H5Tequal_f(tid3, atype_id, flag, error) + CALL check("H5Tequal_f", error, total_error) + CALL verify("H5Tequal_f", flag, .TRUE., total_error) + + ! Close the array's base type datatype + CALL h5tclose_f(tid3, error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid,error) + CALL check("h5tclose_f", error, total_error) + + ! Close the member datatype + CALL h5tclose_f(mtid2,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Compound Datatype + CALL h5tclose_f(tid2,error) + CALL check("h5tclose_f", error, total_error) + + ! READ dataset from disk + + f_ptr = c_null_ptr + f_ptr = C_LOC(rdata(1,1)) + CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Compare data read in + DO i = 1, SPACE1_DIM1 + DO j = 1, ARRAY1_DIM1 + IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + DO k = 1, ARRAY2_DIM1 + + IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN + PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN + PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + ENDDO + ENDDO + ENDDO + + ! Close Datatype + CALL h5tclose_f(tid1,error) + CALL check("h5tclose_f", error, total_error) + + ! Close Dataset + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + ! Close file + CALL h5fclose_f(fid1,error) + CALL check("h5fclose_f", error, total_error) + END SUBROUTINE test_array_compound_array +!!$ +!!$!*************************************************************** +!!$!** +!!$!** test_array_bkg(): Test basic array datatype code. +!!$!** Tests reading compound datatype with array fields and +!!$!** writing partial fields. +!!$!** +!!$!*************************************************************** +!!$ + SUBROUTINE test_array_bkg(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: LENGTH = 5 + INTEGER, PARAMETER :: ALEN = 10 + INTEGER, PARAMETER :: RANK = 1 + INTEGER, PARAMETER :: NMAX = 100 + CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" + + INTEGER(hid_t) :: fid, array_dt + INTEGER(hid_t) :: space + INTEGER(hid_t) :: type + INTEGER(hid_t) :: dataset + + INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) + INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) + + INTEGER :: i, j + INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) + + TYPE CmpField_struct + INTEGER, DIMENSION(1:ALEN) :: a + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + REAL(KIND=dp), DIMENSION(1:ALEN) :: c + ENDTYPE CmpField_struct + + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf + TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr + + TYPE CmpDTSinfo_struct + INTEGER :: nsubfields + CHARACTER(LEN=5), DIMENSION(1:nmax) :: name + INTEGER(size_t), DIMENSION(1:nmax) :: offset + INTEGER(hid_t), DIMENSION(1:nmax) :: datatype + END TYPE CmpDTSinfo_struct + + TYPE(CmpDTSinfo_struct) :: dtsinfo + + TYPE fld_t_struct + REAL(KIND=sp), DIMENSION(1:ALEN) :: b + END TYPE fld_t_struct + + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double datatype + INTEGER(SIZE_T) :: sizeof_compound ! total size of compound + + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld + TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr + + CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" + + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading + + INTEGER :: error + TYPE(c_ptr) :: f_ptr + +! Initialize the data +! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + cf(i)%a(j) = 100*(i+1) + j + cf(i)%b(j) = (100.*(i+1) + 0.01*j) + cf(i)%c(j) = 100.*(i+1) + 0.02*j + ENDDO + ENDDO + + ! Set the number of data members + ! ------------------------------ + + dtsinfo%nsubfields = 3 + + ! Initialize the offsets + ! ----------------------- + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) + CALL check("h5tget_size_f", error, total_error) + IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) + CALL check("h5tget_size_f", error, total_error) + ENDIF + + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) + CALL check("h5tget_size_f", error, total_error) + + dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) + dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) + dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) + + + ! Initialize the data type IDs + ! ---------------------------- + dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; + dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; + dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; + + + ! Initialize the names of data members + ! ------------------------------------ + + dtsinfo%name(1) = "One " + dtsinfo%name(2) = "Two " + dtsinfo%name(3) = "Three" + + ! Create file + ! ----------- + CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) + CALL check("h5fcreate_f", error, total_error) + + + ! Create data space + ! ----------------- + CALL h5screate_simple_f(RANK, dim, space, error) + CALL check("h5screate_simple_f", error, total_error) + + + ! Create the memory data type + ! --------------------------- + + CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) + CALL check("h5tcreate_f", error, total_error) + + ! Add members to the compound data type + ! -------------------------------------- + + DO i = 1, dtsinfo%nsubfields + CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + ENDDO + + ! Create the dataset + ! ------------------ / + CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) + CALL check("h5dcreate_f", error, total_error) + + ! Write data to the dataset + ! ------------------------- + + ALLOCATE(rdims(1:2)) ! dummy not needed + + f_ptr = C_LOC(cf(1)) + + CALL h5dwrite_f(dataset, type, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ALLOCATE(rdims1(1:2)) ! dummy not needed + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, type, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN + PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' + total_error = total_error + 1 + ENDIF + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j), cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + + ! Release IDs + ! ----------- + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + CALL h5sclose_f(space,error) + CALL check("h5sclose_f", error, total_error) + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + !**************************** + ! Reopen the file and update + !**************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + sizeof_compound = INT( type_sizer*ALEN, size_t) + + CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) + CALL check("h5tcreate_f", error, total_error) + + CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) + CALL check("h5tarray_create_f", error, total_error) + + CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) + CALL check("h5tinsert_f", error, total_error) + + ! Initialize the data to overwrite + ! -------------------------------- + DO i = 1, LENGTH + DO j = 1, ALEN + fld(i)%b(j) = 1.313 + cf(i)%b(j) = fld(i)%b(j) + ENDDO + ENDDO + + f_ptr = C_LOC(fld(1)) + + CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) + CALL check("h5dwrite_f", error, total_error) + + + ! Read just the field changed + + f_ptr = C_LOC(fldr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',fld(i)%b(j), fldr(i)%b(j), total_error) + ENDDO + ENDDO + CALL h5tclose_f(TYPE,error) + CALL check("h5tclose_f", error, total_error) + CALL h5tclose_f(array_dt,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Read the entire dataset again + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + +!************************************************** +! Reopen the file and print out all the data again +!************************************************** + + CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) + CALL check("h5fopen_f", error, total_error) + + + CALL h5dopen_f(fid, FIELDNAME, dataset, error) + CALL check("h5dopen_f", error, total_error) + + + CALL h5dget_type_f(dataset, type, error) + CALL check("h5dget_type_f", error, total_error) + + + ! Reset the data to read in + ! ------------------------- + + DO i = 1, LENGTH + cfr(i)%a(:) = 0 + cfr(i)%b(:) = 0 + cfr(i)%c(:) = 0 + ENDDO + + f_ptr = C_LOC(cfr(1)) + CALL H5Dread_f(dataset, TYPE, f_ptr, error) + CALL check("H5Dread_f", error, total_error) + + ! Verify correct data + ! ------------------- + + DO i = 1, LENGTH + DO j = 1, ALEN + CALL VERIFY('ERROR: Wrong integer data is read back by H5Dread_f ',cf(i)%a(j), cfr(i)%a(j), total_error) + CALL VERIFY('ERROR: Wrong real data is read back by H5Dread_f ',cf(i)%b(j),cfr(i)%b(j), total_error) + CALL VERIFY('ERROR: Wrong double data is read back by H5Dread_f ',cf(i)%c(j), cfr(i)%c(j), total_error) + ENDDO + ENDDO + + CALL h5dclose_f(dataset, error) + CALL check("h5dclose_f", error, total_error) + + CALL h5tclose_f(type,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5fclose_f(fid,error) + CALL check("h5fclose_f", error, total_error) + + END SUBROUTINE test_array_bkg + + SUBROUTINE test_h5kind_to_type(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors + INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors + INTEGER(int_kind_32), DIMENSION(1:4), TARGET :: dset_data_i32, data_out_i32 + INTEGER(HID_T) :: dset_id32 ! Dataset identifier + CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name +#endif + INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors + +! Check if C has quad precision extension +#if H5_HAVE_FLOAT128!=0 +! Check if Fortran supports quad precision +# if H5_PAC_FC_MAX_REAL_PRECISION > 26 + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif +#else +! Check if the default of long double is quad precision +# if H5_PAC_C_MAX_REAL_PRECISION > 26 +# if H5_PAC_FC_MAX_REAL_PRECISION > 26 + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif +# else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307) +# endif +#endif + REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 + INTEGER(HID_T) :: dset_idr16 ! Dataset identifier + CHARACTER(LEN=7), PARAMETER :: dsetnamer16 = "dsetr16" ! Dataset name + + CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name + CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: dset_id1 ! Dataset identifier + INTEGER(HID_T) :: dset_id4 ! Dataset identifier + INTEGER(HID_T) :: dset_id8 ! Dataset identifier + INTEGER(HID_T) :: dset_id16 ! Dataset identifier + INTEGER(HID_T) :: dset_idr ! Dataset identifier + INTEGER(HID_T) :: dset_idr4 ! Dataset identifier + INTEGER(HID_T) :: dset_idr8 ! Dataset identifier + + INTEGER :: error ! Error flag + INTEGER :: i + +! Data buffers: + + INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 + INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 + INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 + INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 + + REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r + REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 + REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 + + INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) + INTEGER(HID_T) :: dspace_id ! Dataspace identifier + + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize the dset_data array. + ! + DO i = 1, 4 + dset_data_i1(i) = HUGE(0_int_kind_1)-i + dset_data_i4(i) = HUGE(0_int_kind_4)-i + dset_data_i8(i) = HUGE(0_int_kind_8)-i + dset_data_i16(i) = HUGE(0_int_kind_16)-i +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + dset_data_i32(i) = HUGE(0_int_kind_32)-i +#endif + dset_data_r(i) = 4.0*ATAN(1.0)-REAL(i-1) + dset_data_r7(i) = 4.0_real_kind_7*ATAN(1.0_real_kind_7)-REAL(i-1,real_kind_7) + dset_data_r15(i) = 4.0_real_kind_15*ATAN(1.0_real_kind_15)-REAL(i-1,real_kind_15) + dset_data_r31(i) = 4.0_real_kind_31*ATAN(1.0_real_kind_31)-REAL(i-1,real_kind_31) + + END DO + + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspaces for datasets + ! + CALL h5screate_simple_f(1, data_dims , dspace_id, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset. + ! + CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) + CALL check("H5Dcreate_f",error, total_error) +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + CALL H5Dcreate_f(file_id, dsetname16, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), dspace_id, dset_id32, error) + CALL check("H5Dcreate_f",error, total_error) +#endif + CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) + CALL check("H5Dcreate_f",error, total_error) + CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) + CALL check("H5Dcreate_f",error, total_error) +!#ifdef H5_HAVE_FLOAT128 + CALL H5Dcreate_f(file_id, dsetnamer16, h5kind_to_type(real_kind_31,H5_REAL_KIND), dspace_id, dset_idr16, error) + CALL check("H5Dcreate_f",error, total_error) +!#endif + ! + ! Write the dataset. + ! + f_ptr = C_LOC(dset_data_i1(1)) + CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i4(1)) + CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i8(1)) + CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_i16(1)) + CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + f_ptr = C_LOC(dset_data_i32(1)) + CALL h5dwrite_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +#endif + f_ptr = C_LOC(dset_data_r(1)) + CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r7(1)) + CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + f_ptr = C_LOC(dset_data_r15(1)) + CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#ifdef H5_HAVE_FLOAT128 + f_ptr = C_LOC(dset_data_r31(1)) + CALL h5dwrite_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) +!#endif + ! + ! Close the file + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + + ! Open the file + + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error, total_error) + ! + ! Read the dataset. + ! + ! Read data back into an integer size that is larger then the original size used for + ! writing the data + f_ptr = C_LOC(data_out_i1) + CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i4) + CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i8) + CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_i16) + CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + f_ptr = C_LOC(data_out_i32) + CALL h5dread_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) +#endif + f_ptr = C_LOC(data_out_r) + CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r7) + CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r15) + CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + f_ptr = C_LOC(data_out_r31) + CALL h5dread_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) + CALL check("h5dread_f",error, total_error) + DO i = 1, 4 + + CALL verify("h5kind_to_type",dset_data_i1(i),data_out_i1(i),total_error) + CALL verify("h5kind_to_type",dset_data_i4(i),data_out_i4(i),total_error) + CALL verify("h5kind_to_type",dset_data_i8(i),data_out_i8(i),total_error) + CALL verify("h5kind_to_type",dset_data_i16(i),data_out_i16(i),total_error) + +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + CALL verify("h5kind_to_type",dset_data_i32(i),data_out_i32(i),total_error) +#endif + CALL verify("h5kind_to_type",dset_data_r(i),data_out_r(i),total_error) + CALL verify("h5kind_to_type",dset_data_r7(i),data_out_r7(i),total_error) + CALL verify("h5kind_to_type",dset_data_r15(i),data_out_r15(i),total_error) + CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error) + END DO + + ! + ! Close the dataset. + ! + CALL h5dclose_f(dset_id1, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id8, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_id16, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr4, error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset_idr8, error) + CALL check("h5dclose_f",error, total_error) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE test_h5kind_to_type + +!************************************************************ +! +! This test reads and writes array datatypes +! to a dataset. The test first writes integers arrays of +! dimension ADIM0xADIM1 to a dataset with a dataspace of +! DIM0, then closes the file. Next, it reopens the file, +! reads back the data. +! +!************************************************************ +SUBROUTINE t_array(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: adim0 = 3 + INTEGER , PARAMETER :: adim1 = 5 + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: i, j, k + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + + ! + ! Initialize data. i is the element in the dataspace, j and k the + ! elements within the array datatype. + ! + DO i = 1, dim0 + DO j = 1, adim0 + DO k = 1, adim1 + wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) + ENDDO + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, error) + ! + ! Create array datatypes for file and memory. + ! + CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) + CALL check("H5Tarray_create_f",error, total_error) + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the array data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset, and attribute. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its dimensions. + ! + CALL h5dget_type_f(dset, filetype, error) + CALL check("h5dget_type_f",error, error) + CALL H5Tget_array_dims_f(filetype, adims, error) + CALL check("h5dget_type_f",error, total_error) + CALL VERIFY("H5Tget_array_dims_f", adims(1), INT(adim0,hsize_t), total_error) + CALL VERIFY("H5Tget_array_dims_f", adims(2), INT(adim1,hsize_t), total_error) + ! + ! Get dataspace and allocate memory for read buffer. This is a + ! three dimensional attribute when the array datatype is included. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + + ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) + ! + ! Create the memory datatype. + ! + CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) + CALL check("H5Tarray_create_f",error, total_error) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j=1, INT(adim0) + DO k = 1, INT(adim1) + CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_array + +SUBROUTINE t_enum(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + INTEGER(HID_T) :: F_BASET ! File base type + INTEGER(HID_T) :: M_BASET ! Memory base type + INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 + +! Enumerated type + INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER, DIMENSION(1:1), TARGET :: val + + CHARACTER(LEN=6), DIMENSION(1:4) :: & + names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) + CHARACTER(LEN=NAME_BUF_SIZE) :: name + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j, idx + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize DATA. + ! + F_BASET = H5T_STD_I16BE ! File base type + M_BASET = H5T_NATIVE_INTEGER ! Memory base type + DO i = 1, dim0 + DO j = 1, dim1 + wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create the enumerated datatypes for file and memory. This + ! process is simplified IF native types are used for the file, + ! as only one type must be defined. + ! + CALL h5tenum_create_f(F_BASET, filetype, error) + CALL check("h5tenum_create_f",error, total_error) + + CALL h5tenum_create_f(M_BASET, memtype, error) + CALL check("h5tenum_create_f",error, total_error) + + DO i = SOLID, PLASMA + ! + ! Insert enumerated value for memtype. + ! + val(1) = i + f_ptr = C_LOC(val(1)) + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, error) + CALL check("H5Tenum_insert_f", error, total_error) + ! + ! Insert enumerated value for filetype. We must first convert + ! the numerical value val to the base type of the destination. + ! + f_ptr = C_LOC(val(1)) + CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) + CALL check("H5Tconvert_f",error, total_error) + IF(i.GE.1)THEN ! test both F90 and F03 APIs + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) + ELSE + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + ENDIF + CALL check("H5Tenum_insert_f",error, total_error) + ENDDO + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, total_error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the enumerated data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f (file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset,space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) + + ALLOCATE(rdata(1:dims(1),1:dims(2))) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1,1)) + CALL h5dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + ! + ! Get the name of the enumeration member. + ! + CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) + CALL check("h5tenum_nameof_f",error, total_error) + idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 + CALL verify("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL h5tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_enum + +SUBROUTINE t_bit(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER , PARAMETER :: dim1 = 7 + + INTEGER(HID_T) :: file, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer + INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: A, B, C, D + INTEGER :: Aw, Bw, Cw, Dw + INTEGER :: i, j + INTEGER, PARAMETER :: hex = Z'00000003' + TYPE(C_PTR) :: f_ptr + INTEGER :: error ! Error flag + ! + ! Initialize data. We will manually pack 4 2-bit integers into + ! each unsigned char data element. + ! + DO i = 0, dim0-1 + DO j = 0, dim1-1 + wdata(i+1,j+1) = 0 + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" + wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" + ENDDO + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(2, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the bitfield data to it. + ! + CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1,1)) + CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file, dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(2), INT(dim1,hsize_t), total_error) + ALLOCATE(rdata(1:dims(1),1:dims(2))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata) + CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + i_loop: DO i = 1, INT(dims(1)) + DO j = 1, INT(dims(2)) + A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" + B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" + C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" + D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" + + Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) + Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) + Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) + Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) + + CALL VERIFY("bitfield", A, Aw, total_error) + CALL VERIFY("bitfield", B, Bw, total_error) + CALL VERIFY("bitfield", C, Cw, total_error) + CALL VERIFY("bitfield", D, Dw, total_error) + IF(total_error.NE.0) EXIT i_loop + ENDDO + ENDDO i_loop + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_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) + +END SUBROUTINE t_bit + +SUBROUTINE t_opaque(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: size = 7 + INTEGER(HID_T) :: file, space, dtype, dset ! Handles + INTEGER(size_t) :: len + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) + + CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + CHARACTER(LEN=size-1) :: str = "OPAQUE" + + CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into + CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact + CHARACTER(LEN=17) :: tag_big ! and to big. + + INTEGER :: taglen + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hsize_t) :: i + CHARACTER(LEN=1) :: ichr + TYPE(C_PTR) :: f_ptr + INTEGER :: error + ! + ! Initialize data. + ! + DO i = 1, dim0 + WRITE(ichr,'(I1)') i-1 + wdata(i) = str//ichr + ENDDO + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create opaque datatype and set the tag to something appropriate. + ! For this example we will write and view the data as a character + ! array. + ! + CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) + CALL check("h5tcreate_f",error, total_error) + CALL h5tset_tag_f(dtype,"Character array",error) + CALL check("h5tset_tag_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the opaque data to it. + ! + CALL h5dcreate_f(file, dataset, dtype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)(1:1)) + CALL h5dwrite_f(dset, dtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get datatype and properties for the datatype. + ! + CALL h5dget_type_f(dset, dtype, error) + CALL check("h5dget_type_f",error, total_error) + CALL h5tget_size_f(dtype, len, error) + CALL check("h5tget_size_f",error, total_error) + + ! Next tests should return + ! opaque_tag = tag = "Character array" and the actual length = 15 + + ! Test reading into a string that is to small + CALL h5tget_tag_f(dtype, tag_sm, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_sm,"Character arra", total_error) + + ! Test reading into a string that is exact + CALL h5tget_tag_f(dtype, tag_exact, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_exact,"Character array", total_error) + + ! Test reading into a string that is to big + CALL h5tget_tag_f(dtype, tag_big, taglen, error) + CALL check("h5tget_tag_f",error, total_error) + CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) + CALL verify("h5tget_tag_f",tag_big,"Character array ", total_error) + + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL h5dread_f(dset, dtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + DO i = 1, dims(1) + CALL verify("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + 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 H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_opaque + +SUBROUTINE t_objref(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 2 + + INTEGER(HID_T) :: file, space, dset, obj ! Handles + INTEGER :: error + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) + TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + INTEGER :: objtype + INTEGER(SIZE_T) :: name_size + CHARACTER(LEN=80) :: name + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER :: i + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with a null dataspace. + ! + CALL h5screate_f(H5S_NULL_F,space,error) + CALL check("h5screate_f",error, total_error) + CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) + CALL check("h5dcreate_f",error, total_error) + ! + CALL h5dclose_f(obj , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create a group. + ! + CALL h5gcreate_f(file, "G1", obj, error) + CALL check("h5gcreate_f",error, total_error) + CALL h5gclose_f(obj, error) + CALL check("h5gclose_f",error, total_error) + ! + ! Create references to the previously created objects. note, space_id + ! is not needed for object references. + ! + f_ptr = C_LOC(wdata(1)) + CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) + CALL check("H5Rcreate_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to be the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the object references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + + ALLOCATE(rdata(1:maxdims(1))) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, INT(maxdims(1)) + ! + ! Open the referenced object, get its name and type. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) + CALL check("H5Rdereference_f",error, total_error) + CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) + CALL check("H5Rget_obj_type_f",error, total_error) + ! + ! Get the length of the name and name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) + CALL check("H5Iget_name_f",error, total_error) + ! + ! Print the object type and close the object. + ! + IF(objtype.EQ.H5G_GROUP_F)THEN + CALL verify("t_objref", name(1:name_size),"/G1", total_error) + ELSE IF(objtype.EQ.H5G_DATASET_F)THEN + CALL verify("t_objref", name(1:name_size),"/DS2", total_error) + ELSE + total_error = total_error + 1 + ENDIF + CALL h5oclose_f(obj, error) + CALL check("h5oclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_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) + +END SUBROUTINE t_objref + + +SUBROUTINE t_regref(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" + INTEGER , PARAMETER :: dim0 = 2 + INTEGER , PARAMETER :: ds2dim0 = 16 + INTEGER , PARAMETER :: ds2dim1 = 3 + + INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) + + INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) + + INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) + + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + INTEGER(hssize_t) :: npoints + TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer + TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + + INTEGER(size_t) :: size + CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 + + CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 + CHARACTER(LEN=80) :: name + INTEGER(hsize_t) :: i + TYPE(C_PTR) :: f_ptr + CHARACTER(LEN=ds2dim0) :: chrvar + CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct + + chrvar = "The quick brown " + READ(chrvar,'(16A1)') wdata2(1:16,1) + chrvar = "fox jumps over " + READ(chrvar,'(16A1)') wdata2(1:16,2) + chrvar = "the 5 lazy dogs " + READ(chrvar,'(16A1)') wdata2(1:16,3) + + chrref_correct(1) = 'hdf5' + chrref_correct(2) = 'Therowthedog' + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create a dataset with character data. + ! + CALL h5screate_simple_f(2, dims2, space, error) + CALL check("h5screate_simple_f",error, total_error) + CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata2(1,1)) + CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Create reference to a list of elements in dset2. + ! + CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) + CALL check("h5sselect_elements_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + ! + ! Create reference to a hyperslab in dset2, close dataspace. + ! + CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) + CALL check("h5sselect_hyperslab_f",error, total_error) + f_ptr = C_LOC(wdata(2)) + CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) + CALL check("h5rcreate_f",error, total_error) + + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Create dataspace. Setting maximum size to the current size. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + + ! + ! Create the dataset and write the region references to it. + ! + CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5dclose_f(dset2, error) + CALL check("h5dclose_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) + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL h5dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + ALLOCATE(rdata(1:dims(1))) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + + ! + ! Open the referenced object, retrieve its region as a + ! dataspace selection. + ! + f_ptr = C_LOC(rdata(i)) + CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) + CALL check("H5Rdereference_f",error, total_error) + + CALL H5Rget_region_f(dset, f_ptr, space, error) + CALL check("H5Rget_region_f",error, total_error) + + ! + ! Get the object's name + ! + name(:) = ' ' ! initialize string to blanks + CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) + CALL check("H5Iget_name_f",error, total_error) + CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) + CALL verify("H5Iget_name_f",name(1:size),TRIM(name), total_error) + ! + ! Allocate space for the read buffer. + ! + CALL H5Sget_select_npoints_f(space, npoints, error) + CALL check("H5Sget_select_npoints_f",error, total_error) + CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) + + dims3(1) = npoints + ! + ! Read the dataset region. + ! + CALL h5screate_simple_f(1, dims3, memspace, error) + CALL check("h5screate_simple_f",error, total_error) + + 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 verify("h5dread_f",rdata2(1)(1:npoints),TRIM(chrref_correct(i)), total_error) + + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Sclose_f(memspace, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Dclose_f(dset2, error) + CALL check("h5dclose_f",error, total_error) + + END DO + ! + ! Close and release resources. + ! + DEALLOCATE(rdata) + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_regref + +SUBROUTINE t_vlen(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER, PARAMETER :: LEN0 = 3 + INTEGER, PARAMETER :: LEN1 = 12 + INTEGER(hsize_t) :: dim0 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + INTEGER :: i, j + + ! vl data + TYPE vl + INTEGER, DIMENSION(:), POINTER :: DATA + END TYPE vl + TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr + + + TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures + TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures + + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) + INTEGER, DIMENSION(:), POINTER :: ptr_r + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize variable-length data. wdata(1) is a countdown of + ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. + ! + wdata(1)%len = LEN0 + wdata(2)%len = LEN1 + + ALLOCATE( ptr(1:2) ) + ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) + ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) + + DO i=1, wdata(1)%len + ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 + ENDDO + wdata(1)%p = C_LOC(ptr(1)%data(1)) + + ptr(2)%data(1:2) = 1 + DO i = 3, wdata(2)%len + ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) + ENDDO + wdata(2)%p = C_LOC(ptr(2)%data(1)) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create variable-length datatype for file and memory. + ! + CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) + CALL check("H5Tvlen_create_f",error, total_error) + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length data to it. + ! + CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, memtype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + ! + ! Close and release resources. Note the use of H5Dvlen_reclaim + ! removes the need to manually deallocate the previously allocated + ! data. + ! + + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + + ! + ! Get dataspace and allocate memory for array of vlen structures. + ! This does not actually allocate memory for the vlen data, that + ! will be done by the library. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + dim0 = dims(1) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ! + ! Create the memory datatype. + ! + CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) + CALL check("H5Tvlen_create_f",error, total_error) + + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)) + CALL H5Dread_f(dset, memtype, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, INT(dims(1)) + CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) + DO j = 1, rdata(i)%len + CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) + ENDDO + ENDDO + ! + ! Close and release resources. + ! + DEALLOCATE(ptr) + CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlen + + +SUBROUTINE t_vlstring(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + + INTEGER(SIZE_T), PARAMETER :: dim0 = 4 + INTEGER(SIZE_T), PARAMETER :: sdim = 7 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER :: error + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) + INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) + INTEGER(hsize_t) :: i + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this example we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) + CALL check("H5Tset_strpad_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) + CALL check("h5dwrite_vl_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this example. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) + + ALLOCATE(rdata(1:dims(1))) + + ! + ! Read the data. + ! + CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) + CALL check("H5Dread_vl_f",error, total_error) + + ! + ! Output the data to the screen. + ! + DO i = 1, dims(1) + CALL verify("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring + +SUBROUTINE t_vlstring_readwrite(total_error) + +! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" + + INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 + INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 + INTEGER(HID_T) :: file, filetype, space, dset ! Handles + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) + INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims + + TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR + CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D + + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR + CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR + CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR + CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR + CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR + + TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer + TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer + CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string + CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string + TYPE(C_PTR) :: f_ptr + INTEGER(hsize_t) :: i, j + INTEGER :: len + INTEGER :: error + + ! Initialize array of C pointers + + 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)(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) + data2D_w(1,3) = A13(1) + data2D_w(1,4) = A14(1) + data2D_w(2,1) = A21(1) + data2D_w(2,2) = A22(1) + data2D_w(2,3) = A23(1) + data2D_w(2,4) = A24(1) + + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file and memory datatypes. For this test we will save + ! the strings as C variable length strings, H5T_STRING is defined + ! as a variable length string. + ! + CALL H5Tcopy_f(H5T_STRING, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(2, dims2D, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the variable-length string data to + ! it. + ! + CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata2D(1,1)) + CALL h5dwrite_f(dset, filetype, f_ptr, error) + CALL check("h5dwrite_f",error, total_error) + + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + + ! + ! Now we begin the read section of this test. + ! + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata(1:dims(1))) + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata(1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims(1) + CALL C_F_POINTER(rdata(i), data) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verify("h5dread_f",data(1:len), data_w(i)(1:len), total_error) + END DO + + DEALLOCATE(rdata) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + ! + ! Test reading in 2D dataset + ! + CALL h5dopen_f(file, dataset2D, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + ! + ! Get dataspace and allocate memory for read buffer. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + + + CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) + + ! + ! Read the data. + ! + + f_ptr = C_LOC(rdata2D(1,1)) + CALL h5dread_f(dset, H5T_STRING, f_ptr, error) + CALL check("H5Dread_f",error, total_error) + + ! + ! Check the data. + ! + DO i = 1, dims2D(1) + DO j = 1, dims2D(2) + CALL C_F_POINTER(rdata2D(i,j), DATA) + len = 0 + DO + IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT + len = len + 1 + ENDDO + CALL verify("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) + ENDDO + END DO + + DEALLOCATE(rdata2D) + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + +END SUBROUTINE t_vlstring_readwrite + + +SUBROUTINE t_string(total_error) + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" + CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" + INTEGER , PARAMETER :: dim0 = 4 + INTEGER(SIZE_T) , PARAMETER :: sdim = 8 + + INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles + INTEGER :: error + + INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) + INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims + + CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & + wdata = (/"Parting", "is such", "sweet ", "sorrow."/) + CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata + INTEGER(hsize_t) :: i + INTEGER(SIZE_T) :: size + TYPE(C_PTR) :: f_ptr + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + ! + ! Create file datatypes. For this example we will save + ! the strings as FORTRAN strings + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(filetype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error) + CALL check("h5screate_simple_f",error, total_error) + ! + ! Create the dataset and write the string data to it. + ! + CALL h5dcreate_f(file, dataset, filetype, space, dset, error) + CALL check("h5dcreate_f",error, total_error) + + f_ptr = C_LOC(wdata(1)(1:1)) + CALL H5Dwrite_f(dset, filetype, f_ptr, error) + CALL check("H5Dwrite_f",error, total_error) + ! + ! Close and release resources. + ! + CALL h5dclose_f(dset , error) + CALL check("h5dclose_f",error, total_error) + CALL h5sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(filetype, error) + CALL check("h5tclose_f",error, total_error) + CALL h5fclose_f(file , error) + CALL check("h5fclose_f",error, total_error) + ! + ! Now we begin the read section of this example. + ! + ! Open file and dataset. + ! + CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) + CALL check("h5fopen_f",error, total_error) + CALL h5dopen_f(file, dataset, dset, error) + CALL check("h5dopen_f",error, total_error) + ! + ! Get the datatype and its size. + ! + CALL H5Dget_type_f(dset, filetype, error) + CALL check("H5Dget_type_f",error, total_error) + CALL H5Tget_size_f(filetype, size, error) + CALL check("H5Tget_size_f",error, total_error) + CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) + ! + ! Get dataspace. + ! + CALL H5Dget_space_f(dset, space, error) + CALL check("H5Dget_space_f",error, total_error) + CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) + CALL check("H5Sget_simple_extent_dims_f",error, total_error) + CALL VERIFY("H5Sget_simple_extent_dims_f", dims(1), INT(dim0,hsize_t), total_error) + + ALLOCATE(rdata(1:dims(1))) + ! + ! Create the memory datatype. + ! + CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) + CALL check("H5Tcopy_f",error, total_error) + CALL H5Tset_size_f(memtype, sdim, error) + CALL check("H5Tset_size_f",error, total_error) + ! + ! Read the data. + ! + f_ptr = C_LOC(rdata(1)(1:1)) + CALL H5Dread_f(dset, memtype, f_ptr, error, space) + CALL check("H5Dread_f",error, total_error) + + DO i = 1, dims(1) + CALL verify("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) + END DO + + DEALLOCATE(rdata) + + ! + ! Close and release resources. + ! + CALL H5Dclose_f(dset, error) + CALL check("h5dclose_f",error, total_error) + CALL H5Sclose_f(space, error) + CALL check("h5sclose_f",error, total_error) + CALL H5Tclose_f(memtype, error) + CALL check("h5tclose_f",error, total_error) + CALL H5Fclose_f(file, error) + CALL check("h5fclose_f",error, total_error) + + +END SUBROUTINE t_string + +SUBROUTINE vl_test_special_char(total_error) + + IMPLICIT NONE + +! INTERFACE +! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) +! USE HDF5 +! USE ISO_C_BINDING +! IMPLICIT NONE +! CHARACTER(len=*), DIMENSION(:) :: data_in +! INTEGER(size_t), DIMENSION(:) :: line_lengths +! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type +! END SUBROUTINE setup_buffer +! END INTERFACE + + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" + INTEGER, PARAMETER :: line_length = 10 + INTEGER(hid_t) :: file + INTEGER(hid_t) :: dataset0 + CHARACTER(len=line_length), DIMENSION(1:100) :: data_in + CHARACTER(len=line_length), DIMENSION(1:100) :: data_out + INTEGER(size_t), DIMENSION(1:100) :: line_lengths + INTEGER(hid_t) :: string_id, space, dcpl + INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) + INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) + INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) + INTEGER, PARAMETER :: ncontrolchar = 7 + CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & + (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) + INTEGER :: i, j, n, error + n = 8 + ! + ! Create a new file using the default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) + CALL check("h5fcreate_f",error, total_error) + + max_dims = (/H5S_UNLIMITED_F/) + + ! + ! Create the memory datatype. + ! + CALL h5tcopy_f(h5t_string, string_id, error) + CALL check("h5tcopy_f", error, total_error) + CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) + CALL check("h5tset_strpad_f", error, total_error) + dims(1) = n + ! + ! Create dataspace. + ! + CALL h5screate_simple_f(1, dims, space, error, max_dims) + CALL check("h5screate_simple_f", error, total_error) + CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) + CALL check("h5pcreate_f", error, total_error) + CALL h5pset_chunk_f(dcpl, 1, chunk, error) + CALL check("h5pset_chunk_f", error, total_error) + + data_dims(1) = line_length + data_dims(2) = n + ! + ! Create data with strings containing various control characters. + ! + DO i = 1, ncontrolchar + ! + ! Create the dataset, for the string with control character and write the string data to it. + ! + CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) + CALL check("h5dcreate_f", error, total_error) + CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) + CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dwrite_vl_f", error, total_error) + ! + ! Read the string back. + ! + CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) + CALL check("h5dread_vl_f", error, total_error) + + DO j = 1, n + IF(data_in(j).NE.data_out(j))THEN + total_error = total_error + 1 + EXIT + ENDIF + ENDDO + + CALL h5dclose_f(dataset0, error) + CALL check("h5dclose_f", error, total_error) + ENDDO + + 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) + +END SUBROUTINE vl_test_special_char + + +SUBROUTINE setup_buffer(data_in, line_lengths, char_type) + + IMPLICIT NONE + + ! Creates a simple "Data_in" consisting of the letters of the alphabet, + ! one per line, with a control character. + + CHARACTER(len=10), DIMENSION(:) :: data_in + INTEGER(size_t), DIMENSION(:) :: line_lengths + INTEGER, DIMENSION(1:3) :: letters + CHARACTER(LEN=3) :: lets + CHARACTER(KIND=C_CHAR,LEN=*) :: char_type + CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp + INTEGER :: i, j, n, ff + + ! Convert the letters and special character to integers + lets = 'abc' + + READ(lets,'(3A1)') letters + READ(char_type,'(A1)') ff + n = SIZE(data_in) + j = 1 + DO i=1,n-1 + IF( j .EQ. 4 )THEN + WRITE(char_tmp,'(A1)') ff + data_in(i:i) = char_tmp + ELSE + WRITE(char_tmp,'(A1)') letters(j) + data_in(i:i) = char_tmp + ENDIF + line_lengths(i) = LEN_TRIM(data_in(i)) + j = j + 1 + IF( j .EQ. 5 ) j = 1 + END DO + WRITE(char_tmp,'(A1)') ff + data_in(n:n) = char_tmp + line_lengths(n) = 1 + +END SUBROUTINE setup_buffer + +!------------------------------------------------------------------------- +! Function: test_nbit +! +! Purpose: Tests (real, 4 byte) datatype for nbit filter +! +! Return: Success: 0 +! Failure: >0 +! +! Programmer: M. Scot Breitenfeld +! Decemeber 7, 2010 +! +! Modifications: Moved this subroutine from the 1.8 test file and +! modified it to use F2003 features. +! This routine requires 4 byte reals, so we use F2003 features to +! ensure the requirement is satisfied in a portable way. +! The need for this arises when a user specifies the default real is 8 bytes. +! MSB 7/31/12 +! +!------------------------------------------------------------------------- +! + +SUBROUTINE test_nbit(total_error ) + + IMPLICIT NONE + INTEGER, PARAMETER :: wp = C_FLOAT !should map to REAL*4 on most modern processors + INTEGER, INTENT(INOUT) :: total_error + INTEGER(hid_t) :: file + + INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id + INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) + INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) + ! orig_data[] are initialized to be within the range that can be represented by + ! dataset datatype (no precision loss during datatype conversion) + ! + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & + RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & + 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) + REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data + INTEGER(size_t) :: PRECISION, offset + INTEGER :: error + LOGICAL :: status + INTEGER(hsize_t) :: i, j + TYPE(C_PTR) :: f_ptr + + ! check to see if filter is available + CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) + IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter + total_error = -1 ! so return + RETURN + ENDIF + + CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) + CALL check("H5Fcreate_f", error, total_error) + + ! Define dataset datatype (integer), and set precision, offset + CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) + CALL CHECK(" H5Tcopy_f", error, total_error) + CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) + CALL CHECK(" H5Tset_fields_f", error, total_error) + offset = 7 + CALL H5Tset_offset_f(datatype, offset, error) + CALL CHECK(" H5Tset_offset_f", error, total_error) + PRECISION = 20 + CALL H5Tset_precision_f(datatype,PRECISION, error) + CALL CHECK(" H5Tset_precision_f", error, total_error) + + CALL H5Tset_size_f(datatype, 4_size_t, error) + CALL CHECK(" H5Tset_size_f", error, total_error) + + CALL H5Tset_ebias_f(datatype, 31_size_t, error) + CALL CHECK(" H5Tset_ebias_f", error, total_error) + + ! Create the data space + CALL H5Screate_simple_f(2, dims, space, error) + CALL CHECK(" H5Screate_simple_f", error, total_error) + + ! USE nbit filter + CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) + CALL CHECK(" H5Pcreate_f", error, total_error) + + CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) + CALL CHECK(" H5Pset_chunk_f", error, total_error) + CALL H5Pset_nbit_f(dc, error) + CALL CHECK(" H5Pset_nbit_f", error, total_error) + + ! Create the dataset + CALL H5Dcreate_f(file, "nbit_real", datatype, & + space, dataset, error, dc) + CALL CHECK(" H5Dcreate_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 1: Test nbit by setting up a chunked dataset and writing + ! to it. + !---------------------------------------------------------------------- + ! + mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) + + f_ptr = C_LOC(orig_data(1,1)) + CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dwrite_f", error, total_error) + + !---------------------------------------------------------------------- + ! STEP 2: Try to read the data we just wrote. + !---------------------------------------------------------------------- + ! + f_ptr = C_LOC(new_data(1,1)) + CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) + CALL CHECK(" H5Dread_f", error, total_error) + + ! Check that the values read are the same as the values written + ! Assume size of long long = size of double + ! + i_loop: DO i = 1, dims(1) + j_loop: DO j = 1, dims(2) + + IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN + + IF( .NOT.check_real_eq( new_data(i,j), orig_data(i,j)) ) THEN + total_error = total_error + 1 + WRITE(*,'(" Read different values than written.")') + WRITE(*,'(" At index ", 2(1X,I0))') i, j + EXIT i_loop + END IF + ENDDO j_loop + ENDDO i_loop + + !---------------------------------------------------------------------- + ! Cleanup + !---------------------------------------------------------------------- + ! + CALL H5Tclose_f(datatype, error) + CALL CHECK(" H5Tclose_f", error, total_error) + CALL H5Pclose_f(dc, error) + CALL CHECK(" H5Pclose_f", error, total_error) + CALL H5Sclose_f(space, error) + CALL CHECK(" H5Sclose_f", error, total_error) + CALL H5Dclose_f(dataset, error) + CALL CHECK(" H5Dclose_f", error, total_error) + CALL H5Fclose_f(file, error) + CALL CHECK(" H5Fclose_f", error, 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. +!------------------------------------------------------------------------- +! + + IMPLICIT NONE + + INTEGER, INTENT(INOUT) :: total_error + + INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors + + INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors + + INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & + INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& + INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & + 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(hsize_t) :: ih + 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", C_LOC(val), error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_GREEN + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "GREEN", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLUE + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "BLUE", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_WHITE + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "WHITE", f_ptr, error) + CALL check("h5tenum_insert_f",error, total_error) + val = E1_BLACK + f_ptr = C_LOC(val) + CALL H5Tenum_insert_f(dtype, "BLACK", f_ptr, 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data2(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_short(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & + ih, INT(data1(ih)), ih, INT(data_double(ih)) + EXIT + ENDIF + ENDDO + + ! Test converting the data to (SELECTED_INT_KIND(9)) number. + ! Read enum data back as (SELECTED_INT_KIND(9)) 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i8(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i8(ih)) + EXIT + ENDIF + ENDDO + + ! Test converting the data to (SELECTED_INT_KIND(18)) number. + ! Read enum data back as (SELECTED_INT_KIND(18)) 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_i16(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_i16(ih)) + EXIT + ENDIF + ENDDO + + ! Test converting the data to C_FLOAT number. + ! Read enum data back as C_FLOAT 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & + ih, INT(data1(ih)), i, INT(data_r7(ih)) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_int(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) + 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_double(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) + EXIT + ENDIF + ENDDO + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f", error, total_error) + + !********************************************************* + !* Dataset of real C_FLOAT type + !********************************************************* + + ! Create a dataset of C_FLOAT 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. INT(data_r7(ih)))THEN + total_error = total_error + 1 + WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) + EXIT + ENDIF + ENDDO + CALL h5dclose_f(dset, error) + CALL check("h5dclose_f", error, total_error) + + ! ***************************************************************** + ! * Dataset of integer SELECTED_INT_KIND(18) type + ! ***************************************************************** + + ! Create a integer dataset of (SELECTED_INT_KIND(18)) 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 ih = 1, ds_size(1) + IF(data1(ih) .NE. data_i16(ih))THEN + total_error = total_error + 1 + WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) + 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 + +END MODULE TH5T_F03 diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 deleted file mode 100644 index 32531b0..0000000 --- a/fortran/test/tH5T_F03.f90 +++ /dev/null @@ -1,3453 +0,0 @@ -!****h* root/fortran/test/tH5T_F03.f90 -! -! NAME -! tH5T_F03.f90 -! -! FUNCTION -! Test FORTRAN HDF5 H5T 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! CONTAINS SUBROUTINES -! test_array_compound_atomic, test_array_compound_array, -! test_array_bkg, test_h5kind_to_type -! -!***** - -! ***************************************** -! *** H 5 T T E S T S -! ***************************************** - -!*************************************************************** -!** -!** test_array_compound_atomic(): Test basic array datatype code. -!** Tests 1-D array of compound datatypes (with no array fields) -!** -!*************************************************************** -! - -MODULE TH5T_F03 - - USE HDF5 - USE ISO_C_BINDING - -CONTAINS - -SUBROUTINE test_array_compound_atomic(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - ! 1-D dataset WITH fixed dimensions - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray1.h5" - - TYPE s1_t - INTEGER :: i - REAL :: f - END TYPE s1_t - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: wdata ! Information to write - TYPE(s1_t), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Information read in - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - INTEGER(hid_t) :: sid1 ! Dataspace ID - INTEGER(hid_t) :: tid1 ! Array Datatype ID - INTEGER(hid_t) :: tid2 ! Compound Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER :: ndims ! Array rank for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER :: i,j ! counting variables - - INTEGER :: error ! Generic RETURN value - INTEGER :: namelen - LOGICAL :: flag - - TYPE(C_PTR) :: f_ptr ! Needed to pass the pointer, for g95 compiler to work - - ALLOCATE( wdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - ALLOCATE( rdata(1:SPACE1_DIM1,1:ARRAY1_DIM1) ) - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - wdata(i,j)%i = i * 10 + j - wdata(i,j)%f = i * 2.5 + j - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Insert float field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), H5T_NATIVE_REAL, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write dataset to disk - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 2, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2, error) - CALL check("h5tclose_f", error, total_error) - - ! Read dataset from disk - - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(wdata(i,j)%f,dp), REAL( rdata(i,j)%f, dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - -END SUBROUTINE test_array_compound_atomic -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_compound_array(): Test basic array datatype code. -!!$!** Tests 1-D array of compound datatypes (with array fields) -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_compound_array(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - ! 1-D array datatype - INTEGER, PARAMETER :: ARRAY1_RANK= 1 - INTEGER, PARAMETER :: ARRAY1_DIM1= 3 - INTEGER, PARAMETER :: ARRAY2_DIM1= 5 - - INTEGER, PARAMETER :: SPACE1_RANK = 1 - INTEGER, PARAMETER :: SPACE1_DIM1 = 4 - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray2.h5" - - TYPE st_t_struct ! Typedef for compound datatype - INTEGER :: i - REAL, DIMENSION(1:ARRAY2_DIM1) :: f - CHARACTER(LEN=2), DIMENSION(1:ARRAY2_DIM1) :: c - END TYPE st_t_struct - ! Information to write - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: wdata - ! Information read in - TYPE(st_t_struct), DIMENSION(1:SPACE1_DIM1,1:ARRAY1_DIM1), TARGET :: rdata - - - INTEGER(hid_t) :: fid1 ! HDF5 File IDs - INTEGER(hid_t) :: dataset ! Dataset ID - integer(hid_t) :: sid1 ! Dataspace ID - integer(hid_t) :: tid1 ! Array Datatype ID - integer(hid_t) :: tid2 ! Compound Datatype ID - integer(hid_t) :: tid3 ! Nested Array Datatype ID - integer(hid_t) :: tid4 ! Nested Array Datatype ID - - INTEGER(HSIZE_T), DIMENSION(1) :: sdims1 = (/SPACE1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/ARRAY1_DIM1/) - INTEGER(HSIZE_T), DIMENSION(1) :: tdims2=(/ARRAY2_DIM1/) - - INTEGER ndims ! Array rank for reading - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - - INTEGER :: nmemb ! Number of compound members - CHARACTER(LEN=20) :: mname ! Name of compound field - INTEGER(size_t) :: off ! Offset of compound field - INTEGER(hid_t) :: mtid ! Datatype ID for field - INTEGER(hid_t) :: mtid2 ! Datatype ID for field - - INTEGER :: mclass ! Datatype class for field - INTEGER :: i,j,k ! counting variables - - INTEGER :: error - CHARACTER(LEN=2) :: ichr2 - INTEGER :: namelen - LOGICAL :: flag - INTEGER(HID_T) :: atype_id !String Attribute Datatype identifier - INTEGER(SIZE_T) :: attrlen ! Length of the attribute string - - TYPE(c_ptr) :: f_ptr - - ! Initialize array data to write - DO i = 1, SPACE1_DIM1 - DO j = 1, array1_DIM1 - wdata(i,j)%i = i*10+j - DO k = 1, ARRAY2_DIM1 - wdata(i,j)%f(k) = 10*i+j+.5 - WRITE(ichr2,'(I2.2)') k - wdata(i,j)%c(k) = ichr2 - ENDDO - ENDDO - ENDDO - - ! Create file - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid1,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create dataspace for datasets - CALL h5screate_simple_f(SPACE1_RANK, sdims1, sid1, error) - CALL check("h5screate_simple_f", error, total_error) - - ! Create a compound datatype to refer to - ! - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(wdata(1,1)), C_LOC(wdata(2,1))), tid2, error) - CALL check("h5tcreate_f", error, total_error) - - ! Insert integer field - CALL h5tinsert_f(tid2, "i", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%i)), H5T_NATIVE_INTEGER, error) - CALL check("h5tinsert_f", error, total_error) - - ! Create an array of floats datatype - CALL h5tarray_create_f(H5T_NATIVE_REAL, ARRAY1_RANK, tdims2, tid3, error) - CALL check("h5tarray_create_f", error, total_error) - ! Insert float array field - - CALL h5tinsert_f(tid2, "f", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%f)), tid3, error) - CALL check("h5tinsert_f", error, total_error) - - ! - ! Create datatype for the String attribute. - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error) - CALL check("h5tcopy_f",error,total_error) - - attrlen = LEN(wdata(1,1)%c(1)) - CALL h5tset_size_f(atype_id, attrlen, error) - CALL check("h5tset_size_f",error,total_error) - - ! Create an array of character datatype - CALL h5tarray_create_f(atype_id, ARRAY1_RANK, tdims2, tid4, error) - 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)(1:1))), tid4, error) - CALL check("h5tinsert2_f", error, total_error) - - ! Close array of floats field datatype - CALL h5tclose_f(tid3,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5tclose_f(tid4,error) - CALL check("h5tclose_f", error, total_error) - - ! Create an array datatype to refer to - CALL h5tarray_create_f(tid2, ARRAY1_RANK, tdims1, tid1, error) - CALL check("h5tarray_create_f", error, total_error) - - ! Close compound datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Create a dataset - CALL h5dcreate_f(fid1,"Dataset1",tid1, sid1, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - - ! Write dataset to disk - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dataset, tid1, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close disk dataspace - CALL h5sclose_f(sid1,error) - CALL check("h5sclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - - ! Re-open file - CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, fid1, error) - CALL check("h5fopen_f", error, total_error) - - ! Open the dataset - - CALL h5dopen_f(fid1, "Dataset1", dataset, error) - CALL check("h5dopen_f", error, total_error) - - ! Get the datatype - CALL h5dget_type_f(dataset, tid1, error) - CALL check("h5dget_type_f", error, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(tid1, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - - ! Get the array dimensions - ALLOCATE(rdims1(1:ndims)) - CALL h5tget_array_dims_f(tid1, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims1(i)), total_error) - ENDDO - - ! Get the compound datatype - CALL h5tget_super_f(tid1, tid2, error) - CALL check("h5tget_super_f", error, total_error) - - ! Check the number of members - CALL h5tget_nmembers_f(tid2, nmemb, error) - CALL check("h5tget_nmembers_f", error, total_error) - CALL VERIFY("h5tget_nmembers_f", nmemb, 3, total_error) - - ! Check the 1st field's name - CALL H5Tget_member_name_f(tid2, 0, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"i", total_error) - - ! Check the 1st field's offset - - CALL H5Tget_member_offset_f(tid2, 0, off, error) - CALL check("H5Tget_member_offset_f", error, total_error) - CALL VERIFY("H5Tget_member_offset_f",INT(off),0, total_error) - - ! Check the 1st field's datatype - CALL H5Tget_member_type_f(tid2, 0, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - CALL H5Tequal_f(mtid, H5T_NATIVE_INTEGER, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Check the 2nd field's name - CALL H5Tget_member_name_f(tid2, 1, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"f", total_error) - - ! Check the 2nd field's offset - CALL H5Tget_member_offset_f(tid2, 1, 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)%f))), total_error) - - ! Check the 2nd field's datatype - CALL H5Tget_member_type_f(tid2, 1, mtid, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 2nd field's class - CALL H5Tget_class_f(mtid, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the 3rd field's name - CALL H5Tget_member_name_f(tid2, 2, mname, namelen,error) - CALL check("H5Tget_member_name_f", error, total_error) - CALL verifystring("H5Tget_member_name_f",mname(1:namelen),"c", total_error) - - ! Check the 3rd field's offset - 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)(1:1)))), total_error) - - ! Check the 3rd field's datatype - CALL H5Tget_member_type_f(tid2, 2, mtid2, error) - CALL check("H5Tget_member_type_f", error, total_error) - - ! Get the 3rd field's class - CALL H5Tget_class_f(mtid2, mclass, error) - CALL check("H5Tget_class_f", error, total_error) - CALL VERIFY("H5Tget_class_f",mclass, H5T_ARRAY_F, total_error) - - ! Check the array rank - CALL h5tget_array_ndims_f(mtid2, ndims, error) - CALL check("h5tget_array_ndims_f", error, total_error) - CALL VERIFY("h5tget_array_ndims_f",ndims, ARRAY1_RANK, total_error) - - ! Get the array dimensions - CALL h5tget_array_dims_f(mtid2, rdims1, error) - CALL check("h5tget_array_dims_f", error, total_error) - - ! Check the array dimensions - DO i = 1, ndims - CALL VERIFY("h5tget_array_dims_f", INT(rdims1(i)), INT(tdims2(i)), total_error) - ENDDO - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, H5T_NATIVE_REAL, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - ! Check the nested array's datatype - CALL H5Tget_super_f(mtid2, tid3, error) - CALL check("H5Tget_super_f", error, total_error) - - CALL H5Tequal_f(tid3, atype_id, flag, error) - CALL check("H5Tequal_f", error, total_error) - CALL VerifyLogical("H5Tequal_f", flag, .TRUE., total_error) - - ! Close the array's base type datatype - CALL h5tclose_f(tid3, error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid,error) - CALL check("h5tclose_f", error, total_error) - - ! Close the member datatype - CALL h5tclose_f(mtid2,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Compound Datatype - CALL h5tclose_f(tid2,error) - CALL check("h5tclose_f", error, total_error) - - ! READ dataset from disk - - f_ptr = c_null_ptr - f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Compare data read in - DO i = 1, SPACE1_DIM1 - DO j = 1, ARRAY1_DIM1 - IF(wdata(i,j)%i.NE.rdata(i,j)%i)THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - DO k = 1, ARRAY2_DIM1 - - IF(wdata(i,j)%f(k).NE.rdata(i,j)%f(k))THEN - PRINT*, 'ERROR: Wrong real array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF(wdata(i,j)%c(k).NE.rdata(i,j)%c(k))THEN - PRINT*, 'ERROR: Wrong character array data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - ENDDO - - ! Close Datatype - CALL h5tclose_f(tid1,error) - CALL check("h5tclose_f", error, total_error) - - ! Close Dataset - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - ! Close file - CALL h5fclose_f(fid1,error) - CALL check("h5fclose_f", error, total_error) - END SUBROUTINE test_array_compound_array -!!$ -!!$!*************************************************************** -!!$!** -!!$!** test_array_bkg(): Test basic array datatype code. -!!$!** Tests reading compound datatype with array fields and -!!$!** writing partial fields. -!!$!** -!!$!*************************************************************** -!!$ - SUBROUTINE test_array_bkg(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: LENGTH = 5 - INTEGER, PARAMETER :: ALEN = 10 - INTEGER, PARAMETER :: RANK = 1 - INTEGER, PARAMETER :: NMAX = 100 - CHARACTER(LEN=17), PARAMETER :: FIELDNAME = "ArrayofStructures" - - INTEGER(hid_t) :: fid, array_dt - INTEGER(hid_t) :: space - INTEGER(hid_t) :: type - INTEGER(hid_t) :: dataset - - INTEGER(hsize_t), DIMENSION(1:1) :: dim =(/LENGTH/) - INTEGER(hsize_t), DIMENSION(1:1) :: dima =(/ALEN/) - - INTEGER :: i, j - INTEGER, DIMENSION(1:3) :: ndims = (/1,1,1/) - - TYPE CmpField_struct - INTEGER, DIMENSION(1:ALEN) :: a - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - REAL(KIND=dp), DIMENSION(1:ALEN) :: c - ENDTYPE CmpField_struct - - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf - TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cfr - - TYPE CmpDTSinfo_struct - INTEGER :: nsubfields - CHARACTER(LEN=5), DIMENSION(1:nmax) :: name - INTEGER(size_t), DIMENSION(1:nmax) :: offset - INTEGER(hid_t), DIMENSION(1:nmax) :: datatype - END TYPE CmpDTSinfo_struct - - TYPE(CmpDTSinfo_struct) :: dtsinfo - - TYPE fld_t_struct - REAL(KIND=sp), DIMENSION(1:ALEN) :: b - END TYPE fld_t_struct - - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double datatype - INTEGER(SIZE_T) :: sizeof_compound ! total size of compound - - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fld - TYPE(fld_t_struct), DIMENSION(1:LENGTH), TARGET :: fldr - - CHARACTER(LEN=10), PARAMETER :: FILENAME = "tarray3.h5" - - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims1 ! Array dimensions for reading - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: rdims ! Array dimensions for reading - - INTEGER :: error - TYPE(c_ptr) :: f_ptr - -! Initialize the data -! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - cf(i)%a(j) = 100*(i+1) + j - cf(i)%b(j) = (100.*(i+1) + 0.01*j) - cf(i)%c(j) = 100.*(i+1) + 0.02*j - ENDDO - ENDDO - - ! Set the number of data members - ! ------------------------------ - - dtsinfo%nsubfields = 3 - - ! Initialize the offsets - ! ----------------------- - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) - CALL check("h5tget_size_f", error, total_error) - IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error) - CALL check("h5tget_size_f", error, total_error) - ENDIF - - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error) - CALL check("h5tget_size_f", error, total_error) - - dtsinfo%offset(1) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%a(1))) - dtsinfo%offset(2) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%b(1))) - dtsinfo%offset(3) = H5OFFSETOF(C_LOC(cf(1)),C_LOC(cf(1)%c(1))) - - - ! Initialize the data type IDs - ! ---------------------------- - dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; - dtsinfo%datatype(2) = H5T_NATIVE_REAL_4; - dtsinfo%datatype(3) = H5T_NATIVE_REAL_8; - - - ! Initialize the names of data members - ! ------------------------------------ - - dtsinfo%name(1) = "One " - dtsinfo%name(2) = "Two " - dtsinfo%name(3) = "Three" - - ! Create file - ! ----------- - CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) - CALL check("h5fcreate_f", error, total_error) - - - ! Create data space - ! ----------------- - CALL h5screate_simple_f(RANK, dim, space, error) - CALL check("h5screate_simple_f", error, total_error) - - - ! Create the memory data type - ! --------------------------- - - CALL h5tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(cf(1)), C_LOC(cf(2))), type, error) - CALL check("h5tcreate_f", error, total_error) - - ! Add members to the compound data type - ! -------------------------------------- - - DO i = 1, dtsinfo%nsubfields - CALL h5tarray_create_f(dtsinfo%datatype(i), ndims(i), dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - CALL H5Tinsert_f(type, dtsinfo%name(i), dtsinfo%offset(i), array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - ENDDO - - ! Create the dataset - ! ------------------ / - CALL h5dcreate_f(fid,FIELDNAME,type, space, dataset,error) - CALL check("h5dcreate_f", error, total_error) - - ! Write data to the dataset - ! ------------------------- - - ALLOCATE(rdims(1:2)) ! dummy not needed - - f_ptr = C_LOC(cf(1)) - - CALL h5dwrite_f(dataset, type, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ALLOCATE(rdims1(1:2)) ! dummy not needed - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, type, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL( cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL( cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - - ! Release IDs - ! ----------- - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - CALL h5sclose_f(space,error) - CALL check("h5sclose_f", error, total_error) - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - !**************************** - ! Reopen the file and update - !**************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - sizeof_compound = INT( type_sizer*ALEN, size_t) - - CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) - CALL check("h5tcreate_f", error, total_error) - - CALL h5tarray_create_f(H5T_NATIVE_REAL_4, 1, dima, array_dt, error) - CALL check("h5tarray_create_f", error, total_error) - - CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) - CALL check("h5tinsert_f", error, total_error) - - ! Initialize the data to overwrite - ! -------------------------------- - DO i = 1, LENGTH - DO j = 1, ALEN - fld(i)%b(j) = 1.313 - cf(i)%b(j) = fld(i)%b(j) - ENDDO - ENDDO - - f_ptr = C_LOC(fld(1)) - - CALL h5dwrite_f(dataset, TYPE, f_ptr, error ) - CALL check("h5dwrite_f", error, total_error) - - - ! Read just the field changed - - f_ptr = C_LOC(fldr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( .NOT.dreal_eq( REAL(fld(i)%b(j),dp), REAL( fldr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - CALL h5tclose_f(TYPE,error) - CALL check("h5tclose_f", error, total_error) - CALL h5tclose_f(array_dt,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Read the entire dataset again - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - -!************************************************** -! Reopen the file and print out all the data again -!************************************************** - - CALL h5fopen_f (FILENAME, H5F_ACC_RDWR_F, fid, error) - CALL check("h5fopen_f", error, total_error) - - - CALL h5dopen_f(fid, FIELDNAME, dataset, error) - CALL check("h5dopen_f", error, total_error) - - - CALL h5dget_type_f(dataset, type, error) - CALL check("h5dget_type_f", error, total_error) - - - ! Reset the data to read in - ! ------------------------- - - DO i = 1, LENGTH - cfr(i)%a(:) = 0 - cfr(i)%b(:) = 0 - cfr(i)%c(:) = 0 - ENDDO - - f_ptr = C_LOC(cfr(1)) - CALL H5Dread_f(dataset, TYPE, f_ptr, error) - CALL check("H5Dread_f", error, total_error) - - ! Verify correct data - ! ------------------- - - DO i = 1, LENGTH - DO j = 1, ALEN - IF( cf(i)%a(j) .NE. cfr(i)%a(j) )THEN - PRINT*, 'ERROR: Wrong integer data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%b(j),dp), REAL(cfr(i)%b(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong real data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - IF( .NOT.dreal_eq( REAL(cf(i)%c(j),dp), REAL(cfr(i)%c(j), dp)) ) THEN - PRINT*, 'ERROR: Wrong double data is read back by H5Dread_f ' - total_error = total_error + 1 - ENDIF - ENDDO - ENDDO - - CALL h5dclose_f(dataset, error) - CALL check("h5dclose_f", error, total_error) - - CALL h5tclose_f(type,error) - CALL check("h5tclose_f", error, total_error) - - CALL h5fclose_f(fid,error) - CALL check("h5fclose_f", error, total_error) - - END SUBROUTINE test_array_bkg - - - - SUBROUTINE test_h5kind_to_type(total_error) - - USE ISO_C_BINDING - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors - 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 - - CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname8 = "dset8" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer = "dsetr" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer4 = "dsetr4" ! Dataset name - CHARACTER(LEN=6), PARAMETER :: dsetnamer8 = "dsetr8" ! Dataset name - - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HID_T) :: dset_id1 ! Dataset identifier - INTEGER(HID_T) :: dset_id4 ! Dataset identifier - INTEGER(HID_T) :: dset_id8 ! Dataset identifier - INTEGER(HID_T) :: dset_id16 ! Dataset identifier - INTEGER(HID_T) :: dset_idr ! Dataset identifier - INTEGER(HID_T) :: dset_idr4 ! Dataset identifier - INTEGER(HID_T) :: dset_idr8 ! Dataset identifier - - INTEGER :: error ! Error flag - INTEGER :: i - -! Data buffers: - - INTEGER(int_kind_1), DIMENSION(1:4), TARGET :: dset_data_i1, data_out_i1 - INTEGER(int_kind_4), DIMENSION(1:4), TARGET :: dset_data_i4, data_out_i4 - INTEGER(int_kind_8), DIMENSION(1:4), TARGET :: dset_data_i8, data_out_i8 - INTEGER(int_kind_16), DIMENSION(1:4), TARGET :: dset_data_i16, data_out_i16 - - REAL, DIMENSION(1:4), TARGET :: dset_data_r, data_out_r - REAL(real_kind_7), DIMENSION(1:4), TARGET :: dset_data_r7, data_out_r7 - REAL(real_kind_15), DIMENSION(1:4), TARGET :: dset_data_r15, data_out_r15 - - INTEGER(HSIZE_T), DIMENSION(1:1) :: data_dims = (/4/) - INTEGER(HID_T) :: dspace_id ! Dataspace identifier - - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize the dset_data array. - ! - DO i = 1, 4 - dset_data_i1(i) = i - dset_data_i4(i) = i - dset_data_i8(i) = i - dset_data_i16(i) = i - - dset_data_r(i) = (i)*100. - dset_data_r7(i) = (i)*100. - dset_data_r15(i) = (i)*1000. - - END DO - - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspaces for datasets - ! - CALL h5screate_simple_f(1, data_dims , dspace_id, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file_id, dsetname1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), dspace_id, dset_id1, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname2, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), dspace_id, dset_id4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname4, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), dspace_id, dset_id8, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) - CALL check("H5Dcreate_f",error, total_error) - - CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) - CALL check("H5Dcreate_f",error, total_error) - CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) - CALL check("H5Dcreate_f",error, total_error) - - ! - ! Write the dataset. - ! - f_ptr = C_LOC(dset_data_i1(1)) - CALL h5dwrite_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i4(1)) - CALL h5dwrite_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i8(1)) - CALL h5dwrite_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_i16(1)) - CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r(1)) - CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r7(1)) - CALL h5dwrite_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - f_ptr = C_LOC(dset_data_r15(1)) - CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - ! - ! Close the file - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - - ! Open the file - - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error, total_error) - ! - ! Read the dataset. - ! - ! Read data back into an integer size that is larger then the original size used for - ! writing the data - f_ptr = C_LOC(data_out_i1) - CALL h5dread_f(dset_id1, h5kind_to_type(int_kind_1,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i4) - CALL h5dread_f(dset_id4, h5kind_to_type(int_kind_4,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i8) - CALL h5dread_f(dset_id8, h5kind_to_type(int_kind_8,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_i16) - CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r) - CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r7) - CALL h5dread_f(dset_idr4, h5kind_to_type(real_kind_7,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - f_ptr = C_LOC(data_out_r15) - CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) - CALL check("h5dread_f",error, total_error) - - DO i = 1, 4 - - CALL verify_Fortran_INTEGER_4("h5kind_to_type1",INT(dset_data_i1(i),int_kind_8),INT(data_out_i1(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type2",INT(dset_data_i4(i),int_kind_8),INT(data_out_i4(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) - CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) - - CALL verify_real_kind_7("h5kind_to_type5",REAL(dset_data_r(i),real_kind_7),REAL(data_out_r(i),real_kind_7),total_error) - CALL verify_real_kind_7("h5kind_to_type6",REAL(dset_data_r7(i),real_kind_7),REAL(data_out_r7(i),real_kind_7),total_error) - CALL verify_real_kind_7("h5kind_to_type7",REAL(dset_data_r15(i),real_kind_7),REAL(data_out_r15(i),real_kind_7),total_error) - - END DO - - ! - ! Close the dataset. - ! - CALL h5dclose_f(dset_id1, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id8, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_id16, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr4, error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset_idr8, error) - CALL check("h5dclose_f",error, total_error) - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE test_h5kind_to_type - -!************************************************************ -! -! This test reads and writes array datatypes -! to a dataset. The test first writes integers arrays of -! dimension ADIM0xADIM1 to a dataset with a dataspace of -! DIM0, then closes the file. Next, it reopens the file, -! reads back the data. -! -!************************************************************ -SUBROUTINE t_array(total_error) - - USE ISO_C_BINDING - USE HDF5 - USE TH5_MISC - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_array_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: adim0 = 3 - INTEGER , PARAMETER :: adim1 = 5 - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: adims = (/adim0, adim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER, DIMENSION(1:dim0, 1:adim0, 1:adim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: i, j, k - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - - ! - ! Initialize data. i is the element in the dataspace, j and k the - ! elements within the array datatype. - ! - DO i = 1, dim0 - DO j = 1, adim0 - DO k = 1, adim1 - wdata(i,j,k) = (i-1)*(j-1)-(j-1)*(k-1)+(i-1)*(k-1) - ENDDO - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, error) - ! - ! Create array datatypes for file and memory. - ! - CALL H5Tarray_create_f(INT(H5T_STD_I64LE, HID_T), 2, adims, filetype, error) - CALL check("H5Tarray_create_f",error, total_error) - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the array data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset, and attribute. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its dimensions. - ! - CALL h5dget_type_f(dset, filetype, error) - CALL check("h5dget_type_f",error, error) - CALL H5Tget_array_dims_f(filetype, adims, error) - CALL check("h5dget_type_f",error, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(1)), adim0, total_error) - CALL VERIFY("H5Tget_array_dims_f", INT(adims(2)), adim1, total_error) - ! - ! Get dataspace and allocate memory for read buffer. This is a - ! three dimensional attribute when the array datatype is included. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:dims(1),1:adims(1),1:adims(2))) - ! - ! Create the memory datatype. - ! - CALL H5Tarray_create_f(H5T_NATIVE_INTEGER, 2, adims, memtype, error) - CALL check("H5Tarray_create_f",error, total_error) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j=1, INT(adim0) - DO k = 1, INT(adim1) - CALL VERIFY("H5Sget_simple_extent_dims_f", rdata(i,j,k), wdata(i,j,k), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_array - -SUBROUTINE t_enum(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_enum_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - INTEGER(HID_T) :: F_BASET ! File base type - INTEGER(HID_T) :: M_BASET ! Memory base type - INTEGER(SIZE_T) , PARAMETER :: NAME_BUF_SIZE = 16 - -! Enumerated type - INTEGER, PARAMETER :: SOLID=0, LIQUID=1, GAS=2, PLASMA=3 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER, DIMENSION(1:1), TARGET :: val - - CHARACTER(LEN=6), DIMENSION(1:4) :: & - names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) - CHARACTER(LEN=NAME_BUF_SIZE) :: name - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j, idx - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize DATA. - ! - F_BASET = H5T_STD_I16BE ! File base type - M_BASET = H5T_NATIVE_INTEGER ! Memory base type - DO i = 1, dim0 - DO j = 1, dim1 - wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create the enumerated datatypes for file and memory. This - ! process is simplified IF native types are used for the file, - ! as only one type must be defined. - ! - CALL h5tenum_create_f(F_BASET, filetype, error) - CALL check("h5tenum_create_f",error, total_error) - - CALL h5tenum_create_f(M_BASET, memtype, error) - CALL check("h5tenum_create_f",error, total_error) - - DO i = SOLID, PLASMA - ! - ! Insert enumerated value for memtype. - ! - val(1) = i - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), C_LOC(val(1)), error) - CALL check("H5Tenum_insert_f", error, total_error) - ! - ! Insert enumerated value for filetype. We must first convert - ! the numerical value val to the base type of the destination. - ! - f_ptr = C_LOC(val(1)) - CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) - CALL check("H5Tconvert_f",error, total_error) - IF(i.GE.1)THEN ! test both F90 and F03 APIs - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) - ELSE - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) - ENDIF - CALL check("H5Tenum_insert_f",error, total_error) - ENDDO - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, total_error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the enumerated data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f (file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset,space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) - - ALLOCATE(rdata(1:dims(1),1:dims(2))) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1,1)) - CALL h5dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - ! - ! Get the name of the enumeration member. - ! - CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, error) - CALL check("h5tenum_nameof_f",error, total_error) - idx = MOD( (j-1)*(i-1), PLASMA+1 ) + 1 - CALL verifystring("h5tenum_nameof_f",TRIM(name),TRIM(names(idx)), total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL h5tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_enum - -SUBROUTINE t_bit(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_bit_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER , PARAMETER :: dim1 = 7 - - INTEGER(HID_T) :: file, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/dim0, dim1/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER(C_SIGNED_CHAR), DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer - INTEGER(C_SIGNED_CHAR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: A, B, C, D - INTEGER :: Aw, Bw, Cw, Dw - INTEGER :: i, j - INTEGER, PARAMETER :: hex = Z'00000003' - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! - ! Initialize data. We will manually pack 4 2-bit integers into - ! each unsigned char data element. - ! - DO i = 0, dim0-1 - DO j = 0, dim1-1 - wdata(i+1,j+1) = 0 - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(IAND(i * j - j, hex),C_SIGNED_CHAR) ) ! Field "A" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i,hex),2),C_SIGNED_CHAR) ) ! Field "B" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(j,hex),4),C_SIGNED_CHAR) ) ! Field "C" - wdata(i+1,j+1) = IOR( wdata(i+1,j+1), INT(ISHFT(IAND(i+j,hex),6),C_SIGNED_CHAR) ) ! Field "D" - ENDDO - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(2, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the bitfield data to it. - ! - CALL H5Dcreate_f(file, dataset, H5T_STD_B8BE, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1,1)) - CALL H5Dwrite_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file, dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(2)), dim1, total_error) - ALLOCATE(rdata(1:dims(1),1:dims(2))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata) - CALL H5Dread_f(dset, H5T_NATIVE_B8, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - i_loop: DO i = 1, INT(dims(1)) - DO j = 1, INT(dims(2)) - A = IAND(rdata(i,j), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "A" - B = IAND(ISHFT(rdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "B" - C = IAND(ISHFT(rdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "C" - D = IAND(ISHFT(rdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) ! Retrieve field "D" - - Aw = IAND(wdata(i,j), INT(hex,C_SIGNED_CHAR)) - Bw = IAND(ISHFT(wdata(i,j),-2), INT(hex,C_SIGNED_CHAR)) - Cw = IAND(ISHFT(wdata(i,j),-4), INT(hex,C_SIGNED_CHAR)) - Dw = IAND(ISHFT(wdata(i,j),-6), INT(hex,C_SIGNED_CHAR)) - - CALL VERIFY("bitfield", A, Aw, total_error) - CALL VERIFY("bitfield", B, Bw, total_error) - CALL VERIFY("bitfield", C, Cw, total_error) - CALL VERIFY("bitfield", D, Dw, total_error) - IF(total_error.NE.0) EXIT i_loop - ENDDO - ENDDO i_loop - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_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) - -END SUBROUTINE t_bit - -SUBROUTINE t_opaque(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_opaque_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: size = 7 - INTEGER(HID_T) :: file, space, dtype, dset ! Handles - INTEGER(size_t) :: len - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/DIM0/) - - CHARACTER(LEN=size), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - CHARACTER(LEN=size), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - CHARACTER(LEN=size-1) :: str = "OPAQUE" - - CHARACTER(LEN=14) :: tag_sm ! Test reading obaque tag into - CHARACTER(LEN=15) :: tag_exact ! buffers that are: to small, exact - CHARACTER(LEN=17) :: tag_big ! and to big. - - INTEGER :: taglen - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hsize_t) :: i - CHARACTER(LEN=1) :: ichr - TYPE(C_PTR) :: f_ptr - INTEGER :: error - ! - ! Initialize data. - ! - DO i = 1, dim0 - WRITE(ichr,'(I1)') i-1 - wdata(i) = str//ichr - ENDDO - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create opaque datatype and set the tag to something appropriate. - ! For this example we will write and view the data as a character - ! array. - ! - CALL h5tcreate_f(h5T_OPAQUE_F, size, dtype, error) - CALL check("h5tcreate_f",error, total_error) - CALL h5tset_tag_f(dtype,"Character array",error) - CALL check("h5tset_tag_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the opaque data to it. - ! - CALL h5dcreate_f(file, dataset, dtype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)(1:1)) - CALL h5dwrite_f(dset, dtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get datatype and properties for the datatype. - ! - CALL h5dget_type_f(dset, dtype, error) - CALL check("h5dget_type_f",error, total_error) - CALL h5tget_size_f(dtype, len, error) - CALL check("h5tget_size_f",error, total_error) - - ! Next tests should return - ! opaque_tag = tag = "Character array" and the actual length = 15 - - ! Test reading into a string that is to small - CALL h5tget_tag_f(dtype, tag_sm, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_sm,"Character arra", total_error) - - ! Test reading into a string that is exact - CALL h5tget_tag_f(dtype, tag_exact, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_exact,"Character array", total_error) - - ! Test reading into a string that is to big - CALL h5tget_tag_f(dtype, tag_big, taglen, error) - CALL check("h5tget_tag_f",error, total_error) - CALL VERIFY("h5tget_tag_f", taglen, 15, total_error) - CALL verifystring("h5tget_tag_f",tag_big,"Character array ", total_error) - - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL h5dread_f(dset, dtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - DO i = 1, dims(1) - CALL verifystring("t_opaque",TRIM(rdata(i)),TRIM(wdata(i)), total_error) - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - 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 H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_opaque - -SUBROUTINE t_objref(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=20), PARAMETER :: filename = "t_objref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 2 - - INTEGER(HID_T) :: file, space, dset, obj ! Handles - INTEGER :: error - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/dim0/) - TYPE(hobj_ref_t_f), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hobj_ref_t_f), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER :: objtype - INTEGER(SIZE_T) :: name_size - CHARACTER(LEN=80) :: name - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER :: i - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with a null dataspace. - ! - CALL h5screate_f(H5S_NULL_F,space,error) - CALL check("h5screate_f",error, total_error) - CALL h5dcreate_f(file, "DS2", H5T_STD_I32LE, space, obj, error) - CALL check("h5dcreate_f",error, total_error) - ! - CALL h5dclose_f(obj , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create a group. - ! - CALL h5gcreate_f(file, "G1", obj, error) - CALL check("h5gcreate_f",error, total_error) - CALL h5gclose_f(obj, error) - CALL check("h5gclose_f",error, total_error) - ! - ! Create references to the previously created objects. note, space_id - ! is not needed for object references. - ! - f_ptr = C_LOC(wdata(1)) - CALL H5Rcreate_f(file, "G1", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL H5Rcreate_f(file, "DS2", H5R_OBJECT_F, f_ptr, error) - CALL check("H5Rcreate_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to be the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the object references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_OBJ, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:maxdims(1))) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_OBJ, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, INT(maxdims(1)) - ! - ! Open the referenced object, get its name and type. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_OBJECT_F, f_ptr, obj, error) - CALL check("H5Rdereference_f",error, total_error) - CALL H5Rget_obj_type_f(dset, H5R_OBJECT_F, f_ptr, objtype, error) - CALL check("H5Rget_obj_type_f",error, total_error) - ! - ! Get the length of the name and name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(obj, name, 80_size_t, name_size, error) - CALL check("H5Iget_name_f",error, total_error) - ! - ! Print the object type and close the object. - ! - IF(objtype.EQ.H5G_GROUP_F)THEN - CALL verifystring("t_objref", name(1:name_size),"/G1", total_error) - ELSE IF(objtype.EQ.H5G_DATASET_F)THEN - CALL verifystring("t_objref", name(1:name_size),"/DS2", total_error) - ELSE - total_error = total_error + 1 - ENDIF - CALL h5oclose_f(obj, error) - CALL check("h5oclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_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) - -END SUBROUTINE t_objref - - -SUBROUTINE t_regref(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=22), PARAMETER :: filename = "t_regref_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2 = "DS2" - INTEGER , PARAMETER :: dim0 = 2 - INTEGER , PARAMETER :: ds2dim0 = 16 - INTEGER , PARAMETER :: ds2dim1 = 3 - - INTEGER(HID_T) :: file, memspace, space, dset, dset2 ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims3 - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2 = (/ds2dim0,ds2dim1/) - - INTEGER(HSIZE_T), DIMENSION(1:2,1:4) :: coords = RESHAPE((/2,1,12,3,1,2,5,3/),(/2,4/)) - - INTEGER(HSIZE_T), DIMENSION(1:2) :: start=(/0,0/),stride=(/11,2/),count=(/2,2/), BLOCK=(/3,1/) - - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - INTEGER(hssize_t) :: npoints - TYPE(hdset_reg_ref_t_f03), DIMENSION(1:dim0), TARGET :: wdata ! Write buffer - TYPE(hdset_reg_ref_t_f03), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - - INTEGER(size_t) :: size - CHARACTER(LEN=1), DIMENSION(1:ds2dim0,1:ds2dim1), TARGET :: wdata2 - - CHARACTER(LEN=80),DIMENSION(1:1), TARGET :: rdata2 - CHARACTER(LEN=80) :: name - INTEGER(hsize_t) :: i - TYPE(C_PTR) :: f_ptr - CHARACTER(LEN=ds2dim0) :: chrvar - CHARACTER(LEN=20), DIMENSION(1:2) :: chrref_correct - - chrvar = "The quick brown " - READ(chrvar,'(16A1)') wdata2(1:16,1) - chrvar = "fox jumps over " - READ(chrvar,'(16A1)') wdata2(1:16,2) - chrvar = "the 5 lazy dogs " - READ(chrvar,'(16A1)') wdata2(1:16,3) - - chrref_correct(1) = 'hdf5' - chrref_correct(2) = 'Therowthedog' - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create a dataset with character data. - ! - CALL h5screate_simple_f(2, dims2, space, error) - CALL check("h5screate_simple_f",error, total_error) - CALL h5dcreate_f(file,dataset2, H5T_STD_I8LE, space, dset2, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata2(1,1)) - CALL h5dwrite_f(dset2, H5T_NATIVE_INTEGER_1, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Create reference to a list of elements in dset2. - ! - CALL h5sselect_elements_f(space, H5S_SELECT_SET_F, 2, INT(4,size_t), coords, error) - CALL check("h5sselect_elements_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - ! - ! Create reference to a hyperslab in dset2, close dataspace. - ! - CALL h5sselect_hyperslab_f (space, H5S_SELECT_SET_F, start, count, error, stride, block) - CALL check("h5sselect_hyperslab_f",error, total_error) - f_ptr = C_LOC(wdata(2)) - CALL h5rcreate_f(file, DATASET2, H5R_DATASET_REGION_F, f_ptr, error, space) - CALL check("h5rcreate_f",error, total_error) - - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Create dataspace. Setting maximum size to the current size. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - - ! - ! Create the dataset and write the region references to it. - ! - CALL h5dcreate_f(file, dataset, H5T_STD_REF_DSETREG, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5dclose_f(dset2, error) - CALL check("h5dclose_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) - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL h5dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL h5sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - ALLOCATE(rdata(1:dims(1))) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f( dset, H5T_STD_REF_DSETREG, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - - ! - ! Open the referenced object, retrieve its region as a - ! dataspace selection. - ! - f_ptr = C_LOC(rdata(i)) - CALL H5Rdereference_f(dset, H5R_DATASET_REGION_F, f_ptr, dset2, error) - CALL check("H5Rdereference_f",error, total_error) - - CALL H5Rget_region_f(dset, f_ptr, space, error) - CALL check("H5Rget_region_f",error, total_error) - - ! - ! Get the object's name - ! - name(:) = ' ' ! initialize string to blanks - CALL H5Iget_name_f(dset2, name, 80_size_t, size, error) - CALL check("H5Iget_name_f",error, total_error) - CALL VERIFY("H5Iget_name_f", INT(size), LEN_TRIM(name), total_error) - CALL verifystring("H5Iget_name_f",name(1:size),TRIM(name), total_error) - ! - ! Allocate space for the read buffer. - ! - CALL H5Sget_select_npoints_f(space, npoints, error) - CALL check("H5Sget_select_npoints_f",error, total_error) - CALL VERIFY("H5Sget_select_npoints_f", INT(npoints), LEN_TRIM(chrref_correct(i)), total_error) - - dims3(1) = npoints - ! - ! Read the dataset region. - ! - CALL h5screate_simple_f(1, dims3, memspace, error) - CALL check("h5screate_simple_f",error, total_error) - - 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) - - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Sclose_f(memspace, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Dclose_f(dset2, error) - CALL check("h5dclose_f",error, total_error) - - END DO - ! - ! Close and release resources. - ! - DEALLOCATE(rdata) - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_regref - -SUBROUTINE t_vlen(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlen_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER, PARAMETER :: LEN0 = 3 - INTEGER, PARAMETER :: LEN1 = 12 - INTEGER(hsize_t) :: dim0 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - INTEGER :: i, j - - ! vl data - TYPE vl - INTEGER, DIMENSION(:), POINTER :: DATA - END TYPE vl - TYPE(vl), DIMENSION(:), ALLOCATABLE, TARGET :: ptr - - - TYPE(hvl_t), DIMENSION(1:2), TARGET :: wdata ! Array of vlen structures - TYPE(hvl_t), DIMENSION(1:2), TARGET :: rdata ! Pointer to vlen structures - - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/2/) - INTEGER, DIMENSION(:), POINTER :: ptr_r - TYPE(C_PTR) :: f_ptr - - ! - ! Initialize variable-length data. wdata(1) is a countdown of - ! length LEN0, wdata(2) is a Fibonacci sequence of length LEN1. - ! - wdata(1)%len = LEN0 - wdata(2)%len = LEN1 - - ALLOCATE( ptr(1:2) ) - ALLOCATE( ptr(1)%data(1:wdata(1)%len) ) - ALLOCATE( ptr(2)%data(1:wdata(2)%len) ) - - DO i=1, wdata(1)%len - ptr(1)%data(i) = wdata(1)%len - i + 1 ! 3 2 1 - ENDDO - wdata(1)%p = C_LOC(ptr(1)%data(1)) - - ptr(2)%data(1:2) = 1 - DO i = 3, wdata(2)%len - ptr(2)%data(i) = ptr(2)%data(i-1) + ptr(2)%data(i-2) ! (1 1 2 3 5 8 etc.) - ENDDO - wdata(2)%p = C_LOC(ptr(2)%data(1)) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create variable-length datatype for file and memory. - ! - CALL H5Tvlen_create_f(H5T_STD_I32LE, filetype, error) - CALL check("H5Tvlen_create_f",error, total_error) - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length data to it. - ! - CALL H5Dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, memtype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - ! - ! Close and release resources. Note the use of H5Dvlen_reclaim - ! removes the need to manually deallocate the previously allocated - ! data. - ! - - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - - ! - ! Get dataspace and allocate memory for array of vlen structures. - ! This does not actually allocate memory for the vlen data, that - ! will be done by the library. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - dim0 = dims(1) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ! - ! Create the memory datatype. - ! - CALL H5Tvlen_create_f(H5T_NATIVE_INTEGER, memtype, error) - CALL check("H5Tvlen_create_f",error, total_error) - - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)) - CALL H5Dread_f(dset, memtype, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, INT(dims(1)) - CALL c_f_pointer(rdata(i)%p, ptr_r, [rdata(i)%len] ) - DO j = 1, rdata(i)%len - CALL VERIFY("t_vlen", ptr_r(j), ptr(i)%data(j), total_error) - ENDDO - ENDDO - ! - ! Close and release resources. - ! - DEALLOCATE(ptr) - CALL h5dvlen_reclaim_f(memtype, space, H5P_DEFAULT_F, f_ptr, error) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlen - - -SUBROUTINE t_vlstring(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=18), PARAMETER :: filename = "t_vlstring.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - - INTEGER(SIZE_T), PARAMETER :: dim0 = 4 - INTEGER(SIZE_T), PARAMETER :: sdim = 7 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER :: error - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) ! Write buffer - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE :: rdata ! Read buffer - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims = (/sdim,dim0/) - INTEGER(SIZE_T), DIMENSION(4) :: str_len = (/7,7,5,7/) - INTEGER(hsize_t) :: i - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this example we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_strpad_f(filetype, H5T_STR_NULLPAD_F, error) - CALL check("H5Tset_strpad_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - CALL h5dwrite_vl_f(dset, filetype, wdata, data_dims, str_len, error, space) - CALL check("h5dwrite_vl_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this example. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), INT(dim0), total_error) - - ALLOCATE(rdata(1:dims(1))) - - ! - ! Read the data. - ! - CALL h5dread_vl_f(dset, filetype, rdata, data_dims, str_len, error, space) - CALL check("H5Dread_vl_f",error, total_error) - - ! - ! Output the data to the screen. - ! - DO i = 1, dims(1) - CALL verifystring("h5dopen_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring - -SUBROUTINE t_vlstring_readwrite(total_error) - -! test writing and reading vl string using h5dread_f and h5dwrite_f, C_LOC and C_F_POINTER - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=19), PARAMETER :: filename = "t_vlstringrw_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - CHARACTER(LEN=3) , PARAMETER :: dataset2D = "DS2" - - INTEGER(HSIZE_T) , PARAMETER :: dim0 = 4 - INTEGER(HSIZE_T) , PARAMETER :: dim1 = 2 - INTEGER(HID_T) :: file, filetype, space, dset ! Handles - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: dims2D = (/dim1,dim0/) - INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims - - TYPE(C_PTR), DIMENSION(1:dim0), TARGET :: wdata - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A = "123456"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: B = "7890"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: C = "abc"//C_NULL_CHAR - CHARACTER(len=3, KIND=c_char), DIMENSION(1:1), TARGET :: D = "df"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(1:dim1,1:dim0), TARGET :: wdata2D - - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A11 = "A(1,1)"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A12 = "A12"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A13 = "A_13"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A14 = "A_{1,4}"//C_NULL_CHAR - CHARACTER(len=8, KIND=c_char), DIMENSION(1:1), TARGET :: A21 = "A_{2,1}"//C_NULL_CHAR - CHARACTER(len=5, KIND=c_char), DIMENSION(1:1), TARGET :: A22 = "A_22"//C_NULL_CHAR - CHARACTER(len=4, KIND=c_char), DIMENSION(1:1), TARGET :: A23 = "A23"//C_NULL_CHAR - CHARACTER(len=7, KIND=c_char), DIMENSION(1:1), TARGET :: A24 = "A(2,4)"//C_NULL_CHAR - - TYPE(C_PTR), DIMENSION(:), ALLOCATABLE, TARGET :: rdata ! Read buffer - TYPE(C_PTR), DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata2D ! Read 2D buffer - CHARACTER(len=8, kind=c_char), POINTER :: data ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:4) :: data_w ! A pointer to a Fortran string - CHARACTER(len=8, kind=c_char), DIMENSION(1:dim1,1:dim0) :: data2D_w ! A pointer to a Fortran string - TYPE(C_PTR) :: f_ptr - INTEGER(hsize_t) :: i, j - INTEGER :: len - INTEGER :: error - - ! Initialize array of C pointers - - 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)(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) - data2D_w(1,3) = A13(1) - data2D_w(1,4) = A14(1) - data2D_w(2,1) = A21(1) - data2D_w(2,2) = A22(1) - data2D_w(2,3) = A23(1) - data2D_w(2,4) = A24(1) - - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file and memory datatypes. For this test we will save - ! the strings as C variable length strings, H5T_STRING is defined - ! as a variable length string. - ! - CALL H5Tcopy_f(H5T_STRING, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(2, dims2D, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the variable-length string data to - ! it. - ! - CALL h5dcreate_f(file, dataset2D, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata2D(1,1)) - CALL h5dwrite_f(dset, filetype, f_ptr, error) - CALL check("h5dwrite_f",error, total_error) - - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - - ! - ! Now we begin the read section of this test. - ! - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata(1:dims(1))) - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata(1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims(1) - CALL C_F_POINTER(rdata(i), data) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verifystring("h5dread_f",data(1:len), data_w(i)(1:len), total_error) - END DO - - DEALLOCATE(rdata) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - ! - ! Test reading in 2D dataset - ! - CALL h5dopen_f(file, dataset2D, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - ! - ! Get dataspace and allocate memory for read buffer. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - - - CALL H5Sget_simple_extent_dims_f(space, dims2D, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - ALLOCATE(rdata2D(1:dims2D(1),1:dims2D(2))) - - ! - ! Read the data. - ! - - f_ptr = C_LOC(rdata2D(1,1)) - CALL h5dread_f(dset, H5T_STRING, f_ptr, error) - CALL check("H5Dread_f",error, total_error) - - ! - ! Check the data. - ! - DO i = 1, dims2D(1) - DO j = 1, dims2D(2) - CALL C_F_POINTER(rdata2D(i,j), DATA) - len = 0 - DO - IF(DATA(len+1:len+1).EQ.C_NULL_CHAR.OR.len.GE.8) EXIT - len = len + 1 - ENDDO - CALL verifystring("h5dread_f",DATA(1:len), data2D_w(i,j)(1:len), total_error) - ENDDO - END DO - - DEALLOCATE(rdata2D) - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - -END SUBROUTINE t_vlstring_readwrite - - -SUBROUTINE t_string(total_error) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - - INTEGER, INTENT(INOUT) :: total_error - - CHARACTER(LEN=20), PARAMETER :: filename = "t_string_F03.h5" - CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" - INTEGER , PARAMETER :: dim0 = 4 - INTEGER(SIZE_T) , PARAMETER :: sdim = 8 - - INTEGER(HID_T) :: file, filetype, memtype, space, dset ! Handles - INTEGER :: error - - INTEGER(HSIZE_T), DIMENSION(1:1) :: dims = (/dim0/) - INTEGER(HSIZE_T), DIMENSION(1:1) :: maxdims - - CHARACTER(LEN=sdim), DIMENSION(1:dim0), TARGET :: & - wdata = (/"Parting", "is such", "sweet ", "sorrow."/) - CHARACTER(LEN=sdim), DIMENSION(:), ALLOCATABLE, TARGET :: rdata - INTEGER(hsize_t) :: i - INTEGER(SIZE_T) :: size - TYPE(C_PTR) :: f_ptr - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - ! - ! Create file datatypes. For this example we will save - ! the strings as FORTRAN strings - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, filetype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(filetype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error) - CALL check("h5screate_simple_f",error, total_error) - ! - ! Create the dataset and write the string data to it. - ! - CALL h5dcreate_f(file, dataset, filetype, space, dset, error) - CALL check("h5dcreate_f",error, total_error) - - f_ptr = C_LOC(wdata(1)(1:1)) - CALL H5Dwrite_f(dset, filetype, f_ptr, error) - CALL check("H5Dwrite_f",error, total_error) - ! - ! Close and release resources. - ! - CALL h5dclose_f(dset , error) - CALL check("h5dclose_f",error, total_error) - CALL h5sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(filetype, error) - CALL check("h5tclose_f",error, total_error) - CALL h5fclose_f(file , error) - CALL check("h5fclose_f",error, total_error) - ! - ! Now we begin the read section of this example. - ! - ! Open file and dataset. - ! - CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file, error) - CALL check("h5fopen_f",error, total_error) - CALL h5dopen_f(file, dataset, dset, error) - CALL check("h5dopen_f",error, total_error) - ! - ! Get the datatype and its size. - ! - CALL H5Dget_type_f(dset, filetype, error) - CALL check("H5Dget_type_f",error, total_error) - CALL H5Tget_size_f(filetype, size, error) - CALL check("H5Tget_size_f",error, total_error) - CALL VERIFY("H5Tget_size_f", INT(size), INT(sdim), total_error) - ! - ! Get dataspace. - ! - CALL H5Dget_space_f(dset, space, error) - CALL check("H5Dget_space_f",error, total_error) - CALL H5Sget_simple_extent_dims_f(space, dims, maxdims, error) - CALL check("H5Sget_simple_extent_dims_f",error, total_error) - CALL VERIFY("H5Sget_simple_extent_dims_f", INT(dims(1)), dim0, total_error) - - ALLOCATE(rdata(1:dims(1))) - ! - ! Create the memory datatype. - ! - CALL H5Tcopy_f(H5T_FORTRAN_S1, memtype, error) - CALL check("H5Tcopy_f",error, total_error) - CALL H5Tset_size_f(memtype, sdim, error) - CALL check("H5Tset_size_f",error, total_error) - ! - ! Read the data. - ! - f_ptr = C_LOC(rdata(1)(1:1)) - CALL H5Dread_f(dset, memtype, f_ptr, error, space) - CALL check("H5Dread_f",error, total_error) - - DO i = 1, dims(1) - CALL verifystring("h5dread_f",TRIM(rdata(i)),TRIM(wdata(i)) , total_error) - END DO - - DEALLOCATE(rdata) - - ! - ! Close and release resources. - ! - CALL H5Dclose_f(dset, error) - CALL check("h5dclose_f",error, total_error) - CALL H5Sclose_f(space, error) - CALL check("h5sclose_f",error, total_error) - CALL H5Tclose_f(memtype, error) - CALL check("h5tclose_f",error, total_error) - CALL H5Fclose_f(file, error) - CALL check("h5fclose_f",error, total_error) - - -END SUBROUTINE t_string - -SUBROUTINE vl_test_special_char(total_error) - - USE HDF5 - USE TH5_MISC - IMPLICIT NONE - -! INTERFACE -! SUBROUTINE setup_buffer(data_in, line_lengths, char_type) -! USE HDF5 -! USE ISO_C_BINDING -! IMPLICIT NONE -! CHARACTER(len=*), DIMENSION(:) :: data_in -! INTEGER(size_t), DIMENSION(:) :: line_lengths -! CHARACTER(KIND=C_CHAR,LEN=*) :: char_type -! END SUBROUTINE setup_buffer -! END INTERFACE - - INTEGER, INTENT(OUT) :: total_error - - CHARACTER(LEN=16), PARAMETER :: filename = "t_controlchar.h5" - INTEGER, PARAMETER :: line_length = 10 - INTEGER(hid_t) :: file - INTEGER(hid_t) :: dataset0 - CHARACTER(len=line_length), DIMENSION(1:100) :: data_in - CHARACTER(len=line_length), DIMENSION(1:100) :: data_out - INTEGER(size_t), DIMENSION(1:100) :: line_lengths - INTEGER(hid_t) :: string_id, space, dcpl - INTEGER(hsize_t), DIMENSION(1:1) :: dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:1) :: max_dims = (/0/) - INTEGER(hsize_t), DIMENSION(1:2) :: data_dims = (/0,0/) - INTEGER(hsize_t), DIMENSION(1:1) :: chunk =(/10/) - INTEGER, PARAMETER :: ncontrolchar = 7 - CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(1:ncontrolchar) :: controlchar = & - (/C_ALERT, C_BACKSPACE,C_CARRIAGE_RETURN, C_FORM_FEED,C_HORIZONTAL_TAB,C_VERTICAL_TAB, C_NEW_LINE/) - INTEGER :: i, j, n, error - n = 8 - ! - ! Create a new file using the default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, error) - CALL check("h5fcreate_f",error, total_error) - - max_dims = (/H5S_UNLIMITED_F/) - - ! - ! Create the memory datatype. - ! - CALL h5tcopy_f(h5t_string, string_id, error) - CALL check("h5tcopy_f", error, total_error) - CALL h5tset_strpad_f(string_id, h5t_str_nullpad_f, error) - CALL check("h5tset_strpad_f", error, total_error) - dims(1) = n - ! - ! Create dataspace. - ! - CALL h5screate_simple_f(1, dims, space, error, max_dims) - CALL check("h5screate_simple_f", error, total_error) - CALL h5pcreate_f(h5p_dataset_create_f, dcpl, error) - CALL check("h5pcreate_f", error, total_error) - CALL h5pset_chunk_f(dcpl, 1, chunk, error) - CALL check("h5pset_chunk_f", error, total_error) - - data_dims(1) = line_length - data_dims(2) = n - ! - ! Create data with strings containing various control characters. - ! - DO i = 1, ncontrolchar - ! - ! Create the dataset, for the string with control character and write the string data to it. - ! - CALL h5dcreate_f(file, controlchar(i), string_id, space, dataset0, error, dcpl) - CALL check("h5dcreate_f", error, total_error) - CALL setup_buffer(data_in(1:n), line_lengths, controlchar(i)) - CALL h5dwrite_vl_f(dataset0, string_id, data_in(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dwrite_vl_f", error, total_error) - ! - ! Read the string back. - ! - CALL h5dread_vl_f(dataset0, string_id, data_out(1:n), data_dims, line_lengths(1:n), error, space) - CALL check("h5dread_vl_f", error, total_error) - - DO j = 1, n - IF(data_in(j).NE.data_out(j))THEN - total_error = total_error + 1 - EXIT - ENDIF - ENDDO - - CALL h5dclose_f(dataset0, error) - CALL check("h5dclose_f", error, total_error) - ENDDO - - 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) - -END SUBROUTINE vl_test_special_char - - -SUBROUTINE setup_buffer(data_in, line_lengths, char_type) - - USE HDF5 - USE ISO_C_BINDING - - IMPLICIT NONE - - ! Creates a simple "Data_in" consisting of the letters of the alphabet, - ! one per line, with a control character. - - CHARACTER(len=10), DIMENSION(:) :: data_in - INTEGER(size_t), DIMENSION(:) :: line_lengths - INTEGER, DIMENSION(1:3) :: letters - CHARACTER(LEN=3) :: lets - CHARACTER(KIND=C_CHAR,LEN=*) :: char_type - CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp - INTEGER :: i, j, n, ff - - ! Convert the letters and special character to integers - lets = 'abc' - - READ(lets,'(3A1)') letters - READ(char_type,'(A1)') ff - n = SIZE(data_in) - j = 1 - DO i=1,n-1 - IF( j .EQ. 4 )THEN - WRITE(char_tmp,'(A1)') ff - data_in(i:i) = char_tmp - ELSE - WRITE(char_tmp,'(A1)') letters(j) - data_in(i:i) = char_tmp - ENDIF - line_lengths(i) = LEN_TRIM(data_in(i)) - j = j + 1 - IF( j .EQ. 5 ) j = 1 - END DO - WRITE(char_tmp,'(A1)') ff - data_in(n:n) = char_tmp - line_lengths(n) = 1 - -END SUBROUTINE setup_buffer - -!------------------------------------------------------------------------- -! Function: test_nbit -! -! Purpose: Tests (real, 4 byte) datatype for nbit filter -! -! Return: Success: 0 -! Failure: >0 -! -! Programmer: M. Scot Breitenfeld -! Decemeber 7, 2010 -! -! Modifications: Moved this subroutine from the 1.8 test file and -! modified it to use F2003 features. -! This routine requires 4 byte reals, so we use F2003 features to -! ensure the requirement is satisfied in a portable way. -! The need for this arises when a user specifies the default real is 8 bytes. -! MSB 7/31/12 -! -!------------------------------------------------------------------------- -! - -SUBROUTINE test_nbit(total_error ) - - USE HDF5 - USE TH5_MISC - USE ISO_C_BINDING - - IMPLICIT NONE - INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors - INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: file - - INTEGER(hid_t) :: dataset, datatype, space, dc, mem_type_id - INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/2,5/) - INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2,5/) - ! orig_data[] are initialized to be within the range that can be represented by - ! dataset datatype (no precision loss during datatype conversion) - ! - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = & - RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, & - 5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) ) - REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data - INTEGER(size_t) :: PRECISION, offset - INTEGER :: error - LOGICAL :: status - INTEGER(hsize_t) :: i, j - TYPE(C_PTR) :: f_ptr - - ! check to see if filter is available - CALL H5Zfilter_avail_f(H5Z_FILTER_NBIT_F, status, error) - IF(.NOT.status)THEN ! We don't have H5Z_FILTER_NBIT_F filter - total_error = -1 ! so return - RETURN - ENDIF - - CALL H5Fcreate_f("nbit.h5", H5F_ACC_TRUNC_F, file, error) - CALL check("H5Fcreate_f", error, total_error) - - ! Define dataset datatype (integer), and set precision, offset - CALL H5Tcopy_f(H5T_IEEE_F32BE, datatype, error) - CALL CHECK(" H5Tcopy_f", error, total_error) - CALL H5Tset_fields_f(datatype, 26_size_t, 20_size_t, 6_size_t, 7_size_t, 13_size_t, error) - CALL CHECK(" H5Tset_fields_f", error, total_error) - offset = 7 - CALL H5Tset_offset_f(datatype, offset, error) - CALL CHECK(" H5Tset_offset_f", error, total_error) - PRECISION = 20 - CALL H5Tset_precision_f(datatype,PRECISION, error) - CALL CHECK(" H5Tset_precision_f", error, total_error) - - CALL H5Tset_size_f(datatype, 4_size_t, error) - CALL CHECK(" H5Tset_size_f", error, total_error) - - CALL H5Tset_ebias_f(datatype, 31_size_t, error) - CALL CHECK(" H5Tset_ebias_f", error, total_error) - - ! Create the data space - CALL H5Screate_simple_f(2, dims, space, error) - CALL CHECK(" H5Screate_simple_f", error, total_error) - - ! USE nbit filter - CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) - CALL CHECK(" H5Pcreate_f", error, total_error) - - CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) - CALL CHECK(" H5Pset_chunk_f", error, total_error) - CALL H5Pset_nbit_f(dc, error) - CALL CHECK(" H5Pset_nbit_f", error, total_error) - - ! Create the dataset - CALL H5Dcreate_f(file, "nbit_real", datatype, & - space, dataset, error, dc) - CALL CHECK(" H5Dcreate_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 1: Test nbit by setting up a chunked dataset and writing - ! to it. - !---------------------------------------------------------------------- - ! - mem_type_id = h5kind_to_type(wp,H5_REAL_KIND) - - f_ptr = C_LOC(orig_data(1,1)) - CALL H5Dwrite_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dwrite_f", error, total_error) - - !---------------------------------------------------------------------- - ! STEP 2: Try to read the data we just wrote. - !---------------------------------------------------------------------- - ! - f_ptr = C_LOC(new_data(1,1)) - CALL H5Dread_f(dataset, mem_type_id, f_ptr, error) - CALL CHECK(" H5Dread_f", error, total_error) - - ! Check that the values read are the same as the values written - ! Assume size of long long = size of double - ! - i_loop: DO i = 1, dims(1) - j_loop: DO j = 1, dims(2) - IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE ! skip IF value is NaN - IF( .NOT.dreal_eq( REAL(new_data(i,j),dp), REAL( orig_data(i,j), dp)) ) THEN - total_error = total_error + 1 - WRITE(*,'(" Read different values than written.")') - WRITE(*,'(" At index ", 2(1X,I0))') i, j - EXIT i_loop - END IF - ENDDO j_loop - ENDDO i_loop - - !---------------------------------------------------------------------- - ! Cleanup - !---------------------------------------------------------------------- - ! - CALL H5Tclose_f(datatype, error) - CALL CHECK(" H5Tclose_f", error, total_error) - CALL H5Pclose_f(dc, error) - CALL CHECK(" H5Pclose_f", error, total_error) - CALL H5Sclose_f(space, error) - CALL CHECK(" H5Sclose_f", error, total_error) - CALL H5Dclose_f(dataset, error) - CALL CHECK(" H5Dclose_f", error, total_error) - CALL H5Fclose_f(file, error) - CALL CHECK(" H5Fclose_f", error, 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 TH5_MISC - 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 ! 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(KIND(E1_RED)), TARGET :: 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 = (/INT(E1_RED,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), & - INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),& - INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), & - 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(hsize_t) :: ih - 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", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_GREEN - CALL H5Tenum_insert_f(dtype, "GREEN", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLUE - CALL H5Tenum_insert_f(dtype, "BLUE", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_WHITE - CALL H5Tenum_insert_f(dtype, "WHITE", C_LOC(val), error) - CALL check("h5tenum_insert_f",error, total_error) - val = E1_BLACK - CALL H5Tenum_insert_f(dtype, "BLACK", C_LOC(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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data2(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') ih, data1(ih),i,data2(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_short(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') ih, data1(ih),i,data_short(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') & - ih, INT(data1(ih)), ih, INT(data_double(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i8(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i8(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_i16(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_i16(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') & - ih, INT(data1(ih)), i, INT(data_r7(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_int(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') ih, data1(ih),i,data_int(ih) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_double(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') ih, data1(ih),ih,INT(data_double(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. INT(data_r7(ih)))THEN - total_error = total_error + 1 - WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') ih, data1(ih),ih,INT(data_r7(ih)) - 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 ih = 1, ds_size(1) - IF(data1(ih) .NE. data_i16(ih))THEN - total_error = total_error + 1 - WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') ih, data1(ih),ih,data_i16(ih) - 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 - -END MODULE TH5T_F03 diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.f90 index 651ca75..834fbde 100644 --- a/fortran/test/tH5VL.f90 +++ b/fortran/test/tH5VL.f90 @@ -28,12 +28,13 @@ !***** MODULE TH5VL + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + USE TH5_MISC_GEN CONTAINS SUBROUTINE vl_test_integer(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -194,8 +195,6 @@ CONTAINS END SUBROUTINE vl_test_integer SUBROUTINE vl_test_real(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup @@ -328,18 +327,15 @@ CONTAINS CALL h5dread_vl_f(dset_id, vltype_id, vl_real_data_out, data_dims, len_out, & error, mem_space_id = dspace_id, file_space_id = dspace_id) CALL check("h5dread_real_f", error, total_error) - do ih = 1, data_dims(2) - do jh = 1, len_out(ih) - IF( .NOT.dreal_eq( REAL(vl_real_data(jh,ih),dp), REAL(vl_real_data_out(jh,ih), dp)) ) THEN - total_error = total_error + 1 - WRITE(*,*) "h5dread_vl_f returned incorrect data" - ENDIF - enddo - if (len(ih) .ne. len_out(ih)) then - total_error = total_error + 1 - write(*,*) "h5dread_vl_f returned incorrect data" - endif - enddo + DO ih = 1, data_dims(2) + DO jh = 1, len_out(ih) + CALL VERIFY("h5dread_vl_f returned incorrect data",vl_real_data(jh,ih),vl_real_data_out(jh,ih), total_error) + ENDDO + IF (LEN(ih) .NE. len_out(ih)) THEN + total_error = total_error + 1 + WRITE(*,*) "h5dread_vl_f returned incorrect data" + ENDIF + ENDDO ! @@ -367,8 +363,6 @@ CONTAINS END SUBROUTINE vl_test_real SUBROUTINE vl_test_string(cleanup, total_error) - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.f90 index e73fed2..d12bb25 100644 --- a/fortran/test/tHDF5.f90 +++ b/fortran/test/tHDF5.f90 @@ -29,6 +29,7 @@ MODULE THDF5 USE TH5_MISC + USE TH5_MISC_GEN USE TH5A USE TH5D USE TH5E diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 new file mode 100644 index 0000000..7d67f30 --- /dev/null +++ b/fortran/test/tf.F90 @@ -0,0 +1,412 @@ +!****h* root/fortran/test/tf.f90 +! +! NAME +! tf.f90 +! +! FUNCTION +! Contains subroutines which are needed in all the hdf5 fortran tests +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! CONTAINS SUBROUTINES +! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, +! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv +! +!***** + +#include "H5config_f.inc" + +MODULE TH5_MISC + + USE, INTRINSIC :: ISO_C_BINDING + + IMPLICIT NONE + + INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors + + ! generic compound datatype + TYPE, BIND(C) :: comp_datatype + REAL :: a + INTEGER :: x + DOUBLE PRECISION :: y + CHARACTER(KIND=C_CHAR) :: z + END TYPE comp_datatype + + PUBLIC :: H5_SIZEOF + INTERFACE H5_SIZEOF + MODULE PROCEDURE H5_SIZEOF_CMPD + MODULE PROCEDURE H5_SIZEOF_CHR + MODULE PROCEDURE H5_SIZEOF_I + MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP + END INTERFACE + +CONTAINS + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: write_test_status +!DEC$endif + SUBROUTINE write_test_status( test_result, test_title, total_error) + + ! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, --skip -- + ! 0 , passed + ! positive, failed + + CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test + INTEGER, INTENT(INOUT) :: total_error ! Accumulated error + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' + + + error_string = failure + IF (test_result == 0) THEN + error_string = success + ELSE IF (test_result == -1) THEN + error_string = skip + ENDIF + + WRITE(*, fmt = '(A, T72, A)') test_title, error_string + + IF(test_result.GT.0) total_error = total_error + test_result + + END SUBROUTINE write_test_status + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: check +!DEC$endif + SUBROUTINE check(string,error,total_error) + CHARACTER(LEN=*) :: string + INTEGER :: error, total_error + IF (error .LT. 0) THEN + total_error=total_error+1 + WRITE(*,*) string, " FAILED" + ENDIF + RETURN + END SUBROUTINE check + +!---------------------------------------------------------------------- +! Name: h5_fixname_f +! +! Purpose: Create a file name from the a file base name. +! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! full_name - full file name +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 13, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_fixname_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string +! INTEGER(HID_T) :: fapl_default + + INTERFACE + INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + !DEC$ATTRIBUTES reference :: full_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + CHARACTER(LEN=*), INTENT(IN) :: full_name + INTEGER(SIZE_T) :: full_namelen + END FUNCTION h5_fixname_c + END INTERFACE + + base_namelen = LEN(base_name) + full_namelen = LEN(full_name) + hdferr = h5_fixname_c(base_name, base_namelen, fapl, & + full_name, full_namelen) + + END SUBROUTINE h5_fixname_f + +!---------------------------------------------------------------------- +! Name: h5_cleanup_f +! +! Purpose: Cleanups tests files +! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c +! +! Inputs: +! base_name - base name of the file +! fapl - file access property list +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! Programmer: Elena Pourmal +! September 19, 2002 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_cleanup_f +!DEC$endif + USE H5GLOBAL + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list + + INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string + + INTERFACE + INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: base_name + CHARACTER(LEN=*), INTENT(IN) :: base_name + INTEGER(SIZE_T) :: base_namelen + INTEGER(HID_T), INTENT(IN) :: fapl + END FUNCTION h5_cleanup_c + END INTERFACE + + base_namelen = LEN(base_name) + hdferr = h5_cleanup_c(base_name, base_namelen, fapl) + + END SUBROUTINE h5_cleanup_f + +!---------------------------------------------------------------------- +! Name: h5_exit_f +! +! Purpose: Exit application +! It is a fortran counterpart for the standard C 'exit()' routine +! Be careful not to overflow the exit value range since +! UNIX supports a very small range such as 1 byte. +! Therefore, exit(256) may end up as exit(0). +! +! Inputs: +! status - Status to return from application +! +! Outputs: +! none +! +! Programmer: Quincey Koziol +! December 14, 2004 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_exit_f(status) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_exit_f +!DEC$endif + IMPLICIT NONE + INTEGER, INTENT(IN) :: status ! Return code + + INTERFACE + SUBROUTINE h5_exit_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c + !DEC$ ENDIF + INTEGER, INTENT(IN) :: status + END SUBROUTINE h5_exit_c + END INTERFACE + + CALL h5_exit_c(status) + + END SUBROUTINE h5_exit_f + +!---------------------------------------------------------------------- +! Name: h5_env_nocleanup_f +! +! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran +! tests to determine if the output files should be removed +! +! Inputs: +! +! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files +! .false. - remove test files +! +! Programmer: M.S. Breitenfeld +! September 30, 2008 +! +!---------------------------------------------------------------------- + SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_env_nocleanup_f +!DEC$endif + IMPLICIT NONE + LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code + INTEGER :: status + + INTERFACE + SUBROUTINE h5_env_nocleanup_c(status) + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c + !DEC$ ENDIF + INTEGER :: status + END SUBROUTINE h5_env_nocleanup_c + END INTERFACE + + CALL h5_env_nocleanup_c(status) + + HDF5_NOCLEANUP = .FALSE. + IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. + + END SUBROUTINE h5_env_nocleanup_f + +! --------------------------------------------------------------------------------------------------- +! H5_SIZEOF routines +! +! NOTES +! (1) The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: +! +! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a +! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. +! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows +! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger +! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and +! the variables receiving the result must be declared INTEGER*8." +! +! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or +! characters that do not have a set length (as used in tH5P_F03.f90), sigh... +! +! (2) F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. +! +! (3) Unfortunately we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different +! data types from the various tests. +! +! --------------------------------------------------------------------------------------------------- + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_cmpd +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) + IMPLICIT NONE + TYPE(comp_datatype), INTENT(in) :: a + +#ifdef H5_FORTRAN_FORTRAN_HAVE_C_SIZEOF + H5_SIZEOF_CMPD = C_SIZEOF(a) +#else + H5_SIZEOF_CMPD = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_CMPD + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_chr +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) + IMPLICIT NONE + CHARACTER(LEN=1), INTENT(in) :: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_CHR = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_CHR + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_i +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) + IMPLICIT NONE + INTEGER, INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_I = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_I + + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_sp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) + IMPLICIT NONE + REAL(sp), INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_SP = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_SP + +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_TEST_DLL) +!DEC$attributes dllexport :: h5_sizeof_dp +!DEC$endif + INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) + IMPLICIT NONE + REAL(dp), INTENT(in):: a + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) +#else + H5_SIZEOF_DP = SIZEOF(a) +#endif + + END FUNCTION H5_SIZEOF_DP + +END MODULE TH5_MISC diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90 deleted file mode 100644 index 450daf2..0000000 --- a/fortran/test/tf.f90 +++ /dev/null @@ -1,393 +0,0 @@ -!****h* root/fortran/test/tf.f90 -! -! NAME -! tf.f90 -! -! FUNCTION -! Contains subroutines which are needed in all the hdf5 fortran tests -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! write_test_status, check, verify, verifyLogical, verifyString, h5_fixname_f, -! h5_cleanup_f, h5_exit_f, h5_env_nocleanup_f,dreal_eqv -! -!***** -MODULE TH5_MISC - - USE TH5_MISC_PROVISIONAL - - IMPLICIT NONE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: dreal_eq -!DEC$endif - LOGICAL FUNCTION dreal_eq(a,b) - - ! Check if two double precision reals are equivalent - REAL(dp), INTENT (in):: a,b - REAL(dp), PARAMETER :: eps = 1.e-8 - dreal_eq = ABS(a-b) .LT. eps - - END FUNCTION dreal_eq - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_real_kind_7 -!DEC$endif - SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors - CHARACTER(LEN=*) :: string - REAL(real_kind_7) :: value, correct_value - INTEGER :: total_error - IF (.NOT.dreal_eq( REAL(value,dp), REAL(correct_value, dp)) ) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT REAL VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_real_kind_7 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: write_test_status -!DEC$endif - SUBROUTINE write_test_status( test_result, test_title, total_error) - - ! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, --skip -- - ! 0 , passed - ! positive, failed - - CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test - INTEGER, INTENT(INOUT) :: total_error ! Accumulated error - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--' - - - error_string = failure - IF (test_result == 0) THEN - error_string = success - ELSE IF (test_result == -1) THEN - error_string = skip - ENDIF - - WRITE(*, fmt = '(A, T72, A)') test_title, error_string - - IF(test_result.GT.0) total_error = total_error + test_result - - END SUBROUTINE write_test_status - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: check -!DEC$endif - SUBROUTINE check(string,error,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: error, total_error - IF (error .LT. 0) THEN - total_error=total_error+1 - WRITE(*,*) string, " FAILED" - ENDIF - RETURN - END SUBROUTINE check - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify -!DEC$endif - SUBROUTINE VERIFY(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - INTEGER :: value, correct_value, total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_INTEGER_HID_T -!DEC$endif - SUBROUTINE verify_INTEGER_HID_T(string,value,correct_value,total_error) - USE HDF5 - CHARACTER(LEN=*) :: string - INTEGER(HID_T) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_INTEGER_HID_T - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verify_Fortran_INTEGER_4 -!DEC$endif - SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error) - USE HDF5 - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) ! should map to INTEGER*4 on most modern processors - CHARACTER(LEN=*) :: string - INTEGER(int_kind_8) :: value, correct_value - INTEGER :: total_error - IF (value .NE. correct_value) THEN - total_error=total_error+1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verify_Fortran_INTEGER_4 - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyLogical -!DEC$endif - SUBROUTINE verifyLogical(string,value,correct_value,total_error) - CHARACTER(LEN=*) :: string - LOGICAL :: value, correct_value - INTEGER :: total_error - IF (value .NEQV. correct_value) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyLogical - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: verifyString -!DEC$endif - SUBROUTINE verifyString(string, value,correct_value,total_error) - CHARACTER*(*) :: string - CHARACTER*(*) :: value, correct_value - INTEGER :: total_error - IF (TRIM(value) .NE. TRIM(correct_value)) THEN - total_error = total_error + 1 - WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string - ENDIF - RETURN - END SUBROUTINE verifyString - - -!---------------------------------------------------------------------- -! Name: h5_fixname_f -! -! Purpose: Create a file name from the a file base name. -! It is a fortran counterpart for the h5_fixname in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! full_name - full file name -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 13, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_fixname_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - CHARACTER(LEN=*), INTENT(IN) :: full_name ! full name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - INTEGER(SIZE_T) :: full_namelen ! Length of the full name character string -! INTEGER(HID_T) :: fapl_default - - INTERFACE - INTEGER FUNCTION h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_FIXNAME_C':: h5_fixname_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - !DEC$ATTRIBUTES reference :: full_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - CHARACTER(LEN=*), INTENT(IN) :: full_name - INTEGER(SIZE_T) :: full_namelen - END FUNCTION h5_fixname_c - END INTERFACE - - base_namelen = LEN(base_name) - full_namelen = LEN(full_name) - hdferr = h5_fixname_c(base_name, base_namelen, fapl, & - full_name, full_namelen) - - END SUBROUTINE h5_fixname_f - -!---------------------------------------------------------------------- -! Name: h5_cleanup_f -! -! Purpose: Cleanups tests files -! It is a fortran counterpart for the h5_cleanup in ../../test/h5test.c -! -! Inputs: -! base_name - base name of the file -! fapl - file access property list -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! Programmer: Elena Pourmal -! September 19, 2002 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_cleanup_f -!DEC$endif - USE H5GLOBAL - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: base_name ! base name - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN) :: fapl ! file access property list - - INTEGER(SIZE_T) :: base_namelen ! Length of the base name character string - - INTERFACE - INTEGER FUNCTION h5_cleanup_c(base_name, base_namelen, fapl) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_CLEANUP_C':: h5_cleanup_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: base_name - CHARACTER(LEN=*), INTENT(IN) :: base_name - INTEGER(SIZE_T) :: base_namelen - INTEGER(HID_T), INTENT(IN) :: fapl - END FUNCTION h5_cleanup_c - END INTERFACE - - base_namelen = LEN(base_name) - hdferr = h5_cleanup_c(base_name, base_namelen, fapl) - - END SUBROUTINE h5_cleanup_f - -!---------------------------------------------------------------------- -! Name: h5_exit_f -! -! Purpose: Exit application -! It is a fortran counterpart for the standard C 'exit()' routine -! Be careful not to overflow the exit value range since -! UNIX supports a very small range such as 1 byte. -! Therefore, exit(256) may end up as exit(0). -! -! Inputs: -! status - Status to return from application -! -! Outputs: -! none -! -! Programmer: Quincey Koziol -! December 14, 2004 -! -! -!---------------------------------------------------------------------- - SUBROUTINE h5_exit_f(status) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_exit_f -!DEC$endif - IMPLICIT NONE - INTEGER, INTENT(IN) :: status ! Return code - - INTERFACE - SUBROUTINE h5_exit_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_EXIT_C':: h5_exit_c - !DEC$ ENDIF - INTEGER, INTENT(IN) :: status - END SUBROUTINE h5_exit_c - END INTERFACE - - CALL h5_exit_c(status) - - END SUBROUTINE h5_exit_f - -!---------------------------------------------------------------------- -! Name: h5_env_nocleanup_f -! -! Purpose: Uses the HDF5_NOCLEANUP environment variable in Fortran -! tests to determine if the output files should be removed -! -! Inputs: -! -! Outputs: HDF5_NOCLEANUP: .true. - don't remove test files -! .false. - remove test files -! -! Programmer: M.S. Breitenfeld -! September 30, 2008 -! -!---------------------------------------------------------------------- - SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP) -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_env_nocleanup_f -!DEC$endif - IMPLICIT NONE - LOGICAL, INTENT(OUT) :: HDF5_NOCLEANUP ! Return code - INTEGER :: status - - INTERFACE - SUBROUTINE h5_env_nocleanup_c(status) - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5_ENV_NOCLEANUP_C':: h5_env_nocleanup_c - !DEC$ ENDIF - INTEGER :: status - END SUBROUTINE h5_env_nocleanup_c - END INTERFACE - - CALL h5_env_nocleanup_c(status) - - HDF5_NOCLEANUP = .FALSE. - IF(status.EQ.1) HDF5_NOCLEANUP = .TRUE. - - END SUBROUTINE h5_env_nocleanup_f -END MODULE TH5_MISC diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90 deleted file mode 100644 index b3f1399..0000000 --- a/fortran/test/tf_F03.f90 +++ /dev/null @@ -1,128 +0,0 @@ -!****h* root/fortran/test/tf_F03.f90 -! -! NAME -! tf_F03.f90 -! -! FUNCTION -! Contains functions that are part of the F2003 standard, and are not F2008 compliant. -! Needed by the hdf5 fortran tests. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! H5_SIZEOF -! -! NOTES -! The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function: -! -! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a -! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data. -! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows -! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger -! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and -! the variables receiving the result must be declared INTEGER*8." -! -! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or -! characters that do not have a set length (as used in tH5P_F03.f90), sigh... -! -!***** -MODULE TH5_MISC_PROVISIONAL - - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - - ! generic compound datatype - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z - END TYPE comp_datatype - - PUBLIC :: H5_SIZEOF - INTERFACE H5_SIZEOF - MODULE PROCEDURE H5_SIZEOF_CMPD - MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_CHR - MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP - END INTERFACE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_cmpd - !DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) - IMPLICIT NONE - TYPE(comp_datatype), INTENT(in) :: a - - H5_SIZEOF_CMPD = SIZEOF(a) - - END FUNCTION H5_SIZEOF_CMPD - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_chr -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) - IMPLICIT NONE - CHARACTER(LEN=1), INTENT(in):: a - - H5_SIZEOF_CHR = SIZEOF(a) - - END FUNCTION H5_SIZEOF_CHR - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_i -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) - IMPLICIT NONE - INTEGER, INTENT(in):: a - - H5_SIZEOF_I = SIZEOF(a) - - END FUNCTION H5_SIZEOF_I - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_sp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) - IMPLICIT NONE - REAL(sp), INTENT(in):: a - - H5_SIZEOF_SP = SIZEOF(a) - - END FUNCTION H5_SIZEOF_SP - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_dp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) - IMPLICIT NONE - REAL(dp), INTENT(in):: a - - H5_SIZEOF_DP = SIZEOF(a) - - END FUNCTION H5_SIZEOF_DP - -END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90 deleted file mode 100644 index 20c2859..0000000 --- a/fortran/test/tf_F08.f90 +++ /dev/null @@ -1,128 +0,0 @@ -!****h* root/fortran/test/tf_F08.f90 -! -! NAME -! tf_F08.f90 -! -! FUNCTION -! Contains functions that are part of the F2008 standard and needed by -! the hdf5 fortran tests. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! CONTAINS SUBROUTINES -! H5_SIZEOF -! -! NOTES -! This file contains "sizeof" functions that are F2008 standard compliant -! and replace the non-standard 'SIZEOF' functions found in the file tf_F03. -! Unfortunity we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different -! data types from the various tests. -! -! F08+TS29113 requires C interoperable variable as argument for C_SIZEOF. -! -! This file will be build instead of tf_F03.f90 if the intrinsic fortran -! function C_SIZEOF/STORAGE_SIZE is found during configure. -! -!***** -MODULE TH5_MISC_PROVISIONAL - - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - - ! generic compound datatype - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z - END TYPE comp_datatype - - PUBLIC :: H5_SIZEOF - INTERFACE H5_SIZEOF - MODULE PROCEDURE H5_SIZEOF_CMPD - MODULE PROCEDURE H5_SIZEOF_CHR - MODULE PROCEDURE H5_SIZEOF_I - MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP - END INTERFACE - -CONTAINS - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_cmpd -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a) - IMPLICIT NONE - TYPE(comp_datatype), INTENT(in) :: a - - H5_SIZEOF_CMPD = C_SIZEOF(a) - - END FUNCTION H5_SIZEOF_CMPD - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_chr -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: a - - H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_CHR - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_i -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a) - IMPLICIT NONE - INTEGER, INTENT(in):: a - - H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_I - - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_sp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a) - IMPLICIT NONE - REAL(sp), INTENT(in):: a - - H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_SP - -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_TEST_DLL) -!DEC$attributes dllexport :: h5_sizeof_dp -!DEC$endif - INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a) - IMPLICIT NONE - REAL(dp), INTENT(in):: a - - H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t) - - END FUNCTION H5_SIZEOF_DP - -END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90 deleted file mode 100644 index 11a047c..0000000 --- a/fortran/test/tf_F90.f90 +++ /dev/null @@ -1,33 +0,0 @@ -!****h* root/fortran/test/tf_F90.f90 -! -! NAME -! tf_F90.f90 -! -! FUNCTION -! Module for when the compiler is not F2003 or F2008 compliant. -! Needed by tf.f90 for the test programs. -! -! 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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** -MODULE TH5_MISC_PROVISIONAL - IMPLICIT NONE - - INTEGER, PARAMETER :: sp = KIND(0.0) - INTEGER, PARAMETER :: dp = KIND(0.D0) - -END MODULE TH5_MISC_PROVISIONAL diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index f16dfff..073194a 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -114,7 +114,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = parallel_test$(EXEEXT) @@ -140,7 +141,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) @@ -448,14 +449,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -465,13 +473,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -513,6 +520,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 60c9453..b5fbb46 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -452,14 +453,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -469,13 +477,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -517,6 +524,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 278f97b..831dadc 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -448,14 +449,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -465,13 +473,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -513,6 +520,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 5bad31f..67a14ca 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlc++-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -395,14 +396,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -412,13 +420,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -460,6 +467,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 742b35c..043a25a 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -165,7 +166,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -451,14 +452,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -468,13 +476,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -516,6 +523,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index b7d7d09..4f88242 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -107,7 +107,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = ptableTest$(EXEEXT) @@ -132,7 +133,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -448,14 +449,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -465,13 +473,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -513,6 +520,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index f0bf099..ccf2308 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlc-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -395,14 +396,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -412,13 +420,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -460,6 +467,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 4651579..6d87e82 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -452,14 +453,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -469,13 +477,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -517,6 +524,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index e229f12..71e70dd 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = run-hlfortran-ex.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -395,14 +396,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -412,13 +420,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -460,6 +467,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 2af665c..9d110a8 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -2,6 +2,41 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- +# configure def file for shared libs on windows +if (WIN32) + if (BUILD_SHARED_LIBS) + if (MSVC) + configure_file (${HDF5_HL_F90_SRC_SOURCE_DIR}/hdf5_hl_fortrandll.def.in ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def @ONLY) + endif (MSVC) + endif (BUILD_SHARED_LIBS) +endif (WIN32) + +#----------------------------------------------------------------------------- +# Generate the H5LT and H5TB REAL APIs +#----------------------------------------------------------------------------- + +add_executable (H5HL_buildiface + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 + ) + +if (WIN32 AND MSVC) + if (BUILD_SHARED_LIBS) + set_target_properties (H5HL_buildiface + PROPERTIES + COMPILE_FLAGS "/MT" + ) + endif (BUILD_SHARED_LIBS) + set_target_properties (H5HL_buildiface + PROPERTIES + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) +endif (WIN32 AND MSVC) +set_target_properties (H5HL_buildiface PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) + +#----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES ( @@ -56,14 +91,37 @@ endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- +set (HDF5_HL_F90_F_BASE_SRCS + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 +) set (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90 + ${HDF5_HL_F90_F_BASE_SRCS} + + # generated files + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 ) + set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties ( + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + PROPERTIES GENERATED TRUE +) + +set (CMD $) +add_custom_target (H5HLgen ALL + COMMAND ${CMD} +#v3.2 BYPRODUCT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 +#v3.2 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} + DEPENDS ${HDF5_HL_F90_F_BASE_SRCS} +) + add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS}) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -86,7 +144,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS}) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) - set (SHARED_LINK_FLAGS "/DLL") + set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif (WIN32 AND MSVC) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -128,7 +186,9 @@ endif (BUILD_SHARED_LIBS) set (mod_files ${MOD_BUILD_DIR}/h5ds.mod ${MOD_BUILD_DIR}/h5tb.mod + ${MOD_BUILD_DIR}/h5tb_const.mod ${MOD_BUILD_DIR}/h5lt.mod + ${MOD_BUILD_DIR}/h5lt_const.mod ${MOD_BUILD_DIR}/h5im.mod ) @@ -149,7 +209,7 @@ if (HDF5_EXPORTED_TARGETS) INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries) endif (BUILD_SHARED_LIBS) - + install ( TARGETS ${install_targets} diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index 1de3fff..af054e0 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -35,7 +35,7 @@ *------------------------------------------------------------------------- */ int_f -nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) +h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) { char *c_dimname = NULL; int_f ret_value = 0; @@ -61,7 +61,7 @@ nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) return ret_value; -} /* end nh5dsset_scale_c() */ +} /* end h5dsset_scale_c() */ /*------------------------------------------------------------------------- @@ -80,7 +80,7 @@ nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen) *------------------------------------------------------------------------- */ int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -94,7 +94,7 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end nh5dsattach_scale_c() */ +} /* end h5dsattach_scale_c() */ /*------------------------------------------------------------------------- @@ -113,7 +113,7 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) +h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) { int_f ret_value = 0; @@ -127,7 +127,7 @@ nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) done: return ret_value; -} /* end nh5dsdetach_scale_c() */ +} /* end h5dsdetach_scale_c() */ /*------------------------------------------------------------------------- @@ -146,7 +146,7 @@ nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx) *------------------------------------------------------------------------- */ int_f -nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) +h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) { int_f ret_value = 0; htri_t c_is_attached; @@ -163,7 +163,7 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) done: return ret_value; -} /* end nh5dsis_attached_c() */ +} /* end h5dsis_attached_c() */ /*------------------------------------------------------------------------- * Function: H5DSis_scale_c @@ -181,7 +181,7 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached) *------------------------------------------------------------------------- */ int_f -nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) +h5dsis_scale_c( hid_t_f *did, int_f *is_scale) { int_f ret_value = 0; htri_t c_is_scale; @@ -198,7 +198,7 @@ nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) done: return ret_value; -} /* end nh5dsis_scale_c() */ +} /* end h5dsis_scale_c() */ /*------------------------------------------------------------------------- @@ -217,7 +217,7 @@ nh5dsis_scale_c( hid_t_f *did, int_f *is_scale) *------------------------------------------------------------------------- */ int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) +h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) { char *c_label = NULL; int_f ret_value = 0; @@ -242,7 +242,7 @@ nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) return ret_value; -} /* end nh5dsset_label_c() */ +} /* end h5dsset_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_label_c @@ -260,7 +260,7 @@ nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen) *------------------------------------------------------------------------- */ int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) +h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) { char *c_label = NULL; ssize_t size_c = -1; @@ -291,7 +291,7 @@ done: if(c_label) HDfree(c_label); return ret_value; -} /* end nh5dsget_label_c() */ +} /* end h5dsget_label_c() */ /*------------------------------------------------------------------------- * Function: h5dsget_scale_name_c @@ -309,7 +309,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) +h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) { char *c_scale_name = NULL; ssize_t size_c = -1; @@ -338,7 +338,7 @@ done: if(c_scale_name) HDfree(c_scale_name); return ret_value; -} /* end nh5dsget_scale_name_c() */ +} /* end h5dsget_scale_name_c() */ /*------------------------------------------------------------------------- * Function: H5DSget_num_scales_c @@ -356,7 +356,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) +h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) { int_f ret_value = 0; @@ -370,4 +370,4 @@ nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales) done: return ret_value; -} /* end nh5dsget_num_scales_c() */ +} /* end h5dsget_num_scales_c() */ diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90 new file mode 100644 index 0000000..00cf4d8 --- /dev/null +++ b/hl/fortran/src/H5DSff.F90 @@ -0,0 +1,518 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN90 interfaces for H5DS functions +! + +MODULE h5ds + + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_CHAR + USE h5fortran_types + USE hdf5 + +CONTAINS + +!------------------------------------------------------------------------- +! Function: H5DSset_scale_f +! +! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_scale_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) + + INTERFACE + INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len) & + BIND(C,NAME='h5dsset_scale_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname ! The dimension name + INTEGER(SIZE_T), INTENT(in) :: dimname_len + END FUNCTION H5DSset_scale_c + END INTERFACE + + IF(PRESENT(dimname))THEN + dimname_len = LEN(dimname) + errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) + ELSE + errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) + ENDIF + + END SUBROUTINE H5DSset_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSattach_scale_f +! +! Purpose: Attach dimension scale dsid to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsattach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx) & + BIND(C,NAME='h5dsattach_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + END FUNCTION H5DSattach_scale_c + END INTERFACE + + c_idx = idx -1 ! account for C-dimensions starting at 0 + + errcode = H5DSattach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSattach_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSdetach_scale_f +! +! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsdetach_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx) & + BIND(C,NAME='h5dsdetach_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + END FUNCTION H5DSdetach_scale_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSdetach_scale_c( did, dsid, c_idx) + + END SUBROUTINE H5DSdetach_scale_f + + +!------------------------------------------------------------------------- +! Function: H5DSis_attached_f +! +! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 17, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_attached_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached + INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with + LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to + ! dimension idx of dataset did + INTEGER :: errcode ! error code + INTEGER :: c_is_attached + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached) & + BIND(C,NAME='h5dsis_attached_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached + INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to + END FUNCTION H5DSis_attached_c + END INTERFACE + + c_idx = idx - 1 ! account for C-dimensions starting at 0 + + errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) + + is_attached = .FALSE. ! default + IF(c_is_attached.GT.0)THEN + is_attached = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_attached_f + +! +! H5DSiterate_scales: Impliment in F2003 +! + +!------------------------------------------------------------------------- +! Function: H5DSis_scale_f +! +! Purpose: Determines whether dset is a Dimension Scale. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsis_scale_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the data set to query + LOGICAL , INTENT(out) :: is_scale ! logical: + ! .TRUE. if did is a Dimension Scale + INTEGER :: errcode ! error code + INTEGER :: c_is_scale + + INTERFACE + INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) & + BIND(C,NAME='h5dsis_scale_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did + INTEGER, INTENT(out) :: c_is_scale + END FUNCTION H5DSis_scale_c + END INTERFACE + + errcode = H5DSis_scale_c(did, c_is_scale) + + is_scale = .FALSE. ! default + IF(c_is_scale.GT.0)THEN + is_scale = .TRUE. + ELSE IF(errcode.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE H5DSis_scale_f + +!------------------------------------------------------------------------- +! Function: H5DSset_label_f +! +! Purpose: Set label for the dimension idx of did to the value label +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSset_label_f( did, idx, label, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsset_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER :: errcode ! Error code + + INTEGER(SIZE_T) :: label_len ! Length of label + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) & + BIND(C,NAME='h5dsset_label_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataset + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label + END FUNCTION H5DSset_label_c + END INTERFACE + + c_idx = idx - 1 + + label_len = LEN(label) + errcode = H5DSset_label_c(did, c_idx, label, label_len) + + END SUBROUTINE H5DSset_label_f + +!------------------------------------------------------------------------- +! Function: H5DSget_label_f +! +! Purpose: Read the label for dimension idx of did into buffer label. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_label_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer + INTEGER :: errcode ! Error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) & + BIND(C,NAME='h5dsget_label_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataget + INTEGER , INTENT(in) :: idx ! The dimension + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label + END FUNCTION H5DSget_label_c + END INTERFACE + + c_idx = idx - 1 + + errcode = H5DSget_label_c(did, c_idx, label, size) + + END SUBROUTINE H5DSget_label_f + + +!------------------------------------------------------------------------- +! Function: H5DSget_scale_name_f +! +! Purpose: Read the name of scale did into buffer name. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_scale_name_f +!DEC$endif +! + + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(LEN=*), INTENT(out) :: name ! The name + INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer + INTEGER :: errcode ! Error code + + INTERFACE + INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) & + bind(c,name='h5dsget_scale_name_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! The dataget + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(out) :: name ! The name + INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name + END FUNCTION H5DSget_scale_name_c + END INTERFACE + + errcode = H5DSget_scale_name_c(did, name, size) + + END SUBROUTINE H5DSget_scale_name_f + +!------------------------------------------------------------------------- +! Function: H5DSget_num_scales_f +! +! Purpose: Determines how many Dimension Scales are attached to dimension idx of did +! +! Return: Success: 0, Failure: -1 +! +! Programmer: M. Scot Breitenfeld +! +! Date: April 18, 2011 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) + + IMPLICIT NONE + +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_HL_DLL) +!DEC$attributes dllexport :: h5dsget_num_scales_f +!DEC$endif +! + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + INTEGER :: errcode ! error code + INTEGER :: c_idx + + INTERFACE + INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) & + BIND(C,NAME='h5dsget_num_scales_c') + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: did ! the dataset + INTEGER , INTENT(in) :: idx ! the dimension of did to query + INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did + END FUNCTION H5DSget_num_scales_c + END INTERFACE + + c_idx = idx - 1 + errcode = H5DSget_num_scales_c(did, c_idx, num_scales) + + END SUBROUTINE H5DSget_num_scales_f + +END MODULE h5ds + + + + + + diff --git a/hl/fortran/src/H5DSff.f90 b/hl/fortran/src/H5DSff.f90 deleted file mode 100644 index 04540a6..0000000 --- a/hl/fortran/src/H5DSff.f90 +++ /dev/null @@ -1,545 +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 file contains FORTRAN90 interfaces for H5DS functions -! - -MODULE h5ds - - USE h5fortran_types - USE hdf5 - -CONTAINS - - -!------------------------------------------------------------------------- -! Function: H5DSset_scale_f -! -! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_scale_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) - - INTERFACE - INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_SCALE_C'::h5dsset_scale_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dimname - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in) :: dimname ! The dimension name - INTEGER(SIZE_T), INTENT(in) :: dimname_len - END FUNCTION H5DSset_scale_c - END INTERFACE - - IF(PRESENT(dimname))THEN - dimname_len = LEN(dimname) - errcode = H5DSset_scale_c(dsid, dimname, dimname_len ) - ELSE - errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) ) - ENDIF - - END SUBROUTINE H5DSset_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSattach_scale_f -! -! Purpose: Attach dimension scale dsid to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsattach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSattach_scale_c(did, dsid, idx ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSATTACH_SCALE_C':: h5dsattach_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - END FUNCTION H5DSattach_scale_c - END INTERFACE - - c_idx = idx -1 ! account for C-dimensions starting at 0 - - errcode = H5DSattach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSattach_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSdetach_scale_f -! -! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsdetach_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSdetach_scale_c(did, dsid, idx ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSDETACH_SCALE_C':: h5dsdetach_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - END FUNCTION H5DSdetach_scale_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSdetach_scale_c( did, dsid, c_idx) - - END SUBROUTINE H5DSdetach_scale_f - - -!------------------------------------------------------------------------- -! Function: H5DSis_attached_f -! -! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_attached_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with - LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to - ! dimension idx of dataset did - INTEGER :: errcode ! error code - INTEGER :: c_is_attached - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSis_attached_c(did, dsid, idx, c_is_attached ) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_ATTACHED_C':: h5dsis_attached_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to - END FUNCTION H5DSis_attached_c - END INTERFACE - - c_idx = idx - 1 ! account for C-dimensions starting at 0 - - errcode = H5DSis_attached_c(did, dsid, c_idx, c_is_attached) - - is_attached = .FALSE. ! default - IF(c_is_attached.GT.0)THEN - is_attached = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_attached_f - -! -! H5DSiterate_scales: Impliment in F2003 -! - -!------------------------------------------------------------------------- -! Function: H5DSis_scale_f -! -! Purpose: Determines whether dset is a Dimension Scale. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsis_scale_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - LOGICAL , INTENT(out) :: is_scale ! logical: - ! .TRUE. if did is a Dimension Scale - INTEGER :: errcode ! error code - INTEGER :: c_is_scale - - INTERFACE - INTEGER FUNCTION H5DSis_scale_c(did,c_is_scale) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSIS_SCALE_C':: h5dsis_scale_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - INTEGER, INTENT(out) :: c_is_scale - END FUNCTION H5DSis_scale_c - END INTERFACE - - errcode = H5DSis_scale_c(did, c_is_scale) - - is_scale = .FALSE. ! default - IF(c_is_scale.GT.0)THEN - is_scale = .TRUE. - ELSE IF(errcode.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE H5DSis_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSset_label_f -! -! Purpose: Set label for the dimension idx of did to the value label -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSset_label_f( did, idx, label, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsset_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER :: errcode ! Error code - - INTEGER(SIZE_T) :: label_len ! Length of label - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSset_label_c(did, idx, label, label_len) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSSET_LABEL_C'::h5dsset_label_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: label - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label - END FUNCTION H5DSset_label_c - END INTERFACE - - c_idx = idx - 1 - - label_len = LEN(label) - errcode = H5DSset_label_c(did, c_idx, label, label_len) - - END SUBROUTINE H5DSset_label_f - -!------------------------------------------------------------------------- -! Function: H5DSget_label_f -! -! Purpose: Read the label for dimension idx of did into buffer label. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_label_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer - INTEGER :: errcode ! Error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_label_c(did, idx, label, size) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_LABEL_C'::h5dsget_label_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: label - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label - END FUNCTION H5DSget_label_c - END INTERFACE - - c_idx = idx - 1 - - errcode = H5DSget_label_c(did, c_idx, label, size) - - END SUBROUTINE H5DSget_label_f - - -!------------------------------------------------------------------------- -! Function: H5DSget_scale_name_f -! -! Purpose: Read the name of scale did into buffer name. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_scale_name_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(out) :: name ! The name - INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer - INTEGER :: errcode ! Error code - - INTERFACE - INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_SCALE_NAME_C'::h5dsget_scale_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(out) :: name ! The name - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name - END FUNCTION H5DSget_scale_name_c - END INTERFACE - - errcode = H5DSget_scale_name_c(did, name, size) - - END SUBROUTINE H5DSget_scale_name_f - -!------------------------------------------------------------------------- -! Function: H5DSget_num_scales_f -! -! Purpose: Determines how many Dimension Scales are attached to dimension idx of did -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5dsget_num_scales_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - INTEGER :: errcode ! error code - INTEGER :: c_idx - - INTERFACE - INTEGER FUNCTION H5DSget_num_scales_c(did, idx, num_scales) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSGET_NUM_SCALES_C':: h5dsget_num_scales_c - !DEC$ENDIF - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did - END FUNCTION H5DSget_num_scales_c - END INTERFACE - - c_idx = idx - 1 - errcode = H5DSget_num_scales_c(did, c_idx, num_scales) - - END SUBROUTINE H5DSget_num_scales_f - -END MODULE h5ds - - - - - - diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 new file mode 100644 index 0000000..0e85e27 --- /dev/null +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -0,0 +1,683 @@ +!****p* Program/H5HL_buildiface +! +! NAME +! Executable: H5HL_buildiface +! +! FILE +! fortran/src/H5HL_buildiface.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5HL_gen.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of +! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard +! compliant and should always be chosen over SIZEOF. +! +! The availability of STORAGE_SIZE/SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE" or +! "FORTRAN_HAVE_SIZEOF". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +#include + +PROGRAM H5HL_buildiface + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + +! These values are valid REAL KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_RKIND + H5_H5CONFIG_F_RKIND +! These values are valid INTEGER KINDs (with corresponding C float) found during configure + H5_H5CONFIG_F_NUM_IKIND + H5_H5CONFIG_F_IKIND + + INTEGER :: i, j, k + INTEGER :: ji, jr, jd +#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE + REAL(KIND=C_LONG_DOUBLE) :: c_longdble +#endif + REAL(KIND=C_DOUBLE) :: c_dble + REAL(KIND=C_FLOAT) :: c_flt + INTEGER :: sizeof_var + CHARACTER(LEN=2) :: chr2 +! subroutine rank of array being passed in + CHARACTER(LEN=2), DIMENSION(1:8), PARAMETER :: chr_rank=(/"_0","_1","_2","_3","_4","_5","_6","_7"/) +! rank definitions + CHARACTER(LEN=70), DIMENSION(1:8), PARAMETER :: rank_dim_line=(/ & + ' ', & + ', DIMENSION(dims(1)) ', & + ', DIMENSION(dims(1),dims(2)) ', & + ', DIMENSION(dims(1),dims(2),dims(3)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) ', & + ', DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7))' & + /) +! pointer to the buffer + CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & + ' f_ptr = C_LOC(buf) ', & + ' f_ptr = C_LOC(buf(1)) ', & + ' f_ptr = C_LOC(buf(1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & + /) + +! Generate Fortran H5LT* interfaces having multiple KIND interfaces. +! +! Developer's notes: +! +! Only interfaces with arrays of rank 7 and less are provided. Even-though the F2008 +! standard extended the maximum rank to 15, it was decided that they should use the +! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility +! with the Fortran 90/95 APIs codes which could never handle rank 8-15 array sizes. + + OPEN(11,FILE='H5LTff_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5LTff_gen.F90',& +'!',& +'! NAME',& +'! H5LTff_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& +'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& +'! are H5LT and H5TB APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5HL_buildiface.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE H5LT" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE h5fortran_types' + WRITE(11,'(A)') ' USE H5LT_CONST' + WRITE(11,'(A)') ' IMPLICIT NONE' +!*************** +! H5LT INTERFACES +!*************** +! +! H5LTmake_dataset_f +! + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltmake_dataset_float_f + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_float_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltmake_dataset_double_f + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_double_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_float_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_float_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_float_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_double_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_double_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_double_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + +!********************** +! H5LT APIs +!********************** +! +! h5ltmake_dataset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,type_id,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,type_id,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_real_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltmake_dataset_float_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_float_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_float_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltmake_dataset_double_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_double_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + + WRITE(11,'(A)') 'END MODULE H5LT' ! change this to be generic MSB + + CLOSE(11) + +! Generate Fortran H5TB* interfaces having multiple KIND interfaces. + + + OPEN(11,FILE='H5TBff_gen.F90') + WRITE(11,'(40(A,/))') & +'!****h* ROBODoc/H5TBff_gen.F90',& +'!',& +'! NAME',& +'! H5TBff_gen',& +'! ',& +'! PURPOSE',& +'! This module is generated at build by H5HL_buildiface.F90 to handle all the',& +'! detected REAL/INTEGER KINDs for APIs being passed those KINDs. Currently these ',& +'! are H5LT and H5TB APIs',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! 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. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5HL_buildiface.F90',& +'!',& +'!*****' + + WRITE(11,'(a)') "MODULE H5TB" + + WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' + WRITE(11,'(A)') ' USE h5fortran_types' + WRITE(11,'(A)') ' USE H5TB_CONST' + WRITE(11,'(A)') ' IMPLICIT NONE' + +!*************** +! H5TB INTERFACES +!*************** + +! h5tbwrite_field_name_f + WRITE(11,'(A)') " INTERFACE h5tbwrite_field_name_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k =2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbread_field_name_f + WRITE(11,'(A)') " INTERFACE h5tbread_field_name_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_name_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbwrite_field_index_f + WRITE(11,'(A)') " INTERFACE h5tbwrite_field_index_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbwrite_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbread_field_index_f + WRITE(11,'(A)') " INTERFACE h5tbread_field_index_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbread_field_index_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5tbinsert_field_f + WRITE(11,'(A)') " INTERFACE h5tbinsert_field_f" + DO i = 1, num_rkinds + j = rkind(i) + WRITE(chr2,'(I2)') j + k = 2 + WRITE(11,'(A)') " MODULE PROCEDURE h5tbinsert_field_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + END DO + WRITE(11,'(A)') " END INTERFACE" + + WRITE(11,'(A)') 'CONTAINS' + + !********************** + ! H5TB APIs + !********************** + + ! h5tbwrite_field_name_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbread_field_name_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_name_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbwrite_field_index_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') & + ' errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbwrite_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbread_field_index_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_index,start, nrecords,type_size,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start' + WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords' + WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') & + ' errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,start,nrecords,type_size,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbread_field_index_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + ! h5tbinsert_field_f + DO i = 1, num_rkinds + k = rkind(i) + WRITE(chr2,'(I2)') k + j = 2 +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,field_name,field_type,field_index,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: dset_name' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: field_type' + WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(in), DIMENSION(*), TARGET :: buf' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1' + WRITE(11,'(A)') ' INTEGER :: errcode' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' namelen1 = LEN(field_name)' + WRITE(11,'(A)') & + ' errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,field_type,field_index,f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5tbinsert_field_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + + WRITE(11,'(A)') 'END MODULE H5TB' + + CLOSE(11) + +END PROGRAM H5HL_buildiface + + + diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c index 6acd410..7ad50d6 100644 --- a/hl/fortran/src/H5IMfc.c +++ b/hl/fortran/src/H5IMfc.c @@ -39,7 +39,7 @@ */ int_f -nh5immake_image_8bit_c (hid_t_f *loc_id, +h5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -100,7 +100,7 @@ done: */ int_f -nh5imread_image_c (hid_t_f *loc_id, +h5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf) @@ -153,7 +153,7 @@ done: */ int_f -nh5immake_image_24bit_c (hid_t_f *loc_id, +h5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -222,7 +222,7 @@ done: */ int_f -nh5imget_image_info_c(hid_t_f *loc_id, +h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -307,7 +307,7 @@ done: */ int_f -nh5imis_image_c(hid_t_f *loc_id, +h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -356,7 +356,7 @@ nh5imis_image_c(hid_t_f *loc_id, */ int_f -nh5immake_palette_c (hid_t_f *loc_id, +h5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -411,7 +411,7 @@ done: */ int_f -nh5imlink_palette_c (hid_t_f *loc_id, +h5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -476,7 +476,7 @@ done: */ int_f -nh5imunlink_palette_c (hid_t_f *loc_id, +h5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -542,7 +542,7 @@ done: */ int_f -nh5imget_npalettes_c(hid_t_f *loc_id, +h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals) @@ -604,7 +604,7 @@ done: int_f -nh5imget_palette_info_c(hid_t_f *loc_id, +h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -671,7 +671,7 @@ done: int_f -nh5imget_palette_c(hid_t_f *loc_id, +h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -729,7 +729,7 @@ done: */ int_f -nh5imis_palette_c(hid_t_f *loc_id, +h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 new file mode 100644 index 0000000..4408dda --- /dev/null +++ b/hl/fortran/src/H5IMff.F90 @@ -0,0 +1,667 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN interfaces for H5IM functions +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. +! + +MODULE h5im + USE, INTRINSIC :: ISO_C_BINDING + USE h5fortran_types + USE hdf5 +CONTAINS + +!------------------------------------------------------------------------- +! Function: h5immake_image_8bit_f +! +! Purpose: Creates and writes an image an 8 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_image_8bit_f(loc_id,& + dset_name,& + width,& + height,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) & + BIND(C,NAME='h5immake_image_8bit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + INTEGER , INTENT(in), DIMENSION(*) :: buf ! buffer + END FUNCTION h5immake_image_8bit_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) + + END SUBROUTINE h5immake_image_8bit_f + +!------------------------------------------------------------------------- +! Function: h5imread_image_f +! +! Purpose: Reads image data from disk. +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + SUBROUTINE h5imread_image_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imread_image_c(loc_id,namelen,dset_name,buf) & + BIND(C,NAME='h5imread_image_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + END FUNCTION h5imread_image_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) + + END SUBROUTINE h5imread_image_f + +!------------------------------------------------------------------------- +! Function: h5immake_image_24bit_f +! +! Purpose: Creates and writes an image a 24 bit image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_image_24bit_f(loc_id,& + dset_name,& + width,& + height,& + il,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + CHARACTER(len=*), INTENT(in) :: il ! interlace + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) & + BIND(C,NAME='h5immake_image_24bit_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: width ! width of image + INTEGER(hsize_t), INTENT(in) :: height ! height of image + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il ! interlace + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: ILEN ! name length + + END FUNCTION h5immake_image_24bit_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(il) + errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) + + END SUBROUTINE h5immake_image_24bit_f + +!------------------------------------------------------------------------- +! Function: h5imget_image_info_f +! +! Purpose: Gets information about an image dataset (dimensions, interlace mode +! and number of associated palettes). +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_image_info_f(loc_id,& + dset_name,& + width,& + height,& + planes,& + interlace,& + npals,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: width ! width of image + INTEGER(hsize_t), INTENT(inout) :: height ! height of image + INTEGER(hsize_t), INTENT(inout) :: planes ! color planes + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + CHARACTER(len=*), INTENT(inout) :: interlace ! interlace + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) & + BIND(C,NAME='h5imget_image_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: width ! width of image + INTEGER(hsize_t), INTENT(inout) :: height ! height of image + INTEGER(hsize_t), INTENT(inout) :: planes ! color planes + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace ! interlace + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imget_image_info_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(interlace) + errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) + + END SUBROUTINE h5imget_image_info_f + +!------------------------------------------------------------------------- +! Function: h5imis_image_f +! +! Purpose: Inquires if a dataset is an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + INTEGER FUNCTION h5imis_image_f(loc_id,& + dset_name) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imis_image_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5imis_image_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5imis_image_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imis_image_c(loc_id,namelen,dset_name) + h5imis_image_f = errcode + + END FUNCTION h5imis_image_f + + +!------------------------------------------------------------------------- +! Function: h5immake_palette_f +! +! Purpose: Creates and writes a palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5immake_palette_f(loc_id,& + dset_name,& + pal_dims,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) & + BIND(C,NAME='h5immake_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions + INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + END FUNCTION h5immake_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) + + END SUBROUTINE h5immake_palette_f + +!------------------------------------------------------------------------- +! Function: h5imlink_palette_f +! +! Purpose: This function attaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: pal_name ! palette name + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + BIND(C,NAME='h5imlink_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imlink_palette_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(pal_name) + errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + + END SUBROUTINE h5imlink_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imunlink_palette_f +! +! Purpose: This function dettaches a palette to an existing image dataset +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imunlink_palette_f(loc_id,& + dset_name,& + pal_name,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(len=*), INTENT(in) :: pal_name ! palette name + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + + INTERFACE + INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + BIND(C,NAME='h5imunlink_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length + END FUNCTION h5imunlink_palette_c + END INTERFACE + + namelen = LEN(dset_name) + ILEN = LEN(pal_name) + errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + + END SUBROUTINE h5imunlink_palette_f + +!------------------------------------------------------------------------- +! Function: h5imget_npalettes_f +! +! Purpose: Gets the number of palettes associated to an image +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 05, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_npalettes_f(loc_id,& + dset_name,& + npals,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,dset_name,npals) & + BIND(C,NAME='h5imget_npalettes_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout) :: npals ! palettes + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5imget_npalettes_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) + + END SUBROUTINE h5imget_npalettes_f + + +!------------------------------------------------------------------------- +! Function: h5imget_palette_info_f +! +! Purpose: Get palette information +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_palette_info_f(loc_id,& + dset_name,& + pal_number,& + dims,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) & + BIND(C,NAME='h5imget_palette_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5imget_palette_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) + + END SUBROUTINE h5imget_palette_info_f + +!------------------------------------------------------------------------- +! Function: h5imget_palette_f +! +! Purpose: Reads palette +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5imget_palette_f(loc_id,& + dset_name,& + pal_number,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) & + BIND(C,NAME='h5imget_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: pal_number ! palette number + INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + END FUNCTION h5imget_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) + + END SUBROUTINE h5imget_palette_f + + +!------------------------------------------------------------------------- +! Function: h5imis_palette_f +! +! Purpose: Inquires if a dataset is a palette +! +! Return: true, false, fail +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + INTEGER FUNCTION h5imis_palette_f(loc_id,& + dset_name) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5imis_palette_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5imis_palette_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5imis_palette_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5imis_palette_c(loc_id,namelen,dset_name) + h5imis_palette_f = errcode + + END FUNCTION h5imis_palette_f + +END MODULE H5IM + + + + + diff --git a/hl/fortran/src/H5IMff.f90 b/hl/fortran/src/H5IMff.f90 deleted file mode 100644 index 50c6d8b..0000000 --- a/hl/fortran/src/H5IMff.f90 +++ /dev/null @@ -1,783 +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 file contains FORTRAN90 interfaces for H5IM functions -! - -module h5im -use h5fortran_types -use hdf5 -contains - - -!------------------------------------------------------------------------- -! Function: h5immake_image_8bit_f -! -! Purpose: Creates and writes an image an 8 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_image_8bit_f(loc_id,& - dset_name,& - width,& - height,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_8bit_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - interface - integer function h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_8BIT_C'::h5immake_image_8bit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - integer , intent(in), dimension(*) :: buf ! buffer - end function h5immake_image_8bit_c - end interface - - namelen = len(dset_name) - errcode = h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) - -end subroutine h5immake_image_8bit_f - - - -!------------------------------------------------------------------------- -! Function: h5imread_image_f -! -! Purpose: Reads image data from disk. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - -subroutine h5imread_image_f(loc_id,& - dset_name,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imread_image_f -!DEC$endif -! - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(inout), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - interface - integer function h5imread_image_c(loc_id,namelen,dset_name,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMREAD_IMAGE_C'::h5imread_image_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(inout), dimension(*) :: buf ! buffer - end function h5imread_image_c - end interface - - namelen = len(dset_name) - errcode = h5imread_image_c(loc_id,namelen,dset_name,buf) - -end subroutine h5imread_image_f - - -!------------------------------------------------------------------------- -! Function: h5immake_image_24bit_f -! -! Purpose: Creates and writes an image a 24 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_image_24bit_f(loc_id,& - dset_name,& - width,& - height,& - il,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_image_24bit_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - character(len=*), intent(in) :: il ! interlace - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_IMAGE_24BIT_C'::h5immake_image_24bit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: il - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in) :: width ! width of image - integer(hsize_t), intent(in) :: height ! height of image - character(len=*), intent(in) :: il ! interlace - integer, intent(in), dimension(*) :: buf ! buffer - integer(size_t) :: namelen ! length of name buffer - integer(size_t) :: ilen ! name length - - end function h5immake_image_24bit_c - end interface - - namelen = len(dset_name) - ilen = len(il) - errcode = h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf) - -end subroutine h5immake_image_24bit_f - - -!------------------------------------------------------------------------- -! Function: h5imget_image_info_f -! -! Purpose: Gets information about an image dataset (dimensions, interlace mode -! and number of associated palettes). -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_image_info_f(loc_id,& - dset_name,& - width,& - height,& - planes,& - interlace,& - npals,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_image_info_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: width ! width of image - integer(hsize_t), intent(inout) :: height ! height of image - integer(hsize_t), intent(inout) :: planes ! color planes - integer(hsize_t), intent(inout) :: npals ! palettes - character(len=*), intent(inout) :: interlace ! interlace - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_IMAGE_INFO_C'::h5imget_image_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: interlace - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: width ! width of image - integer(hsize_t), intent(inout) :: height ! height of image - integer(hsize_t), intent(inout) :: planes ! color planes - integer(hsize_t), intent(inout) :: npals ! palettes - character(len=*), intent(inout) :: interlace ! interlace - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imget_image_info_c - end interface - - namelen = len(dset_name) - ilen = len(interlace) - errcode = h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace) - -end subroutine h5imget_image_info_f - - -!------------------------------------------------------------------------- -! Function: h5imis_image_f -! -! Purpose: Inquires if a dataset is an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -integer function h5imis_image_f(loc_id,& - dset_name) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_image_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imis_image_c(loc_id,namelen,dset_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_IMAGE_C'::h5imis_image_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - end function h5imis_image_c - end interface - - namelen = len(dset_name) - errcode = h5imis_image_c(loc_id,namelen,dset_name) - h5imis_image_f = errcode - -end function h5imis_image_f - - -!------------------------------------------------------------------------- -! Function: h5immake_palette_f -! -! Purpose: Creates and writes a palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5immake_palette_f(loc_id,& - dset_name,& - pal_dims,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5immake_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions - integer, intent(in), dimension(*) :: buf ! buffer - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMMAKE_PALETTE_C'::h5immake_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions - integer, intent(in), dimension(*) :: buf ! buffer - end function h5immake_palette_c - end interface - - namelen = len(dset_name) - errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) - -end subroutine h5immake_palette_f - - - -!------------------------------------------------------------------------- -! Function: h5imlink_palette_f -! -! Purpose: This function attaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imlink_palette_f -!DEC$endif -! - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMLINK_PALETTE_C'::h5imlink_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: pal_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imlink_palette_c - end interface - - namelen = len(dset_name) - ilen = len(pal_name) - errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - -end subroutine h5imlink_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imunlink_palette_f -! -! Purpose: This function dettaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imunlink_palette_f(loc_id,& - dset_name,& - pal_name,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imunlink_palette_f -!DEC$endif -! - - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - - interface - integer function h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMUNLINK_PALETTE_C'::h5imunlink_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: pal_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - character(len=*), intent(in) :: pal_name ! palette name - integer(size_t) :: namelen ! name length - integer(size_t) :: ilen ! name length - end function h5imunlink_palette_c - end interface - - namelen = len(dset_name) - ilen = len(pal_name) - errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name) - -end subroutine h5imunlink_palette_f - - - -!------------------------------------------------------------------------- -! Function: h5imget_npalettes_f -! -! Purpose: Gets the number of palettes associated to an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_npalettes_f(loc_id,& - dset_name,& - npals,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_npalettes_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: npals ! palettes - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_npalettes_c(loc_id,namelen,dset_name,npals) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_NPALETTES_C'::h5imget_npalettes_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer(hsize_t), intent(inout) :: npals ! palettes - integer(size_t) :: namelen ! name length - end function h5imget_npalettes_c - end interface - - namelen = len(dset_name) - errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) - -end subroutine h5imget_npalettes_f - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_info_f -! -! Purpose: Get palette information -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -subroutine h5imget_palette_info_f(loc_id,& - dset_name,& - pal_number,& - dims,& - errcode ) - - implicit none - - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_info_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_INFO_C'::h5imget_palette_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions - integer(size_t) :: namelen ! name length - end function h5imget_palette_info_c - end interface - - namelen = len(dset_name) - errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) - -end subroutine h5imget_palette_info_f - - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_f -! -! Purpose: Reads palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - -subroutine h5imget_palette_f(loc_id,& - dset_name,& - pal_number,& - buf,& - errcode ) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imget_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer, intent(inout), dimension(*) :: buf ! buffer - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMGET_PALETTE_C'::h5imget_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - integer, intent(in) :: pal_number ! palette number - integer, intent(inout), dimension(*) :: buf ! buffer - end function h5imget_palette_c - end interface - - namelen = len(dset_name) - errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) - -end subroutine h5imget_palette_f - - -!------------------------------------------------------------------------- -! Function: h5imis_palette_f -! -! Purpose: Inquires if a dataset is a palette -! -! Return: true, false, fail -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -integer function h5imis_palette_f(loc_id,& - dset_name) - - implicit none - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5imis_palette_f -!DEC$endif -! - - integer(hid_t), intent(in) :: loc_id ! file or group identifier - character(len=*), intent(in) :: dset_name ! name of the dataset - integer :: errcode ! error code - integer(size_t) :: namelen ! name length - - interface - integer function h5imis_palette_c(loc_id,namelen,dset_name) - use h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IMIS_PALETTE_C'::h5imis_palette_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - integer(hid_t), intent(in) :: loc_id ! file or group identifier - integer(size_t) :: namelen ! length of name buffer - character(len=*), intent(in) :: dset_name ! name of the dataset - end function h5imis_palette_c - end interface - - namelen = len(dset_name) - errcode = h5imis_palette_c(loc_id,namelen,dset_name) - h5imis_palette_f = errcode - -end function h5imis_palette_f - - -! end -! -end module H5IM - - - - - diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 532d9d8..20d043e 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -30,1131 +30,110 @@ H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); /* * Functions from H5DSfc.c */ - -#define nh5dsset_scale_c H5_FC_FUNC_(h5dsset_scale_c, H5DSSET_SCALE_C) -#define nh5dsattach_scale_c H5_FC_FUNC_(h5dsattach_scale_c, H5DSATTACH_SCALE_C) -#define nh5dsdetach_scale_c H5_FC_FUNC_(h5dsdetach_scale_c, H5DSDETACH_SCALE_C) -#define nh5dsis_attached_c H5_FC_FUNC_(h5dsis_attached_c, H5DSIS_ATTACHED_C) -#define nh5dsis_scale_c H5_FC_FUNC_(h5dsis_scale_c, H5DSIS_SCALE_C) -#define nh5dsset_label_c H5_FC_FUNC_(h5dsset_label_c, H5DSSET_LABEL_C) -#define nh5dsget_label_c H5_FC_FUNC_(h5dsget_label_c, H5DSGET_LABEL_C) -#define nh5dsget_scale_name_c H5_FC_FUNC_(h5dsget_scale_name_c,H5DSGET_SCALE_NAME_C) -#define nh5dsget_num_scales_c H5_FC_FUNC_(h5dsget_num_scales_c,H5DSGET_NUM_SCALES_C) - - -/* - * Functions from H5LTfc.c - */ -#define nh5ltmake_dataset_c H5_FC_FUNC_(h5ltmake_dataset_c, H5LTMAKE_DATASET_C) -#define nh5ltmake_dataset_int1_c H5_FC_FUNC_(h5ltmake_dataset_int1_c, H5LTMAKE_DATASET_INT1_C) -#define nh5ltmake_dataset_int2_c H5_FC_FUNC_(h5ltmake_dataset_int2_c, H5LTMAKE_DATASET_INT2_C) -#define nh5ltmake_dataset_int3_c H5_FC_FUNC_(h5ltmake_dataset_int3_c, H5LTMAKE_DATASET_INT3_C) -#define nh5ltmake_dataset_int4_c H5_FC_FUNC_(h5ltmake_dataset_int4_c, H5LTMAKE_DATASET_INT4_C) -#define nh5ltmake_dataset_int5_c H5_FC_FUNC_(h5ltmake_dataset_int5_c, H5LTMAKE_DATASET_INT5_C) -#define nh5ltmake_dataset_int6_c H5_FC_FUNC_(h5ltmake_dataset_int6_c, H5LTMAKE_DATASET_INT6_C) -#define nh5ltmake_dataset_int7_c H5_FC_FUNC_(h5ltmake_dataset_int7_c, H5LTMAKE_DATASET_INT7_C) -#define nh5ltmake_dataset_fl1_c H5_FC_FUNC_(h5ltmake_dataset_fl1_c, H5LTMAKE_DATASET_FL1_C) -#define nh5ltmake_dataset_fl2_c H5_FC_FUNC_(h5ltmake_dataset_fl2_c, H5LTMAKE_DATASET_FL2_C) -#define nh5ltmake_dataset_fl3_c H5_FC_FUNC_(h5ltmake_dataset_fl3_c, H5LTMAKE_DATASET_FL3_C) -#define nh5ltmake_dataset_fl4_c H5_FC_FUNC_(h5ltmake_dataset_fl4_c, H5LTMAKE_DATASET_FL4_C) -#define nh5ltmake_dataset_fl5_c H5_FC_FUNC_(h5ltmake_dataset_fl5_c, H5LTMAKE_DATASET_FL5_C) -#define nh5ltmake_dataset_fl6_c H5_FC_FUNC_(h5ltmake_dataset_fl6_c, H5LTMAKE_DATASET_FL6_C) -#define nh5ltmake_dataset_fl7_c H5_FC_FUNC_(h5ltmake_dataset_fl7_c, H5LTMAKE_DATASET_FL7_C) -#define nh5ltmake_dataset_dl1_c H5_FC_FUNC_(h5ltmake_dataset_dl1_c, H5LTMAKE_DATASET_DL1_C) -#define nh5ltmake_dataset_dl2_c H5_FC_FUNC_(h5ltmake_dataset_dl2_c, H5LTMAKE_DATASET_DL2_C) -#define nh5ltmake_dataset_dl3_c H5_FC_FUNC_(h5ltmake_dataset_dl3_c, H5LTMAKE_DATASET_DL3_C) -#define nh5ltmake_dataset_dl4_c H5_FC_FUNC_(h5ltmake_dataset_dl4_c, H5LTMAKE_DATASET_DL4_C) -#define nh5ltmake_dataset_dl5_c H5_FC_FUNC_(h5ltmake_dataset_dl5_c, H5LTMAKE_DATASET_DL5_C) -#define nh5ltmake_dataset_dl6_c H5_FC_FUNC_(h5ltmake_dataset_dl6_c, H5LTMAKE_DATASET_DL6_C) -#define nh5ltmake_dataset_dl7_c H5_FC_FUNC_(h5ltmake_dataset_dl7_c, H5LTMAKE_DATASET_DL7_C) -#define nh5ltmake_dataset_nint1_c H5_FC_FUNC_(h5ltmake_dataset_nint1_c, H5LTMAKE_DATASET_NINT1_C) -#define nh5ltmake_dataset_nint2_c H5_FC_FUNC_(h5ltmake_dataset_nint2_c, H5LTMAKE_DATASET_NINT2_C) -#define nh5ltmake_dataset_nint3_c H5_FC_FUNC_(h5ltmake_dataset_nint3_c, H5LTMAKE_DATASET_NINT3_C) -#define nh5ltmake_dataset_nint4_c H5_FC_FUNC_(h5ltmake_dataset_nint4_c, H5LTMAKE_DATASET_NINT4_C) -#define nh5ltmake_dataset_nint5_c H5_FC_FUNC_(h5ltmake_dataset_nint5_c, H5LTMAKE_DATASET_NINT5_C) -#define nh5ltmake_dataset_nint6_c H5_FC_FUNC_(h5ltmake_dataset_nint6_c, H5LTMAKE_DATASET_NINT6_C) -#define nh5ltmake_dataset_nint7_c H5_FC_FUNC_(h5ltmake_dataset_nint7_c, H5LTMAKE_DATASET_NINT7_C) -#define nh5ltmake_dataset_nfl1_c H5_FC_FUNC_(h5ltmake_dataset_nfl1_c, H5LTMAKE_DATASET_NFL1_C) -#define nh5ltmake_dataset_nfl2_c H5_FC_FUNC_(h5ltmake_dataset_nfl2_c, H5LTMAKE_DATASET_NFL2_C) -#define nh5ltmake_dataset_nfl3_c H5_FC_FUNC_(h5ltmake_dataset_nfl3_c, H5LTMAKE_DATASET_NFL3_C) -#define nh5ltmake_dataset_nfl4_c H5_FC_FUNC_(h5ltmake_dataset_nfl4_c, H5LTMAKE_DATASET_NFL4_C) -#define nh5ltmake_dataset_nfl5_c H5_FC_FUNC_(h5ltmake_dataset_nfl5_c, H5LTMAKE_DATASET_NFL5_C) -#define nh5ltmake_dataset_nfl6_c H5_FC_FUNC_(h5ltmake_dataset_nfl6_c, H5LTMAKE_DATASET_NFL6_C) -#define nh5ltmake_dataset_nfl7_c H5_FC_FUNC_(h5ltmake_dataset_nfl7_c, H5LTMAKE_DATASET_NFL7_C) -#define nh5ltmake_dataset_ndl1_c H5_FC_FUNC_(h5ltmake_dataset_ndl1_c, H5LTMAKE_DATASET_NDL1_C) -#define nh5ltmake_dataset_ndl2_c H5_FC_FUNC_(h5ltmake_dataset_ndl2_c, H5LTMAKE_DATASET_NDL2_C) -#define nh5ltmake_dataset_ndl3_c H5_FC_FUNC_(h5ltmake_dataset_ndl3_c, H5LTMAKE_DATASET_NDL3_C) -#define nh5ltmake_dataset_ndl4_c H5_FC_FUNC_(h5ltmake_dataset_ndl4_c, H5LTMAKE_DATASET_NDL4_C) -#define nh5ltmake_dataset_ndl5_c H5_FC_FUNC_(h5ltmake_dataset_ndl5_c, H5LTMAKE_DATASET_NDL5_C) -#define nh5ltmake_dataset_ndl6_c H5_FC_FUNC_(h5ltmake_dataset_ndl6_c, H5LTMAKE_DATASET_NDL6_C) -#define nh5ltmake_dataset_ndl7_c H5_FC_FUNC_(h5ltmake_dataset_ndl7_c, H5LTMAKE_DATASET_NDL7_C) -#define nh5ltread_dataset_c H5_FC_FUNC_(h5ltread_dataset_c, H5LTREAD_DATASET_C) -#define nh5ltread_dataset_int1_c H5_FC_FUNC_(h5ltread_dataset_int1_c, H5LTREAD_DATASET_INT1_C) -#define nh5ltread_dataset_int2_c H5_FC_FUNC_(h5ltread_dataset_int2_c, H5LTREAD_DATASET_INT2_C) -#define nh5ltread_dataset_int3_c H5_FC_FUNC_(h5ltread_dataset_int3_c, H5LTREAD_DATASET_INT3_C) -#define nh5ltread_dataset_int4_c H5_FC_FUNC_(h5ltread_dataset_int4_c, H5LTREAD_DATASET_INT4_C) -#define nh5ltread_dataset_int5_c H5_FC_FUNC_(h5ltread_dataset_int5_c, H5LTREAD_DATASET_INT5_C) -#define nh5ltread_dataset_int6_c H5_FC_FUNC_(h5ltread_dataset_int6_c, H5LTREAD_DATASET_INT6_C) -#define nh5ltread_dataset_int7_c H5_FC_FUNC_(h5ltread_dataset_int7_c, H5LTREAD_DATASET_INT7_C) -#define nh5ltread_dataset_fl1_c H5_FC_FUNC_(h5ltread_dataset_fl1_c, H5LTREAD_DATASET_FL1_C) -#define nh5ltread_dataset_fl2_c H5_FC_FUNC_(h5ltread_dataset_fl2_c, H5LTREAD_DATASET_FL2_C) -#define nh5ltread_dataset_fl3_c H5_FC_FUNC_(h5ltread_dataset_fl3_c, H5LTREAD_DATASET_FL3_C) -#define nh5ltread_dataset_fl4_c H5_FC_FUNC_(h5ltread_dataset_fl4_c, H5LTREAD_DATASET_FL4_C) -#define nh5ltread_dataset_fl5_c H5_FC_FUNC_(h5ltread_dataset_fl5_c, H5LTREAD_DATASET_FL5_C) -#define nh5ltread_dataset_fl6_c H5_FC_FUNC_(h5ltread_dataset_fl6_c, H5LTREAD_DATASET_FL6_C) -#define nh5ltread_dataset_fl7_c H5_FC_FUNC_(h5ltread_dataset_fl7_c, H5LTREAD_DATASET_FL7_C) -#define nh5ltread_dataset_dl1_c H5_FC_FUNC_(h5ltread_dataset_dl1_c, H5LTREAD_DATASET_DL1_C) -#define nh5ltread_dataset_dl2_c H5_FC_FUNC_(h5ltread_dataset_dl2_c, H5LTREAD_DATASET_DL2_C) -#define nh5ltread_dataset_dl3_c H5_FC_FUNC_(h5ltread_dataset_dl3_c, H5LTREAD_DATASET_DL3_C) -#define nh5ltread_dataset_dl4_c H5_FC_FUNC_(h5ltread_dataset_dl4_c, H5LTREAD_DATASET_DL4_C) -#define nh5ltread_dataset_dl5_c H5_FC_FUNC_(h5ltread_dataset_dl5_c, H5LTREAD_DATASET_DL5_C) -#define nh5ltread_dataset_dl6_c H5_FC_FUNC_(h5ltread_dataset_dl6_c, H5LTREAD_DATASET_DL6_C) -#define nh5ltread_dataset_dl7_c H5_FC_FUNC_(h5ltread_dataset_dl7_c, H5LTREAD_DATASET_DL7_C) -#define nh5ltread_dataset_nint1_c H5_FC_FUNC_(h5ltread_dataset_nint1_c, H5LTREAD_DATASET_NINT1_C) -#define nh5ltread_dataset_nint2_c H5_FC_FUNC_(h5ltread_dataset_nint2_c, H5LTREAD_DATASET_NINT2_C) -#define nh5ltread_dataset_nint3_c H5_FC_FUNC_(h5ltread_dataset_nint3_c, H5LTREAD_DATASET_NINT3_C) -#define nh5ltread_dataset_nint4_c H5_FC_FUNC_(h5ltread_dataset_nint4_c, H5LTREAD_DATASET_NINT4_C) -#define nh5ltread_dataset_nint5_c H5_FC_FUNC_(h5ltread_dataset_nint5_c, H5LTREAD_DATASET_NINT5_C) -#define nh5ltread_dataset_nint6_c H5_FC_FUNC_(h5ltread_dataset_nint6_c, H5LTREAD_DATASET_NINT6_C) -#define nh5ltread_dataset_nint7_c H5_FC_FUNC_(h5ltread_dataset_nint7_c, H5LTREAD_DATASET_NINT7_C) -#define nh5ltread_dataset_nfl1_c H5_FC_FUNC_(h5ltread_dataset_nfl1_c, H5LTREAD_DATASET_NFL1_C) -#define nh5ltread_dataset_nfl2_c H5_FC_FUNC_(h5ltread_dataset_nfl2_c, H5LTREAD_DATASET_NFL2_C) -#define nh5ltread_dataset_nfl3_c H5_FC_FUNC_(h5ltread_dataset_nfl3_c, H5LTREAD_DATASET_NFL3_C) -#define nh5ltread_dataset_nfl4_c H5_FC_FUNC_(h5ltread_dataset_nfl4_c, H5LTREAD_DATASET_NFL4_C) -#define nh5ltread_dataset_nfl5_c H5_FC_FUNC_(h5ltread_dataset_nfl5_c, H5LTREAD_DATASET_NFL5_C) -#define nh5ltread_dataset_nfl6_c H5_FC_FUNC_(h5ltread_dataset_nfl6_c, H5LTREAD_DATASET_NFL6_C) -#define nh5ltread_dataset_nfl7_c H5_FC_FUNC_(h5ltread_dataset_nfl7_c, H5LTREAD_DATASET_NFL7_C) -#define nh5ltread_dataset_ndl1_c H5_FC_FUNC_(h5ltread_dataset_ndl1_c, H5LTREAD_DATASET_NDL1_C) -#define nh5ltread_dataset_ndl2_c H5_FC_FUNC_(h5ltread_dataset_ndl2_c, H5LTREAD_DATASET_NDL2_C) -#define nh5ltread_dataset_ndl3_c H5_FC_FUNC_(h5ltread_dataset_ndl3_c, H5LTREAD_DATASET_NDL3_C) -#define nh5ltread_dataset_ndl4_c H5_FC_FUNC_(h5ltread_dataset_ndl4_c, H5LTREAD_DATASET_NDL4_C) -#define nh5ltread_dataset_ndl5_c H5_FC_FUNC_(h5ltread_dataset_ndl5_c, H5LTREAD_DATASET_NDL5_C) -#define nh5ltread_dataset_ndl6_c H5_FC_FUNC_(h5ltread_dataset_ndl6_c, H5LTREAD_DATASET_NDL6_C) -#define nh5ltread_dataset_ndl7_c H5_FC_FUNC_(h5ltread_dataset_ndl7_c, H5LTREAD_DATASET_NDL7_C) -#define nh5ltmake_dataset_string_c H5_FC_FUNC_(h5ltmake_dataset_string_c, H5LTMAKE_DATASET_STRING_C) -#define nh5ltread_dataset_string_c H5_FC_FUNC_(h5ltread_dataset_string_c, H5LTREAD_DATASET_STRING_C) - -#define nh5ltset_attribute_int_c H5_FC_FUNC_(h5ltset_attribute_int_c, H5LTSET_ATTRIBUTE_INT_C) -#define nh5ltset_attribute_float_c H5_FC_FUNC_(h5ltset_attribute_float_c, H5LTSET_ATTRIBUTE_FLOAT_C) -#define nh5ltset_attribute_double_c H5_FC_FUNC_(h5ltset_attribute_double_c, H5LTSET_ATTRIBUTE_DOUBLE_C) -#define nh5ltset_attribute_string_c H5_FC_FUNC_(h5ltset_attribute_string_c, H5LTSET_ATTRIBUTE_STRING_C) - -#define nh5ltget_attribute_int_c H5_FC_FUNC_(h5ltget_attribute_int_c, H5LTGET_ATTRIBUTE_INT_C) -#define nh5ltget_attribute_float_c H5_FC_FUNC_(h5ltget_attribute_float_c, H5LTGET_ATTRIBUTE_FLOAT_C) -#define nh5ltget_attribute_double_c H5_FC_FUNC_(h5ltget_attribute_double_c, H5LTGET_ATTRIBUTE_DOUBLE_C) -#define nh5ltget_attribute_string_c H5_FC_FUNC_(h5ltget_attribute_string_c, H5LTGET_ATTRIBUTE_STRING_C) - -#define nh5ltget_dataset_ndims_c H5_FC_FUNC_(h5ltget_dataset_ndims_c, H5LTGET_DATASET_NDIMS_C) -#define nh5ltfind_dataset_c H5_FC_FUNC_(h5ltfind_dataset_c, H5LTFIND_DATASET_C) -#define nh5ltget_dataset_info_c H5_FC_FUNC_(h5ltget_dataset_info_c, H5LTGET_DATASET_INFO_C) - -#define nh5ltget_attribute_ndims_c H5_FC_FUNC_(h5ltget_attribute_ndims_c, H5LTGET_ATTRIBUTE_NDIMS_C) -#define nh5ltget_attribute_info_c H5_FC_FUNC_(h5ltget_attribute_info_c, H5LTGET_ATTRIBUTE_INFO_C) -#define nh5ltpath_valid_c H5_FC_FUNC_(h5ltpath_valid_c, H5LTPATH_VALID_C) - -/*------------------------------------------------------------------------- -* Image -*------------------------------------------------------------------------- -*/ -#define nh5immake_image_8bit_c H5_FC_FUNC_(h5immake_image_8bit_c, H5IMMAKE_IMAGE_8BIT_C) -#define nh5immake_image_24bit_c H5_FC_FUNC_(h5immake_image_24bit_c, H5IMMAKE_IMAGE_24BIT_C) -#define nh5imread_image_c H5_FC_FUNC_(h5imread_image_c, H5IMREAD_IMAGE_C) -#define nh5imget_image_info_c H5_FC_FUNC_(h5imget_image_info_c, H5IMGET_IMAGE_INFO_C) -#define nh5imis_image_c H5_FC_FUNC_(h5imis_image_c, H5IMIS_IMAGE_C) -#define nh5immake_palette_c H5_FC_FUNC_(h5immake_palette_c, H5IMMAKE_PALETTE_C) -#define nh5imlink_palette_c H5_FC_FUNC_(h5imlink_palette_c, H5IMLINK_PALETTE_C) -#define nh5imunlink_palette_c H5_FC_FUNC_(h5imunlink_palette_c, H5IMUNLINK_PALETTE_C) -#define nh5imget_npalettes_c H5_FC_FUNC_(h5imget_npalettes_c, H5IMGET_NPALETTES_C) -#define nh5imget_palette_info_c H5_FC_FUNC_(h5imget_palette_info_c, H5IMGET_PALETTE_INFO_C) -#define nh5imget_palette_c H5_FC_FUNC_(h5imget_palette_c, H5IMGET_PALETTE_C) -#define nh5imis_palette_c H5_FC_FUNC_(h5imis_palette_c, H5IMIS_PALETTE_C) - -/*------------------------------------------------------------------------- -* Table -*------------------------------------------------------------------------- -*/ -#define nh5tbmake_table_c H5_FC_FUNC_(h5tbmake_table_c, H5TBMAKE_TABLE_C) -#define nh5tbwrite_field_name_c H5_FC_FUNC_(h5tbwrite_field_name_c, H5TBWRITE_FIELD_NAME_C) -#define nh5tbwrite_field_name_int_c H5_FC_FUNC_(h5tbwrite_field_name_int_c, H5TBWRITE_FIELD_NAME_INT_C) -#define nh5tbwrite_field_name_fl_c H5_FC_FUNC_(h5tbwrite_field_name_fl_c, H5TBWRITE_FIELD_NAME_FL_C) -#define nh5tbwrite_field_name_dl_c H5_FC_FUNC_(h5tbwrite_field_name_dl_c, H5TBWRITE_FIELD_NAME_DL_C) -#define nh5tbwrite_field_name_st_c H5_FC_FUNC_(h5tbwrite_field_name_st_c, H5TBWRITE_FIELD_NAME_ST_C) -#define nh5tbread_field_name_c H5_FC_FUNC_(h5tbread_field_name_c, H5TBREAD_FIELD_NAME_C) -#define nh5tbread_field_name_int_c H5_FC_FUNC_(h5tbread_field_name_int_c, H5TBREAD_FIELD_NAME_INT_C) -#define nh5tbread_field_name_fl_c H5_FC_FUNC_(h5tbread_field_name_fl_c, H5TBREAD_FIELD_NAME_FL_C) -#define nh5tbread_field_name_dl_c H5_FC_FUNC_(h5tbread_field_name_dl_c, H5TBREAD_FIELD_NAME_DL_C) -#define nh5tbread_field_name_st_c H5_FC_FUNC_(h5tbread_field_name_st_c, H5TBREAD_FIELD_NAME_ST_C) -#define nh5tbwrite_field_index_c H5_FC_FUNC_(h5tbwrite_field_index_c, H5TBWRITE_FIELD_INDEX_C) -#define nh5tbwrite_field_index_int_c H5_FC_FUNC_(h5tbwrite_field_index_int_c, H5TBWRITE_FIELD_INDEX_INT_C) -#define nh5tbwrite_field_index_fl_c H5_FC_FUNC_(h5tbwrite_field_index_fl_c, H5TBWRITE_FIELD_INDEX_FL_C) -#define nh5tbwrite_field_index_dl_c H5_FC_FUNC_(h5tbwrite_field_index_dl_c, H5TBWRITE_FIELD_INDEX_DL_C) -#define nh5tbwrite_field_index_st_c H5_FC_FUNC_(h5tbwrite_field_index_st_c, H5TBWRITE_FIELD_INDEX_ST_C) -#define nh5tbread_field_index_c H5_FC_FUNC_(h5tbread_field_index_c, H5TBREAD_FIELD_INDEX_C) -#define nh5tbread_field_index_int_c H5_FC_FUNC_(h5tbread_field_index_int_c, H5TBREAD_FIELD_INDEX_INT_C) -#define nh5tbread_field_index_fl_c H5_FC_FUNC_(h5tbread_field_index_fl_c, H5TBREAD_FIELD_INDEX_FL_C) -#define nh5tbread_field_index_dl_c H5_FC_FUNC_(h5tbread_field_index_dl_c, H5TBREAD_FIELD_INDEX_DL_C) -#define nh5tbread_field_index_st_c H5_FC_FUNC_(h5tbread_field_index_st_c, H5TBREAD_FIELD_INDEX_ST_C) -#define nh5tbinsert_field_c H5_FC_FUNC_(h5tbinsert_field_c, H5TBINSERT_FIELD_C) -#define nh5tbinsert_field_int_c H5_FC_FUNC_(h5tbinsert_field_int_c, H5TBINSERT_FIELD_INT_C) -#define nh5tbinsert_field_fl_c H5_FC_FUNC_(h5tbinsert_field_fl_c, H5TBINSERT_FIELD_FL_C) -#define nh5tbinsert_field_dl_c H5_FC_FUNC_(h5tbinsert_field_dl_c, H5TBINSERT_FIELD_DL_C) -#define nh5tbinsert_field_st_c H5_FC_FUNC_(h5tbinsert_field_st_c, H5TBINSERT_FIELD_ST_C) -#define nh5tbdelete_field_c H5_FC_FUNC_(h5tbdelete_field_c, H5TBDELETE_FIELD_C) -#define nh5tbget_table_info_c H5_FC_FUNC_(h5tbget_table_info_c, H5TBGET_TABLE_INFO_C) -#define nh5tbget_field_info_c H5_FC_FUNC_(h5tbget_field_info_c, H5TBGET_FIELD_INFO_C) - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); - -HDF5_HL_F90CSTUBDLL -int_f -nh5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); - - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); - HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attached); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsis_scale_c(hid_t_f *did, int_f *is_scale); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsget_scale_name_c(hid_t_f *did, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims); +h5dsget_num_scales_c( hid_t_f *did, int_f *idx, int_f *num_scales); -HDF5_HL_F90CSTUBDLL -int_f -nh5ltset_attribute_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); +/* + * Functions from H5LTfc.c + */ HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); +h5ltmake_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + int_f *rank, + hsize_t_f *dims, + hid_t_f *type_id, + void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); +h5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf); +h5ltset_attribute_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf, char *dtype, size_t_f *sizeof_val); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltget_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5ltget_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf); + void *buf, char* dtype, size_t_f *sizeof_val); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - _fcd buf, - size_t_f *buf_size); +h5ltget_attribute_string_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + _fcd buf, + size_t_f *buf_size); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_dataset_ndims_c(hid_t_f *loc_id, +h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -nh5ltfind_dataset_c(hid_t_f *loc_id, +h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_dataset_info_c(hid_t_f *loc_id, +h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1163,7 +142,7 @@ nh5ltget_dataset_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_ndims_c(hid_t_f *loc_id, +h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1171,7 +150,7 @@ nh5ltget_attribute_ndims_c(hid_t_f *loc_id, int_f *rank); HDF5_HL_F90CSTUBDLL int_f -nh5ltget_attribute_info_c(hid_t_f *loc_id, +h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -1182,7 +161,7 @@ nh5ltget_attribute_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltmake_dataset_string_c (hid_t_f *loc_id, +h5ltmake_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *buflen, @@ -1190,14 +169,14 @@ nh5ltmake_dataset_string_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5ltread_dataset_string_c (hid_t_f *loc_id, +h5ltread_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *buf); HDF5_HL_F90CSTUBDLL int_f -nh5ltpath_valid_c(hid_t_f *loc_id, +h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c); @@ -1206,10 +185,9 @@ nh5ltpath_valid_c(hid_t_f *loc_id, * Image *------------------------------------------------------------------------- */ - HDF5_HL_F90CSTUBDLL int_f -nh5immake_image_8bit_c (hid_t_f *loc_id, +h5immake_image_8bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -1217,14 +195,14 @@ nh5immake_image_8bit_c (hid_t_f *loc_id, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -nh5imread_image_c (hid_t_f *loc_id, +h5imread_image_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf); HDF5_HL_F90CSTUBDLL int_f -nh5immake_image_24bit_c (hid_t_f *loc_id, +h5immake_image_24bit_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1234,7 +212,7 @@ nh5immake_image_24bit_c (hid_t_f *loc_id, void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5imget_image_info_c(hid_t_f *loc_id, +h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *width, @@ -1247,14 +225,14 @@ nh5imget_image_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imis_image_c(hid_t_f *loc_id, +h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); HDF5_HL_F90CSTUBDLL int_f -nh5immake_palette_c (hid_t_f *loc_id, +h5immake_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1262,7 +240,7 @@ nh5immake_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imlink_palette_c (hid_t_f *loc_id, +h5imlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1270,7 +248,7 @@ nh5imlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imunlink_palette_c (hid_t_f *loc_id, +h5imunlink_palette_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen, @@ -1278,7 +256,7 @@ nh5imunlink_palette_c (hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_npalettes_c(hid_t_f *loc_id, +h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *npals); @@ -1286,7 +264,7 @@ nh5imget_npalettes_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_palette_info_c(hid_t_f *loc_id, +h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -1294,7 +272,7 @@ nh5imget_palette_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imget_palette_c(hid_t_f *loc_id, +h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_number, @@ -1302,7 +280,7 @@ nh5imget_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5imis_palette_c(hid_t_f *loc_id, +h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name); @@ -1315,7 +293,7 @@ nh5imis_palette_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbmake_table_c(size_t_f *namelen1, +h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -1333,7 +311,7 @@ nh5tbmake_table_c(size_t_f *namelen1, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_name_c(hid_t_f *loc_id, +h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1343,57 +321,11 @@ nh5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_name_c(hid_t_f *loc_id, +h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1403,57 +335,11 @@ nh5tbread_field_name_c(hid_t_f *loc_id, size_t_f *type_size, void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_c(hid_t_f *loc_id, +h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1464,51 +350,7 @@ nh5tbwrite_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbwrite_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbwrite_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_index_c(hid_t_f *loc_id, +h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -1519,51 +361,7 @@ nh5tbread_field_index_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbread_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbread_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -nh5tbinsert_field_c(hid_t_f *loc_id, +h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1574,47 +372,7 @@ nh5tbinsert_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbinsert_field_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbinsert_field_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbinsert_field_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbinsert_field_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf); -HDF5_HL_F90CSTUBDLL -int_f -nh5tbdelete_field_c(hid_t_f *loc_id, +h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -1623,7 +381,7 @@ nh5tbdelete_field_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbget_table_info_c(hid_t_f *loc_id, +h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -1631,7 +389,7 @@ nh5tbget_table_info_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -nh5tbget_field_info_c(hid_t_f *loc_id, +h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 1e0a236..c955590 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -39,7 +39,7 @@ */ int_f -nh5ltmake_dataset_c (hid_t_f *loc_id, +h5ltmake_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, @@ -89,1081 +89,16 @@ done: return ret_value; } -int_f -nh5ltmake_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -int_f -nh5ltmake_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *rank, - hsize_t_f *dims, - hid_t_f *type_id, - void *buf) -{ - return nh5ltmake_dataset_c (loc_id, namelen, name, rank, dims, type_id, buf); -} -/*------------------------------------------------------------------------- -* Function: H5LTread_dataset_c -* -* Purpose: Call H5LTmake_dataset -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: September 09, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -nh5ltread_dataset_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - hid_t c_type_id; - char *c_name = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); - if (c_name == NULL) - goto done; - - /* - * call H5LTread_dataset function. - */ - c_loc_id = (hid_t)*loc_id; - c_type_id = (hid_t)*type_id; - - ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - - return ret_value; -} - -int_f -nh5ltread_dataset_int1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_int7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_fl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_dl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nint7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_nfl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl1_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl2_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl3_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl4_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl5_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl6_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -int_f -nh5ltread_dataset_ndl7_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - hid_t_f *type_id, - void *buf, - hsize_t_f *dims) -{ - return nh5ltread_dataset_c(loc_id, namelen, name, type_id, buf, dims); -} -/*------------------------------------------------------------------------- -* Function: H5LTmake_dataset_string_c -* -* Purpose: Call H5LTmake_dataset -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: September 09, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -nh5ltmake_dataset_string_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *buflen, - char *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_buf = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_buf = (char *)HD5f2cstring(buf, (size_t)*buflen); - if (c_buf == NULL) - goto done; - - /* - * call H5LTmake_dataset_string function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTmake_dataset_string(c_loc_id,c_name,c_buf); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_buf!=NULL) - HDfree(c_buf); - - return ret_value; -} - - -/*------------------------------------------------------------------------- -* Function: H5LTread_dataset_string_c -* -* Purpose: Call H5LTread_dataset_string -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: September 09, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -nh5ltread_dataset_string_c (hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - char *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(name, (size_t)*namelen); - if (c_name == NULL) - goto done; - - /* - * call H5LTread_dataset_string function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTread_dataset_string(c_loc_id,c_name,buf); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - - return ret_value; -} - - - /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_int_c +* Function: H5LTread_dataset_c * -* Purpose: Call H5LTset_attribute_int +* Purpose: Call H5LTmake_dataset * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: October 05, 2004 +* Date: September 09, 2004 * * Comments: * @@ -1174,46 +109,32 @@ done: */ int_f -nh5ltset_attribute_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) +h5ltread_dataset_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + hid_t_f *type_id, + void *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; + hid_t c_type_id; char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; /* * convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) goto done; - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - /* - * call H5LTset_attribute_int function. + * call H5LTread_dataset function. */ c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; + c_type_id = (hid_t)*type_id; - if (sizeof(int_f) == sizeof(int)) - ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size); - else - goto done; + ret = H5LTread_dataset(c_loc_id, c_name, c_type_id, buf ); if (ret < 0) goto done; @@ -1223,22 +144,20 @@ nh5ltset_attribute_int_c(hid_t_f *loc_id, done: if(c_name!=NULL) HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_float_c +* Function: H5LTmake_dataset_string_c * -* Purpose: Call H5LTset_attribute_float +* Purpose: Call H5LTmake_dataset * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: October 05, 2004 +* Date: September 09, 2004 * * Comments: * @@ -1249,65 +168,61 @@ done: */ int_f -nh5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) +h5ltmake_dataset_string_c (hid_t_f *loc_id, + size_t_f *namelen, + _fcd name, + size_t_f *buflen, + char *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; + char *c_buf = NULL; /* * convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) - goto done; + goto done; - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; + c_buf = (char *)HD5f2cstring(buf, (size_t)*buflen); + if (c_buf == NULL) + goto done; /* - * Call H5LTset_attribute_float function. + * call H5LTmake_dataset_string function. */ c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname,(float *)buf,c_size); + ret = H5LTmake_dataset_string(c_loc_id,c_name,c_buf); if (ret < 0) - goto done; + goto done; ret_value = 0; done: if(c_name!=NULL) HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); + if(c_buf!=NULL) + HDfree(c_buf); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_double_c +* Function: H5LTread_dataset_string_c * -* Purpose: Call H5LTset_attribute_double +* Purpose: Call H5LTread_dataset_string * * Return: Success: 0, Failure: -1 * * Programmer: pvn@ncsa.uiuc.edu * -* Date: October 05, 2004 +* Date: September 09, 2004 * * Comments: * @@ -1318,59 +233,46 @@ done: */ int_f -nh5ltset_attribute_double_c(hid_t_f *loc_id, +h5ltread_dataset_string_c (hid_t_f *loc_id, size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) + _fcd name, + char *buf) { int ret_value = -1; herr_t ret; hid_t c_loc_id; char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; /* - * Convert FORTRAN name to C name + * convert FORTRAN name to C name */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) goto done; - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - /* - * Call H5LTset_attribute_double function. + * call H5LTread_dataset_string function. */ c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf,c_size); + ret = H5LTread_dataset_string(c_loc_id,c_name,buf); if (ret < 0) goto done; ret_value = 0; - done: if(c_name!=NULL) HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); return ret_value; } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_string_c +* Function: H5LTset_attribute_int_c * -* Purpose: Call H5LTset_attribute_string +* Purpose: Call H5LTset_attribute_int * * Return: Success: 0, Failure: -1 * @@ -1387,13 +289,13 @@ done: */ int_f -nh5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf) +h5ltset_attribute_c(hid_t_f *loc_id, + size_t_f *namelen, + _fcd dsetname, + size_t_f *attrnamelen, + _fcd attrname, + size_t_f *size, + void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; herr_t ret; @@ -1401,6 +303,7 @@ nh5ltset_attribute_string_c(hid_t_f *loc_id, char *c_name = NULL; char *c_attrname = NULL; char *c_buf = NULL; + size_t c_size; /* * convert FORTRAN name to C name @@ -1413,28 +316,49 @@ nh5ltset_attribute_string_c(hid_t_f *loc_id, if (c_attrname == NULL) goto done; - c_buf = (char *)HD5f2cstring((_fcd)buf, (size_t)*buflen); - if (c_buf == NULL) - goto done; - - /* - * call H5LTset_attribute_string function. + * call H5LTset_attribute_int function. */ c_loc_id = (hid_t)*loc_id; + c_size = (size_t)*size; - ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); - + if( HDstrncmp(dtype,"I",1) == 0 ) { + if ((size_t)*sizeof_val == sizeof(int)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_INT, (const int *)buf); + else if ((size_t)*sizeof_val == sizeof(long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LONG, (const long *)buf); + else if ((size_t)*sizeof_val == sizeof(long long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LLONG, (const long long *)buf); + else + goto done; + } else if ( HDstrncmp(dtype,"R",1) == 0 ) { + if((size_t)*sizeof_val == sizeof(float)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_FLOAT, (const float *)buf); + else if((size_t)*sizeof_val == sizeof(double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_DOUBLE, (const double *)buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LDOUBLE, (const long double *)buf); +#endif + else + goto done; + } else if ( HDstrncmp(dtype,"C",1) == 0 ) { + + c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); + if (c_buf == NULL) + goto done; + + ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); + } if (ret < 0) - goto done; + goto done; ret_value = 0; - done: if(c_name!=NULL) HDfree(c_name); - if(c_attrname!=NULL) + if(c_attrname!=NULL) HDfree(c_attrname); if(c_buf!=NULL) HDfree(c_buf); @@ -1443,7 +367,7 @@ done: } /*------------------------------------------------------------------------- -* Function: H5LTget_attribute_int_c +* Function: H5LTget_attribute_c * * Purpose: Call H5LTget_attribute_int * @@ -1462,86 +386,12 @@ done: */ int_f -nh5ltget_attribute_int_c(hid_t_f *loc_id, +h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, _fcd attrname, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * call H5LTget_attribute_int function. - */ - c_loc_id = (hid_t)*loc_id; - - if(sizeof(int_f) == sizeof(int)) - ret = H5LTget_attribute_int(c_loc_id,c_name,c_attrname,(int *)buf); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTget_attribute_long(c_loc_id,c_name,c_attrname,(long *)buf); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTget_attribute_long_long(c_loc_id,c_name,c_attrname,(long long *)buf); - else - goto done; - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - - return ret_value; -} - - -/*------------------------------------------------------------------------- -* Function: H5LTget_attribute_float_c -* -* Purpose: Call H5LTget_attribute_float -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -nh5ltget_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf) + void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; herr_t ret; @@ -1565,79 +415,33 @@ nh5ltget_attribute_float_c(hid_t_f *loc_id, */ c_loc_id = (hid_t)*loc_id; - ret = H5LTget_attribute_float(c_loc_id,c_name,c_attrname,(float*)buf); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - -/*------------------------------------------------------------------------- -* Function: H5LTget_attribute_double_c -* -* Purpose: Call H5LTget_attribute_double -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -nh5ltget_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) + if( HDstrncmp(dtype,"I",1) == 0) { + if((size_t)*sizeof_val == sizeof(int)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_INT,buf); + else if ((size_t)*sizeof_val == sizeof(long)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LONG,buf); + else if ((size_t)*sizeof_val == sizeof(long long)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LLONG,buf); + else + goto done; + } else if ( HDstrncmp(dtype,"R",1) == 0 ) { + if((size_t)*sizeof_val == sizeof(float)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); + else if((size_t)*sizeof_val == sizeof(double)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LDOUBLE,buf); +#endif + else goto done; - - /* - * call H5LTget_attribute_int function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTget_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf); - + } + if (ret < 0) goto done; ret_value = 0; - done: if(c_name!=NULL) HDfree(c_name); @@ -1667,7 +471,7 @@ done: */ int_f -nh5ltget_attribute_string_c(hid_t_f *loc_id, +h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1742,7 +546,7 @@ done: */ int_f -nh5ltget_dataset_ndims_c(hid_t_f *loc_id, +h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank) @@ -1802,7 +606,7 @@ done: */ int_f -nh5ltfind_dataset_c(hid_t_f *loc_id, +h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) { @@ -1850,7 +654,7 @@ nh5ltfind_dataset_c(hid_t_f *loc_id, */ int_f -nh5ltget_dataset_info_c(hid_t_f *loc_id, +h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dims, @@ -1929,7 +733,7 @@ done: */ int_f -nh5ltget_attribute_ndims_c(hid_t_f *loc_id, +h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f *attrnamelen, @@ -1998,7 +802,7 @@ done: */ int_f -nh5ltget_attribute_info_c(hid_t_f *loc_id, +h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *attrnamelen, @@ -2087,7 +891,7 @@ done: */ int_f -nh5ltpath_valid_c(hid_t_f *loc_id, +h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 new file mode 100644 index 0000000..ffc7ab5 --- /dev/null +++ b/hl/fortran/src/H5LTff.F90 @@ -0,0 +1,1912 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN interfaces for H5LT functions +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. +! + +#include + +MODULE H5LT_CONST + USE, INTRINSIC :: ISO_C_BINDING + USE h5fortran_types + USE hdf5 + + INTERFACE h5ltmake_dataset_f + MODULE PROCEDURE h5ltmake_dataset_f_int1 + MODULE PROCEDURE h5ltmake_dataset_f_int2 + MODULE PROCEDURE h5ltmake_dataset_f_int3 + MODULE PROCEDURE h5ltmake_dataset_f_int4 + MODULE PROCEDURE h5ltmake_dataset_f_int5 + MODULE PROCEDURE h5ltmake_dataset_f_int6 + MODULE PROCEDURE h5ltmake_dataset_f_int7 + MODULE PROCEDURE h5ltmake_dataset_f_ptr + END INTERFACE + + INTERFACE h5ltread_dataset_f + MODULE PROCEDURE h5ltread_dataset_f_int1 + MODULE PROCEDURE h5ltread_dataset_f_int2 + MODULE PROCEDURE h5ltread_dataset_f_int3 + MODULE PROCEDURE h5ltread_dataset_f_int4 + MODULE PROCEDURE h5ltread_dataset_f_int5 + MODULE PROCEDURE h5ltread_dataset_f_int6 + MODULE PROCEDURE h5ltread_dataset_f_int7 + MODULE PROCEDURE h5ltread_dataset_f_ptr + END INTERFACE + + INTERFACE h5ltmake_dataset_int_f + MODULE PROCEDURE h5ltmake_dataset_int_f_1 + MODULE PROCEDURE h5ltmake_dataset_int_f_2 + MODULE PROCEDURE h5ltmake_dataset_int_f_3 + MODULE PROCEDURE h5ltmake_dataset_int_f_4 + MODULE PROCEDURE h5ltmake_dataset_int_f_5 + MODULE PROCEDURE h5ltmake_dataset_int_f_6 + MODULE PROCEDURE h5ltmake_dataset_int_f_7 + END INTERFACE + + INTERFACE h5ltread_dataset_int_f + MODULE PROCEDURE h5ltread_dataset_int_f_1 + MODULE PROCEDURE h5ltread_dataset_int_f_2 + MODULE PROCEDURE h5ltread_dataset_int_f_3 + MODULE PROCEDURE h5ltread_dataset_int_f_4 + MODULE PROCEDURE h5ltread_dataset_int_f_5 + MODULE PROCEDURE h5ltread_dataset_int_f_6 + MODULE PROCEDURE h5ltread_dataset_int_f_7 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & + BIND(C,NAME='h5ltmake_dataset_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + TYPE(C_PTR), VALUE :: buf ! data buffer + END FUNCTION h5ltmake_dataset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf) & + BIND(C,NAME='h5ltread_dataset_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + TYPE(C_PTR), VALUE :: buf ! data buffer + END FUNCTION h5ltread_dataset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype, SizeOf_buf) & + BIND(C,NAME='h5ltset_attribute_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + TYPE(C_PTR), VALUE :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the + ! the buffer: + ! R=Real, D=DOUBLE, I=Interger, C=Character + INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype + END FUNCTION h5ltset_attribute_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,dtype, SizeOf_buf) & + BIND(C,NAME='h5ltget_attribute_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + TYPE(C_PTR), VALUE :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the + ! the buffer: + ! R=Real, D=DOUBLE, I=Interger + INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype + END FUNCTION h5ltget_attribute_c + END INTERFACE + +CONTAINS + !------------------------------------------------------------------------- + ! Make/Read dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function(s): h5ltmake_dataset_f_ptr + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: APR 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_ptr(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + TYPE(C_PTR) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) + + END SUBROUTINE h5ltmake_dataset_f_ptr + + !------------------------------------------------------------------------- + ! Function(s): h5ltmake_dataset_f_int(1-7) + ! + ! Purpose: Creates and writes a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 1, 2004 + ! + ! Comments: + ! + ! Modifications: Changed to passing C_PTR. + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int1 + + SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int2 + + SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& + dset_name,& + rank,& + dims,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int3 + + SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int4 + + SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int5 + + SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int6 + + SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & + type_id, buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) + + END SUBROUTINE h5ltmake_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function(s): h5ltread_dataset_f_ptr + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: Apr 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& + dset_name,& + type_id,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + TYPE(C_PTR) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) + + END SUBROUTINE h5ltread_dataset_f_ptr + + !------------------------------------------------------------------------- + ! Function(s): h5ltread_dataset_f_int(1-7) + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int1(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int1 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int2 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int2(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int2 + + SUBROUTINE h5ltread_dataset_f_int3(loc_id,& + dset_name,& + type_id,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int3 + + SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int4 + + SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int5 + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_f_int6 + ! + ! Purpose: Read a dataset of a type TYPE_ID + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: March 12, 2011 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int6 + + SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & + dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) + + END SUBROUTINE h5ltread_dataset_f_int7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_int_f_1 + ! + ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_1 + + SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_2 + + SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& + dset_name,& + rank,& + dims,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_3 + + SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_4 + + SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_5 + + SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_6 + + SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & + buf, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: rank ! rank + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(in), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltmake_dataset_int_f_7 + + !------------------------------------------------------------------------- + ! Function(s): h5ltread_dataset_int_f_(1-7) + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_1 + + SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_2 + + SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& + dset_name,& + buf,& + dims,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_3 + + SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_4 + + SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_5 + + SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_6 + + SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER, INTENT(inout), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) + + END SUBROUTINE h5ltread_dataset_int_f_7 + + + !------------------------------------------------------------------------- + ! Function: h5ltmake_dataset_string_f + ! + ! Purpose: Creates and writes a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltmake_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: buflen ! buffer length + + INTERFACE + INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) & + BIND(C,NAME='h5ltmake_dataset_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: buflen ! length of data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + END FUNCTION h5ltmake_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + buflen = LEN(buf) + errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) + + END SUBROUTINE h5ltmake_dataset_string_f + + !------------------------------------------------------------------------- + ! Function: h5ltread_dataset_string_f + ! + ! Purpose: Read a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 22, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltread_dataset_string_f(loc_id,& + dset_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) & + BIND(C,NAME='h5ltread_dataset_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer + END FUNCTION h5ltread_dataset_string_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) + + END SUBROUTINE h5ltread_dataset_string_f + + !------------------------------------------------------------------------- + ! Make/Read attribute functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: May 4, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf,& + buf_type, SizeOf_buf_type, & + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + TYPE(C_PTR) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in) :: buf_type ! + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + buf,buf_type_uppercase(1:1)//C_NULL_CHAR, SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_int_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER, DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type + + f_ptr = C_LOC(buf(1:1)) + +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'I'//C_NULL_CHAR,SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_int_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_float_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type + + f_ptr = C_LOC(buf(1)) +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR, SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_double_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type + + f_ptr = C_LOC(buf(1)) + +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1)) +#endif + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR,SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_double_f + + + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_string_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(LEN=*), DIMENSION(*), INTENT(in), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buflen ! data buffer length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type + + f_ptr = C_LOC(buf(1)(1:1)) + +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) +#endif + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buflen = LEN(buf) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,& + f_ptr,'C'//C_NULL_CHAR, SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_string_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: Apr 29, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf, buf_type, SizeOf_buf_type, & + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(out) :: errcode ! error code + CHARACTER(LEN=*), INTENT(in) :: buf_type + TYPE(C_PTR) :: buf! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name, & + buf, buf_type_uppercase//C_NULL_CHAR, SizeOf_buf_type) + + + END SUBROUTINE h5ltget_attribute_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_int_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_int_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf + + f_ptr = C_LOC(buf(1)) + +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf = SIZEOF(buf(1)) +#endif + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf_buf) + + END SUBROUTINE h5ltget_attribute_int_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_float_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_float_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf + + f_ptr = C_LOC(buf(1)) +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf = SIZEOF(buf(1)) +#endif + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) + + END SUBROUTINE h5ltget_attribute_float_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_c_double_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_double_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf + + f_ptr = C_LOC(buf(1)) +#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 + SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf = SIZEOF(buf(1)) +#endif + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) + + END SUBROUTINE h5ltget_attribute_double_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_string_f + ! + ! Purpose: Reads an attribute named ATTR_NAME + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_string_f(loc_id,& + dset_name,& + attr_name,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER :: errcode ! error code + CHARACTER(LEN=*), INTENT(inout) :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buf_size ! buf size + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) & + BIND(C,NAME='h5ltget_attribute_string_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer + INTEGER(size_t) :: buf_size ! data buffer size + END FUNCTION h5ltget_attribute_string_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + buf_size = LEN(buf) + + errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + + END SUBROUTINE h5ltget_attribute_string_f + + !------------------------------------------------------------------------- + ! Query dataset functions + !------------------------------------------------------------------------- + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_ndims_f + ! + ! Purpose: Gets the dimensionality of a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& + dset_name,& + rank,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) & + BIND(C,NAME='h5ltget_dataset_ndims_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_dataset_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) + + END SUBROUTINE h5ltget_dataset_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltfind_dataset_f + ! + ! Purpose: Inquires if a dataset named dset_name exists attached + ! to the object loc_id. + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& + dset_name) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) & + BIND(C,NAME='h5ltfind_dataset_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + END FUNCTION h5ltfind_dataset_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) + h5ltfind_dataset_f = errcode + + END FUNCTION h5ltfind_dataset_f + + !------------------------------------------------------------------------- + ! Function: h5ltget_dataset_info_f + ! + ! Purpose: Gets information about a dataset + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_dataset_info_f(loc_id,& + dset_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) & + BIND(C,NAME='h5ltget_dataset_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_dataset_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_dataset_info_f + + + !------------------------------------------------------------------------- + ! Query attribute functions + !------------------------------------------------------------------------- + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_ndims_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: October 05, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& + dset_name,& + attr_name,& + rank,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) & + BIND(C,NAME='h5ltget_attribute_ndims_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(inout) :: rank ! rank + END FUNCTION h5ltget_attribute_ndims_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + + END SUBROUTINE h5ltget_attribute_ndims_f + + + !------------------------------------------------------------------------- + ! Function: h5ltget_attribute_info_f + ! + ! Purpose: Gets information about an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: pvn@ncsa.uiuc.edu + ! + ! Date: September 30, 2004 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltget_attribute_info_f(loc_id,& + dset_name,& + attr_name,& + dims,& + type_class,& + type_size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + INTERFACE + INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) & + BIND(C,NAME='h5ltget_attribute_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(size_t) :: namelen ! length of name buffer + INTEGER(size_t) :: attrlen ! length of attr name buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions + INTEGER, INTENT(inout) :: type_class ! type class + INTEGER(size_t), INTENT(inout) :: type_size ! type size + END FUNCTION h5ltget_attribute_info_c + END INTERFACE + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + + END SUBROUTINE h5ltget_attribute_info_f + + !------------------------------------------------------------------------- + ! Function: h5ltpath_valid_f + ! + ! Purpose: Validates a path + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: February 18, 2012 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) + + IMPLICIT NONE + INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. + CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. + LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component + ! of the path resolves to a valid object + LOGICAL , INTENT(OUT) :: path_valid ! Object status + INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure + + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + INTEGER :: status + + INTERFACE + INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) & + BIND(C,NAME='h5ltpath_valid_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: path + INTEGER(size_t) :: pathlen + INTEGER :: check_object_valid_c + END FUNCTION h5ltpath_valid_c + END INTERFACE + + ! Initialize + path_valid = .FALSE. + errcode = 0 + + check_object_valid_c = 0 + IF(check_object_valid) check_object_valid_c = 1 + + pathlen = LEN(path) + status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) + + IF(status.EQ.1)THEN + path_valid = .TRUE. + ELSE IF(status.LT.0)THEN + errcode = -1 + ENDIF + + END SUBROUTINE h5ltpath_valid_f + +END MODULE H5LT_CONST + + + + + + diff --git a/hl/fortran/src/H5LTff.f90 b/hl/fortran/src/H5LTff.f90 deleted file mode 100644 index 9393f7f..0000000 --- a/hl/fortran/src/H5LTff.f90 +++ /dev/null @@ -1,6490 +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 file contains FORTRAN90 interfaces for H5LT functions -! - -MODULE h5lt - USE h5fortran_types - USE hdf5 - - INTERFACE h5ltmake_dataset_f - MODULE PROCEDURE h5ltmake_dataset_f_int1 - MODULE PROCEDURE h5ltmake_dataset_f_int2 - MODULE PROCEDURE h5ltmake_dataset_f_int3 - MODULE PROCEDURE h5ltmake_dataset_f_int4 - MODULE PROCEDURE h5ltmake_dataset_f_int5 - MODULE PROCEDURE h5ltmake_dataset_f_int6 - MODULE PROCEDURE h5ltmake_dataset_f_int7 - MODULE PROCEDURE h5ltmake_dataset_f_float1 - MODULE PROCEDURE h5ltmake_dataset_f_float2 - MODULE PROCEDURE h5ltmake_dataset_f_float3 - MODULE PROCEDURE h5ltmake_dataset_f_float4 - MODULE PROCEDURE h5ltmake_dataset_f_float5 - MODULE PROCEDURE h5ltmake_dataset_f_float6 - MODULE PROCEDURE h5ltmake_dataset_f_float7 - MODULE PROCEDURE h5ltmake_dataset_f_double1 - MODULE PROCEDURE h5ltmake_dataset_f_double2 - MODULE PROCEDURE h5ltmake_dataset_f_double3 - MODULE PROCEDURE h5ltmake_dataset_f_double4 - MODULE PROCEDURE h5ltmake_dataset_f_double5 - MODULE PROCEDURE h5ltmake_dataset_f_double6 - MODULE PROCEDURE h5ltmake_dataset_f_double7 - END INTERFACE - - INTERFACE h5ltread_dataset_f - MODULE PROCEDURE h5ltread_dataset_f_int1 - MODULE PROCEDURE h5ltread_dataset_f_int2 - MODULE PROCEDURE h5ltread_dataset_f_int3 - MODULE PROCEDURE h5ltread_dataset_f_int4 - MODULE PROCEDURE h5ltread_dataset_f_int5 - MODULE PROCEDURE h5ltread_dataset_f_int6 - MODULE PROCEDURE h5ltread_dataset_f_int7 - MODULE PROCEDURE h5ltread_dataset_f_float1 - MODULE PROCEDURE h5ltread_dataset_f_float2 - MODULE PROCEDURE h5ltread_dataset_f_float3 - MODULE PROCEDURE h5ltread_dataset_f_float4 - MODULE PROCEDURE h5ltread_dataset_f_float5 - MODULE PROCEDURE h5ltread_dataset_f_float6 - MODULE PROCEDURE h5ltread_dataset_f_float7 - MODULE PROCEDURE h5ltread_dataset_f_double1 - MODULE PROCEDURE h5ltread_dataset_f_double2 - MODULE PROCEDURE h5ltread_dataset_f_double3 - MODULE PROCEDURE h5ltread_dataset_f_double4 - MODULE PROCEDURE h5ltread_dataset_f_double5 - MODULE PROCEDURE h5ltread_dataset_f_double6 - MODULE PROCEDURE h5ltread_dataset_f_double7 - END INTERFACE - - INTERFACE h5ltmake_dataset_int_f - MODULE PROCEDURE h5ltmake_dataset_int_f_1 - MODULE PROCEDURE h5ltmake_dataset_int_f_2 - MODULE PROCEDURE h5ltmake_dataset_int_f_3 - MODULE PROCEDURE h5ltmake_dataset_int_f_4 - MODULE PROCEDURE h5ltmake_dataset_int_f_5 - MODULE PROCEDURE h5ltmake_dataset_int_f_6 - MODULE PROCEDURE h5ltmake_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltmake_dataset_float_f - MODULE PROCEDURE h5ltmake_dataset_float_f_1 - MODULE PROCEDURE h5ltmake_dataset_float_f_2 - MODULE PROCEDURE h5ltmake_dataset_float_f_3 - MODULE PROCEDURE h5ltmake_dataset_float_f_4 - MODULE PROCEDURE h5ltmake_dataset_float_f_5 - MODULE PROCEDURE h5ltmake_dataset_float_f_6 - MODULE PROCEDURE h5ltmake_dataset_float_f_7 - END INTERFACE - - INTERFACE h5ltmake_dataset_double_f - MODULE PROCEDURE h5ltmake_dataset_double_f_1 - MODULE PROCEDURE h5ltmake_dataset_double_f_2 - MODULE PROCEDURE h5ltmake_dataset_double_f_3 - MODULE PROCEDURE h5ltmake_dataset_double_f_4 - MODULE PROCEDURE h5ltmake_dataset_double_f_5 - MODULE PROCEDURE h5ltmake_dataset_double_f_6 - MODULE PROCEDURE h5ltmake_dataset_double_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_int_f - MODULE PROCEDURE h5ltread_dataset_int_f_1 - MODULE PROCEDURE h5ltread_dataset_int_f_2 - MODULE PROCEDURE h5ltread_dataset_int_f_3 - MODULE PROCEDURE h5ltread_dataset_int_f_4 - MODULE PROCEDURE h5ltread_dataset_int_f_5 - MODULE PROCEDURE h5ltread_dataset_int_f_6 - MODULE PROCEDURE h5ltread_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_float_f - MODULE PROCEDURE h5ltread_dataset_float_f_1 - MODULE PROCEDURE h5ltread_dataset_float_f_2 - MODULE PROCEDURE h5ltread_dataset_float_f_3 - MODULE PROCEDURE h5ltread_dataset_float_f_4 - MODULE PROCEDURE h5ltread_dataset_float_f_5 - MODULE PROCEDURE h5ltread_dataset_float_f_6 - MODULE PROCEDURE h5ltread_dataset_float_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_double_f - MODULE PROCEDURE h5ltread_dataset_double_f_1 - MODULE PROCEDURE h5ltread_dataset_double_f_2 - MODULE PROCEDURE h5ltread_dataset_double_f_3 - MODULE PROCEDURE h5ltread_dataset_double_f_4 - MODULE PROCEDURE h5ltread_dataset_double_f_5 - MODULE PROCEDURE h5ltread_dataset_double_f_6 - MODULE PROCEDURE h5ltread_dataset_double_f_7 - END INTERFACE - -CONTAINS - !------------------------------------------------------------------------- - ! Make/Read dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT1_C'::h5ltmake_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT2_C'::h5ltmake_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT3_C'::h5ltmake_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT4_C'::h5ltmake_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT5_C'::h5ltmake_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT6_C'::h5ltmake_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_int7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_int7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_INT7_C'::h5ltmake_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_int7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_int7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL1_C'::h5ltmake_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL2_C'::h5ltmake_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL3_C'::h5ltmake_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float4(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL4_C'::h5ltmake_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float5(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL5_C'::h5ltmake_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float6(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL6_C'::h5ltmake_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_float7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_float7(loc_id, dset_name, rank, dims,& - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_float7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_FL7_C'::h5ltmake_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_fl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_fl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_float7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double1 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double1(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL1_C'::h5ltmake_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double2 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double2(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL2_C'::h5ltmake_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double3 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double3(loc_id,& - dset_name,& - rank,& - dims,& - type_id,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL3_C'::h5ltmake_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double4 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double4(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL4_C'::h5ltmake_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double5 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double5(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL5_C'::h5ltmake_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double6 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double6(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL6_C'::h5ltmake_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_f_double7 - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 7, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_double7(loc_id, dset_name, rank, dims, & - type_id, buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_f_double7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_DL7_C'::h5ltmake_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_dl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_dl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - - END SUBROUTINE h5ltmake_dataset_f_double7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT1_C'::h5ltread_dataset_int1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - INTEGER, INTENT(IN), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT2_C'::h5ltread_dataset_int2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT3_C'::h5ltread_dataset_int3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT4_C'::h5ltread_dataset_int4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT5_C'::h5ltread_dataset_int5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT6_C'::h5ltread_dataset_int6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_int7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_INT7_C'::h5ltread_dataset_int7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_int7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_int7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_int7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL1_C'::h5ltread_dataset_fl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float2 - !DEC$endif - ! - - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL2_C'::h5ltread_dataset_fl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL3_C'::h5ltread_dataset_fl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL4_C'::h5ltread_dataset_fl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL5_C'::h5ltread_dataset_fl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL6_C'::h5ltread_dataset_fl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_float7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_float7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_float7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_FL7_C'::h5ltread_dataset_fl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_fl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_fl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_float7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double1 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double1(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport ::h5ltread_dataset_f_double1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL1_C'::h5ltread_dataset_dl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double1 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double2(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL2_C'::h5ltread_dataset_dl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double3 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double3(loc_id,& - dset_name,& - type_id,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL3_C'::h5ltread_dataset_dl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double4 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double4(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL4_C'::h5ltread_dataset_dl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double5 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double5(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL5_C'::h5ltread_dataset_dl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double6(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL6_C'::h5ltread_dataset_dl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_double7 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_double7(loc_id, dset_name, type_id, buf, & - dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_f_double7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_DL7_C'::h5ltread_dataset_dl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_dl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_dl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - - END SUBROUTINE h5ltread_dataset_f_double7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT1_C'::h5ltmake_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint1_c(loc_id,namelen,dset_name,rank,dims,h5t_native_integer,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT2_C'::h5ltmake_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_2 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT3_C'::h5ltmake_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_4(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT4_C'::h5ltmake_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_5(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT5_C'::h5ltmake_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_6(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT6_C'::h5ltmake_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_int_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_int_f_7(loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_int_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NINT7_C'::h5ltmake_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nint7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nint7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_INTEGER,buf) - - END SUBROUTINE h5ltmake_dataset_int_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL1_C'::h5ltmake_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_1 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL2_C'::h5ltmake_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL3_C'::h5ltmake_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_4 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL4_C'::h5ltmake_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_5 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL5_C'::h5ltmake_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_6 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL6_C'::h5ltmake_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_float_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_FLOAT type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_float_f_7 (loc_id, dset_name, rank, dims, & - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_float_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NFL7_C'::h5ltmake_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_nfl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_nfl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_REAL,buf) - - END SUBROUTINE h5ltmake_dataset_float_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_1 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_1 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL1_C'::h5ltmake_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl1_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_2 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_2 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL2_C'::h5ltmake_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl2_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_3 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_3 (loc_id,& - dset_name,& - rank,& - dims,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL3_C'::h5ltmake_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl3_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_4 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_4 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL4_C'::h5ltmake_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl4_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_5 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_5 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL5_C'::h5ltmake_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl5_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_6 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_6 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL6_C'::h5ltmake_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl6_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_double_f_7 - ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_DOUBLE type - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_double_f_7 (loc_id, dset_name, rank, dims,& - buf, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_NDL7_C'::h5ltmake_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_ndl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltmake_dataset_ndl7_c(loc_id,namelen,dset_name,rank,dims,H5T_NATIVE_DOUBLE,buf) - - END SUBROUTINE h5ltmake_dataset_double_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_1 - !DEC$endif - ! - - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT1_C'::h5ltread_dataset_nint1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint1_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT2_C'::h5ltread_dataset_nint2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint2_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT3_C'::h5ltread_dataset_nint3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint3_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT4_C'::h5ltread_dataset_nint4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint4_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT5_C'::h5ltread_dataset_nint5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint5_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT6_C'::h5ltread_dataset_nint6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint6_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_int_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_int_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NINT7_C'::h5ltread_dataset_nint7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nint7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nint7_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,buf,dims) - - END SUBROUTINE h5ltread_dataset_int_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL1_C'::h5ltread_dataset_nfl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl1_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL2_C'::h5ltread_dataset_nfl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl2_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL3_C'::h5ltread_dataset_nfl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl3_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL4_C'::h5ltread_dataset_nfl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl4_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL5_C'::h5ltread_dataset_nfl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl5_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL6_C'::h5ltread_dataset_nfl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl6_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_float_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_float_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_float_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NFL7_C'::h5ltread_dataset_nfl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - REAL, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_nfl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_nfl7_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,buf,dims) - - END SUBROUTINE h5ltread_dataset_float_f_7 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_1 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_1(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_1 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL1_C'::h5ltread_dataset_ndl1_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl1_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl1_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_1 - - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_2 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_2(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_2 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL2_C'::h5ltread_dataset_ndl2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl2_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl2_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_2 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_3 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_3(loc_id,& - dset_name,& - buf,& - dims,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_3 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL3_C'::h5ltread_dataset_ndl3_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl3_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl3_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_3 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_4 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_4(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_4 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL4_C'::h5ltread_dataset_ndl4_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl4_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl4_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_4 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_5 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_5(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_5 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL5_C'::h5ltread_dataset_ndl5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl5_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl5_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_5 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_6 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_6(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_6 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL6_C'::h5ltread_dataset_ndl6_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl6_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl6_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_6 - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_double_f_7 - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 8, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_double_f_7(loc_id, dset_name, buf, dims, errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_double_f_7 - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,type_id,buf,dims) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_NDL7_C'::h5ltread_dataset_ndl7_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - DOUBLE PRECISION, INTENT(inout), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf ! data buffer - END FUNCTION h5ltread_dataset_ndl7_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_ndl7_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,buf,dims) - - END SUBROUTINE h5ltread_dataset_double_f_7 - - - !------------------------------------------------------------------------- - ! Function: h5ltmake_dataset_string_f - ! - ! Purpose: Creates and writes a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltmake_dataset_string_f - !DEC$endif - ! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: buflen ! buffer length - - INTERFACE - INTEGER FUNCTION h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTMAKE_DATASET_STRING_C'::h5ltmake_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltmake_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - buflen = LEN(buf) - errcode = h5ltmake_dataset_string_c(loc_id,namelen,dset_name,buflen,buf) - - END SUBROUTINE h5ltmake_dataset_string_f - - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_string_f - ! - ! Purpose: Read a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_string_f(loc_id,& - dset_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltread_dataset_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTREAD_DATASET_STRING_C'::h5ltread_dataset_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - END FUNCTION h5ltread_dataset_string_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltread_dataset_string_c(loc_id,namelen,dset_name,buf) - - END SUBROUTINE h5ltread_dataset_string_f - - - - - !------------------------------------------------------------------------- - ! Make/Read attribute functions - !------------------------------------------------------------------------- - - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_int_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_int_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_INT_C'::h5ltset_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_int_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_int_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_float_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_float_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_FLOAT_C'::h5ltset_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_float_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_double_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_double_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_DOUBLE_C'::h5ltset_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltset_attribute_double_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltset_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf) - - END SUBROUTINE h5ltset_attribute_double_f - - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_string_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltset_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltset_attribute_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buflen ! data buffer length - - INTERFACE - INTEGER FUNCTION h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTSET_ATTRIBUTE_STRING_C'::h5ltset_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - INTEGER(size_t) :: buflen ! data buffer length - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(in) :: buf ! data buffer - END FUNCTION h5ltset_attribute_string_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buflen = LEN(buf) - errcode = h5ltset_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,buf) - - END SUBROUTINE h5ltset_attribute_string_f - - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_int_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_int_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_int_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INT_C'::h5ltget_attribute_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_int_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_int_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_int_f - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_float_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_float_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_float_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_FLOAT_C'::h5ltget_attribute_float_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - REAL, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_float_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_float_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_float_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_double_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_double_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_double_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - DOUBLE PRECISION,INTENT(inout),DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_DOUBLE_C'::h5ltget_attribute_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - DOUBLE PRECISION, INTENT(inout), DIMENSION(*) :: buf ! data buffer - END FUNCTION h5ltget_attribute_double_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_double_c(loc_id,namelen,dset_name,attrlen,attr_name,buf) - - END SUBROUTINE h5ltget_attribute_double_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_string_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_string_f(loc_id,& - dset_name,& - attr_name,& - buf,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_string_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buf_size ! buf size - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_STRING_C'::h5ltget_attribute_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(len=*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: buf_size ! data buffer size - END FUNCTION h5ltget_attribute_string_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - buf_size = LEN(buf) - - errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) - - END SUBROUTINE h5ltget_attribute_string_f - - !------------------------------------------------------------------------- - ! Query dataset functions - !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_ndims_f - ! - ! Purpose: Gets the dimensionality of a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& - dset_name,& - rank,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_ndims_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_NDIMS_C'::h5ltget_dataset_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_dataset_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) - - END SUBROUTINE h5ltget_dataset_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltfind_dataset_f - ! - ! Purpose: Inquires if a dataset named dset_name exists attached - ! to the object loc_id. - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& - dset_name) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltfind_dataset_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTFIND_DATASET_C'::h5ltfind_dataset_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - END FUNCTION h5ltfind_dataset_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltfind_dataset_c(loc_id,namelen,dset_name) - h5ltfind_dataset_f = errcode - - END FUNCTION h5ltfind_dataset_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_info_f - ! - ! Purpose: Gets information about a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_dataset_info_f(loc_id,& - dset_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_dataset_info_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_DATASET_INFO_C'::h5ltget_dataset_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_dataset_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_dataset_info_f - - - !------------------------------------------------------------------------- - ! Query attribute functions - !------------------------------------------------------------------------- - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_ndims_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& - dset_name,& - attr_name,& - rank,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_ndims_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_NDIMS_C'::h5ltget_attribute_ndims_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - END FUNCTION h5ltget_attribute_ndims_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) - - END SUBROUTINE h5ltget_attribute_ndims_f - - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_info_f - ! - ! Purpose: Gets information about an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: pvn@ncsa.uiuc.edu - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltget_attribute_info_f(loc_id,& - dset_name,& - attr_name,& - dims,& - type_class,& - type_size,& - errcode ) - - IMPLICIT NONE - - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltget_attribute_info_f - !DEC$endif - ! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - - INTERFACE - INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTGET_ATTRIBUTE_INFO_C'::h5ltget_attribute_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - END FUNCTION h5ltget_attribute_info_c - END INTERFACE - - namelen = LEN(dset_name) - attrlen = LEN(attr_name) - errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) - - END SUBROUTINE h5ltget_attribute_info_f - - !------------------------------------------------------------------------- - ! Function: h5ltpath_valid_f - ! - ! Purpose: Validates a path - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: February 18, 2012 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) - - IMPLICIT NONE - ! - !This definition is needed for Windows DLLs - !DEC$if defined(BUILD_HDF5_HL_DLL) - !DEC$attributes dllexport :: h5ltpath_valid_f - !DEC$endif - ! - INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. - CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. - LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component - ! of the path resolves to a valid object - LOGICAL , INTENT(OUT) :: path_valid ! Object status - INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure - - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - INTEGER :: status - - INTERFACE - INTEGER FUNCTION h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LTPATH_VALID_C'::h5ltpath_valid_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: path - INTEGER(hid_t), INTENT(in) :: loc_id - CHARACTER(len=*), INTENT(in) :: path - INTEGER(size_t) :: pathlen - INTEGER :: check_object_valid_c - END FUNCTION h5ltpath_valid_c - END INTERFACE - - ! Initialize - path_valid = .FALSE. - errcode = 0 - - check_object_valid_c = 0 - IF(check_object_valid) check_object_valid_c = 1 - - pathlen = LEN(path) - status = h5ltpath_valid_c(loc_id, path, pathlen, check_object_valid_c) - - IF(status.EQ.1)THEN - path_valid = .TRUE. - ELSE IF(status.LT.0)THEN - errcode = -1 - ENDIF - - END SUBROUTINE h5ltpath_valid_f - ! end - ! -END MODULE H5LT - - - - - - diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index bf058fd..99a7800 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -37,7 +37,7 @@ *------------------------------------------------------------------------- */ int_f -nh5tbmake_table_c(size_t_f *namelen1, +h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, @@ -133,7 +133,7 @@ done: HDfree(c_field_types); return ret_value; -} /* end nh5tbmake_table_c() */ +} /* end h5tbmake_table_c() */ /*------------------------------------------------------------------------- * Function: h5tbwrite_field_name_c @@ -151,7 +151,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbwrite_field_name_c(hid_t_f *loc_id, +h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -190,65 +190,6 @@ done: return ret_value; } -int_f -nh5tbwrite_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} /*------------------------------------------------------------------------- * Function: h5tbread_field_name_c @@ -266,7 +207,7 @@ nh5tbwrite_field_name_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbread_field_name_c(hid_t_f *loc_id, +h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -305,66 +246,6 @@ done: return ret_value; } -int_f -nh5tbread_field_name_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbread_field_name_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbread_field_name_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - -int_f -nh5tbread_field_name_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_name_c(loc_id, namelen, name, namelen1, field_name, - start, nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbwrite_field_index_c * @@ -381,7 +262,7 @@ nh5tbread_field_name_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbwrite_field_index_c(hid_t_f *loc_id, +h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -416,62 +297,6 @@ done: return ret_value; } -int_f -nh5tbwrite_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbwrite_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbwrite_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbread_field_index_c * @@ -488,7 +313,7 @@ nh5tbwrite_field_index_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbread_field_index_c(hid_t_f *loc_id, +h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *field_index, @@ -522,62 +347,6 @@ done: return ret_value; } -int_f -nh5tbread_field_index_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbread_field_index_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbread_field_index_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - -int_f -nh5tbread_field_index_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - int_f *field_index, - hsize_t_f *start, - hsize_t_f *nrecords, - size_t_f *type_size, - void *buf) -{ - return nh5tbread_field_index_c(loc_id, namelen, name, field_index, start, - nrecords, type_size, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbinsert_field_c * @@ -594,7 +363,7 @@ nh5tbread_field_index_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbinsert_field_c(hid_t_f *loc_id, +h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -631,62 +400,6 @@ done: return ret_value; } -int_f -nh5tbinsert_field_int_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -nh5tbinsert_field_fl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -nh5tbinsert_field_dl_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - -int_f -nh5tbinsert_field_st_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd name, - size_t_f *namelen1, - _fcd field_name, - hid_t_f *field_type, - int_f *position, - void *buf) -{ - return nh5tbinsert_field_c(loc_id, namelen, name, namelen1, field_name, - field_type, position, buf); -} - /*------------------------------------------------------------------------- * Function: h5tbdelete_field_c * @@ -703,7 +416,7 @@ nh5tbinsert_field_st_c(hid_t_f *loc_id, *------------------------------------------------------------------------- */ int_f -nh5tbdelete_field_c(hid_t_f *loc_id, +h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *namelen1, @@ -752,7 +465,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbget_table_info_c(hid_t_f *loc_id, +h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, @@ -802,7 +515,7 @@ done: *------------------------------------------------------------------------- */ int_f -nh5tbget_field_info_c(hid_t_f *loc_id, +h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 new file mode 100644 index 0000000..448d607 --- /dev/null +++ b/hl/fortran/src/H5TBff.F90 @@ -0,0 +1,848 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains FORTRAN interfaces for H5TB functions +! +! +! NOTES +! +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| +! +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. +! +#include "H5config_f.inc" + +MODULE h5tb_CONST + + USE, INTRINSIC :: ISO_C_BINDING + USE h5fortran_types + USE hdf5 + + INTERFACE h5tbwrite_field_name_f + MODULE PROCEDURE h5tbwrite_field_name_f_int + MODULE PROCEDURE h5tbwrite_field_name_f_string + END INTERFACE + + INTERFACE h5tbread_field_name_f + MODULE PROCEDURE h5tbread_field_name_f_int + MODULE PROCEDURE h5tbread_field_name_f_string + END INTERFACE + + INTERFACE h5tbwrite_field_index_f + MODULE PROCEDURE h5tbwrite_field_index_f_int + MODULE PROCEDURE h5tbwrite_field_index_f_string + END INTERFACE + + INTERFACE h5tbread_field_index_f + MODULE PROCEDURE h5tbread_field_index_f_int + MODULE PROCEDURE h5tbread_field_index_f_string + END INTERFACE + + INTERFACE h5tbinsert_field_f + MODULE PROCEDURE h5tbinsert_field_f_int + MODULE PROCEDURE h5tbinsert_field_f_string + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_name_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbwrite_field_name_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name, & + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_name_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + END FUNCTION h5tbread_field_name_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbwrite_field_index_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbwrite_field_index_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,buf) & + BIND(C,NAME='h5tbread_field_index_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbread_field_index_c + END INTERFACE + + + INTERFACE + INTEGER FUNCTION h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,buf) & + BIND(C,NAME='h5tbinsert_field_c') + IMPORT :: C_CHAR, C_PTR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + TYPE(C_PTR), VALUE :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbinsert_field_c + END INTERFACE + +CONTAINS + +!------------------------------------------------------------------------- +! Function: h5tbmake_table_f +! +! Purpose: Make a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 06, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbmake_table_f(table_title,& + loc_id,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + INTEGER(hsize_t) :: i ! general purpose integer + + INTERFACE + INTEGER FUNCTION h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names,& + max_char_size_field_names,& + field_names) & + BIND(C,NAME='h5tbmake_table_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! fields + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types + INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size + INTEGER, INTENT(in) :: compress ! compress + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths + INTEGER(size_t) :: max_char_size_field_names ! character len of field names + END FUNCTION h5tbmake_table_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(table_title) + + ! Find the size of each character string in the array + DO i = 1, nfields + char_len_field_names(i) = LEN_TRIM(field_names(i)) + END DO + + max_char_size_field_names = LEN(field_names(1)) + + errcode = h5tbmake_table_c(namelen1,& + table_title,& + loc_id,& + namelen,& + dset_name,& + nfields,& + nrecords,& + type_size,& + field_offset,& + field_types,& + chunk_size,& + compress,& + char_len_field_names, & + max_char_size_field_names, & + field_names) + + END SUBROUTINE h5tbmake_table_f + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_name_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_name_f_int + + + SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_name_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbread_field_name_f_int(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) ! name length + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbread_field_name_f_int + + SUBROUTINE h5tbread_field_name_f_string(loc_id,& + dset_name,& + field_name,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbread_field_name_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbwrite_field_index_f_int +! +! Purpose: Writes one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_index_f_int + + SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + namelen = LEN(dset_name) + + errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbwrite_field_index_f_string + + +!------------------------------------------------------------------------- +! Function: h5tbread_field_index_f_int +! +! Purpose: Reads one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 12, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbread_field_index_f_int(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbread_field_index_f_int + + SUBROUTINE h5tbread_field_index_f_string(loc_id,& + dset_name,& + field_index,& + start,& + nrecords,& + type_size,& + buf,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER, INTENT(in) :: field_index ! index + INTEGER(hsize_t), INTENT(in) :: start ! start record + INTEGER(hsize_t), INTENT(in) :: nrecords ! records + INTEGER(size_t), INTENT(in) :: type_size ! type size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + namelen = LEN(dset_name) + + errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& + start,nrecords,type_size,f_ptr) + + END SUBROUTINE h5tbread_field_index_f_string + +!------------------------------------------------------------------------- +! Function: h5tbinsert_field_f +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbinsert_field_f_int(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) + + END SUBROUTINE h5tbinsert_field_f_int + + SUBROUTINE h5tbinsert_field_f_string(loc_id,& + dset_name,& + field_name,& + field_type,& + field_index,& + buf,& + errcode ) + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(hid_t), INTENT(in) :: field_type ! field type + INTEGER, INTENT(in) :: field_index ! field_index + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& + field_type,field_index,f_ptr) + + END SUBROUTINE h5tbinsert_field_f_string + +!------------------------------------------------------------------------- +! Function: h5tbdelete_field_f +! +! Purpose: Inserts one field +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbdelete_field_f(loc_id,& + dset_name,& + field_name,& + errcode ) + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length + INTEGER :: errcode ! error code + + + INTERFACE + INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) & + BIND(C,NAME='h5tbdelete_field_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: field_name ! name of the field + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length length + END FUNCTION h5tbdelete_field_c + END INTERFACE + + namelen = LEN(dset_name) + namelen1 = LEN(field_name) + + errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) + + END SUBROUTINE h5tbdelete_field_f + +!------------------------------------------------------------------------- +! Function: h5tbget_table_info_f +! +! Purpose: Gets the number of records and fields of a table +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbget_table_info_f(loc_id,& + dset_name,& + nfields,& + nrecords,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + + INTERFACE + INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) & + BIND(C,NAME='h5tbget_table_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(inout):: nfields ! nfields + INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords + INTEGER(size_t) :: namelen ! name length + END FUNCTION h5tbget_table_info_c + END INTERFACE + + namelen = LEN(dset_name) + errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) + + END SUBROUTINE h5tbget_table_info_f + + +!------------------------------------------------------------------------- +! Function: h5tbget_field_info_f +! +! Purpose: Get information about fields +! +! Return: Success: 0, Failure: -1 +! +! Programmer: pvn@ncsa.uiuc.edu +! +! Date: October 13, 2004 +! +! Comments: +! +! Modifications: +! Added optional parameter for returning the maximum character length +! in the field name array. March 3, 2011 +! +!------------------------------------------------------------------------- + + SUBROUTINE h5tbget_field_info_f(loc_id,& + dset_name,& + nfields,& + field_names,& + field_sizes,& + field_offsets,& + type_size,& + errcode, maxlen_out ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in) :: nfields ! nfields + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER :: errcode ! error code + INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths + INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(size_t) :: maxlen + INTEGER(size_t) :: c_maxlen_out + + INTERFACE + INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& + field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) & + BIND(C,NAME='h5tbget_field_info_c') + IMPORT :: C_CHAR + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hsize_t), INTENT(in):: nfields ! nfields + CHARACTER(KIND=C_CHAR), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets + INTEGER(size_t), INTENT(inout):: type_size ! type size + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: maxlen ! maxiumum length of input field names + INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths + INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element + END FUNCTION h5tbget_field_info_c + END INTERFACE + + namelen = LEN(dset_name) + DO i = 1, nfields + namelen2(i) = LEN_TRIM(field_names(i)) + END DO + maxlen = LEN(field_names(1)) + c_maxlen_out = 0 + + errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & + field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) + + IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out + + END SUBROUTINE h5tbget_field_info_f + +END MODULE H5TB_CONST + + + + + + diff --git a/hl/fortran/src/H5TBff.f90 b/hl/fortran/src/H5TBff.f90 deleted file mode 100644 index 5846f49..0000000 --- a/hl/fortran/src/H5TBff.f90 +++ /dev/null @@ -1,1900 +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 file contains FORTRAN90 interfaces for H5TB functions -! - -MODULE h5tb -USE h5fortran_types -USE hdf5 - - -INTERFACE h5tbwrite_field_name_f - MODULE PROCEDURE h5tbwrite_field_name_f_int - MODULE PROCEDURE h5tbwrite_field_name_f_float - MODULE PROCEDURE h5tbwrite_field_name_f_double - MODULE PROCEDURE h5tbwrite_field_name_f_string -END INTERFACE - -INTERFACE h5tbread_field_name_f - MODULE PROCEDURE h5tbread_field_name_f_int - MODULE PROCEDURE h5tbread_field_name_f_float - MODULE PROCEDURE h5tbread_field_name_f_double - MODULE PROCEDURE h5tbread_field_name_f_string -END INTERFACE - -INTERFACE h5tbwrite_field_index_f - MODULE PROCEDURE h5tbwrite_field_index_f_int - MODULE PROCEDURE h5tbwrite_field_index_f_float - MODULE PROCEDURE h5tbwrite_field_index_f_double - MODULE PROCEDURE h5tbwrite_field_index_f_string -END INTERFACE - -INTERFACE h5tbread_field_index_f - MODULE PROCEDURE h5tbread_field_index_f_int - MODULE PROCEDURE h5tbread_field_index_f_float - MODULE PROCEDURE h5tbread_field_index_f_double - MODULE PROCEDURE h5tbread_field_index_f_string -END INTERFACE - - -INTERFACE h5tbinsert_field_f - MODULE PROCEDURE h5tbinsert_field_f_int - MODULE PROCEDURE h5tbinsert_field_f_float - MODULE PROCEDURE h5tbinsert_field_f_double - MODULE PROCEDURE h5tbinsert_field_f_string -END INTERFACE - - -CONTAINS - - -!------------------------------------------------------------------------- -! Function: h5tbmake_table_f -! -! Purpose: Make a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbmake_table_f(table_title,& - loc_id,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbmake_table_f -!DEC$endif -! - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - INTEGER(hsize_t) :: i ! general purpose integer - - - INTERFACE - INTEGER FUNCTION h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names,& - max_char_size_field_names,& - field_names) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBMAKE_TABLE_C'::h5tbmake_table_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: table_title - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names - END FUNCTION h5tbmake_table_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(table_title) - - ! Find the size of each character string in the array - DO i = 1, nfields - char_len_field_names(i) = LEN_TRIM(field_names(i)) - END DO - - max_char_size_field_names = LEN(field_names(1)) - - errcode = h5tbmake_table_c(namelen1,& - table_title,& - loc_id,& - namelen,& - dset_name,& - nfields,& - nrecords,& - type_size,& - field_offset,& - field_types,& - chunk_size,& - compress,& - char_len_field_names, & - max_char_size_field_names, & - field_names) - -END SUBROUTINE h5tbmake_table_f - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_INT_C'::h5tbwrite_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_int - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_float -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_FL_C'::h5tbwrite_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_DL_C'::h5tbwrite_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_double - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_name_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_NAME_ST_C'::h5tbwrite_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbwrite_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_int(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_INT_C'::h5tbread_field_name_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_int - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_float(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_FL_C'::h5tbread_field_name_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_float - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_double(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_DL_C'::h5tbread_field_name_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_double - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_name_f_string(loc_id,& - dset_name,& - field_name,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_name_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_NAME_ST_C'::h5tbread_field_name_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - END FUNCTION h5tbread_field_name_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_int -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_INT_C'::h5tbwrite_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_int - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_float -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_FL_C'::h5tbwrite_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_double -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_DL_C'::h5tbwrite_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_double - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_string -! -! Purpose: Writes one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbwrite_field_index_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBWRITE_FIELD_INDEX_ST_C'::h5tbwrite_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbwrite_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbwrite_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_int -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_int(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport ::h5tbread_field_index_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_INT_C'::h5tbread_field_index_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_int_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_int - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_float -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_float(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_FL_C'::h5tbread_field_index_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_fl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_float - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_double -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_double(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_DL_C'::h5tbread_field_index_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_dl_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_double - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_string -! -! Purpose: Reads one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbread_field_index_f_string(loc_id,& - dset_name,& - field_index,& - start,& - nrecords,& - type_size,& - buf,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbread_field_index_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBREAD_FIELD_INDEX_ST_C'::h5tbread_field_index_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbread_field_index_st_c - END INTERFACE - - namelen = LEN(dset_name) - - errcode = h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,& - start,nrecords,type_size,buf) - -END SUBROUTINE h5tbread_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_int -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_int(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_int -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_INT_C'::h5tbinsert_field_int_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_int_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_int_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_int - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_float -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_float(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_float -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_FL_C'::h5tbinsert_field_fl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_fl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_fl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_float - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_double -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_double(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_double -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_DL_C'::h5tbinsert_field_dl_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_dl_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_dl_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_double - - - - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f_string -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbinsert_field_f_string(loc_id,& - dset_name,& - field_name,& - field_type,& - field_index,& - buf,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbinsert_field_f_string -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBINSERT_FIELD_ST_C'::h5tbinsert_field_st_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbinsert_field_st_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbinsert_field_st_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,buf) - -END SUBROUTINE h5tbinsert_field_f_string - - - - -!------------------------------------------------------------------------- -! Function: h5tbdelete_field_f -! -! Purpose: Inserts one field -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbdelete_field_f(loc_id,& - dset_name,& - field_name,& - errcode ) - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbdelete_field_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code - - - INTERFACE - INTEGER FUNCTION h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBDELETE_FIELD_C'::h5tbdelete_field_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - !DEC$ATTRIBUTES reference :: field_name - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length - END FUNCTION h5tbdelete_field_c - END INTERFACE - - namelen = LEN(dset_name) - namelen1 = LEN(field_name) - - errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) - -END SUBROUTINE h5tbdelete_field_f - - - -!------------------------------------------------------------------------- -! Function: h5tbget_table_info_f -! -! Purpose: Gets the number of records and fields of a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbget_table_info_f(loc_id,& - dset_name,& - nfields,& - nrecords,& - errcode ) - - IMPLICIT NONE - -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_table_info_f -!DEC$endif -! - - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - - INTERFACE - INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_TABLE_INFO_C'::h5tbget_table_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER(size_t) :: namelen ! name length - END FUNCTION h5tbget_table_info_c - END INTERFACE - - namelen = LEN(dset_name) - errcode = h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) - -END SUBROUTINE h5tbget_table_info_f - - -!------------------------------------------------------------------------- -! Function: h5tbget_field_info_f -! -! Purpose: Get information about fields -! -! Return: Success: 0, Failure: -1 -! -! Programmer: pvn@ncsa.uiuc.edu -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! Added optional parameter for returning the maximum character length -! in the field name array. March 3, 2011 -! -!------------------------------------------------------------------------- - -SUBROUTINE h5tbget_field_info_f(loc_id,& - dset_name,& - nfields,& - field_names,& - field_sizes,& - field_offsets,& - type_size,& - errcode, maxlen_out ) - - IMPLICIT NONE -! -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_HL_DLL) -!DEC$attributes dllexport :: h5tbget_field_info_f -!DEC$endif -! - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER :: errcode ! error code - INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer - INTEGER(size_t) :: maxlen - INTEGER(size_t) :: c_maxlen_out - - INTERFACE - INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,& - field_sizes,field_offsets,type_size,namelen2, maxlen, field_names, c_maxlen_out) - - USE h5global - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TBGET_FIELD_INFO_C'::h5tbget_field_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: dset_name - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in):: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: maxlen ! maxiumum length of input field names - INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths - INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element - END FUNCTION h5tbget_field_info_c - END INTERFACE - - namelen = LEN(dset_name) - DO i = 1, nfields - namelen2(i) = LEN_TRIM(field_names(i)) - END DO - maxlen = LEN(field_names(1)) - c_maxlen_out = 0 - - errcode = h5tbget_field_info_c(loc_id, namelen,dset_name, nfields, & - field_sizes, field_offsets, type_size, namelen2, maxlen, field_names, c_maxlen_out) - - IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out - -END SUBROUTINE h5tbget_field_info_f - -END MODULE H5TB - - - - - - diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index c8c4541..6457f81 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -42,12 +42,12 @@ endif # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 +libhdf5hl_fortran_la_SOURCES=H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD=$(LIBH5_HL) $(LIBH5F) @@ -60,7 +60,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ fi install-data-local: @@ -75,13 +75,31 @@ uninstall-local: fi; \ fi +# These are the helper programs we need to build. +noinst_PROGRAMS = H5HL_buildiface + +# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. + +H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) + +H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +# H5HL_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. + +H5HL_buildiface_SOURCES = H5HL_buildiface.F90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.f90 -H5LTff.lo: $(srcdir)/H5LTff.f90 -H5IMff.lo: $(srcdir)/H5IMff.f90 -H5TBff.lo: $(srcdir)/H5TBff.f90 - +H5DSff.lo: $(srcdir)/H5DSff.F90 +H5LTff.lo: $(srcdir)/H5LTff.F90 +H5IMff.lo: $(srcdir)/H5IMff.F90 +H5TBff.lo: $(srcdir)/H5TBff.F90 +H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 +H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 029e5a1..956eda8 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -31,6 +31,7 @@ # # HDF5 High-Level Fortran Makefile(.in) + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -105,6 +106,7 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static +noinst_PROGRAMS = H5HL_buildiface$(EXEEXT) TESTS = subdir = hl/fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -113,7 +115,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -147,7 +150,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5hl_fortran_la_DEPENDENCIES = $(LIBH5_HL) $(LIBH5F) am_libhdf5hl_fortran_la_OBJECTS = H5DSfc.lo H5LTfc.lo H5IMfc.lo \ - H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5IMff.lo H5TBff.lo + H5IMcc.lo H5TBfc.lo H5DSff.lo H5LTff.lo H5TBff.lo H5IMff.lo \ + H5LTff_gen.lo H5TBff_gen.lo libhdf5hl_fortran_la_OBJECTS = $(am_libhdf5hl_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -157,6 +161,10 @@ libhdf5hl_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5hl_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ +PROGRAMS = $(noinst_PROGRAMS) +am_H5HL_buildiface_OBJECTS = H5HL_buildiface.$(OBJEXT) +H5HL_buildiface_OBJECTS = $(am_H5HL_buildiface_OBJECTS) +H5HL_buildiface_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -169,10 +177,28 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -191,23 +217,9 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = -SOURCES = $(libhdf5hl_fortran_la_SOURCES) -DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) +SOURCES = $(libhdf5hl_fortran_la_SOURCES) $(H5HL_buildiface_SOURCES) +DIST_SOURCES = $(libhdf5hl_fortran_la_SOURCES) \ + $(H5HL_buildiface_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -469,14 +481,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -486,13 +505,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -534,6 +552,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -691,17 +721,23 @@ libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVI # Source files for the library #if BUILD_PARALLEL_CONDITIONAL -# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 +# PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.F90 #endif # List sources to include in the HDF5 HL Fortran library. -libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ - H5DSff.f90 H5LTff.f90 H5IMff.f90 H5TBff.f90 +libhdf5hl_fortran_la_SOURCES = H5DSfc.c H5LTfc.c H5IMfc.c H5IMcc.c H5TBfc.c \ + H5DSff.F90 H5LTff.F90 H5TBff.F90 H5IMff.F90 H5LTff_gen.F90 H5TBff_gen.F90 # HDF5 HL Fortran library depends on HDF5 Library. libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F) +#H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) + +# H5HL_buildiface.F90 is included in the distribution, and Automake knows +# how to compile a fortran program given its sources. +H5HL_buildiface_SOURCES = H5HL_buildiface.F90 + # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and @@ -724,7 +760,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -795,6 +831,19 @@ clean-libLTLIBRARIES: libhdf5hl_fortran.la: $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_DEPENDENCIES) $(EXTRA_libhdf5hl_fortran_la_DEPENDENCIES) $(AM_V_FCLD)$(libhdf5hl_fortran_la_LINK) -rpath $(libdir) $(libhdf5hl_fortran_la_OBJECTS) $(libhdf5hl_fortran_la_LIBADD) $(LIBS) +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +H5HL_buildiface$(EXEEXT): $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_DEPENDENCIES) $(EXTRA_H5HL_buildiface_DEPENDENCIES) + @rm -f H5HL_buildiface$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(H5HL_buildiface_OBJECTS) $(H5HL_buildiface_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -807,6 +856,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LTfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TBfc.Plo@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -828,15 +886,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` - -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - mostlyclean-libtool: -rm -f *.lo @@ -1073,7 +1122,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) all-local +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1114,7 +1163,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ - mostlyclean-am + clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1187,8 +1236,8 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-local cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ + clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-local distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ @@ -1236,7 +1285,7 @@ maintainer-clean-local: clean-local distclean-local: clean-local clean-local: @if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \ - $(RM) *.$(F9XMODEXT); \ + $(RM) *.$(F9XMODEXT) H5LTff_gen.F90 H5TBff_gen.F90; \ fi install-data-local: @@ -1251,14 +1300,23 @@ uninstall-local: fi; \ fi +# H5HL_buildiface.F90 generates all the APIs that have a KIND type associated +# with them. + +H5LTff_gen.F90: H5HL_buildiface$(EXEEXT) + $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT) + +H5TBff_gen.F90: H5HL_buildiface$(EXEEXT) # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5DSff.lo: $(srcdir)/H5DSff.f90 -H5LTff.lo: $(srcdir)/H5LTff.f90 -H5IMff.lo: $(srcdir)/H5IMff.f90 -H5TBff.lo: $(srcdir)/H5TBff.f90 +H5DSff.lo: $(srcdir)/H5DSff.F90 +H5LTff.lo: $(srcdir)/H5LTff.F90 +H5IMff.lo: $(srcdir)/H5IMff.F90 +H5TBff.lo: $(srcdir)/H5TBff.F90 +H5LTff_gen.lo: H5LTff.lo H5LTff_gen.F90 +H5TBff_gen.lo: H5TBff.lo H5LTff_gen.F90 H5TBff_gen.F90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/hl/fortran/src/hdf5_hl_fortrandll.def.in b/hl/fortran/src/hdf5_hl_fortrandll.def.in new file mode 100644 index 0000000..9a1231a --- /dev/null +++ b/hl/fortran/src/hdf5_hl_fortrandll.def.in @@ -0,0 +1,88 @@ +EXPORTS +; H5DS +H5DS_mp_H5DSSET_SCALE_F +H5DS_mp_H5DSATTACH_SCALE_F +H5DS_mp_H5DSDETACH_SCALE_F +H5DS_mp_H5DSIS_ATTACHED_F +H5DS_mp_H5DSIS_SCALE_F +H5DS_mp_H5DSSET_LABEL_F +H5DS_mp_H5DSGET_LABEL_F +H5DS_mp_H5DSGET_SCALE_NAME_F +H5DS_mp_H5DSGET_NUM_SCALES_F +; H5IM +H5IM_mp_H5IMMAKE_IMAGE_8BIT_F +H5IM_mp_H5IMREAD_IMAGE_F +H5IM_mp_H5IMMAKE_IMAGE_24BIT_F +H5IM_mp_H5IMGET_IMAGE_INFO_F +H5IM_mp_H5IMIS_IMAGE_F +H5IM_mp_H5IMMAKE_PALETTE_F +H5IM_mp_H5IMLINK_PALETTE_F +H5IM_mp_H5IMUNLINK_PALETTE_F +H5IM_mp_H5IMGET_NPALETTES_F +H5IM_mp_H5IMGET_PALETTE_INFO_F +H5IM_mp_H5IMGET_PALETTE_F +H5IM_mp_H5IMIS_PALETTE_F +; H5LT +H5LT_CONST_mp_H5LTMAKE_DATASET_F_PTR +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT1 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT2 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT3 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT4 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT5 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT6 +H5LT_CONST_mp_H5LTMAKE_DATASET_F_INT7 +H5LT_CONST_mp_H5LTREAD_DATASET_F_PTR +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT1 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT2 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT3 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT4 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT5 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT6 +H5LT_CONST_mp_H5LTREAD_DATASET_F_INT7 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_1 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_2 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_3 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_4 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_5 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_6 +H5LT_CONST_mp_H5LTMAKE_DATASET_INT_F_7 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_1 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_2 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_3 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_4 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_5 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_6 +H5LT_CONST_mp_H5LTREAD_DATASET_INT_F_7 +H5LT_CONST_mp_H5LTMAKE_DATASET_STRING_F +H5LT_CONST_mp_H5LTREAD_DATASET_STRING_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_INT_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_FLOAT_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_DOUBLE_F +H5LT_CONST_mp_H5LTSET_ATTRIBUTE_STRING_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INT_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_FLOAT_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_DOUBLE_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_STRING_F +H5LT_CONST_mp_H5LTGET_DATASET_NDIMS_F +H5LT_CONST_mp_H5LTFIND_DATASET_F +H5LT_CONST_mp_H5LTGET_DATASET_INFO_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_NDIMS_F +H5LT_CONST_mp_H5LTGET_ATTRIBUTE_INFO_F +H5LT_CONST_mp_H5LTPATH_VALID_F +; H5TB +H5TB_CONST_mp_H5TBMAKE_TABLE_F +H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_INT +H5TB_CONST_mp_H5TBWRITE_FIELD_NAME_F_STRING +H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_INT +H5TB_CONST_mp_H5TBREAD_FIELD_NAME_F_STRING +H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_INT +H5TB_CONST_mp_H5TBWRITE_FIELD_INDEX_F_STRING +H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_INT +H5TB_CONST_mp_H5TBREAD_FIELD_INDEX_F_STRING +H5TB_CONST_mp_H5TBINSERT_FIELD_F_INT +H5TB_CONST_mp_H5TBINSERT_FIELD_F_STRING +H5TB_CONST_mp_H5TBDELETE_FIELD_F +H5TB_CONST_mp_H5TBGET_TABLE_INFO_F +H5TB_CONST_mp_H5TBGET_FIELD_INFO_F diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 4918e06..a1d1386 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #-- Adding test for hl_f90_tstds -add_executable (hl_f90_tstds tstds.f90) +add_executable (hl_f90_tstds tstds.F90) TARGET_NAMING (hl_f90_tstds STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -15,7 +15,7 @@ target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTOR set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstds-shared tstds.f90) + add_executable (hl_f90_tstds-shared tstds.F90) TARGET_NAMING (hl_f90_tstds-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -28,7 +28,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstlite -add_executable (hl_f90_tstlite tstlite.f90) +add_executable (hl_f90_tstlite tstlite.F90) TARGET_NAMING (hl_f90_tstlite STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -36,7 +36,7 @@ target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECT set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstlite-shared tstlite.f90) + add_executable (hl_f90_tstlite-shared tstlite.F90) TARGET_NAMING (hl_f90_tstlite-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -49,7 +49,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tstimage -add_executable (hl_f90_tstimage tstimage.f90) +add_executable (hl_f90_tstimage tstimage.F90) TARGET_NAMING (hl_f90_tstimage STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -57,7 +57,7 @@ target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIREC set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstimage-shared tstimage.f90) + add_executable (hl_f90_tstimage-shared tstimage.F90) TARGET_NAMING (hl_f90_tstimage-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) @@ -70,7 +70,7 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #-- Adding test for hl_f90_tsttable -add_executable (hl_f90_tsttable tsttable.f90) +add_executable (hl_f90_tsttable tsttable.F90) TARGET_NAMING (hl_f90_tsttable STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) @@ -78,7 +78,7 @@ target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIREC set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tsttable-shared tsttable.f90) + add_executable (hl_f90_tsttable-shared tsttable.F90) TARGET_NAMING (hl_f90_tsttable-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index fa3a803..18fdaf3 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -39,10 +39,10 @@ check_PROGRAMS=$(TEST_PROG) LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES=tstds.f90 -tstlite_SOURCES=tstlite.f90 -tstimage_SOURCES=tstimage.f90 -tsttable_SOURCES=tsttable.f90 +tstds_SOURCES=tstds.F90 +tstlite_SOURCES=tstlite.F90 +tstimage_SOURCES=tstimage.F90 +tsttable_SOURCES=tsttable.F90 # Temporary files. CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f1tab.h5 tstds.h5 diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 6725d26..ee4b206 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = tstds$(EXEEXT) tstlite$(EXEEXT) tstimage$(EXEEXT) \ @@ -149,14 +150,17 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = FCLD = $(FC) FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ @@ -460,14 +464,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -477,13 +488,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -525,6 +535,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -674,10 +696,10 @@ TEST_PROG = tstds tstlite tstimage tsttable LDADD = $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5) # Source files for the programs -tstds_SOURCES = tstds.f90 -tstlite_SOURCES = tstlite.f90 -tstimage_SOURCES = tstimage.f90 -tsttable_SOURCES = tsttable.f90 +tstds_SOURCES = tstds.F90 +tstlite_SOURCES = tstlite.F90 +tstimage_SOURCES = tstimage.F90 +tsttable_SOURCES = tsttable.F90 # Mark this directory as part of the Fortran API (this affects output # from tests in conclude.am) @@ -705,7 +727,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) all: all-am .SUFFIXES: -.SUFFIXES: .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -769,14 +791,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo diff --git a/hl/fortran/test/tstds.F90 b/hl/fortran/test/tstds.F90 new file mode 100644 index 0000000..cbf6c38 --- /dev/null +++ b/hl/fortran/test/tstds.F90 @@ -0,0 +1,353 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! * 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +PROGRAM test_ds + + IMPLICIT NONE + + INTEGER :: err + + CALL test_testds(err) + + IF(err.LT.0)THEN + WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" + ENDIF + +END PROGRAM test_ds + +SUBROUTINE test_testds(err) + + USE HDF5 + USE H5LT + USE H5DS + + IMPLICIT NONE + + INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset + INTEGER, PARAMETER :: DIM_DATA = 12 + INTEGER, PARAMETER :: DIM1_SIZE = 3 + INTEGER, PARAMETER :: DIM2_SIZE = 4 + INTEGER, PARAMETER :: DIM1 = 1 + INTEGER, PARAMETER :: DIM2 = 2 + INTEGER, PARAMETER :: FAILED = -1 + + CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" + CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" + CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" + + + INTEGER(hid_t) :: fid ! file ID + INTEGER(hid_t) :: did ! dataset ID + INTEGER(hid_t) :: dsid ! DS dataset ID + INTEGER :: rankds = 1 ! rank of DS dataset + INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset + INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset + INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset + REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset + INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset + INTEGER :: err + INTEGER :: num_scales + INTEGER(size_t) :: name_len + CHARACTER(LEN=80) :: name + INTEGER(size_t) :: label_len + CHARACTER(LEN=80) :: label + LOGICAL :: is_attached, is_scale + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(err) + IF(err.LT.0) RETURN + + ! create a file using default properties + CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) + IF(err.LT.0) RETURN + + ! make a dataset + CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the first dimension + CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) + IF(err.LT.0) RETURN + + ! make a DS dataset for the second dimension + CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Attaching Dimension Scale ') + + ! get the dataset id for DSET_NAME + CALL H5Dopen_f(fid, DSET_NAME, did, err) + IF(err.LT.0) RETURN + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! check attaching to a non-existent dimension; should fail + CALL H5DSattach_scale_f(did, dsid, 20, err) + IF(err.NE.-1) THEN + err = FAILED ! should fail, mark as an error + CALL write_test_status(err) + RETURN + ENDIF + + ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 + CALL H5DSattach_scale_f(did, dsid, DIM1, err) + IF(err.EQ.-1) THEN + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale Attached ') + + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.EQ.-1.OR..NOT.is_attached) THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Check to see how many Dimension Scales are attached + + CALL test_begin(' Test Getting Number Dimension Scales ') + + CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) + IF(err.LT.0.OR.num_scales.NE.1)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test Detaching Dimension Scale ') + + ! Detach scale + CALL H5DSdetach_scale_f(did, dsid, DIM1, err) + IF(err.LT.0) RETURN + + ! Check to see if a dimension scale is attached, should be .false. + CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + !------------------------------------------------------------------------- + ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 + !------------------------------------------------------------------------- + + CALL test_begin(' Test Setting Dimension Scale ') + + CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") + IF(err.LT.0.OR.is_attached)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + CALL test_begin(' Test If Dimension Scale ') + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! Get scale name; test to large character buffer + + CALL test_begin(' Test Getting Dimension Scale By Name ') + + name_len = 25 + name = '' + CALL H5DSget_scale_name_f(dsid, name, name_len, err) + IF(err.LT.0 .OR. & + name_len.NE.21 .OR. & + TRIM(name).NE."Dimension Scale Set 1" .OR. & + name(22:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test exact size character buffer + name_len = 21 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name; test to small character buffer + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + !------------------------------------------------------------------------- + ! attach the DS_2_NAME dimension scale to DSET_NAME + !------------------------------------------------------------------------- + + ! get the DS dataset id + CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) + IF(err.LT.0) RETURN + + ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) + CALL H5DSattach_scale_f(did, dsid, DIM2, err) + IF(err.LT.0) RETURN + + CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) + IF(err.LT.0) RETURN + + ! test sending no Dimension Scale name + + CALL H5DSset_scale_f(dsid, err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + CALL H5DSis_scale_f(dsid, is_scale, err) + IF(err.LT.0.OR..NOT.is_scale)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Get scale name when there is no scale name + name_len = 5 + name = '' + CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) + IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + CALL write_test_status(err) + + CALL test_begin(' Test Setting Dimension Scale Label ') + + CALL H5DSset_label_f(did, DIM2, "Label12", err) + IF(err.LT.0)THEN + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to small + + label_len = 5 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is exact + + label_len = 7 + label = '' + CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) + IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + + ! Test label where character length is to big + + label_len = 25 + label = '' + CALL H5DSget_label_f(did, DIM2, label, label_len, err) + IF(err.LT.0.OR. & + label(1:label_len).NE."Label12" .OR. & + label_len.NE.7 .OR. & + label(8:25).NE.' ')THEN + err = FAILED + CALL write_test_status(err) + RETURN + ENDIF + CALL write_test_status(err) + + ! close DS id + CALL H5Dclose_f(dsid, err) + IF(err.LT.0) RETURN + + ! close file + CALL H5Fclose_f(fid, err) + IF(err.LT.0) RETURN + +END SUBROUTINE test_testds + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed/failed +!------------------------------------------------------------------------- +SUBROUTINE write_test_status( test_result) + +! Writes the results of the tests + + IMPLICIT NONE + + INTEGER, INTENT(IN) :: test_result ! negative, failed + ! 0 , passed + +! Controls the output style for reporting test results + + CHARACTER(LEN=8) :: error_string + CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' + CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' + + error_string = failure + IF (test_result .EQ. 0) THEN + error_string = success + ENDIF + + WRITE(*, fmt = '(T34, A)') error_string + +END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstds.f90 b/hl/fortran/test/tstds.f90 deleted file mode 100644 index cbf6c38..0000000 --- a/hl/fortran/test/tstds.f90 +++ /dev/null @@ -1,353 +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. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -PROGRAM test_ds - - IMPLICIT NONE - - INTEGER :: err - - CALL test_testds(err) - - IF(err.LT.0)THEN - WRITE(*,'(5X,A)') "DIMENSION SCALES TEST *FAILED*" - ENDIF - -END PROGRAM test_ds - -SUBROUTINE test_testds(err) - - USE HDF5 - USE H5LT - USE H5DS - - IMPLICIT NONE - - INTEGER, PARAMETER :: RANK = 2 ! rank of DATA dataset - INTEGER, PARAMETER :: DIM_DATA = 12 - INTEGER, PARAMETER :: DIM1_SIZE = 3 - INTEGER, PARAMETER :: DIM2_SIZE = 4 - INTEGER, PARAMETER :: DIM1 = 1 - INTEGER, PARAMETER :: DIM2 = 2 - INTEGER, PARAMETER :: FAILED = -1 - - CHARACTER(LEN=6), PARAMETER :: DSET_NAME = "Mydata" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME = "Yaxis" - CHARACTER(LEN=5), PARAMETER :: DS_1_NAME_A = "Yaxiz" - CHARACTER(LEN=5), PARAMETER :: DS_2_NAME = "Xaxis" - - - INTEGER(hid_t) :: fid ! file ID - INTEGER(hid_t) :: did ! dataset ID - INTEGER(hid_t) :: dsid ! DS dataset ID - INTEGER :: rankds = 1 ! rank of DS dataset - INTEGER(hsize_t), DIMENSION(1:rank) :: dims = (/DIM2_SIZE,DIM1_SIZE/) ! size of DATA dataset - INTEGER, DIMENSION(1:DIM_DATA) :: buf = (/1,2,3,4,5,6,7,8,9,10,11,12/) ! DATA of DATA dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s1_dim = (/DIM1_SIZE/) ! size of DS 1 dataset - INTEGER(hsize_t), DIMENSION(1:1) :: s2_dim = (/DIM2_SIZE/) ! size of DS 2 dataset - REAL, DIMENSION(1:DIM1_SIZE) :: s1_wbuf = (/10,20,30/) ! DATA of DS 1 dataset - INTEGER, DIMENSION(1:DIM2_SIZE) :: s2_wbuf = (/10,20,50,100/) ! DATA of DS 2 dataset - INTEGER :: err - INTEGER :: num_scales - INTEGER(size_t) :: name_len - CHARACTER(LEN=80) :: name - INTEGER(size_t) :: label_len - CHARACTER(LEN=80) :: label - LOGICAL :: is_attached, is_scale - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(err) - IF(err.LT.0) RETURN - - ! create a file using default properties - CALL H5Fcreate_f("tstds.h5",H5F_ACC_TRUNC_F, fid, err) - IF(err.LT.0) RETURN - - ! make a dataset - CALL H5LTmake_dataset_int_f(fid,DSET_NAME,rank,dims,buf, err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the first dimension - CALL H5LTmake_dataset_float_f(fid,DS_1_NAME,rankds,s1_dim,s1_wbuf,err) - IF(err.LT.0) RETURN - - ! make a DS dataset for the second dimension - CALL H5LTmake_dataset_int_f(fid,DS_2_NAME,rankds,s2_dim,s2_wbuf,err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Attaching Dimension Scale ') - - ! get the dataset id for DSET_NAME - CALL H5Dopen_f(fid, DSET_NAME, did, err) - IF(err.LT.0) RETURN - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_1_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! check attaching to a non-existent dimension; should fail - CALL H5DSattach_scale_f(did, dsid, 20, err) - IF(err.NE.-1) THEN - err = FAILED ! should fail, mark as an error - CALL write_test_status(err) - RETURN - ENDIF - - ! attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 1 - CALL H5DSattach_scale_f(did, dsid, DIM1, err) - IF(err.EQ.-1) THEN - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale Attached ') - - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.EQ.-1.OR..NOT.is_attached) THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Check to see how many Dimension Scales are attached - - CALL test_begin(' Test Getting Number Dimension Scales ') - - CALL H5DSget_num_scales_f(did, DIM1, num_scales, err) - IF(err.LT.0.OR.num_scales.NE.1)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test Detaching Dimension Scale ') - - ! Detach scale - CALL H5DSdetach_scale_f(did, dsid, DIM1, err) - IF(err.LT.0) RETURN - - ! Check to see if a dimension scale is attached, should be .false. - CALL H5DSis_attached_f(did, dsid, DIM1, is_attached, err) - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - !------------------------------------------------------------------------- - ! set the DS_1_NAME dimension scale to DSET_NAME at dimension 0 - !------------------------------------------------------------------------- - - CALL test_begin(' Test Setting Dimension Scale ') - - CALL H5DSset_scale_f(dsid, err, "Dimension Scale Set 1") - IF(err.LT.0.OR.is_attached)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - CALL test_begin(' Test If Dimension Scale ') - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! Get scale name; test to large character buffer - - CALL test_begin(' Test Getting Dimension Scale By Name ') - - name_len = 25 - name = '' - CALL H5DSget_scale_name_f(dsid, name, name_len, err) - IF(err.LT.0 .OR. & - name_len.NE.21 .OR. & - TRIM(name).NE."Dimension Scale Set 1" .OR. & - name(22:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test exact size character buffer - name_len = 21 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimension Scale Set 1")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name; test to small character buffer - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.21.OR.TRIM(name).NE."Dimen")THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - !------------------------------------------------------------------------- - ! attach the DS_2_NAME dimension scale to DSET_NAME - !------------------------------------------------------------------------- - - ! get the DS dataset id - CALL H5Dopen_f(fid, DS_2_NAME, dsid, err) - IF(err.LT.0) RETURN - - ! attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 2) - CALL H5DSattach_scale_f(did, dsid, DIM2, err) - IF(err.LT.0) RETURN - - CALL H5DSis_attached_f(did, dsid, DIM2, is_attached, err) - IF(err.LT.0) RETURN - - ! test sending no Dimension Scale name - - CALL H5DSset_scale_f(dsid, err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - CALL H5DSis_scale_f(dsid, is_scale, err) - IF(err.LT.0.OR..NOT.is_scale)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Get scale name when there is no scale name - name_len = 5 - name = '' - CALL H5DSget_scale_name_f(dsid, name(1:name_len), name_len, err) - IF(err.LT.0.OR.name_len.NE.0)THEN ! name_len is 0 if no name is found - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - CALL write_test_status(err) - - CALL test_begin(' Test Setting Dimension Scale Label ') - - CALL H5DSset_label_f(did, DIM2, "Label12", err) - IF(err.LT.0)THEN - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to small - - label_len = 5 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:5).NE."Label".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is exact - - label_len = 7 - label = '' - CALL H5DSget_label_f(did, DIM2, label(1:label_len), label_len, err) - IF(err.LT.0.OR.label(1:label_len).NE."Label12".OR.label_len.NE.7)THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - - ! Test label where character length is to big - - label_len = 25 - label = '' - CALL H5DSget_label_f(did, DIM2, label, label_len, err) - IF(err.LT.0.OR. & - label(1:label_len).NE."Label12" .OR. & - label_len.NE.7 .OR. & - label(8:25).NE.' ')THEN - err = FAILED - CALL write_test_status(err) - RETURN - ENDIF - CALL write_test_status(err) - - ! close DS id - CALL H5Dclose_f(dsid, err) - IF(err.LT.0) RETURN - - ! close file - CALL H5Fclose_f(fid, err) - IF(err.LT.0) RETURN - -END SUBROUTINE test_testds - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(A)', advance = 'no') ADJUSTL(string) -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed/failed -!------------------------------------------------------------------------- -SUBROUTINE write_test_status( test_result) - -! Writes the results of the tests - - IMPLICIT NONE - - INTEGER, INTENT(IN) :: test_result ! negative, failed - ! 0 , passed - -! Controls the output style for reporting test results - - CHARACTER(LEN=8) :: error_string - CHARACTER(LEN=8), PARAMETER :: success = ' PASSED ' - CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*' - - error_string = failure - IF (test_result .EQ. 0) THEN - error_string = success - ENDIF - - WRITE(*, fmt = '(T34, A)') error_string - -END SUBROUTINE write_test_status diff --git a/hl/fortran/test/tstimage.F90 b/hl/fortran/test/tstimage.F90 new file mode 100644 index 0000000..0bff6b2 --- /dev/null +++ b/hl/fortran/test/tstimage.F90 @@ -0,0 +1,339 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! + +program image_test + +call make_image1() + +end program image_test + + +!------------------------------------------------------------------------- +! make_image1 +!------------------------------------------------------------------------- + +subroutine make_image1() + +use h5im ! module of H5IM +use hdf5 ! module of HDF5 library + +implicit none + +character(len=8), parameter :: filename = "f1img.h5" ! file name +character(len=4), parameter :: dsetname1 = "img1" ! dataset name +character(len=4), parameter :: dsetname2 = "img2" ! dataset name +character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name +integer(hid_t) :: file_id ! file identifier +integer(hsize_t), parameter :: width = 500 ! width of image +integer(hsize_t), parameter :: height = 200 ! height of image +integer, parameter :: pal_entries = 9 ! palette number of entries +integer, dimension(width*height) :: buf1 ! data buffer +integer, dimension(width*height) :: bufr1 ! data buffer +integer, dimension(width*height*3) :: buf2 ! data buffer +integer, dimension(width*height*3) :: bufr2 ! data buffer +integer(hsize_t) :: widthr ! width of image +integer(hsize_t) :: heightr ! height of image +integer(hsize_t) :: planesr ! color planes +integer(hsize_t) :: npalsr ! palettes +character(len=15) :: interlacer ! interlace +integer :: errcode ! error flag +integer :: is_image ! error flag +integer :: i, j, n ! general purpose integers +! +! palette +! create a 9 entry palette +! +character(len=4), parameter :: pal_name = "pal1" ! dataset name +integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions +integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions +integer, dimension(pal_entries*3) :: pal_data_out ! data buffer +integer(hsize_t) :: npals ! number of palettes +integer :: pal_number ! palette number +integer :: is_palette ! is palette +integer :: space +integer, dimension(pal_entries*3) :: pal_data_in = (/& + 0,0,168,& ! dark blue + 0,0,252,& ! blue + 0,168,252,& ! ocean blue + 84,252,252,& ! light blue + 168,252,168,& ! light green + 0,252,168,& ! green + 252,252,84,& ! yellow + 252,168,0,& ! orange + 252,0,0/) ! red + + +! create an 8bit image of 9 values divided evenly by the array +! +space = width*height / pal_entries; +n = 0; j = 0; +do i = 1, width*height + buf1(i) = n + if ( j > space ) then + n = n + 1; + j = 0; + endif + if (n>pal_entries-1) n=0; + j = j +1; +end do + +! +! create a 3 byte rgb image +! +n = 0; j = 0; +do i = 1, width*height*3 + buf2(i) = n; + if (j == 3) then + n = n + 1; + j = 0; + endif + if (n>255) n=0; + j = j +1; +end do + + +! Initialize FORTRAN predefined datatypes. +! +call h5open_f(errcode) +! +! Create a new file using default properties. +! +call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! indexed image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 8bit ') + +! +! write image. +! +call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) +! +! read image. +! +call h5imread_image_f(file_id,dsetname1,bufr1,errcode) +! +! compare read and write buffers. +! +do i = 1, width*height + if ( buf1(i) /= bufr1(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr1(i), ' and ', buf1(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname1) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + +call passed() + +!------------------------------------------------------------------------- +! true color image +!------------------------------------------------------------------------- + +call test_begin(' Make/Read image 24bit ') + +! +! write image. +! +call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) + +! +! read image. +! +call h5imread_image_f(file_id,dsetname2,bufr2,errcode) + +! +! compare read and write buffers. +! +do i = 1, width*height*3 + if ( buf2(i) /= bufr2(i) ) then + print *, 'read buffer differs from write buffer' + print *, bufr2(i), ' and ', buf2(i) + stop + endif +end do + +! +! get image info. +! +call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) + +if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then + print *, 'h5imget_image_info_f bad value' + stop +endif + +is_image = h5imis_image_f(file_id,dsetname2) +if ( is_image /= 1) then + print *, 'h5imis_image_f bad value' + stop +endif + + + +call passed() + +!------------------------------------------------------------------------- +! palette +!------------------------------------------------------------------------- + +call test_begin(' Make palette ') + +! +! make palette. +! +call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) + +call passed() + + +call test_begin(' Link/Unlink palette ') + +! +! link palette. +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + + +! +! read palette. +! +pal_number = 0 +call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) + +! +! compare read and write buffers. +! +do i = 1, pal_entries*3 + if ( pal_data_in(i) /= pal_data_out(i) ) then + print *, 'read buffer differs from write buffer' + print *, pal_data_in(i), ' and ', pal_data_out(i) + stop + endif +end do + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) + +if ( npals /= 1) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + +! +! get palette info +! +pal_number = 0 +call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) + +if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then + print *, 'h5imget_palette_info_f bad value' + stop +endif + +! +! is palette +! +is_palette = h5imis_palette_f(file_id,pal_name) + +if ( is_palette /= 1 ) then + print *, 'h5imis_palette_f bad value' + stop +endif + +! +! unlink palette. +! +call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) + +! +! get number of palettes +! +call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) + +if ( npals /= 0) then + print *, 'h5imget_npalettes_f bad value' + stop +endif + + +! +! link palette again +! +call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) + +call passed() + + +!------------------------------------------------------------------------- +! end +!------------------------------------------------------------------------- + +! +! Close the file. +! +call h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +call h5close_f(errcode) + +! +! end function. +! +end subroutine make_image1 + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +subroutine test_begin(string) +character(len=*), intent(in) :: string +write(*, fmt = '(14a)', advance = 'no') string +write(*, fmt = '(40x,a)', advance = 'no') ' ' +end subroutine test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +subroutine passed() +write(*, fmt = '(6a)') 'PASSED' +end subroutine passed diff --git a/hl/fortran/test/tstimage.f90 b/hl/fortran/test/tstimage.f90 deleted file mode 100644 index 0bff6b2..0000000 --- a/hl/fortran/test/tstimage.f90 +++ /dev/null @@ -1,339 +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 file contains the FORTRAN90 tests for H5LT -! - -program image_test - -call make_image1() - -end program image_test - - -!------------------------------------------------------------------------- -! make_image1 -!------------------------------------------------------------------------- - -subroutine make_image1() - -use h5im ! module of H5IM -use hdf5 ! module of HDF5 library - -implicit none - -character(len=8), parameter :: filename = "f1img.h5" ! file name -character(len=4), parameter :: dsetname1 = "img1" ! dataset name -character(len=4), parameter :: dsetname2 = "img2" ! dataset name -character(len=15), parameter :: il ="INTERLACE_PIXEL"! dataset name -integer(hid_t) :: file_id ! file identifier -integer(hsize_t), parameter :: width = 500 ! width of image -integer(hsize_t), parameter :: height = 200 ! height of image -integer, parameter :: pal_entries = 9 ! palette number of entries -integer, dimension(width*height) :: buf1 ! data buffer -integer, dimension(width*height) :: bufr1 ! data buffer -integer, dimension(width*height*3) :: buf2 ! data buffer -integer, dimension(width*height*3) :: bufr2 ! data buffer -integer(hsize_t) :: widthr ! width of image -integer(hsize_t) :: heightr ! height of image -integer(hsize_t) :: planesr ! color planes -integer(hsize_t) :: npalsr ! palettes -character(len=15) :: interlacer ! interlace -integer :: errcode ! error flag -integer :: is_image ! error flag -integer :: i, j, n ! general purpose integers -! -! palette -! create a 9 entry palette -! -character(len=4), parameter :: pal_name = "pal1" ! dataset name -integer(hsize_t), dimension(2) :: pal_dims = (/pal_entries,3/) ! palette dimensions -integer(hsize_t), dimension(2) :: pal_dims_out ! palette dimensions -integer, dimension(pal_entries*3) :: pal_data_out ! data buffer -integer(hsize_t) :: npals ! number of palettes -integer :: pal_number ! palette number -integer :: is_palette ! is palette -integer :: space -integer, dimension(pal_entries*3) :: pal_data_in = (/& - 0,0,168,& ! dark blue - 0,0,252,& ! blue - 0,168,252,& ! ocean blue - 84,252,252,& ! light blue - 168,252,168,& ! light green - 0,252,168,& ! green - 252,252,84,& ! yellow - 252,168,0,& ! orange - 252,0,0/) ! red - - -! create an 8bit image of 9 values divided evenly by the array -! -space = width*height / pal_entries; -n = 0; j = 0; -do i = 1, width*height - buf1(i) = n - if ( j > space ) then - n = n + 1; - j = 0; - endif - if (n>pal_entries-1) n=0; - j = j +1; -end do - -! -! create a 3 byte rgb image -! -n = 0; j = 0; -do i = 1, width*height*3 - buf2(i) = n; - if (j == 3) then - n = n + 1; - j = 0; - endif - if (n>255) n=0; - j = j +1; -end do - - -! Initialize FORTRAN predefined datatypes. -! -call h5open_f(errcode) -! -! Create a new file using default properties. -! -call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! indexed image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 8bit ') - -! -! write image. -! -call h5immake_image_8bit_f(file_id,dsetname1,width,height,buf1,errcode) -! -! read image. -! -call h5imread_image_f(file_id,dsetname1,bufr1,errcode) -! -! compare read and write buffers. -! -do i = 1, width*height - if ( buf1(i) /= bufr1(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr1(i), ' and ', buf1(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname1,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 1)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname1) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - -call passed() - -!------------------------------------------------------------------------- -! true color image -!------------------------------------------------------------------------- - -call test_begin(' Make/Read image 24bit ') - -! -! write image. -! -call h5immake_image_24bit_f(file_id,dsetname2,width,height,il,buf2,errcode) - -! -! read image. -! -call h5imread_image_f(file_id,dsetname2,bufr2,errcode) - -! -! compare read and write buffers. -! -do i = 1, width*height*3 - if ( buf2(i) /= bufr2(i) ) then - print *, 'read buffer differs from write buffer' - print *, bufr2(i), ' and ', buf2(i) - stop - endif -end do - -! -! get image info. -! -call h5imget_image_info_f(file_id,dsetname2,widthr,heightr,planesr,interlacer,npalsr,errcode) - -if ( (widthr /= widthr) .or. (heightr /= height) .or. (planesr /= 3)) then - print *, 'h5imget_image_info_f bad value' - stop -endif - -is_image = h5imis_image_f(file_id,dsetname2) -if ( is_image /= 1) then - print *, 'h5imis_image_f bad value' - stop -endif - - - -call passed() - -!------------------------------------------------------------------------- -! palette -!------------------------------------------------------------------------- - -call test_begin(' Make palette ') - -! -! make palette. -! -call h5immake_palette_f(file_id,pal_name,pal_dims,pal_data_in,errcode) - -call passed() - - -call test_begin(' Link/Unlink palette ') - -! -! link palette. -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - - -! -! read palette. -! -pal_number = 0 -call h5imget_palette_f(file_id,dsetname1,pal_number,pal_data_out,errcode) - -! -! compare read and write buffers. -! -do i = 1, pal_entries*3 - if ( pal_data_in(i) /= pal_data_out(i) ) then - print *, 'read buffer differs from write buffer' - print *, pal_data_in(i), ' and ', pal_data_out(i) - stop - endif -end do - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode) - -if ( npals /= 1) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - -! -! get palette info -! -pal_number = 0 -call h5imget_palette_info_f(file_id,dsetname1,pal_number,pal_dims_out,errcode) - -if ( (pal_dims_out(1) /= pal_dims(1)) .or. (pal_dims_out(2) /= pal_dims(2))) then - print *, 'h5imget_palette_info_f bad value' - stop -endif - -! -! is palette -! -is_palette = h5imis_palette_f(file_id,pal_name) - -if ( is_palette /= 1 ) then - print *, 'h5imis_palette_f bad value' - stop -endif - -! -! unlink palette. -! -call h5imunlink_palette_f(file_id,dsetname1,pal_name,errcode) - -! -! get number of palettes -! -call h5imget_npalettes_f(file_id,dsetname1,npals,errcode ) - -if ( npals /= 0) then - print *, 'h5imget_npalettes_f bad value' - stop -endif - - -! -! link palette again -! -call h5imlink_palette_f(file_id,dsetname1,pal_name,errcode) - -call passed() - - -!------------------------------------------------------------------------- -! end -!------------------------------------------------------------------------- - -! -! Close the file. -! -call h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -call h5close_f(errcode) - -! -! end function. -! -end subroutine make_image1 - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -subroutine test_begin(string) -character(len=*), intent(in) :: string -write(*, fmt = '(14a)', advance = 'no') string -write(*, fmt = '(40x,a)', advance = 'no') ' ' -end subroutine test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -subroutine passed() -write(*, fmt = '(6a)') 'PASSED' -end subroutine passed diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 new file mode 100644 index 0000000..0eb005b --- /dev/null +++ b/hl/fortran/test/tstlite.F90 @@ -0,0 +1,1719 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! +#include + +PROGRAM lite_test + + CALL test_dataset1D() + CALL test_dataset2D() + CALL test_dataset3D() + CALL test_datasetND(4) + CALL test_datasetND(5) + CALL test_datasetND(6) + CALL test_datasetND(7) + CALL test_datasets() + CALL test_attributes() + +END PROGRAM lite_test + + +!------------------------------------------------------------------------- +! test_dataset1D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset1D() + +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array +CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions +INTEGER :: rank = 1 ! Dataset rank +INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer +INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer +REAL, DIMENSION(DIM1) :: buf2 ! Data buffer +REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER :: i ! general purpose integer +TYPE(C_PTR) :: f_ptr +integer(HID_T) :: mytype + +CALL test_begin(' Make/Read datasets (1D) ') + +! +! Initialize the data array. +! +DO i = 1, DIM1 + buf1(i) = i; + buf2(i) = i; + buf3(i) = i; +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INTEGER +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf1(i) .NE. bufr1(i) ) THEN + PRINT *, 'read buffer differs from write buffer (I)' + PRINT *, bufr1(i), ' and ', buf1(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer (R)' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1)) +mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & + mytype, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) +! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +! +! read dataset. +! +f_ptr = C_LOC(bufr3(1)) +CALL h5ltread_dataset_f(file_id, dsetname3, & + h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer (D)' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset1D + +!------------------------------------------------------------------------- +! test_dataset2D +!------------------------------------------------------------------------- + +SUBROUTINE test_dataset2D() + +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + + +INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns +INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows +CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions +INTEGER :: rank = 2 ! Dataset rank +INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, n ! general purpose integers +TYPE(C_PTR) :: f_ptr + +CALL test_begin(' Make/Read datasets (2D) ') + + +! +! Initialize the data arrays. +! +n=1 +DO i = 1, DIM1*DIM2 + buf(i) = INT(n) + n = n + 1 +END DO + +DO i = 1, dims(1) + DO j = 1, dims(2) + buf2(i,j) = INT((i-1)*dims(2) + j) + buf3(i,j) = INT((i-1)*dims(2) + j) + buf4(i,j) = INT((i-1)*dims(2) + j) + END DO +END DO + + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 2D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j), ' and ', buf2(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf3r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j), ' and ', buf3(i,j) + STOP + ENDIF + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf4(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) + +! +! read dataset. +f_ptr = C_LOC(buf4r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j), ' and ', buf4(i,j) + STOP + ENDIF + END DO +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset2D + + +!------------------------------------------------------------------------- +! test_dataset3D +!------------------------------------------------------------------------- + + +SUBROUTINE test_dataset3D() +USE, INTRINSIC :: ISO_C_BINDING +USE H5LT ! module of H5LT +USE HDF5 ! module of HDF5 library + +IMPLICIT NONE + +INTEGER, PARAMETER :: DIM1 = 6 ! columns +INTEGER, PARAMETER :: DIM2 = 4 ! rows +INTEGER, PARAMETER :: DIM3 = 2 ! layers +CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name +CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name +CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name +INTEGER(HID_T) :: file_id ! File identifier +INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions +INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer +INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer +INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer +INTEGER :: rank = 3 ! Dataset rank +INTEGER :: errcode ! Error flag +INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers +INTEGER :: type_class +INTEGER(SIZE_T) :: type_size +TYPE(C_PTR) :: f_ptr +CALL test_begin(' Make/Read datasets (3D) ') + + +! +! Initialize the data array. +! +n=1 +DO i = 1, DIM1*DIM2*DIM3 + buf(i) = INT(n) + n = n + 1 +END DO + +n = 1 +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + buf2(i,j,k) = INT(n) + buf3(i,j,k) = INT(n) + buf4(i,j,k) = INT(n) + n = n + 1 + END DO + END DO +END DO + +! +! Initialize FORTRAN predefined datatypes. +! +CALL h5open_f(errcode) + +! +! Create a new file using default properties. +! +CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 1D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, DIM1*DIM2*DIM3 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_INT 3D buffer +!------------------------------------------------------------------------- + +! +! write dataset. +! +CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + +! +! read dataset. +! +CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_REAL +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf3(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf3r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +!------------------------------------------------------------------------- +! H5T_NATIVE_DOUBLE +!------------------------------------------------------------------------- + +! +! write dataset. +! +f_ptr = C_LOC(buf4(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +! +! read dataset. +! +f_ptr = C_LOC(buf4r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +! +! compare read and write buffers. +! +DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) + STOP + ENDIF + END DO + END DO +END DO + +CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + +! +! compare dimensions +! +DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF +END DO + +! +! Close the file. +! +CALL h5fclose_f(file_id, errcode) + +! +! Close FORTRAN predefined datatypes. +! +CALL h5close_f(errcode) + +CALL passed() +! +! end function. +! +END SUBROUTINE test_dataset3D + +!------------------------------------------------------------------------- +! test_datasetND +!------------------------------------------------------------------------- + + +SUBROUTINE test_datasetND(rank) + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + INTEGER :: rank ! Dataset rank + + INTEGER, PARAMETER :: DIM1 = 2 ! columns + INTEGER, PARAMETER :: DIM2 = 4 ! rows + INTEGER, PARAMETER :: DIM3 = 2 ! layers + INTEGER, PARAMETER :: DIM4 = 5 ! columns + INTEGER, PARAMETER :: DIM5 = 4 ! rows + INTEGER, PARAMETER :: DIM6 = 3 ! layers + INTEGER, PARAMETER :: DIM7 = 2 ! layers + CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(7) :: dims + INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibuf_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: ibufr_5 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer + INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + CHARACTER(LEN=1) :: ichr1 + TYPE(C_PTR) :: f_ptr + + WRITE(ichr1,'(I1.1)') rank + CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') +! +! Initialize the data array. +! + IF(rank.EQ.4)THEN + + ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + ibuf_4(i,j,k,l) = INT(nn) + rbuf_4(i,j,k,l) = INT(nn) + dbuf_4(i,j,k,l) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + + ELSE IF(rank.EQ.5)THEN + + ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + ibuf_5(i,j,k,l,m) = INT(nn) + rbuf_5(i,j,k,l,m) = INT(nn) + dbuf_5(i,j,k,l,m) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + + ELSE IF(rank.EQ.6)THEN + + ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + ibuf_6(i,j,k,l,m,n) = INT(nn) + rbuf_6(i,j,k,l,m,n) = INT(nn) + dbuf_6(i,j,k,l,m,n) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + + ELSE IF(rank.EQ.7)THEN + + ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + + dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) + + nn = 1 + DO i = 1, DIM1 + DO j = 1, DIM2 + DO k = 1, DIM3 + DO l = 1, DIM4 + DO m = 1, DIM5 + DO n = 1, DIM6 + DO o = 1, DIM7 + ibuf_7(i,j,k,l,m,n,o) = INT(nn) + rbuf_7(i,j,k,l,m,n,o) = INT(nn) + dbuf_7(i,j,k,l,m,n,o) = INT(nn) + nn = nn + 1 + END DO + END DO + END DO + ENDDO + ENDDO + ENDDO + ENDDO + + ENDIF + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT ND buffer + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(ibuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) + ELSE IF(rank.EQ.7)THEN + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(rbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(rbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- + + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(dbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) + ENDIF + + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(dbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! DEALLOCATE RESOURCES + + IF(rank.EQ.4)THEN + DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) + ELSE IF(rank.EQ.5)THEN + DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) + ELSE IF(rank.EQ.6)THEN + DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) + ELSE IF(rank.EQ.7)THEN + DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) + ENDIF + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasetND + + + +!------------------------------------------------------------------------- +! test_datasets +!------------------------------------------------------------------------- + +SUBROUTINE test_datasets() + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER :: errcode ! Error flag + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + INTEGER :: rankr ! Dataset rank + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=8) :: buf1r ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer + INTEGER :: i, n ! general purpose integer + INTEGER :: has ! general purpose integer + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + LOGICAL :: path_valid ! status of the path + CHARACTER(LEN=6) :: chr_exact + CHARACTER(LEN=8) :: chr_lg + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + ! + ! Initialize the data array. + ! + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (integer) ') + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! real + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (float) ') + + + ! + ! write dataset. + ! + f_ptr = C_LOC(buf3(1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) + + ! + ! read dataset. + ! + f_ptr = C_LOC(bufr3(1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (double) ') + + + ! + ! write dataset. + ! + !f_ptr = C_LOC(buf4(1)) + !CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + + ! + ! read dataset. + ! + !f_ptr = C_LOC(buf4(1)) + !CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Make/Read datasets (string) ') + + + ! + ! write dataset. + ! + CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) + + ! + ! read dataset. + ! + CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. buf1r ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', buf1r + STOP + ENDIF + + CALL passed() + + CALL test_begin(' Test h5ltpath_valid_f ') + ! + ! test function h5ltpath_valid_f + ! + chr_exact = "/"//dsetname2 ! test character buffer the exact size needed + CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + chr_lg = "/"//dsetname2 ! test character buffer larger then needed + CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR..NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dataset does not exist + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) + IF(errcode.LT.0.OR.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Create a dangling soft link + CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) + + ! Should pass, does not check for dangled link + CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) + IF(.NOT.path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + ! Should fail, dangled link + CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) + IF(path_valid)THEN + PRINT *, 'error in h5ltpath_valid_f' + STOP + ENDIF + + CALL passed() + + + CALL test_begin(' Get dataset dimensions/info ') + + !------------------------------------------------------------------------- + ! h5ltget_dataset_ndims_f + !------------------------------------------------------------------------- + + CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) + IF ( rankr .NE. rank ) THEN + PRINT *, 'h5ltget_dataset_ndims_f return error' + STOP + ENDIF + + + !------------------------------------------------------------------------- + ! test h5ltfind_dataset_f function + !------------------------------------------------------------------------- + + + has = h5ltfind_dataset_f(file_id,dsetname4) + IF ( has .NE. 1 ) THEN + PRINT *, 'h5ltfind_dataset_f return error' + STOP + ENDIF + + !------------------------------------------------------------------------- + ! test h5ltget_dataset_info_f function + !------------------------------------------------------------------------- + + + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT + PRINT *, 'wrong type class ' + STOP + ENDIF + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_datasets + + + +!------------------------------------------------------------------------- +! test_attributes +!------------------------------------------------------------------------- + +SUBROUTINE test_attributes() + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name + CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file + INTEGER(HID_T) :: file_id ! File identifier +! INTEGER(HID_T) :: file_id1 + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name + CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name + CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer + CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" + CHARACTER(LEN=8) :: bufr1 ! Data buffer + CHARACTER(LEN=10) :: bufr1_lg ! Data buffer +! CHARACTER(LEN=16) :: bufr_c ! Data buffer +! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer + INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer + REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer + REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER :: i, n ! general purpose integer + INTEGER(SIZE_T) size ! size of attribute array + INTEGER :: rankr ! rank + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER, DIMENSION(DIM1) :: buf ! Data buffer + INTEGER(SIZE_T) :: SizeOf_buf_type + TYPE(C_PTR) :: f_ptr + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + ! + ! make a dataset. + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) + + ! + ! Initialize the data array. + ! + size = DIM1 + n = 1 + DO i = 1, DIM1 + buf2(i) = n + buf3(i) = n + buf4(i) = n + n = n + 1 + END DO + + + !------------------------------------------------------------------------- + ! int + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes int ') + + + ! + ! write attribute. + ! + CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) + + ! + ! read attribute. + ! + CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! float + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes float ') + + + ! + ! write attribute. + ! +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf3(1)) +#endif + f_ptr = C_LOC(buf3(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) + !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) + ! + ! read attribute. + ! +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(bufr3(1)) +#endif + + f_ptr = C_LOC(bufr3(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) + !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO + + CALL passed() + + !------------------------------------------------------------------------- + ! double + !------------------------------------------------------------------------- + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(buf4(1)) +#endif + + IF(SizeOf_buf_type.LT.16)THEN ! MSB can't handle 16 byte reals + + CALL test_begin(' Set/Get attributes double ') + + ! + ! write attribute. + ! + f_ptr = C_LOC(buf4(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) + +! CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4, size, errcode) + + ! + ! read attribute. + ! + +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +#else + SizeOf_buf_type = SIZEOF(bufr4(1)) +#endif + + f_ptr = C_LOC(bufr4(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() + + ENDIF + + !------------------------------------------------------------------------- + ! string + !------------------------------------------------------------------------- + + CALL test_begin(' Set/Get attributes string ') + + ! + ! write attribute. + ! + CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) + + ! + ! read attribute into a fortran character buf that is the same size as buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) + + ! + ! compare read and write buffers. + ! + IF ( buf1 .NE. bufr1 ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1 + STOP + ENDIF + + ! + ! read attribute into a fortran character buf that is larger then buf1. + ! + CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) + + ! + ! compare read and write buffers, make sure C NULL character was removed. + ! + IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN + PRINT *, 'larger read buffer differs from write buffer' + PRINT *, buf1, ' and ', bufr1_lg + STOP + ENDIF + + ! + ! ** Test reading a string that was created with a C program ** + ! + +!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) +!!$ +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) +!!$ ! +!!$ ! compare read and write buffers. +!!$ ! +!!$ IF ( bufr_c .NE. buf_c ) THEN +!!$ PRINT *, 'read buffer differs from write buffer' +!!$ PRINT *, bufr1, ' and ', buf_c +!!$ STOP +!!$ ENDIF +!!$ ! +!!$ ! read attribute into a fortran character buf that is larger then buf_c. +!!$ ! +!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) +!!$ +!!$ ! +!!$ ! compare read and write buffers, make sure C NULL character was removed. +!!$ ! +!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN +!!$ PRINT *, 'larger read buffer differs from write buffer' +!!$ PRINT *, buf_c, ' and ', bufr_c_lg +!!$ STOP +!!$ ENDIF + +!!$ CALL h5fclose_f(file_id1, errcode) + + CALL passed() + + !------------------------------------------------------------------------- + ! get attribute rank + !------------------------------------------------------------------------- + + CALL test_begin(' Get attribute rank/info ') + + + CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) + + IF ( rankr .NE. 1 ) THEN + PRINT *, 'h5ltget_attribute_ndims_f return error' + STOP + ENDIF + + + CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! +END SUBROUTINE test_attributes + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 deleted file mode 100644 index d035b89..0000000 --- a/hl/fortran/test/tstlite.f90 +++ /dev/null @@ -1,1628 +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 file contains the FORTRAN90 tests for H5LT -! - -PROGRAM lite_test - - CALL test_dataset1D() - CALL test_dataset2D() - CALL test_dataset3D() - CALL test_datasetND(4) - CALL test_datasetND(5) - CALL test_datasetND(6) - CALL test_datasetND(7) - CALL test_datasets() - CALL test_attributes() - -END PROGRAM lite_test - - -!------------------------------------------------------------------------- -! test_dataset1D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset1D() - -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array -CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions -INTEGER :: rank = 1 ! Dataset rank -INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer -INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer -REAL, DIMENSION(DIM1) :: buf2 ! Data buffer -REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: bufr3 ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER :: i ! general purpose integer - - -CALL test_begin(' Make/Read datasets (1D) ') - -! -! Initialize the data array. -! -DO i = 1, DIM1 - buf1(i) = i; - buf2(i) = i; - buf3(i) = i; -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INTEGER -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr1(i), ' and ', buf1(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset1D - -!------------------------------------------------------------------------- -! test_dataset2D -!------------------------------------------------------------------------- - -SUBROUTINE test_dataset2D() - -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - - -INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns -INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows -CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions -INTEGER :: rank = 2 ! Dataset rank -INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4r ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, n ! general purpose integers - -CALL test_begin(' Make/Read datasets (2D) ') - - -! -! Initialize the data arrays. -! -n=1 -DO i = 1, DIM1*DIM2 - buf(i) = INT(n) - n = n + 1 -END DO - -DO i = 1, dims(1) - DO j = 1, dims(2) - buf2(i,j) = INT((i-1)*dims(2) + j) - buf3(i,j) = INT((i-1)*dims(2) + j) - buf4(i,j) = INT((i-1)*dims(2) + j) - END DO -END DO - - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 2D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j), ' and ', buf2(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j), ' and ', buf3(i,j) - STOP - ENDIF - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j), ' and ', buf4(i,j) - STOP - ENDIF - END DO -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset2D - - -!------------------------------------------------------------------------- -! test_dataset3D -!------------------------------------------------------------------------- - - -SUBROUTINE test_dataset3D() - -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 6 ! columns -INTEGER, PARAMETER :: DIM2 = 4 ! rows -INTEGER, PARAMETER :: DIM3 = 2 ! layers -CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions -INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4r ! Data buffer -INTEGER :: rank = 3 ! Dataset rank -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers -INTEGER :: type_class -INTEGER(SIZE_T) :: type_size - -CALL test_begin(' Make/Read datasets (3D) ') - - -! -! Initialize the data array. -! -n=1 -DO i = 1, DIM1*DIM2*DIM3 - buf(i) = INT(n) - n = n + 1 -END DO - -n = 1 -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - buf2(i,j,k) = INT(n) - buf3(i,j,k) = INT(n) - buf4(i,j,k) = INT(n) - n = n + 1 - END DO - END DO -END DO - -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) - -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2*DIM3 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 3D buffer -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- - -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) - -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) - -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) - STOP - ENDIF - END DO - END DO -END DO - -CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - -! -! compare dimensions -! -DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF -END DO - -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) - -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) - -CALL passed() -! -! end function. -! -END SUBROUTINE test_dataset3D - -!------------------------------------------------------------------------- -! test_datasetND -!------------------------------------------------------------------------- - - -SUBROUTINE test_datasetND(rank) - - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - INTEGER :: rank ! Dataset rank - - INTEGER, PARAMETER :: DIM1 = 2 ! columns - INTEGER, PARAMETER :: DIM2 = 4 ! rows - INTEGER, PARAMETER :: DIM3 = 2 ! layers - INTEGER, PARAMETER :: DIM4 = 5 ! columns - INTEGER, PARAMETER :: DIM5 = 4 ! rows - INTEGER, PARAMETER :: DIM6 = 3 ! layers - INTEGER, PARAMETER :: DIM7 = 2 ! layers - CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), DIMENSION(7) :: dims - INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibuf_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:) :: ibufr_4 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibuf_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: ibufr_5 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibuf_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer - INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbuf_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbufr_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbuf_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: rbufr_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbuf_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbufr_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbuf_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbufr_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbuf_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbufr_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbuf_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbufr_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbuf_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbufr_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbuf_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbufr_7 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - CHARACTER(LEN=1) :: ichr1 - - WRITE(ichr1,'(I1.1)') rank - CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') -! -! Initialize the data array. -! - IF(rank.EQ.4)THEN - - ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - ibuf_4(i,j,k,l) = INT(nn) - rbuf_4(i,j,k,l) = INT(nn) - dbuf_4(i,j,k,l) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - - ELSE IF(rank.EQ.5)THEN - - ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(ibufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - ibuf_5(i,j,k,l,m) = INT(nn) - rbuf_5(i,j,k,l,m) = INT(nn) - dbuf_5(i,j,k,l,m) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - - ELSE IF(rank.EQ.6)THEN - - ALLOCATE(ibuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(ibufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - ibuf_6(i,j,k,l,m,n) = INT(nn) - rbuf_6(i,j,k,l,m,n) = INT(nn) - dbuf_6(i,j,k,l,m,n) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - - ELSE IF(rank.EQ.7)THEN - - ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) - - dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) - - nn = 1 - DO i = 1, DIM1 - DO j = 1, DIM2 - DO k = 1, DIM3 - DO l = 1, DIM4 - DO m = 1, DIM5 - DO n = 1, DIM6 - DO o = 1, DIM7 - ibuf_7(i,j,k,l,m,n,o) = INT(nn) - rbuf_7(i,j,k,l,m,n,o) = INT(nn) - dbuf_7(i,j,k,l,m,n,o) = INT(nn) - nn = nn + 1 - END DO - END DO - END DO - ENDDO - ENDDO - ENDDO - ENDDO - - ENDIF - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - !------------------------------------------------------------------------- - ! H5T_NATIVE_INT ND buffer - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_5, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_5, dims(1:rank), errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_7, dims(1:rank), errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( ibuf_4(i,j,k,l) .NE. ibufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_4(i,j,k,l), ' and ', ibufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( ibuf_5(i,j,k,l,m) .NE. ibufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_5(i,j,k,l,m), ' and ', ibufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( ibuf_6(i,j,k,l,m,n) .NE. ibufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_6(i,j,k,l,m,n), ' and ', ibufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( ibuf_7(i,j,k,l,m,n,o) .NE. ibufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, ibuf_7(i,j,k,l,m,n,o), ' and ', ibufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - !------------------------------------------------------------------------- - ! H5T_NATIVE_REAL - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_5, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_4, dims(1:rank), errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_5, dims(1:rank), errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_6, dims(1:rank), errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_7, dims(1:rank), errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( rbuf_4(i,j,k,l) .NE. rbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_4(i,j,k,l), ' and ', rbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( rbuf_5(i,j,k,l,m) .NE. rbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_5(i,j,k,l,m), ' and ', rbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( rbuf_6(i,j,k,l,m,n) .NE. rbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_6(i,j,k,l,m,n), ' and ', rbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( rbuf_7(i,j,k,l,m,n,o) .NE. rbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, rbuf_7(i,j,k,l,m,n,o), ' and ', rbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - !------------------------------------------------------------------------- - ! H5T_NATIVE_DOUBLE - !------------------------------------------------------------------------- - - ! - ! write dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_4, errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_5, errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_6, errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_7, errcode) - ENDIF - - - ! - ! read dataset. - ! - IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_4, dims(1:rank), errcode) - ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_5, dims(1:rank), errcode) - ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_6, dims(1:rank), errcode) - ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_7, dims(1:rank), errcode) - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - DO l = 1, dims(4) - IF(rank.EQ.4)THEN - IF ( dbuf_4(i,j,k,l) .NE. dbufr_4(i,j,k,l) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_4(i,j,k,l), ' and ', dbufr_4(i,j,k,l) - STOP - ENDIF - ENDIF - DO m = 1, dims(5) - IF(rank.EQ.5)THEN - IF ( dbuf_5(i,j,k,l,m) .NE. dbufr_5(i,j,k,l,m) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_5(i,j,k,l,m), ' and ', dbufr_5(i,j,k,l,m) - STOP - ENDIF - ENDIF - DO n = 1, dims(6) - IF(rank.EQ.6)THEN - IF ( dbuf_6(i,j,k,l,m,n) .NE. dbufr_6(i,j,k,l,m,n) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_6(i,j,k,l,m,n), ' and ', dbufr_6(i,j,k,l,m,n) - STOP - ENDIF - ENDIF - DO o = 1, dims(7) - IF(rank.EQ.7)THEN - IF ( dbuf_7(i,j,k,l,m,n,o) .NE. dbufr_7(i,j,k,l,m,n,o) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, dbuf_7(i,j,k,l,m,n,o), ' and ', dbufr_7(i,j,k,l,m,n,o) - STOP - ENDIF - ENDIF - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - ENDDO - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! DEALLOCATE RESOURCES - - IF(rank.EQ.4)THEN - DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) - ELSE IF(rank.EQ.5)THEN - DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) - ELSE IF(rank.EQ.6)THEN - DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) - ELSE IF(rank.EQ.7)THEN - DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) - ENDIF - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasetND - - - -!------------------------------------------------------------------------- -! test_datasets -!------------------------------------------------------------------------- - -SUBROUTINE test_datasets() - - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER :: errcode ! Error flag - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name - CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - INTEGER :: rankr ! Dataset rank - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=8) :: buf1r ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1) :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer - INTEGER :: i, n ! general purpose integer - INTEGER :: has ! general purpose integer - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - LOGICAL :: path_valid ! status of the path - CHARACTER(LEN=6) :: chr_exact - CHARACTER(LEN=8) :: chr_lg - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - ! - ! Initialize the data array. - ! - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (integer) ') - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname2, rank, dims, buf2, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_int_f(file_id, dsetname2, bufr2, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! real - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (float) ') - - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_float_f(file_id, dsetname3, rank, dims, buf3, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_float_f(file_id, dsetname3, bufr3, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (double) ') - - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Make/Read datasets (string) ') - - - ! - ! write dataset. - ! - CALL h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) - - ! - ! read dataset. - ! - CALL h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. buf1r ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', buf1r - STOP - ENDIF - - CALL passed() - - CALL test_begin(' Test h5ltpath_valid_f ') - ! - ! test function h5ltpath_valid_f - ! - chr_exact = "/"//dsetname2 ! test character buffer the exact size needed - CALL h5ltpath_valid_f(file_id, chr_exact, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - chr_lg = "/"//dsetname2 ! test character buffer larger then needed - CALL h5ltpath_valid_f(file_id, chr_lg, .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, chr_lg, .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR..NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dataset does not exist - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .FALSE., path_valid, errcode) - IF(errcode.LT.0.OR.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Create a dangling soft link - CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) - - ! Should pass, does not check for dangled link - CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) - IF(.NOT.path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - ! Should fail, dangled link - CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) - IF(path_valid)THEN - PRINT *, 'error in h5ltpath_valid_f' - STOP - ENDIF - - CALL passed() - - - CALL test_begin(' Get dataset dimensions/info ') - - !------------------------------------------------------------------------- - ! h5ltget_dataset_ndims_f - !------------------------------------------------------------------------- - - CALL h5ltget_dataset_ndims_f(file_id, dsetname4, rankr, errcode) - IF ( rankr .NE. rank ) THEN - PRINT *, 'h5ltget_dataset_ndims_f return error' - STOP - ENDIF - - - !------------------------------------------------------------------------- - ! test h5ltfind_dataset_f function - !------------------------------------------------------------------------- - - - has = h5ltfind_dataset_f(file_id,dsetname4) - IF ( has .NE. 1 ) THEN - PRINT *, 'h5ltfind_dataset_f return error' - STOP - ENDIF - - !------------------------------------------------------------------------- - ! test h5ltget_dataset_info_f function - !------------------------------------------------------------------------- - - - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - IF ( type_class .NE. 1 ) THEN ! H5T_FLOAT - PRINT *, 'wrong type class ' - STOP - ENDIF - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_datasets - - - -!------------------------------------------------------------------------- -! test_attributes -!------------------------------------------------------------------------- - -SUBROUTINE test_attributes() - - USE H5LT ! module of H5LT - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name - CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file - INTEGER(HID_T) :: file_id ! File identifier -! INTEGER(HID_T) :: file_id1 - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array - CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname4 = "attr4" ! Attribute name - CHARACTER(LEN=5), PARAMETER :: attrname5 = "attr5" ! Attribute name - CHARACTER(LEN=8), PARAMETER :: buf1 = "mystring" ! Data buffer - CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" - CHARACTER(LEN=8) :: bufr1 ! Data buffer - CHARACTER(LEN=10) :: bufr1_lg ! Data buffer -! CHARACTER(LEN=16) :: bufr_c ! Data buffer -! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer - INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer - INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1) :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER :: i, n ! general purpose integer - INTEGER(SIZE_T) size ! size of attribute array - INTEGER :: rankr ! rank - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr ! attribute dimensions - INTEGER :: type_class - INTEGER(SIZE_T) :: type_size - INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions - INTEGER :: rank = 1 ! Dataset rank - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER, DIMENSION(DIM1) :: buf ! Data buffer - - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - ! - ! make a dataset. - ! - CALL h5ltmake_dataset_int_f(file_id, dsetname1, rank, dims, buf, errcode) - - ! - ! Initialize the data array. - ! - size = DIM1 - n = 1 - DO i = 1, DIM1 - buf2(i) = n - buf3(i) = n - buf4(i) = n - n = n + 1 - END DO - - - !------------------------------------------------------------------------- - ! int - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes int ') - - - ! - ! write attribute. - ! - CALL h5ltset_attribute_int_f(file_id,dsetname1,attrname2,buf2,size,errcode) - - ! - ! read attribute. - ! - CALL h5ltget_attribute_int_f(file_id,dsetname1,attrname2,bufr2,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! float - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes float ') - - - ! - ! write attribute. - ! - CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) - ! - ! read attribute. - ! - CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! double - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes double ') - - ! - ! write attribute. - ! - CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4,size,errcode) - - ! - ! read attribute. - ! - CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() - - !------------------------------------------------------------------------- - ! string - !------------------------------------------------------------------------- - - CALL test_begin(' Set/Get attributes string ') - - ! - ! write attribute. - ! - CALL h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) - - ! - ! read attribute into a fortran character buf that is the same size as buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) - - ! - ! compare read and write buffers. - ! - IF ( buf1 .NE. bufr1 ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1 - STOP - ENDIF - - ! - ! read attribute into a fortran character buf that is larger then buf1. - ! - CALL h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1_lg,errcode) - - ! - ! compare read and write buffers, make sure C NULL character was removed. - ! - IF ( buf1(1:8) .NE. bufr1_lg(1:8) .AND. bufr1_lg(9:10) .NE. ' ' ) THEN - PRINT *, 'larger read buffer differs from write buffer' - PRINT *, buf1, ' and ', bufr1_lg - STOP - ENDIF - - ! - ! ** Test reading a string that was created with a C program ** - ! - -!!$ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file_id1, errcode) -!!$ -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c, errcode) -!!$ ! -!!$ ! compare read and write buffers. -!!$ ! -!!$ IF ( bufr_c .NE. buf_c ) THEN -!!$ PRINT *, 'read buffer differs from write buffer' -!!$ PRINT *, bufr1, ' and ', buf_c -!!$ STOP -!!$ ENDIF -!!$ ! -!!$ ! read attribute into a fortran character buf that is larger then buf_c. -!!$ ! -!!$ CALL h5ltget_attribute_string_f(file_id1, "/", "attr5", bufr_c_lg, errcode) -!!$ -!!$ ! -!!$ ! compare read and write buffers, make sure C NULL character was removed. -!!$ ! -!!$ IF ( buf_c(1:16) .NE. bufr_c_lg(1:16) .AND. bufr_c_lg(17:18) .NE. ' ' ) THEN -!!$ PRINT *, 'larger read buffer differs from write buffer' -!!$ PRINT *, buf_c, ' and ', bufr_c_lg -!!$ STOP -!!$ ENDIF - -!!$ CALL h5fclose_f(file_id1, errcode) - - CALL passed() - - !------------------------------------------------------------------------- - ! get attribute rank - !------------------------------------------------------------------------- - - CALL test_begin(' Get attribute rank/info ') - - - CALL h5ltget_attribute_ndims_f(file_id,dsetname1,attrname2,rankr,errcode) - - IF ( rankr .NE. 1 ) THEN - PRINT *, 'h5ltget_attribute_ndims_f return error' - STOP - ENDIF - - - CALL h5ltget_attribute_info_f(file_id,dsetname1,attrname2,dimsr,type_class,type_size,errcode) - - ! - ! compare dimensions - ! - DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF - END DO - - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - CALL passed() - ! - ! end function. - ! -END SUBROUTINE test_attributes - - - - - - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 new file mode 100644 index 0000000..74029a5 --- /dev/null +++ b/hl/fortran/test/tsttable.F90 @@ -0,0 +1,534 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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 file contains the FORTRAN90 tests for H5LT +! +#include + +PROGRAM table_test + + CALL test_table1() + +END PROGRAM table_test + + +!------------------------------------------------------------------------- +! test_table1 +!------------------------------------------------------------------------- + +SUBROUTINE test_table1() + + USE H5TB ! module of H5TB + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields + INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords + CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset + INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types + INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size + INTEGER, PARAMETER :: compress = 0 ! compress + INTEGER :: errcode = 0 ! Error flag + INTEGER :: i ! general purpose integer + INTEGER(SIZE_T) :: type_size ! Size of the datatype + INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype + INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype + INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype + INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype + INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) + INTEGER(SIZE_T) :: offset ! Member's offset + INTEGER(HSIZE_T) :: start = 0 ! start record + INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer + INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer + REAL, DIMENSION(nrecords) :: bufr ! Data buffer + REAL, DIMENSION(nrecords) :: bufrr ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer + DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer + CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer + INTEGER(HSIZE_T) :: nfieldsr ! nfields + INTEGER(HSIZE_T) :: nrecordsr ! nrecords + CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset + INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes + INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype + INTEGER :: maxlen = 0 ! max chararter length of a field name + INTEGER :: Cs_sizeof_double = H5_SIZEOF_DOUBLE ! C's sizeof double + INTEGER :: SIZEOF_X + LOGICAL :: Exclude_double + + ! Find size of DOUBLE PRECISION +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SIZEOF_X = storage_size(bufd(1))/storage_size(c_char_'a') +#else + SIZEOF_X = SIZEOF(bufd(1)) +#endif + + ! If Fortran DOUBLE PRECISION and C DOUBLE sizeofs don't match then disable + ! creating a DOUBLE RECISION field, and instead create a REAL field. This + ! is needed to handle when DOUBLE PRECISION is promoted via a compiler flag. + Exclude_double = .FALSE. + IF(Cs_sizeof_double.NE.SIZEOF_X)THEN + Exclude_double = .TRUE. + ENDIF + + ! + ! Initialize the data arrays. + ! + DO i = 1, nrecords + bufi(i) = i + bufr(i) = i + bufd(i) = i + END DO + + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) + + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + + + !------------------------------------------------------------------------- + ! make table + ! initialize the table parameters + !------------------------------------------------------------------------- + + field_names(1) = "field1" + field_names(2) = "field2a" + field_names(3) = "field3ab" + field_names(4) = "field4abc" + + ! + ! calculate total size by calculating sizes of each member + ! + CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) + type_size = 2 + CALL h5tset_size_f(type_id_c, type_size, errcode) + CALL h5tget_size_f(type_id_c, type_sizec, errcode) + CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) + IF(exclude_double)THEN + CALL h5tget_size_f(H5T_NATIVE_REAL, type_sized, errcode) + ELSE + CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) + ENDIF + CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) + type_size = type_sizec + type_sizei + type_sized + type_sizer + + ! + ! type ID's + ! + field_types(1) = type_id_c + field_types(2) = H5T_NATIVE_INTEGER + IF(exclude_double)THEN + field_types(3) = H5T_NATIVE_REAL + ELSE + field_types(3) = H5T_NATIVE_DOUBLE + ENDIF + field_types(4) = H5T_NATIVE_REAL + + ! + ! offsets + ! + offset = 0 + field_offset(1) = offset + offset = offset + type_sizec ! Offset of the second memeber is 2 + field_offset(2) = offset + offset = offset + type_sizei ! Offset of the second memeber is 6 + field_offset(3) = offset + offset = offset + type_sized ! Offset of the second memeber is 14 + field_offset(4) = offset + + !------------------------------------------------------------------------- + ! make table + !------------------------------------------------------------------------- + + CALL test_begin(' Make table ') + + CALL h5tbmake_table_f(dsetname1,& + file_id,& + dsetname1,& + nfields,& + nrecords,& + type_size,& + field_names,& + field_offset,& + field_types,& + chunk_size,& + compress,& + errcode ) + + CALL passed() + + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by name ') + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufi,errcode) + IF(exclude_double)THEN + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufr,errcode) + ELSE + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufd,errcode) + ENDIF + + CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufr,errcode) + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + ! Read an invalid field, should fail + CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& + bufsr,errcode) + + IF(errcode.GE.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! Read a valid field, should pass + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& + bufsr,errcode) + IF(errcode.LT.0)THEN + PRINT *, 'error in h5tbread_field_name_f' + CALL h5fclose_f(file_id, errcode) + CALL h5close_f(errcode) + STOP + ENDIF + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& + bufir,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + + IF(exclude_double)THEN + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + ELSE + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + ENDIF + + + + CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! write field + !------------------------------------------------------------------------- + + CALL test_begin(' Read/Write field by index ') + + CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufs,errcode) + + CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufi,errcode) + + IF(exclude_double)THEN + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufr,errcode) + ELSE + CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufd,errcode) + ENDIF + + CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufr,errcode) + + + + !------------------------------------------------------------------------- + ! read field + !------------------------------------------------------------------------- + + CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& + bufsr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufsr(i) .NE. bufs(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufsr(i), ' and ', bufs(i) + STOP + ENDIF + END DO + + CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& + bufir,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufir(i) .NE. bufi(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufir(i), ' and ', bufi(i) + STOP + ENDIF + END DO + IF(exclude_double)THEN + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + ELSE + CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& + bufdr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufdr(i) .NE. bufd(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufdr(i), ' and ', bufd(i) + STOP + ENDIF + END DO + ENDIF + + CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& + bufrr,errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + + !------------------------------------------------------------------------- + ! Insert field + ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) + !------------------------------------------------------------------------- + + CALL test_begin(' Insert field ') + + CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) + CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& + bufrr,errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, nrecords + IF ( bufrr(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufrr(i), ' and ', bufr(i) + STOP + ENDIF + END DO + + + CALL passed() + + !------------------------------------------------------------------------- + ! Delete field + !------------------------------------------------------------------------- + + CALL test_begin(' Delete field ') + + CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) + + CALL passed() + + + !------------------------------------------------------------------------- + ! Gets the number of records and fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get table info ') + + CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) + + IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN + PRINT *, 'h5tbget_table_info_f return error' + STOP + ENDIF + + CALL passed() + + !------------------------------------------------------------------------- + ! Get information about fields + !------------------------------------------------------------------------- + + CALL test_begin(' Get fields info ') + + CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& + field_offsetr, type_sizeout, errcode, maxlen ) + + IF ( errcode.NE.0 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') + STOP + ENDIF + + ! "field4abc" was deleted and "field5" was added. + field_names(4) = "field5" + + IF ( maxlen .NE. 8 ) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') + WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 + STOP + ENDIF + + DO i = 1, nfields + IF ( field_namesr(i) .NE. field_names(i)) THEN + WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') + WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) + STOP + ENDIF + END DO + + CALL passed() + + + !------------------------------------------------------------------------- + ! end + !------------------------------------------------------------------------- + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + ! + ! end function. + ! +END SUBROUTINE test_table1 + + +!------------------------------------------------------------------------- +! test_begin +!------------------------------------------------------------------------- + +SUBROUTINE test_begin(string) + CHARACTER(LEN=*), INTENT(IN) :: string + WRITE(*, fmt = '(14a)', advance = 'no') string + WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' +END SUBROUTINE test_begin + +!------------------------------------------------------------------------- +! passed +!------------------------------------------------------------------------- + +SUBROUTINE passed() + WRITE(*, fmt = '(6a)') 'PASSED' +END SUBROUTINE passed + + diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90 deleted file mode 100644 index bb88abf..0000000 --- a/hl/fortran/test/tsttable.f90 +++ /dev/null @@ -1,466 +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 file contains the FORTRAN90 tests for H5LT -! - -PROGRAM table_test - - CALL test_table1() - - -END PROGRAM table_test - - -!------------------------------------------------------------------------- -! test_table1 -!------------------------------------------------------------------------- - -SUBROUTINE test_table1() - - USE H5TB ! module of H5TB - USE HDF5 ! module of HDF5 library - - IMPLICIT NONE - - CHARACTER(len=8), PARAMETER :: filename = "f1tab.h5" ! File name - CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name - INTEGER(HID_T) :: file_id ! File identifier - INTEGER(HSIZE_T), PARAMETER :: nfields = 4 ! nfields - INTEGER(HSIZE_T), PARAMETER :: nrecords = 5 ! nrecords - CHARACTER(LEN=10),DIMENSION(1:nfields) :: field_names ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offset ! field offset - INTEGER(HID_T), DIMENSION(1:nfields) :: field_types ! field types - INTEGER(HSIZE_T), PARAMETER :: chunk_size = 5 ! chunk size - INTEGER, PARAMETER :: compress = 0 ! compress - INTEGER :: errcode = 0 ! Error flag - INTEGER :: i ! general purpose integer - INTEGER(SIZE_T) :: type_size ! Size of the datatype - INTEGER(SIZE_T) :: type_sizec ! Size of the character datatype - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(HID_T) :: type_id_c ! Memory datatype identifier (for character field) - INTEGER(SIZE_T) :: offset ! Member's offset - INTEGER(HSIZE_T) :: start = 0 ! start record - INTEGER, DIMENSION(nrecords) :: bufi ! Data buffer - INTEGER, DIMENSION(nrecords) :: bufir ! Data buffer - REAL, DIMENSION(nrecords) :: bufr ! Data buffer - REAL, DIMENSION(nrecords) :: bufrr ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufd ! Data buffer - DOUBLE PRECISION, DIMENSION(nrecords) :: bufdr ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords), PARAMETER :: bufs = (/"AB","CD","EF","GH","IJ"/) ! Data buffer - CHARACTER(LEN=2), DIMENSION(nrecords) :: bufsr ! Data buffer - INTEGER(HSIZE_T) :: nfieldsr ! nfields - INTEGER(HSIZE_T) :: nrecordsr ! nrecords - CHARACTER(LEN=9), DIMENSION(1:nfields) :: field_namesr ! field names - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_offsetr ! field offset - INTEGER(SIZE_T), DIMENSION(1:nfields) :: field_sizesr ! field sizes - INTEGER(SIZE_T) :: type_sizeout = 0 ! size of the datatype - INTEGER :: maxlen = 0 ! max chararter length of a field name - - - ! - ! Initialize the data arrays. - ! - DO i = 1, nrecords - bufi(i) = i - bufr(i) = i - bufd(i) = i - END DO - - ! - ! Initialize FORTRAN predefined datatypes. - ! - CALL h5open_f(errcode) - - ! - ! Create a new file using default properties. - ! - CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) - - - !------------------------------------------------------------------------- - ! make table - ! initialize the table parameters - !------------------------------------------------------------------------- - - field_names(1) = "field1" - field_names(2) = "field2a" - field_names(3) = "field3ab" - field_names(4) = "field4abc" - - ! - ! calculate total size by calculating sizes of each member - ! - CALL h5tcopy_f(H5T_NATIVE_CHARACTER, type_id_c, errcode) - type_size = 2 - CALL h5tset_size_f(type_id_c, type_size, errcode) - CALL h5tget_size_f(type_id_c, type_sizec, errcode) - CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, errcode) - CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, errcode) - CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, errcode) - type_size = type_sizec + type_sizei + type_sized + type_sizer - - ! - ! type ID's - ! - field_types(1) = type_id_c - field_types(2) = H5T_NATIVE_INTEGER - field_types(3) = H5T_NATIVE_DOUBLE - field_types(4) = H5T_NATIVE_REAL - - ! - ! offsets - ! - offset = 0 - field_offset(1) = offset - offset = offset + type_sizec ! Offset of the second memeber is 2 - field_offset(2) = offset - offset = offset + type_sizei ! Offset of the second memeber is 6 - field_offset(3) = offset - offset = offset + type_sized ! Offset of the second memeber is 14 - field_offset(4) = offset - - !------------------------------------------------------------------------- - ! make table - !------------------------------------------------------------------------- - - CALL test_begin(' Make table ') - - CALL h5tbmake_table_f(dsetname1,& - file_id,& - dsetname1,& - nfields,& - nrecords,& - type_size,& - field_names,& - field_offset,& - field_types,& - chunk_size,& - compress,& - errcode ) - - CALL passed() - - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by name ') - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufi,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufd,errcode) - - CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufr,errcode) - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - ! Read an invalid field, should fail - CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,& - bufsr,errcode) - - IF(errcode.GE.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! Read a valid field, should pass - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,& - bufsr,errcode) - IF(errcode.LT.0)THEN - PRINT *, 'error in h5tbread_field_name_f' - CALL h5fclose_f(file_id, errcode) - CALL h5close_f(errcode) - STOP - ENDIF - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(2),start,nrecords,type_sizei,& - bufir,errcode) - - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(3),start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - !------------------------------------------------------------------------- - ! write field - !------------------------------------------------------------------------- - - CALL test_begin(' Read/Write field by index ') - - CALL h5tbwrite_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufs,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufi,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufd,errcode) - - CALL h5tbwrite_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufr,errcode) - - - - !------------------------------------------------------------------------- - ! read field - !------------------------------------------------------------------------- - - CALL h5tbread_field_index_f(file_id,dsetname1,1,start,nrecords,type_sizec,& - bufsr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufsr(i) .NE. bufs(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufsr(i), ' and ', bufs(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,2,start,nrecords,type_sizei,& - bufir,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufir(i) .NE. bufi(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufir(i), ' and ', bufi(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,3,start,nrecords,type_sized,& - bufdr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufdr(i) .NE. bufd(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufdr(i), ' and ', bufd(i) - STOP - ENDIF - END DO - - CALL h5tbread_field_index_f(file_id,dsetname1,4,start,nrecords,type_sizer,& - bufrr,errcode) - - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - - !------------------------------------------------------------------------- - ! Insert field - ! we insert a field callsed "field5" with the same type and buffer as field 4 (Real) - !------------------------------------------------------------------------- - - CALL test_begin(' Insert field ') - - CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode) - CALL h5tbread_field_index_f(file_id,dsetname1,5,start,nrecords,type_sizer,& - bufrr,errcode) - ! - ! compare read and write buffers. - ! - DO i = 1, nrecords - IF ( bufrr(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufrr(i), ' and ', bufr(i) - STOP - ENDIF - END DO - - - CALL passed() - - !------------------------------------------------------------------------- - ! Delete field - !------------------------------------------------------------------------- - - CALL test_begin(' Delete field ') - - CALL h5tbdelete_field_f(file_id,dsetname1,"field4abc",errcode) - - CALL passed() - - - !------------------------------------------------------------------------- - ! Gets the number of records and fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get table info ') - - CALL h5tbget_table_info_f(file_id,dsetname1,nfieldsr,nrecordsr,errcode ) - - IF ( nfieldsr .NE. nfields .AND. nrecordsr .NE. nrecords ) THEN - PRINT *, 'h5tbget_table_info_f return error' - STOP - ENDIF - - CALL passed() - - !------------------------------------------------------------------------- - ! Get information about fields - !------------------------------------------------------------------------- - - CALL test_begin(' Get fields info ') - - CALL h5tbget_field_info_f(file_id, dsetname1, nfields, field_namesr, field_sizesr,& - field_offsetr, type_sizeout, errcode, maxlen ) - - IF ( errcode.NE.0 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') - STOP - ENDIF - - ! "field4abc" was deleted and "field5" was added. - field_names(4) = "field5" - - IF ( maxlen .NE. 8 ) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: INCORRECT MAXIMUM CHARACTER LENGTH OF THE FIELD NAMES")') - WRITE(*,'(5X,"RETURNED VALUE = ", I0, ", CORRECT VALUE = ", I0)') maxlen, 8 - STOP - ENDIF - - DO i = 1, nfields - IF ( field_namesr(i) .NE. field_names(i)) THEN - WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: READ/WRITE FIELD NAMES DIFFER")') - WRITE(*,'(27X,A," AND ",A)') TRIM(field_namesr(i)), TRIM(field_names(i)) - STOP - ENDIF - END DO - - CALL passed() - - - !------------------------------------------------------------------------- - ! end - !------------------------------------------------------------------------- - - ! - ! Close the file. - ! - CALL h5fclose_f(file_id, errcode) - - ! - ! Close FORTRAN predefined datatypes. - ! - CALL h5close_f(errcode) - - ! - ! end function. - ! -END SUBROUTINE test_table1 - - -!------------------------------------------------------------------------- -! test_begin -!------------------------------------------------------------------------- - -SUBROUTINE test_begin(string) - CHARACTER(LEN=*), INTENT(IN) :: string - WRITE(*, fmt = '(14a)', advance = 'no') string - WRITE(*, fmt = '(40x,a)', advance = 'no') ' ' -END SUBROUTINE test_begin - -!------------------------------------------------------------------------- -! passed -!------------------------------------------------------------------------- - -SUBROUTINE passed() - WRITE(*, fmt = '(6a)') 'PASSED' -END SUBROUTINE passed - - diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index d5b0b1e..8039d15 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -165,7 +166,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -450,14 +451,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -467,13 +475,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -515,6 +522,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 6fc324b..4614152 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = H5srcdir_str.h CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = test_lite$(EXEEXT) test_image$(EXEEXT) \ @@ -168,7 +169,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -487,14 +488,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -504,13 +512,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -552,6 +559,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 77049d3..653c273 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -449,14 +450,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -466,13 +474,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -514,6 +521,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 3da84e1..6ebf126 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h52giftest.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -150,7 +151,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -463,14 +464,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -480,13 +488,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -528,6 +535,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index cda2fee..b7ce048 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -63,6 +63,20 @@ dnl was required" problem when libtool is also used dnl [1] MPICH.org dnl +dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" + +AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[ + HAVE_ISO_FORTRAN_ENV="no" + AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + USE, INTRINSIC :: ISO_FORTRAN_ENV + END PROGRAM + ])],[AC_MSG_RESULT([yes]) + HAVE_ISO_FORTRAN_ENV="yes"], + [AC_MSG_RESULT([no])]) +]) + dnl See if the fortran compiler supports the intrinsic function "SIZEOF" AC_DEFUN([PAC_PROG_FC_SIZEOF],[ @@ -111,38 +125,56 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) -dnl Check to see if -r8 was specified to determine if we need to -dnl compile the DOUBLE PRECISION interfaces. +dnl Check to see C_LONG_DOUBLE is available + +AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ + HAVE_C_LONG_DOUBLE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_LONG_DOUBLE]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + REAL(KIND=C_LONG_DOUBLE) :: d + END PROGRAM + ])], [AC_MSG_RESULT([yes]) + HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + +dnl Check if C_LONG_DOUBLE is different from C_DOUBLE -AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ - FORTRAN_DEFAULT_REALisDBLE="no" - AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) +if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then +AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ MODULE type_mod + USE ISO_C_BINDING INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double END INTERFACE CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double END MODULE type_mod PROGRAM main + USE ISO_C_BINDING USE type_mod - REAL :: r - DOUBLE PRECISION :: d + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d CALL h5t(r) CALL h5t(d) END PROGRAM main - ])], [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - FORTRAN_DEFAULT_REALisDBLE="yes"]) + ])], [AC_MSG_RESULT([yes]) + C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) ]) +fi dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. @@ -152,7 +184,6 @@ AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ dnl -------------------------------------------------------------------- dnl Default for FORTRAN 2003 compliant compilers dnl - HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ @@ -280,4 +311,280 @@ dnl Try link a simple MPI program. dnl Change to the C language AC_LANG_POP(Fortran) ]) + +dnl ------------------------------------------------------ +dnl Determine the available KINDs for REALs and INTEGERs +dnl ------------------------------------------------------ +dnl +dnl This is a runtime test. +dnl +AC_DEFUN([PAC_FC_AVAIL_KINDS],[ +AC_LANG_PUSH([Fortran]) +rm -f pac_fconftest.out + +AC_RUN_IFELSE([ + AC_LANG_SOURCE([ + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind, max_decimal_prec + INTEGER :: num_rkinds, num_ikinds + num_ikinds = 0 + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE='pac_fconftest.out', form='formatted') + ! Find integer KINDs + DO ik=2,36 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1) THEN + num_ikinds = num_ikinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + ! Find real KINDs + num_rkinds = 0 + lastkind=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + DO ik=2,36 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)',ADVANCE='NO') lastkind + lastkind = k + IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' + max_decimal_prec = ik + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (lastkind.NE.-1)THEN + num_rkinds = num_rkinds + 1 + WRITE(8,'(I0)') lastkind + ELSE + WRITE(8,'()') + ENDIF + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds + END + ]) +],[ + if test -s pac_fconftest.out ; then + dnl The output from the above program will be: + dnl -- LINE 1 -- valid integer kinds (comma seperated list) + dnl -- LINE 2 -- valid real kinds (comma seperated list) + dnl -- LINE 3 -- max decimal precision for reals + dnl -- LINE 4 -- number of valid integer kinds + dnl -- LINE 5 -- number of valid real kinds + + pac_validIntKinds="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + pac_validRealKinds="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FC_MAX_REAL_PRECISION="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" + AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision]) + + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" + + H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" + H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" + + AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs]) + AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs]) + + AC_MSG_CHECKING([for Fortran INTEGER KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) + AC_MSG_CHECKING([for Fortran REAL KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + AC_MSG_CHECKING([for Fortran REALs maximum decimal precision]) + AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION]) + else + AC_MSG_RESULT([Error]) + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out +],[ + AC_MSG_RESULT([Error]) + AC_MSG_WARN([Failed to run program to determine available KINDs]) +],[]) + +AC_LANG_POP([Fortran]) +]) +AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out + +for kind in `echo $pac_validIntKinds | perl -pe 's/,/ /g'`; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=$kind) a + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" +AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available REAL KINDs]) +AC_LANG_PUSH([Fortran]) +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in `echo $pac_validRealKinds| perl -pe 's/,/ /g'`; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=$kind) :: a + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,'(I0)') $FC_SIZEOF_A + CLOSE(8) + END + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_real_sizeof="$2" + ]) +done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | perl -pe 's/,$//' | perl -pe 's/ //g'`}" +AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_NATIVE_INTEGER],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of native KINDS]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER a + REAL b + DOUBLE PRECISION c + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + WRITE(8,*) $FC_SIZEOF_A + WRITE(8,*) kind(a) + WRITE(8,*) $FC_SIZEOF_B + WRITE(8,*) kind(b) + WRITE(8,*) $FC_SIZEOF_C + WRITE(8,*) kind(c) + CLOSE(8) + END + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + PAC_FORTRAN_NATIVE_INTEGER_KIND="`perl -ne '$. == 1 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`perl -ne '$. == 2 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`perl -ne '$. == 3 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`perl -ne '$. == 4 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`perl -ne '$. == 5 && print && exit' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`perl -ne '$. == 6 && print && exit' pac_fconftest.out`" + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +AC_MSG_RESULT([$pack_int_sizeof]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_LDBL_DIG],[ +AC_MSG_CHECKING([maximum decimal precision for C]) +rm -f pac_Cconftest.out + AC_LANG_CONFTEST([ + AC_LANG_PROGRAM([ + #include + #include + #define CHECK_FLOAT128 $ac_cv_sizeof___float128 + #if CHECK_FLOAT128!=0 + # if $HAVE_QUADMATH!=0 + #include + # endif + # ifdef FLT128_DIG + #define C_FLT128_DIG FLT128_DIG + # else + #define C_FLT128_DIG 0 + # endif + #else + #define C_FLT128_DIG 0 + #endif + #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + ],[[ + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); + ]]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_Cconftest.out ; then + LDBL_DIG="`perl -ne '$. == 1 && print && exit' pac_Cconftest.out`" + FLT128_DIG="`perl -ne '$. == 2 && print && exit' pac_Cconftest.out`" + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_Cconftest.out + ],[ + AC_MSG_ERROR([C program fails to build or run!]) + ],[]) +]) + + diff --git a/src/H5config.h.in b/src/H5config.h.in index c0f4466..ad8dcf9 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -30,6 +30,39 @@ /* As FC_FUNC, but for C identifiers containing underscores. */ #undef FC_FUNC_ +/* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */ +#undef FORTRAN_C_LONG_DOUBLE_IS_UNIQUE + +/* Define if we have Fortran C_LONG_DOUBLE */ +#undef FORTRAN_HAVE_C_LONG_DOUBLE + +/* Define if we have Fortran intrinsic C_SIZEOF */ +#undef FORTRAN_HAVE_C_SIZEOF + +/* Define if we have Fortran intrinsic SIZEOF */ +#undef FORTRAN_HAVE_SIZEOF + +/* Define if we have Fortran intrinsic STORAGE_SIZE */ +#undef FORTRAN_HAVE_STORAGE_SIZE + +/* Determine the size of C long double */ +#undef FORTRAN_SIZEOF_LONG_DOUBLE + +/* Define valid Fortran INTEGER KINDs */ +#undef H5CONFIG_F_IKIND + +/* Define number of valid Fortran INTEGER KINDs */ +#undef H5CONFIG_F_NUM_IKIND + +/* Define number of valid Fortran REAL KINDs */ +#undef H5CONFIG_F_NUM_RKIND + +/* Define valid Fortran REAL KINDs */ +#undef H5CONFIG_F_RKIND + +/* Define valid Fortran REAL KINDs Sizeof */ +#undef H5CONFIG_F_RKIND_SIZEOF + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -82,6 +115,9 @@ /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP +/* Determine if __float128 is available */ +#undef HAVE_FLOAT128 + /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK @@ -112,6 +148,9 @@ /* Define if the compiler understands the __FUNCTION__ keyword */ #undef HAVE_FUNCTION +/* Determine if INTEGER*16 is available */ +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + /* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ #undef HAVE_GETCONSOLESCREENBUFFERINFO @@ -212,6 +251,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_QUADMATH_H + /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM @@ -418,6 +460,12 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Determine the maximum decimal precision in C */ +#undef PAC_C_MAX_REAL_PRECISION + +/* Define Fortran Maximum Real Decimal Precision */ +#undef PAC_FC_MAX_REAL_PRECISION + /* Width for printf() for type `long long' or `__int64', use `ll' */ #undef PRINTF_LL_WIDTH @@ -535,6 +583,12 @@ /* The size of `unsigned', as computed by sizeof. */ #undef SIZEOF_UNSIGNED +/* The size of `_Quad', as computed by sizeof. */ +#undef SIZEOF__QUAD + +/* The size of `__float128', as computed by sizeof. */ +#undef SIZEOF___FLOAT128 + /* The size of `__int64', as computed by sizeof. */ #undef SIZEOF___INT64 diff --git a/src/Makefile.in b/src/Makefile.in index 8a60a77..5f2ef19 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -114,7 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = H5config.h +CONFIG_HEADER = H5config.h $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = libhdf5.settings CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -228,7 +228,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -513,14 +513,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -530,13 +537,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -578,6 +584,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 1eed645..2355543 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -39,7 +39,6 @@ Languages: ---------- Fortran: @HDF_FORTRAN@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@ -@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HAVE_FORTRAN_2003@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ @BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ diff --git a/test/Makefile.in b/test/Makefile.in index 8b36650..d3f1b86 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -120,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ testlibinfo.sh testlinks_env.sh test_plugin.sh CONFIG_CLEAN_VPATH_FILES = @@ -535,7 +536,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -855,14 +856,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -872,13 +880,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -920,6 +927,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index dc339cd..5797dfc 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = t_mpi$(EXEEXT) testphdf5$(EXEEXT) t_cache$(EXEEXT) \ @@ -170,7 +171,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -482,14 +483,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -499,13 +507,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -547,6 +554,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 974e6b4..0f5684d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -106,7 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -449,14 +450,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -466,13 +474,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -514,6 +521,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index e128cfe..1b50662 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5copy.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -143,7 +144,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -457,14 +458,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -474,13 +482,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -522,6 +529,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index c95967d..7b4d121 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5diff.sh testph5diff.sh CONFIG_CLEAN_VPATH_FILES = @BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = ph5diff$(EXEEXT) @@ -148,7 +149,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -464,14 +465,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -481,13 +489,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -529,6 +536,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 7371adf..9865e3a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -149,7 +150,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -463,14 +464,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -480,13 +488,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -528,6 +535,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 0778fc2..d6e784a 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5importtestutil.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -143,7 +144,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -457,14 +458,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -474,13 +482,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -522,6 +529,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index ed8151f..c915437 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -110,7 +110,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5jam.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -157,7 +158,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -469,14 +470,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -486,13 +494,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -534,6 +541,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index c77784e..8fb9822 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -109,7 +109,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5ls.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -137,7 +138,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -449,14 +450,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -466,13 +474,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -514,6 +521,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 6d1bfd6..c0b6685 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -113,7 +113,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5repack.sh h5repack_plugin.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -192,7 +193,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -481,14 +482,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -498,13 +506,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -546,6 +553,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 1bbefe9..6bf37f3 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -111,7 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = testh5stat.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -172,7 +173,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -459,14 +460,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -476,13 +484,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -524,6 +531,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 0b531b3..fcfb019 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -108,7 +108,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -135,7 +136,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -446,14 +447,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -463,13 +471,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -511,6 +518,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1b8e0eb..2688e8d 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -112,7 +112,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" @@ -195,7 +196,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -484,14 +485,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -501,13 +509,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -549,6 +556,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 325bc4d..4804533 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -116,7 +116,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" @@ -171,7 +172,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -488,14 +489,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -505,13 +513,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -553,6 +560,18 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -- cgit v0.12 From 555a29e8966a615e7bf3ad64dea8139e812fc880 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Tue, 11 Aug 2015 11:44:07 -0500 Subject: [svn-r27494] Purpose: Fix HDFFV-9288 Description: Added footer to include copyright and helpdesk info. Platform tested: Re-run Doxygen on cpp_doc_config and verified the html files on a Windows 7 machine. --- c++/src/cpp_doc_config | 4 ++-- c++/src/footer.html | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 c++/src/footer.html diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 53d9a7d..376d6cc 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -873,7 +873,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = ./header_files # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -1106,7 +1106,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of diff --git a/c++/src/footer.html b/c++/src/footer.html new file mode 100644 index 0000000..5c624f7 --- /dev/null +++ b/c++/src/footer.html @@ -0,0 +1,24 @@ + + + +
+


+ + + + + +
+
+ The HDF Group Help Desk: +
+
  + Copyright by + The HDF Group +
+ and the Board of Trustees of the University of Illinois +
+
+ + + -- cgit v0.12 From 53d53ee0eeec6207e280c13e40a3c0ee2368eb06 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Tue, 11 Aug 2015 12:50:02 -0500 Subject: [svn-r27495] Description: Added ./c++/src/footer.html --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index 3629e3c..8fe25ef 100644 --- a/MANIFEST +++ b/MANIFEST @@ -379,6 +379,7 @@ ./c++/src/Makefile.in ./c++/src/RM_stylesheet.css ./c++/src/cpp_doc_config +./c++/src/footer.html ./c++/src/h5c++.in ./c++/src/header.html ./c++/src/header_files/filelist.xml -- cgit v0.12 From c98d072e6987afd9a3b7c501b36cc99f5fc7ec98 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Tue, 11 Aug 2015 13:36:39 -0500 Subject: [svn-r27496] Description: Used HTML_EXTRA_FILES for image files. Platform tested: Re-run Doxygen on cpp_doc_config and verified the html files on a Windows 7 machine. --- c++/src/cpp_doc_config | 2 +- c++/src/footer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 376d6cc..0e1fa6a 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -1139,7 +1139,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = ./header_files/help.jpg # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to diff --git a/c++/src/footer.html b/c++/src/footer.html index 5c624f7..ba37ee7 100644 --- a/c++/src/footer.html +++ b/c++/src/footer.html @@ -7,7 +7,7 @@
- The HDF Group Help Desk: + The HDF Group Help Desk:
  -- cgit v0.12 From 48c429d4a39c2257b33567f15639a2d239876e65 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Aug 2015 12:13:12 -0500 Subject: [svn-r27497] Fixed missing variable declarations. tested: h5committest. --- fortran/src/H5_ff.F90 | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 39e23a7..a95c284 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -371,40 +371,46 @@ CONTAINS ! August 25, 2008 ! ! Fortran90 Interface: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + INTEGER(HID_T) FUNCTION h5kind_to_type(ikind, flag) RESULT(h5_type) + USE ISO_C_BINDING IMPLICIT NONE - INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: ikind INTEGER, INTENT(IN) :: flag +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + Fortran_INTEGER_16=SELECTED_INT_KIND(15) +#endif + + !***** IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN + IF(ikind.EQ.Fortran_INTEGER_1)THEN h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_2)THEN h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_4)THEN h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_8)THEN h5_type = H5T_NATIVE_INTEGER_8 #if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_16)THEN h5_type = H5T_NATIVE_INTEGER_16 #endif ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN + IF(ikind.EQ.KIND(1.0_C_FLOAT))THEN h5_type = H5T_NATIVE_REAL_C_FLOAT - ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN + ELSE IF(ikind.EQ.KIND(1.0_C_DOUBLE))THEN h5_type = H5T_NATIVE_REAL_C_DOUBLE -#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN - h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -#endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 #if H5_HAVE_FLOAT128 == 1 - ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN + ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN h5_type = H5T_NATIVE_FLOAT_128 #endif #endif +#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 + ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN + h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE +#endif ELSE h5_type = -1 ENDIF -- cgit v0.12 From 91ec9431232f7b8c7d298043f34f1d43aa70a41b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Aug 2015 13:23:03 -0500 Subject: [svn-r27499] Fixed FLOAT_128 H5T type detection. tested: jam --- fortran/src/H5_ff.F90 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index a95c284..b5b2c93 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -377,7 +377,7 @@ CONTAINS INTEGER, INTENT(IN) :: ikind INTEGER, INTENT(IN) :: flag #if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - Fortran_INTEGER_16=SELECTED_INT_KIND(15) + Fortran_INTEGER_16=SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors #endif @@ -401,18 +401,19 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_FLOAT ELSE IF(ikind.EQ.KIND(1.0_C_DOUBLE))THEN h5_type = H5T_NATIVE_REAL_C_DOUBLE -#if H5_PAC_FC_MAX_REAL_PRECISION > 28 -#if H5_HAVE_FLOAT128 == 1 - ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN - h5_type = H5T_NATIVE_FLOAT_128 -#endif -#endif #if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE #endif +#if H5_PAC_FC_MAX_REAL_PRECISION > 28 +#if H5_HAVE_FLOAT128 == 1 + ELSE + h5_type = H5T_NATIVE_FLOAT_128 +#endif +#else ELSE h5_type = -1 +#endif ENDIF ENDIF -- cgit v0.12 From d3e931c772a1fea1d8d0676dd6dd3fe95b000d9e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Aug 2015 14:53:03 -0500 Subject: [svn-r27500] missing declaration --- fortran/src/H5_ff.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index b5b2c93..4ceb1a8 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -377,6 +377,7 @@ CONTAINS INTEGER, INTENT(IN) :: ikind INTEGER, INTENT(IN) :: flag #if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + INTEGER :: Fortran_INTEGER_16 Fortran_INTEGER_16=SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors #endif -- cgit v0.12